@coras-io/embed 0.5.1 → 0.6.1

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.
Files changed (375) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +15 -2
  3. package/dist/components/accordion/accordion-item/accordion-item.component.js +9 -3
  4. package/dist/components/accordion/accordion-item/accordion-item.styles.js +4 -0
  5. package/dist/components/accordion/accordion.component.js +8 -0
  6. package/dist/components/alert/alert.component.d.ts +1 -1
  7. package/dist/components/alert/alert.component.js +4 -3
  8. package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +0 -2
  9. package/dist/components/attraction-card/base/attraction-card.mixin.js +0 -6
  10. package/dist/components/attraction-card/base/attraction-card.types.d.ts +0 -1
  11. package/dist/components/basket-mobile/basket-mobile.component.d.ts +14 -3
  12. package/dist/components/basket-mobile/basket-mobile.component.js +71 -15
  13. package/dist/components/better-carousel/better-carousel.component.d.ts +3 -5
  14. package/dist/components/better-carousel/better-carousel.component.js +13 -34
  15. package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.js +5 -12
  16. package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.js +13 -5
  17. package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +0 -1
  18. package/dist/components/breadcrumbs/breadcrumbs.component.js +5 -8
  19. package/dist/components/breadcrumbs/breadcrumbs.styles.js +8 -2
  20. package/dist/components/button/button.constants.d.ts +1 -2
  21. package/dist/components/button/button.constants.js +0 -1
  22. package/dist/components/calendar/base/calendar.mixin.js +5 -1
  23. package/dist/components/calendar/multi/multi.component.d.ts +2 -2
  24. package/dist/components/calendar/multi/multi.component.js +12 -19
  25. package/dist/components/carousel/carousel.component.js +9 -2
  26. package/dist/components/categories-tree/categories-tree.component.d.ts +5 -3
  27. package/dist/components/categories-tree/categories-tree.component.js +22 -21
  28. package/dist/components/checkbox/checkbox.component.js +5 -1
  29. package/dist/components/checkbox-group/checkbox-group.component.js +1 -1
  30. package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
  31. package/dist/components/chip/chip.component.js +8 -3
  32. package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +6 -0
  33. package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +15 -1
  34. package/dist/components/currencies-list/currencies-list.component.js +0 -1
  35. package/dist/components/dialog/dialog.component.js +52 -21
  36. package/dist/components/drawer/drawer.component.d.ts +3 -2
  37. package/dist/components/drawer/drawer.component.js +13 -18
  38. package/dist/components/drawer/drawer.styles.js +5 -2
  39. package/dist/components/dropdown/dropdown.component.js +6 -9
  40. package/dist/components/expiration-timer/expiration-timer.component.d.ts +2 -3
  41. package/dist/components/expiration-timer/expiration-timer.component.js +10 -8
  42. package/dist/components/explore-card/explore-card.component.js +3 -1
  43. package/dist/components/explore-card/explore-card.styles.js +31 -0
  44. package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
  45. package/dist/components/flag-icon/flag-icon.component.d.ts +4 -2
  46. package/dist/components/flag-icon/flag-icon.component.js +16 -4
  47. package/dist/components/icon/icon.component.js +15 -2
  48. package/dist/components/image/image.component.js +4 -3
  49. package/dist/components/image-viewer/image-viewer.component.js +6 -4
  50. package/dist/components/input-field/input-field.component.js +10 -6
  51. package/dist/components/layout/layout.styles.js +1 -1
  52. package/dist/components/locales-list/locales-list.component.js +0 -1
  53. package/dist/components/location-image/location-image.component.d.ts +4 -4
  54. package/dist/components/location-image/location-image.component.js +6 -7
  55. package/dist/components/locations-results/locations-results.component.d.ts +10 -0
  56. package/dist/components/locations-results/locations-results.component.js +22 -15
  57. package/dist/components/locations-results/locations-results.styles.js +4 -1
  58. package/dist/components/message-card/message-card.component.d.ts +1 -1
  59. package/dist/components/message-card/message-card.component.js +4 -3
  60. package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +0 -1
  61. package/dist/components/mobile-menu-item/mobile-menu-item.component.js +14 -16
  62. package/dist/components/mobile-menu-item/mobile-menu-item.styles.js +9 -5
  63. package/dist/components/option-group/option-chip/option-chip.component.d.ts +4 -1
  64. package/dist/components/option-group/option-chip/option-chip.component.js +23 -10
  65. package/dist/components/option-group/option-group.component.d.ts +3 -1
  66. package/dist/components/option-group/option-group.component.js +10 -3
  67. package/dist/components/overlay/overlay.component.d.ts +0 -5
  68. package/dist/components/overlay/overlay.component.js +3 -15
  69. package/dist/components/phone-country-code/phone-country-code.component.d.ts +4 -0
  70. package/dist/components/phone-country-code/phone-country-code.component.js +37 -0
  71. package/dist/components/phone-country-codes/phone-country-codes.component.js +1 -1
  72. package/dist/components/phone-field/phone-field.component.js +2 -2
  73. package/dist/components/search-button/search-button.component.d.ts +1 -1
  74. package/dist/components/search-button/search-button.component.js +13 -7
  75. package/dist/components/seated-selector/seated-selector.component.js +3 -3
  76. package/dist/components/seats-io/seats-io.component.d.ts +3 -2
  77. package/dist/components/seats-io/seats-io.component.js +31 -13
  78. package/dist/components/seats-io/seats-io.constants.d.ts +0 -2
  79. package/dist/components/seats-io/seats-io.constants.js +0 -3
  80. package/dist/components/seats-io/seats-io.transform.d.ts +1 -6
  81. package/dist/components/seats-io/seats-io.transform.js +1 -20
  82. package/dist/components/select-list/select-list.component.js +7 -2
  83. package/dist/components/select-list/select-option/select-option.component.d.ts +3 -1
  84. package/dist/components/select-list/select-option/select-option.component.js +10 -3
  85. package/dist/components/tabs/tabs.component.d.ts +2 -0
  86. package/dist/components/tabs/tabs.component.js +59 -5
  87. package/dist/components/time-tag/time-tag.component.js +1 -1
  88. package/dist/containers/basket/basket.component.d.ts +1 -1
  89. package/dist/containers/basket/basket.component.js +21 -20
  90. package/dist/containers/navbar/navbar.component.d.ts +12 -8
  91. package/dist/containers/navbar/navbar.component.js +108 -62
  92. package/dist/containers/navbar/navbar.styles.js +23 -5
  93. package/dist/containers/navbar/navbar.utils.js +4 -4
  94. package/dist/contexts/basket/basket.provider.d.ts +3 -4
  95. package/dist/contexts/basket/basket.provider.js +46 -61
  96. package/dist/contexts/basket/basket.types.d.ts +0 -2
  97. package/dist/controllers/time-expiration.d.ts +15 -2
  98. package/dist/controllers/time-expiration.js +47 -17
  99. package/dist/core/api/client.d.ts +9 -0
  100. package/dist/core/api/client.js +26 -0
  101. package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +0 -2
  102. package/dist/core/api/middlewares/booking-session/booking-session.constants.js +0 -2
  103. package/dist/core/api/middlewares/booking-session/booking-session.js +3 -12
  104. package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +0 -1
  105. package/dist/core/api/middlewares/booking-session/booking-session.utils.js +6 -28
  106. package/dist/core/api/middlewares/error-handler/error-handler.js +5 -1
  107. package/dist/core/api/middlewares/retry/retry.constants.d.ts +3 -0
  108. package/dist/core/api/middlewares/retry/retry.constants.js +7 -0
  109. package/dist/core/api/middlewares/retry/retry.d.ts +2 -0
  110. package/dist/core/api/middlewares/retry/retry.js +48 -0
  111. package/dist/core/api/queries.d.ts +13 -38
  112. package/dist/core/api/queries.js +16 -99
  113. package/dist/core/events.d.ts +2 -4
  114. package/dist/core/i18n/date.d.ts +14 -5
  115. package/dist/core/i18n/date.js +47 -20
  116. package/dist/core/i18n/localization.js +10 -3
  117. package/dist/core/images/helpers.js +6 -5
  118. package/dist/core/images/srcset.js +2 -2
  119. package/dist/core/logger.d.ts +17 -0
  120. package/dist/core/logger.js +13 -0
  121. package/dist/core/types/api-schema.d.ts +7872 -0
  122. package/dist/core/types/seats-config.d.ts +5 -4
  123. package/dist/core/types/seats-config.js +10 -3
  124. package/dist/core/utils/crypto-address.d.ts +12 -0
  125. package/dist/core/utils/crypto-address.js +17 -0
  126. package/dist/core/utils/datetime.d.ts +13 -11
  127. package/dist/core/utils/datetime.js +41 -51
  128. package/dist/core/utils/loyalty.d.ts +8 -0
  129. package/dist/core/utils/loyalty.js +10 -0
  130. package/dist/core/utils/redaction.d.ts +9 -0
  131. package/dist/core/utils/redaction.js +58 -0
  132. package/dist/core/utils/time.js +2 -3
  133. package/dist/helpers/helpers.d.ts +6 -0
  134. package/dist/helpers/helpers.js +33 -16
  135. package/dist/locales/ar-SA.d.ts +38 -21
  136. package/dist/locales/ar-SA.js +38 -21
  137. package/dist/locales/da-DK.d.ts +38 -21
  138. package/dist/locales/da-DK.js +38 -21
  139. package/dist/locales/de-DE.d.ts +38 -21
  140. package/dist/locales/de-DE.js +38 -21
  141. package/dist/locales/en-IE.d.ts +38 -21
  142. package/dist/locales/en-IE.js +38 -21
  143. package/dist/locales/en-US.d.ts +38 -21
  144. package/dist/locales/en-US.js +38 -21
  145. package/dist/locales/es-ES.d.ts +38 -21
  146. package/dist/locales/es-ES.js +38 -21
  147. package/dist/locales/fr-FR.d.ts +38 -21
  148. package/dist/locales/fr-FR.js +38 -21
  149. package/dist/locales/fr-MA.d.ts +38 -21
  150. package/dist/locales/fr-MA.js +38 -21
  151. package/dist/locales/is-IS.d.ts +38 -21
  152. package/dist/locales/is-IS.js +38 -21
  153. package/dist/locales/it-IT.d.ts +38 -21
  154. package/dist/locales/it-IT.js +38 -21
  155. package/dist/locales/ms-MY.d.ts +38 -21
  156. package/dist/locales/ms-MY.js +38 -21
  157. package/dist/locales/nb-NO.d.ts +38 -21
  158. package/dist/locales/nb-NO.js +38 -21
  159. package/dist/locales/pl-PL.d.ts +38 -21
  160. package/dist/locales/pl-PL.js +38 -21
  161. package/dist/locales/pt-PT.d.ts +38 -21
  162. package/dist/locales/pt-PT.js +38 -21
  163. package/dist/locales/sv-SE.d.ts +38 -21
  164. package/dist/locales/sv-SE.js +38 -21
  165. package/dist/locales/th-TH.d.ts +38 -21
  166. package/dist/locales/th-TH.js +38 -21
  167. package/dist/locales/tr-TR.d.ts +38 -21
  168. package/dist/locales/tr-TR.js +38 -21
  169. package/dist/locales/zh-CN.d.ts +38 -21
  170. package/dist/locales/zh-CN.js +38 -21
  171. package/dist/locales/zh-HK.d.ts +38 -21
  172. package/dist/locales/zh-HK.js +38 -21
  173. package/dist/mixins/base.mixin.d.ts +3 -1
  174. package/dist/mixins/base.mixin.js +10 -7
  175. package/dist/mixins/coinbase.mixin.d.ts +13 -17
  176. package/dist/mixins/coinbase.mixin.js +251 -288
  177. package/dist/mixins/error-modal.mixin.js +8 -4
  178. package/dist/mixins/location-search/location-search.d.ts +13 -1
  179. package/dist/mixins/location-search/location-search.js +35 -27
  180. package/dist/mixins/overlay/overlay-mixin.js +39 -3
  181. package/dist/mixins/overlay/types.d.ts +1 -0
  182. package/dist/mixins/search-mixin/search-mixin.js +8 -5
  183. package/dist/sdk/diagnostics.js +2 -0
  184. package/dist/sdk/mount.d.ts +10 -0
  185. package/dist/sdk/mount.js +20 -1
  186. package/dist/sdk/page-registry.js +5 -0
  187. package/dist/sdk/params.d.ts +53 -0
  188. package/dist/sdk/params.js +180 -0
  189. package/dist/sdk/redaction.d.ts +1 -4
  190. package/dist/sdk/redaction.js +2 -41
  191. package/dist/sdk/types.d.ts +21 -7
  192. package/dist/sdk/url.d.ts +1 -1
  193. package/dist/sdk/url.js +12 -5
  194. package/dist/sdk/validation.d.ts +1 -26
  195. package/dist/sdk/validation.js +8 -145
  196. package/dist/styles/tokens.d.ts +1 -1
  197. package/dist/styles/tokens.generated.d.ts +1 -1
  198. package/dist/styles/tokens.generated.js +1 -1
  199. package/dist/views/chrome-only-page/chrome-only-page.component.d.ts +30 -0
  200. package/dist/views/chrome-only-page/chrome-only-page.component.js +24 -0
  201. package/dist/views/chrome-only-page/chrome-only-page.d.ts +8 -0
  202. package/dist/views/chrome-only-page/chrome-only-page.js +6 -0
  203. package/dist/views/chrome-only-page/chrome-only-page.styles.js +13 -0
  204. package/dist/views/details-page/details-page.component.d.ts +11 -4
  205. package/dist/views/details-page/details-page.component.js +263 -237
  206. package/dist/views/details-page/details-page.utilts.d.ts +63 -3
  207. package/dist/views/details-page/details-page.utilts.js +53 -5
  208. package/dist/views/details-page/partials/location-categories/location-categories.component.d.ts +29 -0
  209. package/dist/views/details-page/partials/location-categories/location-categories.component.js +149 -0
  210. package/dist/views/details-page/partials/location-categories/location-categories.d.ts +8 -0
  211. package/dist/views/details-page/partials/location-categories/location-categories.js +6 -0
  212. package/dist/views/details-page/partials/location-categories/location-categories.styles.js +35 -0
  213. package/dist/views/details-page/partials/location-highlights/location-highlights.component.d.ts +26 -0
  214. package/dist/views/details-page/partials/location-highlights/location-highlights.component.js +158 -0
  215. package/dist/views/details-page/partials/location-highlights/location-highlights.d.ts +8 -0
  216. package/dist/views/details-page/partials/location-highlights/location-highlights.js +6 -0
  217. package/dist/views/details-page/partials/location-highlights/location-highlights.styles.js +42 -0
  218. package/dist/views/details-page/partials/tour-description/tour-description.component.js +1 -4
  219. package/dist/views/help-page/help-page.component.d.ts +2 -0
  220. package/dist/views/help-page/help-page.component.js +37 -18
  221. package/dist/views/help-page/help-page.utils.js +6 -5
  222. package/dist/views/landing-page/landing-page.component.d.ts +5 -8
  223. package/dist/views/landing-page/landing-page.component.js +82 -97
  224. package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +10 -4
  225. package/dist/views/payment-page/controllers/crypto-auth.controller.js +53 -31
  226. package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +9 -5
  227. package/dist/views/payment-page/controllers/crypto-transfer.controller.js +26 -39
  228. package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +6 -1
  229. package/dist/views/payment-page/controllers/payment-flow.controller.js +1 -0
  230. package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +20 -2
  231. package/dist/views/payment-page/controllers/stripe-payment.controller.js +42 -19
  232. package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +2 -0
  233. package/dist/views/payment-page/partials/activity-details/activity-details.component.js +6 -3
  234. package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +2 -0
  235. package/dist/views/payment-page/partials/billing-address/billing-address.component.js +5 -1
  236. package/dist/views/payment-page/partials/confirmation/confirmation.component.js +2 -3
  237. package/dist/views/payment-page/partials/country-field/country-field.component.js +1 -1
  238. package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +3 -3
  239. package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +2 -0
  240. package/dist/views/payment-page/partials/stripe/stripe.component.js +36 -7
  241. package/dist/views/payment-page/partials/stripe/stripe.utils.js +0 -3
  242. package/dist/views/payment-page/payment-page.component.d.ts +39 -6
  243. package/dist/views/payment-page/payment-page.component.js +302 -178
  244. package/dist/views/payment-page/payment-page.constants.d.ts +1 -27
  245. package/dist/views/payment-page/payment-page.constants.js +3 -30
  246. package/dist/views/payment-page/payment-page.types.d.ts +1 -19
  247. package/dist/views/payment-page/payment-page.utils.d.ts +22 -13
  248. package/dist/views/payment-page/payment-page.utils.js +57 -75
  249. package/dist/views/payment-page/services/payment-api.service.d.ts +16 -34
  250. package/dist/views/payment-page/services/payment-api.service.js +19 -27
  251. package/dist/views/search-page/search-page.component.d.ts +2 -0
  252. package/dist/views/search-page/search-page.component.js +39 -20
  253. package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +1 -0
  254. package/dist/views/suggestion-widget/suggestion-widget.component.js +6 -5
  255. package/package.json +24 -20
  256. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +0 -10
  257. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.js +0 -43
  258. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.d.ts +0 -8
  259. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js +0 -6
  260. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.js +0 -23
  261. package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +0 -10
  262. package/dist/components/attraction-discovery/attraction-discovery.component.js +0 -52
  263. package/dist/components/attraction-discovery/attraction-discovery.constants.d.ts +0 -4
  264. package/dist/components/attraction-discovery/attraction-discovery.constants.js +0 -5
  265. package/dist/components/attraction-discovery/attraction-discovery.d.ts +0 -8
  266. package/dist/components/attraction-discovery/attraction-discovery.js +0 -6
  267. package/dist/components/attraction-discovery/attraction-discovery.styles.js +0 -193
  268. package/dist/components/basket-rewards/basket-rewards.component.d.ts +0 -10
  269. package/dist/components/basket-rewards/basket-rewards.component.js +0 -52
  270. package/dist/components/basket-rewards/basket-rewards.d.ts +0 -8
  271. package/dist/components/basket-rewards/basket-rewards.js +0 -6
  272. package/dist/components/basket-rewards/basket-rewards.styles.js +0 -18
  273. package/dist/components/filter-chip/filter-chip.component.d.ts +0 -12
  274. package/dist/components/filter-chip/filter-chip.component.js +0 -68
  275. package/dist/components/filter-chip/filter-chip.constants.d.ts +0 -2
  276. package/dist/components/filter-chip/filter-chip.constants.js +0 -2
  277. package/dist/components/filter-chip/filter-chip.d.ts +0 -8
  278. package/dist/components/filter-chip/filter-chip.js +0 -6
  279. package/dist/components/filter-chip/filter-chip.styles.d.ts +0 -2
  280. package/dist/components/filter-chip/filter-chip.styles.js +0 -162
  281. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +0 -10
  282. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.js +0 -43
  283. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.d.ts +0 -8
  284. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.js +0 -6
  285. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.d.ts +0 -2
  286. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.js +0 -28
  287. package/dist/components/image-carousel/image-carousel.component.d.ts +0 -8
  288. package/dist/components/image-carousel/image-carousel.component.js +0 -36
  289. package/dist/components/image-carousel/image-carousel.d.ts +0 -8
  290. package/dist/components/image-carousel/image-carousel.js +0 -6
  291. package/dist/components/image-carousel/image-carousel.styles.d.ts +0 -2
  292. package/dist/components/image-carousel/image-carousel.styles.js +0 -72
  293. package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +0 -9
  294. package/dist/components/itinerary/itinerary-item/itinerary-item.component.js +0 -45
  295. package/dist/components/itinerary/itinerary-item/itinerary-item.d.ts +0 -8
  296. package/dist/components/itinerary/itinerary-item/itinerary-item.js +0 -6
  297. package/dist/components/itinerary/itinerary-item/itinerary-item.styles.d.ts +0 -2
  298. package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +0 -70
  299. package/dist/components/itinerary/itinerary.component.d.ts +0 -7
  300. package/dist/components/itinerary/itinerary.component.js +0 -23
  301. package/dist/components/itinerary/itinerary.d.ts +0 -8
  302. package/dist/components/itinerary/itinerary.js +0 -6
  303. package/dist/components/itinerary/itinerary.styles.d.ts +0 -2
  304. package/dist/components/itinerary/itinerary.styles.js +0 -15
  305. package/dist/components/marketing-tag/marketing-tag.component.d.ts +0 -5
  306. package/dist/components/marketing-tag/marketing-tag.component.js +0 -8
  307. package/dist/components/marketing-tag/marketing-tag.d.ts +0 -8
  308. package/dist/components/marketing-tag/marketing-tag.js +0 -6
  309. package/dist/components/marketing-tag/marketing-tag.styles.d.ts +0 -2
  310. package/dist/components/marketing-tag/marketing-tag.styles.js +0 -36
  311. package/dist/components/price/price.component.d.ts +0 -12
  312. package/dist/components/price/price.component.js +0 -38
  313. package/dist/components/price/price.d.ts +0 -8
  314. package/dist/components/price/price.js +0 -6
  315. package/dist/components/reviews/review/review.component.d.ts +0 -9
  316. package/dist/components/reviews/review/review.component.js +0 -41
  317. package/dist/components/reviews/review/review.d.ts +0 -8
  318. package/dist/components/reviews/review/review.js +0 -6
  319. package/dist/components/reviews/review/review.styles.d.ts +0 -2
  320. package/dist/components/reviews/review/review.styles.js +0 -45
  321. package/dist/components/reviews/reviews.component.d.ts +0 -9
  322. package/dist/components/reviews/reviews.component.js +0 -56
  323. package/dist/components/reviews/reviews.d.ts +0 -8
  324. package/dist/components/reviews/reviews.js +0 -6
  325. package/dist/components/reviews/reviews.styles.d.ts +0 -2
  326. package/dist/components/reviews/reviews.styles.js +0 -73
  327. package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +0 -10
  328. package/dist/components/selected-tickets-preview/selected-tickets-preview.component.js +0 -51
  329. package/dist/components/selected-tickets-preview/selected-tickets-preview.d.ts +0 -8
  330. package/dist/components/selected-tickets-preview/selected-tickets-preview.js +0 -6
  331. package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.d.ts +0 -2
  332. package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.js +0 -89
  333. package/dist/components/tag/tag.component.d.ts +0 -8
  334. package/dist/components/tag/tag.component.js +0 -33
  335. package/dist/components/tag/tag.constants.d.ts +0 -1
  336. package/dist/components/tag/tag.constants.js +0 -1
  337. package/dist/components/tag/tag.d.ts +0 -8
  338. package/dist/components/tag/tag.js +0 -6
  339. package/dist/components/tag/tag.styles.d.ts +0 -2
  340. package/dist/components/tag/tag.styles.js +0 -56
  341. package/dist/components/tooltip/tooltip.component.d.ts +0 -19
  342. package/dist/components/tooltip/tooltip.component.js +0 -124
  343. package/dist/components/tooltip/tooltip.d.ts +0 -8
  344. package/dist/components/tooltip/tooltip.js +0 -6
  345. package/dist/components/tooltip/tooltip.styles.d.ts +0 -2
  346. package/dist/components/tooltip/tooltip.styles.js +0 -79
  347. package/dist/core/signals.d.ts +0 -2
  348. package/dist/core/signals.js +0 -3
  349. package/dist/core/storybook/argTypes.d.ts +0 -1
  350. package/dist/core/storybook/argTypes.js +0 -46
  351. package/dist/core/storybook/cssprops.d.ts +0 -30
  352. package/dist/core/storybook/cssprops.js +0 -46
  353. package/dist/core/storybook/demo.d.ts +0 -4
  354. package/dist/core/storybook/demo.js +0 -17
  355. package/dist/core/types/api-errors.d.ts +0 -8
  356. package/dist/core/types/api-errors.js +0 -1
  357. package/dist/styles/contrast-fixtures.d.ts +0 -5
  358. package/dist/styles/contrast-fixtures.js +0 -131
  359. package/dist/views/payment-page/domain/payment-mappers.d.ts +0 -7
  360. package/dist/views/payment-page/domain/payment-mappers.js +0 -7
  361. package/dist/views/payment-page/domain/payment-validators.d.ts +0 -6
  362. package/dist/views/payment-page/domain/payment-validators.js +0 -6
  363. package/dist/views/payment-page/domain/recovery-payload.d.ts +0 -8
  364. package/dist/views/payment-page/domain/recovery-payload.js +0 -7
  365. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +0 -22
  366. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.js +0 -65
  367. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.d.ts +0 -8
  368. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.js +0 -6
  369. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.d.ts +0 -2
  370. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +0 -12
  371. package/dist/views/payment-page/payment-page.validation-schema.d.ts +0 -28
  372. package/dist/views/payment-page/payment-page.validation-schema.js +0 -42
  373. /package/dist/{components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.d.ts → views/chrome-only-page/chrome-only-page.styles.d.ts} +0 -0
  374. /package/dist/{components/attraction-discovery/attraction-discovery.styles.d.ts → views/details-page/partials/location-categories/location-categories.styles.d.ts} +0 -0
  375. /package/dist/{components/basket-rewards/basket-rewards.styles.d.ts → views/details-page/partials/location-highlights/location-highlights.styles.d.ts} +0 -0
