@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
|
@@ -30,8 +30,6 @@ import "../../components/checkbox-group/checkbox-group.js";
|
|
|
30
30
|
import "../../components/checkbox/checkbox.js";
|
|
31
31
|
import "../../components/button/button.js";
|
|
32
32
|
import "../../components/attraction-card/short/attraction-short-card.js";
|
|
33
|
-
import "../../components/attraction-discovery/attraction-discovery.js";
|
|
34
|
-
import "../../components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js";
|
|
35
33
|
import "../../components/carousel/carousel.js";
|
|
36
34
|
import "../../components/carousel/carousel-item/carousel-item.js";
|
|
37
35
|
import "../../components/drawer/drawer.js";
|
|
@@ -49,7 +47,7 @@ import "../../components/breadcrumbs/breadcrumbs.js";
|
|
|
49
47
|
import "../../components/breadcrumbs/breadcrumb-item/breadcrumb-item.js";
|
|
50
48
|
import "../../contexts/basket/basket.js";
|
|
51
49
|
import "../../components/layout/layout.js";
|
|
52
|
-
import { apiGet
|
|
50
|
+
import { apiGet } from "../../core/api/queries.js";
|
|
53
51
|
import { addRecentlySelectedSearches } from "../../containers/navbar/navbar.utils.js";
|
|
54
52
|
/**
|
|
55
53
|
* @fires coras:navigate
|
|
@@ -79,24 +77,22 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
79
77
|
this.selectedPriceOptions = [];
|
|
80
78
|
this.selectedDurationOptions = [];
|
|
81
79
|
this._selectedCategories = "";
|
|
82
|
-
this.activePriceOptions = null;
|
|
83
|
-
this.activeDurationOptions = null;
|
|
84
|
-
this.activeCategorySlugs = null;
|
|
85
80
|
this.lastSavedRecentValue = null;
|
|
86
81
|
this.geolocationTask = new Task(this, {
|
|
87
82
|
autoRun: false,
|
|
88
83
|
task: async () => {
|
|
89
|
-
|
|
84
|
+
const { data } = await apiGet({
|
|
90
85
|
client: this.client,
|
|
91
86
|
distributorID: this.distributorID,
|
|
92
87
|
endpoint: "/{api_version}/geolocation",
|
|
93
88
|
locale: this.locale,
|
|
94
|
-
})
|
|
89
|
+
});
|
|
90
|
+
return data;
|
|
95
91
|
},
|
|
96
92
|
});
|
|
97
93
|
this.filtersTask = new Task(this, {
|
|
98
94
|
task: async ([locale, currency]) => {
|
|
99
|
-
|
|
95
|
+
const { data } = await apiGet({
|
|
100
96
|
client: this.client,
|
|
101
97
|
distributorID: this.distributorID,
|
|
102
98
|
endpoint: "/{api_version}/landing/filters",
|
|
@@ -104,13 +100,14 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
104
100
|
query: {
|
|
105
101
|
currency,
|
|
106
102
|
},
|
|
107
|
-
})
|
|
103
|
+
});
|
|
104
|
+
return data;
|
|
108
105
|
},
|
|
109
106
|
args: () => [this.locale, this.currency],
|
|
110
107
|
});
|
|
111
108
|
this.attractionsSearchTask = new Task(this, {
|
|
112
109
|
task: async ([locale, country, city, startDate, endDate, sorting, duration, price, categories, currency,]) => {
|
|
113
|
-
|
|
110
|
+
const { data } = await apiGet({
|
|
114
111
|
client: this.client,
|
|
115
112
|
distributorID: this.distributorID,
|
|
116
113
|
locale,
|
|
@@ -130,7 +127,8 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
130
127
|
: undefined,
|
|
131
128
|
currency,
|
|
132
129
|
},
|
|
133
|
-
})
|
|
130
|
+
});
|
|
131
|
+
return data;
|
|
134
132
|
},
|
|
135
133
|
args: () => [
|
|
136
134
|
this.locale,
|
|
@@ -147,12 +145,13 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
147
145
|
});
|
|
148
146
|
this.sortingTask = new Task(this, {
|
|
149
147
|
task: async ([locale]) => {
|
|
150
|
-
|
|
148
|
+
const { data } = await apiGet({
|
|
151
149
|
client: this.client,
|
|
152
150
|
distributorID: this.distributorID,
|
|
153
151
|
locale,
|
|
154
152
|
endpoint: "/{api_version}/landing/sorting",
|
|
155
|
-
})
|
|
153
|
+
});
|
|
154
|
+
return data;
|
|
156
155
|
},
|
|
157
156
|
args: () => [this.locale],
|
|
158
157
|
});
|
|
@@ -176,13 +175,16 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
176
175
|
categories: this.categories,
|
|
177
176
|
};
|
|
178
177
|
}
|
|
179
|
-
|
|
178
|
+
firstUpdated(changed) {
|
|
180
179
|
super.firstUpdated(changed);
|
|
180
|
+
void this.locateAndObserveResize();
|
|
181
|
+
}
|
|
182
|
+
async locateAndObserveResize() {
|
|
181
183
|
if (this.country === "" && this.city === "") {
|
|
182
184
|
await this.geolocationTask.run();
|
|
183
|
-
if (this.geolocationTask.value
|
|
185
|
+
if (this.geolocationTask.value) {
|
|
184
186
|
this.dispatchPageUpdate({
|
|
185
|
-
country: this.geolocationTask.value.
|
|
187
|
+
country: this.geolocationTask.value.slug,
|
|
186
188
|
});
|
|
187
189
|
}
|
|
188
190
|
}
|
|
@@ -198,7 +200,9 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
198
200
|
updated(changedProperties) {
|
|
199
201
|
super.updated(changedProperties);
|
|
200
202
|
if (getLocale() !== this.locale) {
|
|
201
|
-
|
|
203
|
+
// `loadLocale` falls back on its own (see core/i18n/localization.ts), so
|
|
204
|
+
// the returned promise does not reject; an unknown code throws synchronously.
|
|
205
|
+
void setLocale(this.locale);
|
|
202
206
|
}
|
|
203
207
|
if (this.locationsData && (this.country || this.city)) {
|
|
204
208
|
const matchingCountry = this.locationsData
|
|
@@ -230,24 +234,21 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
230
234
|
}
|
|
231
235
|
}
|
|
232
236
|
if (changedProperties.has("duration")) {
|
|
233
|
-
this.selectedDurationOptions = this.
|
|
234
|
-
? this.duration.split(",").filter(Boolean)
|
|
235
|
-
: [];
|
|
236
|
-
if (this.activeDurationOptions === null) {
|
|
237
|
-
this.activeDurationOptions = [...this.selectedDurationOptions];
|
|
238
|
-
}
|
|
237
|
+
this.selectedDurationOptions = this.appliedDurationOptions;
|
|
239
238
|
}
|
|
240
239
|
if (changedProperties.has("price")) {
|
|
241
240
|
this.selectedPriceOptions = this.price ? [this.price] : [];
|
|
242
|
-
if (this.activePriceOptions === null) {
|
|
243
|
-
this.activePriceOptions = [...this.selectedPriceOptions];
|
|
244
|
-
}
|
|
245
241
|
}
|
|
246
242
|
if (changedProperties.has("categories")) {
|
|
247
243
|
this._selectedCategories = this.categories;
|
|
248
|
-
this.updateActiveFilters();
|
|
249
244
|
}
|
|
250
245
|
}
|
|
246
|
+
get appliedDurationOptions() {
|
|
247
|
+
return this.duration ? this.duration.split(",").filter(Boolean) : [];
|
|
248
|
+
}
|
|
249
|
+
get appliedCategorySlugs() {
|
|
250
|
+
return this.categories ? this.categories.split(",").filter(Boolean) : [];
|
|
251
|
+
}
|
|
251
252
|
toggleDateFilter() {
|
|
252
253
|
this.isDateFilterOpen = !this.isDateFilterOpen;
|
|
253
254
|
}
|
|
@@ -298,7 +299,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
298
299
|
slot="prefix"
|
|
299
300
|
assets-url="${this.assetsURL}"
|
|
300
301
|
icon="calendar"
|
|
301
|
-
label
|
|
302
|
+
label=${msg("Calendar")}
|
|
302
303
|
></coras-icon>
|
|
303
304
|
${hasSelectedDates
|
|
304
305
|
? html `
|
|
@@ -306,7 +307,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
306
307
|
slot="suffix"
|
|
307
308
|
assets-url="${this.assetsURL}"
|
|
308
309
|
icon="close"
|
|
309
|
-
label
|
|
310
|
+
label=${msg("Clear dates")}
|
|
310
311
|
close-icon-style
|
|
311
312
|
@click=${this.handleDatesClearIconClicked}
|
|
312
313
|
></coras-icon>
|
|
@@ -316,7 +317,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
316
317
|
slot="suffix"
|
|
317
318
|
assets-url="${this.assetsURL}"
|
|
318
319
|
icon="keyboard-arrow-down"
|
|
319
|
-
label
|
|
320
|
+
label=${msg("Open calendar")}
|
|
320
321
|
></coras-icon>
|
|
321
322
|
`}
|
|
322
323
|
${this.renderDateRangeLabel()}
|
|
@@ -376,14 +377,14 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
376
377
|
</coras-button>
|
|
377
378
|
|
|
378
379
|
<coras-drawer
|
|
379
|
-
label
|
|
380
|
+
label=${msg("Calendar")}
|
|
380
381
|
assets-url="${this.assetsURL}"
|
|
381
382
|
?open="${this.isDateFilterOpen}"
|
|
382
383
|
@modal-closed=${this.toggleDateFilter}
|
|
383
384
|
>
|
|
384
385
|
<div class="select-dates-container">
|
|
385
386
|
<coras-multi-month-calendar
|
|
386
|
-
locale="
|
|
387
|
+
locale="${this.locale}"
|
|
387
388
|
min-date=${format(new Date(), "yyyy-MM")}
|
|
388
389
|
max-date=${format(addMonths(new Date(), 24), "yyyy-MM")}
|
|
389
390
|
?range=${true}
|
|
@@ -423,10 +424,11 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
423
424
|
this.isSortingSelectorOpen = !this.isSortingSelectorOpen;
|
|
424
425
|
}
|
|
425
426
|
getSortingSelectorLabel() {
|
|
426
|
-
return this.sortingTask.value?.
|
|
427
|
+
return this.sortingTask.value?.find((item) => item.value === this.sorting)
|
|
428
|
+
?.label;
|
|
427
429
|
}
|
|
428
430
|
handleSortingOptionClick(value) {
|
|
429
|
-
this.
|
|
431
|
+
this.isSortingSelectorOpen = false;
|
|
430
432
|
this.dispatchPageUpdate({
|
|
431
433
|
sort: value,
|
|
432
434
|
});
|
|
@@ -465,7 +467,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
465
467
|
</coras-button>
|
|
466
468
|
|
|
467
469
|
<coras-sort-list>
|
|
468
|
-
${this.sortingTask.value?.
|
|
470
|
+
${this.sortingTask.value?.map((item) => html `
|
|
469
471
|
<coras-select-option
|
|
470
472
|
key=${item.value}
|
|
471
473
|
?selected=${this.sorting === item.value}
|
|
@@ -483,11 +485,11 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
483
485
|
return html ``;
|
|
484
486
|
}
|
|
485
487
|
return html `<coras-sort-dropdown>
|
|
486
|
-
${this.sortingTask.value?.
|
|
488
|
+
${this.sortingTask.value?.map((item) => html `
|
|
487
489
|
<coras-select-option
|
|
488
490
|
key=${item.value}
|
|
489
491
|
?selected=${this.sorting === item.value}
|
|
490
|
-
@click=${() =>
|
|
492
|
+
@click=${() => this.handleSortingOptionClick(item.value)}
|
|
491
493
|
>
|
|
492
494
|
${item.label}
|
|
493
495
|
</coras-select-option>
|
|
@@ -508,7 +510,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
508
510
|
${when(!this.isMobileScreen, () => html `<coras-icon
|
|
509
511
|
slot="prefix"
|
|
510
512
|
assets-url="${this.assetsURL}"
|
|
511
|
-
label
|
|
513
|
+
label=${msg("Filters")}
|
|
512
514
|
icon="tune"
|
|
513
515
|
></coras-icon>`)}
|
|
514
516
|
${msg("Filters")}
|
|
@@ -519,36 +521,37 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
519
521
|
if (this.isMobileScreen) {
|
|
520
522
|
return html ``;
|
|
521
523
|
}
|
|
524
|
+
// The chips mirror the applied props directly, so a host-driven change
|
|
525
|
+
// (back button, navigate()) is reflected without a local copy.
|
|
526
|
+
const durationOptions = this.appliedDurationOptions;
|
|
522
527
|
return html `
|
|
523
|
-
${this.
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
`;
|
|
536
|
-
})}
|
|
537
|
-
${this.activeDurationOptions?.map((option) => {
|
|
528
|
+
${this.price
|
|
529
|
+
? html `
|
|
530
|
+
<coras-chip
|
|
531
|
+
variant="primary"
|
|
532
|
+
assets-url="${this.assetsURL}"
|
|
533
|
+
@chip-removed=${() => this.dispatchPageUpdate({ price: "" })}
|
|
534
|
+
>
|
|
535
|
+
${this.getPriceOptionLabel(this.price)}
|
|
536
|
+
</coras-chip>
|
|
537
|
+
`
|
|
538
|
+
: nothing}
|
|
539
|
+
${durationOptions.map((option) => {
|
|
538
540
|
return html `
|
|
539
541
|
<coras-chip
|
|
540
542
|
variant="primary"
|
|
541
543
|
assets-url="${this.assetsURL}"
|
|
542
|
-
@chip-removed=${() => {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
544
|
+
@chip-removed=${() => this.dispatchPageUpdate({
|
|
545
|
+
duration: durationOptions
|
|
546
|
+
.filter((applied) => applied !== option)
|
|
547
|
+
.join(","),
|
|
548
|
+
})}
|
|
546
549
|
>
|
|
547
550
|
${this.getDurationOptionLabel(option)}
|
|
548
551
|
</coras-chip>
|
|
549
552
|
`;
|
|
550
553
|
})}
|
|
551
|
-
${this.
|
|
554
|
+
${this.appliedCategorySlugs.map((slug) => {
|
|
552
555
|
return html `
|
|
553
556
|
<coras-chip
|
|
554
557
|
variant="primary"
|
|
@@ -567,14 +570,14 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
567
570
|
`;
|
|
568
571
|
}
|
|
569
572
|
getPriceOptionLabel(key) {
|
|
570
|
-
const filters = this.filtersTask.value
|
|
573
|
+
const filters = this.filtersTask.value;
|
|
571
574
|
if (!filters)
|
|
572
575
|
return key;
|
|
573
576
|
const priceFilter = filters.find((filter) => filter.type === "price");
|
|
574
577
|
return (priceFilter?.options.find((option) => option.value === key)?.label || key);
|
|
575
578
|
}
|
|
576
579
|
getDurationOptionLabel(key) {
|
|
577
|
-
const filters = this.filtersTask.value
|
|
580
|
+
const filters = this.filtersTask.value;
|
|
578
581
|
if (!filters)
|
|
579
582
|
return key;
|
|
580
583
|
const durationFilter = filters.find((filter) => filter.type === "duration");
|
|
@@ -582,7 +585,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
582
585
|
key);
|
|
583
586
|
}
|
|
584
587
|
getCategoryName(slug) {
|
|
585
|
-
const filters = this.filtersTask.value
|
|
588
|
+
const filters = this.filtersTask.value;
|
|
586
589
|
if (!filters)
|
|
587
590
|
return slug;
|
|
588
591
|
const categoryFilters = filters.filter((filter) => filter.type === "category");
|
|
@@ -604,21 +607,6 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
604
607
|
const updatedSlugs = categorySlugs.filter((s) => s !== slug);
|
|
605
608
|
return updatedSlugs.join(",");
|
|
606
609
|
}
|
|
607
|
-
updateActiveFilters() {
|
|
608
|
-
this.activePriceOptions = [...this.selectedPriceOptions];
|
|
609
|
-
this.activeDurationOptions = [...this.selectedDurationOptions];
|
|
610
|
-
this.activeCategorySlugs = this.categories
|
|
611
|
-
? this.categories.split(",").filter(Boolean)
|
|
612
|
-
: [];
|
|
613
|
-
}
|
|
614
|
-
afterFilterChipRemove() {
|
|
615
|
-
this.updateActiveFilters();
|
|
616
|
-
this.dispatchPageUpdate({
|
|
617
|
-
price: this.selectedPriceOptions[0],
|
|
618
|
-
duration: this.selectedDurationOptions.join(","),
|
|
619
|
-
categories: this.activeCategorySlugs?.join(",") || "",
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
610
|
handleFiltersClearBtnClicked() {
|
|
623
611
|
this.selectedDurationOptions = [];
|
|
624
612
|
this.selectedPriceOptions = [];
|
|
@@ -636,16 +624,14 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
636
624
|
price: this.selectedPriceOptions[0],
|
|
637
625
|
});
|
|
638
626
|
this.toggleFiltersDrawer();
|
|
639
|
-
this.updateActiveFilters();
|
|
640
627
|
}
|
|
641
628
|
updateSelectedDurationOptions(key) {
|
|
642
629
|
if (this.selectedDurationOptions.includes(key)) {
|
|
643
630
|
this.selectedDurationOptions = this.selectedDurationOptions.filter((option) => option !== key);
|
|
644
631
|
}
|
|
645
632
|
else {
|
|
646
|
-
this.selectedDurationOptions.
|
|
633
|
+
this.selectedDurationOptions = [...this.selectedDurationOptions, key];
|
|
647
634
|
}
|
|
648
|
-
this.requestUpdate();
|
|
649
635
|
}
|
|
650
636
|
renderDurationFilter(durationOptions = []) {
|
|
651
637
|
return html `<coras-checkbox-group>
|
|
@@ -667,7 +653,6 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
667
653
|
else {
|
|
668
654
|
this.selectedPriceOptions = [key];
|
|
669
655
|
}
|
|
670
|
-
this.requestUpdate();
|
|
671
656
|
}
|
|
672
657
|
renderPriceFilter(priceOptions = []) {
|
|
673
658
|
return html `<coras-checkbox-group>
|
|
@@ -701,12 +686,12 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
701
686
|
}
|
|
702
687
|
renderCategoriesTree() {
|
|
703
688
|
return this.filtersTask.render({
|
|
704
|
-
error: () =>
|
|
689
|
+
error: () => nothing,
|
|
705
690
|
pending: () => this.renderFiltersSkeleton(),
|
|
706
691
|
complete: (filters) => {
|
|
707
|
-
if (!filters
|
|
692
|
+
if (!filters)
|
|
708
693
|
return nothing;
|
|
709
|
-
const transformedCategories = this.transformFiltersToCategories(filters
|
|
694
|
+
const transformedCategories = this.transformFiltersToCategories(filters);
|
|
710
695
|
return html `
|
|
711
696
|
<coras-categories-tree
|
|
712
697
|
.categories=${transformedCategories}
|
|
@@ -736,13 +721,13 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
736
721
|
}
|
|
737
722
|
renderFiltersContent() {
|
|
738
723
|
return this.filtersTask.render({
|
|
739
|
-
error: () =>
|
|
724
|
+
error: () => nothing,
|
|
740
725
|
pending: () => this.renderFiltersSkeleton(),
|
|
741
726
|
complete: (filters) => {
|
|
742
|
-
if (!filters
|
|
727
|
+
if (!filters)
|
|
743
728
|
return nothing;
|
|
744
|
-
const durationFilter = filters.
|
|
745
|
-
const priceFilter = filters.
|
|
729
|
+
const durationFilter = filters.find((filter) => filter.type === "duration");
|
|
730
|
+
const priceFilter = filters.find((filter) => filter.type === "price");
|
|
746
731
|
return html `
|
|
747
732
|
${this.renderDurationFilter(durationFilter?.options || [])}
|
|
748
733
|
${this.renderPriceFilter(priceFilter?.options || [])}
|
|
@@ -760,7 +745,9 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
760
745
|
`;
|
|
761
746
|
}
|
|
762
747
|
renderSections(sections = []) {
|
|
763
|
-
|
|
748
|
+
// Copy first: the array is the task value and must not be reordered in
|
|
749
|
+
// place during render.
|
|
750
|
+
const sorted = [...sections].sort((a, b) => {
|
|
764
751
|
return a.order - b.order;
|
|
765
752
|
});
|
|
766
753
|
return sorted.map((section) => {
|
|
@@ -897,13 +884,12 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
897
884
|
return html ``;
|
|
898
885
|
},
|
|
899
886
|
pending: () => this.renderAttractionsSkeleton(),
|
|
900
|
-
complete: (
|
|
901
|
-
if (!
|
|
887
|
+
complete: (sections) => {
|
|
888
|
+
if (!sections)
|
|
902
889
|
return nothing;
|
|
903
890
|
return html `
|
|
904
891
|
<section class="attractions-sections">
|
|
905
|
-
${this.renderAttractionsTitle()}
|
|
906
|
-
${this.renderSections(result.data || [])}
|
|
892
|
+
${this.renderAttractionsTitle()} ${this.renderSections(sections)}
|
|
907
893
|
</section>
|
|
908
894
|
`;
|
|
909
895
|
},
|
|
@@ -943,7 +929,9 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(PointsMixi
|
|
|
943
929
|
${this.renderErrorModal({
|
|
944
930
|
assetsURL: this.assetsURL,
|
|
945
931
|
buttonLabel: msg("Refresh the page"),
|
|
946
|
-
onRetry: () =>
|
|
932
|
+
onRetry: () => {
|
|
933
|
+
void this.attractionsSearchTask.run();
|
|
934
|
+
},
|
|
947
935
|
onHelp: () => this.dispatchPageUpdate({ page: "help" }),
|
|
948
936
|
})}
|
|
949
937
|
|
|
@@ -994,9 +982,6 @@ __decorate([
|
|
|
994
982
|
__decorate([
|
|
995
983
|
state()
|
|
996
984
|
], CorasLandingPage.prototype, "_selectedCategories", void 0);
|
|
997
|
-
__decorate([
|
|
998
|
-
state()
|
|
999
|
-
], CorasLandingPage.prototype, "activeCategorySlugs", void 0);
|
|
1000
985
|
CorasLandingPage = __decorate([
|
|
1001
986
|
localized()
|
|
1002
987
|
], CorasLandingPage);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ReactiveController, ReactiveControllerHost } from "lit";
|
|
2
2
|
import type { PhoneCodeSelection } from "../payment-page.types.js";
|
|
3
|
+
import type { Logger } from "../../../core/logger.js";
|
|
3
4
|
/**
|
|
4
5
|
* Dependencies injected from the host component.
|
|
5
6
|
* These map to CoinbaseMixin methods and state that the controller
|
|
6
7
|
* cannot access directly (mixin inheritance is on the component).
|
|
7
8
|
*/
|
|
8
9
|
export interface CryptoAuthDeps {
|
|
10
|
+
logger: Logger;
|
|
9
11
|
sendCode(email: string): Promise<void>;
|
|
10
12
|
loginWithCode(email: string, code: string): Promise<{
|
|
11
13
|
email?: string;
|
|
@@ -31,6 +33,8 @@ export interface CryptoAuthDeps {
|
|
|
31
33
|
export declare class CryptoAuthController implements ReactiveController {
|
|
32
34
|
private host;
|
|
33
35
|
private deps;
|
|
36
|
+
/** True while a CDP auth call (send, login, MFA enrolment) is in flight. */
|
|
37
|
+
isAuthenticating: boolean;
|
|
34
38
|
otpCode: string;
|
|
35
39
|
otpError: string;
|
|
36
40
|
showResend: boolean;
|
|
@@ -59,12 +63,14 @@ export declare class CryptoAuthController implements ReactiveController {
|
|
|
59
63
|
handleResendCode(email: string, codeSent: boolean, hasSession: boolean): Promise<void>;
|
|
60
64
|
handleLogin(email: string): Promise<void>;
|
|
61
65
|
/**
|
|
62
|
-
* Gets the
|
|
63
|
-
*
|
|
66
|
+
* Gets the E.164 phone number for MFA enrollment from the local number and
|
|
67
|
+
* the selected country (falling back to the payment form's country).
|
|
64
68
|
*/
|
|
65
|
-
getFullPhoneNumber(
|
|
66
|
-
handleMfaEnrollmentWithFormPhone(formPhone: string | null, useFormPhone: boolean,
|
|
69
|
+
getFullPhoneNumber(fallbackCountryCode: string): string;
|
|
70
|
+
handleMfaEnrollmentWithFormPhone(formPhone: string | null, useFormPhone: boolean, fallbackCountryCode: string, setEnrollmentError: (error: string) => void): Promise<void>;
|
|
67
71
|
handleVerifyMfaEnrollment(): Promise<void>;
|
|
72
|
+
private beginAuthCall;
|
|
73
|
+
private endAuthCall;
|
|
68
74
|
handlePhoneEnrollmentChange(value: string): void;
|
|
69
75
|
resetMfaPhoneState(): void;
|
|
70
76
|
reset(): void;
|