@ticketboothapp/booking 1.2.190 → 1.2.191

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 (30) hide show
  1. package/package.json +3 -1
  2. package/src/components/BackgroundVideo.tsx +6 -3
  3. package/src/components/booking/AddOnsSection.module.css +6 -2
  4. package/src/components/booking/AddOnsSection.tsx +4 -4
  5. package/src/components/booking/AdminChangeReceiptComparison.module.css +16 -0
  6. package/src/components/booking/AdminChangeReceiptComparison.tsx +14 -4
  7. package/src/components/booking/BookingDialog.module.css +43 -0
  8. package/src/components/booking/BookingFlowCollage.tsx +43 -16
  9. package/src/components/booking/Calendar.module.css +8 -3
  10. package/src/components/booking/ChangeBookingDialog.tsx +116 -55
  11. package/src/components/booking/ChangeBookingFlow.tsx +1 -0
  12. package/src/components/booking/CheckoutForm.module.css +7 -0
  13. package/src/components/booking/CollapsibleAddOnItem.module.css +3 -2
  14. package/src/components/booking/MealDrinkAddOnSelector.tsx +4 -4
  15. package/src/components/booking/PickupLocationDialog.tsx +19 -23
  16. package/src/components/booking/PickupLocationSelector.tsx +20 -25
  17. package/src/components/booking/PriceSummary.module.css +19 -0
  18. package/src/components/booking/PriceSummary.tsx +10 -7
  19. package/src/components/booking/TourDescription.module.css +6 -1
  20. package/src/components/booking/TourDescription.tsx +25 -16
  21. package/src/components/booking/change-booking-compare.module.css +154 -0
  22. package/src/components/booking/change-booking-compare.tsx +141 -1
  23. package/src/constants/images.ts +1 -1
  24. package/src/index.ts +11 -0
  25. package/src/lib/booking/pickup-location-disclaimer.ts +67 -0
  26. package/src/lib/booking-api.ts +1 -0
  27. package/src/strings/en.json +140 -68
  28. package/src/strings/es.json +181 -68
  29. package/src/strings/fr.json +181 -68
  30. package/test/pickup-location-disclaimer.test.ts +44 -0
@@ -0,0 +1,44 @@
1
+ import assert from 'node:assert/strict';
2
+
3
+ import { getPickupLocationDisclaimer } from '../src/lib/booking/pickup-location-disclaimer';
4
+
5
+ const hotelPickups = [
6
+ ['loc_bXsdBbEzD5cP', 'Baker Creek by Basecamp'],
7
+ ['loc_arPLLVG1xKxw', 'Mountaineer Lodge'],
8
+ ['loc_9ObwCZ7MxfjC', 'Paradise Lodge and Bungalows'],
9
+ ['loc_ieW6EfdVeYd4', 'Post Hotel'],
10
+ ];
11
+
12
+ for (const [id, name] of hotelPickups) {
13
+ assert.deepEqual(getPickupLocationDisclaimer({ id, name }), {
14
+ title: 'Hotel guests only',
15
+ message: `This pickup location is only available to guests staying at ${name}. There is no public parking for shuttle guests.`,
16
+ });
17
+ }
18
+
19
+ assert.match(
20
+ getPickupLocationDisclaimer({ id: 'loc_afkvmlNRwRqZ', name: 'Samson Mall' })
21
+ ?.message ?? '',
22
+ /^No public parking/,
23
+ );
24
+ assert.equal(
25
+ getPickupLocationDisclaimer({
26
+ id: 'loc_elsewhere',
27
+ name: 'Banff Train Station',
28
+ }),
29
+ null,
30
+ );
31
+
32
+ assert.deepEqual(
33
+ getPickupLocationDisclaimer({
34
+ id: 'loc_anywhere',
35
+ name: 'Any pickup location',
36
+ disclaimer: 'Please meet your driver at the main entrance.',
37
+ }),
38
+ {
39
+ title: 'Pickup location note',
40
+ message: 'Please meet your driver at the main entrance.',
41
+ },
42
+ );
43
+
44
+ console.log('pickup location disclaimer tests passed');