@@ -6,7 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { LitElement, html } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
- import "../button/button.js";
10
9
  import "../icon/icon.js";
11
10
  import styles from "./mobile-menu-item.styles.js";
12
11
  export class CorasMobileMenuItem extends LitElement {
@@ -16,23 +15,22 @@ export class CorasMobileMenuItem extends LitElement {
16
15
  this.label = "";
17
16
  }
18
17
  static { this.styles = styles; }
18
+ // The whole row is one native button, so it is focusable and Enter/Space
19
+ // activate it. Its click is composed and reaches the host's listeners.
19
20
  render() {
20
- return html `<div class="mobile-menu-item">
21
- <div class="section">
22
- <div class="icon">
21
+ return html `<button class="mobile-menu-item" type="button">
22
+ <span class="section">
23
+ <span class="icon">
23
24
  <slot name="icon"></slot>
24
- </div>
25
- <div class="label">${this.label}</div>
26
- </div>
27
- <div class="button">
28
- <coras-button circle variant="text">
29
- <coras-icon
30
- assets-url="${this.assetsURL}"
31
- icon="chevron-right"
32
- ></coras-icon>
33
- </coras-button>
34
- </div>
35
- </div> `;
25
+ </span>
26
+ <span class="label">${this.label}</span>
27
+ </span>
28
+ <coras-icon
29
+ class="chevron"
30
+ assets-url="${this.assetsURL}"
31
+ icon="chevron-right"
32
+ ></coras-icon>
33
+ </button>`;
36
34
  }
37
35
  }
