@qite/tide-booking-component 0.0.2-preview.58 → 0.0.2-preview.60

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.
@@ -15,8 +15,10 @@ export interface BookingState {
15
15
  skipPaymentWithAgent: boolean;
16
16
  generatePaymentUrl: boolean;
17
17
  isUnavailable?: boolean;
18
+ tagIds?: number[];
19
+ agentAdressId?: number;
18
20
  }
19
21
  export declare const fetchPackage: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
20
- export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setCustomEntryStatusId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, string>, setProductAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductAttributes, string>, setBookingAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAttributes, string>, setCalculateDeposit: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setBookingNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setIsRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setFetchingPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackage, string>, setPackageRooms: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageRoom[], string>, setPackageOptionPax: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionPax[], string>, setPackageOptionUnits: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionUnit[], string>, setPackageGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionGroup<PerBookingPackageOption>[], string>, setSkipPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setGeneratePaymentUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
22
+ export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setCustomEntryStatusId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, string>, setProductAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductAttributes, string>, setBookingAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAttributes, string>, setCalculateDeposit: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setBookingNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setIsRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setFetchingPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackage, string>, setPackageRooms: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageRoom[], string>, setPackageOptionPax: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionPax[], string>, setPackageOptionUnits: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionUnit[], string>, setPackageGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionGroup<PerBookingPackageOption>[], string>, setSkipPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setGeneratePaymentUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setTagIds: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number[] | undefined, string>, setAgentAdressId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, string>;
21
23
  declare const _default: import("redux").Reducer<BookingState, import("redux").AnyAction>;
22
24
  export default _default;
