ublo-lib 1.47.25 → 1.47.27
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.
|
@@ -154,7 +154,7 @@ function MagicBox({ stay, cartUrl, channel = "ESF", className, alignContent, max
|
|
|
154
154
|
const showFilter = stay && filters && values;
|
|
155
155
|
const SubmitIcon = customSubmitChecked ? ArrowRightIcon : SearchIcon;
|
|
156
156
|
const classes = classNames(css.root, className);
|
|
157
|
-
return (_jsxs("div", { className: classes, "data-align": alignContent, children: [_jsxs("div", { className: css.top, children: [children, VELClosed && !jmoins && (_jsxs(Information, { type: "error", className: css.errorMessage, children: [message(lang, "vel-closed"), _jsx(Button, { className: css.contact, onClick: openContactDialog, children: message(lang, "contact-us") })] })), jmoins && (_jsxs(Information, { type: "warning", className: css.errorMessage, children: [message(lang, "booking-block-day-minus-start"), " ", jmoins, message(lang, "booking-block-day-minus-end")] })), !VELClosed && currentStep === 0 && (_jsxs(_Fragment, { children: [!filters && _jsx("div", { className: css.loader }), showFilter && (_jsx(Filters, { filters: filters, values: values, setValues: setValues, customSubmit: customSubmit, customSubmitChecked: customSubmitChecked, setCustomSubmitChecked: setCustomSubmitChecked }))
|
|
157
|
+
return (_jsxs("div", { className: classes, "data-align": alignContent, children: [_jsxs("div", { className: css.top, children: [children, VELClosed && !jmoins && (_jsxs(Information, { type: "error", className: css.errorMessage, children: [message(lang, "vel-closed"), _jsx(Button, { className: css.contact, onClick: openContactDialog, children: message(lang, "contact-us") })] })), jmoins && (_jsxs(Information, { type: "warning", className: css.errorMessage, children: [message(lang, "booking-block-day-minus-start"), " ", jmoins, message(lang, "booking-block-day-minus-end")] })), !VELClosed && currentStep === 0 && (_jsxs(_Fragment, { children: [!filters && _jsx("div", { className: css.loader }), showFilter && (_jsx(Filters, { filters: filters, values: values, setValues: setValues, customSubmit: customSubmit, customSubmitChecked: customSubmitChecked, setCustomSubmitChecked: setCustomSubmitChecked })), _jsxs(Button, { className: css.confirm, onClick: submit, disabled: VELClosed || !isValid, children: [message(lang, customSubmitChecked ? "proceed" : "confirm"), _jsx(SubmitIcon, {})] })] })), currentStep === 1 && (_jsx(Booking, { stay: stay, cartUrl: cartUrl, channel: channel, values: values, maxCPDuration: maxCPDuration, setCurrentStep: setCurrentStep, msemWidgetHost: msemWidgetHost }))] }), _jsx(Dialog, { className: css.dialog, isOpened: contactDialogOpened, close: closeContactDialog, children: _jsx("div", { className: css.dialogInner, children: _jsx(GescoContactForm, { lang: lang, channel: channel, resort: resort, merchant: merchant }) }) })] }));
|
|
158
158
|
}
|
|
159
159
|
function getDefaultValues(filters) {
|
|
160
160
|
return Object.keys(filters || {}).reduce((acc, key) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/plausible/services/callback.ts"],"names":[],"mappings":"AAEA,KAAK,IAAI,GAAG;IACV,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAYF,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,YAAY,EAAE,WAAW,EACzB,QAAQ,EACR,KAAU,EACV,OAAO,EACP,MAAM,EACN,QAAgB,GACjB,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/plausible/services/callback.ts"],"names":[],"mappings":"AAEA,KAAK,IAAI,GAAG;IACV,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAYF,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,YAAY,EAAE,WAAW,EACzB,QAAQ,EACR,KAAU,EACV,OAAO,EACP,MAAM,EACN,QAAgB,GACjB,EAAE,KAAK,QAwJP"}
|
|
@@ -24,6 +24,22 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
24
24
|
Code: items[0]?.gtmData.item_category3,
|
|
25
25
|
Product: items[0]?.gtmData.item_variant,
|
|
26
26
|
};
|
|
27
|
+
const perProductProps = items.map((item) => {
|
|
28
|
+
return {
|
|
29
|
+
Name: item.gtmData.item_name,
|
|
30
|
+
Brand: item.gtmData.item_brand,
|
|
31
|
+
Kind: item.gtmData.item_category,
|
|
32
|
+
Activity: item.gtmData.item_category2,
|
|
33
|
+
Code: item.gtmData.item_category3,
|
|
34
|
+
Product: item.gtmData.item_variant,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const sendPerProductGoals = (name, perProductProps) => perProductProps.forEach((props) => {
|
|
38
|
+
sendGoal(name + " item", props, {
|
|
39
|
+
currency,
|
|
40
|
+
amount: props.Price * props.Quantity,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
27
43
|
switch (event) {
|
|
28
44
|
case "view_item": {
|
|
29
45
|
const formattedItems = formatPeekPerformancesItem(items);
|
|
@@ -63,6 +79,7 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
63
79
|
stay,
|
|
64
80
|
});
|
|
65
81
|
sendGoal(name, { cartId, stayFrom: stay?.from, rawData }, revenue);
|
|
82
|
+
sendPerProductGoals(name, perProductProps);
|
|
66
83
|
break;
|
|
67
84
|
}
|
|
68
85
|
case "add_payment_info": {
|
|
@@ -74,6 +91,7 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
74
91
|
paymentMethod: paymentType,
|
|
75
92
|
});
|
|
76
93
|
sendGoal(name, { cartId, "Payment type": paymentType, stayFrom: stay?.from, rawData }, revenue);
|
|
94
|
+
sendPerProductGoals(name, perProductProps);
|
|
77
95
|
break;
|
|
78
96
|
}
|
|
79
97
|
case "purchase": {
|
|
@@ -91,6 +109,7 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
91
109
|
if (isFailure) {
|
|
92
110
|
name = EVENT_NAMES.payment_failure;
|
|
93
111
|
sendGoal(name, { cartId, orderId, Code: execcode, stayFrom: stay?.from, rawData }, revenue);
|
|
112
|
+
sendPerProductGoals(name, perProductProps);
|
|
94
113
|
if (cartId) {
|
|
95
114
|
setPurchaseAttempts(cartId, attempts + 1);
|
|
96
115
|
}
|
|
@@ -100,6 +119,7 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
100
119
|
if (isQuotation)
|
|
101
120
|
return;
|
|
102
121
|
sendGoal(name, { cartId, orderId, Code: execcode, stayFrom: stay?.from, rawData }, revenue);
|
|
122
|
+
sendPerProductGoals(name, perProductProps);
|
|
103
123
|
}
|
|
104
124
|
break;
|
|
105
125
|
}
|