@opengeoweb/cap 9.16.0 → 9.18.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 +111 -94
- package/package.json +1 -1
- package/src/lib/utils/i18n.d.ts +3 -0
package/index.esm.js
CHANGED
|
@@ -3,10 +3,10 @@ import { useApiContext, useApi, createNonAuthApiInstance, ApiProvider } from '@o
|
|
|
3
3
|
import { Grid, Typography, Box, Card, CircularProgress } from '@mui/material';
|
|
4
4
|
import { Box as Box$1 } from '@mui/system';
|
|
5
5
|
import { dateUtils, AlertBanner } from '@opengeoweb/shared';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
6
|
import { useSelector, useDispatch } from 'react-redux';
|
|
8
7
|
import { createEntityAdapter, createSlice, createSelector } from '@reduxjs/toolkit';
|
|
9
8
|
import 'i18next';
|
|
9
|
+
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import { ConfigurableMapConnect } from '@opengeoweb/core';
|
|
11
11
|
import { mapSelectors } from '@opengeoweb/store';
|
|
12
12
|
import { webmapUtils } from '@opengeoweb/webmap';
|
|
@@ -1827,74 +1827,24 @@ const findEventIndexInLanguage = (languages, capWarningPresets, feedAddressFromP
|
|
|
1827
1827
|
return languageIndex;
|
|
1828
1828
|
};
|
|
1829
1829
|
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
// `Object.assign` method
|
|
1847
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1848
|
-
var objectAssign = !$assign || fails$9(function () {
|
|
1849
|
-
// should have correct order of operations (Edge bug)
|
|
1850
|
-
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
|
|
1851
|
-
enumerable: true,
|
|
1852
|
-
get: function () {
|
|
1853
|
-
defineProperty$1(this, 'b', {
|
|
1854
|
-
value: 3,
|
|
1855
|
-
enumerable: false
|
|
1856
|
-
});
|
|
1857
|
-
}
|
|
1858
|
-
}), { b: 2 })).b !== 1) return true;
|
|
1859
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1860
|
-
var A = {};
|
|
1861
|
-
var B = {};
|
|
1862
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
1863
|
-
var symbol = Symbol('assign detection');
|
|
1864
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
1865
|
-
A[symbol] = 7;
|
|
1866
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1867
|
-
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1868
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1869
|
-
var T = toObject$3(target);
|
|
1870
|
-
var argumentsLength = arguments.length;
|
|
1871
|
-
var index = 1;
|
|
1872
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1873
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1874
|
-
while (argumentsLength > index) {
|
|
1875
|
-
var S = IndexedObject$1(arguments[index++]);
|
|
1876
|
-
var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1877
|
-
var length = keys.length;
|
|
1878
|
-
var j = 0;
|
|
1879
|
-
var key;
|
|
1880
|
-
while (length > j) {
|
|
1881
|
-
key = keys[j++];
|
|
1882
|
-
if (!DESCRIPTORS$2 || call$c(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1883
|
-
}
|
|
1884
|
-
} return T;
|
|
1885
|
-
} : $assign;
|
|
1886
|
-
|
|
1887
|
-
var $$c = _export;
|
|
1888
|
-
var assign = objectAssign;
|
|
1889
|
-
|
|
1890
|
-
// `Object.assign` method
|
|
1891
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1892
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1893
|
-
$$c({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1894
|
-
assign: assign
|
|
1895
|
-
});
|
|
1896
|
-
|
|
1830
|
+
/* *
|
|
1831
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1832
|
+
* you may not use this file except in compliance with the License.
|
|
1833
|
+
* You may obtain a copy of the License at
|
|
1834
|
+
*
|
|
1835
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1836
|
+
*
|
|
1837
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1838
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1839
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1840
|
+
* See the License for the specific language governing permissions and
|
|
1841
|
+
* limitations under the License.
|
|
1842
|
+
*
|
|
1843
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1844
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1845
|
+
* */
|
|
1897
1846
|
const CAP_NAMESPACE = 'cap';
|
|
1847
|
+
const useCapTranslation = () => useTranslation(CAP_NAMESPACE);
|
|
1898
1848
|
|
|
1899
1849
|
/* *
|
|
1900
1850
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1937,7 +1887,7 @@ const WarningListRowCap = ({
|
|
|
1937
1887
|
}) => {
|
|
1938
1888
|
const {
|
|
1939
1889
|
t
|
|
1940
|
-
} =
|
|
1890
|
+
} = useCapTranslation();
|
|
1941
1891
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
1942
1892
|
container: true,
|
|
1943
1893
|
sx: {
|
|
@@ -2025,7 +1975,7 @@ const WarningListCap = ({
|
|
|
2025
1975
|
}) => {
|
|
2026
1976
|
const {
|
|
2027
1977
|
t
|
|
2028
|
-
} =
|
|
1978
|
+
} = useCapTranslation();
|
|
2029
1979
|
return /*#__PURE__*/React.createElement(Box, {
|
|
2030
1980
|
sx: {
|
|
2031
1981
|
width: '100%',
|
|
@@ -2119,7 +2069,7 @@ const WarningListCapConnectWrapper = ({
|
|
|
2119
2069
|
} = useApiContext();
|
|
2120
2070
|
const {
|
|
2121
2071
|
t
|
|
2122
|
-
} =
|
|
2072
|
+
} = useCapTranslation();
|
|
2123
2073
|
const {
|
|
2124
2074
|
result: productConfig,
|
|
2125
2075
|
isLoading: isConfigLoading,
|
|
@@ -2203,11 +2153,11 @@ var doesNotExceedSafeInteger$1 = function (it) {
|
|
|
2203
2153
|
return it;
|
|
2204
2154
|
};
|
|
2205
2155
|
|
|
2206
|
-
var uncurryThis$
|
|
2156
|
+
var uncurryThis$8 = functionUncurryThisClause;
|
|
2207
2157
|
var aCallable$8 = aCallable$b;
|
|
2208
2158
|
var NATIVE_BIND$1 = functionBindNative;
|
|
2209
2159
|
|
|
2210
|
-
var bind$5 = uncurryThis$
|
|
2160
|
+
var bind$5 = uncurryThis$8(uncurryThis$8.bind);
|
|
2211
2161
|
|
|
2212
2162
|
// optional / simple context binding
|
|
2213
2163
|
var functionBindContext = function (fn, that) {
|
|
@@ -2251,8 +2201,8 @@ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, d
|
|
|
2251
2201
|
|
|
2252
2202
|
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
2253
2203
|
|
|
2254
|
-
var uncurryThis$
|
|
2255
|
-
var fails$
|
|
2204
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
2205
|
+
var fails$9 = fails$k;
|
|
2256
2206
|
var isCallable$6 = isCallable$l;
|
|
2257
2207
|
var classof$3 = classof$7;
|
|
2258
2208
|
var getBuiltIn$3 = getBuiltIn$7;
|
|
@@ -2261,7 +2211,7 @@ var inspectSource$1 = inspectSource$3;
|
|
|
2261
2211
|
var noop = function () { /* empty */ };
|
|
2262
2212
|
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
2263
2213
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
2264
|
-
var exec$1 = uncurryThis$
|
|
2214
|
+
var exec$1 = uncurryThis$7(constructorRegExp.exec);
|
|
2265
2215
|
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
2266
2216
|
|
|
2267
2217
|
var isConstructorModern = function isConstructor(argument) {
|
|
@@ -2295,7 +2245,7 @@ isConstructorLegacy.sham = true;
|
|
|
2295
2245
|
|
|
2296
2246
|
// `IsConstructor` abstract operation
|
|
2297
2247
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
2298
|
-
var isConstructor$2 = !construct || fails$
|
|
2248
|
+
var isConstructor$2 = !construct || fails$9(function () {
|
|
2299
2249
|
var called;
|
|
2300
2250
|
return isConstructorModern(isConstructorModern.call)
|
|
2301
2251
|
|| !isConstructorModern(Object)
|
|
@@ -2334,18 +2284,18 @@ var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
|
2334
2284
|
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
2335
2285
|
};
|
|
2336
2286
|
|
|
2337
|
-
var $$
|
|
2287
|
+
var $$c = _export;
|
|
2338
2288
|
var flattenIntoArray = flattenIntoArray_1;
|
|
2339
2289
|
var aCallable$7 = aCallable$b;
|
|
2340
|
-
var toObject$
|
|
2290
|
+
var toObject$3 = toObject$6;
|
|
2341
2291
|
var lengthOfArrayLike$2 = lengthOfArrayLike$5;
|
|
2342
2292
|
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
2343
2293
|
|
|
2344
2294
|
// `Array.prototype.flatMap` method
|
|
2345
2295
|
// https://tc39.es/ecma262/#sec-array.prototype.flatmap
|
|
2346
|
-
$$
|
|
2296
|
+
$$c({ target: 'Array', proto: true }, {
|
|
2347
2297
|
flatMap: function flatMap(callbackfn /* , thisArg */) {
|
|
2348
|
-
var O = toObject$
|
|
2298
|
+
var O = toObject$3(this);
|
|
2349
2299
|
var sourceLen = lengthOfArrayLike$2(O);
|
|
2350
2300
|
var A;
|
|
2351
2301
|
aCallable$7(callbackfn);
|
|
@@ -2355,20 +2305,20 @@ $$b({ target: 'Array', proto: true }, {
|
|
|
2355
2305
|
}
|
|
2356
2306
|
});
|
|
2357
2307
|
|
|
2358
|
-
var $$
|
|
2308
|
+
var $$b = _export;
|
|
2359
2309
|
var $includes = arrayIncludes.includes;
|
|
2360
|
-
var fails$
|
|
2310
|
+
var fails$8 = fails$k;
|
|
2361
2311
|
var addToUnscopables$1 = addToUnscopables$3;
|
|
2362
2312
|
|
|
2363
2313
|
// FF99+ bug
|
|
2364
|
-
var BROKEN_ON_SPARSE = fails$
|
|
2314
|
+
var BROKEN_ON_SPARSE = fails$8(function () {
|
|
2365
2315
|
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
2366
2316
|
return !Array(1).includes();
|
|
2367
2317
|
});
|
|
2368
2318
|
|
|
2369
2319
|
// `Array.prototype.includes` method
|
|
2370
2320
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2371
|
-
$$
|
|
2321
|
+
$$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
2372
2322
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
2373
2323
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
2374
2324
|
}
|
|
@@ -2378,8 +2328,8 @@ $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
|
2378
2328
|
addToUnscopables$1('includes');
|
|
2379
2329
|
|
|
2380
2330
|
var aCallable$6 = aCallable$b;
|
|
2381
|
-
var toObject$
|
|
2382
|
-
var IndexedObject = indexedObject;
|
|
2331
|
+
var toObject$2 = toObject$6;
|
|
2332
|
+
var IndexedObject$1 = indexedObject;
|
|
2383
2333
|
var lengthOfArrayLike$1 = lengthOfArrayLike$5;
|
|
2384
2334
|
|
|
2385
2335
|
var $TypeError$7 = TypeError;
|
|
@@ -2389,8 +2339,8 @@ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
|
|
|
2389
2339
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
2390
2340
|
var createMethod$1 = function (IS_RIGHT) {
|
|
2391
2341
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
2392
|
-
var O = toObject$
|
|
2393
|
-
var self = IndexedObject(O);
|
|
2342
|
+
var O = toObject$2(that);
|
|
2343
|
+
var self = IndexedObject$1(O);
|
|
2394
2344
|
var length = lengthOfArrayLike$1(O);
|
|
2395
2345
|
aCallable$6(callbackfn);
|
|
2396
2346
|
if (length === 0 && argumentsLength < 2) throw new $TypeError$7(REDUCE_EMPTY);
|
|
@@ -2423,11 +2373,11 @@ var arrayReduce = {
|
|
|
2423
2373
|
right: createMethod$1(true)
|
|
2424
2374
|
};
|
|
2425
2375
|
|
|
2426
|
-
var fails$
|
|
2376
|
+
var fails$7 = fails$k;
|
|
2427
2377
|
|
|
2428
2378
|
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
2429
2379
|
var method = [][METHOD_NAME];
|
|
2430
|
-
return !!method && fails$
|
|
2380
|
+
return !!method && fails$7(function () {
|
|
2431
2381
|
// eslint-disable-next-line no-useless-call -- required for testing
|
|
2432
2382
|
method.call(null, argument || function () { return 1; }, 1);
|
|
2433
2383
|
});
|
|
@@ -2438,7 +2388,7 @@ var classof$2 = classofRaw$2;
|
|
|
2438
2388
|
|
|
2439
2389
|
var engineIsNode = classof$2(global$a.process) === 'process';
|
|
2440
2390
|
|
|
2441
|
-
var $$
|
|
2391
|
+
var $$a = _export;
|
|
2442
2392
|
var $reduce = arrayReduce.left;
|
|
2443
2393
|
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
2444
2394
|
var CHROME_VERSION = engineV8Version;
|
|
@@ -2451,7 +2401,7 @@ var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
|
|
|
2451
2401
|
|
|
2452
2402
|
// `Array.prototype.reduce` method
|
|
2453
2403
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
2454
|
-
$$
|
|
2404
|
+
$$a({ target: 'Array', proto: true, forced: FORCED }, {
|
|
2455
2405
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
2456
2406
|
var length = arguments.length;
|
|
2457
2407
|
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
@@ -2465,6 +2415,73 @@ var addToUnscopables = addToUnscopables$3;
|
|
|
2465
2415
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2466
2416
|
addToUnscopables('flatMap');
|
|
2467
2417
|
|
|
2418
|
+
var DESCRIPTORS$2 = descriptors;
|
|
2419
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
2420
|
+
var call$c = functionCall;
|
|
2421
|
+
var fails$6 = fails$k;
|
|
2422
|
+
var objectKeys = objectKeys$2;
|
|
2423
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2424
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
2425
|
+
var toObject$1 = toObject$6;
|
|
2426
|
+
var IndexedObject = indexedObject;
|
|
2427
|
+
|
|
2428
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
2429
|
+
var $assign = Object.assign;
|
|
2430
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2431
|
+
var defineProperty$1 = Object.defineProperty;
|
|
2432
|
+
var concat$1 = uncurryThis$6([].concat);
|
|
2433
|
+
|
|
2434
|
+
// `Object.assign` method
|
|
2435
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
2436
|
+
var objectAssign = !$assign || fails$6(function () {
|
|
2437
|
+
// should have correct order of operations (Edge bug)
|
|
2438
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
|
|
2439
|
+
enumerable: true,
|
|
2440
|
+
get: function () {
|
|
2441
|
+
defineProperty$1(this, 'b', {
|
|
2442
|
+
value: 3,
|
|
2443
|
+
enumerable: false
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
}), { b: 2 })).b !== 1) return true;
|
|
2447
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
2448
|
+
var A = {};
|
|
2449
|
+
var B = {};
|
|
2450
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
2451
|
+
var symbol = Symbol('assign detection');
|
|
2452
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
2453
|
+
A[symbol] = 7;
|
|
2454
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
2455
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
2456
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
2457
|
+
var T = toObject$1(target);
|
|
2458
|
+
var argumentsLength = arguments.length;
|
|
2459
|
+
var index = 1;
|
|
2460
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
2461
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
2462
|
+
while (argumentsLength > index) {
|
|
2463
|
+
var S = IndexedObject(arguments[index++]);
|
|
2464
|
+
var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
2465
|
+
var length = keys.length;
|
|
2466
|
+
var j = 0;
|
|
2467
|
+
var key;
|
|
2468
|
+
while (length > j) {
|
|
2469
|
+
key = keys[j++];
|
|
2470
|
+
if (!DESCRIPTORS$2 || call$c(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
2471
|
+
}
|
|
2472
|
+
} return T;
|
|
2473
|
+
} : $assign;
|
|
2474
|
+
|
|
2475
|
+
var $$9 = _export;
|
|
2476
|
+
var assign = objectAssign;
|
|
2477
|
+
|
|
2478
|
+
// `Object.assign` method
|
|
2479
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
2480
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2481
|
+
$$9({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
2482
|
+
assign: assign
|
|
2483
|
+
});
|
|
2484
|
+
|
|
2468
2485
|
var makeBuiltIn = makeBuiltIn$3.exports;
|
|
2469
2486
|
var defineProperty = objectDefineProperty;
|
|
2470
2487
|
|
|
@@ -4419,7 +4436,7 @@ const MapViewCapConnectWrapper = ({
|
|
|
4419
4436
|
} = useApiContext();
|
|
4420
4437
|
const {
|
|
4421
4438
|
t
|
|
4422
|
-
} =
|
|
4439
|
+
} = useCapTranslation();
|
|
4423
4440
|
const {
|
|
4424
4441
|
result: capWarningPresets,
|
|
4425
4442
|
isLoading: isConfigLoading,
|
package/package.json
CHANGED
package/src/lib/utils/i18n.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import i18n from 'i18next';
|
|
2
|
+
import { UseTranslationResponse } from 'react-i18next';
|
|
1
3
|
export declare const CAP_NAMESPACE = "cap";
|
|
2
4
|
export declare const initCapTestI18n: () => void;
|
|
5
|
+
export declare const useCapTranslation: () => UseTranslationResponse<typeof CAP_NAMESPACE, typeof i18n>;
|