@qite/tide-booking-component 1.4.34 → 1.4.35
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/build/build-cjs/index.js +1627 -374
- package/build/build-cjs/qsm/types.d.ts +0 -1
- package/build/build-cjs/search-results/components/filters/filters.d.ts +2 -2
- package/build/build-cjs/search-results/components/flight/flight-results.d.ts +2 -0
- package/build/build-cjs/search-results/components/hotel/hotel-card.d.ts +1 -0
- package/build/build-cjs/search-results/components/itinerary/index.d.ts +2 -2
- package/build/build-cjs/search-results/store/search-results-slice.d.ts +11 -2
- package/build/build-cjs/search-results/types.d.ts +0 -14
- package/build/build-esm/index.js +1627 -374
- package/build/build-esm/qsm/types.d.ts +0 -1
- package/build/build-esm/search-results/components/filters/filters.d.ts +2 -2
- package/build/build-esm/search-results/components/flight/flight-results.d.ts +2 -0
- package/build/build-esm/search-results/components/hotel/hotel-card.d.ts +1 -0
- package/build/build-esm/search-results/components/itinerary/index.d.ts +2 -2
- package/build/build-esm/search-results/store/search-results-slice.d.ts +11 -2
- package/build/build-esm/search-results/types.d.ts +0 -14
- package/package.json +2 -2
- package/src/booking-wizard/features/booking/booking-self-contained.tsx +0 -1
- package/src/booking-wizard/features/travelers-form/controls/gender-control.tsx +5 -5
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +10 -10
- package/src/content/components/icon.tsx +1 -1
- package/src/content/features/content-page/content-page-self-contained.tsx +0 -1
- package/src/qsm/components/QSMContainer/qsm-container.tsx +15 -13
- package/src/qsm/components/mobile-filter-modal/index.tsx +12 -10
- package/src/qsm/components/travel-class-picker/index.tsx +5 -3
- package/src/qsm/components/travel-input/index.tsx +15 -12
- package/src/qsm/components/travel-input-group/index.tsx +14 -3
- package/src/qsm/components/travel-nationality-picker/index.tsx +5 -3
- package/src/qsm/components/travel-type-picker/index.tsx +5 -3
- package/src/qsm/qsm-configuration-context.ts +0 -1
- package/src/qsm/types.ts +0 -1
- package/src/search-results/components/filters/filters.tsx +15 -16
- package/src/search-results/components/flight/flight-results.tsx +168 -1099
- package/src/search-results/components/hotel/hotel-accommodation-results.tsx +21 -24
- package/src/search-results/components/hotel/hotel-card.tsx +4 -3
- package/src/search-results/components/icon.tsx +1 -1
- package/src/search-results/components/itinerary/index.tsx +229 -129
- package/src/search-results/components/round-trip/round-trip-results.tsx +1 -1
- package/src/search-results/components/search-results-container/search-results-container.tsx +45 -33
- package/src/search-results/components/spinner/spinner.tsx +3 -1
- package/src/search-results/components/tab-views/index.tsx +13 -7
- package/src/search-results/features/flights/flight-search-results-self-contained.tsx +1 -14
- package/src/search-results/features/hotels/hotel-search-results-self-contained.tsx +1 -14
- package/src/search-results/store/search-results-slice.ts +37 -3
- package/src/search-results/types.ts +0 -15
- package/src/shared/translations/ar-SA.json +70 -0
- package/src/shared/translations/da-DK.json +70 -0
- package/src/shared/translations/de-DE.json +70 -0
- package/src/shared/translations/en-GB.json +71 -1
- package/src/shared/translations/es-ES.json +70 -0
- package/src/shared/translations/fr-BE.json +71 -1
- package/src/shared/translations/fr-FR.json +70 -0
- package/src/shared/translations/is-IS.json +72 -2
- package/src/shared/translations/it-IT.json +70 -0
- package/src/shared/translations/ja-JP.json +72 -2
- package/src/shared/translations/nl-BE.json +70 -0
- package/src/shared/translations/nl-NL.json +70 -0
- package/src/shared/translations/no-NO.json +72 -2
- package/src/shared/translations/pl-PL.json +70 -0
- package/src/shared/translations/pt-PT.json +70 -0
- package/src/shared/translations/sv-SE.json +72 -2
- package/styles/components/_search.scss +7 -1
|
@@ -4,17 +4,19 @@ import { QSMRootState } from '../../store/qsm-store';
|
|
|
4
4
|
import { setSelectedNationality } from '../../store/qsm-slice';
|
|
5
5
|
import QSMConfigurationContext from '../../qsm-configuration-context';
|
|
6
6
|
import ItemPicker from '../item-picker';
|
|
7
|
+
import { getTranslations } from '../../../shared/utils/localization-util';
|
|
7
8
|
|
|
8
9
|
const TravelNationalityPicker: React.FC = () => {
|
|
9
|
-
const { nationalities } = useContext(QSMConfigurationContext);
|
|
10
|
+
const { nationalities, languageCode } = useContext(QSMConfigurationContext);
|
|
11
|
+
const translations = getTranslations(languageCode ?? 'en-GB');
|
|
10
12
|
const { selectedNationality } = useSelector((state: QSMRootState) => state.qsm);
|
|
11
13
|
|
|
12
14
|
return (
|
|
13
15
|
<ItemPicker
|
|
14
16
|
items={nationalities}
|
|
15
17
|
selection={selectedNationality}
|
|
16
|
-
label=
|
|
17
|
-
placeholder=
|
|
18
|
+
label={translations.QSM.NATIONALITY_LABEL}
|
|
19
|
+
placeholder={translations.QSM.NATIONALITY_PLACEHOLDER}
|
|
18
20
|
classModifier="travel-class-picker__items"
|
|
19
21
|
onPick={setSelectedNationality}
|
|
20
22
|
/>
|
|
@@ -4,17 +4,19 @@ import { QSMRootState } from '../../store/qsm-store';
|
|
|
4
4
|
import { setSelectedTravelType } from '../../store/qsm-slice';
|
|
5
5
|
import QSMConfigurationContext from '../../qsm-configuration-context';
|
|
6
6
|
import ItemPicker from '../item-picker';
|
|
7
|
+
import { getTranslations } from '../../../shared/utils/localization-util';
|
|
7
8
|
|
|
8
9
|
const TravelTypePicker: React.FC = () => {
|
|
9
|
-
const { travelTypes } = useContext(QSMConfigurationContext);
|
|
10
|
+
const { travelTypes, languageCode } = useContext(QSMConfigurationContext);
|
|
11
|
+
const translations = getTranslations(languageCode ?? 'en-GB');
|
|
10
12
|
const { selectedTravelType } = useSelector((state: QSMRootState) => state.qsm);
|
|
11
13
|
|
|
12
14
|
return (
|
|
13
15
|
<ItemPicker
|
|
14
16
|
items={travelTypes}
|
|
15
17
|
selection={selectedTravelType}
|
|
16
|
-
label=
|
|
17
|
-
placeholder=
|
|
18
|
+
label={translations.QSM.TRAVEL_TYPE_LABEL}
|
|
19
|
+
placeholder={translations.QSM.TRAVEL_TYPE_PLACEHOLDER}
|
|
18
20
|
classModifier="travel-type-picker__items"
|
|
19
21
|
onPick={setSelectedTravelType}
|
|
20
22
|
/>
|
package/src/qsm/types.ts
CHANGED
|
@@ -6,11 +6,12 @@ import { resetFilters, setFilters } from '../../store/search-results-slice';
|
|
|
6
6
|
import { useDispatch } from 'react-redux';
|
|
7
7
|
import Spinner from '../spinner/spinner';
|
|
8
8
|
import Icon from '../icon';
|
|
9
|
+
import { getTranslations } from '../../../shared/utils/localization-util';
|
|
9
10
|
|
|
10
11
|
interface FiltersProps {
|
|
11
12
|
filters: Filter[];
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
handleSetIsOpen: () => void;
|
|
14
15
|
handleApplyFilters: () => void;
|
|
15
16
|
isLoading?: boolean;
|
|
16
17
|
}
|
|
@@ -88,8 +89,9 @@ const initialFilters: Filter[] = [
|
|
|
88
89
|
}
|
|
89
90
|
] as Filter[];
|
|
90
91
|
|
|
91
|
-
const Filters: React.FC<FiltersProps> = ({ filters,
|
|
92
|
+
const Filters: React.FC<FiltersProps> = ({ filters, isOpen, handleSetIsOpen, handleApplyFilters, isLoading }) => {
|
|
92
93
|
const context = useContext(SearchResultsConfigurationContext);
|
|
94
|
+
const translations = getTranslations(context?.languageCode ?? 'en-GB');
|
|
93
95
|
const [visibleFilters, setVisibleFilters] = useState<Record<string, boolean>>({});
|
|
94
96
|
const [pendingFilters, setPendingFilters] = useState<Filter[]>([]);
|
|
95
97
|
useEffect(() => {
|
|
@@ -175,8 +177,8 @@ const Filters: React.FC<FiltersProps> = ({ filters, isMobileFiltersOpen, handleS
|
|
|
175
177
|
context?.onFilterChange?.(pendingFilters);
|
|
176
178
|
handleApplyFilters();
|
|
177
179
|
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
+
if (isOpen) {
|
|
181
|
+
handleSetIsOpen();
|
|
180
182
|
}
|
|
181
183
|
};
|
|
182
184
|
|
|
@@ -204,22 +206,19 @@ const Filters: React.FC<FiltersProps> = ({ filters, isMobileFiltersOpen, handleS
|
|
|
204
206
|
{/* ---------------- Filters ---------------- */}
|
|
205
207
|
|
|
206
208
|
{/* ---------------- Filters desktop ---------------- */}
|
|
207
|
-
<div className={`search__filters--modal ${
|
|
208
|
-
<div className="search__filters--background" onClick={() =>
|
|
209
|
-
<button className="search__filters--close" onClick={() =>
|
|
209
|
+
<div className={`search__filters--modal ${isOpen ? 'is-open' : ''}`}>
|
|
210
|
+
<div className="search__filters--background" onClick={() => handleSetIsOpen()}></div>
|
|
211
|
+
<button className="search__filters--close" onClick={() => handleSetIsOpen()}>
|
|
210
212
|
<Icon name="ui-close" height={24} />
|
|
211
213
|
</button>
|
|
212
214
|
<div className="search__filters">
|
|
213
215
|
<div className="search__filter-row search__filter__header">
|
|
214
216
|
<div className="search__filter-row-flex-title">
|
|
215
|
-
<p className="search__filter-small-title">
|
|
216
|
-
{/* */}
|
|
217
|
-
Your trip summary
|
|
218
|
-
</p>
|
|
217
|
+
<p className="search__filter-small-title">{translations.SRP.FILTERS}</p>
|
|
219
218
|
</div>
|
|
220
219
|
{!isLoading && (
|
|
221
220
|
<a className="search__filter-reset" onClick={() => handleFullReset()}>
|
|
222
|
-
{
|
|
221
|
+
{translations.SRP.RESET}
|
|
223
222
|
</a>
|
|
224
223
|
)}
|
|
225
224
|
{/* <Icon name="ui-info" height={16} /> */}
|
|
@@ -366,13 +365,13 @@ const Filters: React.FC<FiltersProps> = ({ filters, isMobileFiltersOpen, handleS
|
|
|
366
365
|
className="cta--secondary "
|
|
367
366
|
onClick={() => {
|
|
368
367
|
handleResetPendingChanges();
|
|
369
|
-
|
|
368
|
+
handleSetIsOpen();
|
|
370
369
|
}}
|
|
371
370
|
disabled={isLoading}>
|
|
372
|
-
{
|
|
371
|
+
{translations.SRP.CANCEL}
|
|
373
372
|
</button>
|
|
374
373
|
<button className="cta" onClick={() => applyFilters()} disabled={isLoading}>
|
|
375
|
-
{
|
|
374
|
+
{translations.SRP.APPLY}
|
|
376
375
|
</button>
|
|
377
376
|
</div>
|
|
378
377
|
)}
|