@qite/tide-booking-component 1.4.110 → 1.4.112

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 (58) hide show
  1. package/build/build-cjs/index.js +2301 -1565
  2. package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
  3. package/build/build-cjs/src/search-results/components/book-packaging-entry/index.d.ts +1 -0
  4. package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +3 -1
  5. package/build/build-cjs/src/search-results/types.d.ts +3 -0
  6. package/build/build-cjs/src/shared/booking/shared-confirmation.d.ts +25 -0
  7. package/build/build-cjs/src/shared/booking/summary.d.ts +43 -0
  8. package/build/build-cjs/src/shared/booking/travelers-form.d.ts +93 -0
  9. package/build/build-cjs/src/shared/utils/booking-summary.d.ts +1 -0
  10. package/build/build-cjs/src/shared/utils/localization-util.d.ts +6 -0
  11. package/build/build-esm/index.js +2198 -1463
  12. package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
  13. package/build/build-esm/src/search-results/components/book-packaging-entry/index.d.ts +1 -0
  14. package/build/build-esm/src/search-results/store/search-results-slice.d.ts +3 -1
  15. package/build/build-esm/src/search-results/types.d.ts +3 -0
  16. package/build/build-esm/src/shared/booking/shared-confirmation.d.ts +25 -0
  17. package/build/build-esm/src/shared/booking/summary.d.ts +43 -0
  18. package/build/build-esm/src/shared/booking/travelers-form.d.ts +93 -0
  19. package/build/build-esm/src/shared/utils/booking-summary.d.ts +1 -0
  20. package/build/build-esm/src/shared/utils/localization-util.d.ts +6 -0
  21. package/package.json +2 -2
  22. package/src/booking-wizard/components/step-indicator.tsx +1 -1
  23. package/src/booking-wizard/components/step-route.tsx +1 -1
  24. package/src/booking-wizard/features/confirmation/confirmation.tsx +11 -55
  25. package/src/booking-wizard/features/sidebar/index.tsx +1 -1
  26. package/src/booking-wizard/features/summary/summary.tsx +1 -1
  27. package/src/booking-wizard/features/travelers-form/travelers-form.tsx +84 -1010
  28. package/src/search-results/components/book-packaging-entry/index.tsx +201 -21
  29. package/src/search-results/components/book-packaging-entry/wl-sidebar.tsx +1 -4
  30. package/src/search-results/components/group-tour/group-tour-card.tsx +1 -1
  31. package/src/search-results/components/group-tour/group-tour-results.tsx +1 -1
  32. package/src/search-results/components/search-results-container/search-results-container.tsx +40 -14
  33. package/src/search-results/store/search-results-slice.ts +8 -2
  34. package/src/search-results/types.ts +4 -0
  35. package/src/shared/booking/{BookingPanel.tsx → booking-panel.tsx} +1 -1
  36. package/src/shared/booking/shared-confirmation.tsx +105 -0
  37. package/src/shared/booking/summary.tsx +380 -0
  38. package/src/shared/booking/travelers-form.tsx +868 -0
  39. package/src/shared/components/flyin/flyin.tsx +8 -9
  40. package/src/shared/components/flyin/packaging-flights-flyin.tsx +4 -4
  41. package/src/shared/utils/booking-summary.tsx +46 -0
  42. package/src/shared/utils/tide-api-utils.ts +2 -2
  43. package/styles/components/_booking.scss +33 -15
  44. package/styles/components/_cta.scss +2 -2
  45. package/styles/components/_dropdown.scss +5 -0
  46. package/styles/components/_flight-option.scss +1 -1
  47. package/styles/components/_flyin.scss +43 -0
  48. package/styles/components/_search.scss +5 -0
  49. package/styles/components/_step-indicators.scss +41 -15
  50. package/styles/components/_tree.scss +2 -2
  51. /package/build/build-cjs/src/shared/booking/{BookingPanel.d.ts → booking-panel.d.ts} +0 -0
  52. /package/build/build-cjs/src/shared/booking/{Sidebar.d.ts → shared-sidebar.d.ts} +0 -0
  53. /package/build/build-cjs/src/shared/booking/{StepIndicators.d.ts → step-indicators.d.ts} +0 -0
  54. /package/build/build-esm/src/shared/booking/{BookingPanel.d.ts → booking-panel.d.ts} +0 -0
  55. /package/build/build-esm/src/shared/booking/{Sidebar.d.ts → shared-sidebar.d.ts} +0 -0
  56. /package/build/build-esm/src/shared/booking/{StepIndicators.d.ts → step-indicators.d.ts} +0 -0
  57. /package/src/shared/booking/{Sidebar.tsx → shared-sidebar.tsx} +0 -0
  58. /package/src/shared/booking/{StepIndicators.tsx → step-indicators.tsx} +0 -0
