@qite/tide-booking-component 1.1.3 → 1.2.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 (63) hide show
  1. package/build/build-cjs/booking-product/components/multi-range-filter.d.ts +12 -0
  2. package/build/build-cjs/booking-wizard/features/booking/api.d.ts +4 -1
  3. package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +7 -3
  4. package/build/build-cjs/booking-wizard/features/booking/selectors.d.ts +23 -17
  5. package/build/build-cjs/booking-wizard/features/flight-options/flight-filter.d.ts +9 -0
  6. package/build/build-cjs/booking-wizard/features/flight-options/flight-option-flight.d.ts +8 -0
  7. package/build/build-cjs/booking-wizard/features/flight-options/flight-option-modal.d.ts +3 -0
  8. package/build/build-cjs/booking-wizard/features/flight-options/flight-option.d.ts +4 -9
  9. package/build/build-cjs/booking-wizard/features/flight-options/flight-utils.d.ts +6 -0
  10. package/build/build-cjs/booking-wizard/features/room-options/room-utils.d.ts +9 -0
  11. package/build/build-cjs/booking-wizard/features/room-options/room.d.ts +12 -0
  12. package/build/build-cjs/booking-wizard/features/room-options/traveler-rooms.d.ts +9 -0
  13. package/build/build-cjs/booking-wizard/types.d.ts +101 -0
  14. package/build/build-cjs/index.js +1563 -606
  15. package/build/build-cjs/shared/utils/localization-util.d.ts +30 -2
  16. package/build/build-esm/booking-product/components/multi-range-filter.d.ts +12 -0
  17. package/build/build-esm/booking-wizard/features/booking/api.d.ts +4 -1
  18. package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +7 -3
  19. package/build/build-esm/booking-wizard/features/booking/selectors.d.ts +23 -17
  20. package/build/build-esm/booking-wizard/features/flight-options/flight-filter.d.ts +9 -0
  21. package/build/build-esm/booking-wizard/features/flight-options/flight-option-flight.d.ts +8 -0
  22. package/build/build-esm/booking-wizard/features/flight-options/flight-option-modal.d.ts +3 -0
  23. package/build/build-esm/booking-wizard/features/flight-options/flight-option.d.ts +4 -9
  24. package/build/build-esm/booking-wizard/features/flight-options/flight-utils.d.ts +6 -0
  25. package/build/build-esm/booking-wizard/features/room-options/room-utils.d.ts +9 -0
  26. package/build/build-esm/booking-wizard/features/room-options/room.d.ts +12 -0
  27. package/build/build-esm/booking-wizard/features/room-options/traveler-rooms.d.ts +9 -0
  28. package/build/build-esm/booking-wizard/types.d.ts +101 -0
  29. package/build/build-esm/index.js +1564 -607
  30. package/build/build-esm/shared/utils/localization-util.d.ts +30 -2
  31. package/package.json +3 -3
  32. package/rollup.config.js +23 -23
  33. package/src/booking-product/components/multi-range-filter.css +115 -0
  34. package/src/booking-product/components/multi-range-filter.tsx +114 -0
  35. package/src/booking-wizard/components/labeled-input.tsx +64 -64
  36. package/src/booking-wizard/components/labeled-select.tsx +69 -69
  37. package/src/booking-wizard/components/step-indicator.tsx +3 -3
  38. package/src/booking-wizard/features/booking/api.ts +12 -1
  39. package/src/booking-wizard/features/booking/booking-self-contained.tsx +50 -20
  40. package/src/booking-wizard/features/booking/booking-slice.ts +45 -9
  41. package/src/booking-wizard/features/booking/booking.tsx +67 -56
  42. package/src/booking-wizard/features/booking/selectors.ts +38 -11
  43. package/src/booking-wizard/features/flight-options/flight-filter.tsx +343 -0
  44. package/src/booking-wizard/features/flight-options/flight-option-flight.tsx +350 -0
  45. package/src/booking-wizard/features/flight-options/flight-option.tsx +30 -759
  46. package/src/booking-wizard/features/flight-options/flight-utils.ts +401 -0
  47. package/src/booking-wizard/features/flight-options/index.tsx +55 -368
  48. package/src/booking-wizard/features/price-details/util.ts +6 -6
  49. package/src/booking-wizard/features/product-options/option-room.tsx +3 -5
  50. package/src/booking-wizard/features/product-options/options-form.tsx +46 -54
  51. package/src/booking-wizard/features/room-options/index.tsx +48 -144
  52. package/src/booking-wizard/features/room-options/room-utils.ts +143 -0
  53. package/src/booking-wizard/features/room-options/room.tsx +124 -0
  54. package/src/booking-wizard/features/room-options/traveler-rooms.tsx +63 -0
  55. package/src/booking-wizard/features/sidebar/sidebar-util.ts +2 -2
  56. package/src/booking-wizard/features/summary/summary.tsx +2 -2
  57. package/src/booking-wizard/features/travelers-form/travelers-form.tsx +1 -1
  58. package/src/booking-wizard/types.ts +116 -0
  59. package/src/shared/components/rating.tsx +21 -21
  60. package/src/shared/translations/fr-BE.json +222 -192
  61. package/src/shared/translations/nl-BE.json +222 -192
  62. package/src/shared/utils/class-util.ts +9 -9
  63. package/tsconfig.json +24 -24
