@ticketboothapp/booking 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/colours.css +23 -0
- package/src/components/BookingDetails.module.css +1591 -0
- package/src/components/BookingDetails.tsx +2072 -354
- package/src/components/BookingWidget.tsx +28 -248
- package/src/components/JobApplicationDialog.module.css +440 -0
- package/src/components/JobApplicationDialog.tsx +620 -0
- package/src/components/ManageBookingView.tsx +28 -36
- package/src/components/PhoneInputWithCountry.module.css +131 -0
- package/src/components/PhoneInputWithCountry.tsx +44 -0
- package/src/components/PickupLocationDialog.module.css +360 -0
- package/src/components/PickupLocationDialog.tsx +357 -0
- package/src/components/PickupLocationMap.tsx +110 -0
- package/src/components/PostBookingDependentAddOnUpsell.module.css +174 -0
- package/src/components/PostBookingDependentAddOnUpsell.tsx +407 -0
- package/src/components/accordion.css +27 -0
- package/src/components/accordion.tsx +29 -0
- package/src/components/analytics/AnalyticsConsentRestore.tsx +19 -0
- package/src/components/analytics/AnalyticsScripts.tsx +106 -0
- package/src/components/analytics/CookieConsentBanner.css +86 -0
- package/src/components/analytics/CookieConsentBanner.tsx +102 -0
- package/src/components/booking/AddOnsSection.module.css +10 -0
- package/src/components/booking/AddOnsSection.tsx +184 -0
- package/src/components/booking/AdminPaymentChoiceModal.tsx +98 -0
- package/src/components/booking/BookingDialog.module.css +643 -0
- package/src/components/booking/BookingDialog.tsx +356 -0
- package/src/components/booking/BookingFlow.tsx +4385 -0
- package/src/components/booking/BookingFlowCollage.module.css +148 -0
- package/src/components/booking/BookingFlowCollage.tsx +184 -0
- package/src/components/booking/BookingFlowPlaceholder.module.css +27 -0
- package/src/components/booking/BookingFlowPlaceholder.tsx +25 -0
- package/src/components/booking/BookingFlowPreview.tsx +51 -0
- package/src/components/booking/BookingProductGrid.module.css +359 -0
- package/src/components/booking/BookingProductGrid.tsx +497 -0
- package/src/components/booking/Calendar.module.css +616 -0
- package/src/components/{Calendar.tsx → booking/Calendar.tsx} +464 -247
- package/src/components/booking/CancellationPolicySelector.module.css +124 -0
- package/src/components/booking/CancellationPolicySelector.tsx +142 -0
- package/src/components/booking/ChangeBookingDialog.tsx +562 -0
- package/src/components/booking/CheckoutForm.module.css +244 -0
- package/src/components/booking/CheckoutForm.tsx +364 -0
- package/src/components/{CheckoutModal.tsx → booking/CheckoutModal.tsx} +176 -19
- package/src/components/booking/DapFlowCollage.tsx +88 -0
- package/src/components/booking/DapTourDescription.tsx +35 -0
- package/src/components/booking/DependentAddOnBookingDialog.tsx +1350 -0
- package/src/components/booking/DependentAddOnPaymentForm.tsx +124 -0
- package/src/components/booking/InfoTooltip.tsx +108 -0
- package/src/components/booking/ItineraryBox.module.css +258 -0
- package/src/components/booking/ItineraryBox.tsx +550 -0
- package/src/components/{ItineraryBuilder.tsx → booking/ItineraryBuilder.tsx} +1 -2
- package/src/components/booking/ItineraryPlaceholder.module.css +45 -0
- package/src/components/booking/ItineraryPlaceholder.tsx +26 -0
- package/src/components/{MealDrinkAddOnSelector.tsx → booking/MealDrinkAddOnSelector.tsx} +21 -13
- package/src/components/booking/PickupLocationSelector.module.css +124 -0
- package/src/components/{PickupLocationSelector.tsx → booking/PickupLocationSelector.tsx} +315 -290
- package/src/components/booking/PickupTimeSelector.module.css +134 -0
- package/src/components/booking/PickupTimeSelector.tsx +112 -0
- package/src/components/{PriceBreakdown.tsx → booking/PriceBreakdown.tsx} +3 -3
- package/src/components/{PriceSummary.tsx → booking/PriceSummary.tsx} +51 -28
- package/src/components/booking/PrivateShuttleBookingFlow.module.css +357 -0
- package/src/components/booking/PrivateShuttleBookingFlow.tsx +2662 -0
- package/src/components/booking/PromoCodeInput.module.css +166 -0
- package/src/components/booking/PromoCodeInput.tsx +99 -0
- package/src/components/booking/ReturnTimeSelector.module.css +173 -0
- package/src/components/booking/ReturnTimeSelector.tsx +145 -0
- package/src/components/{TermsAcceptance.tsx → booking/TermsAcceptance.tsx} +9 -8
- package/src/components/booking/TicketSelector.module.css +164 -0
- package/src/components/booking/TicketSelector.tsx +199 -0
- package/src/components/booking/TourDescription.module.css +304 -0
- package/src/components/booking/TourDescription.tsx +273 -0
- package/src/components/booking/booking-flow-ui.ts +15 -1
- package/src/components/booking/booking-flow.css +944 -0
- package/src/components/bottom-sheet.module.css +78 -0
- package/src/components/bottom-sheet.tsx +60 -0
- package/src/components/breadcrumb.module.css +40 -0
- package/src/components/breadcrumb.tsx +36 -0
- package/src/components/button.css +245 -0
- package/src/components/button.tsx +152 -0
- package/src/components/client-bottom-sheet.tsx +14 -0
- package/src/components/colorable-svg.tsx +29 -0
- package/src/components/conditional-footer.tsx +27 -0
- package/src/components/contact-us.module.css +147 -0
- package/src/components/contact-us.tsx +49 -0
- package/src/components/email-signup.css +151 -0
- package/src/components/email-signup.tsx +63 -0
- package/src/components/faq-wrapper.module.css +47 -0
- package/src/components/faq-wrapper.tsx +15 -0
- package/src/components/footer.css +187 -0
- package/src/components/footer.tsx +143 -0
- package/src/components/global-simple-modal.tsx +33 -0
- package/src/components/google-review-summary.module.css +77 -0
- package/src/components/google-review-summary.tsx +50 -0
- package/src/components/hero-image.css +13 -0
- package/src/components/hero-image.tsx +44 -0
- package/src/components/image.css +29 -0
- package/src/components/image.tsx +113 -0
- package/src/components/language-aware-link.tsx +72 -0
- package/src/components/language-switcher.module.css +124 -0
- package/src/components/language-switcher.tsx +75 -0
- package/src/components/map-section.css +59 -0
- package/src/components/map-section.tsx +63 -0
- package/src/components/navbar.module.css +152 -0
- package/src/components/navbar.tsx +125 -0
- package/src/components/parallax-provider.tsx +11 -0
- package/src/components/partner/PartnerBookingPage.module.css +130 -0
- package/src/components/partner/PartnerBookingPage.tsx +390 -0
- package/src/components/partner/PartnerBookingPageWithBrowserMetadata.tsx +19 -35
- package/src/components/product-tag.module.css +30 -0
- package/src/components/product-tag.tsx +34 -0
- package/src/components/product-theme-pages/best-option.module.css +70 -0
- package/src/components/product-theme-pages/best-option.tsx +35 -0
- package/src/components/product-theme-pages/extended-tour-options.module.css +22 -0
- package/src/components/product-theme-pages/extended-tour-options.tsx +11 -0
- package/src/components/product-theme-pages/image-modal.tsx +248 -0
- package/src/components/product-theme-pages/photo-gallery.module.css +200 -0
- package/src/components/product-theme-pages/photo-gallery.tsx +90 -0
- package/src/components/product-theme-pages/product-theme-page-layout.module.css +13 -0
- package/src/components/product-theme-pages/product-theme-page-layout.tsx +67 -0
- package/src/components/product-theme-pages/top-of-fold.module.css +179 -0
- package/src/components/product-theme-pages/top-of-fold.tsx +80 -0
- package/src/components/product-tile/image-only-product-tile-desktop.module.css +106 -0
- package/src/components/product-tile/image-only-product-tile-desktop.tsx +56 -0
- package/src/components/product-tile/image-only-product-tile-mobile.module.css +122 -0
- package/src/components/product-tile/image-only-product-tile-mobile.tsx +89 -0
- package/src/components/product-tile/image-only-product-tile.tsx +44 -0
- package/src/components/product-tile/product-tile-card.module.css +84 -0
- package/src/components/product-tile/product-tile-card.tsx +61 -0
- package/src/components/review-highlights-section.css +85 -0
- package/src/components/review-highlights-section.tsx +127 -0
- package/src/components/season-closure-overlay.module.css +99 -0
- package/src/components/season-closure-overlay.tsx +98 -0
- package/src/components/simple-modal.tsx +69 -0
- package/src/components/simple-top-of-fold.module.css +76 -0
- package/src/components/simple-top-of-fold.tsx +34 -0
- package/src/components/spacer.css +41 -0
- package/src/components/spacer.tsx +23 -0
- package/src/components/star-rating.module.css +74 -0
- package/src/components/star-rating.tsx +48 -0
- package/src/components/terms/TermsContent.tsx +178 -0
- package/src/components/title-subtitle.module.css +10 -0
- package/src/components/title-subtitle.tsx +30 -0
- package/src/components/translatable-reviews.tsx +75 -0
- package/src/components/value-pill.module.css +59 -0
- package/src/components/value-pill.tsx +46 -0
- package/src/components/value-props.css +185 -0
- package/src/components/value-props.tsx +88 -0
- package/src/constants/booking-guide-quiz.ts +64 -0
- package/src/constants/contact-info.ts +2 -0
- package/src/constants/faq.ts +44 -0
- package/src/constants/images.ts +556 -0
- package/src/constants/json-ld/faq-json-ld.tsx +170 -0
- package/src/constants/json-ld/homepage-json-ld.tsx +138 -0
- package/src/constants/json-ld/job-posting-json-ld.tsx +92 -0
- package/src/constants/json-ld/organization-json-ld.tsx +62 -0
- package/src/constants/json-ld/page-json-ld.tsx +6 -0
- package/src/constants/json-ld/product-json-ld.tsx +154 -0
- package/src/constants/json-ld/review-json-ld.tsx +377 -0
- package/src/constants/navigation-links/footer-links.ts +48 -0
- package/src/constants/navigation-links/nav-bar-links.ts +41 -0
- package/src/constants/navigation-links/navigation-link.ts +6 -0
- package/src/constants/pill-values.ts +210 -0
- package/src/constants/products.ts +155 -0
- package/src/constants/quiz-recommendations.ts +506 -0
- package/src/constants/reviews.ts +75 -0
- package/src/constants/staff.ts +197 -0
- package/src/constants/value-props.ts +58 -0
- package/src/data/dap-descriptions/session-couples-families-friends.en.json +61 -0
- package/src/data/dap-descriptions/session-elopements.en.json +60 -0
- package/src/data/dap-descriptions/session-proposals.en.json +60 -0
- package/src/data/product-descriptions/afternoon-delight.en.json +35 -0
- package/src/data/product-descriptions/emerald-lake-escape.en.json +68 -0
- package/src/data/product-descriptions/lake-louise-adventure.en.json +74 -0
- package/src/data/product-descriptions/moraine-lake-adventure.en.json +78 -0
- package/src/data/product-descriptions/moraine-lake-sunrise-lake-louise-golden-hour.en.json +65 -0
- package/src/data/product-descriptions/moraine-lake-sunrise.en.json +64 -0
- package/src/data/product-descriptions/private-tour.en.json +80 -0
- package/src/data/product-descriptions/two-lakes-combo.en.json +65 -0
- package/src/data/products-config.json +101 -0
- package/src/hooks/use-bottom-sheet.tsx +15 -0
- package/src/hooks/use-simple-modal.tsx +27 -0
- package/src/hooks/useBookingSourceMetadataFromLocation.ts +21 -0
- package/src/hooks/useEmailSubscription.tsx +103 -0
- package/src/hooks/useEmbeddedInIframe.ts +16 -0
- package/src/hooks/useIsBookingLaunchLive.ts +49 -0
- package/src/hooks/useQuiz.tsx +210 -0
- package/src/index.ts +27 -2
- package/src/lib/analytics.ts +197 -0
- package/src/lib/booking/booking-source.ts +20 -2
- package/src/lib/{checkout-breakdown.ts → booking/checkout-breakdown.ts} +1 -1
- package/src/lib/booking/correlation-id.ts +46 -0
- package/src/lib/{i18n → booking/i18n}/messages/en.json +48 -4
- package/src/lib/{i18n → booking/i18n}/messages/fr.json +48 -4
- package/src/lib/booking/itinerary-display.ts +36 -0
- package/src/lib/{itinerary-labels.ts → booking/itinerary-labels.ts} +1 -1
- package/src/lib/{location-calculations.ts → booking/location-calculations.ts} +4 -4
- package/src/lib/{location-utils.ts → booking/location-utils.ts} +26 -0
- package/src/lib/{map-utils.ts → booking/map-utils.ts} +3 -3
- package/src/lib/booking/normalize-booking-product-id.ts +7 -0
- package/src/lib/{pickup-location-types.ts → booking/pickup-location-types.ts} +2 -2
- package/src/lib/{pricing.ts → booking/pricing.ts} +2 -2
- package/src/lib/booking/product-option-id.ts +35 -0
- package/src/lib/booking/source-metadata.ts +72 -7
- package/src/lib/booking/sunday-week.ts +14 -0
- package/src/lib/booking/trace-context.ts +62 -0
- package/src/lib/booking-api.ts +1793 -0
- package/src/lib/{constants.ts → booking-constants.ts} +11 -5
- package/src/lib/booking-types.ts +36 -0
- package/src/lib/currency.ts +38 -45
- package/src/lib/dap-descriptions.ts +50 -0
- package/src/lib/dap-itinerary-preview.ts +315 -0
- package/src/lib/dependent-add-on-api.ts +434 -0
- package/src/lib/env.ts +89 -5
- package/src/lib/firebase.ts +20 -0
- package/src/lib/job-application-api.ts +83 -0
- package/src/lib/manage-booking-embed-print.ts +16 -0
- package/src/lib/manage-booking-post-checkout.ts +68 -0
- package/src/lib/photo-dap-config.ts +228 -0
- package/src/lib/pickup/map-utils.ts +56 -0
- package/src/lib/pickup/marker-icons.ts +19 -0
- package/src/lib/product-descriptions.ts +66 -0
- package/src/lib/products-config.ts +73 -0
- package/src/providers/booking-dialog-provider.tsx +107 -38
- package/src/providers/bottom-sheet-provider.tsx +40 -0
- package/src/providers/dependent-add-on-dialog-provider.tsx +105 -0
- package/src/radius.css +5 -0
- package/src/spacing.css +7 -0
- package/src/strings/en.json +1774 -0
- package/src/strings/es.json +1573 -0
- package/src/strings/fr.json +1573 -0
- package/src/strings/index.js +23 -0
- package/src/text-style.css +97 -0
- package/src/types/fareharbor.d.ts +12 -0
- package/src/types/quiz.ts +59 -0
- package/src/utils/currency-converter.ts +101 -0
- package/src/components/BookingFlow.tsx +0 -2952
- package/src/components/LanguageSwitcher.tsx +0 -30
- package/src/components/PrivateShuttleBookingFlow.tsx +0 -2290
- package/src/components/ProductList.tsx +0 -78
- package/src/components/WhatsAppPhoneInput.tsx +0 -224
- package/src/components/index.ts +0 -31
- package/src/lib/api.ts +0 -801
- package/src/lib/booking-api-auth.ts +0 -9
- package/src/lib/checkout-breakdown.test.ts +0 -70
- package/src/types/google-maps.d.ts +0 -2
- /package/src/components/{CurrencySwitcher.tsx → booking/CurrencySwitcher.tsx} +0 -0
- /package/src/components/{ErrorBoundary.tsx → booking/ErrorBoundary.tsx} +0 -0
- /package/src/lib/{i18n → booking/i18n}/config.ts +0 -0
- /package/src/lib/{i18n → booking/i18n}/index.tsx +0 -0
- /package/src/lib/{marker-icons.ts → booking/marker-icons.ts} +0 -0
- /package/src/lib/{places-api.ts → booking/places-api.ts} +0 -0
- /package/src/lib/{theme.ts → booking/theme.ts} +0 -0
- /package/src/lib/{utils.ts → booking/utils.ts} +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
.value-props-container {
|
|
2
|
+
padding: var(--spacing-medium);
|
|
3
|
+
background-color: var(--light-orange-background);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.value-props-inner {
|
|
7
|
+
max-width: 1200px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.title-subtitle-container {
|
|
12
|
+
padding: var(--spacing-small);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.value-props-grid {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: repeat(2, 1fr);
|
|
18
|
+
gap: 16px;
|
|
19
|
+
max-width: 1200px;
|
|
20
|
+
margin: 0 auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.value-prop-card:last-child:nth-child(odd) {
|
|
24
|
+
grid-column: 1 / -1;
|
|
25
|
+
max-width: 350px;
|
|
26
|
+
margin: 0 auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (min-width: 768px) {
|
|
30
|
+
.value-props-grid {
|
|
31
|
+
gap: 24px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.value-prop-card {
|
|
35
|
+
padding: 24px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.value-prop-icon-wrapper {
|
|
39
|
+
width: 56px;
|
|
40
|
+
height: 56px;
|
|
41
|
+
margin: 0 auto 20px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.value-prop-heading {
|
|
45
|
+
font-size: 20px;
|
|
46
|
+
margin-bottom: 12px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (min-width: 1024px) {
|
|
51
|
+
.value-props-grid {
|
|
52
|
+
grid-template-columns: repeat(3, 1fr);
|
|
53
|
+
gap: 32px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.value-prop-card {
|
|
57
|
+
padding: 32px;
|
|
58
|
+
min-height: 280px;
|
|
59
|
+
gap: 16px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.value-prop-icon-wrapper {
|
|
63
|
+
width: 64px;
|
|
64
|
+
height: 64px;
|
|
65
|
+
margin: 0 auto 24px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.value-prop-heading {
|
|
69
|
+
font-size: 28px;
|
|
70
|
+
margin-bottom: 16px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.value-prop-card:last-child:nth-child(odd) {
|
|
74
|
+
grid-column: auto;
|
|
75
|
+
max-width: none;
|
|
76
|
+
margin: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.value-prop-card:nth-last-child(2):nth-child(4),
|
|
80
|
+
.value-prop-card:last-child:nth-child(5) {
|
|
81
|
+
transform: translateX(50%);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.value-prop-card {
|
|
86
|
+
background: white;
|
|
87
|
+
padding: 8px 16px;
|
|
88
|
+
border-radius: 16px;
|
|
89
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
90
|
+
min-height: 200px;
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
gap: 8px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.value-prop-icon-wrapper {
|
|
99
|
+
width: 48px;
|
|
100
|
+
height: 48px;
|
|
101
|
+
margin: 0 auto 8px;
|
|
102
|
+
text-align: center;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.value-prop-icon {
|
|
106
|
+
width: 48px;
|
|
107
|
+
height: 48px;
|
|
108
|
+
|
|
109
|
+
@media (min-width: 768px) {
|
|
110
|
+
width: 80px;
|
|
111
|
+
height: 80px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.value-prop-icon-wrapper {
|
|
116
|
+
@media (min-width: 768px) {
|
|
117
|
+
width: 80px;
|
|
118
|
+
height: 80px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.value-prop-heading {
|
|
123
|
+
font-size: 18px;
|
|
124
|
+
margin-bottom: 8px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (max-width: 768px) {
|
|
128
|
+
.value-props-grid {
|
|
129
|
+
display: grid !important;
|
|
130
|
+
grid-template-columns: repeat(3, 1fr) !important;
|
|
131
|
+
gap: 8px !important;
|
|
132
|
+
max-width: none !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.value-prop-card {
|
|
136
|
+
padding: 8px 8px !important;
|
|
137
|
+
min-height: 120px !important;
|
|
138
|
+
gap: 4px !important;
|
|
139
|
+
grid-column: auto !important;
|
|
140
|
+
max-width: none !important;
|
|
141
|
+
margin: 0 !important;
|
|
142
|
+
transform: none !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.value-prop-description {
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.value-prop-icon-wrapper {
|
|
150
|
+
width: 48px;
|
|
151
|
+
height: 48px;
|
|
152
|
+
margin: 0 auto 6px;
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.value-prop-heading {
|
|
159
|
+
font-size: 14px;
|
|
160
|
+
margin-bottom: 4px;
|
|
161
|
+
text-align: center;
|
|
162
|
+
word-wrap: break-word;
|
|
163
|
+
hyphens: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.value-prop-icon {
|
|
167
|
+
margin: 0 !important;
|
|
168
|
+
display: block !important;
|
|
169
|
+
width: 48px !important;
|
|
170
|
+
height: 48px !important;
|
|
171
|
+
flex-shrink: 0 !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.value-prop-icon svg {
|
|
175
|
+
margin: 0 !important;
|
|
176
|
+
display: block !important;
|
|
177
|
+
width: 48px !important;
|
|
178
|
+
height: 48px !important;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.value-prop-icon div {
|
|
182
|
+
width: 48px !important;
|
|
183
|
+
height: 48px !important;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './value-props.css';
|
|
4
|
+
import dynamic from 'next/dynamic';
|
|
5
|
+
import TitleSubtitle from '@/components/title-subtitle';
|
|
6
|
+
import { VALUE_PROPS_KEYS, animations } from '@/constants/value-props';
|
|
7
|
+
|
|
8
|
+
// Dynamically import Lottie with no SSR
|
|
9
|
+
const Lottie = dynamic(() => import("lottie-react"), { ssr: false });
|
|
10
|
+
|
|
11
|
+
interface ValuePropsProps {
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
filterKeys?: string[];
|
|
15
|
+
className?: string;
|
|
16
|
+
strings: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function ValueProps({ title, description, filterKeys, className, strings }: ValuePropsProps) {
|
|
20
|
+
// Generate value props dynamically from strings
|
|
21
|
+
const generateValueProps = () => {
|
|
22
|
+
const valuePropsMap = {
|
|
23
|
+
[VALUE_PROPS_KEYS.SMALL_GROUPS]: { animationKey: 'smallGroups' as const },
|
|
24
|
+
[VALUE_PROPS_KEYS.COZY_BLANKETS]: { animationKey: 'cozyBlankets' as const },
|
|
25
|
+
[VALUE_PROPS_KEYS.HOT_DRINKS]: { animationKey: 'hotDrinks' as const },
|
|
26
|
+
[VALUE_PROPS_KEYS.PHOTO_TOURS]: { animationKey: 'photoTours' as const },
|
|
27
|
+
[VALUE_PROPS_KEYS.LOCAL_GUIDES]: { animationKey: 'localGuides' as const },
|
|
28
|
+
[VALUE_PROPS_KEYS.CONVENIENT_PICKUP]: { animationKey: 'convenientPickup' as const },
|
|
29
|
+
[VALUE_PROPS_KEYS.DIRECT_ACCESS]: { animationKey: 'directAccess' as const },
|
|
30
|
+
[VALUE_PROPS_KEYS.AVOID_PAID_PARKING]: { animationKey: 'avoidPaidParking' as const },
|
|
31
|
+
[VALUE_PROPS_KEYS.FLEXIBLE_CANCELLATION]: { animationKey: 'flexibleCancellation' as const },
|
|
32
|
+
[VALUE_PROPS_KEYS.MULTIPLE_LOCATIONS]: { animationKey: 'multipleLocations' as const },
|
|
33
|
+
[VALUE_PROPS_KEYS.NO_PARKING_STRUGGLES]: { animationKey: 'noParkingStruggles' as const },
|
|
34
|
+
[VALUE_PROPS_KEYS.YOUR_PRIVATE_GROUP]: { animationKey: 'threeFriends' as const },
|
|
35
|
+
[VALUE_PROPS_KEYS.CUSTOMIZED_ITINERARY]: { animationKey: 'map' as const },
|
|
36
|
+
[VALUE_PROPS_KEYS.DOORSTEP_PICKUP]: { animationKey: 'convenientPickup' as const },
|
|
37
|
+
[VALUE_PROPS_KEYS.CAPTURE_THE_MOMENT]: { animationKey: 'photoTours' as const },
|
|
38
|
+
[VALUE_PROPS_KEYS.COZY_COMFORT]: { animationKey: 'cozyBlankets' as const },
|
|
39
|
+
[VALUE_PROPS_KEYS.PERSONAL_GUIDES]: { animationKey: 'localGuides' as const }
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return Object.entries(valuePropsMap).map(([key, { animationKey }]) => ({
|
|
43
|
+
key,
|
|
44
|
+
animationKey,
|
|
45
|
+
title: strings.valueProps[key as keyof typeof strings.valueProps].title,
|
|
46
|
+
description: strings.valueProps[key as keyof typeof strings.valueProps].description
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const allValueProps = generateValueProps();
|
|
51
|
+
const displayedProps = filterKeys
|
|
52
|
+
? allValueProps.filter(prop => filterKeys.includes(prop.key))
|
|
53
|
+
: allValueProps;
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<section className={`value-props-container ${className}`}>
|
|
57
|
+
<div className="value-props-inner">
|
|
58
|
+
<div className="title-subtitle-container">
|
|
59
|
+
{title && (
|
|
60
|
+
<TitleSubtitle
|
|
61
|
+
title={title}
|
|
62
|
+
description={description}
|
|
63
|
+
/>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
<div className="value-props-grid">
|
|
67
|
+
{displayedProps.map((prop) => (
|
|
68
|
+
<div key={prop.key} className="value-prop-card">
|
|
69
|
+
<div className="value-prop-icon-wrapper">
|
|
70
|
+
<Lottie
|
|
71
|
+
animationData={animations[prop.animationKey]}
|
|
72
|
+
loop={true}
|
|
73
|
+
className="value-prop-icon"
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
<h3 className="value-prop-heading">
|
|
77
|
+
{prop.title}
|
|
78
|
+
</h3>
|
|
79
|
+
<p className="value-prop-description">
|
|
80
|
+
{prop.description}
|
|
81
|
+
</p>
|
|
82
|
+
</div>
|
|
83
|
+
))}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</section>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { QuizQuestion } from "@/types/quiz";
|
|
2
|
+
import { IMAGES } from "./images";
|
|
3
|
+
|
|
4
|
+
export const QUIZ_QUESTIONS: QuizQuestion[] = [
|
|
5
|
+
{
|
|
6
|
+
id: "what_lakes",
|
|
7
|
+
text: "What do you want to see during your visit to Banff National Park? Select all that apply.",
|
|
8
|
+
subtitle: "It is possible to see multiple lakes in one day, we'll recommend the best way to combine them.",
|
|
9
|
+
answers: [
|
|
10
|
+
{
|
|
11
|
+
id: "moraine_lake",
|
|
12
|
+
text: "Moraine Lake",
|
|
13
|
+
image: IMAGES.MORAINE_LAKE_SUNRISE
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "lake_louise",
|
|
17
|
+
text: "Lake Louise",
|
|
18
|
+
image: IMAGES.LAKE_LOUISE
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "emerald_lake",
|
|
22
|
+
text: "Emerald Lake",
|
|
23
|
+
image: IMAGES.EMERALD_LAKE
|
|
24
|
+
},
|
|
25
|
+
{ id: "other_custom", text: "Other (you want a custom itinerary)" }
|
|
26
|
+
],
|
|
27
|
+
isMultiSelect: true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "sunrise",
|
|
31
|
+
text: "Do you want to see the infamous Moraine Lake sunrise?",
|
|
32
|
+
answers: [
|
|
33
|
+
{ id: "yes", text: "Yes, I want to see the sunrise", subtext: "🐦 Early bird gets the worm!" },
|
|
34
|
+
{ id: "no", text: "No, I don't want to see the sunrise", subtext: "😴 I need my beauty rest" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "what_activities",
|
|
39
|
+
text: "What activities are you interested in? Select all that apply.",
|
|
40
|
+
subtitle: "It's possible to do multiple activities in one day! We'll recommend the best way to combine them.",
|
|
41
|
+
answers: [
|
|
42
|
+
{ id: "banff_bucket_list", text: "Banff Bucket List" },
|
|
43
|
+
{ id: "hiking", text: "Hiking" },
|
|
44
|
+
{ id: "photography", text: "Photography" },
|
|
45
|
+
{ id: "canoeing", text: "Canoeing" },
|
|
46
|
+
{ id: "relaxation", text: "Relaxation" }
|
|
47
|
+
],
|
|
48
|
+
isMultiSelect: true
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "hiking",
|
|
52
|
+
text: "What type of hikes are you interested in?",
|
|
53
|
+
answers: [
|
|
54
|
+
{ id: "easy_short_hikes", text: "Easy short hikes", subtext: "<=1 hour or 2.5km (1.5mi)" },
|
|
55
|
+
{ id: "moderate_hikes", text: "Moderate hikes", subtext: "1-2 hours or 3-6km (2-4mi)" },
|
|
56
|
+
{ id: "challenging_hikes", text: "Challenging hikes", subtext: ">2 hours or >6km (4mi)" },
|
|
57
|
+
{ id: "expert_hikes", text: "Expert hikes", subtext: ">5 hours or >10km (6mi)" }
|
|
58
|
+
],
|
|
59
|
+
showIf: (answers) => {
|
|
60
|
+
const activities = answers["what_activities"];
|
|
61
|
+
return Array.isArray(activities) ? activities.includes("hiking") : activities === "hiking";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export enum faqPages {
|
|
2
|
+
HOME = "HOME",
|
|
3
|
+
SUNRISE = "SUNRISE",
|
|
4
|
+
MORAINE_LAKE = "MORAINE_LAKE",
|
|
5
|
+
LAKE_LOUISE = "LAKE_LOUISE",
|
|
6
|
+
EMERALD_LAKE = "EMERALD_LAKE",
|
|
7
|
+
PRIVATE_SHUTTLES = "PRIVATE_SHUTTLES"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type faqSection = {
|
|
11
|
+
title: string | null;
|
|
12
|
+
items: faqItem[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type faqItem = {
|
|
16
|
+
question: string;
|
|
17
|
+
answer: string;
|
|
18
|
+
pagesIncluded: faqPages[];
|
|
19
|
+
priority?: number; // Optional priority number for ordering (lower numbers = higher priority)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const getAllFAQSections = (strings: any): faqSection[] => {
|
|
23
|
+
return strings.faq.sections;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const getFAQSectionByFAQPage = (faqPage: faqPages, strings: any): faqSection | undefined => {
|
|
27
|
+
const allFAQSections: faqSection[] = strings.faq.sections;
|
|
28
|
+
|
|
29
|
+
const filteredItems = allFAQSections.flatMap(section => section.items.filter(item =>
|
|
30
|
+
item.pagesIncluded.includes(faqPage)
|
|
31
|
+
));
|
|
32
|
+
|
|
33
|
+
// Sort items by priority (lower numbers = higher priority, undefined priority = lowest priority)
|
|
34
|
+
const sortedItems = filteredItems.sort((a, b) => {
|
|
35
|
+
const priorityA = a.priority ?? Number.MAX_SAFE_INTEGER;
|
|
36
|
+
const priorityB = b.priority ?? Number.MAX_SAFE_INTEGER;
|
|
37
|
+
return priorityA - priorityB;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
title: '',
|
|
42
|
+
items: sortedItems
|
|
43
|
+
}
|
|
44
|
+
};
|