@opengeoweb/webmap-react 9.14.0 → 9.15.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/index.esm.js +404 -141
- package/package.json +4 -2
- package/src/lib/components/MapDrawTool/utils.d.ts +2 -0
- package/src/lib/components/MapView/MapView.ShiftToZoom.stories.d.ts +10 -0
- package/src/lib/components/Providers/Providers.d.ts +7 -0
- package/src/lib/components/Providers/index.d.ts +1 -0
- package/src/lib/components/ReactMapView/ReactMapView.d.ts +1 -0
- package/src/lib/components/ReactMapView/types.d.ts +2 -1
- package/src/lib/utils/i18n.d.ts +2 -0
package/index.esm.js
CHANGED
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
3
3
|
import { legendImageStore, WMImageEventType, webmapUtils, getLegendGraphicURLForLayer, getWMJSMapById, debugLogger, DebugType, LayerType, WMLayer, registerWMLayer, WMBBOX, getWMLayerById, WMJSMap, tilesettings } from '@opengeoweb/webmap';
|
|
4
4
|
import { CustomTooltip, CanvasComponent, ToolContainerDraggable, dateUtils, CustomIconButton } from '@opengeoweb/shared';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import 'i18next';
|
|
5
7
|
import { Paper, Box, Typography, Grid, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$1, FormLabel, Switch, styled, Slider } from '@mui/material';
|
|
6
8
|
import _, { cloneDeep } from 'lodash';
|
|
7
9
|
import proj4 from 'proj4';
|
|
@@ -83,17 +85,17 @@ var $TypeError$i = TypeError;
|
|
|
83
85
|
|
|
84
86
|
// `RequireObjectCoercible` abstract operation
|
|
85
87
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
86
|
-
var requireObjectCoercible$
|
|
88
|
+
var requireObjectCoercible$7 = function (it) {
|
|
87
89
|
if (isNullOrUndefined$4(it)) throw new $TypeError$i("Can't call method on " + it);
|
|
88
90
|
return it;
|
|
89
91
|
};
|
|
90
92
|
|
|
91
93
|
// toObject with fallback for non-array-like ES3 strings
|
|
92
94
|
var IndexedObject$2 = indexedObject;
|
|
93
|
-
var requireObjectCoercible$
|
|
95
|
+
var requireObjectCoercible$6 = requireObjectCoercible$7;
|
|
94
96
|
|
|
95
97
|
var toIndexedObject$5 = function (it) {
|
|
96
|
-
return IndexedObject$2(requireObjectCoercible$
|
|
98
|
+
return IndexedObject$2(requireObjectCoercible$6(it));
|
|
97
99
|
};
|
|
98
100
|
|
|
99
101
|
var check = function (it) {
|
|
@@ -101,7 +103,7 @@ var check = function (it) {
|
|
|
101
103
|
};
|
|
102
104
|
|
|
103
105
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
104
|
-
var global$
|
|
106
|
+
var global$n =
|
|
105
107
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
106
108
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
107
109
|
check(typeof window == 'object' && window) ||
|
|
@@ -112,49 +114,49 @@ var global$o =
|
|
|
112
114
|
// eslint-disable-next-line no-new-func -- fallback
|
|
113
115
|
(function () { return this; })() || Function('return this')();
|
|
114
116
|
|
|
115
|
-
var
|
|
117
|
+
var sharedStore = {exports: {}};
|
|
116
118
|
|
|
117
|
-
var global$
|
|
119
|
+
var global$m = global$n;
|
|
118
120
|
|
|
119
121
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
120
122
|
var defineProperty$7 = Object.defineProperty;
|
|
121
123
|
|
|
122
124
|
var defineGlobalProperty$3 = function (key, value) {
|
|
123
125
|
try {
|
|
124
|
-
defineProperty$7(global$
|
|
126
|
+
defineProperty$7(global$m, key, { value: value, configurable: true, writable: true });
|
|
125
127
|
} catch (error) {
|
|
126
|
-
global$
|
|
128
|
+
global$m[key] = value;
|
|
127
129
|
} return value;
|
|
128
130
|
};
|
|
129
131
|
|
|
130
|
-
var
|
|
132
|
+
var globalThis$1 = global$n;
|
|
131
133
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
132
134
|
|
|
133
135
|
var SHARED = '__core-js_shared__';
|
|
134
|
-
var store$3 =
|
|
136
|
+
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
135
137
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var store$2 = sharedStore;
|
|
139
|
-
|
|
140
|
-
(shared$4.exports = function (key, value) {
|
|
141
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
142
|
-
})('versions', []).push({
|
|
143
|
-
version: '3.35.1',
|
|
138
|
+
(store$3.versions || (store$3.versions = [])).push({
|
|
139
|
+
version: '3.36.1',
|
|
144
140
|
mode: 'global',
|
|
145
141
|
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
146
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
142
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
147
143
|
source: 'https://github.com/zloirock/core-js'
|
|
148
144
|
});
|
|
149
145
|
|
|
150
|
-
var
|
|
146
|
+
var store$2 = sharedStore.exports;
|
|
147
|
+
|
|
148
|
+
var shared$4 = function (key, value) {
|
|
149
|
+
return store$2[key] || (store$2[key] = value || {});
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var requireObjectCoercible$5 = requireObjectCoercible$7;
|
|
151
153
|
|
|
152
154
|
var $Object$3 = Object;
|
|
153
155
|
|
|
154
156
|
// `ToObject` abstract operation
|
|
155
157
|
// https://tc39.es/ecma262/#sec-toobject
|
|
156
158
|
var toObject$7 = function (argument) {
|
|
157
|
-
return $Object$3(requireObjectCoercible$
|
|
159
|
+
return $Object$3(requireObjectCoercible$5(argument));
|
|
158
160
|
};
|
|
159
161
|
|
|
160
162
|
var uncurryThis$n = functionUncurryThis;
|
|
@@ -181,7 +183,7 @@ var uid$2 = function (key) {
|
|
|
181
183
|
|
|
182
184
|
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
183
185
|
|
|
184
|
-
var global$l = global$
|
|
186
|
+
var global$l = global$n;
|
|
185
187
|
var userAgent$5 = engineUserAgent;
|
|
186
188
|
|
|
187
189
|
var process$3 = global$l.process;
|
|
@@ -212,7 +214,7 @@ var engineV8Version = version;
|
|
|
212
214
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
213
215
|
var V8_VERSION$1 = engineV8Version;
|
|
214
216
|
var fails$n = fails$q;
|
|
215
|
-
var global$k = global$
|
|
217
|
+
var global$k = global$n;
|
|
216
218
|
|
|
217
219
|
var $String$6 = global$k.String;
|
|
218
220
|
|
|
@@ -235,8 +237,8 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
|
|
|
235
237
|
&& !Symbol.sham
|
|
236
238
|
&& typeof Symbol.iterator == 'symbol';
|
|
237
239
|
|
|
238
|
-
var global$j = global$
|
|
239
|
-
var shared$3 = shared$4
|
|
240
|
+
var global$j = global$n;
|
|
241
|
+
var shared$3 = shared$4;
|
|
240
242
|
var hasOwn$b = hasOwnProperty_1;
|
|
241
243
|
var uid$1 = uid$2;
|
|
242
244
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
@@ -268,18 +270,18 @@ var isCallable$n = typeof documentAll == 'undefined' && documentAll !== undefine
|
|
|
268
270
|
|
|
269
271
|
var isCallable$m = isCallable$n;
|
|
270
272
|
|
|
271
|
-
var isObject$
|
|
273
|
+
var isObject$d = function (it) {
|
|
272
274
|
return typeof it == 'object' ? it !== null : isCallable$m(it);
|
|
273
275
|
};
|
|
274
276
|
|
|
275
|
-
var isObject$
|
|
277
|
+
var isObject$c = isObject$d;
|
|
276
278
|
|
|
277
279
|
var $String$5 = String;
|
|
278
280
|
var $TypeError$h = TypeError;
|
|
279
281
|
|
|
280
282
|
// `Assert: Type(argument) is Object`
|
|
281
|
-
var anObject$
|
|
282
|
-
if (isObject$
|
|
283
|
+
var anObject$d = function (argument) {
|
|
284
|
+
if (isObject$c(argument)) return argument;
|
|
283
285
|
throw new $TypeError$h($String$5(argument) + ' is not an object');
|
|
284
286
|
};
|
|
285
287
|
|
|
@@ -308,12 +310,12 @@ var v8PrototypeDefineBug = DESCRIPTORS$d && fails$l(function () {
|
|
|
308
310
|
|
|
309
311
|
var objectDefineProperty = {};
|
|
310
312
|
|
|
311
|
-
var global$i = global$
|
|
312
|
-
var isObject$
|
|
313
|
+
var global$i = global$n;
|
|
314
|
+
var isObject$b = isObject$d;
|
|
313
315
|
|
|
314
316
|
var document$3 = global$i.document;
|
|
315
317
|
// typeof document.createElement is 'object' in old IE
|
|
316
|
-
var EXISTS$1 = isObject$
|
|
318
|
+
var EXISTS$1 = isObject$b(document$3) && isObject$b(document$3.createElement);
|
|
317
319
|
|
|
318
320
|
var documentCreateElement$2 = function (it) {
|
|
319
321
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
@@ -339,7 +341,7 @@ var functionCall = NATIVE_BIND$2 ? call$i.bind(call$i) : function () {
|
|
|
339
341
|
return call$i.apply(call$i, arguments);
|
|
340
342
|
};
|
|
341
343
|
|
|
342
|
-
var global$h = global$
|
|
344
|
+
var global$h = global$n;
|
|
343
345
|
var isCallable$l = isCallable$n;
|
|
344
346
|
|
|
345
347
|
var aFunction = function (argument) {
|
|
@@ -401,7 +403,7 @@ var getMethod$4 = function (V, P) {
|
|
|
401
403
|
|
|
402
404
|
var call$h = functionCall;
|
|
403
405
|
var isCallable$i = isCallable$n;
|
|
404
|
-
var isObject$
|
|
406
|
+
var isObject$a = isObject$d;
|
|
405
407
|
|
|
406
408
|
var $TypeError$f = TypeError;
|
|
407
409
|
|
|
@@ -409,14 +411,14 @@ var $TypeError$f = TypeError;
|
|
|
409
411
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
410
412
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
411
413
|
var fn, val;
|
|
412
|
-
if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$
|
|
413
|
-
if (isCallable$i(fn = input.valueOf) && !isObject$
|
|
414
|
-
if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$
|
|
414
|
+
if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$a(val = call$h(fn, input))) return val;
|
|
415
|
+
if (isCallable$i(fn = input.valueOf) && !isObject$a(val = call$h(fn, input))) return val;
|
|
416
|
+
if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$a(val = call$h(fn, input))) return val;
|
|
415
417
|
throw new $TypeError$f("Can't convert object to primitive value");
|
|
416
418
|
};
|
|
417
419
|
|
|
418
420
|
var call$g = functionCall;
|
|
419
|
-
var isObject$
|
|
421
|
+
var isObject$9 = isObject$d;
|
|
420
422
|
var isSymbol$2 = isSymbol$3;
|
|
421
423
|
var getMethod$3 = getMethod$4;
|
|
422
424
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
@@ -428,13 +430,13 @@ var TO_PRIMITIVE = wellKnownSymbol$g('toPrimitive');
|
|
|
428
430
|
// `ToPrimitive` abstract operation
|
|
429
431
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
430
432
|
var toPrimitive$1 = function (input, pref) {
|
|
431
|
-
if (!isObject$
|
|
433
|
+
if (!isObject$9(input) || isSymbol$2(input)) return input;
|
|
432
434
|
var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
|
|
433
435
|
var result;
|
|
434
436
|
if (exoticToPrim) {
|
|
435
437
|
if (pref === undefined) pref = 'default';
|
|
436
438
|
result = call$g(exoticToPrim, input, pref);
|
|
437
|
-
if (!isObject$
|
|
439
|
+
if (!isObject$9(result) || isSymbol$2(result)) return result;
|
|
438
440
|
throw new $TypeError$e("Can't convert object to primitive value");
|
|
439
441
|
}
|
|
440
442
|
if (pref === undefined) pref = 'number';
|
|
@@ -454,7 +456,7 @@ var toPropertyKey$2 = function (argument) {
|
|
|
454
456
|
var DESCRIPTORS$b = descriptors;
|
|
455
457
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
456
458
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
457
|
-
var anObject$
|
|
459
|
+
var anObject$c = anObject$d;
|
|
458
460
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
459
461
|
|
|
460
462
|
var $TypeError$d = TypeError;
|
|
@@ -469,9 +471,9 @@ var WRITABLE = 'writable';
|
|
|
469
471
|
// `Object.defineProperty` method
|
|
470
472
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
471
473
|
objectDefineProperty.f = DESCRIPTORS$b ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
472
|
-
anObject$
|
|
474
|
+
anObject$c(O);
|
|
473
475
|
P = toPropertyKey$1(P);
|
|
474
|
-
anObject$
|
|
476
|
+
anObject$c(Attributes);
|
|
475
477
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
476
478
|
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
477
479
|
if (current && current[WRITABLE]) {
|
|
@@ -484,9 +486,9 @@ objectDefineProperty.f = DESCRIPTORS$b ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
484
486
|
}
|
|
485
487
|
} return $defineProperty(O, P, Attributes);
|
|
486
488
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
487
|
-
anObject$
|
|
489
|
+
anObject$c(O);
|
|
488
490
|
P = toPropertyKey$1(P);
|
|
489
|
-
anObject$
|
|
491
|
+
anObject$c(Attributes);
|
|
490
492
|
if (IE8_DOM_DEFINE$1) try {
|
|
491
493
|
return $defineProperty(O, P, Attributes);
|
|
492
494
|
} catch (error) { /* empty */ }
|
|
@@ -557,6 +559,7 @@ var createMethod$3 = function (IS_INCLUDES) {
|
|
|
557
559
|
return function ($this, el, fromIndex) {
|
|
558
560
|
var O = toIndexedObject$4($this);
|
|
559
561
|
var length = lengthOfArrayLike$5(O);
|
|
562
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
560
563
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
561
564
|
var value;
|
|
562
565
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -628,7 +631,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
628
631
|
var DESCRIPTORS$a = descriptors;
|
|
629
632
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
630
633
|
var definePropertyModule$3 = objectDefineProperty;
|
|
631
|
-
var anObject$
|
|
634
|
+
var anObject$b = anObject$d;
|
|
632
635
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
633
636
|
var objectKeys$1 = objectKeys$2;
|
|
634
637
|
|
|
@@ -636,7 +639,7 @@ var objectKeys$1 = objectKeys$2;
|
|
|
636
639
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
637
640
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
638
641
|
objectDefineProperties.f = DESCRIPTORS$a && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
639
|
-
anObject$
|
|
642
|
+
anObject$b(O);
|
|
640
643
|
var props = toIndexedObject$2(Properties);
|
|
641
644
|
var keys = objectKeys$1(Properties);
|
|
642
645
|
var length = keys.length;
|
|
@@ -650,7 +653,7 @@ var getBuiltIn$7 = getBuiltIn$9;
|
|
|
650
653
|
|
|
651
654
|
var html$2 = getBuiltIn$7('document', 'documentElement');
|
|
652
655
|
|
|
653
|
-
var shared$2 = shared$4
|
|
656
|
+
var shared$2 = shared$4;
|
|
654
657
|
var uid = uid$2;
|
|
655
658
|
|
|
656
659
|
var keys = shared$2('keys');
|
|
@@ -660,7 +663,7 @@ var sharedKey$3 = function (key) {
|
|
|
660
663
|
};
|
|
661
664
|
|
|
662
665
|
/* global ActiveXObject -- old IE, WSH */
|
|
663
|
-
var anObject$
|
|
666
|
+
var anObject$a = anObject$d;
|
|
664
667
|
var definePropertiesModule = objectDefineProperties;
|
|
665
668
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
666
669
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
@@ -734,7 +737,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
|
|
|
734
737
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
735
738
|
var result;
|
|
736
739
|
if (O !== null) {
|
|
737
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
740
|
+
EmptyConstructor[PROTOTYPE] = anObject$a(O);
|
|
738
741
|
result = new EmptyConstructor();
|
|
739
742
|
EmptyConstructor[PROTOTYPE] = null;
|
|
740
743
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
@@ -766,7 +769,7 @@ var addToUnscopables$2 = function (key) {
|
|
|
766
769
|
|
|
767
770
|
var iterators = {};
|
|
768
771
|
|
|
769
|
-
var global$g = global$
|
|
772
|
+
var global$g = global$n;
|
|
770
773
|
var isCallable$h = isCallable$n;
|
|
771
774
|
|
|
772
775
|
var WeakMap$1 = global$g.WeakMap;
|
|
@@ -794,11 +797,11 @@ var createNonEnumerableProperty$8 = DESCRIPTORS$9 ? function (object, key, value
|
|
|
794
797
|
};
|
|
795
798
|
|
|
796
799
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
797
|
-
var global$f = global$
|
|
798
|
-
var isObject$
|
|
800
|
+
var global$f = global$n;
|
|
801
|
+
var isObject$8 = isObject$d;
|
|
799
802
|
var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
|
|
800
803
|
var hasOwn$9 = hasOwnProperty_1;
|
|
801
|
-
var shared$1 = sharedStore;
|
|
804
|
+
var shared$1 = sharedStore.exports;
|
|
802
805
|
var sharedKey$1 = sharedKey$3;
|
|
803
806
|
var hiddenKeys$1 = hiddenKeys$4;
|
|
804
807
|
|
|
@@ -814,7 +817,7 @@ var enforce = function (it) {
|
|
|
814
817
|
var getterFor = function (TYPE) {
|
|
815
818
|
return function (it) {
|
|
816
819
|
var state;
|
|
817
|
-
if (!isObject$
|
|
820
|
+
if (!isObject$8(it) || (state = get(it)).type !== TYPE) {
|
|
818
821
|
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
819
822
|
} return state;
|
|
820
823
|
};
|
|
@@ -927,7 +930,7 @@ var functionName = {
|
|
|
927
930
|
|
|
928
931
|
var uncurryThis$j = functionUncurryThis;
|
|
929
932
|
var isCallable$g = isCallable$n;
|
|
930
|
-
var store = sharedStore;
|
|
933
|
+
var store = sharedStore.exports;
|
|
931
934
|
|
|
932
935
|
var functionToString = uncurryThis$j(Function.toString);
|
|
933
936
|
|
|
@@ -1046,13 +1049,13 @@ var getBuiltIn$6 = getBuiltIn$9;
|
|
|
1046
1049
|
var uncurryThis$h = functionUncurryThis;
|
|
1047
1050
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1048
1051
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1049
|
-
var anObject$
|
|
1052
|
+
var anObject$9 = anObject$d;
|
|
1050
1053
|
|
|
1051
1054
|
var concat$1 = uncurryThis$h([].concat);
|
|
1052
1055
|
|
|
1053
1056
|
// all object keys, includes non-enumerable and symbols
|
|
1054
1057
|
var ownKeys$1 = getBuiltIn$6('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1055
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
1058
|
+
var keys = getOwnPropertyNamesModule.f(anObject$9(it));
|
|
1056
1059
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
1057
1060
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
1058
1061
|
};
|
|
@@ -1097,7 +1100,7 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
|
1097
1100
|
|
|
1098
1101
|
var isForced_1 = isForced$2;
|
|
1099
1102
|
|
|
1100
|
-
var global$e = global$
|
|
1103
|
+
var global$e = global$n;
|
|
1101
1104
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
1102
1105
|
var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
|
|
1103
1106
|
var defineBuiltIn$6 = defineBuiltIn$7;
|
|
@@ -1185,7 +1188,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
1185
1188
|
|
|
1186
1189
|
var fails$g = fails$q;
|
|
1187
1190
|
var isCallable$b = isCallable$n;
|
|
1188
|
-
var isObject$
|
|
1191
|
+
var isObject$7 = isObject$d;
|
|
1189
1192
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1190
1193
|
var defineBuiltIn$5 = defineBuiltIn$7;
|
|
1191
1194
|
var wellKnownSymbol$e = wellKnownSymbol$h;
|
|
@@ -1208,7 +1211,7 @@ if ([].keys) {
|
|
|
1208
1211
|
}
|
|
1209
1212
|
}
|
|
1210
1213
|
|
|
1211
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$
|
|
1214
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$7(IteratorPrototype$2) || fails$g(function () {
|
|
1212
1215
|
var test = {};
|
|
1213
1216
|
// FF44- legacy iterators case
|
|
1214
1217
|
return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
|
|
@@ -1268,10 +1271,10 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
1268
1271
|
} catch (error) { /* empty */ }
|
|
1269
1272
|
};
|
|
1270
1273
|
|
|
1271
|
-
var isObject$
|
|
1274
|
+
var isObject$6 = isObject$d;
|
|
1272
1275
|
|
|
1273
1276
|
var isPossiblePrototype$1 = function (argument) {
|
|
1274
|
-
return isObject$
|
|
1277
|
+
return isObject$6(argument) || argument === null;
|
|
1275
1278
|
};
|
|
1276
1279
|
|
|
1277
1280
|
var isPossiblePrototype = isPossiblePrototype$1;
|
|
@@ -1286,7 +1289,8 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1286
1289
|
|
|
1287
1290
|
/* eslint-disable no-proto -- safe */
|
|
1288
1291
|
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1289
|
-
var
|
|
1292
|
+
var isObject$5 = isObject$d;
|
|
1293
|
+
var requireObjectCoercible$4 = requireObjectCoercible$7;
|
|
1290
1294
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1291
1295
|
|
|
1292
1296
|
// `Object.setPrototypeOf` method
|
|
@@ -1303,8 +1307,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1303
1307
|
CORRECT_SETTER = test instanceof Array;
|
|
1304
1308
|
} catch (error) { /* empty */ }
|
|
1305
1309
|
return function setPrototypeOf(O, proto) {
|
|
1306
|
-
|
|
1310
|
+
requireObjectCoercible$4(O);
|
|
1307
1311
|
aPossiblePrototype(proto);
|
|
1312
|
+
if (!isObject$5(O)) return O;
|
|
1308
1313
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1309
1314
|
else O.__proto__ = proto;
|
|
1310
1315
|
return O;
|
|
@@ -1522,7 +1527,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
1522
1527
|
|
|
1523
1528
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1524
1529
|
|
|
1525
|
-
var global$d = global$
|
|
1530
|
+
var global$d = global$n;
|
|
1526
1531
|
var DOMIterables = domIterables;
|
|
1527
1532
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1528
1533
|
var ArrayIteratorMethods = es_array_iterator;
|
|
@@ -1559,6 +1564,177 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1559
1564
|
|
|
1560
1565
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1561
1566
|
|
|
1567
|
+
var en = {
|
|
1568
|
+
"webmap-react-event": "event:",
|
|
1569
|
+
"webmap-react-sent": "Sent:",
|
|
1570
|
+
"webmap-react-utc": "UTC",
|
|
1571
|
+
"webmap-react-expires": "Expires:",
|
|
1572
|
+
"webmap-react-sender": "Sender:",
|
|
1573
|
+
"webmap-react-identifier": "Identifier:",
|
|
1574
|
+
"webmap-react-h5": "Query features along buffered line using WFS and CQL",
|
|
1575
|
+
"webmap-react-wfs": "WFS JSON URL:",
|
|
1576
|
+
"webmap-react-cql": "CQL expression:",
|
|
1577
|
+
"webmap-react-delete": "Delete",
|
|
1578
|
+
"webmap-react-feature-type": "Feature type",
|
|
1579
|
+
"webmap-react-feature-number": "Feature number",
|
|
1580
|
+
"webmap-react-intersection-shapes": "Intersection shapes",
|
|
1581
|
+
"webmap-react-features": "Features",
|
|
1582
|
+
"webmap-react-url": "URL:",
|
|
1583
|
+
"webmap-react-get-feature-info-result": "GetFeatureInfo result:",
|
|
1584
|
+
"webmap-react-view": "View",
|
|
1585
|
+
"webmap-react-edit": "Edit",
|
|
1586
|
+
"webmap-react-esc": "press ESC to exit draw mode",
|
|
1587
|
+
"webmap-react-no-layers": "No layers",
|
|
1588
|
+
"webmap-react-legend": "Legend",
|
|
1589
|
+
"webmap-react-title": "Title",
|
|
1590
|
+
"webmap-react-name": "Name",
|
|
1591
|
+
"webmap-react-service": "Service",
|
|
1592
|
+
"webmap-react-abstract": "Abstract",
|
|
1593
|
+
"webmap-react-dimensions": "Dimensions",
|
|
1594
|
+
"webmap-react-styles": "Styles",
|
|
1595
|
+
"webmap-react-bounding-box": "Bounding Box",
|
|
1596
|
+
"webmap-react-groups": "Groups",
|
|
1597
|
+
"webmap-react-keywords": "Keywords",
|
|
1598
|
+
"webmap-react-zoom-reset": "Reset zoom",
|
|
1599
|
+
"webmap-react-zoom-in": "Zoom in",
|
|
1600
|
+
"webmap-react-zoom-out": "Zoom out",
|
|
1601
|
+
"webmap-react-show": "Show",
|
|
1602
|
+
"webmap-react-click-diconnect": "Click to disconnect layer",
|
|
1603
|
+
"webmap-react-click-connect": "Click to connect layer"
|
|
1604
|
+
};
|
|
1605
|
+
var fi = {
|
|
1606
|
+
"webmap-react-event": "ei käännetty",
|
|
1607
|
+
"webmap-react-sent": "ei käännetty",
|
|
1608
|
+
"webmap-react-utc": "ei käännetty",
|
|
1609
|
+
"webmap-react-expires": "ei käännetty",
|
|
1610
|
+
"webmap-react-sender": "ei käännetty",
|
|
1611
|
+
"webmap-react-identifier": "ei käännetty",
|
|
1612
|
+
"webmap-react-h5": "ei käännetty",
|
|
1613
|
+
"webmap-react-wfs": "ei käännetty",
|
|
1614
|
+
"webmap-react-cql": "ei käännetty",
|
|
1615
|
+
"webmap-react-delete": "ei käännetty",
|
|
1616
|
+
"webmap-react-feature-type": "ei käännetty",
|
|
1617
|
+
"webmap-react-feature-number": "ei käännetty",
|
|
1618
|
+
"webmap-react-intersection-shapes": "ei käännetty",
|
|
1619
|
+
"webmap-react-get-feature-info-result": "ei käännetty",
|
|
1620
|
+
"webmap-react-view": "ei käännetty",
|
|
1621
|
+
"webmap-react-edit": "ei käännetty",
|
|
1622
|
+
"webmap-react-esc": "ei käännetty",
|
|
1623
|
+
"webmap-react-no-layers": "ei käännetty",
|
|
1624
|
+
"webmap-react-legend": "ei käännetty",
|
|
1625
|
+
"webmap-react-title": "ei käännetty",
|
|
1626
|
+
"webmap-react-name": "ei käännetty",
|
|
1627
|
+
"webmap-react-service": "ei käännetty",
|
|
1628
|
+
"webmap-react-abstract": "ei käännetty",
|
|
1629
|
+
"webmap-react-dimensions": "ei käännetty",
|
|
1630
|
+
"webmap-react-styles": "ei käännetty",
|
|
1631
|
+
"webmap-react-bounding-box": "ei käännetty",
|
|
1632
|
+
"webmap-react-groups": "ei käännetty",
|
|
1633
|
+
"webmap-react-keywords": "ei käännetty",
|
|
1634
|
+
"webmap-react-zoom-reset": "ei käännetty",
|
|
1635
|
+
"webmap-react-zoom-in": "ei käännetty",
|
|
1636
|
+
"webmap-react-zoom-out": "ei käännetty",
|
|
1637
|
+
"webmap-react-show": "ei käännetty",
|
|
1638
|
+
"webmap-react-click-diconnect": "ei käännetty",
|
|
1639
|
+
"webmap-react-click-connect": "ei käännetty"
|
|
1640
|
+
};
|
|
1641
|
+
var no = {
|
|
1642
|
+
"webmap-react-event": "event:",
|
|
1643
|
+
"webmap-react-sent": "Sendt:",
|
|
1644
|
+
"webmap-react-utc": "UTC",
|
|
1645
|
+
"webmap-react-expires": "Utgår:",
|
|
1646
|
+
"webmap-react-sender": "Avsender:",
|
|
1647
|
+
"webmap-react-identifier": "ikke oversatt",
|
|
1648
|
+
"webmap-react-h5": "ikke oversatt",
|
|
1649
|
+
"webmap-react-wfs": "ikke oversatt",
|
|
1650
|
+
"webmap-react-cql": "ikke oversatt",
|
|
1651
|
+
"webmap-react-delete": "Slett",
|
|
1652
|
+
"webmap-react-feature-type": "Feature type",
|
|
1653
|
+
"webmap-react-feature-number": "Feature nummer",
|
|
1654
|
+
"webmap-react-intersection-shapes": "ikke oversatt",
|
|
1655
|
+
"webmap-react-get-feature-info-result": "GetFeatureInfo resultat:",
|
|
1656
|
+
"webmap-react-view": "View",
|
|
1657
|
+
"webmap-react-edit": "Endre",
|
|
1658
|
+
"webmap-react-esc": "trykk ESC for å avslutte tegnemodus",
|
|
1659
|
+
"webmap-react-no-layers": "Ingen lag",
|
|
1660
|
+
"webmap-react-legend": "Legende",
|
|
1661
|
+
"webmap-react-title": "Tittel",
|
|
1662
|
+
"webmap-react-name": "Navn",
|
|
1663
|
+
"webmap-react-service": "Service",
|
|
1664
|
+
"webmap-react-abstract": "Abstract",
|
|
1665
|
+
"webmap-react-dimensions": "Dimensjoner",
|
|
1666
|
+
"webmap-react-styles": "Styles",
|
|
1667
|
+
"webmap-react-bounding-box": "Bounding Box",
|
|
1668
|
+
"webmap-react-groups": "Grupper",
|
|
1669
|
+
"webmap-react-keywords": "Stikkord",
|
|
1670
|
+
"webmap-react-zoom-reset": "Reset zoom",
|
|
1671
|
+
"webmap-react-zoom-in": "Zoom inn",
|
|
1672
|
+
"webmap-react-zoom-out": "Zoom ut",
|
|
1673
|
+
"webmap-react-show": "Vis",
|
|
1674
|
+
"webmap-react-click-diconnect": "Trykk for å avkoble lag",
|
|
1675
|
+
"webmap-react-click-connect": "Trykk for å koble lag"
|
|
1676
|
+
};
|
|
1677
|
+
var nl = {
|
|
1678
|
+
"webmap-react-event": "niet vertaald",
|
|
1679
|
+
"webmap-react-sent": "niet vertaald",
|
|
1680
|
+
"webmap-react-utc": "niet vertaald",
|
|
1681
|
+
"webmap-react-expires": "niet vertaald",
|
|
1682
|
+
"webmap-react-sender": "niet vertaald",
|
|
1683
|
+
"workspce-search": "niet vertaald",
|
|
1684
|
+
"webmap-react-h5": "niet vertaald",
|
|
1685
|
+
"webmap-react-wfs": "niet vertaald",
|
|
1686
|
+
"webmap-react-cql": "niet vertaald",
|
|
1687
|
+
"webmap-react-delete": "niet vertaald",
|
|
1688
|
+
"webmap-react-feature-type": "niet vertaald",
|
|
1689
|
+
"webmap-react-feature-number": "niet vertaald",
|
|
1690
|
+
"webmap-react-intersection-shapes": "niet vertaald",
|
|
1691
|
+
"webmap-react-get-feature-info-result": "niet vertaald",
|
|
1692
|
+
"webmap-react-view": "niet vertaald",
|
|
1693
|
+
"webmap-react-edit": "niet vertaald",
|
|
1694
|
+
"webmap-react-esc": "niet vertaald",
|
|
1695
|
+
"webmap-react-no-layers": "niet vertaald",
|
|
1696
|
+
"webmap-react-legend": "niet vertaald",
|
|
1697
|
+
"webmap-react-title": "niet vertaald",
|
|
1698
|
+
"webmap-react-name": "niet vertaald",
|
|
1699
|
+
"webmap-react-service": "niet vertaald",
|
|
1700
|
+
"webmap-react-abstract": "niet vertaald",
|
|
1701
|
+
"webmap-react-dimensions": "niet vertaald",
|
|
1702
|
+
"webmap-react-styles": "niet vertaald",
|
|
1703
|
+
"webmap-react-bounding-box": "niet vertaald",
|
|
1704
|
+
"webmap-react-groups": "niet vertaald",
|
|
1705
|
+
"webmap-react-keywords": "niet vertaald",
|
|
1706
|
+
"webmap-react-zoom-reset": "niet vertaald",
|
|
1707
|
+
"webmap-react-zoom-in": "niet vertaald",
|
|
1708
|
+
"webmap-react-zoom-out": "niet vertaald",
|
|
1709
|
+
"webmap-react-show": "niet vertaald",
|
|
1710
|
+
"webmap-react-click-diconnect": "niet vertaald",
|
|
1711
|
+
"webmap-react-click-connect": "niet vertaald"
|
|
1712
|
+
};
|
|
1713
|
+
var webmapReactTranslations = {
|
|
1714
|
+
en: en,
|
|
1715
|
+
fi: fi,
|
|
1716
|
+
no: no,
|
|
1717
|
+
nl: nl
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1720
|
+
/* *
|
|
1721
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1722
|
+
* you may not use this file except in compliance with the License.
|
|
1723
|
+
* You may obtain a copy of the License at
|
|
1724
|
+
*
|
|
1725
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1726
|
+
*
|
|
1727
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1728
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1729
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1730
|
+
* See the License for the specific language governing permissions and
|
|
1731
|
+
* limitations under the License.
|
|
1732
|
+
*
|
|
1733
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1734
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1735
|
+
* */
|
|
1736
|
+
const WEBMAP_REACT_NAMESPACE = 'webmapreact';
|
|
1737
|
+
|
|
1562
1738
|
var DESCRIPTORS$4 = descriptors;
|
|
1563
1739
|
var uncurryThis$f = functionUncurryThis;
|
|
1564
1740
|
var call$d = functionCall;
|
|
@@ -1729,17 +1905,21 @@ const Legend = ({
|
|
|
1729
1905
|
const [canvasContainerHeight, setCanvasContainerHeight] = useState(defaultCanvasHeight);
|
|
1730
1906
|
let imageWidth;
|
|
1731
1907
|
let imageHeight;
|
|
1908
|
+
const {
|
|
1909
|
+
t
|
|
1910
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
1911
|
+
const legendPrefix = t('webmap-react-legend');
|
|
1732
1912
|
/* Register callback to legendImagestore to trigger rerender when image is loaded. */
|
|
1733
1913
|
useEffect(() => {
|
|
1734
1914
|
legendImageStore.addImageEventCallback((image, id, imageEventType) => {
|
|
1735
1915
|
if (imageEventType === WMImageEventType.Loaded) {
|
|
1736
1916
|
setState(null);
|
|
1737
1917
|
}
|
|
1738
|
-
},
|
|
1918
|
+
}, `${legendPrefix}_${layerId}`);
|
|
1739
1919
|
return () => {
|
|
1740
|
-
legendImageStore.removeEventCallback(
|
|
1920
|
+
legendImageStore.removeEventCallback(`${legendPrefix}_${layerId}`);
|
|
1741
1921
|
};
|
|
1742
|
-
}, [layerId]);
|
|
1922
|
+
}, [layerId, legendPrefix]);
|
|
1743
1923
|
/* Should not do anything if no layer is given */
|
|
1744
1924
|
if (!layer) {
|
|
1745
1925
|
return null;
|
|
@@ -1808,6 +1988,37 @@ const Legend = ({
|
|
|
1808
1988
|
}));
|
|
1809
1989
|
};
|
|
1810
1990
|
|
|
1991
|
+
/* *
|
|
1992
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1993
|
+
* you may not use this file except in compliance with the License.
|
|
1994
|
+
* You may obtain a copy of the License at
|
|
1995
|
+
*
|
|
1996
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1997
|
+
*
|
|
1998
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1999
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2000
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2001
|
+
* See the License for the specific language governing permissions and
|
|
2002
|
+
* limitations under the License.
|
|
2003
|
+
*
|
|
2004
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2005
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
2006
|
+
* */
|
|
2007
|
+
const WebmapReactTranslationsWrapper = ({
|
|
2008
|
+
children
|
|
2009
|
+
}) => {
|
|
2010
|
+
const {
|
|
2011
|
+
i18n
|
|
2012
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
2013
|
+
React__default.useEffect(() => {
|
|
2014
|
+
i18n.addResourceBundle('en', WEBMAP_REACT_NAMESPACE, webmapReactTranslations.en);
|
|
2015
|
+
i18n.addResourceBundle('fi', WEBMAP_REACT_NAMESPACE, webmapReactTranslations.fi);
|
|
2016
|
+
i18n.addResourceBundle('no', WEBMAP_REACT_NAMESPACE, webmapReactTranslations.no);
|
|
2017
|
+
i18n.addResourceBundle('nl', WEBMAP_REACT_NAMESPACE, webmapReactTranslations.nl);
|
|
2018
|
+
}, [i18n]);
|
|
2019
|
+
return children;
|
|
2020
|
+
};
|
|
2021
|
+
|
|
1811
2022
|
/* *
|
|
1812
2023
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1813
2024
|
* you may not use this file except in compliance with the License.
|
|
@@ -1834,7 +2045,10 @@ const LegendDialog = ({
|
|
|
1834
2045
|
order: _order = 0,
|
|
1835
2046
|
source: _source = 'app'
|
|
1836
2047
|
}) => {
|
|
1837
|
-
|
|
2048
|
+
const {
|
|
2049
|
+
t
|
|
2050
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
2051
|
+
return /*#__PURE__*/React.createElement(WebmapReactTranslationsWrapper, null, /*#__PURE__*/React.createElement(ToolContainerDraggable, {
|
|
1838
2052
|
startPosition: {
|
|
1839
2053
|
right: 20,
|
|
1840
2054
|
top: 50
|
|
@@ -1872,7 +2086,7 @@ const LegendDialog = ({
|
|
|
1872
2086
|
fontWeight: 500,
|
|
1873
2087
|
fontSize: 14
|
|
1874
2088
|
}
|
|
1875
|
-
},
|
|
2089
|
+
}, t('webmap-react-no-layers'))))));
|
|
1876
2090
|
};
|
|
1877
2091
|
|
|
1878
2092
|
var wellKnownSymbol$a = wellKnownSymbol$h;
|
|
@@ -1928,7 +2142,7 @@ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u200
|
|
|
1928
2142
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
1929
2143
|
|
|
1930
2144
|
var uncurryThis$e = functionUncurryThis;
|
|
1931
|
-
var requireObjectCoercible$3 = requireObjectCoercible$
|
|
2145
|
+
var requireObjectCoercible$3 = requireObjectCoercible$7;
|
|
1932
2146
|
var toString$8 = toString$9;
|
|
1933
2147
|
var whitespaces$1 = whitespaces$2;
|
|
1934
2148
|
|
|
@@ -1958,7 +2172,7 @@ var stringTrim = {
|
|
|
1958
2172
|
trim: createMethod$2(3)
|
|
1959
2173
|
};
|
|
1960
2174
|
|
|
1961
|
-
var global$c = global$
|
|
2175
|
+
var global$c = global$n;
|
|
1962
2176
|
var fails$e = fails$q;
|
|
1963
2177
|
var uncurryThis$d = functionUncurryThis;
|
|
1964
2178
|
var toString$7 = toString$9;
|
|
@@ -2281,7 +2495,7 @@ $$d({ target: 'Array', proto: true, forced: FORCED$3 }, {
|
|
|
2281
2495
|
}
|
|
2282
2496
|
});
|
|
2283
2497
|
|
|
2284
|
-
var anObject$8 = anObject$
|
|
2498
|
+
var anObject$8 = anObject$d;
|
|
2285
2499
|
|
|
2286
2500
|
// `RegExp.prototype.flags` getter implementation
|
|
2287
2501
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
@@ -2314,7 +2528,7 @@ var regexpGetFlags = function (R) {
|
|
|
2314
2528
|
|
|
2315
2529
|
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
2316
2530
|
var defineBuiltIn$3 = defineBuiltIn$7;
|
|
2317
|
-
var anObject$7 = anObject$
|
|
2531
|
+
var anObject$7 = anObject$d;
|
|
2318
2532
|
var $toString = toString$9;
|
|
2319
2533
|
var fails$a = fails$q;
|
|
2320
2534
|
var getRegExpFlags = regexpGetFlags;
|
|
@@ -4679,6 +4893,9 @@ const FeatureLayers = ({
|
|
|
4679
4893
|
activeFeatureLayerIndex,
|
|
4680
4894
|
getToolIcon
|
|
4681
4895
|
}) => {
|
|
4896
|
+
const {
|
|
4897
|
+
t
|
|
4898
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
4682
4899
|
const featureLayerList = geojson ? Array.from(Array(geojson.features.length).keys()).map(index => {
|
|
4683
4900
|
var _a;
|
|
4684
4901
|
return {
|
|
@@ -4698,7 +4915,7 @@ const FeatureLayers = ({
|
|
|
4698
4915
|
}
|
|
4699
4916
|
}, /*#__PURE__*/React__default.createElement(InputLabel, {
|
|
4700
4917
|
id: "demo-feature-number"
|
|
4701
|
-
},
|
|
4918
|
+
}, t('webmap-react-features')), /*#__PURE__*/React__default.createElement(Select, {
|
|
4702
4919
|
labelId: "demo-feature-type",
|
|
4703
4920
|
value: (featureLayerList.length ? activeFeatureLayerIndex : '').toString(),
|
|
4704
4921
|
onChange: event => {
|
|
@@ -4743,16 +4960,19 @@ const EditModeButton = ({
|
|
|
4743
4960
|
drawMode,
|
|
4744
4961
|
onToggleEditMode
|
|
4745
4962
|
}) => {
|
|
4963
|
+
const {
|
|
4964
|
+
t
|
|
4965
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
4746
4966
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
4747
4967
|
item: true,
|
|
4748
4968
|
xs: 12
|
|
4749
4969
|
}, /*#__PURE__*/React__default.createElement(CustomTooltip, {
|
|
4750
4970
|
title: "Switch mode"
|
|
4751
|
-
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(FormLabel, null,
|
|
4971
|
+
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(FormLabel, null, t('webmap-react-view')), /*#__PURE__*/React__default.createElement(Switch, {
|
|
4752
4972
|
"data-testid": "switchMode",
|
|
4753
4973
|
checked: isInEditMode,
|
|
4754
4974
|
onClick: () => onToggleEditMode(!isInEditMode)
|
|
4755
|
-
}), /*#__PURE__*/React__default.createElement(FormLabel, null,
|
|
4975
|
+
}), /*#__PURE__*/React__default.createElement(FormLabel, null, t('webmap-react-edit')), drawMode && ( /*#__PURE__*/React__default.createElement(Typography, {
|
|
4756
4976
|
component: "span",
|
|
4757
4977
|
sx: {
|
|
4758
4978
|
display: 'inline-block',
|
|
@@ -4761,7 +4981,7 @@ const EditModeButton = ({
|
|
|
4761
4981
|
position: 'relative',
|
|
4762
4982
|
fontSize: 14
|
|
4763
4983
|
}
|
|
4764
|
-
},
|
|
4984
|
+
}, t('webmap-react-esc'))))));
|
|
4765
4985
|
};
|
|
4766
4986
|
|
|
4767
4987
|
/* *
|
|
@@ -5267,6 +5487,9 @@ const IntersectionSelect = ({
|
|
|
5267
5487
|
isDisabled: _isDisabled = false
|
|
5268
5488
|
}) => {
|
|
5269
5489
|
const [activeIntersection, setActiveIntersection] = React__default.useState(0);
|
|
5490
|
+
const {
|
|
5491
|
+
t
|
|
5492
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
5270
5493
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
5271
5494
|
item: true,
|
|
5272
5495
|
sm: 12
|
|
@@ -5277,7 +5500,7 @@ const IntersectionSelect = ({
|
|
|
5277
5500
|
}
|
|
5278
5501
|
}, /*#__PURE__*/React__default.createElement(InputLabel, {
|
|
5279
5502
|
id: "demo-intersection"
|
|
5280
|
-
},
|
|
5503
|
+
}, t('webmap-react-intersection-shapes')), /*#__PURE__*/React__default.createElement(Select, {
|
|
5281
5504
|
labelId: "demo-intersection",
|
|
5282
5505
|
value: activeIntersection.toString(),
|
|
5283
5506
|
onChange: event => {
|
|
@@ -5579,6 +5802,15 @@ const addSelectionTypeToGeoJSON = (geoJSON, selectionType) => {
|
|
|
5579
5802
|
selectionType
|
|
5580
5803
|
});
|
|
5581
5804
|
};
|
|
5805
|
+
const getFeatureExtent = geoJSON => {
|
|
5806
|
+
const turfBbox = turf.bbox(geoJSON);
|
|
5807
|
+
return {
|
|
5808
|
+
left: turfBbox[0],
|
|
5809
|
+
bottom: turfBbox[1],
|
|
5810
|
+
right: turfBbox[2],
|
|
5811
|
+
top: turfBbox[3]
|
|
5812
|
+
};
|
|
5813
|
+
};
|
|
5582
5814
|
|
|
5583
5815
|
const defaultIntersectionStyleProperties = Object.assign(Object.assign({}, defaultGeoJSONStyleProperties), {
|
|
5584
5816
|
'fill-opacity': 0.5
|
|
@@ -6406,7 +6638,7 @@ var proxyAccessor$1 = function (Target, Source, key) {
|
|
|
6406
6638
|
};
|
|
6407
6639
|
|
|
6408
6640
|
var isCallable$6 = isCallable$n;
|
|
6409
|
-
var isObject$4 = isObject$
|
|
6641
|
+
var isObject$4 = isObject$d;
|
|
6410
6642
|
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
6411
6643
|
|
|
6412
6644
|
// makes subclassing work correct for wrapped built-ins
|
|
@@ -6430,7 +6662,7 @@ var normalizeStringArgument$1 = function (argument, $default) {
|
|
|
6430
6662
|
return argument === undefined ? arguments.length < 2 ? '' : $default : toString$4(argument);
|
|
6431
6663
|
};
|
|
6432
6664
|
|
|
6433
|
-
var isObject$3 = isObject$
|
|
6665
|
+
var isObject$3 = isObject$d;
|
|
6434
6666
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
|
|
6435
6667
|
|
|
6436
6668
|
// `InstallErrorCause` abstract operation
|
|
@@ -6548,7 +6780,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
6548
6780
|
|
|
6549
6781
|
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
6550
6782
|
var $$b = _export;
|
|
6551
|
-
var global$b = global$
|
|
6783
|
+
var global$b = global$n;
|
|
6552
6784
|
var apply$1 = functionApply;
|
|
6553
6785
|
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
6554
6786
|
|
|
@@ -6633,6 +6865,8 @@ var lengthOfArrayLike$2 = lengthOfArrayLike$6;
|
|
|
6633
6865
|
|
|
6634
6866
|
var $TypeError$8 = TypeError;
|
|
6635
6867
|
|
|
6868
|
+
var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
|
|
6869
|
+
|
|
6636
6870
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
6637
6871
|
var createMethod$1 = function (IS_RIGHT) {
|
|
6638
6872
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
@@ -6640,6 +6874,7 @@ var createMethod$1 = function (IS_RIGHT) {
|
|
|
6640
6874
|
var self = IndexedObject(O);
|
|
6641
6875
|
var length = lengthOfArrayLike$2(O);
|
|
6642
6876
|
aCallable$6(callbackfn);
|
|
6877
|
+
if (length === 0 && argumentsLength < 2) throw new $TypeError$8(REDUCE_EMPTY);
|
|
6643
6878
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
6644
6879
|
var i = IS_RIGHT ? -1 : 1;
|
|
6645
6880
|
if (argumentsLength < 2) while (true) {
|
|
@@ -6650,7 +6885,7 @@ var createMethod$1 = function (IS_RIGHT) {
|
|
|
6650
6885
|
}
|
|
6651
6886
|
index += i;
|
|
6652
6887
|
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
6653
|
-
throw new $TypeError$8(
|
|
6888
|
+
throw new $TypeError$8(REDUCE_EMPTY);
|
|
6654
6889
|
}
|
|
6655
6890
|
}
|
|
6656
6891
|
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
@@ -6669,7 +6904,7 @@ var arrayReduce = {
|
|
|
6669
6904
|
right: createMethod$1(true)
|
|
6670
6905
|
};
|
|
6671
6906
|
|
|
6672
|
-
var global$a = global$
|
|
6907
|
+
var global$a = global$n;
|
|
6673
6908
|
var classof$4 = classofRaw$2;
|
|
6674
6909
|
|
|
6675
6910
|
var engineIsNode = classof$4(global$a.process) === 'process';
|
|
@@ -6838,7 +7073,7 @@ var aConstructor$1 = function (argument) {
|
|
|
6838
7073
|
throw new $TypeError$6(tryToString$2(argument) + ' is not a constructor');
|
|
6839
7074
|
};
|
|
6840
7075
|
|
|
6841
|
-
var anObject$6 = anObject$
|
|
7076
|
+
var anObject$6 = anObject$d;
|
|
6842
7077
|
var aConstructor = aConstructor$1;
|
|
6843
7078
|
var isNullOrUndefined$2 = isNullOrUndefined$5;
|
|
6844
7079
|
var wellKnownSymbol$7 = wellKnownSymbol$h;
|
|
@@ -6889,7 +7124,7 @@ var userAgent$2 = engineUserAgent;
|
|
|
6889
7124
|
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
6890
7125
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
6891
7126
|
|
|
6892
|
-
var global$9 = global$
|
|
7127
|
+
var global$9 = global$n;
|
|
6893
7128
|
var apply = functionApply;
|
|
6894
7129
|
var bind$3 = functionBindContext;
|
|
6895
7130
|
var isCallable$4 = isCallable$n;
|
|
@@ -7006,7 +7241,7 @@ var task$1 = {
|
|
|
7006
7241
|
clear: clear
|
|
7007
7242
|
};
|
|
7008
7243
|
|
|
7009
|
-
var global$8 = global$
|
|
7244
|
+
var global$8 = global$n;
|
|
7010
7245
|
var DESCRIPTORS = descriptors;
|
|
7011
7246
|
|
|
7012
7247
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -7052,7 +7287,7 @@ var userAgent = engineUserAgent;
|
|
|
7052
7287
|
|
|
7053
7288
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
7054
7289
|
|
|
7055
|
-
var global$7 = global$
|
|
7290
|
+
var global$7 = global$n;
|
|
7056
7291
|
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
7057
7292
|
var bind$2 = functionBindContext;
|
|
7058
7293
|
var macrotask = task$1.set;
|
|
@@ -7146,7 +7381,7 @@ var perform$3 = function (exec) {
|
|
|
7146
7381
|
}
|
|
7147
7382
|
};
|
|
7148
7383
|
|
|
7149
|
-
var global$6 = global$
|
|
7384
|
+
var global$6 = global$n;
|
|
7150
7385
|
|
|
7151
7386
|
var promiseNativeConstructor = global$6.Promise;
|
|
7152
7387
|
|
|
@@ -7160,7 +7395,7 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
|
|
|
7160
7395
|
&& typeof window == 'object'
|
|
7161
7396
|
&& typeof document == 'object';
|
|
7162
7397
|
|
|
7163
|
-
var global$5 = global$
|
|
7398
|
+
var global$5 = global$n;
|
|
7164
7399
|
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
7165
7400
|
var isCallable$3 = isCallable$n;
|
|
7166
7401
|
var isForced = isForced_1;
|
|
@@ -7230,7 +7465,7 @@ newPromiseCapability$2.f = function (C) {
|
|
|
7230
7465
|
|
|
7231
7466
|
var $$7 = _export;
|
|
7232
7467
|
var IS_NODE = engineIsNode;
|
|
7233
|
-
var global$4 = global$
|
|
7468
|
+
var global$4 = global$n;
|
|
7234
7469
|
var call$9 = functionCall;
|
|
7235
7470
|
var defineBuiltIn$2 = defineBuiltIn$7;
|
|
7236
7471
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
@@ -7238,7 +7473,7 @@ var setToStringTag = setToStringTag$4;
|
|
|
7238
7473
|
var setSpecies = setSpecies$1;
|
|
7239
7474
|
var aCallable$3 = aCallable$a;
|
|
7240
7475
|
var isCallable$2 = isCallable$n;
|
|
7241
|
-
var isObject$2 = isObject$
|
|
7476
|
+
var isObject$2 = isObject$d;
|
|
7242
7477
|
var anInstance = anInstance$1;
|
|
7243
7478
|
var speciesConstructor$1 = speciesConstructor$2;
|
|
7244
7479
|
var task = task$1.set;
|
|
@@ -7542,7 +7777,7 @@ var getIteratorMethod$2 = function (it) {
|
|
|
7542
7777
|
|
|
7543
7778
|
var call$8 = functionCall;
|
|
7544
7779
|
var aCallable$2 = aCallable$a;
|
|
7545
|
-
var anObject$5 = anObject$
|
|
7780
|
+
var anObject$5 = anObject$d;
|
|
7546
7781
|
var tryToString$1 = tryToString$5;
|
|
7547
7782
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
7548
7783
|
|
|
@@ -7555,7 +7790,7 @@ var getIterator$1 = function (argument, usingIterator) {
|
|
|
7555
7790
|
};
|
|
7556
7791
|
|
|
7557
7792
|
var call$7 = functionCall;
|
|
7558
|
-
var anObject$4 = anObject$
|
|
7793
|
+
var anObject$4 = anObject$d;
|
|
7559
7794
|
var getMethod$1 = getMethod$4;
|
|
7560
7795
|
|
|
7561
7796
|
var iteratorClose$1 = function (iterator, kind, value) {
|
|
@@ -7580,7 +7815,7 @@ var iteratorClose$1 = function (iterator, kind, value) {
|
|
|
7580
7815
|
|
|
7581
7816
|
var bind = functionBindContext;
|
|
7582
7817
|
var call$6 = functionCall;
|
|
7583
|
-
var anObject$3 = anObject$
|
|
7818
|
+
var anObject$3 = anObject$d;
|
|
7584
7819
|
var tryToString = tryToString$5;
|
|
7585
7820
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
7586
7821
|
var lengthOfArrayLike = lengthOfArrayLike$6;
|
|
@@ -7801,8 +8036,8 @@ $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
|
7801
8036
|
}
|
|
7802
8037
|
});
|
|
7803
8038
|
|
|
7804
|
-
var anObject$2 = anObject$
|
|
7805
|
-
var isObject$1 = isObject$
|
|
8039
|
+
var anObject$2 = anObject$d;
|
|
8040
|
+
var isObject$1 = isObject$d;
|
|
7806
8041
|
var newPromiseCapability = newPromiseCapability$2;
|
|
7807
8042
|
|
|
7808
8043
|
var promiseResolve$1 = function (C, x) {
|
|
@@ -7829,7 +8064,7 @@ $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
|
7829
8064
|
}
|
|
7830
8065
|
});
|
|
7831
8066
|
|
|
7832
|
-
var isObject = isObject$
|
|
8067
|
+
var isObject = isObject$d;
|
|
7833
8068
|
var classof$1 = classofRaw$2;
|
|
7834
8069
|
var wellKnownSymbol$2 = wellKnownSymbol$h;
|
|
7835
8070
|
|
|
@@ -7871,7 +8106,7 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
7871
8106
|
var $$1 = _export;
|
|
7872
8107
|
var uncurryThis$3 = functionUncurryThis;
|
|
7873
8108
|
var notARegExp = notARegexp;
|
|
7874
|
-
var requireObjectCoercible$2 = requireObjectCoercible$
|
|
8109
|
+
var requireObjectCoercible$2 = requireObjectCoercible$7;
|
|
7875
8110
|
var toString$3 = toString$9;
|
|
7876
8111
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
7877
8112
|
|
|
@@ -8151,6 +8386,7 @@ const getDisplayText = currentAdagucTime => {
|
|
|
8151
8386
|
};
|
|
8152
8387
|
const ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION = 'ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION';
|
|
8153
8388
|
const ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO = 'ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO';
|
|
8389
|
+
const MINUTE_TO_MILLISECOND = 60000;
|
|
8154
8390
|
class ReactMapView extends React.Component {
|
|
8155
8391
|
constructor(props) {
|
|
8156
8392
|
super(props);
|
|
@@ -8164,14 +8400,16 @@ class ReactMapView extends React.Component {
|
|
|
8164
8400
|
};
|
|
8165
8401
|
this.refetchTimer = null;
|
|
8166
8402
|
this.onStartRefetchTimer = () => {
|
|
8403
|
+
const {
|
|
8404
|
+
shouldAutoFetch
|
|
8405
|
+
} = this.props;
|
|
8167
8406
|
/*
|
|
8168
8407
|
TODO, Maarten Plieger, 2021-09-02, https://gitlab.com/opengeoweb/opengeoweb/-/issues/1159:
|
|
8169
8408
|
This causes many issues, we should improve the update strategy.
|
|
8170
8409
|
Certain presets have >20 layers. This causes 20 times parsing the GetCapabilities for a minor update of the store.
|
|
8171
|
-
|
|
8172
8410
|
*/
|
|
8173
8411
|
this.clearRefetchTimer();
|
|
8174
|
-
const
|
|
8412
|
+
const autoFetchInterval = Number(shouldAutoFetch); // Default true -> 1 minute
|
|
8175
8413
|
this.refetchTimer = setInterval(() => {
|
|
8176
8414
|
const {
|
|
8177
8415
|
mapId
|
|
@@ -8195,7 +8433,7 @@ class ReactMapView extends React.Component {
|
|
|
8195
8433
|
});
|
|
8196
8434
|
}
|
|
8197
8435
|
});
|
|
8198
|
-
},
|
|
8436
|
+
}, Math.abs(autoFetchInterval) * MINUTE_TO_MILLISECOND);
|
|
8199
8437
|
};
|
|
8200
8438
|
this.clearRefetchTimer = () => {
|
|
8201
8439
|
if (this.refetchTimer) {
|
|
@@ -8347,6 +8585,9 @@ class ReactMapView extends React.Component {
|
|
|
8347
8585
|
if (!prevProps || prevProps.timestep !== props.timestep) {
|
|
8348
8586
|
wmjsMap.timestepInMinutes = props.timestep;
|
|
8349
8587
|
}
|
|
8588
|
+
if (!prevProps || prevProps.holdShiftToScroll !== props.holdShiftToScroll) {
|
|
8589
|
+
wmjsMap.holdShiftToScroll = !!props.holdShiftToScroll;
|
|
8590
|
+
}
|
|
8350
8591
|
/* Check map dimensions */
|
|
8351
8592
|
if (!prevProps || prevProps.dimensions !== props.dimensions) {
|
|
8352
8593
|
if (props.dimensions) {
|
|
@@ -8515,7 +8756,7 @@ class ReactMapView extends React.Component {
|
|
|
8515
8756
|
/* Check if webmapjs was not already initialized */
|
|
8516
8757
|
const existingWMJSMap = webmapUtils.getWMJSMapById(mapId);
|
|
8517
8758
|
if (existingWMJSMap) {
|
|
8518
|
-
console.warn(`Somehow ${mapId}
|
|
8759
|
+
console.warn(`Somehow ${mapId} already exists`);
|
|
8519
8760
|
webmapUtils.unRegisterWMJSMap(mapId);
|
|
8520
8761
|
}
|
|
8521
8762
|
const wmjsMap = new WMJSMap(this.adagucWebMapJSRef.current);
|
|
@@ -8746,16 +8987,19 @@ const ZoomControls = ({
|
|
|
8746
8987
|
onZoomOut,
|
|
8747
8988
|
onZoomReset
|
|
8748
8989
|
}) => {
|
|
8749
|
-
|
|
8750
|
-
|
|
8990
|
+
const {
|
|
8991
|
+
t
|
|
8992
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
8993
|
+
return /*#__PURE__*/React.createElement(WebmapReactTranslationsWrapper, null, /*#__PURE__*/React.createElement(MapControlButton, {
|
|
8994
|
+
title: t('webmap-react-zoom-reset'),
|
|
8751
8995
|
"data-testid": "zoom-reset",
|
|
8752
8996
|
onClick: onZoomReset
|
|
8753
8997
|
}, /*#__PURE__*/React.createElement(Home, null)), /*#__PURE__*/React.createElement(MapControlButton, {
|
|
8754
|
-
title:
|
|
8998
|
+
title: t('webmap-react-zoom-in'),
|
|
8755
8999
|
"data-testid": "zoom-in",
|
|
8756
9000
|
onClick: onZoomIn
|
|
8757
9001
|
}, /*#__PURE__*/React.createElement(Add, null)), /*#__PURE__*/React.createElement(MapControlButton, {
|
|
8758
|
-
title:
|
|
9002
|
+
title: t('webmap-react-zoom-out'),
|
|
8759
9003
|
"data-testid": "zoom-out",
|
|
8760
9004
|
onClick: onZoomOut
|
|
8761
9005
|
}, /*#__PURE__*/React.createElement(Minus, null)));
|
|
@@ -9191,7 +9435,10 @@ const MapWarningProperties = ({
|
|
|
9191
9435
|
}) => {
|
|
9192
9436
|
const language = languageIndex || 0;
|
|
9193
9437
|
const newWidth = parentSize ? parentSize - 100 : 350;
|
|
9194
|
-
|
|
9438
|
+
const {
|
|
9439
|
+
t
|
|
9440
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
9441
|
+
return /*#__PURE__*/React__default.createElement(WebmapReactTranslationsWrapper, null, /*#__PURE__*/React__default.createElement("div", {
|
|
9195
9442
|
style: {
|
|
9196
9443
|
position: 'fixed',
|
|
9197
9444
|
width: `${newWidth}px`,
|
|
@@ -9215,15 +9462,15 @@ const MapWarningProperties = ({
|
|
|
9215
9462
|
"data-testid": "map-warning-properties-title"
|
|
9216
9463
|
}, selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].areaDesc), selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].areaDesc && ( /*#__PURE__*/React__default.createElement("pre", {
|
|
9217
9464
|
"data-testid": "map-warning-properties-row"
|
|
9218
|
-
},
|
|
9465
|
+
}, t('webmap-react-event'), ' ', selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].event)), selectedFeatureProperties.onset && ( /*#__PURE__*/React__default.createElement("pre", {
|
|
9219
9466
|
"data-testid": "map-warning-properties-row"
|
|
9220
|
-
},
|
|
9467
|
+
}, t('webmap-react-sent'), ' ', dateUtils.dateToString(dateUtils.utc(selectedFeatureProperties.onset), 'dd MMM yyyy, HH:mm'), ' ', t('webmap-react-utc'))), selectedFeatureProperties.expires && ( /*#__PURE__*/React__default.createElement("pre", {
|
|
9221
9468
|
"data-testid": "map-warning-properties-row"
|
|
9222
|
-
},
|
|
9469
|
+
}, t('webmap-react-expires'), ' ', dateUtils.dateToString(dateUtils.utc(selectedFeatureProperties.expires), 'dd MMM yyyy, HH:mm'), ' ', t('webmap-react-utc'))), selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].senderName && ( /*#__PURE__*/React__default.createElement("pre", {
|
|
9223
9470
|
"data-testid": "map-warning-properties-row"
|
|
9224
|
-
},
|
|
9471
|
+
}, t('webmap-react-sender'), ' ', selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].senderName)), selectedFeatureProperties.identifier && ( /*#__PURE__*/React__default.createElement("pre", {
|
|
9225
9472
|
"data-testid": "map-warning-properties-row"
|
|
9226
|
-
},
|
|
9473
|
+
}, t('webmap-react-identifier'), ' ', selectedFeatureProperties.identifier)))));
|
|
9227
9474
|
};
|
|
9228
9475
|
|
|
9229
9476
|
const dimensionConfig = [{
|
|
@@ -9296,15 +9543,19 @@ const DimensionSelectButton = ({
|
|
|
9296
9543
|
onClickDimensionButton,
|
|
9297
9544
|
isActive: _isActive = false
|
|
9298
9545
|
}) => {
|
|
9546
|
+
const {
|
|
9547
|
+
t
|
|
9548
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
9549
|
+
const showPrefix = t('webmap-react-show');
|
|
9299
9550
|
const dimConfig = dimensionConfig.find(cnf => cnf.name === dimension);
|
|
9300
9551
|
const Icon = getDimensionIcon$1(dimConfig && dimConfig.iconType || 'IconLevels');
|
|
9301
|
-
const title =
|
|
9302
|
-
return /*#__PURE__*/React.createElement(MapControlButton, {
|
|
9552
|
+
const title = `${showPrefix} ${dimConfig ? dimConfig.label.toLowerCase() : dimension.toLowerCase()}`;
|
|
9553
|
+
return /*#__PURE__*/React.createElement(WebmapReactTranslationsWrapper, null, /*#__PURE__*/React.createElement(MapControlButton, {
|
|
9303
9554
|
title: title,
|
|
9304
9555
|
"data-testid": `dimensionMapBtn-${dimension}`,
|
|
9305
9556
|
onClick: onClickDimensionButton,
|
|
9306
9557
|
isActive: _isActive
|
|
9307
|
-
}, /*#__PURE__*/React.createElement(Icon, null));
|
|
9558
|
+
}, /*#__PURE__*/React.createElement(Icon, null)));
|
|
9308
9559
|
};
|
|
9309
9560
|
|
|
9310
9561
|
/* *
|
|
@@ -9482,8 +9733,12 @@ const MapDimensionSelect = ({
|
|
|
9482
9733
|
const layerTitle = wmLayer.title;
|
|
9483
9734
|
const marks = marksByDimension(wmsDimension);
|
|
9484
9735
|
const isLayerDimensionSynced = layerDimension.synced !== undefined && layerDimension.synced === true;
|
|
9485
|
-
|
|
9486
|
-
|
|
9736
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
9737
|
+
const {
|
|
9738
|
+
t
|
|
9739
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
9740
|
+
const tooltipTitle = isLayerDimensionSynced ? t('webmap-react-click-disconnect') : t('webmap-react-click-connect');
|
|
9741
|
+
return /*#__PURE__*/React.createElement(WebmapReactTranslationsWrapper, null, /*#__PURE__*/React.createElement(Grid, {
|
|
9487
9742
|
key: layerId,
|
|
9488
9743
|
item: true,
|
|
9489
9744
|
xs: "auto"
|
|
@@ -9506,7 +9761,7 @@ const MapDimensionSelect = ({
|
|
|
9506
9761
|
},
|
|
9507
9762
|
isDisabled: false,
|
|
9508
9763
|
validSelection: layerDimension.synced === false || !(layerDimension.validSyncSelection !== undefined && layerDimension.validSyncSelection === false)
|
|
9509
|
-
}));
|
|
9764
|
+
})));
|
|
9510
9765
|
};
|
|
9511
9766
|
|
|
9512
9767
|
const LayerInfoButton = _a => {
|
|
@@ -9612,10 +9867,13 @@ const LayerInfoLegend = ({
|
|
|
9612
9867
|
dimensions,
|
|
9613
9868
|
legendURL
|
|
9614
9869
|
}) => {
|
|
9870
|
+
const {
|
|
9871
|
+
t
|
|
9872
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
9615
9873
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Typography$1, {
|
|
9616
9874
|
variant: "subtitle2",
|
|
9617
9875
|
sx: textStyleWithMargin
|
|
9618
|
-
},
|
|
9876
|
+
}, t('webmap-react-legend')), /*#__PURE__*/React__default.createElement(LegendLayout, {
|
|
9619
9877
|
title: title,
|
|
9620
9878
|
name: name,
|
|
9621
9879
|
dimensions: dimensions
|
|
@@ -9626,7 +9884,7 @@ const LayerInfoLegend = ({
|
|
|
9626
9884
|
};
|
|
9627
9885
|
|
|
9628
9886
|
var fails$4 = fails$q;
|
|
9629
|
-
var global$3 = global$
|
|
9887
|
+
var global$3 = global$n;
|
|
9630
9888
|
|
|
9631
9889
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
9632
9890
|
var $RegExp$2 = global$3.RegExp;
|
|
@@ -9657,7 +9915,7 @@ var regexpStickyHelpers = {
|
|
|
9657
9915
|
};
|
|
9658
9916
|
|
|
9659
9917
|
var fails$3 = fails$q;
|
|
9660
|
-
var global$2 = global$
|
|
9918
|
+
var global$2 = global$n;
|
|
9661
9919
|
|
|
9662
9920
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
9663
9921
|
var $RegExp$1 = global$2.RegExp;
|
|
@@ -9668,7 +9926,7 @@ var regexpUnsupportedDotAll = fails$3(function () {
|
|
|
9668
9926
|
});
|
|
9669
9927
|
|
|
9670
9928
|
var fails$2 = fails$q;
|
|
9671
|
-
var global$1 = global$
|
|
9929
|
+
var global$1 = global$n;
|
|
9672
9930
|
|
|
9673
9931
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
9674
9932
|
var $RegExp = global$1.RegExp;
|
|
@@ -9686,7 +9944,7 @@ var uncurryThis$2 = functionUncurryThis;
|
|
|
9686
9944
|
var toString$2 = toString$9;
|
|
9687
9945
|
var regexpFlags = regexpFlags$1;
|
|
9688
9946
|
var stickyHelpers$1 = regexpStickyHelpers;
|
|
9689
|
-
var shared = shared$4
|
|
9947
|
+
var shared = shared$4;
|
|
9690
9948
|
var create = objectCreate;
|
|
9691
9949
|
var getInternalState = internalState.get;
|
|
9692
9950
|
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
@@ -9884,7 +10142,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
9884
10142
|
var uncurryThis$1 = functionUncurryThis;
|
|
9885
10143
|
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
9886
10144
|
var toString$1 = toString$9;
|
|
9887
|
-
var requireObjectCoercible$1 = requireObjectCoercible$
|
|
10145
|
+
var requireObjectCoercible$1 = requireObjectCoercible$7;
|
|
9888
10146
|
|
|
9889
10147
|
var charAt$1 = uncurryThis$1(''.charAt);
|
|
9890
10148
|
var charCodeAt = uncurryThis$1(''.charCodeAt);
|
|
@@ -9927,7 +10185,7 @@ var advanceStringIndex$1 = function (S, index, unicode) {
|
|
|
9927
10185
|
};
|
|
9928
10186
|
|
|
9929
10187
|
var call$1 = functionCall;
|
|
9930
|
-
var anObject$1 = anObject$
|
|
10188
|
+
var anObject$1 = anObject$d;
|
|
9931
10189
|
var isCallable = isCallable$n;
|
|
9932
10190
|
var classof = classofRaw$2;
|
|
9933
10191
|
var regexpExec = regexpExec$2;
|
|
@@ -9950,9 +10208,9 @@ var regexpExecAbstract = function (R, S) {
|
|
|
9950
10208
|
var call = functionCall;
|
|
9951
10209
|
var uncurryThis = functionUncurryThis;
|
|
9952
10210
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
9953
|
-
var anObject = anObject$
|
|
10211
|
+
var anObject = anObject$d;
|
|
9954
10212
|
var isNullOrUndefined = isNullOrUndefined$5;
|
|
9955
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
10213
|
+
var requireObjectCoercible = requireObjectCoercible$7;
|
|
9956
10214
|
var speciesConstructor = speciesConstructor$2;
|
|
9957
10215
|
var advanceStringIndex = advanceStringIndex$1;
|
|
9958
10216
|
var toLength = toLength$2;
|
|
@@ -10162,7 +10420,10 @@ const LayerInfoDialog = ({
|
|
|
10162
10420
|
const styles = getLayerStyles(layer);
|
|
10163
10421
|
const bbox = getLayerBbox(layer);
|
|
10164
10422
|
const dimensions = getDimensionsList(layer.dimensions);
|
|
10165
|
-
|
|
10423
|
+
const {
|
|
10424
|
+
t
|
|
10425
|
+
} = useTranslation(WEBMAP_REACT_NAMESPACE);
|
|
10426
|
+
return /*#__PURE__*/React__default.createElement(WebmapReactTranslationsWrapper, null, /*#__PURE__*/React__default.createElement(ToolContainerDraggable, {
|
|
10166
10427
|
onClose: onClose,
|
|
10167
10428
|
startSize: {
|
|
10168
10429
|
width: 288,
|
|
@@ -10182,38 +10443,40 @@ const LayerInfoDialog = ({
|
|
|
10182
10443
|
padding: 2
|
|
10183
10444
|
}
|
|
10184
10445
|
}, /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10185
|
-
label:
|
|
10446
|
+
label: t('webmap-react-title'),
|
|
10186
10447
|
value: layer.title
|
|
10187
10448
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10188
|
-
label:
|
|
10449
|
+
label: t('webmap-react-name'),
|
|
10189
10450
|
value: layer.name
|
|
10190
10451
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10191
|
-
label:
|
|
10452
|
+
label: t('webmap-react-service'),
|
|
10192
10453
|
value: serviceName
|
|
10193
10454
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10194
|
-
label:
|
|
10455
|
+
label: t('webmap-react-abstract'),
|
|
10195
10456
|
value: layer.abstract || '-'
|
|
10196
10457
|
}), /*#__PURE__*/React__default.createElement(LayerInfoList, {
|
|
10197
|
-
label:
|
|
10458
|
+
label: t('webmap-react-dimensions'),
|
|
10198
10459
|
list: dimensions
|
|
10199
10460
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10200
|
-
label:
|
|
10461
|
+
label: t('webmap-react-styles'),
|
|
10201
10462
|
value: styles
|
|
10202
10463
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10203
|
-
label:
|
|
10464
|
+
label: t('webmap-react-bounding-box', {
|
|
10465
|
+
ns: WEBMAP_REACT_NAMESPACE
|
|
10466
|
+
}),
|
|
10204
10467
|
value: bbox
|
|
10205
10468
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10206
|
-
label:
|
|
10469
|
+
label: t('webmap-react-groups'),
|
|
10207
10470
|
value: ((_a = layer.path) === null || _a === void 0 ? void 0 : _a.join('/')) || '-'
|
|
10208
10471
|
}), /*#__PURE__*/React__default.createElement(LayerInfoText, {
|
|
10209
|
-
label:
|
|
10472
|
+
label: t('webmap-react-keywords'),
|
|
10210
10473
|
value: ((_b = layer.keywords) === null || _b === void 0 ? void 0 : _b.join(', ')) || '-'
|
|
10211
10474
|
}), /*#__PURE__*/React__default.createElement(LayerInfoLegend, {
|
|
10212
10475
|
title: layer.title,
|
|
10213
10476
|
name: layer.name,
|
|
10214
10477
|
dimensions: layer.dimensions,
|
|
10215
10478
|
legendURL: ((_c = layer.styles) === null || _c === void 0 ? void 0 : _c.length) ? layer.styles[0].legendURL : undefined
|
|
10216
|
-
})));
|
|
10479
|
+
}))));
|
|
10217
10480
|
};
|
|
10218
10481
|
|
|
10219
10482
|
/* *
|
|
@@ -10776,4 +11039,4 @@ var publicLayers = /*#__PURE__*/Object.freeze({
|
|
|
10776
11039
|
msgNaturalEUMETSAT: msgNaturalEUMETSAT
|
|
10777
11040
|
});
|
|
10778
11041
|
|
|
10779
|
-
export { DRAWMODE, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EDITMODE, EditModeButton as EditModeButtonField, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendDialog, LegendLayout, MapControlButton, MapControls, MapDimensionSelect, MapDrawContainer, MapTime, MapView, MapViewLayer, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION, ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO, ReactMapView, ReactMapViewLayer, SelectField, StoryLayoutGrid, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, checkHoverFeatures, createInterSections, currentlySupportedDrawModes, defaultBox, defaultDelete, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultModes, defaultPoint, defaultPolygon, defaultTimeFormat, dimensionConfig, distance, drawPolyStoryStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureBox, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawFunctionFromStore, getFeatureCollection, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getTimeDimension, getToolIcon, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isGeoJSONFeatureCreatedByTool, isPointFeatureCollection, lineString, marksByDimension, moveFeature, opacityOptions, publicLayers, publicServices, registerDrawFunction, rewindGeometry, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useGeoJSON, useMapDrawTool };
|
|
11042
|
+
export { DRAWMODE, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EDITMODE, EditModeButton as EditModeButtonField, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendDialog, LegendLayout, MINUTE_TO_MILLISECOND, MapControlButton, MapControls, MapDimensionSelect, MapDrawContainer, MapTime, MapView, MapViewLayer, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION, ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO, ReactMapView, ReactMapViewLayer, SelectField, StoryLayoutGrid, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, checkHoverFeatures, createInterSections, currentlySupportedDrawModes, defaultBox, defaultDelete, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultModes, defaultPoint, defaultPolygon, defaultTimeFormat, dimensionConfig, distance, drawPolyStoryStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureBox, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawFunctionFromStore, getFeatureCollection, getFeatureExtent, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getTimeDimension, getToolIcon, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isGeoJSONFeatureCreatedByTool, isPointFeatureCollection, lineString, marksByDimension, moveFeature, opacityOptions, publicLayers, publicServices, registerDrawFunction, rewindGeometry, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useGeoJSON, useMapDrawTool };
|