ublo-lib 1.47.8 → 1.47.9-1.rc0
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/es/common/components/admin-links/admin-links.d.ts +7 -1
- package/es/common/components/admin-links/admin-links.d.ts.map +1 -1
- package/es/common/components/admin-links/admin-links.js +14 -8
- package/es/common/components/cart-dialog/cart-dialog-inner.d.ts +2 -1
- package/es/common/components/cart-dialog/cart-dialog-inner.d.ts.map +1 -1
- package/es/common/components/cart-dialog/cart-dialog-inner.js +13 -2
- package/es/common/components/cart-dialog/cart-dialog.d.ts +2 -1
- package/es/common/components/cart-dialog/cart-dialog.d.ts.map +1 -1
- package/es/common/components/cart-dialog/cart-dialog.js +2 -2
- package/es/common/components/cart-dialog/default.d.ts +2 -1
- package/es/common/components/cart-dialog/default.d.ts.map +1 -1
- package/es/common/components/cart-dialog/default.js +2 -2
- package/es/common/components/cart-dialog/esf-custom.d.ts +2 -1
- package/es/common/components/cart-dialog/esf-custom.d.ts.map +1 -1
- package/es/common/components/cart-dialog/esf-custom.js +2 -2
- package/es/common/components/cart-dialog/esf.d.ts +2 -1
- package/es/common/components/cart-dialog/esf.d.ts.map +1 -1
- package/es/common/components/cart-dialog/esf.js +2 -2
- package/es/common/components/cart-dialog/lodging.d.ts +2 -1
- package/es/common/components/cart-dialog/lodging.d.ts.map +1 -1
- package/es/common/components/cart-dialog/lodging.js +2 -2
- package/es/common/components/cart-dialog/ski-passes.d.ts +2 -1
- package/es/common/components/cart-dialog/ski-passes.d.ts.map +1 -1
- package/es/common/components/cart-dialog/ski-passes.js +2 -2
- package/es/common/components/cart-dialog/ski-rental.d.ts +2 -1
- package/es/common/components/cart-dialog/ski-rental.d.ts.map +1 -1
- package/es/common/components/cart-dialog/ski-rental.js +2 -2
- package/es/common/components/cart-dialog/vakario.d.ts +2 -1
- package/es/common/components/cart-dialog/vakario.d.ts.map +1 -1
- package/es/common/components/cart-dialog/vakario.js +2 -2
- package/es/common/components/cart-preview/cart-pill.d.ts +3 -1
- package/es/common/components/cart-preview/cart-pill.d.ts.map +1 -1
- package/es/common/components/cart-preview/cart-pill.js +5 -3
- package/es/common/components/cart-preview/cart-preview.d.ts +4 -1
- package/es/common/components/cart-preview/cart-preview.d.ts.map +1 -1
- package/es/common/components/cart-preview/cart-preview.js +19 -6
- package/es/common/components/cart-preview/utils.d.ts.map +1 -1
- package/es/common/components/cart-preview/utils.js +8 -1
- package/es/common/components/cookie-consent/cookie-consent.d.ts.map +1 -1
- package/es/common/components/cookie-consent/cookie-consent.js +10 -1
- package/es/common/components/cross-selling-editor/services/utils.d.ts.map +1 -1
- package/es/common/components/cross-selling-editor/services/utils.js +6 -5
- package/es/common/components/custom-contact-form/attachment.js +2 -2
- package/es/common/components/custom-contact-form/custom-contact-form.js +8 -3
- package/es/common/components/date-picker/calendar.d.ts +2 -1
- package/es/common/components/date-picker/calendar.d.ts.map +1 -1
- package/es/common/components/date-picker/calendar.js +2 -4
- package/es/common/components/date-picker/context-lang.d.ts +6 -0
- package/es/common/components/date-picker/context-lang.d.ts.map +1 -0
- package/es/common/components/date-picker/context-lang.js +9 -0
- package/es/common/components/date-picker/date-item.d.ts +2 -1
- package/es/common/components/date-picker/date-item.d.ts.map +1 -1
- package/es/common/components/date-picker/date-item.js +1 -3
- package/es/common/components/date-picker/date-item.module.css +1 -1
- package/es/common/components/date-picker/date-picker.d.ts +2 -1
- package/es/common/components/date-picker/date-picker.d.ts.map +1 -1
- package/es/common/components/date-picker/date-picker.js +6 -3
- package/es/common/components/date-picker/month.d.ts +2 -1
- package/es/common/components/date-picker/month.d.ts.map +1 -1
- package/es/common/components/date-picker/month.js +2 -4
- package/es/common/components/gesco-contact-form/services/messages.js +1 -1
- package/es/common/components/infinite-carousel/index.d.ts +3 -0
- package/es/common/components/infinite-carousel/index.d.ts.map +1 -0
- package/es/common/components/infinite-carousel/index.js +2 -0
- package/es/common/components/infinite-carousel/infinite-carousel.d.ts +20 -0
- package/es/common/components/infinite-carousel/infinite-carousel.d.ts.map +1 -0
- package/es/common/components/infinite-carousel/infinite-carousel.js +196 -0
- package/es/common/components/infinite-carousel/infinite-carousel.module.css +175 -0
- package/es/common/components/information/i18n.json +6 -0
- package/es/common/components/information/information.d.ts.map +1 -1
- package/es/common/components/information/information.js +4 -2
- package/es/common/components/information/information.module.css +1 -2
- package/es/common/components/information/use-season-choice.d.ts +2 -0
- package/es/common/components/information/use-season-choice.d.ts.map +1 -0
- package/es/common/components/information/use-season-choice.js +47 -0
- package/es/common/components/search-bar/search-bar.d.ts +2 -1
- package/es/common/components/search-bar/search-bar.d.ts.map +1 -1
- package/es/common/components/search-bar/search-bar.js +19 -6
- package/es/common/components/season-switch/index.d.ts +6 -0
- package/es/common/components/season-switch/index.d.ts.map +1 -0
- package/es/common/components/season-switch/index.js +42 -0
- package/es/common/components/season-switch/index.module.css +24 -0
- package/es/common/components/season-switch/use-choose-winter.d.ts +2 -0
- package/es/common/components/season-switch/use-choose-winter.d.ts.map +1 -0
- package/es/common/components/season-switch/use-choose-winter.js +47 -0
- package/es/common/components/week-selector/services/weeks.d.ts +1 -1
- package/es/common/components/week-selector/services/weeks.d.ts.map +1 -1
- package/es/common/components/week-selector/services/weeks.js +4 -2
- package/es/common/components/week-selector/week-selector.d.ts +1 -1
- package/es/common/components/week-selector/week-selector.d.ts.map +1 -1
- package/es/common/components/week-selector/week-selector.js +6 -2
- package/es/common/hooks/use-packages.js +1 -1
- package/es/esf/components/espace-prive/index.d.ts +2 -1
- package/es/esf/components/espace-prive/index.d.ts.map +1 -1
- package/es/esf/components/espace-prive/index.js +2 -2
- package/es/esf/components/espace-prive/partenaire.d.ts +2 -1
- package/es/esf/components/espace-prive/partenaire.d.ts.map +1 -1
- package/es/esf/components/espace-prive/partenaire.js +2 -2
- package/es/esf/components/espace-prive/tunnel.d.ts +3 -1
- package/es/esf/components/espace-prive/tunnel.d.ts.map +1 -1
- package/es/esf/components/espace-prive/tunnel.js +2 -2
- package/es/esf/components/instant-search/hooks/use-search.d.ts.map +1 -1
- package/es/esf/components/instant-search/hooks/use-search.js +8 -1
- package/es/esf/components/instant-search/instant-search.d.ts.map +1 -1
- package/es/esf/components/instant-search/instant-search.js +16 -1
- package/es/esf/components/instant-search/links.d.ts +1 -1
- package/es/esf/components/instant-search/links.d.ts.map +1 -1
- package/es/esf/components/instant-search/links.js +1 -1
- package/es/esf/components/instant-search/products.d.ts +1 -1
- package/es/esf/components/instant-search/products.d.ts.map +1 -1
- package/es/esf/components/instant-search/products.js +1 -1
- package/es/esf/components/instant-search/results.d.ts +1 -1
- package/es/esf/components/instant-search/results.d.ts.map +1 -1
- package/es/esf/components/instant-search/results.js +2 -2
- package/es/esf/components/instructors-book/sheet.d.ts.map +1 -1
- package/es/esf/components/instructors-book/sheet.js +16 -1
- package/es/esf/components/levels/levels.d.ts +3 -1
- package/es/esf/components/levels/levels.d.ts.map +1 -1
- package/es/esf/components/levels/levels.js +24 -3
- package/es/esf/components/magic-box/booking.d.ts +3 -1
- package/es/esf/components/magic-box/booking.d.ts.map +1 -1
- package/es/esf/components/magic-box/booking.js +12 -3
- package/es/esf/components/magic-box/filter.d.ts.map +1 -1
- package/es/esf/components/magic-box/filter.js +8 -8
- package/es/esf/components/magic-box/magic-box.d.ts +2 -1
- package/es/esf/components/magic-box/magic-box.d.ts.map +1 -1
- package/es/esf/components/magic-box/magic-box.js +7 -9
- package/es/esf/components/magic-box/services/api.d.ts.map +1 -1
- package/es/esf/components/magic-box/services/api.js +1 -0
- package/es/esf/components/period-picker/period-picker.d.ts.map +1 -1
- package/es/esf/components/period-picker/period-picker.js +1 -1
- package/es/esf/components/period-picker/weeks.module.css +8 -5
- package/es/esf/hooks/use-booking-links.d.ts.map +1 -1
- package/es/esf/hooks/use-booking-links.js +11 -7
- package/es/esf/hooks/use-gesco-referral.d.ts +2 -0
- package/es/esf/hooks/use-gesco-referral.d.ts.map +1 -0
- package/es/esf/hooks/use-gesco-referral.js +18 -0
- package/es/future/components/event-analytics/instant-search.d.ts +10 -0
- package/es/future/components/event-analytics/instant-search.d.ts.map +1 -0
- package/es/future/components/event-analytics/instant-search.js +41 -0
- package/es/future/components/msem/index.d.ts +2 -1
- package/es/future/components/msem/index.d.ts.map +1 -1
- package/es/future/components/msem/index.js +2 -1
- package/es/future/components/msem/tunnel-new.d.ts +32 -0
- package/es/future/components/msem/tunnel-new.d.ts.map +1 -0
- package/es/future/components/msem/tunnel-new.js +27 -0
- package/es/future/components/msem/tunnel.d.ts +1 -1
- package/es/future/components/msem/tunnel.d.ts.map +1 -1
- package/es/future/components/msem/tunnel.js +8 -0
- package/es/future/components/msem/types.d.ts +1 -0
- package/es/future/components/msem/types.d.ts.map +1 -1
- package/es/future/components/msem/utils.d.ts +1 -1
- package/es/future/components/msem/utils.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/widget-list-item.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/widget-list-item.js +1 -2
- package/es/future/components/msem-preset-editor/editors/lodgings.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/lodgings.js +48 -48
- package/es/future/components/msem-preset-editor/editors/lodgings.module.css +24 -0
- package/es/future/components/msem-preset-editor/editors/ski-passes.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-passes.js +23 -24
- package/es/future/components/msem-preset-editor/editors/ski-rental.d.ts +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-rental.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-rental.js +161 -17
- package/es/future/components/msem-preset-editor/msem-preset-editor.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/msem-preset-editor.js +3 -1
- package/es/future/components/msem-preset-editor/services/api.d.ts +2 -0
- package/es/future/components/msem-preset-editor/services/api.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/services/api.js +8 -0
- package/es/future/components/plausible/services/callback.d.ts +2 -1
- package/es/future/components/plausible/services/callback.d.ts.map +1 -1
- package/es/future/components/plausible/services/callback.js +102 -6
- package/es/lbm/components/instant-search/faqs.d.ts +1 -1
- package/es/lbm/components/instant-search/faqs.d.ts.map +1 -1
- package/es/lbm/components/instant-search/faqs.js +1 -1
- package/es/lbm/components/instant-search/google-results.d.ts +1 -1
- package/es/lbm/components/instant-search/google-results.d.ts.map +1 -1
- package/es/lbm/components/instant-search/links.d.ts +1 -1
- package/es/lbm/components/instant-search/links.d.ts.map +1 -1
- package/es/lbm/components/instant-search/links.js +1 -1
- package/es/lbm/components/instant-search/products.d.ts +1 -1
- package/es/lbm/components/instant-search/products.d.ts.map +1 -1
- package/es/lbm/components/instant-search/products.js +1 -1
- package/es/lbm/components/instant-search/results.d.ts +1 -1
- package/es/lbm/components/instant-search/results.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/access.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/access.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/activity.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/activity.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.js +1 -1
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/lift.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/lift.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/lifts.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/lifts.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/msem-widget.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/msem-widget.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/openings.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/openings.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/slope.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/slope.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/slopes.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/slopes.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/snow.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/snow.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/weather.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/weather.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/webcam.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/webcam.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/pois.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/pois.js +6 -2
- package/es/market-place/components/instant-search/google-results.d.ts +1 -1
- package/es/market-place/components/instant-search/google-results.d.ts.map +1 -1
- package/es/market-place/components/instant-search/links.d.ts +1 -1
- package/es/market-place/components/instant-search/links.d.ts.map +1 -1
- package/es/market-place/components/instant-search/links.js +1 -1
- package/es/market-place/components/instant-search/products.d.ts +1 -1
- package/es/market-place/components/instant-search/products.d.ts.map +1 -1
- package/es/market-place/components/instant-search/products.js +1 -1
- package/es/market-place/components/instant-search/results.d.ts +1 -1
- package/es/market-place/components/instant-search/results.d.ts.map +1 -1
- package/package.json +2 -2
- package/es/common/utils/file-manager.d.ts +0 -8
- package/es/common/utils/file-manager.d.ts.map +0 -1
- package/es/common/utils/file-manager.js +0 -12
|
@@ -1,25 +1,47 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import MultipleSelect from "dt-design-system/es/multiple-select";
|
|
4
|
+
import Select from "dt-design-system/es/select";
|
|
5
|
+
import NumberPicker from "dt-design-system/es/number-picker";
|
|
6
|
+
import Input from "dt-design-system/es/input";
|
|
4
7
|
import Form from "../components/form";
|
|
5
8
|
import * as API from "../services/api";
|
|
6
9
|
const DEFAULT_LISTING_DATA = {
|
|
7
10
|
merchants: [],
|
|
8
11
|
};
|
|
9
12
|
const DEFAULT_DATA = {
|
|
10
|
-
|
|
13
|
+
catalog: "",
|
|
14
|
+
duration: 0,
|
|
11
15
|
rentFrom: "",
|
|
12
16
|
activity: "",
|
|
13
17
|
level: "",
|
|
14
|
-
productId:
|
|
18
|
+
productId: "",
|
|
15
19
|
};
|
|
16
|
-
|
|
20
|
+
const activities = [
|
|
21
|
+
{ label: "", value: "" },
|
|
22
|
+
{ label: "Ski", value: "SKI" },
|
|
23
|
+
{ label: "Snow", value: "SNOW" },
|
|
24
|
+
{ label: "Autre", value: "OTHER" },
|
|
25
|
+
];
|
|
26
|
+
const levels = [
|
|
27
|
+
{ label: "", value: "" },
|
|
28
|
+
{ label: "Débutant", value: "DEBUTANT" },
|
|
29
|
+
{ label: "Intermédiaire", value: "INTERMEDIAIRE" },
|
|
30
|
+
{ label: "Confirmé", value: "CONFIRME" },
|
|
31
|
+
];
|
|
32
|
+
export default function SkiRental({ msemServicesUrl, preset, setPreset, facet, setShowPresetDialog, onChange, testPreset, }) {
|
|
17
33
|
const savedPreset = React.useRef(preset);
|
|
18
34
|
const { channel, resort, merchant } = preset?.options;
|
|
19
35
|
const mode = merchant === undefined ? "LISTING" : "MERCHANT";
|
|
20
36
|
const [loading, setLoading] = React.useState(false);
|
|
37
|
+
const [loadingProducts, setLoadingProducts] = React.useState(false);
|
|
21
38
|
const [merchantList, setMerchantList] = React.useState([]);
|
|
22
|
-
const [
|
|
39
|
+
const [catalogs, setCatalogs] = React.useState([]);
|
|
40
|
+
const [catalog, setCatalog] = React.useState(preset?.options?.catalog || "");
|
|
41
|
+
const isReady = catalogs !== null;
|
|
42
|
+
const [products, setProducts] = React.useState([]);
|
|
43
|
+
const [merchants, setMerchants] = React.useState(getDefaultData(preset, "LISTING"));
|
|
44
|
+
const [data, setData] = React.useState(getDefaultData(preset, "MERCHANT"));
|
|
23
45
|
const formattedMerchants = merchantList.map(({ name, code }) => {
|
|
24
46
|
return { label: name, value: code };
|
|
25
47
|
});
|
|
@@ -33,6 +55,15 @@ export default function SkiRental({ msemServicesUrl, preset, setPreset, setShowP
|
|
|
33
55
|
const updateMerchants = (newValue) => {
|
|
34
56
|
setMerchants(newValue.map((v) => v.value));
|
|
35
57
|
};
|
|
58
|
+
const updateData = (field) => (newValue) => {
|
|
59
|
+
setData((current = {}) => {
|
|
60
|
+
const newData = {
|
|
61
|
+
...current,
|
|
62
|
+
[field]: newValue,
|
|
63
|
+
};
|
|
64
|
+
return newData;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
36
67
|
React.useEffect(() => {
|
|
37
68
|
const runEffect = async () => {
|
|
38
69
|
try {
|
|
@@ -51,23 +82,134 @@ export default function SkiRental({ msemServicesUrl, preset, setPreset, setShowP
|
|
|
51
82
|
}, []);
|
|
52
83
|
React.useEffect(() => {
|
|
53
84
|
setPreset((current = {}) => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
85
|
+
let newPreset = current;
|
|
86
|
+
if (mode === "LISTING") {
|
|
87
|
+
const catalog = data.catalog || undefined;
|
|
88
|
+
const duration = data.duration || undefined;
|
|
89
|
+
const rentFrom = data.rentFrom || undefined;
|
|
90
|
+
const activity = data.activity || undefined;
|
|
91
|
+
const level = data.level || undefined;
|
|
92
|
+
newPreset = {
|
|
93
|
+
...current,
|
|
94
|
+
presets: {
|
|
95
|
+
...(current?.presets || {}),
|
|
96
|
+
duration,
|
|
97
|
+
rentFrom,
|
|
98
|
+
activity,
|
|
99
|
+
level,
|
|
100
|
+
merchants,
|
|
101
|
+
},
|
|
102
|
+
options: {
|
|
103
|
+
...(current?.options || {}),
|
|
104
|
+
catalog,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (mode === "MERCHANT") {
|
|
109
|
+
const catalog = data.catalog || undefined;
|
|
110
|
+
const duration = data.duration || undefined;
|
|
111
|
+
const rentFrom = data.rentFrom || undefined;
|
|
112
|
+
const activity = data.activity || undefined;
|
|
113
|
+
const level = data.level || undefined;
|
|
114
|
+
const productId = data.productId ? Number(data.productId) : undefined;
|
|
115
|
+
newPreset = {
|
|
116
|
+
...current,
|
|
117
|
+
presets: {
|
|
118
|
+
...(current?.presets || {}),
|
|
119
|
+
duration,
|
|
120
|
+
rentFrom,
|
|
121
|
+
activity,
|
|
122
|
+
level,
|
|
123
|
+
productId,
|
|
124
|
+
},
|
|
125
|
+
options: {
|
|
126
|
+
...(current?.options || {}),
|
|
127
|
+
catalog,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
}
|
|
61
131
|
onChange?.(newPreset);
|
|
62
132
|
return newPreset;
|
|
63
133
|
});
|
|
64
|
-
}, [
|
|
134
|
+
}, [data, merchants, mode, onChange, setPreset]);
|
|
135
|
+
React.useEffect(() => {
|
|
136
|
+
const getMerchantSettings = async () => {
|
|
137
|
+
try {
|
|
138
|
+
setLoading(true);
|
|
139
|
+
const catalogs = await API.getSkiRentalCatalogs(msemServicesUrl, merchant);
|
|
140
|
+
const products = await API.getSkiRentalProducts(msemServicesUrl, merchant, facet, data.catalog || undefined);
|
|
141
|
+
setCatalogs(catalogs);
|
|
142
|
+
setProducts(products.map((product) => ({
|
|
143
|
+
label: product.label,
|
|
144
|
+
value: product.id,
|
|
145
|
+
})));
|
|
146
|
+
}
|
|
147
|
+
catch (e) {
|
|
148
|
+
console.error(e);
|
|
149
|
+
}
|
|
150
|
+
finally {
|
|
151
|
+
setLoading(false);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
if (mode === "MERCHANT" && merchant !== undefined) {
|
|
155
|
+
getMerchantSettings();
|
|
156
|
+
}
|
|
157
|
+
}, [mode, merchant, msemServicesUrl, facet, data.catalog]);
|
|
158
|
+
React.useEffect(() => {
|
|
159
|
+
const getProducts = async () => {
|
|
160
|
+
try {
|
|
161
|
+
setLoadingProducts(true);
|
|
162
|
+
const products = await API.getSkiRentalProducts(msemServicesUrl, merchant, facet, data.catalog || undefined, data.activity || undefined, data.level || undefined);
|
|
163
|
+
setProducts(products.map((product) => ({
|
|
164
|
+
label: product.label,
|
|
165
|
+
value: product.id,
|
|
166
|
+
})));
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
console.error(e);
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
setLoadingProducts(false);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
if (mode === "MERCHANT") {
|
|
176
|
+
getProducts();
|
|
177
|
+
}
|
|
178
|
+
}, [
|
|
179
|
+
msemServicesUrl,
|
|
180
|
+
mode,
|
|
181
|
+
merchant,
|
|
182
|
+
facet,
|
|
183
|
+
data.catalog,
|
|
184
|
+
data.activity,
|
|
185
|
+
data.level,
|
|
186
|
+
]);
|
|
187
|
+
React.useEffect(() => {
|
|
188
|
+
const checkProduct = async () => {
|
|
189
|
+
if (data.productId &&
|
|
190
|
+
!products.some((product) => product.value === parseInt(data.productId))) {
|
|
191
|
+
setData((current = {}) => ({
|
|
192
|
+
...current,
|
|
193
|
+
productId: DEFAULT_DATA.productId,
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
if (mode === "MERCHANT") {
|
|
198
|
+
checkProduct();
|
|
199
|
+
}
|
|
200
|
+
}, [mode, products, data.productId]);
|
|
65
201
|
const selectedMerchants = merchants?.map((merchant) => formattedMerchants.find((d) => d.value === merchant));
|
|
66
|
-
|
|
202
|
+
const title = mode === "LISTING"
|
|
203
|
+
? "Presets loueurs de matériel"
|
|
204
|
+
: `Presets ${preset?.name}`;
|
|
205
|
+
return (_jsxs(Form, { title: title, width: 420, preset: preset, buttonsActions: {
|
|
67
206
|
testPreset,
|
|
68
207
|
cancelPreset,
|
|
69
|
-
confirmPreset
|
|
70
|
-
}, children: mode === "LISTING" && merchantList?.length > 0 && (_jsx(MultipleSelect, { label: "Liste de marchands", options: formattedMerchants, values: selectedMerchants, onChange: updateMerchants, disabled: loading, withSearch: true })) }))
|
|
208
|
+
confirmPreset,
|
|
209
|
+
}, children: [mode === "LISTING" && merchantList?.length > 0 && (_jsxs(_Fragment, { children: [_jsx(MultipleSelect, { label: "Liste de marchands", options: formattedMerchants, values: selectedMerchants, onChange: updateMerchants, disabled: loading, withSearch: true }), _jsx(Input, { label: "Catalogue", value: data.catalog || DEFAULT_DATA.catalog, onValueChange: updateData("catalog"), disabled: loading }), _jsx(Input, { type: "date", label: "Date de d\u00E9but", value: data.rentFrom || DEFAULT_DATA.rentFrom, onValueChange: updateData("rentFrom"), disabled: loading }), _jsx(NumberPicker, { label: "Dur\u00E9e", value: data.duration || DEFAULT_DATA.duration, onChange: updateData("duration"), disabled: loading }), _jsx(Select, { label: "Activit\u00E9", value: data.activity || DEFAULT_DATA.activity, options: activities, onValueChange: updateData("activity"), disabled: loading }), _jsx(Select, { label: "Niveau", value: data.level || DEFAULT_DATA.level, options: levels, onValueChange: updateData("level"), disabled: loading })] })), mode === "MERCHANT" && (_jsxs(_Fragment, { children: [_jsx(Select, { label: "Catalogue", value: catalog, options: catalogs ? ["", ...catalogs] : [], onValueChange: (value) => {
|
|
210
|
+
setCatalog(value);
|
|
211
|
+
setData({ ...data, catalog: value });
|
|
212
|
+
}, loading: !isReady }), _jsx(Input, { type: "date", label: "Date de d\u00E9but", value: data.rentFrom || DEFAULT_DATA.rentFrom, onValueChange: updateData("rentFrom"), disabled: loading }), _jsx(NumberPicker, { label: "Dur\u00E9e", value: data.duration || DEFAULT_DATA.duration, onChange: updateData("duration"), disabled: loading }), _jsx(Select, { label: "Activit\u00E9", value: data.activity || DEFAULT_DATA.activity, options: activities, onValueChange: updateData("activity"), disabled: loading }), _jsx(Select, { label: "Niveau", value: data.level || DEFAULT_DATA.level, options: levels, onValueChange: updateData("level"), disabled: loading }), _jsx(Select, { label: "Produit", value: data.productId || DEFAULT_DATA.productId, options: products ? ["", ...products] : [], onValueChange: updateData("productId"), loading: loadingProducts })] }))] }));
|
|
71
213
|
}
|
|
72
214
|
function getDefaultData(preset, mode) {
|
|
73
215
|
if (mode === "LISTING") {
|
|
@@ -79,8 +221,10 @@ function getDefaultData(preset, mode) {
|
|
|
79
221
|
else {
|
|
80
222
|
if (!preset?.presets)
|
|
81
223
|
return DEFAULT_DATA;
|
|
82
|
-
const {
|
|
224
|
+
const { catalog } = preset.options;
|
|
225
|
+
const { duration, rentFrom, activity, level, productId } = preset.presets || {};
|
|
83
226
|
return {
|
|
227
|
+
catalog: catalog || DEFAULT_DATA.catalog,
|
|
84
228
|
duration: duration || DEFAULT_DATA.duration,
|
|
85
229
|
rentFrom: rentFrom || DEFAULT_DATA.rentFrom,
|
|
86
230
|
activity: activity || DEFAULT_DATA.activity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"msem-preset-editor.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem-preset-editor/msem-preset-editor.tsx"],"names":[],"mappings":"AAmBA,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,eAAe,EACf,WAAW,EACX,OAAO,EACP,aAAa,EACb,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,GACT,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"msem-preset-editor.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem-preset-editor/msem-preset-editor.tsx"],"names":[],"mappings":"AAmBA,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,eAAe,EACf,WAAW,EACX,OAAO,EACP,aAAa,EACb,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,GACT,EAAE,KAAK,2CA0NP"}
|
|
@@ -16,7 +16,9 @@ import * as UrlParams from "./services/url-params";
|
|
|
16
16
|
import * as Preset from "./services/preset";
|
|
17
17
|
import css from "./msem-preset-editor.module.css";
|
|
18
18
|
export default function MseMPresetEditor({ lang, channel, resort, msemServicesUrl, urlOverride, resorts, currentPreset, onChange, showUrl, facet, hideStay, }) {
|
|
19
|
-
const defaultResort = Number(currentPreset
|
|
19
|
+
const defaultResort = Number(currentPreset
|
|
20
|
+
? currentPreset.options.resort
|
|
21
|
+
: resort || resorts?.[0]?.value);
|
|
20
22
|
const [selectedResort, setSelectedResort] = React.useState(defaultResort);
|
|
21
23
|
const [selectedFacet, setSelectedFacet] = React.useState(facet?.toString() || currentPreset?.options?.facet?.toString() || "");
|
|
22
24
|
const [stay, setStay] = React.useState(currentPreset?.presets?.stay || { from: "", to: "" });
|
|
@@ -13,5 +13,7 @@ export declare function getVakarioCategories(msemServicesUrl: string, channel: s
|
|
|
13
13
|
export declare function getVakarioLevels(msemServicesUrl: string, channel: string, merchant: string, kind: string, age: string, category: string, lang: "fr" | "en"): Promise<any>;
|
|
14
14
|
export declare function getOtherProductsCategories(msemServicesUrl: string, facet: string, merchant: string, lang: "fr" | "en"): Promise<any>;
|
|
15
15
|
export declare function getRenterList(msemServicesUrl: string, channel: string, resort: number | string, date?: string): Promise<any>;
|
|
16
|
+
export declare function getSkiRentalCatalogs(msemServicesUrl: string, merchant: string): Promise<any>;
|
|
17
|
+
export declare function getSkiRentalProducts(msemServicesUrl: string, merchant: string, facet: string, catalog?: string, activity?: string, level?: string): Promise<any>;
|
|
16
18
|
export declare function getEsfKinds(msemServicesUrl: string, channel: string, resort: number, stayFrom: string, stayTo: string, season: string, lang: "fr" | "en"): Promise<any>;
|
|
17
19
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/services/api.ts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":"","sources":["../../../../../src/future/components/msem-preset-editor/services/api.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CACvB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,KAAK,EAAE,MAAM,gBAId;AAWD,wBAAsB,cAAc,CAClC,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,gBAMb;AAED,wBAAsB,UAAU,CAC9B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,MAAM,gBAIxB;AAED,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,gBAIjB;AAED,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,gBAIhB;AAGD,wBAAsB,WAAW,CAC/B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,gBAIf;AAED,wBAAsB,iBAAiB,CACrC,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,GAAG,IAAI,gBAIlB;AAED,wBAAsB,eAAe,CACnC,eAAe,EAAE,MAAM,EACvB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,OAAO,UAAQ,gBAIhB;AAED,wBAAsB,eAAe,CACnC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EA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,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,gBAIf;AAED,wBAAsB,WAAW,CAC/B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,GAAG,IAAI,gBAYlB"}
|
|
@@ -70,6 +70,14 @@ export async function getRenterList(msemServicesUrl, channel, resort, date) {
|
|
|
70
70
|
const endpoint = `${msemServicesUrl}/api/ski-rental/${resort}/renters`;
|
|
71
71
|
return POST(endpoint, { channel, date });
|
|
72
72
|
}
|
|
73
|
+
export async function getSkiRentalCatalogs(msemServicesUrl, merchant) {
|
|
74
|
+
const endpoint = `${msemServicesUrl}/api/ski-rental/settings/${merchant}/catalogs`;
|
|
75
|
+
return POST(endpoint);
|
|
76
|
+
}
|
|
77
|
+
export async function getSkiRentalProducts(msemServicesUrl, merchant, facet, catalog, activity, level) {
|
|
78
|
+
const endpoint = `${msemServicesUrl}/api/ski-rental/settings/${merchant}/products`;
|
|
79
|
+
return POST(endpoint, { facet, catalog, activity, level });
|
|
80
|
+
}
|
|
73
81
|
export async function getEsfKinds(msemServicesUrl, channel, resort, stayFrom, stayTo, season, lang) {
|
|
74
82
|
const endpoint = `${msemServicesUrl}/api/esf/kinds`;
|
|
75
83
|
return POST(endpoint, {
|
|
@@ -18,7 +18,8 @@ type Props = {
|
|
|
18
18
|
orderId?: string;
|
|
19
19
|
cartId?: string;
|
|
20
20
|
currency?: string;
|
|
21
|
+
type?: string;
|
|
21
22
|
};
|
|
22
|
-
export declare function MseM({ event, payment_type: paymentType, execcode, items, orderId, cartId, currency, }: Props): void
|
|
23
|
+
export declare function MseM({ event, payment_type: paymentType, execcode, items, orderId, cartId, currency, type, }: Props): Promise<void>;
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=callback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/plausible/services/callback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/plausible/services/callback.ts"],"names":[],"mappings":"AAIA,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;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA6BF,wBAAsB,IAAI,CAAC,EACzB,KAAK,EACL,YAAY,EAAE,WAAW,EACzB,QAAQ,EACR,KAAU,EACV,OAAO,EACP,MAAM,EACN,QAAgB,EAChB,IAAI,GACL,EAAE,KAAK,iBA8MP"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { fetchCart } from "../../../../common/components/cart-preview/api";
|
|
1
2
|
import sendGoal from "./send-goal";
|
|
3
|
+
import * as Utils from "../../../../common/components/cart-preview/utils";
|
|
2
4
|
const EVENT_NAMES = {
|
|
3
5
|
view_item: "MseM: View item",
|
|
6
|
+
gesco_event: "Contact-",
|
|
4
7
|
add_to_cart: "MseM: Add to cart",
|
|
5
8
|
remove_from_cart: "MseM: Remove from cart",
|
|
6
9
|
checkout: "MseM: Begin checkout",
|
|
@@ -8,8 +11,13 @@ const EVENT_NAMES = {
|
|
|
8
11
|
purchase: "MseM: Payment success",
|
|
9
12
|
payment_failure: "MseM: Payment failure",
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
const GESCO_EVENT_NAMES = {
|
|
15
|
+
tunnel: "CPSM",
|
|
16
|
+
vel: "VEL",
|
|
17
|
+
};
|
|
18
|
+
export async function MseM({ event, payment_type: paymentType, execcode, items = [], orderId, cartId, currency = "EUR", type, }) {
|
|
12
19
|
const hoteId = getBusinessProvider();
|
|
20
|
+
const gescoReferral = getGescoProvenance();
|
|
13
21
|
const stay = getStay();
|
|
14
22
|
const amount = items.reduce((acc, item) => {
|
|
15
23
|
return acc + item.gtmData.price * item.gtmData.quantity;
|
|
@@ -24,6 +32,31 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
24
32
|
Code: items[0]?.gtmData.item_category3,
|
|
25
33
|
Product: items[0]?.gtmData.item_variant,
|
|
26
34
|
};
|
|
35
|
+
const perProductProps = items.map((item) => {
|
|
36
|
+
return {
|
|
37
|
+
Name: item.gtmData.item_name,
|
|
38
|
+
Brand: item.gtmData.item_brand,
|
|
39
|
+
Kind: item.gtmData.item_category,
|
|
40
|
+
Activity: item.gtmData.item_category2,
|
|
41
|
+
Code: item.gtmData.item_category3,
|
|
42
|
+
Product: item.gtmData.item_variant,
|
|
43
|
+
Price: item.gtmData.price,
|
|
44
|
+
Quantity: item.gtmData.quantity,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const sendPerProductGoals = (name, perProductProps) => perProductProps.forEach((props) => {
|
|
48
|
+
const { Price, Quantity, ...filteredProps } = props;
|
|
49
|
+
sendGoal(name + " item", {
|
|
50
|
+
...filteredProps,
|
|
51
|
+
GescoReferral: gescoReferral,
|
|
52
|
+
hoteId,
|
|
53
|
+
stayFrom: stay?.from,
|
|
54
|
+
stayTo: stay?.to,
|
|
55
|
+
}, {
|
|
56
|
+
currency,
|
|
57
|
+
amount: Price * Quantity,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
27
60
|
switch (event) {
|
|
28
61
|
case "view_item": {
|
|
29
62
|
const formattedItems = formatPeekPerformancesItem(items);
|
|
@@ -32,7 +65,11 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
32
65
|
hoteId,
|
|
33
66
|
stay,
|
|
34
67
|
});
|
|
35
|
-
sendGoal(name, {
|
|
68
|
+
sendGoal(name, {
|
|
69
|
+
...firstProductProps,
|
|
70
|
+
stayFrom: stay?.from,
|
|
71
|
+
rawData,
|
|
72
|
+
});
|
|
36
73
|
break;
|
|
37
74
|
}
|
|
38
75
|
case "add_to_cart": {
|
|
@@ -53,6 +90,15 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
53
90
|
stay,
|
|
54
91
|
});
|
|
55
92
|
sendGoal(name, { ...firstProductProps, stayFrom: stay?.from, rawData }, revenue);
|
|
93
|
+
try {
|
|
94
|
+
const response = await fetchCart(cartId);
|
|
95
|
+
const { orders: bareOrders } = response?.cart;
|
|
96
|
+
const orders = Utils.getOrders(bareOrders);
|
|
97
|
+
if (!response || !orders || orders.length === 0) {
|
|
98
|
+
removeGescoProvenance();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch { }
|
|
56
102
|
break;
|
|
57
103
|
}
|
|
58
104
|
case "checkout": {
|
|
@@ -62,7 +108,8 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
62
108
|
hoteId,
|
|
63
109
|
stay,
|
|
64
110
|
});
|
|
65
|
-
sendGoal(name, { cartId, stayFrom: stay?.from, rawData }, revenue);
|
|
111
|
+
sendGoal(name, { cartId, stayFrom: stay?.from, rawData, GescoReferral: gescoReferral }, revenue);
|
|
112
|
+
sendPerProductGoals(name, perProductProps);
|
|
66
113
|
break;
|
|
67
114
|
}
|
|
68
115
|
case "add_payment_info": {
|
|
@@ -73,7 +120,21 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
73
120
|
stay,
|
|
74
121
|
paymentMethod: paymentType,
|
|
75
122
|
});
|
|
76
|
-
sendGoal(name, {
|
|
123
|
+
sendGoal(name, {
|
|
124
|
+
cartId,
|
|
125
|
+
"Payment type": paymentType,
|
|
126
|
+
stayFrom: stay?.from,
|
|
127
|
+
rawData,
|
|
128
|
+
GescoReferral: gescoReferral,
|
|
129
|
+
}, revenue);
|
|
130
|
+
sendPerProductGoals(name, perProductProps);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case "gesco_event": {
|
|
134
|
+
if (type !== "tunnel" && type !== "vel")
|
|
135
|
+
return;
|
|
136
|
+
name += GESCO_EVENT_NAMES[type];
|
|
137
|
+
sendGoal(name, { stayFrom: stay?.from });
|
|
77
138
|
break;
|
|
78
139
|
}
|
|
79
140
|
case "purchase": {
|
|
@@ -90,7 +151,15 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
90
151
|
});
|
|
91
152
|
if (isFailure) {
|
|
92
153
|
name = EVENT_NAMES.payment_failure;
|
|
93
|
-
sendGoal(name, {
|
|
154
|
+
sendGoal(name, {
|
|
155
|
+
cartId,
|
|
156
|
+
orderId,
|
|
157
|
+
Code: execcode,
|
|
158
|
+
stayFrom: stay?.from,
|
|
159
|
+
rawData,
|
|
160
|
+
GescoReferral: gescoReferral,
|
|
161
|
+
}, revenue);
|
|
162
|
+
sendPerProductGoals(name, perProductProps);
|
|
94
163
|
if (cartId) {
|
|
95
164
|
setPurchaseAttempts(cartId, attempts + 1);
|
|
96
165
|
}
|
|
@@ -99,7 +168,16 @@ export function MseM({ event, payment_type: paymentType, execcode, items = [], o
|
|
|
99
168
|
const isQuotation = checkQuotation(amount);
|
|
100
169
|
if (isQuotation)
|
|
101
170
|
return;
|
|
102
|
-
sendGoal(name, {
|
|
171
|
+
sendGoal(name, {
|
|
172
|
+
cartId,
|
|
173
|
+
orderId,
|
|
174
|
+
Code: execcode,
|
|
175
|
+
stayFrom: stay?.from,
|
|
176
|
+
rawData,
|
|
177
|
+
GescoReferral: gescoReferral,
|
|
178
|
+
}, revenue);
|
|
179
|
+
sendPerProductGoals(name, perProductProps);
|
|
180
|
+
removeGescoProvenance();
|
|
103
181
|
}
|
|
104
182
|
break;
|
|
105
183
|
}
|
|
@@ -155,3 +233,21 @@ function getBusinessProvider() {
|
|
|
155
233
|
catch (e) { }
|
|
156
234
|
}
|
|
157
235
|
}
|
|
236
|
+
function getGescoProvenance() {
|
|
237
|
+
const gescoReferral = window.localStorage.getItem("gescoReferral");
|
|
238
|
+
if (gescoReferral) {
|
|
239
|
+
try {
|
|
240
|
+
const { type, exp } = JSON.parse(gescoReferral);
|
|
241
|
+
const isExpired = exp < Date.now();
|
|
242
|
+
if (!isExpired && type !== -1) {
|
|
243
|
+
return type;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
catch (e) { }
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function removeGescoProvenance() {
|
|
250
|
+
window.localStorage.removeItem("gescoReferral");
|
|
251
|
+
window.sessionStorage.removeItem("gescoReferral");
|
|
252
|
+
window.localStorage.removeItem("gescoReferralChecked");
|
|
253
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faqs.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/faqs.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAQrC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"faqs.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/faqs.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAQrC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;IAChD,SAAS,EAAE,OAAO,CAAC;IAEnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,EAAE,KAAK,2CA4DP"}
|
|
@@ -44,5 +44,5 @@ function Faq({ faq, sendPlausibleGoal }) {
|
|
|
44
44
|
const createRipple = (e) => {
|
|
45
45
|
Ripple.create(e);
|
|
46
46
|
};
|
|
47
|
-
return (_jsxs(Link, { className: styles.faq, href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", onClick:
|
|
47
|
+
return (_jsxs(Link, { className: styles.faq, href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx("div", { className: styles.faqTitle, dangerouslySetInnerHTML: { __html: faqTitle } }), _jsx("div", { className: styles.faqText, dangerouslySetInnerHTML: { __html: faqText } })] }));
|
|
48
48
|
}
|
|
@@ -2,7 +2,7 @@ import { type GoogleSearchResult } from "./services/api";
|
|
|
2
2
|
type Props = {
|
|
3
3
|
products: GoogleSearchResult[];
|
|
4
4
|
loading: boolean;
|
|
5
|
-
sendPlausibleGoal: (path: string) => void;
|
|
5
|
+
sendPlausibleGoal: (path: string) => () => void;
|
|
6
6
|
faqsMaximized: boolean;
|
|
7
7
|
};
|
|
8
8
|
export default function OTLinks({ products, loading, sendPlausibleGoal, faqsMaximized, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-results.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/google-results.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"google-results.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/google-results.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;IAChD,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,aAAa,GACd,EAAE,KAAK,2CA6DP"}
|
|
@@ -5,7 +5,7 @@ type Props = {
|
|
|
5
5
|
links: Hit[];
|
|
6
6
|
pageTitleAsTitle?: boolean;
|
|
7
7
|
loading: boolean;
|
|
8
|
-
sendPlausibleGoal: (path: string) => void;
|
|
8
|
+
sendPlausibleGoal: (path: string) => () => void;
|
|
9
9
|
};
|
|
10
10
|
export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loading, sendPlausibleGoal, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/links.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACzD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/links.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACzD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;CACjD,CAAC;AAMF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,OAAO,EACP,iBAAiB,GAClB,EAAE,KAAK,2CAgFP"}
|
|
@@ -34,6 +34,6 @@ export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loadi
|
|
|
34
34
|
const linkTitle = Utils.getHighlight(titleProperty, link.highlight) ||
|
|
35
35
|
link.document[titleProperty].trim();
|
|
36
36
|
const linkText = Utils.getHighlight("text", link.highlight, true) || text?.trim();
|
|
37
|
-
return (_jsxs(Link, { href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", className: css.link, onClick:
|
|
37
|
+
return (_jsxs(Link, { href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", className: css.link, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Icon, { className: css.linkIcon }), _jsxs("div", { className: css.linkContent, children: [parentTitle && (_jsx("div", { className: css.linkParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsxs("div", { className: css.linkTitleContainer, children: [_jsx("div", { className: css.linkTitle, dangerouslySetInnerHTML: { __html: linkTitle } }), site !== docSite && (_jsx(ExternalLinkIcon, { className: css.linkIcon }))] }), linkText && (_jsx("div", { className: css.linkText, dangerouslySetInnerHTML: { __html: linkText } }))] })] }, id));
|
|
38
38
|
})] })] }));
|
|
39
39
|
}
|
|
@@ -4,7 +4,7 @@ type Props = {
|
|
|
4
4
|
lang: string;
|
|
5
5
|
products: Hit[];
|
|
6
6
|
loading: boolean;
|
|
7
|
-
sendPlausibleGoal: (path: string) => void;
|
|
7
|
+
sendPlausibleGoal: (path: string) => () => void;
|
|
8
8
|
otherResultsRef: React.RefObject<HTMLDivElement>;
|
|
9
9
|
isOtherResultsEmpty: boolean;
|
|
10
10
|
faqsMaximized: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;IAChD,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,EAAE,KAAK,2CAoIP"}
|
|
@@ -45,6 +45,6 @@ export default function Products({ lang, products, loading, sendPlausibleGoal, o
|
|
|
45
45
|
const productText = Utils.getHighlight("text", product.highlight) || text;
|
|
46
46
|
const showPrice = Boolean(price?.trim().length > 0);
|
|
47
47
|
const imagePlaceholderStrategy = imagePlaceholder ? "blur" : "empty";
|
|
48
|
-
return (_jsxs(Link, { className: css.product, href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", onClick:
|
|
48
|
+
return (_jsxs(Link, { className: css.product, href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Image, { className: css.productImage, src: image, alt: title, width: 220, height: 180, placeholder: imagePlaceholderStrategy, blurDataURL: imagePlaceholder }), _jsxs("div", { className: css.productContent, children: [parentTitle && (_jsx("div", { className: css.productParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsx("div", { className: css.productPageTitle, dangerouslySetInnerHTML: { __html: productPageTitle } }), _jsx("div", { className: css.productTitle, dangerouslySetInnerHTML: { __html: productTitle } }), _jsx("div", { className: css.productTime, dangerouslySetInnerHTML: { __html: productTime } }), _jsx("div", { className: css.productText, dangerouslySetInnerHTML: { __html: productText } }), showPrice && (_jsx("div", { className: css.productPrice, dangerouslySetInnerHTML: { __html: price } }))] })] }, id));
|
|
49
49
|
}), !noProduct && !isOtherResultsEmpty && (_jsx("div", { className: css.otherProducts, children: _jsxs(Button, { className: css.otherProductsButton, onClick: scrollToOtherResults, children: [message(lang, "showOtherResults"), _jsx(ArrowDownIcon, {})] }) }))] }));
|
|
50
50
|
}
|
|
@@ -68,7 +68,7 @@ type Props = {
|
|
|
68
68
|
facet: number;
|
|
69
69
|
setFacet: (facet: number) => void;
|
|
70
70
|
results: SiteResults;
|
|
71
|
-
sendPlausibleGoal: (path: string) => void;
|
|
71
|
+
sendPlausibleGoal: (path: string) => () => void;
|
|
72
72
|
loading: boolean;
|
|
73
73
|
};
|
|
74
74
|
export default function Results({ lang, text, facet, setFacet, results, loading, sendPlausibleGoal, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/results.tsx"],"names":[],"mappings":"AAWA,KAAK,QAAQ,GAAG;IACd,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;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AAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,WAAW,GAAG;IACjB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,WAAW,CAAC;IAErB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/results.tsx"],"names":[],"mappings":"AAWA,KAAK,QAAQ,GAAG;IACd,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;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;IACjB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,WAAW,CAAC;IAErB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,iBAAiB,GAClB,EAAE,KAAK,2CAwHP"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hit } from "../results";
|
|
2
2
|
type Props = {
|
|
3
3
|
doc: Hit;
|
|
4
|
-
sendPlausibleGoal: (path: string) => void;
|
|
4
|
+
sendPlausibleGoal: (path: string) => () => void;
|
|
5
5
|
};
|
|
6
6
|
declare const Access: ({ ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default Access;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/widgets/access.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAKtC,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,GAAG,CAAC;IAET,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/widgets/access.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAKtC,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,GAAG,CAAC;IAET,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;CACjD,CAAC;AACF,QAAA,MAAM,MAAM,iBAAkB,KAAK,4CAoClC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hit } from "../results";
|
|
2
2
|
type Props = {
|
|
3
3
|
doc: Hit;
|
|
4
|
-
sendPlausibleGoal: (path: string) => void;
|
|
4
|
+
sendPlausibleGoal: (path: string) => () => void;
|
|
5
5
|
};
|
|
6
6
|
declare const Activity: ({ doc, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default Activity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/widgets/activity.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AA8CtC,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,GAAG,CAAC;IAET,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/widgets/activity.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AA8CtC,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,GAAG,CAAC;IAET,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;CACjD,CAAC;AACF,QAAA,MAAM,QAAQ,sBAAuB,KAAK,4CA2CzC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|