@qite/tide-booking-component 1.2.4 → 1.3.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.
- package/build/build-cjs/booking-wizard/components/print-offer-button.d.ts +17 -0
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option-flight.d.ts +1 -1
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option.d.ts +1 -1
- package/build/build-cjs/booking-wizard/types.d.ts +13 -0
- package/build/build-cjs/booking-wizard/use-offer-printer.d.ts +13 -0
- package/build/build-cjs/index.js +1392 -754
- package/build/build-cjs/shared/utils/localization-util.d.ts +6 -0
- package/build/build-cjs/shared/utils/tide-api-utils.d.ts +1 -0
- package/build/build-esm/booking-wizard/components/print-offer-button.d.ts +17 -0
- package/build/build-esm/booking-wizard/features/flight-options/flight-option-flight.d.ts +1 -1
- package/build/build-esm/booking-wizard/features/flight-options/flight-option.d.ts +1 -1
- package/build/build-esm/booking-wizard/types.d.ts +13 -0
- package/build/build-esm/booking-wizard/use-offer-printer.d.ts +13 -0
- package/build/build-esm/index.js +1394 -756
- package/build/build-esm/shared/utils/localization-util.d.ts +6 -0
- package/build/build-esm/shared/utils/tide-api-utils.d.ts +1 -0
- package/package.json +4 -6
- package/src/booking-product/components/age-select.tsx +2 -8
- package/src/booking-product/components/amount-input.tsx +36 -22
- package/src/booking-product/components/date-range-picker/calendar-day.tsx +5 -1
- package/src/booking-product/components/date-range-picker/calendar.tsx +9 -7
- package/src/booking-product/components/date-range-picker/index.tsx +20 -5
- package/src/booking-product/components/dates.tsx +22 -18
- package/src/booking-product/components/footer.tsx +40 -41
- package/src/booking-product/components/header.tsx +44 -33
- package/src/booking-product/components/icon.tsx +188 -145
- package/src/booking-product/components/product.tsx +66 -33
- package/src/booking-product/components/rooms.tsx +70 -55
- package/src/booking-product/index.tsx +9 -9
- package/src/booking-product/settings-context.ts +3 -3
- package/src/booking-product/types.ts +3 -3
- package/src/booking-product/utils/api.ts +4 -4
- package/src/booking-product/utils/price.ts +5 -3
- package/src/booking-wizard/components/icon.tsx +428 -229
- package/src/booking-wizard/components/multi-range-filter.tsx +15 -15
- package/src/booking-wizard/components/print-offer-button.tsx +66 -0
- package/src/booking-wizard/components/step-indicator.tsx +1 -1
- package/src/booking-wizard/declarations.d.ts +2 -2
- package/src/booking-wizard/features/booking/api.ts +9 -5
- package/src/booking-wizard/features/booking/booking-self-contained.tsx +46 -19
- package/src/booking-wizard/features/booking/booking-slice.ts +108 -49
- package/src/booking-wizard/features/booking/booking.tsx +64 -57
- package/src/booking-wizard/features/booking/selectors.ts +45 -22
- package/src/booking-wizard/features/confirmation/confirmation.tsx +8 -5
- package/src/booking-wizard/features/error/error.tsx +6 -3
- package/src/booking-wizard/features/flight-options/flight-filter.tsx +147 -72
- package/src/booking-wizard/features/flight-options/flight-option-flight.tsx +53 -21
- package/src/booking-wizard/features/flight-options/flight-option-modal.tsx +34 -19
- package/src/booking-wizard/features/flight-options/flight-option.tsx +37 -22
- package/src/booking-wizard/features/flight-options/flight-utils.ts +220 -105
- package/src/booking-wizard/features/flight-options/index.tsx +62 -43
- package/src/booking-wizard/features/price-details/price-details-slice.ts +11 -4
- package/src/booking-wizard/features/product-options/no-options.tsx +1 -1
- package/src/booking-wizard/features/product-options/option-booking-airline-group.tsx +48 -50
- package/src/booking-wizard/features/product-options/option-booking-group.tsx +9 -3
- package/src/booking-wizard/features/product-options/option-item.tsx +1 -2
- package/src/booking-wizard/features/product-options/option-pax-card.tsx +39 -26
- package/src/booking-wizard/features/product-options/option-pax-group.tsx +9 -3
- package/src/booking-wizard/features/product-options/option-room.tsx +23 -16
- package/src/booking-wizard/features/product-options/option-unit-group.tsx +9 -3
- package/src/booking-wizard/features/product-options/option-units-card.tsx +68 -57
- package/src/booking-wizard/features/product-options/options-form.tsx +250 -124
- package/src/booking-wizard/features/room-options/index.tsx +27 -12
- package/src/booking-wizard/features/room-options/room-utils.ts +97 -50
- package/src/booking-wizard/features/room-options/room.tsx +56 -20
- package/src/booking-wizard/features/room-options/traveler-rooms.tsx +34 -22
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +1 -1
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +1 -1
- package/src/booking-wizard/features/sidebar/sidebar.tsx +173 -155
- package/src/booking-wizard/features/summary/summary-flight.tsx +1 -1
- package/src/booking-wizard/features/summary/summary-per-booking-option-group.tsx +45 -33
- package/src/booking-wizard/features/summary/summary-per-pax-option-group.tsx +41 -29
- package/src/booking-wizard/features/summary/summary-per-unit-option-group.tsx +43 -31
- package/src/booking-wizard/features/summary/summary.tsx +325 -294
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +421 -422
- package/src/booking-wizard/features/travelers-form/type-ahead-input.tsx +1 -1
- package/src/booking-wizard/features/travelers-form/validate-form.ts +1 -1
- package/src/booking-wizard/settings-context.ts +7 -0
- package/src/booking-wizard/types.ts +19 -7
- package/src/booking-wizard/use-offer-printer.ts +136 -0
- package/src/index.ts +0 -1
- package/src/shared/translations/en-GB.json +237 -0
- package/src/shared/translations/fr-BE.json +7 -2
- package/src/shared/translations/nl-BE.json +5 -0
- package/src/shared/types.ts +1 -1
- package/src/shared/utils/localization-util.ts +9 -3
- package/src/shared/utils/query-string-util.ts +6 -3
- package/src/shared/utils/tide-api-utils.ts +1 -1
- package/styles/booking-product-variables.scss +174 -68
- package/styles/booking-product.scss +294 -288
- package/styles/booking-wizard-variables.scss +872 -529
- package/styles/booking-wizard.scss +35 -2
- package/styles/components/_base.scss +3 -2
- package/styles/components/_booking.scss +149 -679
- package/styles/components/_button.scss +55 -2
- package/styles/components/_checkbox.scss +7 -3
- package/styles/components/_cta.scss +86 -11
- package/styles/components/_date-list.scss +41 -0
- package/styles/components/_date-range-picker.scss +3 -3
- package/styles/components/_decrement-increment.scss +1 -3
- package/styles/components/_dropdown.scss +2 -4
- package/styles/components/_flight-option.scss +454 -414
- package/styles/components/_form.scss +1266 -77
- package/styles/components/_info-message.scss +71 -0
- package/styles/components/_input.scss +25 -0
- package/styles/components/_list.scss +111 -6
- package/styles/components/_loader.scss +4 -3
- package/styles/components/_mixins.scss +30 -10
- package/styles/components/_placeholders.scss +11 -11
- package/styles/components/_pricing-summary.scss +40 -2
- package/styles/components/_qsm.scss +1 -4
- package/styles/components/_radiobutton.scss +170 -0
- package/styles/components/_select-wrapper.scss +18 -4
- package/styles/components/_spinner.scss +29 -0
- package/styles/components/_step-indicators.scss +14 -6
- package/styles/components/_table.scss +9 -9
- package/styles/components/_tree.scss +31 -41
- package/styles/components/_typeahead.scss +281 -0
- package/styles/components/_variables.scss +15 -15
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BookingPackage, Pax } from "@qite/tide-client/build/types";
|
|
3
|
+
interface PrintOfferButtonProps {
|
|
4
|
+
bookingPackage?: BookingPackage;
|
|
5
|
+
getPax: () => Pax[] | undefined;
|
|
6
|
+
tagIds?: number[];
|
|
7
|
+
printActionId?: number | null;
|
|
8
|
+
onPrinted?: (pdfUrl: string) => void;
|
|
9
|
+
labelIdle?: string;
|
|
10
|
+
labelCreating?: string;
|
|
11
|
+
labelPrinting?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
loader?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const PrintOfferButton: React.FC<PrintOfferButtonProps>;
|
|
17
|
+
export default PrintOfferButton;
|
|
@@ -1,29 +1,37 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { BookingPackageFlight } from "@qite/tide-client/build/types";
|
|
2
3
|
export interface Settings {
|
|
3
4
|
officeId: number;
|
|
5
|
+
token?: string;
|
|
4
6
|
bookingOptions: BookingOptions;
|
|
5
7
|
productPath: string;
|
|
6
8
|
basePath: string;
|
|
7
9
|
roomOptions: {
|
|
8
10
|
isHidden?: boolean | null;
|
|
9
11
|
pathSuffix?: string | null;
|
|
12
|
+
reportPrintActionId?: number | null;
|
|
10
13
|
};
|
|
11
14
|
flightOptions: {
|
|
12
15
|
isHidden?: boolean | null;
|
|
13
16
|
pathSuffix?: string | null;
|
|
17
|
+
reportPrintActionId?: number | null;
|
|
14
18
|
};
|
|
15
19
|
options: {
|
|
16
20
|
pathSuffix: string;
|
|
21
|
+
reportPrintActionId?: number | null;
|
|
17
22
|
};
|
|
18
23
|
travellers: {
|
|
19
24
|
pathSuffix: string;
|
|
25
|
+
reportPrintActionId?: number | null;
|
|
20
26
|
};
|
|
21
27
|
summary: {
|
|
22
28
|
pathSuffix: string;
|
|
23
29
|
checkboxes?: SummaryCheckbox[] | null;
|
|
30
|
+
reportPrintActionId?: number | null;
|
|
24
31
|
};
|
|
25
32
|
confirmation: {
|
|
26
33
|
pathSuffix: string;
|
|
34
|
+
reportPrintActionId?: number | null;
|
|
27
35
|
};
|
|
28
36
|
error: {
|
|
29
37
|
pathSuffix: string;
|
|
@@ -93,9 +101,13 @@ export interface FlightInfo {
|
|
|
93
101
|
outwardCode: string;
|
|
94
102
|
outwardNumbers: string[];
|
|
95
103
|
outwardClass: string;
|
|
104
|
+
outwardDepartureDate: string | null;
|
|
105
|
+
outwardArrivalDate: string | null;
|
|
96
106
|
returnCode: string;
|
|
97
107
|
returnNumbers: string[];
|
|
98
108
|
returnClass: string;
|
|
109
|
+
returnDepartureDate: string | null;
|
|
110
|
+
returnArrivalDate: string | null;
|
|
99
111
|
}
|
|
100
112
|
export interface TravelersFormValues {
|
|
101
113
|
rooms: TravelersFormRoomValues[];
|
|
@@ -131,6 +143,7 @@ export interface BookingAttributes {
|
|
|
131
143
|
allotmentName: string | null;
|
|
132
144
|
allotmentIds: number[];
|
|
133
145
|
includeFlights?: boolean;
|
|
146
|
+
flightRouteId?: string | null;
|
|
134
147
|
}
|
|
135
148
|
export interface FlightLine {
|
|
136
149
|
departureAirportIata?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BookingPackage, Pax } from "@qite/tide-client/build/types";
|
|
2
|
+
export interface UseOfferPrinterArgs {
|
|
3
|
+
bookingPackage?: BookingPackage;
|
|
4
|
+
getPax: () => Pax[] | undefined;
|
|
5
|
+
tagIds?: number[];
|
|
6
|
+
printActionId?: number | null;
|
|
7
|
+
onPrinted?: (pdfUrl: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useOfferPrinter({ bookingPackage, getPax, tagIds, printActionId, onPrinted, }: UseOfferPrinterArgs): {
|
|
10
|
+
handlePrint: () => Promise<void>;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
stage: "idle" | "creating" | "printing";
|
|
13
|
+
};
|