@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
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import component from "../../styles/defaults/component.js";
|
|
3
|
-
export default css `
|
|
4
|
-
${component}
|
|
5
|
-
|
|
6
|
-
:host {
|
|
7
|
-
--tooltip-background-color: var(--coras-color-card);
|
|
8
|
-
--tooltip-arrow-icon-color: var(--coras-color-primary);
|
|
9
|
-
--tooltip-border-color: var(--coras-color-card-border);
|
|
10
|
-
--tooltip-border-radius: var(--coras-radius-sm);
|
|
11
|
-
--tooltip-content-shadow: var(--coras-shadow-md);
|
|
12
|
-
--tooltip-font-size: var(--coras-font-size-sm);
|
|
13
|
-
--tooltip-line-height: var(--coras-font-size-xl);
|
|
14
|
-
|
|
15
|
-
display: inline-block;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
slot[name="trigger"] {
|
|
19
|
-
display: block;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.overlay {
|
|
24
|
-
position: fixed;
|
|
25
|
-
|
|
26
|
-
.content {
|
|
27
|
-
display: none;
|
|
28
|
-
position: absolute;
|
|
29
|
-
width: max-content;
|
|
30
|
-
max-width: 300px;
|
|
31
|
-
background-color: var(--tooltip-background-color);
|
|
32
|
-
box-shadow: var(--tooltip-content-shadow);
|
|
33
|
-
border: 1px solid var(--tooltip-border-color);
|
|
34
|
-
border-radius: var(--tooltip-border-radius);
|
|
35
|
-
padding: 1rem 1.25rem;
|
|
36
|
-
font-size: var(--tooltip-font-size);
|
|
37
|
-
line-height: var(--tooltip-line-height);
|
|
38
|
-
opacity: 0;
|
|
39
|
-
transition: opacity 0.4s ease-in-out;
|
|
40
|
-
|
|
41
|
-
.arrow {
|
|
42
|
-
position: absolute;
|
|
43
|
-
width: 14px;
|
|
44
|
-
height: 14px;
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
background-color: var(--tooltip-background-color);
|
|
47
|
-
border-right: 1px solid var(--tooltip-border-color);
|
|
48
|
-
border-bottom: 1px solid var(--tooltip-border-color);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([open]) {
|
|
54
|
-
.overlay {
|
|
55
|
-
.content {
|
|
56
|
-
opacity: 1;
|
|
57
|
-
transition: opacity 0.4s ease-in-out;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:host([placement="top"]) {
|
|
63
|
-
.overlay {
|
|
64
|
-
.arrow {
|
|
65
|
-
bottom: -8px;
|
|
66
|
-
transform: rotate(45deg);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host([placement="bottom"]) {
|
|
72
|
-
.overlay {
|
|
73
|
-
.arrow {
|
|
74
|
-
top: -8px;
|
|
75
|
-
transform: rotate(225deg);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`;
|
package/dist/core/signals.d.ts
DELETED
package/dist/core/signals.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function defineComponentArgTypes(component: string): {} | undefined;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const ARG_TYPES = ["string", "boolean", "number", "array", "object"];
|
|
2
|
-
const CONTROL_TYPES_MAP = {
|
|
3
|
-
string: "text",
|
|
4
|
-
boolean: "boolean",
|
|
5
|
-
number: "number",
|
|
6
|
-
date: "date",
|
|
7
|
-
array: "object",
|
|
8
|
-
object: "object",
|
|
9
|
-
};
|
|
10
|
-
export function defineComponentArgTypes(component) {
|
|
11
|
-
const constructor = customElements.get(component);
|
|
12
|
-
if (!constructor) {
|
|
13
|
-
console.error(`Component ${component} is not defined`);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const argTypes = {};
|
|
17
|
-
const litElement = new constructor();
|
|
18
|
-
const props = litElement.constructor.elementProperties;
|
|
19
|
-
if (!props) {
|
|
20
|
-
return argTypes;
|
|
21
|
-
}
|
|
22
|
-
for (const [key, declaration] of props.entries()) {
|
|
23
|
-
if (!declaration.type ||
|
|
24
|
-
!("name" in declaration.type)) {
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
const type = declaration.type.name.toLowerCase();
|
|
28
|
-
// @ts-expect-error // unknown type
|
|
29
|
-
argTypes[key] = {
|
|
30
|
-
name: typeof declaration.attribute === "string"
|
|
31
|
-
? declaration.attribute
|
|
32
|
-
: key,
|
|
33
|
-
type: {
|
|
34
|
-
name: getArgTypeName(type),
|
|
35
|
-
},
|
|
36
|
-
control: { type: getControlType(type) },
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return argTypes;
|
|
40
|
-
}
|
|
41
|
-
function getArgTypeName(type) {
|
|
42
|
-
return ARG_TYPES.includes(type) ? type : "string";
|
|
43
|
-
}
|
|
44
|
-
function getControlType(type) {
|
|
45
|
-
return CONTROL_TYPES_MAP[type] || "text";
|
|
46
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { CSSResult } from "lit";
|
|
2
|
-
interface ColorConfig {
|
|
3
|
-
name: string;
|
|
4
|
-
value: string | number;
|
|
5
|
-
description: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function createCSSProp(config: ColorConfig): Record<string, {
|
|
8
|
-
description: string;
|
|
9
|
-
value: string | number;
|
|
10
|
-
}>;
|
|
11
|
-
export type CSSVariableDefinition = {
|
|
12
|
-
name: string;
|
|
13
|
-
value: string | number;
|
|
14
|
-
};
|
|
15
|
-
export type CSSPropertiesDefinition = {
|
|
16
|
-
[key: string]: {
|
|
17
|
-
description: string;
|
|
18
|
-
value: string | number;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type DesignTokenMatch = {
|
|
22
|
-
tokenName: string;
|
|
23
|
-
variableName: string;
|
|
24
|
-
value: string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Defines CSS properties for Storybook for a component based on its CSS.
|
|
28
|
-
*/
|
|
29
|
-
export declare function defineComponentCSSProps(styles: CSSResult): CSSPropertiesDefinition;
|
|
30
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export function createCSSProp(config) {
|
|
2
|
-
const formattedName = config.name.replace("--", "");
|
|
3
|
-
return {
|
|
4
|
-
[formattedName]: {
|
|
5
|
-
description: config.description,
|
|
6
|
-
value: config.value,
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Defines CSS properties for Storybook for a component based on its CSS.
|
|
12
|
-
*/
|
|
13
|
-
export function defineComponentCSSProps(styles) {
|
|
14
|
-
const vars = findCssVars(styles.cssText);
|
|
15
|
-
return vars.reduce((acc, definition) => {
|
|
16
|
-
return {
|
|
17
|
-
...acc,
|
|
18
|
-
...{
|
|
19
|
-
[definition.variableName]: {
|
|
20
|
-
description: kebabToSentenceCase(definition.tokenName),
|
|
21
|
-
value: definition.value,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}, {});
|
|
26
|
-
}
|
|
27
|
-
function findCssVars(text) {
|
|
28
|
-
const matches = [];
|
|
29
|
-
// Regex to match entries like
|
|
30
|
-
// --component-variable-identifier: var(--coras-global-variable-identifier, value);
|
|
31
|
-
const regex = /--([\w-]+):\s*var\((?:\\n\s*|\s*)--([\w-]+)\s*,(?:\\n\s*|\s*)([^\\^\s]*)(?:\\n\s*|\s*)\);/g;
|
|
32
|
-
let match;
|
|
33
|
-
while ((match = regex.exec(text)) !== null) {
|
|
34
|
-
const [_, tokenName, variableName, value] = match;
|
|
35
|
-
matches.push({
|
|
36
|
-
tokenName: tokenName,
|
|
37
|
-
variableName: variableName,
|
|
38
|
-
value: value,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return matches;
|
|
42
|
-
}
|
|
43
|
-
function kebabToSentenceCase(input) {
|
|
44
|
-
// Replace hyphens with spaces and capitalize the first letter
|
|
45
|
-
return input.replace(/-/g, " ").replace(/\b\w/, (char) => char.toUpperCase());
|
|
46
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Shared demo configuration for Storybook stories.
|
|
2
|
-
//
|
|
3
|
-
// Assets are served by Storybook itself at `/assets` (see `.storybook/main.ts`
|
|
4
|
-
// `staticDirs`), so a root-relative path resolves against whatever origin is
|
|
5
|
-
// serving Storybook: `localhost:8082` in local dev and `storybook.*.coras.io`
|
|
6
|
-
// in the deployed build, with no cross-origin request. The previous hardcoded
|
|
7
|
-
// `http://localhost:8082/assets` only existed on a dev machine, so the deployed
|
|
8
|
-
// Storybook loaded no icons or flags.
|
|
9
|
-
export const DEMO_ASSETS_URL = "/assets";
|
|
10
|
-
// Flag SVGs live under the shared assets tree at `/assets/flags`.
|
|
11
|
-
export const DEMO_FLAGS_URL = `${DEMO_ASSETS_URL}/flags`;
|
|
12
|
-
// The API host and distributor point at the shared Coras sandbox demo
|
|
13
|
-
// distributor by default, so stories that fetch live data work in the deployed
|
|
14
|
-
// Storybook. Both are overridable via env for local work against another
|
|
15
|
-
// backend (see `.env.example`).
|
|
16
|
-
export const DEMO_API_HOST = import.meta.env.VITE_API_HOST ?? "https://sandbox.coras.io";
|
|
17
|
-
export const DEMO_DISTRIBUTOR_ID = import.meta.env.VITE_DISTRIBUTOR_ID ?? "a8405267cbcf4bd2b70114e618516645";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_CONTRAST_PAIRS = [
|
|
2
|
-
{
|
|
3
|
-
label: "Primary button text on primary button background",
|
|
4
|
-
foreground: "#ffffff",
|
|
5
|
-
background: "#4657d4",
|
|
6
|
-
threshold: "AA-normal",
|
|
7
|
-
tokens: [
|
|
8
|
-
"--coras-button-primary-text-color",
|
|
9
|
-
"--coras-button-primary-background",
|
|
10
|
-
],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: "Body text on page background",
|
|
14
|
-
foreground: "#000000",
|
|
15
|
-
background: "#ffffff",
|
|
16
|
-
threshold: "AA-normal",
|
|
17
|
-
tokens: ["--coras-color-text", "--coras-color-background"],
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
label: "Muted/label text on page background",
|
|
21
|
-
foreground: "#888888",
|
|
22
|
-
background: "#ffffff",
|
|
23
|
-
threshold: "AA-large",
|
|
24
|
-
tokens: ["--coras-color-text-muted", "--coras-color-background"],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: "Brand accent on background",
|
|
28
|
-
foreground: "#161c44",
|
|
29
|
-
background: "#ffffff",
|
|
30
|
-
threshold: "AA-large",
|
|
31
|
-
tokens: ["--coras-brand-secondary", "--coras-color-background"],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: "Muted/placeholder text on surface",
|
|
35
|
-
foreground: "#888888",
|
|
36
|
-
background: "#fcfcff",
|
|
37
|
-
threshold: "AA-large",
|
|
38
|
-
tokens: ["--coras-color-text-muted", "--coras-color-card"],
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: "Error alert text on error alert background",
|
|
42
|
-
foreground: "#c9224a",
|
|
43
|
-
background: "#fae8ec",
|
|
44
|
-
threshold: "AA-normal",
|
|
45
|
-
tokens: ["--coras-color-error", "--coras-color-error-background"],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: "Focus ring on background",
|
|
49
|
-
foreground: "#4657d4",
|
|
50
|
-
background: "#ffffff",
|
|
51
|
-
threshold: "AA-large",
|
|
52
|
-
tokens: ["--coras-color-focus-ring", "--coras-color-background"],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "Navbar text on navbar background",
|
|
56
|
-
foreground: "#000000",
|
|
57
|
-
background: "#ffffff",
|
|
58
|
-
threshold: "AA-normal",
|
|
59
|
-
tokens: ["--coras-navbar-text-color", "--coras-navbar-background"],
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: "Body text on page background (dark)",
|
|
63
|
-
foreground: "#ffffff",
|
|
64
|
-
background: "#101216",
|
|
65
|
-
threshold: "AA-normal",
|
|
66
|
-
tokens: ["--coras-color-text", "--coras-color-background"],
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: "Muted/label text on page background (dark)",
|
|
70
|
-
foreground: "#cccccc",
|
|
71
|
-
background: "#101216",
|
|
72
|
-
threshold: "AA-large",
|
|
73
|
-
tokens: ["--coras-color-text-muted", "--coras-color-background"],
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
label: "Muted/placeholder text on surface (dark)",
|
|
77
|
-
foreground: "#cccccc",
|
|
78
|
-
background: "#191c22",
|
|
79
|
-
threshold: "AA-large",
|
|
80
|
-
tokens: ["--coras-color-text-muted", "--coras-color-card"],
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: "Focus ring on background (dark)",
|
|
84
|
-
foreground: "#4657d4",
|
|
85
|
-
background: "#101216",
|
|
86
|
-
threshold: "AA-large",
|
|
87
|
-
tokens: ["--coras-color-focus-ring", "--coras-color-background"],
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
label: "Navbar text on navbar background (dark)",
|
|
91
|
-
foreground: "#ffffff",
|
|
92
|
-
background: "#101216",
|
|
93
|
-
threshold: "AA-normal",
|
|
94
|
-
tokens: ["--coras-navbar-text-color", "--coras-navbar-background"],
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
label: "Footer text on footer background (dark)",
|
|
98
|
-
foreground: "#ffffff",
|
|
99
|
-
background: "#191c22",
|
|
100
|
-
threshold: "AA-normal",
|
|
101
|
-
tokens: ["--coras-footer-text-color", "--coras-footer-background-color"],
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
label: "Text button on surface (dark)",
|
|
105
|
-
foreground: "#6279f9",
|
|
106
|
-
background: "#191c22",
|
|
107
|
-
threshold: "AA-normal",
|
|
108
|
-
tokens: ["--coras-color-text-button", "--coras-color-card"],
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: "Link on page background (dark)",
|
|
112
|
-
foreground: "#6279f9",
|
|
113
|
-
background: "#101216",
|
|
114
|
-
threshold: "AA-normal",
|
|
115
|
-
tokens: ["--coras-color-link", "--coras-color-background"],
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
label: "Error alert text on error alert background (dark)",
|
|
119
|
-
foreground: "#f5748a",
|
|
120
|
-
background: "#442e36",
|
|
121
|
-
threshold: "AA-normal",
|
|
122
|
-
tokens: ["--coras-color-error", "--coras-color-error-background"],
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: "Info alert text on info alert background (dark)",
|
|
126
|
-
foreground: "#ba86e1",
|
|
127
|
-
background: "#373045",
|
|
128
|
-
threshold: "AA-normal",
|
|
129
|
-
tokens: ["--coras-color-info", "--coras-color-info-background"],
|
|
130
|
-
},
|
|
131
|
-
];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Payload preparation and error mapping for the payment page.
|
|
3
|
-
*
|
|
4
|
-
* These functions transform form data into API request payloads and
|
|
5
|
-
* map API error responses back to form field names.
|
|
6
|
-
*/
|
|
7
|
-
export { prepareCustomerData, prepareReservationData, prepareAttendeesData, isApiError, mapApiErrorsToForm, } from "../payment-page.utils.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Payload preparation and error mapping for the payment page.
|
|
3
|
-
*
|
|
4
|
-
* These functions transform form data into API request payloads and
|
|
5
|
-
* map API error responses back to form field names.
|
|
6
|
-
*/
|
|
7
|
-
export { prepareCustomerData, prepareReservationData, prepareAttendeesData, isApiError, mapApiErrorsToForm, } from "../payment-page.utils.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Form validation logic for the payment page.
|
|
3
|
-
*
|
|
4
|
-
* Contains field validation, form-level validation, and field visibility helpers.
|
|
5
|
-
*/
|
|
6
|
-
export { validateForm, validateField, getFieldVisibility, hasNameField, hasFirstNameField, hasSecondNameField, hasPhoneField, hasEmailField, } from "../payment-page.utils.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Form validation logic for the payment page.
|
|
3
|
-
*
|
|
4
|
-
* Contains field validation, form-level validation, and field visibility helpers.
|
|
5
|
-
*/
|
|
6
|
-
export { validateForm, validateField, getFieldVisibility, hasNameField, hasFirstNameField, hasSecondNameField, hasPhoneField, hasEmailField, } from "../payment-page.utils.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recovery payload persistence, validation, and integrity verification.
|
|
3
|
-
*
|
|
4
|
-
* These functions manage the localStorage-based crash recovery mechanism
|
|
5
|
-
* for crypto transfers.
|
|
6
|
-
*/
|
|
7
|
-
export type { PendingTransferPayload } from "../payment-page.utils.js";
|
|
8
|
-
export { isValidTransactionHash, isValidTransferAmount, isValidPendingTransferPayload, computeTransferChecksum, verifyTransferChecksum, } from "../payment-page.utils.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recovery payload persistence, validation, and integrity verification.
|
|
3
|
-
*
|
|
4
|
-
* These functions manage the localStorage-based crash recovery mechanism
|
|
5
|
-
* for crypto transfers.
|
|
6
|
-
*/
|
|
7
|
-
export { isValidTransactionHash, isValidTransferAmount, isValidPendingTransferPayload, computeTransferChecksum, verifyTransferChecksum, } from "../payment-page.utils.js";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
2
|
-
import "../../../../components/checkbox/checkbox.js";
|
|
3
|
-
/**
|
|
4
|
-
* Terms and conditions checkbox component.
|
|
5
|
-
*
|
|
6
|
-
* Handles terms acceptance with error state display.
|
|
7
|
-
*
|
|
8
|
-
* Emits events:
|
|
9
|
-
* - `terms-changed`: When terms acceptance state changes
|
|
10
|
-
*/
|
|
11
|
-
export declare class CorasTermsCheckbox extends LitElement {
|
|
12
|
-
static styles: CSSResultGroup;
|
|
13
|
-
/** Whether terms are accepted */
|
|
14
|
-
checked: boolean;
|
|
15
|
-
/** Whether to show error state */
|
|
16
|
-
error: boolean;
|
|
17
|
-
/** Custom terms label (optional, uses default if not provided) */
|
|
18
|
-
label: string;
|
|
19
|
-
private handleTermsChange;
|
|
20
|
-
private getDefaultLabel;
|
|
21
|
-
render(): import("lit").TemplateResult<1>;
|
|
22
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { localized, msg } from "@lit/localize";
|
|
10
|
-
import { fireInternalEvent } from "../../../../core/events.js";
|
|
11
|
-
import styles from "./terms-checkbox.styles.js";
|
|
12
|
-
import "../../../../components/checkbox/checkbox.js";
|
|
13
|
-
/**
|
|
14
|
-
* Terms and conditions checkbox component.
|
|
15
|
-
*
|
|
16
|
-
* Handles terms acceptance with error state display.
|
|
17
|
-
*
|
|
18
|
-
* Emits events:
|
|
19
|
-
* - `terms-changed`: When terms acceptance state changes
|
|
20
|
-
*/
|
|
21
|
-
let CorasTermsCheckbox = class CorasTermsCheckbox extends LitElement {
|
|
22
|
-
constructor() {
|
|
23
|
-
super(...arguments);
|
|
24
|
-
/** Whether terms are accepted */
|
|
25
|
-
this.checked = false;
|
|
26
|
-
/** Whether to show error state */
|
|
27
|
-
this.error = false;
|
|
28
|
-
/** Custom terms label (optional, uses default if not provided) */
|
|
29
|
-
this.label = "";
|
|
30
|
-
}
|
|
31
|
-
static { this.styles = styles; }
|
|
32
|
-
handleTermsChange(e) {
|
|
33
|
-
e.stopPropagation();
|
|
34
|
-
fireInternalEvent(this, "terms-changed", { value: e.detail.value });
|
|
35
|
-
}
|
|
36
|
-
getDefaultLabel() {
|
|
37
|
-
return msg("I have read and agree to the terms and conditions.");
|
|
38
|
-
}
|
|
39
|
-
render() {
|
|
40
|
-
const displayLabel = this.label || this.getDefaultLabel();
|
|
41
|
-
return html `
|
|
42
|
-
<div class="terms-container">
|
|
43
|
-
<coras-checkbox
|
|
44
|
-
?checked=${this.checked}
|
|
45
|
-
?error=${this.error}
|
|
46
|
-
label="${displayLabel}"
|
|
47
|
-
@value-changed=${this.handleTermsChange}
|
|
48
|
-
></coras-checkbox>
|
|
49
|
-
</div>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
property({ type: Boolean })
|
|
55
|
-
], CorasTermsCheckbox.prototype, "checked", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
property({ type: Boolean })
|
|
58
|
-
], CorasTermsCheckbox.prototype, "error", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
property({ type: String })
|
|
61
|
-
], CorasTermsCheckbox.prototype, "label", void 0);
|
|
62
|
-
CorasTermsCheckbox = __decorate([
|
|
63
|
-
localized()
|
|
64
|
-
], CorasTermsCheckbox);
|
|
65
|
-
export { CorasTermsCheckbox };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CorasTermsCheckbox } from "./terms-checkbox.component.js";
|
|
2
|
-
export * from "./terms-checkbox.component.js";
|
|
3
|
-
export default CorasTermsCheckbox;
|
|
4
|
-
if (!customElements.get("coras-terms-checkbox")) {
|
|
5
|
-
customElements.define("coras-terms-checkbox", CorasTermsCheckbox);
|
|
6
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type ValidatorFn } from "./payment-page.validators.js";
|
|
2
|
-
/**
|
|
3
|
-
* Validation schema for payment page form fields.
|
|
4
|
-
*
|
|
5
|
-
* This schema defines validation rules separately from UI configuration,
|
|
6
|
-
* enabling:
|
|
7
|
-
* - Easier testing of validation logic
|
|
8
|
-
* - Clear separation of concerns
|
|
9
|
-
* - Reusability across different form implementations
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Validation rules for base form fields
|
|
13
|
-
*/
|
|
14
|
-
export declare const baseFieldValidators: Record<string, ValidatorFn>;
|
|
15
|
-
/**
|
|
16
|
-
* Default validator for dynamic fields (reservation/ticket requirements)
|
|
17
|
-
* These fields are generally required unless specified otherwise
|
|
18
|
-
*/
|
|
19
|
-
export declare const defaultDynamicFieldValidator: ValidatorFn;
|
|
20
|
-
/**
|
|
21
|
-
* Gets validators for a specific field
|
|
22
|
-
* Falls back to required validator for unknown fields
|
|
23
|
-
*/
|
|
24
|
-
export declare function getFieldValidators(fieldName: string): ValidatorFn;
|
|
25
|
-
/**
|
|
26
|
-
* Creates a validation schema object for the form controller
|
|
27
|
-
*/
|
|
28
|
-
export declare function createValidationSchema(): Record<string, ValidatorFn>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { required, validEmail, validPhone, maxLength, composeValidators, } from "./payment-page.validators.js";
|
|
2
|
-
/**
|
|
3
|
-
* Validation schema for payment page form fields.
|
|
4
|
-
*
|
|
5
|
-
* This schema defines validation rules separately from UI configuration,
|
|
6
|
-
* enabling:
|
|
7
|
-
* - Easier testing of validation logic
|
|
8
|
-
* - Clear separation of concerns
|
|
9
|
-
* - Reusability across different form implementations
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Validation rules for base form fields
|
|
13
|
-
*/
|
|
14
|
-
export const baseFieldValidators = {
|
|
15
|
-
first_name: composeValidators(required, maxLength(50)),
|
|
16
|
-
second_name: composeValidators(required, maxLength(50)),
|
|
17
|
-
email: composeValidators(required, validEmail),
|
|
18
|
-
phone: composeValidators(required, validPhone),
|
|
19
|
-
addressLine1: composeValidators(required, maxLength(100)),
|
|
20
|
-
addressLine2: maxLength(100), // Optional field
|
|
21
|
-
city: composeValidators(required, maxLength(50)),
|
|
22
|
-
postcode: composeValidators(required, maxLength(20)),
|
|
23
|
-
country: required,
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Default validator for dynamic fields (reservation/ticket requirements)
|
|
27
|
-
* These fields are generally required unless specified otherwise
|
|
28
|
-
*/
|
|
29
|
-
export const defaultDynamicFieldValidator = required;
|
|
30
|
-
/**
|
|
31
|
-
* Gets validators for a specific field
|
|
32
|
-
* Falls back to required validator for unknown fields
|
|
33
|
-
*/
|
|
34
|
-
export function getFieldValidators(fieldName) {
|
|
35
|
-
return baseFieldValidators[fieldName] || defaultDynamicFieldValidator;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Creates a validation schema object for the form controller
|
|
39
|
-
*/
|
|
40
|
-
export function createValidationSchema() {
|
|
41
|
-
return { ...baseFieldValidators };
|
|
42
|
-
}
|
|
File without changes
|
|
File without changes
|