@qite/tide-booking-component 0.0.2-preview.37 → 0.0.2-preview.38

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.
@@ -7047,6 +7047,9 @@ var STEPS = {
7047
7047
  NEXT: "Volgende stap",
7048
7048
  SUBMIT: "Bevestig boeking"
7049
7049
  };
7050
+ var MAIN = {
7051
+ PREPARING_BOOKING: "Even geduld, we bereiden uw boeking voor"
7052
+ };
7050
7053
  var SIDEBAR = {
7051
7054
  OVERVIEW: "Reisoverzicht",
7052
7055
  SLIDE_TOTAL_PRICE: "Totaalbedrag: ",
@@ -7150,6 +7153,7 @@ var ERROR = {
7150
7153
  };
7151
7154
  var translations = {
7152
7155
  STEPS: STEPS,
7156
+ MAIN: MAIN,
7153
7157
  SIDEBAR: SIDEBAR,
7154
7158
  TRAVELERS_FORM: TRAVELERS_FORM,
7155
7159
  OPTIONS_FORM: OPTIONS_FORM,
@@ -8483,7 +8487,7 @@ var TravelersForm = function () {
8483
8487
 
8484
8488
  var Booking = function (_a) {
8485
8489
  var productCode = _a.productCode, productName = _a.productName, allotmentName = _a.allotmentName, tourCode = _a.tourCode, thumbnailUrl = _a.thumbnailUrl;
8486
- var _b = React.useContext(SettingsContext), officeId = _b.officeId, entryStatus = _b.entryStatus, customEntryStatusId = _b.customEntryStatusId, basePath = _b.basePath, options = _b.options, summary = _b.summary, confirmation = _b.confirmation, error = _b.error, showSidebarDeposit = _b.showSidebarDeposit, includeFlights = _b.includeFlights;
8490
+ var _b = React.useContext(SettingsContext), officeId = _b.officeId, entryStatus = _b.entryStatus, customEntryStatusId = _b.customEntryStatusId, basePath = _b.basePath, options = _b.options, summary = _b.summary, confirmation = _b.confirmation, error = _b.error, showSidebarDeposit = _b.showSidebarDeposit, includeFlights = _b.includeFlights, loaderComponent = _b.loaderComponent;
8487
8491
  var dispatch = useAppDispatch();
8488
8492
  var location = router.useLocation();
8489
8493
  var productAttributes = reactRedux.useSelector(selectProductAttributes);
@@ -8589,18 +8593,22 @@ var Booking = function (_a) {
8589
8593
  bookingNumber,
8590
8594
  packageDetails,
8591
8595
  ]);
8592
- return (React__default["default"].createElement(React__default["default"].Fragment, null, ((productAttributes && bookingAttributes && packageDetails) ||
8593
- bookingNumber) && (React__default["default"].createElement("div", { className: "booking" },
8594
- React__default["default"].createElement("div", { className: "booking__content" },
8595
- React__default["default"].createElement("div", { className: "booking__panel" },
8596
- React__default["default"].createElement(router.Router, { basepath: basePath },
8597
- React__default["default"].createElement(StepRoute, { path: "/", number: 1, title: translations.STEPS.PERSONAL_DETAILS, component: React__default["default"].createElement(TravelersForm, null) }),
8598
- React__default["default"].createElement(StepRoute, { path: options.pathSuffix, number: 2, title: translations.STEPS.TRAVEL_OPTIONS, component: React__default["default"].createElement(OptionsForm, null) }),
8599
- React__default["default"].createElement(StepRoute, { path: summary.pathSuffix, number: 3, title: translations.STEPS.SUMMARY, component: React__default["default"].createElement(Summary, null) }),
8600
- React__default["default"].createElement(StepRoute, { path: confirmation.pathSuffix, number: 4, title: translations.STEPS.CONFIRMATION, component: React__default["default"].createElement(Confirmation, null) }),
8601
- React__default["default"].createElement(StepRoute, { path: error.pathSuffix, number: 4, title: translations.STEPS.ERROR, component: React__default["default"].createElement(Error$1, null) }))),
8602
- React__default["default"].createElement("div", { className: "backdrop", id: "backdrop" }),
8603
- React__default["default"].createElement(SidebarContainer, { productName: productName, thumbnailUrl: thumbnailUrl }))))));
8596
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
8597
+ ((productAttributes && bookingAttributes && packageDetails) ||
8598
+ bookingNumber) && (React__default["default"].createElement("div", { className: "booking" },
8599
+ React__default["default"].createElement("div", { className: "booking__content" },
8600
+ React__default["default"].createElement("div", { className: "booking__panel" },
8601
+ React__default["default"].createElement(router.Router, { basepath: basePath },
8602
+ React__default["default"].createElement(StepRoute, { path: "/", number: 1, title: translations.STEPS.PERSONAL_DETAILS, component: React__default["default"].createElement(TravelersForm, null) }),
8603
+ React__default["default"].createElement(StepRoute, { path: options.pathSuffix, number: 2, title: translations.STEPS.TRAVEL_OPTIONS, component: React__default["default"].createElement(OptionsForm, null) }),
8604
+ React__default["default"].createElement(StepRoute, { path: summary.pathSuffix, number: 3, title: translations.STEPS.SUMMARY, component: React__default["default"].createElement(Summary, null) }),
8605
+ React__default["default"].createElement(StepRoute, { path: confirmation.pathSuffix, number: 4, title: translations.STEPS.CONFIRMATION, component: React__default["default"].createElement(Confirmation, null) }),
8606
+ React__default["default"].createElement(StepRoute, { path: error.pathSuffix, number: 4, title: translations.STEPS.ERROR, component: React__default["default"].createElement(Error$1, null) }))),
8607
+ React__default["default"].createElement("div", { className: "backdrop", id: "backdrop" }),
8608
+ React__default["default"].createElement(SidebarContainer, { productName: productName, thumbnailUrl: thumbnailUrl })))),
8609
+ (!packageDetails || !bookingNumber) && (React__default["default"].createElement("div", { className: "booking" },
8610
+ loaderComponent,
8611
+ React__default["default"].createElement("p", { className: "booking__preparation-text" }, translations.MAIN.PREPARING_BOOKING)))));
8604
8612
  };
