@opengeoweb/shared 9.29.1 → 9.31.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
|
@@ -11,8 +11,8 @@ import { Resizable } from 're-resizable';
|
|
|
11
11
|
import * as Sentry from '@sentry/react';
|
|
12
12
|
import { useStore } from 'react-redux';
|
|
13
13
|
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, roundToNearestMinutes as roundToNearestMinutes$1, isBefore as isBefore$1, isAfter as isAfter$1, isValid as isValid$1, getUnixTime, fromUnixTime, set as set$3, getHours as getHours$1, startOfDay, addMinutes, addHours, getDay, getDayOfYear, getMonth, getWeek, getYear, isWithinInterval } from 'date-fns';
|
|
14
|
-
import
|
|
15
|
-
import { configureStore
|
|
14
|
+
import configureStoreToBeDeprecated from 'redux-mock-store';
|
|
15
|
+
import { configureStore } from '@reduxjs/toolkit';
|
|
16
16
|
|
|
17
17
|
var en = {
|
|
18
18
|
"shared-choose-app-mode": "Choose your default app mode",
|
|
@@ -3485,15 +3485,12 @@ $$a({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
|
3485
3485
|
* See the License for the specific language governing permissions and
|
|
3486
3486
|
* limitations under the License.
|
|
3487
3487
|
*
|
|
3488
|
-
* Copyright
|
|
3489
|
-
* Copyright
|
|
3488
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3489
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
3490
3490
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3491
3491
|
* */
|
|
3492
3492
|
const showPrompt = event => {
|
|
3493
|
-
|
|
3494
|
-
// @ts-ignore
|
|
3495
|
-
// eslint-disable-next-line no-param-reassign
|
|
3496
|
-
event.returnValue = 'Changes that you made may not be saved.'; // changes are your browser have default text to overrule this
|
|
3493
|
+
event.preventDefault();
|
|
3497
3494
|
};
|
|
3498
3495
|
function usePreventBrowserClose(shouldPreventClose) {
|
|
3499
3496
|
React.useEffect(() => {
|
|
@@ -8175,7 +8172,7 @@ class CanvasComponent extends Component {
|
|
|
8175
8172
|
event,
|
|
8176
8173
|
deltaY: event.deltaY,
|
|
8177
8174
|
deltaX: event.deltaX,
|
|
8178
|
-
canvasWidth: event.
|
|
8175
|
+
canvasWidth: event.target.width,
|
|
8179
8176
|
mouseX: event.offsetX
|
|
8180
8177
|
});
|
|
8181
8178
|
}
|
|
@@ -9442,25 +9439,8 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
9442
9439
|
utc: utc
|
|
9443
9440
|
});
|
|
9444
9441
|
|
|
9445
|
-
/* *
|
|
9446
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9447
|
-
* you may not use this file except in compliance with the License.
|
|
9448
|
-
* You may obtain a copy of the License at
|
|
9449
|
-
*
|
|
9450
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9451
|
-
*
|
|
9452
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9453
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9454
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9455
|
-
* See the License for the specific language governing permissions and
|
|
9456
|
-
* limitations under the License.
|
|
9457
|
-
*
|
|
9458
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9459
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
9460
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9461
|
-
* */
|
|
9462
9442
|
const createMockStoreWithEggs = mockState => {
|
|
9463
|
-
const mockStore =
|
|
9443
|
+
const mockStore = configureStoreToBeDeprecated();
|
|
9464
9444
|
const store = mockStore(mockState);
|
|
9465
9445
|
store.addEggs = typeof jest !== 'undefined' ? jest.fn() : () => {}; // mocking the dynamic module loader
|
|
9466
9446
|
return store;
|
|
@@ -9470,10 +9450,10 @@ const createToolkitMockStoreWithEggs = storeConfig => {
|
|
|
9470
9450
|
reducer,
|
|
9471
9451
|
preloadedState
|
|
9472
9452
|
} = storeConfig;
|
|
9473
|
-
const store = configureStore
|
|
9453
|
+
const store = configureStore(Object.assign(Object.assign({}, storeConfig), {
|
|
9474
9454
|
reducer,
|
|
9475
9455
|
preloadedState
|
|
9476
|
-
});
|
|
9456
|
+
}));
|
|
9477
9457
|
store.addEggs = typeof jest !== 'undefined' ? jest.fn() : () => {}; // mocking the dynamic module loader
|
|
9478
9458
|
return store;
|
|
9479
9459
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.31.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": {
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"lodash": "^4.17.21",
|
|
15
15
|
"@redux-eggs/core": "^2.2.0",
|
|
16
16
|
"react-redux": "^8.1.3",
|
|
17
|
-
"axios": "1.
|
|
17
|
+
"axios": "^1.7.7",
|
|
18
18
|
"date-fns": "^3.3.0",
|
|
19
19
|
"redux-mock-store": "^1.5.4",
|
|
20
20
|
"@reduxjs/toolkit": "^1.9.7",
|
|
21
21
|
"react-i18next": "^14.1.2",
|
|
22
22
|
"i18next": "^23.11.5",
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
23
|
+
"@sentry/react": "^8.34.0",
|
|
24
|
+
"@mui/material": "^6.1.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "18",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MockStoreEnhanced } from 'redux-mock-store';
|
|
2
|
-
import { AnyAction, Reducer, ReducersMapObject, ThunkMiddleware, StoreEnhancer } from '@reduxjs/toolkit';
|
|
3
2
|
import { ConfigureStoreOptions, ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
4
3
|
interface MockStoreWithEggs extends MockStoreEnhanced {
|
|
5
4
|
addEggs?: () => void;
|
|
@@ -7,14 +6,6 @@ interface MockStoreWithEggs extends MockStoreEnhanced {
|
|
|
7
6
|
interface ToolkitStoreWithEggs extends ToolkitStore {
|
|
8
7
|
addEggs?: () => void;
|
|
9
8
|
}
|
|
10
|
-
interface StoreConfig {
|
|
11
|
-
reducer: Reducer<unknown, AnyAction> | ReducersMapObject<unknown, AnyAction>;
|
|
12
|
-
preloadedState: ConfigureStoreOptions<unknown, AnyAction, [
|
|
13
|
-
ThunkMiddleware<unknown, AnyAction>
|
|
14
|
-
], [
|
|
15
|
-
StoreEnhancer
|
|
16
|
-
]> | object | undefined;
|
|
17
|
-
}
|
|
18
9
|
export declare const createMockStoreWithEggs: (mockState: unknown) => MockStoreWithEggs;
|
|
19
|
-
export declare const createToolkitMockStoreWithEggs: (storeConfig:
|
|
10
|
+
export declare const createToolkitMockStoreWithEggs: (storeConfig: ConfigureStoreOptions) => ToolkitStoreWithEggs;
|
|
20
11
|
export {};
|