@opengeoweb/layer-select 9.31.0 → 9.32.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 +1921 -1001
- package/package.json +4 -3
- package/src/lib/components/ServicePopup/ServicePopup.stories.d.ts +1 -1
- package/src/lib/components/ServicePopup/utils.d.ts +3 -2
- package/src/lib/store/reducer.d.ts +3 -3
- package/src/lib/store/types.d.ts +6 -5
- package/src/lib/utils/i18n.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/layer-select",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.32.1",
|
|
4
4
|
"description": "GeoWeb layer select library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"lodash": "^4.17.21",
|
|
24
24
|
"i18next": "^23.11.5",
|
|
25
25
|
"@mui/material": "^6.1.1",
|
|
26
|
-
"react-i18next": "^
|
|
26
|
+
"react-i18next": "^15.1.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "18",
|
|
@@ -32,5 +32,6 @@
|
|
|
32
32
|
},
|
|
33
33
|
"module": "./index.esm.js",
|
|
34
34
|
"type": "module",
|
|
35
|
-
"main": "./index.esm.js"
|
|
35
|
+
"main": "./index.esm.js",
|
|
36
|
+
"types": "./index.esm.d.ts"
|
|
36
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const _default: import("@storybook/
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("./ServicePopup").ServicePopupProps>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const ServicePopupAddLight: {
|
|
5
5
|
(): React.ReactElement;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { serviceTypes } from '@opengeoweb/store';
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
2
3
|
import { layerSelectTypes } from '../../store';
|
|
3
4
|
export type ValidationResult = string | boolean;
|
|
4
|
-
export declare const validateServiceName: (value: string, services: layerSelectTypes.ActiveServiceObjectEntities, ownServiceName?: string) => ValidationResult;
|
|
5
|
-
export declare const validateServiceUrl: (value: string, services: layerSelectTypes.ActiveServiceObjectEntities) => ValidationResult;
|
|
5
|
+
export declare const validateServiceName: (t: TFunction, value: string, services: layerSelectTypes.ActiveServiceObjectEntities, ownServiceName?: string) => ValidationResult;
|
|
6
|
+
export declare const validateServiceUrl: (t: TFunction, value: string, services: layerSelectTypes.ActiveServiceObjectEntities) => ValidationResult;
|
|
6
7
|
export declare const loadWMSService: (serviceUrl: string, forceReload?: boolean) => Promise<serviceTypes.SetLayersForServicePayload>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
2
|
import { uiTypes } from '@opengeoweb/store';
|
|
3
|
-
import {
|
|
3
|
+
import { LayerSelectRemoveServicePayload, LayerSelectStoreType, SetSearchFilterPayload, ToggleKeywordsPayload, Filter, ActiveServiceObject, ToggleServicePopupPayload, ServicePopupObject } from './types';
|
|
4
4
|
export declare const layerSelectFilterAdapter: import("@reduxjs/toolkit").EntityAdapter<Filter>;
|
|
5
5
|
export declare const layerSelectActiveServicesAdapter: import("@reduxjs/toolkit").EntityAdapter<ActiveServiceObject>;
|
|
6
6
|
export declare const initialServicePopupState: ServicePopupObject;
|
|
@@ -22,6 +22,6 @@ export declare const layerSelectActions: import("@reduxjs/toolkit").CaseReducerA
|
|
|
22
22
|
serviceId: string;
|
|
23
23
|
}>) => void;
|
|
24
24
|
toggleFilter: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<ToggleKeywordsPayload>) => void;
|
|
25
|
-
|
|
25
|
+
toggleAllFilters: (draft: Draft<LayerSelectStoreType>) => void;
|
|
26
26
|
}, uiTypes.DialogTypes.LayerSelect>;
|
|
27
|
-
export type LayerSelectActions = ReturnType<typeof layerSelectActions.setSearchFilter> | ReturnType<typeof layerSelectActions.layerSelectRemoveService> | ReturnType<typeof layerSelectActions.enableActiveService> | ReturnType<typeof layerSelectActions.disableActiveService> | ReturnType<typeof layerSelectActions.toggleFilter> | ReturnType<typeof layerSelectActions.
|
|
27
|
+
export type LayerSelectActions = ReturnType<typeof layerSelectActions.setSearchFilter> | ReturnType<typeof layerSelectActions.layerSelectRemoveService> | ReturnType<typeof layerSelectActions.enableActiveService> | ReturnType<typeof layerSelectActions.disableActiveService> | ReturnType<typeof layerSelectActions.toggleFilter> | ReturnType<typeof layerSelectActions.toggleAllFilters>;
|
package/src/lib/store/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FilterListItemFilter } from '@opengeoweb/shared';
|
|
2
1
|
import { CoreAppStore, serviceTypes } from '@opengeoweb/store';
|
|
3
2
|
import { EntityState } from '@reduxjs/toolkit';
|
|
4
3
|
export type RootState = CoreAppStore & LayerSelectModuleState;
|
|
@@ -18,7 +17,11 @@ export interface ActiveServiceObject {
|
|
|
18
17
|
groups?: string[];
|
|
19
18
|
}
|
|
20
19
|
export type FilterType = 'keywords' | 'groups';
|
|
21
|
-
export interface Filter
|
|
20
|
+
export interface Filter {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
checked?: boolean;
|
|
24
|
+
amountVisible?: number;
|
|
22
25
|
type: FilterType;
|
|
23
26
|
}
|
|
24
27
|
export type ActiveServiceObjectEntities = Record<string, ActiveServiceObject>;
|
|
@@ -61,8 +64,6 @@ export interface LayerSelectRemoveServicePayload {
|
|
|
61
64
|
serviceUrl?: string;
|
|
62
65
|
}
|
|
63
66
|
export interface ToggleKeywordsPayload {
|
|
64
|
-
filterIds: string[];
|
|
65
|
-
}
|
|
66
|
-
export interface EnableOnlyOneKeywordPayload {
|
|
67
67
|
filterId: string;
|
|
68
|
+
only?: boolean;
|
|
68
69
|
}
|
package/src/lib/utils/i18n.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare const LAYER_SELECT_NAMESPACE = "layerselect";
|
|
|
4
4
|
export declare const initLayerSelectI18n: () => typeof i18n;
|
|
5
5
|
export declare const useLayerSelectTranslation: () => UseTranslationResponse<typeof LAYER_SELECT_NAMESPACE, typeof i18n>;
|
|
6
6
|
export declare const translateKeyOutsideComponents: (key: string, params?: Record<string, string | number> | undefined) => string;
|
|
7
|
+
export { i18n };
|