@opengeoweb/layer-select 14.3.0 → 14.5.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.
Files changed (39) hide show
  1. package/index.esm.js +521 -350
  2. package/package.json +8 -8
  3. package/src/lib/components/DataExplorerButtonConnect/DataExplorerButtonConnect.d.ts +1 -1
  4. package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.d.ts +1 -1
  5. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.d.ts +3 -3
  6. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +1 -1
  7. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItemConnect.d.ts +2 -2
  8. package/src/lib/components/KeywordFilterResults/KeywordFilterSelectAllSwitchConnect.d.ts +1 -1
  9. package/src/lib/components/LayerList/LayerAddRemoveButton.d.ts +6 -2
  10. package/src/lib/components/LayerList/LayerList.d.ts +8 -4
  11. package/src/lib/components/LayerList/LayerList.spec.d.ts +1 -1
  12. package/src/lib/components/LayerList/LayerListConnect.d.ts +1 -1
  13. package/src/lib/components/LayerList/LayerListDimensions.d.ts +1 -1
  14. package/src/lib/components/LayerList/LayerListRow.d.ts +7 -3
  15. package/src/lib/components/LayerSelect/LayerSelect.d.ts +2 -2
  16. package/src/lib/components/LayerSelect/LayerSelectButtonConnect.d.ts +1 -1
  17. package/src/lib/components/LayerSelect/LayerSelectConnect.d.ts +1 -1
  18. package/src/lib/components/LayerSelect/LayerSelectUtils.d.ts +2 -2
  19. package/src/lib/components/Providers/Providers.d.ts +4 -4
  20. package/src/lib/components/SearchField/SearchFieldConnect.d.ts +1 -1
  21. package/src/lib/components/ServiceList/ServiceChip.d.ts +2 -2
  22. package/src/lib/components/ServiceList/ServiceChipConnect.d.ts +2 -2
  23. package/src/lib/components/ServiceList/ServiceList.d.ts +2 -2
  24. package/src/lib/components/ServiceList/ServiceListConnect.d.ts +1 -1
  25. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.d.ts +1 -1
  26. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +3 -3
  27. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +2 -2
  28. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +1 -1
  29. package/src/lib/components/ServicePopup/ServicePopup.d.ts +4 -4
  30. package/src/lib/components/ServicePopup/ServicePopupDialogConnect.d.ts +1 -1
  31. package/src/lib/components/ServicePopup/utils.d.ts +3 -3
  32. package/src/lib/store/index.d.ts +1 -1
  33. package/src/lib/store/listeners.d.ts +1 -1
  34. package/src/lib/store/reducer.d.ts +2 -2
  35. package/src/lib/store/selectors.d.ts +2 -2
  36. package/src/lib/store/store.d.ts +3 -3
  37. package/src/lib/store/types.d.ts +3 -3
  38. package/src/lib/store/utils.d.ts +5 -5
  39. package/src/lib/utils/i18n.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/layer-select",
3
- "version": "14.3.0",
3
+ "version": "14.5.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": "14.3.0",
12
- "@opengeoweb/store": "14.3.0",
11
+ "@opengeoweb/shared": "14.5.0",
12
+ "@opengeoweb/store": "14.5.0",
13
13
  "react-redux": "^9.2.0",
14
- "@opengeoweb/theme": "14.3.0",
15
- "@opengeoweb/webmap-react": "14.3.0",
16
- "@opengeoweb/webmap": "14.3.0",
14
+ "@opengeoweb/theme": "14.5.0",
15
+ "@opengeoweb/webmap-react": "14.5.0",
16
+ "@opengeoweb/webmap": "14.5.0",
17
17
  "react-window": "^1.8.10",
18
- "@opengeoweb/snackbar": "14.3.0",
19
- "@opengeoweb/form-fields": "14.3.0",
18
+ "@opengeoweb/snackbar": "14.5.0",
19
+ "@opengeoweb/form-fields": "14.5.0",
20
20
  "react-hook-form": "^7.50.1",
21
21
  "@reduxjs/toolkit": "^2.6.1",