8605
8613
 
8606
8614
  var BookingWizard = function (_a) {
@@ -7036,6 +7036,9 @@ var STEPS = {
7036
7036
  NEXT: "Volgende stap",
7037
7037
  SUBMIT: "Bevestig boeking"
7038
7038
  };
7039
+ var MAIN = {
7040
+ PREPARING_BOOKING: "Even geduld, we bereiden uw boeking voor"
7041
+ };
7039
7042
  var SIDEBAR = {
7040
7043
  OVERVIEW: "Reisoverzicht",
7041
7044
  SLIDE_TOTAL_PRICE: "Totaalbedrag: ",
@@ -7139,6 +7142,7 @@ var ERROR = {
7139
7142
  };
7140
7143
  var translations = {
7141
7144
  STEPS: STEPS,
7145
+ MAIN: MAIN,
7142
7146
  SIDEBAR: SIDEBAR,
7143
7147
  TRAVELERS_FORM: TRAVELERS_FORM,
7144
7148
  OPTIONS_FORM: OPTIONS_FORM,
@@ -8472,7 +8476,7 @@ var TravelersForm = function () {
8472
8476
 
8473
8477
  var Booking = function (_a) {
8474
8478
  var productCode = _a.productCode, productName = _a.productName, allotmentName = _a.allotmentName, tourCode = _a.tourCode, thumbnailUrl = _a.thumbnailUrl;
8475
- var _b = useContext(SettingsContext), officeId = _b.officeId, entryStatus = _b.entryStatus, customEntryStatusId = _b.customEntryStatusId, basePath = _b.basePath, options = _b.options, summary = _b.summary, confirmation = _b.confirmation, error = _b.error, showSidebarDeposit = _b.showSidebarDeposit, includeFlights = _b.includeFlights;
8479
+ var _b = useContext(SettingsContext), officeId = _b.officeId, entryStatus = _b.entryStatus, customEntryStatusId = _b.customEntryStatusId, basePath = _b.basePath, options = _b.options, summary = _b.summary, confirmation = _b.confirmation, error = _b.error, showSidebarDeposit = _b.showSidebarDeposit, includeFlights = _b.includeFlights, loaderComponent = _b.loaderComponent;
8476
8480
  var dispatch = useAppDispatch();
8477
8481
  var location = useLocation();
8478
8482
  var productAttributes = useSelector(selectProductAttributes);
@@ -8578,18 +8582,22 @@ var Booking = function (_a) {
8578
8582
  bookingNumber,
8579
8583
  packageDetails,
8580
8584
  ]);
8581
- return (React.createElement(React.Fragment, null, ((productAttributes && bookingAttributes && packageDetails) ||
8582
- bookingNumber) && (React.createElement("div", { className: "booking" },
8583
- React.createElement("div", { className: "booking__content" },
8584
- React.createElement("div", { className: "booking__panel" },
8585
- React.createElement(Router, { basepath: basePath },
8586
- React.createElement(StepRoute, { path: "/", number: 1, title: translations.STEPS.PERSONAL_DETAILS, component: React.createElement(TravelersForm, null) }),
8587
- React.createElement(StepRoute, { path: options.pathSuffix, number: 2, title: translations.STEPS.TRAVEL_OPTIONS, component: React.createElement(OptionsForm, null) }),
8588
- React.createElement(StepRoute, { path: summary.pathSuffix, number: 3, title: translations.STEPS.SUMMARY, component: React.createElement(Summary, null) }),
8589
- React.createElement(StepRoute, { path: confirmation.pathSuffix, number: 4, title: translations.STEPS.CONFIRMATION, component: React.createElement(Confirmation, null) }),
8590
- React.createElement(StepRoute, { path: error.pathSuffix, number: 4, title: translations.STEPS.ERROR, component: React.createElement(Error$1, null) }))),
8591
- React.createElement("div", { className: "backdrop", id: "backdrop" }),
8592
- React.createElement(SidebarContainer, { productName: productName, thumbnailUrl: thumbnailUrl }))))));
8585
+ return (React.createElement(React.Fragment, null,
8586
+ ((productAttributes && bookingAttributes && packageDetails) ||
8587
+ bookingNumber) && (React.createElement("div", { className: "booking" },
8588
+ React.createElement("div", { className: "booking__content" },
8589
+ React.createElement("div", { className: "booking__panel" },
8590
+ React.createElement(Router, { basepath: basePath },
8591
+ React.createElement(StepRoute, { path: "/", number: 1, title: translations.STEPS.PERSONAL_DETAILS, component: React.createElement(TravelersForm, null) }),
8592
+ React.createElement(StepRoute, { path: options.pathSuffix, number: 2, title: translations.STEPS.TRAVEL_OPTIONS, component: React.createElement(OptionsForm, null) }),
8593
+ React.createElement(StepRoute, { path: summary.pathSuffix, number: 3, title: translations.STEPS.SUMMARY, component: React.createElement(Summary, null) }),
8594
+ React.createElement(StepRoute, { path: confirmation.pathSuffix, number: 4, title: translations.STEPS.CONFIRMATION, component: React.createElement(Confirmation, null) }),
8595
+ React.createElement(StepRoute, { path: error.pathSuffix, number: 4, title: translations.STEPS.ERROR, component: React.createElement(Error$1, null) }))),
8596
+ React.createElement("div", { className: "backdrop", id: "backdrop" }),
8597
+ React.createElement(SidebarContainer, { productName: productName, thumbnailUrl: thumbnailUrl })))),
8598
+ (!packageDetails || !bookingNumber) && (React.createElement("div", { className: "booking" },
8599
+ loaderComponent,
8600
+ React.createElement("p", { className: "booking__preparation-text" }, translations.MAIN.PREPARING_BOOKING)))));
8593
8601
  };
8594
8602
 
8595
8603
  var BookingWizard = function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "0.0.2-preview.37",
3
+ "version": "0.0.2-preview.38",
4
4
  "description": "React BookingWizard component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "module": "build/build-esm/index.js",
@@ -65,6 +65,7 @@ const Booking: React.FC<BookingProps> = ({
65
65
  error,
66
66
  showSidebarDeposit,
67
67
  includeFlights,
68
+ loaderComponent,
68
69
  } = useContext(SettingsContext);
69
70
 
70
71
  const dispatch = useAppDispatch();
@@ -245,6 +246,14 @@ const Booking: React.FC<BookingProps> = ({
245
246
  </div>
246
247
  </div>
247
248
  )}
249
+ {(!packageDetails || !bookingNumber) && (
250
+ <div className="booking">
251
+ {loaderComponent}
252
+ <p className="booking__preparation-text">
253
+ {translations.MAIN.PREPARING_BOOKING}
254
+ </p>
255
+ </div>
256
+ )}
248
257
  </>
249
258
  );
250
259
  };
@@ -9,6 +9,9 @@
9
9
  "NEXT": "Volgende stap",
10
10
  "SUBMIT": "Bevestig boeking"
11
11
  },
12
+ "MAIN": {
13
+ "PREPARING_BOOKING": "Even geduld, we bereiden uw boeking voor"
14
+ },
12
15
  "SIDEBAR": {
13
16
  "OVERVIEW": "Reisoverzicht",
14
17
  "SLIDE_TOTAL_PRICE": "Totaalbedrag: ",