@@ -21,10 +21,33 @@ export declare const getTranslations: (language: string) => {
21
21
  };
22
22
  FLIGHTS_FORM: {
23
23
  OUTWARD_FLIGHTS: string;
24
+ OUTWARD_FLIGHT: string;
24
25
  RETURN_FLIGHTS: string;
26
+ RETURN_FLIGHT: string;
25
27
  DIRECT_FLIGHT: string;
28
+ STOP: string;
29
+ STOPS: string;
26
30
  FLIGHT_STOPS: string;
27
31
  DIFFERENT_OPTION_WARNING: string;
32
+ FILTER_OPTIONS: string;
33
+ AIRLINES: string;
34
+ AIRPORTS: string;
35
+ NUMBER_OF_STOPS: string;
36
+ FLIGHT_OUTWARD: string;
37
+ DEPARTURE_TIME: string;
38
+ TRAVEL_DURATION: string;
39
+ CHANGE_TIME: string;
40
+ FLIGHT_RETURN: string;
41
+ NO_FLIGHTS_FOUND: string;
42
+ STARTING: string;
43
+ LOWEST_PRICE: string;
44
+ CHOOSE_YOUR_CLASS: string;
45
+ PLUS_ONE_DAY: string;
46
+ STOP_TIME: string;
47
+ NIGHT_DEPARTURE: string;
48
+ MORNING_DEPARTURE: string;
49
+ AFTERNOON_DEPARTURE: string;
50
+ EVENING_DEPARTURE: string;
28
51
  };
