@coras-io/embed 0.5.1 → 0.6.1
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/CHANGELOG.md +34 -0
- package/README.md +15 -2
- package/dist/components/accordion/accordion-item/accordion-item.component.js +9 -3
- package/dist/components/accordion/accordion-item/accordion-item.styles.js +4 -0
- package/dist/components/accordion/accordion.component.js +8 -0
- package/dist/components/alert/alert.component.d.ts +1 -1
- package/dist/components/alert/alert.component.js +4 -3
- package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +0 -2
- package/dist/components/attraction-card/base/attraction-card.mixin.js +0 -6
- package/dist/components/attraction-card/base/attraction-card.types.d.ts +0 -1
- package/dist/components/basket-mobile/basket-mobile.component.d.ts +14 -3
- package/dist/components/basket-mobile/basket-mobile.component.js +71 -15
- package/dist/components/better-carousel/better-carousel.component.d.ts +3 -5
- package/dist/components/better-carousel/better-carousel.component.js +13 -34
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.js +5 -12
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.js +13 -5
- package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +0 -1
- package/dist/components/breadcrumbs/breadcrumbs.component.js +5 -8
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +8 -2
- package/dist/components/button/button.constants.d.ts +1 -2
- package/dist/components/button/button.constants.js +0 -1
- package/dist/components/calendar/base/calendar.mixin.js +5 -1
- package/dist/components/calendar/multi/multi.component.d.ts +2 -2
- package/dist/components/calendar/multi/multi.component.js +12 -19
- package/dist/components/carousel/carousel.component.js +9 -2
- package/dist/components/categories-tree/categories-tree.component.d.ts +5 -3
- package/dist/components/categories-tree/categories-tree.component.js +22 -21
- package/dist/components/checkbox/checkbox.component.js +5 -1
- package/dist/components/checkbox-group/checkbox-group.component.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
- package/dist/components/chip/chip.component.js +8 -3
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +6 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +15 -1
- package/dist/components/currencies-list/currencies-list.component.js +0 -1
- package/dist/components/dialog/dialog.component.js +52 -21
- package/dist/components/drawer/drawer.component.d.ts +3 -2
- package/dist/components/drawer/drawer.component.js +13 -18
- package/dist/components/drawer/drawer.styles.js +5 -2
- package/dist/components/dropdown/dropdown.component.js +6 -9
- package/dist/components/expiration-timer/expiration-timer.component.d.ts +2 -3
- package/dist/components/expiration-timer/expiration-timer.component.js +10 -8
- package/dist/components/explore-card/explore-card.component.js +3 -1
- package/dist/components/explore-card/explore-card.styles.js +31 -0
- package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
- package/dist/components/flag-icon/flag-icon.component.d.ts +4 -2
- package/dist/components/flag-icon/flag-icon.component.js +16 -4
- package/dist/components/icon/icon.component.js +15 -2
- package/dist/components/image/image.component.js +4 -3
- package/dist/components/image-viewer/image-viewer.component.js +6 -4
- package/dist/components/input-field/input-field.component.js +10 -6
- package/dist/components/layout/layout.styles.js +1 -1
- package/dist/components/locales-list/locales-list.component.js +0 -1
- package/dist/components/location-image/location-image.component.d.ts +4 -4
- package/dist/components/location-image/location-image.component.js +6 -7
- package/dist/components/locations-results/locations-results.component.d.ts +10 -0
- package/dist/components/locations-results/locations-results.component.js +22 -15
- package/dist/components/locations-results/locations-results.styles.js +4 -1
- package/dist/components/message-card/message-card.component.d.ts +1 -1
- package/dist/components/message-card/message-card.component.js +4 -3
- package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +0 -1
- package/dist/components/mobile-menu-item/mobile-menu-item.component.js +14 -16
- package/dist/components/mobile-menu-item/mobile-menu-item.styles.js +9 -5
- package/dist/components/option-group/option-chip/option-chip.component.d.ts +4 -1
- package/dist/components/option-group/option-chip/option-chip.component.js +23 -10
- package/dist/components/option-group/option-group.component.d.ts +3 -1
- package/dist/components/option-group/option-group.component.js +10 -3
- package/dist/components/overlay/overlay.component.d.ts +0 -5
- package/dist/components/overlay/overlay.component.js +3 -15
- package/dist/components/phone-country-code/phone-country-code.component.d.ts +4 -0
- package/dist/components/phone-country-code/phone-country-code.component.js +37 -0
- package/dist/components/phone-country-codes/phone-country-codes.component.js +1 -1
- package/dist/components/phone-field/phone-field.component.js +2 -2
- package/dist/components/search-button/search-button.component.d.ts +1 -1
- package/dist/components/search-button/search-button.component.js +13 -7
- package/dist/components/seated-selector/seated-selector.component.js +3 -3
- package/dist/components/seats-io/seats-io.component.d.ts +3 -2
- package/dist/components/seats-io/seats-io.component.js +31 -13
- package/dist/components/seats-io/seats-io.constants.d.ts +0 -2
- package/dist/components/seats-io/seats-io.constants.js +0 -3
- package/dist/components/seats-io/seats-io.transform.d.ts +1 -6
- package/dist/components/seats-io/seats-io.transform.js +1 -20
- package/dist/components/select-list/select-list.component.js +7 -2
- package/dist/components/select-list/select-option/select-option.component.d.ts +3 -1
- package/dist/components/select-list/select-option/select-option.component.js +10 -3
- package/dist/components/tabs/tabs.component.d.ts +2 -0
- package/dist/components/tabs/tabs.component.js +59 -5
- package/dist/components/time-tag/time-tag.component.js +1 -1
- package/dist/containers/basket/basket.component.d.ts +1 -1
- package/dist/containers/basket/basket.component.js +21 -20
- package/dist/containers/navbar/navbar.component.d.ts +12 -8
- package/dist/containers/navbar/navbar.component.js +108 -62
- package/dist/containers/navbar/navbar.styles.js +23 -5
- package/dist/containers/navbar/navbar.utils.js +4 -4
- package/dist/contexts/basket/basket.provider.d.ts +3 -4
- package/dist/contexts/basket/basket.provider.js +46 -61
- package/dist/contexts/basket/basket.types.d.ts +0 -2
- package/dist/controllers/time-expiration.d.ts +15 -2
- package/dist/controllers/time-expiration.js +47 -17
- package/dist/core/api/client.d.ts +9 -0
- package/dist/core/api/client.js +26 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +0 -2
- package/dist/core/api/middlewares/booking-session/booking-session.constants.js +0 -2
- package/dist/core/api/middlewares/booking-session/booking-session.js +3 -12
- package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +0 -1
- package/dist/core/api/middlewares/booking-session/booking-session.utils.js +6 -28
- package/dist/core/api/middlewares/error-handler/error-handler.js +5 -1
- package/dist/core/api/middlewares/retry/retry.constants.d.ts +3 -0
- package/dist/core/api/middlewares/retry/retry.constants.js +7 -0
- package/dist/core/api/middlewares/retry/retry.d.ts +2 -0
- package/dist/core/api/middlewares/retry/retry.js +48 -0
- package/dist/core/api/queries.d.ts +13 -38
- package/dist/core/api/queries.js +16 -99
- package/dist/core/events.d.ts +2 -4
- package/dist/core/i18n/date.d.ts +14 -5
- package/dist/core/i18n/date.js +47 -20
- package/dist/core/i18n/localization.js +10 -3
- package/dist/core/images/helpers.js +6 -5
- package/dist/core/images/srcset.js +2 -2
- package/dist/core/logger.d.ts +17 -0
- package/dist/core/logger.js +13 -0
- package/dist/core/types/api-schema.d.ts +7872 -0
- package/dist/core/types/seats-config.d.ts +5 -4
- package/dist/core/types/seats-config.js +10 -3
- package/dist/core/utils/crypto-address.d.ts +12 -0
- package/dist/core/utils/crypto-address.js +17 -0
- package/dist/core/utils/datetime.d.ts +13 -11
- package/dist/core/utils/datetime.js +41 -51
- package/dist/core/utils/loyalty.d.ts +8 -0
- package/dist/core/utils/loyalty.js +10 -0
- package/dist/core/utils/redaction.d.ts +9 -0
- package/dist/core/utils/redaction.js +58 -0
- package/dist/core/utils/time.js +2 -3
- package/dist/helpers/helpers.d.ts +6 -0
- package/dist/helpers/helpers.js +33 -16
- package/dist/locales/ar-SA.d.ts +38 -21
- package/dist/locales/ar-SA.js +38 -21
- package/dist/locales/da-DK.d.ts +38 -21
- package/dist/locales/da-DK.js +38 -21
- package/dist/locales/de-DE.d.ts +38 -21
- package/dist/locales/de-DE.js +38 -21
- package/dist/locales/en-IE.d.ts +38 -21
- package/dist/locales/en-IE.js +38 -21
- package/dist/locales/en-US.d.ts +38 -21
- package/dist/locales/en-US.js +38 -21
- package/dist/locales/es-ES.d.ts +38 -21
- package/dist/locales/es-ES.js +38 -21
- package/dist/locales/fr-FR.d.ts +38 -21
- package/dist/locales/fr-FR.js +38 -21
- package/dist/locales/fr-MA.d.ts +38 -21
- package/dist/locales/fr-MA.js +38 -21
- package/dist/locales/is-IS.d.ts +38 -21
- package/dist/locales/is-IS.js +38 -21
- package/dist/locales/it-IT.d.ts +38 -21
- package/dist/locales/it-IT.js +38 -21
- package/dist/locales/ms-MY.d.ts +38 -21
- package/dist/locales/ms-MY.js +38 -21
- package/dist/locales/nb-NO.d.ts +38 -21
- package/dist/locales/nb-NO.js +38 -21
- package/dist/locales/pl-PL.d.ts +38 -21
- package/dist/locales/pl-PL.js +38 -21
- package/dist/locales/pt-PT.d.ts +38 -21
- package/dist/locales/pt-PT.js +38 -21
- package/dist/locales/sv-SE.d.ts +38 -21
- package/dist/locales/sv-SE.js +38 -21
- package/dist/locales/th-TH.d.ts +38 -21
- package/dist/locales/th-TH.js +38 -21
- package/dist/locales/tr-TR.d.ts +38 -21
- package/dist/locales/tr-TR.js +38 -21
- package/dist/locales/zh-CN.d.ts +38 -21
- package/dist/locales/zh-CN.js +38 -21
- package/dist/locales/zh-HK.d.ts +38 -21
- package/dist/locales/zh-HK.js +38 -21
- package/dist/mixins/base.mixin.d.ts +3 -1
- package/dist/mixins/base.mixin.js +10 -7
- package/dist/mixins/coinbase.mixin.d.ts +13 -17
- package/dist/mixins/coinbase.mixin.js +251 -288
- package/dist/mixins/error-modal.mixin.js +8 -4
- package/dist/mixins/location-search/location-search.d.ts +13 -1
- package/dist/mixins/location-search/location-search.js +35 -27
- package/dist/mixins/overlay/overlay-mixin.js +39 -3
- package/dist/mixins/overlay/types.d.ts +1 -0
- package/dist/mixins/search-mixin/search-mixin.js +8 -5
- package/dist/sdk/diagnostics.js +2 -0
- package/dist/sdk/mount.d.ts +10 -0
- package/dist/sdk/mount.js +20 -1
- package/dist/sdk/page-registry.js +5 -0
- package/dist/sdk/params.d.ts +53 -0
- package/dist/sdk/params.js +180 -0
- package/dist/sdk/redaction.d.ts +1 -4
- package/dist/sdk/redaction.js +2 -41
- package/dist/sdk/types.d.ts +21 -7
- package/dist/sdk/url.d.ts +1 -1
- package/dist/sdk/url.js +12 -5
- package/dist/sdk/validation.d.ts +1 -26
- package/dist/sdk/validation.js +8 -145
- package/dist/styles/tokens.d.ts +1 -1
- package/dist/styles/tokens.generated.d.ts +1 -1
- package/dist/styles/tokens.generated.js +1 -1
- package/dist/views/chrome-only-page/chrome-only-page.component.d.ts +30 -0
- package/dist/views/chrome-only-page/chrome-only-page.component.js +24 -0
- package/dist/views/chrome-only-page/chrome-only-page.d.ts +8 -0
- package/dist/views/chrome-only-page/chrome-only-page.js +6 -0
- package/dist/views/chrome-only-page/chrome-only-page.styles.js +13 -0
- package/dist/views/details-page/details-page.component.d.ts +11 -4
- package/dist/views/details-page/details-page.component.js +263 -237
- package/dist/views/details-page/details-page.utilts.d.ts +63 -3
- package/dist/views/details-page/details-page.utilts.js +53 -5
- package/dist/views/details-page/partials/location-categories/location-categories.component.d.ts +29 -0
- package/dist/views/details-page/partials/location-categories/location-categories.component.js +149 -0
- package/dist/views/details-page/partials/location-categories/location-categories.d.ts +8 -0
- package/dist/views/details-page/partials/location-categories/location-categories.js +6 -0
- package/dist/views/details-page/partials/location-categories/location-categories.styles.js +35 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.component.d.ts +26 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.component.js +158 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.d.ts +8 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.js +6 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.styles.js +42 -0
- package/dist/views/details-page/partials/tour-description/tour-description.component.js +1 -4
- package/dist/views/help-page/help-page.component.d.ts +2 -0
- package/dist/views/help-page/help-page.component.js +37 -18
- package/dist/views/help-page/help-page.utils.js +6 -5
- package/dist/views/landing-page/landing-page.component.d.ts +5 -8
- package/dist/views/landing-page/landing-page.component.js +82 -97
- package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +10 -4
- package/dist/views/payment-page/controllers/crypto-auth.controller.js +53 -31
- package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +9 -5
- package/dist/views/payment-page/controllers/crypto-transfer.controller.js +26 -39
- package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +6 -1
- package/dist/views/payment-page/controllers/payment-flow.controller.js +1 -0
- package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +20 -2
- package/dist/views/payment-page/controllers/stripe-payment.controller.js +42 -19
- package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +2 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.component.js +6 -3
- package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +2 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.component.js +5 -1
- package/dist/views/payment-page/partials/confirmation/confirmation.component.js +2 -3
- package/dist/views/payment-page/partials/country-field/country-field.component.js +1 -1
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +3 -3
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +2 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.js +36 -7
- package/dist/views/payment-page/partials/stripe/stripe.utils.js +0 -3
- package/dist/views/payment-page/payment-page.component.d.ts +39 -6
- package/dist/views/payment-page/payment-page.component.js +302 -178
- package/dist/views/payment-page/payment-page.constants.d.ts +1 -27
- package/dist/views/payment-page/payment-page.constants.js +3 -30
- package/dist/views/payment-page/payment-page.types.d.ts +1 -19
- package/dist/views/payment-page/payment-page.utils.d.ts +22 -13
- package/dist/views/payment-page/payment-page.utils.js +57 -75
- package/dist/views/payment-page/services/payment-api.service.d.ts +16 -34
- package/dist/views/payment-page/services/payment-api.service.js +19 -27
- package/dist/views/search-page/search-page.component.d.ts +2 -0
- package/dist/views/search-page/search-page.component.js +39 -20
- package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +1 -0
- package/dist/views/suggestion-widget/suggestion-widget.component.js +6 -5
- package/package.json +24 -20
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +0 -10
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.js +0 -43
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.d.ts +0 -8
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js +0 -6
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.js +0 -23
- package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +0 -10
- package/dist/components/attraction-discovery/attraction-discovery.component.js +0 -52
- package/dist/components/attraction-discovery/attraction-discovery.constants.d.ts +0 -4
- package/dist/components/attraction-discovery/attraction-discovery.constants.js +0 -5
- package/dist/components/attraction-discovery/attraction-discovery.d.ts +0 -8
- package/dist/components/attraction-discovery/attraction-discovery.js +0 -6
- package/dist/components/attraction-discovery/attraction-discovery.styles.js +0 -193
- package/dist/components/basket-rewards/basket-rewards.component.d.ts +0 -10
- package/dist/components/basket-rewards/basket-rewards.component.js +0 -52
- package/dist/components/basket-rewards/basket-rewards.d.ts +0 -8
- package/dist/components/basket-rewards/basket-rewards.js +0 -6
- package/dist/components/basket-rewards/basket-rewards.styles.js +0 -18
- package/dist/components/filter-chip/filter-chip.component.d.ts +0 -12
- package/dist/components/filter-chip/filter-chip.component.js +0 -68
- package/dist/components/filter-chip/filter-chip.constants.d.ts +0 -2
- package/dist/components/filter-chip/filter-chip.constants.js +0 -2
- package/dist/components/filter-chip/filter-chip.d.ts +0 -8
- package/dist/components/filter-chip/filter-chip.js +0 -6
- package/dist/components/filter-chip/filter-chip.styles.d.ts +0 -2
- package/dist/components/filter-chip/filter-chip.styles.js +0 -162
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +0 -10
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.js +0 -43
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.d.ts +0 -8
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.js +0 -6
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.d.ts +0 -2
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.js +0 -28
- package/dist/components/image-carousel/image-carousel.component.d.ts +0 -8
- package/dist/components/image-carousel/image-carousel.component.js +0 -36
- package/dist/components/image-carousel/image-carousel.d.ts +0 -8
- package/dist/components/image-carousel/image-carousel.js +0 -6
- package/dist/components/image-carousel/image-carousel.styles.d.ts +0 -2
- package/dist/components/image-carousel/image-carousel.styles.js +0 -72
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +0 -9
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.js +0 -45
- package/dist/components/itinerary/itinerary-item/itinerary-item.d.ts +0 -8
- package/dist/components/itinerary/itinerary-item/itinerary-item.js +0 -6
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.d.ts +0 -2
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +0 -70
- package/dist/components/itinerary/itinerary.component.d.ts +0 -7
- package/dist/components/itinerary/itinerary.component.js +0 -23
- package/dist/components/itinerary/itinerary.d.ts +0 -8
- package/dist/components/itinerary/itinerary.js +0 -6
- package/dist/components/itinerary/itinerary.styles.d.ts +0 -2
- package/dist/components/itinerary/itinerary.styles.js +0 -15
- package/dist/components/marketing-tag/marketing-tag.component.d.ts +0 -5
- package/dist/components/marketing-tag/marketing-tag.component.js +0 -8
- package/dist/components/marketing-tag/marketing-tag.d.ts +0 -8
- package/dist/components/marketing-tag/marketing-tag.js +0 -6
- package/dist/components/marketing-tag/marketing-tag.styles.d.ts +0 -2
- package/dist/components/marketing-tag/marketing-tag.styles.js +0 -36
- package/dist/components/price/price.component.d.ts +0 -12
- package/dist/components/price/price.component.js +0 -38
- package/dist/components/price/price.d.ts +0 -8
- package/dist/components/price/price.js +0 -6
- package/dist/components/reviews/review/review.component.d.ts +0 -9
- package/dist/components/reviews/review/review.component.js +0 -41
- package/dist/components/reviews/review/review.d.ts +0 -8
- package/dist/components/reviews/review/review.js +0 -6
- package/dist/components/reviews/review/review.styles.d.ts +0 -2
- package/dist/components/reviews/review/review.styles.js +0 -45
- package/dist/components/reviews/reviews.component.d.ts +0 -9
- package/dist/components/reviews/reviews.component.js +0 -56
- package/dist/components/reviews/reviews.d.ts +0 -8
- package/dist/components/reviews/reviews.js +0 -6
- package/dist/components/reviews/reviews.styles.d.ts +0 -2
- package/dist/components/reviews/reviews.styles.js +0 -73
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +0 -10
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.js +0 -51
- package/dist/components/selected-tickets-preview/selected-tickets-preview.d.ts +0 -8
- package/dist/components/selected-tickets-preview/selected-tickets-preview.js +0 -6
- package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.d.ts +0 -2
- package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.js +0 -89
- package/dist/components/tag/tag.component.d.ts +0 -8
- package/dist/components/tag/tag.component.js +0 -33
- package/dist/components/tag/tag.constants.d.ts +0 -1
- package/dist/components/tag/tag.constants.js +0 -1
- package/dist/components/tag/tag.d.ts +0 -8
- package/dist/components/tag/tag.js +0 -6
- package/dist/components/tag/tag.styles.d.ts +0 -2
- package/dist/components/tag/tag.styles.js +0 -56
- package/dist/components/tooltip/tooltip.component.d.ts +0 -19
- package/dist/components/tooltip/tooltip.component.js +0 -124
- package/dist/components/tooltip/tooltip.d.ts +0 -8
- package/dist/components/tooltip/tooltip.js +0 -6
- package/dist/components/tooltip/tooltip.styles.d.ts +0 -2
- package/dist/components/tooltip/tooltip.styles.js +0 -79
- package/dist/core/signals.d.ts +0 -2
- package/dist/core/signals.js +0 -3
- package/dist/core/storybook/argTypes.d.ts +0 -1
- package/dist/core/storybook/argTypes.js +0 -46
- package/dist/core/storybook/cssprops.d.ts +0 -30
- package/dist/core/storybook/cssprops.js +0 -46
- package/dist/core/storybook/demo.d.ts +0 -4
- package/dist/core/storybook/demo.js +0 -17
- package/dist/core/types/api-errors.d.ts +0 -8
- package/dist/core/types/api-errors.js +0 -1
- package/dist/styles/contrast-fixtures.d.ts +0 -5
- package/dist/styles/contrast-fixtures.js +0 -131
- package/dist/views/payment-page/domain/payment-mappers.d.ts +0 -7
- package/dist/views/payment-page/domain/payment-mappers.js +0 -7
- package/dist/views/payment-page/domain/payment-validators.d.ts +0 -6
- package/dist/views/payment-page/domain/payment-validators.js +0 -6
- package/dist/views/payment-page/domain/recovery-payload.d.ts +0 -8
- package/dist/views/payment-page/domain/recovery-payload.js +0 -7
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +0 -22
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.js +0 -65
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.d.ts +0 -8
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.js +0 -6
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.d.ts +0 -2
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +0 -12
- package/dist/views/payment-page/payment-page.validation-schema.d.ts +0 -28
- package/dist/views/payment-page/payment-page.validation-schema.js +0 -42
- /package/dist/{components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.d.ts → views/chrome-only-page/chrome-only-page.styles.d.ts} +0 -0
- /package/dist/{components/attraction-discovery/attraction-discovery.styles.d.ts → views/details-page/partials/location-categories/location-categories.styles.d.ts} +0 -0
- /package/dist/{components/basket-rewards/basket-rewards.styles.d.ts → views/details-page/partials/location-highlights/location-highlights.styles.d.ts} +0 -0
|
@@ -6,7 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { LitElement, html } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
|
-
import "../button/button.js";
|
|
10
9
|
import "../icon/icon.js";
|
|
11
10
|
import styles from "./mobile-menu-item.styles.js";
|
|
12
11
|
export class CorasMobileMenuItem extends LitElement {
|
|
@@ -16,23 +15,22 @@ export class CorasMobileMenuItem extends LitElement {
|
|
|
16
15
|
this.label = "";
|
|
17
16
|
}
|
|
18
17
|
static { this.styles = styles; }
|
|
18
|
+
// The whole row is one native button, so it is focusable and Enter/Space
|
|
19
|
+
// activate it. Its click is composed and reaches the host's listeners.
|
|
19
20
|
render() {
|
|
20
|
-
return html `<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
21
|
+
return html `<button class="mobile-menu-item" type="button">
|
|
22
|
+
<span class="section">
|
|
23
|
+
<span class="icon">
|
|
23
24
|
<slot name="icon"></slot>
|
|
24
|
-
</
|
|
25
|
-
<
|
|
26
|
-
</
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</coras-button>
|
|
34
|
-
</div>
|
|
35
|
-
</div> `;
|
|
25
|
+
</span>
|
|
26
|
+
<span class="label">${this.label}</span>
|
|
27
|
+
</span>
|
|
28
|
+
<coras-icon
|
|
29
|
+
class="chevron"
|
|
30
|
+
assets-url="${this.assetsURL}"
|
|
31
|
+
icon="chevron-right"
|
|
32
|
+
></coras-icon>
|
|
33
|
+
</button>`;
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
__decorate([
|
|
@@ -12,7 +12,13 @@ export default css `
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: space-between;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding: 0 2.75rem;
|
|
17
|
+
border: 0;
|
|
18
|
+
background: none;
|
|
19
|
+
color: inherit;
|
|
20
|
+
font: inherit;
|
|
21
|
+
text-align: start;
|
|
16
22
|
cursor: pointer;
|
|
17
23
|
|
|
18
24
|
.section {
|
|
@@ -37,10 +43,8 @@ export default css `
|
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
fill: var(--mobile-menu-item-icon-color);
|
|
43
|
-
}
|
|
46
|
+
.chevron {
|
|
47
|
+
fill: var(--mobile-menu-item-icon-color);
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
`;
|
|
@@ -2,6 +2,9 @@ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
|
|
|
2
2
|
export declare class CorasOptionChip extends LitElement {
|
|
3
3
|
static styles: CSSResultGroup;
|
|
4
4
|
selected: boolean;
|
|
5
|
-
|
|
5
|
+
private handleKeyDown;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
6
9
|
protected render(): import("lit").TemplateResult<1>;
|
|
7
10
|
}
|
|
@@ -11,22 +11,35 @@ export class CorasOptionChip extends LitElement {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.selected = false;
|
|
14
|
+
// Consumers attach their own click handlers, so keyboard activation is
|
|
15
|
+
// translated into a click rather than a separate event.
|
|
16
|
+
this.handleKeyDown = (event) => {
|
|
17
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
18
|
+
event.preventDefault();
|
|
19
|
+
this.click();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
14
22
|
}
|
|
15
23
|
static { this.styles = styles; }
|
|
16
|
-
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback();
|
|
26
|
+
this.setAttribute("role", "radio");
|
|
27
|
+
if (!this.hasAttribute("tabindex")) {
|
|
28
|
+
this.setAttribute("tabindex", "0");
|
|
29
|
+
}
|
|
30
|
+
this.addEventListener("keydown", this.handleKeyDown);
|
|
31
|
+
}
|
|
32
|
+
disconnectedCallback() {
|
|
33
|
+
this.removeEventListener("keydown", this.handleKeyDown);
|
|
34
|
+
super.disconnectedCallback();
|
|
35
|
+
}
|
|
36
|
+
willUpdate(changedProperties) {
|
|
17
37
|
if (changedProperties.has("selected")) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this.removeAttribute("checked");
|
|
23
|
-
}
|
|
38
|
+
this.toggleAttribute("checked", this.selected);
|
|
39
|
+
this.setAttribute("aria-checked", String(this.selected));
|
|
24
40
|
}
|
|
25
|
-
super.update(changedProperties);
|
|
26
41
|
}
|
|
27
42
|
render() {
|
|
28
|
-
this.setAttribute("role", "radio");
|
|
29
|
-
this.setAttribute("aria-checked", this.selected.toString());
|
|
30
43
|
return html `<slot></slot>`;
|
|
31
44
|
}
|
|
32
45
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
1
|
+
import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
|
|
2
2
|
export declare class CorasOptionGroup extends LitElement {
|
|
3
3
|
static styles: CSSResultGroup;
|
|
4
4
|
label: string;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
5
7
|
render(): import("lit").TemplateResult<1>;
|
|
6
8
|
}
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, LitElement } from "lit";
|
|
7
|
+
import { html, LitElement, } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
9
|
import { when } from "lit/directives/when.js";
|
|
10
10
|
import styles from "./option-group.styles.js";
|
|
@@ -14,9 +14,16 @@ export class CorasOptionGroup extends LitElement {
|
|
|
14
14
|
this.label = "";
|
|
15
15
|
}
|
|
16
16
|
static { this.styles = styles; }
|
|
17
|
-
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
super.connectedCallback();
|
|
18
19
|
this.setAttribute("role", "radiogroup");
|
|
19
|
-
|
|
20
|
+
}
|
|
21
|
+
willUpdate(changed) {
|
|
22
|
+
if (changed.has("label")) {
|
|
23
|
+
this.setAttribute("aria-label", this.label);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
20
27
|
return html `
|
|
21
28
|
${when(this.label, () => html `<span data-testid="label" class="label">${this.label}</span>`)}
|
|
22
29
|
|
|
@@ -2,12 +2,7 @@ import { type CSSResultGroup, LitElement } from "lit";
|
|
|
2
2
|
export declare class CorasOverlay extends LitElement {
|
|
3
3
|
static styles: CSSResultGroup;
|
|
4
4
|
open: boolean;
|
|
5
|
-
private overlay;
|
|
6
5
|
private onAnimationStart;
|
|
7
|
-
private animationStartListener;
|
|
8
6
|
private onAnimationEnd;
|
|
9
|
-
private animationEndListener;
|
|
10
|
-
firstUpdated(): void;
|
|
11
|
-
disconnectedCallback(): void;
|
|
12
7
|
render(): import("lit").TemplateResult<1>;
|
|
13
8
|
}
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { LitElement, html } from "lit";
|
|
8
|
-
import { property
|
|
8
|
+
import { property } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
10
|
import { fireInternalEvent } from "../../core/events.js";
|
|
11
11
|
import styles from "./overlay.styles.js";
|
|
@@ -13,8 +13,6 @@ export class CorasOverlay extends LitElement {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.open = false;
|
|
16
|
-
this.animationStartListener = () => this.onAnimationStart();
|
|
17
|
-
this.animationEndListener = () => this.onAnimationEnd();
|
|
18
16
|
}
|
|
19
17
|
static { this.styles = styles; }
|
|
20
18
|
onAnimationStart() {
|
|
@@ -23,15 +21,6 @@ export class CorasOverlay extends LitElement {
|
|
|
23
21
|
onAnimationEnd() {
|
|
24
22
|
fireInternalEvent(this, "overlay-animation-ended", {});
|
|
25
23
|
}
|
|
26
|
-
firstUpdated() {
|
|
27
|
-
this.overlay.addEventListener("animationstart", this.animationStartListener);
|
|
28
|
-
this.overlay.addEventListener("animationend", this.animationEndListener);
|
|
29
|
-
}
|
|
30
|
-
disconnectedCallback() {
|
|
31
|
-
super.disconnectedCallback();
|
|
32
|
-
this.overlay.removeEventListener("animationstart", this.animationStartListener);
|
|
33
|
-
this.overlay.removeEventListener("animationend", this.animationEndListener);
|
|
34
|
-
}
|
|
35
24
|
render() {
|
|
36
25
|
const classes = {
|
|
37
26
|
overlay: true,
|
|
@@ -41,12 +30,11 @@ export class CorasOverlay extends LitElement {
|
|
|
41
30
|
class=${classMap(classes)}
|
|
42
31
|
part="overlay"
|
|
43
32
|
tabindex="-1"
|
|
33
|
+
@animationstart=${this.onAnimationStart}
|
|
34
|
+
@animationend=${this.onAnimationEnd}
|
|
44
35
|
></div>`;
|
|
45
36
|
}
|
|
46
37
|
}
|
|
47
38
|
__decorate([
|
|
48
39
|
property({ type: Boolean })
|
|
49
40
|
], CorasOverlay.prototype, "open", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
query(".overlay")
|
|
52
|
-
], CorasOverlay.prototype, "overlay", void 0);
|
|
@@ -8,6 +8,10 @@ export declare class CorasPhoneCountryCode extends LitElement {
|
|
|
8
8
|
name: string;
|
|
9
9
|
code: string;
|
|
10
10
|
phoneCode: string;
|
|
11
|
+
private handleKeyDown;
|
|
12
|
+
private focusSibling;
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
11
15
|
private handleItemClick;
|
|
12
16
|
render(): import("lit").TemplateResult<1>;
|
|
13
17
|
}
|
|
@@ -18,8 +18,45 @@ export class CorasPhoneCountryCode extends LitElement {
|
|
|
18
18
|
this.name = "";
|
|
19
19
|
this.code = "";
|
|
20
20
|
this.phoneCode = "";
|
|
21
|
+
// Rows are rendered as siblings by the virtualised list, so arrow keys walk
|
|
22
|
+
// the neighbouring rows the same way select-list walks its options.
|
|
23
|
+
this.handleKeyDown = (event) => {
|
|
24
|
+
switch (event.key) {
|
|
25
|
+
case "Enter":
|
|
26
|
+
case " ":
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
this.handleItemClick();
|
|
29
|
+
break;
|
|
30
|
+
case "ArrowDown":
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
this.focusSibling("nextElementSibling");
|
|
33
|
+
break;
|
|
34
|
+
case "ArrowUp":
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
this.focusSibling("previousElementSibling");
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
21
40
|
}
|
|
22
41
|
static { this.styles = styles; }
|
|
42
|
+
focusSibling(direction) {
|
|
43
|
+
const sibling = this[direction];
|
|
44
|
+
if (sibling instanceof CorasPhoneCountryCode) {
|
|
45
|
+
sibling.focus();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
connectedCallback() {
|
|
49
|
+
super.connectedCallback();
|
|
50
|
+
this.setAttribute("role", "option");
|
|
51
|
+
if (!this.hasAttribute("tabindex")) {
|
|
52
|
+
this.setAttribute("tabindex", "0");
|
|
53
|
+
}
|
|
54
|
+
this.addEventListener("keydown", this.handleKeyDown);
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
this.removeEventListener("keydown", this.handleKeyDown);
|
|
58
|
+
super.disconnectedCallback();
|
|
59
|
+
}
|
|
23
60
|
handleItemClick() {
|
|
24
61
|
fireInternalEvent(this, "code-selected", {
|
|
25
62
|
name: this.name,
|
|
@@ -28,7 +28,7 @@ export class CorasPhoneCountryCodes extends LitElement {
|
|
|
28
28
|
static { this.styles = styles; }
|
|
29
29
|
render() {
|
|
30
30
|
return html `
|
|
31
|
-
<div class="container">
|
|
31
|
+
<div class="container" role="listbox">
|
|
32
32
|
${virtualize({
|
|
33
33
|
items: this.items,
|
|
34
34
|
renderItem: this.renderItem,
|
|
@@ -61,7 +61,7 @@ let CorasPhoneField = class CorasPhoneField extends LitElement {
|
|
|
61
61
|
e.stopPropagation();
|
|
62
62
|
this._dropdownOpen = !this._dropdownOpen;
|
|
63
63
|
if (this._dropdownOpen) {
|
|
64
|
-
this.updateComplete.then(async () => {
|
|
64
|
+
void this.updateComplete.then(async () => {
|
|
65
65
|
this._searchField?.focus({ preventScroll: true });
|
|
66
66
|
await this._dropdown?.updateComplete;
|
|
67
67
|
this.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
@@ -76,7 +76,7 @@ let CorasPhoneField = class CorasPhoneField extends LitElement {
|
|
|
76
76
|
this._dropdownOpen = false;
|
|
77
77
|
this._searchQuery = "";
|
|
78
78
|
fireInternalEvent(this, "phone-code-selected", e.detail);
|
|
79
|
-
this.updateComplete.then(() => {
|
|
79
|
+
void this.updateComplete.then(() => {
|
|
80
80
|
this._phoneField?.focus();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -4,34 +4,40 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
import { localized, msg } from "@lit/localize";
|
|
7
8
|
import { LitElement, html } from "lit";
|
|
8
9
|
import { property } from "lit/decorators.js";
|
|
9
10
|
import "../icon/icon.js";
|
|
10
11
|
import styles from "./search-button.styles.js";
|
|
11
|
-
|
|
12
|
+
let CorasSearchButton = class CorasSearchButton extends LitElement {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.assetsURL = "";
|
|
15
|
-
this.
|
|
16
|
+
this.disabled = false;
|
|
16
17
|
}
|
|
17
18
|
static { this.styles = styles; }
|
|
18
19
|
render() {
|
|
19
20
|
return html `<button
|
|
20
21
|
part="base"
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
type="button"
|
|
23
|
+
?disabled=${this.disabled}
|
|
24
|
+
aria-disabled=${this.disabled ? "true" : "false"}
|
|
23
25
|
>
|
|
24
26
|
<coras-icon
|
|
25
|
-
slot="prefix"
|
|
26
27
|
assets-url="${this.assetsURL}"
|
|
27
28
|
icon="search"
|
|
29
|
+
label=${msg("Search")}
|
|
28
30
|
></coras-icon>
|
|
29
31
|
</button>`;
|
|
30
32
|
}
|
|
31
|
-
}
|
|
33
|
+
};
|
|
32
34
|
__decorate([
|
|
33
35
|
property({ type: String, attribute: "assets-url" })
|
|
34
36
|
], CorasSearchButton.prototype, "assetsURL", void 0);
|
|
35
37
|
__decorate([
|
|
36
38
|
property({ type: Boolean })
|
|
37
|
-
], CorasSearchButton.prototype, "
|
|
39
|
+
], CorasSearchButton.prototype, "disabled", void 0);
|
|
40
|
+
CorasSearchButton = __decorate([
|
|
41
|
+
localized()
|
|
42
|
+
], CorasSearchButton);
|
|
43
|
+
export { CorasSearchButton };
|
|
@@ -9,7 +9,7 @@ import { property, state } from "lit/decorators.js";
|
|
|
9
9
|
import { Task, TaskStatus } from "@lit/task";
|
|
10
10
|
import { consume } from "@lit/context";
|
|
11
11
|
import { localized, msg, str } from "@lit/localize";
|
|
12
|
-
import { apiGet
|
|
12
|
+
import { apiGet } from "../../core/api/queries.js";
|
|
13
13
|
import { clientContext } from "../../contexts/client.context.js";
|
|
14
14
|
import { currencyContext, distributorIdContext, localeContext, } from "../../contexts/properties.context.js";
|
|
15
15
|
import { map } from "lit/directives/map.js";
|
|
@@ -59,7 +59,7 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
59
59
|
if (!client || !attractionId || !instanceId) {
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
|
-
const { data } = await
|
|
62
|
+
const { data } = await apiGet({
|
|
63
63
|
client,
|
|
64
64
|
distributorID,
|
|
65
65
|
locale,
|
|
@@ -69,7 +69,7 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
69
69
|
instance_id: instanceId,
|
|
70
70
|
},
|
|
71
71
|
query: { currency },
|
|
72
|
-
})
|
|
72
|
+
});
|
|
73
73
|
return data ?? null;
|
|
74
74
|
},
|
|
75
75
|
args: () => [
|
|
@@ -2,6 +2,7 @@ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
|
|
|
2
2
|
import type { Language } from "@seatsio/seatsio-types";
|
|
3
3
|
import type { SupportedCurrencies } from "../../core/types/index.js";
|
|
4
4
|
import type { SeatsChartData } from "./seats-io.transform.js";
|
|
5
|
+
export declare const loadSeatsioScript: (url: string) => Promise<void>;
|
|
5
6
|
export declare class CorasSeatsIO extends LitElement {
|
|
6
7
|
static styles: CSSResultGroup;
|
|
7
8
|
region: string;
|
|
@@ -19,11 +20,11 @@ export declare class CorasSeatsIO extends LitElement {
|
|
|
19
20
|
private renderedScheme;
|
|
20
21
|
private eventsCallbacks;
|
|
21
22
|
private getConfig;
|
|
22
|
-
private loadSeatsio;
|
|
23
23
|
private getSeatsio;
|
|
24
24
|
private renderSeatsMap;
|
|
25
25
|
private getCdnUrl;
|
|
26
|
-
updated(changed: PropertyValues):
|
|
26
|
+
updated(changed: PropertyValues): void;
|
|
27
|
+
private rebuildChartIfNeeded;
|
|
27
28
|
disconnectedCallback(): void;
|
|
28
29
|
render(): import("lit").TemplateResult<1>;
|
|
29
30
|
}
|
|
@@ -11,6 +11,27 @@ import { ColorSchemeController } from "../../core/color-scheme.js";
|
|
|
11
11
|
import { convertToLocaleCurrency } from "../../core/currency/index.js";
|
|
12
12
|
import { SEATS_IO_DEFAULTS } from "./seats-io.constants.js";
|
|
13
13
|
import styles from "./seats-io.styles.js";
|
|
14
|
+
// One in-flight load per chart bundle URL, shared by every element on the
|
|
15
|
+
// page, so two charts mounting together inject one script tag. A failed load
|
|
16
|
+
// is forgotten so a later mount can try again.
|
|
17
|
+
const seatsioScriptLoads = new Map();
|
|
18
|
+
export const loadSeatsioScript = (url) => {
|
|
19
|
+
let load = seatsioScriptLoads.get(url);
|
|
20
|
+
if (!load) {
|
|
21
|
+
load = new Promise((resolve, reject) => {
|
|
22
|
+
const script = document.createElement("script");
|
|
23
|
+
script.onload = () => resolve();
|
|
24
|
+
script.onerror = () => {
|
|
25
|
+
seatsioScriptLoads.delete(url);
|
|
26
|
+
reject(new Error(`Could not load ${url}`));
|
|
27
|
+
};
|
|
28
|
+
script.src = url;
|
|
29
|
+
document.head.appendChild(script);
|
|
30
|
+
});
|
|
31
|
+
seatsioScriptLoads.set(url, load);
|
|
32
|
+
}
|
|
33
|
+
return load;
|
|
34
|
+
};
|
|
14
35
|
export class CorasSeatsIO extends LitElement {
|
|
15
36
|
constructor() {
|
|
16
37
|
super(...arguments);
|
|
@@ -97,20 +118,9 @@ export class CorasSeatsIO extends LitElement {
|
|
|
97
118
|
};
|
|
98
119
|
return config;
|
|
99
120
|
}
|
|
100
|
-
loadSeatsio() {
|
|
101
|
-
return new Promise((resolve, reject) => {
|
|
102
|
-
const script = document.createElement("script");
|
|
103
|
-
script.onload = () => {
|
|
104
|
-
resolve(void 0);
|
|
105
|
-
};
|
|
106
|
-
script.onerror = () => reject(`Could not load ${script.src}`);
|
|
107
|
-
script.src = this.getCdnUrl();
|
|
108
|
-
document.head.appendChild(script);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
121
|
getSeatsio() {
|
|
112
122
|
if (typeof seatsio === "undefined") {
|
|
113
|
-
return this.
|
|
123
|
+
return loadSeatsioScript(this.getCdnUrl());
|
|
114
124
|
}
|
|
115
125
|
else {
|
|
116
126
|
return Promise.resolve();
|
|
@@ -124,8 +134,11 @@ export class CorasSeatsIO extends LitElement {
|
|
|
124
134
|
this.seatsioInstance = new seatsio.SeatingChart(config);
|
|
125
135
|
this.seatsioInstance.render();
|
|
126
136
|
}
|
|
127
|
-
|
|
137
|
+
updated(changed) {
|
|
128
138
|
super.updated(changed);
|
|
139
|
+
void this.rebuildChartIfNeeded(changed);
|
|
140
|
+
}
|
|
141
|
+
async rebuildChartIfNeeded(changed) {
|
|
129
142
|
// Everything below is baked into the chart at construction, so a change to
|
|
130
143
|
// any of it needs a rebuild, not a prop update the running chart ignores.
|
|
131
144
|
// The scheme is not a Lit property (the controller drives it), so compare it
|
|
@@ -143,6 +156,11 @@ export class CorasSeatsIO extends LitElement {
|
|
|
143
156
|
this.renderedScheme = this.colorScheme.scheme;
|
|
144
157
|
try {
|
|
145
158
|
await this.getSeatsio();
|
|
159
|
+
// The element may have been removed while the script loaded; its
|
|
160
|
+
// container is detached and a chart rendered into it leaks.
|
|
161
|
+
if (!this.isConnected) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
146
164
|
this.seatsioInstance?.destroy();
|
|
147
165
|
this.renderSeatsMap();
|
|
148
166
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CategoryKey } from "@seatsio/seatsio-types";
|
|
2
2
|
import type { components } from "../../core/types/api-schema.js";
|
|
3
3
|
import type { SupportedCurrencies } from "../../core/types/index.js";
|
|
4
4
|
type SeatCategory = components["schemas"]["SeatCategory"];
|
|
@@ -75,9 +75,4 @@ export declare const buildTickets: (selectedLabels: string[], availableSeats: Re
|
|
|
75
75
|
* All amounts in minor units.
|
|
76
76
|
*/
|
|
77
77
|
export declare const buildSelectionSummary: (seats: SelectedSeat[], availableSeats: Record<string, AvailableSeat>, flatPriceBands: FlatPriceBand[], categories: ChartCategory[]) => SelectionSummary;
|
|
78
|
-
export declare const makeIsSeatSelectable: (availableSeats: Record<string, AvailableSeat>) => (object: SelectableObject) => boolean;
|
|
79
|
-
export declare const makeObjectColor: (availableSeats: Record<string, AvailableSeat>, categoryColors: Record<string, string>) => (object: SelectableObject, defaultColor: string) => string;
|
|
80
|
-
export declare const setSectionColor: (section: Section, _defaultColor: string) => string;
|
|
81
|
-
export declare const makeRestrictedViewInfo: (availableSeats: Record<string, AvailableSeat>) => (object: SelectableObject) => string;
|
|
82
|
-
export declare const categoryColorMap: (categories: ChartCategory[]) => Record<string, string>;
|
|
83
78
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CATEGORY_COLORS
|
|
1
|
+
import { CATEGORY_COLORS } from "./seats-io.constants.js";
|
|
2
2
|
const toArray = (response) => Array.isArray(response) ? response : [response];
|
|
3
3
|
const bandLabel = (band, categoryId) => band.price_category || band.section_name || String(categoryId);
|
|
4
4
|
const flattenPriceBand = (band, currency) => (band.price_types ?? []).map((priceType) => ({
|
|
@@ -139,22 +139,3 @@ export const buildSelectionSummary = (seats, availableSeats, flatPriceBands, cat
|
|
|
139
139
|
});
|
|
140
140
|
return { groups: [...groups.values()], subtotal, fees, total };
|
|
141
141
|
};
|
|
142
|
-
const isReserved = (object) => {
|
|
143
|
-
const status = "status" in object ? object.status : undefined;
|
|
144
|
-
return status === "reservedByToken" || status === "booked";
|
|
145
|
-
};
|
|
146
|
-
export const makeIsSeatSelectable = (availableSeats) => (object) => !isReserved(object) && object.label in availableSeats;
|
|
147
|
-
export const makeObjectColor = (availableSeats, categoryColors) => (object, defaultColor) => {
|
|
148
|
-
const seat = availableSeats[object.label];
|
|
149
|
-
if (!seat || isReserved(object)) {
|
|
150
|
-
return defaultColor;
|
|
151
|
-
}
|
|
152
|
-
return categoryColors[String(seat.categoryID)] ?? defaultColor;
|
|
153
|
-
};
|
|
154
|
-
export const setSectionColor = (section, _defaultColor) => section.numberOfSelectableObjects > 0
|
|
155
|
-
? SECTION_AVAILABLE_COLOR
|
|
156
|
-
: SECTION_UNAVAILABLE_COLOR;
|
|
157
|
-
// Price and category already show in the default popover; the restricted-view
|
|
158
|
-
// note is the one piece of seat info the renderer doesn't surface on its own.
|
|
159
|
-
export const makeRestrictedViewInfo = (availableSeats) => (object) => availableSeats[object.label]?.restrictedView ?? "";
|
|
160
|
-
export const categoryColorMap = (categories) => Object.fromEntries(categories.map((category) => [category.key, category.color]));
|
|
@@ -9,6 +9,9 @@ import { state } from "lit/decorators.js";
|
|
|
9
9
|
import styles from "./select-list.styles.js";
|
|
10
10
|
import { property } from "lit/decorators.js";
|
|
11
11
|
import { when } from "lit/directives/when.js";
|
|
12
|
+
// Options need ids so the listbox can point at the focused one through
|
|
13
|
+
// aria-activedescendant; generate them only for options that have none.
|
|
14
|
+
let generatedOptionIdCount = 0;
|
|
12
15
|
export class CorasSelectList extends LitElement {
|
|
13
16
|
constructor() {
|
|
14
17
|
super(...arguments);
|
|
@@ -94,7 +97,6 @@ export class CorasSelectList extends LitElement {
|
|
|
94
97
|
const options = this.getOptions();
|
|
95
98
|
// Remove focus from all options
|
|
96
99
|
options.forEach((option) => {
|
|
97
|
-
option.setAttribute("aria-selected", "false");
|
|
98
100
|
option.removeAttribute("focused"); // Using an attribute for styling
|
|
99
101
|
});
|
|
100
102
|
// Focus on the new option
|
|
@@ -102,7 +104,10 @@ export class CorasSelectList extends LitElement {
|
|
|
102
104
|
this.focusedIndex = index;
|
|
103
105
|
const focusedOption = options[index];
|
|
104
106
|
if (focusedOption) {
|
|
105
|
-
focusedOption.
|
|
107
|
+
if (!focusedOption.id) {
|
|
108
|
+
focusedOption.id = `coras-select-option-${++generatedOptionIdCount}`;
|
|
109
|
+
}
|
|
110
|
+
this.setAttribute("aria-activedescendant", focusedOption.id);
|
|
106
111
|
focusedOption.setAttribute("focused", ""); // For styling
|
|
107
112
|
focusedOption.scrollIntoView({ block: "nearest" });
|
|
108
113
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
1
|
+
import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
|
|
2
2
|
export declare class CorasSelectOption extends LitElement {
|
|
3
3
|
static styles: CSSResultGroup;
|
|
4
4
|
key: string;
|
|
5
5
|
selected: boolean;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
6
8
|
render(): import("lit").TemplateResult<1>;
|
|
7
9
|
}
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement, html } from "lit";
|
|
7
|
+
import { LitElement, html, } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
9
|
import styles from "./select-option.styles.js";
|
|
10
10
|
export class CorasSelectOption extends LitElement {
|
|
@@ -14,9 +14,16 @@ export class CorasSelectOption extends LitElement {
|
|
|
14
14
|
this.selected = false;
|
|
15
15
|
}
|
|
16
16
|
static { this.styles = styles; }
|
|
17
|
-
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
super.connectedCallback();
|
|
18
19
|
this.setAttribute("role", "option");
|
|
19
|
-
|
|
20
|
+
}
|
|
21
|
+
willUpdate(changed) {
|
|
22
|
+
if (changed.has("selected")) {
|
|
23
|
+
this.setAttribute("aria-selected", String(this.selected));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
20
27
|
return html ` <slot></slot> `;
|
|
21
28
|
}
|
|
22
29
|
}
|
|
@@ -6,6 +6,7 @@ export declare class CorasTabs extends LitElement {
|
|
|
6
6
|
private panels;
|
|
7
7
|
private activeTab?;
|
|
8
8
|
protected updated(): void;
|
|
9
|
+
private syncTabIndexes;
|
|
9
10
|
private getActiveTab;
|
|
10
11
|
private getActivePanel;
|
|
11
12
|
private setTabActive;
|
|
@@ -14,6 +15,7 @@ export declare class CorasTabs extends LitElement {
|
|
|
14
15
|
private setPanelInactive;
|
|
15
16
|
private findPanelByTab;
|
|
16
17
|
private handleClick;
|
|
18
|
+
private handleKeyDown;
|
|
17
19
|
private setActiveTab;
|
|
18
20
|
protected render(): import("lit").TemplateResult<1>;
|
|
19
21
|
}
|