@qite/tide-booking-component 1.4.114 → 1.4.115

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.
@@ -13855,8 +13855,8 @@ PERFORMANCE OF THIS SOFTWARE.
13855
13855
  })(build);
13856
13856
 
13857
13857
  var tideConnection = {
13858
- // host: 'https://localhost:44341',
13859
- host: 'https://preview-tide.tidesoftware.be',
13858
+ host: 'https://localhost:44341',
13859
+ // host: 'https://preview-tide.tidesoftware.be',
13860
13860
  apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
13861
13861
  catalogueIds: [1],
13862
13862
  officeId: 1
@@ -35722,10 +35722,13 @@ var FlightsFlyIn = function (_a) {
35722
35722
  return Math.round(combo.price - selectedCombinationFlight.price);
35723
35723
  };
35724
35724
  // TODO: go to booking page?
35725
- var handleConfirm = function () {
35725
+ var onHandleConfirm = function () {
35726
35726
  if (isOpen) {
35727
35727
  onCancelSearch();
35728
35728
  setIsOpen(false);
35729
+ if ((context === null || context === void 0 ? void 0 : context.onFlightBook) && selectedCombinationFlight) {
35730
+ context.onFlightBook(selectedCombinationFlight);
35731
+ }
35729
35732
  }
35730
35733
  };
35731
35734
  return React__default['default'].createElement(
@@ -36342,7 +36345,7 @@ var FlightsFlyIn = function (_a) {
36342
36345
  React__default['default'].createElement(
36343
36346
  'div',
36344
36347
  { className: 'flyin__button-wrapper' },
36345
- React__default['default'].createElement('button', { className: 'cta cta--select', onClick: handleConfirm }, translations.PRODUCT.BOOK_NOW)
36348
+ React__default['default'].createElement('button', { className: 'cta cta--select', onClick: onHandleConfirm }, translations.PRODUCT.BOOK_NOW)
36346
36349
  )
36347
36350
  )
36348
36351
  );
@@ -43,6 +43,7 @@ export interface SearchResultsConfiguration {
43
43
  alt: string;
44
44
  };
45
45
  onBook?: (result: BookingPackage) => void;
46
+ onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
46
47
  packagingEntry?: PackagingEntry | null;
47
48
  generatePaymentUrl?: boolean;
48
49
  entryStatus?: number;
@@ -13887,8 +13887,8 @@ PERFORMANCE OF THIS SOFTWARE.
13887
13887
  })(build);
13888
13888
 
13889
13889
  var tideConnection = {
13890
- // host: 'https://localhost:44341',
13891
- host: 'https://preview-tide.tidesoftware.be',
13890
+ host: 'https://localhost:44341',
13891
+ // host: 'https://preview-tide.tidesoftware.be',
13892
13892
  apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
13893
13893
  catalogueIds: [1],
13894
13894
  officeId: 1
@@ -35607,10 +35607,13 @@ var FlightsFlyIn = function (_a) {
35607
35607
  return Math.round(combo.price - selectedCombinationFlight.price);
35608
35608
  };
35609
35609
  // TODO: go to booking page?
35610
- var handleConfirm = function () {
35610
+ var onHandleConfirm = function () {
35611
35611
  if (isOpen) {
35612
35612
  onCancelSearch();
35613
35613
  setIsOpen(false);
35614
+ if ((context === null || context === void 0 ? void 0 : context.onFlightBook) && selectedCombinationFlight) {
35615
+ context.onFlightBook(selectedCombinationFlight);
35616
+ }
35614
35617
  }
35615
35618
  };
35616
35619
  return React__default.createElement(
@@ -36207,7 +36210,7 @@ var FlightsFlyIn = function (_a) {
36207
36210
  React__default.createElement(
36208
36211
  'div',
36209
36212
  { className: 'flyin__button-wrapper' },
36210
- React__default.createElement('button', { className: 'cta cta--select', onClick: handleConfirm }, translations.PRODUCT.BOOK_NOW)
36213
+ React__default.createElement('button', { className: 'cta cta--select', onClick: onHandleConfirm }, translations.PRODUCT.BOOK_NOW)
36211
36214
  )
36212
36215
  )
36213
36216
  );
@@ -43,6 +43,7 @@ export interface SearchResultsConfiguration {
43
43
  alt: string;
44
44
  };
45
45
  onBook?: (result: BookingPackage) => void;
46
+ onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
46
47
  packagingEntry?: PackagingEntry | null;
47
48
  generatePaymentUrl?: boolean;
48
49
  entryStatus?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "1.4.114",
3
+ "version": "1.4.115",
4
4
  "description": "React Booking wizard & Booking product component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "types": "build/build-cjs/src/index.d.ts",
@@ -60,6 +60,7 @@ export interface SearchResultsConfiguration {
60
60
 
61
61
  destinationImage?: { url: string; alt: string };
62
62
  onBook?: (result: BookingPackage) => void;
63
+ onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
63
64
  packagingEntry?: PackagingEntry | null;
64
65
 
65
66
  generatePaymentUrl?: boolean;
@@ -140,10 +140,13 @@ const FlightsFlyIn: React.FC<FlightsFlyInProps> = ({ isOpen, setIsOpen }) => {
140
140
  };
141
141
 
142
142
  // TODO: go to booking page?
143
- const handleConfirm = () => {
143
+ const onHandleConfirm = () => {
144
144
  if (isOpen) {
145
145
  onCancelSearch();
146
146
  setIsOpen(false);
147
+ if (context?.onFlightBook && selectedCombinationFlight) {
148
+ context.onFlightBook(selectedCombinationFlight);
149
+ }
147
150
  }
148
151
  };
149
152
 
@@ -492,7 +495,7 @@ const FlightsFlyIn: React.FC<FlightsFlyInProps> = ({ isOpen, setIsOpen }) => {
492
495
  {translations.SHARED.TOTAL_PRICE}: €{selectedCombinationFlight?.price?.toFixed(2)}
493
496
  </div>
494
497
  <div className="flyin__button-wrapper">
495
- <button className="cta cta--select" onClick={handleConfirm}>
498
+ <button className="cta cta--select" onClick={onHandleConfirm}>
496
499
  {translations.PRODUCT.BOOK_NOW}
497
500
  </button>
498
501
  </div>
@@ -3,8 +3,8 @@ import { isNil } from 'lodash';
3
3
  import { ApiSettingsState } from '../types';
4
4
 
5
5
  export const tideConnection = {
6
- // host: 'https://localhost:44341',
7
- host: 'https://preview-tide.tidesoftware.be',
6
+ host: 'https://localhost:44341',
7
+ // host: 'https://preview-tide.tidesoftware.be',
8
8
  apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
9
9
  catalogueIds: [1],
10
10
  officeId: 1