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