22
22
  "lodash": "^4.17.21",
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { uiTypes } from '@opengeoweb/store';
3
3
  interface DataExplorerButtonConnectProps {
4
4
  mapId: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { uiTypes } from '@opengeoweb/store';
3
3
  interface KeywordFilterButtonConnectProps {
4
4
  mapId: string;
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { uiTypes } from '@opengeoweb/store';
3
- import { FiltersGrouped } from '../../store/selectors';
1
+ import React from 'react';
2
+ import type { uiTypes } from '@opengeoweb/store';
3
+ import type { FiltersGrouped } from '../../store/selectors';
4
4
  export interface KeywordFilterResultsProps {
5
5
  bounds?: string;
6
6
  onClose?: () => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface KeywordFilterResultsConnectProps {
3
3
  mapId?: string;
4
4
  bounds?: string;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { layerSelectTypes } from '../../store';
1
+ import React from 'react';
2
+ import type { layerSelectTypes } from '../../store';
3
3
  export interface KeywordFilterResultsListItemConnectProps {
4
4
  filter: layerSelectTypes.Filter;
5
5
  }
@@ -1,2 +1,2 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare const KeywordFilterSelectAllSwitchConnect: React.FC;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { layerTypes } from '@opengeoweb/store';
1
+ import React from 'react';
2
+ import type { layerTypes } from '@opengeoweb/store';
3
3
  interface AddLayerParams {
4
4
  serviceUrl: string;
5
5
  layerName: string;
@@ -11,8 +11,12 @@ export interface DeleteLayerParams {
11
11
  interface LayerAddRemoveButtonProps {
12
12
  layer: layerTypes.ReduxLayer;
13
13
  serviceUrl: string;
14
+ allLayers: layerTypes.ReduxLayer[];
15
+ allMapIds: string[];
14
16
  addLayer: ({ serviceUrl, layerName }: AddLayerParams) => void;
17
+ addLayerToAllMaps: ({ serviceUrl, layerName }: AddLayerParams) => void;
15
18
  deleteLayer: ({ layerId, layerIndex }: DeleteLayerParams) => void;
19
+ removeLayerFromAllMaps: (layerId: string) => void;
16
20
  mapLayers: layerTypes.ReduxLayer[];
17
21
  }
18
22
  export declare const LayerAddRemoveButton: React.FC<LayerAddRemoveButtonProps>;
@@ -1,7 +1,7 @@
1
- import * as React from 'react';
2
- import { layerTypes, serviceTypes } from '@opengeoweb/store';
3
- import { LayerWithServiceName } from '../../store/types';
4
- import { DeleteLayerParams } from './LayerAddRemoveButton';
1
+ import React from 'react';
2
+ import type { layerTypes, serviceTypes } from '@opengeoweb/store';
3
+ import type { DeleteLayerParams } from './LayerAddRemoveButton';
4
+ import type { LayerWithServiceName } from '../../store/types';
5
5
  interface AddLayerParams {
6
6
  serviceUrl: string;
7
7
  layerName: string;
@@ -12,8 +12,12 @@ export interface LayerListProps {
12
12
  layerSelectHeight: number;
13
13
  serviceListHeight: number;
14
14
  layerSelectWidth: number;
15
+ allLayers: layerTypes.ReduxLayer[];
16
+ allMapIds: string[];
15
17
  addLayer: ({ serviceUrl, layerName }: AddLayerParams) => void;
18
+ addLayerToAllMaps: ({ serviceUrl, layerName }: AddLayerParams) => void;
16
19
  deleteLayer: ({ layerId }: DeleteLayerParams) => void;
20
+ removeLayerFromAllMaps: (layerId: string) => void;
17
21
  mapLayers: layerTypes.ReduxLayer[];
18
22
  searchFilter: string;
19
23
  isLayerInfoVisibleInStore: boolean;
@@ -1,3 +1,3 @@
1
- import { LayerWithServiceName } from '../../store/types';
1
+ import type { LayerWithServiceName } from '../../store/types';
2
2
  export declare const defaultReduxActiveLayers: LayerWithServiceName[];
3
3
  export declare const defaultReduxActiveLayersWithoutOptionalVariables: LayerWithServiceName[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface LayerListConnectProps {
3
3
  mapId: string;
4
4
  layerSelectHeight: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ListItem } from '@opengeoweb/webmap-react';
2
+ import type { ListItem } from '@opengeoweb/webmap-react';
3
3
  interface LayerListDimensionsProps {
4
4
  dimensions: ListItem[];
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { layerTypes, serviceTypes } from '@opengeoweb/store';
3
- import { LayerProps } from '@opengeoweb/webmap';
4
- import { DeleteLayerParams } from './LayerAddRemoveButton';
2
+ import type { layerTypes, serviceTypes } from '@opengeoweb/store';
3
+ import type { LayerProps } from '@opengeoweb/webmap';
4
+ import type { DeleteLayerParams } from './LayerAddRemoveButton';
5
5
  interface AddLayerParams {
6
6
  serviceUrl: string;
7
7
  layerName: string;
@@ -9,8 +9,12 @@ interface AddLayerParams {
9
9
  interface LayerListRowProps {
10
10
  layer: LayerProps;
11
11
  service: serviceTypes.ReduxService;
12
+ allLayers: layerTypes.ReduxLayer[];
13
+ allMapIds: string[];
12
14
  addLayer: ({ serviceUrl, layerName }: AddLayerParams) => void;
15
+ addLayerToAllMaps: ({ serviceUrl, layerName }: AddLayerParams) => void;
13
16
  deleteLayer: ({ layerId, layerIndex }: DeleteLayerParams) => void;
17
+ removeLayerFromAllMaps: (layerId: string) => void;
14
18
  mapLayers: layerTypes.ReduxLayer[];
15
19
  layerSelectWidth: number;
16
20
  searchFilter: string;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { uiTypes } from '@opengeoweb/store';
1
+ import React from 'react';
2
+ import type { uiTypes } from '@opengeoweb/store';
3
3
  interface Size {
4
4
  width: number;
5
5
  height: number;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { uiTypes } from '@opengeoweb/store';
3
3
  interface LayerSelectButtonConnectProps {
4
4
  mapId: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface LayerSelectConnectProps {
3
3
  mapId?: string;
4
4
  bounds?: string;
@@ -1,5 +1,5 @@
1
- import { CSSProperties } from 'react';
2
- import { layerSelectTypes } from '../../store';
1
+ import type { CSSProperties } from 'react';
2
+ import type { layerSelectTypes } from '../../store';
3
3
  export declare const layerSelectColumnsLarge: {
4
4
  column1: {
5
5
  width: number;
@@ -1,8 +1,8 @@
1
+ import type { Theme } from '@mui/material';
2
+ import type { Store } from '@reduxjs/toolkit';
3
+ import type i18n from 'i18next';
1
4
  import React from 'react';
2
- import i18n from 'i18next';
3
- import { Theme } from '@mui/material';
4
- import { ThemeProviderProps } from '@opengeoweb/theme';
5
- import { Store } from '@reduxjs/toolkit';
5
+ import type { ThemeProviderProps } from '@opengeoweb/theme';
6
6
  interface BaseProviderProps {
7
7
  children?: React.ReactNode;
8
8
  theme?: Theme;
@@ -1,2 +1,2 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare const SearchFieldConnect: React.FC;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { layerSelectTypes } from '../../store';
1
+ import React from 'react';
2
+ import type { layerSelectTypes } from '../../store';
3
3
  interface ServiceChipProps {
4
4
  all?: boolean;
5
5
  service?: layerSelectTypes.ActiveServiceObject;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { layerSelectTypes } from '../../store';
1
+ import React from 'react';
2
+ import type { layerSelectTypes } from '../../store';
3
3
  export interface ServiceChipConnectProps {
4
4
  service: layerSelectTypes.ActiveServiceObject;
5
5
  isAllSelected: boolean;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { layerSelectTypes } from '../../store';
1
+ import React from 'react';
2
+ import type { layerSelectTypes } from '../../store';
3
3
  interface ServiceListProps {
4
4
  activeServicesById: layerSelectTypes.ActiveServiceObjectEntities;
5
5
  setHeight: (height: number) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface ServiceListConnectProps {
3
3
  setHeight: (height: number) => void;
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface ServiceOptionsButtonProps {
3
3
  mapId: string;
4
4
  }
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { layerTypes } from '@opengeoweb/store';
3
- import { layerSelectTypes } from '../../store';
1
+ import React from 'react';
2
+ import type { layerTypes } from '@opengeoweb/store';
3
+ import type { layerSelectTypes } from '../../store';
4
4
  interface ServiceOptionsDialogProps {
5
5
  services: layerSelectTypes.ActiveServiceObjectEntities;
6
6
  layerSelectRemoveService?: (serviceId: string, serviceUrl: string, serviceName: string) => void;
@@ -1,7 +1,7 @@
1
- import { layerTypes } from '@opengeoweb/store';
2
1
  import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import type { layerTypes } from '@opengeoweb/store';
3
3
  import { ServiceOptionsDialog } from './ServiceOptionsDialog';
4
- import { layerSelectTypes } from '../../store';
4
+ import type { layerSelectTypes } from '../../store';
5
5
  declare const meta: Meta<typeof ServiceOptionsDialog>;
6
6
  export default meta;
7
7
  type Story = StoryObj<typeof ServiceOptionsDialog>;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { snackbarTypes } from '@opengeoweb/snackbar';
3
3
  interface ServiceOptionsDialogConnectProps {
4
4
  mapId?: string;
@@ -1,7 +1,7 @@
1
- import * as React from 'react';
2
- import { serviceTypes } from '@opengeoweb/store';
3
- import { TFunction } from 'i18next';
4
- import { layerSelectTypes } from '../../store';
1
+ import type { TFunction } from 'i18next';
2
+ import React from 'react';
3
+ import type { serviceTypes } from '@opengeoweb/store';
4
+ import type { layerSelectTypes } from '../../store';
5
5
  export interface ServicePopupProps {
6
6
  servicePopupVariant: layerSelectTypes.PopupVariant;
7
7
  hideBackdrop?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { layerSelectTypes } from '../../store';
2
+ import type { layerSelectTypes } from '../../store';
3
3
  interface ServicePopupDialogConnectType {
4
4
  isOpen: boolean;
5
5
  serviceId?: string;
@@ -1,6 +1,6 @@
1
- import { serviceTypes } from '@opengeoweb/store';
2
- import { TFunction } from 'i18next';
3
- import { layerSelectTypes } from '../../store';
1
+ import type { TFunction } from 'i18next';
2
+ import type { serviceTypes } from '@opengeoweb/store';
3
+ import type { layerSelectTypes } from '../../store';
4
4
  export type ValidationResult = string | boolean;
5
5
  export declare const validateServiceName: (t: TFunction, value: string, services: layerSelectTypes.ActiveServiceObjectEntities, ownServiceName?: string) => ValidationResult;
6
6
  export declare const validateServiceUrl: (t: TFunction, value: string, services: layerSelectTypes.ActiveServiceObjectEntities) => ValidationResult;
@@ -1,7 +1,7 @@
1
1
  export { layerSelectActions, initialState as layerSelectInitialState, layerSelectReducer, } from './reducer';
2
2
  export * as layerSelectSelectors from './selectors';
3
3
  export { useAppSelector } from './selectors';
4
- export * as layerSelectTypes from './types';
4
+ export type * as layerSelectTypes from './types';
5
5
  export * from './store';
6
6
  export { isUserAddedService } from './utils';
7
7
  export { layerSelectListener } from './listeners';
@@ -1,2 +1,2 @@
1
- import { RootState } from './types';
1
+ import type { RootState } from './types';
2
2
  export declare const layerSelectListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<RootState, import("redux-thunk").ThunkDispatch<RootState, unknown, import("redux").UnknownAction>, unknown>;
@@ -1,6 +1,6 @@
1
- import { PayloadAction, Draft } from '@reduxjs/toolkit';
1
+ import type { PayloadAction, Draft } from '@reduxjs/toolkit';
2
2
  import { uiTypes } from '@opengeoweb/store';
3
- import { LayerSelectRemoveServicePayload, LayerSelectStoreType, SetSearchFilterPayload, ToggleKeywordsPayload, Filter, ActiveServiceObject, ToggleServicePopupPayload, ServicePopupObject } from './types';
3
+ import type { LayerSelectRemoveServicePayload, LayerSelectStoreType, SetSearchFilterPayload, ToggleKeywordsPayload, Filter, ActiveServiceObject, ToggleServicePopupPayload, ServicePopupObject } from './types';
4
4
  export declare const layerSelectFilterAdapter: import("@reduxjs/toolkit").EntityAdapter<Filter, string>;
5
5
  export declare const layerSelectActiveServicesAdapter: import("@reduxjs/toolkit").EntityAdapter<ActiveServiceObject, string>;
6
6
  export declare const initialServicePopupState: ServicePopupObject;
@@ -1,5 +1,5 @@
1
- import { TypedUseSelectorHook } from 'react-redux';
2
- import { LayerSelectStoreType, ActiveServiceObjectEntities, ServicePopupObject, LayerSelectModuleState, RootState, Filter, LayerWithServiceName } from './types';
1
+ import type { TypedUseSelectorHook } from 'react-redux';
2
+ import type { LayerSelectStoreType, ActiveServiceObjectEntities, ServicePopupObject, LayerSelectModuleState, RootState, Filter, LayerWithServiceName } from './types';
3
3
  export declare const useAppSelector: TypedUseSelectorHook<RootState>;
4
4
  /**
5
5
  * Returns search filter string
@@ -1,6 +1,6 @@
1
- import { WebMapStateModuleState, UIModuleState } from '@opengeoweb/store';
2
- import { Store } from '@reduxjs/toolkit';
3
- import { LayerSelectModuleState } from './types';
1
+ import type { Store } from '@reduxjs/toolkit';
2
+ import type { WebMapStateModuleState, UIModuleState } from '@opengeoweb/store';
3
+ import type { LayerSelectModuleState } from './types';
4
4
  export declare const layerSelectReducersMap: {
5
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
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>;
@@ -1,6 +1,6 @@
1
- import { SystemScope } from '@opengeoweb/shared';
2
- import { CoreAppStore, serviceTypes } from '@opengeoweb/store';
3
- import { EntityState } from '@reduxjs/toolkit';
1
+ import type { EntityState } from '@reduxjs/toolkit';
2
+ import type { SystemScope } from '@opengeoweb/shared';
3
+ import type { CoreAppStore, serviceTypes } from '@opengeoweb/store';
4
4
  export type RootState = CoreAppStore & LayerSelectModuleState;
5
5
  export interface LayerWithServiceName extends serviceTypes.ServiceLayer {
6
6
  serviceName: string;
@@ -1,8 +1,8 @@
1
- import { SystemScope } from '@opengeoweb/shared';
2
- import { serviceTypes } from '@opengeoweb/store';
3
- import { LayerProps } from '@opengeoweb/webmap';
4
- import { Draft, EntityAdapter } from '@reduxjs/toolkit';
5
- import { Filter, FilterType, LayerSelectStoreType } from './types';
1
+ import type { Draft, EntityAdapter } from '@reduxjs/toolkit';
2
+ import type { SystemScope } from '@opengeoweb/shared';
3
+ import type { serviceTypes } from '@opengeoweb/store';
4
+ import type { LayerProps } from '@opengeoweb/webmap';
5
+ import type { Filter, FilterType, LayerSelectStoreType } from './types';
6
6
  export declare const getFilterId: (filterType: FilterType, filterName: string) => string;
7
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[];
@@ -1,5 +1,5 @@
1
1
  import i18n from 'i18next';
2
- import { UseTranslationResponse } from 'react-i18next';
2
+ import type { UseTranslationResponse } from 'react-i18next';
3
3
  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>;