@coras-io/embed 0.5.0 → 0.6.0
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 +36 -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.js +0 -1
- 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/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 +14 -152
- 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
|
@@ -19,6 +19,16 @@ export class CorasTabs extends LitElement {
|
|
|
19
19
|
if (activeTab) {
|
|
20
20
|
this.setActiveTab(activeTab);
|
|
21
21
|
}
|
|
22
|
+
this.syncTabIndexes();
|
|
23
|
+
}
|
|
24
|
+
// Roving tabindex: only the active tab (or the first one when none is
|
|
25
|
+
// active) sits in the Tab order; arrows move between the others.
|
|
26
|
+
syncTabIndexes() {
|
|
27
|
+
const tabs = this.tabs;
|
|
28
|
+
const focusableTab = this.getActiveTab() ?? tabs[0];
|
|
29
|
+
tabs.forEach((tab) => {
|
|
30
|
+
tab.tabIndex = tab === focusableTab ? 0 : -1;
|
|
31
|
+
});
|
|
22
32
|
}
|
|
23
33
|
getActiveTab() {
|
|
24
34
|
return this.tabs.find((el) => el.active);
|
|
@@ -53,6 +63,38 @@ export class CorasTabs extends LitElement {
|
|
|
53
63
|
fireInternalEvent(this, "tab-changed", { tab: tab.panel });
|
|
54
64
|
}
|
|
55
65
|
}
|
|
66
|
+
handleKeyDown(event) {
|
|
67
|
+
const tabs = this.tabs;
|
|
68
|
+
const currentIndex = tabs.findIndex((tab) => tab === event.target.closest("coras-tab"));
|
|
69
|
+
if (currentIndex === -1) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let nextIndex;
|
|
73
|
+
switch (event.key) {
|
|
74
|
+
case "ArrowRight":
|
|
75
|
+
nextIndex = (currentIndex + 1) % tabs.length;
|
|
76
|
+
break;
|
|
77
|
+
case "ArrowLeft":
|
|
78
|
+
nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;
|
|
79
|
+
break;
|
|
80
|
+
case "Home":
|
|
81
|
+
nextIndex = 0;
|
|
82
|
+
break;
|
|
83
|
+
case "End":
|
|
84
|
+
nextIndex = tabs.length - 1;
|
|
85
|
+
break;
|
|
86
|
+
case "Enter":
|
|
87
|
+
case " ":
|
|
88
|
+
nextIndex = currentIndex;
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
const nextTab = tabs[nextIndex];
|
|
95
|
+
nextTab.focus();
|
|
96
|
+
fireInternalEvent(this, "tab-changed", { tab: nextTab.panel });
|
|
97
|
+
}
|
|
56
98
|
setActiveTab(tab) {
|
|
57
99
|
if (tab !== this.activeTab) {
|
|
58
100
|
const activeTab = this.getActiveTab();
|
|
@@ -61,15 +103,27 @@ export class CorasTabs extends LitElement {
|
|
|
61
103
|
this.activeTab = tab;
|
|
62
104
|
this.setTabActive(tab);
|
|
63
105
|
this.setPanelActive(nextPanel);
|
|
64
|
-
|
|
65
|
-
|
|
106
|
+
// Only clear the previous selection. When markup arrives with a tab
|
|
107
|
+
// already marked `active` and `selected-tab` naming that same tab, the
|
|
108
|
+
// old and new selection are one element, and deactivating unconditionally
|
|
109
|
+
// stripped the attribute that had just been set.
|
|
110
|
+
if (activeTab !== tab) {
|
|
111
|
+
this.setTabInactive(activeTab);
|
|
112
|
+
}
|
|
113
|
+
if (activePanel !== nextPanel) {
|
|
114
|
+
this.setPanelInactive(activePanel);
|
|
115
|
+
}
|
|
66
116
|
}
|
|
67
117
|
}
|
|
68
118
|
render() {
|
|
69
119
|
return html `
|
|
70
|
-
<div
|
|
71
|
-
|
|
72
|
-
|
|
120
|
+
<div
|
|
121
|
+
class="tabs"
|
|
122
|
+
@click=${this.handleClick}
|
|
123
|
+
@keydown=${this.handleKeyDown}
|
|
124
|
+
>
|
|
125
|
+
<ul part="nav" role="tablist">
|
|
126
|
+
<slot name="nav" @slotchange=${this.syncTabIndexes}></slot>
|
|
73
127
|
</ul>
|
|
74
128
|
<slot name="body"></slot>
|
|
75
129
|
</div>
|
|
@@ -17,7 +17,7 @@ let CorasTimeTag = class CorasTimeTag extends LitElement {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
19
|
this.assetsURL = "";
|
|
20
|
-
this.datetime = "
|
|
20
|
+
this.datetime = "";
|
|
21
21
|
this.timezone = "Europe/Dublin";
|
|
22
22
|
this.locale = "en-GB";
|
|
23
23
|
}
|
|
@@ -13,7 +13,7 @@ export declare class CorasBasket extends LitElement {
|
|
|
13
13
|
currency: SupportedCurrencies;
|
|
14
14
|
assetsURL: string;
|
|
15
15
|
private basket;
|
|
16
|
-
connectedCallback():
|
|
16
|
+
connectedCallback(): void;
|
|
17
17
|
private getFormattedPrice;
|
|
18
18
|
private handleCheckout;
|
|
19
19
|
private handleRemoveItem;
|
|
@@ -4,7 +4,9 @@ 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 { getLoyaltyAmount } from "../../core/utils/loyalty.js";
|
|
7
8
|
import { LitElement, html } from "lit";
|
|
9
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
8
10
|
import { consume, ContextConsumer } from "@lit/context";
|
|
9
11
|
import { TaskStatus } from "@lit/task";
|
|
10
12
|
import { fireInternalEvent } from "../../core/events.js";
|
|
@@ -19,6 +21,8 @@ import { property } from "lit/decorators.js";
|
|
|
19
21
|
import { currencyContext, localeContext, assetsURLContext, } from "../../contexts/properties.context.js";
|
|
20
22
|
import { localized, msg, str } from "@lit/localize";
|
|
21
23
|
import { convertToLocaleCurrency } from "../../core/currency/index.js";
|
|
24
|
+
import { adaptPresetImages } from "../../core/images/preset-adapter.js";
|
|
25
|
+
import { selectCorasImage } from "../../core/images/selection.js";
|
|
22
26
|
import { formatDateTimeForDisplay, formatTimeForDisplay, } from "../../core/utils/datetime.js";
|
|
23
27
|
let CorasBasket = class CorasBasket extends LitElement {
|
|
24
28
|
constructor() {
|
|
@@ -26,12 +30,13 @@ let CorasBasket = class CorasBasket extends LitElement {
|
|
|
26
30
|
this.expanded = false;
|
|
27
31
|
this.checkout = false;
|
|
28
32
|
}
|
|
29
|
-
|
|
33
|
+
connectedCallback() {
|
|
30
34
|
super.connectedCallback();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
void this.updateComplete.then(() => {
|
|
36
|
+
this.basket = new ContextConsumer(this, {
|
|
37
|
+
context: basketContext,
|
|
38
|
+
subscribe: true,
|
|
39
|
+
});
|
|
35
40
|
});
|
|
36
41
|
}
|
|
37
42
|
getFormattedPrice(value) {
|
|
@@ -171,8 +176,9 @@ let CorasBasket = class CorasBasket extends LitElement {
|
|
|
171
176
|
if (!this.basket?.value?.items || this.basket.value.items.length === 0) {
|
|
172
177
|
return html `<coras-basket-empty></coras-basket-empty>`;
|
|
173
178
|
}
|
|
174
|
-
|
|
175
|
-
|
|
179
|
+
// Keyed so removing a row never hands its element (and its running
|
|
180
|
+
// countdown) to the reservation that follows it.
|
|
181
|
+
return repeat(this.basket.value.items, (reservation) => reservation.reservation_id, (reservation) => {
|
|
176
182
|
const date = reservation.start_datetime
|
|
177
183
|
? formatDateTimeForDisplay({
|
|
178
184
|
dateTime: reservation.start_datetime,
|
|
@@ -190,9 +196,9 @@ let CorasBasket = class CorasBasket extends LitElement {
|
|
|
190
196
|
locale: this.locale,
|
|
191
197
|
})
|
|
192
198
|
: "";
|
|
193
|
-
const imageUrl = reservation.images
|
|
194
|
-
|
|
195
|
-
|
|
199
|
+
const imageUrl = selectCorasImage(adaptPresetImages(reservation.images), {
|
|
200
|
+
slot: "thumbnail",
|
|
201
|
+
})?.primary.url ?? "";
|
|
196
202
|
const { section, seats } = this.getSeatDetails(reservation);
|
|
197
203
|
const tickets = reservation.tickets ?? [];
|
|
198
204
|
const distinctPriceTypes = new Set(tickets.map((ticket) => ticket.price_type_id).filter(Boolean));
|
|
@@ -231,22 +237,17 @@ let CorasBasket = class CorasBasket extends LitElement {
|
|
|
231
237
|
></coras-icon>
|
|
232
238
|
</coras-basket-item>
|
|
233
239
|
`;
|
|
234
|
-
})
|
|
235
|
-
`;
|
|
240
|
+
});
|
|
236
241
|
}
|
|
237
242
|
render() {
|
|
238
243
|
const loyalty = this.basket?.value?.loyalty;
|
|
239
|
-
const payAmount = loyalty
|
|
240
|
-
|
|
241
|
-
: NaN;
|
|
242
|
-
const hasTokens = !isNaN(payAmount) && payAmount > 0;
|
|
244
|
+
const payAmount = getLoyaltyAmount(loyalty, "pay");
|
|
245
|
+
const hasTokens = payAmount > 0;
|
|
243
246
|
const formattedFidaAmount = hasTokens
|
|
244
247
|
? new Intl.NumberFormat(this.locale).format(payAmount)
|
|
245
248
|
: "";
|
|
246
|
-
const earnAmount = loyalty
|
|
247
|
-
|
|
248
|
-
: NaN;
|
|
249
|
-
const hasEarnTokens = !isNaN(earnAmount) && earnAmount > 0;
|
|
249
|
+
const earnAmount = getLoyaltyAmount(loyalty, "earn");
|
|
250
|
+
const hasEarnTokens = earnAmount > 0;
|
|
250
251
|
const formattedEarnTokensAmount = hasEarnTokens
|
|
251
252
|
? new Intl.NumberFormat(this.locale).format(earnAmount)
|
|
252
253
|
: "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
1
|
+
import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
|
|
2
2
|
import "../../components/button/button.js";
|
|
3
3
|
import "../../components/icon/icon.js";
|
|
4
4
|
import "../../components/input-field/input-field.js";
|
|
@@ -20,7 +20,8 @@ import type { SearchMixinInterface } from "../../mixins/search-mixin/types.js";
|
|
|
20
20
|
import type { PageName } from "../../core/types/shared.js";
|
|
21
21
|
import type { paths } from "../../core/types/api-schema.js";
|
|
22
22
|
import type { Client } from "openapi-fetch";
|
|
23
|
-
|
|
23
|
+
import type { BasketContext } from "../../contexts/basket/basket.types.js";
|
|
24
|
+
declare const CorasNavBar_base: import("../../contexts/utils.js").Constructor<SearchMixinInterface> & typeof LitElement;
|
|
24
25
|
export declare class CorasNavBar extends CorasNavBar_base implements SearchMixinInterface {
|
|
25
26
|
static styles: CSSResultGroup;
|
|
26
27
|
assetsURL: string;
|
|
@@ -46,14 +47,17 @@ export declare class CorasNavBar extends CorasNavBar_base implements SearchMixin
|
|
|
46
47
|
protected isSearchDropdownOpen: boolean;
|
|
47
48
|
protected currentMobileSubmenu: DrawerSubmenu | null;
|
|
48
49
|
protected isMobileDrawerOpen: boolean;
|
|
50
|
+
private isBasketDropdownOpen;
|
|
51
|
+
private isBasketMobileOpen;
|
|
49
52
|
currentPage: PageName;
|
|
50
53
|
dispatchPageUpdate: (params: PageDispatchInput) => void;
|
|
51
54
|
private get shouldRenderMobileMenu();
|
|
52
|
-
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
connectedCallback():
|
|
55
|
+
basket?: BasketContext;
|
|
56
|
+
private isMobile;
|
|
57
|
+
private readonly layoutObserver;
|
|
58
|
+
connectedCallback(): void;
|
|
56
59
|
disconnectedCallback(): void;
|
|
60
|
+
willUpdate(changed: PropertyValues): void;
|
|
57
61
|
private toggleCurrenciesDropdown;
|
|
58
62
|
private handleCurrenciesDropdownClose;
|
|
59
63
|
private handleCurrenciesOptionClicked;
|
|
@@ -61,8 +65,8 @@ export declare class CorasNavBar extends CorasNavBar_base implements SearchMixin
|
|
|
61
65
|
private handleLocalesDropdownClose;
|
|
62
66
|
private handleLocalesOptionClicked;
|
|
63
67
|
private handleCheckout;
|
|
64
|
-
private isMobile;
|
|
65
68
|
private toggleBasketDropdown;
|
|
69
|
+
openBasket(): void;
|
|
66
70
|
private handleBasketDropdownClose;
|
|
67
71
|
private toggleSearchDropdown;
|
|
68
72
|
private handleSearchDropdownClose;
|
|
@@ -70,6 +74,7 @@ export declare class CorasNavBar extends CorasNavBar_base implements SearchMixin
|
|
|
70
74
|
private handleSearchMoreOptionClicked;
|
|
71
75
|
private setCurrentMobileSubmenu;
|
|
72
76
|
private handleSubmenuClose;
|
|
77
|
+
private handleBasketMobileClosed;
|
|
73
78
|
private handleMobileDrawerClosed;
|
|
74
79
|
private toggleMobileDrawer;
|
|
75
80
|
private handleSearchInputChange;
|
|
@@ -103,7 +108,6 @@ export declare class CorasNavBar extends CorasNavBar_base implements SearchMixin
|
|
|
103
108
|
private renderBrandHome;
|
|
104
109
|
private renderSearchOnlyHeader;
|
|
105
110
|
private renderFullHeader;
|
|
106
|
-
willUpdate(): void;
|
|
107
111
|
render(): import("lit").TemplateResult<1>;
|
|
108
112
|
}
|
|
109
113
|
export {};
|
|
@@ -4,12 +4,12 @@ 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, nothing } from "lit";
|
|
7
|
+
import { html, LitElement, nothing, } from "lit";
|
|
8
8
|
import { property, state } from "lit/decorators.js";
|
|
9
9
|
import { ColorSchemeController } from "../../core/color-scheme.js";
|
|
10
10
|
import { when } from "lit/directives/when.js";
|
|
11
11
|
import { localized, msg } from "@lit/localize";
|
|
12
|
-
import { consume
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
13
|
import { safeUrl } from "@coras-io/brand-tokens";
|
|
14
14
|
import "../../components/button/button.js";
|
|
15
15
|
import "../../components/icon/icon.js";
|
|
@@ -34,12 +34,12 @@ import { addRecentlySelectedSearches, DrawerSubmenu, getLocaleLabel, getRecently
|
|
|
34
34
|
import styles from "./navbar.styles.js";
|
|
35
35
|
import { pageDispatchContext, } from "../../contexts/events.context.js";
|
|
36
36
|
import { assetsURLContext, currenciesContext, currencyContext, distributorIdContext, localeContext, localesContext, } from "../../contexts/properties.context.js";
|
|
37
|
-
import { SignalWatcher } from "@lit-labs/signals";
|
|
38
|
-
import { isBasketDropdownOpen, isBasketMobileOpen, } from "../../core/signals.js";
|
|
39
37
|
import { currentPageContext } from "../../contexts/current-page.context.js";
|
|
40
38
|
import { clientContext } from "../../contexts/client.context.js";
|
|
41
39
|
import { basketContext } from "../../contexts/basket/basket.context.js";
|
|
42
|
-
|
|
40
|
+
// The `navbar (max-width: 530px)` container query in the stylesheet, in px.
|
|
41
|
+
const MOBILE_LAYOUT_MAX_WIDTH = 530;
|
|
42
|
+
let CorasNavBar = class CorasNavBar extends SearchMixin(LitElement) {
|
|
43
43
|
constructor() {
|
|
44
44
|
super(...arguments);
|
|
45
45
|
this.searchOnly = false;
|
|
@@ -55,17 +55,17 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
55
55
|
this.isSearchDropdownOpen = false;
|
|
56
56
|
this.currentMobileSubmenu = null;
|
|
57
57
|
this.isMobileDrawerOpen = false;
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
this.isBasketDropdownOpen = false;
|
|
59
|
+
this.isBasketMobileOpen = false;
|
|
60
|
+
// Follows the host's own width, the same measure the `navbar` container
|
|
61
|
+
// queries in the stylesheet use, so the basket opens as a modal exactly when
|
|
62
|
+
// the CSS lays the navbar out for a narrow container, whatever the window is.
|
|
63
|
+
this.isMobile = false;
|
|
64
|
+
this.layoutObserver = new ResizeObserver((entries) => {
|
|
65
|
+
for (const entry of entries) {
|
|
66
|
+
this.isMobile = entry.contentRect.width <= MOBILE_LAYOUT_MAX_WIDTH;
|
|
63
67
|
}
|
|
64
|
-
|
|
65
|
-
this.requestUpdate();
|
|
66
|
-
}
|
|
67
|
-
this._wasMobile = mobile;
|
|
68
|
-
};
|
|
68
|
+
});
|
|
69
69
|
this.handleCurrenciesOptionClicked = (selectedCurrency) => {
|
|
70
70
|
this.dispatchPageUpdate({
|
|
71
71
|
currency: selectedCurrency,
|
|
@@ -107,19 +107,20 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
107
107
|
get shouldRenderMobileMenu() {
|
|
108
108
|
return (this.showLanguageSelector || this.showCurrencySelector || this.showSearch);
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
super.connectedCallback
|
|
112
|
-
|
|
113
|
-
this.basket = new ContextConsumer(this, {
|
|
114
|
-
context: basketContext,
|
|
115
|
-
subscribe: true,
|
|
116
|
-
});
|
|
117
|
-
window.addEventListener("resize", this.handleResize);
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
super.connectedCallback();
|
|
112
|
+
this.layoutObserver.observe(this);
|
|
118
113
|
}
|
|
119
114
|
disconnectedCallback() {
|
|
120
115
|
super.disconnectedCallback();
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
this.layoutObserver.disconnect();
|
|
117
|
+
this.isBasketDropdownOpen = false;
|
|
118
|
+
}
|
|
119
|
+
willUpdate(changed) {
|
|
120
|
+
this.dataset.colorScheme = this.colorScheme.scheme;
|
|
121
|
+
if (changed.has("isMobile") && !this.isMobile) {
|
|
122
|
+
this.isBasketMobileOpen = false;
|
|
123
|
+
}
|
|
123
124
|
}
|
|
124
125
|
toggleCurrenciesDropdown(event) {
|
|
125
126
|
event.stopPropagation();
|
|
@@ -144,24 +145,32 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
144
145
|
currency: this.currency,
|
|
145
146
|
page: "payment",
|
|
146
147
|
});
|
|
147
|
-
isBasketDropdownOpen
|
|
148
|
-
isBasketMobileOpen
|
|
149
|
-
}
|
|
150
|
-
isMobile() {
|
|
151
|
-
return window.innerWidth <= 530;
|
|
148
|
+
this.isBasketDropdownOpen = false;
|
|
149
|
+
this.isBasketMobileOpen = false;
|
|
152
150
|
}
|
|
153
151
|
toggleBasketDropdown(event) {
|
|
154
152
|
event.stopPropagation();
|
|
155
|
-
if (this.isMobile
|
|
156
|
-
isBasketMobileOpen.
|
|
153
|
+
if (this.isMobile) {
|
|
154
|
+
this.isBasketMobileOpen = !this.isBasketMobileOpen;
|
|
157
155
|
}
|
|
158
156
|
else {
|
|
159
|
-
isBasketDropdownOpen.
|
|
157
|
+
this.isBasketDropdownOpen = !this.isBasketDropdownOpen;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// The details page asks its navbar to open the basket after adding an item.
|
|
161
|
+
// The navbar decides between the modal and the dropdown, so the caller does
|
|
162
|
+
// not have to know which layout is active.
|
|
163
|
+
openBasket() {
|
|
164
|
+
if (this.isMobile) {
|
|
165
|
+
this.isBasketMobileOpen = true;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
this.isBasketDropdownOpen = true;
|
|
160
169
|
}
|
|
161
170
|
}
|
|
162
171
|
handleBasketDropdownClose(event) {
|
|
163
172
|
event.stopPropagation();
|
|
164
|
-
isBasketDropdownOpen
|
|
173
|
+
this.isBasketDropdownOpen = false;
|
|
165
174
|
}
|
|
166
175
|
toggleSearchDropdown(event) {
|
|
167
176
|
event.stopPropagation();
|
|
@@ -171,7 +180,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
171
180
|
if (recentlySelectedSearches.length === 0) {
|
|
172
181
|
if ((this.searchValue && this.searchValue.length >= 3) ||
|
|
173
182
|
!this.searchTask.value) {
|
|
174
|
-
this.searchTask.run();
|
|
183
|
+
void this.searchTask.run();
|
|
175
184
|
}
|
|
176
185
|
}
|
|
177
186
|
}
|
|
@@ -192,7 +201,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
192
201
|
...(item.type === "attraction" ? { id: item.value } : {}),
|
|
193
202
|
});
|
|
194
203
|
if (this.isMobileDrawerOpen) {
|
|
195
|
-
this.
|
|
204
|
+
this.handleMobileDrawerClosed();
|
|
196
205
|
}
|
|
197
206
|
else {
|
|
198
207
|
this.isSearchDropdownOpen = false;
|
|
@@ -206,7 +215,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
206
215
|
...{ search: search },
|
|
207
216
|
});
|
|
208
217
|
if (this.isMobileDrawerOpen) {
|
|
209
|
-
this.
|
|
218
|
+
this.handleMobileDrawerClosed();
|
|
210
219
|
}
|
|
211
220
|
else {
|
|
212
221
|
this.isSearchDropdownOpen = false;
|
|
@@ -220,7 +229,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
220
229
|
if (recentlySelectedSearches.length === 0) {
|
|
221
230
|
if ((this.searchValue && this.searchValue.length >= 3) ||
|
|
222
231
|
!this.searchTask.value) {
|
|
223
|
-
this.searchTask.run();
|
|
232
|
+
void this.searchTask.run();
|
|
224
233
|
}
|
|
225
234
|
}
|
|
226
235
|
}
|
|
@@ -232,14 +241,19 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
232
241
|
event.stopPropagation();
|
|
233
242
|
this.setCurrentMobileSubmenu(null);
|
|
234
243
|
}
|
|
244
|
+
// Also how a search pick closes the drawer: clearing `open` from here fires
|
|
245
|
+
// no `modal-closed`, so the submenu state has to be reset by hand.
|
|
246
|
+
handleBasketMobileClosed() {
|
|
247
|
+
this.isBasketMobileOpen = false;
|
|
248
|
+
}
|
|
235
249
|
handleMobileDrawerClosed() {
|
|
236
250
|
this.isMobileDrawerOpen = false;
|
|
237
251
|
this.currentMobileSubmenu = null;
|
|
238
252
|
this.isSearchDropdownOpen = false;
|
|
239
253
|
}
|
|
240
254
|
toggleMobileDrawer() {
|
|
241
|
-
if (isBasketMobileOpen
|
|
242
|
-
isBasketMobileOpen
|
|
255
|
+
if (this.isBasketMobileOpen) {
|
|
256
|
+
this.isBasketMobileOpen = false;
|
|
243
257
|
this.isMobileDrawerOpen = true;
|
|
244
258
|
return;
|
|
245
259
|
}
|
|
@@ -262,16 +276,20 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
262
276
|
?arrow=${true}
|
|
263
277
|
@dropdown-close-request=${this.handleCurrenciesDropdownClose}
|
|
264
278
|
>
|
|
265
|
-
<
|
|
279
|
+
<button
|
|
280
|
+
class="trigger"
|
|
281
|
+
type="button"
|
|
266
282
|
slot="trigger"
|
|
267
283
|
data-testid="currencies-trigger"
|
|
284
|
+
aria-haspopup="listbox"
|
|
285
|
+
aria-expanded=${this.isCurrenciesDropdownOpen}
|
|
268
286
|
@click=${this.toggleCurrenciesDropdown}
|
|
269
287
|
>
|
|
270
288
|
<span>
|
|
271
289
|
<span class="currency-symbol">${currencySymbol[this.currency]}</span>
|
|
272
290
|
<span class="currency-name">${this.currency}</span>
|
|
273
291
|
</span>
|
|
274
|
-
</
|
|
292
|
+
</button>
|
|
275
293
|
<coras-currencies-list>
|
|
276
294
|
${this.renderCurrenciesOptions()}
|
|
277
295
|
</coras-currencies-list>
|
|
@@ -293,9 +311,13 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
293
311
|
?arrow=${true}
|
|
294
312
|
@dropdown-close-request=${this.handleLocalesDropdownClose}
|
|
295
313
|
>
|
|
296
|
-
<
|
|
314
|
+
<button
|
|
315
|
+
class="trigger"
|
|
316
|
+
type="button"
|
|
297
317
|
slot="trigger"
|
|
298
318
|
data-testid="locales-trigger"
|
|
319
|
+
aria-haspopup="listbox"
|
|
320
|
+
aria-expanded=${this.isLocalesDropdownOpen}
|
|
299
321
|
@click=${this.toggleLocalesDropdown}
|
|
300
322
|
>
|
|
301
323
|
<coras-flag-icon
|
|
@@ -304,29 +326,38 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
304
326
|
label="${this.locale}"
|
|
305
327
|
></coras-flag-icon>
|
|
306
328
|
<span class="locale">${getLocaleLabel(this.locale)}</span>
|
|
307
|
-
</
|
|
329
|
+
</button>
|
|
308
330
|
<coras-locales-list>${this.renderLocalesOptions()}</coras-locales-list>
|
|
309
331
|
</coras-dropdown>
|
|
310
332
|
`;
|
|
311
333
|
}
|
|
312
334
|
renderBasketTrigger() {
|
|
313
335
|
return html `
|
|
314
|
-
<
|
|
336
|
+
<button
|
|
337
|
+
class="trigger"
|
|
338
|
+
type="button"
|
|
339
|
+
data-testid="basket-trigger"
|
|
340
|
+
aria-label=${msg("Basket")}
|
|
341
|
+
aria-expanded=${this.isMobile
|
|
342
|
+
? this.isBasketMobileOpen
|
|
343
|
+
: this.isBasketDropdownOpen}
|
|
344
|
+
@click=${this.toggleBasketDropdown}
|
|
345
|
+
>
|
|
315
346
|
<coras-icon
|
|
316
347
|
icon="shopping-basket"
|
|
317
348
|
assets-url="${this.assetsURL}"
|
|
318
349
|
></coras-icon>
|
|
319
350
|
<span class="basket-items-quantity"
|
|
320
|
-
>(${this.basket?.
|
|
351
|
+
>(${this.basket?.quantity || 0})</span
|
|
321
352
|
>
|
|
322
|
-
</
|
|
353
|
+
</button>
|
|
323
354
|
`;
|
|
324
355
|
}
|
|
325
356
|
renderBasketDropdown() {
|
|
326
357
|
return html `
|
|
327
358
|
<coras-dropdown
|
|
328
359
|
class="basket"
|
|
329
|
-
?open=${isBasketDropdownOpen
|
|
360
|
+
?open=${this.isBasketDropdownOpen}
|
|
330
361
|
?arrow=${true}
|
|
331
362
|
@dropdown-close-request=${this.handleBasketDropdownClose}
|
|
332
363
|
unstyled-content
|
|
@@ -340,7 +371,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
340
371
|
`;
|
|
341
372
|
}
|
|
342
373
|
renderBasket() {
|
|
343
|
-
if (this.isMobile
|
|
374
|
+
if (this.isMobile) {
|
|
344
375
|
return this.renderBasketTrigger();
|
|
345
376
|
}
|
|
346
377
|
else {
|
|
@@ -350,8 +381,9 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
350
381
|
renderBasketModal() {
|
|
351
382
|
return html `
|
|
352
383
|
<coras-basket-mobile
|
|
353
|
-
?open=${isBasketMobileOpen
|
|
354
|
-
|
|
384
|
+
?open=${this.isBasketMobileOpen}
|
|
385
|
+
label=${msg("Your basket")}
|
|
386
|
+
@modal-closed=${this.handleBasketMobileClosed}
|
|
355
387
|
>
|
|
356
388
|
<coras-basket
|
|
357
389
|
?checkout=${true}
|
|
@@ -508,7 +540,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
508
540
|
`;
|
|
509
541
|
}
|
|
510
542
|
get hasBasketItems() {
|
|
511
|
-
return (this.basket?.
|
|
543
|
+
return (this.basket?.quantity ?? 0) > 0;
|
|
512
544
|
}
|
|
513
545
|
renderMenu() {
|
|
514
546
|
return html `
|
|
@@ -544,7 +576,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
544
576
|
>
|
|
545
577
|
<coras-icon
|
|
546
578
|
slot="icon"
|
|
547
|
-
label
|
|
579
|
+
label=${msg("Search icon")}
|
|
548
580
|
icon="search"
|
|
549
581
|
assets-url="${this.assetsURL}"
|
|
550
582
|
></coras-icon>
|
|
@@ -568,12 +600,17 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
568
600
|
}
|
|
569
601
|
renderMobileMenuIcon() {
|
|
570
602
|
return html `
|
|
571
|
-
<
|
|
603
|
+
<button
|
|
604
|
+
class="trigger mobile-menu-trigger"
|
|
605
|
+
type="button"
|
|
572
606
|
data-testid="mobile-menu-trigger"
|
|
573
|
-
|
|
574
|
-
|
|
607
|
+
aria-label=${msg("Menu")}
|
|
608
|
+
aria-haspopup="dialog"
|
|
609
|
+
aria-expanded=${this.isMobileDrawerOpen}
|
|
575
610
|
@click=${this.toggleMobileDrawer}
|
|
576
|
-
|
|
611
|
+
>
|
|
612
|
+
<coras-icon icon="menu" assets-url="${this.assetsURL}"></coras-icon>
|
|
613
|
+
</button>
|
|
577
614
|
`;
|
|
578
615
|
}
|
|
579
616
|
renderReturnButton() {
|
|
@@ -597,7 +634,7 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
597
634
|
}
|
|
598
635
|
return html `
|
|
599
636
|
<coras-drawer
|
|
600
|
-
label
|
|
637
|
+
label=${msg("Menu")}
|
|
601
638
|
?open=${this.isMobileDrawerOpen}
|
|
602
639
|
assets-url="${this.assetsURL}"
|
|
603
640
|
@modal-closed=${this.handleMobileDrawerClosed}
|
|
@@ -691,16 +728,13 @@ let CorasNavBar = class CorasNavBar extends SearchMixin(SignalWatcher(LitElement
|
|
|
691
728
|
</header>
|
|
692
729
|
`;
|
|
693
730
|
}
|
|
694
|
-
willUpdate() {
|
|
695
|
-
this.dataset.colorScheme = this.colorScheme.scheme;
|
|
696
|
-
}
|
|
697
731
|
render() {
|
|
698
732
|
return html `
|
|
699
733
|
${this.searchOnly
|
|
700
734
|
? this.renderSearchOnlyHeader()
|
|
701
735
|
: this.renderFullHeader()}
|
|
702
736
|
${when(this.shouldRenderMobileMenu, () => this.renderMobileMenuDrawer())}
|
|
703
|
-
${this.renderBasketModal()}
|
|
737
|
+
${when(this.isMobile, () => this.renderBasketModal())}
|
|
704
738
|
`;
|
|
705
739
|
}
|
|
706
740
|
};
|
|
@@ -770,12 +804,24 @@ __decorate([
|
|
|
770
804
|
__decorate([
|
|
771
805
|
state()
|
|
772
806
|
], CorasNavBar.prototype, "isMobileDrawerOpen", void 0);
|
|
807
|
+
__decorate([
|
|
808
|
+
state()
|
|
809
|
+
], CorasNavBar.prototype, "isBasketDropdownOpen", void 0);
|
|
810
|
+
__decorate([
|
|
811
|
+
state()
|
|
812
|
+
], CorasNavBar.prototype, "isBasketMobileOpen", void 0);
|
|
773
813
|
__decorate([
|
|
774
814
|
consume({ context: currentPageContext })
|
|
775
815
|
], CorasNavBar.prototype, "currentPage", void 0);
|
|
776
816
|
__decorate([
|
|
777
817
|
consume({ context: pageDispatchContext })
|
|
778
818
|
], CorasNavBar.prototype, "dispatchPageUpdate", void 0);
|
|
819
|
+
__decorate([
|
|
820
|
+
consume({ context: basketContext, subscribe: true })
|
|
821
|
+
], CorasNavBar.prototype, "basket", void 0);
|
|
822
|
+
__decorate([
|
|
823
|
+
state()
|
|
824
|
+
], CorasNavBar.prototype, "isMobile", void 0);
|
|
779
825
|
CorasNavBar = __decorate([
|
|
780
826
|
localized()
|
|
781
827
|
], CorasNavBar);
|