ublo-lib 1.41.1 → 1.42.0
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/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/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,64 +0,0 @@
|
|
|
1
|
-
.form {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 340px;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 8px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.imageContainer {
|
|
10
|
-
position: relative;
|
|
11
|
-
z-index: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.image {
|
|
15
|
-
flex: 0 0 80px;
|
|
16
|
-
width: 80px;
|
|
17
|
-
height: 60px;
|
|
18
|
-
border: 1px solid var(--ds-grey-200, #ededed);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.image:has(img) {
|
|
22
|
-
padding: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.image > img {
|
|
26
|
-
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
object-fit: cover;
|
|
29
|
-
border-radius: inherit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.removeImage {
|
|
33
|
-
position: absolute;
|
|
34
|
-
top: 4px;
|
|
35
|
-
right: 4px;
|
|
36
|
-
opacity: 0;
|
|
37
|
-
transition: opacity 160ms
|
|
38
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.imageContainer:hover .removeImage {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.row {
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: flex-end;
|
|
48
|
-
gap: 8px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.title {
|
|
52
|
-
flex: 1 1 100%;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.description textarea {
|
|
56
|
-
height: 80px;
|
|
57
|
-
resize: none !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.buttons {
|
|
61
|
-
display: flex;
|
|
62
|
-
justify-content: flex-end;
|
|
63
|
-
margin-top: 6px;
|
|
64
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editable-map.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/editable-map.js"],"names":[],"mappings":"AA8BA;;;;4CAuRC"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as L from "leaflet";
|
|
4
|
-
import { AttributionControl, MapContainer, TileLayer } from "react-leaflet";
|
|
5
|
-
import { useUbloContext } from "ublo/with-ublo";
|
|
6
|
-
import Button from "dt-design-system/es/button";
|
|
7
|
-
import * as Icons from "dt-design-system/es/icons";
|
|
8
|
-
import classNames from "classnames";
|
|
9
|
-
import Geoman from "./geoman";
|
|
10
|
-
import ColorPicker from "./color-picker";
|
|
11
|
-
import MapEvents from "./map-events";
|
|
12
|
-
import Markers from "./markers";
|
|
13
|
-
import Cluster from "./cluster";
|
|
14
|
-
import InitialMarkerForm from "./initial-marker-form";
|
|
15
|
-
import MarkerList from "./marker-list";
|
|
16
|
-
import FullScreenButton from "./full-screen-button";
|
|
17
|
-
import SlopesToggle from "./slopes-toggle";
|
|
18
|
-
import css from "./editable-map.module.css";
|
|
19
|
-
import "leaflet/dist/leaflet.css";
|
|
20
|
-
const FRANCE_CENTER = [46.807934, 3.645097];
|
|
21
|
-
const DEFAULT_ZOOM = 6;
|
|
22
|
-
const DEFAULT_MARKER_DATA = {
|
|
23
|
-
icon: "Location",
|
|
24
|
-
title: "Nouveau point d'intérêt",
|
|
25
|
-
description: "",
|
|
26
|
-
url: "",
|
|
27
|
-
label: "",
|
|
28
|
-
tooltipOpened: false,
|
|
29
|
-
};
|
|
30
|
-
export default function EditableMap({ format, iconSet, hideSlopes }) {
|
|
31
|
-
const ref = React.useRef();
|
|
32
|
-
const containerRef = React.useRef();
|
|
33
|
-
const { cmsMode } = useUbloContext();
|
|
34
|
-
const [fullScreen, setFullScreen] = React.useState(false);
|
|
35
|
-
const [markerListOpened, setMarkerListOpened] = React.useState(true);
|
|
36
|
-
const { element, presets, isInDialog } = format;
|
|
37
|
-
const isInZone = element.closest(".cms");
|
|
38
|
-
const isEditing = isInZone && cmsMode === "editing";
|
|
39
|
-
const defaultCenter = presets?.center || FRANCE_CENTER;
|
|
40
|
-
const defaultZoom = presets?.zoom || DEFAULT_ZOOM;
|
|
41
|
-
const [center, setCenter] = React.useState(defaultCenter);
|
|
42
|
-
const [zoom, setZoom] = React.useState(defaultZoom);
|
|
43
|
-
const [markers, setMarkers] = React.useState(presets?.markers || []);
|
|
44
|
-
const [showSlopes, setShowSlopes] = React.useState(presets?.showSlopes || false);
|
|
45
|
-
const [shapes, setShapes] = React.useState(presets?.shapes || []);
|
|
46
|
-
const [mapIsReady, setMapIsReady] = React.useState(false);
|
|
47
|
-
const [color, setColor] = React.useState("#4c3228");
|
|
48
|
-
const [isMarkerListSorted, setIsMarkerListSorted] = React.useState(presets?.isMarkerListSorted || false);
|
|
49
|
-
const scrollWheelZoom = Boolean(cmsMode) || isInDialog || fullScreen;
|
|
50
|
-
const refreshSize = () => {
|
|
51
|
-
ref.current.invalidateSize();
|
|
52
|
-
};
|
|
53
|
-
const resetCenter = () => {
|
|
54
|
-
setCenter(defaultCenter);
|
|
55
|
-
setZoom(defaultZoom);
|
|
56
|
-
ref.current.setView(defaultCenter, defaultZoom, { animate: true });
|
|
57
|
-
};
|
|
58
|
-
const addInitialMarker = (position) => {
|
|
59
|
-
const isFocused = Boolean(element.querySelector("cms-section-ui"));
|
|
60
|
-
if (!isEditing || !isFocused)
|
|
61
|
-
return;
|
|
62
|
-
setMarkers([{ id: 1, ...DEFAULT_MARKER_DATA, position }]);
|
|
63
|
-
ref.current.setView(position, 13);
|
|
64
|
-
};
|
|
65
|
-
const handleEdit = (e) => {
|
|
66
|
-
if (e.layer.options?.id || e.layer.options?.shape === "Text")
|
|
67
|
-
return;
|
|
68
|
-
const customId = e.layer._customId;
|
|
69
|
-
const shapeType = e.shape;
|
|
70
|
-
const position = e.layer.getLatLngs
|
|
71
|
-
? e.layer.getLatLngs()
|
|
72
|
-
: e.layer.getLatLng();
|
|
73
|
-
let updatedShape = {
|
|
74
|
-
latlngs: position,
|
|
75
|
-
};
|
|
76
|
-
if (shapeType === "Circle") {
|
|
77
|
-
updatedShape = {
|
|
78
|
-
...updatedShape,
|
|
79
|
-
radius: e.layer.getRadius(),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
setShapes((prevShapes) => prevShapes.map((shape) => shape.id === customId ? { ...shape, ...updatedShape } : shape));
|
|
83
|
-
};
|
|
84
|
-
const handleDrag = (e) => {
|
|
85
|
-
const customId = e.layer.options?.id || e.layer._customId;
|
|
86
|
-
const position = e.layer.getLatLngs
|
|
87
|
-
? e.layer.getLatLngs()
|
|
88
|
-
: e.layer.getLatLng();
|
|
89
|
-
if (e.layer instanceof L.Marker && e.layer.options?.shape !== "Text") {
|
|
90
|
-
setMarkers((prevMarkers) => prevMarkers.map((marker) => marker.id === customId ? { ...marker, position } : marker));
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
setShapes((prevShapes) => prevShapes.map((shape) => {
|
|
94
|
-
return shape.id === customId
|
|
95
|
-
? { ...shape, latlngs: position }
|
|
96
|
-
: shape;
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const drawShapeOnMap = React.useCallback((shape) => {
|
|
101
|
-
let layer;
|
|
102
|
-
const { id, shape: shapeType, latlngs, radius, content, color } = shape;
|
|
103
|
-
const options = {
|
|
104
|
-
color,
|
|
105
|
-
fillOpacity: 0.1,
|
|
106
|
-
};
|
|
107
|
-
switch (shapeType) {
|
|
108
|
-
case "Line":
|
|
109
|
-
layer = L.polyline(latlngs, options).addTo(ref.current);
|
|
110
|
-
break;
|
|
111
|
-
case "Rectangle":
|
|
112
|
-
layer = L.rectangle(latlngs, options).addTo(ref.current);
|
|
113
|
-
break;
|
|
114
|
-
case "Polygon":
|
|
115
|
-
layer = L.polygon(latlngs, options).addTo(ref.current);
|
|
116
|
-
break;
|
|
117
|
-
case "Circle":
|
|
118
|
-
layer = L.circle(latlngs, {
|
|
119
|
-
...options,
|
|
120
|
-
radius,
|
|
121
|
-
}).addTo(ref.current);
|
|
122
|
-
break;
|
|
123
|
-
case "Text":
|
|
124
|
-
layer = L.marker(latlngs, {
|
|
125
|
-
icon: L.divIcon({
|
|
126
|
-
className: "custom-text-icon",
|
|
127
|
-
html: `<div class="em-custom-text">${content}</div>`,
|
|
128
|
-
}),
|
|
129
|
-
type: "Text",
|
|
130
|
-
shape: "Text",
|
|
131
|
-
}).addTo(ref.current);
|
|
132
|
-
break;
|
|
133
|
-
default:
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
layer._customId = id;
|
|
137
|
-
layer.on("pm:edit", handleEdit);
|
|
138
|
-
layer.on("pm:dragend", handleDrag);
|
|
139
|
-
return layer;
|
|
140
|
-
}, []);
|
|
141
|
-
React.useEffect(() => {
|
|
142
|
-
if (presets?.shapes?.length && mapIsReady) {
|
|
143
|
-
presets?.shapes.forEach((shape) => {
|
|
144
|
-
drawShapeOnMap(shape);
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}, [drawShapeOnMap, mapIsReady, presets?.shapes]);
|
|
148
|
-
React.useEffect(() => {
|
|
149
|
-
if (isInDialog) {
|
|
150
|
-
window.refreshDialogMapSize = refreshSize;
|
|
151
|
-
}
|
|
152
|
-
}, [isInDialog]);
|
|
153
|
-
React.useEffect(() => {
|
|
154
|
-
if (isEditing) {
|
|
155
|
-
const newPresets = {
|
|
156
|
-
markers,
|
|
157
|
-
isMarkerListSorted,
|
|
158
|
-
shapes,
|
|
159
|
-
zoom,
|
|
160
|
-
center,
|
|
161
|
-
showSlopes,
|
|
162
|
-
};
|
|
163
|
-
element.setAttribute("data-presets", JSON.stringify(newPresets));
|
|
164
|
-
}
|
|
165
|
-
}, [
|
|
166
|
-
center,
|
|
167
|
-
element,
|
|
168
|
-
isEditing,
|
|
169
|
-
markers,
|
|
170
|
-
isMarkerListSorted,
|
|
171
|
-
shapes,
|
|
172
|
-
showSlopes,
|
|
173
|
-
zoom,
|
|
174
|
-
]);
|
|
175
|
-
const attribution = showSlopes
|
|
176
|
-
? '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> & <a href="https://www.opensnowmap.org/">OpenSnowMap</a> contributors'
|
|
177
|
-
: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
|
178
|
-
const showInputMarker = isEditing && !markers.length;
|
|
179
|
-
const showMarkerList = markers.length > 2;
|
|
180
|
-
const resetCenterClasses = classNames(css.resetCenter, {
|
|
181
|
-
[css.alignedToRight]: !showMarkerList || !markerListOpened,
|
|
182
|
-
});
|
|
183
|
-
return (_jsxs("div", { ref: containerRef, className: css.container, "data-cms-remove": "", children: [_jsxs(MapContainer, { ref: ref, center: center, zoom: zoom, scrollWheelZoom: scrollWheelZoom, className: css.map, attributionControl: false, whenReady: () => setMapIsReady(true), children: [_jsx(TileLayer, { attribution: attribution, url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" }), isEditing && (_jsxs(_Fragment, { children: [_jsx(Geoman, { handleDrag: handleDrag, setMarkers: setMarkers, iconSet: iconSet, setShapes: setShapes, color: color }), _jsx(ColorPicker, { showMarkerList: showMarkerList, color: color, setColor: setColor })] })), showSlopes && (_jsx(TileLayer, { url: "https://tiles.opensnowmap.org/pistes/{z}/{x}/{y}.png" })), _jsx(MapEvents, { setZoom: setZoom, setCenter: setCenter }), _jsx(Cluster, { isEditing: isEditing, children: _jsx(Markers, { markers: markers, setMarkers: setMarkers, iconSet: iconSet, isEditing: isEditing }) }), _jsx(AttributionControl, { position: "bottomright", prefix: "" })] }), showInputMarker && _jsx(InitialMarkerForm, { callback: addInitialMarker }), !isEditing && (_jsx(FullScreenButton, { fullScreen: fullScreen, setFullScreen: setFullScreen, containerRef: containerRef, isListOpened: showMarkerList && markerListOpened })), !isEditing && (_jsx(Button, { type: "button", variant: "secondary", className: resetCenterClasses, onClick: resetCenter, children: _jsx(Icons.MyLocation, {}) })), !hideSlopes && (_jsx(SlopesToggle, { showSlopes: showSlopes, setShowSlopes: setShowSlopes })), showMarkerList && (_jsx(MarkerList, { cmsMode: cmsMode, mapRef: ref, markers: markers, setMarkers: setMarkers, iconSet: iconSet, isInDialog: !fullScreen && isInDialog, opened: markerListOpened, setOpened: setMarkerListOpened, isSorted: isMarkerListSorted, setIsSorted: setIsMarkerListSorted }))] }));
|
|
184
|
-
}
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
.container,
|
|
2
|
-
.map {
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
font-family: inherit !important;
|
|
6
|
-
border-radius: var(--ds-radius-100, 6px);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.container {
|
|
10
|
-
position: relative;
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
button.resetCenter {
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: 46px;
|
|
17
|
-
right: 270px;
|
|
18
|
-
background-color: var(--ds-grey-000, #fff);
|
|
19
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
20
|
-
user-select: none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
button.alignedToRight {
|
|
24
|
-
right: 10px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
button.resetCenter:hover {
|
|
28
|
-
background-color: var(--ds-grey-100, #f8f8f8);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
button.marker {
|
|
32
|
-
position: relative;
|
|
33
|
-
z-index: 1000;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.map {
|
|
37
|
-
flex: 1 1 100%;
|
|
38
|
-
z-index: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.map :global(.leaflet-top),
|
|
42
|
-
.map :global(.leaflet-bottom) {
|
|
43
|
-
position: static;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.map :global(.leaflet-control-attribution) {
|
|
47
|
-
position: absolute;
|
|
48
|
-
left: 50%;
|
|
49
|
-
bottom: 4px;
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
border-radius: var(--ds-radius-100, 6px);
|
|
52
|
-
transform: translateX(-50%);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.map :global(.leaflet-pm-toolbar) {
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: column;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
:global(:is(.cms--connected, .cms--info)) .container:empty::after {
|
|
61
|
-
content: "Activez le mode édition pour modifier la carte, déconnectez-vous pour la consulter.";
|
|
62
|
-
position: absolute;
|
|
63
|
-
top: 50%;
|
|
64
|
-
left: 50%;
|
|
65
|
-
width: 400px;
|
|
66
|
-
max-width: 100%;
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
color: hsl(var(--grey-600));
|
|
72
|
-
font-size: 17px;
|
|
73
|
-
letter-spacing: 1px;
|
|
74
|
-
text-align: center;
|
|
75
|
-
transform: translate(-50%, -50%);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.map :global(.leaflet-popup-tip-container),
|
|
79
|
-
.map :global(.leaflet-tooltip::before) {
|
|
80
|
-
content: none;
|
|
81
|
-
display: none;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.map :global(.leaflet-popup-content-wrapper) {
|
|
85
|
-
position: relative;
|
|
86
|
-
background-color: var(--ds-grey-000, #fff);
|
|
87
|
-
border: 1px solid var(--ds-grey-200, #ededed);
|
|
88
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
:global(.cms--editing) .map :global(.leaflet-popup-content) {
|
|
92
|
-
width: auto !important;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.map:global(.leaflet-container) :global(a.leaflet-popup-close-button) {
|
|
96
|
-
top: 5px;
|
|
97
|
-
right: 5px;
|
|
98
|
-
color: var(--ds-grey-700, #232324);
|
|
99
|
-
font-size: 22px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.map :global(.leaflet-tile-pane > :first-child) {
|
|
103
|
-
filter: var(
|
|
104
|
-
--editable-map-filter,
|
|
105
|
-
saturate(0.05) hue-rotate(100deg) contrast(1.2)
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.map :global(.marker-cluster) {
|
|
110
|
-
color: var(--ds-grey-000, #fff);
|
|
111
|
-
background-color: transparent;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.map :global(.marker-cluster::before) {
|
|
115
|
-
content: "";
|
|
116
|
-
position: absolute;
|
|
117
|
-
top: 1px;
|
|
118
|
-
left: 1px;
|
|
119
|
-
width: calc(100% - 2px);
|
|
120
|
-
height: calc(100% - 2px);
|
|
121
|
-
background-color: var(--ds-grey-000, #fff);
|
|
122
|
-
border-radius: 50%;
|
|
123
|
-
opacity: 0.85;
|
|
124
|
-
pointer-events: none;
|
|
125
|
-
filter: drop-shadow(var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12)));
|
|
126
|
-
transition: transform 160ms
|
|
127
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.map :global(.marker-cluster:hover::before) {
|
|
131
|
-
transform: scale(1.08);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.map :global(.marker-cluster > div) {
|
|
135
|
-
position: relative;
|
|
136
|
-
font-weight: 700;
|
|
137
|
-
font-size: 16px;
|
|
138
|
-
background-color: var(--ds-secondary, var(--ds-blue-400, #4177f6));
|
|
139
|
-
transition: transform 160ms
|
|
140
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.map :global(.marker-cluster:hover > div) {
|
|
144
|
-
transform: scale(1.1);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.map :global(.leaflet-tooltip) {
|
|
148
|
-
padding: 10px 16px;
|
|
149
|
-
color: var(--ds-grey-700, #262626);
|
|
150
|
-
font-size: 15px;
|
|
151
|
-
font-weight: 700;
|
|
152
|
-
font-family: inherit;
|
|
153
|
-
text-shadow: -1px 0px 1px white, 0px -1px 1px white, 1px 0px 1px white,
|
|
154
|
-
0px 1px 1px white;
|
|
155
|
-
background-color: transparent;
|
|
156
|
-
box-shadow: none;
|
|
157
|
-
border: 0;
|
|
158
|
-
animation: leaflet-tooltip-appearance 320ms
|
|
159
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@keyframes leaflet-tooltip-appearance {
|
|
163
|
-
0% {
|
|
164
|
-
opacity: 0;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
@media (max-width: 992px) {
|
|
169
|
-
.map :global(.leaflet-tooltip) {
|
|
170
|
-
display: none !important;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.map:global(.leaflet-touch .leaflet-control-layers),
|
|
175
|
-
.map:global(.leaflet-touch .leaflet-bar) {
|
|
176
|
-
border: 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.map:global(.leaflet-touch .leaflet-control-layers a),
|
|
180
|
-
.map:global(.leaflet-touch .leaflet-bar a:not(.leaflet-pm-action)) {
|
|
181
|
-
width: 33px;
|
|
182
|
-
height: 33px;
|
|
183
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
184
|
-
transition: background-color 160ms
|
|
185
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.map:global(.leaflet-touch .leaflet-control-layers a[aria-disabled="true"]),
|
|
189
|
-
.map:global(.leaflet-touch .leaflet-bar a[aria-disabled="true"]) {
|
|
190
|
-
cursor: not-allowed;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.map:global(
|
|
194
|
-
.leaflet-touch .leaflet-control-layers a:not(.leaflet-pm-action):hover
|
|
195
|
-
),
|
|
196
|
-
.map:global(.leaflet-touch .leaflet-bar a:not(.leaflet-pm-action):hover) {
|
|
197
|
-
background-color: var(--ds-grey-100, #f8f8f8);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.map:global(.leaflet-touch .leaflet-control-zoom a:first-child),
|
|
201
|
-
.map :global(.button-container:first-child a:first-child) {
|
|
202
|
-
border-top-left-radius: var(--ds-radius-200, 10px);
|
|
203
|
-
border-top-right-radius: var(--ds-radius-200, 10px);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.map:global(.leaflet-touch .leaflet-control-layers a:last-child),
|
|
207
|
-
.map:global(.leaflet-touch .leaflet-bar a:last-child),
|
|
208
|
-
.map :global(.button-container:last-child a:first-child) {
|
|
209
|
-
border-bottom-left-radius: var(--ds-radius-200, 10px);
|
|
210
|
-
border-bottom-right-radius: var(--ds-radius-200, 10px);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.map:global(.leaflet-touch .leaflet-control-layers a span),
|
|
214
|
-
.map:global(.leaflet-touch .leaflet-bar a span) {
|
|
215
|
-
font-size: 18px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.map :global(.leaflet-popup-close-button) {
|
|
219
|
-
display: none;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.map :global(.leaflet-popup-content) {
|
|
223
|
-
margin: 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
:global(body.cms--editing) .map :global(.leaflet-popup-content) {
|
|
227
|
-
margin: 13px 24px 13px 20px;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.map :global(.leaflet-popup-content-wrapper) {
|
|
231
|
-
padding: 0;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:global(.cms--editing) .map :global(.leaflet-popup-content-wrapper) {
|
|
235
|
-
padding: 1px;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.map :global(.em-custom-text),
|
|
239
|
-
.map :global(.pm-textarea) {
|
|
240
|
-
width: max-content;
|
|
241
|
-
max-width: 200px;
|
|
242
|
-
padding: 6px;
|
|
243
|
-
color: var(--ds-grey-700, #262626);
|
|
244
|
-
font-size: 16px;
|
|
245
|
-
font-weight: 700;
|
|
246
|
-
font-family: inherit;
|
|
247
|
-
text-align: center;
|
|
248
|
-
text-shadow: -1px 0px 1px white, 0px -1px 1px white, 1px 0px 1px white,
|
|
249
|
-
0px 1px 1px white;
|
|
250
|
-
transform: translate(-50%, -50%);
|
|
251
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export default function FullScreenButton({ fullScreen, setFullScreen, containerRef, isListOpened, }: {
|
|
2
|
-
fullScreen: any;
|
|
3
|
-
setFullScreen: any;
|
|
4
|
-
containerRef: any;
|
|
5
|
-
isListOpened: any;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
//# sourceMappingURL=full-screen-button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-screen-button.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/full-screen-button.js"],"names":[],"mappings":"AAMA;;;;;4CAkDC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import Button from "dt-design-system/es/button";
|
|
5
|
-
import * as Icons from "dt-design-system/es/icons";
|
|
6
|
-
import css from "./full-screen-button.module.css";
|
|
7
|
-
export default function FullScreenButton({ fullScreen, setFullScreen, containerRef, isListOpened, }) {
|
|
8
|
-
const [fullScreenCompatible, setFullScreenCompatible] = React.useState(true);
|
|
9
|
-
const cleanupFullScreen = React.useCallback(() => {
|
|
10
|
-
if (!document.fullscreenElement) {
|
|
11
|
-
setFullScreen(false);
|
|
12
|
-
}
|
|
13
|
-
}, [setFullScreen]);
|
|
14
|
-
React.useEffect(() => {
|
|
15
|
-
setFullScreenCompatible(isFullScreenCompatible());
|
|
16
|
-
return () => {
|
|
17
|
-
document.removeEventListener("fullscreenchange", cleanupFullScreen);
|
|
18
|
-
};
|
|
19
|
-
}, [cleanupFullScreen]);
|
|
20
|
-
if (!fullScreenCompatible)
|
|
21
|
-
return null;
|
|
22
|
-
const Icon = Icons[fullScreen ? "Minimize" : "Maximize"];
|
|
23
|
-
const classes = classNames(css.button, {
|
|
24
|
-
[css.opened]: isListOpened,
|
|
25
|
-
});
|
|
26
|
-
const toggleFullScreen = (e) => {
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
e.stopPropagation();
|
|
29
|
-
if (!fullScreen) {
|
|
30
|
-
enterFullScreen(containerRef.current, setFullScreen);
|
|
31
|
-
document.addEventListener("fullscreenchange", cleanupFullScreen);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
exitFullScreen(setFullScreen);
|
|
35
|
-
document.removeEventListener("fullscreenchange", cleanupFullScreen);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return (_jsx(Button, { variant: "secondary", type: "button", className: classes, onClick: toggleFullScreen, children: _jsx(Icon, {}) }));
|
|
39
|
-
}
|
|
40
|
-
function isFullScreenCompatible() {
|
|
41
|
-
return (document.fullscreenEnabled ||
|
|
42
|
-
document.webkitFullscreenEnabled ||
|
|
43
|
-
document.mozFullscreenEnabled ||
|
|
44
|
-
document.msFullscreenEnabled);
|
|
45
|
-
}
|
|
46
|
-
function enterFullScreen(el, setFullScreen) {
|
|
47
|
-
if (el.requestFullscreen) {
|
|
48
|
-
el.requestFullscreen();
|
|
49
|
-
}
|
|
50
|
-
else if (el.mozRequestFullScreen) {
|
|
51
|
-
el.mozRequestFullScreen();
|
|
52
|
-
}
|
|
53
|
-
else if (el.webkitRequestFullscreen) {
|
|
54
|
-
el.webkitRequestFullscreen();
|
|
55
|
-
}
|
|
56
|
-
else if (el.msRequestFullscreen) {
|
|
57
|
-
el.msRequestFullscreen();
|
|
58
|
-
}
|
|
59
|
-
setFullScreen(true);
|
|
60
|
-
}
|
|
61
|
-
function exitFullScreen(setFullScreen) {
|
|
62
|
-
if (document.exitFullscreen) {
|
|
63
|
-
document.exitFullscreen();
|
|
64
|
-
}
|
|
65
|
-
else if (document.webkitExitFullscreen) {
|
|
66
|
-
document.webkitExitFullscreen();
|
|
67
|
-
}
|
|
68
|
-
else if (document.mozCancelFullScreen) {
|
|
69
|
-
document.mozCancelFullScreen();
|
|
70
|
-
}
|
|
71
|
-
else if (document.msExitFullscreen) {
|
|
72
|
-
document.msExitFullscreen();
|
|
73
|
-
}
|
|
74
|
-
setFullScreen(false);
|
|
75
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
button.button {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 10px;
|
|
4
|
-
right: 10px;
|
|
5
|
-
background-color: var(--ds-grey-000, #fff);
|
|
6
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
button.opened {
|
|
10
|
-
right: 270px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
button.button:hover {
|
|
14
|
-
background-color: var(--ds-grey-100, #f8f8f8);
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geoman.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/geoman.js"],"names":[],"mappings":";AAiBA;;;;;QAmOC"}
|