29
52
  PRODUCT: {
30
53
  STAY_INCLUDED: string;
@@ -58,6 +81,8 @@ export declare const getTranslations: (language: string) => {
58
81
  TOTAL_PRICE: string;
59
82
  ADULTS: string;
60
83
  CHILDREN: string;
84
+ SELECT: string;
85
+ SELECTED: string;
61
86
  };
62
87
  SIDEBAR: {
63
88
  OVERVIEW: string;
@@ -139,6 +164,11 @@ export declare const getTranslations: (language: string) => {
139
164
  AGENT_IS_REQUIRED: string;
140
165
  };
141
166
  };
167
+ ROOM_OPTIONS_FORM: {
168
+ TRAVELER_GROUP: string;
169
+ ALTERNATIVES_TRAVELER_GROUP: string;
170
+ SHOW_ALTERNATIVES: string;
171
+ };
142
172
  OPTIONS_FORM: {
143
173
  NO_OPTIONS_TITLE: string;
144
174
  NO_OPTIONS_MESSAGE: string;
@@ -177,8 +207,6 @@ export declare const getTranslations: (language: string) => {
177
207
  TITLE_TEXT: string;
178
208
  MESSAGE_TEXT1: string;
179
209
  MESSAGE_TEXT2: string;
180
- MESSAGE_TEXT3: string;
181
- MESSAGE_TEXT4: string;
182
210
  QUESTIONS_TEXT1: string;
183
211
  QUESTIONS_TEXT2: string;
184
212
  QUESTIONS_TEXT3: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "React Booking wizard & Booking product component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "module": "build/build-esm/index.js",
@@ -49,7 +49,7 @@
49
49
  "rollup": "^2.53.2",
50
50
  "rollup-plugin-delete": "^2.0.0",
51
51
  "rollup-plugin-peer-deps-external": "^2.2.4",
52
- "rollup-plugin-typescript2": "^0.30.0",
52
+ "rollup-plugin-typescript2": "0.36.0",
53
53
  "tslib": "^2.3.1",
54
54
  "typescript": "^4.3.5",
55
55
  "uuid": "^8.3.2"
@@ -71,6 +71,6 @@
71
71
  "uuid": "^8.3.2"
72
72
  },
73
73
  "dependencies": {
74
- "@qite/tide-client": "^1.1.44"
74
+ "@qite/tide-client": "^1.1.57"
75
75
  }
76
76
  }
package/rollup.config.js CHANGED
@@ -1,23 +1,23 @@
1
- import commonjs from "@rollup/plugin-commonjs";
2
- import del from "rollup-plugin-delete";
3
- import json from "@rollup/plugin-json";
4
- import nodeResolve from "@rollup/plugin-node-resolve";
5
- import packageJson from "./package.json";
6
- import peerDepsExternal from "rollup-plugin-peer-deps-external";
7
- import typescript from "rollup-plugin-typescript2";
8
-
9
- export default {
10
- input: "src/index.ts",
11
- output: [
12
- { file: packageJson.main, format: "cjs", banner: "/* eslint-disable */" },
13
- { file: packageJson.module, format: "esm", banner: "/* eslint-disable */" },
14
- ],
15
- plugins: [
16
- peerDepsExternal(),
17
- json(),
18
- nodeResolve(),
19
- commonjs(),
20
- typescript(),
21
- del({ targets: ["build/*"] }),
22
- ],
23
- };
1
+ import commonjs from "@rollup/plugin-commonjs";
2
+ import del from "rollup-plugin-delete";
3
+ import json from "@rollup/plugin-json";
4
+ import nodeResolve from "@rollup/plugin-node-resolve";
5
+ import packageJson from "./package.json";
6
+ import peerDepsExternal from "rollup-plugin-peer-deps-external";
7
+ import typescript from "rollup-plugin-typescript2";
8
+
9
+ export default {
10
+ input: "src/index.ts",
11
+ output: [
12
+ { file: packageJson.main, format: "cjs", banner: "/* eslint-disable */" },
13
+ { file: packageJson.module, format: "esm", banner: "/* eslint-disable */" },
14
+ ],
15
+ plugins: [
16
+ peerDepsExternal(),
17
+ json(),
18
+ nodeResolve(),
19
+ commonjs(),
20
+ typescript(),
21
+ del({ targets: ["build/*"] }),
22
+ ],
23
+ };
@@ -0,0 +1,115 @@
1
+ /* .double-slider-box {
2
+ background-color: #fff;
3
+ border-radius: 10px;
4
+ padding: 20px;
5
+ width: 100%;
6
+ max-width: 300px;
7
+ margin: auto;
8
+ }
9
+
10
+ .range-slider {
11
+ position: relative;
12
+ width: 100%;
13
+ height: 5px;
14
+ margin: 30px 0;
15
+ background-color: #8a8a8a;
16
+ border-radius: 5px;
17
+ }
18
+
19
+ .slider-track {
20
+ height: 100%;
21
+ position: absolute;
22
+ background-color: #fe696a;
23
+ left: 0;
24
+ right: 100%;
25
+ border-radius: 5px;
26
+ }
27
+
28
+ .range-slider input[type="range"] {
29
+ position: absolute;
30
+ width: 100%;
31
+ top: 0;
32
+ transform: translateY(-50%);
33
+ background: none;
34
+ pointer-events: none;
35
+ appearance: none;
36
+ height: 5px;
37
+ }
38
+
39
+ input[type="range"]::-webkit-slider-thumb {
40
+ height: 25px;
41
+ width: 25px;
42
+ border-radius: 50%;
43
+ border: 3px solid #fff;
44
+ background: #fe696a;
45
+ pointer-events: auto;
46
+ appearance: none;
47
+ cursor: pointer;
48
+ box-shadow: 0 0.125rem 0.5625rem -0.125rem rgba(0, 0, 0, 0.25);
49
+ position: relative;
50
+ z-index: 2;
51
+ }
52
+
53
+ input[type="range"]::-moz-range-thumb {
54
+ height: 25px;
55
+ width: 25px;
56
+ border-radius: 50%;
57
+ border: 3px solid #fff;
58
+ background: #fe696a;
59
+ pointer-events: auto;
60
+ cursor: pointer;
61
+ box-shadow: 0 0.125rem 0.5625rem -0.125rem rgba(0, 0, 0, 0.25);
62
+ position: relative;
63
+ z-index: 2;
64
+ }
65
+
66
+ .input-box {
67
+ display: flex;
68
+ justify-content: space-between;
69
+ width: 100%;
70
+ }
71
+
72
+ .min-box,
73
+ .max-box {
74
+ width: 50%;
75
+ }
76
+
77
+ .min-box {
78
+ margin-right: 10px;
79
+ }
80
+
81
+ .max-box {
82
+ text-align: right;
83
+ }
84
+
85
+ input[type="number"] {
86
+ width: 40px;
87
+ padding: 10px;
88
+ border: 1px solid #ccc;
89
+ border-radius: 5px;
90
+ text-align: center;
91
+ }
92
+
93
+ .min-tooltip,
94
+ .max-tooltip {
95
+ position: absolute;
96
+ top: -35px;
97
+ font-size: 12px;
98
+ color: #555;
99
+ background-color: #fff;
100
+ padding: 5px;
101
+ border: 1px solid #ddd;
102
+ border-radius: 5px;
103
+ white-space: nowrap;
104
+ z-index: 1;
105
+ }
106
+
107
+ .min-tooltip {
108
+ left: 0;
109
+ transform: translateX(-50%);
110
+ }
111
+
112
+ .max-tooltip {
113
+ right: 0;
114
+ transform: translateX(50%);
115
+ } */
@@ -0,0 +1,114 @@
1
+ import React, { ChangeEvent, useEffect, useState } from "react";
2
+ import "./multi-range-filter.css";
3
+
4
+ interface MultiRangeFilterProps {
5
+ min: number;
6
+ max: number;
7
+ selectedMin: number;
8
+ selectedMax: number;
9
+
10
+ valueFormatter: (value: number) => string;
11
+ onChange: (min: number, max: number) => void;
12
+ }
13
+
14
+ const MultiRangeFilter: React.FC<MultiRangeFilterProps> = ({
15
+ min,
16
+ max,
17
+ selectedMin,
18
+ selectedMax,
19
+ valueFormatter,
20
+ onChange
21
+ }) => {
22
+
23
+ const [isDragging, setIsDragging] = useState(false);
24
+ const [leftPercentage, setLeftPercentage] = useState<number>(0);
25
+ const [rightPercentage, setRightPercentage] = useState<number>(0);
26
+ const [minVal, setMinVal] = useState(min);
27
+ const [maxVal, setMaxVal] = useState(max);
28
+ const minGap = 5;
29
+
30
+ useEffect(() => {
31
+ setSliderTrack();
32
+ }, [minVal, maxVal]);
33
+
34
+ const slideMin = (e: ChangeEvent<HTMLInputElement>) => {
35
+ const value = parseInt(e.target.value, 10);
36
+ if (value >= min && selectedMax - value >= minGap) {
37
+ setMinVal(value);
38
+ }
39
+ };
40
+
41
+ const slideMax = (e: ChangeEvent<HTMLInputElement>) => {
42
+ const value = parseInt(e.target.value, 10);
43
+ if (value <= max && value - selectedMin >= minGap) {
44
+ setMaxVal(value);
45
+ }
46
+ };
47
+
48
+ const setSliderTrack = () => {
49
+ const range = document.querySelector(".slider-track");
50
+
51
+ if (range) {
52
+ const minPercent = ((minVal - min) / (max - min)) * 100;
53
+ const maxPercent = ((maxVal - min) / (max - min)) * 100;
54
+
55
+ setLeftPercentage(minPercent);
56
+ setRightPercentage(100 - maxPercent);
57
+ }
58
+ };
59
+
60
+ const startDrag = () => {
61
+ setIsDragging(true);
62
+ };
63
+
64
+ const stopDrag = () => {
65
+ setIsDragging(false);
66
+ onChange(minVal, maxVal);
67
+ };
68
+
69
+ return (
70
+ <div className="double-slider-box">
71
+ <div className="input-box">
72
+ <div className="min-box">
73
+ {valueFormatter(min)}
74
+ </div>
75
+ <div className="max-box">
76
+ {valueFormatter(max)}
77
+ </div>
78
+ </div>
79
+ <div className="range-slider">
80
+ <div className="slider-track"
81
+ style={{ 'left': leftPercentage + '%', right: rightPercentage + '%' }}>
82
+ </div>
83
+ <input
84
+ type="range"
85
+ min={min}
86
+ max={max}
87
+ value={minVal}
88
+ onChange={slideMin}
89
+ onMouseDown={startDrag}
90
+ onMouseUp={stopDrag}
91
+ onTouchStart={startDrag}
92
+ onTouchEnd={stopDrag}
93
+ className="min-val"
94
+ />
95
+ <input
96
+ type="range"
97
+ min={min}
98
+ max={max}
99
+ value={maxVal}
100
+ onChange={slideMax}
101
+ onMouseDown={startDrag}
102
+ onMouseUp={stopDrag}
103
+ onTouchStart={startDrag}
104
+ onTouchEnd={stopDrag}
105
+ className="max-val"
106
+ />
107
+ {isDragging && <div className="min-tooltip">{valueFormatter(minVal)}</div>}
108
+ {isDragging && <div className="max-tooltip">{valueFormatter(maxVal)}</div>}
109
+ </div>
110
+ </div>
111
+ );
112
+ }
113
+
114
+ export default MultiRangeFilter;
@@ -1,64 +1,64 @@
1
- import React from "react";
2
- import { buildClassName } from "../../shared/utils/class-util";
3
- import { compact } from "lodash";
4
-
5
- interface LabeledInputProps {
6
- name: string;
7
- type?: string;
8
- required?: boolean;
9
- value?: string | number;
10
- defaultValue?: string | number;
11
- min?: string | number;
12
- max?: string | number;
13
- label?: string;
14
- placeholder?: string;
15
- hasError?: boolean;
16
- extraClassName?: string;
17
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
18
- onBlur?: React.FocusEventHandler<HTMLInputElement>;
19
- }
20
-
21
- const LabeledInput: React.FC<LabeledInputProps> = ({
22
- name,
23
- type,
24
- required,
25
- value,
26
- defaultValue,
27
- min,
28
- max,
29
- label,
30
- placeholder,
31
- extraClassName,
32
- hasError,
33
- onChange,
34
- onBlur,
35
- }) => {
36
- return (
37
- <label
38
- className={buildClassName([
39
- "form__group",
40
- extraClassName,
41
- hasError && "form__group--error",
42
- ])}
43
- >
44
- <span className="form__label">
45
- {compact([label, required && "*"]).join(" ")}
46
- </span>
47
- <input
48
- name={name}
49
- type={type ?? "text"}
50
- required={required}
51
- className="form__input"
52
- min={min}
53
- max={max}
54
- placeholder={placeholder}
55
- onChange={onChange}
56
- onBlur={onBlur}
57
- value={value}
58
- defaultValue={defaultValue}
59
- />
60
- </label>
61
- );
62
- };
63
-
64
- export default LabeledInput;
1
+ import React from "react";
2
+ import { buildClassName } from "../../shared/utils/class-util";
3
+ import { compact } from "lodash";
4
+
5
+ interface LabeledInputProps {
6
+ name: string;
7
+ type?: string;
8
+ required?: boolean;
9
+ value?: string | number;
10
+ defaultValue?: string | number;
11
+ min?: string | number;
12
+ max?: string | number;
13
+ label?: string;
14
+ placeholder?: string;
15
+ hasError?: boolean;
16
+ extraClassName?: string;
17
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
18
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
19
+ }
20
+
21
+ const LabeledInput: React.FC<LabeledInputProps> = ({
22
+ name,
23
+ type,
24
+ required,
25
+ value,
26
+ defaultValue,
27
+ min,
28
+ max,
29
+ label,
30
+ placeholder,
31
+ extraClassName,
32
+ hasError,
33
+ onChange,
34
+ onBlur,
35
+ }) => {
36
+ return (
37
+ <label
38
+ className={buildClassName([
39
+ "form__group",
40
+ extraClassName,
41
+ hasError && "form__group--error",
42
+ ])}
43
+ >
44
+ <span className="form__label">
45
+ {compact([label, required && "*"]).join(" ")}
46
+ </span>
47
+ <input
48
+ name={name}
49
+ type={type ?? "text"}
50
+ required={required}
51
+ className="form__input"
52
+ min={min}
53
+ max={max}
54
+ placeholder={placeholder}
55
+ onChange={onChange}
56
+ onBlur={onBlur}
57
+ value={value}
58
+ defaultValue={defaultValue}
59
+ />
60
+ </label>
61
+ );
62
+ };
63
+
64
+ export default LabeledInput;
@@ -1,69 +1,69 @@
1
- import React from "react";
2
- import { buildClassName } from "../../shared/utils/class-util";
3
- import { compact } from "lodash";
4
-
5
- interface LabeledSelectProps {
6
- name: string;
7
- id?: string;
8
- required?: boolean;
9
- value?: string | number;
10
- defaultValue?: string | number;
11
- label?: string;
12
- hasError?: boolean;
13
- extraClassName?: string;
14
- extraDropdownClassName?: string;
15
- options?: {
16
- key: string;
17
- value: string | number | undefined;
18
- label: string;
19
- }[];
20
- onChange?: React.ChangeEventHandler<HTMLSelectElement>;
21
- onBlur?: React.FocusEventHandler<HTMLSelectElement>;
22
- }
23
-
24
- const LabeledSelect: React.FC<LabeledSelectProps> = ({
25
- name,
26
- id,
27
- required,
28
- value,
29
- defaultValue,
30
- label,
31
- extraClassName,
32
- extraDropdownClassName,
33
- hasError,
34
- options,
35
- onChange,
36
- onBlur,
37
- }) => {
38
- return (
39
- <label
40
- className={buildClassName([
41
- "form__group",
42
- extraClassName,
43
- hasError && "form__group--error",
44
- ])}
45
- >
46
- <span className="form__label">
47
- {compact([label, required && "*"]).join(" ")}
48
- </span>
49
- <div className={buildClassName(["dropdown", extraDropdownClassName])}>
50
- <select
51
- name={name}
52
- id={id}
53
- defaultValue={defaultValue}
54
- value={value}
55
- onBlur={onBlur}
56
- onChange={onChange}
57
- >
58
- {options?.map((option) => (
59
- <option key={option.key} value={option.value}>
60
- {option.label}
61
- </option>
62
- ))}
63
- </select>
64
- </div>
65
- </label>
66
- );
67
- };
68
-
69
- export default LabeledSelect;
1
+ import React from "react";
2
+ import { buildClassName } from "../../shared/utils/class-util";
3
+ import { compact } from "lodash";
4
+
5
+ interface LabeledSelectProps {
6
+ name: string;
7
+ id?: string;
8
+ required?: boolean;
9
+ value?: string | number;
10
+ defaultValue?: string | number;
11
+ label?: string;
12
+ hasError?: boolean;
13
+ extraClassName?: string;
14
+ extraDropdownClassName?: string;
15
+ options?: {
16
+ key: string;
17
+ value: string | number | undefined;
18
+ label: string;
19
+ }[];
20
+ onChange?: React.ChangeEventHandler<HTMLSelectElement>;
21
+ onBlur?: React.FocusEventHandler<HTMLSelectElement>;
22
+ }
23
+
24
+ const LabeledSelect: React.FC<LabeledSelectProps> = ({
25
+ name,
26
+ id,
27
+ required,
28
+ value,
29
+ defaultValue,
30
+ label,
31
+ extraClassName,
32
+ extraDropdownClassName,
33
+ hasError,
34
+ options,
35
+ onChange,
36
+ onBlur,
37
+ }) => {
38
+ return (
39
+ <label
40
+ className={buildClassName([
41
+ "form__group",
42
+ extraClassName,
43
+ hasError && "form__group--error",
44
+ ])}
45
+ >
46
+ <span className="form__label">
47
+ {compact([label, required && "*"]).join(" ")}
48
+ </span>
49
+ <div className={buildClassName(["dropdown", extraDropdownClassName])}>
50
+ <select
51
+ name={name}
52
+ id={id}
53
+ defaultValue={defaultValue}
54
+ value={value}
55
+ onBlur={onBlur}
56
+ onChange={onChange}
57
+ >
58
+ {options?.map((option) => (
59
+ <option key={option.key} value={option.value}>
60
+ {option.label}
61
+ </option>
62
+ ))}
63
+ </select>
64
+ </div>
65
+ </label>
66
+ );
67
+ };
68
+
69
+ export default LabeledSelect;
@@ -13,12 +13,12 @@ const StepIndicators: React.FC<StepIndicatorsProps> = ({ currentStep }) => {
13
13
  const translations = useSelector(selectTranslations);
14
14
 
15
15
  const allSteps = [];
16
- if (!roomOptions.isHidden) {
17
- allSteps.push(translations.STEPS.ROOM_OPTIONS);
18
- }
19
16
  if (!flightOptions.isHidden) {
20
17
  allSteps.push(translations.STEPS.FLIGHT_OPTIONS);
21
18
  }
19
+ if (!roomOptions.isHidden) {
20
+ allSteps.push(translations.STEPS.ROOM_OPTIONS);
21
+ }
22
22
 
23
23
  allSteps.push(translations.STEPS.EXTRA_OPTIONS);
24
24
  allSteps.push(translations.STEPS.PERSONAL_DETAILS);
@@ -1,9 +1,10 @@
1
- import { agents, details } from "@qite/tide-client";
1
+ import { agents, details, generateBookingAccommodations } from "@qite/tide-client";
2
2
  import {
3
3
  BookingPackage,
4
4
  BookingPackageDetailsRequest,
5
5
  BookingPackageRequest,
6
6
  BookingTravelAgent,
7
+ GenerateBookingAccommodationRequest,
7
8
  TideResponse,
8
9
  } from "@qite/tide-client/build/types";
9
10
  import { ApiSettingsState } from "../../../shared/types";
@@ -27,8 +28,18 @@ const fetchAgents = async (
27
28
  return await agents(tideClientConfig, signal);
28
29
  };
29
30
 
31
+ const fetchAccommodationViews = async (
32
+ request: GenerateBookingAccommodationRequest,
33
+ signal: AbortSignal,
34
+ apiSettings?: ApiSettingsState
35
+ ) => {
36
+ const tideClientConfig = buildTideClientConfig(apiSettings);
37
+ return await generateBookingAccommodations(tideClientConfig, request, signal);
38
+ }
39
+
30
40
  const packageApi = {
31
41
  fetchDetails,
32
42
  fetchAgents,
43
+ fetchAccommodationViews
33
44
  };
34
45
  export default packageApi;