@opengeoweb/layer-select 10.2.0 → 10.2.1-spike-ol.1
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
|
@@ -4,16 +4,16 @@ import React__default from 'react';
|
|
|
4
4
|
import { useSelector, useDispatch } from 'react-redux';
|
|
5
5
|
import { CustomIconButton, FilterOption, ToolContainerDraggable, CustomAccordion, CustomToggleButton, CustomTooltip, SearchHighlight, SearchField, ToggleMenu } from '@opengeoweb/shared';
|
|
6
6
|
import { Filter, LayersAdd, Add, Cached, Edit, Visibility, Delete, Close, Copy } from '@opengeoweb/theme';
|
|
7
|
-
import { uiTypes, serviceActions, selectorMemoizationOptions, serviceSelectors, uiActions, getUserAddedServices, setUserAddedServices, layerActions, uiSelectors, layerSelectors, useSetupDialog, mapSelectors, layerTypes } from '@opengeoweb/store';
|
|
8
|
-
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
|
|
7
|
+
import { uiTypes, serviceActions, selectorMemoizationOptions, serviceSelectors, uiActions, getUserAddedServices, setUserAddedServices, layerActions, uiSelectors, layerSelectors, mapListener, serviceListener, layersListener, mapReducer, serviceReducer, layerReducer, uiReducer, useSetupDialog, mapSelectors, layerTypes } from '@opengeoweb/store';
|
|
8
|
+
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
9
9
|
import { compact, countBy, partition } from 'lodash';
|
|
10
|
+
import { snackbarListener, snackbarReducer, snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
|
|
10
11
|
import { Switch, Grid2, List, Box, Typography, useTheme, Backdrop, CircularProgress, Button, ListItem, ListItemText, Dialog, DialogTitle, LinearProgress, DialogContent, InputAdornment, DialogActions } from '@mui/material';
|
|
11
12
|
import 'i18next';
|
|
12
13
|
import { useTranslation } from 'react-i18next';
|
|
13
14
|
import { FixedSizeList } from 'react-window';
|
|
14
15
|
import { getDimensionsList, LayerInfoButton } from '@opengeoweb/webmap-react';
|
|
15
16
|
import { webmapUtils, LayerType, getWMSServiceId, queryWMSServiceInfo, queryWMSLayers, invalidateWMSGetCapabilities, clearImageCacheForAllMaps } from '@opengeoweb/webmap';
|
|
16
|
-
import { snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
|
|
17
17
|
import { ReactHookFormProvider, defaultFormOptions, ReactHookFormTextField } from '@opengeoweb/form-fields';
|
|
18
18
|
import { useFormContext } from 'react-hook-form';
|
|
19
19
|
|
|
@@ -459,8 +459,8 @@ var slice = createSlice({
|
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
|
-
var
|
|
463
|
-
|
|
462
|
+
var layerSelectReducer = slice.reducer,
|
|
463
|
+
layerSelectActions = slice.actions;
|
|
464
464
|
|
|
465
465
|
/* *
|
|
466
466
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1189,13 +1189,24 @@ layerSelectListener.startListening({
|
|
|
1189
1189
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1190
1190
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1191
1191
|
* */
|
|
1192
|
-
var
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1192
|
+
var layerSelectReducersMap = {
|
|
1193
|
+
webmap: mapReducer,
|
|
1194
|
+
services: serviceReducer,
|
|
1195
|
+
layers: layerReducer,
|
|
1196
|
+
layerSelect: layerSelectReducer,
|
|
1197
|
+
ui: uiReducer,
|
|
1198
|
+
snackbar: snackbarReducer
|
|
1199
|
+
};
|
|
1200
|
+
var layerSelectMiddlewares = [mapListener.middleware, serviceListener.middleware, layersListener.middleware, layerSelectListener.middleware, snackbarListener.middleware];
|
|
1201
|
+
var layerSelectRootReducer = combineReducers(layerSelectReducersMap);
|
|
1202
|
+
var createMockStore = function createMockStore(mockState) {
|
|
1203
|
+
return configureStore({
|
|
1204
|
+
reducer: layerSelectRootReducer,
|
|
1205
|
+
preloadedState: mockState,
|
|
1206
|
+
middleware: function middleware(getDefaultMiddleware) {
|
|
1207
|
+
return getDefaultMiddleware().concat(layerSelectMiddlewares);
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1199
1210
|
};
|
|
1200
1211
|
|
|
1201
1212
|
var KeywordFilterButtonConnect = function KeywordFilterButtonConnect(_ref) {
|
|
@@ -3198,4 +3209,4 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
3198
3209
|
});
|
|
3199
3210
|
};
|
|
3200
3211
|
|
|
3201
|
-
export { AllChipConnect, KeywordFilterButtonConnect, KeywordFilterResults, KeywordFilterResultsConnect, KeywordFilterResultsListItemConnect, KeywordFilterSelectAllSwitchConnect, LAYER_SELECT_NAMESPACE, LayerAddRemoveButton, LayerList, LayerListConnect, LayerListDimensions, LayerListRow, LayerSelectButtonConnect, LayerSelectConnect, SearchFieldConnect, ServiceChip, ServiceChipConnect, ServiceList, ServiceListConnect, ServiceOptionsButton, ServiceOptionsDialog, ServiceOptionsDialogConnect, ServicePopup, ServicePopupConnect, ServicePopupDialogConnect, getServiceFailedUpdateMessage, getServiceSuccesUpdateMessage, getSuccesMessage, isUserAddedService, layerSelectActions,
|
|
3212
|
+
export { AllChipConnect, KeywordFilterButtonConnect, KeywordFilterResults, KeywordFilterResultsConnect, KeywordFilterResultsListItemConnect, KeywordFilterSelectAllSwitchConnect, LAYER_SELECT_NAMESPACE, LayerAddRemoveButton, LayerList, LayerListConnect, LayerListDimensions, LayerListRow, LayerSelectButtonConnect, LayerSelectConnect, SearchFieldConnect, ServiceChip, ServiceChipConnect, ServiceList, ServiceListConnect, ServiceOptionsButton, ServiceOptionsDialog, ServiceOptionsDialogConnect, ServicePopup, ServicePopupConnect, ServicePopupDialogConnect, createMockStore, getServiceFailedUpdateMessage, getServiceSuccesUpdateMessage, getSuccesMessage, isUserAddedService, layerSelectActions, initialState as layerSelectInitialState, layerSelectListener, layerSelectMiddlewares, layerSelectReducer, layerSelectReducersMap, selectors as layerSelectSelectors, layerSelectTranslations, types as layerSelectTypes, useAppSelector };
|
package/package.json
CHANGED
package/src/lib/store/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { layerSelectActions, initialState as layerSelectInitialState,
|
|
1
|
+
export { layerSelectActions, initialState as layerSelectInitialState, layerSelectReducer, } from './reducer';
|
|
2
2
|
export * as layerSelectSelectors from './selectors';
|
|
3
3
|
export { useAppSelector } from './selectors';
|
|
4
4
|
export * as layerSelectTypes from './types';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './store';
|
|
6
6
|
export { isUserAddedService } from './utils';
|
|
7
7
|
export { layerSelectListener } from './listeners';
|
|
@@ -5,8 +5,7 @@ export declare const layerSelectFilterAdapter: import("@reduxjs/toolkit").Entity
|
|
|
5
5
|
export declare const layerSelectActiveServicesAdapter: import("@reduxjs/toolkit").EntityAdapter<ActiveServiceObject>;
|
|
6
6
|
export declare const initialServicePopupState: ServicePopupObject;
|
|
7
7
|
export declare const initialState: LayerSelectStoreType;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const layerSelectActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
8
|
+
export declare const layerSelectReducer: import("redux").Reducer<LayerSelectStoreType>, layerSelectActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
10
9
|
setSearchFilter: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<SetSearchFilterPayload>) => void;
|
|
11
10
|
closeServicePopupOpen: (draft: Draft<LayerSelectStoreType>) => void;
|
|
12
11
|
toggleServicePopup: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<ToggleServicePopupPayload>) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WebMapStateModuleState, UIModuleState } from '@opengeoweb/store';
|
|
2
|
+
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
3
|
+
import { LayerSelectModuleState } from './types';
|
|
4
|
+
export declare const layerSelectReducersMap: {
|
|
5
|
+
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").AnyAction>;
|
|
6
|
+
services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState, import("redux").AnyAction>;
|
|
7
|
+
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").AnyAction>;
|
|
8
|
+
layerSelect: import("redux").Reducer<import("./types").LayerSelectStoreType>;
|
|
9
|
+
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").AnyAction>;
|
|
10
|
+
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").AnyAction>;
|
|
11
|
+
};
|
|
12
|
+
export declare const layerSelectMiddlewares: (import("@reduxjs/toolkit").ListenerMiddleware<import("./types").RootState, import("@reduxjs/toolkit").ThunkDispatch<import("./types").RootState, unknown, import("redux").AnyAction>, unknown> | import("@reduxjs/toolkit").ListenerMiddleware<import("@opengeoweb/snackbar").SnackbarModuleStore, import("@reduxjs/toolkit").ThunkDispatch<import("@opengeoweb/snackbar").SnackbarModuleStore, unknown, import("redux").AnyAction>, unknown>)[];
|
|
13
|
+
export declare const createMockStore: (mockState?: WebMapStateModuleState | LayerSelectModuleState | UIModuleState) => ToolkitStore;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const layerSelectConfig: {
|
|
2
|
-
id: string;
|
|
3
|
-
reducersMap: {
|
|
4
|
-
layerSelect: import("redux").Reducer<import("./types").LayerSelectStoreType>;
|
|
5
|
-
};
|
|
6
|
-
middlewares: import("@reduxjs/toolkit").ListenerMiddleware<import("./types").RootState, import("redux-thunk").ThunkDispatch<import("./types").RootState, unknown, import("redux").AnyAction>, unknown>[];
|
|
7
|
-
};
|
package/src/lib/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createMockStore } from './testUtils';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Store } from '@reduxjs/toolkit';
|
|
2
|
-
import { uiTypes, WebMapStateModuleState } from '@opengeoweb/store';
|
|
3
|
-
import { LayerSelectModuleState } from '../store/types';
|
|
4
|
-
export declare const createMockStore: (mockState?: LayerSelectModuleState & uiTypes.UIModuleState & WebMapStateModuleState) => Store;
|