38
36
  __decorate([
@@ -12,7 +12,13 @@ export default css `
12
12
  align-items: center;
13
13
  justify-content: space-between;
14
14
 
15
- margin: 0 2.75rem;
15
+ width: 100%;
16
+ padding: 0 2.75rem;
17
+ border: 0;
18
+ background: none;
19
+ color: inherit;
20
+ font: inherit;
21
+ text-align: start;
16
22
  cursor: pointer;
17
23
 
18
24
  .section {
@@ -37,10 +43,8 @@ export default css `
37
43
  }
38
44
  }
39
45
 
40
- .button {
41
- coras-icon {
42
- fill: var(--mobile-menu-item-icon-color);
43
- }
46
+ .chevron {
47
+ fill: var(--mobile-menu-item-icon-color);
44
48
  }
45
49
  }
46
50
  `;
@@ -2,6 +2,9 @@ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
2
2
  export declare class CorasOptionChip extends LitElement {
3
3
  static styles: CSSResultGroup;
4
4
  selected: boolean;
5
- protected update(changedProperties: PropertyValues): void;
5
+ private handleKeyDown;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ protected willUpdate(changedProperties: PropertyValues): void;
6
9
  protected render(): import("lit").TemplateResult<1>;
7
10
  }
@@ -11,22 +11,35 @@ export class CorasOptionChip extends LitElement {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.selected = false;
14
+ // Consumers attach their own click handlers, so keyboard activation is
15
+ // translated into a click rather than a separate event.
16
+ this.handleKeyDown = (event) => {
17
+ if (event.key === "Enter" || event.key === " ") {
18
+ event.preventDefault();
19
+ this.click();
20
+ }
21
+ };
14
22
  }
15
23
  static { this.styles = styles; }
16
- update(changedProperties) {
24
+ connectedCallback() {
25
+ super.connectedCallback();
26
+ this.setAttribute("role", "radio");
27
+ if (!this.hasAttribute("tabindex")) {
28
+ this.setAttribute("tabindex", "0");
29
+ }
30
+ this.addEventListener("keydown", this.handleKeyDown);
31
+ }
32
+ disconnectedCallback() {
33
+ this.removeEventListener("keydown", this.handleKeyDown);
34
+ super.disconnectedCallback();
35
+ }
36
+ willUpdate(changedProperties) {
17
37
  if (changedProperties.has("selected")) {
18
- if (this.selected) {
19
- this.setAttribute("checked", "");
20
- }
21
- else {
22
- this.removeAttribute("checked");
23
- }
38
+ this.toggleAttribute("checked", this.selected);
39
+ this.setAttribute("aria-checked", String(this.selected));
24
40
  }
25
- super.update(changedProperties);
26
41
  }
27
42
  render() {
28
- this.setAttribute("role", "radio");
29
- this.setAttribute("aria-checked", this.selected.toString());
30
43
  return html `<slot></slot>`;
31
44
  }
32
45
  }
@@ -1,6 +1,8 @@
1
- import { type CSSResultGroup, LitElement } from "lit";
1
+ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
2
2
  export declare class CorasOptionGroup extends LitElement {
3
3
  static styles: CSSResultGroup;
4
4
  label: string;
5
+ connectedCallback(): void;
6
+ protected willUpdate(changed: PropertyValues): void;
5
7
  render(): import("lit").TemplateResult<1>;
6
8
  }
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html, LitElement } from "lit";
7
+ import { html, LitElement, } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
9
  import { when } from "lit/directives/when.js";
10
10
  import styles from "./option-group.styles.js";
@@ -14,9 +14,16 @@ export class CorasOptionGroup extends LitElement {
14
14
  this.label = "";
15
15
  }
16
16
  static { this.styles = styles; }
17
- render() {
17
+ connectedCallback() {
18
+ super.connectedCallback();
18
19
  this.setAttribute("role", "radiogroup");
19
- this.setAttribute("aria-label", this.label);
20
+ }
21
+ willUpdate(changed) {
22
+ if (changed.has("label")) {
23
+ this.setAttribute("aria-label", this.label);
24
+ }
25
+ }
26
+ render() {
20
27
  return html `
