@micromag/screen-map 0.4.70 → 0.4.74
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/index.d.ts +4 -2
- package/es/index.js +265 -400
- package/package.json +19 -18
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
3
|
+
import { Marker, MarkerWithImage, TextElement, GeoPosition, BackgroundElement, MediaElement } from '@micromag/core';
|
|
3
4
|
|
|
4
5
|
interface MapScreenProps {
|
|
5
6
|
layout?: 'normal';
|
|
@@ -17,9 +18,10 @@ interface MapScreenProps {
|
|
|
17
18
|
current?: boolean;
|
|
18
19
|
active?: boolean;
|
|
19
20
|
type?: string | null;
|
|
21
|
+
mediaRef?: ForwardedRef<MediaElement> | null;
|
|
20
22
|
className?: string | null;
|
|
21
23
|
}
|
|
22
|
-
declare function MapScreen({ layout, draggable, markers, title, description, button, openedMarkerSpacerHeight, withMarkerImages, zoom, center, fitBounds, background, current, active, type, className, }: MapScreenProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function MapScreen({ layout, draggable, markers, title, description, button, openedMarkerSpacerHeight, withMarkerImages, zoom, center, fitBounds, background, current, active, type, mediaRef: customMediaRef, className, }: MapScreenProps): react_jsx_runtime.JSX.Element;
|
|
23
25
|
|
|
24
26
|
declare function MapImagesScreen({ ...props }: {
|
|
25
27
|
[x: string]: any;
|
package/es/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { useIntl, FormattedMessage, defineMessage } from 'react-intl';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
2
|
import classNames from 'classnames';
|
|
6
3
|
import { useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
7
4
|
import { PlaceholderMap, Button, ScreenElement } from '@micromag/core/components';
|
|
8
5
|
import { useGoogleKeys, useScreenSize, usePlaybackContext, usePlaybackMediaRef, useScreenRenderContext, useScreenState, useViewerInteraction } from '@micromag/core/contexts';
|
|
9
6
|
import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
|
|
10
|
-
import { getStyleFromColor, isTextFilled } from '@micromag/core/utils';
|
|
7
|
+
import { getStyleFromColor, isTextFilled, mergeRefs } from '@micromag/core/utils';
|
|
11
8
|
import { Background } from '@micromag/element-background';
|
|
12
9
|
import ButtonElement from '@micromag/element-button';
|
|
13
10
|
import Container from '@micromag/element-container';
|
|
@@ -17,158 +14,125 @@ import Map from '@micromag/element-map';
|
|
|
17
14
|
import Scroll from '@micromag/element-scroll';
|
|
18
15
|
import Text from '@micromag/element-text';
|
|
19
16
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
20
|
-
import
|
|
21
|
-
import _extends from '@babel/runtime/helpers/extends';
|
|
17
|
+
import { c } from 'react/compiler-runtime';
|
|
22
18
|
|
|
23
19
|
var styles = {"container":"micromag-screen-map-container","background":"micromag-screen-map-background","content":"micromag-screen-map-content","placeholder":"micromag-screen-map-placeholder","markerOverlayContainer":"micromag-screen-map-markerOverlayContainer","markerOverlayScrollable":"micromag-screen-map-markerOverlayScrollable","markerOverlaySafe":"micromag-screen-map-markerOverlaySafe","markerOverlay":"micromag-screen-map-markerOverlay","markerOverlayContent":"micromag-screen-map-markerOverlayContent","markerOverlayContentInner":"micromag-screen-map-markerOverlayContentInner","swipeIndicator":"micromag-screen-map-swipeIndicator","splash":"micromag-screen-map-splash","title":"micromag-screen-map-title","description":"micromag-screen-map-description","button":"micromag-screen-map-button","emptyTitle":"micromag-screen-map-emptyTitle","emptyDescription":"micromag-screen-map-emptyDescription","emptyButton":"micromag-screen-map-emptyButton","splashButton":"micromag-screen-map-splashButton","closeButton":"micromag-screen-map-closeButton","markerImage":"micromag-screen-map-markerImage","markerTitle":"micromag-screen-map-markerTitle","markerSubtitle":"micromag-screen-map-markerSubtitle","markerDescription":"micromag-screen-map-markerDescription","hasSelectedMarker":"micromag-screen-map-hasSelectedMarker","opened":"micromag-screen-map-opened"};
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
const defaultCenter = {
|
|
26
22
|
lat: 45.5,
|
|
27
23
|
lng: -73.56
|
|
28
24
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onTouchMove:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onTouchEnd: function onTouchEnd(e) {
|
|
38
|
-
return e.stopPropagation();
|
|
39
|
-
},
|
|
40
|
-
onPointerMove: function onPointerMove(e) {
|
|
41
|
-
return e.stopPropagation();
|
|
42
|
-
},
|
|
43
|
-
onPointerUp: function onPointerUp(e) {
|
|
44
|
-
return e.stopPropagation();
|
|
45
|
-
},
|
|
46
|
-
onPointerDown: function onPointerDown(e) {
|
|
47
|
-
return e.stopPropagation();
|
|
48
|
-
}
|
|
25
|
+
const defaultZoom = 10;
|
|
26
|
+
const stopDragEventsPropagation = {
|
|
27
|
+
onTouchMove: e => e.stopPropagation(),
|
|
28
|
+
onTouchStart: e => e.stopPropagation(),
|
|
29
|
+
onTouchEnd: e => e.stopPropagation(),
|
|
30
|
+
onPointerMove: e => e.stopPropagation(),
|
|
31
|
+
onPointerUp: e => e.stopPropagation(),
|
|
32
|
+
onPointerDown: e => e.stopPropagation()
|
|
49
33
|
};
|
|
50
|
-
|
|
51
|
-
function MapScreen(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
isPreview = _useScreenRenderConte.isPreview,
|
|
112
|
-
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
113
|
-
isEdit = _useScreenRenderConte.isEdit,
|
|
114
|
-
isStatic = _useScreenRenderConte.isStatic,
|
|
115
|
-
isCapture = _useScreenRenderConte.isCapture;
|
|
116
|
-
var screenState = useScreenState();
|
|
117
|
-
var _useState3 = useState(false),
|
|
118
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
119
|
-
ready = _useState4[0],
|
|
120
|
-
setReady = _useState4[1];
|
|
121
|
-
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
122
|
-
var scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
123
|
-
var backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
34
|
+
const emptyArray = [];
|
|
35
|
+
function MapScreen({
|
|
36
|
+
layout = 'normal',
|
|
37
|
+
draggable = true,
|
|
38
|
+
markers = emptyArray,
|
|
39
|
+
title = null,
|
|
40
|
+
description = null,
|
|
41
|
+
button = null,
|
|
42
|
+
openedMarkerSpacerHeight = 0.75,
|
|
43
|
+
withMarkerImages = false,
|
|
44
|
+
zoom = defaultZoom,
|
|
45
|
+
center = defaultCenter,
|
|
46
|
+
fitBounds = true,
|
|
47
|
+
background = null,
|
|
48
|
+
current = true,
|
|
49
|
+
active = true,
|
|
50
|
+
// enableInteractions,
|
|
51
|
+
// disableInteraction,
|
|
52
|
+
type = null,
|
|
53
|
+
mediaRef: customMediaRef = null,
|
|
54
|
+
className = null
|
|
55
|
+
}) {
|
|
56
|
+
const {
|
|
57
|
+
locale
|
|
58
|
+
} = useIntl();
|
|
59
|
+
const {
|
|
60
|
+
apiKey = null
|
|
61
|
+
} = useGoogleKeys();
|
|
62
|
+
const trackScreenEvent = useTrackScreenEvent(type);
|
|
63
|
+
const [selectedMarkerIndex, setSelectedMarkerIndex] = useState(null);
|
|
64
|
+
const hasSelectedMarker = selectedMarkerIndex !== null;
|
|
65
|
+
const lastRenderedMarker = useRef(null);
|
|
66
|
+
const {
|
|
67
|
+
width,
|
|
68
|
+
height,
|
|
69
|
+
resolution
|
|
70
|
+
} = useScreenSize();
|
|
71
|
+
const {
|
|
72
|
+
muted
|
|
73
|
+
} = usePlaybackContext();
|
|
74
|
+
const {
|
|
75
|
+
ref: mediaRef,
|
|
76
|
+
isCurrent: isCurrentMedia = false
|
|
77
|
+
} = usePlaybackMediaRef(current, true);
|
|
78
|
+
const {
|
|
79
|
+
color: backgroundColor
|
|
80
|
+
} = background || {};
|
|
81
|
+
const markerOverlayContentStyle = getStyleFromColor(backgroundColor);
|
|
82
|
+
const {
|
|
83
|
+
isView,
|
|
84
|
+
isPreview,
|
|
85
|
+
isPlaceholder,
|
|
86
|
+
isEdit,
|
|
87
|
+
isStatic,
|
|
88
|
+
isCapture
|
|
89
|
+
} = useScreenRenderContext();
|
|
90
|
+
const screenState = useScreenState();
|
|
91
|
+
const [ready, setReady] = useState(false);
|
|
92
|
+
const transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
93
|
+
const scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
94
|
+
const backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
124
95
|
// const backgroundShouldLoad = current || active;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}, [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return _objectSpread(_objectSpread({}, marker), {}, {
|
|
139
|
-
active: markerI === selectedMarkerIndex
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
}, [markers, selectedMarkerIndex]);
|
|
143
|
-
var closeMarker = useCallback(function () {
|
|
144
|
-
var lastMarker = finalMarkers[selectedMarkerIndex];
|
|
96
|
+
const backgroundShouldLoad = current || active;
|
|
97
|
+
const [opened, setOpened] = useState(isStatic || isCapture);
|
|
98
|
+
const {
|
|
99
|
+
enableInteraction,
|
|
100
|
+
disableInteraction
|
|
101
|
+
} = useViewerInteraction();
|
|
102
|
+
const onMapReady = useCallback(() => setReady(true), [setReady]);
|
|
103
|
+
const finalMarkers = useMemo(() => (markers || []).map((marker, markerI) => ({
|
|
104
|
+
...marker,
|
|
105
|
+
active: markerI === selectedMarkerIndex
|
|
106
|
+
})), [markers, selectedMarkerIndex]);
|
|
107
|
+
const closeMarker = useCallback(() => {
|
|
108
|
+
const lastMarker = finalMarkers[selectedMarkerIndex];
|
|
145
109
|
lastRenderedMarker.current = lastMarker;
|
|
146
110
|
setSelectedMarkerIndex(null);
|
|
147
111
|
}, [finalMarkers, selectedMarkerIndex, setSelectedMarkerIndex]);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
trackScreenEvent('click_marker_close',
|
|
151
|
-
marker:
|
|
112
|
+
const onClickMap = useCallback(() => {
|
|
113
|
+
const lastMarker_0 = finalMarkers[selectedMarkerIndex];
|
|
114
|
+
trackScreenEvent('click_marker_close', `Marker ${selectedMarkerIndex + 1}: ${lastMarker_0.title.body}`, {
|
|
115
|
+
marker: lastMarker_0,
|
|
152
116
|
markerIndex: selectedMarkerIndex
|
|
153
117
|
});
|
|
154
118
|
closeMarker();
|
|
155
119
|
}, [finalMarkers, selectedMarkerIndex, trackScreenEvent, closeMarker]);
|
|
156
|
-
|
|
157
|
-
|
|
120
|
+
const onClickMarker = useCallback((e, index) => {
|
|
121
|
+
const marker_0 = finalMarkers[index];
|
|
158
122
|
setSelectedMarkerIndex(index);
|
|
159
|
-
trackScreenEvent('click_marker_open',
|
|
160
|
-
marker:
|
|
123
|
+
trackScreenEvent('click_marker_open', `Marker ${index + 1}: ${marker_0.title.body}`, {
|
|
124
|
+
marker: marker_0,
|
|
161
125
|
markerIndex: index
|
|
162
126
|
});
|
|
163
127
|
}, [finalMarkers, setSelectedMarkerIndex, trackScreenEvent]);
|
|
164
|
-
|
|
128
|
+
const onButtonClick = useCallback(() => {
|
|
165
129
|
setOpened(true);
|
|
166
130
|
if (disableInteraction !== null) {
|
|
167
131
|
disableInteraction();
|
|
168
132
|
}
|
|
169
133
|
trackScreenEvent('click_button', button.body);
|
|
170
134
|
}, [setOpened, disableInteraction, trackScreenEvent, button]);
|
|
171
|
-
|
|
135
|
+
const onCloseClick = useCallback(() => {
|
|
172
136
|
setOpened(false);
|
|
173
137
|
if (enableInteraction !== null) {
|
|
174
138
|
enableInteraction();
|
|
@@ -176,79 +140,68 @@ function MapScreen(_ref) {
|
|
|
176
140
|
trackScreenEvent('click_close', 'Close icon');
|
|
177
141
|
closeMarker();
|
|
178
142
|
}, [setOpened, enableInteraction, trackScreenEvent]);
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
trackScreenEvent('drag_map',
|
|
182
|
-
coords
|
|
143
|
+
const onMapDragEnd = useCallback(newCenter => {
|
|
144
|
+
const coords = newCenter.toJSON();
|
|
145
|
+
trackScreenEvent('drag_map', `Latitude: ${coords.lat.toFixed(4)}, Longitude: ${coords.lng.toFixed(4)}`, {
|
|
146
|
+
coords
|
|
183
147
|
});
|
|
184
148
|
}, [trackScreenEvent]);
|
|
185
|
-
|
|
186
|
-
|
|
149
|
+
const onScrolledBottom = useCallback(({
|
|
150
|
+
initial
|
|
151
|
+
}) => {
|
|
187
152
|
if (initial) {
|
|
188
|
-
|
|
189
|
-
trackScreenEvent('scroll',
|
|
153
|
+
const selectedMarker = (markers || [])[selectedMarkerIndex];
|
|
154
|
+
trackScreenEvent('scroll', `Marker ${selectedMarkerIndex + 1}: ${selectedMarker.title.body}`, {
|
|
190
155
|
marker: selectedMarker,
|
|
191
156
|
markerIndex: selectedMarkerIndex
|
|
192
157
|
});
|
|
193
158
|
}
|
|
194
159
|
}, [trackScreenEvent, markers, selectedMarkerIndex]);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
var allMarkersImagesLoaded = markerImagesLoaded === (markers || []).length;
|
|
206
|
-
var finalReady = ready && (!withMarkerImages || allMarkersImagesLoaded);
|
|
207
|
-
useEffect(function () {
|
|
160
|
+
const {
|
|
161
|
+
ref: markerOverContentInnerRef,
|
|
162
|
+
width: markerOverContentInnerWidth = '100%'
|
|
163
|
+
} = useDimensionObserver({
|
|
164
|
+
disabled: !isView
|
|
165
|
+
});
|
|
166
|
+
const [markerImagesLoaded, setMarkerImagesLoaded] = useState(0);
|
|
167
|
+
const allMarkersImagesLoaded = markerImagesLoaded === (markers || []).length;
|
|
168
|
+
const finalReady = ready && (!withMarkerImages || allMarkersImagesLoaded);
|
|
169
|
+
useEffect(() => {
|
|
208
170
|
if (withMarkerImages && markers !== null && (markers || []).length) {
|
|
209
171
|
setMarkerImagesLoaded(0);
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
172
|
+
const imgs = markers.map(marker_1 => {
|
|
173
|
+
const {
|
|
174
|
+
image = null
|
|
175
|
+
} = marker_1 || {};
|
|
176
|
+
const {
|
|
177
|
+
url = null
|
|
178
|
+
} = image || {};
|
|
179
|
+
const withUrl = url !== null;
|
|
218
180
|
if (withUrl) {
|
|
219
|
-
|
|
181
|
+
const img = new Image();
|
|
220
182
|
img.src = url;
|
|
221
|
-
img.onload =
|
|
222
|
-
setMarkerImagesLoaded(
|
|
223
|
-
return setMarkerImagesLoaded(index + 1);
|
|
224
|
-
});
|
|
183
|
+
img.onload = () => {
|
|
184
|
+
setMarkerImagesLoaded(index_0 => setMarkerImagesLoaded(index_0 + 1));
|
|
225
185
|
};
|
|
226
186
|
return img;
|
|
227
187
|
}
|
|
228
188
|
return null;
|
|
229
189
|
});
|
|
230
|
-
return
|
|
231
|
-
imgs.filter(
|
|
232
|
-
|
|
233
|
-
}).forEach(function (img) {
|
|
234
|
-
img.onload = function () {};
|
|
190
|
+
return () => {
|
|
191
|
+
imgs.filter(img_0 => img_0 !== null).forEach(img_1 => {
|
|
192
|
+
img_1.onload = () => {};
|
|
235
193
|
});
|
|
236
194
|
};
|
|
237
195
|
}
|
|
238
|
-
return
|
|
196
|
+
return () => {};
|
|
239
197
|
}, [withMarkerImages, markers]);
|
|
240
198
|
|
|
241
199
|
// Switch state
|
|
242
|
-
useEffect(
|
|
200
|
+
useEffect(() => {
|
|
243
201
|
if (!isEdit && !isPreview) {
|
|
244
202
|
return;
|
|
245
203
|
}
|
|
246
|
-
|
|
247
|
-
_ref7 = _slicedToArray(_ref6, 2),
|
|
248
|
-
_ref7$ = _ref7[0],
|
|
249
|
-
stateId = _ref7$ === void 0 ? null : _ref7$,
|
|
250
|
-
_ref7$2 = _ref7[1],
|
|
251
|
-
markerIndex = _ref7$2 === void 0 ? null : _ref7$2;
|
|
204
|
+
const [stateId = null, markerIndex = null] = screenState !== null ? screenState.split('.') : [];
|
|
252
205
|
if (stateId === 'intro') {
|
|
253
206
|
setOpened(false);
|
|
254
207
|
setSelectedMarkerIndex(null);
|
|
@@ -260,72 +213,67 @@ function MapScreen(_ref) {
|
|
|
260
213
|
setSelectedMarkerIndex(parseInt(markerIndex, 10));
|
|
261
214
|
}
|
|
262
215
|
}, [screenState, isEdit, setOpened]);
|
|
263
|
-
|
|
216
|
+
let staticUrl;
|
|
264
217
|
if (width > 0 && height > 0 && apiKey !== null) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
})
|
|
268
|
-
|
|
269
|
-
geoPosition = _ref8$geoPosition === void 0 ? null : _ref8$geoPosition;
|
|
270
|
-
return geoPosition !== null;
|
|
271
|
-
}) : null;
|
|
272
|
-
staticUrl = "https://maps.googleapis.com/maps/api/staticmap?size=".concat(Math.round(width), "x").concat(Math.round(height));
|
|
218
|
+
const correctMarkers = markers !== null ? markers.filter(it => it !== null).filter(({
|
|
219
|
+
geoPosition = null
|
|
220
|
+
}) => geoPosition !== null) : null;
|
|
221
|
+
staticUrl = `https://maps.googleapis.com/maps/api/staticmap?size=${Math.round(width)}x${Math.round(height)}`;
|
|
273
222
|
if (center !== null && (correctMarkers === null || correctMarkers.length === 0)) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
staticUrl += "¢er=".concat(lat, ",").concat(lng);
|
|
223
|
+
const {
|
|
224
|
+
lat = null,
|
|
225
|
+
lng = null
|
|
226
|
+
} = center || {};
|
|
227
|
+
staticUrl += `¢er=${lat},${lng}`;
|
|
280
228
|
}
|
|
281
229
|
if (zoom !== null) {
|
|
282
|
-
staticUrl +=
|
|
230
|
+
staticUrl += `&zoom=${zoom}`;
|
|
283
231
|
}
|
|
284
232
|
if (apiKey !== null) {
|
|
285
|
-
staticUrl +=
|
|
233
|
+
staticUrl += `&key=${apiKey}`;
|
|
286
234
|
}
|
|
287
235
|
if (locale !== null) {
|
|
288
|
-
staticUrl +=
|
|
236
|
+
staticUrl += `&language=${locale}`;
|
|
289
237
|
}
|
|
290
238
|
if (correctMarkers !== null) {
|
|
291
|
-
staticUrl += correctMarkers.map(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return lat !== null && lng !== null ? "&markers=".concat(url !== null ? "icon:".concat(url) : '', "%7C").concat(lat, ",").concat(lng) : '';
|
|
239
|
+
staticUrl += correctMarkers.map(marker_2 => {
|
|
240
|
+
const {
|
|
241
|
+
geoPosition: geoPosition_0 = null
|
|
242
|
+
} = marker_2 || {};
|
|
243
|
+
const {
|
|
244
|
+
lat: lat_0 = null,
|
|
245
|
+
lng: lng_0 = null
|
|
246
|
+
} = geoPosition_0 || {};
|
|
247
|
+
const {
|
|
248
|
+
image: image_0 = null
|
|
249
|
+
} = marker_2 || {};
|
|
250
|
+
const {
|
|
251
|
+
url: url_0 = null
|
|
252
|
+
} = image_0 || {};
|
|
253
|
+
return lat_0 !== null && lng_0 !== null ? `&markers=${url_0 !== null ? `icon:${url_0}` : ''}%7C${lat_0},${lng_0}` : '';
|
|
307
254
|
}).join('');
|
|
308
255
|
}
|
|
309
256
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
var hasTitle = isTextFilled(title);
|
|
325
|
-
var hasDescription = isTextFilled(description);
|
|
326
|
-
var hasButton = isTextFilled(button);
|
|
257
|
+
const renderedMarker = hasSelectedMarker ? finalMarkers[selectedMarkerIndex] : lastRenderedMarker.current;
|
|
258
|
+
const {
|
|
259
|
+
title: markerTitle = null,
|
|
260
|
+
subtitle: markerSubtitle = null,
|
|
261
|
+
description: markerDescription = null,
|
|
262
|
+
image: markerImage = null
|
|
263
|
+
} = renderedMarker || {};
|
|
264
|
+
const hasMarkerTitle = markerTitle !== null;
|
|
265
|
+
const hasMarkerSubtitle = markerSubtitle !== null;
|
|
266
|
+
const hasMarkerDescription = markerDescription !== null;
|
|
267
|
+
const hasMarkerImage = markerImage !== null;
|
|
268
|
+
const hasTitle = isTextFilled(title);
|
|
269
|
+
const hasDescription = isTextFilled(description);
|
|
270
|
+
const hasButton = isTextFilled(button);
|
|
327
271
|
return /*#__PURE__*/jsxs("div", {
|
|
328
|
-
className: classNames([styles.container, className,
|
|
272
|
+
className: classNames([styles.container, className, {
|
|
273
|
+
[styles[`${layout}Layout`]]: layout !== null,
|
|
274
|
+
[styles.opened]: opened || isPreview && screenState !== 'intro',
|
|
275
|
+
[styles.hasSelectedMarker]: hasSelectedMarker
|
|
276
|
+
}]),
|
|
329
277
|
"data-screen-ready": finalReady,
|
|
330
278
|
children: [/*#__PURE__*/jsx(Container, {
|
|
331
279
|
width: width,
|
|
@@ -358,9 +306,9 @@ function MapScreen(_ref) {
|
|
|
358
306
|
onClickMarker: onClickMarker,
|
|
359
307
|
onReady: onMapReady,
|
|
360
308
|
onDragEnd: onMapDragEnd
|
|
361
|
-
}, "map"), /*#__PURE__*/jsx("div",
|
|
362
|
-
className: styles.markerOverlayContainer
|
|
363
|
-
|
|
309
|
+
}, "map"), /*#__PURE__*/jsx("div", {
|
|
310
|
+
className: styles.markerOverlayContainer,
|
|
311
|
+
...stopDragEventsPropagation,
|
|
364
312
|
children: /*#__PURE__*/jsx("div", {
|
|
365
313
|
className: styles.markerOverlayScrollable,
|
|
366
314
|
children: /*#__PURE__*/jsxs(Scroll, {
|
|
@@ -394,54 +342,50 @@ function MapScreen(_ref) {
|
|
|
394
342
|
media: markerImage,
|
|
395
343
|
width: markerOverContentInnerWidth,
|
|
396
344
|
resolution: resolution
|
|
397
|
-
}) : null, hasMarkerTitle ? /*#__PURE__*/jsx(Heading,
|
|
398
|
-
className: styles.markerTitle
|
|
399
|
-
|
|
345
|
+
}) : null, hasMarkerTitle ? /*#__PURE__*/jsx(Heading, {
|
|
346
|
+
className: styles.markerTitle,
|
|
347
|
+
...markerTitle
|
|
348
|
+
}) : null, hasMarkerSubtitle ? /*#__PURE__*/jsx(Heading, {
|
|
400
349
|
size: 3,
|
|
401
|
-
className: styles.markerSubtitle
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
350
|
+
className: styles.markerSubtitle,
|
|
351
|
+
...markerSubtitle
|
|
352
|
+
}) : null, hasMarkerDescription ? /*#__PURE__*/jsx(Text, {
|
|
353
|
+
className: styles.markerDescription,
|
|
354
|
+
...markerDescription
|
|
355
|
+
}) : null]
|
|
356
|
+
}, `markerContent-${selectedMarkerIndex}`)]
|
|
406
357
|
})
|
|
407
358
|
})]
|
|
408
359
|
})
|
|
409
360
|
})
|
|
410
|
-
}
|
|
361
|
+
}, "marker-overlay"), /*#__PURE__*/jsxs("div", {
|
|
411
362
|
className: classNames([styles.splash]),
|
|
412
363
|
children: [/*#__PURE__*/jsx(ScreenElement, {
|
|
413
364
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
414
365
|
id: "2ZOPe+",
|
|
415
|
-
defaultMessage:
|
|
416
|
-
"type": 0,
|
|
417
|
-
"value": "Title"
|
|
418
|
-
}]
|
|
366
|
+
defaultMessage: "Title"
|
|
419
367
|
}),
|
|
420
368
|
emptyClassName: styles.emptyTitle,
|
|
421
369
|
isEmpty: !hasTitle,
|
|
422
|
-
children: /*#__PURE__*/jsx(Heading,
|
|
423
|
-
className: styles.title
|
|
424
|
-
|
|
370
|
+
children: /*#__PURE__*/jsx(Heading, {
|
|
371
|
+
className: styles.title,
|
|
372
|
+
...title
|
|
373
|
+
})
|
|
425
374
|
}), /*#__PURE__*/jsx(ScreenElement, {
|
|
426
375
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
427
376
|
id: "507VAi",
|
|
428
|
-
defaultMessage:
|
|
429
|
-
"type": 0,
|
|
430
|
-
"value": "Description"
|
|
431
|
-
}]
|
|
377
|
+
defaultMessage: "Description"
|
|
432
378
|
}),
|
|
433
379
|
emptyClassName: styles.emptyDescription,
|
|
434
380
|
isEmpty: !hasDescription,
|
|
435
|
-
children: /*#__PURE__*/jsx(Text,
|
|
436
|
-
className: styles.description
|
|
437
|
-
|
|
381
|
+
children: /*#__PURE__*/jsx(Text, {
|
|
382
|
+
className: styles.description,
|
|
383
|
+
...description
|
|
384
|
+
})
|
|
438
385
|
}), /*#__PURE__*/jsx(ScreenElement, {
|
|
439
386
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
440
387
|
id: "bv3rRe",
|
|
441
|
-
defaultMessage:
|
|
442
|
-
"type": 0,
|
|
443
|
-
"value": "Button"
|
|
444
|
-
}]
|
|
388
|
+
defaultMessage: "Button"
|
|
445
389
|
}),
|
|
446
390
|
emptyClassName: styles.emptyButton,
|
|
447
391
|
isEmpty: !hasButton,
|
|
@@ -450,14 +394,12 @@ function MapScreen(_ref) {
|
|
|
450
394
|
onClick: onButtonClick,
|
|
451
395
|
buttonStyle: button !== null ? button.buttonStyle : null,
|
|
452
396
|
focusable: current && isView,
|
|
453
|
-
children: hasButton ? /*#__PURE__*/jsx(Text,
|
|
397
|
+
children: hasButton ? /*#__PURE__*/jsx(Text, {
|
|
398
|
+
...button,
|
|
454
399
|
className: styles.button
|
|
455
|
-
})
|
|
400
|
+
}) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
456
401
|
id: "sXfFFw",
|
|
457
|
-
defaultMessage:
|
|
458
|
-
"type": 0,
|
|
459
|
-
"value": "Enter"
|
|
460
|
-
}]
|
|
402
|
+
defaultMessage: "Enter"
|
|
461
403
|
})
|
|
462
404
|
})
|
|
463
405
|
})]
|
|
@@ -479,18 +421,37 @@ function MapScreen(_ref) {
|
|
|
479
421
|
playing: backgroundPlaying,
|
|
480
422
|
muted: muted,
|
|
481
423
|
shouldLoad: backgroundShouldLoad,
|
|
482
|
-
mediaRef: mediaRef,
|
|
424
|
+
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
483
425
|
withoutVideo: isPreview,
|
|
484
426
|
className: styles.background
|
|
485
427
|
}) : null]
|
|
486
428
|
});
|
|
487
429
|
}
|
|
488
430
|
|
|
489
|
-
function MapImagesScreen(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
431
|
+
function MapImagesScreen(t0) {
|
|
432
|
+
const $ = c(4);
|
|
433
|
+
let props;
|
|
434
|
+
if ($[0] !== t0) {
|
|
435
|
+
({
|
|
436
|
+
...props
|
|
437
|
+
} = t0);
|
|
438
|
+
$[0] = t0;
|
|
439
|
+
$[1] = props;
|
|
440
|
+
} else {
|
|
441
|
+
props = $[1];
|
|
442
|
+
}
|
|
443
|
+
let t1;
|
|
444
|
+
if ($[2] !== props) {
|
|
445
|
+
t1 = /*#__PURE__*/jsx(MapScreen, {
|
|
446
|
+
...props,
|
|
447
|
+
withMarkerImages: true
|
|
448
|
+
});
|
|
449
|
+
$[2] = props;
|
|
450
|
+
$[3] = t1;
|
|
451
|
+
} else {
|
|
452
|
+
t1 = $[3];
|
|
453
|
+
}
|
|
454
|
+
return t1;
|
|
494
455
|
}
|
|
495
456
|
|
|
496
457
|
// import * as transforms from './transforms/index';
|
|
@@ -501,19 +462,13 @@ var definition = [{
|
|
|
501
462
|
group: {
|
|
502
463
|
label: defineMessage({
|
|
503
464
|
id: "Z27IP6",
|
|
504
|
-
defaultMessage:
|
|
505
|
-
"type": 0,
|
|
506
|
-
"value": "Map"
|
|
507
|
-
}]
|
|
465
|
+
defaultMessage: "Map"
|
|
508
466
|
}),
|
|
509
467
|
order: 6
|
|
510
468
|
},
|
|
511
469
|
title: defineMessage({
|
|
512
470
|
id: "dPYwJG",
|
|
513
|
-
defaultMessage:
|
|
514
|
-
"type": 0,
|
|
515
|
-
"value": "Map"
|
|
516
|
-
}]
|
|
471
|
+
defaultMessage: "Map"
|
|
517
472
|
}),
|
|
518
473
|
component: MapScreen,
|
|
519
474
|
layouts: ['normal'],
|
|
@@ -522,10 +477,7 @@ var definition = [{
|
|
|
522
477
|
id: 'intro',
|
|
523
478
|
label: defineMessage({
|
|
524
479
|
id: "BgrRxZ",
|
|
525
|
-
defaultMessage:
|
|
526
|
-
"type": 0,
|
|
527
|
-
"value": "Intro"
|
|
528
|
-
}]
|
|
480
|
+
defaultMessage: "Intro"
|
|
529
481
|
}),
|
|
530
482
|
fields: [{
|
|
531
483
|
name: 'title',
|
|
@@ -535,10 +487,7 @@ var definition = [{
|
|
|
535
487
|
},
|
|
536
488
|
label: defineMessage({
|
|
537
489
|
id: "+AEVbJ",
|
|
538
|
-
defaultMessage:
|
|
539
|
-
"type": 0,
|
|
540
|
-
"value": "Title"
|
|
541
|
-
}]
|
|
490
|
+
defaultMessage: "Title"
|
|
542
491
|
})
|
|
543
492
|
}, {
|
|
544
493
|
name: 'description',
|
|
@@ -548,10 +497,7 @@ var definition = [{
|
|
|
548
497
|
},
|
|
549
498
|
label: defineMessage({
|
|
550
499
|
id: "ZCe0r4",
|
|
551
|
-
defaultMessage:
|
|
552
|
-
"type": 0,
|
|
553
|
-
"value": "Description"
|
|
554
|
-
}]
|
|
500
|
+
defaultMessage: "Description"
|
|
555
501
|
})
|
|
556
502
|
}, {
|
|
557
503
|
name: 'button',
|
|
@@ -561,20 +507,14 @@ var definition = [{
|
|
|
561
507
|
},
|
|
562
508
|
label: defineMessage({
|
|
563
509
|
id: "i6bmbD",
|
|
564
|
-
defaultMessage:
|
|
565
|
-
"type": 0,
|
|
566
|
-
"value": "Button"
|
|
567
|
-
}]
|
|
510
|
+
defaultMessage: "Button"
|
|
568
511
|
})
|
|
569
512
|
}]
|
|
570
513
|
}, {
|
|
571
514
|
id: 'map',
|
|
572
515
|
label: defineMessage({
|
|
573
516
|
id: "eYHEYe",
|
|
574
|
-
defaultMessage:
|
|
575
|
-
"type": 0,
|
|
576
|
-
"value": "Map"
|
|
577
|
-
}]
|
|
517
|
+
defaultMessage: "Map"
|
|
578
518
|
}),
|
|
579
519
|
fields: [{
|
|
580
520
|
name: 'draggable',
|
|
@@ -582,10 +522,7 @@ var definition = [{
|
|
|
582
522
|
defaultValue: true,
|
|
583
523
|
label: defineMessage({
|
|
584
524
|
id: "A7ncT3",
|
|
585
|
-
defaultMessage:
|
|
586
|
-
"type": 0,
|
|
587
|
-
"value": "Draggable"
|
|
588
|
-
}]
|
|
525
|
+
defaultMessage: "Draggable"
|
|
589
526
|
})
|
|
590
527
|
}, {
|
|
591
528
|
name: 'fitBounds',
|
|
@@ -593,10 +530,7 @@ var definition = [{
|
|
|
593
530
|
defaultValue: true,
|
|
594
531
|
label: defineMessage({
|
|
595
532
|
id: "NVUpOG",
|
|
596
|
-
defaultMessage:
|
|
597
|
-
"type": 0,
|
|
598
|
-
"value": "Map fit markers"
|
|
599
|
-
}]
|
|
533
|
+
defaultMessage: "Map fit markers"
|
|
600
534
|
})
|
|
601
535
|
}, {
|
|
602
536
|
name: 'zoom',
|
|
@@ -606,30 +540,21 @@ var definition = [{
|
|
|
606
540
|
max: 16,
|
|
607
541
|
label: defineMessage({
|
|
608
542
|
id: "vRzzo6",
|
|
609
|
-
defaultMessage:
|
|
610
|
-
"type": 0,
|
|
611
|
-
"value": "Zoom"
|
|
612
|
-
}]
|
|
543
|
+
defaultMessage: "Zoom"
|
|
613
544
|
})
|
|
614
545
|
}, {
|
|
615
546
|
name: 'center',
|
|
616
547
|
type: 'geo-position',
|
|
617
548
|
label: defineMessage({
|
|
618
549
|
id: "W5qWPj",
|
|
619
|
-
defaultMessage:
|
|
620
|
-
"type": 0,
|
|
621
|
-
"value": "Center"
|
|
622
|
-
}]
|
|
550
|
+
defaultMessage: "Center"
|
|
623
551
|
})
|
|
624
552
|
}]
|
|
625
553
|
}, {
|
|
626
554
|
id: 'markers',
|
|
627
555
|
label: defineMessage({
|
|
628
556
|
id: "+LvOvJ",
|
|
629
|
-
defaultMessage:
|
|
630
|
-
"type": 0,
|
|
631
|
-
"value": "Markers"
|
|
632
|
-
}]
|
|
557
|
+
defaultMessage: "Markers"
|
|
633
558
|
}),
|
|
634
559
|
repeatable: true,
|
|
635
560
|
fieldName: 'markers',
|
|
@@ -638,30 +563,21 @@ var definition = [{
|
|
|
638
563
|
type: 'heading-element',
|
|
639
564
|
label: defineMessage({
|
|
640
565
|
id: "+AEVbJ",
|
|
641
|
-
defaultMessage:
|
|
642
|
-
"type": 0,
|
|
643
|
-
"value": "Title"
|
|
644
|
-
}]
|
|
566
|
+
defaultMessage: "Title"
|
|
645
567
|
})
|
|
646
568
|
}, {
|
|
647
569
|
name: 'description',
|
|
648
570
|
type: 'text-element',
|
|
649
571
|
label: defineMessage({
|
|
650
572
|
id: "ZCe0r4",
|
|
651
|
-
defaultMessage:
|
|
652
|
-
"type": 0,
|
|
653
|
-
"value": "Description"
|
|
654
|
-
}]
|
|
573
|
+
defaultMessage: "Description"
|
|
655
574
|
})
|
|
656
575
|
}, {
|
|
657
576
|
name: 'geoPosition',
|
|
658
577
|
type: 'geo-position',
|
|
659
578
|
label: defineMessage({
|
|
660
579
|
id: "u3ok54",
|
|
661
|
-
defaultMessage:
|
|
662
|
-
"type": 0,
|
|
663
|
-
"value": "Position"
|
|
664
|
-
}]
|
|
580
|
+
defaultMessage: "Position"
|
|
665
581
|
})
|
|
666
582
|
}]
|
|
667
583
|
}],
|
|
@@ -670,10 +586,7 @@ var definition = [{
|
|
|
670
586
|
type: 'background',
|
|
671
587
|
label: defineMessage({
|
|
672
588
|
id: "cDj1mZ",
|
|
673
|
-
defaultMessage:
|
|
674
|
-
"type": 0,
|
|
675
|
-
"value": "Background"
|
|
676
|
-
}]
|
|
589
|
+
defaultMessage: "Background"
|
|
677
590
|
})
|
|
678
591
|
}]
|
|
679
592
|
}, {
|
|
@@ -682,19 +595,13 @@ var definition = [{
|
|
|
682
595
|
group: {
|
|
683
596
|
label: defineMessage({
|
|
684
597
|
id: "Z27IP6",
|
|
685
|
-
defaultMessage:
|
|
686
|
-
"type": 0,
|
|
687
|
-
"value": "Map"
|
|
688
|
-
}]
|
|
598
|
+
defaultMessage: "Map"
|
|
689
599
|
}),
|
|
690
600
|
order: 6
|
|
691
601
|
},
|
|
692
602
|
title: defineMessage({
|
|
693
603
|
id: "ro6yHS",
|
|
694
|
-
defaultMessage:
|
|
695
|
-
"type": 0,
|
|
696
|
-
"value": "Map with image markers"
|
|
697
|
-
}]
|
|
604
|
+
defaultMessage: "Map with image markers"
|
|
698
605
|
}),
|
|
699
606
|
component: MapImagesScreen,
|
|
700
607
|
layouts: ['normal'],
|
|
@@ -703,10 +610,7 @@ var definition = [{
|
|
|
703
610
|
id: 'intro',
|
|
704
611
|
label: defineMessage({
|
|
705
612
|
id: "BgrRxZ",
|
|
706
|
-
defaultMessage:
|
|
707
|
-
"type": 0,
|
|
708
|
-
"value": "Intro"
|
|
709
|
-
}]
|
|
613
|
+
defaultMessage: "Intro"
|
|
710
614
|
}),
|
|
711
615
|
fields: [{
|
|
712
616
|
name: 'title',
|
|
@@ -716,10 +620,7 @@ var definition = [{
|
|
|
716
620
|
},
|
|
717
621
|
label: defineMessage({
|
|
718
622
|
id: "+AEVbJ",
|
|
719
|
-
defaultMessage:
|
|
720
|
-
"type": 0,
|
|
721
|
-
"value": "Title"
|
|
722
|
-
}]
|
|
623
|
+
defaultMessage: "Title"
|
|
723
624
|
})
|
|
724
625
|
}, {
|
|
725
626
|
name: 'description',
|
|
@@ -729,10 +630,7 @@ var definition = [{
|
|
|
729
630
|
},
|
|
730
631
|
label: defineMessage({
|
|
731
632
|
id: "ZCe0r4",
|
|
732
|
-
defaultMessage:
|
|
733
|
-
"type": 0,
|
|
734
|
-
"value": "Description"
|
|
735
|
-
}]
|
|
633
|
+
defaultMessage: "Description"
|
|
736
634
|
})
|
|
737
635
|
}, {
|
|
738
636
|
name: 'button',
|
|
@@ -742,20 +640,14 @@ var definition = [{
|
|
|
742
640
|
},
|
|
743
641
|
label: defineMessage({
|
|
744
642
|
id: "i6bmbD",
|
|
745
|
-
defaultMessage:
|
|
746
|
-
"type": 0,
|
|
747
|
-
"value": "Button"
|
|
748
|
-
}]
|
|
643
|
+
defaultMessage: "Button"
|
|
749
644
|
})
|
|
750
645
|
}]
|
|
751
646
|
}, {
|
|
752
647
|
id: 'map',
|
|
753
648
|
label: defineMessage({
|
|
754
649
|
id: "eYHEYe",
|
|
755
|
-
defaultMessage:
|
|
756
|
-
"type": 0,
|
|
757
|
-
"value": "Map"
|
|
758
|
-
}]
|
|
650
|
+
defaultMessage: "Map"
|
|
759
651
|
}),
|
|
760
652
|
fields: [{
|
|
761
653
|
name: 'draggable',
|
|
@@ -763,10 +655,7 @@ var definition = [{
|
|
|
763
655
|
defaultValue: true,
|
|
764
656
|
label: defineMessage({
|
|
765
657
|
id: "A7ncT3",
|
|
766
|
-
defaultMessage:
|
|
767
|
-
"type": 0,
|
|
768
|
-
"value": "Draggable"
|
|
769
|
-
}]
|
|
658
|
+
defaultMessage: "Draggable"
|
|
770
659
|
})
|
|
771
660
|
}, {
|
|
772
661
|
name: 'fitBounds',
|
|
@@ -774,10 +663,7 @@ var definition = [{
|
|
|
774
663
|
defaultValue: true,
|
|
775
664
|
label: defineMessage({
|
|
776
665
|
id: "NVUpOG",
|
|
777
|
-
defaultMessage:
|
|
778
|
-
"type": 0,
|
|
779
|
-
"value": "Map fit markers"
|
|
780
|
-
}]
|
|
666
|
+
defaultMessage: "Map fit markers"
|
|
781
667
|
})
|
|
782
668
|
}, {
|
|
783
669
|
name: 'zoom',
|
|
@@ -787,30 +673,21 @@ var definition = [{
|
|
|
787
673
|
max: 16,
|
|
788
674
|
label: defineMessage({
|
|
789
675
|
id: "vRzzo6",
|
|
790
|
-
defaultMessage:
|
|
791
|
-
"type": 0,
|
|
792
|
-
"value": "Zoom"
|
|
793
|
-
}]
|
|
676
|
+
defaultMessage: "Zoom"
|
|
794
677
|
})
|
|
795
678
|
}, {
|
|
796
679
|
name: 'center',
|
|
797
680
|
type: 'geo-position',
|
|
798
681
|
label: defineMessage({
|
|
799
682
|
id: "W5qWPj",
|
|
800
|
-
defaultMessage:
|
|
801
|
-
"type": 0,
|
|
802
|
-
"value": "Center"
|
|
803
|
-
}]
|
|
683
|
+
defaultMessage: "Center"
|
|
804
684
|
})
|
|
805
685
|
}]
|
|
806
686
|
}, {
|
|
807
687
|
id: 'markers-with-image',
|
|
808
688
|
label: defineMessage({
|
|
809
689
|
id: "+LvOvJ",
|
|
810
|
-
defaultMessage:
|
|
811
|
-
"type": 0,
|
|
812
|
-
"value": "Markers"
|
|
813
|
-
}]
|
|
690
|
+
defaultMessage: "Markers"
|
|
814
691
|
}),
|
|
815
692
|
repeatable: true,
|
|
816
693
|
fieldName: 'markers',
|
|
@@ -819,30 +696,21 @@ var definition = [{
|
|
|
819
696
|
type: 'heading-element',
|
|
820
697
|
label: defineMessage({
|
|
821
698
|
id: "+AEVbJ",
|
|
822
|
-
defaultMessage:
|
|
823
|
-
"type": 0,
|
|
824
|
-
"value": "Title"
|
|
825
|
-
}]
|
|
699
|
+
defaultMessage: "Title"
|
|
826
700
|
})
|
|
827
701
|
}, {
|
|
828
702
|
name: 'description',
|
|
829
703
|
type: 'text-element',
|
|
830
704
|
label: defineMessage({
|
|
831
705
|
id: "ZCe0r4",
|
|
832
|
-
defaultMessage:
|
|
833
|
-
"type": 0,
|
|
834
|
-
"value": "Description"
|
|
835
|
-
}]
|
|
706
|
+
defaultMessage: "Description"
|
|
836
707
|
})
|
|
837
708
|
}, {
|
|
838
709
|
name: 'geoPosition',
|
|
839
710
|
type: 'geo-position',
|
|
840
711
|
label: defineMessage({
|
|
841
712
|
id: "u3ok54",
|
|
842
|
-
defaultMessage:
|
|
843
|
-
"type": 0,
|
|
844
|
-
"value": "Position"
|
|
845
|
-
}]
|
|
713
|
+
defaultMessage: "Position"
|
|
846
714
|
})
|
|
847
715
|
}]
|
|
848
716
|
}],
|
|
@@ -851,10 +719,7 @@ var definition = [{
|
|
|
851
719
|
type: 'background',
|
|
852
720
|
label: defineMessage({
|
|
853
721
|
id: "cDj1mZ",
|
|
854
|
-
defaultMessage:
|
|
855
|
-
"type": 0,
|
|
856
|
-
"value": "Background"
|
|
857
|
-
}]
|
|
722
|
+
defaultMessage: "Background"
|
|
858
723
|
})
|
|
859
724
|
}]
|
|
860
725
|
}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-map",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.74",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
38
|
"types": "./es/index.d.ts",
|
|
39
|
+
"style": "./assets/css/styles.css",
|
|
39
40
|
"import": "./es/index.js"
|
|
40
41
|
},
|
|
41
42
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -52,27 +53,27 @@
|
|
|
52
53
|
"build": "../../scripts/prepare-package.sh --types"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"react": "^
|
|
56
|
-
"react-dom": "^
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
|
-
"react": "^
|
|
60
|
-
"react-dom": "^
|
|
60
|
+
"react": "^19.0.0",
|
|
61
|
+
"react-dom": "^19.0.0"
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
64
|
"@babel/runtime": "^7.28.6",
|
|
64
|
-
"@micromag/core": "^0.4.
|
|
65
|
-
"@micromag/element-background": "^0.4.
|
|
66
|
-
"@micromag/element-button": "^0.4.
|
|
67
|
-
"@micromag/element-container": "^0.4.
|
|
68
|
-
"@micromag/element-footer": "^0.4.
|
|
69
|
-
"@micromag/element-header": "^0.4.
|
|
70
|
-
"@micromag/element-heading": "^0.4.
|
|
71
|
-
"@micromag/element-image": "^0.4.
|
|
72
|
-
"@micromag/element-map": "^0.4.
|
|
73
|
-
"@micromag/element-scroll": "^0.4.
|
|
74
|
-
"@micromag/element-text": "^0.4.
|
|
75
|
-
"@micromag/transforms": "^0.4.
|
|
65
|
+
"@micromag/core": "^0.4.74",
|
|
66
|
+
"@micromag/element-background": "^0.4.74",
|
|
67
|
+
"@micromag/element-button": "^0.4.74",
|
|
68
|
+
"@micromag/element-container": "^0.4.74",
|
|
69
|
+
"@micromag/element-footer": "^0.4.74",
|
|
70
|
+
"@micromag/element-header": "^0.4.74",
|
|
71
|
+
"@micromag/element-heading": "^0.4.74",
|
|
72
|
+
"@micromag/element-image": "^0.4.74",
|
|
73
|
+
"@micromag/element-map": "^0.4.74",
|
|
74
|
+
"@micromag/element-scroll": "^0.4.74",
|
|
75
|
+
"@micromag/element-text": "^0.4.74",
|
|
76
|
+
"@micromag/transforms": "^0.4.74",
|
|
76
77
|
"classnames": "^2.2.6",
|
|
77
78
|
"lodash": "^4.17.23",
|
|
78
79
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
@@ -82,6 +83,6 @@
|
|
|
82
83
|
"access": "public",
|
|
83
84
|
"registry": "https://registry.npmjs.org/"
|
|
84
85
|
},
|
|
85
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "fe510ee87845280d0760cb292aef9d2eb69e67c1",
|
|
86
87
|
"types": "es/index.d.ts"
|
|
87
88
|
}
|