@opengeoweb/cap 9.15.0 → 9.17.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 CHANGED
@@ -2,16 +2,38 @@ import React from 'react';
2
2
  import { useApiContext, useApi, createNonAuthApiInstance, ApiProvider } from '@opengeoweb/api';
3
3
  import { Grid, Typography, Box, Card, CircularProgress } from '@mui/material';
4
4
  import { Box as Box$1 } from '@mui/system';
5
- import { dateUtils, AlertBanner, withEggs } from '@opengeoweb/shared';
6
- import { useTranslation } from 'react-i18next';
5
+ import { dateUtils, AlertBanner } from '@opengeoweb/shared';
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
- import { mapSelectors, coreModuleConfig } from '@opengeoweb/store';
11
+ import { mapSelectors } from '@opengeoweb/store';
12
12
  import { webmapUtils } from '@opengeoweb/webmap';
13
13
  import { MapViewLayer, MapWarningProperties } from '@opengeoweb/webmap-react';
14
- import { ThemeWrapper } from '@opengeoweb/theme';
14
+
15
+ var en = {
16
+ "map-view-cap-error-title": "Something went wrong with loading the configuration file",
17
+ "warning-list-cap-alert-banner-title": "Note: Only map is affected by timeslider based filtering",
18
+ "warning-list-cap-error-title": "Something went wrong with loading the configuration file",
19
+ "warning-list-row-event": "Event",
20
+ "warning-list-row-severity": "Severity",
21
+ "warning-list-row-expires": "Expires",
22
+ "warning-list-row-not-expired": "(not expired)"
23
+ };
24
+ var fi = {
25
+ "map-view-cap-error-title": "🚧 ei käännetty",
26
+ "warning-list-cap-alert-banner-title": "🚧 ei käännetty",
27
+ "warning-list-cap-error-title": "🚧 ei käännetty",
28
+ "warning-list-row-event": "🚧 ei käännetty",
29
+ "warning-list-row-severity": "🚧 ei käännetty",
30
+ "warning-list-row-expires": "🚧 ei käännetty",
31
+ "warning-list-row-not-expired": "🚧 ei käännetty"
32
+ };
33
+ var capTrans = {
34
+ en: en,
35
+ fi: fi
36
+ };
15
37
 
16
38
  /* *
17
39
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1805,97 +1827,24 @@ const findEventIndexInLanguage = (languages, capWarningPresets, feedAddressFromP
1805
1827
  return languageIndex;
1806
1828
  };
1807
1829
 
1808
- var DESCRIPTORS$2 = descriptors;
1809
- var uncurryThis$8 = functionUncurryThis;
1810
- var call$c = functionCall;
1811
- var fails$9 = fails$k;
1812
- var objectKeys = objectKeys$2;
1813
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1814
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1815
- var toObject$3 = toObject$6;
1816
- var IndexedObject$1 = indexedObject;
1817
-
1818
- // eslint-disable-next-line es/no-object-assign -- safe
1819
- var $assign = Object.assign;
1820
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1821
- var defineProperty$1 = Object.defineProperty;
1822
- var concat$1 = uncurryThis$8([].concat);
1823
-
1824
- // `Object.assign` method
1825
- // https://tc39.es/ecma262/#sec-object.assign
1826
- var objectAssign = !$assign || fails$9(function () {
1827
- // should have correct order of operations (Edge bug)
1828
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
1829
- enumerable: true,
1830
- get: function () {
1831
- defineProperty$1(this, 'b', {
1832
- value: 3,
1833
- enumerable: false
1834
- });
1835
- }
1836
- }), { b: 2 })).b !== 1) return true;
1837
- // should work with symbols and should have deterministic property order (V8 bug)
1838
- var A = {};
1839
- var B = {};
1840
- // eslint-disable-next-line es/no-symbol -- safe
1841
- var symbol = Symbol('assign detection');
1842
- var alphabet = 'abcdefghijklmnopqrst';
1843
- A[symbol] = 7;
1844
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1845
- return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1846
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1847
- var T = toObject$3(target);
1848
- var argumentsLength = arguments.length;
1849
- var index = 1;
1850
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1851
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1852
- while (argumentsLength > index) {
1853
- var S = IndexedObject$1(arguments[index++]);
1854
- var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1855
- var length = keys.length;
1856
- var j = 0;
1857
- var key;
1858
- while (length > j) {
1859
- key = keys[j++];
1860
- if (!DESCRIPTORS$2 || call$c(propertyIsEnumerable, S, key)) T[key] = S[key];
1861
- }
1862
- } return T;
1863
- } : $assign;
1864
-
1865
- var $$c = _export;
1866
- var assign = objectAssign;
1867
-
1868
- // `Object.assign` method
1869
- // https://tc39.es/ecma262/#sec-object.assign
1870
- // eslint-disable-next-line es/no-object-assign -- required for testing
1871
- $$c({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1872
- assign: assign
1873
- });
1874
-
1875
- var en = {
1876
- "map-view-cap-error-title": "Something went wrong with loading the configuration file",
1877
- "warning-list-cap-alert-banner-title": "Note: Only map is affected by timeslider based filtering",
1878
- "warning-list-cap-error-title": "Something went wrong with loading the configuration file",
1879
- "warning-list-row-event": "Event",
1880
- "warning-list-row-severity": "Severity",
1881
- "warning-list-row-expires": "Expires",
1882
- "warning-list-row-not-expired": "(not expired)"
1883
- };
1884
- var fi = {
1885
- "map-view-cap-error-title": "🚧 ei käännetty",
1886
- "warning-list-cap-alert-banner-title": "🚧 ei käännetty",
1887
- "warning-list-cap-error-title": "🚧 ei käännetty",
1888
- "warning-list-row-event": "🚧 ei käännetty",
1889
- "warning-list-row-severity": "🚧 ei käännetty",
1890
- "warning-list-row-expires": "🚧 ei käännetty",
1891
- "warning-list-row-not-expired": "🚧 ei käännetty"
1892
- };
1893
- var capTrans = {
1894
- en: en,
1895
- fi: fi
1896
- };
1897
-
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
+ * */
1898
1846
  const CAP_NAMESPACE = 'cap';
