@opengeoweb/shared 9.14.0 → 9.16.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 +314 -131
- package/package.json +3 -2
- package/src/lib/components/SwitchButton/SwitchButton.d.ts +5 -1
- package/src/lib/components/TooltipSelect/TooltipSelect.d.ts +6 -4
- package/src/lib/hooks/index.d.ts +1 -0
- package/src/lib/hooks/useDebounce/useDebounce.d.ts +1 -0
- package/src/lib/hooks/useDebounce/useDebounce.spec.d.ts +1 -0
- package/src/lib/utils/dateUtils/dateUtils.d.ts +40 -2
- package/src/lib/utils/index.d.ts +1 -0
- package/src/lib/utils/translationUtils/index.d.ts +1 -0
- package/src/lib/utils/translationUtils/translationUtils.d.ts +7 -0
- package/src/lib/utils/translationUtils/translationUtils.spec.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -7,9 +7,10 @@ import Draggable from 'react-draggable';
|
|
|
7
7
|
import { Resizable } from 're-resizable';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import { useStore } from 'react-redux';
|
|
10
|
-
import { parseISO, parse, format, isEqual, add as add$1, sub as sub$1, differenceInYears as differenceInYears$1, differenceInMonths as differenceInMonths$1, differenceInDays as differenceInDays$1, differenceInMinutes as differenceInMinutes$1, differenceInHours as differenceInHours$1, differenceInSeconds as differenceInSeconds$1, isBefore as isBefore$1, isAfter as isAfter$1, isValid as isValid$1, getUnixTime, fromUnixTime, set as set$3, startOfDay, isWithinInterval } from 'date-fns';
|
|
10
|
+
import { parseISO, parse, format, isEqual, add as add$1, sub as sub$1, differenceInYears as differenceInYears$1, differenceInMonths as differenceInMonths$1, differenceInDays as differenceInDays$1, differenceInMinutes as differenceInMinutes$1, differenceInHours as differenceInHours$1, differenceInSeconds as differenceInSeconds$1, isBefore as isBefore$1, isAfter as isAfter$1, isValid as isValid$1, getUnixTime, fromUnixTime, set as set$3, getHours as getHours$1, startOfDay, isWithinInterval, getDay, getMonth, getYear, getWeek } from 'date-fns';
|
|
11
11
|
import configureStore from 'redux-mock-store';
|
|
12
12
|
import { configureStore as configureStore$1 } from '@reduxjs/toolkit';
|
|
13
|
+
import i18next from 'i18next';
|
|
13
14
|
|
|
14
15
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
15
16
|
|
|
@@ -18,7 +19,7 @@ var check = function (it) {
|
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
21
|
-
var global$
|
|
22
|
+
var global$p =
|
|
22
23
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
23
24
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
24
25
|
check(typeof window == 'object' && window) ||
|
|
@@ -138,17 +139,17 @@ var $TypeError$h = TypeError;
|
|
|
138
139
|
|
|
139
140
|
// `RequireObjectCoercible` abstract operation
|
|
140
141
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
141
|
-
var requireObjectCoercible$
|
|
142
|
+
var requireObjectCoercible$9 = function (it) {
|
|
142
143
|
if (isNullOrUndefined$6(it)) throw new $TypeError$h("Can't call method on " + it);
|
|
143
144
|
return it;
|
|
144
145
|
};
|
|
145
146
|
|
|
146
147
|
// toObject with fallback for non-array-like ES3 strings
|
|
147
148
|
var IndexedObject$2 = indexedObject;
|
|
148
|
-
var requireObjectCoercible$
|
|
149
|
+
var requireObjectCoercible$8 = requireObjectCoercible$9;
|
|
149
150
|
|
|
150
151
|
var toIndexedObject$5 = function (it) {
|
|
151
|
-
return IndexedObject$2(requireObjectCoercible$
|
|
152
|
+
return IndexedObject$2(requireObjectCoercible$8(it));
|
|
152
153
|
};
|
|
153
154
|
|
|
154
155
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
@@ -165,11 +166,11 @@ var isCallable$n = typeof documentAll == 'undefined' && documentAll !== undefine
|
|
|
165
166
|
|
|
166
167
|
var isCallable$m = isCallable$n;
|
|
167
168
|
|
|
168
|
-
var isObject$
|
|
169
|
+
var isObject$e = function (it) {
|
|
169
170
|
return typeof it == 'object' ? it !== null : isCallable$m(it);
|
|
170
171
|
};
|
|
171
172
|
|
|
172
|
-
var global$
|
|
173
|
+
var global$o = global$p;
|
|
173
174
|
var isCallable$l = isCallable$n;
|
|
174
175
|
|
|
175
176
|
var aFunction = function (argument) {
|
|
@@ -177,7 +178,7 @@ var aFunction = function (argument) {
|
|
|
177
178
|
};
|
|
178
179
|
|
|
179
180
|
var getBuiltIn$8 = function (namespace, method) {
|
|
180
|
-
return arguments.length < 2 ? aFunction(global$
|
|
181
|
+
return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
|
|
181
182
|
};
|
|
182
183
|
|
|
183
184
|
var uncurryThis$m = functionUncurryThis;
|
|
@@ -186,11 +187,11 @@ var objectIsPrototypeOf = uncurryThis$m({}.isPrototypeOf);
|
|
|
186
187
|
|
|
187
188
|
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
188
189
|
|
|
189
|
-
var global$
|
|
190
|
+
var global$n = global$p;
|
|
190
191
|
var userAgent$3 = engineUserAgent;
|
|
191
192
|
|
|
192
|
-
var process$3 = global$
|
|
193
|
-
var Deno$1 = global$
|
|
193
|
+
var process$3 = global$n.process;
|
|
194
|
+
var Deno$1 = global$n.Deno;
|
|
194
195
|
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
195
196
|
var v8 = versions && versions.v8;
|
|
196
197
|
var match, version;
|
|
@@ -217,9 +218,9 @@ var engineV8Version = version;
|
|
|
217
218
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
218
219
|
var V8_VERSION$1 = engineV8Version;
|
|
219
220
|
var fails$k = fails$o;
|
|
220
|
-
var global$
|
|
221
|
+
var global$m = global$p;
|
|
221
222
|
|
|
222
|
-
var $String$5 = global$
|
|
223
|
+
var $String$5 = global$m.String;
|
|
223
224
|
|
|
224
225
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
225
226
|
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
|
|
@@ -287,7 +288,7 @@ var getMethod$6 = function (V, P) {
|
|
|
287
288
|
|
|
288
289
|
var call$j = functionCall;
|
|
289
290
|
var isCallable$i = isCallable$n;
|
|
290
|
-
var isObject$
|
|
291
|
+
var isObject$d = isObject$e;
|
|
291
292
|
|
|
292
293
|
var $TypeError$f = TypeError;
|
|
293
294
|
|
|
@@ -295,55 +296,55 @@ var $TypeError$f = TypeError;
|
|
|
295
296
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
296
297
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
297
298
|
var fn, val;
|
|
298
|
-
if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$
|
|
299
|
-
if (isCallable$i(fn = input.valueOf) && !isObject$
|
|
300
|
-
if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$
|
|
299
|
+
if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$d(val = call$j(fn, input))) return val;
|
|
300
|
+
if (isCallable$i(fn = input.valueOf) && !isObject$d(val = call$j(fn, input))) return val;
|
|
301
|
+
if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$d(val = call$j(fn, input))) return val;
|
|
301
302
|
throw new $TypeError$f("Can't convert object to primitive value");
|
|
302
303
|
};
|
|
303
304
|
|
|
304
|
-
var
|
|
305
|
+
var sharedStore = {exports: {}};
|
|
305
306
|
|
|
306
|
-
var global$
|
|
307
|
+
var global$l = global$p;
|
|
307
308
|
|
|
308
309
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
309
310
|
var defineProperty$7 = Object.defineProperty;
|
|
310
311
|
|
|
311
312
|
var defineGlobalProperty$3 = function (key, value) {
|
|
312
313
|
try {
|
|
313
|
-
defineProperty$7(global$
|
|
314
|
+
defineProperty$7(global$l, key, { value: value, configurable: true, writable: true });
|
|
314
315
|
} catch (error) {
|
|
315
|
-
global$
|
|
316
|
+
global$l[key] = value;
|
|
316
317
|
} return value;
|
|
317
318
|
};
|
|
318
319
|
|
|
319
|
-
var
|
|
320
|
+
var globalThis$1 = global$p;
|
|
320
321
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
321
322
|
|
|
322
323
|
var SHARED = '__core-js_shared__';
|
|
323
|
-
var store$3 =
|
|
324
|
+
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
324
325
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
var store$2 = sharedStore;
|
|
328
|
-
|
|
329
|
-
(shared$4.exports = function (key, value) {
|
|
330
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
331
|
-
})('versions', []).push({
|
|
332
|
-
version: '3.35.1',
|
|
326
|
+
(store$3.versions || (store$3.versions = [])).push({
|
|
327
|
+
version: '3.36.1',
|
|
333
328
|
mode: 'global',
|
|
334
329
|
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
335
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
330
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
336
331
|
source: 'https://github.com/zloirock/core-js'
|
|
337
332
|
});
|
|
338
333
|
|
|
339
|
-
var
|
|
334
|
+
var store$2 = sharedStore.exports;
|
|
335
|
+
|
|
336
|
+
var shared$4 = function (key, value) {
|
|
337
|
+
return store$2[key] || (store$2[key] = value || {});
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
var requireObjectCoercible$7 = requireObjectCoercible$9;
|
|
340
341
|
|
|
341
342
|
var $Object$2 = Object;
|
|
342
343
|
|
|
343
344
|
// `ToObject` abstract operation
|
|
344
345
|
// https://tc39.es/ecma262/#sec-toobject
|
|
345
346
|
var toObject$5 = function (argument) {
|
|
346
|
-
return $Object$2(requireObjectCoercible$
|
|
347
|
+
return $Object$2(requireObjectCoercible$7(argument));
|
|
347
348
|
};
|
|
348
349
|
|
|
349
350
|
var uncurryThis$l = functionUncurryThis;
|
|
@@ -368,8 +369,8 @@ var uid$2 = function (key) {
|
|
|
368
369
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$d(++id + postfix, 36);
|
|
369
370
|
};
|
|
370
371
|
|
|
371
|
-
var global$k = global$
|
|
372
|
-
var shared$3 = shared$4
|
|
372
|
+
var global$k = global$p;
|
|
373
|
+
var shared$3 = shared$4;
|
|
373
374
|
var hasOwn$d = hasOwnProperty_1;
|
|
374
375
|
var uid$1 = uid$2;
|
|
375
376
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
@@ -388,7 +389,7 @@ var wellKnownSymbol$j = function (name) {
|
|
|
388
389
|
};
|
|
389
390
|
|
|
390
391
|
var call$i = functionCall;
|
|
391
|
-
var isObject$
|
|
392
|
+
var isObject$c = isObject$e;
|
|
392
393
|
var isSymbol$1 = isSymbol$2;
|
|
393
394
|
var getMethod$5 = getMethod$6;
|
|
394
395
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
@@ -400,13 +401,13 @@ var TO_PRIMITIVE = wellKnownSymbol$i('toPrimitive');
|
|
|
400
401
|
// `ToPrimitive` abstract operation
|
|
401
402
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
402
403
|
var toPrimitive$1 = function (input, pref) {
|
|
403
|
-
if (!isObject$
|
|
404
|
+
if (!isObject$c(input) || isSymbol$1(input)) return input;
|
|
404
405
|
var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
|
|
405
406
|
var result;
|
|
406
407
|
if (exoticToPrim) {
|
|
407
408
|
if (pref === undefined) pref = 'default';
|
|
408
409
|
result = call$i(exoticToPrim, input, pref);
|
|
409
|
-
if (!isObject$
|
|
410
|
+
if (!isObject$c(result) || isSymbol$1(result)) return result;
|
|
410
411
|
throw new $TypeError$e("Can't convert object to primitive value");
|
|
411
412
|
}
|
|
412
413
|
if (pref === undefined) pref = 'number';
|
|
@@ -423,12 +424,12 @@ var toPropertyKey$2 = function (argument) {
|
|
|
423
424
|
return isSymbol(key) ? key : key + '';
|
|
424
425
|
};
|
|
425
426
|
|
|
426
|
-
var global$j = global$
|
|
427
|
-
var isObject$
|
|
427
|
+
var global$j = global$p;
|
|
428
|
+
var isObject$b = isObject$e;
|
|
428
429
|
|
|
429
430
|
var document$3 = global$j.document;
|
|
430
431
|
// typeof document.createElement is 'object' in old IE
|
|
431
|
-
var EXISTS$1 = isObject$
|
|
432
|
+
var EXISTS$1 = isObject$b(document$3) && isObject$b(document$3.createElement);
|
|
432
433
|
|
|
433
434
|
var documentCreateElement$2 = function (it) {
|
|
434
435
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
@@ -484,21 +485,21 @@ var v8PrototypeDefineBug = DESCRIPTORS$d && fails$i(function () {
|
|
|
484
485
|
}).prototype !== 42;
|
|
485
486
|
});
|
|
486
487
|
|
|
487
|
-
var isObject$
|
|
488
|
+
var isObject$a = isObject$e;
|
|
488
489
|
|
|
489
490
|
var $String$3 = String;
|
|
490
491
|
var $TypeError$d = TypeError;
|
|
491
492
|
|
|
492
493
|
// `Assert: Type(argument) is Object`
|
|
493
|
-
var anObject$
|
|
494
|
-
if (isObject$
|
|
494
|
+
var anObject$g = function (argument) {
|
|
495
|
+
if (isObject$a(argument)) return argument;
|
|
495
496
|
throw new $TypeError$d($String$3(argument) + ' is not an object');
|
|
496
497
|
};
|
|
497
498
|
|
|
498
499
|
var DESCRIPTORS$c = descriptors;
|
|
499
500
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
500
501
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
501
|
-
var anObject$
|
|
502
|
+
var anObject$f = anObject$g;
|
|
502
503
|
var toPropertyKey = toPropertyKey$2;
|
|
503
504
|
|
|
504
505
|
var $TypeError$c = TypeError;
|
|
@@ -513,9 +514,9 @@ var WRITABLE = 'writable';
|
|
|
513
514
|
// `Object.defineProperty` method
|
|
514
515
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
515
516
|
objectDefineProperty.f = DESCRIPTORS$c ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
516
|
-
anObject$
|
|
517
|
+
anObject$f(O);
|
|
517
518
|
P = toPropertyKey(P);
|
|
518
|
-
anObject$
|
|
519
|
+
anObject$f(Attributes);
|
|
519
520
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
520
521
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
521
522
|
if (current && current[WRITABLE]) {
|
|
@@ -528,9 +529,9 @@ objectDefineProperty.f = DESCRIPTORS$c ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
528
529
|
}
|
|
529
530
|
} return $defineProperty(O, P, Attributes);
|
|
530
531
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
531
|
-
anObject$
|
|
532
|
+
anObject$f(O);
|
|
532
533
|
P = toPropertyKey(P);
|
|
533
|
-
anObject$
|
|
534
|
+
anObject$f(Attributes);
|
|
534
535
|
if (IE8_DOM_DEFINE) try {
|
|
535
536
|
return $defineProperty(O, P, Attributes);
|
|
536
537
|
} catch (error) { /* empty */ }
|
|
@@ -572,7 +573,7 @@ var functionName = {
|
|
|
572
573
|
|
|
573
574
|
var uncurryThis$j = functionUncurryThis;
|
|
574
575
|
var isCallable$h = isCallable$n;
|
|
575
|
-
var store$1 = sharedStore;
|
|
576
|
+
var store$1 = sharedStore.exports;
|
|
576
577
|
|
|
577
578
|
var functionToString = uncurryThis$j(Function.toString);
|
|
578
579
|
|
|
@@ -585,14 +586,14 @@ if (!isCallable$h(store$1.inspectSource)) {
|
|
|
585
586
|
|
|
586
587
|
var inspectSource$3 = store$1.inspectSource;
|
|
587
588
|
|
|
588
|
-
var global$i = global$
|
|
589
|
+
var global$i = global$p;
|
|
589
590
|
var isCallable$g = isCallable$n;
|
|
590
591
|
|
|
591
592
|
var WeakMap$1 = global$i.WeakMap;
|
|
592
593
|
|
|
593
594
|
var weakMapBasicDetection = isCallable$g(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
594
595
|
|
|
595
|
-
var shared$2 = shared$4
|
|
596
|
+
var shared$2 = shared$4;
|
|
596
597
|
var uid = uid$2;
|
|
597
598
|
|
|
598
599
|
var keys$1 = shared$2('keys');
|
|
@@ -604,11 +605,11 @@ var sharedKey$3 = function (key) {
|
|
|
604
605
|
var hiddenKeys$4 = {};
|
|
605
606
|
|
|
606
607
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
607
|
-
var global$h = global$
|
|
608
|
-
var isObject$
|
|
608
|
+
var global$h = global$p;
|
|
609
|
+
var isObject$9 = isObject$e;
|
|
609
610
|
var createNonEnumerableProperty$8 = createNonEnumerableProperty$9;
|
|
610
611
|
var hasOwn$a = hasOwnProperty_1;
|
|
611
|
-
var shared$1 = sharedStore;
|
|
612
|
+
var shared$1 = sharedStore.exports;
|
|
612
613
|
var sharedKey$2 = sharedKey$3;
|
|
613
614
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
614
615
|
|
|
@@ -624,7 +625,7 @@ var enforce = function (it) {
|
|
|
624
625
|
var getterFor = function (TYPE) {
|
|
625
626
|
return function (it) {
|
|
626
627
|
var state;
|
|
627
|
-
if (!isObject$
|
|
628
|
+
if (!isObject$9(it) || (state = get(it)).type !== TYPE) {
|
|
628
629
|
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
629
630
|
} return state;
|
|
630
631
|
};
|
|
@@ -821,6 +822,7 @@ var createMethod$3 = function (IS_INCLUDES) {
|
|
|
821
822
|
return function ($this, el, fromIndex) {
|
|
822
823
|
var O = toIndexedObject$3($this);
|
|
823
824
|
var length = lengthOfArrayLike$4(O);
|
|
825
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
824
826
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
825
827
|
var value;
|
|
826
828
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -898,13 +900,13 @@ var getBuiltIn$6 = getBuiltIn$8;
|
|
|
898
900
|
var uncurryThis$g = functionUncurryThis;
|
|
899
901
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
900
902
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
901
|
-
var anObject$
|
|
903
|
+
var anObject$e = anObject$g;
|
|
902
904
|
|
|
903
905
|
var concat$1 = uncurryThis$g([].concat);
|
|
904
906
|
|
|
905
907
|
// all object keys, includes non-enumerable and symbols
|
|
906
908
|
var ownKeys$1 = getBuiltIn$6('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
907
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
909
|
+
var keys = getOwnPropertyNamesModule.f(anObject$e(it));
|
|
908
910
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
909
911
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
910
912
|
};
|
|
@@ -949,7 +951,7 @@ var POLYFILL = isForced$3.POLYFILL = 'P';
|
|
|
949
951
|
|
|
950
952
|
var isForced_1 = isForced$3;
|
|
951
953
|
|
|
952
|
-
var global$g = global$
|
|
954
|
+
var global$g = global$p;
|
|
953
955
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
954
956
|
var createNonEnumerableProperty$7 = createNonEnumerableProperty$9;
|
|
955
957
|
var defineBuiltIn$7 = defineBuiltIn$8;
|
|
@@ -1223,7 +1225,7 @@ var defineBuiltInAccessor$3 = function (target, name, descriptor) {
|
|
|
1223
1225
|
|
|
1224
1226
|
var $$g = _export;
|
|
1225
1227
|
var DESCRIPTORS$7 = descriptors;
|
|
1226
|
-
var global$f = global$
|
|
1228
|
+
var global$f = global$p;
|
|
1227
1229
|
var uncurryThis$e = functionUncurryThis;
|
|
1228
1230
|
var hasOwn$6 = hasOwnProperty_1;
|
|
1229
1231
|
var isCallable$b = isCallable$n;
|
|
@@ -1283,7 +1285,7 @@ var objectDefineProperties = {};
|
|
|
1283
1285
|
var DESCRIPTORS$6 = descriptors;
|
|
1284
1286
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1285
1287
|
var definePropertyModule = objectDefineProperty;
|
|
1286
|
-
var anObject$
|
|
1288
|
+
var anObject$d = anObject$g;
|
|
1287
1289
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
1288
1290
|
var objectKeys = objectKeys$2;
|
|
1289
1291
|
|
|
@@ -1291,7 +1293,7 @@ var objectKeys = objectKeys$2;
|
|
|
1291
1293
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1292
1294
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1293
1295
|
objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1294
|
-
anObject$
|
|
1296
|
+
anObject$d(O);
|
|
1295
1297
|
var props = toIndexedObject$1(Properties);
|
|
1296
1298
|
var keys = objectKeys(Properties);
|
|
1297
1299
|
var length = keys.length;
|
|
@@ -1306,7 +1308,7 @@ var getBuiltIn$5 = getBuiltIn$8;
|
|
|
1306
1308
|
var html$2 = getBuiltIn$5('document', 'documentElement');
|
|
1307
1309
|
|
|
1308
1310
|
/* global ActiveXObject -- old IE, WSH */
|
|
1309
|
-
var anObject$
|
|
1311
|
+
var anObject$c = anObject$g;
|
|
1310
1312
|
var definePropertiesModule = objectDefineProperties;
|
|
1311
1313
|
var enumBugKeys = enumBugKeys$3;
|
|
1312
1314
|
var hiddenKeys = hiddenKeys$4;
|
|
@@ -1380,7 +1382,7 @@ hiddenKeys[IE_PROTO$1] = true;
|
|
|
1380
1382
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1381
1383
|
var result;
|
|
1382
1384
|
if (O !== null) {
|
|
1383
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
1385
|
+
EmptyConstructor[PROTOTYPE] = anObject$c(O);
|
|
1384
1386
|
result = new EmptyConstructor();
|
|
1385
1387
|
EmptyConstructor[PROTOTYPE] = null;
|
|
1386
1388
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
@@ -1445,7 +1447,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : f
|
|
|
1445
1447
|
|
|
1446
1448
|
var fails$d = fails$o;
|
|
1447
1449
|
var isCallable$9 = isCallable$n;
|
|
1448
|
-
var isObject$
|
|
1450
|
+
var isObject$8 = isObject$e;
|
|
1449
1451
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1450
1452
|
var defineBuiltIn$6 = defineBuiltIn$8;
|
|
1451
1453
|
var wellKnownSymbol$e = wellKnownSymbol$j;
|
|
@@ -1468,7 +1470,7 @@ if ([].keys) {
|
|
|
1468
1470
|
}
|
|
1469
1471
|
}
|
|
1470
1472
|
|
|
1471
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$
|
|
1473
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$8(IteratorPrototype$2) || fails$d(function () {
|
|
1472
1474
|
var test = {};
|
|
1473
1475
|
// FF44- legacy iterators case
|
|
1474
1476
|
return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
|
|
@@ -1528,10 +1530,10 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
1528
1530
|
} catch (error) { /* empty */ }
|
|
1529
1531
|
};
|
|
1530
1532
|
|
|
1531
|
-
var isObject$
|
|
1533
|
+
var isObject$7 = isObject$e;
|
|
1532
1534
|
|
|
1533
1535
|
var isPossiblePrototype$1 = function (argument) {
|
|
1534
|
-
return isObject$
|
|
1536
|
+
return isObject$7(argument) || argument === null;
|
|
1535
1537
|
};
|
|
1536
1538
|
|
|
1537
1539
|
var isPossiblePrototype = isPossiblePrototype$1;
|
|
@@ -1546,7 +1548,8 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1546
1548
|
|
|
1547
1549
|
/* eslint-disable no-proto -- safe */
|
|
1548
1550
|
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1549
|
-
var
|
|
1551
|
+
var isObject$6 = isObject$e;
|
|
1552
|
+
var requireObjectCoercible$6 = requireObjectCoercible$9;
|
|
1550
1553
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1551
1554
|
|
|
1552
1555
|
// `Object.setPrototypeOf` method
|
|
@@ -1563,8 +1566,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1563
1566
|
CORRECT_SETTER = test instanceof Array;
|
|
1564
1567
|
} catch (error) { /* empty */ }
|
|
1565
1568
|
return function setPrototypeOf(O, proto) {
|
|
1566
|
-
|
|
1569
|
+
requireObjectCoercible$6(O);
|
|
1567
1570
|
aPossiblePrototype(proto);
|
|
1571
|
+
if (!isObject$6(O)) return O;
|
|
1568
1572
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1569
1573
|
else O.__proto__ = proto;
|
|
1570
1574
|
return O;
|
|
@@ -1782,7 +1786,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
1782
1786
|
|
|
1783
1787
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1784
1788
|
|
|
1785
|
-
var global$e = global$
|
|
1789
|
+
var global$e = global$p;
|
|
1786
1790
|
var DOMIterables = domIterables;
|
|
1787
1791
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1788
1792
|
var ArrayIteratorMethods = es_array_iterator;
|
|
@@ -2031,7 +2035,7 @@ const ConfirmationDialog = _a => {
|
|
|
2031
2035
|
}, rest), content);
|
|
2032
2036
|
};
|
|
2033
2037
|
|
|
2034
|
-
var global$d = global$
|
|
2038
|
+
var global$d = global$p;
|
|
2035
2039
|
var classof$6 = classofRaw$2;
|
|
2036
2040
|
|
|
2037
2041
|
var engineIsNode = classof$6(global$d.process) === 'process';
|
|
@@ -2126,7 +2130,7 @@ var aConstructor$1 = function (argument) {
|
|
|
2126
2130
|
throw new $TypeError$9(tryToString$2(argument) + ' is not a constructor');
|
|
2127
2131
|
};
|
|
2128
2132
|
|
|
2129
|
-
var anObject$b = anObject$
|
|
2133
|
+
var anObject$b = anObject$g;
|
|
2130
2134
|
var aConstructor = aConstructor$1;
|
|
2131
2135
|
var isNullOrUndefined$4 = isNullOrUndefined$7;
|
|
2132
2136
|
var wellKnownSymbol$9 = wellKnownSymbol$j;
|
|
@@ -2192,7 +2196,7 @@ var userAgent$2 = engineUserAgent;
|
|
|
2192
2196
|
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
2193
2197
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
2194
2198
|
|
|
2195
|
-
var global$c = global$
|
|
2199
|
+
var global$c = global$p;
|
|
2196
2200
|
var apply$1 = functionApply;
|
|
2197
2201
|
var bind$4 = functionBindContext;
|
|
2198
2202
|
var isCallable$6 = isCallable$n;
|
|
@@ -2309,7 +2313,7 @@ var task$1 = {
|
|
|
2309
2313
|
clear: clear
|
|
2310
2314
|
};
|
|
2311
2315
|
|
|
2312
|
-
var global$b = global$
|
|
2316
|
+
var global$b = global$p;
|
|
2313
2317
|
var DESCRIPTORS$3 = descriptors;
|
|
2314
2318
|
|
|
2315
2319
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -2355,7 +2359,7 @@ var userAgent = engineUserAgent;
|
|
|
2355
2359
|
|
|
2356
2360
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
2357
2361
|
|
|
2358
|
-
var global$a = global$
|
|
2362
|
+
var global$a = global$p;
|
|
2359
2363
|
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
2360
2364
|
var bind$3 = functionBindContext;
|
|
2361
2365
|
var macrotask = task$1.set;
|
|
@@ -2449,7 +2453,7 @@ var perform$3 = function (exec) {
|
|
|
2449
2453
|
}
|
|
2450
2454
|
};
|
|
2451
2455
|
|
|
2452
|
-
var global$9 = global$
|
|
2456
|
+
var global$9 = global$p;
|
|
2453
2457
|
|
|
2454
2458
|
var promiseNativeConstructor = global$9.Promise;
|
|
2455
2459
|
|
|
@@ -2463,7 +2467,7 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$2
|
|
|
2463
2467
|
&& typeof window == 'object'
|
|
2464
2468
|
&& typeof document == 'object';
|
|
2465
2469
|
|
|
2466
|
-
var global$8 = global$
|
|
2470
|
+
var global$8 = global$p;
|
|
2467
2471
|
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
2468
2472
|
var isCallable$5 = isCallable$n;
|
|
2469
2473
|
var isForced$1 = isForced_1;
|
|
@@ -2533,7 +2537,7 @@ newPromiseCapability$2.f = function (C) {
|
|
|
2533
2537
|
|
|
2534
2538
|
var $$e = _export;
|
|
2535
2539
|
var IS_NODE$1 = engineIsNode;
|
|
2536
|
-
var global$7 = global$
|
|
2540
|
+
var global$7 = global$p;
|
|
2537
2541
|
var call$d = functionCall;
|
|
2538
2542
|
var defineBuiltIn$4 = defineBuiltIn$8;
|
|
2539
2543
|
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
@@ -2541,7 +2545,7 @@ var setToStringTag = setToStringTag$4;
|
|
|
2541
2545
|
var setSpecies$1 = setSpecies$2;
|
|
2542
2546
|
var aCallable$4 = aCallable$9;
|
|
2543
2547
|
var isCallable$4 = isCallable$n;
|
|
2544
|
-
var isObject$5 = isObject$
|
|
2548
|
+
var isObject$5 = isObject$e;
|
|
2545
2549
|
var anInstance = anInstance$1;
|
|
2546
2550
|
var speciesConstructor$1 = speciesConstructor$2;
|
|
2547
2551
|
var task = task$1.set;
|
|
@@ -2845,7 +2849,7 @@ var getIteratorMethod$2 = function (it) {
|
|
|
2845
2849
|
|
|
2846
2850
|
var call$c = functionCall;
|
|
2847
2851
|
var aCallable$3 = aCallable$9;
|
|
2848
|
-
var anObject$a = anObject$
|
|
2852
|
+
var anObject$a = anObject$g;
|
|
2849
2853
|
var tryToString$1 = tryToString$4;
|
|
2850
2854
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
2851
2855
|
|
|
@@ -2858,7 +2862,7 @@ var getIterator$1 = function (argument, usingIterator) {
|
|
|
2858
2862
|
};
|
|
2859
2863
|
|
|
2860
2864
|
var call$b = functionCall;
|
|
2861
|
-
var anObject$9 = anObject$
|
|
2865
|
+
var anObject$9 = anObject$g;
|
|
2862
2866
|
var getMethod$3 = getMethod$6;
|
|
2863
2867
|
|
|
2864
2868
|
var iteratorClose$1 = function (iterator, kind, value) {
|
|
@@ -2883,7 +2887,7 @@ var iteratorClose$1 = function (iterator, kind, value) {
|
|
|
2883
2887
|
|
|
2884
2888
|
var bind$1 = functionBindContext;
|
|
2885
2889
|
var call$a = functionCall;
|
|
2886
|
-
var anObject$8 = anObject$
|
|
2890
|
+
var anObject$8 = anObject$g;
|
|
2887
2891
|
var tryToString = tryToString$4;
|
|
2888
2892
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2889
2893
|
var lengthOfArrayLike$3 = lengthOfArrayLike$5;
|
|
@@ -3104,8 +3108,8 @@ $$a({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
|
3104
3108
|
}
|
|
3105
3109
|
});
|
|
3106
3110
|
|
|
3107
|
-
var anObject$7 = anObject$
|
|
3108
|
-
var isObject$4 = isObject$
|
|
3111
|
+
var anObject$7 = anObject$g;
|
|
3112
|
+
var isObject$4 = isObject$e;
|
|
3109
3113
|
var newPromiseCapability = newPromiseCapability$2;
|
|
3110
3114
|
|
|
3111
3115
|
var promiseResolve$1 = function (C, x) {
|
|
@@ -3323,6 +3327,25 @@ const useMakeSureContainerStaysInsideWindow = (nodeRef, position, setPosition) =
|
|
|
3323
3327
|
}, [onResizeWindow]);
|
|
3324
3328
|
};
|
|
3325
3329
|
|
|
3330
|
+
/*
|
|
3331
|
+
Accepts a value and timeout and will debounce
|
|
3332
|
+
|
|
3333
|
+
@param {string} value: value of element
|
|
3334
|
+
@param {timeout} number: timer
|
|
3335
|
+
@return {value: string}
|
|
3336
|
+
|
|
3337
|
+
@example:
|
|
3338
|
+
const debouncedName = useDebounce('testing', 2000)
|
|
3339
|
+
*/
|
|
3340
|
+
const useDebounce = (value, timeout) => {
|
|
3341
|
+
const [state, setState] = React.useState(value);
|
|
3342
|
+
React.useEffect(() => {
|
|
3343
|
+
const handler = setTimeout(() => setState(value), timeout);
|
|
3344
|
+
return () => clearTimeout(handler);
|
|
3345
|
+
}, [value, timeout]);
|
|
3346
|
+
return state;
|
|
3347
|
+
};
|
|
3348
|
+
|
|
3326
3349
|
const ConfirmationServiceContext = /*#__PURE__*/React.createContext(Promise.reject);
|
|
3327
3350
|
const useConfirmationDialog = () => React.useContext(ConfirmationServiceContext);
|
|
3328
3351
|
const useDialogActions = (awaitingPromiseRef, defaultOptions = null) => {
|
|
@@ -3753,7 +3776,7 @@ var flattenIntoArray_1 = flattenIntoArray$1;
|
|
|
3753
3776
|
|
|
3754
3777
|
var isArray$1 = isArray$3;
|
|
3755
3778
|
var isConstructor = isConstructor$2;
|
|
3756
|
-
var isObject$3 = isObject$
|
|
3779
|
+
var isObject$3 = isObject$e;
|
|
3757
3780
|
var wellKnownSymbol$4 = wellKnownSymbol$j;
|
|
3758
3781
|
|
|
3759
3782
|
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
@@ -3814,7 +3837,7 @@ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u200
|
|
|
3814
3837
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
3815
3838
|
|
|
3816
3839
|
var uncurryThis$8 = functionUncurryThis;
|
|
3817
|
-
var requireObjectCoercible$5 = requireObjectCoercible$
|
|
3840
|
+
var requireObjectCoercible$5 = requireObjectCoercible$9;
|
|
3818
3841
|
var toString$a = toString$c;
|
|
3819
3842
|
var whitespaces$1 = whitespaces$2;
|
|
3820
3843
|
|
|
@@ -3844,7 +3867,7 @@ var stringTrim = {
|
|
|
3844
3867
|
trim: createMethod$2(3)
|
|
3845
3868
|
};
|
|
3846
3869
|
|
|
3847
|
-
var global$6 = global$
|
|
3870
|
+
var global$6 = global$p;
|
|
3848
3871
|
var fails$a = fails$o;
|
|
3849
3872
|
var uncurryThis$7 = functionUncurryThis;
|
|
3850
3873
|
var toString$9 = toString$c;
|
|
@@ -3958,7 +3981,7 @@ const ResizeComponent = _a => {
|
|
|
3958
3981
|
}, props), children);
|
|
3959
3982
|
};
|
|
3960
3983
|
|
|
3961
|
-
var anObject$6 = anObject$
|
|
3984
|
+
var anObject$6 = anObject$g;
|
|
3962
3985
|
|
|
3963
3986
|
// `RegExp.prototype.flags` getter implementation
|
|
3964
3987
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
@@ -3991,7 +4014,7 @@ var regexpGetFlags = function (R) {
|
|
|
3991
4014
|
|
|
3992
4015
|
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
3993
4016
|
var defineBuiltIn$2 = defineBuiltIn$8;
|
|
3994
|
-
var anObject$5 = anObject$
|
|
4017
|
+
var anObject$5 = anObject$g;
|
|
3995
4018
|
var $toString = toString$c;
|
|
3996
4019
|
var fails$9 = fails$o;
|
|
3997
4020
|
var getRegExpFlags$1 = regexpGetFlags;
|
|
@@ -4244,6 +4267,18 @@ const ToolFooter = () => {
|
|
|
4244
4267
|
});
|
|
4245
4268
|
};
|
|
4246
4269
|
|
|
4270
|
+
const headerStyle = {
|
|
4271
|
+
containerType: 'inline-size',
|
|
4272
|
+
containerName: 'tool-header',
|
|
4273
|
+
'.header-title': {
|
|
4274
|
+
display: 'none'
|
|
4275
|
+
},
|
|
4276
|
+
'@container tool-header (min-width: 321px)': {
|
|
4277
|
+
'.header-title': {
|
|
4278
|
+
display: 'block'
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
};
|
|
4247
4282
|
const getStyle = size => {
|
|
4248
4283
|
switch (size) {
|
|
4249
4284
|
case 'xs':
|
|
@@ -4307,17 +4342,18 @@ const ToolHeader = ({
|
|
|
4307
4342
|
})
|
|
4308
4343
|
}) => {
|
|
4309
4344
|
const styles = getStyle(size);
|
|
4310
|
-
const columnSizeIcon = _leftHeaderComponent || _rightHeaderComponent ? 4 : 1;
|
|
4345
|
+
const columnSizeIcon = title && (_leftHeaderComponent || _rightHeaderComponent) ? 4 : 1;
|
|
4311
4346
|
const columnSizeTitle = _leftHeaderComponent || _rightHeaderComponent ? 4 : 10;
|
|
4347
|
+
const columnSizeLeft = title ? columnSizeIcon : 12 - columnSizeIcon;
|
|
4312
4348
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
4313
4349
|
component: "header",
|
|
4314
4350
|
className: _className,
|
|
4315
|
-
sx: {
|
|
4351
|
+
sx: Object.assign(Object.assign({}, _rightHeaderComponent ? headerStyle : {}), {
|
|
4316
4352
|
boxShadow: 1,
|
|
4317
4353
|
backgroundColor: 'geowebColors.background.surface',
|
|
4318
4354
|
zIndex: 2,
|
|
4319
4355
|
cursor: _isDraggable ? 'move' : null
|
|
4320
|
-
},
|
|
4356
|
+
}),
|
|
4321
4357
|
role: "heading",
|
|
4322
4358
|
"aria-label": "toolheader"
|
|
4323
4359
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
@@ -4330,7 +4366,7 @@ const ToolHeader = ({
|
|
|
4330
4366
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4331
4367
|
className: "header-left",
|
|
4332
4368
|
item: true,
|
|
4333
|
-
xs:
|
|
4369
|
+
xs: columnSizeLeft,
|
|
4334
4370
|
sx: {
|
|
4335
4371
|
paddingRight: 1
|
|
4336
4372
|
}
|
|
@@ -4347,7 +4383,7 @@ const ToolHeader = ({
|
|
|
4347
4383
|
}, _dragHandleIcon))), _leftHeaderComponent && _leftHeaderComponent), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4348
4384
|
className: "header-title",
|
|
4349
4385
|
item: true,
|
|
4350
|
-
xs: columnSizeTitle
|
|
4386
|
+
xs: title ? columnSizeTitle : 0
|
|
4351
4387
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4352
4388
|
container: true,
|
|
4353
4389
|
justifyContent: "center",
|
|
@@ -5434,9 +5470,10 @@ const TooltipSelect = _a => {
|
|
|
5434
5470
|
isEnabled,
|
|
5435
5471
|
hasBackgroundColor,
|
|
5436
5472
|
variant = 'standard',
|
|
5437
|
-
additionalStyling = {}
|
|
5473
|
+
additionalStyling = {},
|
|
5474
|
+
skipLocalStyling = false
|
|
5438
5475
|
} = _a,
|
|
5439
|
-
props = __rest(_a, ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling"]);
|
|
5476
|
+
props = __rest(_a, ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"]);
|
|
5440
5477
|
const [selectOpen, setSelectOpen] = React.useState(false);
|
|
5441
5478
|
const [tooltipOpen, setTooltipOpen] = useControlledTooltip();
|
|
5442
5479
|
const onWheel = React.useCallback(event => {
|
|
@@ -5489,18 +5526,20 @@ const TooltipSelect = _a => {
|
|
|
5489
5526
|
onWheel: onWheel,
|
|
5490
5527
|
isEnabled: isEnabled,
|
|
5491
5528
|
hasBackgroundColor: hasBackgroundColor,
|
|
5492
|
-
additionalStyling: additionalStyling
|
|
5529
|
+
additionalStyling: additionalStyling,
|
|
5530
|
+
skipLocalStyling: skipLocalStyling
|
|
5493
5531
|
}, props)));
|
|
5494
5532
|
};
|
|
5495
5533
|
// Style the select
|
|
5496
5534
|
const BaseSelect = styled(Select, {
|
|
5497
|
-
shouldForwardProp: prop => prop !== 'isEnabled' && prop !== 'hasBackgroundColor'
|
|
5535
|
+
shouldForwardProp: prop => prop !== 'isEnabled' && prop !== 'hasBackgroundColor' && prop !== 'skipLocalStyling'
|
|
5498
5536
|
})(({
|
|
5499
5537
|
theme,
|
|
5500
5538
|
isEnabled,
|
|
5501
|
-
hasBackgroundColor
|
|
5539
|
+
hasBackgroundColor,
|
|
5540
|
+
skipLocalStyling
|
|
5502
5541
|
}) => {
|
|
5503
|
-
return Object.assign(
|
|
5542
|
+
return Object.assign({}, !skipLocalStyling && tooltipContainerStyles(theme, !!isEnabled, hasBackgroundColor));
|
|
5504
5543
|
});
|
|
5505
5544
|
// Style the menu pop-over
|
|
5506
5545
|
const StyledSelect = styled( /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
@@ -5568,7 +5607,7 @@ const StyledSelect = styled( /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
5568
5607
|
}
|
|
5569
5608
|
}
|
|
5570
5609
|
}));
|
|
5571
|
-
const tooltipContainerStyles = (theme, isEnabled, hasBackgroundColor = true) => Object.assign({
|
|
5610
|
+
const tooltipContainerStyles = (theme, isEnabled, hasBackgroundColor = true) => Object.assign(Object.assign({
|
|
5572
5611
|
width: '100%',
|
|
5573
5612
|
height: 32,
|
|
5574
5613
|
fontWeight: 500,
|
|
@@ -5596,7 +5635,7 @@ const tooltipContainerStyles = (theme, isEnabled, hasBackgroundColor = true) =>
|
|
|
5596
5635
|
'&>div': {
|
|
5597
5636
|
paddingLeft: '8px!important'
|
|
5598
5637
|
}
|
|
5599
|
-
}, hasBackgroundColor && {
|
|
5638
|
+
}, theme.palette.geowebColors.tooltips.tooltipSelect.select), hasBackgroundColor && {
|
|
5600
5639
|
'&:hover': {
|
|
5601
5640
|
backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill,
|
|
5602
5641
|
borderRadius: 0
|
|
@@ -5692,6 +5731,8 @@ var lengthOfArrayLike = lengthOfArrayLike$5;
|
|
|
5692
5731
|
|
|
5693
5732
|
var $TypeError$3 = TypeError;
|
|
5694
5733
|
|
|
5734
|
+
var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
|
|
5735
|
+
|
|
5695
5736
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
5696
5737
|
var createMethod$1 = function (IS_RIGHT) {
|
|
5697
5738
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
@@ -5699,6 +5740,7 @@ var createMethod$1 = function (IS_RIGHT) {
|
|
|
5699
5740
|
var self = IndexedObject(O);
|
|
5700
5741
|
var length = lengthOfArrayLike(O);
|
|
5701
5742
|
aCallable(callbackfn);
|
|
5743
|
+
if (length === 0 && argumentsLength < 2) throw new $TypeError$3(REDUCE_EMPTY);
|
|
5702
5744
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
5703
5745
|
var i = IS_RIGHT ? -1 : 1;
|
|
5704
5746
|
if (argumentsLength < 2) while (true) {
|
|
@@ -5709,7 +5751,7 @@ var createMethod$1 = function (IS_RIGHT) {
|
|
|
5709
5751
|
}
|
|
5710
5752
|
index += i;
|
|
5711
5753
|
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
5712
|
-
throw new $TypeError$3(
|
|
5754
|
+
throw new $TypeError$3(REDUCE_EMPTY);
|
|
5713
5755
|
}
|
|
5714
5756
|
}
|
|
5715
5757
|
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
@@ -5759,7 +5801,7 @@ $$4({ target: 'Array', proto: true, forced: FORCED$1 }, {
|
|
|
5759
5801
|
});
|
|
5760
5802
|
|
|
5761
5803
|
var isCallable$2 = isCallable$n;
|
|
5762
|
-
var isObject$2 = isObject$
|
|
5804
|
+
var isObject$2 = isObject$e;
|
|
5763
5805
|
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
5764
5806
|
|
|
5765
5807
|
// makes subclassing work correct for wrapped built-ins
|
|
@@ -5777,7 +5819,7 @@ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
|
|
|
5777
5819
|
return $this;
|
|
5778
5820
|
};
|
|
5779
5821
|
|
|
5780
|
-
var isObject$1 = isObject$
|
|
5822
|
+
var isObject$1 = isObject$e;
|
|
5781
5823
|
var classof$2 = classofRaw$2;
|
|
5782
5824
|
var wellKnownSymbol$3 = wellKnownSymbol$j;
|
|
5783
5825
|
|
|
@@ -5791,7 +5833,7 @@ var isRegexp = function (it) {
|
|
|
5791
5833
|
};
|
|
5792
5834
|
|
|
5793
5835
|
var fails$6 = fails$o;
|
|
5794
|
-
var global$5 = global$
|
|
5836
|
+
var global$5 = global$p;
|
|
5795
5837
|
|
|
5796
5838
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
5797
5839
|
var $RegExp$2 = global$5.RegExp;
|
|
@@ -5832,7 +5874,7 @@ var proxyAccessor$2 = function (Target, Source, key) {
|
|
|
5832
5874
|
};
|
|
5833
5875
|
|
|
5834
5876
|
var fails$5 = fails$o;
|
|
5835
|
-
var global$4 = global$
|
|
5877
|
+
var global$4 = global$p;
|
|
5836
5878
|
|
|
5837
5879
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
5838
5880
|
var $RegExp$1 = global$4.RegExp;
|
|
@@ -5843,7 +5885,7 @@ var regexpUnsupportedDotAll = fails$5(function () {
|
|
|
5843
5885
|
});
|
|
5844
5886
|
|
|
5845
5887
|
var fails$4 = fails$o;
|
|
5846
|
-
var global$3 = global$
|
|
5888
|
+
var global$3 = global$p;
|
|
5847
5889
|
|
|
5848
5890
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
5849
5891
|
var $RegExp = global$3.RegExp;
|
|
@@ -5855,7 +5897,7 @@ var regexpUnsupportedNcg = fails$4(function () {
|
|
|
5855
5897
|
});
|
|
5856
5898
|
|
|
5857
5899
|
var DESCRIPTORS$2 = descriptors;
|
|
5858
|
-
var global$2 = global$
|
|
5900
|
+
var global$2 = global$p;
|
|
5859
5901
|
var uncurryThis$5 = functionUncurryThis;
|
|
5860
5902
|
var isForced = isForced_1;
|
|
5861
5903
|
var inheritIfRequired$1 = inheritIfRequired$2;
|
|
@@ -6079,7 +6121,7 @@ var uncurryThis$4 = functionUncurryThis;
|
|
|
6079
6121
|
var toString$7 = toString$c;
|
|
6080
6122
|
var regexpFlags = regexpFlags$1;
|
|
6081
6123
|
var stickyHelpers$1 = regexpStickyHelpers;
|
|
6082
|
-
var shared = shared$4
|
|
6124
|
+
var shared = shared$4;
|
|
6083
6125
|
var create = objectCreate;
|
|
6084
6126
|
var getInternalState = internalState.get;
|
|
6085
6127
|
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
@@ -6227,7 +6269,7 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
6227
6269
|
var $$2 = _export;
|
|
6228
6270
|
var uncurryThis$3 = functionUncurryThis;
|
|
6229
6271
|
var notARegExp = notARegexp;
|
|
6230
|
-
var requireObjectCoercible$4 = requireObjectCoercible$
|
|
6272
|
+
var requireObjectCoercible$4 = requireObjectCoercible$9;
|
|
6231
6273
|
var toString$6 = toString$c;
|
|
6232
6274
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
6233
6275
|
|
|
@@ -6330,7 +6372,7 @@ var sameValue$1 = Object.is || function is(x, y) {
|
|
|
6330
6372
|
};
|
|
6331
6373
|
|
|
6332
6374
|
var call$4 = functionCall;
|
|
6333
|
-
var anObject$4 = anObject$
|
|
6375
|
+
var anObject$4 = anObject$g;
|
|
6334
6376
|
var isCallable$1 = isCallable$n;
|
|
6335
6377
|
var classof = classofRaw$2;
|
|
6336
6378
|
var regexpExec = regexpExec$2;
|
|
@@ -6352,9 +6394,9 @@ var regexpExecAbstract = function (R, S) {
|
|
|
6352
6394
|
|
|
6353
6395
|
var call$3 = functionCall;
|
|
6354
6396
|
var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
|
|
6355
|
-
var anObject$3 = anObject$
|
|
6397
|
+
var anObject$3 = anObject$g;
|
|
6356
6398
|
var isNullOrUndefined$2 = isNullOrUndefined$7;
|
|
6357
|
-
var requireObjectCoercible$3 = requireObjectCoercible$
|
|
6399
|
+
var requireObjectCoercible$3 = requireObjectCoercible$9;
|
|
6358
6400
|
var sameValue = sameValue$1;
|
|
6359
6401
|
var toString$5 = toString$c;
|
|
6360
6402
|
var getMethod$2 = getMethod$6;
|
|
@@ -6391,7 +6433,7 @@ fixRegExpWellKnownSymbolLogic$2('search', function (SEARCH, nativeSearch, maybeC
|
|
|
6391
6433
|
var uncurryThis$2 = functionUncurryThis;
|
|
6392
6434
|
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
6393
6435
|
var toString$4 = toString$c;
|
|
6394
|
-
var requireObjectCoercible$2 = requireObjectCoercible$
|
|
6436
|
+
var requireObjectCoercible$2 = requireObjectCoercible$9;
|
|
6395
6437
|
|
|
6396
6438
|
var charAt$1 = uncurryThis$2(''.charAt);
|
|
6397
6439
|
var charCodeAt = uncurryThis$2(''.charCodeAt);
|
|
@@ -6436,9 +6478,9 @@ var advanceStringIndex$2 = function (S, index, unicode) {
|
|
|
6436
6478
|
var call$2 = functionCall;
|
|
6437
6479
|
var uncurryThis$1 = functionUncurryThis;
|
|
6438
6480
|
var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
|
|
6439
|
-
var anObject$2 = anObject$
|
|
6481
|
+
var anObject$2 = anObject$g;
|
|
6440
6482
|
var isNullOrUndefined$1 = isNullOrUndefined$7;
|
|
6441
|
-
var requireObjectCoercible$1 = requireObjectCoercible$
|
|
6483
|
+
var requireObjectCoercible$1 = requireObjectCoercible$9;
|
|
6442
6484
|
var speciesConstructor = speciesConstructor$2;
|
|
6443
6485
|
var advanceStringIndex$1 = advanceStringIndex$2;
|
|
6444
6486
|
var toLength$1 = toLength$3;
|
|
@@ -6580,16 +6622,24 @@ const styles = {
|
|
|
6580
6622
|
fontWeight: 500
|
|
6581
6623
|
}
|
|
6582
6624
|
};
|
|
6583
|
-
const SwitchButton =
|
|
6625
|
+
const SwitchButton = _a => {
|
|
6626
|
+
var {
|
|
6627
|
+
activeLabel = 'Editor',
|
|
6628
|
+
inActiveLabel = 'Viewer',
|
|
6629
|
+
tooltip = 'Switch mode'
|
|
6630
|
+
} = _a,
|
|
6631
|
+
props = __rest(_a, ["activeLabel", "inActiveLabel", "tooltip"]);
|
|
6584
6632
|
return /*#__PURE__*/React.createElement(CustomTooltip, {
|
|
6585
|
-
title:
|
|
6586
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
6633
|
+
title: tooltip
|
|
6634
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
6635
|
+
role: "button"
|
|
6636
|
+
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
6587
6637
|
sx: styles.label
|
|
6588
|
-
},
|
|
6638
|
+
}, inActiveLabel), /*#__PURE__*/React.createElement(Switch, Object.assign({
|
|
6589
6639
|
"data-testid": "switchMode"
|
|
6590
6640
|
}, props)), /*#__PURE__*/React.createElement(FormLabel, {
|
|
6591
6641
|
sx: styles.label
|
|
6592
|
-
},
|
|
6642
|
+
}, activeLabel)));
|
|
6593
6643
|
};
|
|
6594
6644
|
|
|
6595
6645
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
@@ -6597,7 +6647,7 @@ const SwitchButton = props => {
|
|
|
6597
6647
|
var $$1 = _export;
|
|
6598
6648
|
var call$1 = functionCall;
|
|
6599
6649
|
var isCallable = isCallable$n;
|
|
6600
|
-
var anObject$1 = anObject$
|
|
6650
|
+
var anObject$1 = anObject$g;
|
|
6601
6651
|
var toString$2 = toString$c;
|
|
6602
6652
|
|
|
6603
6653
|
var DELEGATES_TO_EXEC = function () {
|
|
@@ -7216,7 +7266,7 @@ var normalizeStringArgument$1 = function (argument, $default) {
|
|
|
7216
7266
|
return argument === undefined ? arguments.length < 2 ? '' : $default : toString$1(argument);
|
|
7217
7267
|
};
|
|
7218
7268
|
|
|
7219
|
-
var isObject = isObject$
|
|
7269
|
+
var isObject = isObject$e;
|
|
7220
7270
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$9;
|
|
7221
7271
|
|
|
7222
7272
|
// `InstallErrorCause` abstract operation
|
|
@@ -7334,7 +7384,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
7334
7384
|
|
|
7335
7385
|
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
7336
7386
|
var $ = _export;
|
|
7337
|
-
var global$1 = global$
|
|
7387
|
+
var global$1 = global$p;
|
|
7338
7388
|
var apply = functionApply;
|
|
7339
7389
|
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
7340
7390
|
|
|
@@ -7392,11 +7442,11 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
|
7392
7442
|
|
|
7393
7443
|
var call = functionCall;
|
|
7394
7444
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
7395
|
-
var anObject = anObject$
|
|
7445
|
+
var anObject = anObject$g;
|
|
7396
7446
|
var isNullOrUndefined = isNullOrUndefined$7;
|
|
7397
7447
|
var toLength = toLength$3;
|
|
7398
7448
|
var toString = toString$c;
|
|
7399
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
7449
|
+
var requireObjectCoercible = requireObjectCoercible$9;
|
|
7400
7450
|
var getMethod = getMethod$6;
|
|
7401
7451
|
var advanceStringIndex = advanceStringIndex$2;
|
|
7402
7452
|
var regExpExec = regexpExecAbstract;
|
|
@@ -7834,6 +7884,7 @@ const getCurrentTimeAsString = (strFormat = DATE_FORMAT_UTC, utc = true) => {
|
|
|
7834
7884
|
};
|
|
7835
7885
|
/**
|
|
7836
7886
|
* Set date values to a given date (by default it is assumed you are passing the new values in UTC).
|
|
7887
|
+
* Note that months start at 0!
|
|
7837
7888
|
* @param date - the dater to be changed
|
|
7838
7889
|
* @param values - an object with options
|
|
7839
7890
|
* @param useLocalTimeZone - boolean true if you are passing the values in local timezone
|
|
@@ -7867,6 +7918,95 @@ const set = (date, values, useLocalTimeZone = false) => {
|
|
|
7867
7918
|
}
|
|
7868
7919
|
return newDate;
|
|
7869
7920
|
};
|
|
7921
|
+
/**
|
|
7922
|
+
* Get hours of a passed date in UTC (or local timezone if passed false)
|
|
7923
|
+
* @param date - the date of which to extract hours
|
|
7924
|
+
* @param utc - boolean true - whether to get UTC hours
|
|
7925
|
+
* @returns the hour number
|
|
7926
|
+
*/
|
|
7927
|
+
const getHours = (date, utc = true) => {
|
|
7928
|
+
if (utc) {
|
|
7929
|
+
return date.getUTCHours();
|
|
7930
|
+
}
|
|
7931
|
+
return getHours$1(date);
|
|
7932
|
+
};
|
|
7933
|
+
/**
|
|
7934
|
+
* Return the start of hour for the given date. The result will be in UTC.
|
|
7935
|
+
* @param date - the date of which to retrieve the start of the hour
|
|
7936
|
+
* @returns the new date
|
|
7937
|
+
*/
|
|
7938
|
+
const startOfHourUTC = date => {
|
|
7939
|
+
const hourNum = date.getUTCHours();
|
|
7940
|
+
return set(new Date(date), {
|
|
7941
|
+
hours: hourNum,
|
|
7942
|
+
minutes: 0,
|
|
7943
|
+
seconds: 0,
|
|
7944
|
+
milliseconds: 0
|
|
7945
|
+
});
|
|
7946
|
+
};
|
|
7947
|
+
/**
|
|
7948
|
+
* Return the start of a day for the given date. The result will be in UTC.
|
|
7949
|
+
* @param date - the date of which to retrieve the start of day
|
|
7950
|
+
* @returns the new date
|
|
7951
|
+
*/
|
|
7952
|
+
const startOfDayUTC = date => {
|
|
7953
|
+
const dateNum = date.getUTCDate();
|
|
7954
|
+
return set(new Date(date), {
|
|
7955
|
+
date: dateNum,
|
|
7956
|
+
hours: 0,
|
|
7957
|
+
minutes: 0,
|
|
7958
|
+
seconds: 0,
|
|
7959
|
+
milliseconds: 0
|
|
7960
|
+
});
|
|
7961
|
+
};
|
|
7962
|
+
/**
|
|
7963
|
+
* Return the start of a week for the given date. The result will be in UTC.
|
|
7964
|
+
* @param date - the date of which to retrieve the start of the week
|
|
7965
|
+
* @returns the new date
|
|
7966
|
+
*/
|
|
7967
|
+
const startOfWeekUTC = date => {
|
|
7968
|
+
const dateNum = date.getUTCDate();
|
|
7969
|
+
const dayNum = date.getUTCDay();
|
|
7970
|
+
const dayDifference = (dayNum < 1 ? 7 : 0) + dayNum - 1;
|
|
7971
|
+
return set(new Date(date), {
|
|
7972
|
+
date: dateNum - dayDifference,
|
|
7973
|
+
hours: 0,
|
|
7974
|
+
minutes: 0,
|
|
7975
|
+
seconds: 0,
|
|
7976
|
+
milliseconds: 0
|
|
7977
|
+
});
|
|
7978
|
+
};
|
|
7979
|
+
/**
|
|
7980
|
+
* Return the start of a month for the given date. The result will be in UTC.
|
|
7981
|
+
* @param date - the date of which to retrieve the start of the month
|
|
7982
|
+
* @returns the new date
|
|
7983
|
+
*/
|
|
7984
|
+
const startOfMonthUTC = date => {
|
|
7985
|
+
return set(new Date(date), {
|
|
7986
|
+
date: 1,
|
|
7987
|
+
hours: 0,
|
|
7988
|
+
minutes: 0,
|
|
7989
|
+
seconds: 0,
|
|
7990
|
+
milliseconds: 0
|
|
7991
|
+
});
|
|
7992
|
+
};
|
|
7993
|
+
/**
|
|
7994
|
+
* Return the start of a year for the given date. The result will be in UTC.
|
|
7995
|
+
* @param date - the date of which to retrieve the start of the year
|
|
7996
|
+
* @returns the new date
|
|
7997
|
+
*/
|
|
7998
|
+
const startOfYearUTC = date => {
|
|
7999
|
+
const yearNum = date.getUTCFullYear();
|
|
8000
|
+
return set(new Date(date), {
|
|
8001
|
+
year: yearNum,
|
|
8002
|
+
month: 0,
|
|
8003
|
+
date: 1,
|
|
8004
|
+
hours: 0,
|
|
8005
|
+
minutes: 0,
|
|
8006
|
+
seconds: 0,
|
|
8007
|
+
milliseconds: 0
|
|
8008
|
+
});
|
|
8009
|
+
};
|
|
7870
8010
|
|
|
7871
8011
|
/* *
|
|
7872
8012
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -7913,10 +8053,20 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
7913
8053
|
getNowUtc: getNowUtc,
|
|
7914
8054
|
getCurrentTimeAsString: getCurrentTimeAsString,
|
|
7915
8055
|
set: set,
|
|
8056
|
+
getHours: getHours,
|
|
8057
|
+
startOfHourUTC: startOfHourUTC,
|
|
8058
|
+
startOfDayUTC: startOfDayUTC,
|
|
8059
|
+
startOfWeekUTC: startOfWeekUTC,
|
|
8060
|
+
startOfMonthUTC: startOfMonthUTC,
|
|
8061
|
+
startOfYearUTC: startOfYearUTC,
|
|
7916
8062
|
isEqual: isEqual,
|
|
7917
8063
|
startOfDay: startOfDay,
|
|
7918
8064
|
parseISO: parseISO,
|
|
7919
|
-
isWithinInterval: isWithinInterval
|
|
8065
|
+
isWithinInterval: isWithinInterval,
|
|
8066
|
+
getDay: getDay,
|
|
8067
|
+
getMonth: getMonth,
|
|
8068
|
+
getYear: getYear,
|
|
8069
|
+
getWeek: getWeek
|
|
7920
8070
|
});
|
|
7921
8071
|
|
|
7922
8072
|
/* *
|
|
@@ -7962,6 +8112,39 @@ const createToolkitMockStoreWithEggs = storeConfig => {
|
|
|
7962
8112
|
return store;
|
|
7963
8113
|
};
|
|
7964
8114
|
|
|
8115
|
+
/**
|
|
8116
|
+
* Update i18next translations on the fly when used outside React components
|
|
8117
|
+
* NOTE: If possible pass the `t` function instead of using this
|
|
8118
|
+
* Because this doesnt trigger a rerender when using a language select
|
|
8119
|
+
* This only works for simple values, no interpolation
|
|
8120
|
+
*/
|
|
8121
|
+
const handleOutsideComponentTranslations = (translationList, namespace, defaultLanguage = 'en') => {
|
|
8122
|
+
var _a;
|
|
8123
|
+
// we need to create a new object, do not reference the original list directly
|
|
8124
|
+
const outsideComponentTranslations = Object.assign({}, translationList[defaultLanguage]);
|
|
8125
|
+
const updateOutsideComponentTranslations = () => {
|
|
8126
|
+
Object.keys(outsideComponentTranslations).forEach(key => {
|
|
8127
|
+
// @ts-expect-error we need to reassign the translations
|
|
8128
|
+
outsideComponentTranslations[key] = i18next.t(key, {
|
|
8129
|
+
ns: namespace
|
|
8130
|
+
});
|
|
8131
|
+
});
|
|
8132
|
+
};
|
|
8133
|
+
if (i18next.isInitialized) {
|
|
8134
|
+
updateOutsideComponentTranslations();
|
|
8135
|
+
}
|
|
8136
|
+
i18next.on('initialized', () => {
|
|
8137
|
+
updateOutsideComponentTranslations();
|
|
8138
|
+
});
|
|
8139
|
+
i18next.on('languageChanged', () => {
|
|
8140
|
+
updateOutsideComponentTranslations();
|
|
8141
|
+
});
|
|
8142
|
+
(_a = i18next.store) === null || _a === void 0 ? void 0 : _a.on('added', () => {
|
|
8143
|
+
updateOutsideComponentTranslations();
|
|
8144
|
+
});
|
|
8145
|
+
return outsideComponentTranslations;
|
|
8146
|
+
};
|
|
8147
|
+
|
|
7965
8148
|
/* *
|
|
7966
8149
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7967
8150
|
* you may not use this file except in compliance with the License.
|
|
@@ -8010,4 +8193,4 @@ class RenderCounter {
|
|
|
8010
8193
|
}
|
|
8011
8194
|
const renderCounter = new RenderCounter();
|
|
8012
8195
|
|
|
8013
|
-
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, BUTTON_TITLE, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, ErrorBoundary, LastUpdateTime, ResizeComponent as Resizable, SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createMockStoreWithEggs, createMockStoreWithEggsAndMiddleware, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosError, pollingIntervalTimeout, renderCounter, showPrompt, sliderHeaderStyle, useConfirmationDialog, useControlledTooltip, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
|
8196
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, BUTTON_TITLE, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, ErrorBoundary, LastUpdateTime, ResizeComponent as Resizable, SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createMockStoreWithEggs, createMockStoreWithEggsAndMiddleware, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, handleOutsideComponentTranslations, isAxiosError, pollingIntervalTimeout, renderCounter, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.0",
|
|
4
4
|
"description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"axios": "1.5.0",
|
|
19
19
|
"date-fns": "^3.3.0",
|
|
20
20
|
"redux-mock-store": "^1.5.4",
|
|
21
|
-
"@reduxjs/toolkit": "^1.9.7"
|
|
21
|
+
"@reduxjs/toolkit": "^1.9.7",
|
|
22
|
+
"i18next": "^23.7.19"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
25
|
"react": "18"
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { SwitchProps } from '@mui/material';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const SwitchButton: React.FC<SwitchProps
|
|
3
|
+
declare const SwitchButton: React.FC<SwitchProps & {
|
|
4
|
+
activeLabel?: string;
|
|
5
|
+
inActiveLabel?: string;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
}>;
|
|
4
8
|
export default SwitchButton;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseSelectProps, SelectVariants } from '@mui/material';
|
|
3
|
-
import { SxProps } from '@mui/material/styles';
|
|
4
|
-
interface
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
|
+
interface ListElement {
|
|
5
5
|
value: string;
|
|
6
6
|
}
|
|
7
7
|
type TooltipSelectProps = Omit<BaseSelectProps, 'sx'> & {
|
|
8
8
|
tooltip: string;
|
|
9
|
-
list?:
|
|
9
|
+
list?: ListElement[];
|
|
10
10
|
currentIndex?: number;
|
|
11
|
-
onChangeMouseWheel?: (element:
|
|
11
|
+
onChangeMouseWheel?: (element: ListElement) => void;
|
|
12
12
|
requiresCtrlToChange?: boolean;
|
|
13
13
|
isEnabled?: boolean;
|
|
14
14
|
hasBackgroundColor?: boolean;
|
|
15
15
|
variant?: SelectVariants;
|
|
16
16
|
additionalStyling?: SxProps;
|
|
17
|
+
skipLocalStyling?: boolean;
|
|
17
18
|
};
|
|
18
19
|
export declare const TooltipSelect: React.FC<TooltipSelectProps>;
|
|
20
|
+
export declare const tooltipContainerStyles: (theme: Theme, isEnabled: boolean, hasBackgroundColor?: boolean) => object;
|
|
19
21
|
export {};
|
package/src/lib/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDebounce: (value: string, timeout: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseISO, isEqual, Duration, startOfDay, isWithinInterval } from 'date-fns';
|
|
1
|
+
import { parseISO, isEqual, Duration, startOfDay, isWithinInterval, getDay, getMonth, getYear, getWeek } from 'date-fns';
|
|
2
2
|
export interface DateValues {
|
|
3
3
|
year?: number;
|
|
4
4
|
month?: number;
|
|
@@ -268,16 +268,54 @@ export declare const getNowUtc: () => Date;
|
|
|
268
268
|
export declare const getCurrentTimeAsString: (strFormat?: string, utc?: boolean) => string;
|
|
269
269
|
/**
|
|
270
270
|
* Set date values to a given date (by default it is assumed you are passing the new values in UTC).
|
|
271
|
+
* Note that months start at 0!
|
|
271
272
|
* @param date - the dater to be changed
|
|
272
273
|
* @param values - an object with options
|
|
273
274
|
* @param useLocalTimeZone - boolean true if you are passing the values in local timezone
|
|
274
275
|
* @returns the new date with options set
|
|
275
276
|
*/
|
|
276
277
|
export declare const set: (date: Date, values: DateValues, useLocalTimeZone?: boolean) => Date;
|
|
278
|
+
/**
|
|
279
|
+
* Get hours of a passed date in UTC (or local timezone if passed false)
|
|
280
|
+
* @param date - the date of which to extract hours
|
|
281
|
+
* @param utc - boolean true - whether to get UTC hours
|
|
282
|
+
* @returns the hour number
|
|
283
|
+
*/
|
|
284
|
+
export declare const getHours: (date: Date, utc?: boolean) => number;
|
|
285
|
+
/**
|
|
286
|
+
* Return the start of hour for the given date. The result will be in UTC.
|
|
287
|
+
* @param date - the date of which to retrieve the start of the hour
|
|
288
|
+
* @returns the new date
|
|
289
|
+
*/
|
|
290
|
+
export declare const startOfHourUTC: (date: Date) => Date;
|
|
291
|
+
/**
|
|
292
|
+
* Return the start of a day for the given date. The result will be in UTC.
|
|
293
|
+
* @param date - the date of which to retrieve the start of day
|
|
294
|
+
* @returns the new date
|
|
295
|
+
*/
|
|
296
|
+
export declare const startOfDayUTC: (date: Date) => Date;
|
|
297
|
+
/**
|
|
298
|
+
* Return the start of a week for the given date. The result will be in UTC.
|
|
299
|
+
* @param date - the date of which to retrieve the start of the week
|
|
300
|
+
* @returns the new date
|
|
301
|
+
*/
|
|
302
|
+
export declare const startOfWeekUTC: (date: Date) => Date;
|
|
303
|
+
/**
|
|
304
|
+
* Return the start of a month for the given date. The result will be in UTC.
|
|
305
|
+
* @param date - the date of which to retrieve the start of the month
|
|
306
|
+
* @returns the new date
|
|
307
|
+
*/
|
|
308
|
+
export declare const startOfMonthUTC: (date: Date) => Date;
|
|
309
|
+
/**
|
|
310
|
+
* Return the start of a year for the given date. The result will be in UTC.
|
|
311
|
+
* @param date - the date of which to retrieve the start of the year
|
|
312
|
+
* @returns the new date
|
|
313
|
+
*/
|
|
314
|
+
export declare const startOfYearUTC: (date: Date) => Date;
|
|
277
315
|
/**
|
|
278
316
|
* Compares two dates if values are the same
|
|
279
317
|
* @param {Date} date - first date
|
|
280
318
|
* @param {Date} date - second date
|
|
281
319
|
* @returns {boolean} - True if dates are equal
|
|
282
320
|
*/
|
|
283
|
-
export { isEqual, startOfDay, parseISO, isWithinInterval };
|
|
321
|
+
export { isEqual, startOfDay, parseISO, isWithinInterval, getDay, getMonth, getYear, getWeek, };
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './translationUtils';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update i18next translations on the fly when used outside React components
|
|
3
|
+
* NOTE: If possible pass the `t` function instead of using this
|
|
4
|
+
* Because this doesnt trigger a rerender when using a language select
|
|
5
|
+
* This only works for simple values, no interpolation
|
|
6
|
+
*/
|
|
7
|
+
export declare const handleOutsideComponentTranslations: <T extends Record<string, string>>(translationList: Record<string, T>, namespace: string, defaultLanguage?: string) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|