@opengeoweb/layer-select 9.0.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 (95) hide show
  1. package/README.md +7 -0
  2. package/index.esm.d.ts +1 -0
  3. package/index.esm.js +44775 -0
  4. package/jest.config.d.ts +0 -0
  5. package/package.json +13 -0
  6. package/src/index.d.ts +1 -0
  7. package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.d.ts +9 -0
  8. package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.spec.d.ts +1 -0
  9. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.d.ts +14 -0
  10. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.spec.d.ts +1 -0
  11. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.stories.d.ts +25 -0
  12. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +8 -0
  13. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItem.d.ts +8 -0
  14. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItem.spec.d.ts +1 -0
  15. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItemConnect.d.ts +6 -0
  16. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItemConnect.spec.d.ts +1 -0
  17. package/src/lib/components/KeywordFilterResults/KeywordFilterSelectAllSwitchConnect.d.ts +2 -0
  18. package/src/lib/components/KeywordFilterResults/KeywordFilterSelectAllSwitchConnect.spec.d.ts +1 -0
  19. package/src/lib/components/KeywordFilterResults/index.d.ts +5 -0
  20. package/src/lib/components/KeywordFilterResults/keywordFilterResultsConnect.spec.d.ts +1 -0
  21. package/src/lib/components/LayerInfo/LayerInfoButton.d.ts +8 -0
  22. package/src/lib/components/LayerInfo/LayerInfoButton.spec.d.ts +1 -0
  23. package/src/lib/components/LayerInfo/LayerInfoButtonConnect.d.ts +10 -0
  24. package/src/lib/components/LayerInfo/LayerInfoButtonConnect.spec.d.ts +1 -0
  25. package/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +13 -0
  26. package/src/lib/components/LayerInfo/LayerInfoDialog.spec.d.ts +1 -0
  27. package/src/lib/components/LayerInfo/LayerInfoDialog.stories.d.ts +25 -0
  28. package/src/lib/components/LayerInfo/LayerInfoDialogConnect.d.ts +2 -0
  29. package/src/lib/components/LayerInfo/LayerInfoLegend.d.ts +9 -0
  30. package/src/lib/components/LayerInfo/LayerInfoLegend.spec.d.ts +1 -0
  31. package/src/lib/components/LayerInfo/LayerInfoList.d.ts +11 -0
  32. package/src/lib/components/LayerInfo/LayerInfoText.d.ts +15 -0
  33. package/src/lib/components/LayerInfo/LayerInfoUtils.d.ts +10 -0
  34. package/src/lib/components/LayerInfo/LayerInfoUtils.spec.d.ts +1 -0
  35. package/src/lib/components/LayerInfo/index.d.ts +3 -0
  36. package/src/lib/components/LayerList/LayerAddRemoveButton.d.ts +20 -0
  37. package/src/lib/components/LayerList/LayerAddRemoveButton.spec.d.ts +1 -0
  38. package/src/lib/components/LayerList/LayerList.d.ts +25 -0
  39. package/src/lib/components/LayerList/LayerList.spec.d.ts +3 -0
  40. package/src/lib/components/LayerList/LayerListConnect.d.ts +9 -0
  41. package/src/lib/components/LayerList/LayerListConnect.spec.d.ts +1 -0
  42. package/src/lib/components/LayerList/LayerListDimensions.d.ts +7 -0
  43. package/src/lib/components/LayerList/LayerListRow.d.ts +23 -0
  44. package/src/lib/components/LayerSelect/LayerSelect.d.ts +20 -0
  45. package/src/lib/components/LayerSelect/LayerSelect.spec.d.ts +1 -0
  46. package/src/lib/components/LayerSelect/LayerSelect.stories.d.ts +33 -0
  47. package/src/lib/components/LayerSelect/LayerSelectButtonConnect.d.ts +11 -0
  48. package/src/lib/components/LayerSelect/LayerSelectButtonConnect.spec.d.ts +1 -0
  49. package/src/lib/components/LayerSelect/LayerSelectConnect.d.ts +16 -0
  50. package/src/lib/components/LayerSelect/LayerSelectConnect.spec.d.ts +1 -0
  51. package/src/lib/components/LayerSelect/LayerSelectUtils.d.ts +77 -0
  52. package/src/lib/components/LayerSelect/LayerSelectUtils.spec.d.ts +1 -0
  53. package/src/lib/components/LayerSelect/index.d.ts +2 -0
  54. package/src/lib/components/SearchField/SearchFieldConnect.d.ts +2 -0
  55. package/src/lib/components/SearchField/SearchFieldConnect.spec.d.ts +1 -0
  56. package/src/lib/components/ServiceList/ServiceChip.d.ts +11 -0
  57. package/src/lib/components/ServiceList/ServiceChip.spec.d.ts +1 -0
  58. package/src/lib/components/ServiceList/ServiceChipConnect.d.ts +10 -0
  59. package/src/lib/components/ServiceList/ServiceList.d.ts +8 -0
  60. package/src/lib/components/ServiceList/ServiceListConnect.d.ts +6 -0
  61. package/src/lib/components/ServiceList/ServiceListConnect.spec.d.ts +1 -0
  62. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.d.ts +6 -0
  63. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.spec.d.ts +1 -0
  64. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.stories.d.ts +7 -0
  65. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +19 -0
  66. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.spec.d.ts +1 -0
  67. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +25 -0
  68. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +8 -0
  69. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.spec.d.ts +1 -0
  70. package/src/lib/components/ServicePopup/ServicePopup.d.ts +23 -0
  71. package/src/lib/components/ServicePopup/ServicePopup.spec.d.ts +1 -0
  72. package/src/lib/components/ServicePopup/ServicePopup.stories.d.ts +43 -0
  73. package/src/lib/components/ServicePopup/ServicePopupConnect.d.ts +2 -0
  74. package/src/lib/components/ServicePopup/ServicePopupConnect.spec.d.ts +1 -0
  75. package/src/lib/components/ServicePopup/ServicePopupConnect.stories.d.ts +6 -0
  76. package/src/lib/components/ServicePopup/ServicePopupDialogConnect.d.ts +11 -0
  77. package/src/lib/components/ServicePopup/utils.d.ts +11 -0
  78. package/src/lib/components/ServicePopup/utils.spec.d.ts +1 -0
  79. package/src/lib/components/index.d.ts +2 -0
  80. package/src/lib/components/testUtils/TestThemeStoreProvider.d.ts +6 -0
  81. package/src/lib/index.d.ts +2 -0
  82. package/src/lib/store/config.d.ts +4 -0
  83. package/src/lib/store/index.d.ts +7 -0
  84. package/src/lib/store/localStorage.d.ts +3 -0
  85. package/src/lib/store/localStorage.spec.d.ts +1 -0
  86. package/src/lib/store/reducer.d.ts +28 -0
  87. package/src/lib/store/reducer.spec.d.ts +1 -0
  88. package/src/lib/store/sagas.d.ts +8 -0
  89. package/src/lib/store/sagas.spec.d.ts +1 -0
  90. package/src/lib/store/selectors.d.ts +116 -0
  91. package/src/lib/store/selectors.spec.d.ts +1 -0
  92. package/src/lib/store/types.d.ts +89 -0
  93. package/src/lib/store/utils.d.ts +7 -0
  94. package/src/lib/store/utils.spec.d.ts +1 -0
  95. package/src/lib/storyshots/Storyshots.spec.d.ts +1 -0
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { layerTypes } from '@opengeoweb/store';
3
+ import { layerSelectTypes } from '../../store';
4
+ interface ServiceOptionsDialogProps {
5
+ services: layerSelectTypes.ActiveServiceObjectEntities;
6
+ layerSelectRemoveService?: (serviceId: string, serviceUrl: string, serviceName: string) => void;
7
+ layerSelectReloadService?: (serviceUrl: string) => void;
8
+ selectedLayers: layerTypes.ReduxLayer[];
9
+ setServicePopupInfo?: (popupInfo: ServicePopupInfo) => void;
10
+ isLoading?: boolean;
11
+ }
12
+ export interface ServicePopupInfo {
13
+ isOpen: boolean;
14
+ serviceId?: string;
15
+ serviceUrl?: string;
16
+ variant?: layerSelectTypes.PopupVariant;
17
+ }
18
+ export declare const ServiceOptionsDialog: React.FC<ServiceOptionsDialogProps>;
19
+ export {};
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ServiceOptionsDialogLight: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ parameters: {
10
+ zeplinLink: {
11
+ name: string;
12
+ link: string;
13
+ }[];
14
+ };
15
+ };
16
+ export declare const ServiceOptionsDialogDark: {
17
+ (): React.ReactElement;
18
+ storyName: string;
19
+ parameters: {
20
+ zeplinLink: {
21
+ name: string;
22
+ link: string;
23
+ }[];
24
+ };
25
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface ServiceOptionsDialogConnectProps {
3
+ mapId?: string;
4
+ }
5
+ export declare const getServiceSuccesUpdateMessage: (serviceName: string) => string;
6
+ export declare const getServiceFailedUpdateMessage: (error: Error) => string;
7
+ export declare const ServiceOptionsDialogConnect: React.FC<ServiceOptionsDialogConnectProps>;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { serviceTypes } from '@opengeoweb/store';
3
+ import { layerSelectTypes } from '../../store';
4
+ export interface ServicePopupProps {
5
+ servicePopupVariant: layerSelectTypes.PopupVariant;
6
+ hideBackdrop?: boolean;
7
+ isOpen?: boolean;
8
+ closePopup?: () => void;
9
+ shouldDisableAutoFocus?: boolean;
10
+ serviceId?: string;
11
+ serviceUrl?: string;
12
+ serviceName?: string;
13
+ serviceAbstracts?: string;
14
+ services?: layerSelectTypes.ActiveServiceObjectEntities;
15
+ serviceSetLayers: (payload: serviceTypes.SetLayersForServicePayload) => void;
16
+ showSnackbar?: (message: string) => void;
17
+ }
18
+ export declare const ADD_HEADING = "Add a new service";
19
+ export declare const EDIT_HEADING = "Edit service";
20
+ export declare const SAVE_HEADING = "Save service";
21
+ export declare const COPY_URL_MESSAGE = "Service URL copied to clipboard";
22
+ export declare const getSuccesMessage: (serviceName: string) => string;
23
+ export declare const ServicePopup: React.FC<ServicePopupProps>;
@@ -0,0 +1,43 @@
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./ServicePopup").ServicePopupProps>;
2
+ export default _default;
3
+ export declare const ServicePopupAddLight: {
4
+ (): JSX.Element;
5
+ storyName: string;
6
+ parameters: {
7
+ zeplinLink: {
8
+ name: string;
9
+ link: string;
10
+ }[];
11
+ };
12
+ };
13
+ export declare const ServicePopupAddDark: {
14
+ (): JSX.Element;
15
+ storyName: string;
16
+ parameters: {
17
+ zeplinLink: {
18
+ name: string;
19
+ link: string;
20
+ }[];
21
+ };
22
+ };
23
+ export declare const ServicePopupShowLight: {
24
+ (): JSX.Element;
25
+ storyName: string;
26
+ parameters: {
27
+ zeplinLink: {
28
+ name: string;
29
+ link: string;
30
+ }[];
31
+ };
32
+ };
33
+ export declare const ServicePopupShowDark: {
34
+ (): JSX.Element;
35
+ storyName: string;
36
+ parameters: {
37
+ zeplinLink: {
38
+ name: string;
39
+ link: string;
40
+ }[];
41
+ };
42
+ };
43
+ export declare const ServicePopupWithInvalidUrl: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ServicePopupConnect: React.FC;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ServicePopupAddWithExistingServiceError: React.FC;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { layerSelectTypes } from '../../store';
3
+ interface ServicePopupDialogConnectType {
4
+ isOpen: boolean;
5
+ serviceId?: string;
6
+ variant: layerSelectTypes.PopupVariant;
7
+ url?: string;
8
+ setServicePopupClosed: () => void;
9
+ }
10
+ export declare const ServicePopupDialogConnect: React.FC<ServicePopupDialogConnectType>;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { serviceTypes } from '@opengeoweb/store';
2
+ import { layerSelectTypes } from '../../store';
3
+ export type ValidationResult = string | boolean;
4
+ export declare const VALIDATIONS_NAME_EXISTING = "This name already exists. Choose another name.";
5
+ export declare const VALIDATIONS_SERVICE_EXISTING = "URL already exists.";
6
+ export declare const VALIDATIONS_SERVICE_VALID_URL = "Not a valid URL.";
7
+ export declare const VALIDATIONS_REQUEST_FAILED = "Download failed. Check the URL.";
8
+ export declare const VALIDATIONS_FIELD_REQUIRED = "This field is required";
9
+ export declare const validateServiceName: (value: string, services: layerSelectTypes.ActiveServiceObjectEntities, ownServiceName?: string) => ValidationResult;
10
+ export declare const validateServiceUrl: (value: string, services: layerSelectTypes.ActiveServiceObjectEntities) => ValidationResult;
11
+ export declare const loadWMSService: (serviceUrl: string, forceReload?: boolean) => Promise<serviceTypes.SetLayersForServicePayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './LayerInfo';
2
+ export * from './LayerSelect';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ThemeProviderProps } from '@opengeoweb/theme';
3
+ import { Store } from '@reduxjs/toolkit';
4
+ export declare const TestThemeStoreProvider: React.FC<ThemeProviderProps & {
5
+ store: Store;
6
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './store';
@@ -0,0 +1,4 @@
1
+ import { Egg } from '@redux-eggs/core';
2
+ import { Store } from '@reduxjs/toolkit';
3
+ import { LayerSelectModuleState } from './types';
4
+ export declare const layerSelectConfig: Egg<Store<LayerSelectModuleState>>;
@@ -0,0 +1,7 @@
1
+ export { layerSelectActions, initialState as layerSelectInitialState, reducer as layerSelectReducer, } from './reducer';
2
+ export * as layerSelectSelectors from './selectors';
3
+ export { useAppSelector } from './selectors';
4
+ export * as layerSelectTypes from './types';
5
+ export * from './localStorage';
6
+ export * from './config';
7
+ export { isUserAddedService } from './utils';
@@ -0,0 +1,3 @@
1
+ import { UserAddedServices } from './types';
2
+ export declare const getUserAddedServices: () => UserAddedServices;
3
+ export declare const setUserAddedServices: (services: UserAddedServices) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,28 @@
1
+ import { PayloadAction } from '@reduxjs/toolkit';
2
+ import { uiTypes } from '@opengeoweb/store';
3
+ import { EnableOnlyOneKeywordPayload, LayerSelectRemoveServicePayload, LayerSelectStoreType, SetActiveLayerInfoPayload, 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>;
6
+ export declare const initialServicePopupState: ServicePopupObject;
7
+ export declare const initialState: LayerSelectStoreType;
8
+ export declare const reducer: import("redux").Reducer<import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, import("redux").AnyAction>;
9
+ export declare const layerSelectActions: import("@reduxjs/toolkit").CaseReducerActions<{
10
+ setSearchFilter: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<SetSearchFilterPayload>) => void;
11
+ closeServicePopupOpen: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>) => void;
12
+ toggleServicePopup: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<ToggleServicePopupPayload>) => void;
13
+ layerSelectRemoveService: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<LayerSelectRemoveServicePayload>) => void;
14
+ enableActiveService: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<{
15
+ serviceId: string;
16
+ }>) => void;
17
+ enableAllActiveServices: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>) => void;
18
+ onlyThisServiceEnabled: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<{
19
+ serviceId: string;
20
+ }>) => void;
21
+ disableActiveService: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<{
22
+ serviceId: string;
23
+ }>) => void;
24
+ toggleFilter: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<ToggleKeywordsPayload>) => void;
25
+ enableOnlyOneFilter: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<EnableOnlyOneKeywordPayload>) => void;
26
+ setActiveLayerInfo: (draft: import("immer/dist/internal").WritableDraft<LayerSelectStoreType>, action: PayloadAction<SetActiveLayerInfoPayload>) => void;
27
+ }, uiTypes.DialogTypes.LayerSelect>;
28
+ 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.enableOnlyOneFilter> | ReturnType<typeof layerSelectActions.setActiveLayerInfo>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { SagaIterator } from 'redux-saga';
2
+ import { serviceActions, uiActions } from '@opengeoweb/store';
3
+ import { layerSelectActions, LayerSelectActions } from './reducer';
4
+ export declare function layerSelectCloseInfoDialogSaga({ type, payload, }: ReturnType<typeof uiActions.setToggleOpenDialog | typeof uiActions.setActiveMapIdForDialog | typeof layerSelectActions.disableActiveService | typeof layerSelectActions.toggleFilter | typeof layerSelectActions.setSearchFilter>): SagaIterator;
5
+ export declare function layerSelectRemoveServiceSaga(capturedAction: LayerSelectActions): SagaIterator;
6
+ export declare function addServiceToLocalStorageSaga({ payload, }: ReturnType<typeof serviceActions.serviceSetLayers>): void;
7
+ export declare function removeServiceFromLocalStorageSaga({ payload, }: ReturnType<typeof serviceActions.mapStoreRemoveService>): void;
8
+ export declare function rootSaga(): SagaIterator;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,116 @@
1
+ import { TypedUseSelectorHook } from 'react-redux';
2
+ import { LayerSelectStoreType, ActiveLayerObject, ActiveServiceObjectEntities, ServicePopupObject, LayerSelectModuleState, RootState } from './types';
3
+ export declare const useAppSelector: TypedUseSelectorHook<RootState>;
4
+ /**
5
+ * Returns search filter string
6
+ *
7
+ * Example getSearchFilter(store);
8
+ * @param {object} store store: object - store object
9
+ * @returns {array} returnType: string
10
+ */
11
+ export declare const getSearchFilter: ((state: LayerSelectModuleState) => string) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => string, {
12
+ clearCache: () => void;
13
+ }> & {
14
+ clearCache: () => void;
15
+ };
16
+ /**
17
+ * Returns active services array
18
+ *
19
+ * Example getActiveServices(store);
20
+ * @param {object} store store: object - store object
21
+ * @returns {ActiveServiceObjectEntities} returnType: ActiveServiceObjectEntitiesobject of active services
22
+ */
23
+ export declare const getActiveServices: (store: LayerSelectModuleState) => ActiveServiceObjectEntities;
24
+ export declare const getActiveServicesDictionary: (state: LayerSelectModuleState) => import("@reduxjs/toolkit").Dictionary<import("./types").ActiveServiceObject>, getActiveServiceById: (state: LayerSelectModuleState, id: import("@reduxjs/toolkit").EntityId) => import("./types").ActiveServiceObject | undefined;
25
+ /**
26
+ * Returns all ids of enabled services
27
+ *
28
+ * Example getEnabledServiceIds(store);
29
+ * @param {object} store store: object - store object
30
+ * @returns {array} returnType: array of service ids that are enabled
31
+ */
32
+ export declare const getEnabledServiceIds: ((state: LayerSelectModuleState) => string[]) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => string[], {
33
+ clearCache: () => void;
34
+ }> & {
35
+ clearCache: () => void;
36
+ };
37
+ /**
38
+ * Returns all ids of checked keywords
39
+ *
40
+ * Example getCheckedKeywordIds(store);
41
+ * @param {object} store store: object - store object
42
+ * @returns {array} returnType: array of keyword ids that are checked
43
+ */
44
+ export declare const getCheckedFilterIds: ((state: LayerSelectModuleState) => string[]) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => string[], {
45
+ clearCache: () => void;
46
+ }> & {
47
+ clearCache: () => void;
48
+ };
49
+ /**
50
+ * Returns ids of all keywords
51
+ *
52
+ * Example getAllKeywordIds(store);
53
+ * @param {object} store store: object - store object
54
+ * @returns {array} returnType: array of all keyword ids
55
+ */
56
+ export declare const getAllFilterIds: (store: LayerSelectModuleState) => string[];
57
+ /**
58
+ * Returns all filters
59
+ *
60
+ * Example getAllFilters(store);
61
+ * @param {object} store store: object - store object
62
+ * @returns {array} returnType: array of all filters
63
+ */
64
+ export declare const getAllFilters: (state: LayerSelectModuleState) => import("./types").Filter[];
65
+ /**
66
+ * Returns if all keywords are checked
67
+ *
68
+ * Example isAllKeywordsChecked(store);
69
+ * @param {object} store store: object - store object
70
+ * @returns {array} returnType: boolean if all keywords are checked
71
+ */
72
+ export declare const isAllFiltersChecked: ((state: LayerSelectModuleState) => boolean) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => boolean, {
73
+ clearCache: () => void;
74
+ }> & {
75
+ clearCache: () => void;
76
+ };
77
+ /**
78
+ * Gets a KeywordObject by its id
79
+ *
80
+ * Example: keywordObject = getKeywordObjectById(store, 'keywordId')
81
+ * @param {object} store object from which the keyword state will be extracted
82
+ * @param {string} filterId Id of the keyword
83
+ * @returns {object} object containing keyword information (id, amount, amountVisible, checked)
84
+ */
85
+ export declare const getFilterById: (state: LayerSelectModuleState, id: import("@reduxjs/toolkit").EntityId) => import("./types").Filter | undefined;
86
+ /**
87
+ * Returns the active layer info
88
+ *
89
+ * Example getActiveLayerInfo(store);
90
+ * @param {object} store store: object - store object
91
+ * @returns {object} returnType: ActiveLayerObject
92
+ */
93
+ export declare const getActiveLayerInfo: ((state: LayerSelectModuleState) => ActiveLayerObject) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => ActiveLayerObject, {
94
+ clearCache: () => void;
95
+ }> & {
96
+ clearCache: () => void;
97
+ };
98
+ /**
99
+ * Returns a filtered active layer object based on the given filter settings
100
+ * Example: layerSelectSelectors.getFilteredLayers(store, filteredSettings);
101
+ * @param {object} store store: object - object from which the service state will be extracted
102
+ * @returns {array} returnType: ActiveLayerObject - an array of all filtered activelayers
103
+ */
104
+ export declare const getFilteredLayers: ((state: LayerSelectModuleState & import("@opengeoweb/store").CoreAppStore) => ActiveLayerObject[]) & import("reselect").OutputSelectorFields<(args_0: string[], args_1: import("dist/libs/store/src/store/mapStore/types").Services, args_2: string[], args_3: boolean, args_4: string) => ActiveLayerObject[], {
105
+ clearCache: () => void;
106
+ }> & {
107
+ clearCache: () => void;
108
+ };
109
+ /**
110
+ * Returns service popup details
111
+ *
112
+ * Example getActiveServices(store, 'server-id');
113
+ * @param {object} store store: object - store object
114
+ * @returns {object} returnType: object of active service
115
+ */
116
+ export declare const getServicePopupDetails: (store: LayerSelectModuleState) => ServicePopupObject;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,89 @@
1
+ import { CoreAppStore, serviceTypes } from '@opengeoweb/store';
2
+ import { EntityState } from '@reduxjs/toolkit';
3
+ export type RootState = CoreAppStore & LayerSelectModuleState;
4
+ export type NoIdService = Omit<LayerSelectService, 'id'>;
5
+ export interface UserAddedServices {
6
+ [url: string]: NoIdService;
7
+ }
8
+ export interface LayerSelectService {
9
+ name: string;
10
+ url: string;
11
+ id: string;
12
+ scope?: serviceTypes.ServiceScope;
13
+ abstract?: string;
14
+ }
15
+ export interface ActiveLayerObject extends serviceTypes.ServiceLayer {
16
+ serviceName: string;
17
+ }
18
+ export interface ActiveServiceObject {
19
+ serviceId?: string;
20
+ serviceName?: string;
21
+ serviceUrl?: string;
22
+ abstract?: string;
23
+ enabled?: boolean;
24
+ filterIds?: string[];
25
+ scope?: serviceTypes.ServiceScope;
26
+ isLoading?: boolean;
27
+ [key: string]: any;
28
+ }
29
+ export declare enum FilterType {
30
+ Keyword = "keywords",
31
+ Group = "groups"
32
+ }
33
+ export interface Filter {
34
+ id: string;
35
+ name: string;
36
+ amount?: number;
37
+ amountVisible?: number;
38
+ checked?: boolean;
39
+ type: FilterType;
40
+ }
41
+ export type ActiveServiceObjectEntities = Record<string, ActiveServiceObject>;
42
+ export type Filters = EntityState<Filter>;
43
+ export type ActiveServiceType = EntityState<ActiveServiceObject>;
44
+ export interface FiltersType {
45
+ searchFilter: string;
46
+ activeServices: ActiveServiceType;
47
+ filters: Filters;
48
+ }
49
+ export type PopupVariant = 'edit' | 'add' | 'save' | 'show';
50
+ export interface ServicePopupObject {
51
+ isOpen: boolean;
52
+ variant: PopupVariant;
53
+ url?: string;
54
+ serviceId?: string;
55
+ }
56
+ export interface LayerSelectStoreType {
57
+ filters: FiltersType;
58
+ allServicesEnabled: boolean;
59
+ activeLayerInfo: ActiveLayerObject;
60
+ servicePopup: ServicePopupObject;
61
+ }
62
+ export interface LayerSelectModuleState {
63
+ layerSelect?: LayerSelectStoreType;
64
+ }
65
+ export interface SetSearchFilterPayload {
66
+ filterText: string;
67
+ }
68
+ export interface SetAllServicesEnabledPayload {
69
+ allServicesEnabled: boolean;
70
+ }
71
+ export interface ToggleServicePopupPayload {
72
+ url?: string;
73
+ variant: PopupVariant;
74
+ serviceId?: string;
75
+ isOpen: boolean;
76
+ }
77
+ export interface LayerSelectRemoveServicePayload {
78
+ serviceId: string;
79
+ serviceUrl?: string;
80
+ }
81
+ export interface ToggleKeywordsPayload {
82
+ filterIds: string[];
83
+ }
84
+ export interface EnableOnlyOneKeywordPayload {
85
+ filterId: string;
86
+ }
87
+ export interface SetActiveLayerInfoPayload {
88
+ layer: ActiveLayerObject;
89
+ }
@@ -0,0 +1,7 @@
1
+ import { EntityAdapter, Draft } from '@reduxjs/toolkit';
2
+ import { serviceTypes } from '@opengeoweb/store';
3
+ import { Filter, FilterType, LayerSelectStoreType } from './types';
4
+ export declare const getFilterId: (filterType: FilterType, filterName: string) => string;
5
+ export declare const produceFilters: (filterNames: string[], filterType: FilterType, draft: Draft<LayerSelectStoreType>, layerSelectFilterAdapter: EntityAdapter<Filter>) => void;
6
+ export declare const filterLayersFromService: (serviceId: string, services: serviceTypes.Services, filterIds: string[], allFiltersActive: boolean, searchString: string) => serviceTypes.ServiceLayer[];
7
+ export declare const isUserAddedService: (scope: serviceTypes.ServiceScope) => boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};