1847
+ const useCapTranslation = () => useTranslation(CAP_NAMESPACE);
1899
1848
 
1900
1849
  /* *
1901
1850
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1938,7 +1887,7 @@ const WarningListRowCap = ({
1938
1887
  }) => {
1939
1888
  const {
1940
1889
  t
1941
- } = useTranslation(CAP_NAMESPACE);
1890
+ } = useCapTranslation();
1942
1891
  return /*#__PURE__*/React.createElement(Grid, {
1943
1892
  container: true,
1944
1893
  sx: {
@@ -2026,7 +1975,7 @@ const WarningListCap = ({
2026
1975
  }) => {
2027
1976
  const {
2028
1977
  t
2029
- } = useTranslation(CAP_NAMESPACE);
1978
+ } = useCapTranslation();
2030
1979
  return /*#__PURE__*/React.createElement(Box, {
2031
1980
  sx: {
2032
1981
  width: '100%',
@@ -2120,7 +2069,7 @@ const WarningListCapConnectWrapper = ({
2120
2069
  } = useApiContext();
2121
2070
  const {
2122
2071
  t
2123
- } = useTranslation(CAP_NAMESPACE);
2072
+ } = useCapTranslation();
2124
2073
  const {
2125
2074
  result: productConfig,
2126
2075
  isLoading: isConfigLoading,
@@ -2204,11 +2153,11 @@ var doesNotExceedSafeInteger$1 = function (it) {
2204
2153
  return it;
2205
2154
  };
2206
2155
 
2207
- var uncurryThis$7 = functionUncurryThisClause;
2156
+ var uncurryThis$8 = functionUncurryThisClause;
2208
2157
  var aCallable$8 = aCallable$b;
2209
2158
  var NATIVE_BIND$1 = functionBindNative;
2210
2159
 
2211
- var bind$5 = uncurryThis$7(uncurryThis$7.bind);
2160
+ var bind$5 = uncurryThis$8(uncurryThis$8.bind);
2212
2161
 
2213
2162
  // optional / simple context binding
2214
2163
  var functionBindContext = function (fn, that) {
@@ -2252,8 +2201,8 @@ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, d
2252
2201
 
2253
2202
  var flattenIntoArray_1 = flattenIntoArray$1;
2254
2203
 
2255
- var uncurryThis$6 = functionUncurryThis;
2256
- var fails$8 = fails$k;
2204
+ var uncurryThis$7 = functionUncurryThis;
2205
+ var fails$9 = fails$k;
2257
2206
  var isCallable$6 = isCallable$l;
2258
2207
  var classof$3 = classof$7;
2259
2208
  var getBuiltIn$3 = getBuiltIn$7;
@@ -2262,7 +2211,7 @@ var inspectSource$1 = inspectSource$3;
2262
2211
  var noop = function () { /* empty */ };
2263
2212
  var construct = getBuiltIn$3('Reflect', 'construct');
2264
2213
  var constructorRegExp = /^\s*(?:class|function)\b/;
2265
- var exec$1 = uncurryThis$6(constructorRegExp.exec);
2214
+ var exec$1 = uncurryThis$7(constructorRegExp.exec);
2266
2215
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2267
2216
 
2268
2217
  var isConstructorModern = function isConstructor(argument) {
@@ -2296,7 +2245,7 @@ isConstructorLegacy.sham = true;
2296
2245
 
2297
2246
  // `IsConstructor` abstract operation
2298
2247
  // https://tc39.es/ecma262/#sec-isconstructor
2299
- var isConstructor$2 = !construct || fails$8(function () {
2248
+ var isConstructor$2 = !construct || fails$9(function () {
2300
2249
  var called;
2301
2250
  return isConstructorModern(isConstructorModern.call)
2302
2251
  || !isConstructorModern(Object)
@@ -2335,18 +2284,18 @@ var arraySpeciesCreate$1 = function (originalArray, length) {
2335
2284
  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2336
2285
  };
2337
2286
 
2338
- var $$b = _export;
2287
+ var $$c = _export;
2339
2288
  var flattenIntoArray = flattenIntoArray_1;
2340
2289
  var aCallable$7 = aCallable$b;
2341
- var toObject$2 = toObject$6;
2290
+ var toObject$3 = toObject$6;
2342
2291
  var lengthOfArrayLike$2 = lengthOfArrayLike$5;
2343
2292
  var arraySpeciesCreate = arraySpeciesCreate$1;
2344
2293
 
2345
2294
  // `Array.prototype.flatMap` method
2346
2295
  // https://tc39.es/ecma262/#sec-array.prototype.flatmap
2347
- $$b({ target: 'Array', proto: true }, {
2296
+ $$c({ target: 'Array', proto: true }, {
2348
2297
  flatMap: function flatMap(callbackfn /* , thisArg */) {
2349
- var O = toObject$2(this);
2298
+ var O = toObject$3(this);
2350
2299
  var sourceLen = lengthOfArrayLike$2(O);
2351
2300
  var A;
2352
2301
  aCallable$7(callbackfn);
@@ -2356,20 +2305,20 @@ $$b({ target: 'Array', proto: true }, {
2356
2305
  }
2357
2306
  });
2358
2307
 
2359
- var $$a = _export;
2308
+ var $$b = _export;
2360
2309
  var $includes = arrayIncludes.includes;
2361
- var fails$7 = fails$k;
2310
+ var fails$8 = fails$k;
2362
2311
  var addToUnscopables$1 = addToUnscopables$3;
2363
2312
 
2364
2313
  // FF99+ bug
2365
- var BROKEN_ON_SPARSE = fails$7(function () {
2314
+ var BROKEN_ON_SPARSE = fails$8(function () {
2366
2315
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
2367
2316
  return !Array(1).includes();
2368
2317
  });
2369
2318
 
2370
2319
  // `Array.prototype.includes` method
2371
2320
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2372
- $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2321
+ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2373
2322
  includes: function includes(el /* , fromIndex = 0 */) {
2374
2323
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2375
2324
  }
@@ -2379,8 +2328,8 @@ $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2379
2328
  addToUnscopables$1('includes');
2380
2329
 
2381
2330
  var aCallable$6 = aCallable$b;
2382
- var toObject$1 = toObject$6;
2383
- var IndexedObject = indexedObject;
2331
+ var toObject$2 = toObject$6;
2332
+ var IndexedObject$1 = indexedObject;
2384
2333
  var lengthOfArrayLike$1 = lengthOfArrayLike$5;
2385
2334
 
2386
2335
  var $TypeError$7 = TypeError;
@@ -2390,8 +2339,8 @@ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
2390
2339
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
2391
2340
  var createMethod$1 = function (IS_RIGHT) {
2392
2341
  return function (that, callbackfn, argumentsLength, memo) {
2393
- var O = toObject$1(that);
2394
- var self = IndexedObject(O);
2342
+ var O = toObject$2(that);
2343
+ var self = IndexedObject$1(O);
2395
2344
  var length = lengthOfArrayLike$1(O);
2396
2345
  aCallable$6(callbackfn);
2397
2346
  if (length === 0 && argumentsLength < 2) throw new $TypeError$7(REDUCE_EMPTY);
@@ -2424,11 +2373,11 @@ var arrayReduce = {
2424
2373
  right: createMethod$1(true)
2425
2374
  };
2426
2375
 
2427
- var fails$6 = fails$k;
2376
+ var fails$7 = fails$k;
2428
2377
 
2429
2378
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
2430
2379
  var method = [][METHOD_NAME];
2431
- return !!method && fails$6(function () {
2380
+ return !!method && fails$7(function () {
2432
2381
  // eslint-disable-next-line no-useless-call -- required for testing
2433
2382
  method.call(null, argument || function () { return 1; }, 1);
2434
2383
  });
@@ -2439,7 +2388,7 @@ var classof$2 = classofRaw$2;
2439
2388
 
2440
2389
  var engineIsNode = classof$2(global$a.process) === 'process';
2441
2390
 
2442
- var $$9 = _export;
2391
+ var $$a = _export;
2443
2392
  var $reduce = arrayReduce.left;
2444
2393
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
2445
2394
  var CHROME_VERSION = engineV8Version;
@@ -2452,7 +2401,7 @@ var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
2452
2401
 
2453
2402
  // `Array.prototype.reduce` method
2454
2403
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
2455
- $$9({ target: 'Array', proto: true, forced: FORCED }, {
2404
+ $$a({ target: 'Array', proto: true, forced: FORCED }, {
2456
2405
  reduce: function reduce(callbackfn /* , initialValue */) {
2457
2406
  var length = arguments.length;
2458
2407
  return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
@@ -2466,6 +2415,73 @@ var addToUnscopables = addToUnscopables$3;
2466
2415
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2467
2416
  addToUnscopables('flatMap');
2468
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
+
2469
2485
  var makeBuiltIn = makeBuiltIn$3.exports;
2470
2486
  var defineProperty = objectDefineProperty;
2471
2487
 
@@ -4420,7 +4436,7 @@ const MapViewCapConnectWrapper = ({
4420
4436
  } = useApiContext();
4421
4437
  const {
4422
4438
  t
4423
- } = useTranslation(CAP_NAMESPACE);
4439
+ } = useCapTranslation();
4424
4440
  const {
4425
4441
  result: capWarningPresets,
4426
4442
  isLoading: isConfigLoading,
@@ -4453,54 +4469,6 @@ const MapViewCapConnectWrapper = ({
4453
4469
  });
4454
4470
  };
4455
4471
 
4456
- /* *
4457
- * Licensed under the Apache License, Version 2.0 (the "License");
4458
- * you may not use this file except in compliance with the License.
4459
- * You may obtain a copy of the License at
4460
- *
4461
- * http://www.apache.org/licenses/LICENSE-2.0
4462
- *
4463
- * Unless required by applicable law or agreed to in writing, software
4464
- * distributed under the License is distributed on an "AS IS" BASIS,
4465
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4466
- * See the License for the specific language governing permissions and
4467
- * limitations under the License.
4468
- *
4469
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4470
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
4471
- * */
4472
- const capModuleConfig = {
4473
- id: 'capStore-module',
4474
- reducersMap: {
4475
- capStore: reducer
4476
- }
4477
- };
4478
-
4479
- const CapThemeWrapper = ({
4480
- theme,
4481
- children
4482
- }) => /*#__PURE__*/React.createElement(ThemeWrapper, {
4483
- theme: theme
4484
- }, children);
4485
- withEggs([capModuleConfig, ...coreModuleConfig])(({
4486
- theme,
4487
- children
4488
- }) => ( /*#__PURE__*/React.createElement(CapThemeWrapper, {
4489
- theme: theme
4490
- }, children)));
4491
- const CapTranslationsWrapper = ({
4492
- children
4493
- }) => {
4494
- const {
4495
- i18n
4496
- } = useTranslation();
4497
- React.useEffect(() => {
4498
- i18n.addResourceBundle('en', CAP_NAMESPACE, capTrans.en);
4499
- i18n.addResourceBundle('fi', CAP_NAMESPACE, capTrans.fi);
4500
- }, [i18n]);
4501
- return children;
4502
- };
4503
-
4504
4472
  /* *
4505
4473
  * Licensed under the Apache License, Version 2.0 (the "License");
4506
4474
  * you may not use this file except in compliance with the License.
@@ -4536,7 +4504,7 @@ const ComponentsLookUp = ({
4536
4504
  switch (componentType) {
4537
4505
  case 'CapWarningMap':
4538
4506
  {
4539
- return /*#__PURE__*/React.createElement(CapTranslationsWrapper, null, /*#__PURE__*/React.createElement(ApiProvider, {
4507
+ return /*#__PURE__*/React.createElement(ApiProvider, {
4540
4508
  config: {
4541
4509
  baseURL: config.baseURL
4542
4510
  },
@@ -4547,22 +4515,45 @@ const ComponentsLookUp = ({
4547
4515
  srs: (_b = initialProps.mapPreset.proj) === null || _b === void 0 ? void 0 : _b.srs,
4548
4516
  layers: initialProps.mapPreset.layers,
4549
4517
  productConfigKey: productConfigKey
4550
- })));
4518
+ }));
4551
4519
  }
4552
4520
  case 'CapWarningList':
4553
4521
  {
4554
- return /*#__PURE__*/React.createElement(CapTranslationsWrapper, null, /*#__PURE__*/React.createElement(ApiProvider, {
4522
+ return /*#__PURE__*/React.createElement(ApiProvider, {
4555
4523
  config: {
4556
4524
  baseURL: config.baseURL
4557
4525
  },
4558
4526
  createApi: createApi
4559
4527
  }, /*#__PURE__*/React.createElement(WarningListCapConnectWrapper, {
4560
4528
  productConfigKey: productConfigKey
4561
- })));
4529
+ }));
4562
4530
  }
4563
4531
  default:
4564
4532
  return null;
4565
4533
  }
4566
4534
  };
4567
4535
 
4568
- export { ComponentsLookUp, capModuleConfig, reducer as capReducer };
4536
+ /* *
4537
+ * Licensed under the Apache License, Version 2.0 (the "License");
4538
+ * you may not use this file except in compliance with the License.
4539
+ * You may obtain a copy of the License at
4540
+ *
4541
+ * http://www.apache.org/licenses/LICENSE-2.0
4542
+ *
4543
+ * Unless required by applicable law or agreed to in writing, software
4544
+ * distributed under the License is distributed on an "AS IS" BASIS,
4545
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4546
+ * See the License for the specific language governing permissions and
4547
+ * limitations under the License.
4548
+ *
4549
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4550
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
4551
+ * */
4552
+ const capModuleConfig = {
4553
+ id: 'capStore-module',
4554
+ reducersMap: {
4555
+ capStore: reducer
4556
+ }
4557
+ };
4558
+
4559
+ export { ComponentsLookUp, capModuleConfig, reducer as capReducer, capTrans };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/cap",
3
- "version": "9.15.0",
3
+ "version": "9.17.0",
4
4
  "description": "GeoWeb Common Alerting Protocol (CAP) library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.d.ts CHANGED
@@ -1 +1,3 @@
1
+ import capTrans from '../locales/cap.json';
1
2
  export * from './lib';
3
+ export { capTrans };
@@ -25,6 +25,5 @@ export interface CapStoreProviderProps extends ThemeProviderProps {
25
25
  store: Store;
26
26
  }
27
27
  export declare const CapThemeStoreProvider: React.FC<CapThemeStoreProviderProps>;
28
- export declare const CapTranslationsWrapper: React.FC<CapTranslationsWrapperProps>;
29
28
  export declare const CapI18nProvider: React.FC<CapTranslationsWrapperProps>;
30
29
  export {};
@@ -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>;