ublo-lib 1.41.1 → 1.42.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/es/common/components/breadcrumb.js +14 -2
- package/es/common/components/cookie-consent/cookie-consent.d.ts +2 -1
- package/es/common/components/cookie-consent/cookie-consent.d.ts.map +1 -1
- package/es/common/components/editable-calendar/index.d.ts +2 -1
- package/es/common/components/editable-calendar/index.d.ts.map +1 -1
- package/es/common/components/gesco-contact-form/services/form.d.ts.map +1 -1
- package/es/common/components/image-with-loader/image-with-loader.d.ts +1 -0
- package/es/common/components/image-with-loader/image-with-loader.d.ts.map +1 -1
- package/es/common/utils/file-manager.d.ts +1 -7
- package/es/common/utils/file-manager.d.ts.map +1 -1
- package/es/common/utils/url-parameters.d.ts.map +1 -1
- package/es/esf/components/instant-search/hooks/use-search.d.ts +0 -1
- package/es/esf/components/instant-search/hooks/use-search.d.ts.map +1 -1
- package/es/esf/components/instant-search/links.js +1 -1
- package/es/esf/components/instant-search/products.js +1 -1
- package/es/esf/components/period-picker/popup.d.ts +2 -1
- package/es/esf/components/period-picker/popup.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/facet-selector.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/form.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/resort-selector.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/stay-picker.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/services/offers.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/services/url-params.d.ts.map +1 -1
- package/es/future/components/msem-preset-linker/msem-preset-linker.d.ts.map +1 -1
- package/es/future/components/msem-preset-linker/msem-preset-linker.js +9 -4
- package/es/future/components/msem-preset-linker/msem-preset-linker.module.css +4 -0
- package/es/future/hooks/use-msem-presets.d.ts.map +1 -1
- package/es/future/hooks/use-msem-presets.js +3 -1
- package/es/future/utils/fetcher.d.ts.map +1 -1
- package/es/future/utils/url-parameters.d.ts.map +1 -1
- package/es/lbm/components/instant-search/faqs.js +1 -1
- package/es/lbm/components/instant-search/google-results.js +1 -1
- package/es/lbm/components/instant-search/hooks/use-google-search.d.ts +0 -1
- package/es/lbm/components/instant-search/hooks/use-google-search.d.ts.map +1 -1
- package/es/lbm/components/instant-search/hooks/use-search.d.ts +0 -1
- package/es/lbm/components/instant-search/hooks/use-search.d.ts.map +1 -1
- package/es/lbm/components/instant-search/links.js +1 -1
- package/es/lbm/components/instant-search/products.js +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.js +1 -1
- package/es/market-place/components/instant-search/google-results.js +1 -1
- package/es/market-place/components/instant-search/hooks/use-google-search.d.ts +0 -1
- package/es/market-place/components/instant-search/hooks/use-google-search.d.ts.map +1 -1
- package/es/market-place/components/instant-search/hooks/use-search.d.ts +0 -1
- package/es/market-place/components/instant-search/hooks/use-search.d.ts.map +1 -1
- package/es/market-place/components/instant-search/links.js +1 -1
- package/es/market-place/components/instant-search/products.js +1 -1
- package/package.json +27 -35
- package/es/common/components/editable-map/cluster.d.ts +0 -5
- package/es/common/components/editable-map/cluster.d.ts.map +0 -1
- package/es/common/components/editable-map/cluster.js +0 -8
- package/es/common/components/editable-map/color-picker.d.ts +0 -6
- package/es/common/components/editable-map/color-picker.d.ts.map +0 -1
- package/es/common/components/editable-map/color-picker.js +0 -27
- package/es/common/components/editable-map/color-picker.module.css +0 -66
- package/es/common/components/editable-map/edit-form.d.ts +0 -7
- package/es/common/components/editable-map/edit-form.d.ts.map +0 -1
- package/es/common/components/editable-map/edit-form.js +0 -35
- package/es/common/components/editable-map/edit-form.module.css +0 -64
- package/es/common/components/editable-map/editable-map.d.ts +0 -6
- package/es/common/components/editable-map/editable-map.d.ts.map +0 -1
- package/es/common/components/editable-map/editable-map.js +0 -184
- package/es/common/components/editable-map/editable-map.module.css +0 -251
- package/es/common/components/editable-map/full-screen-button.d.ts +0 -7
- package/es/common/components/editable-map/full-screen-button.d.ts.map +0 -1
- package/es/common/components/editable-map/full-screen-button.js +0 -75
- package/es/common/components/editable-map/full-screen-button.module.css +0 -15
- package/es/common/components/editable-map/geoman.d.ts +0 -8
- package/es/common/components/editable-map/geoman.d.ts.map +0 -1
- package/es/common/components/editable-map/geoman.js +0 -181
- package/es/common/components/editable-map/icon-picker.d.ts +0 -6
- package/es/common/components/editable-map/icon-picker.d.ts.map +0 -1
- package/es/common/components/editable-map/icon-picker.js +0 -31
- package/es/common/components/editable-map/icon-picker.module.css +0 -64
- package/es/common/components/editable-map/icons/esf-pralognan.d.ts +0 -51
- package/es/common/components/editable-map/icons/esf-pralognan.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/esf-pralognan.js +0 -155
- package/es/common/components/editable-map/icons/esf.d.ts +0 -39
- package/es/common/components/editable-map/icons/esf.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/esf.js +0 -119
- package/es/common/components/editable-map/icons/index.d.ts +0 -7
- package/es/common/components/editable-map/icons/index.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/index.js +0 -6
- package/es/common/components/editable-map/icons/lavovelo.d.ts +0 -5
- package/es/common/components/editable-map/icons/lavovelo.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/lavovelo.js +0 -17
- package/es/common/components/editable-map/icons/sata-huez.d.ts +0 -29
- package/es/common/components/editable-map/icons/sata-huez.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/sata-huez.js +0 -89
- package/es/common/components/editable-map/icons/sedev-vars.d.ts +0 -29
- package/es/common/components/editable-map/icons/sedev-vars.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/sedev-vars.js +0 -89
- package/es/common/components/editable-map/icons/ui.d.ts +0 -2
- package/es/common/components/editable-map/icons/ui.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/ui.js +0 -7
- package/es/common/components/editable-map/icons/viarmonia.d.ts +0 -3
- package/es/common/components/editable-map/icons/viarmonia.d.ts.map +0 -1
- package/es/common/components/editable-map/icons/viarmonia.js +0 -11
- package/es/common/components/editable-map/index.d.ts +0 -5
- package/es/common/components/editable-map/index.d.ts.map +0 -1
- package/es/common/components/editable-map/index.js +0 -67
- package/es/common/components/editable-map/initial-marker-form.d.ts +0 -4
- package/es/common/components/editable-map/initial-marker-form.d.ts.map +0 -1
- package/es/common/components/editable-map/initial-marker-form.js +0 -17
- package/es/common/components/editable-map/initial-marker-form.module.css +0 -25
- package/es/common/components/editable-map/map-events.d.ts +0 -5
- package/es/common/components/editable-map/map-events.d.ts.map +0 -1
- package/es/common/components/editable-map/map-events.js +0 -12
- package/es/common/components/editable-map/marker-list.d.ts +0 -13
- package/es/common/components/editable-map/marker-list.d.ts.map +0 -1
- package/es/common/components/editable-map/marker-list.js +0 -86
- package/es/common/components/editable-map/marker-list.module.css +0 -122
- package/es/common/components/editable-map/markers.d.ts +0 -7
- package/es/common/components/editable-map/markers.d.ts.map +0 -1
- package/es/common/components/editable-map/markers.js +0 -27
- package/es/common/components/editable-map/markers.module.css +0 -26
- package/es/common/components/editable-map/popup-data.d.ts +0 -4
- package/es/common/components/editable-map/popup-data.d.ts.map +0 -1
- package/es/common/components/editable-map/popup-data.js +0 -12
- package/es/common/components/editable-map/popup-data.module.css +0 -41
- package/es/common/components/editable-map/slopes-toggle.d.ts +0 -5
- package/es/common/components/editable-map/slopes-toggle.d.ts.map +0 -1
- package/es/common/components/editable-map/slopes-toggle.js +0 -13
- package/es/common/components/editable-map/slopes-toggle.module.css +0 -15
- package/es/common/components/editable-map/utils/file-manager.d.ts +0 -2
- package/es/common/components/editable-map/utils/file-manager.d.ts.map +0 -1
- package/es/common/components/editable-map/utils/file-manager.js +0 -29
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-events.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/map-events.js"],"names":[],"mappings":"AAEA;;;QAWC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useMapEvents } from "react-leaflet";
|
|
2
|
-
export default function MapEvents({ setCenter, setZoom }) {
|
|
3
|
-
useMapEvents({
|
|
4
|
-
dragend(e) {
|
|
5
|
-
setCenter(e.target.getCenter());
|
|
6
|
-
},
|
|
7
|
-
zoomend(e) {
|
|
8
|
-
setZoom(e.target.getZoom());
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default function MarkerList({ cmsMode, opened, setOpened, isInDialog, markers, setMarkers, isSorted, setIsSorted, mapRef, iconSet, }: {
|
|
2
|
-
cmsMode: any;
|
|
3
|
-
opened: any;
|
|
4
|
-
setOpened: any;
|
|
5
|
-
isInDialog: any;
|
|
6
|
-
markers: any;
|
|
7
|
-
setMarkers: any;
|
|
8
|
-
isSorted: any;
|
|
9
|
-
setIsSorted: any;
|
|
10
|
-
mapRef: any;
|
|
11
|
-
iconSet: any;
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
//# sourceMappingURL=marker-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marker-list.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/marker-list.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;4CAwIC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as L from "leaflet";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
import Button from "dt-design-system/es/button";
|
|
6
|
-
import * as DTIcons from "dt-design-system/es/icons";
|
|
7
|
-
import useWindowSizes from "../../hooks/use-window-sizes";
|
|
8
|
-
import * as Icons from "./icons";
|
|
9
|
-
import css from "./marker-list.module.css";
|
|
10
|
-
export default function MarkerList({ cmsMode, opened, setOpened, isInDialog, markers, setMarkers, isSorted, setIsSorted, mapRef, iconSet, }) {
|
|
11
|
-
const sortedMarkers = isSorted ? markers : markers.sort(alphaNumSortByTitle);
|
|
12
|
-
const moveMarker = (e, id, direction) => {
|
|
13
|
-
e.stopPropagation();
|
|
14
|
-
e.preventDefault();
|
|
15
|
-
if (!isSorted)
|
|
16
|
-
setIsSorted(true);
|
|
17
|
-
setMarkers((prevMarkers) => {
|
|
18
|
-
const index = prevMarkers.findIndex((marker) => marker.id === id);
|
|
19
|
-
const newMarkers = [...prevMarkers];
|
|
20
|
-
const condition = direction === "up" ? index > 0 : index !== markers.length - 1;
|
|
21
|
-
if (condition) {
|
|
22
|
-
if (direction === "up") {
|
|
23
|
-
[newMarkers[index - 1], newMarkers[index]] = [
|
|
24
|
-
newMarkers[index],
|
|
25
|
-
newMarkers[index - 1],
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
[newMarkers[index + 1], newMarkers[index]] = [
|
|
30
|
-
newMarkers[index],
|
|
31
|
-
newMarkers[index + 1],
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
return newMarkers;
|
|
35
|
-
}
|
|
36
|
-
return prevMarkers;
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
const toggleList = (e) => {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
e.stopPropagation();
|
|
42
|
-
setOpened(!opened);
|
|
43
|
-
};
|
|
44
|
-
const { width } = useWindowSizes();
|
|
45
|
-
const ToggleIcon = opened ? DTIcons.ChevronRight : DTIcons.Menu;
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
setOpened(width > 992);
|
|
48
|
-
}, [setOpened, width]);
|
|
49
|
-
const classes = classNames(css.list, {
|
|
50
|
-
[css.listOpened]: opened,
|
|
51
|
-
[css.listIsInDialog]: isInDialog,
|
|
52
|
-
});
|
|
53
|
-
return (_jsxs("div", { className: classes, children: [opened && (_jsx("div", { className: css.inner, children: sortedMarkers.map(({ id, icon, title, position, important }) => {
|
|
54
|
-
const focusMarker = (e) => {
|
|
55
|
-
e.stopPropagation();
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
mapRef.current.setView(position, 17);
|
|
58
|
-
setTimeout(() => {
|
|
59
|
-
mapRef.current.eachLayer((layer) => {
|
|
60
|
-
if (layer instanceof L.Marker) {
|
|
61
|
-
const marker = layer
|
|
62
|
-
.getElement()
|
|
63
|
-
.querySelector(`[data-id="${id}"]`);
|
|
64
|
-
if (marker) {
|
|
65
|
-
layer.openPopup();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}, 300);
|
|
70
|
-
if (width <= 992) {
|
|
71
|
-
setOpened(false);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const Icon = Icons[iconSet][icon] || Icons[iconSet].Location;
|
|
75
|
-
const classes = classNames(css.button, {
|
|
76
|
-
[css.buttonImportant]: important,
|
|
77
|
-
});
|
|
78
|
-
return (_jsxs("a", { href: "", className: classes, onClick: focusMarker, children: [_jsx(Icon, { className: css.icon }), _jsx("span", { children: title }), _jsxs("div", { className: css.movements, children: [_jsx(Button, { variant: "transparent", className: css.move, onClick: (e) => moveMarker(e, id, "up"), children: _jsx(DTIcons.ChevronUp, { className: css.moveIcon }) }), _jsx(Button, { variant: "transparent", className: css.move, onClick: (e) => moveMarker(e, id, "down"), children: _jsx(DTIcons.ChevronDown, { className: css.moveIcon }) })] })] }, id));
|
|
79
|
-
}) })), !cmsMode && (_jsx(Button, { type: "button", variant: "secondary", className: css.toggle, onClick: toggleList, children: _jsx(ToggleIcon, {}) }))] }));
|
|
80
|
-
}
|
|
81
|
-
function alphaNumSortByTitle(a, b) {
|
|
82
|
-
return a.title.localeCompare(b.title, undefined, {
|
|
83
|
-
numeric: true,
|
|
84
|
-
sensitivity: "base",
|
|
85
|
-
});
|
|
86
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
.list {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
max-width: 250px;
|
|
6
|
-
height: 100%;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
gap: 4px;
|
|
10
|
-
background-color: var(--ds-grey-000, #fff);
|
|
11
|
-
border-left: 1px solid var(--ds-grey-200, #ededed);
|
|
12
|
-
border: 1px solid var(--ds-grey-200, #ededed);
|
|
13
|
-
border-radius: 0 var(--ds-radius-100, 6px) var(--ds-radius-100, 6px) 0;
|
|
14
|
-
transition: background-color 160ms
|
|
15
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
button.toggle {
|
|
19
|
-
position: absolute;
|
|
20
|
-
bottom: 8px;
|
|
21
|
-
right: 8px;
|
|
22
|
-
background-color: var(--ds-grey-000, #fff);
|
|
23
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
24
|
-
user-select: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
button.toggle:hover {
|
|
28
|
-
background-color: var(--ds-grey-100, #f8f8f8);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.inner {
|
|
32
|
-
position: relative;
|
|
33
|
-
flex: 1 1 100%;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: 2px;
|
|
37
|
-
padding: 8px;
|
|
38
|
-
overflow: auto;
|
|
39
|
-
animation: marker-list-inner-appearance 160ms
|
|
40
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
41
|
-
background: linear-gradient(
|
|
42
|
-
var(--ds-grey-000, #fff) 30%,
|
|
43
|
-
hsla(0, 0%, 100%, 0)
|
|
44
|
-
),
|
|
45
|
-
linear-gradient(hsla(0, 0%, 100%, 0), var(--ds-grey-000, #fff) 70%) 0 100%,
|
|
46
|
-
radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.25), transparent),
|
|
47
|
-
radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.25), transparent)
|
|
48
|
-
0 100%;
|
|
49
|
-
background-repeat: no-repeat;
|
|
50
|
-
background-size: 100% 30px, 100% 30px, 100% 10px, 100% 10px;
|
|
51
|
-
background-attachment: local, local, scroll, scroll;
|
|
52
|
-
border-radius: inherit;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@keyframes marker-list-inner-appearance {
|
|
56
|
-
0% {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.button {
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
gap: 1ch;
|
|
65
|
-
padding: 4px 6px;
|
|
66
|
-
color: inherit;
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
text-align: left;
|
|
69
|
-
border-radius: var(--ds-radius-200, 10px);
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
user-select: none;
|
|
72
|
-
transition: background-color 160ms
|
|
73
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.listIsInDialog .button:first-of-type {
|
|
77
|
-
margin-right: 30px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.button:is(:hover, :focus) {
|
|
81
|
-
background-color: var(--ds-grey-100, #f8f8f8);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.buttonImportant {
|
|
85
|
-
font-weight: 700;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.icon {
|
|
89
|
-
flex: 0 0 32px;
|
|
90
|
-
width: 32px;
|
|
91
|
-
height: 32px;
|
|
92
|
-
filter: drop-shadow(var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12)));
|
|
93
|
-
fill: var(--ds-secondary, var(--ds-blue-400, #4177f6));
|
|
94
|
-
transition: transform 160ms
|
|
95
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.movements {
|
|
99
|
-
display: flex;
|
|
100
|
-
flex-direction: column;
|
|
101
|
-
opacity: 0;
|
|
102
|
-
touch-action: none;
|
|
103
|
-
margin-left: auto;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.move {
|
|
107
|
-
--ds-button-hover-background: var(--ds-grey-000, #fff);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
svg.moveIcon {
|
|
111
|
-
--size: 12px;
|
|
112
|
-
fill: var(--ds-grey-800, #000);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.button:is(:hover, :focus) .icon {
|
|
116
|
-
transform: scale(1.08);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:global(.cms--editing) .button:is(:hover, :focus) .movements {
|
|
120
|
-
opacity: 1;
|
|
121
|
-
touch-action: auto;
|
|
122
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/markers.js"],"names":[],"mappings":"AASA;;;;;QAYC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as ReactDOM from "react-dom/server";
|
|
4
|
-
import * as L from "leaflet";
|
|
5
|
-
import { Marker as LeafletMarker, Popup, Tooltip } from "react-leaflet";
|
|
6
|
-
import EditForm from "./edit-form";
|
|
7
|
-
import PopupData from "./popup-data";
|
|
8
|
-
import * as Icons from "./icons";
|
|
9
|
-
import css from "./markers.module.css";
|
|
10
|
-
export default function Markers({ markers, setMarkers, iconSet, isEditing }) {
|
|
11
|
-
return markers.map((marker, i) => {
|
|
12
|
-
return (_jsx(Marker, { marker: marker, setMarkers: setMarkers, iconSet: iconSet, isEditing: isEditing }, i));
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function Marker({ marker, setMarkers, iconSet, isEditing }) {
|
|
16
|
-
const markerRef = React.useRef();
|
|
17
|
-
const popupRef = React.useRef();
|
|
18
|
-
const { id, icon, title, position, tooltipOpened } = marker;
|
|
19
|
-
const Icon = Icons[iconSet][icon] || Icons[iconSet].Location;
|
|
20
|
-
const tooltipProps = tooltipOpened
|
|
21
|
-
? { direction: "right", permanent: true, offset: [6, -12] }
|
|
22
|
-
: { direction: "right", offset: [6, -12] };
|
|
23
|
-
return (_jsxs(LeafletMarker, { id: id, ref: markerRef, draggable: false, position: position, icon: L.divIcon({
|
|
24
|
-
className: css.markerIcon,
|
|
25
|
-
html: ReactDOM.renderToString(_jsx(Icon, { "data-id": id })),
|
|
26
|
-
}), children: [!isEditing && _jsx(Tooltip, { ...tooltipProps, children: title }), _jsx(Popup, { ref: popupRef, offset: [0, -24], children: isEditing ? (_jsx(EditForm, { popupRef: popupRef, marker: marker, setMarkers: setMarkers, iconSet: iconSet })) : (_jsx(PopupData, { marker: marker })) })] }, id));
|
|
27
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.markerIcon > svg {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 42px;
|
|
4
|
-
height: 42px;
|
|
5
|
-
fill: var(--ds-secondary, var(--ds-blue-400, #4177f6));
|
|
6
|
-
filter: drop-shadow(var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12)));
|
|
7
|
-
transform: translate(-35%, -65%);
|
|
8
|
-
transition: transform 160ms
|
|
9
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.markerIcon:hover > svg {
|
|
13
|
-
transform: translate(-35%, -65%) scale(1.1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.markerIcon:has([data-pin])::after {
|
|
17
|
-
content: "";
|
|
18
|
-
top: calc(100% + 1px);
|
|
19
|
-
left: calc(50% - 6px);
|
|
20
|
-
width: 16px;
|
|
21
|
-
position: absolute;
|
|
22
|
-
height: 10px;
|
|
23
|
-
background-color: var(--ds-grey-700, #232324);
|
|
24
|
-
border-radius: 50%;
|
|
25
|
-
opacity: 0.3;
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popup-data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/popup-data.js"],"names":[],"mappings":"AAIA;;4CAiCC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import Button from "dt-design-system/es/button";
|
|
4
|
-
import css from "./popup-data.module.css";
|
|
5
|
-
export default function PopupData({ marker }) {
|
|
6
|
-
const { title, image, description, url, label } = marker;
|
|
7
|
-
const isExternalUrl = /^((http|https):\/\/)/.test(url);
|
|
8
|
-
const target = isExternalUrl ? "_blank" : undefined;
|
|
9
|
-
const rel = isExternalUrl ? "noopener" : undefined;
|
|
10
|
-
const formattedDescription = description.replace(/\n/g, "<br />");
|
|
11
|
-
return (_jsxs("div", { className: css.data, children: [image && _jsx("img", { className: css.image, src: image, alt: "" }), _jsxs("div", { className: css.inner, children: [_jsx("div", { className: css.title, children: title }), formattedDescription && (_jsx("div", { className: css.description, dangerouslySetInnerHTML: { __html: formattedDescription } })), url?.trim() && (_jsx(Button, { tag: "a", href: url.trim(), className: css.link, target: target, rel: rel, children: label || "En savoir plus" }))] })] }));
|
|
12
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.data {
|
|
2
|
-
position: relative;
|
|
3
|
-
max-width: 280px;
|
|
4
|
-
max-height: 280px;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 6px;
|
|
8
|
-
overflow: auto;
|
|
9
|
-
border-radius: 12px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.image {
|
|
13
|
-
/* position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0; */
|
|
16
|
-
height: 150px;
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.inner {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
padding: 13px 24px 13px 20px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.title {
|
|
27
|
-
position: sticky;
|
|
28
|
-
top: 0;
|
|
29
|
-
padding: 4px 0;
|
|
30
|
-
font-size: 16px;
|
|
31
|
-
font-weight: 700;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.description {
|
|
35
|
-
font-size: 14px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.link {
|
|
39
|
-
margin-top: 6px;
|
|
40
|
-
color: var(--ds-grey-000, #fff) !important;
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slopes-toggle.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/slopes-toggle.js"],"names":[],"mappings":"AASA;;;4CAaC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import Checkbox from "dt-design-system/es/checkbox";
|
|
4
|
-
import css from "./slopes-toggle.module.css";
|
|
5
|
-
const labels = {
|
|
6
|
-
fr: "Afficher les pistes",
|
|
7
|
-
en: "Show slopes",
|
|
8
|
-
};
|
|
9
|
-
export default function SlopesToggle({ showSlopes, setShowSlopes }) {
|
|
10
|
-
const lang = document.documentElement.getAttribute("lang");
|
|
11
|
-
const label = lang === "fr" ? labels.fr : labels.en;
|
|
12
|
-
return (_jsx("div", { className: css.slopesToggle, children: _jsx(Checkbox, { label: label, checked: showSlopes, onCheckedChange: setShowSlopes }) }));
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.slopesToggle {
|
|
2
|
-
position: absolute;
|
|
3
|
-
bottom: 10px;
|
|
4
|
-
left: 10px;
|
|
5
|
-
width: fit-content;
|
|
6
|
-
padding: 10px;
|
|
7
|
-
background-color: var(--ds-grey-000, #fff);
|
|
8
|
-
border: 1px solid var(--ds-grey-200, #ededed);
|
|
9
|
-
border-radius: var(--ds-radius-200, 10px);
|
|
10
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.slopesToggle span {
|
|
14
|
-
width: 24px;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-manager.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/editable-map/utils/file-manager.ts"],"names":[],"mappings":"AAGA,wBAAsB,IAAI,CACxB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC/B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,iBAaf"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import loadJS from "../../../utils/load-js";
|
|
2
|
-
export async function load(changed, width, height) {
|
|
3
|
-
const config = getConfig();
|
|
4
|
-
await loadJS(config.fileManagerURL, "file-picker");
|
|
5
|
-
window.openFileManager({
|
|
6
|
-
fileChanged: (result) => {
|
|
7
|
-
return changed(fileChanged(result.path));
|
|
8
|
-
},
|
|
9
|
-
fileManagerAPIURL: config.fileManagerAPIURL,
|
|
10
|
-
token: config.fileManagerToken,
|
|
11
|
-
width,
|
|
12
|
-
height,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function fileChanged(path) {
|
|
16
|
-
const config = getConfig();
|
|
17
|
-
return config.fileManagerAssets.concat(path);
|
|
18
|
-
}
|
|
19
|
-
function getConfig() {
|
|
20
|
-
const { cdn, filemanager } = window.CmsConfig;
|
|
21
|
-
const { token, url } = filemanager;
|
|
22
|
-
const urlPrefix = cdn !== undefined ? cdn : "/assets";
|
|
23
|
-
return {
|
|
24
|
-
fileManagerToken: token,
|
|
25
|
-
fileManagerURL: `${url}/static/js/file-manager.js`,
|
|
26
|
-
fileManagerAPIURL: `${url}`,
|
|
27
|
-
fileManagerAssets: urlPrefix,
|
|
28
|
-
};
|
|
29
|
-
}
|