@coras-io/embed 0.5.1 → 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 +28 -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 +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,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { autoUpdate, computePosition, flip, offset, shift, arrow, size, } from "@floating-ui/dom";
|
|
8
8
|
import { LitElement, html, } from "lit";
|
|
9
|
-
import { property, query
|
|
9
|
+
import { property, query } from "lit/decorators.js";
|
|
10
10
|
import styles from "./dropdown.styles.js";
|
|
11
11
|
import { fireInternalEvent } from "../../core/events.js";
|
|
12
12
|
export class CorasDropdown extends LitElement {
|
|
@@ -94,7 +94,7 @@ export class CorasDropdown extends LitElement {
|
|
|
94
94
|
if (this.arrow) {
|
|
95
95
|
middleware.push(arrow({ element: this.arrowElement }));
|
|
96
96
|
}
|
|
97
|
-
computePosition(this.trigger, this.content, {
|
|
97
|
+
void computePosition(this.trigger, this.content, {
|
|
98
98
|
placement: "bottom",
|
|
99
99
|
middleware,
|
|
100
100
|
}).then(({ x, y, middlewareData }) => {
|
|
@@ -113,8 +113,8 @@ export class CorasDropdown extends LitElement {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
firstUpdated() {
|
|
116
|
-
this.applyAutoUpdate();
|
|
117
116
|
if (this.open) {
|
|
117
|
+
this.applyAutoUpdate();
|
|
118
118
|
this.show();
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -123,7 +123,7 @@ export class CorasDropdown extends LitElement {
|
|
|
123
123
|
this.content.setAttribute("data-show", "");
|
|
124
124
|
// Focus the content element when the dropdown opens (only if autoFocus is enabled)
|
|
125
125
|
if (this.autoFocus) {
|
|
126
|
-
this.updateComplete.then(() => {
|
|
126
|
+
void this.updateComplete.then(() => {
|
|
127
127
|
const slot = this.content.querySelector("slot:not([name])"); // Target the default slot
|
|
128
128
|
if (!slot) {
|
|
129
129
|
this.content.setAttribute("tabindex", "-1");
|
|
@@ -153,10 +153,11 @@ export class CorasDropdown extends LitElement {
|
|
|
153
153
|
this.content?.removeAttribute("data-show");
|
|
154
154
|
if (this.cleanup) {
|
|
155
155
|
this.cleanup();
|
|
156
|
+
this.cleanup = undefined;
|
|
156
157
|
}
|
|
157
158
|
// Focus the trigger element when the dropdown closes (only if autoFocus is enabled)
|
|
158
159
|
if (this.autoFocus) {
|
|
159
|
-
this.updateComplete.then(() => {
|
|
160
|
+
void this.updateComplete.then(() => {
|
|
160
161
|
const triggerElement = this.trigger.assignedElements()[0];
|
|
161
162
|
if (triggerElement && triggerElement.focus) {
|
|
162
163
|
triggerElement.focus();
|
|
@@ -172,7 +173,6 @@ export class CorasDropdown extends LitElement {
|
|
|
172
173
|
part="content"
|
|
173
174
|
?data-unstyled=${this.unstyledContent}
|
|
174
175
|
aria-hidden=${this.open ? "false" : "true"}
|
|
175
|
-
aria-labelledby="dropdown"
|
|
176
176
|
>
|
|
177
177
|
${this.arrow ? html `<div class="arrow"></div>` : null}
|
|
178
178
|
<div class="scroll">
|
|
@@ -194,9 +194,6 @@ __decorate([
|
|
|
194
194
|
__decorate([
|
|
195
195
|
query(".scroll")
|
|
196
196
|
], CorasDropdown.prototype, "scrollElement", void 0);
|
|
197
|
-
__decorate([
|
|
198
|
-
state()
|
|
199
|
-
], CorasDropdown.prototype, "containingElement", void 0);
|
|
200
197
|
__decorate([
|
|
201
198
|
property({ type: Boolean })
|
|
202
199
|
], CorasDropdown.prototype, "open", void 0);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
1
|
+
import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
|
|
2
2
|
import "../icon/icon.js";
|
|
3
3
|
export declare class CorasExpirationTimer extends LitElement {
|
|
4
4
|
static styles: CSSResultGroup;
|
|
5
5
|
assetsURL: string;
|
|
6
6
|
expirationTime: number;
|
|
7
7
|
private timer;
|
|
8
|
-
protected
|
|
9
|
-
private handleExpiration;
|
|
8
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
10
9
|
private timeLeftLabel;
|
|
11
10
|
render(): import("lit").TemplateResult<1>;
|
|
12
11
|
}
|
|
@@ -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 { localized, msg } from "@lit/localize";
|
|
10
10
|
import { TimeExpirationController } from "../../controllers/time-expiration.js";
|
|
@@ -16,19 +16,21 @@ let CorasExpirationTimer = class CorasExpirationTimer extends LitElement {
|
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.assetsURL = "";
|
|
18
18
|
this.expirationTime = 0;
|
|
19
|
-
this.timer =
|
|
19
|
+
this.timer = new TimeExpirationController(this);
|
|
20
20
|
}
|
|
21
21
|
static { this.styles = styles; }
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
willUpdate(changedProperties) {
|
|
23
|
+
// The element is reused when its host re-renders with a different
|
|
24
|
+
// reservation, so the countdown must follow the property, not the first
|
|
25
|
+
// value it was created with.
|
|
26
|
+
if (changedProperties.has("expirationTime")) {
|
|
27
|
+
this.timer.reset(this.expirationTime);
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
|
-
handleExpiration() { }
|
|
26
30
|
timeLeftLabel() {
|
|
27
31
|
const duration = intervalToDuration({
|
|
28
32
|
start: 0,
|
|
29
|
-
end:
|
|
30
|
-
? this.expirationTime
|
|
31
|
-
: this.timer.value) * 1000,
|
|
33
|
+
end: this.timer.value * 1000,
|
|
32
34
|
});
|
|
33
35
|
return `${String(duration.minutes || 0).padStart(2, "0")}:${String(duration.seconds || 0).padStart(2, "0")}`;
|
|
34
36
|
}
|
|
@@ -18,7 +18,9 @@ export class CorasExploreCard extends LitElement {
|
|
|
18
18
|
}
|
|
19
19
|
static { this.styles = styles; }
|
|
20
20
|
renderImage() {
|
|
21
|
-
|
|
21
|
+
// The half-size card's photo is square; the full-size card's fills a
|
|
22
|
+
// portrait card behind its label and button.
|
|
23
|
+
const height = this.variant === ExploreCardVariants.HALF_SIZE_BG ? 250 : 360;
|
|
22
24
|
return html `<div class="image">
|
|
23
25
|
<coras-image
|
|
24
26
|
src=${this.image}
|
|
@@ -9,13 +9,44 @@ export default css `
|
|
|
9
9
|
--explore-card-label-color: var(--coras-palette-white);
|
|
10
10
|
--explore-card-label-font-size: var(--coras-font-size-3xl);
|
|
11
11
|
--explore-card-label-font-weight: var(--coras-font-weight-semibold);
|
|
12
|
+
--explore-card-background: var(--coras-color-card);
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
/* The half-size card stacks: a square photo carrying the label, then a solid
|
|
16
|
+
body holding the button. The full-size card instead floats both over one
|
|
17
|
+
edge-to-edge photo. */
|
|
14
18
|
:host([variant="halfSizeBg"]) {
|
|
19
|
+
/* The label has to fit inside the photo rather than over a whole card, so
|
|
20
|
+
it steps down a size and wraps tighter. */
|
|
21
|
+
--explore-card-label-font-size: var(--coras-font-size-2xl);
|
|
22
|
+
|
|
15
23
|
.wrapper {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
background-color: var(--explore-card-background);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
|
|
16
29
|
.image {
|
|
30
|
+
height: auto;
|
|
31
|
+
flex: none;
|
|
32
|
+
|
|
17
33
|
border-bottom-right-radius: 0;
|
|
18
34
|
border-bottom-left-radius: 0;
|
|
35
|
+
|
|
36
|
+
coras-image {
|
|
37
|
+
height: auto;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.label {
|
|
42
|
+
top: 1.5rem;
|
|
43
|
+
width: calc(100% - 2.5rem);
|
|
44
|
+
line-height: 1.2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.button {
|
|
48
|
+
position: static;
|
|
49
|
+
padding-block: 1rem;
|
|
19
50
|
}
|
|
20
51
|
}
|
|
21
52
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
1
|
+
import { type CSSResultGroup, LitElement, type PropertyValues, nothing } from "lit";
|
|
2
2
|
import type { Locale } from "../../core/types/index.js";
|
|
3
3
|
export declare class CorasFlagIcon extends LitElement {
|
|
4
4
|
static styles: CSSResultGroup;
|
|
5
5
|
iconBaseURL: string;
|
|
6
6
|
icon: Locale;
|
|
7
7
|
label: string;
|
|
8
|
-
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
10
|
+
render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
9
11
|
}
|
|
@@ -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 { localized, msg } from "@lit/localize";
|
|
8
|
-
import { LitElement, html } from "lit";
|
|
8
|
+
import { LitElement, html, nothing, } from "lit";
|
|
9
9
|
import { property } from "lit/decorators.js";
|
|
10
10
|
import styles from "./flag-icon.styles.js";
|
|
11
11
|
let CorasFlagIcon = class CorasFlagIcon extends LitElement {
|
|
@@ -17,10 +17,22 @@ let CorasFlagIcon = class CorasFlagIcon extends LitElement {
|
|
|
17
17
|
}
|
|
18
18
|
// TODO: Do we need this? It's just a component to display an image.
|
|
19
19
|
static { this.styles = styles; }
|
|
20
|
-
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback();
|
|
21
22
|
this.setAttribute("role", "img");
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
willUpdate(changed) {
|
|
25
|
+
if (changed.has("label")) {
|
|
26
|
+
this.setAttribute("aria-label", this.label);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
// A bare language tag such as "en" names no country, so there is no flag.
|
|
31
|
+
const region = this.icon.split("-")[1];
|
|
32
|
+
if (!region) {
|
|
33
|
+
return nothing;
|
|
34
|
+
}
|
|
35
|
+
const countryCode = region.toLowerCase();
|
|
24
36
|
return html `
|
|
25
37
|
<img
|
|
26
38
|
alt="${this.icon}"
|
|
@@ -31,7 +31,14 @@ function loadSprite(url) {
|
|
|
31
31
|
const doc = new DOMParser().parseFromString(await res.text(), "image/svg+xml");
|
|
32
32
|
return doc.querySelector("parsererror") ? null : doc;
|
|
33
33
|
})
|
|
34
|
-
.catch(() => null)
|
|
34
|
+
.catch(() => null)
|
|
35
|
+
.then((doc) => {
|
|
36
|
+
// A failed load must not poison the session: forget it so the next
|
|
37
|
+
// icon retries instead of rendering nothing until reload.
|
|
38
|
+
if (!doc)
|
|
39
|
+
spriteCache.delete(url);
|
|
40
|
+
return doc;
|
|
41
|
+
});
|
|
35
42
|
spriteCache.set(url, sprite);
|
|
36
43
|
}
|
|
37
44
|
return sprite;
|
|
@@ -54,11 +61,17 @@ let CorasIcon = class CorasIcon extends LitElement {
|
|
|
54
61
|
}
|
|
55
62
|
async resolveSymbol() {
|
|
56
63
|
const { icon, assetsURL } = this;
|
|
64
|
+
// Without an assets origin the sprite would be requested from the host
|
|
65
|
+
// page's origin, which never serves it.
|
|
66
|
+
if (!assetsURL) {
|
|
67
|
+
this.symbol = null;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
57
70
|
const doc = await loadSprite(`${assetsURL}/icons.svg`);
|
|
58
71
|
// A newer icon/url change may have superseded this load.
|
|
59
72
|
if (this.icon !== icon || this.assetsURL !== assetsURL)
|
|
60
73
|
return;
|
|
61
|
-
const symbol = doc?.
|
|
74
|
+
const symbol = doc?.getElementById(icon);
|
|
62
75
|
this.symbol = symbol
|
|
63
76
|
? {
|
|
64
77
|
viewBox: symbol.getAttribute("viewBox") ?? "0 0 24 24",
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { LitElement, html, nothing } from "lit";
|
|
8
8
|
import { property, state } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
10
11
|
import { fireInternalEvent } from "../../core/events.js";
|
|
11
12
|
import { buildSizes, buildSrcset, RESPONSIVE_WIDTHS, } from "../../core/images/srcset.js";
|
|
12
13
|
import { buildImgixUrl } from "../../core/images/url.js";
|
|
@@ -149,15 +150,15 @@ export class CorasImage extends LitElement {
|
|
|
149
150
|
if (this.placeholder === "none" || this._loaded || this._errored)
|
|
150
151
|
return nothing;
|
|
151
152
|
const style = this.placeholder === "color" && this.color
|
|
152
|
-
?
|
|
153
|
-
:
|
|
153
|
+
? { backgroundColor: this.color }
|
|
154
|
+
: {};
|
|
154
155
|
return html `<div
|
|
155
156
|
part="placeholder"
|
|
156
157
|
class=${classMap({
|
|
157
158
|
placeholder: true,
|
|
158
159
|
[`placeholder-${this.placeholder}`]: true,
|
|
159
160
|
})}
|
|
160
|
-
style=${style}
|
|
161
|
+
style=${styleMap(style)}
|
|
161
162
|
aria-hidden="true"
|
|
162
163
|
></div>`;
|
|
163
164
|
}
|
|
@@ -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
|
var CorasImageViewer_1;
|
|
8
|
-
import { localized, msg } from "@lit/localize";
|
|
8
|
+
import { localized, msg, str } from "@lit/localize";
|
|
9
9
|
import { LitElement, html } from "lit";
|
|
10
10
|
import { property, state } from "lit/decorators.js";
|
|
11
11
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -136,13 +136,14 @@ let CorasImageViewer = class CorasImageViewer extends LitElement {
|
|
|
136
136
|
<coras-button
|
|
137
137
|
part="btn-prev"
|
|
138
138
|
class=${classMap(prevBtnClasses)}
|
|
139
|
-
circle
|
|
139
|
+
radius="circle"
|
|
140
140
|
variant="outlined"
|
|
141
141
|
@click=${() => this.handleNavigation("prev")}
|
|
142
142
|
>
|
|
143
143
|
<coras-icon
|
|
144
144
|
assets-url="${this.assetsURL}"
|
|
145
145
|
icon="chevron-left"
|
|
146
|
+
label=${msg("Previous")}
|
|
146
147
|
></coras-icon>
|
|
147
148
|
</coras-button>
|
|
148
149
|
|
|
@@ -150,7 +151,7 @@ let CorasImageViewer = class CorasImageViewer extends LitElement {
|
|
|
150
151
|
<coras-image
|
|
151
152
|
exportparts="image"
|
|
152
153
|
src=${this.images[this.currentIndex]}
|
|
153
|
-
alt
|
|
154
|
+
alt=${msg(str `Image ${this.currentIndex + 1}`)}
|
|
154
155
|
loading="eager"
|
|
155
156
|
fit="contain"
|
|
156
157
|
placeholder="none"
|
|
@@ -161,13 +162,14 @@ let CorasImageViewer = class CorasImageViewer extends LitElement {
|
|
|
161
162
|
<coras-button
|
|
162
163
|
part="btn-next"
|
|
163
164
|
class=${classMap(nextBtnClasses)}
|
|
164
|
-
circle
|
|
165
|
+
radius="circle"
|
|
165
166
|
variant="outlined"
|
|
166
167
|
@click=${() => this.handleNavigation("next")}
|
|
167
168
|
>
|
|
168
169
|
<coras-icon
|
|
169
170
|
assets-url="${this.assetsURL}"
|
|
170
171
|
icon="chevron-right"
|
|
172
|
+
label=${msg("Next")}
|
|
171
173
|
></coras-icon>
|
|
172
174
|
</coras-button>
|
|
173
175
|
</div>
|
|
@@ -4,13 +4,14 @@ 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 { fireInternalEvent } from "../../core/events.js";
|
|
9
10
|
import { property, query, state } from "lit/decorators.js";
|
|
10
11
|
import { classMap } from "lit/directives/class-map.js";
|
|
11
12
|
import styles from "./input-field.styles.js";
|
|
12
13
|
import "../icon/icon.js";
|
|
13
|
-
|
|
14
|
+
let CorasInputField = class CorasInputField extends LitElement {
|
|
14
15
|
static { this.formAssociated = true; }
|
|
15
16
|
static { this.styles = styles; }
|
|
16
17
|
constructor() {
|
|
@@ -90,6 +91,7 @@ export class CorasInputField extends LitElement {
|
|
|
90
91
|
placeholder=${this.placeholder}
|
|
91
92
|
autocomplete="${this.autocomplete}"
|
|
92
93
|
name=${this.name}
|
|
94
|
+
.value=${this.value}
|
|
93
95
|
@input=${this._onInput}
|
|
94
96
|
@focus=${this.focus}
|
|
95
97
|
@blur=${this.blur}
|
|
@@ -98,9 +100,7 @@ export class CorasInputField extends LitElement {
|
|
|
98
100
|
class="${classMap({
|
|
99
101
|
error: this.validated && this.error,
|
|
100
102
|
})}"
|
|
101
|
-
>
|
|
102
|
-
${this.value}</textarea
|
|
103
|
-
>
|
|
103
|
+
></textarea>
|
|
104
104
|
`
|
|
105
105
|
: html `<input
|
|
106
106
|
type=${this.type}
|
|
@@ -125,7 +125,7 @@ ${this.value}</textarea
|
|
|
125
125
|
<coras-icon
|
|
126
126
|
assets-url="${this.assetsURL}"
|
|
127
127
|
icon="close-circle"
|
|
128
|
-
label
|
|
128
|
+
label=${msg("Clear")}
|
|
129
129
|
@click=${this._onClear}
|
|
130
130
|
></coras-icon>
|
|
131
131
|
</div> `
|
|
@@ -250,7 +250,7 @@ ${this.value}</textarea
|
|
|
250
250
|
</div>
|
|
251
251
|
`;
|
|
252
252
|
}
|
|
253
|
-
}
|
|
253
|
+
};
|
|
254
254
|
__decorate([
|
|
255
255
|
property({ type: String, attribute: "assets-url" })
|
|
256
256
|
], CorasInputField.prototype, "assetsURL", void 0);
|
|
@@ -329,3 +329,7 @@ __decorate([
|
|
|
329
329
|
__decorate([
|
|
330
330
|
state()
|
|
331
331
|
], CorasInputField.prototype, "hasSuffixContent", void 0);
|
|
332
|
+
CorasInputField = __decorate([
|
|
333
|
+
localized()
|
|
334
|
+
], CorasInputField);
|
|
335
|
+
export { CorasInputField };
|
|
@@ -16,7 +16,7 @@ export default css `
|
|
|
16
16
|
grid-template-rows: auto 1fr auto;
|
|
17
17
|
height: 100%;
|
|
18
18
|
width: 100%;
|
|
19
|
-
grid-row-gap: 2rem;
|
|
19
|
+
grid-row-gap: var(--coras-layout-row-gap, 2rem);
|
|
20
20
|
|
|
21
21
|
main {
|
|
22
22
|
/* Page-level query container; components target \`@container coras-page\`. */
|
|
@@ -42,7 +42,6 @@ let CorasLocationImage = class CorasLocationImage extends LitElement {
|
|
|
42
42
|
this.handleImageError = () => {
|
|
43
43
|
this.loading = false;
|
|
44
44
|
if (this.fallbackTried || this.currentSrc === this.fallbackSrc) {
|
|
45
|
-
console.warn("Location image: Both primary and fallback images failed to load");
|
|
46
45
|
this.loadFailed = true;
|
|
47
46
|
return;
|
|
48
47
|
}
|
|
@@ -3,11 +3,21 @@ import "../icon/icon.js";
|
|
|
3
3
|
import "../select-list/select-list.js";
|
|
4
4
|
import "../select-list/select-option/select-option.js";
|
|
5
5
|
import type { components } from "../../core/types/api-schema.js";
|
|
6
|
+
/** Browsers without the Geolocation API get a code outside the spec's 1-3. */
|
|
7
|
+
export declare const GEOLOCATION_UNSUPPORTED_CODE = 0;
|
|
8
|
+
export interface GeolocationFailedEventDetail {
|
|
9
|
+
code: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @fires geolocation-selected - The device position when "Near me" succeeds
|
|
13
|
+
* @fires geolocation-failed - Detail `{ code }` when the position is denied or unavailable
|
|
14
|
+
*/
|
|
6
15
|
export declare class CorasLocationsResults extends LitElement {
|
|
7
16
|
static styles: CSSResultGroup;
|
|
8
17
|
assetsURL: string;
|
|
9
18
|
items: components["schemas"]["LocationSchema"][];
|
|
10
19
|
private near;
|
|
20
|
+
private reportGeolocationFailure;
|
|
11
21
|
private renderPopular;
|
|
12
22
|
render(): TemplateResult<1>;
|
|
13
23
|
}
|
|
@@ -12,6 +12,12 @@ import styles from "./locations-results.styles.js";
|
|
|
12
12
|
import "../icon/icon.js";
|
|
13
13
|
import "../select-list/select-list.js";
|
|
14
14
|
import "../select-list/select-option/select-option.js";
|
|
15
|
+
/** Browsers without the Geolocation API get a code outside the spec's 1-3. */
|
|
16
|
+
export const GEOLOCATION_UNSUPPORTED_CODE = 0;
|
|
17
|
+
/**
|
|
18
|
+
* @fires geolocation-selected - The device position when "Near me" succeeds
|
|
19
|
+
* @fires geolocation-failed - Detail `{ code }` when the position is denied or unavailable
|
|
20
|
+
*/
|
|
15
21
|
let CorasLocationsResults = class CorasLocationsResults extends LitElement {
|
|
16
22
|
constructor() {
|
|
17
23
|
super(...arguments);
|
|
@@ -20,27 +26,29 @@ let CorasLocationsResults = class CorasLocationsResults extends LitElement {
|
|
|
20
26
|
}
|
|
21
27
|
static { this.styles = styles; }
|
|
22
28
|
near() {
|
|
23
|
-
if ("geolocation" in navigator) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
latitude: position.coords.latitude,
|
|
27
|
-
longitude: position.coords.longitude,
|
|
28
|
-
});
|
|
29
|
-
}, (error) => {
|
|
30
|
-
console.error(`An error occurred while getting the current position of the device. Error code: ${error.code}`);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// TODO: add error/warning modal?
|
|
35
|
-
console.error("Geolocation is not supported by this browser.");
|
|
29
|
+
if (!("geolocation" in navigator)) {
|
|
30
|
+
this.reportGeolocationFailure(GEOLOCATION_UNSUPPORTED_CODE);
|
|
31
|
+
return;
|
|
36
32
|
}
|
|
33
|
+
navigator.geolocation.getCurrentPosition((position) => {
|
|
34
|
+
fireInternalEvent(this, "geolocation-selected", {
|
|
35
|
+
latitude: position.coords.latitude,
|
|
36
|
+
longitude: position.coords.longitude,
|
|
37
|
+
});
|
|
38
|
+
}, (error) => this.reportGeolocationFailure(error.code));
|
|
39
|
+
}
|
|
40
|
+
// The detail mirrors GeolocationPositionError.code.
|
|
41
|
+
reportGeolocationFailure(code) {
|
|
42
|
+
fireInternalEvent(this, "geolocation-failed", { code });
|
|
37
43
|
}
|
|
38
44
|
renderPopular() {
|
|
39
45
|
return html `
|
|
40
46
|
<div class="popular">
|
|
41
47
|
<p>${msg("Popular")}</p>
|
|
42
48
|
<div>
|
|
43
|
-
<
|
|
49
|
+
<button type="button" class="near-me" @click=${this.near}>
|
|
50
|
+
${msg("Near me")}
|
|
51
|
+
</button>
|
|
44
52
|
</div>
|
|
45
53
|
</div>
|
|
46
54
|
`;
|
|
@@ -68,7 +76,6 @@ export { CorasLocationsResults };
|
|
|
68
76
|
export function renderLocationResultOption({ item, selected, onSelect, localizedName, assetsURL, }) {
|
|
69
77
|
return html `
|
|
70
78
|
<coras-select-option
|
|
71
|
-
key=${localizedName}
|
|
72
79
|
?selected=${selected}
|
|
73
80
|
@click=${() => onSelect && onSelect(item)}
|
|
74
81
|
>
|
|
@@ -38,11 +38,14 @@ export default css `
|
|
|
38
38
|
display: flex;
|
|
39
39
|
gap: 0.5rem;
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
.near-me {
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
|
+
border: 0;
|
|
44
45
|
border-radius: var(--locations-results-popular-border-radius);
|
|
46
|
+
font: inherit;
|
|
45
47
|
font-size: var(--locations-results-popular-font-size);
|
|
48
|
+
color: inherit;
|
|
46
49
|
justify-content: center;
|
|
47
50
|
line-height: 0.875rem;
|
|
48
51
|
letter-spacing: 0.2px;
|
|
@@ -4,7 +4,7 @@ import type { MessageCardVariant } from "./message-card.types.js";
|
|
|
4
4
|
export declare class CorasMessageCard extends LitElement {
|
|
5
5
|
static styles: CSSResultGroup;
|
|
6
6
|
assetsURL: string;
|
|
7
|
-
|
|
7
|
+
heading: string;
|
|
8
8
|
variant: MessageCardVariant;
|
|
9
9
|
private _hasSlottedContent;
|
|
10
10
|
private _handleSlotChange;
|
|
@@ -12,7 +12,8 @@ export class CorasMessageCard extends LitElement {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.assetsURL = "";
|
|
15
|
-
|
|
15
|
+
// Not `title`: that is the native tooltip attribute on every element.
|
|
16
|
+
this.heading = "";
|
|
16
17
|
this.variant = "info";
|
|
17
18
|
this._hasSlottedContent = false;
|
|
18
19
|
}
|
|
@@ -31,7 +32,7 @@ export class CorasMessageCard extends LitElement {
|
|
|
31
32
|
></coras-icon>
|
|
32
33
|
</div>
|
|
33
34
|
<div class="content">
|
|
34
|
-
<p class="title" data-testid="title">${this.
|
|
35
|
+
<p class="title" data-testid="title">${this.heading}</p>
|
|
35
36
|
${this._hasSlottedContent
|
|
36
37
|
? html `<div class="message" data-testid="message">
|
|
37
38
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -47,7 +48,7 @@ __decorate([
|
|
|
47
48
|
], CorasMessageCard.prototype, "assetsURL", void 0);
|
|
48
49
|
__decorate([
|
|
49
50
|
property({ type: String })
|
|
50
|
-
], CorasMessageCard.prototype, "
|
|
51
|
+
], CorasMessageCard.prototype, "heading", void 0);
|
|
51
52
|
__decorate([
|
|
52
53
|
property({ type: String, reflect: true })
|
|
53
54
|
], CorasMessageCard.prototype, "variant", void 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([
|