@opengeoweb/layer-select 12.2.0 → 12.3.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 +59 -51
- package/package.json +11 -11
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +1 -0
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +9 -0
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +0 -1
- package/src/lib/store/listeners.d.ts +1 -1
- package/src/lib/store/reducer.d.ts +2 -2
- package/src/lib/store/selectors.d.ts +435 -37
- package/src/lib/store/store.d.ts +8 -8
- package/src/lib/store/types.d.ts +2 -2
- package/src/lib/store/utils.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import { useSelector, useDispatch } from 'react-redux';
|
|
5
|
-
import { CustomIconButton, FilterOption, ToolContainerDraggable, CustomAccordion, CustomToggleButton, CustomTooltip, SearchHighlight, SearchField, ToggleMenu, CustomDialog } from '@opengeoweb/shared';
|
|
5
|
+
import { CustomIconButton, FilterOption, ToolContainerDraggable, CustomAccordion, CustomToggleButton, CustomTooltip, SearchHighlight, SearchField, AlertBanner, ToggleMenu, CustomDialog } from '@opengeoweb/shared';
|
|
6
6
|
import { Filter, LayersAdd, Add, Cached, Edit, Visibility, Delete, Copy } from '@opengeoweb/theme';
|
|
7
|
-
import { uiTypes, serviceActions, selectorMemoizationOptions, serviceSelectors, uiActions, getUserAddedServices, setUserAddedServices, layerActions, uiSelectors, layerSelectors, mapListener, serviceListener, layersListener, uiReducer, layerReducer, serviceReducer, mapReducer, useSetupDialog, mapSelectors, layerTypes } from '@opengeoweb/store';
|
|
7
|
+
import { uiTypes, serviceActions, selectorMemoizationOptions, serviceSelectors, uiActions, getUserAddedServices, setUserAddedServices, layerActions, uiSelectors, layerSelectors, mapListener, serviceListener, layersListener, openlayersListener, uiReducer, layerReducer, serviceReducer, mapReducer, useSetupDialog, mapSelectors, layerTypes } from '@opengeoweb/store';
|
|
8
8
|
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
9
9
|
import { compact, countBy, partition } from 'lodash';
|
|
10
10
|
import { snackbarListener, snackbarReducer, snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
|
|
11
|
-
import { Switch,
|
|
11
|
+
import { Switch, Grid, List, Box, Typography, useTheme, Backdrop, CircularProgress, Button, ListItem, ListItemText, LinearProgress, InputAdornment } from '@mui/material';
|
|
12
12
|
import 'i18next';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
import { FixedSizeList } from 'react-window';
|
|
@@ -1197,7 +1197,7 @@ var layerSelectReducersMap = {
|
|
|
1197
1197
|
ui: uiReducer,
|
|
1198
1198
|
snackbar: snackbarReducer
|
|
1199
1199
|
};
|
|
1200
|
-
var layerSelectMiddlewares = [mapListener.middleware, serviceListener.middleware, layersListener.middleware, layerSelectListener.middleware, snackbarListener.middleware];
|
|
1200
|
+
var layerSelectMiddlewares = [mapListener.middleware, serviceListener.middleware, layersListener.middleware, layerSelectListener.middleware, snackbarListener.middleware, openlayersListener.middleware];
|
|
1201
1201
|
var layerSelectRootReducer = combineReducers(layerSelectReducersMap);
|
|
1202
1202
|
var createMockStore = function createMockStore(mockState) {
|
|
1203
1203
|
return configureStore({
|
|
@@ -1335,7 +1335,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1335
1335
|
onMouseDown: onMouseDown,
|
|
1336
1336
|
order: order,
|
|
1337
1337
|
source: source,
|
|
1338
|
-
children: [jsxs(
|
|
1338
|
+
children: [jsxs(Grid, {
|
|
1339
1339
|
container: true,
|
|
1340
1340
|
size: {
|
|
1341
1341
|
xs: 12
|
|
@@ -1348,7 +1348,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1348
1348
|
top: 0,
|
|
1349
1349
|
zIndex: 100
|
|
1350
1350
|
},
|
|
1351
|
-
children: [jsx(
|
|
1351
|
+
children: [jsx(Grid, {
|
|
1352
1352
|
container: true,
|
|
1353
1353
|
size: {
|
|
1354
1354
|
xs: 6
|
|
@@ -1359,7 +1359,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1359
1359
|
padding: '15px 15px 0 24px'
|
|
1360
1360
|
},
|
|
1361
1361
|
children: t('select-all')
|
|
1362
|
-
}), jsx(
|
|
1362
|
+
}), jsx(Grid, {
|
|
1363
1363
|
container: true,
|
|
1364
1364
|
size: {
|
|
1365
1365
|
xs: 6
|
|
@@ -1619,7 +1619,7 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1619
1619
|
var rowHeight = widthToRowHeight(layerSelectWidth);
|
|
1620
1620
|
var columns = widthToColumns(layerSelectWidth);
|
|
1621
1621
|
var dimensions = getDimensionsList(layer.dimensions);
|
|
1622
|
-
return jsxs(
|
|
1622
|
+
return jsxs(Grid, {
|
|
1623
1623
|
"data-testid": "layerListLayerRow",
|
|
1624
1624
|
container: true,
|
|
1625
1625
|
justifyContent: "center",
|
|
@@ -1632,10 +1632,10 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1632
1632
|
border: 'solid 1px',
|
|
1633
1633
|
borderColor: 'geowebColors.cards.cardContainerBorder'
|
|
1634
1634
|
},
|
|
1635
|
-
children: [jsxs(
|
|
1635
|
+
children: [jsxs(Grid, {
|
|
1636
1636
|
container: true,
|
|
1637
1637
|
sx: columns.column8,
|
|
1638
|
-
children: [jsx(
|
|
1638
|
+
children: [jsx(Grid, {
|
|
1639
1639
|
size: {
|
|
1640
1640
|
xs: 12
|
|
1641
1641
|
},
|
|
@@ -1653,7 +1653,7 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1653
1653
|
search: searchFilter
|
|
1654
1654
|
})
|
|
1655
1655
|
})
|
|
1656
|
-
}), jsxs(
|
|
1656
|
+
}), jsxs(Grid, {
|
|
1657
1657
|
container: true,
|
|
1658
1658
|
direction: "column",
|
|
1659
1659
|
sx: columns.column1,
|
|
@@ -1673,9 +1673,9 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1673
1673
|
isActive: hasActiveLayer,
|
|
1674
1674
|
onClick: onToggleActiveLayer
|
|
1675
1675
|
})]
|
|
1676
|
-
}), jsxs(
|
|
1676
|
+
}), jsxs(Grid, {
|
|
1677
1677
|
sx: columns.column2,
|
|
1678
|
-
children: [jsx(
|
|
1678
|
+
children: [jsx(Grid, {
|
|
1679
1679
|
sx: columns.column3,
|
|
1680
1680
|
children: layer["abstract"] && jsx(Typography, {
|
|
1681
1681
|
"data-testid": "layerAbstract",
|
|
@@ -1685,15 +1685,15 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1685
1685
|
search: searchFilter
|
|
1686
1686
|
})
|
|
1687
1687
|
})
|
|
1688
|
-
}), jsxs(
|
|
1688
|
+
}), jsxs(Grid, {
|
|
1689
1689
|
container: true,
|
|
1690
1690
|
sx: columns.column4,
|
|
1691
|
-
children: [jsx(
|
|
1691
|
+
children: [jsx(Grid, {
|
|
1692
1692
|
sx: columns.column5,
|
|
1693
1693
|
children: jsx(LayerListDimensions, {
|
|
1694
1694
|
dimensions: dimensions
|
|
1695
1695
|
})
|
|
1696
|
-
}), jsxs(
|
|
1696
|
+
}), jsxs(Grid, {
|
|
1697
1697
|
sx: columns.column6,
|
|
1698
1698
|
children: [layer.path.length > 0 && jsxs(Typography, {
|
|
1699
1699
|
sx: layerInfoStyle,
|
|
@@ -1713,7 +1713,7 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1713
1713
|
})]
|
|
1714
1714
|
})]
|
|
1715
1715
|
})]
|
|
1716
|
-
}), jsx(
|
|
1716
|
+
}), jsx(Grid, {
|
|
1717
1717
|
container: true,
|
|
1718
1718
|
sx: columns.column9,
|
|
1719
1719
|
justifyContent: "flex-end",
|
|
@@ -2127,11 +2127,14 @@ var styles = {
|
|
|
2127
2127
|
header: {
|
|
2128
2128
|
position: 'sticky',
|
|
2129
2129
|
top: 0,
|
|
2130
|
-
fontSize: 'default',
|
|
2131
2130
|
padding: '12px',
|
|
2132
2131
|
backgroundColor: 'geowebColors.background.surface',
|
|
2133
2132
|
zIndex: 100
|
|
2134
2133
|
},
|
|
2134
|
+
text: {
|
|
2135
|
+
fontSize: 'default',
|
|
2136
|
+
opacity: 0.67
|
|
2137
|
+
},
|
|
2135
2138
|
loading: {
|
|
2136
2139
|
position: 'absolute',
|
|
2137
2140
|
zIndex: 101
|
|
@@ -2164,7 +2167,8 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
2164
2167
|
selectedLayers = _ref.selectedLayers,
|
|
2165
2168
|
setServicePopupInfo = _ref.setServicePopupInfo,
|
|
2166
2169
|
_ref$isLoading = _ref.isLoading,
|
|
2167
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading
|
|
2170
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
2171
|
+
error = _ref.error;
|
|
2168
2172
|
var _useLayerSelectTransl = useLayerSelectTranslation(),
|
|
2169
2173
|
t = _useLayerSelectTransl.t;
|
|
2170
2174
|
var openAddService = function openAddService() {
|
|
@@ -2188,9 +2192,15 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
2188
2192
|
},
|
|
2189
2193
|
tabIndex: -1,
|
|
2190
2194
|
ref: dialogRef,
|
|
2191
|
-
children: [
|
|
2195
|
+
children: [jsxs(Box, {
|
|
2192
2196
|
sx: styles.header,
|
|
2193
|
-
children:
|
|
2197
|
+
children: [jsx(Box, {
|
|
2198
|
+
sx: styles.text,
|
|
2199
|
+
children: t('services')
|
|
2200
|
+
}), error && jsx(AlertBanner, {
|
|
2201
|
+
title: error,
|
|
2202
|
+
shouldClose: true
|
|
2203
|
+
})]
|
|
2194
2204
|
}), jsx(Backdrop, {
|
|
2195
2205
|
sx: Object.assign({}, styles.loading, {
|
|
2196
2206
|
backgroundSize: 'cover'
|
|
@@ -2270,7 +2280,7 @@ var Rows = function Rows(_ref2) {
|
|
|
2270
2280
|
marginLeft: 1
|
|
2271
2281
|
}
|
|
2272
2282
|
},
|
|
2273
|
-
children: jsxs(
|
|
2283
|
+
children: jsxs(Grid, {
|
|
2274
2284
|
container: true,
|
|
2275
2285
|
justifyContent: "left",
|
|
2276
2286
|
sx: {
|
|
@@ -2475,22 +2485,17 @@ var getServiceSuccesUpdateMessage = function getServiceSuccesUpdateMessage(servi
|
|
|
2475
2485
|
}
|
|
2476
2486
|
};
|
|
2477
2487
|
};
|
|
2478
|
-
var getServiceFailedUpdateMessage = function getServiceFailedUpdateMessage(error) {
|
|
2479
|
-
var message = error.message;
|
|
2480
|
-
return {
|
|
2481
|
-
type: snackbarTypes.SnackbarMessageType.TRANSLATABLE_MESSAGE,
|
|
2482
|
-
key: 'unable-to-update-service',
|
|
2483
|
-
params: {
|
|
2484
|
-
message: message
|
|
2485
|
-
}
|
|
2486
|
-
};
|
|
2487
|
-
};
|
|
2488
2488
|
var ServiceOptionsDialogConnect = function ServiceOptionsDialogConnect(_ref) {
|
|
2489
2489
|
var mapId = _ref.mapId;
|
|
2490
2490
|
var _React$useState = React.useState(false),
|
|
2491
2491
|
isLoading = _React$useState[0],
|
|
2492
2492
|
setIsLoading = _React$useState[1];
|
|
2493
|
+
var _React$useState2 = React.useState(undefined),
|
|
2494
|
+
error = _React$useState2[0],
|
|
2495
|
+
setError = _React$useState2[1];
|
|
2493
2496
|
var dispatch = useDispatch();
|
|
2497
|
+
var _useLayerSelectTransl = useLayerSelectTranslation(),
|
|
2498
|
+
t = _useLayerSelectTransl.t;
|
|
2494
2499
|
var serviceSetLayers = React.useCallback(function (payload) {
|
|
2495
2500
|
dispatch(serviceActions.serviceSetLayers(Object.assign({}, payload, {
|
|
2496
2501
|
isUpdating: true
|
|
@@ -2532,10 +2537,11 @@ var ServiceOptionsDialogConnect = function ServiceOptionsDialogConnect(_ref) {
|
|
|
2532
2537
|
while (1) switch (_context.prev = _context.next) {
|
|
2533
2538
|
case 0:
|
|
2534
2539
|
setIsLoading(true);
|
|
2535
|
-
|
|
2536
|
-
_context.
|
|
2540
|
+
setError(undefined);
|
|
2541
|
+
_context.prev = 2;
|
|
2542
|
+
_context.next = 5;
|
|
2537
2543
|
return loadWMSService(serviceUrl, true);
|
|
2538
|
-
case
|
|
2544
|
+
case 5:
|
|
2539
2545
|
layersForService = _context.sent;
|
|
2540
2546
|
service = getService(services, serviceUrl);
|
|
2541
2547
|
serviceSetLayers({
|
|
@@ -2550,35 +2556,36 @@ var ServiceOptionsDialogConnect = function ServiceOptionsDialogConnect(_ref) {
|
|
|
2550
2556
|
clearImageCacheForAllMaps();
|
|
2551
2557
|
serviceTitle = service && service.serviceName || layersForService.name;
|
|
2552
2558
|
showSnackbar(getServiceSuccesUpdateMessage(serviceTitle));
|
|
2553
|
-
_context.next =
|
|
2559
|
+
_context.next = 16;
|
|
2554
2560
|
break;
|
|
2555
|
-
case
|
|
2556
|
-
_context.prev =
|
|
2557
|
-
_context.t0 = _context["catch"](
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
case
|
|
2562
|
-
_context.prev =
|
|
2561
|
+
case 13:
|
|
2562
|
+
_context.prev = 13;
|
|
2563
|
+
_context.t0 = _context["catch"](2);
|
|
2564
|
+
setError(t('unable-to-update-service', {
|
|
2565
|
+
message: _context.t0.message
|
|
2566
|
+
}));
|
|
2567
|
+
case 16:
|
|
2568
|
+
_context.prev = 16;
|
|
2563
2569
|
setIsLoading(false);
|
|
2564
|
-
return _context.finish(
|
|
2565
|
-
case
|
|
2570
|
+
return _context.finish(16);
|
|
2571
|
+
case 19:
|
|
2566
2572
|
case "end":
|
|
2567
2573
|
return _context.stop();
|
|
2568
2574
|
}
|
|
2569
|
-
}, _callee, null, [[
|
|
2575
|
+
}, _callee, null, [[2, 13, 16, 19]]);
|
|
2570
2576
|
}));
|
|
2571
2577
|
return function (_x) {
|
|
2572
2578
|
return _ref2.apply(this, arguments);
|
|
2573
2579
|
};
|
|
2574
|
-
}(), [serviceSetLayers, services, showSnackbar]);
|
|
2580
|
+
}(), [serviceSetLayers, services, showSnackbar, t]);
|
|
2575
2581
|
return jsx(ServiceOptionsDialog, {
|
|
2576
2582
|
selectedLayers: selectedLayers,
|
|
2577
2583
|
services: services,
|
|
2578
2584
|
layerSelectRemoveService: layerSelectRemoveService,
|
|
2579
2585
|
layerSelectReloadService: layerSelectReloadService,
|
|
2580
2586
|
setServicePopupInfo: setServicePopupInfo,
|
|
2581
|
-
isLoading: isLoading
|
|
2587
|
+
isLoading: isLoading,
|
|
2588
|
+
error: error
|
|
2582
2589
|
});
|
|
2583
2590
|
};
|
|
2584
2591
|
|
|
@@ -2684,7 +2691,8 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2684
2691
|
},
|
|
2685
2692
|
children: jsx(KeywordFilterButtonConnect, {
|
|
2686
2693
|
mapId: mapId,
|
|
2687
|
-
isMultiMap: isMultiMap
|
|
2694
|
+
isMultiMap: isMultiMap,
|
|
2695
|
+
source: source
|
|
2688
2696
|
})
|
|
2689
2697
|
}), jsx(Box, {
|
|
2690
2698
|
sx: {
|
|
@@ -3182,4 +3190,4 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
3182
3190
|
});
|
|
3183
3191
|
};
|
|
3184
3192
|
|
|
3185
|
-
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,
|
|
3193
|
+
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, getServiceSuccesUpdateMessage, getSuccesMessage, isUserAddedService, layerSelectActions, initialState as layerSelectInitialState, layerSelectListener, layerSelectMiddlewares, layerSelectReducer, layerSelectReducersMap, selectors as layerSelectSelectors, layerSelectTranslations, types as layerSelectTypes, useAppSelector };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/layer-select",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "GeoWeb layer select library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "12.
|
|
12
|
-
"@opengeoweb/store": "12.
|
|
13
|
-
"react-redux": "^
|
|
14
|
-
"@opengeoweb/theme": "12.
|
|
15
|
-
"@opengeoweb/webmap-react": "12.
|
|
16
|
-
"@opengeoweb/webmap": "12.
|
|
11
|
+
"@opengeoweb/shared": "12.3.0",
|
|
12
|
+
"@opengeoweb/store": "12.3.0",
|
|
13
|
+
"react-redux": "^9.2.0",
|
|
14
|
+
"@opengeoweb/theme": "12.3.0",
|
|
15
|
+
"@opengeoweb/webmap-react": "12.3.0",
|
|
16
|
+
"@opengeoweb/webmap": "12.3.0",
|
|
17
17
|
"react-window": "^1.8.10",
|
|
18
|
-
"@opengeoweb/snackbar": "12.
|
|
19
|
-
"@opengeoweb/form-fields": "12.
|
|
18
|
+
"@opengeoweb/snackbar": "12.3.0",
|
|
19
|
+
"@opengeoweb/form-fields": "12.3.0",
|
|
20
20
|
"react-hook-form": "^7.50.1",
|
|
21
|
-
"@reduxjs/toolkit": "^
|
|
21
|
+
"@reduxjs/toolkit": "^2.6.1",
|
|
22
22
|
"lodash": "^4.17.21",
|
|
23
23
|
"i18next": "^23.11.5",
|
|
24
|
-
"@mui/material": "^
|
|
24
|
+
"@mui/material": "^7.0.1",
|
|
25
25
|
"react-i18next": "^15.1.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -34,3 +34,12 @@ export declare const ServiceOptionsDialogDark: {
|
|
|
34
34
|
}[];
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
+
export declare const ServiceOptionsDialogWithError: {
|
|
38
|
+
tags: string[];
|
|
39
|
+
args: {
|
|
40
|
+
services: layerSelectTypes.ActiveServiceObjectEntities;
|
|
41
|
+
selectedLayers: layerTypes.Layer[];
|
|
42
|
+
isLoading: boolean;
|
|
43
|
+
error: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -4,6 +4,5 @@ interface ServiceOptionsDialogConnectProps {
|
|
|
4
4
|
mapId?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const getServiceSuccesUpdateMessage: (serviceName: string) => snackbarTypes.TranslatableMessage;
|
|
7
|
-
export declare const getServiceFailedUpdateMessage: (error: Error) => snackbarTypes.TranslatableMessage;
|
|
8
7
|
export declare const ServiceOptionsDialogConnect: React.FC<ServiceOptionsDialogConnectProps>;
|
|
9
8
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RootState } from './types';
|
|
2
|
-
export declare const layerSelectListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<RootState, import("
|
|
2
|
+
export declare const layerSelectListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<RootState, import("redux-thunk").ThunkDispatch<RootState, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
2
|
import { uiTypes } from '@opengeoweb/store';
|
|
3
3
|
import { LayerSelectRemoveServicePayload, LayerSelectStoreType, SetSearchFilterPayload, ToggleKeywordsPayload, Filter, ActiveServiceObject, ToggleServicePopupPayload, ServicePopupObject } from './types';
|
|
4
|
-
export declare const layerSelectFilterAdapter: import("@reduxjs/toolkit").EntityAdapter<Filter>;
|
|
5
|
-
export declare const layerSelectActiveServicesAdapter: import("@reduxjs/toolkit").EntityAdapter<ActiveServiceObject>;
|
|
4
|
+
export declare const layerSelectFilterAdapter: import("@reduxjs/toolkit").EntityAdapter<Filter, string>;
|
|
5
|
+
export declare const layerSelectActiveServicesAdapter: import("@reduxjs/toolkit").EntityAdapter<ActiveServiceObject, string>;
|
|
6
6
|
export declare const initialServicePopupState: ServicePopupObject;
|
|
7
7
|
export declare const initialState: LayerSelectStoreType;
|
|
8
8
|
export declare const layerSelectReducer: import("redux").Reducer<LayerSelectStoreType>, layerSelectActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
@@ -8,10 +8,26 @@ export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
|
8
8
|
* @param {object} store store: object - store object
|
|
9
9
|
* @returns {array} returnType: string
|
|
10
10
|
*/
|
|
11
|
-
export declare const getSearchFilter: ((state: LayerSelectModuleState) => string) &
|
|
12
|
-
clearCache: () => void;
|
|
13
|
-
}> & {
|
|
11
|
+
export declare const getSearchFilter: ((state: LayerSelectModuleState) => string) & {
|
|
14
12
|
clearCache: () => void;
|
|
13
|
+
resultsCount: () => number;
|
|
14
|
+
resetResultsCount: () => void;
|
|
15
|
+
} & {
|
|
16
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => string;
|
|
17
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => string) & {
|
|
18
|
+
clearCache: () => void;
|
|
19
|
+
resultsCount: () => number;
|
|
20
|
+
resetResultsCount: () => void;
|
|
21
|
+
};
|
|
22
|
+
lastResult: () => string;
|
|
23
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
24
|
+
recomputations: () => number;
|
|
25
|
+
resetRecomputations: () => void;
|
|
26
|
+
dependencyRecomputations: () => number;
|
|
27
|
+
resetDependencyRecomputations: () => void;
|
|
28
|
+
} & {
|
|
29
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
30
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
15
31
|
};
|
|
16
32
|
/**
|
|
17
33
|
* Returns active services array
|
|
@@ -21,7 +37,19 @@ export declare const getSearchFilter: ((state: LayerSelectModuleState) => string
|
|
|
21
37
|
* @returns {ActiveServiceObjectEntities} returnType: ActiveServiceObjectEntitiesobject of active services
|
|
22
38
|
*/
|
|
23
39
|
export declare const getActiveServices: (store: LayerSelectModuleState) => ActiveServiceObjectEntities;
|
|
24
|
-
export declare const getActiveServicesDictionary: (state: LayerSelectModuleState) =>
|
|
40
|
+
export declare const getActiveServicesDictionary: (state: LayerSelectModuleState) => Record<string, import("./types").ActiveServiceObject>, getActiveServiceById: (state: LayerSelectModuleState, id: string) => {
|
|
41
|
+
serviceId?: string | undefined;
|
|
42
|
+
serviceName?: string | undefined;
|
|
43
|
+
serviceUrl?: string | undefined;
|
|
44
|
+
abstract?: string | undefined;
|
|
45
|
+
enabled?: boolean | undefined;
|
|
46
|
+
filterIds?: string[] | undefined;
|
|
47
|
+
scope?: import("dist/libs/shared/src").SystemScope | undefined;
|
|
48
|
+
isLoading?: boolean | undefined;
|
|
49
|
+
keywords?: string[] | undefined;
|
|
50
|
+
groups?: string[] | undefined;
|
|
51
|
+
isInSearch?: boolean | undefined;
|
|
52
|
+
}, getAllActiveServices: (state: LayerSelectModuleState) => import("./types").ActiveServiceObject[];
|
|
25
53
|
/**
|
|
26
54
|
* Returns all ids of enabled services
|
|
27
55
|
*
|
|
@@ -29,10 +57,26 @@ export declare const getActiveServicesDictionary: (state: LayerSelectModuleState
|
|
|
29
57
|
* @param {object} store store: object - store object
|
|
30
58
|
* @returns {array} returnType: array of service ids that are enabled
|
|
31
59
|
*/
|
|
32
|
-
export declare const getEnabledServiceIds: ((state: LayerSelectModuleState) => string[]) &
|
|
33
|
-
clearCache: () => void;
|
|
34
|
-
}> & {
|
|
60
|
+
export declare const getEnabledServiceIds: ((state: LayerSelectModuleState) => string[]) & {
|
|
35
61
|
clearCache: () => void;
|
|
62
|
+
resultsCount: () => number;
|
|
63
|
+
resetResultsCount: () => void;
|
|
64
|
+
} & {
|
|
65
|
+
resultFunc: (resultFuncArgs_0: import("./types").ActiveServiceObject[]) => string[];
|
|
66
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("./types").ActiveServiceObject[]) => string[]) & {
|
|
67
|
+
clearCache: () => void;
|
|
68
|
+
resultsCount: () => number;
|
|
69
|
+
resetResultsCount: () => void;
|
|
70
|
+
};
|
|
71
|
+
lastResult: () => string[];
|
|
72
|
+
dependencies: [(state: LayerSelectModuleState) => import("./types").ActiveServiceObject[]];
|
|
73
|
+
recomputations: () => number;
|
|
74
|
+
resetRecomputations: () => void;
|
|
75
|
+
dependencyRecomputations: () => number;
|
|
76
|
+
resetDependencyRecomputations: () => void;
|
|
77
|
+
} & {
|
|
78
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
79
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
36
80
|
};
|
|
37
81
|
/**
|
|
38
82
|
* Returns ids of all keywords
|
|
@@ -42,7 +86,13 @@ export declare const getEnabledServiceIds: ((state: LayerSelectModuleState) => s
|
|
|
42
86
|
* @returns {array} returnType: array of all keyword ids
|
|
43
87
|
*/
|
|
44
88
|
export declare const getAllFilterIds: (store: LayerSelectModuleState) => string[];
|
|
45
|
-
export declare const getAllFilters: (state: LayerSelectModuleState) => Filter[], getAllFilterIdsEntity: (state: LayerSelectModuleState) =>
|
|
89
|
+
export declare const getAllFilters: (state: LayerSelectModuleState) => Filter[], getAllFilterIdsEntity: (state: LayerSelectModuleState) => string[], getFilterById: (state: LayerSelectModuleState, id: string) => {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
checked?: boolean | undefined;
|
|
93
|
+
amountVisible?: number | undefined;
|
|
94
|
+
type: import("./types").FilterType;
|
|
95
|
+
};
|
|
46
96
|
/**
|
|
47
97
|
* Returns all ids of checked keywords
|
|
48
98
|
*
|
|
@@ -50,19 +100,51 @@ export declare const getAllFilters: (state: LayerSelectModuleState) => Filter[],
|
|
|
50
100
|
* @param {object} store store: object - store object
|
|
51
101
|
* @returns {array} returnType: array of keyword ids that are checked
|
|
52
102
|
*/
|
|
53
|
-
export declare const getCheckedFilterIds: ((state: LayerSelectModuleState) => string[]) &
|
|
54
|
-
clearCache: () => void;
|
|
55
|
-
}> & {
|
|
103
|
+
export declare const getCheckedFilterIds: ((state: LayerSelectModuleState) => string[]) & {
|
|
56
104
|
clearCache: () => void;
|
|
105
|
+
resultsCount: () => number;
|
|
106
|
+
resetResultsCount: () => void;
|
|
107
|
+
} & {
|
|
108
|
+
resultFunc: (resultFuncArgs_0: Filter[]) => string[];
|
|
109
|
+
memoizedResultFunc: ((resultFuncArgs_0: Filter[]) => string[]) & {
|
|
110
|
+
clearCache: () => void;
|
|
111
|
+
resultsCount: () => number;
|
|
112
|
+
resetResultsCount: () => void;
|
|
113
|
+
};
|
|
114
|
+
lastResult: () => string[];
|
|
115
|
+
dependencies: [(state: LayerSelectModuleState) => Filter[]];
|
|
116
|
+
recomputations: () => number;
|
|
117
|
+
resetRecomputations: () => void;
|
|
118
|
+
dependencyRecomputations: () => number;
|
|
119
|
+
resetDependencyRecomputations: () => void;
|
|
120
|
+
} & {
|
|
121
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
122
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
57
123
|
};
|
|
58
124
|
export interface FiltersGrouped {
|
|
59
125
|
groups: Filter[];
|
|
60
126
|
keywords: Filter[];
|
|
61
127
|
}
|
|
62
|
-
export declare const getFilters: ((state: LayerSelectModuleState) => FiltersGrouped) &
|
|
63
|
-
clearCache: () => void;
|
|
64
|
-
}> & {
|
|
128
|
+
export declare const getFilters: ((state: LayerSelectModuleState) => FiltersGrouped) & {
|
|
65
129
|
clearCache: () => void;
|
|
130
|
+
resultsCount: () => number;
|
|
131
|
+
resetResultsCount: () => void;
|
|
132
|
+
} & {
|
|
133
|
+
resultFunc: (resultFuncArgs_0: import("./types").ActiveServiceObject[], resultFuncArgs_1: Filter[]) => FiltersGrouped;
|
|
134
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("./types").ActiveServiceObject[], resultFuncArgs_1: Filter[]) => FiltersGrouped) & {
|
|
135
|
+
clearCache: () => void;
|
|
136
|
+
resultsCount: () => number;
|
|
137
|
+
resetResultsCount: () => void;
|
|
138
|
+
};
|
|
139
|
+
lastResult: () => FiltersGrouped;
|
|
140
|
+
dependencies: [(state: LayerSelectModuleState) => import("./types").ActiveServiceObject[], (state: LayerSelectModuleState) => Filter[]];
|
|
141
|
+
recomputations: () => number;
|
|
142
|
+
resetRecomputations: () => void;
|
|
143
|
+
dependencyRecomputations: () => number;
|
|
144
|
+
resetDependencyRecomputations: () => void;
|
|
145
|
+
} & {
|
|
146
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
147
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
66
148
|
};
|
|
67
149
|
/**
|
|
68
150
|
* Returns if all keywords are checked
|
|
@@ -71,10 +153,26 @@ export declare const getFilters: ((state: LayerSelectModuleState) => FiltersGrou
|
|
|
71
153
|
* @param {object} store store: object - store object
|
|
72
154
|
* @returns {array} returnType: boolean if all keywords are checked
|
|
73
155
|
*/
|
|
74
|
-
export declare const isAllFiltersChecked: ((state: LayerSelectModuleState) => boolean) &
|
|
75
|
-
clearCache: () => void;
|
|
76
|
-
}> & {
|
|
156
|
+
export declare const isAllFiltersChecked: ((state: LayerSelectModuleState) => boolean) & {
|
|
77
157
|
clearCache: () => void;
|
|
158
|
+
resultsCount: () => number;
|
|
159
|
+
resetResultsCount: () => void;
|
|
160
|
+
} & {
|
|
161
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => boolean;
|
|
162
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => boolean) & {
|
|
163
|
+
clearCache: () => void;
|
|
164
|
+
resultsCount: () => number;
|
|
165
|
+
resetResultsCount: () => void;
|
|
166
|
+
};
|
|
167
|
+
lastResult: () => boolean;
|
|
168
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
169
|
+
recomputations: () => number;
|
|
170
|
+
resetRecomputations: () => void;
|
|
171
|
+
dependencyRecomputations: () => number;
|
|
172
|
+
resetDependencyRecomputations: () => void;
|
|
173
|
+
} & {
|
|
174
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
175
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
78
176
|
};
|
|
79
177
|
/**
|
|
80
178
|
* Returns a filtered active layer object based on the given filter settings
|
|
@@ -82,10 +180,126 @@ export declare const isAllFiltersChecked: ((state: LayerSelectModuleState) => bo
|
|
|
82
180
|
* @param {object} store store: object - object from which the service state will be extracted
|
|
83
181
|
* @returns {array} returnType: LayerWithServiceName - an array of all filtered activelayers
|
|
84
182
|
*/
|
|
85
|
-
export declare const getFilteredLayers: ((state: LayerSelectModuleState & import("@opengeoweb/store").CoreAppStore) => LayerWithServiceName[]) &
|
|
86
|
-
clearCache: () => void;
|
|
87
|
-
}> & {
|
|
183
|
+
export declare const getFilteredLayers: ((state: LayerSelectModuleState & import("@opengeoweb/store").CoreAppStore) => LayerWithServiceName[]) & {
|
|
88
184
|
clearCache: () => void;
|
|
185
|
+
resultsCount: () => number;
|
|
186
|
+
resetResultsCount: () => void;
|
|
187
|
+
} & {
|
|
188
|
+
resultFunc: (resultFuncArgs_0: string[], resultFuncArgs_1: import("dist/libs/store/src/store/map/types").Services, resultFuncArgs_2: string[], resultFuncArgs_3: boolean, resultFuncArgs_4: string) => LayerWithServiceName[];
|
|
189
|
+
memoizedResultFunc: ((resultFuncArgs_0: string[], resultFuncArgs_1: import("dist/libs/store/src/store/map/types").Services, resultFuncArgs_2: string[], resultFuncArgs_3: boolean, resultFuncArgs_4: string) => LayerWithServiceName[]) & {
|
|
190
|
+
clearCache: () => void;
|
|
191
|
+
resultsCount: () => number;
|
|
192
|
+
resetResultsCount: () => void;
|
|
193
|
+
};
|
|
194
|
+
lastResult: () => LayerWithServiceName[];
|
|
195
|
+
dependencies: [((state: LayerSelectModuleState) => string[]) & {
|
|
196
|
+
clearCache: () => void;
|
|
197
|
+
resultsCount: () => number;
|
|
198
|
+
resetResultsCount: () => void;
|
|
199
|
+
} & {
|
|
200
|
+
resultFunc: (resultFuncArgs_0: import("./types").ActiveServiceObject[]) => string[];
|
|
201
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("./types").ActiveServiceObject[]) => string[]) & {
|
|
202
|
+
clearCache: () => void;
|
|
203
|
+
resultsCount: () => number;
|
|
204
|
+
resetResultsCount: () => void;
|
|
205
|
+
};
|
|
206
|
+
lastResult: () => string[];
|
|
207
|
+
dependencies: [(state: LayerSelectModuleState) => import("./types").ActiveServiceObject[]];
|
|
208
|
+
recomputations: () => number;
|
|
209
|
+
resetRecomputations: () => void;
|
|
210
|
+
dependencyRecomputations: () => number;
|
|
211
|
+
resetDependencyRecomputations: () => void;
|
|
212
|
+
} & {
|
|
213
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
214
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
215
|
+
}, ((state: import("@opengeoweb/store").CoreAppStore) => import("dist/libs/store/src/store/map/types").Services) & {
|
|
216
|
+
clearCache: () => void;
|
|
217
|
+
resultsCount: () => number;
|
|
218
|
+
resetResultsCount: () => void;
|
|
219
|
+
} & {
|
|
220
|
+
resultFunc: (resultFuncArgs_0: import("dist/libs/store/src/store/map/types").ServiceState | undefined) => import("dist/libs/store/src/store/map/types").Services;
|
|
221
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("dist/libs/store/src/store/map/types").ServiceState | undefined) => import("dist/libs/store/src/store/map/types").Services) & {
|
|
222
|
+
clearCache: () => void;
|
|
223
|
+
resultsCount: () => number;
|
|
224
|
+
resetResultsCount: () => void;
|
|
225
|
+
};
|
|
226
|
+
lastResult: () => import("dist/libs/store/src/store/map/types").Services;
|
|
227
|
+
dependencies: [(store: import("@opengeoweb/store").CoreAppStore) => import("dist/libs/store/src/store/map/types").ServiceState | undefined];
|
|
228
|
+
recomputations: () => number;
|
|
229
|
+
resetRecomputations: () => void;
|
|
230
|
+
dependencyRecomputations: () => number;
|
|
231
|
+
resetDependencyRecomputations: () => void;
|
|
232
|
+
} & {
|
|
233
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
234
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
235
|
+
}, ((state: LayerSelectModuleState) => string[]) & {
|
|
236
|
+
clearCache: () => void;
|
|
237
|
+
resultsCount: () => number;
|
|
238
|
+
resetResultsCount: () => void;
|
|
239
|
+
} & {
|
|
240
|
+
resultFunc: (resultFuncArgs_0: Filter[]) => string[];
|
|
241
|
+
memoizedResultFunc: ((resultFuncArgs_0: Filter[]) => string[]) & {
|
|
242
|
+
clearCache: () => void;
|
|
243
|
+
resultsCount: () => number;
|
|
244
|
+
resetResultsCount: () => void;
|
|
245
|
+
};
|
|
246
|
+
lastResult: () => string[];
|
|
247
|
+
dependencies: [(state: LayerSelectModuleState) => Filter[]];
|
|
248
|
+
recomputations: () => number;
|
|
249
|
+
resetRecomputations: () => void;
|
|
250
|
+
dependencyRecomputations: () => number;
|
|
251
|
+
resetDependencyRecomputations: () => void;
|
|
252
|
+
} & {
|
|
253
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
254
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
255
|
+
}, ((state: LayerSelectModuleState) => boolean) & {
|
|
256
|
+
clearCache: () => void;
|
|
257
|
+
resultsCount: () => number;
|
|
258
|
+
resetResultsCount: () => void;
|
|
259
|
+
} & {
|
|
260
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => boolean;
|
|
261
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => boolean) & {
|
|
262
|
+
clearCache: () => void;
|
|
263
|
+
resultsCount: () => number;
|
|
264
|
+
resetResultsCount: () => void;
|
|
265
|
+
};
|
|
266
|
+
lastResult: () => boolean;
|
|
267
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
268
|
+
recomputations: () => number;
|
|
269
|
+
resetRecomputations: () => void;
|
|
270
|
+
dependencyRecomputations: () => number;
|
|
271
|
+
resetDependencyRecomputations: () => void;
|
|
272
|
+
} & {
|
|
273
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
274
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
275
|
+
}, ((state: LayerSelectModuleState) => string) & {
|
|
276
|
+
clearCache: () => void;
|
|
277
|
+
resultsCount: () => number;
|
|
278
|
+
resetResultsCount: () => void;
|
|
279
|
+
} & {
|
|
280
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => string;
|
|
281
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => string) & {
|
|
282
|
+
clearCache: () => void;
|
|
283
|
+
resultsCount: () => number;
|
|
284
|
+
resetResultsCount: () => void;
|
|
285
|
+
};
|
|
286
|
+
lastResult: () => string;
|
|
287
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
288
|
+
recomputations: () => number;
|
|
289
|
+
resetRecomputations: () => void;
|
|
290
|
+
dependencyRecomputations: () => number;
|
|
291
|
+
resetDependencyRecomputations: () => void;
|
|
292
|
+
} & {
|
|
293
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
294
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
295
|
+
}];
|
|
296
|
+
recomputations: () => number;
|
|
297
|
+
resetRecomputations: () => void;
|
|
298
|
+
dependencyRecomputations: () => number;
|
|
299
|
+
resetDependencyRecomputations: () => void;
|
|
300
|
+
} & {
|
|
301
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
302
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
89
303
|
};
|
|
90
304
|
/**
|
|
91
305
|
* Returns service popup details
|
|
@@ -116,22 +330,206 @@ export declare const getFilteredActiveServices: ((state: LayerSelectModuleState
|
|
|
116
330
|
keywords?: string[] | undefined;
|
|
117
331
|
groups?: string[] | undefined;
|
|
118
332
|
};
|
|
119
|
-
}) &
|
|
120
|
-
[k: string]: {
|
|
121
|
-
isInSearch: boolean;
|
|
122
|
-
serviceId?: string | undefined;
|
|
123
|
-
serviceName?: string | undefined;
|
|
124
|
-
serviceUrl?: string | undefined;
|
|
125
|
-
abstract?: string | undefined;
|
|
126
|
-
enabled?: boolean | undefined;
|
|
127
|
-
filterIds?: string[] | undefined;
|
|
128
|
-
scope?: import("dist/libs/shared/src").SystemScope | undefined;
|
|
129
|
-
isLoading?: boolean | undefined;
|
|
130
|
-
keywords?: string[] | undefined;
|
|
131
|
-
groups?: string[] | undefined;
|
|
132
|
-
};
|
|
133
|
-
}, {
|
|
134
|
-
clearCache: () => void;
|
|
135
|
-
}> & {
|
|
333
|
+
}) & {
|
|
136
334
|
clearCache: () => void;
|
|
335
|
+
resultsCount: () => number;
|
|
336
|
+
resetResultsCount: () => void;
|
|
337
|
+
} & {
|
|
338
|
+
resultFunc: (resultFuncArgs_0: LayerWithServiceName[], resultFuncArgs_1: ActiveServiceObjectEntities, resultFuncArgs_2: string) => {
|
|
339
|
+
[k: string]: {
|
|
340
|
+
isInSearch: boolean;
|
|
341
|
+
serviceId?: string | undefined;
|
|
342
|
+
serviceName?: string | undefined;
|
|
343
|
+
serviceUrl?: string | undefined;
|
|
344
|
+
abstract?: string | undefined;
|
|
345
|
+
enabled?: boolean | undefined;
|
|
346
|
+
filterIds?: string[] | undefined;
|
|
347
|
+
scope?: import("dist/libs/shared/src").SystemScope | undefined;
|
|
348
|
+
isLoading?: boolean | undefined;
|
|
349
|
+
keywords?: string[] | undefined;
|
|
350
|
+
groups?: string[] | undefined;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerWithServiceName[], resultFuncArgs_1: ActiveServiceObjectEntities, resultFuncArgs_2: string) => {
|
|
354
|
+
[k: string]: {
|
|
355
|
+
isInSearch: boolean;
|
|
356
|
+
serviceId?: string | undefined;
|
|
357
|
+
serviceName?: string | undefined;
|
|
358
|
+
serviceUrl?: string | undefined;
|
|
359
|
+
abstract?: string | undefined;
|
|
360
|
+
enabled?: boolean | undefined;
|
|
361
|
+
filterIds?: string[] | undefined;
|
|
362
|
+
scope?: import("dist/libs/shared/src").SystemScope | undefined;
|
|
363
|
+
isLoading?: boolean | undefined;
|
|
364
|
+
keywords?: string[] | undefined;
|
|
365
|
+
groups?: string[] | undefined;
|
|
366
|
+
};
|
|
367
|
+
}) & {
|
|
368
|
+
clearCache: () => void;
|
|
369
|
+
resultsCount: () => number;
|
|
370
|
+
resetResultsCount: () => void;
|
|
371
|
+
};
|
|
372
|
+
lastResult: () => {
|
|
373
|
+
[k: string]: {
|
|
374
|
+
isInSearch: boolean;
|
|
375
|
+
serviceId?: string | undefined;
|
|
376
|
+
serviceName?: string | undefined;
|
|
377
|
+
serviceUrl?: string | undefined;
|
|
378
|
+
abstract?: string | undefined;
|
|
379
|
+
enabled?: boolean | undefined;
|
|
380
|
+
filterIds?: string[] | undefined;
|
|
381
|
+
scope?: import("dist/libs/shared/src").SystemScope | undefined;
|
|
382
|
+
isLoading?: boolean | undefined;
|
|
383
|
+
keywords?: string[] | undefined;
|
|
384
|
+
groups?: string[] | undefined;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
dependencies: [((state: LayerSelectModuleState & import("@opengeoweb/store").CoreAppStore) => LayerWithServiceName[]) & {
|
|
388
|
+
clearCache: () => void;
|
|
389
|
+
resultsCount: () => number;
|
|
390
|
+
resetResultsCount: () => void;
|
|
391
|
+
} & {
|
|
392
|
+
resultFunc: (resultFuncArgs_0: string[], resultFuncArgs_1: import("dist/libs/store/src/store/map/types").Services, resultFuncArgs_2: string[], resultFuncArgs_3: boolean, resultFuncArgs_4: string) => LayerWithServiceName[];
|
|
393
|
+
memoizedResultFunc: ((resultFuncArgs_0: string[], resultFuncArgs_1: import("dist/libs/store/src/store/map/types").Services, resultFuncArgs_2: string[], resultFuncArgs_3: boolean, resultFuncArgs_4: string) => LayerWithServiceName[]) & {
|
|
394
|
+
clearCache: () => void;
|
|
395
|
+
resultsCount: () => number;
|
|
396
|
+
resetResultsCount: () => void;
|
|
397
|
+
};
|
|
398
|
+
lastResult: () => LayerWithServiceName[];
|
|
399
|
+
dependencies: [((state: LayerSelectModuleState) => string[]) & {
|
|
400
|
+
clearCache: () => void;
|
|
401
|
+
resultsCount: () => number;
|
|
402
|
+
resetResultsCount: () => void;
|
|
403
|
+
} & {
|
|
404
|
+
resultFunc: (resultFuncArgs_0: import("./types").ActiveServiceObject[]) => string[];
|
|
405
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("./types").ActiveServiceObject[]) => string[]) & {
|
|
406
|
+
clearCache: () => void;
|
|
407
|
+
resultsCount: () => number;
|
|
408
|
+
resetResultsCount: () => void;
|
|
409
|
+
};
|
|
410
|
+
lastResult: () => string[];
|
|
411
|
+
dependencies: [(state: LayerSelectModuleState) => import("./types").ActiveServiceObject[]];
|
|
412
|
+
recomputations: () => number;
|
|
413
|
+
resetRecomputations: () => void;
|
|
414
|
+
dependencyRecomputations: () => number;
|
|
415
|
+
resetDependencyRecomputations: () => void;
|
|
416
|
+
} & {
|
|
417
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
418
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
419
|
+
}, ((state: import("@opengeoweb/store").CoreAppStore) => import("dist/libs/store/src/store/map/types").Services) & {
|
|
420
|
+
clearCache: () => void;
|
|
421
|
+
resultsCount: () => number;
|
|
422
|
+
resetResultsCount: () => void;
|
|
423
|
+
} & {
|
|
424
|
+
resultFunc: (resultFuncArgs_0: import("dist/libs/store/src/store/map/types").ServiceState | undefined) => import("dist/libs/store/src/store/map/types").Services;
|
|
425
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("dist/libs/store/src/store/map/types").ServiceState | undefined) => import("dist/libs/store/src/store/map/types").Services) & {
|
|
426
|
+
clearCache: () => void;
|
|
427
|
+
resultsCount: () => number;
|
|
428
|
+
resetResultsCount: () => void;
|
|
429
|
+
};
|
|
430
|
+
lastResult: () => import("dist/libs/store/src/store/map/types").Services;
|
|
431
|
+
dependencies: [(store: import("@opengeoweb/store").CoreAppStore) => import("dist/libs/store/src/store/map/types").ServiceState | undefined];
|
|
432
|
+
recomputations: () => number;
|
|
433
|
+
resetRecomputations: () => void;
|
|
434
|
+
dependencyRecomputations: () => number;
|
|
435
|
+
resetDependencyRecomputations: () => void;
|
|
436
|
+
} & {
|
|
437
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
438
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
439
|
+
}, ((state: LayerSelectModuleState) => string[]) & {
|
|
440
|
+
clearCache: () => void;
|
|
441
|
+
resultsCount: () => number;
|
|
442
|
+
resetResultsCount: () => void;
|
|
443
|
+
} & {
|
|
444
|
+
resultFunc: (resultFuncArgs_0: Filter[]) => string[];
|
|
445
|
+
memoizedResultFunc: ((resultFuncArgs_0: Filter[]) => string[]) & {
|
|
446
|
+
clearCache: () => void;
|
|
447
|
+
resultsCount: () => number;
|
|
448
|
+
resetResultsCount: () => void;
|
|
449
|
+
};
|
|
450
|
+
lastResult: () => string[];
|
|
451
|
+
dependencies: [(state: LayerSelectModuleState) => Filter[]];
|
|
452
|
+
recomputations: () => number;
|
|
453
|
+
resetRecomputations: () => void;
|
|
454
|
+
dependencyRecomputations: () => number;
|
|
455
|
+
resetDependencyRecomputations: () => void;
|
|
456
|
+
} & {
|
|
457
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
458
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
459
|
+
}, ((state: LayerSelectModuleState) => boolean) & {
|
|
460
|
+
clearCache: () => void;
|
|
461
|
+
resultsCount: () => number;
|
|
462
|
+
resetResultsCount: () => void;
|
|
463
|
+
} & {
|
|
464
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => boolean;
|
|
465
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => boolean) & {
|
|
466
|
+
clearCache: () => void;
|
|
467
|
+
resultsCount: () => number;
|
|
468
|
+
resetResultsCount: () => void;
|
|
469
|
+
};
|
|
470
|
+
lastResult: () => boolean;
|
|
471
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
472
|
+
recomputations: () => number;
|
|
473
|
+
resetRecomputations: () => void;
|
|
474
|
+
dependencyRecomputations: () => number;
|
|
475
|
+
resetDependencyRecomputations: () => void;
|
|
476
|
+
} & {
|
|
477
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
478
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
479
|
+
}, ((state: LayerSelectModuleState) => string) & {
|
|
480
|
+
clearCache: () => void;
|
|
481
|
+
resultsCount: () => number;
|
|
482
|
+
resetResultsCount: () => void;
|
|
483
|
+
} & {
|
|
484
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => string;
|
|
485
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => string) & {
|
|
486
|
+
clearCache: () => void;
|
|
487
|
+
resultsCount: () => number;
|
|
488
|
+
resetResultsCount: () => void;
|
|
489
|
+
};
|
|
490
|
+
lastResult: () => string;
|
|
491
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
492
|
+
recomputations: () => number;
|
|
493
|
+
resetRecomputations: () => void;
|
|
494
|
+
dependencyRecomputations: () => number;
|
|
495
|
+
resetDependencyRecomputations: () => void;
|
|
496
|
+
} & {
|
|
497
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
498
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
499
|
+
}];
|
|
500
|
+
recomputations: () => number;
|
|
501
|
+
resetRecomputations: () => void;
|
|
502
|
+
dependencyRecomputations: () => number;
|
|
503
|
+
resetDependencyRecomputations: () => void;
|
|
504
|
+
} & {
|
|
505
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
506
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
507
|
+
}, (store: LayerSelectModuleState) => ActiveServiceObjectEntities, ((state: LayerSelectModuleState) => string) & {
|
|
508
|
+
clearCache: () => void;
|
|
509
|
+
resultsCount: () => number;
|
|
510
|
+
resetResultsCount: () => void;
|
|
511
|
+
} & {
|
|
512
|
+
resultFunc: (resultFuncArgs_0: LayerSelectStoreType) => string;
|
|
513
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerSelectStoreType) => string) & {
|
|
514
|
+
clearCache: () => void;
|
|
515
|
+
resultsCount: () => number;
|
|
516
|
+
resetResultsCount: () => void;
|
|
517
|
+
};
|
|
518
|
+
lastResult: () => string;
|
|
519
|
+
dependencies: [(store: LayerSelectModuleState) => LayerSelectStoreType];
|
|
520
|
+
recomputations: () => number;
|
|
521
|
+
resetRecomputations: () => void;
|
|
522
|
+
dependencyRecomputations: () => number;
|
|
523
|
+
resetDependencyRecomputations: () => void;
|
|
524
|
+
} & {
|
|
525
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
526
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
527
|
+
}];
|
|
528
|
+
recomputations: () => number;
|
|
529
|
+
resetRecomputations: () => void;
|
|
530
|
+
dependencyRecomputations: () => number;
|
|
531
|
+
resetDependencyRecomputations: () => void;
|
|
532
|
+
} & {
|
|
533
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
534
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
137
535
|
};
|
package/src/lib/store/store.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { WebMapStateModuleState, UIModuleState } from '@opengeoweb/store';
|
|
2
|
-
import {
|
|
2
|
+
import { Store } from '@reduxjs/toolkit';
|
|
3
3
|
import { LayerSelectModuleState } from './types';
|
|
4
4
|
export declare const layerSelectReducersMap: {
|
|
5
|
-
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").
|
|
6
|
-
services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState, import("redux").
|
|
7
|
-
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").
|
|
5
|
+
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").WebMapState>;
|
|
6
|
+
services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").ServiceState>;
|
|
7
|
+
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").LayerState>;
|
|
8
8
|
layerSelect: import("redux").Reducer<import("./types").LayerSelectStoreType>;
|
|
9
|
-
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").
|
|
10
|
-
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").
|
|
9
|
+
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").UnknownAction, import("dist/libs/store/src/store/ui/types").UIStoreType>;
|
|
10
|
+
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").UnknownAction, import("dist/libs/snackbar/src/lib/store/types").SnackbarState>;
|
|
11
11
|
};
|
|
12
|
-
export declare const layerSelectMiddlewares: (import("@reduxjs/toolkit").ListenerMiddleware<import("./types").RootState, import("
|
|
13
|
-
export declare const createMockStore: (mockState?: WebMapStateModuleState | LayerSelectModuleState | UIModuleState) =>
|
|
12
|
+
export declare const layerSelectMiddlewares: (import("@reduxjs/toolkit").ListenerMiddleware<import("./types").RootState, import("redux-thunk").ThunkDispatch<import("./types").RootState, unknown, import("redux").UnknownAction>, unknown> | import("@reduxjs/toolkit").ListenerMiddleware<import("@opengeoweb/snackbar").SnackbarModuleStore, import("redux-thunk").ThunkDispatch<import("@opengeoweb/snackbar").SnackbarModuleStore, unknown, import("redux").UnknownAction>, unknown>)[];
|
|
13
|
+
export declare const createMockStore: (mockState?: WebMapStateModuleState | LayerSelectModuleState | UIModuleState) => Store;
|
package/src/lib/store/types.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export interface Filter {
|
|
|
27
27
|
type: FilterType;
|
|
28
28
|
}
|
|
29
29
|
export type ActiveServiceObjectEntities = Record<string, ActiveServiceObject>;
|
|
30
|
-
export type Filters = EntityState<Filter>;
|
|
31
|
-
export type ActiveServiceType = EntityState<ActiveServiceObject>;
|
|
30
|
+
export type Filters = EntityState<Filter, string>;
|
|
31
|
+
export type ActiveServiceType = EntityState<ActiveServiceObject, string>;
|
|
32
32
|
export interface FiltersType {
|
|
33
33
|
searchFilter: string;
|
|
34
34
|
activeServices: ActiveServiceType;
|
package/src/lib/store/utils.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import { LayerProps } from '@opengeoweb/webmap';
|
|
|
4
4
|
import { Draft, EntityAdapter } from '@reduxjs/toolkit';
|
|
5
5
|
import { Filter, FilterType, LayerSelectStoreType } from './types';
|
|
6
6
|
export declare const getFilterId: (filterType: FilterType, filterName: string) => string;
|
|
7
|
-
export declare const produceFilters: (filterNames: string[], filterType: FilterType, draft: Draft<LayerSelectStoreType>, layerSelectFilterAdapter: EntityAdapter<Filter>) => void;
|
|
7
|
+
export declare const produceFilters: (filterNames: string[], filterType: FilterType, draft: Draft<LayerSelectStoreType>, layerSelectFilterAdapter: EntityAdapter<Filter, string>) => void;
|
|
8
8
|
export declare const filterLayersFromService: (serviceId: string, services: serviceTypes.Services, filterIds: string[], allFiltersActive: boolean, searchString: string) => LayerProps[];
|
|
9
9
|
export declare const isUserAddedService: (scope: SystemScope) => boolean;
|