@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.
Files changed (119) hide show
  1. package/build/build-cjs/booking-wizard/components/print-offer-button.d.ts +17 -0
  2. package/build/build-cjs/booking-wizard/features/flight-options/flight-option-flight.d.ts +1 -1
  3. package/build/build-cjs/booking-wizard/features/flight-options/flight-option.d.ts +1 -1
  4. package/build/build-cjs/booking-wizard/types.d.ts +13 -0
  5. package/build/build-cjs/booking-wizard/use-offer-printer.d.ts +13 -0
  6. package/build/build-cjs/index.js +1392 -754
  7. package/build/build-cjs/shared/utils/localization-util.d.ts +6 -0
  8. package/build/build-cjs/shared/utils/tide-api-utils.d.ts +1 -0
  9. package/build/build-esm/booking-wizard/components/print-offer-button.d.ts +17 -0
  10. package/build/build-esm/booking-wizard/features/flight-options/flight-option-flight.d.ts +1 -1
  11. package/build/build-esm/booking-wizard/features/flight-options/flight-option.d.ts +1 -1
  12. package/build/build-esm/booking-wizard/types.d.ts +13 -0
  13. package/build/build-esm/booking-wizard/use-offer-printer.d.ts +13 -0
  14. package/build/build-esm/index.js +1394 -756
  15. package/build/build-esm/shared/utils/localization-util.d.ts +6 -0
  16. package/build/build-esm/shared/utils/tide-api-utils.d.ts +1 -0
  17. package/package.json +4 -6
  18. package/src/booking-product/components/age-select.tsx +2 -8
  19. package/src/booking-product/components/amount-input.tsx +36 -22
  20. package/src/booking-product/components/date-range-picker/calendar-day.tsx +5 -1
  21. package/src/booking-product/components/date-range-picker/calendar.tsx +9 -7
  22. package/src/booking-product/components/date-range-picker/index.tsx +20 -5
  23. package/src/booking-product/components/dates.tsx +22 -18
  24. package/src/booking-product/components/footer.tsx +40 -41
  25. package/src/booking-product/components/header.tsx +44 -33
  26. package/src/booking-product/components/icon.tsx +188 -145
  27. package/src/booking-product/components/product.tsx +66 -33
  28. package/src/booking-product/components/rooms.tsx +70 -55
  29. package/src/booking-product/index.tsx +9 -9
  30. package/src/booking-product/settings-context.ts +3 -3
  31. package/src/booking-product/types.ts +3 -3
  32. package/src/booking-product/utils/api.ts +4 -4
  33. package/src/booking-product/utils/price.ts +5 -3
  34. package/src/booking-wizard/components/icon.tsx +428 -229
  35. package/src/booking-wizard/components/multi-range-filter.tsx +15 -15
  36. package/src/booking-wizard/components/print-offer-button.tsx +66 -0
  37. package/src/booking-wizard/components/step-indicator.tsx +1 -1
  38. package/src/booking-wizard/declarations.d.ts +2 -2
  39. package/src/booking-wizard/features/booking/api.ts +9 -5
  40. package/src/booking-wizard/features/booking/booking-self-contained.tsx +46 -19
  41. package/src/booking-wizard/features/booking/booking-slice.ts +108 -49
  42. package/src/booking-wizard/features/booking/booking.tsx +64 -57
  43. package/src/booking-wizard/features/booking/selectors.ts +45 -22
  44. package/src/booking-wizard/features/confirmation/confirmation.tsx +8 -5
  45. package/src/booking-wizard/features/error/error.tsx +6 -3
  46. package/src/booking-wizard/features/flight-options/flight-filter.tsx +147 -72
  47. package/src/booking-wizard/features/flight-options/flight-option-flight.tsx +53 -21
  48. package/src/booking-wizard/features/flight-options/flight-option-modal.tsx +34 -19
  49. package/src/booking-wizard/features/flight-options/flight-option.tsx +37 -22
  50. package/src/booking-wizard/features/flight-options/flight-utils.ts +220 -105
  51. package/src/booking-wizard/features/flight-options/index.tsx +62 -43
  52. package/src/booking-wizard/features/price-details/price-details-slice.ts +11 -4
  53. package/src/booking-wizard/features/product-options/no-options.tsx +1 -1
  54. package/src/booking-wizard/features/product-options/option-booking-airline-group.tsx +48 -50
  55. package/src/booking-wizard/features/product-options/option-booking-group.tsx +9 -3
  56. package/src/booking-wizard/features/product-options/option-item.tsx +1 -2
  57. package/src/booking-wizard/features/product-options/option-pax-card.tsx +39 -26
  58. package/src/booking-wizard/features/product-options/option-pax-group.tsx +9 -3
  59. package/src/booking-wizard/features/product-options/option-room.tsx +23 -16
  60. package/src/booking-wizard/features/product-options/option-unit-group.tsx +9 -3
  61. package/src/booking-wizard/features/product-options/option-units-card.tsx +68 -57
  62. package/src/booking-wizard/features/product-options/options-form.tsx +250 -124
  63. package/src/booking-wizard/features/room-options/index.tsx +27 -12
  64. package/src/booking-wizard/features/room-options/room-utils.ts +97 -50
  65. package/src/booking-wizard/features/room-options/room.tsx +56 -20
  66. package/src/booking-wizard/features/room-options/traveler-rooms.tsx +34 -22
  67. package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +1 -1
  68. package/src/booking-wizard/features/sidebar/sidebar-util.ts +1 -1
  69. package/src/booking-wizard/features/sidebar/sidebar.tsx +173 -155
  70. package/src/booking-wizard/features/summary/summary-flight.tsx +1 -1
  71. package/src/booking-wizard/features/summary/summary-per-booking-option-group.tsx +45 -33
  72. package/src/booking-wizard/features/summary/summary-per-pax-option-group.tsx +41 -29
  73. package/src/booking-wizard/features/summary/summary-per-unit-option-group.tsx +43 -31
  74. package/src/booking-wizard/features/summary/summary.tsx +325 -294
  75. package/src/booking-wizard/features/travelers-form/travelers-form.tsx +421 -422
  76. package/src/booking-wizard/features/travelers-form/type-ahead-input.tsx +1 -1
  77. package/src/booking-wizard/features/travelers-form/validate-form.ts +1 -1
  78. package/src/booking-wizard/settings-context.ts +7 -0
  79. package/src/booking-wizard/types.ts +19 -7
  80. package/src/booking-wizard/use-offer-printer.ts +136 -0
  81. package/src/index.ts +0 -1
  82. package/src/shared/translations/en-GB.json +237 -0
  83. package/src/shared/translations/fr-BE.json +7 -2
  84. package/src/shared/translations/nl-BE.json +5 -0
  85. package/src/shared/types.ts +1 -1
  86. package/src/shared/utils/localization-util.ts +9 -3
  87. package/src/shared/utils/query-string-util.ts +6 -3
  88. package/src/shared/utils/tide-api-utils.ts +1 -1
  89. package/styles/booking-product-variables.scss +174 -68
  90. package/styles/booking-product.scss +294 -288
  91. package/styles/booking-wizard-variables.scss +872 -529
  92. package/styles/booking-wizard.scss +35 -2
  93. package/styles/components/_base.scss +3 -2
  94. package/styles/components/_booking.scss +149 -679
  95. package/styles/components/_button.scss +55 -2
  96. package/styles/components/_checkbox.scss +7 -3
  97. package/styles/components/_cta.scss +86 -11
  98. package/styles/components/_date-list.scss +41 -0
  99. package/styles/components/_date-range-picker.scss +3 -3
  100. package/styles/components/_decrement-increment.scss +1 -3
  101. package/styles/components/_dropdown.scss +2 -4
  102. package/styles/components/_flight-option.scss +454 -414
  103. package/styles/components/_form.scss +1266 -77
  104. package/styles/components/_info-message.scss +71 -0
  105. package/styles/components/_input.scss +25 -0
  106. package/styles/components/_list.scss +111 -6
  107. package/styles/components/_loader.scss +4 -3
  108. package/styles/components/_mixins.scss +30 -10
  109. package/styles/components/_placeholders.scss +11 -11
  110. package/styles/components/_pricing-summary.scss +40 -2
  111. package/styles/components/_qsm.scss +1 -4
  112. package/styles/components/_radiobutton.scss +170 -0
  113. package/styles/components/_select-wrapper.scss +18 -4
  114. package/styles/components/_spinner.scss +29 -0
  115. package/styles/components/_step-indicators.scss +14 -6
  116. package/styles/components/_table.scss +9 -9
  117. package/styles/components/_tree.scss +31 -41
  118. package/styles/components/_typeahead.scss +281 -0
  119. 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,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  import { GroupedFlightDetails } from "../../types";
3
3
  interface FlightOptionFlightProps {
4
4
  details: GroupedFlightDetails;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  import { GroupedFlights } from "../../types";
3
3
  interface FlightOptionProps {
4
4
  item: GroupedFlights;
@@ -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
+ };