@@ -127,11 +127,10 @@ const FlyIn: React.FC<FlyInProps> = ({
127
127
 
128
128
  return (
129
129
  <div
130
- className={`flyin ${isOpen ? 'flyin--active' : ''} ${className} ${
131
- isPackageEditFlow || flyInType === 'flight-outward-results' || flyInType === 'flight-return-results' || flyInType === 'acco-results'
132
- ? 'flyin--large'
133
- : ''
134
- } ${flyInType === 'excursion-results' || flyInType === 'excursion-details' ? 'flyin--medium' : ''}`}>
130
+ className={`flyin ${isOpen ? 'flyin--active' : ''} ${className} ${isPackageEditFlow || flyInType === 'acco-results' ? 'flyin--large' : ''} ${
131
+ flyInType === 'excursion-results' || flyInType === 'excursion-details' ? 'flyin--medium' : ''
132
+ }
133
+ ${flyInType === 'flight-outward-results' || flyInType === 'flight-return-results' ? 'flyin--flight' : ''}`}>
135
134
  <div className={`flyin__panel ${isOpen ? 'flyin__panel--active' : ''}`} ref={panelRef}>
136
135
  <div className="flyin__content">
137
136
  <div className="flyin__content-title-row">
@@ -179,6 +178,10 @@ const FlyIn: React.FC<FlyInProps> = ({
179
178
  />
180
179
  <div className="search__results__wrapper">
181
180
  <div className="search__result-row">
181
+ <div className="cta cta--filter" onClick={() => toggleFilters && toggleFilters()}>
182
+ <Icon name="ui-filter" className="mobile-filters-button__icon" height={16} />
183
+ {translations.SRP.FILTERS}
184
+ </div>
182
185
  <span className="search__result-row-text">
183
186
  {!isLoading && (
184
187
  <>
@@ -187,10 +190,6 @@ const FlyIn: React.FC<FlyInProps> = ({
187
190
  </>
188
191
  )}
189
192
  </span>
190
- <div className="cta cta--filter" onClick={() => toggleFilters && toggleFilters()}>
191
- <Icon name="ui-filter" className="mobile-filters-button__icon" height={16} />
192
- {translations.SRP.FILTERS}
193
- </div>
194
193
  {sortByTypes && sortByTypes.length > 0 && (
195
194
  <div className="search__result-row-filter">
196
195
  <ItemPicker
@@ -98,14 +98,14 @@ const PackageingFlightsFlyIn: React.FC<FlightsFlyInProps> = ({ isOpen, setIsOpen
98
98
  />
99
99
  <div className="search__results__wrapper">
100
100
  <div className="search__result-row">
101
- <span className="search__result-row-text">
102
- {uniqueOutwardFlights?.length && uniqueOutwardFlights.length}
103
- &nbsp;{translations.FLIGHTS_FORM.FLIGHTS_FOUND_2}&nbsp;{translations.FLIGHTS_FORM.FLIGHTS_FOUND_3}
104
- </span>
105
101
  <div className="cta cta--filter" onClick={() => toggleFilters && toggleFilters()}>
106
102
  <Icon name="ui-filter" className="mobile-filters-button__icon" height={16} />
107
103
  {translations.SRP.FILTERS}
108
104
  </div>
105
+ <span className="search__result-row-text">
106
+ {uniqueOutwardFlights?.length && uniqueOutwardFlights.length}
107
+ &nbsp;{translations.FLIGHTS_FORM.FLIGHTS_FOUND_2}&nbsp;{translations.FLIGHTS_FORM.FLIGHTS_FOUND_3}
108
+ </span>
109
109
  {sortByTypes && sortByTypes.length > 0 && (
110
110
  <div className="search__result-row-filter">
111
111
  <ItemPicker
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import { compact, groupBy, isEmpty } from 'lodash';
3
+ import { getDateText } from '../../booking-wizard/features/sidebar/sidebar-util';
4
+
5
+ export const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry: any, priceDetails: any, translations: any) => {
6
+ const priceDetailsByProduct = groupBy(priceDetails?.details ?? [], (detail: any) => `${detail.productCode}|${detail.accommodationCode}`);
7
+
8
+ return (editablePackagingEntry?.lines ?? []).map((line: any) => {
9
+ const groupedPriceDetails = priceDetailsByProduct[`${line.productCode}|${line.accommodationCode}`] ?? [];
10
+ const visiblePriceDetails = groupedPriceDetails.filter((detail: any) => detail.showPrice || detail.isSeparate);
11
+
12
+ return (
13
+ <li key={line.guid}>
14
+ <h6>{line.productName}</h6>
15
+ <ul>
16
+ <li className="list__item">{compact([line.accommodationName, line.regimeName]).join(', ')}</li>
17
+
18
+ {line.flightInformation?.flightLines?.map((flightLine: any, index: number) => (
19
+ <li className="list__item" key={`${line.guid}-${index}`}>
20
+ {flightLine.departureAirportCode} {flightLine.departureTime?.slice(0, 5)} &gt; {flightLine.arrivalAirportCode}{' '}
21
+ {flightLine.arrivalTime?.slice(0, 5)} ({flightLine.operatingFlightNumber || `${flightLine.airlineCode}${flightLine.flightNumber}`})
22
+ </li>
23
+ ))}
24
+
25
+ {!isEmpty(visiblePriceDetails) &&
26
+ visiblePriceDetails.map((detail: any, index: number) => (
27
+ <li className="list__item" key={`${line.guid}-price-${index}`}>
28
+ {detail.priceDescription}: {detail.total?.toLocaleString(undefined, { style: 'currency', currency: 'EUR' })}
29
+ </li>
30
+ ))}
31
+ </ul>
32
+ <p>
33
+ (
34
+ {line.from === line.to ? (
35
+ getDateText(line.from)
36
+ ) : (
37
+ <>
38
+ {getDateText(line.from)} &gt; {getDateText(line.to)}
39
+ </>
40
+ )}
41
+ )
42
+ </p>
43
+ </li>
44
+ );
45
+ });
46
+ };
@@ -11,8 +11,8 @@ export const tideConnection = {
11
11
  };
12
12
 
13
13
  export function buildTideClientConfig(settings?: ApiSettingsState): TideClientConfig {
14
- const HOST = settings?.apiUrl || process.env.REACT_APP_BOOKING_HOST;
15
- const API_KEY = settings?.apiKey || process.env.REACT_APP_BOOKING_API_KEY;
14
+ const HOST = settings?.apiUrl || tideConnection.host;
15
+ const API_KEY = settings?.apiKey || tideConnection.apiKey;
16
16
  const token = selectAgentToken();
17
17
 
18
18
  if (isNil(HOST)) {
@@ -44,17 +44,23 @@
44
44
 
45
45
  &__navigator {
46
46
  gap: 15px;
47
+ position: fixed;
48
+ bottom: 0;
49
+ left: 0;
50
+ background-color: var(--tide-booking-white);
51
+ // outline: 2px solid var(--tide-booking-bg);
52
+ z-index: 11;
53
+ width: 100%;
47
54
 
48
55
  @include row--xs;
49
56
  justify-content: flex-end;
50
- padding: 0 15px;
51
- padding-top: 30px;
52
- padding-bottom: 60px;
53
- // background-color: $gray-light;
57
+ align-items: center;
58
+ padding: 15px;
54
59
 
55
60
  @include media-lg {
56
- padding: 0 15px;
57
- padding-top: 50px;
61
+ position: relative;
62
+ padding: 30px 15px;
63
+ background: var(--tide-booking-transparent);
58
64
  }
59
65
 
60
66
  .cta--secondary {
@@ -64,11 +70,17 @@
64
70
  margin-right: auto;
65
71
  }
66
72
  }
73
+
74
+ button {
75
+ @include media-xs {
76
+ max-width: 150px;
77
+ }
78
+ }
67
79
  }
68
80
 
69
81
  &__panel {
70
- width: 1200px;
71
- max-width: 100%;
82
+ width: 100%;
83
+ max-width: 1200px;
72
84
  @include column;
73
85
  border-radius: 15px * 0.3;
74
86
 
@@ -79,6 +91,14 @@
79
91
  @include media-xl {
80
92
  padding-right: 40px;
81
93
  }
94
+
95
+ &__wrapper {
96
+ margin-bottom: 155px;
97
+
98
+ @include media-lg {
99
+ margin-bottom: 0px;
100
+ }
101
+ }
82
102
  }
83
103
 
84
104
  &__panel-heading {
@@ -221,8 +241,8 @@
221
241
  &__sidebar {
222
242
  position: fixed;
223
243
  width: calc(100% - 0px);
224
- max-height: calc(100vh - 90px);
225
- bottom: 0;
244
+ max-height: calc(100dvh - 90px);
245
+ bottom: 75px;
226
246
  right: 0;
227
247
  transform: translate3D(0, calc(100% - 80px), 0);
228
248
  margin-left: auto;
@@ -240,11 +260,10 @@
240
260
  @include media-lg {
241
261
  position: sticky;
242
262
  width: 400px;
243
- max-height: none;
263
+ height: calc(100vh - 86px);
244
264
  top: 40px;
245
265
  bottom: initial;
246
266
  transform: none;
247
- min-height: 93vh;
248
267
  }
249
268
 
250
269
  .booking__product-heading {
@@ -256,7 +275,6 @@
256
275
  &__sidebar-frame {
257
276
  border-radius: var(--tide-booking-sidebar-frame-radius);
258
277
  background-color: var(--tide-booking-sidebar-body-background);
259
- height: calc(100vh - 86px);
260
278
  }
261
279
 
262
280
  &__sidebar--active {
@@ -583,7 +601,7 @@
583
601
 
584
602
  &.booking-card__group--package {
585
603
  padding: 40px 10px 20px;
586
- margin-top: -25px;
604
+ // margin-top: -25px;
587
605
  margin-bottom: 15px;
588
606
  transition: all 0.4s ease;
589
607
 
@@ -721,7 +739,7 @@
721
739
 
722
740
  &__tag {
723
741
  position: absolute;
724
- top: 0px;
742
+ top: 15px;
725
743
  left: 0;
726
744
  padding: 6px 5px 6px 10px;
727
745
  font-size: 14px;
@@ -104,8 +104,8 @@
104
104
 
105
105
  &--filter {
106
106
  position: absolute;
107
- right: 15px;
108
- top: -70px;
107
+ right: 0px;
108
+ top: -55px;
109
109
  width: auto;
110
110
  display: flex;
111
111
  align-items: center;
@@ -13,6 +13,7 @@
13
13
  border-left: 1.5px solid;
14
14
  border-color: var(--tide-booking-dropdown-arrow-color);
15
15
  transform: rotate(-45deg) translateY(-50%);
16
+ pointer-events: none;
16
17
  @include transitionEasing($duration: 0.2s);
17
18
  }
18
19
 
@@ -61,6 +62,10 @@
61
62
  }
62
63
  }
63
64
  }
65
+
66
+ &:hover {
67
+ cursor: pointer;
68
+ }
64
69
  }
65
70
 
66
71
  &--small {
@@ -1031,7 +1031,7 @@
1031
1031
  gap: 20px;
1032
1032
  background: #fff;
1033
1033
  height: 100%;
1034
- max-height: 97.3vh;
1034
+ max-height: 100dvh;
1035
1035
  width: calc(100vw - 40px);
1036
1036
  padding: 20px;
1037
1037
  box-shadow: 0px 0px 5px rgba(158, 158, 158, 0.447);
@@ -52,6 +52,29 @@
52
52
  }
53
53
  }
54
54
 
55
+ &--flight {
56
+ .flyin__panel {
57
+ @include mixins.media-sm {
58
+ width: 100%;
59
+ max-width: 1200px;
60
+ }
61
+ }
62
+
63
+ .flyin__content {
64
+ gap: 30px;
65
+ }
66
+
67
+ .search__results__cards {
68
+ @include mixins.media-md {
69
+ grid-template-columns: repeat(1, 1fr);
70
+ }
71
+
72
+ @include mixins.media-lg {
73
+ grid-template-columns: repeat(1, 1fr);
74
+ }
75
+ }
76
+ }
77
+
55
78
  &__panel {
56
79
  background: var(--tide-booking-gray-xlight);
57
80
  height: 100%;
@@ -570,6 +593,26 @@
570
593
  align-content: flex-start;
571
594
  }
572
595
  }
596
+
597
+ .cta--filter {
598
+ @include mixins.media-lg {
599
+ display: none;
600
+ }
601
+ }
602
+
603
+ .search__result {
604
+ &-row {
605
+ justify-content: flex-start;
606
+ gap: 15px;
607
+ flex-wrap: wrap;
608
+
609
+ &-filter {
610
+ @include mixins.media-xs {
611
+ margin-left: auto;
612
+ }
613
+ }
614
+ }
615
+ }
573
616
  }
574
617
 
575
618
  &__button {
@@ -238,6 +238,11 @@
238
238
  margin-bottom: 15px;
239
239
  margin-top: 0;
240
240
  padding-top: 15px;
241
+ padding-right: 60px;
242
+
243
+ @include mixins.media-lg {
244
+ padding-right: 15px;
245
+ }
241
246
  }
242
247
 
243
248
  &-link {
@@ -3,8 +3,8 @@
3
3
  width: 100%;
4
4
  max-width: 100%;
5
5
  display: flex;
6
- padding-bottom: 15px;
7
- margin-bottom: 20px;
6
+ // padding-bottom: 15px;
7
+ // margin-bottom: 20px;
8
8
  overflow: hidden;
9
9
 
10
10
  &__items {
@@ -12,7 +12,7 @@
12
12
  width: 100%;
13
13
  max-width: 100vw;
14
14
  padding-bottom: 15px;
15
- margin-bottom: 22.5px;
15
+ margin-bottom: 30px;
16
16
  display: flex;
17
17
  flex-grow: 0;
18
18
  justify-content: space-between;
@@ -24,8 +24,12 @@
24
24
  width: 95%;
25
25
  height: 0;
26
26
  left: 2.5%;
27
- top: 20px;
27
+ top: 15px;
28
28
  border-bottom: var(--tide-booking-step-indicators-line-trough);
29
+
30
+ @include media-xs {
31
+ top: 20px;
32
+ }
29
33
  }
30
34
  }
31
35
 
@@ -70,14 +74,21 @@
70
74
  &:before {
71
75
  content: '';
72
76
  position: absolute;
73
- width: 17px;
74
- height: 6px;
75
- margin-top: -5px;
76
- margin-left: -2px;
77
+ width: 11px;
78
+ height: 5px;
79
+ margin-top: -6px;
80
+ margin-left: 0px;
77
81
  border-left: 2px solid;
78
82
  border-bottom: 2px solid;
79
83
  border-color: var(--tide-booking-step-indicators-icon-check-color-active);
80
84
  transform: rotate(-45deg);
85
+
86
+ @include media-xs {
87
+ width: 17px;
88
+ height: 6px;
89
+ margin-top: -5px;
90
+ margin-left: -2px;
91
+ }
81
92
  }
82
93
  }
83
94
 
@@ -106,14 +117,21 @@
106
117
  &:before {
107
118
  content: '';
108
119
  position: absolute;
109
- width: 17px;
110
- height: 6px;
111
- margin-top: -5px;
112
- margin-left: -2px;
120
+ width: 11px;
121
+ height: 5px;
122
+ margin-top: -6px;
123
+ margin-left: 0px;
113
124
  border-left: 2px solid;
114
125
  border-bottom: 2px solid;
115
126
  border-color: var(--tide-booking-step-indicators-icon-check-color-completed);
116
127
  transform: rotate(-45deg);
128
+
129
+ @include media-xs {
130
+ width: 17px;
131
+ height: 6px;
132
+ margin-top: -5px;
133
+ margin-left: -2px;
134
+ }
117
135
  }
118
136
  }
119
137
  }
@@ -121,17 +139,23 @@
121
139
  &__icon {
122
140
  @extend %reset;
123
141
  position: relative;
124
- width: 40px;
125
- height: 40px;
142
+ width: 30px;
143
+ height: 30px;
126
144
  padding-top: 2px;
127
145
  @include flex--centerXY;
128
- flex: 0 0 40px;
146
+ flex: 0 0 30px;
129
147
  border-radius: var(--tide-booking-step-indicators-icon-border-radius);
130
148
  font-family: var(--tide-booking-step-indicators-icon-font-family);
131
149
  color: var(--tide-booking-step-indicators-icon-color);
132
150
  background-color: var(--tide-booking-step-indicators-icon-background);
133
151
  @extend %transition-easing;
134
152
  z-index: 1;
153
+
154
+ @include media-xs {
155
+ width: 40px;
156
+ height: 40px;
157
+ flex: 0 0 40px;
158
+ }
135
159
  }
136
160
 
137
161
  &__text {
@@ -144,6 +168,7 @@
144
168
  line-height: 1.2;
145
169
  text-overflow: ellipsis;
146
170
  overflow: hidden;
171
+ display: none;
147
172
 
148
173
  @include media-xs {
149
174
  font-size: 12px;
@@ -151,6 +176,7 @@
151
176
 
152
177
  @include media-sm {
153
178
  font-size: 14px;
179
+ display: block;
154
180
  }
155
181
 
156
182
  @include media-md {
@@ -348,11 +348,11 @@
348
348
  }
349
349
 
350
350
  .radiobutton {
351
- padding: 2.5px 0 0 28px;
351
+ padding: 2.5px 0 2.5px 28px;
352
352
  flex-grow: 1;
353
353
 
354
354
  @include media-lg {
355
- padding: 15px 0px 0 28px;
355
+ padding: 15px 0px 15px 28px;
356
356
  }
357
357
 
358
358
  &__input {