@coras-io/embed 0.1.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 +20 -0
- package/LICENSE +201 -0
- package/NOTICE +8 -0
- package/README.md +51 -0
- package/dist/components/accordion/accordion-item/accordion-item.component.d.ts +9 -0
- package/dist/components/accordion/accordion-item/accordion-item.component.js +44 -0
- package/dist/components/accordion/accordion-item/accordion-item.d.ts +8 -0
- package/dist/components/accordion/accordion-item/accordion-item.js +6 -0
- package/dist/components/accordion/accordion-item/accordion-item.styles.d.ts +2 -0
- package/dist/components/accordion/accordion-item/accordion-item.styles.js +62 -0
- package/dist/components/accordion/accordion.component.d.ts +8 -0
- package/dist/components/accordion/accordion.component.js +31 -0
- package/dist/components/accordion/accordion.d.ts +8 -0
- package/dist/components/accordion/accordion.js +6 -0
- package/dist/components/accordion/accordion.styles.d.ts +2 -0
- package/dist/components/accordion/accordion.styles.js +13 -0
- package/dist/components/alert/alert.component.d.ts +11 -0
- package/dist/components/alert/alert.component.js +59 -0
- package/dist/components/alert/alert.d.ts +8 -0
- package/dist/components/alert/alert.js +6 -0
- package/dist/components/alert/alert.styles.d.ts +2 -0
- package/dist/components/alert/alert.styles.js +158 -0
- package/dist/components/alert/alert.types.d.ts +1 -0
- package/dist/components/alert/alert.types.js +1 -0
- package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +8 -0
- package/dist/components/attraction-card/base/attraction-card.mixin.js +109 -0
- package/dist/components/attraction-card/base/attraction-card.styles.d.ts +2 -0
- package/dist/components/attraction-card/base/attraction-card.styles.js +94 -0
- package/dist/components/attraction-card/base/attraction-card.types.d.ts +24 -0
- package/dist/components/attraction-card/base/attraction-card.types.js +1 -0
- package/dist/components/attraction-card/long/attraction-long-card.component.d.ts +10 -0
- package/dist/components/attraction-card/long/attraction-long-card.component.js +78 -0
- package/dist/components/attraction-card/long/attraction-long-card.d.ts +8 -0
- package/dist/components/attraction-card/long/attraction-long-card.js +6 -0
- package/dist/components/attraction-card/long/attraction-long-card.styles.d.ts +2 -0
- package/dist/components/attraction-card/long/attraction-long-card.styles.js +127 -0
- package/dist/components/attraction-card/short/attraction-short-card.component.d.ts +10 -0
- package/dist/components/attraction-card/short/attraction-short-card.component.js +75 -0
- package/dist/components/attraction-card/short/attraction-short-card.d.ts +8 -0
- package/dist/components/attraction-card/short/attraction-short-card.js +6 -0
- package/dist/components/attraction-card/short/attraction-short-card.styles.d.ts +2 -0
- package/dist/components/attraction-card/short/attraction-short-card.styles.js +66 -0
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +10 -0
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.js +43 -0
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.d.ts +8 -0
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js +6 -0
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.d.ts +2 -0
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.js +23 -0
- package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +10 -0
- package/dist/components/attraction-discovery/attraction-discovery.component.js +52 -0
- package/dist/components/attraction-discovery/attraction-discovery.constants.d.ts +4 -0
- package/dist/components/attraction-discovery/attraction-discovery.constants.js +5 -0
- package/dist/components/attraction-discovery/attraction-discovery.d.ts +8 -0
- package/dist/components/attraction-discovery/attraction-discovery.js +6 -0
- package/dist/components/attraction-discovery/attraction-discovery.styles.d.ts +2 -0
- package/dist/components/attraction-discovery/attraction-discovery.styles.js +193 -0
- package/dist/components/attraction-header/attraction-header.component.d.ts +31 -0
- package/dist/components/attraction-header/attraction-header.component.js +69 -0
- package/dist/components/attraction-header/attraction-header.d.ts +8 -0
- package/dist/components/attraction-header/attraction-header.js +6 -0
- package/dist/components/attraction-header/attraction-header.styles.d.ts +2 -0
- package/dist/components/attraction-header/attraction-header.styles.js +41 -0
- package/dist/components/attraction-header/attraction-header.utils.d.ts +20 -0
- package/dist/components/attraction-header/attraction-header.utils.js +37 -0
- package/dist/components/attraction-option/attraction-option.component.d.ts +11 -0
- package/dist/components/attraction-option/attraction-option.component.js +82 -0
- package/dist/components/attraction-option/attraction-option.d.ts +8 -0
- package/dist/components/attraction-option/attraction-option.js +6 -0
- package/dist/components/attraction-option/attraction-option.styles.d.ts +2 -0
- package/dist/components/attraction-option/attraction-option.styles.js +132 -0
- package/dist/components/basket/basket.component.d.ts +28 -0
- package/dist/components/basket/basket.component.js +162 -0
- package/dist/components/basket/basket.d.ts +8 -0
- package/dist/components/basket/basket.js +6 -0
- package/dist/components/basket/basket.styles.d.ts +2 -0
- package/dist/components/basket/basket.styles.js +196 -0
- package/dist/components/basket-empty/basket-empty.component.d.ts +5 -0
- package/dist/components/basket-empty/basket-empty.component.js +24 -0
- package/dist/components/basket-empty/basket-empty.d.ts +8 -0
- package/dist/components/basket-empty/basket-empty.js +6 -0
- package/dist/components/basket-empty/basket-empty.styles.d.ts +2 -0
- package/dist/components/basket-empty/basket-empty.styles.js +39 -0
- package/dist/components/basket-item/basket-item.component.d.ts +27 -0
- package/dist/components/basket-item/basket-item.component.js +153 -0
- package/dist/components/basket-item/basket-item.d.ts +8 -0
- package/dist/components/basket-item/basket-item.js +6 -0
- package/dist/components/basket-item/basket-item.styles.d.ts +2 -0
- package/dist/components/basket-item/basket-item.styles.js +178 -0
- package/dist/components/basket-item-ticket/basket-item-ticket.component.d.ts +9 -0
- package/dist/components/basket-item-ticket/basket-item-ticket.component.js +57 -0
- package/dist/components/basket-item-ticket/basket-item-ticket.d.ts +8 -0
- package/dist/components/basket-item-ticket/basket-item-ticket.js +6 -0
- package/dist/components/basket-item-ticket/basket-item-ticket.styles.d.ts +2 -0
- package/dist/components/basket-item-ticket/basket-item-ticket.styles.js +59 -0
- package/dist/components/basket-mobile/basket-mobile.component.d.ts +10 -0
- package/dist/components/basket-mobile/basket-mobile.component.js +59 -0
- package/dist/components/basket-mobile/basket-mobile.d.ts +8 -0
- package/dist/components/basket-mobile/basket-mobile.js +6 -0
- package/dist/components/basket-mobile/basket-mobile.styles.d.ts +2 -0
- package/dist/components/basket-mobile/basket-mobile.styles.js +71 -0
- package/dist/components/basket-rewards/basket-rewards.component.d.ts +10 -0
- package/dist/components/basket-rewards/basket-rewards.component.js +52 -0
- package/dist/components/basket-rewards/basket-rewards.d.ts +8 -0
- package/dist/components/basket-rewards/basket-rewards.js +6 -0
- package/dist/components/basket-rewards/basket-rewards.styles.d.ts +2 -0
- package/dist/components/basket-rewards/basket-rewards.styles.js +18 -0
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.component.d.ts +10 -0
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.component.js +17 -0
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.d.ts +8 -0
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.js +6 -0
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.styles.d.ts +2 -0
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.styles.js +16 -0
- package/dist/components/better-carousel/better-carousel.component.d.ts +94 -0
- package/dist/components/better-carousel/better-carousel.component.js +335 -0
- package/dist/components/better-carousel/better-carousel.d.ts +8 -0
- package/dist/components/better-carousel/better-carousel.js +6 -0
- package/dist/components/better-carousel/better-carousel.styles.d.ts +2 -0
- package/dist/components/better-carousel/better-carousel.styles.js +159 -0
- package/dist/components/bottom-drawer/bottom-drawer.component.d.ts +27 -0
- package/dist/components/bottom-drawer/bottom-drawer.component.js +210 -0
- package/dist/components/bottom-drawer/bottom-drawer.d.ts +8 -0
- package/dist/components/bottom-drawer/bottom-drawer.js +6 -0
- package/dist/components/bottom-drawer/bottom-drawer.styles.d.ts +2 -0
- package/dist/components/bottom-drawer/bottom-drawer.styles.js +88 -0
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +6 -0
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.js +35 -0
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.d.ts +8 -0
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.d.ts +2 -0
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.js +48 -0
- package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +6 -0
- package/dist/components/breadcrumbs/breadcrumbs.component.js +28 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +8 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +6 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.d.ts +2 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +14 -0
- package/dist/components/button/button.component.d.ts +29 -0
- package/dist/components/button/button.component.js +156 -0
- package/dist/components/button/button.constants.d.ts +5 -0
- package/dist/components/button/button.constants.js +11 -0
- package/dist/components/button/button.d.ts +8 -0
- package/dist/components/button/button.js +6 -0
- package/dist/components/button/button.styles.d.ts +2 -0
- package/dist/components/button/button.styles.js +356 -0
- package/dist/components/calendar/base/calendar.mixin.d.ts +3 -0
- package/dist/components/calendar/base/calendar.mixin.js +231 -0
- package/dist/components/calendar/base/calendar.styles.d.ts +2 -0
- package/dist/components/calendar/base/calendar.styles.js +122 -0
- package/dist/components/calendar/base/calendar.types.d.ts +21 -0
- package/dist/components/calendar/base/calendar.types.js +1 -0
- package/dist/components/calendar/dual/dual.component.d.ts +11 -0
- package/dist/components/calendar/dual/dual.component.js +93 -0
- package/dist/components/calendar/dual/dual.d.ts +8 -0
- package/dist/components/calendar/dual/dual.js +6 -0
- package/dist/components/calendar/dual/dual.styles.d.ts +2 -0
- package/dist/components/calendar/dual/dual.styles.js +13 -0
- package/dist/components/calendar/month/month.component.d.ts +14 -0
- package/dist/components/calendar/month/month.component.js +83 -0
- package/dist/components/calendar/month/month.d.ts +8 -0
- package/dist/components/calendar/month/month.js +6 -0
- package/dist/components/calendar/month/month.styles.d.ts +2 -0
- package/dist/components/calendar/month/month.styles.js +5 -0
- package/dist/components/calendar/multi/multi.component.d.ts +9 -0
- package/dist/components/calendar/multi/multi.component.js +59 -0
- package/dist/components/calendar/multi/multi.d.ts +8 -0
- package/dist/components/calendar/multi/multi.js +6 -0
- package/dist/components/calendar/multi/multi.styles.d.ts +2 -0
- package/dist/components/calendar/multi/multi.styles.js +23 -0
- package/dist/components/carousel/carousel-item/carousel-item.component.d.ts +18 -0
- package/dist/components/carousel/carousel-item/carousel-item.component.js +84 -0
- package/dist/components/carousel/carousel-item/carousel-item.constants.d.ts +4 -0
- package/dist/components/carousel/carousel-item/carousel-item.constants.js +5 -0
- package/dist/components/carousel/carousel-item/carousel-item.d.ts +8 -0
- package/dist/components/carousel/carousel-item/carousel-item.js +6 -0
- package/dist/components/carousel/carousel-item/carousel-item.styles.d.ts +2 -0
- package/dist/components/carousel/carousel-item/carousel-item.styles.js +86 -0
- package/dist/components/carousel/carousel.component.d.ts +24 -0
- package/dist/components/carousel/carousel.component.js +132 -0
- package/dist/components/carousel/carousel.d.ts +8 -0
- package/dist/components/carousel/carousel.js +6 -0
- package/dist/components/carousel/carousel.styles.d.ts +2 -0
- package/dist/components/carousel/carousel.styles.js +72 -0
- package/dist/components/categories-tree/categories-tree.component.d.ts +15 -0
- package/dist/components/categories-tree/categories-tree.component.js +202 -0
- package/dist/components/categories-tree/categories-tree.d.ts +8 -0
- package/dist/components/categories-tree/categories-tree.js +6 -0
- package/dist/components/categories-tree/categories-tree.styles.d.ts +2 -0
- package/dist/components/categories-tree/categories-tree.styles.js +14 -0
- package/dist/components/category-tag/category-tag.component.d.ts +12 -0
- package/dist/components/category-tag/category-tag.component.js +78 -0
- package/dist/components/category-tag/category-tag.d.ts +8 -0
- package/dist/components/category-tag/category-tag.js +6 -0
- package/dist/components/category-tag/category-tag.styles.d.ts +2 -0
- package/dist/components/category-tag/category-tag.styles.js +99 -0
- package/dist/components/category-tag/category-tag.types.d.ts +8 -0
- package/dist/components/category-tag/category-tag.types.js +1 -0
- package/dist/components/checkbox/checkbox.component.d.ts +13 -0
- package/dist/components/checkbox/checkbox.component.js +68 -0
- package/dist/components/checkbox/checkbox.constants.d.ts +5 -0
- package/dist/components/checkbox/checkbox.constants.js +6 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -0
- package/dist/components/checkbox/checkbox.js +6 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.styles.js +129 -0
- package/dist/components/checkbox-group/checkbox-group.component.d.ts +6 -0
- package/dist/components/checkbox-group/checkbox-group.component.js +14 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +8 -0
- package/dist/components/checkbox-group/checkbox-group.js +6 -0
- package/dist/components/checkbox-group/checkbox-group.styles.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.styles.js +40 -0
- package/dist/components/checkbox-group/checkbox-group.types.d.ts +12 -0
- package/dist/components/checkbox-group/checkbox-group.types.js +1 -0
- package/dist/components/chip/chip.component.d.ts +11 -0
- package/dist/components/chip/chip.component.js +53 -0
- package/dist/components/chip/chip.constants.d.ts +1 -0
- package/dist/components/chip/chip.constants.js +1 -0
- package/dist/components/chip/chip.d.ts +8 -0
- package/dist/components/chip/chip.js +6 -0
- package/dist/components/chip/chip.styles.d.ts +2 -0
- package/dist/components/chip/chip.styles.js +103 -0
- package/dist/components/collect-fida/collect-fida.component.d.ts +11 -0
- package/dist/components/collect-fida/collect-fida.component.js +75 -0
- package/dist/components/collect-fida/collect-fida.d.ts +8 -0
- package/dist/components/collect-fida/collect-fida.js +6 -0
- package/dist/components/collect-fida/collect-fida.styles.d.ts +2 -0
- package/dist/components/collect-fida/collect-fida.styles.js +95 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +162 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +570 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.d.ts +8 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.js +6 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.styles.d.ts +2 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.styles.js +141 -0
- package/dist/components/currencies-list/currencies-list.component.d.ts +15 -0
- package/dist/components/currencies-list/currencies-list.component.js +50 -0
- package/dist/components/currencies-list/currencies-list.d.ts +8 -0
- package/dist/components/currencies-list/currencies-list.js +6 -0
- package/dist/components/currencies-list/currencies-list.styles.d.ts +2 -0
- package/dist/components/currencies-list/currencies-list.styles.js +5 -0
- package/dist/components/dialog/dialog.component.d.ts +69 -0
- package/dist/components/dialog/dialog.component.js +373 -0
- package/dist/components/dialog/dialog.d.ts +8 -0
- package/dist/components/dialog/dialog.js +6 -0
- package/dist/components/dialog/dialog.styles.d.ts +2 -0
- package/dist/components/dialog/dialog.styles.js +264 -0
- package/dist/components/drawer/drawer.component.d.ts +12 -0
- package/dist/components/drawer/drawer.component.js +89 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +6 -0
- package/dist/components/drawer/drawer.styles.d.ts +2 -0
- package/dist/components/drawer/drawer.styles.js +129 -0
- package/dist/components/dropdown/dropdown.component.d.ts +25 -0
- package/dist/components/dropdown/dropdown.component.js +204 -0
- package/dist/components/dropdown/dropdown.d.ts +8 -0
- package/dist/components/dropdown/dropdown.js +6 -0
- package/dist/components/dropdown/dropdown.styles.d.ts +2 -0
- package/dist/components/dropdown/dropdown.styles.js +60 -0
- package/dist/components/expiration-timer/expiration-timer.component.d.ts +12 -0
- package/dist/components/expiration-timer/expiration-timer.component.js +52 -0
- package/dist/components/expiration-timer/expiration-timer.d.ts +8 -0
- package/dist/components/expiration-timer/expiration-timer.js +6 -0
- package/dist/components/expiration-timer/expiration-timer.styles.d.ts +2 -0
- package/dist/components/expiration-timer/expiration-timer.styles.js +37 -0
- package/dist/components/explore-card/explore-card.component.d.ts +11 -0
- package/dist/components/explore-card/explore-card.component.js +48 -0
- package/dist/components/explore-card/explore-card.constants.d.ts +4 -0
- package/dist/components/explore-card/explore-card.constants.js +5 -0
- package/dist/components/explore-card/explore-card.d.ts +8 -0
- package/dist/components/explore-card/explore-card.js +6 -0
- package/dist/components/explore-card/explore-card.styles.d.ts +2 -0
- package/dist/components/explore-card/explore-card.styles.js +71 -0
- package/dist/components/filter-chip/filter-chip.component.d.ts +12 -0
- package/dist/components/filter-chip/filter-chip.component.js +68 -0
- package/dist/components/filter-chip/filter-chip.constants.d.ts +2 -0
- package/dist/components/filter-chip/filter-chip.constants.js +2 -0
- package/dist/components/filter-chip/filter-chip.d.ts +8 -0
- package/dist/components/filter-chip/filter-chip.js +6 -0
- package/dist/components/filter-chip/filter-chip.styles.d.ts +2 -0
- package/dist/components/filter-chip/filter-chip.styles.js +160 -0
- package/dist/components/filters-drawer/filters-drawer.component.d.ts +9 -0
- package/dist/components/filters-drawer/filters-drawer.component.js +55 -0
- package/dist/components/filters-drawer/filters-drawer.d.ts +8 -0
- package/dist/components/filters-drawer/filters-drawer.js +6 -0
- package/dist/components/filters-drawer/filters-drawer.styles.d.ts +2 -0
- package/dist/components/filters-drawer/filters-drawer.styles.js +60 -0
- package/dist/components/flag-icon/flag-icon.component.d.ts +9 -0
- package/dist/components/flag-icon/flag-icon.component.js +45 -0
- package/dist/components/flag-icon/flag-icon.constants.d.ts +1 -0
- package/dist/components/flag-icon/flag-icon.constants.js +371 -0
- package/dist/components/flag-icon/flag-icon.d.ts +8 -0
- package/dist/components/flag-icon/flag-icon.js +6 -0
- package/dist/components/flag-icon/flag-icon.styles.d.ts +2 -0
- package/dist/components/flag-icon/flag-icon.styles.js +16 -0
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.component.d.ts +8 -0
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.component.js +40 -0
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.d.ts +8 -0
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.js +6 -0
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.styles.d.ts +2 -0
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.styles.js +55 -0
- package/dist/components/footer-menu/footer-menu.component.d.ts +5 -0
- package/dist/components/footer-menu/footer-menu.component.js +17 -0
- package/dist/components/footer-menu/footer-menu.d.ts +8 -0
- package/dist/components/footer-menu/footer-menu.js +6 -0
- package/dist/components/footer-menu/footer-menu.styles.d.ts +2 -0
- package/dist/components/footer-menu/footer-menu.styles.js +47 -0
- package/dist/components/icon/icon.component.d.ts +14 -0
- package/dist/components/icon/icon.component.js +104 -0
- package/dist/components/icon/icon.d.ts +8 -0
- package/dist/components/icon/icon.js +6 -0
- package/dist/components/icon/icon.styles.d.ts +2 -0
- package/dist/components/icon/icon.styles.js +43 -0
- package/dist/components/icon/icon.types.d.ts +2 -0
- package/dist/components/icon/icon.types.js +1 -0
- package/dist/components/icon-list/icon-list-item/icon-list-item.component.d.ts +8 -0
- package/dist/components/icon-list/icon-list-item/icon-list-item.component.js +42 -0
- package/dist/components/icon-list/icon-list-item/icon-list-item.d.ts +8 -0
- package/dist/components/icon-list/icon-list-item/icon-list-item.js +6 -0
- package/dist/components/icon-list/icon-list-item/icon-list-item.styles.d.ts +2 -0
- package/dist/components/icon-list/icon-list-item/icon-list-item.styles.js +23 -0
- package/dist/components/icon-list/icon-list.component.d.ts +5 -0
- package/dist/components/icon-list/icon-list.component.js +12 -0
- package/dist/components/icon-list/icon-list.d.ts +8 -0
- package/dist/components/icon-list/icon-list.js +6 -0
- package/dist/components/icon-list/icon-list.styles.d.ts +2 -0
- package/dist/components/icon-list/icon-list.styles.js +15 -0
- package/dist/components/image/image.component.d.ts +83 -0
- package/dist/components/image/image.component.js +301 -0
- package/dist/components/image/image.d.ts +8 -0
- package/dist/components/image/image.js +6 -0
- package/dist/components/image/image.styles.d.ts +2 -0
- package/dist/components/image/image.styles.js +88 -0
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +10 -0
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.js +43 -0
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.d.ts +8 -0
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.js +6 -0
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.d.ts +2 -0
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.js +28 -0
- package/dist/components/image-carousel/image-carousel.component.d.ts +8 -0
- package/dist/components/image-carousel/image-carousel.component.js +36 -0
- package/dist/components/image-carousel/image-carousel.d.ts +8 -0
- package/dist/components/image-carousel/image-carousel.js +6 -0
- package/dist/components/image-carousel/image-carousel.styles.d.ts +2 -0
- package/dist/components/image-carousel/image-carousel.styles.js +72 -0
- package/dist/components/image-chip/image-chip.component.d.ts +8 -0
- package/dist/components/image-chip/image-chip.component.js +33 -0
- package/dist/components/image-chip/image-chip.d.ts +8 -0
- package/dist/components/image-chip/image-chip.js +6 -0
- package/dist/components/image-chip/image-chip.styles.d.ts +2 -0
- package/dist/components/image-chip/image-chip.styles.js +43 -0
- package/dist/components/image-viewer/image-viewer.component.d.ts +49 -0
- package/dist/components/image-viewer/image-viewer.component.js +193 -0
- package/dist/components/image-viewer/image-viewer.d.ts +8 -0
- package/dist/components/image-viewer/image-viewer.js +6 -0
- package/dist/components/image-viewer/image-viewer.styles.d.ts +2 -0
- package/dist/components/image-viewer/image-viewer.styles.js +146 -0
- package/dist/components/input-field/input-field.component.d.ts +54 -0
- package/dist/components/input-field/input-field.component.js +331 -0
- package/dist/components/input-field/input-field.d.ts +8 -0
- package/dist/components/input-field/input-field.js +6 -0
- package/dist/components/input-field/input-field.styles.d.ts +2 -0
- package/dist/components/input-field/input-field.styles.js +274 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +9 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.js +45 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.d.ts +8 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.js +6 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.d.ts +2 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +70 -0
- package/dist/components/itinerary/itinerary.component.d.ts +7 -0
- package/dist/components/itinerary/itinerary.component.js +23 -0
- package/dist/components/itinerary/itinerary.d.ts +8 -0
- package/dist/components/itinerary/itinerary.js +6 -0
- package/dist/components/itinerary/itinerary.styles.d.ts +2 -0
- package/dist/components/itinerary/itinerary.styles.js +15 -0
- package/dist/components/joined-fields/joined-fields.component.d.ts +16 -0
- package/dist/components/joined-fields/joined-fields.component.js +93 -0
- package/dist/components/joined-fields/joined-fields.d.ts +8 -0
- package/dist/components/joined-fields/joined-fields.js +6 -0
- package/dist/components/joined-fields/joined-fields.styles.d.ts +2 -0
- package/dist/components/joined-fields/joined-fields.styles.js +101 -0
- package/dist/components/layout/layout.component.d.ts +10 -0
- package/dist/components/layout/layout.component.js +34 -0
- package/dist/components/layout/layout.d.ts +8 -0
- package/dist/components/layout/layout.js +6 -0
- package/dist/components/layout/layout.styles.d.ts +2 -0
- package/dist/components/layout/layout.styles.js +31 -0
- package/dist/components/list/list-item/list-item.component.d.ts +9 -0
- package/dist/components/list/list-item/list-item.component.js +30 -0
- package/dist/components/list/list-item/list-item.d.ts +8 -0
- package/dist/components/list/list-item/list-item.js +6 -0
- package/dist/components/list/list-item/list-item.styles.d.ts +2 -0
- package/dist/components/list/list-item/list-item.styles.js +34 -0
- package/dist/components/list/list.component.d.ts +6 -0
- package/dist/components/list/list.component.js +25 -0
- package/dist/components/list/list.d.ts +8 -0
- package/dist/components/list/list.js +6 -0
- package/dist/components/list/list.styles.d.ts +2 -0
- package/dist/components/list/list.styles.js +24 -0
- package/dist/components/loading-spinner/loading-spinner.component.d.ts +7 -0
- package/dist/components/loading-spinner/loading-spinner.component.js +22 -0
- package/dist/components/loading-spinner/loading-spinner.d.ts +8 -0
- package/dist/components/loading-spinner/loading-spinner.js +6 -0
- package/dist/components/loading-spinner/loading-spinner.styles.d.ts +2 -0
- package/dist/components/loading-spinner/loading-spinner.styles.js +47 -0
- package/dist/components/loading-spinner/loading-spinner.types.d.ts +1 -0
- package/dist/components/loading-spinner/loading-spinner.types.js +1 -0
- package/dist/components/locales-list/locales-list.component.d.ts +17 -0
- package/dist/components/locales-list/locales-list.component.js +55 -0
- package/dist/components/locales-list/locales-list.constants.d.ts +2 -0
- package/dist/components/locales-list/locales-list.constants.js +370 -0
- package/dist/components/locales-list/locales-list.d.ts +8 -0
- package/dist/components/locales-list/locales-list.js +6 -0
- package/dist/components/locales-list/locales-list.styles.d.ts +2 -0
- package/dist/components/locales-list/locales-list.styles.js +5 -0
- package/dist/components/location-image/location-image.component.d.ts +29 -0
- package/dist/components/location-image/location-image.component.js +135 -0
- package/dist/components/location-image/location-image.d.ts +8 -0
- package/dist/components/location-image/location-image.js +6 -0
- package/dist/components/location-image/location-image.styles.d.ts +2 -0
- package/dist/components/location-image/location-image.styles.js +49 -0
- package/dist/components/locations-results/locations-results.component.d.ts +21 -0
- package/dist/components/locations-results/locations-results.component.js +83 -0
- package/dist/components/locations-results/locations-results.d.ts +8 -0
- package/dist/components/locations-results/locations-results.js +6 -0
- package/dist/components/locations-results/locations-results.styles.d.ts +2 -0
- package/dist/components/locations-results/locations-results.styles.js +64 -0
- package/dist/components/marketing-tag/marketing-tag.component.d.ts +5 -0
- package/dist/components/marketing-tag/marketing-tag.component.js +8 -0
- package/dist/components/marketing-tag/marketing-tag.d.ts +8 -0
- package/dist/components/marketing-tag/marketing-tag.js +6 -0
- package/dist/components/marketing-tag/marketing-tag.styles.d.ts +2 -0
- package/dist/components/marketing-tag/marketing-tag.styles.js +36 -0
- package/dist/components/message-card/message-card.component.d.ts +12 -0
- package/dist/components/message-card/message-card.component.js +56 -0
- package/dist/components/message-card/message-card.d.ts +8 -0
- package/dist/components/message-card/message-card.js +6 -0
- package/dist/components/message-card/message-card.styles.d.ts +2 -0
- package/dist/components/message-card/message-card.styles.js +72 -0
- package/dist/components/message-card/message-card.types.d.ts +1 -0
- package/dist/components/message-card/message-card.types.js +1 -0
- package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +9 -0
- package/dist/components/mobile-menu-item/mobile-menu-item.component.js +43 -0
- package/dist/components/mobile-menu-item/mobile-menu-item.d.ts +8 -0
- package/dist/components/mobile-menu-item/mobile-menu-item.js +6 -0
- package/dist/components/mobile-menu-item/mobile-menu-item.styles.d.ts +2 -0
- package/dist/components/mobile-menu-item/mobile-menu-item.styles.js +46 -0
- package/dist/components/option-group/option-chip/option-chip.component.d.ts +7 -0
- package/dist/components/option-group/option-chip/option-chip.component.js +35 -0
- package/dist/components/option-group/option-chip/option-chip.d.ts +8 -0
- package/dist/components/option-group/option-chip/option-chip.js +6 -0
- package/dist/components/option-group/option-chip/option-chip.styles.d.ts +2 -0
- package/dist/components/option-group/option-chip/option-chip.styles.js +45 -0
- package/dist/components/option-group/option-group.component.d.ts +6 -0
- package/dist/components/option-group/option-group.component.js +31 -0
- package/dist/components/option-group/option-group.d.ts +8 -0
- package/dist/components/option-group/option-group.js +6 -0
- package/dist/components/option-group/option-group.styles.d.ts +2 -0
- package/dist/components/option-group/option-group.styles.js +30 -0
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.component.d.ts +11 -0
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.component.js +81 -0
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.d.ts +8 -0
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.js +6 -0
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.styles.d.ts +2 -0
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.styles.js +107 -0
- package/dist/components/order-confirmation/order-confirmation.component.d.ts +12 -0
- package/dist/components/order-confirmation/order-confirmation.component.js +72 -0
- package/dist/components/order-confirmation/order-confirmation.d.ts +8 -0
- package/dist/components/order-confirmation/order-confirmation.js +6 -0
- package/dist/components/order-confirmation/order-confirmation.styles.d.ts +2 -0
- package/dist/components/order-confirmation/order-confirmation.styles.js +102 -0
- package/dist/components/otp/otp.component.d.ts +24 -0
- package/dist/components/otp/otp.component.js +148 -0
- package/dist/components/otp/otp.d.ts +8 -0
- package/dist/components/otp/otp.js +6 -0
- package/dist/components/otp/otp.styles.d.ts +2 -0
- package/dist/components/otp/otp.styles.js +87 -0
- package/dist/components/otp/otp.utils.d.ts +9 -0
- package/dist/components/otp/otp.utils.js +26 -0
- package/dist/components/overlay/overlay.component.d.ts +13 -0
- package/dist/components/overlay/overlay.component.js +52 -0
- package/dist/components/overlay/overlay.d.ts +8 -0
- package/dist/components/overlay/overlay.js +6 -0
- package/dist/components/overlay/overlay.styles.d.ts +2 -0
- package/dist/components/overlay/overlay.styles.js +39 -0
- package/dist/components/pay-in/pay-in.component.d.ts +10 -0
- package/dist/components/pay-in/pay-in.component.js +52 -0
- package/dist/components/pay-in/pay-in.d.ts +8 -0
- package/dist/components/pay-in/pay-in.js +6 -0
- package/dist/components/pay-in/pay-in.styles.d.ts +2 -0
- package/dist/components/pay-in/pay-in.styles.js +58 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.component.d.ts +16 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.component.js +63 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.d.ts +8 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.js +6 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.styles.d.ts +2 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.styles.js +38 -0
- package/dist/components/payment-option/payment-option.component.d.ts +38 -0
- package/dist/components/payment-option/payment-option.component.js +131 -0
- package/dist/components/payment-option/payment-option.d.ts +8 -0
- package/dist/components/payment-option/payment-option.js +6 -0
- package/dist/components/payment-option/payment-option.styles.d.ts +2 -0
- package/dist/components/payment-option/payment-option.styles.js +206 -0
- package/dist/components/performance-time/performance-time.component.d.ts +9 -0
- package/dist/components/performance-time/performance-time.component.js +47 -0
- package/dist/components/performance-time/performance-time.d.ts +8 -0
- package/dist/components/performance-time/performance-time.js +6 -0
- package/dist/components/performance-time/performance-time.styles.d.ts +2 -0
- package/dist/components/performance-time/performance-time.styles.js +53 -0
- package/dist/components/phone-country-code/phone-country-code.component.d.ts +13 -0
- package/dist/components/phone-country-code/phone-country-code.component.js +53 -0
- package/dist/components/phone-country-code/phone-country-code.d.ts +8 -0
- package/dist/components/phone-country-code/phone-country-code.js +6 -0
- package/dist/components/phone-country-code/phone-country-code.styles.d.ts +2 -0
- package/dist/components/phone-country-code/phone-country-code.styles.js +44 -0
- package/dist/components/phone-country-codes/phone-country-codes.component.d.ts +11 -0
- package/dist/components/phone-country-codes/phone-country-codes.component.js +47 -0
- package/dist/components/phone-country-codes/phone-country-codes.d.ts +8 -0
- package/dist/components/phone-country-codes/phone-country-codes.js +6 -0
- package/dist/components/phone-country-codes/phone-country-codes.styles.d.ts +2 -0
- package/dist/components/phone-country-codes/phone-country-codes.styles.js +21 -0
- package/dist/components/phone-field/phone-field.component.d.ts +53 -0
- package/dist/components/phone-field/phone-field.component.js +200 -0
- package/dist/components/phone-field/phone-field.d.ts +9 -0
- package/dist/components/phone-field/phone-field.js +7 -0
- package/dist/components/phone-field/phone-field.styles.d.ts +2 -0
- package/dist/components/phone-field/phone-field.styles.js +41 -0
- package/dist/components/phone-field/phone-field.types.d.ts +5 -0
- package/dist/components/phone-field/phone-field.types.js +1 -0
- package/dist/components/phone-field/phone-field.utils.d.ts +2 -0
- package/dist/components/phone-field/phone-field.utils.js +7 -0
- package/dist/components/points/points.component.d.ts +9 -0
- package/dist/components/points/points.component.js +36 -0
- package/dist/components/points/points.d.ts +8 -0
- package/dist/components/points/points.js +6 -0
- package/dist/components/points/points.styles.d.ts +2 -0
- package/dist/components/points/points.styles.js +47 -0
- package/dist/components/price/price.component.d.ts +12 -0
- package/dist/components/price/price.component.js +38 -0
- package/dist/components/price/price.d.ts +8 -0
- package/dist/components/price/price.js +6 -0
- package/dist/components/reservation-preview/reservation-preview.component.d.ts +11 -0
- package/dist/components/reservation-preview/reservation-preview.component.js +84 -0
- package/dist/components/reservation-preview/reservation-preview.d.ts +8 -0
- package/dist/components/reservation-preview/reservation-preview.js +6 -0
- package/dist/components/reservation-preview/reservation-preview.styles.d.ts +2 -0
- package/dist/components/reservation-preview/reservation-preview.styles.js +190 -0
- package/dist/components/reservation-preview-item/reservation-preview-item.component.d.ts +7 -0
- package/dist/components/reservation-preview-item/reservation-preview-item.component.js +36 -0
- package/dist/components/reservation-preview-item/reservation-preview-item.d.ts +8 -0
- package/dist/components/reservation-preview-item/reservation-preview-item.js +6 -0
- package/dist/components/reservation-preview-item/reservation-preview-item.styles.d.ts +2 -0
- package/dist/components/reservation-preview-item/reservation-preview-item.styles.js +70 -0
- package/dist/components/reviews/review/review.component.d.ts +9 -0
- package/dist/components/reviews/review/review.component.js +41 -0
- package/dist/components/reviews/review/review.d.ts +8 -0
- package/dist/components/reviews/review/review.js +6 -0
- package/dist/components/reviews/review/review.styles.d.ts +2 -0
- package/dist/components/reviews/review/review.styles.js +45 -0
- package/dist/components/reviews/reviews.component.d.ts +9 -0
- package/dist/components/reviews/reviews.component.js +56 -0
- package/dist/components/reviews/reviews.d.ts +8 -0
- package/dist/components/reviews/reviews.js +6 -0
- package/dist/components/reviews/reviews.styles.d.ts +2 -0
- package/dist/components/reviews/reviews.styles.js +73 -0
- package/dist/components/search-button/search-button.component.d.ts +8 -0
- package/dist/components/search-button/search-button.component.js +37 -0
- package/dist/components/search-button/search-button.d.ts +8 -0
- package/dist/components/search-button/search-button.js +6 -0
- package/dist/components/search-button/search-button.styles.d.ts +2 -0
- package/dist/components/search-button/search-button.styles.js +61 -0
- package/dist/components/search-results-item/search-results-item.d.ts +13 -0
- package/dist/components/search-results-item/search-results-item.js +26 -0
- package/dist/components/seated-selector/seated-selector.component.d.ts +42 -0
- package/dist/components/seated-selector/seated-selector.component.js +321 -0
- package/dist/components/seated-selector/seated-selector.d.ts +8 -0
- package/dist/components/seated-selector/seated-selector.js +6 -0
- package/dist/components/seated-selector/seated-selector.styles.d.ts +2 -0
- package/dist/components/seated-selector/seated-selector.styles.js +84 -0
- package/dist/components/seats-io/seats-io.component.d.ts +27 -0
- package/dist/components/seats-io/seats-io.component.js +162 -0
- package/dist/components/seats-io/seats-io.constants.d.ts +12 -0
- package/dist/components/seats-io/seats-io.constants.js +23 -0
- package/dist/components/seats-io/seats-io.d.ts +8 -0
- package/dist/components/seats-io/seats-io.js +6 -0
- package/dist/components/seats-io/seats-io.styles.d.ts +2 -0
- package/dist/components/seats-io/seats-io.styles.js +15 -0
- package/dist/components/seats-io/seats-io.transform.d.ts +77 -0
- package/dist/components/seats-io/seats-io.transform.js +152 -0
- package/dist/components/select-list/select-list.component.d.ts +19 -0
- package/dist/components/select-list/select-list.component.js +160 -0
- package/dist/components/select-list/select-list.d.ts +8 -0
- package/dist/components/select-list/select-list.js +6 -0
- package/dist/components/select-list/select-list.styles.d.ts +2 -0
- package/dist/components/select-list/select-list.styles.js +46 -0
- package/dist/components/select-list/select-option/select-option.component.d.ts +7 -0
- package/dist/components/select-list/select-option/select-option.component.js +28 -0
- package/dist/components/select-list/select-option/select-option.d.ts +8 -0
- package/dist/components/select-list/select-option/select-option.js +6 -0
- package/dist/components/select-list/select-option/select-option.styles.d.ts +2 -0
- package/dist/components/select-list/select-option/select-option.styles.js +52 -0
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +10 -0
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.js +51 -0
- package/dist/components/selected-tickets-preview/selected-tickets-preview.d.ts +8 -0
- package/dist/components/selected-tickets-preview/selected-tickets-preview.js +6 -0
- package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.d.ts +2 -0
- package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.js +89 -0
- package/dist/components/sort-dropdown/sort-dropdown.component.d.ts +14 -0
- package/dist/components/sort-dropdown/sort-dropdown.component.js +57 -0
- package/dist/components/sort-dropdown/sort-dropdown.d.ts +8 -0
- package/dist/components/sort-dropdown/sort-dropdown.js +6 -0
- package/dist/components/sort-dropdown/sort-dropdown.styles.d.ts +2 -0
- package/dist/components/sort-dropdown/sort-dropdown.styles.js +22 -0
- package/dist/components/sort-list/sort-list.component.d.ts +7 -0
- package/dist/components/sort-list/sort-list.component.js +25 -0
- package/dist/components/sort-list/sort-list.d.ts +8 -0
- package/dist/components/sort-list/sort-list.js +6 -0
- package/dist/components/sort-list/sort-list.styles.d.ts +2 -0
- package/dist/components/sort-list/sort-list.styles.js +17 -0
- package/dist/components/sport-options/sport-option/sport-option.component.d.ts +10 -0
- package/dist/components/sport-options/sport-option/sport-option.component.js +57 -0
- package/dist/components/sport-options/sport-option/sport-option.d.ts +8 -0
- package/dist/components/sport-options/sport-option/sport-option.js +6 -0
- package/dist/components/sport-options/sport-option/sport-option.styles.d.ts +2 -0
- package/dist/components/sport-options/sport-option/sport-option.styles.js +156 -0
- package/dist/components/sport-options/sport-options.component.d.ts +6 -0
- package/dist/components/sport-options/sport-options.component.js +27 -0
- package/dist/components/sport-options/sport-options.d.ts +8 -0
- package/dist/components/sport-options/sport-options.js +6 -0
- package/dist/components/sport-options/sport-options.styles.d.ts +2 -0
- package/dist/components/sport-options/sport-options.styles.js +33 -0
- package/dist/components/star-rating/star-rating.component.d.ts +15 -0
- package/dist/components/star-rating/star-rating.component.js +77 -0
- package/dist/components/star-rating/star-rating.d.ts +8 -0
- package/dist/components/star-rating/star-rating.js +6 -0
- package/dist/components/star-rating/star-rating.styles.d.ts +2 -0
- package/dist/components/star-rating/star-rating.styles.js +49 -0
- package/dist/components/tab/tab.component.d.ts +12 -0
- package/dist/components/tab/tab.component.js +52 -0
- package/dist/components/tab/tab.constants.d.ts +4 -0
- package/dist/components/tab/tab.constants.js +5 -0
- package/dist/components/tab/tab.d.ts +8 -0
- package/dist/components/tab/tab.js +6 -0
- package/dist/components/tab/tab.styles.d.ts +2 -0
- package/dist/components/tab/tab.styles.js +50 -0
- package/dist/components/tab-panel/tab-panel.component.d.ts +9 -0
- package/dist/components/tab-panel/tab-panel.component.js +35 -0
- package/dist/components/tab-panel/tab-panel.d.ts +8 -0
- package/dist/components/tab-panel/tab-panel.js +6 -0
- package/dist/components/tab-panel/tab-panel.styles.d.ts +2 -0
- package/dist/components/tab-panel/tab-panel.styles.js +23 -0
- package/dist/components/tabs/tabs.component.d.ts +19 -0
- package/dist/components/tabs/tabs.component.js +87 -0
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +6 -0
- package/dist/components/tabs/tabs.styles.d.ts +2 -0
- package/dist/components/tabs/tabs.styles.js +32 -0
- package/dist/components/tag/tag.component.d.ts +8 -0
- package/dist/components/tag/tag.component.js +33 -0
- package/dist/components/tag/tag.constants.d.ts +1 -0
- package/dist/components/tag/tag.constants.js +1 -0
- package/dist/components/tag/tag.d.ts +8 -0
- package/dist/components/tag/tag.js +6 -0
- package/dist/components/tag/tag.styles.d.ts +2 -0
- package/dist/components/tag/tag.styles.js +56 -0
- package/dist/components/text-section/text-section.component.d.ts +6 -0
- package/dist/components/text-section/text-section.component.js +31 -0
- package/dist/components/text-section/text-section.d.ts +8 -0
- package/dist/components/text-section/text-section.js +6 -0
- package/dist/components/text-section/text-section.styles.d.ts +2 -0
- package/dist/components/text-section/text-section.styles.js +94 -0
- package/dist/components/time-tag/time-tag.component.d.ts +14 -0
- package/dist/components/time-tag/time-tag.component.js +58 -0
- package/dist/components/time-tag/time-tag.d.ts +8 -0
- package/dist/components/time-tag/time-tag.js +6 -0
- package/dist/components/time-tag/time-tag.styles.d.ts +2 -0
- package/dist/components/time-tag/time-tag.styles.js +41 -0
- package/dist/components/tooltip/tooltip.component.d.ts +19 -0
- package/dist/components/tooltip/tooltip.component.js +124 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +6 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +2 -0
- package/dist/components/tooltip/tooltip.styles.js +79 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.component.d.ts +9 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.component.js +36 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.d.ts +8 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.js +6 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.styles.d.ts +2 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.styles.js +35 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.component.d.ts +9 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.component.js +47 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.d.ts +8 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.js +6 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.styles.d.ts +2 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.styles.js +78 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.component.d.ts +13 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.component.js +74 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.d.ts +8 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.js +6 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.styles.d.ts +2 -0
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.styles.js +40 -0
- package/dist/components/transfer-modal/transfer-modal.component.d.ts +72 -0
- package/dist/components/transfer-modal/transfer-modal.component.js +297 -0
- package/dist/components/transfer-modal/transfer-modal.d.ts +8 -0
- package/dist/components/transfer-modal/transfer-modal.js +6 -0
- package/dist/components/transfer-modal/transfer-modal.styles.d.ts +2 -0
- package/dist/components/transfer-modal/transfer-modal.styles.js +141 -0
- package/dist/containers/basket/basket.component.d.ts +25 -0
- package/dist/containers/basket/basket.component.js +257 -0
- package/dist/containers/basket/basket.d.ts +8 -0
- package/dist/containers/basket/basket.js +6 -0
- package/dist/containers/footer/footer.component.d.ts +8 -0
- package/dist/containers/footer/footer.component.js +65 -0
- package/dist/containers/footer/footer.d.ts +8 -0
- package/dist/containers/footer/footer.js +6 -0
- package/dist/containers/footer/footer.styles.d.ts +2 -0
- package/dist/containers/footer/footer.styles.js +31 -0
- package/dist/containers/navbar/navbar.component.d.ts +102 -0
- package/dist/containers/navbar/navbar.component.js +727 -0
- package/dist/containers/navbar/navbar.d.ts +8 -0
- package/dist/containers/navbar/navbar.js +6 -0
- package/dist/containers/navbar/navbar.styles.d.ts +2 -0
- package/dist/containers/navbar/navbar.styles.js +257 -0
- package/dist/containers/navbar/navbar.utils.d.ts +12 -0
- package/dist/containers/navbar/navbar.utils.js +40 -0
- package/dist/contexts/basket/basket.context.d.ts +4 -0
- package/dist/contexts/basket/basket.context.js +2 -0
- package/dist/contexts/basket/basket.d.ts +8 -0
- package/dist/contexts/basket/basket.js +6 -0
- package/dist/contexts/basket/basket.provider.d.ts +30 -0
- package/dist/contexts/basket/basket.provider.js +218 -0
- package/dist/contexts/basket/basket.styles.d.ts +2 -0
- package/dist/contexts/basket/basket.styles.js +9 -0
- package/dist/contexts/basket/basket.types.d.ts +18 -0
- package/dist/contexts/basket/basket.types.js +1 -0
- package/dist/contexts/client.context.d.ts +5 -0
- package/dist/contexts/client.context.js +2 -0
- package/dist/contexts/current-page.context.d.ts +4 -0
- package/dist/contexts/current-page.context.js +2 -0
- package/dist/contexts/events.context.d.ts +33 -0
- package/dist/contexts/events.context.js +2 -0
- package/dist/contexts/pages.context.d.ts +25 -0
- package/dist/contexts/pages.context.js +1 -0
- package/dist/contexts/properties.context.d.ts +24 -0
- package/dist/contexts/properties.context.js +9 -0
- package/dist/contexts/types.d.ts +16 -0
- package/dist/contexts/types.js +1 -0
- package/dist/contexts/utils.d.ts +1 -0
- package/dist/contexts/utils.js +1 -0
- package/dist/controllers/time-expiration.d.ts +11 -0
- package/dist/controllers/time-expiration.js +31 -0
- package/dist/core/api/api-error.d.ts +20 -0
- package/dist/core/api/api-error.js +27 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +5 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.js +5 -0
- package/dist/core/api/middlewares/booking-session/booking-session.d.ts +2 -0
- package/dist/core/api/middlewares/booking-session/booking-session.js +56 -0
- package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +5 -0
- package/dist/core/api/middlewares/booking-session/booking-session.utils.js +70 -0
- package/dist/core/api/middlewares/error-handler/error-handler.d.ts +6 -0
- package/dist/core/api/middlewares/error-handler/error-handler.js +27 -0
- package/dist/core/api/queries.d.ts +74 -0
- package/dist/core/api/queries.js +120 -0
- package/dist/core/constants/api-version.d.ts +1 -0
- package/dist/core/constants/api-version.js +1 -0
- package/dist/core/currency/constants.d.ts +5 -0
- package/dist/core/currency/constants.js +101 -0
- package/dist/core/currency/index.d.ts +12 -0
- package/dist/core/currency/index.js +6 -0
- package/dist/core/events.d.ts +196 -0
- package/dist/core/events.js +46 -0
- package/dist/core/i18n/date.d.ts +7 -0
- package/dist/core/i18n/date.js +65 -0
- package/dist/core/i18n/locale-codes.d.ts +13 -0
- package/dist/core/i18n/locale-codes.js +52 -0
- package/dist/core/i18n/localization.d.ts +5 -0
- package/dist/core/i18n/localization.js +15 -0
- package/dist/core/images/constants.d.ts +7 -0
- package/dist/core/images/constants.js +7 -0
- package/dist/core/images/filters.d.ts +28 -0
- package/dist/core/images/filters.js +51 -0
- package/dist/core/images/helpers.d.ts +12 -0
- package/dist/core/images/helpers.js +14 -0
- package/dist/core/images/preset-adapter.d.ts +23 -0
- package/dist/core/images/preset-adapter.js +52 -0
- package/dist/core/images/selection.d.ts +45 -0
- package/dist/core/images/selection.js +125 -0
- package/dist/core/images/srcset.d.ts +28 -0
- package/dist/core/images/srcset.js +52 -0
- package/dist/core/images/url.d.ts +23 -0
- package/dist/core/images/url.js +40 -0
- package/dist/core/pages.d.ts +68 -0
- package/dist/core/pages.js +1 -0
- package/dist/core/signals.d.ts +2 -0
- package/dist/core/signals.js +3 -0
- package/dist/core/storybook/argTypes.d.ts +1 -0
- package/dist/core/storybook/argTypes.js +46 -0
- package/dist/core/storybook/cssprops.d.ts +30 -0
- package/dist/core/storybook/cssprops.js +46 -0
- package/dist/core/types/api-errors.d.ts +8 -0
- package/dist/core/types/api-errors.js +1 -0
- package/dist/core/types/basket.d.ts +18 -0
- package/dist/core/types/basket.js +1 -0
- package/dist/core/types/core/base.d.ts +11 -0
- package/dist/core/types/core/base.js +1 -0
- package/dist/core/types/core/category.d.ts +2 -0
- package/dist/core/types/core/category.js +1 -0
- package/dist/core/types/core/currency.d.ts +2 -0
- package/dist/core/types/core/currency.js +1 -0
- package/dist/core/types/core/index.d.ts +6 -0
- package/dist/core/types/core/index.js +1 -0
- package/dist/core/types/core/locale.d.ts +2 -0
- package/dist/core/types/core/locale.js +1 -0
- package/dist/core/types/core/points.d.ts +4 -0
- package/dist/core/types/core/points.js +1 -0
- package/dist/core/types/core/rating.d.ts +1 -0
- package/dist/core/types/core/rating.js +1 -0
- package/dist/core/types/core/sorting.d.ts +2 -0
- package/dist/core/types/core/sorting.js +1 -0
- package/dist/core/types/currencies.d.ts +2 -0
- package/dist/core/types/currencies.js +1 -0
- package/dist/core/types/index.d.ts +6 -0
- package/dist/core/types/index.js +1 -0
- package/dist/core/types/locales.d.ts +4 -0
- package/dist/core/types/locales.js +1 -0
- package/dist/core/types/seats-config.d.ts +13 -0
- package/dist/core/types/seats-config.js +9 -0
- package/dist/core/types/shared.d.ts +1 -0
- package/dist/core/types/shared.js +1 -0
- package/dist/core/utils/datetime.d.ts +77 -0
- package/dist/core/utils/datetime.js +153 -0
- package/dist/core/utils/function.d.ts +4 -0
- package/dist/core/utils/function.js +22 -0
- package/dist/core/utils/html.d.ts +28 -0
- package/dist/core/utils/html.js +78 -0
- package/dist/core/utils/locale.d.ts +3 -0
- package/dist/core/utils/locale.js +3 -0
- package/dist/core/utils/scroll-lock.d.ts +50 -0
- package/dist/core/utils/scroll-lock.js +121 -0
- package/dist/core/utils/text.d.ts +9 -0
- package/dist/core/utils/text.js +50 -0
- package/dist/core/utils/time.d.ts +2 -0
- package/dist/core/utils/time.js +10 -0
- package/dist/custom-elements.json +37289 -0
- package/dist/errors.d.ts +3 -0
- package/dist/errors.js +5 -0
- package/dist/helpers/helpers.d.ts +5 -0
- package/dist/helpers/helpers.js +31 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +14 -0
- package/dist/locales/da-DK.d.ts +261 -0
- package/dist/locales/da-DK.js +273 -0
- package/dist/locales/de-DE.d.ts +261 -0
- package/dist/locales/de-DE.js +273 -0
- package/dist/locales/en-IE.d.ts +261 -0
- package/dist/locales/en-IE.js +273 -0
- package/dist/locales/en-US.d.ts +261 -0
- package/dist/locales/en-US.js +273 -0
- package/dist/locales/es-ES.d.ts +261 -0
- package/dist/locales/es-ES.js +273 -0
- package/dist/locales/fr-FR.d.ts +261 -0
- package/dist/locales/fr-FR.js +273 -0
- package/dist/locales/fr-MA.d.ts +261 -0
- package/dist/locales/fr-MA.js +273 -0
- package/dist/locales/is-IS.d.ts +261 -0
- package/dist/locales/is-IS.js +273 -0
- package/dist/locales/it-IT.d.ts +261 -0
- package/dist/locales/it-IT.js +273 -0
- package/dist/locales/ms-MY.d.ts +261 -0
- package/dist/locales/ms-MY.js +273 -0
- package/dist/locales/nb-NO.d.ts +261 -0
- package/dist/locales/nb-NO.js +273 -0
- package/dist/locales/pl-PL.d.ts +261 -0
- package/dist/locales/pl-PL.js +273 -0
- package/dist/locales/pt-PT.d.ts +261 -0
- package/dist/locales/pt-PT.js +273 -0
- package/dist/locales/sv-SE.d.ts +261 -0
- package/dist/locales/sv-SE.js +273 -0
- package/dist/locales/th-TH.d.ts +261 -0
- package/dist/locales/th-TH.js +273 -0
- package/dist/locales/tr-TR.d.ts +261 -0
- package/dist/locales/tr-TR.js +273 -0
- package/dist/locales/zh-CN.d.ts +261 -0
- package/dist/locales/zh-CN.js +273 -0
- package/dist/mixins/base.mixin.d.ts +22 -0
- package/dist/mixins/base.mixin.js +120 -0
- package/dist/mixins/coinbase.mixin.d.ts +70 -0
- package/dist/mixins/coinbase.mixin.js +979 -0
- package/dist/mixins/error-modal.mixin.d.ts +16 -0
- package/dist/mixins/error-modal.mixin.js +108 -0
- package/dist/mixins/error-modal.styles.d.ts +2 -0
- package/dist/mixins/error-modal.styles.js +81 -0
- package/dist/mixins/location-search/location-search.d.ts +7 -0
- package/dist/mixins/location-search/location-search.js +334 -0
- package/dist/mixins/location-search/location-search.styles.d.ts +2 -0
- package/dist/mixins/location-search/location-search.styles.js +80 -0
- package/dist/mixins/location-search/types.d.ts +10 -0
- package/dist/mixins/location-search/types.js +1 -0
- package/dist/mixins/overlay/overlay-mixin.d.ts +4 -0
- package/dist/mixins/overlay/overlay-mixin.js +86 -0
- package/dist/mixins/overlay/types.d.ts +8 -0
- package/dist/mixins/overlay/types.js +1 -0
- package/dist/mixins/points/points.d.ts +3 -0
- package/dist/mixins/points/points.js +30 -0
- package/dist/mixins/points/types.d.ts +8 -0
- package/dist/mixins/points/types.js +1 -0
- package/dist/mixins/search-mixin/search-mixin.d.ts +4 -0
- package/dist/mixins/search-mixin/search-mixin.js +66 -0
- package/dist/mixins/search-mixin/types.d.ts +7 -0
- package/dist/mixins/search-mixin/types.js +1 -0
- package/dist/sdk/chrome.d.ts +10 -0
- package/dist/sdk/chrome.js +83 -0
- package/dist/sdk/element-adapter.d.ts +16 -0
- package/dist/sdk/element-adapter.js +60 -0
- package/dist/sdk/meta.d.ts +7 -0
- package/dist/sdk/meta.js +9 -0
- package/dist/sdk/mount.d.ts +19 -0
- package/dist/sdk/mount.js +289 -0
- package/dist/sdk/navigation-intent.d.ts +34 -0
- package/dist/sdk/navigation-intent.js +28 -0
- package/dist/sdk/page-registry.d.ts +32 -0
- package/dist/sdk/page-registry.js +84 -0
- package/dist/sdk/redaction.d.ts +11 -0
- package/dist/sdk/redaction.js +61 -0
- package/dist/sdk/theme.d.ts +19 -0
- package/dist/sdk/theme.js +75 -0
- package/dist/sdk/types.d.ts +258 -0
- package/dist/sdk/types.js +1 -0
- package/dist/sdk/url.d.ts +47 -0
- package/dist/sdk/url.js +199 -0
- package/dist/sdk/validation.d.ts +50 -0
- package/dist/sdk/validation.js +318 -0
- package/dist/styles/contrast-fixtures.d.ts +10 -0
- package/dist/styles/contrast-fixtures.js +61 -0
- package/dist/styles/contrast.d.ts +19 -0
- package/dist/styles/contrast.js +100 -0
- package/dist/styles/defaults/component.d.ts +2 -0
- package/dist/styles/defaults/component.js +31 -0
- package/dist/styles/primitives.d.ts +14 -0
- package/dist/styles/primitives.js +68 -0
- package/dist/styles/tokens.css +359 -0
- package/dist/styles/tokens.d.ts +18 -0
- package/dist/styles/tokens.generated.d.ts +1 -0
- package/dist/styles/tokens.generated.js +4 -0
- package/dist/styles/tokens.js +54 -0
- package/dist/styles/tokens.metadata.d.ts +14 -0
- package/dist/styles/tokens.metadata.js +210 -0
- package/dist/views/constants.d.ts +3 -0
- package/dist/views/constants.js +2 -0
- package/dist/views/details-page/details-page.component.d.ts +129 -0
- package/dist/views/details-page/details-page.component.js +1567 -0
- package/dist/views/details-page/details-page.d.ts +8 -0
- package/dist/views/details-page/details-page.js +6 -0
- package/dist/views/details-page/details-page.styles.d.ts +2 -0
- package/dist/views/details-page/details-page.styles.js +558 -0
- package/dist/views/details-page/details-page.utilts.d.ts +40 -0
- package/dist/views/details-page/details-page.utilts.js +188 -0
- package/dist/views/details-page/partials/theater-description/theater-description.component.d.ts +13 -0
- package/dist/views/details-page/partials/theater-description/theater-description.component.js +76 -0
- package/dist/views/details-page/partials/theater-description/theater-description.d.ts +8 -0
- package/dist/views/details-page/partials/theater-description/theater-description.js +6 -0
- package/dist/views/details-page/partials/theater-description/theater-description.styles.d.ts +2 -0
- package/dist/views/details-page/partials/theater-description/theater-description.styles.js +19 -0
- package/dist/views/details-page/partials/tour-description/tour-description.component.d.ts +20 -0
- package/dist/views/details-page/partials/tour-description/tour-description.component.js +155 -0
- package/dist/views/details-page/partials/tour-description/tour-description.d.ts +8 -0
- package/dist/views/details-page/partials/tour-description/tour-description.js +6 -0
- package/dist/views/details-page/partials/tour-description/tour-description.styles.d.ts +2 -0
- package/dist/views/details-page/partials/tour-description/tour-description.styles.js +11 -0
- package/dist/views/help-page/help-page.component.d.ts +74 -0
- package/dist/views/help-page/help-page.component.js +594 -0
- package/dist/views/help-page/help-page.d.ts +8 -0
- package/dist/views/help-page/help-page.fields.d.ts +12 -0
- package/dist/views/help-page/help-page.fields.js +46 -0
- package/dist/views/help-page/help-page.js +6 -0
- package/dist/views/help-page/help-page.styles.d.ts +2 -0
- package/dist/views/help-page/help-page.styles.js +218 -0
- package/dist/views/help-page/help-page.types.d.ts +36 -0
- package/dist/views/help-page/help-page.types.js +1 -0
- package/dist/views/help-page/help-page.utils.d.ts +3 -0
- package/dist/views/help-page/help-page.utils.js +29 -0
- package/dist/views/help-page/help-page.validators.d.ts +7 -0
- package/dist/views/help-page/help-page.validators.js +22 -0
- package/dist/views/landing-page/landing-page.component.d.ts +127 -0
- package/dist/views/landing-page/landing-page.component.js +1003 -0
- package/dist/views/landing-page/landing-page.constants.d.ts +1 -0
- package/dist/views/landing-page/landing-page.constants.js +1 -0
- package/dist/views/landing-page/landing-page.d.ts +8 -0
- package/dist/views/landing-page/landing-page.js +6 -0
- package/dist/views/landing-page/landing-page.styles.d.ts +2 -0
- package/dist/views/landing-page/landing-page.styles.js +109 -0
- package/dist/views/landing-page/landing-page.types.d.ts +7 -0
- package/dist/views/landing-page/landing-page.types.js +1 -0
- package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +71 -0
- package/dist/views/payment-page/controllers/crypto-auth.controller.js +252 -0
- package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +99 -0
- package/dist/views/payment-page/controllers/crypto-transfer.controller.js +288 -0
- package/dist/views/payment-page/controllers/form-validation.controller.d.ts +60 -0
- package/dist/views/payment-page/controllers/form-validation.controller.js +122 -0
- package/dist/views/payment-page/controllers/layout.controller.d.ts +22 -0
- package/dist/views/payment-page/controllers/layout.controller.js +43 -0
- package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +47 -0
- package/dist/views/payment-page/controllers/payment-flow.controller.js +63 -0
- package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +66 -0
- package/dist/views/payment-page/controllers/stripe-payment.controller.js +202 -0
- package/dist/views/payment-page/domain/payment-mappers.d.ts +7 -0
- package/dist/views/payment-page/domain/payment-mappers.js +7 -0
- package/dist/views/payment-page/domain/payment-validators.d.ts +6 -0
- package/dist/views/payment-page/domain/payment-validators.js +6 -0
- package/dist/views/payment-page/domain/recovery-payload.d.ts +8 -0
- package/dist/views/payment-page/domain/recovery-payload.js +7 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +47 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.component.js +247 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.d.ts +8 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.js +6 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.styles.js +77 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +34 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.component.js +165 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.d.ts +8 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.js +6 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.styles.js +27 -0
- package/dist/views/payment-page/partials/confirmation/confirmation.component.d.ts +17 -0
- package/dist/views/payment-page/partials/confirmation/confirmation.component.js +193 -0
- package/dist/views/payment-page/partials/confirmation/confirmation.d.ts +8 -0
- package/dist/views/payment-page/partials/confirmation/confirmation.js +6 -0
- package/dist/views/payment-page/partials/confirmation/confirmation.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/confirmation/confirmation.styles.js +191 -0
- package/dist/views/payment-page/partials/country-field/country-field.component.d.ts +44 -0
- package/dist/views/payment-page/partials/country-field/country-field.component.js +260 -0
- package/dist/views/payment-page/partials/country-field/country-field.d.ts +8 -0
- package/dist/views/payment-page/partials/country-field/country-field.js +6 -0
- package/dist/views/payment-page/partials/country-field/country-field.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/country-field/country-field.styles.js +21 -0
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.component.d.ts +19 -0
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.component.js +108 -0
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.d.ts +8 -0
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.js +6 -0
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.styles.js +21 -0
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.component.d.ts +10 -0
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.component.js +54 -0
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.d.ts +8 -0
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.js +6 -0
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.styles.js +54 -0
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.d.ts +48 -0
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +215 -0
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.d.ts +8 -0
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.js +6 -0
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.styles.js +61 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +104 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.js +522 -0
- package/dist/views/payment-page/partials/stripe/stripe.constants.d.ts +46 -0
- package/dist/views/payment-page/partials/stripe/stripe.constants.js +48 -0
- package/dist/views/payment-page/partials/stripe/stripe.d.ts +8 -0
- package/dist/views/payment-page/partials/stripe/stripe.js +6 -0
- package/dist/views/payment-page/partials/stripe/stripe.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/stripe/stripe.styles.js +102 -0
- package/dist/views/payment-page/partials/stripe/stripe.types.d.ts +72 -0
- package/dist/views/payment-page/partials/stripe/stripe.types.js +4 -0
- package/dist/views/payment-page/partials/stripe/stripe.utils.d.ts +85 -0
- package/dist/views/payment-page/partials/stripe/stripe.utils.js +228 -0
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +22 -0
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.js +65 -0
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.d.ts +8 -0
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.js +6 -0
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.d.ts +2 -0
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +12 -0
- package/dist/views/payment-page/payment-page.component.d.ts +237 -0
- package/dist/views/payment-page/payment-page.component.js +1733 -0
- package/dist/views/payment-page/payment-page.constants.d.ts +38 -0
- package/dist/views/payment-page/payment-page.constants.js +45 -0
- package/dist/views/payment-page/payment-page.d.ts +8 -0
- package/dist/views/payment-page/payment-page.fields.d.ts +162 -0
- package/dist/views/payment-page/payment-page.fields.js +164 -0
- package/dist/views/payment-page/payment-page.js +6 -0
- package/dist/views/payment-page/payment-page.styles.d.ts +2 -0
- package/dist/views/payment-page/payment-page.styles.js +392 -0
- package/dist/views/payment-page/payment-page.types.d.ts +98 -0
- package/dist/views/payment-page/payment-page.types.js +1 -0
- package/dist/views/payment-page/payment-page.utils.d.ts +239 -0
- package/dist/views/payment-page/payment-page.utils.js +906 -0
- package/dist/views/payment-page/payment-page.validation-schema.d.ts +28 -0
- package/dist/views/payment-page/payment-page.validation-schema.js +42 -0
- package/dist/views/payment-page/payment-page.validators.d.ts +56 -0
- package/dist/views/payment-page/payment-page.validators.js +147 -0
- package/dist/views/payment-page/services/payment-api.service.d.ts +104 -0
- package/dist/views/payment-page/services/payment-api.service.js +99 -0
- package/dist/views/search-page/search-page.component.d.ts +61 -0
- package/dist/views/search-page/search-page.component.js +358 -0
- package/dist/views/search-page/search-page.d.ts +8 -0
- package/dist/views/search-page/search-page.js +6 -0
- package/dist/views/search-page/search-page.styles.d.ts +2 -0
- package/dist/views/search-page/search-page.styles.js +81 -0
- package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +33 -0
- package/dist/views/suggestion-widget/suggestion-widget.component.js +111 -0
- package/dist/views/suggestion-widget/suggestion-widget.d.ts +8 -0
- package/dist/views/suggestion-widget/suggestion-widget.js +6 -0
- package/dist/views/suggestion-widget/suggestion-widget.styles.d.ts +2 -0
- package/dist/views/suggestion-widget/suggestion-widget.styles.js +41 -0
- package/package.json +158 -0
|
@@ -0,0 +1,906 @@
|
|
|
1
|
+
import { msg } from "@lit/localize";
|
|
2
|
+
import { apiGet, withErrorHandling } from "../../core/api/queries.js";
|
|
3
|
+
/**
|
|
4
|
+
* Capitalizes the first letter of a string and replaces underscores with spaces
|
|
5
|
+
*/
|
|
6
|
+
export const capitalizeFirstLetter = (str) => {
|
|
7
|
+
if (!str)
|
|
8
|
+
return "";
|
|
9
|
+
return str.charAt(0).toUpperCase() + str.slice(1).replace(/_/g, " ");
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Gets the default phone code selection based on locale.
|
|
13
|
+
* Extracts the country code from the locale (e.g., "en-IE" -> "IE")
|
|
14
|
+
* and finds the matching country. Falls back to first country if no match.
|
|
15
|
+
*/
|
|
16
|
+
export const getDefaultPhoneCode = (countries, locale) => {
|
|
17
|
+
if (!countries || countries.length === 0) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
// Extract country code from locale (e.g., "en-IE" -> "IE", "de-DE" -> "DE")
|
|
21
|
+
const localeCountryCode = locale?.split("-")[1]?.toUpperCase();
|
|
22
|
+
// Try to find the country matching the locale
|
|
23
|
+
let defaultCountry = localeCountryCode
|
|
24
|
+
? countries.find((country) => country.code === localeCountryCode)
|
|
25
|
+
: undefined;
|
|
26
|
+
// Fall back to first available country if locale country not found
|
|
27
|
+
if (!defaultCountry) {
|
|
28
|
+
defaultCountry = countries[0];
|
|
29
|
+
}
|
|
30
|
+
if (defaultCountry) {
|
|
31
|
+
return {
|
|
32
|
+
name: defaultCountry.name || "",
|
|
33
|
+
code: defaultCountry.code || "",
|
|
34
|
+
phoneCode: String(defaultCountry.phone_code || ""),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Gets the value of a field from the form values.
|
|
41
|
+
* Values are automatically trimmed to remove leading/trailing whitespace,
|
|
42
|
+
* which prevents validation errors from the API when fields are autocompleted.
|
|
43
|
+
*/
|
|
44
|
+
export const getFieldValue = (fieldName, formValues) => {
|
|
45
|
+
let value;
|
|
46
|
+
// For reservation fields, get the value from the nested structure if available
|
|
47
|
+
if (fieldName && fieldName.startsWith("reservation_")) {
|
|
48
|
+
const parts = fieldName.split("_");
|
|
49
|
+
const reservationId = parts[1];
|
|
50
|
+
// Check if this is a reservation-level field or a ticket-level field
|
|
51
|
+
if (parts[2] === "ticket") {
|
|
52
|
+
// This is a ticket-level field
|
|
53
|
+
const ticketId = parts[3];
|
|
54
|
+
const field = parts.slice(4).join("_");
|
|
55
|
+
// Check if reservationId, ticketId, and field are defined
|
|
56
|
+
if (reservationId && ticketId && field) {
|
|
57
|
+
// Try to get the value from the nested structure
|
|
58
|
+
if (formValues.reservations &&
|
|
59
|
+
formValues.reservations[reservationId] &&
|
|
60
|
+
formValues.reservations[reservationId][ticketId] &&
|
|
61
|
+
formValues.reservations[reservationId][ticketId][field] !== undefined) {
|
|
62
|
+
value = formValues.reservations[reservationId][ticketId][field];
|
|
63
|
+
return value.trim();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// This is a reservation-level field
|
|
69
|
+
const field = parts.slice(2).join("_");
|
|
70
|
+
// Check if reservationId and field are defined
|
|
71
|
+
if (reservationId && field) {
|
|
72
|
+
// Try to get the value from the nested structure
|
|
73
|
+
if (formValues.reservations &&
|
|
74
|
+
formValues.reservations[reservationId] &&
|
|
75
|
+
formValues.reservations[reservationId].requirements &&
|
|
76
|
+
formValues.reservations[reservationId].requirements[field] !==
|
|
77
|
+
undefined) {
|
|
78
|
+
value = formValues.reservations[reservationId].requirements[field];
|
|
79
|
+
return value.trim();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Fall back to the flat structure
|
|
85
|
+
value = formValues[fieldName] || "";
|
|
86
|
+
return value.trim();
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Handles form value changes and updates the form values object
|
|
90
|
+
*/
|
|
91
|
+
export const handleFormValueChange = (fieldName, value, formValues) => {
|
|
92
|
+
// Create a deep copy of the current formValues
|
|
93
|
+
const newFormValues = { ...formValues };
|
|
94
|
+
// Check if this is a reservation field
|
|
95
|
+
if (fieldName && fieldName.startsWith("reservation_")) {
|
|
96
|
+
// Parse the field name to extract reservation ID, ticket ID (if present), and field name
|
|
97
|
+
const parts = fieldName.split("_");
|
|
98
|
+
const reservationId = parts[1];
|
|
99
|
+
// Check if this is a reservation-level field or a ticket-level field
|
|
100
|
+
if (parts[2] === "ticket") {
|
|
101
|
+
// This is a ticket-level field
|
|
102
|
+
const ticketId = parts[3];
|
|
103
|
+
const field = parts.slice(4).join("_"); // In case the field name contains underscores
|
|
104
|
+
// Check if reservationId and ticketId are defined
|
|
105
|
+
if (reservationId && ticketId && field) {
|
|
106
|
+
// Initialize the reservations object if it doesn't exist
|
|
107
|
+
if (!newFormValues.reservations) {
|
|
108
|
+
newFormValues.reservations = {};
|
|
109
|
+
}
|
|
110
|
+
// Initialize the nested objects if they don't exist
|
|
111
|
+
if (!newFormValues.reservations[reservationId]) {
|
|
112
|
+
newFormValues.reservations[reservationId] = {};
|
|
113
|
+
}
|
|
114
|
+
if (!newFormValues.reservations[reservationId][ticketId]) {
|
|
115
|
+
newFormValues.reservations[reservationId][ticketId] = {};
|
|
116
|
+
}
|
|
117
|
+
// Set the value in the nested structure
|
|
118
|
+
newFormValues.reservations[reservationId][ticketId][field] = value;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// This is a reservation-level field
|
|
123
|
+
const field = parts.slice(2).join("_"); // In case the field name contains underscores
|
|
124
|
+
// Check if reservationId and field are defined
|
|
125
|
+
if (reservationId && field) {
|
|
126
|
+
// Initialize the reservations object if it doesn't exist
|
|
127
|
+
if (!newFormValues.reservations) {
|
|
128
|
+
newFormValues.reservations = {};
|
|
129
|
+
}
|
|
130
|
+
// Initialize the nested objects if they don't exist
|
|
131
|
+
if (!newFormValues.reservations[reservationId]) {
|
|
132
|
+
newFormValues.reservations[reservationId] = {};
|
|
133
|
+
}
|
|
134
|
+
if (!newFormValues.reservations[reservationId].requirements) {
|
|
135
|
+
newFormValues.reservations[reservationId].requirements = {};
|
|
136
|
+
}
|
|
137
|
+
// Set the value in the nested structure
|
|
138
|
+
newFormValues.reservations[reservationId].requirements[field] = value;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// Also keep the flat structure for backward compatibility
|
|
142
|
+
newFormValues[fieldName] = value;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
// For regular fields, use the flat structure
|
|
146
|
+
newFormValues[fieldName] = value;
|
|
147
|
+
}
|
|
148
|
+
return newFormValues;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Checks if the form has a name field requirement
|
|
152
|
+
*/
|
|
153
|
+
export const hasNameField = (data) => {
|
|
154
|
+
if (!data?.general?.requirements)
|
|
155
|
+
return false;
|
|
156
|
+
return data.general.requirements.some((req) => req.field === "first_name" || req.field === "second_name");
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Checks if the form has a first name field requirement
|
|
160
|
+
*/
|
|
161
|
+
export const hasFirstNameField = (data) => {
|
|
162
|
+
if (!data?.general?.requirements)
|
|
163
|
+
return false;
|
|
164
|
+
return data.general.requirements.some((req) => req.field === "first_name");
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Checks if the form has a second name field requirement
|
|
168
|
+
*/
|
|
169
|
+
export const hasSecondNameField = (data) => {
|
|
170
|
+
if (!data?.general?.requirements)
|
|
171
|
+
return false;
|
|
172
|
+
return data.general.requirements.some((req) => req.field === "second_name");
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Checks if the form has a phone field requirement
|
|
176
|
+
*/
|
|
177
|
+
export const hasPhoneField = (data) => {
|
|
178
|
+
if (!data?.general?.requirements)
|
|
179
|
+
return false;
|
|
180
|
+
return data.general.requirements.some((req) => req.field === "phone_number");
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Checks if the form has an email field requirement
|
|
184
|
+
*/
|
|
185
|
+
export const hasEmailField = (data) => {
|
|
186
|
+
if (!data?.general?.requirements)
|
|
187
|
+
return false;
|
|
188
|
+
return data.general.requirements.some((req) => req.field === "email");
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Validates a single field and returns the error message if invalid
|
|
192
|
+
*/
|
|
193
|
+
export const validateField = (fieldName, value, formErrors, FIELDS, required, context) => {
|
|
194
|
+
const newErrors = { ...formErrors };
|
|
195
|
+
// For custom fields from ticket or reservation requirements
|
|
196
|
+
if (fieldName && fieldName.startsWith("reservation_")) {
|
|
197
|
+
// Apply required validator to all requirement fields
|
|
198
|
+
const error = required({ value });
|
|
199
|
+
newErrors[fieldName] = error || "";
|
|
200
|
+
return { isValid: !error, errors: newErrors };
|
|
201
|
+
}
|
|
202
|
+
const fieldConfig = FIELDS[fieldName];
|
|
203
|
+
if (!fieldConfig || !fieldConfig.validators) {
|
|
204
|
+
newErrors[fieldName] = "";
|
|
205
|
+
return { isValid: true, errors: newErrors };
|
|
206
|
+
}
|
|
207
|
+
const error = fieldConfig.validators({ value, context });
|
|
208
|
+
newErrors[fieldName] = error || "";
|
|
209
|
+
return { isValid: !error, errors: newErrors };
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Validates the entire form and returns whether it's valid and updated errors
|
|
213
|
+
* @param shouldValidateBillingAddress - Optional override to control billing address validation.
|
|
214
|
+
* When true, validates billing address fields if required by API.
|
|
215
|
+
* When false, skips billing address validation regardless of API requirements.
|
|
216
|
+
* When undefined, uses the API requirements to determine if validation is needed.
|
|
217
|
+
*/
|
|
218
|
+
export const validateForm = (formValues, formErrors, FIELDS, required, checkData, shouldValidateBillingAddress, contextProvider) => {
|
|
219
|
+
let isValid = true;
|
|
220
|
+
let newErrors = { ...formErrors };
|
|
221
|
+
const validateFieldFn = (fieldName) => {
|
|
222
|
+
// Get the value using the utility function
|
|
223
|
+
const value = getFieldValue(fieldName, formValues);
|
|
224
|
+
const context = contextProvider?.(fieldName);
|
|
225
|
+
// Validate the field
|
|
226
|
+
const result = validateField(fieldName, value, newErrors, FIELDS, required, context);
|
|
227
|
+
newErrors = result.errors;
|
|
228
|
+
if (!result.isValid) {
|
|
229
|
+
isValid = false;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
// Validate only fields that are displayed based on requirements
|
|
233
|
+
if (hasFirstNameField(checkData)) {
|
|
234
|
+
validateFieldFn("first_name");
|
|
235
|
+
}
|
|
236
|
+
if (hasSecondNameField(checkData)) {
|
|
237
|
+
validateFieldFn("second_name");
|
|
238
|
+
}
|
|
239
|
+
if (hasPhoneField(checkData)) {
|
|
240
|
+
validateFieldFn("phone");
|
|
241
|
+
}
|
|
242
|
+
if (hasEmailField(checkData)) {
|
|
243
|
+
validateFieldFn("email");
|
|
244
|
+
}
|
|
245
|
+
// Validate billing address fields only when they are displayed.
|
|
246
|
+
// Defaults to true for backward compatibility, but callers should always pass the parameter.
|
|
247
|
+
const validateBillingAddress = shouldValidateBillingAddress ?? true;
|
|
248
|
+
if (validateBillingAddress) {
|
|
249
|
+
validateFieldFn("addressLine1");
|
|
250
|
+
validateFieldFn("city");
|
|
251
|
+
validateFieldFn("postcode");
|
|
252
|
+
validateFieldFn("country");
|
|
253
|
+
// addressLine2 is optional, so we don't validate it
|
|
254
|
+
}
|
|
255
|
+
// Validate custom fields from ticket requirements
|
|
256
|
+
if (checkData?.reservations) {
|
|
257
|
+
for (const reservation of checkData.reservations) {
|
|
258
|
+
// PP-004: Validate reservation-level requirements (e.g., pickup_point)
|
|
259
|
+
if (reservation.requirements) {
|
|
260
|
+
for (const requirement of reservation.requirements) {
|
|
261
|
+
const fieldName = `reservation_${reservation.id}_${requirement.field}`;
|
|
262
|
+
validateFieldFn(fieldName);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// Validate ticket-level requirements
|
|
266
|
+
if (reservation.tickets) {
|
|
267
|
+
for (const ticket of reservation.tickets) {
|
|
268
|
+
if (ticket.requirements) {
|
|
269
|
+
for (const requirement of ticket.requirements) {
|
|
270
|
+
const fieldName = `reservation_${reservation.id}_ticket_${ticket.id}_${requirement.field}`;
|
|
271
|
+
validateFieldFn(fieldName);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return { isValid, errors: newErrors };
|
|
279
|
+
};
|
|
280
|
+
export { filterCountries } from "../../components/phone-field/phone-field.utils.js";
|
|
281
|
+
/**
|
|
282
|
+
* Finds the country name matching a geolocation code.
|
|
283
|
+
*/
|
|
284
|
+
export const getDefaultCountry = (countries, code) => {
|
|
285
|
+
if (!code || countries.length === 0)
|
|
286
|
+
return "";
|
|
287
|
+
const upperCode = code.toUpperCase();
|
|
288
|
+
const match = countries.find((c) => c.code?.toUpperCase() === upperCode);
|
|
289
|
+
return match?.name || "";
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Calculates the shortest expiration time from reservations
|
|
293
|
+
*/
|
|
294
|
+
export function getShortestExpirationSeconds(reservations) {
|
|
295
|
+
if (!reservations || reservations.length === 0)
|
|
296
|
+
return 0;
|
|
297
|
+
let min = Number.MAX_SAFE_INTEGER;
|
|
298
|
+
for (const reservation of reservations) {
|
|
299
|
+
const exp = reservation.expires_in;
|
|
300
|
+
if (exp > 0 && exp < min) {
|
|
301
|
+
min = exp;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return min === Number.MAX_SAFE_INTEGER ? 0 : min;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Calculates the total ticket quantity from reservations
|
|
308
|
+
*/
|
|
309
|
+
export function getTotalQuantity(reservations) {
|
|
310
|
+
if (!reservations || reservations.length === 0)
|
|
311
|
+
return 0;
|
|
312
|
+
let total = 0;
|
|
313
|
+
for (const reservation of reservations) {
|
|
314
|
+
total += reservation.number_of_tickets || 0;
|
|
315
|
+
}
|
|
316
|
+
return total;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Calculates total price from reservation data
|
|
320
|
+
*/
|
|
321
|
+
export function getTotalPrice(data) {
|
|
322
|
+
if (!data)
|
|
323
|
+
return 0;
|
|
324
|
+
if (typeof data.total_price === "number") {
|
|
325
|
+
return data.total_price;
|
|
326
|
+
}
|
|
327
|
+
if (data.reservations && data.reservations.length > 0) {
|
|
328
|
+
let price = 0;
|
|
329
|
+
for (const reservation of data.reservations) {
|
|
330
|
+
price += reservation.total_price || 0;
|
|
331
|
+
}
|
|
332
|
+
return price;
|
|
333
|
+
}
|
|
334
|
+
return 0;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Prepares customer data from form values
|
|
338
|
+
*/
|
|
339
|
+
export function prepareCustomerData(formValues, selectedPhoneCode, findCountryCode, hasBillingAddressFields) {
|
|
340
|
+
const firstName = getFieldValue("first_name", formValues);
|
|
341
|
+
const secondName = getFieldValue("second_name", formValues);
|
|
342
|
+
const name = getFieldValue("name", formValues);
|
|
343
|
+
const email = getFieldValue("email", formValues);
|
|
344
|
+
const phone = getFieldValue("phone", formValues);
|
|
345
|
+
const phoneCode = selectedPhoneCode?.phoneCode || "";
|
|
346
|
+
const countryName = getFieldValue("country", formValues);
|
|
347
|
+
const countryCode = findCountryCode(countryName);
|
|
348
|
+
const customerData = {
|
|
349
|
+
name: name || `${firstName} ${secondName}`.trim(),
|
|
350
|
+
email,
|
|
351
|
+
phone: phone ? `${phoneCode}${phone}` : undefined,
|
|
352
|
+
address: {
|
|
353
|
+
line1: getFieldValue("addressLine1", formValues),
|
|
354
|
+
line2: getFieldValue("addressLine2", formValues),
|
|
355
|
+
city: getFieldValue("city", formValues),
|
|
356
|
+
postal_code: getFieldValue("postcode", formValues),
|
|
357
|
+
country: countryCode,
|
|
358
|
+
},
|
|
359
|
+
};
|
|
360
|
+
return {
|
|
361
|
+
...customerData,
|
|
362
|
+
address: hasBillingAddressFields ? customerData.address : undefined,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Prepares reservation data with requirements
|
|
367
|
+
*/
|
|
368
|
+
export function prepareReservationData(reservations, getFieldValue) {
|
|
369
|
+
const reservationIds = [];
|
|
370
|
+
const reservationData = {};
|
|
371
|
+
reservations.forEach((reservation) => {
|
|
372
|
+
if (reservation.reservation_id) {
|
|
373
|
+
reservationIds.push(reservation.reservation_id);
|
|
374
|
+
// Handle pickup point if available
|
|
375
|
+
if (reservation.pickup_point) {
|
|
376
|
+
const requirements = {};
|
|
377
|
+
// Add pickup point data to requirements
|
|
378
|
+
Object.entries(reservation.pickup_point).forEach(([key, value]) => {
|
|
379
|
+
if (value) {
|
|
380
|
+
requirements[key] = value;
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
if (Object.keys(requirements).length > 0) {
|
|
384
|
+
reservationData[reservation.reservation_id] = { requirements };
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// Handle attendee information
|
|
388
|
+
if (reservation.tickets?.length) {
|
|
389
|
+
const tickets = [];
|
|
390
|
+
reservation.tickets.forEach((ticket) => {
|
|
391
|
+
const ticketId = ticket.ticket_id;
|
|
392
|
+
const attendeeRequired = ticket.attendee_required || ticket.attendee_filled;
|
|
393
|
+
if (ticketId && attendeeRequired) {
|
|
394
|
+
const ticketRequirements = {};
|
|
395
|
+
// Get attendee information from form values
|
|
396
|
+
const fieldNamePrefix = `reservation_${reservation.reservation_id}_ticket_${ticketId}_`;
|
|
397
|
+
// Common attendee fields
|
|
398
|
+
const attendeeFields = [
|
|
399
|
+
"first_name",
|
|
400
|
+
"second_name",
|
|
401
|
+
"email",
|
|
402
|
+
"phone_number",
|
|
403
|
+
];
|
|
404
|
+
attendeeFields.forEach((field) => {
|
|
405
|
+
const fieldName = `${fieldNamePrefix}${field}`;
|
|
406
|
+
const value = getFieldValue(fieldName);
|
|
407
|
+
if (value) {
|
|
408
|
+
ticketRequirements[field] = value;
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
if (Object.keys(ticketRequirements).length > 0) {
|
|
412
|
+
tickets.push({
|
|
413
|
+
id: ticketId,
|
|
414
|
+
requirements: ticketRequirements,
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
if (tickets.length > 0) {
|
|
420
|
+
if (!reservationData[reservation.reservation_id]) {
|
|
421
|
+
reservationData[reservation.reservation_id] = {};
|
|
422
|
+
}
|
|
423
|
+
reservationData[reservation.reservation_id].tickets = tickets;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
return { reservations: reservationIds, reservationData };
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Prepares attendee data for the attendees field in the PUT request to /reservations
|
|
432
|
+
*/
|
|
433
|
+
export function prepareAttendeesData(reservations, reservationsCheck, getFieldValue, selectedPhoneCode) {
|
|
434
|
+
const attendees = [];
|
|
435
|
+
let hasRequirements = false;
|
|
436
|
+
// Check if reservations are returned from the API check
|
|
437
|
+
if (reservationsCheck?.reservations &&
|
|
438
|
+
reservationsCheck.reservations.length > 0) {
|
|
439
|
+
hasRequirements = true;
|
|
440
|
+
}
|
|
441
|
+
reservations.forEach((reservation) => {
|
|
442
|
+
if (reservation.tickets?.length) {
|
|
443
|
+
reservation.tickets.forEach((ticket) => {
|
|
444
|
+
const ticketId = ticket.ticket_id;
|
|
445
|
+
const attendeeRequired = ticket.attendee_required || ticket.attendee_filled;
|
|
446
|
+
if (ticketId && attendeeRequired) {
|
|
447
|
+
hasRequirements = true;
|
|
448
|
+
const fieldNamePrefix = `reservation_${reservation.reservation_id}_ticket_${ticketId}_`;
|
|
449
|
+
const firstName = getFieldValue(`${fieldNamePrefix}first_name`);
|
|
450
|
+
const secondName = getFieldValue(`${fieldNamePrefix}second_name`);
|
|
451
|
+
const email = getFieldValue(`${fieldNamePrefix}email`);
|
|
452
|
+
const idNumber = getFieldValue(`${fieldNamePrefix}id_number`);
|
|
453
|
+
const gender = getFieldValue(`${fieldNamePrefix}gender`);
|
|
454
|
+
const city = getFieldValue(`${fieldNamePrefix}city`);
|
|
455
|
+
const province = getFieldValue(`${fieldNamePrefix}province`);
|
|
456
|
+
const dateOfBirth = getFieldValue(`${fieldNamePrefix}date_of_birth`);
|
|
457
|
+
// Handle phone number with country code
|
|
458
|
+
const phoneNumberRaw = getFieldValue(`${fieldNamePrefix}phone_number`);
|
|
459
|
+
const countryCode = getFieldValue(`${fieldNamePrefix}country_code`) ||
|
|
460
|
+
selectedPhoneCode?.code;
|
|
461
|
+
// Get dial code (e.g. "353") and prepend to local number
|
|
462
|
+
const phoneCode = getFieldValue(`${fieldNamePrefix}phone_code`) ||
|
|
463
|
+
selectedPhoneCode?.phoneCode ||
|
|
464
|
+
"";
|
|
465
|
+
const fullPhone = phoneCode && phoneNumberRaw
|
|
466
|
+
? `${phoneCode}${phoneNumberRaw}`
|
|
467
|
+
: phoneNumberRaw;
|
|
468
|
+
const phoneNumber = formatPhoneWithPlus(fullPhone);
|
|
469
|
+
const attendee = {
|
|
470
|
+
ticket_id: ticketId,
|
|
471
|
+
first_name: firstName || null,
|
|
472
|
+
second_name: secondName || null,
|
|
473
|
+
email: email || null,
|
|
474
|
+
phone_number: phoneNumber || null,
|
|
475
|
+
id_number: idNumber || null,
|
|
476
|
+
gender: gender || null,
|
|
477
|
+
city: city || null,
|
|
478
|
+
province: province || null,
|
|
479
|
+
country_code: countryCode || null,
|
|
480
|
+
date_of_birth: dateOfBirth || null,
|
|
481
|
+
};
|
|
482
|
+
attendees.push(attendee);
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
return { attendees, hasRequirements };
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Type guard for API errors
|
|
491
|
+
*/
|
|
492
|
+
export const isApiError = (err) => {
|
|
493
|
+
return (typeof err === "object" &&
|
|
494
|
+
err !== null &&
|
|
495
|
+
"errors" in err &&
|
|
496
|
+
typeof err.errors === "object");
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* Extracts a user-safe error message from an unknown error.
|
|
500
|
+
* Returns the fallback message for non-Error objects or errors whose
|
|
501
|
+
* message looks like an internal/SDK string (stack traces, object dumps).
|
|
502
|
+
* Callers should provide a domain-specific fallback.
|
|
503
|
+
*/
|
|
504
|
+
export function sanitizeErrorMessage(error, fallback) {
|
|
505
|
+
if (!(error instanceof Error))
|
|
506
|
+
return fallback;
|
|
507
|
+
const message = error.message;
|
|
508
|
+
// Reject messages that look like internal/SDK details:
|
|
509
|
+
// - Stack traces or file paths
|
|
510
|
+
// - Very long messages (likely JSON dumps or debug info)
|
|
511
|
+
// - Messages containing common internal patterns
|
|
512
|
+
if (!message ||
|
|
513
|
+
message.length > 200 ||
|
|
514
|
+
/\bat\b.*\(/.test(message) ||
|
|
515
|
+
/\/[a-z_-]+\.(js|ts|mjs)/i.test(message) ||
|
|
516
|
+
/^\{/.test(message) ||
|
|
517
|
+
/^\[object /i.test(message)) {
|
|
518
|
+
return fallback;
|
|
519
|
+
}
|
|
520
|
+
return message;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Handles API errors by mapping them to form fields
|
|
524
|
+
*/
|
|
525
|
+
export function mapApiErrorsToForm(error, currentFormErrors, attendees, reservations) {
|
|
526
|
+
if (isApiError(error) && error.errors) {
|
|
527
|
+
const formErrors = { ...currentFormErrors };
|
|
528
|
+
// Map API errors to form fields
|
|
529
|
+
Object.entries(error.errors).forEach(([field, message]) => {
|
|
530
|
+
// Handle attendees validation errors
|
|
531
|
+
if (field === "attendees" && typeof message === "object") {
|
|
532
|
+
// Process each attendee error
|
|
533
|
+
Object.entries(message).forEach(([attendeeIndex, attendeeErrors]) => {
|
|
534
|
+
const index = parseInt(attendeeIndex, 10);
|
|
535
|
+
if (!isNaN(index) && index >= 0 && index < attendees.length) {
|
|
536
|
+
const attendee = attendees[index];
|
|
537
|
+
// Process each field error for this attendee
|
|
538
|
+
Object.entries(attendeeErrors).forEach(([fieldName, fieldErrors]) => {
|
|
539
|
+
// Get the first error message (usually there's only one)
|
|
540
|
+
const errorMessage = Array.isArray(fieldErrors) && fieldErrors.length > 0
|
|
541
|
+
? fieldErrors[0]
|
|
542
|
+
: String(fieldErrors);
|
|
543
|
+
// Only assign if we have a valid error message
|
|
544
|
+
if (errorMessage) {
|
|
545
|
+
// Construct the form field name using the ticket_id from the attendee
|
|
546
|
+
if (attendee && attendee.ticket_id) {
|
|
547
|
+
// Find the reservation_id for this ticket
|
|
548
|
+
for (const reservation of reservations) {
|
|
549
|
+
if (reservation.tickets?.some((ticket) => ticket.ticket_id === attendee.ticket_id)) {
|
|
550
|
+
const formFieldName = `reservation_${reservation.reservation_id}_ticket_${attendee.ticket_id}_${fieldName}`;
|
|
551
|
+
formErrors[formFieldName] = errorMessage;
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
// Handle nested fields like customer.email
|
|
562
|
+
else if (field.includes(".")) {
|
|
563
|
+
const [category, specificField] = field.split(".");
|
|
564
|
+
if (category === "customer" && specificField) {
|
|
565
|
+
formErrors[specificField] = message;
|
|
566
|
+
}
|
|
567
|
+
else if (category === "reservation_data") {
|
|
568
|
+
// Handle reservation-specific errors
|
|
569
|
+
const parts = field.split(".");
|
|
570
|
+
if (parts.length >= 3) {
|
|
571
|
+
const reservationId = parts[1];
|
|
572
|
+
const reservationField = parts[2];
|
|
573
|
+
if (reservationId && reservationField) {
|
|
574
|
+
formErrors[`reservation_${reservationId}_${reservationField}`] =
|
|
575
|
+
message;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
// Handle array messages properly
|
|
582
|
+
const errorMessage = Array.isArray(message) && message.length > 0 && message[0]
|
|
583
|
+
? String(message[0])
|
|
584
|
+
: String(message || "");
|
|
585
|
+
// Map API field names to form field names
|
|
586
|
+
let formFieldName = field;
|
|
587
|
+
if (field === "phone_number") {
|
|
588
|
+
formFieldName = "phone";
|
|
589
|
+
}
|
|
590
|
+
formErrors[formFieldName] = errorMessage;
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
return { formErrors };
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
// Generic error
|
|
597
|
+
return {
|
|
598
|
+
formErrors: currentFormErrors,
|
|
599
|
+
cardError: msg("An error occurred. Please try again."),
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Checks transaction status with exponential backoff.
|
|
605
|
+
* Pass an AbortSignal to cancel polling early (e.g., on component disconnect).
|
|
606
|
+
*/
|
|
607
|
+
export async function pollTransactionStatus(userId, maxAttempts, initialInterval, maxInterval, client, distributorID, locale, onReferenceId, signal) {
|
|
608
|
+
let attempts = 0;
|
|
609
|
+
let currentInterval = initialInterval;
|
|
610
|
+
const checkStatus = async () => {
|
|
611
|
+
try {
|
|
612
|
+
const { data, error } = await withErrorHandling(apiGet({
|
|
613
|
+
client,
|
|
614
|
+
distributorID,
|
|
615
|
+
locale,
|
|
616
|
+
endpoint: "/{api_version}/users/{customer_id}/transactions",
|
|
617
|
+
path: { customer_id: userId },
|
|
618
|
+
}));
|
|
619
|
+
if (error) {
|
|
620
|
+
console.error("Failed to check transaction status");
|
|
621
|
+
return { status: null, tokensToIssue: null };
|
|
622
|
+
}
|
|
623
|
+
if (data && data.length > 0) {
|
|
624
|
+
const transaction = data[0];
|
|
625
|
+
if (!transaction)
|
|
626
|
+
return { status: null, tokensToIssue: null };
|
|
627
|
+
if (transaction.reference_id && onReferenceId) {
|
|
628
|
+
onReferenceId(transaction.reference_id);
|
|
629
|
+
}
|
|
630
|
+
const loyaltyEarn = transaction.loyalty?.earn;
|
|
631
|
+
const tokensToIssue = loyaltyEarn
|
|
632
|
+
? String(Object.values(loyaltyEarn)[0] ?? "")
|
|
633
|
+
: null;
|
|
634
|
+
return { status: transaction.status || null, tokensToIssue };
|
|
635
|
+
}
|
|
636
|
+
return { status: null, tokensToIssue: null };
|
|
637
|
+
}
|
|
638
|
+
catch (err) {
|
|
639
|
+
console.error("Error polling transaction status:", err);
|
|
640
|
+
return { status: null, tokensToIssue: null };
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
return new Promise((resolve) => {
|
|
644
|
+
const poll = async () => {
|
|
645
|
+
if (signal?.aborted) {
|
|
646
|
+
resolve({ status: null, tokensToIssue: null });
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
attempts++;
|
|
650
|
+
const result = await checkStatus();
|
|
651
|
+
if (isFinalStatus(result.status)) {
|
|
652
|
+
resolve(result);
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
if (attempts >= maxAttempts) {
|
|
656
|
+
resolve(result);
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
const nextInterval = Math.min(currentInterval * 2, maxInterval);
|
|
660
|
+
currentInterval = nextInterval;
|
|
661
|
+
setTimeout(poll, currentInterval);
|
|
662
|
+
};
|
|
663
|
+
poll();
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Validates an email address
|
|
668
|
+
*/
|
|
669
|
+
export const isValidEmail = (email) => {
|
|
670
|
+
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
671
|
+
return re.test(email);
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* Validates a wallet email address
|
|
675
|
+
*/
|
|
676
|
+
export const validateWalletEmail = (email) => {
|
|
677
|
+
if (!email) {
|
|
678
|
+
return msg("Email is required");
|
|
679
|
+
}
|
|
680
|
+
if (!isValidEmail(email)) {
|
|
681
|
+
return msg("Please enter a valid email address");
|
|
682
|
+
}
|
|
683
|
+
return "";
|
|
684
|
+
};
|
|
685
|
+
/**
|
|
686
|
+
* ISO-3166-1 alpha-2 pattern (two uppercase letters).
|
|
687
|
+
*/
|
|
688
|
+
const ISO_ALPHA2_REGEX = /^[A-Z]{2}$/;
|
|
689
|
+
/**
|
|
690
|
+
* Deterministic fallback country code when no mapping is found.
|
|
691
|
+
* Stripe PaymentRequest requires a valid ISO code.
|
|
692
|
+
*/
|
|
693
|
+
const DEFAULT_COUNTRY_CODE = "US";
|
|
694
|
+
/**
|
|
695
|
+
* Finds a country code for a country name.
|
|
696
|
+
* PP-007: Returns a strict ISO alpha-2 code — never a raw country name.
|
|
697
|
+
* Falls back to DEFAULT_COUNTRY_CODE when no match is found.
|
|
698
|
+
*/
|
|
699
|
+
export const findCountryCode = (countryName, countries = []) => {
|
|
700
|
+
if (!countryName)
|
|
701
|
+
return "";
|
|
702
|
+
// If already an ISO alpha-2 code, return normalized uppercase
|
|
703
|
+
if (ISO_ALPHA2_REGEX.test(countryName.toUpperCase())) {
|
|
704
|
+
return countryName.toUpperCase();
|
|
705
|
+
}
|
|
706
|
+
const country = countries.find((c) => c.name.toLowerCase() === countryName.toLowerCase());
|
|
707
|
+
if (country?.code)
|
|
708
|
+
return country.code;
|
|
709
|
+
// PP-007: Deterministic fallback instead of returning raw name
|
|
710
|
+
console.warn(`Country "${countryName}" could not be mapped to ISO code, falling back to ${DEFAULT_COUNTRY_CODE}`);
|
|
711
|
+
return DEFAULT_COUNTRY_CODE;
|
|
712
|
+
};
|
|
713
|
+
/**
|
|
714
|
+
* Checks if the component should show specific fields
|
|
715
|
+
*/
|
|
716
|
+
export function getFieldVisibility(data) {
|
|
717
|
+
return {
|
|
718
|
+
hasNameField: hasNameField(data),
|
|
719
|
+
hasFirstNameField: hasFirstNameField(data),
|
|
720
|
+
hasSecondNameField: hasSecondNameField(data),
|
|
721
|
+
hasPhoneField: hasPhoneField(data),
|
|
722
|
+
hasEmailField: hasEmailField(data),
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Gets field configuration from FIELDS or returns a default
|
|
727
|
+
*/
|
|
728
|
+
export function getFieldConfig(fieldName, FIELDS_CONFIG, customField, customType) {
|
|
729
|
+
const labelKey = (customField || fieldName);
|
|
730
|
+
const config = FIELDS_CONFIG[labelKey];
|
|
731
|
+
if (config) {
|
|
732
|
+
return {
|
|
733
|
+
label: config.label(),
|
|
734
|
+
placeholder: config.placeholder ? config.placeholder() : "",
|
|
735
|
+
helpText: config.helpText?.() ?? "",
|
|
736
|
+
type: config.type,
|
|
737
|
+
autocomplete: config.autocomplete,
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
if (customField) {
|
|
741
|
+
return {
|
|
742
|
+
label: capitalizeFirstLetter(customField),
|
|
743
|
+
placeholder: "",
|
|
744
|
+
helpText: "",
|
|
745
|
+
type: customType || "text",
|
|
746
|
+
autocomplete: "off",
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
return null;
|
|
750
|
+
}
|
|
751
|
+
// Stripe error mapping extracted for reuse and testing
|
|
752
|
+
export function mapStripeErrorToField(error) {
|
|
753
|
+
const err = error || {};
|
|
754
|
+
const code = err["code"] || "";
|
|
755
|
+
const param = err["param"] || "";
|
|
756
|
+
const p = param.toLowerCase();
|
|
757
|
+
if (p.includes("cvc") || p.includes("cvv"))
|
|
758
|
+
return "cvc";
|
|
759
|
+
if (p.includes("exp") ||
|
|
760
|
+
p.includes("expiry") ||
|
|
761
|
+
p.includes("exp_month") ||
|
|
762
|
+
p.includes("exp_year"))
|
|
763
|
+
return "expiry";
|
|
764
|
+
if (p.includes("number") ||
|
|
765
|
+
p.includes("card[number]") ||
|
|
766
|
+
p.includes("card_number"))
|
|
767
|
+
return "number";
|
|
768
|
+
const c = code.toLowerCase();
|
|
769
|
+
if (c.includes("cvc"))
|
|
770
|
+
return "cvc";
|
|
771
|
+
if (c.includes("expiry") || c.includes("exp_"))
|
|
772
|
+
return "expiry";
|
|
773
|
+
if (c.includes("number"))
|
|
774
|
+
return "number";
|
|
775
|
+
if (c.includes("card_declined") || c.includes("card_error"))
|
|
776
|
+
return "number";
|
|
777
|
+
return null;
|
|
778
|
+
}
|
|
779
|
+
export function isFinalStatus(status) {
|
|
780
|
+
if (!status)
|
|
781
|
+
return false;
|
|
782
|
+
const FINAL_STATUSES = [
|
|
783
|
+
"PAID",
|
|
784
|
+
"FAILED",
|
|
785
|
+
"REFUNDED",
|
|
786
|
+
"PARTIAL_REFUNDED",
|
|
787
|
+
"CANCELLED",
|
|
788
|
+
"PARTIALLY_CANCELLED",
|
|
789
|
+
];
|
|
790
|
+
return FINAL_STATUSES.includes(status);
|
|
791
|
+
}
|
|
792
|
+
export function extractPaymentIntentId(clientSecret) {
|
|
793
|
+
const parts = clientSecret.split("_secret_");
|
|
794
|
+
return parts[0] || "";
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Formats phone number with a plus prefix if needed.
|
|
798
|
+
* IMPROVED: Validates a phone format before adding a prefix to prevent invalid numbers.
|
|
799
|
+
*
|
|
800
|
+
* @param phone - Phone number to format
|
|
801
|
+
* @returns Formatted phone number with + prefix, or undefined if invalid
|
|
802
|
+
*/
|
|
803
|
+
export function formatPhoneWithPlus(phone) {
|
|
804
|
+
if (!phone)
|
|
805
|
+
return undefined;
|
|
806
|
+
// Remove whitespace and common separators
|
|
807
|
+
const cleaned = phone.replace(/[\s\-().]/g, "");
|
|
808
|
+
// Phone already has + prefix
|
|
809
|
+
if (cleaned.startsWith("+")) {
|
|
810
|
+
// Validate it's not just "+" with no digits
|
|
811
|
+
const digitsOnly = cleaned.slice(1);
|
|
812
|
+
if (!digitsOnly || !/^\d+$/.test(digitsOnly)) {
|
|
813
|
+
console.error("Invalid phone number format");
|
|
814
|
+
return undefined;
|
|
815
|
+
}
|
|
816
|
+
return cleaned;
|
|
817
|
+
}
|
|
818
|
+
// Validate contains only digits before adding a prefix
|
|
819
|
+
if (!/^\d+$/.test(cleaned)) {
|
|
820
|
+
console.error("Phone number contains invalid characters");
|
|
821
|
+
return undefined;
|
|
822
|
+
}
|
|
823
|
+
// Add + prefix
|
|
824
|
+
return `+${cleaned}`;
|
|
825
|
+
}
|
|
826
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
827
|
+
// Pending crypto transfer recovery — validation & integrity
|
|
828
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
829
|
+
/**
|
|
830
|
+
* Ethereum transaction hash format: 0x followed by exactly 64 hex characters.
|
|
831
|
+
*/
|
|
832
|
+
const TX_HASH_REGEX = /^0x[0-9a-fA-F]{64}$/;
|
|
833
|
+
/**
|
|
834
|
+
* Validates an Ethereum transaction hash (0x + 64 hex chars = 66 total).
|
|
835
|
+
*/
|
|
836
|
+
export function isValidTransactionHash(hash) {
|
|
837
|
+
return TX_HASH_REGEX.test(hash);
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Validates a transfer amount is a parseable positive finite number.
|
|
841
|
+
*/
|
|
842
|
+
export function isValidTransferAmount(amount) {
|
|
843
|
+
const n = parseFloat(amount);
|
|
844
|
+
return !isNaN(n) && isFinite(n) && n > 0;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Runtime type guard for PendingTransferPayload.
|
|
848
|
+
* Validates structure, field types, tx hash format, and amount format.
|
|
849
|
+
* Allows missing/empty `checksum` for backward compatibility with entries
|
|
850
|
+
* written before the checksum was added.
|
|
851
|
+
*/
|
|
852
|
+
export function isValidPendingTransferPayload(data) {
|
|
853
|
+
if (data === null || typeof data !== "object")
|
|
854
|
+
return false;
|
|
855
|
+
const obj = data;
|
|
856
|
+
if (typeof obj.transactionHash !== "string")
|
|
857
|
+
return false;
|
|
858
|
+
if (typeof obj.amount !== "string")
|
|
859
|
+
return false;
|
|
860
|
+
if (typeof obj.timestamp !== "number")
|
|
861
|
+
return false;
|
|
862
|
+
if (!isValidTransactionHash(obj.transactionHash))
|
|
863
|
+
return false;
|
|
864
|
+
if (!isValidTransferAmount(obj.amount))
|
|
865
|
+
return false;
|
|
866
|
+
if (!isFinite(obj.timestamp) || obj.timestamp <= 0)
|
|
867
|
+
return false;
|
|
868
|
+
// checksum is optional (legacy entries may not have it)
|
|
869
|
+
if (obj.checksum !== undefined && typeof obj.checksum !== "string") {
|
|
870
|
+
return false;
|
|
871
|
+
}
|
|
872
|
+
return true;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* Computes a SHA-256 hex checksum over the transfer payload fields.
|
|
876
|
+
* Returns empty string if crypto.subtle is unavailable (e.g., non-HTTPS context).
|
|
877
|
+
*/
|
|
878
|
+
export async function computeTransferChecksum(transactionHash, amount, timestamp) {
|
|
879
|
+
try {
|
|
880
|
+
const message = `${transactionHash}:${amount}:${timestamp}`;
|
|
881
|
+
const encoded = new TextEncoder().encode(message);
|
|
882
|
+
const buffer = await crypto.subtle.digest("SHA-256", encoded);
|
|
883
|
+
const hashArray = Array.from(new Uint8Array(buffer));
|
|
884
|
+
return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
885
|
+
}
|
|
886
|
+
catch {
|
|
887
|
+
// crypto.subtle unavailable (e.g., non-HTTPS, older browser) — skip checksum
|
|
888
|
+
return "";
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* Verifies the integrity checksum of a pending transfer payload.
|
|
893
|
+
* PP-006: Hardened — legacy entries without checksums are no longer trusted
|
|
894
|
+
* when crypto.subtle is available. Returns true only if checksums match
|
|
895
|
+
* or crypto.subtle is completely unavailable (cannot verify at all).
|
|
896
|
+
*/
|
|
897
|
+
export async function verifyTransferChecksum(payload) {
|
|
898
|
+
const computed = await computeTransferChecksum(payload.transactionHash, payload.amount, payload.timestamp);
|
|
899
|
+
// If crypto.subtle is unavailable, we cannot verify at all — accept cautiously
|
|
900
|
+
if (!computed)
|
|
901
|
+
return true;
|
|
902
|
+
// PP-006: Reject entries without a checksum when we can verify
|
|
903
|
+
if (!payload.checksum)
|
|
904
|
+
return false;
|
|
905
|
+
return computed === payload.checksum;
|
|
906
|
+
}
|