@@ -17,6 +17,8 @@ export declare const selectRequestRooms: (state: RootState) => import("@qite/tid
17
17
  export declare const selectOfficeId: (state: RootState) => number;
18
18
  export declare const selectEntryStatus: (state: RootState) => number;
19
19
  export declare const selectCustomEntryStatusId: (state: RootState) => number | undefined;
20
+ export declare const selectTagIds: (state: RootState) => number[] | undefined;
21
+ export declare const selectAgentAdressId: (state: RootState) => number | undefined;
20
22
  export declare const selectProductAttributes: (state: RootState) => import("../../types").ProductAttributes | undefined;
21
23
  export declare const selectBookingAttributes: (state: RootState) => import("../../types").BookingAttributes | undefined;
22
24
  export declare const selectBookingNumber: (state: RootState) => string | undefined;
@@ -71,7 +73,7 @@ export declare const selectBookingPackageBookRequest: ((state: {
71
73
  travelersForm: import("../travelers-form/travelers-form-slice").TravelersFormState;
72
74
  priceDetails: import("../price-details/price-details-slice").PriceDetailsState;
73
75
  summary: import("../summary/summary-slice").SummaryState;
74
- }) => BookingPackageRequest<BookingPackageBookRequest> | null) & import("reselect").OutputSelectorFields<(args_0: number, args_1: number, args_2: number | undefined, args_3: BookingPackagePax[], args_4: BookingPackageAddress | undefined, args_5: import("@qite/tide-client/build/types/offer").BookingPackage | undefined, args_6: boolean, args_7: number | undefined, args_8: boolean, args_9: boolean, args_10: import("@qite/tide-client/build/types/offer").BookingProductNotification[]) => BookingPackageRequest<BookingPackageBookRequest> & {
76
+ }) => BookingPackageRequest<BookingPackageBookRequest> | null) & import("reselect").OutputSelectorFields<(args_0: number, args_1: number, args_2: number | undefined, args_3: BookingPackagePax[], args_4: BookingPackageAddress | undefined, args_5: import("@qite/tide-client/build/types/offer").BookingPackage | undefined, args_6: boolean, args_7: number | undefined, args_8: boolean, args_9: boolean, args_10: import("@qite/tide-client/build/types/offer").BookingProductNotification[], args_11: number[] | undefined, args_12: number | undefined) => BookingPackageRequest<BookingPackageBookRequest> & {
75
77
  clearCache: () => void;
76
78
  }> & {
77
79
  clearCache: () => void;
@@ -30,6 +30,8 @@ export interface Settings {
30
30
  sidebarFooterComponent?: JSX.Element | null;
31
31
  loaderComponent?: JSX.Element | null;
32
32
  icons?: string | null;
33
+ tagIds?: number[];
34
+ agentAdressId?: number;
33
35
  }
34
36
  export interface SummaryCheckbox {
35
37
  id: string;
@@ -6800,6 +6800,10 @@ var selectEntryStatus = function (state) {
6800
6800
  var selectCustomEntryStatusId = function (state) {
6801
6801
  return state.booking.customEntryStatusId;
6802
6802
  };
6803
+ var selectTagIds = function (state) { return state.booking.tagIds; };
6804
+ var selectAgentAdressId = function (state) {
6805
+ return state.booking.agentAdressId;
6806
+ };
6803
6807
  var selectProductAttributes = function (state) {
6804
6808
  return state.booking.productAttributes;
6805
6809
  };
@@ -6877,7 +6881,7 @@ var selectBookingAddress = toolkit.createSelector(selectTravelersFormValues, sel
6877
6881
  email: formValues === null || formValues === void 0 ? void 0 : formValues.email,
6878
6882
  };
6879
6883
  });
6880
- var selectBookingPackageBookRequest = toolkit.createSelector(selectOfficeId, selectEntryStatus, selectCustomEntryStatusId, selectBookingPackagePax, selectBookingAddress, selectPackageDetails, selectCalculateDeposit, selectAgentId, selectGeneratePaymentUrl, selectSkipPaymentWithAgent, selectNotifications, function (officeId, entryStatus, customEntryStatusId, pax, address, packageDetails, calculateDeposit, agentId, generatePaymentUrl, skipPaymentWithAgent, notifications) {
6884
+ var selectBookingPackageBookRequest = toolkit.createSelector(selectOfficeId, selectEntryStatus, selectCustomEntryStatusId, selectBookingPackagePax, selectBookingAddress, selectPackageDetails, selectCalculateDeposit, selectAgentId, selectGeneratePaymentUrl, selectSkipPaymentWithAgent, selectNotifications, selectTagIds, selectAgentAdressId, function (officeId, entryStatus, customEntryStatusId, pax, address, packageDetails, calculateDeposit, agentId, generatePaymentUrl, skipPaymentWithAgent, notifications, tagIds, agentAdressId) {
6881
6885
  if (!packageDetails || (pax === null || pax === void 0 ? void 0 : pax.length) == 0)
6882
6886
  return null;
6883
6887
  var returnPaymentUrl = false;
@@ -6896,6 +6900,7 @@ var selectBookingPackageBookRequest = toolkit.createSelector(selectOfficeId, sel
6896
6900
  calculateDeposit: calculateDeposit,
6897
6901
  returnPaymentUrl: returnPaymentUrl,
6898
6902
  notifications: notifications,
6903
+ tagIds: tagIds,
6899
6904
  },
6900
6905
  };
6901
6906
  });
@@ -6974,6 +6979,8 @@ var initialState$1 = {
6974
6979
  isBusy: false,
6975
6980
  skipPaymentWithAgent: false,
6976
6981
  generatePaymentUrl: false,
6982
+ tagIds: [],
6983
+ agentAdressId: undefined,
6977
6984
  };
6978
6985
  var fetchPackage = toolkit.createAsyncThunk("booking/fetchPackage", function (_, _a) {
6979
6986
  var dispatch = _a.dispatch;
@@ -7132,6 +7139,12 @@ var bookingSlice = toolkit.createSlice({
7132
7139
  if (option)
7133
7140
  option.groups = action.payload;
7134
7141
  },
7142
+ setTagIds: function (state, action) {
7143
+ state.tagIds = action.payload;
7144
+ },
7145
+ setAgentAdressId: function (state, action) {
7146
+ state.agentAdressId = action.payload;
7147
+ },
7135
7148
  },
7136
7149
  extraReducers: function (builder) {
7137
7150
  builder.addCase(fetchPackageDetails.fulfilled, function (state, action) {
@@ -7168,7 +7181,7 @@ var bookingSlice = toolkit.createSlice({
7168
7181
  });
7169
7182
  },
7170
7183
  });
7171
- var setOfficeId = (_a = bookingSlice.actions, _a.setOfficeId), setEntryStatus = _a.setEntryStatus, setCustomEntryStatusId = _a.setCustomEntryStatusId, setProductAttributes = _a.setProductAttributes, setBookingAttributes = _a.setBookingAttributes, setCalculateDeposit = _a.setCalculateDeposit, setBookingNumber = _a.setBookingNumber, setIsRetry = _a.setIsRetry, setFetchingPackage = _a.setFetchingPackage, setPackage = _a.setPackage, setPackageRooms = _a.setPackageRooms, setPackageOptionPax = _a.setPackageOptionPax, setPackageOptionUnits = _a.setPackageOptionUnits, setPackageGroups = _a.setPackageGroups, setSkipPayment = _a.setSkipPayment, setGeneratePaymentUrl = _a.setGeneratePaymentUrl;
7184
+ var setOfficeId = (_a = bookingSlice.actions, _a.setOfficeId), setEntryStatus = _a.setEntryStatus, setCustomEntryStatusId = _a.setCustomEntryStatusId, setProductAttributes = _a.setProductAttributes, setBookingAttributes = _a.setBookingAttributes, setCalculateDeposit = _a.setCalculateDeposit, setBookingNumber = _a.setBookingNumber, setIsRetry = _a.setIsRetry, setFetchingPackage = _a.setFetchingPackage, setPackage = _a.setPackage, setPackageRooms = _a.setPackageRooms, setPackageOptionPax = _a.setPackageOptionPax, setPackageOptionUnits = _a.setPackageOptionUnits, setPackageGroups = _a.setPackageGroups, setSkipPayment = _a.setSkipPayment, setGeneratePaymentUrl = _a.setGeneratePaymentUrl, setTagIds = _a.setTagIds, setAgentAdressId = _a.setAgentAdressId;
7172
7185
  var bookingReducer = bookingSlice.reducer;
7173
7186
 
7174
7187
  var initialState = {
@@ -7206,6 +7219,8 @@ var SettingsContext = React__default["default"].createContext({
7206
7219
  officeId: 1,
7207
7220
  entryStatus: 0,
7208
7221
  customEntryStatusId: null,
7222
+ tagIds: [],
7223
+ agentAdressId: undefined,
7209
7224
  productPath: "/",
7210
7225
  basePath: "/boeken",
7211
7226
  options: {
@@ -8326,7 +8341,7 @@ var OptionsForm = function () {
8326
8341
  var ProductCard = function (_a) {
8327
8342
  var productName = _a.productName, thumbnailUrl = _a.thumbnailUrl, handleToggleClick = _a.handleToggleClick;
8328
8343
  return (React__default["default"].createElement("div", { className: "booking__product" },
8329
- React__default["default"].createElement("div", { className: "booking__product-image" }, thumbnailUrl && (React__default["default"].createElement("img", { src: "".concat(thumbnailUrl, "?height=100&width=100"), alt: productName, className: "mediacontent" }))),
8344
+ React__default["default"].createElement("div", { className: "booking__product-image" }, thumbnailUrl && (React__default["default"].createElement("img", { src: "".concat(thumbnailUrl, "?height=400&width=400"), alt: productName, className: "mediacontent" }))),
8330
8345
  React__default["default"].createElement("div", { className: "booking__product-text" },
8331
8346
  React__default["default"].createElement("h3", { className: "booking__product-heading" }, productName)),
8332
8347
  React__default["default"].createElement("button", { type: "button", className: "booking__product-toggle", onClick: handleToggleClick })));
@@ -8958,8 +8973,15 @@ var TravelersForm = function () {
8958
8973
  var adultIds = reactRedux.useSelector(selectAdultIds);
8959
8974
  var childIds = reactRedux.useSelector(selectChildIds);
8960
8975
  var agents = reactRedux.useSelector(selectAgents);
8976
+ var agentAdressId = reactRedux.useSelector(selectAgentAdressId);
8977
+ console.log("agentAdressId", agentAdressId);
8978
+ React.useEffect(function () {
8979
+ if (agentAdressId) {
8980
+ formik$1.setFieldValue("travelAgentId", agentAdressId);
8981
+ }
8982
+ }, [agentAdressId]);
8961
8983
  var initialValues = (_a = reactRedux.useSelector(selectTravelersFormValues)) !== null && _a !== void 0 ? _a : createInitialValues(adultIds, childIds, startDate);
8962
- var _c = React.useState(initialValues.travelAgentId > 0), showAgents = _c[0], setShowAgents = _c[1];
8984
+ var _c = React.useState(initialValues.travelAgentId > 0 || agentAdressId != undefined), showAgents = _c[0], setShowAgents = _c[1];
8963
8985
  var typeaheadAgents = (_b = lodash.sortBy(agents === null || agents === void 0 ? void 0 : agents.map(function (x) { return ({
8964
8986
  key: "".concat(x.id),
8965
8987
  value: "".concat(x.name, " (").concat(x.postalCode, " ").concat(x.location, ")"),
@@ -9180,7 +9202,7 @@ var TravelersForm = function () {
9180
9202
 
9181
9203
  var Booking = function (_a) {
9182
9204
  var productCode = _a.productCode, productName = _a.productName, thumbnailUrl = _a.thumbnailUrl;
9183
- 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, skipPaymentWithAgent = _b.skipPaymentWithAgent, generatePaymentUrl = _b.generatePaymentUrl;
9205
+ 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, skipPaymentWithAgent = _b.skipPaymentWithAgent, generatePaymentUrl = _b.generatePaymentUrl, tagIds = _b.tagIds, agentAdressId = _b.agentAdressId;
9184
9206
  var dispatch = useAppDispatch();
9185
9207
  var location = router.useLocation();
9186
9208
  var productAttributes = reactRedux.useSelector(selectProductAttributes);
@@ -9259,6 +9281,8 @@ var Booking = function (_a) {
9259
9281
  dispatch(setEntryStatus(entryStatus));
9260
9282
  dispatch(setCustomEntryStatusId(customEntryStatusId !== null && customEntryStatusId !== void 0 ? customEntryStatusId : undefined));
9261
9283
  dispatch(setCalculateDeposit(showSidebarDeposit));
9284
+ dispatch(setTagIds(tagIds !== null && tagIds !== void 0 ? tagIds : undefined));
9285
+ dispatch(setAgentAdressId(agentAdressId !== null && agentAdressId !== void 0 ? agentAdressId : undefined));
9262
9286
  }, [
9263
9287
  officeId,
9264
9288
  entryStatus,
@@ -9268,6 +9292,8 @@ var Booking = function (_a) {
9268
9292
  setEntryStatus,
9269
9293
  setCustomEntryStatusId,
9270
9294
  setCalculateDeposit,
9295
+ tagIds,
9296
+ agentAdressId,
9271
9297
  ]);
9272
9298
  React.useEffect(function () {
9273
9299
  if (!productAttributes ||
@@ -15,8 +15,10 @@ export interface BookingState {
15
15
  skipPaymentWithAgent: boolean;
16
16
  generatePaymentUrl: boolean;
17
17
  isUnavailable?: boolean;
18
+ tagIds?: number[];
19
+ agentAdressId?: number;
18
20
  }
19
21
  export declare const fetchPackage: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
20
- export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setCustomEntryStatusId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, string>, setProductAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductAttributes, string>, setBookingAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAttributes, string>, setCalculateDeposit: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setBookingNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setIsRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setFetchingPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackage, string>, setPackageRooms: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageRoom[], string>, setPackageOptionPax: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionPax[], string>, setPackageOptionUnits: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionUnit[], string>, setPackageGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionGroup<PerBookingPackageOption>[], string>, setSkipPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setGeneratePaymentUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
22
+ export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>, setCustomEntryStatusId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, string>, setProductAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductAttributes, string>, setBookingAttributes: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAttributes, string>, setCalculateDeposit: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setBookingNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setIsRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setFetchingPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackage, string>, setPackageRooms: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageRoom[], string>, setPackageOptionPax: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionPax[], string>, setPackageOptionUnits: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionUnit[], string>, setPackageGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionGroup<PerBookingPackageOption>[], string>, setSkipPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setGeneratePaymentUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, setTagIds: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number[] | undefined, string>, setAgentAdressId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, string>;
21
23
  declare const _default: import("redux").Reducer<BookingState, import("redux").AnyAction>;
22
24
  export default _default;
@@ -17,6 +17,8 @@ export declare const selectRequestRooms: (state: RootState) => import("@qite/tid
17
17
  export declare const selectOfficeId: (state: RootState) => number;
18
18
  export declare const selectEntryStatus: (state: RootState) => number;
19
19
  export declare const selectCustomEntryStatusId: (state: RootState) => number | undefined;
20
+ export declare const selectTagIds: (state: RootState) => number[] | undefined;
21
+ export declare const selectAgentAdressId: (state: RootState) => number | undefined;
20
22
  export declare const selectProductAttributes: (state: RootState) => import("../../types").ProductAttributes | undefined;
21
23
  export declare const selectBookingAttributes: (state: RootState) => import("../../types").BookingAttributes | undefined;
22
24
  export declare const selectBookingNumber: (state: RootState) => string | undefined;
@@ -71,7 +73,7 @@ export declare const selectBookingPackageBookRequest: ((state: {
71
73
  travelersForm: import("../travelers-form/travelers-form-slice").TravelersFormState;
72
74
  priceDetails: import("../price-details/price-details-slice").PriceDetailsState;
73
75
  summary: import("../summary/summary-slice").SummaryState;
74
- }) => BookingPackageRequest<BookingPackageBookRequest> | null) & import("reselect").OutputSelectorFields<(args_0: number, args_1: number, args_2: number | undefined, args_3: BookingPackagePax[], args_4: BookingPackageAddress | undefined, args_5: import("@qite/tide-client/build/types/offer").BookingPackage | undefined, args_6: boolean, args_7: number | undefined, args_8: boolean, args_9: boolean, args_10: import("@qite/tide-client/build/types/offer").BookingProductNotification[]) => BookingPackageRequest<BookingPackageBookRequest> & {
76
+ }) => BookingPackageRequest<BookingPackageBookRequest> | null) & import("reselect").OutputSelectorFields<(args_0: number, args_1: number, args_2: number | undefined, args_3: BookingPackagePax[], args_4: BookingPackageAddress | undefined, args_5: import("@qite/tide-client/build/types/offer").BookingPackage | undefined, args_6: boolean, args_7: number | undefined, args_8: boolean, args_9: boolean, args_10: import("@qite/tide-client/build/types/offer").BookingProductNotification[], args_11: number[] | undefined, args_12: number | undefined) => BookingPackageRequest<BookingPackageBookRequest> & {
75
77
  clearCache: () => void;
76
78
  }> & {
77
79
  clearCache: () => void;
@@ -30,6 +30,8 @@ export interface Settings {
30
30
  sidebarFooterComponent?: JSX.Element | null;
31
31
  loaderComponent?: JSX.Element | null;
32
32
  icons?: string | null;
33
+ tagIds?: number[];
34
+ agentAdressId?: number;
33
35
  }
34
36
  export interface SummaryCheckbox {
35
37
  id: string;
@@ -6789,6 +6789,10 @@ var selectEntryStatus = function (state) {
6789
6789
  var selectCustomEntryStatusId = function (state) {
6790
6790
  return state.booking.customEntryStatusId;
6791
6791
  };
6792
+ var selectTagIds = function (state) { return state.booking.tagIds; };
6793
+ var selectAgentAdressId = function (state) {
6794
+ return state.booking.agentAdressId;
6795
+ };
6792
6796
  var selectProductAttributes = function (state) {
6793
6797
  return state.booking.productAttributes;
6794
6798
  };
@@ -6866,7 +6870,7 @@ var selectBookingAddress = createSelector(selectTravelersFormValues, selectBooki
6866
6870
  email: formValues === null || formValues === void 0 ? void 0 : formValues.email,
6867
6871
  };
6868
6872
  });
6869
- var selectBookingPackageBookRequest = createSelector(selectOfficeId, selectEntryStatus, selectCustomEntryStatusId, selectBookingPackagePax, selectBookingAddress, selectPackageDetails, selectCalculateDeposit, selectAgentId, selectGeneratePaymentUrl, selectSkipPaymentWithAgent, selectNotifications, function (officeId, entryStatus, customEntryStatusId, pax, address, packageDetails, calculateDeposit, agentId, generatePaymentUrl, skipPaymentWithAgent, notifications) {
6873
+ var selectBookingPackageBookRequest = createSelector(selectOfficeId, selectEntryStatus, selectCustomEntryStatusId, selectBookingPackagePax, selectBookingAddress, selectPackageDetails, selectCalculateDeposit, selectAgentId, selectGeneratePaymentUrl, selectSkipPaymentWithAgent, selectNotifications, selectTagIds, selectAgentAdressId, function (officeId, entryStatus, customEntryStatusId, pax, address, packageDetails, calculateDeposit, agentId, generatePaymentUrl, skipPaymentWithAgent, notifications, tagIds, agentAdressId) {
6870
6874
  if (!packageDetails || (pax === null || pax === void 0 ? void 0 : pax.length) == 0)
6871
6875
  return null;
6872
6876
  var returnPaymentUrl = false;
@@ -6885,6 +6889,7 @@ var selectBookingPackageBookRequest = createSelector(selectOfficeId, selectEntry
6885
6889
  calculateDeposit: calculateDeposit,
6886
6890
  returnPaymentUrl: returnPaymentUrl,
6887
6891
  notifications: notifications,
6892
+ tagIds: tagIds,
6888
6893
  },
6889
6894
  };
6890
6895
  });
@@ -6963,6 +6968,8 @@ var initialState$1 = {
6963
6968
  isBusy: false,
6964
6969
  skipPaymentWithAgent: false,
6965
6970
  generatePaymentUrl: false,
6971
+ tagIds: [],
6972
+ agentAdressId: undefined,
6966
6973
  };
6967
6974
  var fetchPackage = createAsyncThunk("booking/fetchPackage", function (_, _a) {
6968
6975
  var dispatch = _a.dispatch;
@@ -7121,6 +7128,12 @@ var bookingSlice = createSlice({
7121
7128
  if (option)
7122
7129
  option.groups = action.payload;
7123
7130
  },
7131
+ setTagIds: function (state, action) {
7132
+ state.tagIds = action.payload;
7133
+ },
7134
+ setAgentAdressId: function (state, action) {
7135
+ state.agentAdressId = action.payload;
7136
+ },
7124
7137
  },
7125
7138
  extraReducers: function (builder) {
7126
7139
  builder.addCase(fetchPackageDetails.fulfilled, function (state, action) {
@@ -7157,7 +7170,7 @@ var bookingSlice = createSlice({
7157
7170
  });
7158
7171
  },
7159
7172
  });
7160
- var setOfficeId = (_a = bookingSlice.actions, _a.setOfficeId), setEntryStatus = _a.setEntryStatus, setCustomEntryStatusId = _a.setCustomEntryStatusId, setProductAttributes = _a.setProductAttributes, setBookingAttributes = _a.setBookingAttributes, setCalculateDeposit = _a.setCalculateDeposit, setBookingNumber = _a.setBookingNumber, setIsRetry = _a.setIsRetry, setFetchingPackage = _a.setFetchingPackage, setPackage = _a.setPackage, setPackageRooms = _a.setPackageRooms, setPackageOptionPax = _a.setPackageOptionPax, setPackageOptionUnits = _a.setPackageOptionUnits, setPackageGroups = _a.setPackageGroups, setSkipPayment = _a.setSkipPayment, setGeneratePaymentUrl = _a.setGeneratePaymentUrl;
7173
+ var setOfficeId = (_a = bookingSlice.actions, _a.setOfficeId), setEntryStatus = _a.setEntryStatus, setCustomEntryStatusId = _a.setCustomEntryStatusId, setProductAttributes = _a.setProductAttributes, setBookingAttributes = _a.setBookingAttributes, setCalculateDeposit = _a.setCalculateDeposit, setBookingNumber = _a.setBookingNumber, setIsRetry = _a.setIsRetry, setFetchingPackage = _a.setFetchingPackage, setPackage = _a.setPackage, setPackageRooms = _a.setPackageRooms, setPackageOptionPax = _a.setPackageOptionPax, setPackageOptionUnits = _a.setPackageOptionUnits, setPackageGroups = _a.setPackageGroups, setSkipPayment = _a.setSkipPayment, setGeneratePaymentUrl = _a.setGeneratePaymentUrl, setTagIds = _a.setTagIds, setAgentAdressId = _a.setAgentAdressId;
7161
7174
  var bookingReducer = bookingSlice.reducer;
7162
7175
 
7163
7176
  var initialState = {
@@ -7195,6 +7208,8 @@ var SettingsContext = React.createContext({
7195
7208
  officeId: 1,
7196
7209
  entryStatus: 0,
7197
7210
  customEntryStatusId: null,
7211
+ tagIds: [],
7212
+ agentAdressId: undefined,
7198
7213
  productPath: "/",
7199
7214
  basePath: "/boeken",
7200
7215
  options: {
@@ -8315,7 +8330,7 @@ var OptionsForm = function () {
8315
8330
  var ProductCard = function (_a) {
8316
8331
  var productName = _a.productName, thumbnailUrl = _a.thumbnailUrl, handleToggleClick = _a.handleToggleClick;
8317
8332
  return (React.createElement("div", { className: "booking__product" },
8318
- React.createElement("div", { className: "booking__product-image" }, thumbnailUrl && (React.createElement("img", { src: "".concat(thumbnailUrl, "?height=100&width=100"), alt: productName, className: "mediacontent" }))),
8333
+ React.createElement("div", { className: "booking__product-image" }, thumbnailUrl && (React.createElement("img", { src: "".concat(thumbnailUrl, "?height=400&width=400"), alt: productName, className: "mediacontent" }))),
8319
8334
  React.createElement("div", { className: "booking__product-text" },
8320
8335
  React.createElement("h3", { className: "booking__product-heading" }, productName)),
8321
8336
  React.createElement("button", { type: "button", className: "booking__product-toggle", onClick: handleToggleClick })));
@@ -8947,8 +8962,15 @@ var TravelersForm = function () {
8947
8962
  var adultIds = useSelector(selectAdultIds);
8948
8963
  var childIds = useSelector(selectChildIds);
8949
8964
  var agents = useSelector(selectAgents);
8965
+ var agentAdressId = useSelector(selectAgentAdressId);
8966
+ console.log("agentAdressId", agentAdressId);
8967
+ useEffect(function () {
8968
+ if (agentAdressId) {
8969
+ formik.setFieldValue("travelAgentId", agentAdressId);
8970
+ }
8971
+ }, [agentAdressId]);
8950
8972
  var initialValues = (_a = useSelector(selectTravelersFormValues)) !== null && _a !== void 0 ? _a : createInitialValues(adultIds, childIds, startDate);
8951
- var _c = useState(initialValues.travelAgentId > 0), showAgents = _c[0], setShowAgents = _c[1];
8973
+ var _c = useState(initialValues.travelAgentId > 0 || agentAdressId != undefined), showAgents = _c[0], setShowAgents = _c[1];
8952
8974
  var typeaheadAgents = (_b = sortBy(agents === null || agents === void 0 ? void 0 : agents.map(function (x) { return ({
8953
8975
  key: "".concat(x.id),
8954
8976
  value: "".concat(x.name, " (").concat(x.postalCode, " ").concat(x.location, ")"),
@@ -9169,7 +9191,7 @@ var TravelersForm = function () {
9169
9191
 
9170
9192
  var Booking = function (_a) {
9171
9193
  var productCode = _a.productCode, productName = _a.productName, thumbnailUrl = _a.thumbnailUrl;
9172
- 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, skipPaymentWithAgent = _b.skipPaymentWithAgent, generatePaymentUrl = _b.generatePaymentUrl;
9194
+ 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, skipPaymentWithAgent = _b.skipPaymentWithAgent, generatePaymentUrl = _b.generatePaymentUrl, tagIds = _b.tagIds, agentAdressId = _b.agentAdressId;
9173
9195
  var dispatch = useAppDispatch();
9174
9196
  var location = useLocation();
9175
9197
  var productAttributes = useSelector(selectProductAttributes);
@@ -9248,6 +9270,8 @@ var Booking = function (_a) {
9248
9270
  dispatch(setEntryStatus(entryStatus));
9249
9271
  dispatch(setCustomEntryStatusId(customEntryStatusId !== null && customEntryStatusId !== void 0 ? customEntryStatusId : undefined));
9250
9272
  dispatch(setCalculateDeposit(showSidebarDeposit));
9273
+ dispatch(setTagIds(tagIds !== null && tagIds !== void 0 ? tagIds : undefined));
9274
+ dispatch(setAgentAdressId(agentAdressId !== null && agentAdressId !== void 0 ? agentAdressId : undefined));
9251
9275
  }, [
9252
9276
  officeId,
9253
9277
  entryStatus,
@@ -9257,6 +9281,8 @@ var Booking = function (_a) {
9257
9281
  setEntryStatus,
9258
9282
  setCustomEntryStatusId,
9259
9283
  setCalculateDeposit,
9284
+ tagIds,
9285
+ agentAdressId,
9260
9286
  ]);
9261
9287
  useEffect(function () {
9262
9288
  if (!productAttributes ||
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "@qite/tide-booking-component",
3
- "version": "0.0.2-preview.58",
4
- "description": "React BookingWizard component for Tide",
5
- "main": "build/build-cjs/index.js",
6
- "module": "build/build-esm/index.js",
7
- "scripts": {
8
- "start": "rollup -c -w",
9
- "build": "rollup -c",
10
- "tsc": "tsc --noEmit",
11
- "format": "prettier --write ."
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+ssh://git@bitbucket.org/qitegeneral/tide-booking-component.git"
16
- },
17
- "keywords": [
18
- "tide",
19
- "booking",
20
- "react",
21
- "component"
22
- ],
23
- "author": "Kristof Colpaert <kristof.colpaert@qite.be>",
24
- "license": "OBSD",
25
- "homepage": "https://bitbucket.org/qitegeneral/tide-booking-component#readme",
26
- "devDependencies": {
27
- "@jsonurl/jsonurl": "^1.1.4",
28
- "@reach/router": "^1.3.4",
29
- "@reduxjs/toolkit": "^1.6.0",
30
- "@rollup/plugin-commonjs": "^19.0.1",
31
- "@rollup/plugin-json": "^4.1.0",
32
- "@rollup/plugin-node-resolve": "^13.0.2",
33
- "@types/flat": "^5.0.2",
34
- "@types/lodash": "^4.14.171",
35
- "@types/reach__router": "^1.3.9",
36
- "@types/react-dom": "^17.0.11",
37
- "@types/uuid": "^8.3.1",
38
- "date-fns": "^2.22.1",
39
- "flat": "^5.0.2",
40
- "formik": "^2.2.9",
41
- "lodash": "^4.17.21",
42
- "prettier": "^2.3.2",
43
- "react": "^17.0.2",
44
- "react-dom": "^17.0.2",
45
- "react-redux": "^7.2.4",
46
- "rollup": "^2.53.2",
47
- "rollup-plugin-delete": "^2.0.0",
48
- "rollup-plugin-peer-deps-external": "^2.2.4",
49
- "rollup-plugin-typescript2": "^0.30.0",
50
- "tslib": "^2.3.1",
51
- "typescript": "^4.3.5",
52
- "uuid": "^8.3.2"
53
- },
54
- "peerDependencies": {
55
- "@jsonurl/jsonurl": "^1.1.4",
56
- "@reach/router": "^1.3.4",
57
- "@reduxjs/toolkit": "^1.6.0",
58
- "date-fns": "^2.22.1",
59
- "flat": "^5.0.2",
60
- "formik": "^2.2.9",
61
- "immer": "^9.0.5",
62
- "lodash": "^4.17.21",
63
- "react": "^16.12.0",
64
- "react-dom": "^16.12.0",
65
- "react-redux": "^7.2.4",
66
- "uuid": "^8.3.2"
67
- },
68
- "dependencies": {
69
- "@qite/tide-client": "1.0.83"
70
- }
71
- }
1
+ {
2
+ "name": "@qite/tide-booking-component",
3
+ "version": "0.0.2-preview.60",
4
+ "description": "React BookingWizard component for Tide",
5
+ "main": "build/build-cjs/index.js",
6
+ "module": "build/build-esm/index.js",
7
+ "scripts": {
8
+ "start": "rollup -c -w",
9
+ "build": "rollup -c",
10
+ "tsc": "tsc --noEmit",
11
+ "format": "prettier --write ."
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+ssh://git@bitbucket.org/qitegeneral/tide-booking-component.git"
16
+ },
17
+ "keywords": [
18
+ "tide",
19
+ "booking",
20
+ "react",
21
+ "component"
22
+ ],
23
+ "author": "Kristof Colpaert <kristof.colpaert@qite.be>",
24
+ "license": "OBSD",
25
+ "homepage": "https://bitbucket.org/qitegeneral/tide-booking-component#readme",
26
+ "devDependencies": {
27
+ "@jsonurl/jsonurl": "^1.1.4",
28
+ "@reach/router": "^1.3.4",
29
+ "@reduxjs/toolkit": "^1.6.0",
30
+ "@rollup/plugin-commonjs": "^19.0.1",
31
+ "@rollup/plugin-json": "^4.1.0",
32
+ "@rollup/plugin-node-resolve": "^13.0.2",
33
+ "@types/flat": "^5.0.2",
34
+ "@types/lodash": "^4.14.171",
35
+ "@types/reach__router": "^1.3.9",
36
+ "@types/react-dom": "^17.0.11",
37
+ "@types/uuid": "^8.3.1",
38
+ "date-fns": "^2.22.1",
39
+ "flat": "^5.0.2",
40
+ "formik": "^2.2.9",
41
+ "lodash": "^4.17.21",
42
+ "prettier": "^2.3.2",
43
+ "react": "^17.0.2",
44
+ "react-dom": "^17.0.2",
45
+ "react-redux": "^7.2.4",
46
+ "rollup": "^2.53.2",
47
+ "rollup-plugin-delete": "^2.0.0",
48
+ "rollup-plugin-peer-deps-external": "^2.2.4",
49
+ "rollup-plugin-typescript2": "^0.30.0",
50
+ "tslib": "^2.3.1",
51
+ "typescript": "^4.3.5",
52
+ "uuid": "^8.3.2"
53
+ },
54
+ "peerDependencies": {
55
+ "@jsonurl/jsonurl": "^1.1.4",
56
+ "@reach/router": "^1.3.4",
57
+ "@reduxjs/toolkit": "^1.6.0",
58
+ "date-fns": "^2.22.1",
59
+ "flat": "^5.0.2",
60
+ "formik": "^2.2.9",
61
+ "immer": "^9.0.5",
62
+ "lodash": "^4.17.21",
63
+ "react": "^16.12.0",
64
+ "react-dom": "^16.12.0",
65
+ "react-redux": "^7.2.4",
66
+ "uuid": "^8.3.2"
67
+ },
68
+ "dependencies": {
69
+ "@qite/tide-client": "1.0.83"
70
+ }
71
+ }
@@ -16,7 +16,7 @@ const ProductCard: React.FC<ProductCardProps> = ({
16
16
  <div className="booking__product-image">
17
17
  {thumbnailUrl && (
18
18
  <img
19
- src={`${thumbnailUrl}?height=100&width=100`}
19
+ src={`${thumbnailUrl}?height=400&width=400`}
20
20
  alt={productName}
21
21
  className="mediacontent"
22
22
  />