@coras-io/embed 0.8.2 → 0.9.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/attraction-card/long/attraction-long-card.styles.js +14 -4
  3. package/dist/components/attraction-card/short/attraction-short-card.styles.js +3 -1
  4. package/dist/components/basket/basket.styles.js +2 -2
  5. package/dist/components/locations-results/locations-results.component.d.ts +1 -0
  6. package/dist/components/locations-results/locations-results.component.js +5 -2
  7. package/dist/components/loyalty-badge/loyalty-badge.component.d.ts +34 -0
  8. package/dist/components/loyalty-badge/loyalty-badge.component.js +141 -0
  9. package/dist/components/loyalty-badge/loyalty-badge.d.ts +8 -0
  10. package/dist/components/loyalty-badge/loyalty-badge.js +6 -0
  11. package/dist/components/loyalty-badge/loyalty-badge.styles.js +61 -0
  12. package/dist/components/loyalty-badge/loyalty-badge.types.d.ts +6 -0
  13. package/dist/components/loyalty-badge/loyalty-badge.utils.d.ts +23 -0
  14. package/dist/components/loyalty-badge/loyalty-badge.utils.js +30 -0
  15. package/dist/components/seated-selector/seated-selector.component.js +2 -3
  16. package/dist/components/seats-io/seats-io.component.js +0 -5
  17. package/dist/containers/basket/basket.component.d.ts +2 -1
  18. package/dist/containers/basket/basket.component.js +17 -44
  19. package/dist/containers/navbar/navbar.component.js +3 -5
  20. package/dist/containers/navbar/navbar.styles.js +4 -2
  21. package/dist/contexts/properties.context.d.ts +8 -0
  22. package/dist/contexts/properties.context.js +5 -0
  23. package/dist/core/types/api-schema.d.ts +181 -5
  24. package/dist/core/types/core/index.d.ts +0 -1
  25. package/dist/core/types/index.d.ts +0 -1
  26. package/dist/core/utils/loyalty.d.ts +37 -4
  27. package/dist/core/utils/loyalty.js +14 -5
  28. package/dist/core/utils/seats.d.ts +6 -0
  29. package/dist/core/utils/seats.js +40 -0
  30. package/dist/index.d.ts +1 -1
  31. package/dist/locales/ar-SA.d.ts +5 -0
  32. package/dist/locales/ar-SA.js +6 -1
  33. package/dist/locales/da-DK.d.ts +5 -0
  34. package/dist/locales/da-DK.js +5 -0
  35. package/dist/locales/de-DE.d.ts +5 -0
  36. package/dist/locales/de-DE.js +5 -0
  37. package/dist/locales/en-IE.d.ts +5 -0
  38. package/dist/locales/en-IE.js +5 -0
  39. package/dist/locales/en-US.d.ts +5 -0
  40. package/dist/locales/en-US.js +5 -0
  41. package/dist/locales/es-ES.d.ts +5 -0
  42. package/dist/locales/es-ES.js +5 -0
  43. package/dist/locales/fr-FR.d.ts +5 -0
  44. package/dist/locales/fr-FR.js +5 -0
  45. package/dist/locales/fr-MA.d.ts +5 -0
  46. package/dist/locales/fr-MA.js +5 -0
  47. package/dist/locales/is-IS.d.ts +5 -0
  48. package/dist/locales/is-IS.js +5 -0
  49. package/dist/locales/it-IT.d.ts +5 -0
  50. package/dist/locales/it-IT.js +5 -0
  51. package/dist/locales/ms-MY.d.ts +5 -0
  52. package/dist/locales/ms-MY.js +5 -0
  53. package/dist/locales/nb-NO.d.ts +5 -0
  54. package/dist/locales/nb-NO.js +5 -0
  55. package/dist/locales/pl-PL.d.ts +5 -0
  56. package/dist/locales/pl-PL.js +5 -0
  57. package/dist/locales/pt-PT.d.ts +5 -0
  58. package/dist/locales/pt-PT.js +5 -0
  59. package/dist/locales/sv-SE.d.ts +5 -0
  60. package/dist/locales/sv-SE.js +5 -0
  61. package/dist/locales/th-TH.d.ts +5 -0
  62. package/dist/locales/th-TH.js +5 -0
  63. package/dist/locales/tr-TR.d.ts +5 -0
  64. package/dist/locales/tr-TR.js +5 -0
  65. package/dist/locales/zh-CN.d.ts +5 -0
  66. package/dist/locales/zh-CN.js +5 -0
  67. package/dist/locales/zh-HK.d.ts +5 -0
  68. package/dist/locales/zh-HK.js +5 -0
  69. package/dist/mixins/base.mixin.d.ts +2 -0
  70. package/dist/mixins/base.mixin.js +8 -1
  71. package/dist/mixins/location-search/location-search.js +70 -29
  72. package/dist/mixins/location-search/location-search.styles.js +11 -7
  73. package/dist/mixins/search-mixin/search-mixin.js +2 -2
  74. package/dist/sdk/page-registry.js +2 -0
  75. package/dist/sdk/theme.d.ts +1 -1
  76. package/dist/sdk/types.d.ts +9 -1
  77. package/dist/sdk/validation.js +51 -0
  78. package/dist/styles/tokens.d.ts +1 -1
  79. package/dist/styles/tokens.generated.d.ts +1 -1
  80. package/dist/styles/tokens.generated.js +1 -1
  81. package/dist/styles/tokens.metadata.js +18 -0
  82. package/dist/views/chrome-only-page/chrome-only-page.component.d.ts +1 -0
  83. package/dist/views/details-page/details-page.component.d.ts +2 -1
  84. package/dist/views/details-page/details-page.component.js +15 -5
  85. package/dist/views/details-page/partials/location-highlights/location-highlights.component.d.ts +2 -0
  86. package/dist/views/details-page/partials/location-highlights/location-highlights.component.js +16 -2
  87. package/dist/views/help-page/help-page.component.d.ts +1 -0
  88. package/dist/views/landing-page/landing-page.component.d.ts +5 -3
  89. package/dist/views/landing-page/landing-page.component.js +66 -28
  90. package/dist/views/payment-page/controllers/form-validation.controller.d.ts +4 -1
  91. package/dist/views/payment-page/controllers/form-validation.controller.js +7 -2
  92. package/dist/views/payment-page/partials/confirmation/confirmation.component.js +49 -27
  93. package/dist/views/payment-page/partials/stripe/stripe.types.d.ts +1 -0
  94. package/dist/views/payment-page/partials/stripe/stripe.utils.js +5 -0
  95. package/dist/views/payment-page/payment-page.component.d.ts +6 -0
  96. package/dist/views/payment-page/payment-page.component.js +76 -8
  97. package/dist/views/payment-page/payment-page.loyalty.d.ts +13 -0
  98. package/dist/views/payment-page/payment-page.loyalty.js +80 -0
  99. package/dist/views/payment-page/payment-page.styles.js +16 -0
  100. package/dist/views/payment-page/payment-page.utils.d.ts +1 -1
  101. package/dist/views/payment-page/payment-page.utils.js +19 -1
  102. package/dist/views/payment-page/services/payment-api.service.d.ts +1 -0
  103. package/dist/views/search-page/search-page.component.d.ts +1 -0
  104. package/dist/views/search-page/search-page.component.js +10 -0
  105. package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +1 -0
  106. package/dist/views/suggestion-widget/suggestion-widget.component.js +11 -1
  107. package/package.json +5 -5
  108. package/dist/components/points/points.component.d.ts +0 -9
  109. package/dist/components/points/points.component.js +0 -36
  110. package/dist/components/points/points.d.ts +0 -8
  111. package/dist/components/points/points.js +0 -6
  112. package/dist/components/points/points.styles.js +0 -47
  113. package/dist/core/types/core/points.d.ts +0 -4
  114. package/dist/mixins/points/points.d.ts +0 -3
  115. package/dist/mixins/points/points.js +0 -30
  116. package/dist/mixins/points/types.d.ts +0 -8
  117. package/dist/mixins/points/types.js +0 -1
  118. /package/dist/components/{points/points.styles.d.ts → loyalty-badge/loyalty-badge.styles.d.ts} +0 -0
  119. /package/dist/{core/types/core/points.js → components/loyalty-badge/loyalty-badge.types.js} +0 -0