21
28
  ${when(this.label, () => html `<span data-testid="label" class="label">${this.label}</span>`)}
22
29
 
@@ -2,12 +2,7 @@ import { type CSSResultGroup, LitElement } from "lit";
2
2
  export declare class CorasOverlay extends LitElement {
3
3
  static styles: CSSResultGroup;
4
4
  open: boolean;
5
- private overlay;
6
5
  private onAnimationStart;
7
- private animationStartListener;
8
6
  private onAnimationEnd;
9
- private animationEndListener;
10
- firstUpdated(): void;
11
- disconnectedCallback(): void;
12
7
  render(): import("lit").TemplateResult<1>;
13
8
  }
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { LitElement, html } from "lit";
8
- import { property, query } from "lit/decorators.js";
8
+ import { property } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
10
  import { fireInternalEvent } from "../../core/events.js";
11
11
  import styles from "./overlay.styles.js";
@@ -13,8 +13,6 @@ export class CorasOverlay extends LitElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.open = false;
16
- this.animationStartListener = () => this.onAnimationStart();
17
- this.animationEndListener = () => this.onAnimationEnd();
18
16
  }
19
17
  static { this.styles = styles; }
20
18
  onAnimationStart() {
@@ -23,15 +21,6 @@ export class CorasOverlay extends LitElement {
23
21
  onAnimationEnd() {
24
22
  fireInternalEvent(this, "overlay-animation-ended", {});
25
23
  }
26
- firstUpdated() {
27
- this.overlay.addEventListener("animationstart", this.animationStartListener);
28
- this.overlay.addEventListener("animationend", this.animationEndListener);
29
- }
30
- disconnectedCallback() {
31
- super.disconnectedCallback();
32
- this.overlay.removeEventListener("animationstart", this.animationStartListener);
33
- this.overlay.removeEventListener("animationend", this.animationEndListener);
34
- }
35
24
  render() {
36
25
  const classes = {
37
26
  overlay: true,
@@ -41,12 +30,11 @@ export class CorasOverlay extends LitElement {
41
30
  class=${classMap(classes)}
42
31
  part="overlay"
43
32
  tabindex="-1"
33
+ @animationstart=${this.onAnimationStart}
34
+ @animationend=${this.onAnimationEnd}
44
35
  ></div>`;
45
36
  }
46
37
  }
47
38
  __decorate([
48
39
  property({ type: Boolean })
49
40
  ], CorasOverlay.prototype, "open", void 0);
50
- __decorate([
51
- query(".overlay")
52
- ], CorasOverlay.prototype, "overlay", void 0);
@@ -8,6 +8,10 @@ export declare class CorasPhoneCountryCode extends LitElement {
8
8
  name: string;
9
9
  code: string;
10
10
  phoneCode: string;
11
+ private handleKeyDown;
12
+ private focusSibling;
13
+ connectedCallback(): void;
14
+ disconnectedCallback(): void;
11
15
  private handleItemClick;
12
16
  render(): import("lit").TemplateResult<1>;
13
17
  }
@@ -18,8 +18,45 @@ export class CorasPhoneCountryCode extends LitElement {
18
18
  this.name = "";
19
19
  this.code = "";
20
20
  this.phoneCode = "";
21
+ // Rows are rendered as siblings by the virtualised list, so arrow keys walk
22
+ // the neighbouring rows the same way select-list walks its options.
23
+ this.handleKeyDown = (event) => {
24
+ switch (event.key) {
25
+ case "Enter":
26
+ case " ":
27
+ event.preventDefault();
28
+ this.handleItemClick();
29
+ break;
30
+ case "ArrowDown":
31
+ event.preventDefault();
32
+ this.focusSibling("nextElementSibling");
33
+ break;
34
+ case "ArrowUp":
35
+ event.preventDefault();
36
+ this.focusSibling("previousElementSibling");
37
+ break;
38
+ }
39
+ };
21
40
  }
22
41
  static { this.styles = styles; }
42
+ focusSibling(direction) {
43
+ const sibling = this[direction];
44
+ if (sibling instanceof CorasPhoneCountryCode) {
45
+ sibling.focus();
46
+ }
47
+ }
48
+ connectedCallback() {
49
+ super.connectedCallback();
50
+ this.setAttribute("role", "option");
51
+ if (!this.hasAttribute("tabindex")) {
52
+ this.setAttribute("tabindex", "0");
53
+ }
54
+ this.addEventListener("keydown", this.handleKeyDown);
55
+ }
56
+ disconnectedCallback() {
57
+ this.removeEventListener("keydown", this.handleKeyDown);
58
+ super.disconnectedCallback();
59
+ }
23
60
  handleItemClick() {
24
61
  fireInternalEvent(this, "code-selected", {
25
62
  name: this.name,
@@ -28,7 +28,7 @@ export class CorasPhoneCountryCodes extends LitElement {
28
28
  static { this.styles = styles; }
29
29
  render() {
30
30
  return html `
31
- <div class="container">
31
+ <div class="container" role="listbox">
32
32
  ${virtualize({
33
33
  items: this.items,
34
34
  renderItem: this.renderItem,
@@ -61,7 +61,7 @@ let CorasPhoneField = class CorasPhoneField extends LitElement {
61
61
  e.stopPropagation();
62
62
  this._dropdownOpen = !this._dropdownOpen;
63
63
  if (this._dropdownOpen) {
64
- this.updateComplete.then(async () => {
64
+ void this.updateComplete.then(async () => {
65
65
  this._searchField?.focus({ preventScroll: true });
66
66
  await this._dropdown?.updateComplete;
67
67
  this.scrollIntoView({ block: "start", behavior: "smooth" });
@@ -76,7 +76,7 @@ let CorasPhoneField = class CorasPhoneField extends LitElement {
76
76
  this._dropdownOpen = false;
77
77
  this._searchQuery = "";
78
78
  fireInternalEvent(this, "phone-code-selected", e.detail);
79
- this.updateComplete.then(() => {
79
+ void this.updateComplete.then(() => {
80
80
  this._phoneField?.focus();
81
81
  });
82
82
  }
@@ -3,6 +3,6 @@ import "../icon/icon.js";
3
3
  export declare class CorasSearchButton extends LitElement {
4
4
  static styles: CSSResultGroup;
5
5
  assetsURL: string;
6
- isDisabled: boolean;
6
+ disabled: boolean;
7
7
  render(): import("lit").TemplateResult<1>;
8
8
  }
@@ -4,34 +4,40 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ import { localized, msg } from "@lit/localize";
7
8
  import { LitElement, html } from "lit";
8
9
  import { property } from "lit/decorators.js";
9
10
  import "../icon/icon.js";
10
11
  import styles from "./search-button.styles.js";
11
- export class CorasSearchButton extends LitElement {
12
+ let CorasSearchButton = class CorasSearchButton extends LitElement {
12
13
  constructor() {
13
14
  super(...arguments);
14
15
  this.assetsURL = "";
15
- this.isDisabled = false;
16
+ this.disabled = false;
16
17
  }
17
18
  static { this.styles = styles; }
18
19
  render() {
19
20
  return html `<button
20
21
  part="base"
21
- ?disabled=${this.isDisabled}
22
- aria-disabled=${this.isDisabled ? "true" : "false"}
22
+ type="button"
23
+ ?disabled=${this.disabled}
24
+ aria-disabled=${this.disabled ? "true" : "false"}
23
25
  >
24
26
  <coras-icon
25
- slot="prefix"
26
27
  assets-url="${this.assetsURL}"
27
28
  icon="search"
29
+ label=${msg("Search")}
28
30
  ></coras-icon>
29
31
  </button>`;
30
32
  }
31
- }
33
+ };
32
34
  __decorate([
33
35
  property({ type: String, attribute: "assets-url" })
34
36
  ], CorasSearchButton.prototype, "assetsURL", void 0);
35
37
  __decorate([
36
38
  property({ type: Boolean })
37
- ], CorasSearchButton.prototype, "isDisabled", void 0);
39
+ ], CorasSearchButton.prototype, "disabled", void 0);
40
+ CorasSearchButton = __decorate([
41
+ localized()
42
+ ], CorasSearchButton);
43
+ export { CorasSearchButton };
@@ -9,7 +9,7 @@ import { property, state } from "lit/decorators.js";
9
9
  import { Task, TaskStatus } from "@lit/task";
10
10
  import { consume } from "@lit/context";
11
11
  import { localized, msg, str } from "@lit/localize";
12
- import { apiGet, withErrorHandling } from "../../core/api/queries.js";
12
+ import { apiGet } from "../../core/api/queries.js";
13
13
  import { clientContext } from "../../contexts/client.context.js";
14
14
  import { currencyContext, distributorIdContext, localeContext, } from "../../contexts/properties.context.js";
15
15
  import { map } from "lit/directives/map.js";
@@ -59,7 +59,7 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
59
59
  if (!client || !attractionId || !instanceId) {
60
60
  return null;
61
61
  }
62
- const { data } = await withErrorHandling(apiGet({
62
+ const { data } = await apiGet({
63
63
  client,
64
64
  distributorID,
65
65
  locale,
@@ -69,7 +69,7 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
69
69
  instance_id: instanceId,
70
70
  },
71
71
  query: { currency },
72
- }));
72
+ });
73
73
  return data ?? null;
74
74
  },
75
75
  args: () => [
@@ -2,6 +2,7 @@ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
2
2
  import type { Language } from "@seatsio/seatsio-types";
3
3
  import type { SupportedCurrencies } from "../../core/types/index.js";
4
4
  import type { SeatsChartData } from "./seats-io.transform.js";
5
+ export declare const loadSeatsioScript: (url: string) => Promise<void>;
5
6
  export declare class CorasSeatsIO extends LitElement {
6
7
  static styles: CSSResultGroup;
7
8
  region: string;
@@ -19,11 +20,11 @@ export declare class CorasSeatsIO extends LitElement {
19
20
  private renderedScheme;
20
21
  private eventsCallbacks;
21
22
  private getConfig;
22
- private loadSeatsio;
23
23
  private getSeatsio;
24
24
  private renderSeatsMap;
25
25
  private getCdnUrl;
26
- updated(changed: PropertyValues): Promise<void>;
26
+ updated(changed: PropertyValues): void;
27
+ private rebuildChartIfNeeded;
27
28
  disconnectedCallback(): void;
28
29
  render(): import("lit").TemplateResult<1>;
29
30
  }
@@ -11,6 +11,27 @@ import { ColorSchemeController } from "../../core/color-scheme.js";
11
11
  import { convertToLocaleCurrency } from "../../core/currency/index.js";
12
12
  import { SEATS_IO_DEFAULTS } from "./seats-io.constants.js";
13
13
  import styles from "./seats-io.styles.js";
14
+ // One in-flight load per chart bundle URL, shared by every element on the
15
+ // page, so two charts mounting together inject one script tag. A failed load
16
+ // is forgotten so a later mount can try again.
17
+ const seatsioScriptLoads = new Map();
18
+ export const loadSeatsioScript = (url) => {
19
+ let load = seatsioScriptLoads.get(url);
20
+ if (!load) {
21
+ load = new Promise((resolve, reject) => {
22
+ const script = document.createElement("script");
23
+ script.onload = () => resolve();
24
+ script.onerror = () => {
25
+ seatsioScriptLoads.delete(url);
26
+ reject(new Error(`Could not load ${url}`));
27
+ };
28
+ script.src = url;
29
+ document.head.appendChild(script);
30
+ });
31
+ seatsioScriptLoads.set(url, load);
32
+ }
33
+ return load;
34
+ };
14
35
  export class CorasSeatsIO extends LitElement {
15
36
  constructor() {
16
37
  super(...arguments);
@@ -97,20 +118,9 @@ export class CorasSeatsIO extends LitElement {
97
118
  };
98
119
  return config;
99
120
  }
100
- loadSeatsio() {
101
- return new Promise((resolve, reject) => {
102
- const script = document.createElement("script");
103
- script.onload = () => {
104
- resolve(void 0);
105
- };
106
- script.onerror = () => reject(`Could not load ${script.src}`);
107
- script.src = this.getCdnUrl();
108
- document.head.appendChild(script);
109
- });
110
- }
111
121
  getSeatsio() {
112
122
  if (typeof seatsio === "undefined") {
113
- return this.loadSeatsio();
123
+ return loadSeatsioScript(this.getCdnUrl());
114
124
  }
115
125
  else {
116
126
  return Promise.resolve();
@@ -124,8 +134,11 @@ export class CorasSeatsIO extends LitElement {
124
134
  this.seatsioInstance = new seatsio.SeatingChart(config);
125
135
  this.seatsioInstance.render();
126
136
  }
127
- async updated(changed) {
137
+ updated(changed) {
128
138
  super.updated(changed);
139
+ void this.rebuildChartIfNeeded(changed);
140
+ }
141
+ async rebuildChartIfNeeded(changed) {
129
142
  // Everything below is baked into the chart at construction, so a change to
130
143
  // any of it needs a rebuild, not a prop update the running chart ignores.
131
144
  // The scheme is not a Lit property (the controller drives it), so compare it
@@ -143,6 +156,11 @@ export class CorasSeatsIO extends LitElement {
143
156
  this.renderedScheme = this.colorScheme.scheme;
144
157
  try {
145
158
  await this.getSeatsio();
159
+ // The element may have been removed while the script loaded; its
160
+ // container is detached and a chart rendered into it leaks.
161
+ if (!this.isConnected) {
162
+ return;
163
+ }
146
164
  this.seatsioInstance?.destroy();
147
165
  this.renderSeatsMap();
148
166
  }
@@ -13,5 +13,3 @@ export declare const SEATS_IO_DEFAULTS: {
13
13
  showActiveSectionTooltipOnMobile: boolean;
14
14
  };
15
15
  export declare const CATEGORY_COLORS: string[];
16
- export declare const SECTION_AVAILABLE_COLOR = "#16a085";
17
- export declare const SECTION_UNAVAILABLE_COLOR = "#b6bcc4";
@@ -30,6 +30,3 @@ export const CATEGORY_COLORS = [
30
30
  "#2980b9",
31
31
  "#d35400",
32
32
  ];
33
- // Section fill driven by availability (see setSectionColor).
34
- export const SECTION_AVAILABLE_COLOR = "#16a085";
35
- export const SECTION_UNAVAILABLE_COLOR = "#b6bcc4";
@@ -1,4 +1,4 @@
1
- import type { SelectableObject, Section, CategoryKey } from "@seatsio/seatsio-types";
1
+ import type { CategoryKey } from "@seatsio/seatsio-types";
2
2
  import type { components } from "../../core/types/api-schema.js";
3
3
  import type { SupportedCurrencies } from "../../core/types/index.js";
4
4
  type SeatCategory = components["schemas"]["SeatCategory"];
@@ -75,9 +75,4 @@ export declare const buildTickets: (selectedLabels: string[], availableSeats: Re
75
75
  * All amounts in minor units.
76
76
  */
77
77
  export declare const buildSelectionSummary: (seats: SelectedSeat[], availableSeats: Record<string, AvailableSeat>, flatPriceBands: FlatPriceBand[], categories: ChartCategory[]) => SelectionSummary;
78
- export declare const makeIsSeatSelectable: (availableSeats: Record<string, AvailableSeat>) => (object: SelectableObject) => boolean;
79
- export declare const makeObjectColor: (availableSeats: Record<string, AvailableSeat>, categoryColors: Record<string, string>) => (object: SelectableObject, defaultColor: string) => string;
80
- export declare const setSectionColor: (section: Section, _defaultColor: string) => string;
81
- export declare const makeRestrictedViewInfo: (availableSeats: Record<string, AvailableSeat>) => (object: SelectableObject) => string;
82
- export declare const categoryColorMap: (categories: ChartCategory[]) => Record<string, string>;
83
78
  export {};
@@ -1,4 +1,4 @@
1
- import { CATEGORY_COLORS, SECTION_AVAILABLE_COLOR, SECTION_UNAVAILABLE_COLOR, } from "./seats-io.constants.js";
1
+ import { CATEGORY_COLORS } from "./seats-io.constants.js";
2
2
  const toArray = (response) => Array.isArray(response) ? response : [response];
3
3
  const bandLabel = (band, categoryId) => band.price_category || band.section_name || String(categoryId);
4
4
  const flattenPriceBand = (band, currency) => (band.price_types ?? []).map((priceType) => ({
@@ -139,22 +139,3 @@ export const buildSelectionSummary = (seats, availableSeats, flatPriceBands, cat
139
139
  });
140
140
  return { groups: [...groups.values()], subtotal, fees, total };
141
141
  };
142
- const isReserved = (object) => {
143
- const status = "status" in object ? object.status : undefined;
144
- return status === "reservedByToken" || status === "booked";
145
- };
146
- export const makeIsSeatSelectable = (availableSeats) => (object) => !isReserved(object) && object.label in availableSeats;
147
- export const makeObjectColor = (availableSeats, categoryColors) => (object, defaultColor) => {
148
- const seat = availableSeats[object.label];
149
- if (!seat || isReserved(object)) {
150
- return defaultColor;
151
- }
152
- return categoryColors[String(seat.categoryID)] ?? defaultColor;
153
- };
154
- export const setSectionColor = (section, _defaultColor) => section.numberOfSelectableObjects > 0
155
- ? SECTION_AVAILABLE_COLOR
156
- : SECTION_UNAVAILABLE_COLOR;
157
- // Price and category already show in the default popover; the restricted-view
158
- // note is the one piece of seat info the renderer doesn't surface on its own.
159
- export const makeRestrictedViewInfo = (availableSeats) => (object) => availableSeats[object.label]?.restrictedView ?? "";
160
- export const categoryColorMap = (categories) => Object.fromEntries(categories.map((category) => [category.key, category.color]));
@@ -9,6 +9,9 @@ import { state } from "lit/decorators.js";
9
9
  import styles from "./select-list.styles.js";
10
10
  import { property } from "lit/decorators.js";
11
11
  import { when } from "lit/directives/when.js";
12
+ // Options need ids so the listbox can point at the focused one through
13
+ // aria-activedescendant; generate them only for options that have none.
14
+ let generatedOptionIdCount = 0;
12
15
  export class CorasSelectList extends LitElement {
13
16
  constructor() {
14
17
  super(...arguments);
@@ -94,7 +97,6 @@ export class CorasSelectList extends LitElement {
94
97
  const options = this.getOptions();
95
98
  // Remove focus from all options
96
99
  options.forEach((option) => {
97
- option.setAttribute("aria-selected", "false");
98
100
  option.removeAttribute("focused"); // Using an attribute for styling
99
101
  });
100
102
  // Focus on the new option
@@ -102,7 +104,10 @@ export class CorasSelectList extends LitElement {
102
104
  this.focusedIndex = index;
103
105
  const focusedOption = options[index];
104
106
  if (focusedOption) {
105
- focusedOption.setAttribute("aria-selected", "true");
107
+ if (!focusedOption.id) {
108
+ focusedOption.id = `coras-select-option-${++generatedOptionIdCount}`;
109
+ }
110
+ this.setAttribute("aria-activedescendant", focusedOption.id);
106
111
  focusedOption.setAttribute("focused", ""); // For styling
107
112
  focusedOption.scrollIntoView({ block: "nearest" });
108
113
  }
@@ -1,7 +1,9 @@
1
- import { type CSSResultGroup, LitElement } from "lit";
1
+ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
2
2
  export declare class CorasSelectOption extends LitElement {
3
3
  static styles: CSSResultGroup;
4
4
  key: string;
5
5
  selected: boolean;
6
+ connectedCallback(): void;
7
+ protected willUpdate(changed: PropertyValues): void;
6
8
  render(): import("lit").TemplateResult<1>;
7
9
  }
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { LitElement, html } from "lit";
7
+ import { LitElement, html, } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
9
  import styles from "./select-option.styles.js";
10
10
  export class CorasSelectOption extends LitElement {
@@ -14,9 +14,16 @@ export class CorasSelectOption extends LitElement {
14
14
  this.selected = false;
15
15
  }
16
16
  static { this.styles = styles; }
17
- render() {
17
+ connectedCallback() {
18
+ super.connectedCallback();
18
19
  this.setAttribute("role", "option");
19
- this.setAttribute("aria-selected", this.selected.toString());
20
+ }
21
+ willUpdate(changed) {
22
+ if (changed.has("selected")) {
23
+ this.setAttribute("aria-selected", String(this.selected));
24
+ }
25
+ }
26
+ render() {
20
27
  return html ` <slot></slot> `;
21
28
  }
22
29
  }
@@ -6,6 +6,7 @@ export declare class CorasTabs extends LitElement {
6
6
  private panels;
7
7
  private activeTab?;
8
8
  protected updated(): void;
9
+ private syncTabIndexes;
9
10
  private getActiveTab;
10
11
  private getActivePanel;
11
12
  private setTabActive;
@@ -14,6 +15,7 @@ export declare class CorasTabs extends LitElement {
14
15
  private setPanelInactive;
15
16
  private findPanelByTab;
16
17
  private handleClick;
18
+ private handleKeyDown;
17
19
  private setActiveTab;
18
20
  protected render(): import("lit").TemplateResult<1>;
19
21
  }