@mirai/core 0.3.427 → 0.4.1
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/Core.constants.js +12 -12
- package/build/Core.constants.js.map +1 -1
- package/build/components/Booking/Booking.js +8 -6
- package/build/components/Booking/Booking.js.map +1 -1
- package/build/components/Booking/partials/Booking.Information.js +1 -1
- package/build/components/Booking/partials/Booking.Information.js.map +1 -1
- package/build/components/Booking/partials/Booking.Modal.js +1 -1
- package/build/components/Booking/partials/Booking.Modal.js.map +1 -1
- package/build/components/Checkout/Checkout.js +3 -3
- package/build/components/Checkout/Checkout.js.map +1 -1
- package/build/components/Checkout/helpers/index.js +0 -11
- package/build/components/Checkout/helpers/index.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Form.js +5 -3
- package/build/components/Checkout/partials/Checkout.Form.js.map +1 -1
- package/build/components/Finder/Finder.js +15 -11
- package/build/components/Finder/Finder.js.map +1 -1
- package/build/components/Finder/helpers/index.js +0 -11
- package/build/components/Finder/helpers/index.js.map +1 -1
- package/build/components/Rates/Rates.js +12 -13
- package/build/components/Rates/Rates.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalUrl/ModalUrl.js +1 -0
- package/build/components/Rates/components/Item/components/ModalUrl/ModalUrl.js.map +1 -1
- package/build/components/Rates/helpers/index.js +0 -22
- package/build/components/Rates/helpers/index.js.map +1 -1
- package/build/components/Session/Session.Login.Modal.js +4 -1
- package/build/components/Session/Session.Login.Modal.js.map +1 -1
- package/build/components/Session/helpers/index.js +0 -11
- package/build/components/Session/helpers/index.js.map +1 -1
- package/build/components/__shared__/BookingTerms/BookingTerms.js +1 -1
- package/build/components/__shared__/BookingTerms/BookingTerms.js.map +1 -1
- package/build/components/helpers/constants.js +1 -0
- package/build/components/helpers/constants.js.map +1 -1
- package/build/contexts/PerformanceManager/PerformanceManager.constants.js +10 -0
- package/build/contexts/PerformanceManager/PerformanceManager.constants.js.map +1 -0
- package/build/contexts/PerformanceManager/PerformanceManager.events.js +55 -0
- package/build/contexts/PerformanceManager/PerformanceManager.events.js.map +1 -0
- package/build/contexts/PerformanceManager/PerformanceManager.js +201 -0
- package/build/contexts/PerformanceManager/PerformanceManager.js.map +1 -0
- package/build/contexts/PerformanceManager/PerformanceManager.scripts.js +137 -0
- package/build/contexts/PerformanceManager/PerformanceManager.scripts.js.map +1 -0
- package/build/contexts/PerformanceManager/helpers/dataLayerPush.js.map +1 -0
- package/build/contexts/PerformanceManager/helpers/getConsentMode.js +39 -0
- package/build/contexts/PerformanceManager/helpers/getConsentMode.js.map +1 -0
- package/build/contexts/{PerfomanceManager/helpers/getPerfomanceLabel.js → PerformanceManager/helpers/getPerformanceLabel.js} +5 -5
- package/build/contexts/PerformanceManager/helpers/getPerformanceLabel.js.map +1 -0
- package/build/contexts/{PerfomanceManager → PerformanceManager}/helpers/index.js +8 -8
- package/build/contexts/PerformanceManager/helpers/index.js.map +1 -0
- package/build/contexts/PerformanceManager/index.js +17 -0
- package/build/contexts/PerformanceManager/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/affilired/bookingResponse.js +44 -0
- package/build/contexts/PerformanceManager/providers/affilired/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/affilired/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/bookingCancel.js +51 -0
- package/build/contexts/PerformanceManager/providers/analytics/bookingCancel.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/bookingResponse.js +121 -0
- package/build/contexts/PerformanceManager/providers/analytics/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/checkoutForm.js +46 -0
- package/build/contexts/PerformanceManager/providers/analytics/checkoutForm.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/checkoutResponse.js +56 -0
- package/build/contexts/PerformanceManager/providers/analytics/checkoutResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/finderReady.js +41 -0
- package/build/contexts/PerformanceManager/providers/analytics/finderReady.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/index.js +39 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/parseCommon.js +38 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/parseCommon.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/parseItems.js +72 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/parseItems.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/parseRate.js +40 -0
- package/build/contexts/PerformanceManager/providers/analytics/helpers/parseRate.js.map +1 -0
- package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/analytics/index.js +2 -2
- package/build/contexts/PerformanceManager/providers/analytics/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/logged.js +36 -0
- package/build/contexts/PerformanceManager/providers/analytics/logged.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/ratesAddToCart.js +90 -0
- package/build/contexts/PerformanceManager/providers/analytics/ratesAddToCart.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/analytics/ratesResponse.js +115 -0
- package/build/contexts/PerformanceManager/providers/analytics/ratesResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/bing/bookingResponse.js +30 -0
- package/build/contexts/PerformanceManager/providers/bing/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/bing/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/bookingResponse.js +73 -0
- package/build/contexts/PerformanceManager/providers/facebook/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/checkoutResponse.js +78 -0
- package/build/contexts/PerformanceManager/providers/facebook/checkoutResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/getCookies.js +13 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/getCookies.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/index.js +39 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/parseCustomData.js +30 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/parseCustomData.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/parseUserData.js +29 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/parseUserData.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/sendData.js +15 -0
- package/build/contexts/PerformanceManager/providers/facebook/helpers/sendData.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/ratesAddToCart.js +67 -0
- package/build/contexts/PerformanceManager/providers/facebook/ratesAddToCart.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/facebook/ratesResponse.js +77 -0
- package/build/contexts/PerformanceManager/providers/facebook/ratesResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/googleAds/bookingResponse.js +62 -0
- package/build/contexts/PerformanceManager/providers/googleAds/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/googleAds/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/bookingCancel.js +88 -0
- package/build/contexts/PerformanceManager/providers/gtm/bookingCancel.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/bookingResponse.js +190 -0
- package/build/contexts/PerformanceManager/providers/gtm/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/checkoutResponse.js +180 -0
- package/build/contexts/PerformanceManager/providers/gtm/checkoutResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/finderReady.js +39 -0
- package/build/contexts/PerformanceManager/providers/gtm/finderReady.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/helpers/index.js +17 -0
- package/build/contexts/PerformanceManager/providers/gtm/helpers/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/helpers/parseRate.js +29 -0
- package/build/contexts/PerformanceManager/providers/gtm/helpers/parseRate.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/gtm/ratesResponse.js +203 -0
- package/build/contexts/PerformanceManager/providers/gtm/ratesResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/SHA256.js +90 -0
- package/build/contexts/PerformanceManager/providers/helpers/SHA256.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/getFirstOccupationOption.js +22 -0
- package/build/contexts/PerformanceManager/providers/helpers/getFirstOccupationOption.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/getRatesPriceRange.js +27 -0
- package/build/contexts/PerformanceManager/providers/helpers/getRatesPriceRange.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/getRoomPriceRange.js +64 -0
- package/build/contexts/PerformanceManager/providers/helpers/getRoomPriceRange.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/getRoomsPriceRange.js +13 -0
- package/build/contexts/PerformanceManager/providers/helpers/getRoomsPriceRange.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/index.js +61 -0
- package/build/contexts/PerformanceManager/providers/helpers/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/helpers/legacy.js +15 -0
- package/build/contexts/PerformanceManager/providers/helpers/legacy.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/index.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/mirai/bookingResponse.js +71 -0
- package/build/contexts/PerformanceManager/providers/mirai/bookingResponse.js.map +1 -0
- package/build/contexts/PerformanceManager/providers/mirai/index.js +11 -0
- package/build/contexts/PerformanceManager/providers/mirai/index.js.map +1 -0
- package/build/contexts/index.js +4 -4
- package/build/contexts/index.js.map +1 -1
- package/build/helpers/consolidateStore.js +4 -25
- package/build/helpers/consolidateStore.js.map +1 -1
- package/build/helpers/getLocale.js +1 -0
- package/build/helpers/getLocale.js.map +1 -1
- package/build/helpers/getPerformance.js +50 -0
- package/build/helpers/getPerformance.js.map +1 -0
- package/build/helpers/index.js +11 -0
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/loadScript.js +3 -2
- package/build/helpers/loadScript.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/public/index.html +1 -1
- package/build/components/Checkout/helpers/trackForm.js +0 -29
- package/build/components/Checkout/helpers/trackForm.js.map +0 -1
- package/build/components/Finder/helpers/track.js +0 -25
- package/build/components/Finder/helpers/track.js.map +0 -1
- package/build/components/Rates/helpers/trackDataSource.js +0 -56
- package/build/components/Rates/helpers/trackDataSource.js.map +0 -1
- package/build/components/Rates/helpers/trackSelectItem.js +0 -103
- package/build/components/Rates/helpers/trackSelectItem.js.map +0 -1
- package/build/components/Session/helpers/trackLogin.js +0 -26
- package/build/components/Session/helpers/trackLogin.js.map +0 -1
- package/build/contexts/PerfomanceManager/PerfomanceManager.events.js +0 -57
- package/build/contexts/PerfomanceManager/PerfomanceManager.events.js.map +0 -1
- package/build/contexts/PerfomanceManager/PerfomanceManager.js +0 -125
- package/build/contexts/PerfomanceManager/PerfomanceManager.js.map +0 -1
- package/build/contexts/PerfomanceManager/PerfomanceManager.scripts.js +0 -111
- package/build/contexts/PerfomanceManager/PerfomanceManager.scripts.js.map +0 -1
- package/build/contexts/PerfomanceManager/helpers/dataLayerPush.js.map +0 -1
- package/build/contexts/PerfomanceManager/helpers/getPerfomanceLabel.js.map +0 -1
- package/build/contexts/PerfomanceManager/helpers/googleTagManager.js +0 -23
- package/build/contexts/PerfomanceManager/helpers/googleTagManager.js.map +0 -1
- package/build/contexts/PerfomanceManager/helpers/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/index.js +0 -17
- package/build/contexts/PerfomanceManager/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/affilired/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/affilired/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/affilired/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/bookingCancel.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/bookingCancel.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutForm.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutForm.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/finderReady.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/finderReady.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/login.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/login.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/analytics/ratesResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/analytics/ratesResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/bing/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/bing/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/bing/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/facebook/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/facebook/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/facebook/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js +0 -14
- package/build/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/facebook/ratesResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/facebook/ratesResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/googleAds/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/gtm/bookingCancel.js +0 -14
- package/build/contexts/PerfomanceManager/providers/gtm/bookingCancel.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/gtm/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/gtm/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/gtm/finderReady.js +0 -14
- package/build/contexts/PerfomanceManager/providers/gtm/finderReady.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/gtm/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/gtm/ratesResponse.js +0 -205
- package/build/contexts/PerfomanceManager/providers/gtm/ratesResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/mirai/bookingResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/mirai/bookingResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/mirai/checkoutResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/mirai/checkoutResponse.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/mirai/finderReady.js +0 -14
- package/build/contexts/PerfomanceManager/providers/mirai/finderReady.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/mirai/index.js +0 -17
- package/build/contexts/PerfomanceManager/providers/mirai/index.js.map +0 -1
- package/build/contexts/PerfomanceManager/providers/mirai/ratesResponse.js +0 -14
- package/build/contexts/PerfomanceManager/providers/mirai/ratesResponse.js.map +0 -1
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/helpers/dataLayerPush.js +0 -0
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/affilired/index.js +0 -0
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/bing/index.js +0 -0
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/facebook/index.js +0 -0
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/googleAds/index.js +0 -0
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/gtm/index.js +0 -0
- /package/build/contexts/{PerfomanceManager → PerformanceManager}/providers/index.js +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bookingCancel = void 0;
|
|
7
|
+
var _locale = require("@mirai/locale");
|
|
8
|
+
var _Core = require("../../../../Core.constants");
|
|
9
|
+
var _helpers = require("../../../../helpers");
|
|
10
|
+
var _helpers2 = require("../../helpers");
|
|
11
|
+
var _legacy = require("../helpers/legacy");
|
|
12
|
+
const ACCOMMODATION_TYPE_NAME = Object.keys(_Core.ACCOMMODATION_TYPE);
|
|
13
|
+
const bookingCancel = function () {
|
|
14
|
+
var _variants$hotelId;
|
|
15
|
+
let {
|
|
16
|
+
device: {
|
|
17
|
+
mobile
|
|
18
|
+
} = {},
|
|
19
|
+
response: {
|
|
20
|
+
tracking = {}
|
|
21
|
+
} = {},
|
|
22
|
+
store: {
|
|
23
|
+
finder: {
|
|
24
|
+
calendar = []
|
|
25
|
+
} = {},
|
|
26
|
+
hotel: {
|
|
27
|
+
accommodationType,
|
|
28
|
+
variants = {}
|
|
29
|
+
} = {},
|
|
30
|
+
language
|
|
31
|
+
} = {}
|
|
32
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33
|
+
// ! -- TODO: Try to get all data from store -------------------------------------------------------------------------
|
|
34
|
+
const {
|
|
35
|
+
idchain,
|
|
36
|
+
idtokenprovider: hotelId
|
|
37
|
+
} = (0, _helpers.fetchUrlParams)(location.search);
|
|
38
|
+
|
|
39
|
+
// ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------
|
|
40
|
+
const {
|
|
41
|
+
cancelComment,
|
|
42
|
+
cancellationDate,
|
|
43
|
+
cancelReason,
|
|
44
|
+
hotelInfo: {
|
|
45
|
+
currency: hotelCurrency = {},
|
|
46
|
+
propertyName,
|
|
47
|
+
propertyType
|
|
48
|
+
} = {},
|
|
49
|
+
idReservation,
|
|
50
|
+
reservationDate,
|
|
51
|
+
totalPriceWithTaxes
|
|
52
|
+
} = tracking;
|
|
53
|
+
const {
|
|
54
|
+
days
|
|
55
|
+
} = (0, _locale.dateDiff)(...calendar);
|
|
56
|
+
const dataLayer = {
|
|
57
|
+
cancelComment,
|
|
58
|
+
cancellationDate,
|
|
59
|
+
cancelReason,
|
|
60
|
+
chainId: idchain,
|
|
61
|
+
checkin: (0, _locale.dateFormat)(calendar[0], {
|
|
62
|
+
format: 'DD/MM/YYYY'
|
|
63
|
+
}),
|
|
64
|
+
checkout: (0, _locale.dateFormat)(calendar[1], {
|
|
65
|
+
format: 'DD/MM/YYYY'
|
|
66
|
+
}),
|
|
67
|
+
currency: hotelCurrency.code,
|
|
68
|
+
device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',
|
|
69
|
+
home: window.location.host,
|
|
70
|
+
idHotel: hotelId,
|
|
71
|
+
language,
|
|
72
|
+
lodgingDenomination: ACCOMMODATION_TYPE_NAME[((_variants$hotelId = variants[hotelId]) === null || _variants$hotelId === void 0 ? void 0 : _variants$hotelId.accommodationType) || accommodationType],
|
|
73
|
+
nights: days,
|
|
74
|
+
propertyName,
|
|
75
|
+
propertyType,
|
|
76
|
+
reservationCode: idReservation,
|
|
77
|
+
reservationDate,
|
|
78
|
+
step: 'CANCELLATION',
|
|
79
|
+
totalPriceWithTaxes: (0, _legacy.formatPrice)(totalPriceWithTaxes, hotelCurrency)
|
|
80
|
+
};
|
|
81
|
+
(0, _helpers2.dataLayerPush)({
|
|
82
|
+
event: 'mirai.cancelled',
|
|
83
|
+
'mirai.data': dataLayer
|
|
84
|
+
});
|
|
85
|
+
return dataLayer;
|
|
86
|
+
};
|
|
87
|
+
exports.bookingCancel = bookingCancel;
|
|
88
|
+
//# sourceMappingURL=bookingCancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingCancel.js","names":["_locale","require","_Core","_helpers","_helpers2","_legacy","ACCOMMODATION_TYPE_NAME","Object","keys","ACCOMMODATION_TYPE","bookingCancel","_variants$hotelId","device","mobile","response","tracking","store","finder","calendar","hotel","accommodationType","variants","language","arguments","length","undefined","idchain","idtokenprovider","hotelId","fetchUrlParams","location","search","cancelComment","cancellationDate","cancelReason","hotelInfo","currency","hotelCurrency","propertyName","propertyType","idReservation","reservationDate","totalPriceWithTaxes","days","dateDiff","dataLayer","chainId","checkin","dateFormat","format","checkout","code","home","window","host","idHotel","lodgingDenomination","nights","reservationCode","step","formatPrice","dataLayerPush","event","exports"],"sources":["../../../../../src/contexts/PerformanceManager/providers/gtm/bookingCancel.js"],"sourcesContent":["import { dateDiff, dateFormat } from '@mirai/locale';\n\nimport { ACCOMMODATION_TYPE } from '../../../../Core.constants';\nimport { fetchUrlParams } from '../../../../helpers';\nimport { dataLayerPush } from '../../helpers';\nimport { formatPrice } from '../helpers/legacy';\n\nconst ACCOMMODATION_TYPE_NAME = Object.keys(ACCOMMODATION_TYPE);\n\nexport const bookingCancel = ({\n device: { mobile } = {},\n response: { tracking = {} } = {},\n store: { finder: { calendar = [] } = {}, hotel: { accommodationType, variants = {} } = {}, language } = {},\n} = {}) => {\n // ! -- TODO: Try to get all data from store -------------------------------------------------------------------------\n const { idchain, idtokenprovider: hotelId } = fetchUrlParams(location.search);\n\n // ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------\n const {\n cancelComment,\n cancellationDate,\n cancelReason,\n hotelInfo: { currency: hotelCurrency = {}, propertyName, propertyType } = {},\n idReservation,\n reservationDate,\n totalPriceWithTaxes,\n } = tracking;\n\n const { days } = dateDiff(...calendar);\n\n const dataLayer = {\n cancelComment,\n cancellationDate,\n cancelReason,\n chainId: idchain,\n checkin: dateFormat(calendar[0], { format: 'DD/MM/YYYY' }),\n checkout: dateFormat(calendar[1], { format: 'DD/MM/YYYY' }),\n currency: hotelCurrency.code,\n device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',\n home: window.location.host,\n idHotel: hotelId,\n language,\n lodgingDenomination: ACCOMMODATION_TYPE_NAME[variants[hotelId]?.accommodationType || accommodationType],\n nights: days,\n propertyName,\n propertyType,\n reservationCode: idReservation,\n reservationDate,\n step: 'CANCELLATION',\n totalPriceWithTaxes: formatPrice(totalPriceWithTaxes, hotelCurrency),\n };\n\n dataLayerPush({ event: 'mirai.cancelled', 'mirai.data': dataLayer });\n\n return dataLayer;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,MAAMK,uBAAuB,GAAGC,MAAM,CAACC,IAAI,CAACC,wBAAkB,CAAC;AAExD,MAAMC,aAAa,GAAG,SAAAA,CAAA,EAIlB;EAAA,IAAAC,iBAAA;EAAA,IAJmB;IAC5BC,MAAM,EAAE;MAAEC;IAAO,CAAC,GAAG,CAAC,CAAC;IACvBC,QAAQ,EAAE;MAAEC,QAAQ,GAAG,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC;IAChCC,KAAK,EAAE;MAAEC,MAAM,EAAE;QAAEC,Q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ElD,uBAAuB,CAAC,EAAAK,iBAAA,GAAAU,QAAQ,CAACO,OAAO,CAAC,cAAAjB,iBAAA,uBAAjBA,iBAAA,CAAmBS,iBAAiB,KAAIA,iBAAiB,CAAC;IACvGqC,MAAM,EAAEd,IAAI;IACZL,YAAY;IACZC,YAAY;IACZmB,eAAe,EAAElB,aAAa;IAC9BC,eAAe;IACfkB,IAAI,EAAE,cAAc;IACpBjB,mBAAmB,EAAE,IAAAkB,mBAAW,EAAClB,mBAAmB,EAAEL,aAAa;EACrE,CAAC;EAED,IAAAwB,uBAAa,EAAC;IAAEC,KAAK,EAAE,iBAAiB;IAAE,YAAY,EAAEjB;EAAU,CAAC,CAAC;EAEpE,OAAOA,SAAS;AAClB,CAAC;AAACkB,OAAA,CAAArD,aAAA,GAAAA,aAAA"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bookingResponse = void 0;
|
|
7
|
+
var _Core = require("../../../../Core.constants");
|
|
8
|
+
var _helpers = require("../../../../helpers");
|
|
9
|
+
var _helpers2 = require("../../helpers");
|
|
10
|
+
var _helpers3 = require("../helpers");
|
|
11
|
+
var _legacy = require("../helpers/legacy");
|
|
12
|
+
const ACCOMMODATION_TYPE_NAME = Object.keys(_Core.ACCOMMODATION_TYPE);
|
|
13
|
+
const bookingResponse = function () {
|
|
14
|
+
var _variants$hotelId;
|
|
15
|
+
let {
|
|
16
|
+
device: {
|
|
17
|
+
mobile
|
|
18
|
+
} = {},
|
|
19
|
+
response: {
|
|
20
|
+
tracking = {}
|
|
21
|
+
} = {},
|
|
22
|
+
store: {
|
|
23
|
+
currency,
|
|
24
|
+
hotel: {
|
|
25
|
+
accommodationType,
|
|
26
|
+
variants = {}
|
|
27
|
+
} = {},
|
|
28
|
+
language,
|
|
29
|
+
session
|
|
30
|
+
} = {}
|
|
31
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
32
|
+
// ! -- TODO: Try to get all data from store -------------------------------------------------------------------------
|
|
33
|
+
const {
|
|
34
|
+
idchain,
|
|
35
|
+
idtokenprovider: hotelId
|
|
36
|
+
} = (0, _helpers.fetchUrlParams)(location.search);
|
|
37
|
+
|
|
38
|
+
// ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------
|
|
39
|
+
const {
|
|
40
|
+
bookingValues: {
|
|
41
|
+
checkin,
|
|
42
|
+
checkout,
|
|
43
|
+
coupon: promocode = '',
|
|
44
|
+
nights
|
|
45
|
+
} = {},
|
|
46
|
+
country,
|
|
47
|
+
guestData: {
|
|
48
|
+
country: nationality,
|
|
49
|
+
email,
|
|
50
|
+
firstName,
|
|
51
|
+
lastName
|
|
52
|
+
} = {},
|
|
53
|
+
hotelInfo: {
|
|
54
|
+
hotelCity,
|
|
55
|
+
hotelProvince,
|
|
56
|
+
currency: hotelCurrency = {},
|
|
57
|
+
propertyName,
|
|
58
|
+
propertyType
|
|
59
|
+
} = {},
|
|
60
|
+
reservationCode,
|
|
61
|
+
reservationDate,
|
|
62
|
+
reservedExtras = {},
|
|
63
|
+
reservedRooms = [],
|
|
64
|
+
totalPriceCommission,
|
|
65
|
+
totalExtrasTaxes,
|
|
66
|
+
totalExtrasWithTaxes,
|
|
67
|
+
totalExtrasWithoutTaxes,
|
|
68
|
+
totalNumAdults,
|
|
69
|
+
totalNumChildren,
|
|
70
|
+
totalNumRooms,
|
|
71
|
+
totalPriceWithTaxes,
|
|
72
|
+
totalPriceWithTaxesWithoutExtras,
|
|
73
|
+
totalPriceWithoutTaxes,
|
|
74
|
+
totalPriceWithoutTaxesWithoutExtras,
|
|
75
|
+
totalTaxes
|
|
76
|
+
} = tracking;
|
|
77
|
+
const rooms = reservedRooms.map(function () {
|
|
78
|
+
let {
|
|
79
|
+
averagePriceWithoutTaxes,
|
|
80
|
+
daysPriceBoard = [],
|
|
81
|
+
defaultBoardDescription,
|
|
82
|
+
numRoomsToReserve,
|
|
83
|
+
occupation: {
|
|
84
|
+
numAdults,
|
|
85
|
+
numBabies,
|
|
86
|
+
totalChildren: numChildren
|
|
87
|
+
} = {},
|
|
88
|
+
rateId,
|
|
89
|
+
rateName,
|
|
90
|
+
roomTypeName
|
|
91
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
92
|
+
let priceWithTaxes = 0;
|
|
93
|
+
let priceWithoutTaxes = 0;
|
|
94
|
+
daysPriceBoard.forEach(day => {
|
|
95
|
+
priceWithTaxes += day.priceWithTaxes;
|
|
96
|
+
priceWithoutTaxes += day.priceWithoutTaxes;
|
|
97
|
+
});
|
|
98
|
+
return {
|
|
99
|
+
boardName: defaultBoardDescription,
|
|
100
|
+
numRooms: numRoomsToReserve,
|
|
101
|
+
occupation: {
|
|
102
|
+
numAdults,
|
|
103
|
+
numChildren,
|
|
104
|
+
numBabies
|
|
105
|
+
},
|
|
106
|
+
rateId,
|
|
107
|
+
rateName,
|
|
108
|
+
roomName: roomTypeName,
|
|
109
|
+
priceWithTaxes,
|
|
110
|
+
priceWithoutTaxes,
|
|
111
|
+
unitaryPriceWithoutTaxes: (0, _legacy.formatPrice)(averagePriceWithoutTaxes, hotelCurrency)
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
const extras = Object.values(reservedExtras).map(function () {
|
|
115
|
+
let {
|
|
116
|
+
amount,
|
|
117
|
+
id,
|
|
118
|
+
name,
|
|
119
|
+
nightsToApply,
|
|
120
|
+
totalPriceWithTaxes,
|
|
121
|
+
totalPriceWithoutTaxes,
|
|
122
|
+
unitaryPriceWithTaxes,
|
|
123
|
+
unitaryPriceWithoutTaxes
|
|
124
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
125
|
+
return {
|
|
126
|
+
amount,
|
|
127
|
+
extraId: id,
|
|
128
|
+
extraName: name,
|
|
129
|
+
nightsToApply,
|
|
130
|
+
totalPriceWithTaxes,
|
|
131
|
+
totalPriceWithoutTaxes,
|
|
132
|
+
unitaryPriceWithTaxes,
|
|
133
|
+
unitaryPriceWithoutTaxes
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
const dataLayer = {
|
|
137
|
+
chainId: idchain,
|
|
138
|
+
checkin,
|
|
139
|
+
checkout,
|
|
140
|
+
city: hotelCity,
|
|
141
|
+
cityZone: undefined,
|
|
142
|
+
coupon: promocode,
|
|
143
|
+
currency: hotelCurrency.code,
|
|
144
|
+
device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',
|
|
145
|
+
email,
|
|
146
|
+
emailSHA256: (0, _helpers3.SHA256)(email),
|
|
147
|
+
event: 'init',
|
|
148
|
+
home: document.location.hostname,
|
|
149
|
+
hotelId,
|
|
150
|
+
language,
|
|
151
|
+
lodgingDenomination: ACCOMMODATION_TYPE_NAME[((_variants$hotelId = variants[hotelId]) === null || _variants$hotelId === void 0 ? void 0 : _variants$hotelId.accommodationType) || accommodationType],
|
|
152
|
+
name: firstName,
|
|
153
|
+
nights,
|
|
154
|
+
numAdults: totalNumAdults,
|
|
155
|
+
numChildren: totalNumChildren,
|
|
156
|
+
numRooms: totalNumRooms,
|
|
157
|
+
products: {
|
|
158
|
+
rooms,
|
|
159
|
+
extras,
|
|
160
|
+
checkin,
|
|
161
|
+
checkout
|
|
162
|
+
},
|
|
163
|
+
propertyName,
|
|
164
|
+
propertyType,
|
|
165
|
+
reservationCode,
|
|
166
|
+
reservationDate,
|
|
167
|
+
state_provice: hotelProvince,
|
|
168
|
+
step: 'CLIENTFORM',
|
|
169
|
+
surname: lastName,
|
|
170
|
+
totalCommission: (0, _legacy.formatPrice)(totalPriceCommission, hotelCurrency),
|
|
171
|
+
totalExtrasTaxes: (0, _legacy.formatPrice)(totalExtrasTaxes, hotelCurrency),
|
|
172
|
+
totalExtrasWithTaxes: (0, _legacy.formatPrice)(totalExtrasWithTaxes, hotelCurrency),
|
|
173
|
+
totalExtrasWithoutTaxes: (0, _legacy.formatPrice)(totalExtrasWithoutTaxes, hotelCurrency),
|
|
174
|
+
totalPrice: (0, _legacy.formatPrice)(totalPriceWithTaxes, hotelCurrency),
|
|
175
|
+
totalPriceWithoutTaxes: (0, _legacy.formatPrice)(totalPriceWithoutTaxes, hotelCurrency),
|
|
176
|
+
totalPriceWithTaxesWithExtras: (0, _legacy.formatPrice)(totalPriceWithTaxes, hotelCurrency),
|
|
177
|
+
totalPriceWithTaxesWithoutExtras: (0, _legacy.formatPrice)(totalPriceWithTaxesWithoutExtras, hotelCurrency),
|
|
178
|
+
totalPriceWithoutTaxesWithExtras: (0, _legacy.formatPrice)(totalPriceWithoutTaxes, hotelCurrency),
|
|
179
|
+
totalPriceWithoutTaxesWithoutExtras: (0, _legacy.formatPrice)(totalPriceWithoutTaxesWithoutExtras, hotelCurrency),
|
|
180
|
+
totalTaxes: (0, _legacy.formatPrice)(totalTaxes, hotelCurrency),
|
|
181
|
+
nationality,
|
|
182
|
+
userCountry: country,
|
|
183
|
+
userCurrency: currency,
|
|
184
|
+
userLogged: !!session
|
|
185
|
+
};
|
|
186
|
+
(0, _helpers2.dataLayerPush)(dataLayer);
|
|
187
|
+
return dataLayer;
|
|
188
|
+
};
|
|
189
|
+
exports.bookingResponse = bookingResponse;
|
|
190
|
+
//# sourceMappingURL=bookingResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingResponse.js","names":["_Core","require","_helpers","_helpers2","_helpers3","_legacy","ACCOMMODATION_TYPE_NAME","Object","keys","ACCOMMODATION_TYPE","bookingResponse","_variants$hotelId","device","mobile","response","tracking","store","currency","hotel","accommodationType","variants","language","session","arguments","length","undefined","idchain","idtokenprovider","hotelId","fetchUrlParams","location","search","bookingValues","checkin","checkout","coupon","promocode","nights","country","guestData","nationality","email","firstName","lastName","hotelInfo","hotelCity","hotelProvince","hotelCurrency","propertyName","propertyType","reservationCode","reservationDate","reservedExtras","reservedRooms","totalPriceCommission","totalExtrasTaxes","totalExtrasWithTaxes","totalExtrasWithoutTaxes","totalNumAdults","totalNumChildren","totalNumRooms","totalPriceWithTaxes","totalPriceWithTaxesWithoutExtras","totalPriceWithoutTaxes","totalPriceWithoutTaxesWithoutExtras","totalTaxes","rooms","map","averagePriceWithoutTaxes","daysPriceBoard","defaultBoardDescription","numRoomsToReserve","occupation","numAdults","numBabies","totalChildren","numChildren","rateId","rateName","roomTypeName","priceWithTaxes","priceWithoutTaxes","forEach","day","boardName","numRooms","roomName","unitaryPriceWithoutTaxes","formatPrice","extras","values","amount","id","name","nightsToApply","unitaryPriceWithTaxes","extraId","extraName","dataLayer","chainId","city","cityZone","code","emailSHA256","SHA256","event","home","document","hostname","lodgingDenomination","products","state_provice","step","surname","totalCommission","totalPrice","totalPriceWithTaxesWithExtras","totalPriceWithoutTaxesWithExtras","userCountry","userCurrency","userLogged","dataLayerPush","exports"],"sources":["../../../../../src/contexts/PerformanceManager/providers/gtm/bookingResponse.js"],"sourcesContent":["import { ACCOMMODATION_TYPE } from '../../../../Core.constants';\nimport { fetchUrlParams } from '../../../../helpers';\nimport { dataLayerPush } from '../../helpers';\nimport { SHA256 } from '../helpers';\nimport { formatPrice } from '../helpers/legacy';\n\nconst ACCOMMODATION_TYPE_NAME = Object.keys(ACCOMMODATION_TYPE);\n\nexport const bookingResponse = ({\n device: { mobile } = {},\n response: { tracking = {} } = {},\n store: { currency, hotel: { accommodationType, variants = {} } = {}, language, session } = {},\n} = {}) => {\n // ! -- TODO: Try to get all data from store -------------------------------------------------------------------------\n const { idchain, idtokenprovider: hotelId } = fetchUrlParams(location.search);\n\n // ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------\n const {\n bookingValues: { checkin, checkout, coupon: promocode = '', nights } = {},\n country,\n guestData: { country: nationality, email, firstName, lastName } = {},\n hotelInfo: { hotelCity, hotelProvince, currency: hotelCurrency = {}, propertyName, propertyType } = {},\n reservationCode,\n reservationDate,\n reservedExtras = {},\n reservedRooms = [],\n totalPriceCommission,\n totalExtrasTaxes,\n totalExtrasWithTaxes,\n totalExtrasWithoutTaxes,\n totalNumAdults,\n totalNumChildren,\n totalNumRooms,\n totalPriceWithTaxes,\n totalPriceWithTaxesWithoutExtras,\n totalPriceWithoutTaxes,\n totalPriceWithoutTaxesWithoutExtras,\n totalTaxes,\n } = tracking;\n\n const rooms = reservedRooms.map(\n ({\n averagePriceWithoutTaxes,\n daysPriceBoard = [],\n defaultBoardDescription,\n numRoomsToReserve,\n occupation: { numAdults, numBabies, totalChildren: numChildren } = {},\n rateId,\n rateName,\n roomTypeName,\n } = {}) => {\n let priceWithTaxes = 0;\n let priceWithoutTaxes = 0;\n daysPriceBoard.forEach((day) => {\n priceWithTaxes += day.priceWithTaxes;\n priceWithoutTaxes += day.priceWithoutTaxes;\n });\n\n return {\n boardName: defaultBoardDescription,\n numRooms: numRoomsToReserve,\n occupation: { numAdults, numChildren, numBabies },\n rateId,\n rateName,\n roomName: roomTypeName,\n priceWithTaxes,\n priceWithoutTaxes,\n unitaryPriceWithoutTaxes: formatPrice(averagePriceWithoutTaxes, hotelCurrency),\n };\n },\n );\n\n const extras = Object.values(reservedExtras).map(\n ({\n amount,\n id,\n name,\n nightsToApply,\n totalPriceWithTaxes,\n totalPriceWithoutTaxes,\n unitaryPriceWithTaxes,\n unitaryPriceWithoutTaxes,\n } = {}) => ({\n amount,\n extraId: id,\n extraName: name,\n nightsToApply,\n totalPriceWithTaxes,\n totalPriceWithoutTaxes,\n unitaryPriceWithTaxes,\n unitaryPriceWithoutTaxes,\n }),\n );\n\n const dataLayer = {\n chainId: idchain,\n checkin,\n checkout,\n city: hotelCity,\n cityZone: undefined,\n coupon: promocode,\n currency: hotelCurrency.code,\n device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',\n email,\n emailSHA256: SHA256(email),\n event: 'init',\n home: document.location.hostname,\n hotelId,\n language,\n lodgingDenomination: ACCOMMODATION_TYPE_NAME[variants[hotelId]?.accommodationType || accommodationType],\n name: firstName,\n nights,\n numAdults: totalNumAdults,\n numChildren: totalNumChildren,\n numRooms: totalNumRooms,\n products: { rooms, extras, checkin, checkout },\n propertyName,\n propertyType,\n reservationCode,\n reservationDate,\n state_provice: hotelProvince,\n step: 'CLIENTFORM',\n surname: lastName,\n totalCommission: formatPrice(totalPriceCommission, hotelCurrency),\n totalExtrasTaxes: formatPrice(totalExtrasTaxes, hotelCurrency),\n totalExtrasWithTaxes: formatPrice(totalExtrasWithTaxes, hotelCurrency),\n totalExtrasWithoutTaxes: formatPrice(totalExtrasWithoutTaxes, hotelCurrency),\n totalPrice: formatPrice(totalPriceWithTaxes, hotelCurrency),\n totalPriceWithoutTaxes: formatPrice(totalPriceWithoutTaxes, hotelCurrency),\n totalPriceWithTaxesWithExtras: formatPrice(totalPriceWithTaxes, hotelCurrency),\n totalPriceWithTaxesWithoutExtras: formatPrice(totalPriceWithTaxesWithoutExtras, hotelCurrency),\n totalPriceWithoutTaxesWithExtras: formatPrice(totalPriceWithoutTaxes, hotelCurrency),\n totalPriceWithoutTaxesWithoutExtras: formatPrice(totalPriceWithoutTaxesWithoutExtras, hotelCurrency),\n totalTaxes: formatPrice(totalTaxes, hotelCurrency),\n nationality,\n userCountry: country,\n userCurrency: currency,\n userLogged: !!session,\n };\n\n dataLayerPush(dataLayer);\n\n return dataLayer;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,MAAMK,uBAAuB,GAAGC,MAAM,CAACC,IAAI,CAACC,wBAAkB,CAAC;AAExD,MAAMC,eAAe,GAAG,SAAAA,CAAA,EAIpB;EAAA,IAAAC,iBAAA;EAAA,IAJqB;IAC9BC,MAAM,EAAE;MAAEC;IAAO,CAAC,GAAG,CAAC,CAAC;IACvBC,QAAQ,EAAE;MAAEC,QAAQ,GAAG,CAAC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,CAAC;IAC5EoE,UAAU,EAAE,IAAA3B,mBAAW,EAAC3B,mBAAmB,EAAEd,aAAa,CAAC;IAC3DgB,sBAAsB,EAAE,IAAAyB,mBAAW,EAACzB,sBAAsB,EAAEhB,aAAa,CAAC;IAC1EqE,6BAA6B,EAAE,IAAA5B,mBAAW,EAAC3B,mBAAmB,EAAEd,aAAa,CAAC;IAC9Ee,gCAAgC,EAAE,IAAA0B,mBAAW,EAAC1B,gCAAgC,EAAEf,aAAa,CAAC;IAC9FsE,gCAAgC,EAAE,IAAA7B,mBAAW,EAACzB,sBAAsB,EAAEhB,aAAa,CAAC;IACpFiB,mCAAmC,EAAE,IAAAwB,mBAAW,EAACxB,mCAAmC,EAAEjB,aAAa,CAAC;IACpGkB,UAAU,EAAE,IAAAuB,mBAAW,EAACvB,UAAU,EAAElB,aAAa,CAAC;IAClDP,WAAW;IACX8E,WAAW,EAAEhF,OAAO;IACpBiF,YAAY,EAAEtG,QAAQ;IACtBuG,UAAU,EAAE,CAAC,CAAClG;EAChB,CAAC;EAED,IAAAmG,uBAAa,EAACvB,SAAS,CAAC;EAExB,OAAOA,SAAS;AAClB,CAAC;AAACwB,OAAA,CAAAhH,eAAA,GAAAA,eAAA"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.checkoutResponse = void 0;
|
|
7
|
+
var _locale = require("@mirai/locale");
|
|
8
|
+
var _helpers = require("../../../../components/helpers");
|
|
9
|
+
var _Core = require("../../../../Core.constants");
|
|
10
|
+
var _helpers2 = require("../../../../helpers");
|
|
11
|
+
var _helpers3 = require("../../helpers");
|
|
12
|
+
var _legacy = require("../helpers/legacy");
|
|
13
|
+
const ACCOMMODATION_TYPE_NAME = Object.keys(_Core.ACCOMMODATION_TYPE);
|
|
14
|
+
const checkoutResponse = function () {
|
|
15
|
+
var _variants$hotelId;
|
|
16
|
+
let {
|
|
17
|
+
device: {
|
|
18
|
+
mobile
|
|
19
|
+
} = {},
|
|
20
|
+
response: {
|
|
21
|
+
infantAge,
|
|
22
|
+
tracking = {}
|
|
23
|
+
} = {},
|
|
24
|
+
store: {
|
|
25
|
+
currency,
|
|
26
|
+
finder: {
|
|
27
|
+
calendar = [],
|
|
28
|
+
occupation = [],
|
|
29
|
+
promocode = ''
|
|
30
|
+
} = {},
|
|
31
|
+
hotel: {
|
|
32
|
+
accommodationType,
|
|
33
|
+
variants = {}
|
|
34
|
+
} = {},
|
|
35
|
+
language,
|
|
36
|
+
session
|
|
37
|
+
} = {}
|
|
38
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
39
|
+
// ! -- TODO: Try to get all data from store -------------------------------------------------------------------------
|
|
40
|
+
const {
|
|
41
|
+
idchain,
|
|
42
|
+
idtokenprovider: hotelId
|
|
43
|
+
} = (0, _helpers2.fetchUrlParams)(location.search);
|
|
44
|
+
|
|
45
|
+
// ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------
|
|
46
|
+
const {
|
|
47
|
+
country,
|
|
48
|
+
hotelInfo: {
|
|
49
|
+
currency: hotelCurrency = {},
|
|
50
|
+
propertyName,
|
|
51
|
+
propertyType
|
|
52
|
+
} = {},
|
|
53
|
+
reservedExtras = {},
|
|
54
|
+
reservedRooms = [],
|
|
55
|
+
totalExtrasTaxes,
|
|
56
|
+
totalExtrasWithTaxes,
|
|
57
|
+
totalExtrasWithoutTaxes,
|
|
58
|
+
totalPriceWithTaxes,
|
|
59
|
+
totalPriceWithTaxesWithoutExtras,
|
|
60
|
+
totalPriceWithoutTaxes,
|
|
61
|
+
totalPriceWithoutTaxesWithoutExtras,
|
|
62
|
+
totalTaxes
|
|
63
|
+
} = tracking;
|
|
64
|
+
const {
|
|
65
|
+
adults = 0,
|
|
66
|
+
children = 0
|
|
67
|
+
} = (0, _helpers.getOccupationTotals)({
|
|
68
|
+
infantAge,
|
|
69
|
+
occupation
|
|
70
|
+
});
|
|
71
|
+
const {
|
|
72
|
+
days: nights
|
|
73
|
+
} = (0, _locale.dateDiff)(...calendar);
|
|
74
|
+
const checkin = (0, _locale.dateFormat)(calendar[0], {
|
|
75
|
+
format: 'DD/MM/YYYY'
|
|
76
|
+
});
|
|
77
|
+
const checkout = (0, _locale.dateFormat)(calendar[1], {
|
|
78
|
+
format: 'DD/MM/YYYY'
|
|
79
|
+
});
|
|
80
|
+
const rooms = reservedRooms.map(function () {
|
|
81
|
+
let {
|
|
82
|
+
averagePriceWithoutTaxes,
|
|
83
|
+
daysPriceBoard = [],
|
|
84
|
+
defaultBoardDescription,
|
|
85
|
+
numRoomsToReserve,
|
|
86
|
+
occupation: {
|
|
87
|
+
numAdults,
|
|
88
|
+
numBabies,
|
|
89
|
+
totalChildren: numChildren
|
|
90
|
+
} = {},
|
|
91
|
+
rateId,
|
|
92
|
+
rateName,
|
|
93
|
+
roomTypeName
|
|
94
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
95
|
+
let priceWithTaxes = 0;
|
|
96
|
+
let priceWithoutTaxes = 0;
|
|
97
|
+
daysPriceBoard.forEach(day => {
|
|
98
|
+
priceWithTaxes += day.priceWithTaxes;
|
|
99
|
+
priceWithoutTaxes += day.priceWithoutTaxes;
|
|
100
|
+
});
|
|
101
|
+
return {
|
|
102
|
+
boardName: defaultBoardDescription,
|
|
103
|
+
numRooms: numRoomsToReserve,
|
|
104
|
+
occupation: {
|
|
105
|
+
numAdults,
|
|
106
|
+
numChildren,
|
|
107
|
+
numBabies
|
|
108
|
+
},
|
|
109
|
+
rateId,
|
|
110
|
+
rateName,
|
|
111
|
+
roomName: roomTypeName,
|
|
112
|
+
priceWithTaxes,
|
|
113
|
+
priceWithoutTaxes,
|
|
114
|
+
unitaryPriceWithoutTaxes: (0, _legacy.formatPrice)(averagePriceWithoutTaxes, hotelCurrency)
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
const extras = Object.values(reservedExtras).map(function () {
|
|
118
|
+
let {
|
|
119
|
+
amount,
|
|
120
|
+
id,
|
|
121
|
+
name,
|
|
122
|
+
nightsToApply,
|
|
123
|
+
totalPriceWithTaxes,
|
|
124
|
+
totalPriceWithoutTaxes,
|
|
125
|
+
unitaryPriceWithTaxes,
|
|
126
|
+
unitaryPriceWithoutTaxes
|
|
127
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
128
|
+
return {
|
|
129
|
+
amount,
|
|
130
|
+
extraId: id,
|
|
131
|
+
extraName: name,
|
|
132
|
+
nightsToApply,
|
|
133
|
+
totalPriceWithTaxes,
|
|
134
|
+
totalPriceWithoutTaxes,
|
|
135
|
+
unitaryPriceWithTaxes,
|
|
136
|
+
unitaryPriceWithoutTaxes
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
const dataLayer = {
|
|
140
|
+
chainId: idchain,
|
|
141
|
+
checkin,
|
|
142
|
+
checkout,
|
|
143
|
+
coupon: promocode,
|
|
144
|
+
currency: hotelCurrency.code,
|
|
145
|
+
device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',
|
|
146
|
+
event: 'init',
|
|
147
|
+
home: document.location.hostname,
|
|
148
|
+
hotelId,
|
|
149
|
+
language,
|
|
150
|
+
lodgingDenomination: ACCOMMODATION_TYPE_NAME[((_variants$hotelId = variants[hotelId]) === null || _variants$hotelId === void 0 ? void 0 : _variants$hotelId.accommodationType) || accommodationType],
|
|
151
|
+
nights,
|
|
152
|
+
numAdults: adults,
|
|
153
|
+
numChildren: children,
|
|
154
|
+
numRooms: occupation.length,
|
|
155
|
+
products: {
|
|
156
|
+
rooms,
|
|
157
|
+
extras,
|
|
158
|
+
checkin,
|
|
159
|
+
checkout
|
|
160
|
+
},
|
|
161
|
+
propertyName,
|
|
162
|
+
propertyType,
|
|
163
|
+
step: 'CLIENTFORM',
|
|
164
|
+
totalExtrasTaxes: (0, _legacy.formatPrice)(totalExtrasTaxes, hotelCurrency),
|
|
165
|
+
totalExtrasWithTaxes: (0, _legacy.formatPrice)(totalExtrasWithTaxes, hotelCurrency),
|
|
166
|
+
totalExtrasWithoutTaxes: (0, _legacy.formatPrice)(totalExtrasWithoutTaxes, hotelCurrency),
|
|
167
|
+
totalPriceWithTaxesWithExtras: (0, _legacy.formatPrice)(totalPriceWithTaxes, hotelCurrency),
|
|
168
|
+
totalPriceWithTaxesWithoutExtras: (0, _legacy.formatPrice)(totalPriceWithTaxesWithoutExtras, hotelCurrency),
|
|
169
|
+
totalPriceWithoutTaxesWithExtras: (0, _legacy.formatPrice)(totalPriceWithoutTaxes, hotelCurrency),
|
|
170
|
+
totalPriceWithoutTaxesWithoutExtras: (0, _legacy.formatPrice)(totalPriceWithoutTaxesWithoutExtras, hotelCurrency),
|
|
171
|
+
totalTaxes: (0, _legacy.formatPrice)(totalTaxes, hotelCurrency),
|
|
172
|
+
userCountry: country,
|
|
173
|
+
userCurrency: currency,
|
|
174
|
+
userLogged: !!session
|
|
175
|
+
};
|
|
176
|
+
(0, _helpers3.dataLayerPush)(dataLayer);
|
|
177
|
+
return dataLayer;
|
|
178
|
+
};
|
|
179
|
+
exports.checkoutResponse = checkoutResponse;
|
|
180
|
+
//# sourceMappingURL=checkoutResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkoutResponse.js","names":["_locale","require","_helpers","_Core","_helpers2","_helpers3","_legacy","ACCOMMODATION_TYPE_NAME","Object","keys","ACCOMMODATION_TYPE","checkoutResponse","_variants$hotelId","device","mobile","response","infantAge","tracking","store","currency","finder","calendar","occupation","promocode","hotel","accommodationType","variants","language","session","arguments","length","undefined","idchain","idtokenprovider","hotelId","fetchUrlParams","location","search","country","hotelInfo","hotelCurrency","propertyName","propertyType","reservedExtras","reservedRooms","totalExtrasTaxes","totalExtrasWithTaxes","totalExtrasWithoutTaxes","totalPriceWithTaxes","totalPriceWithTaxesWithoutExtras","totalPriceWithoutTaxes","totalPriceWithoutTaxesWithoutExtras","totalTaxes","adults","children","getOccupationTotals","days","nights","dateDiff","checkin","dateFormat","format","checkout","rooms","map","averagePriceWithoutTaxes","daysPriceBoard","defaultBoardDescription","numRoomsToReserve","numAdults","numBabies","totalChildren","numChildren","rateId","rateName","roomTypeName","priceWithTaxes","priceWithoutTaxes","forEach","day","boardName","numRooms","roomName","unitaryPriceWithoutTaxes","formatPrice","extras","values","amount","id","name","nightsToApply","unitaryPriceWithTaxes","extraId","extraName","dataLayer","chainId","coupon","code","event","home","document","hostname","lodgingDenomination","products","step","totalPriceWithTaxesWithExtras","totalPriceWithoutTaxesWithExtras","userCountry","userCurrency","userLogged","dataLayerPush","exports"],"sources":["../../../../../src/contexts/PerformanceManager/providers/gtm/checkoutResponse.js"],"sourcesContent":["import { dateDiff, dateFormat } from '@mirai/locale';\n\nimport { getOccupationTotals } from '../../../../components/helpers';\nimport { ACCOMMODATION_TYPE } from '../../../../Core.constants';\nimport { fetchUrlParams } from '../../../../helpers';\nimport { dataLayerPush } from '../../helpers';\nimport { formatPrice } from '../helpers/legacy';\n\nconst ACCOMMODATION_TYPE_NAME = Object.keys(ACCOMMODATION_TYPE);\n\nexport const checkoutResponse = ({\n device: { mobile } = {},\n response: { infantAge, tracking = {} } = {},\n store: {\n currency,\n finder: { calendar = [], occupation = [], promocode = '' } = {},\n hotel: { accommodationType, variants = {} } = {},\n language,\n session,\n } = {},\n} = {}) => {\n // ! -- TODO: Try to get all data from store -------------------------------------------------------------------------\n const { idchain, idtokenprovider: hotelId } = fetchUrlParams(location.search);\n\n // ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------\n const {\n country,\n hotelInfo: { currency: hotelCurrency = {}, propertyName, propertyType } = {},\n reservedExtras = {},\n reservedRooms = [],\n totalExtrasTaxes,\n totalExtrasWithTaxes,\n totalExtrasWithoutTaxes,\n totalPriceWithTaxes,\n totalPriceWithTaxesWithoutExtras,\n totalPriceWithoutTaxes,\n totalPriceWithoutTaxesWithoutExtras,\n totalTaxes,\n } = tracking;\n\n const { adults = 0, children = 0 } = getOccupationTotals({ infantAge, occupation });\n const { days: nights } = dateDiff(...calendar);\n const checkin = dateFormat(calendar[0], { format: 'DD/MM/YYYY' });\n const checkout = dateFormat(calendar[1], { format: 'DD/MM/YYYY' });\n\n const rooms = reservedRooms.map(\n ({\n averagePriceWithoutTaxes,\n daysPriceBoard = [],\n defaultBoardDescription,\n numRoomsToReserve,\n occupation: { numAdults, numBabies, totalChildren: numChildren } = {},\n rateId,\n rateName,\n roomTypeName,\n } = {}) => {\n let priceWithTaxes = 0;\n let priceWithoutTaxes = 0;\n daysPriceBoard.forEach((day) => {\n priceWithTaxes += day.priceWithTaxes;\n priceWithoutTaxes += day.priceWithoutTaxes;\n });\n\n return {\n boardName: defaultBoardDescription,\n numRooms: numRoomsToReserve,\n occupation: { numAdults, numChildren, numBabies },\n rateId,\n rateName,\n roomName: roomTypeName,\n priceWithTaxes,\n priceWithoutTaxes,\n unitaryPriceWithoutTaxes: formatPrice(averagePriceWithoutTaxes, hotelCurrency),\n };\n },\n );\n\n const extras = Object.values(reservedExtras).map(\n ({\n amount,\n id,\n name,\n nightsToApply,\n totalPriceWithTaxes,\n totalPriceWithoutTaxes,\n unitaryPriceWithTaxes,\n unitaryPriceWithoutTaxes,\n } = {}) => ({\n amount,\n extraId: id,\n extraName: name,\n nightsToApply,\n totalPriceWithTaxes,\n totalPriceWithoutTaxes,\n unitaryPriceWithTaxes,\n unitaryPriceWithoutTaxes,\n }),\n );\n\n const dataLayer = {\n chainId: idchain,\n checkin,\n checkout,\n coupon: promocode,\n currency: hotelCurrency.code,\n device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',\n event: 'init',\n home: document.location.hostname,\n hotelId,\n language,\n lodgingDenomination: ACCOMMODATION_TYPE_NAME[variants[hotelId]?.accommodationType || accommodationType],\n nights,\n numAdults: adults,\n numChildren: children,\n numRooms: occupation.length,\n products: { rooms, extras, checkin, checkout },\n propertyName,\n propertyType,\n step: 'CLIENTFORM',\n totalExtrasTaxes: formatPrice(totalExtrasTaxes, hotelCurrency),\n totalExtrasWithTaxes: formatPrice(totalExtrasWithTaxes, hotelCurrency),\n totalExtrasWithoutTaxes: formatPrice(totalExtrasWithoutTaxes, hotelCurrency),\n totalPriceWithTaxesWithExtras: formatPrice(totalPriceWithTaxes, hotelCurrency),\n totalPriceWithTaxesWithoutExtras: formatPrice(totalPriceWithTaxesWithoutExtras, hotelCurrency),\n totalPriceWithoutTaxesWithExtras: formatPrice(totalPriceWithoutTaxes, hotelCurrency),\n totalPriceWithoutTaxesWithoutExtras: formatPrice(totalPriceWithoutTaxesWithoutExtras, hotelCurrency),\n totalTaxes: formatPrice(totalTaxes, hotelCurrency),\n userCountry: country,\n userCurrency: currency,\n userLogged: !!session,\n };\n\n dataLayerPush(dataLayer);\n\n return dataLayer;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,MAAMM,uBAAuB,GAAGC,MAAM,CAACC,IAAI,CAACC,wBAAkB,CAAC;AAExD,MAAMC,gBAAgB,GAAG,SAAAA,CAAA,EAUrB;EAAA,IAAAC,iBAAA;EAAA,IAVsB;IAC/BC,MAAM,EAAE;MAAEC;IAAO,CAAC,GAAG,CAAC,CAAC;IACvBC,QAAQ,EAAE;MAAEC,SAAS;MAAEC,QAAQ,GAAG,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC;IAC3CC,KAAK,EAAE;MACLC,QAAQ;MACRC,MAAM,EAAE;QAAEC,QAAQ,GAAG,EAAE;QAAEC,UAAU,GAAG,EAAE;QAAEC,SAAS,GAAG;MAAG,CAAC,GAAG,CAAC,CAAC;MAC/DC,KAAK,EAAE;QAAEC,iBAAiB;QAAEC,QAA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,mCAAmC,EAAEX,aAAa,CAAC;IACpGY,UAAU,EAAE,IAAAgC,mBAAW,EAAChC,UAAU,EAAEZ,aAAa,CAAC;IAClDmE,WAAW,EAAErE,OAAO;IACpBsE,YAAY,EAAEzF,QAAQ;IACtB0F,UAAU,EAAE,CAAC,CAACjF;EAChB,CAAC;EAED,IAAAkF,uBAAa,EAAChB,SAAS,CAAC;EAExB,OAAOA,SAAS;AAClB,CAAC;AAACiB,OAAA,CAAApG,gBAAA,GAAAA,gBAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.finderReady = void 0;
|
|
7
|
+
var _Core = require("../../../../Core.constants");
|
|
8
|
+
var _helpers = require("../../helpers");
|
|
9
|
+
const ACCOMMODATION_TYPE_NAME = Object.keys(_Core.ACCOMMODATION_TYPE);
|
|
10
|
+
const finderReady = function () {
|
|
11
|
+
var _variants$hotelId;
|
|
12
|
+
let {
|
|
13
|
+
device: {
|
|
14
|
+
mobile
|
|
15
|
+
} = {},
|
|
16
|
+
store: {
|
|
17
|
+
hotel: {
|
|
18
|
+
accommodationType,
|
|
19
|
+
id: hotelId,
|
|
20
|
+
variants = {}
|
|
21
|
+
} = {},
|
|
22
|
+
id,
|
|
23
|
+
type
|
|
24
|
+
} = {}
|
|
25
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
26
|
+
const dataLayer = {
|
|
27
|
+
chainId: type === _Core.TYPE.CHAIN ? id : undefined,
|
|
28
|
+
device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',
|
|
29
|
+
event: 'init',
|
|
30
|
+
home: window.location.host,
|
|
31
|
+
hotelId,
|
|
32
|
+
lodgingDenomination: ACCOMMODATION_TYPE_NAME[((_variants$hotelId = variants[hotelId]) === null || _variants$hotelId === void 0 ? void 0 : _variants$hotelId.accommodationType) || accommodationType],
|
|
33
|
+
step: 'BOOKINGENTRANCE'
|
|
34
|
+
};
|
|
35
|
+
(0, _helpers.dataLayerPush)(dataLayer);
|
|
36
|
+
return dataLayer;
|
|
37
|
+
};
|
|
38
|
+
exports.finderReady = finderReady;
|
|
39
|
+
//# sourceMappingURL=finderReady.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finderReady.js","names":["_Core","require","_helpers","ACCOMMODATION_TYPE_NAME","Object","keys","ACCOMMODATION_TYPE","finderReady","_variants$hotelId","device","mobile","store","hotel","accommodationType","id","hotelId","variants","type","arguments","length","undefined","dataLayer","chainId","TYPE","CHAIN","event","home","window","location","host","lodgingDenomination","step","dataLayerPush","exports"],"sources":["../../../../../src/contexts/PerformanceManager/providers/gtm/finderReady.js"],"sourcesContent":["import { ACCOMMODATION_TYPE } from '../../../../Core.constants';\nimport { TYPE } from '../../../../Core.constants';\nimport { dataLayerPush } from '../../helpers';\n\nconst ACCOMMODATION_TYPE_NAME = Object.keys(ACCOMMODATION_TYPE);\n\nexport const finderReady = ({\n device: { mobile } = {},\n store: { hotel: { accommodationType, id: hotelId, variants = {} } = {}, id, type } = {},\n} = {}) => {\n const dataLayer = {\n chainId: type === TYPE.CHAIN ? id : undefined,\n device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',\n event: 'init',\n home: window.location.host,\n hotelId,\n lodgingDenomination: ACCOMMODATION_TYPE_NAME[variants[hotelId]?.accommodationType || accommodationType],\n step: 'BOOKINGENTRANCE',\n };\n\n dataLayerPush(dataLayer);\n\n return dataLayer;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,MAAME,uBAAuB,GAAGC,MAAM,CAACC,IAAI,CAACC,wBAAkB,CAAC;AAExD,MAAMC,WAAW,GAAG,SAAAA,CAAA,EAGhB;EAAA,IAAAC,iBAAA;EAAA,IAHiB;IAC1BC,MAAM,EAAE;MAAEC;IAAO,CAAC,GAAG,CAAC,CAAC;IACvBC,KAAK,EAAE;MAAEC,KAAK,EAAE;QAAEC,iBAAiB;QAAEC,EAAE,EAAEC,OAAO;QAAEC,QAAQ,GAAG,CAAC;MAAE,CAAC,GAAG,CAAC,CAAC;MAAEF,EAAE;MAAEG;IAAK,CAAC,GAAG,CAAC;EACxF,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACJ,MAAMG,SAAS,GAAG;IAChBC,OAAO,EAAEL,IAAI,KAAKM,UAAI,CAACC,KAAK,GAAGV,EAAE,GAAGM,SAAS;IAC7CX,MAAM,EAAEC,MAAM,GAAG,QAAQ,GAAG,gBAAgB;IAC5Ce,KAAK,EAAE,MAAM;IACbC,IAAI,EAAEC,MAAM,CAACC,QAAQ,CAACC,IAAI;IAC1Bd,OAAO;IACPe,mBAAmB,EAAE3B,uBAAuB,CAAC,EAAAK,iBAAA,GAAAQ,QAAQ,CAACD,OAAO,CAAC,cAAAP,iBAAA,uBAAjBA,iBAAA,CAAmBK,iBAAiB,KAAIA,iBAAiB,CAAC;IACvGkB,IAAI,EAAE;EACR,CAAC;EAED,IAAAC,sBAAa,EAACX,SAAS,CAAC;EAExB,OAAOA,SAAS;AAClB,CAAC;AAACY,OAAA,CAAA1B,WAAA,GAAAA,WAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _parseRate = require("./parseRate");
|
|
7
|
+
Object.keys(_parseRate).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _parseRate[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _parseRate[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_parseRate","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../../../src/contexts/PerformanceManager/providers/gtm/helpers/index.js"],"sourcesContent":["export * from './parseRate';\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseRate = void 0;
|
|
7
|
+
var _legacy = require("../../helpers/legacy");
|
|
8
|
+
const parseRate = function () {
|
|
9
|
+
let rate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10
|
+
let hotelCurrency = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11
|
+
let nights = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
12
|
+
return {
|
|
13
|
+
averagePrice: rate.price,
|
|
14
|
+
// ? TODO: Why?
|
|
15
|
+
boardName: rate.boardName,
|
|
16
|
+
occupation: {
|
|
17
|
+
numAdults: rate.adults,
|
|
18
|
+
numChildren: rate.childrenFirtsRange + rate.childrenSecondRange,
|
|
19
|
+
numBabies: rate.babies
|
|
20
|
+
},
|
|
21
|
+
priceWithoutTaxes: (0, _legacy.formatPrice)(rate.totalPriceWithoutTaxes, hotelCurrency),
|
|
22
|
+
priceWithTaxes: (0, _legacy.formatPrice)(rate.totalPriceWithTaxes, hotelCurrency),
|
|
23
|
+
rateName: rate.rateName,
|
|
24
|
+
roomTypeName: rate.roomTypeName,
|
|
25
|
+
unitaryPriceWithoutTaxes: (0, _legacy.formatPrice)((rate.totalPriceWithoutTaxes / nights).toFixed(0), hotelCurrency)
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
exports.parseRate = parseRate;
|
|
29
|
+
//# sourceMappingURL=parseRate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseRate.js","names":["_legacy","require","parseRate","rate","arguments","length","undefined","hotelCurrency","nights","averagePrice","price","boardName","occupation","numAdults","adults","numChildren","childrenFirtsRange","childrenSecondRange","numBabies","babies","priceWithoutTaxes","formatPrice","totalPriceWithoutTaxes","priceWithTaxes","totalPriceWithTaxes","rateName","roomTypeName","unitaryPriceWithoutTaxes","toFixed","exports"],"sources":["../../../../../../src/contexts/PerformanceManager/providers/gtm/helpers/parseRate.js"],"sourcesContent":["import { formatPrice } from '../../helpers/legacy';\n\nexport const parseRate = (rate = {}, hotelCurrency = {}, nights = 0) => ({\n averagePrice: rate.price, // ? TODO: Why?\n boardName: rate.boardName,\n occupation: {\n numAdults: rate.adults,\n numChildren: rate.childrenFirtsRange + rate.childrenSecondRange,\n numBabies: rate.babies,\n },\n priceWithoutTaxes: formatPrice(rate.totalPriceWithoutTaxes, hotelCurrency),\n priceWithTaxes: formatPrice(rate.totalPriceWithTaxes, hotelCurrency),\n rateName: rate.rateName,\n roomTypeName: rate.roomTypeName,\n unitaryPriceWithoutTaxes: formatPrice((rate.totalPriceWithoutTaxes / nights).toFixed(0), hotelCurrency),\n});\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,SAAS,GAAG,SAAAA,CAAA;EAAA,IAACC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IAAEG,aAAa,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IAAEI,MAAM,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAAA,OAAM;IACvEK,YAAY,EAAEN,IAAI,CAACO,KAAK;IAAE;IAC1BC,SAAS,EAAER,IAAI,CAACQ,SAAS;IACzBC,UAAU,EAAE;MACVC,SAAS,EAAEV,IAAI,CAACW,MAAM;MACtBC,WAAW,EAAEZ,IAAI,CAACa,kBAAkB,GAAGb,IAAI,CAACc,mBAAmB;MAC/DC,SAAS,EAAEf,IAAI,CAACgB;IAClB,CAAC;IACDC,iBAAiB,EAAE,IAAAC,mBAAW,EAAClB,IAAI,CAACmB,sBAAsB,EAAEf,aAAa,CAAC;IAC1EgB,cAAc,EAAE,IAAAF,mBAAW,EAAClB,IAAI,CAACqB,mBAAmB,EAAEjB,aAAa,CAAC;IACpEkB,QAAQ,EAAEtB,IAAI,CAACsB,QAAQ;IACvBC,YAAY,EAAEvB,IAAI,CAACuB,YAAY;IAC/BC,wBAAwB,EAAE,IAAAN,mBAAW,EAAC,CAAClB,IAAI,CAACmB,sBAAsB,GAAGd,MAAM,EAAEoB,OAAO,CAAC,CAAC,CAAC,EAAErB,aAAa;EACxG,CAAC;AAAA,CAAC;AAACsB,OAAA,CAAA3B,SAAA,GAAAA,SAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_bookingCancel","require","_bookingResponse","_checkoutResponse","_finderReady","_ratesResponse","ProviderGTM","exports","bookingCancel","bookingResponse","checkoutResponse","finderReady","ratesResponse"],"sources":["../../../../../src/contexts/PerformanceManager/providers/gtm/index.js"],"sourcesContent":["import { bookingCancel } from './bookingCancel';\nimport { bookingResponse } from './bookingResponse';\nimport { checkoutResponse } from './checkoutResponse';\nimport { finderReady } from './finderReady';\nimport { ratesResponse } from './ratesResponse';\n\nexport const ProviderGTM = {\n bookingCancel,\n bookingResponse,\n checkoutResponse,\n finderReady,\n ratesResponse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEO,MAAMK,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,aAAa,EAAbA,4BAAa;EACbC,eAAe,EAAfA,gCAAe;EACfC,gBAAgB,EAAhBA,kCAAgB;EAChBC,WAAW,EAAXA,wBAAW;EACXC,aAAa,EAAbA;AACF,CAAC"}
|