@opengeoweb/layer-select 9.35.1-spike-oltanstack.0 → 9.37.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 +28 -18
- package/package.json +1 -2
- package/src/lib/components/KeywordFilterResults/KeywordFilterResults.stories.d.ts +8 -25
- package/src/lib/components/LayerSelect/LayerSelect.stories.d.ts +10 -33
- package/src/lib/components/Providers/Providers.d.ts +3 -1
- package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.stories.d.ts +8 -7
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +18 -7
- package/src/lib/components/ServicePopup/ServicePopup.stories.d.ts +6 -3
- package/src/lib/components/ServicePopup/ServicePopupConnect.stories.d.ts +4 -1
- package/src/lib/store/config.d.ts +7 -4
package/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import 'i18next';
|
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
13
|
import { FixedSizeList } from 'react-window';
|
|
14
14
|
import { getDimensionsList, LayerInfoButton } from '@opengeoweb/webmap-react';
|
|
15
|
-
import { webmapUtils, LayerType,
|
|
15
|
+
import { webmapUtils, LayerType, WMGetServiceFromStore, getCapabilities, clearImageCacheForAllMaps } from '@opengeoweb/webmap';
|
|
16
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';
|
|
@@ -1150,7 +1150,25 @@ layerSelectListener.startListening({
|
|
|
1150
1150
|
}()
|
|
1151
1151
|
});
|
|
1152
1152
|
|
|
1153
|
+
/* *
|
|
1154
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1155
|
+
* you may not use this file except in compliance with the License.
|
|
1156
|
+
* You may obtain a copy of the License at
|
|
1157
|
+
*
|
|
1158
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1159
|
+
*
|
|
1160
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1161
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1162
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1163
|
+
* See the License for the specific language governing permissions and
|
|
1164
|
+
* limitations under the License.
|
|
1165
|
+
*
|
|
1166
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1167
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1168
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1169
|
+
* */
|
|
1153
1170
|
var layerSelectConfig = {
|
|
1171
|
+
// TODO: remove id in https://gitlab.com/opengeoweb/opengeoweb/-/issues/5561
|
|
1154
1172
|
id: 'layerSelect-module',
|
|
1155
1173
|
reducersMap: {
|
|
1156
1174
|
layerSelect: reducer
|
|
@@ -2126,7 +2144,9 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
2126
2144
|
sx: styles.header,
|
|
2127
2145
|
children: t('services')
|
|
2128
2146
|
}), jsx(Backdrop, {
|
|
2129
|
-
sx: styles.loading,
|
|
2147
|
+
sx: Object.assign({}, styles.loading, {
|
|
2148
|
+
backgroundSize: 'cover'
|
|
2149
|
+
}),
|
|
2130
2150
|
open: isLoading,
|
|
2131
2151
|
children: jsx(CircularProgress, {})
|
|
2132
2152
|
}), jsx(Rows, {
|
|
@@ -2353,30 +2373,20 @@ var loadWMSService = /*#__PURE__*/function () {
|
|
|
2353
2373
|
if (forceReload === void 0) {
|
|
2354
2374
|
forceReload = false;
|
|
2355
2375
|
}
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
}
|
|
2360
|
-
_context.next = 4;
|
|
2361
|
-
return invalidateWMSGetCapabilities(serviceUrl);
|
|
2362
|
-
case 4:
|
|
2363
|
-
_context.next = 6;
|
|
2364
|
-
return queryWMSLayers(serviceUrl);
|
|
2365
|
-
case 6:
|
|
2376
|
+
_context.next = 3;
|
|
2377
|
+
return getCapabilities.getLayersFlattenedFromService(serviceUrl, forceReload);
|
|
2378
|
+
case 3:
|
|
2366
2379
|
layers = _context.sent;
|
|
2367
|
-
|
|
2368
|
-
return queryWMSServiceInfo(serviceUrl);
|
|
2369
|
-
case 9:
|
|
2370
|
-
service = _context.sent;
|
|
2380
|
+
service = WMGetServiceFromStore(serviceUrl);
|
|
2371
2381
|
return _context.abrupt("return", {
|
|
2372
|
-
id: service.id
|
|
2382
|
+
id: service.id,
|
|
2373
2383
|
name: service.title,
|
|
2374
2384
|
serviceUrl: serviceUrl,
|
|
2375
2385
|
"abstract": service["abstract"],
|
|
2376
2386
|
layers: layers,
|
|
2377
2387
|
scope: 'user'
|
|
2378
2388
|
});
|
|
2379
|
-
case
|
|
2389
|
+
case 6:
|
|
2380
2390
|
case "end":
|
|
2381
2391
|
return _context.stop();
|
|
2382
2392
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/layer-select",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.37.0",
|
|
4
4
|
"description": "GeoWeb layer select library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"@opengeoweb/form-fields": "*",
|
|
20
20
|
"react-hook-form": "^7.50.1",
|
|
21
21
|
"@reduxjs/toolkit": "^1.9.7",
|
|
22
|
-
"@redux-eggs/core": "^2.2.0",
|
|
23
22
|
"lodash": "^4.17.21",
|
|
24
23
|
"i18next": "^23.11.5",
|
|
25
24
|
"@mui/material": "^6.1.1",
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
parameters: {
|
|
10
|
-
zeplinLink: {
|
|
11
|
-
name: string;
|
|
12
|
-
link: string;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const KeywordFilterResultsDark: {
|
|
17
|
-
(): React.ReactElement;
|
|
18
|
-
tags: string[];
|
|
19
|
-
parameters: {
|
|
20
|
-
zeplinLink: {
|
|
21
|
-
name: string;
|
|
22
|
-
link: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { KeywordFilterResults } from './KeywordFilterResults';
|
|
3
|
+
declare const meta: Meta<typeof KeywordFilterResults>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof KeywordFilterResults>;
|
|
6
|
+
export declare const Component: Story;
|
|
7
|
+
export declare const KeywordFilterResultsLight: Story;
|
|
8
|
+
export declare const KeywordFilterResultsDark: Story;
|
|
@@ -1,33 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
link: string;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const LayerSelectDemoDarkTheme: {
|
|
17
|
-
(): React.ReactElement;
|
|
18
|
-
tags: string[];
|
|
19
|
-
parameters: {
|
|
20
|
-
zeplinLink: {
|
|
21
|
-
name: string;
|
|
22
|
-
link: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const LayerSelectDemoSmallLightTheme: {
|
|
27
|
-
(): React.ReactElement;
|
|
28
|
-
tags: string[];
|
|
29
|
-
};
|
|
30
|
-
export declare const LayerSelectDemoSmallDarkTheme: {
|
|
31
|
-
(): React.ReactElement;
|
|
32
|
-
tags: string[];
|
|
33
|
-
};
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LayerSelect } from './LayerSelect';
|
|
3
|
+
declare const meta: Meta<typeof LayerSelect>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof LayerSelect>;
|
|
6
|
+
export declare const Component: Story;
|
|
7
|
+
export declare const LayerSelectDemoLightTheme: Story;
|
|
8
|
+
export declare const LayerSelectDemoDarkTheme: Story;
|
|
9
|
+
export declare const LayerSelectDemoSmallLightTheme: Story;
|
|
10
|
+
export declare const LayerSelectDemoSmallDarkTheme: Story;
|
|
@@ -11,9 +11,11 @@ interface LayerSelectTranslationWrapperProps {
|
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
i18nInstance?: typeof i18n;
|
|
13
13
|
}
|
|
14
|
-
export declare const ThemeProvider: React.FC<BaseProviderProps>;
|
|
15
14
|
export declare const LayerSelecti18nProvider: React.FC<LayerSelectTranslationWrapperProps>;
|
|
16
15
|
export declare const DemoWrapper: React.FC<BaseProviderProps>;
|
|
16
|
+
export declare const LayerSelectStoreProvider: React.FC<ThemeProviderProps & {
|
|
17
|
+
store: Store;
|
|
18
|
+
}>;
|
|
17
19
|
export declare const TestThemeStoreProvider: React.FC<ThemeProviderProps & {
|
|
18
20
|
store: Store;
|
|
19
21
|
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ServiceOptionsButton } from './ServiceOptionsButton';
|
|
3
|
+
declare const meta: Meta<typeof ServiceOptionsButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ServiceOptionsButton>;
|
|
6
|
+
export declare const Component: Story;
|
|
7
|
+
export declare const ServiceOptionsButtonLight: Story;
|
|
8
|
+
export declare const ServiceOptionsButtonDark: Story;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
1
|
+
import { layerTypes } from '@opengeoweb/store';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { ServiceOptionsDialog } from './ServiceOptionsDialog';
|
|
4
|
+
import { layerSelectTypes } from '../../store';
|
|
5
|
+
declare const meta: Meta<typeof ServiceOptionsDialog>;
|
|
6
|
+
export default meta;
|
|
7
|
+
type Story = StoryObj<typeof ServiceOptionsDialog>;
|
|
8
|
+
export declare const Component: Story;
|
|
6
9
|
export declare const ServiceOptionsDialogLight: {
|
|
7
|
-
(): React.ReactElement;
|
|
8
10
|
tags: string[];
|
|
11
|
+
args: {
|
|
12
|
+
services: layerSelectTypes.ActiveServiceObjectEntities;
|
|
13
|
+
selectedLayers: layerTypes.Layer[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
};
|
|
9
16
|
parameters: {
|
|
10
17
|
zeplinLink: {
|
|
11
18
|
name: string;
|
|
@@ -14,8 +21,12 @@ export declare const ServiceOptionsDialogLight: {
|
|
|
14
21
|
};
|
|
15
22
|
};
|
|
16
23
|
export declare const ServiceOptionsDialogDark: {
|
|
17
|
-
(): React.ReactElement;
|
|
18
24
|
tags: string[];
|
|
25
|
+
args: {
|
|
26
|
+
services: layerSelectTypes.ActiveServiceObjectEntities;
|
|
27
|
+
selectedLayers: layerTypes.Layer[];
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
};
|
|
19
30
|
parameters: {
|
|
20
31
|
zeplinLink: {
|
|
21
32
|
name: string;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { ServicePopup } from './ServicePopup';
|
|
4
|
+
declare const meta: Meta<typeof ServicePopup>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof ServicePopup>;
|
|
7
|
+
export declare const Component: Story;
|
|
4
8
|
export declare const ServicePopupAddLight: {
|
|
5
9
|
(): React.ReactElement;
|
|
6
10
|
tags: string[];
|
|
@@ -41,4 +45,3 @@ export declare const ServicePopupShowDark: {
|
|
|
41
45
|
}[];
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
|
-
export declare const ServicePopupWithInvalidUrl: () => React.ReactElement;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
};
|