@opengeoweb/layer-select 12.6.0 → 12.8.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 +61 -11
- package/package.json +9 -9
- package/src/lib/components/LayerSelect/DataExplorerButtonConnect.d.ts +8 -0
- package/src/lib/components/LayerSelect/LayerSelect.d.ts +1 -0
- package/src/lib/components/LayerSelect/LayerSelect.stories.d.ts +4 -0
- package/src/lib/store/selectors.d.ts +5 -5
- /package/{index.esm.d.ts → index.d.ts} +0 -0
package/index.esm.js
CHANGED
|
@@ -2,8 +2,8 @@ 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, AlertBanner, ToggleMenu, CustomDialog } from '@opengeoweb/shared';
|
|
6
|
-
import { Filter, LayersAdd, Add, Cached, Edit, Visibility, Delete, Copy } from '@opengeoweb/theme';
|
|
5
|
+
import { CustomIconButton, FilterOption, ToolContainerDraggable, CustomAccordion, CustomToggleButton, CustomTooltip, SearchHighlight, SearchField, AlertBanner, ToggleMenu, CustomDialog, sessionStorageProvider } from '@opengeoweb/shared';
|
|
6
|
+
import { Filter, LayersAdd, Add, Cached, Edit, Visibility, Delete, MeteoGate, Copy } from '@opengeoweb/theme';
|
|
7
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';
|
|
@@ -12,8 +12,8 @@ import { Switch, Grid, List, Box, Typography, useTheme, Backdrop, CircularProgre
|
|
|
12
12
|
import 'i18next';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
import { FixedSizeList } from 'react-window';
|
|
15
|
-
import { getDimensionsList, LayerInfoButton } from '@opengeoweb/webmap-react';
|
|
16
|
-
import { LayerType, webmapUtils, getWMSServiceId, queryWMSServiceInfo, queryWMSLayers, invalidateWMSGetCapabilities
|
|
15
|
+
import { getDimensionsList, LayerInfoButton, clearImageCacheForAllMaps } from '@opengeoweb/webmap-react';
|
|
16
|
+
import { LayerType, webmapUtils, getWMSServiceId, queryWMSServiceInfo, queryWMSLayers, invalidateWMSGetCapabilities } from '@opengeoweb/webmap';
|
|
17
17
|
import { ReactHookFormProvider, defaultFormOptions, ReactHookFormTextField } from '@opengeoweb/form-fields';
|
|
18
18
|
import { useFormContext } from 'react-hook-form';
|
|
19
19
|
|
|
@@ -2600,6 +2600,37 @@ var ServiceOptionsButton = function ServiceOptionsButton(_ref) {
|
|
|
2600
2600
|
});
|
|
2601
2601
|
};
|
|
2602
2602
|
|
|
2603
|
+
var DataExplorerButtonConnect = function DataExplorerButtonConnect(_ref) {
|
|
2604
|
+
var mapId = _ref.mapId,
|
|
2605
|
+
_ref$source = _ref.source,
|
|
2606
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
2607
|
+
var dispatch = useDispatch();
|
|
2608
|
+
var dialogType = uiTypes.DialogTypes.DataExplorer;
|
|
2609
|
+
var isOpenInStore = useSelector(function (store) {
|
|
2610
|
+
return uiSelectors.getisDialogOpen(store, dialogType);
|
|
2611
|
+
});
|
|
2612
|
+
var openDataExplorerDialog = React.useCallback(function () {
|
|
2613
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
2614
|
+
type: dialogType,
|
|
2615
|
+
setOpen: !isOpenInStore,
|
|
2616
|
+
source: source,
|
|
2617
|
+
mapId: mapId
|
|
2618
|
+
}));
|
|
2619
|
+
}, [mapId, dialogType, dispatch, source, isOpenInStore]);
|
|
2620
|
+
return jsx(CustomTooltip, {
|
|
2621
|
+
title: "MeteoGate Data Explorer",
|
|
2622
|
+
children: jsx(CustomIconButton, {
|
|
2623
|
+
variant: "tool",
|
|
2624
|
+
"data-testid": "dataExplorerButton",
|
|
2625
|
+
onClick: openDataExplorerDialog,
|
|
2626
|
+
isSelected: isOpenInStore,
|
|
2627
|
+
children: jsx(MeteoGate, {
|
|
2628
|
+
sx: {}
|
|
2629
|
+
})
|
|
2630
|
+
})
|
|
2631
|
+
});
|
|
2632
|
+
};
|
|
2633
|
+
|
|
2603
2634
|
var LayerSelect = function LayerSelect(_ref) {
|
|
2604
2635
|
var mapId = _ref.mapId,
|
|
2605
2636
|
bounds = _ref.bounds,
|
|
@@ -2619,8 +2650,10 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2619
2650
|
height: 500
|
|
2620
2651
|
} : _ref$startSize,
|
|
2621
2652
|
_ref$isMultiMap = _ref.isMultiMap,
|
|
2622
|
-
isMultiMap = _ref$isMultiMap === void 0 ? false : _ref$isMultiMap
|
|
2623
|
-
|
|
2653
|
+
isMultiMap = _ref$isMultiMap === void 0 ? false : _ref$isMultiMap,
|
|
2654
|
+
_ref$hasDataExplorer = _ref.hasDataExplorer,
|
|
2655
|
+
hasDataExplorer = _ref$hasDataExplorer === void 0 ? false : _ref$hasDataExplorer;
|
|
2656
|
+
var initialServiceListHeight = hasDataExplorer ? 52 : 37;
|
|
2624
2657
|
var _React$useState = React.useState(startSize.height),
|
|
2625
2658
|
height = _React$useState[0],
|
|
2626
2659
|
setHeight = _React$useState[1];
|
|
@@ -2689,10 +2722,21 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2689
2722
|
margin: '8px 8px 0 16px',
|
|
2690
2723
|
zIndex: 2
|
|
2691
2724
|
},
|
|
2692
|
-
children:
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2725
|
+
children: jsxs(Grid, {
|
|
2726
|
+
container: true,
|
|
2727
|
+
children: [jsx(Grid, {
|
|
2728
|
+
size: 12,
|
|
2729
|
+
children: jsx(KeywordFilterButtonConnect, {
|
|
2730
|
+
mapId: mapId,
|
|
2731
|
+
isMultiMap: isMultiMap,
|
|
2732
|
+
source: source
|
|
2733
|
+
})
|
|
2734
|
+
}), hasDataExplorer && jsx(Grid, {
|
|
2735
|
+
size: 12,
|
|
2736
|
+
children: jsx(DataExplorerButtonConnect, {
|
|
2737
|
+
mapId: mapId
|
|
2738
|
+
})
|
|
2739
|
+
})]
|
|
2696
2740
|
})
|
|
2697
2741
|
}), jsx(Box, {
|
|
2698
2742
|
sx: {
|
|
@@ -2704,6 +2748,9 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2704
2748
|
mapId: mapId
|
|
2705
2749
|
})
|
|
2706
2750
|
}), jsx(Box, {
|
|
2751
|
+
sx: hasDataExplorer ? {
|
|
2752
|
+
minHeight: '52px'
|
|
2753
|
+
} : {},
|
|
2707
2754
|
children: jsx(ServiceListConnect, {
|
|
2708
2755
|
setHeight: handleHeightChange
|
|
2709
2756
|
})
|
|
@@ -3172,6 +3219,8 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
3172
3219
|
onCloseDialog = _useSetupDialog.onCloseDialog,
|
|
3173
3220
|
setDialogOrder = _useSetupDialog.setDialogOrder,
|
|
3174
3221
|
uiSource = _useSetupDialog.uiSource;
|
|
3222
|
+
var config = sessionStorageProvider.getConfig();
|
|
3223
|
+
var hasDataExplorer = !!config.GW_DATAEXPLORER_CONFIGURATION_FILENAME;
|
|
3175
3224
|
return jsxs(Fragment, {
|
|
3176
3225
|
children: [jsx(LayerSelect, {
|
|
3177
3226
|
mapId: mapId || initialMapId,
|
|
@@ -3182,7 +3231,8 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
3182
3231
|
onMouseDown: setDialogOrder,
|
|
3183
3232
|
order: dialogOrder,
|
|
3184
3233
|
source: uiSource,
|
|
3185
|
-
isMultiMap: isMultiMap
|
|
3234
|
+
isMultiMap: isMultiMap,
|
|
3235
|
+
hasDataExplorer: hasDataExplorer
|
|
3186
3236
|
}), jsx(KeywordFilterResultsConnect, {
|
|
3187
3237
|
mapId: mapId || initialMapId,
|
|
3188
3238
|
isMultiMap: isMultiMap
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/layer-select",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.8.0",
|
|
4
4
|
"description": "GeoWeb layer select library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "12.
|
|
12
|
-
"@opengeoweb/store": "12.
|
|
11
|
+
"@opengeoweb/shared": "12.8.0",
|
|
12
|
+
"@opengeoweb/store": "12.8.0",
|
|
13
13
|
"react-redux": "^9.2.0",
|
|
14
|
-
"@opengeoweb/theme": "12.
|
|
15
|
-
"@opengeoweb/webmap-react": "12.
|
|
16
|
-
"@opengeoweb/webmap": "12.
|
|
14
|
+
"@opengeoweb/theme": "12.8.0",
|
|
15
|
+
"@opengeoweb/webmap-react": "12.8.0",
|
|
16
|
+
"@opengeoweb/webmap": "12.8.0",
|
|
17
17
|
"react-window": "^1.8.10",
|
|
18
|
-
"@opengeoweb/snackbar": "12.
|
|
19
|
-
"@opengeoweb/form-fields": "12.
|
|
18
|
+
"@opengeoweb/snackbar": "12.8.0",
|
|
19
|
+
"@opengeoweb/form-fields": "12.8.0",
|
|
20
20
|
"react-hook-form": "^7.50.1",
|
|
21
21
|
"@reduxjs/toolkit": "^2.6.1",
|
|
22
22
|
"lodash": "^4.17.21",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"module": "./index.esm.js",
|
|
33
33
|
"type": "module",
|
|
34
34
|
"main": "./index.esm.js",
|
|
35
|
-
"types": "./index.
|
|
35
|
+
"types": "./index.d.ts"
|
|
36
36
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
3
|
+
interface DataExplorerButtonConnectProps {
|
|
4
|
+
mapId: string;
|
|
5
|
+
source?: uiTypes.Source;
|
|
6
|
+
}
|
|
7
|
+
export declare const DataExplorerButtonConnect: React.FC<DataExplorerButtonConnectProps>;
|
|
8
|
+
export {};
|
|
@@ -6,5 +6,9 @@ type Story = StoryObj<typeof LayerSelect>;
|
|
|
6
6
|
export declare const Component: Story;
|
|
7
7
|
export declare const LayerSelectDemoLightTheme: Story;
|
|
8
8
|
export declare const LayerSelectDemoDarkTheme: Story;
|
|
9
|
+
export declare const LayerSelectWithDataExplorerDemoLightTheme: Story;
|
|
10
|
+
export declare const LayerSelectWithDataExplorerDemoDarkTheme: Story;
|
|
9
11
|
export declare const LayerSelectDemoSmallLightTheme: Story;
|
|
10
12
|
export declare const LayerSelectDemoSmallDarkTheme: Story;
|
|
13
|
+
export declare const LayerSelectWithDataExplorerDemoSmallLightTheme: Story;
|
|
14
|
+
export declare const LayerSelectWithDataExplorerDemoSmallDarkTheme: Story;
|
|
@@ -44,7 +44,7 @@ export declare const getActiveServicesDictionary: (state: LayerSelectModuleState
|
|
|
44
44
|
abstract?: string | undefined;
|
|
45
45
|
enabled?: boolean | undefined;
|
|
46
46
|
filterIds?: string[] | undefined;
|
|
47
|
-
scope?: import("
|
|
47
|
+
scope?: import("@opengeoweb/shared").SystemScope | undefined;
|
|
48
48
|
isLoading?: boolean | undefined;
|
|
49
49
|
keywords?: string[] | undefined;
|
|
50
50
|
groups?: string[] | undefined;
|
|
@@ -325,7 +325,7 @@ export declare const getFilteredActiveServices: ((state: LayerSelectModuleState
|
|
|
325
325
|
abstract?: string | undefined;
|
|
326
326
|
enabled?: boolean | undefined;
|
|
327
327
|
filterIds?: string[] | undefined;
|
|
328
|
-
scope?: import("
|
|
328
|
+
scope?: import("@opengeoweb/shared").SystemScope | undefined;
|
|
329
329
|
isLoading?: boolean | undefined;
|
|
330
330
|
keywords?: string[] | undefined;
|
|
331
331
|
groups?: string[] | undefined;
|
|
@@ -344,7 +344,7 @@ export declare const getFilteredActiveServices: ((state: LayerSelectModuleState
|
|
|
344
344
|
abstract?: string | undefined;
|
|
345
345
|
enabled?: boolean | undefined;
|
|
346
346
|
filterIds?: string[] | undefined;
|
|
347
|
-
scope?: import("
|
|
347
|
+
scope?: import("@opengeoweb/shared").SystemScope | undefined;
|
|
348
348
|
isLoading?: boolean | undefined;
|
|
349
349
|
keywords?: string[] | undefined;
|
|
350
350
|
groups?: string[] | undefined;
|
|
@@ -359,7 +359,7 @@ export declare const getFilteredActiveServices: ((state: LayerSelectModuleState
|
|
|
359
359
|
abstract?: string | undefined;
|
|
360
360
|
enabled?: boolean | undefined;
|
|
361
361
|
filterIds?: string[] | undefined;
|
|
362
|
-
scope?: import("
|
|
362
|
+
scope?: import("@opengeoweb/shared").SystemScope | undefined;
|
|
363
363
|
isLoading?: boolean | undefined;
|
|
364
364
|
keywords?: string[] | undefined;
|
|
365
365
|
groups?: string[] | undefined;
|
|
@@ -378,7 +378,7 @@ export declare const getFilteredActiveServices: ((state: LayerSelectModuleState
|
|
|
378
378
|
abstract?: string | undefined;
|
|
379
379
|
enabled?: boolean | undefined;
|
|
380
380
|
filterIds?: string[] | undefined;
|
|
381
|
-
scope?: import("
|
|
381
|
+
scope?: import("@opengeoweb/shared").SystemScope | undefined;
|
|
382
382
|
isLoading?: boolean | undefined;
|
|
383
383
|
keywords?: string[] | undefined;
|
|
384
384
|
groups?: string[] | undefined;
|
|
File without changes
|