@@ -258,12 +258,14 @@ export const templates = {
258
258
  'sfd25dcb1e3a468be': `Pesquisar eventos`,
259
259
  'sffdadf0a576fd802': `Altura`,
260
260
  's8ffdc67bd6500a2f': `Near me`,
261
+ 's43d13a9f9be37bd6': str `All ${0} locations`,
261
262
  'sb4f1dffbb6be6302': `Clear`,
262
263
  'scd0ddab5a7a0f930': `Drawer`,
263
264
  's5d929ff1619ac0c9': `Search`,
264
265
  's7d628682e66e0d3a': `Search icon`,
265
266
  's6d8c02aee480af7a': `Menu`,
266
267
  'sc50d09edf9325339': `Dialog`,
268
+ 's9cce1c089a4d104c': `Suggested`,
267
269
  's52ac41b0b9dd0a9f': `We could not use your location. Search for a place instead.`,
268
270
  'sf3ff78cc329d3528': `Previous`,
269
271
  's0fbf6dc6a1966408': `Next`,
@@ -285,6 +287,8 @@ export const templates = {
285
287
  6-digit code below to confirm your payment.`,
286
288
  'hb3090d5e6b53fe7c': html `We'll send a one-time code to your phone number ending in
287
289
  ${0} to verify it.`,
290
+ 'sfb133d29f827abad': `Please enter a valid value`,
291
+ 's3bbf2f969fa4d9c1': `Seats`,
288
292
  's3e006a806d3b4691': `Payment`,
289
293
  'sc3b5f0655f7e750e': `Payment configuration error. Please try again.`,
290
294
  'sd22efd1a56ff1273': `Payment validation error. Please try again.`,
@@ -296,6 +300,7 @@ export const templates = {
296
300
  's1e2b6f4c6cb2282b': `Verification failed`,
297
301
  'sf562460f1ffdc5e1': `Failed to resend code`,
298
302
  'see08734dfee6e873': `An unexpected error occurred. Please try again.`,
303
+ 's824b623a81eb8062': `Additional details`,
299
304
  's6e95582c3d7ff15e': `At least one reservation is required`,
300
305
  's008e64897466dd2a': `We could not save your pickup point. Please try again.`,
301
306
  's028ef49bb8631312': `We are confirming your payment`,
@@ -252,12 +252,14 @@ export declare const templates: {
252
252
  sfd25dcb1e3a468be: string;
253
253
  sffdadf0a576fd802: string;
254
254
  s8ffdc67bd6500a2f: string;
255
+ s43d13a9f9be37bd6: import("@lit/localize").StrResult;
255
256
  sb4f1dffbb6be6302: string;
256
257
  scd0ddab5a7a0f930: string;
257
258
  s5d929ff1619ac0c9: string;
258
259
  s7d628682e66e0d3a: string;
259
260
  s6d8c02aee480af7a: string;
260
261
  sc50d09edf9325339: string;
262
+ s9cce1c089a4d104c: string;
261
263
  s52ac41b0b9dd0a9f: string;
262
264
  sf3ff78cc329d3528: string;
263
265
  s0fbf6dc6a1966408: string;
@@ -276,6 +278,8 @@ export declare const templates: {
276
278
  h12f3bd3a64c46efe: import("lit").TemplateResult<1>;
277
279
  h82c989f2494613fa: import("lit").TemplateResult<1>;
278
280
  hb3090d5e6b53fe7c: import("lit").TemplateResult<1>;
281
+ sfb133d29f827abad: string;
282
+ s3bbf2f969fa4d9c1: string;
279
283
  s3e006a806d3b4691: string;
280
284
  sc3b5f0655f7e750e: string;
281
285
  sd22efd1a56ff1273: string;
@@ -287,6 +291,7 @@ export declare const templates: {
287
291
  s1e2b6f4c6cb2282b: string;
288
292
  sf562460f1ffdc5e1: string;
289
293
  see08734dfee6e873: string;
294
+ s824b623a81eb8062: string;
290
295
  s6e95582c3d7ff15e: string;
291
296
  s008e64897466dd2a: string;
292
297
  s028ef49bb8631312: string;
@@ -258,12 +258,14 @@ export const templates = {
258
258
  'sfd25dcb1e3a468be': `Sök händelser`,
259
259
  'sffdadf0a576fd802': `Höjd`,
260
260
  's8ffdc67bd6500a2f': `Near me`,
261
+ 's43d13a9f9be37bd6': str `All ${0} locations`,
261
262
  'sb4f1dffbb6be6302': `Clear`,
262
263
  'scd0ddab5a7a0f930': `Drawer`,
263
264
  's5d929ff1619ac0c9': `Search`,
264
265
  's7d628682e66e0d3a': `Search icon`,
265
266
  's6d8c02aee480af7a': `Menu`,
266
267
  'sc50d09edf9325339': `Dialog`,
268
+ 's9cce1c089a4d104c': `Suggested`,
267
269
  's52ac41b0b9dd0a9f': `We could not use your location. Search for a place instead.`,
268
270
  'sf3ff78cc329d3528': `Previous`,
269
271
  's0fbf6dc6a1966408': `Next`,
@@ -285,6 +287,8 @@ export const templates = {
285
287
  6-digit code below to confirm your payment.`,
286
288
  'hb3090d5e6b53fe7c': html `We'll send a one-time code to your phone number ending in
287
289
  ${0} to verify it.`,
290
+ 'sfb133d29f827abad': `Please enter a valid value`,
291
+ 's3bbf2f969fa4d9c1': `Seats`,
288
292
  's3e006a806d3b4691': `Payment`,
289
293
  'sc3b5f0655f7e750e': `Payment configuration error. Please try again.`,
290
294
  'sd22efd1a56ff1273': `Payment validation error. Please try again.`,
@@ -296,6 +300,7 @@ export const templates = {
296
300
  's1e2b6f4c6cb2282b': `Verification failed`,
297
301
  'sf562460f1ffdc5e1': `Failed to resend code`,
298
302
  'see08734dfee6e873': `An unexpected error occurred. Please try again.`,
303
+ 's824b623a81eb8062': `Additional details`,
299
304
  's6e95582c3d7ff15e': `At least one reservation is required`,
300
305
  's008e64897466dd2a': `We could not save your pickup point. Please try again.`,
301
306
  's028ef49bb8631312': `We are confirming your payment`,
@@ -252,12 +252,14 @@ export declare const templates: {
252
252
  sfd25dcb1e3a468be: string;
253
253
  sffdadf0a576fd802: string;
254
254
  s8ffdc67bd6500a2f: string;
255
+ s43d13a9f9be37bd6: import("@lit/localize").StrResult;
255
256
  sb4f1dffbb6be6302: string;
256
257
  scd0ddab5a7a0f930: string;
257
258
  s5d929ff1619ac0c9: string;
258
259
  s7d628682e66e0d3a: string;
259
260
  s6d8c02aee480af7a: string;
260
261
  sc50d09edf9325339: string;
262
+ s9cce1c089a4d104c: string;
261
263
  s52ac41b0b9dd0a9f: string;
262
264
  sf3ff78cc329d3528: string;
263
265
  s0fbf6dc6a1966408: string;
@@ -276,6 +278,8 @@ export declare const templates: {
276
278
  h12f3bd3a64c46efe: import("lit").TemplateResult<1>;
277
279
  h82c989f2494613fa: import("lit").TemplateResult<1>;
278
280
  hb3090d5e6b53fe7c: import("lit").TemplateResult<1>;
281
+ sfb133d29f827abad: string;
282
+ s3bbf2f969fa4d9c1: string;
279
283
  s3e006a806d3b4691: string;
280
284
  sc3b5f0655f7e750e: string;
281
285
  sd22efd1a56ff1273: string;
@@ -287,6 +291,7 @@ export declare const templates: {
287
291
  s1e2b6f4c6cb2282b: string;
288
292
  sf562460f1ffdc5e1: string;
289
293
  see08734dfee6e873: string;
294
+ s824b623a81eb8062: string;
290
295
  s6e95582c3d7ff15e: string;
291
296
  s008e64897466dd2a: string;
292
297
  s028ef49bb8631312: string;
@@ -258,12 +258,14 @@ export const templates = {
258
258
  'sfd25dcb1e3a468be': `ค้นหาเหตุการณ์`,
259
259
  'sffdadf0a576fd802': `ความสูง`,
260
260
  's8ffdc67bd6500a2f': `Near me`,
261
+ 's43d13a9f9be37bd6': str `All ${0} locations`,
261
262
  'sb4f1dffbb6be6302': `Clear`,
262
263
  'scd0ddab5a7a0f930': `Drawer`,
263
264
  's5d929ff1619ac0c9': `Search`,
264
265
  's7d628682e66e0d3a': `Search icon`,
265
266
  's6d8c02aee480af7a': `Menu`,
266
267
  'sc50d09edf9325339': `Dialog`,
268
+ 's9cce1c089a4d104c': `Suggested`,
267
269
  's52ac41b0b9dd0a9f': `We could not use your location. Search for a place instead.`,
268
270
  'sf3ff78cc329d3528': `Previous`,
269
271
  's0fbf6dc6a1966408': `Next`,
@@ -285,6 +287,8 @@ export const templates = {
285
287
  6-digit code below to confirm your payment.`,
286
288
  'hb3090d5e6b53fe7c': html `We'll send a one-time code to your phone number ending in
287
289
  ${0} to verify it.`,
290
+ 'sfb133d29f827abad': `Please enter a valid value`,
291
+ 's3bbf2f969fa4d9c1': `Seats`,
288
292
  's3e006a806d3b4691': `Payment`,
289
293
  'sc3b5f0655f7e750e': `Payment configuration error. Please try again.`,
290
294
  'sd22efd1a56ff1273': `Payment validation error. Please try again.`,
@@ -296,6 +300,7 @@ export const templates = {
296
300
  's1e2b6f4c6cb2282b': `Verification failed`,
297
301
  'sf562460f1ffdc5e1': `Failed to resend code`,
298
302
  'see08734dfee6e873': `An unexpected error occurred. Please try again.`,
303
+ 's824b623a81eb8062': `Additional details`,
299
304
  's6e95582c3d7ff15e': `At least one reservation is required`,
300
305
  's008e64897466dd2a': `We could not save your pickup point. Please try again.`,
301
306
  's028ef49bb8631312': `We are confirming your payment`,
@@ -252,12 +252,14 @@ export declare const templates: {
252
252
  sfd25dcb1e3a468be: string;
253
253
  sffdadf0a576fd802: string;
254
254
  s8ffdc67bd6500a2f: string;
255
+ s43d13a9f9be37bd6: import("@lit/localize").StrResult;
255
256
  sb4f1dffbb6be6302: string;
256
257
  scd0ddab5a7a0f930: string;
257
258
  s5d929ff1619ac0c9: string;
258
259
  s7d628682e66e0d3a: string;
259
260
  s6d8c02aee480af7a: string;
260
261
  sc50d09edf9325339: string;
262
+ s9cce1c089a4d104c: string;
261
263
  s52ac41b0b9dd0a9f: string;
262
264
  sf3ff78cc329d3528: string;
263
265
  s0fbf6dc6a1966408: string;
@@ -276,6 +278,8 @@ export declare const templates: {
276
278
  h12f3bd3a64c46efe: import("lit").TemplateResult<1>;
277
279
  h82c989f2494613fa: import("lit").TemplateResult<1>;
278
280
  hb3090d5e6b53fe7c: import("lit").TemplateResult<1>;
281
+ sfb133d29f827abad: string;
282
+ s3bbf2f969fa4d9c1: string;
279
283
  s3e006a806d3b4691: string;
280
284
  sc3b5f0655f7e750e: string;
281
285
  sd22efd1a56ff1273: string;
@@ -287,6 +291,7 @@ export declare const templates: {
287
291
  s1e2b6f4c6cb2282b: string;
288
292
  sf562460f1ffdc5e1: string;
289
293
  see08734dfee6e873: string;
294
+ s824b623a81eb8062: string;
290
295
  s6e95582c3d7ff15e: string;
291
296
  s008e64897466dd2a: string;
292
297
  s028ef49bb8631312: string;
@@ -258,12 +258,14 @@ export const templates = {
258
258
  'sfd25dcb1e3a468be': `Olayları ara`,
259
259
  'sffdadf0a576fd802': `Yükseklik`,
260
260
  's8ffdc67bd6500a2f': `Near me`,
261
+ 's43d13a9f9be37bd6': str `All ${0} locations`,
261
262
  'sb4f1dffbb6be6302': `Clear`,
262
263
  'scd0ddab5a7a0f930': `Drawer`,
263
264
  's5d929ff1619ac0c9': `Search`,
264
265
  's7d628682e66e0d3a': `Search icon`,
265
266
  's6d8c02aee480af7a': `Menu`,
266
267
  'sc50d09edf9325339': `Dialog`,
268
+ 's9cce1c089a4d104c': `Suggested`,
267
269
  's52ac41b0b9dd0a9f': `We could not use your location. Search for a place instead.`,
268
270
  'sf3ff78cc329d3528': `Previous`,
269
271
  's0fbf6dc6a1966408': `Next`,
@@ -285,6 +287,8 @@ export const templates = {
285
287
  6-digit code below to confirm your payment.`,
286
288
  'hb3090d5e6b53fe7c': html `We'll send a one-time code to your phone number ending in
287
289
  ${0} to verify it.`,
290
+ 'sfb133d29f827abad': `Please enter a valid value`,
291
+ 's3bbf2f969fa4d9c1': `Seats`,
288
292
  's3e006a806d3b4691': `Payment`,
289
293
  'sc3b5f0655f7e750e': `Payment configuration error. Please try again.`,
290
294
  'sd22efd1a56ff1273': `Payment validation error. Please try again.`,
@@ -296,6 +300,7 @@ export const templates = {
296
300
  's1e2b6f4c6cb2282b': `Verification failed`,
297
301
  'sf562460f1ffdc5e1': `Failed to resend code`,
298
302
  'see08734dfee6e873': `An unexpected error occurred. Please try again.`,
303
+ 's824b623a81eb8062': `Additional details`,
299
304
  's6e95582c3d7ff15e': `At least one reservation is required`,
300
305
  's008e64897466dd2a': `We could not save your pickup point. Please try again.`,
301
306
  's028ef49bb8631312': `We are confirming your payment`,
@@ -252,12 +252,14 @@ export declare const templates: {
252
252
  sfd25dcb1e3a468be: string;
253
253
  sffdadf0a576fd802: string;
254
254
  s8ffdc67bd6500a2f: string;
255
+ s43d13a9f9be37bd6: import("@lit/localize").StrResult;
255
256
  sb4f1dffbb6be6302: string;
256
257
  scd0ddab5a7a0f930: string;
257
258
  s5d929ff1619ac0c9: string;
258
259
  s7d628682e66e0d3a: string;
259
260
  s6d8c02aee480af7a: string;
260
261
  sc50d09edf9325339: string;
262
+ s9cce1c089a4d104c: string;
261
263
  s52ac41b0b9dd0a9f: string;
262
264
  sf3ff78cc329d3528: string;
263
265
  s0fbf6dc6a1966408: string;
@@ -276,6 +278,8 @@ export declare const templates: {
276
278
  h12f3bd3a64c46efe: import("lit").TemplateResult<1>;
277
279
  h82c989f2494613fa: import("lit").TemplateResult<1>;
278
280
  hb3090d5e6b53fe7c: import("lit").TemplateResult<1>;
281
+ sfb133d29f827abad: string;
282
+ s3bbf2f969fa4d9c1: string;
279
283
  s3e006a806d3b4691: string;
280
284
  sc3b5f0655f7e750e: string;
281
285
  sd22efd1a56ff1273: string;
@@ -287,6 +291,7 @@ export declare const templates: {
287
291
  s1e2b6f4c6cb2282b: string;
288
292
  sf562460f1ffdc5e1: string;
289
293
  see08734dfee6e873: string;
294
+ s824b623a81eb8062: string;
290
295
  s6e95582c3d7ff15e: string;
291
296
  s008e64897466dd2a: string;
292
297
  s028ef49bb8631312: string;
@@ -258,12 +258,14 @@ export const templates = {
258
258
  'sfd25dcb1e3a468be': `搜索事件`,
259
259
  'sffdadf0a576fd802': `高度`,
260
260
  's8ffdc67bd6500a2f': `Near me`,
261
+ 's43d13a9f9be37bd6': str `All ${0} locations`,
261
262
  'sb4f1dffbb6be6302': `Clear`,
262
263
  'scd0ddab5a7a0f930': `Drawer`,
263
264
  's5d929ff1619ac0c9': `Search`,
264
265
  's7d628682e66e0d3a': `Search icon`,
265
266
  's6d8c02aee480af7a': `Menu`,
266
267
  'sc50d09edf9325339': `Dialog`,
268
+ 's9cce1c089a4d104c': `Suggested`,
267
269
  's52ac41b0b9dd0a9f': `We could not use your location. Search for a place instead.`,
268
270
  'sf3ff78cc329d3528': `Previous`,
269
271
  's0fbf6dc6a1966408': `Next`,
@@ -285,6 +287,8 @@ export const templates = {
285
287
  6-digit code below to confirm your payment.`,
286
288
  'hb3090d5e6b53fe7c': html `We'll send a one-time code to your phone number ending in
287
289
  ${0} to verify it.`,
290
+ 'sfb133d29f827abad': `Please enter a valid value`,
291
+ 's3bbf2f969fa4d9c1': `Seats`,
288
292
  's3e006a806d3b4691': `Payment`,
289
293
  'sc3b5f0655f7e750e': `Payment configuration error. Please try again.`,
290
294
  'sd22efd1a56ff1273': `Payment validation error. Please try again.`,
@@ -296,6 +300,7 @@ export const templates = {
296
300
  's1e2b6f4c6cb2282b': `Verification failed`,
297
301
  'sf562460f1ffdc5e1': `Failed to resend code`,
298
302
  'see08734dfee6e873': `An unexpected error occurred. Please try again.`,
303
+ 's824b623a81eb8062': `Additional details`,
299
304
  's6e95582c3d7ff15e': `At least one reservation is required`,
300
305
  's008e64897466dd2a': `We could not save your pickup point. Please try again.`,
301
306
  's028ef49bb8631312': `We are confirming your payment`,
@@ -252,12 +252,14 @@ export declare const templates: {
252
252
  sfd25dcb1e3a468be: string;
253
253
  sffdadf0a576fd802: string;
254
254
  s8ffdc67bd6500a2f: string;
255
+ s43d13a9f9be37bd6: import("@lit/localize").StrResult;
255
256
  sb4f1dffbb6be6302: string;
256
257
  scd0ddab5a7a0f930: string;
257
258
  s5d929ff1619ac0c9: string;
258
259
  s7d628682e66e0d3a: string;
259
260
  s6d8c02aee480af7a: string;
260
261
  sc50d09edf9325339: string;
262
+ s9cce1c089a4d104c: string;
261
263
  s52ac41b0b9dd0a9f: string;
262
264
  sf3ff78cc329d3528: string;
263
265
  s0fbf6dc6a1966408: string;
@@ -276,6 +278,8 @@ export declare const templates: {
276
278
  h12f3bd3a64c46efe: import("lit").TemplateResult<1>;
277
279
  h82c989f2494613fa: import("lit").TemplateResult<1>;
278
280
  hb3090d5e6b53fe7c: import("lit").TemplateResult<1>;
281
+ sfb133d29f827abad: string;
282
+ s3bbf2f969fa4d9c1: string;
279
283
  s3e006a806d3b4691: string;
280
284
  sc3b5f0655f7e750e: string;
281
285
  sd22efd1a56ff1273: string;
@@ -287,6 +291,7 @@ export declare const templates: {
287
291
  s1e2b6f4c6cb2282b: string;
288
292
  sf562460f1ffdc5e1: string;
289
293
  see08734dfee6e873: string;
294
+ s824b623a81eb8062: string;
290
295
  s6e95582c3d7ff15e: string;
291
296
  s008e64897466dd2a: string;
292
297
  s028ef49bb8631312: string;
@@ -258,12 +258,14 @@ export const templates = {
258
258
  'sfd25dcb1e3a468be': `搜尋事件`,
259
259
  'sffdadf0a576fd802': `高度`,
260
260
  's8ffdc67bd6500a2f': `Near me`,
261
+ 's43d13a9f9be37bd6': str `All ${0} locations`,
261
262
  'sb4f1dffbb6be6302': `Clear`,
262
263
  'scd0ddab5a7a0f930': `Drawer`,
263
264
  's5d929ff1619ac0c9': `Search`,
264
265
  's7d628682e66e0d3a': `Search icon`,
265
266
  's6d8c02aee480af7a': `Menu`,
266
267
  'sc50d09edf9325339': `Dialog`,
268
+ 's9cce1c089a4d104c': `Suggested`,
267
269
  's52ac41b0b9dd0a9f': `We could not use your location. Search for a place instead.`,
268
270
  'sf3ff78cc329d3528': `Previous`,
269
271
  's0fbf6dc6a1966408': `Next`,
@@ -285,6 +287,8 @@ export const templates = {
285
287
  6-digit code below to confirm your payment.`,
286
288
  'hb3090d5e6b53fe7c': html `We'll send a one-time code to your phone number ending in
287
289
  ${0} to verify it.`,
290
+ 'sfb133d29f827abad': `Please enter a valid value`,
291
+ 's3bbf2f969fa4d9c1': `Seats`,
288
292
  's3e006a806d3b4691': `Payment`,
289
293
  'sc3b5f0655f7e750e': `Payment configuration error. Please try again.`,
290
294
  'sd22efd1a56ff1273': `Payment validation error. Please try again.`,
@@ -296,6 +300,7 @@ export const templates = {
296
300
  's1e2b6f4c6cb2282b': `Verification failed`,
297
301
  'sf562460f1ffdc5e1': `Failed to resend code`,
298
302
  'see08734dfee6e873': `An unexpected error occurred. Please try again.`,
303
+ 's824b623a81eb8062': `Additional details`,
299
304
  's6e95582c3d7ff15e': `At least one reservation is required`,
300
305
  's008e64897466dd2a': `We could not save your pickup point. Please try again.`,
301
306
  's028ef49bb8631312': `We are confirming your payment`,
@@ -2,6 +2,7 @@ import type { SupportedCurrencies, SupportedLocales } from "../core/types/index.
2
2
  import type { LitElement } from "lit";
3
3
  import type { paths } from "../core/types/api-schema.js";
4
4
  import type { Client } from "openapi-fetch";
5
+ import type { LoyaltyProgramme } from "../core/utils/loyalty.js";
5
6
  import type { Constructor } from "../contexts/utils.js";
6
7
  import { type PageDispatchInput } from "../contexts/events.context.js";
7
8
  import { type Logger } from "../core/logger.js";
@@ -15,6 +16,7 @@ type BaseMixinProperties<CustomPageContext extends PageParamsEvent> = {
15
16
  locale: SupportedLocales;
16
17
  locales: SupportedLocales[];
17
18
  loyaltyPoints: boolean;
19
+ loyaltyProgramme: LoyaltyProgramme | null;
18
20
  logger: Logger;
19
21
  client: Client<paths>;
20
22
  getPageProperties(): CustomPageContext;
@@ -16,7 +16,7 @@ import { clientContext } from "../contexts/client.context.js";
16
16
  import { pageDispatchContext, } from "../contexts/events.context.js";
17
17
  import { fireEvent } from "../core/events.js";
18
18
  import { classifyPageUpdate } from "../sdk/navigation-intent.js";
19
- import { apiHostContext, assetsURLContext, loyaltyPointsContext, currenciesContext, currencyContext, distributorIdContext, localeContext, localesContext, } from "../contexts/properties.context.js";
19
+ import { apiHostContext, assetsURLContext, loyaltyPointsContext, loyaltyProgrammeContext, currenciesContext, currencyContext, distributorIdContext, localeContext, localesContext, } from "../contexts/properties.context.js";
20
20
  import { currentPageContext } from "../contexts/current-page.context.js";
21
21
  import { NOOP_LOGGER, loggerContext } from "../core/logger.js";
22
22
  export const BaseMixin = (superClass) => {
@@ -32,6 +32,9 @@ export const BaseMixin = (superClass) => {
32
32
  this.locale = DEFAULT_LOCALE;
33
33
  this.locales = [...allLocales];
34
34
  this.loyaltyPoints = false;
35
+ // Host-provided presentation of the distributor's loyalty programme
36
+ // (`config.loyalty`); the API only carries amounts and field rules.
37
+ this.loyaltyProgramme = null;
35
38
  // Set by the SDK mount, not an attribute: a host cannot pass a function
36
39
  // through markup, so the default stays silent until `mount` wires one.
37
40
  this.logger = NOOP_LOGGER;
@@ -124,6 +127,10 @@ export const BaseMixin = (superClass) => {
124
127
  provide({ context: loyaltyPointsContext }),
125
128
  property({ type: Boolean, attribute: "loyalty-points" })
126
129
  ], BaseMixinElement.prototype, "loyaltyPoints", void 0);
130
+ __decorate([
131
+ provide({ context: loyaltyProgrammeContext }),
132
+ property({ attribute: false })
133
+ ], BaseMixinElement.prototype, "loyaltyProgramme", void 0);
127
134
  __decorate([
128
135
  provide({ context: loggerContext })
129
136
  ], BaseMixinElement.prototype, "logger", void 0);
@@ -11,7 +11,7 @@ import { ifDefined } from "lit/directives/if-defined.js";
11
11
  import { Task } from "@lit/task";
12
12
  import { msg } from "@lit/localize";
13
13
  import { debounce } from "../../core/utils/function.js";
14
- import { renderLocationResultOption } from "../../components/locations-results/locations-results.component.js";
14
+ import { locationOptionLabel, renderLocationResultOption, } from "../../components/locations-results/locations-results.component.js";
15
15
  import styles from "./location-search.styles.js";
16
16
  import "../../components/dropdown/dropdown.js";
17
17
  import "../../components/locations-results/locations-results.js";
@@ -19,6 +19,17 @@ import "../../components/input-field/input-field.js";
19
19
  import { apiGet } from "../../core/api/queries.js";
20
20
  import { APIError } from "../../core/api/api-error.js";
21
21
  import { getApiLanguageCode } from "../../core/utils/locale.js";
22
+ import { getRecentlySelectedSearches } from "../../containers/navbar/navbar.utils.js";
23
+ const RECENT_LOCATIONS_LIMIT = 5;
24
+ function findSingleLocationMatch(results) {
25
+ const [first, ...rest] = results ?? [];
26
+ if (rest.length === 0) {
27
+ return first;
28
+ }
29
+ const isCountryWithItsCities = first?.location_type === "country" &&
30
+ rest.every((item) => item.parent_location?.slug === first.slug);
31
+ return isCountryWithItsCities ? first : undefined;
32
+ }
22
33
  export const LocationSearchMixin = (superClass) => {
23
34
  class LocationSearchMixinElement extends superClass {
24
35
  constructor() {
@@ -53,7 +64,7 @@ export const LocationSearchMixin = (superClass) => {
53
64
  results: [],
54
65
  };
55
66
  }
56
- if (!isDropdownOpen && (!query || query.length < 3)) {
67
+ if (!isDropdownOpen && !query) {
57
68
  return null;
58
69
  }
59
70
  const language_code = getApiLanguageCode(locale);
@@ -87,11 +98,7 @@ export const LocationSearchMixin = (superClass) => {
87
98
  this.isLocationsDropdownOpen,
88
99
  ],
89
100
  });
90
- this.throttledLocationSearch = debounce({ delay: 500 }, (event) => {
91
- if (event.detail.value.length > 1) {
92
- this.handleLocationSearch(event);
93
- }
94
- });
101
+ this.throttledLocationSearch = debounce({ delay: 200 }, (event) => this.handleLocationSearch(event));
95
102
  this.handleLocationSearch = (event) => {
96
103
  this.locationSearchTerm = event.detail.value;
97
104
  this.geolocationLatitude = undefined;
@@ -122,18 +129,23 @@ export const LocationSearchMixin = (superClass) => {
122
129
  });
123
130
  this.isLocationsDropdownOpen = false;
124
131
  };
132
+ this.handleRecentLocationSelected = (item) => {
133
+ this.selectedLocation = null;
134
+ this.locationSearchTerm = "";
135
+ this.locationNamePlaceholder = item.name;
136
+ this.dispatchPageUpdate({
137
+ city: item.type === "city" ? item.value : "",
138
+ country: item.type === "country" ? item.value : "",
139
+ });
140
+ this.isLocationsDropdownOpen = false;
141
+ };
125
142
  this.handleKeyDown = (event) => {
126
143
  if (event.key === "Enter") {
127
144
  event.preventDefault();
128
145
  event.stopPropagation();
129
- const searchResults = this.locationSearchTask.value?.results;
130
- if (searchResults &&
131
- searchResults.length === 1 &&
132
- this.locationSearchTerm.length >= 3) {
133
- const selectedResult = searchResults[0];
134
- if (selectedResult) {
135
- this.handleLocationSelected(selectedResult);
136
- }
146
+ const singleMatch = findSingleLocationMatch(this.locationSearchTask.value?.results);
147
+ if (singleMatch && this.locationSearchTerm) {
148
+ this.handleLocationSelected(singleMatch);
137
149
  }
138
150
  const fieldElement = this.shadowRoot?.querySelector('coras-field[slot="trigger"]');
139
151
  if (fieldElement && fieldElement.blur) {
@@ -161,23 +173,53 @@ export const LocationSearchMixin = (superClass) => {
161
173
  this.locationNamePlaceholder = this.selectedLocation.name ?? "";
162
174
  }
163
175
  }
176
+ renderRecentLocations(recentLocations) {
177
+ return html `
178
+ <p class="results-heading">${msg("Recently viewed")}</p>
179
+ ${recentLocations.map((item) => html `
180
+ <coras-select-option
181
+ @click=${() => this.handleRecentLocationSelected(item)}
182
+ >
183
+ <coras-icon
184
+ assets-url="${this.assetsURL}"
185
+ icon=${item.type === "country" ? "flag" : "pin-drop"}
186
+ ></coras-icon>
187
+ <span>${locationOptionLabel(item.name, item.type)}</span>
188
+ </coras-select-option>
189
+ `)}
190
+ `;
191
+ }
192
+ renderLocationOptions(locations) {
193
+ return locations.map((item) => renderLocationResultOption({
194
+ item,
195
+ onSelect: this.handleLocationSelected,
196
+ localizedName: item.name ?? "",
197
+ assetsURL: this.assetsURL,
198
+ }));
199
+ }
164
200
  renderLocationSearchResults() {
165
201
  return this.locationSearchTask.render({
166
202
  complete: (response) => {
167
203
  if (!response) {
168
204
  return html ``;
169
205
  }
170
- const locations = (response.results?.length ?? 0) > 0
171
- ? response.results
172
- : (response.popular ?? []);
173
- return html `${(locations ?? []).map((item) => {
174
- return renderLocationResultOption({
175
- item,
176
- onSelect: this.handleLocationSelected,
177
- localizedName: item.name ?? "",
178
- assetsURL: this.assetsURL,
179
- });
180
- })}`;
206
+ if ((response.results?.length ?? 0) > 0) {
207
+ return this.renderLocationOptions(response.results);
208
+ }
209
+ const recentLocations = getRecentlySelectedSearches()
210
+ .filter((item) => item.type === "city" || item.type === "country")
211
+ .slice(0, RECENT_LOCATIONS_LIMIT);
212
+ if (recentLocations.length > 0) {
213
+ return this.renderRecentLocations(recentLocations);
214
+ }
215
+ const popular = response.popular ?? [];
216
+ if (popular.length === 0) {
217
+ return html ``;
218
+ }
219
+ return html `
220
+ <p class="results-heading">${msg("Suggested")}</p>
221
+ ${this.renderLocationOptions(popular)}
222
+ `;
181
223
  },
182
224
  });
183
225
  }
@@ -285,9 +327,8 @@ export const LocationSearchMixin = (superClass) => {
285
327
  <coras-icon
286
328
  slot="suffix"
287
329
  assets-url="${this.assetsURL}"
288
- class=${classMap({ open: this.isLocationsDropdownOpen })}
289
- icon="keyboard-arrow-down"
290
- size="large"
330
+ icon="search"
331
+ size="base"
291
332
  ></coras-icon>
292
333
  </coras-field>
293
334
  <coras-locations-results
@@ -37,13 +37,6 @@ export default css `
37
37
 
38
38
  coras-icon {
39
39
  fill: var(--coras-color-primary);
40
- transform: rotate(0deg);
41
- transition: transform 0.3s;
42
-
43
- &.open {
44
- transform: rotate(180deg);
45
- transition: transform 0.3s;
46
- }
47
40
  }
48
41
 
49
42
  &::part(clear-icon) {
@@ -72,6 +65,17 @@ export default css `
72
65
  }
73
66
  }
74
67
 
68
+ .results-heading {
69
+ margin: 0;
70
+ padding: 1rem 0.5rem 0.5rem;
71
+ padding-inline-start: calc(0.5rem + 10px);
72
+ font-size: var(--coras-font-size-sm);
73
+ font-weight: var(--coras-font-weight-semibold);
74
+ line-height: 20px;
75
+ letter-spacing: 0.4px;
76
+ color: var(--coras-color-text);
77
+ }
78
+
75
79
  @container locations-container (max-width: 520px) {
76
80
  .locations {
77
81
  flex-direction: column;
@@ -39,9 +39,9 @@ export const SearchMixin = (superClass) => {
39
39
  },
40
40
  args: () => [this.getSearchTerm(), this.locale],
41
41
  });
42
- this.throttledSearch = debounce({ delay: 500 }, (event) => {
42
+ this.throttledSearch = debounce({ delay: 200 }, (event) => {
43
43
  const searchTerm = event.detail.value;
44
- if (searchTerm && searchTerm.length >= 3) {
44
+ if (searchTerm) {
45
45
  void this.searchTask.run();
46
46
  }
47
47
  });
@@ -52,6 +52,7 @@ const OPTIONAL_CONFIG_PROPERTIES = [
52
52
  "currency",
53
53
  "currencies",
54
54
  "loyaltyPoints",
55
+ "loyaltyProgramme",
55
56
  ];
56
57
  /**
57
58
  * Snapshot the element's default values for every property an optional config
@@ -81,6 +82,7 @@ export function applyConfig(element, config, defaults) {
81
82
  element.currency = config.currency ?? defaults.currency;
82
83
  element.currencies = config.allowedCurrencies ?? defaults.currencies;
83
84
  element.loyaltyPoints = config.loyaltyPointsEnabled ?? defaults.loyaltyPoints;
85
+ element.loyaltyProgramme = config.loyalty ?? defaults.loyaltyProgramme;
84
86
  }
85
87
  /**
86
88
  * Snapshot the element's default values for every param the page exposes. Taken
@@ -1,5 +1,5 @@
1
1
  import type { CorasColorScheme, CorasTheme } from "./types.js";
2
- export declare const THEME_CSS_VARS: Record<"primary" | "secondary" | "pageBackground" | "text" | "textMuted" | "link" | "icon" | "focusRing" | "scrim" | "cardBackground" | "cardBorder" | "fieldBackground" | "fieldBorder" | "menuBackground" | "menuBorder" | "divider" | "cardShadow" | "softShadow" | "primaryButton" | "primaryButtonText" | "primaryButtonHover" | "primaryButtonPressed" | "secondaryButton" | "secondaryButtonText" | "secondaryButtonHover" | "secondaryButtonPressed" | "textButton" | "primaryButtonBorder" | "secondaryButtonBorder" | "disabled" | "buttonShadow" | "buttonHoverOnLightFill" | "buttonHoverOnDarkFill" | "radius" | "buttonRadius" | "chipRadius" | "fieldRadius" | "searchRadius" | "font" | "headingFont" | "headingScale" | "logoHeight" | "navbarBackground" | "navbarBackgroundImage" | "navbarText" | "navbarIcon" | "navbarBorder" | "navbarShadow" | "footerBackground" | "footerBackgroundImage" | "footerText" | "footerLink" | "footerBorder" | "footerPaddingBottom" | "error" | "errorBackground" | "success" | "successBackground" | "warning" | "warningBackground" | "info" | "infoBackground" | "primaryTint" | "secondaryTint" | "neutral50" | "neutral100" | "neutral200" | "neutral300" | "neutral400" | "neutral500" | "neutral600" | "neutral700" | "neutral800" | "neutral900", string>;
2
+ export declare const THEME_CSS_VARS: Record<"primary" | "secondary" | "pageBackground" | "text" | "textMuted" | "link" | "icon" | "focusRing" | "scrim" | "cardBackground" | "cardBorder" | "fieldBackground" | "fieldBorder" | "menuBackground" | "menuBorder" | "divider" | "cardShadow" | "softShadow" | "primaryButton" | "primaryButtonText" | "primaryButtonHover" | "primaryButtonPressed" | "secondaryButton" | "secondaryButtonText" | "secondaryButtonHover" | "secondaryButtonPressed" | "textButton" | "primaryButtonBorder" | "secondaryButtonBorder" | "disabled" | "buttonShadow" | "buttonHoverOnLightFill" | "buttonHoverOnDarkFill" | "radius" | "buttonRadius" | "chipRadius" | "fieldRadius" | "searchRadius" | "font" | "headingFont" | "headingScale" | "logoHeight" | "navbarBackground" | "navbarBackgroundImage" | "navbarText" | "navbarIcon" | "navbarBorder" | "navbarShadow" | "footerBackground" | "footerBackgroundImage" | "footerText" | "footerLink" | "footerBorder" | "footerPaddingBottom" | "error" | "errorBackground" | "success" | "successBackground" | "warning" | "warningBackground" | "info" | "infoBackground" | "primaryTint" | "secondaryTint" | "loyaltyBackground" | "loyaltyText" | "neutral50" | "neutral100" | "neutral200" | "neutral300" | "neutral400" | "neutral500" | "neutral600" | "neutral700" | "neutral800" | "neutral900", string>;
3
3
  export declare function applyColorScheme(element: HTMLElement, scheme: CorasColorScheme | undefined): void;
4
4
  export declare function applyTheme(element: HTMLElement, input: CorasTheme | undefined): void;
5
5
  export declare function clearTheme(element: HTMLElement): void;