@opengeoweb/core 4.0.0 → 4.2.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 (84) hide show
  1. package/index.esm.js +2771 -2289
  2. package/index.umd.js +2799 -2293
  3. package/lib/components/LayerManager/LayerManager.d.ts +13 -0
  4. package/lib/components/LayerManager/LayerManager.stories.d.ts +12 -0
  5. package/lib/components/LayerManager/LayerManagerConnect.stories.d.ts +18 -2
  6. package/lib/components/LayerManager/LayerManagerUtils.d.ts +49 -2
  7. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.d.ts +4 -4
  8. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.stories.d.ts +18 -2
  9. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +0 -1
  10. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsListItem.d.ts +5 -5
  11. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsListItemConnect.d.ts +3 -2
  12. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoButtonConnect.d.ts +11 -0
  13. package/lib/components/LayerManager/LayerSelect/{LayerSelectUtils.spec.d.ts → LayerInfo/LayerInfoButtonConnect.spec.d.ts} +0 -0
  14. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoDialog.d.ts +14 -0
  15. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoDialog.spec.d.ts +1 -0
  16. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoDialog.stories.d.ts +25 -0
  17. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoDialogConnect.d.ts +3 -0
  18. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoList.d.ts +11 -0
  19. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoText.d.ts +7 -0
  20. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoUtils.d.ts +4 -0
  21. package/lib/components/LayerManager/LayerSelect/LayerInfo/LayerInfoUtils.spec.d.ts +1 -0
  22. package/lib/components/LayerManager/LayerSelect/LayerInfo/index.d.ts +2 -0
  23. package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.d.ts +5 -3
  24. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListConnect.d.ts +1 -0
  25. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListRow.d.ts +1 -1
  26. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListUtils.d.ts +1 -1
  27. package/lib/components/LayerManager/LayerSelect/LayerSelect.stories.d.ts +12 -0
  28. package/lib/components/LayerManager/LayerSelect/LayerSelectConnect.d.ts +0 -2
  29. package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldButtonContainer.d.ts +1 -0
  30. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +2 -1
  31. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +1 -1
  32. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceListConnect.d.ts +3 -1
  33. package/lib/components/LayerManager/LayerSelect/ServiceOptionsButton/ServiceOptionsButton.d.ts +4 -1
  34. package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +13 -3
  35. package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +18 -2
  36. package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +6 -1
  37. package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopup.d.ts +11 -5
  38. package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopup.stories.d.ts +49 -9
  39. package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopupConnect.d.ts +2 -1
  40. package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopupConnect.stories.d.ts +9 -0
  41. package/lib/components/LayerManager/LayerSelect/ServicePopup/utils.d.ts +8 -0
  42. package/lib/components/LayerManager/LayerSelect/ServicePopup/utils.spec.d.ts +1 -0
  43. package/lib/components/LayerManager/useFetchServices.d.ts +4 -0
  44. package/lib/components/LayerManager/useFetchServices.spec.d.ts +1 -0
  45. package/lib/components/MapView/useKeyboardZoomAndPan.d.ts +1 -0
  46. package/lib/components/MapView/useKeyboardZoomAndPan.spec.d.ts +1 -0
  47. package/lib/components/MapView/useTouchZoomPan.d.ts +1 -0
  48. package/lib/components/MapView/useTouchZoomPan.spec.d.ts +1 -0
  49. package/lib/components/MapWarning/MapWarningProperties.d.ts +1 -0
  50. package/lib/components/MultiMapDimensionSelect/DimensionSelectDialogConnect.d.ts +1 -1
  51. package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +0 -1
  52. package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -0
  53. package/lib/components/ReactMapView/types.d.ts +2 -1
  54. package/lib/components/Snackbar/SnackbarWrapperConnect.spec.d.ts +7 -0
  55. package/lib/components/Snackbar/index.d.ts +1 -0
  56. package/lib/components/TimeSlider/TimeSliderButtons/SpeedButton/SpeedButton.d.ts +1 -1
  57. package/lib/components/TimeSlider/TimeSliderButtons/SpeedButton/SpeedButtonConnect.d.ts +1 -5
  58. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +0 -3
  59. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderMenu/TimeSliderMenu.d.ts +18 -0
  60. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderMenu/TimeSliderMenu.spec.d.ts +1 -0
  61. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderMenu/TimeSliderMenu.stories.d.ts +28 -0
  62. package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.d.ts +3 -2
  63. package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.stories.d.ts +30 -0
  64. package/lib/components/TimeSlider/TimeSliderConnect.stories.d.ts +6 -0
  65. package/lib/components/WMSLoader/services.d.ts +1 -0
  66. package/lib/hooks/index.d.ts +1 -0
  67. package/lib/hooks/useSetupDialog/index.d.ts +1 -0
  68. package/lib/hooks/useSetupDialog/useSetupDialog.d.ts +9 -0
  69. package/lib/hooks/useSetupDialog/useSetupDialog.spec.d.ts +1 -0
  70. package/lib/index.d.ts +5 -3
  71. package/lib/store/layerSelect/reducer.d.ts +8 -5
  72. package/lib/store/layerSelect/sagas.d.ts +3 -2
  73. package/lib/store/layerSelect/selectors.d.ts +53 -6
  74. package/lib/store/layerSelect/types.d.ts +32 -13
  75. package/lib/store/mapStore/service/types.d.ts +4 -1
  76. package/lib/store/snackbar/types.d.ts +2 -4
  77. package/lib/store/ui/types.d.ts +4 -1
  78. package/lib/storybookUtils/HelperComponents.d.ts +0 -1
  79. package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +34 -7
  80. package/lib/utils/defaultTestSettings.d.ts +1 -0
  81. package/lib/utils/getCapabilities.d.ts +4 -1
  82. package/package.json +6 -7
  83. package/lib/components/LayerManager/LayerSelect/LayerSelectUtils.d.ts +0 -4
  84. package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +0 -4
@@ -20,5 +20,18 @@ interface LayerManagerProps {
20
20
  isLoading?: boolean;
21
21
  error?: string;
22
22
  }
23
+ export declare const calculateStartSize: (minSize: {
24
+ width: number;
25
+ height: number;
26
+ }, prefSize: {
27
+ width: number;
28
+ height: number;
29
+ }, startPosition: {
30
+ top: number;
31
+ left: number;
32
+ }) => {
33
+ width: number;
34
+ height: number;
35
+ };
23
36
  declare const LayerManager: React.FC<LayerManagerProps>;
24
37
  export default LayerManager;
@@ -1,10 +1,22 @@
1
1
  import * as React from 'react';
2
2
  export declare const LayerManagerLightTheme: {
3
3
  (): React.ReactElement;
4
+ parameters: {
5
+ zeplinLink: {
6
+ name: string;
7
+ link: string;
8
+ }[];
9
+ };
4
10
  storyName: string;
5
11
  };
6
12
  export declare const LayerManagerDarkTheme: {
7
13
  (): React.ReactElement;
14
+ parameters: {
15
+ zeplinLink: {
16
+ name: string;
17
+ link: string;
18
+ }[];
19
+ };
8
20
  storyName: string;
9
21
  };
10
22
  export declare const LayerManagerLoadingState: () => React.ReactElement;
@@ -1,5 +1,21 @@
1
1
  import * as React from 'react';
2
- export declare const LayerManagerConnectLightTheme: React.FC;
3
- export declare const LayerManagerConnectDarkTheme: React.FC;
2
+ export declare const LayerManagerConnectLightTheme: {
3
+ (): React.ReactElement;
4
+ parameters: {
5
+ zeplinLink: {
6
+ name: string;
7
+ link: string;
8
+ }[];
9
+ };
10
+ };
11
+ export declare const LayerManagerConnectDarkTheme: {
12
+ (): React.ReactElement;
13
+ parameters: {
14
+ zeplinLink: {
15
+ name: string;
16
+ link: string;
17
+ }[];
18
+ };
19
+ };
4
20
  export declare const LayerManagerConnectWithMultiMaps: () => React.ReactElement;
5
21
  export declare const LayerManagerConnectWithTiledMap: () => React.ReactElement;
@@ -1,5 +1,52 @@
1
- export declare const LayerManagerColumnsLarge: (props?: any) => import("@mui/styles").ClassNameMap<"column1" | "column2" | "column3" | "column4" | "column5" | "column6" | "columns35">;
2
- export declare const LayerManagerColumnsSmall: (props?: any) => import("@mui/styles").ClassNameMap<"column1" | "column2" | "column3" | "column4" | "column5" | "column6" | "columns35">;
1
+ export declare const LayerManagerColumnsLarge: {
2
+ column1: {
3
+ width: number;
4
+ display: string;
5
+ };
6
+ column2: {
7
+ width: string;
8
+ };
9
+ column3: {
10
+ width: string;
11
+ };
12
+ column4: {
13
+ width: string;
14
+ };
15
+ column5: {
16
+ width: string;
17
+ };
18
+ column6: {
19
+ width: number;
20
+ display: string;
21
+ };
22
+ columns35: {
23
+ width: string;
24
+ };
25
+ };
26
+ export declare const LayerManagerColumnsSmall: {
27
+ column1: {
28
+ width: number;
29
+ };
30
+ column2: {
31
+ width: string;
32
+ };
33
+ column3: {
34
+ display: string;
35
+ };
36
+ column4: {
37
+ display: string;
38
+ };
39
+ column5: {
40
+ display: string;
41
+ };
42
+ column6: {
43
+ width: number;
44
+ display: string;
45
+ };
46
+ columns35: {
47
+ display: string;
48
+ };
49
+ };
3
50
  export declare enum LayerManagerWidth {
4
51
  sm = 0,
5
52
  lg = 1
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { Source } from '../../../../store/ui/types';
3
- interface KeywordFilterResultsProps {
4
- allKeywordIds: string[];
5
- mapId: string;
3
+ import { Filter } from '../../../../store/layerSelect/types';
4
+ export declare const DIALOG_TITLE = "Groups & Keywords";
5
+ export interface KeywordFilterResultsProps {
6
6
  bounds?: string;
7
- showTitle?: boolean;
8
7
  onClose?: () => void;
9
8
  onMouseDown?: () => void;
10
9
  isOpen: boolean;
11
10
  order?: number;
12
11
  source?: Source;
12
+ filters: Filter[];
13
13
  }
14
14
  declare const KeywordFilterResults: React.FC<KeywordFilterResultsProps>;
15
15
  export default KeywordFilterResults;
@@ -5,9 +5,25 @@ declare const _default: {
5
5
  export default _default;
6
6
  export declare const KeywordFilterResultsLight: {
7
7
  (): React.ReactElement;
8
- storyName: string;
8
+ story: {
9
+ name: string;
10
+ parameters: {
11
+ zeplinLink: {
12
+ name: string;
13
+ link: string;
14
+ }[];
15
+ };
16
+ };
9
17
  };
10
18
  export declare const KeywordFilterResultsDark: {
11
19
  (): React.ReactElement;
12
- storyName: string;
20
+ story: {
21
+ name: string;
22
+ parameters: {
23
+ zeplinLink: {
24
+ name: string;
25
+ link: string;
26
+ }[];
27
+ };
28
+ };
13
29
  };
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface KeywordFilterResultsConnectProps {
3
3
  bounds?: string;
4
- showTitle?: boolean;
5
4
  }
6
5
  declare const KeywordFilterResultsConnect: React.FC<KeywordFilterResultsConnectProps>;
7
6
  export default KeywordFilterResultsConnect;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { KeywordObject } from '../../../../store/layerSelect/types';
3
- interface FilterListItemProps {
4
- keyword: KeywordObject;
5
- toggleKeywords: (keywords: string[]) => void;
6
- enableOnlyOneKeyword: (keyword: string) => void;
2
+ import { Filter } from '../../../../store/layerSelect/types';
3
+ export interface FilterListItemProps {
4
+ filter: Filter;
5
+ toggleFilter: (filterIds: string[]) => void;
6
+ enableOnlyOneFilter: (filterId: string) => void;
7
7
  }
8
8
  declare const FilterListItem: React.FC<FilterListItemProps>;
9
9
  export default FilterListItem;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- interface KeywordFilterResultsListItemConnectProps {
3
- keyword: string;
2
+ import { Filter } from '../../../../store/layerSelect/types';
3
+ export interface KeywordFilterResultsListItemConnectProps {
4
+ filter: Filter;
4
5
  }
5
6
  declare const KeywordFilterResultsListItemConnect: React.FC<KeywordFilterResultsListItemConnectProps>;
6
7
  export default KeywordFilterResultsListItemConnect;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { ServiceLayer } from '../../../../store/mapStore/types';
3
+ import { Source } from '../../../../store/ui/types';
4
+ interface LayerInfoButtonProps {
5
+ layer: ServiceLayer;
6
+ mapId: string;
7
+ serviceName: string;
8
+ source?: Source;
9
+ }
10
+ declare const LayerInfoButtonConnect: React.FC<LayerInfoButtonProps>;
11
+ export default LayerInfoButtonConnect;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ActiveLayerObject } from '../../../../store/layerSelect/types';
3
+ import { Source } from '../../../../store/ui/types';
4
+ export interface LayerInfoDialogProps {
5
+ layer: ActiveLayerObject;
6
+ onClose: () => void;
7
+ isOpen: boolean;
8
+ onMouseDown?: () => void;
9
+ order?: number;
10
+ source?: Source;
11
+ dialogHeight?: number;
12
+ }
13
+ declare const LayerInfoDialog: React.FC<LayerInfoDialogProps>;
14
+ export default LayerInfoDialog;
@@ -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 LayerInfoDialogLight: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ parameters: {
10
+ zeplinLink: {
11
+ name: string;
12
+ link: string;
13
+ }[];
14
+ };
15
+ };
16
+ export declare const LayerInfoDialogDark: {
17
+ (): React.ReactElement;
18
+ storyName: string;
19
+ parameters: {
20
+ zeplinLink: {
21
+ name: string;
22
+ link: string;
23
+ }[];
24
+ };
25
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const LayerInfoDialogConnect: React.FC;
3
+ export default LayerInfoDialogConnect;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface LayerInfoListProps {
3
+ label: string;
4
+ list: {
5
+ name: string;
6
+ value: string;
7
+ icon: React.ReactElement;
8
+ }[];
9
+ }
10
+ declare const LayerInfoList: React.FC<LayerInfoListProps>;
11
+ export default LayerInfoList;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface LayerInfoTextProps {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ declare const LayerInfoText: React.FC<LayerInfoTextProps>;
7
+ export default LayerInfoText;
@@ -0,0 +1,4 @@
1
+ import { ActiveLayerObject } from '../../../../store/layerSelect/types';
2
+ export declare const getLayerStyles: (layer: ActiveLayerObject) => string;
3
+ export declare const getDimensionValue: (name: string, layer: ActiveLayerObject, breakAt: string, includeUnit?: boolean) => string;
4
+ export declare const getLayerBbox: (layer: ActiveLayerObject) => string;
@@ -0,0 +1,2 @@
1
+ export { default as LayerInfoButtonConnect } from './LayerInfoButtonConnect';
2
+ export { default as LayerInfoDialog } from './LayerInfoDialog';
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { ReduxLayer } from '../../../../store/mapStore/layers/types';
3
3
  import { Services } from '../../../../store/mapStore/service/types';
4
- interface LayerListProps {
4
+ export interface LayerListProps {
5
5
  services: Services;
6
6
  serviceIds: string[];
7
7
  layerSelectHeight: number;
8
+ serviceListHeight: number;
8
9
  addLayer: ({ serviceUrl, layerName }: {
9
10
  serviceUrl: any;
10
11
  layerName: any;
@@ -15,8 +16,9 @@ interface LayerListProps {
15
16
  }) => void;
16
17
  searchString: string;
17
18
  mapLayers: ReduxLayer[];
18
- keywordIds: string[];
19
- allKeywordsActive: boolean;
19
+ filterIds: string[];
20
+ allFiltersActive: boolean;
21
+ mapId: string;
20
22
  }
21
23
  declare const LayerList: React.FC<LayerListProps>;
22
24
  export default LayerList;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  interface LayerListConnectProps {
3
3
  mapId: string;
4
4
  layerSelectHeight: number;
5
+ serviceListHeight: number;
5
6
  }
6
7
  declare const LayerListConnect: React.FC<LayerListConnectProps>;
7
8
  export default LayerListConnect;
@@ -4,7 +4,6 @@ interface LayerListRowProps {
4
4
  layer: ServiceLayer;
5
5
  layerIndex: number;
6
6
  service: ReduxService;
7
- serviceUrl: string;
8
7
  addLayer: ({ serviceUrl, layerName }: {
9
8
  serviceUrl: any;
10
9
  layerName: any;
@@ -14,6 +13,7 @@ interface LayerListRowProps {
14
13
  layerIndex: any;
15
14
  }) => void;
16
15
  mapLayers: ReduxLayer[];
16
+ mapId: string;
17
17
  }
18
18
  declare const LayerListRow: React.FC<LayerListRowProps>;
19
19
  export default LayerListRow;
@@ -1,2 +1,2 @@
1
1
  import { ServiceLayer, Services } from '../../../../store/mapStore/service/types';
2
- export declare const filterLayersFromService: (serviceId: string, services: Services, keywordIds: string[], allKeywordsActive: boolean, searchString: string) => ServiceLayer[];
2
+ export declare const filterLayersFromService: (serviceId: string, services: Services, filterIds: string[], allFiltersActive: boolean, searchString: string) => ServiceLayer[];
@@ -2,8 +2,20 @@ import * as React from 'react';
2
2
  export declare const LayerSelectDemoLightTheme: {
3
3
  (): React.ReactElement;
4
4
  storyName: string;
5
+ parameters: {
6
+ zeplinLink: {
7
+ name: string;
8
+ link: string;
9
+ }[];
10
+ };
5
11
  };
6
12
  export declare const LayerSelectDemoDarkTheme: {
7
13
  (): React.ReactElement;
8
14
  storyName: string;
15
+ parameters: {
16
+ zeplinLink: {
17
+ name: string;
18
+ link: string;
19
+ }[];
20
+ };
9
21
  };
@@ -1,9 +1,7 @@
1
1
  import * as React from 'react';
2
- import { Service } from '../../WMSLoader/services';
3
2
  interface LayerSelectConnectProps {
4
3
  bounds?: string;
5
4
  showTitle?: boolean;
6
- preloadedServices?: Service[];
7
5
  }
8
6
  /**
9
7
  * LayerSelectConnect is a component that is opened from LayerManager
@@ -3,6 +3,7 @@ export declare const isURL: (string: string) => boolean;
3
3
  interface FieldButtonProps {
4
4
  localSearchString: string;
5
5
  onClickClear: () => void;
6
+ setPopupIsOpen: (value: boolean) => void;
6
7
  }
7
8
  declare const SearchFieldButtonContainer: React.FC<FieldButtonProps>;
8
9
  export default SearchFieldButtonContainer;
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { ActiveServiceObject } from '../../../../store/layerSelect/types';
3
- interface ServiceChipConnectProps {
3
+ export interface ServiceChipConnectProps {
4
4
  all?: boolean;
5
5
  serviceId?: string;
6
6
  service?: ActiveServiceObject;
7
7
  isSelected?: boolean;
8
+ isAllSelected?: boolean;
8
9
  isDisabled?: boolean;
9
10
  }
10
11
  declare const ServiceChipConnect: React.FC<ServiceChipConnectProps>;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { ActiveServiceObject } from '../../../../store/layerSelect/types';
3
3
  interface ServiceListProps {
4
- layerSelectWidth?: number;
5
4
  activeServices: Record<string, ActiveServiceObject>;
5
+ setHeight: (height: number) => void;
6
6
  }
7
7
  declare const ServiceList: React.FC<ServiceListProps>;
8
8
  export default ServiceList;
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
+ import { ActiveServices } from '../../../../store/layerSelect/types';
2
3
  interface ServiceListConnectProps {
3
- layerSelectWidth?: number;
4
+ setHeight: (height: number) => void;
4
5
  }
6
+ export declare const sortByService: (serviceObj: ActiveServices) => ActiveServices;
5
7
  declare const ServiceListConnect: React.FC<ServiceListConnectProps>;
6
8
  export default ServiceListConnect;
@@ -1,3 +1,6 @@
1
1
  import * as React from 'react';
2
- declare const ServiceOptionsButton: React.FC;
2
+ interface ServiceOptionsButtonProps {
3
+ mapId: string;
4
+ }
5
+ declare const ServiceOptionsButton: React.FC<ServiceOptionsButtonProps>;
3
6
  export default ServiceOptionsButton;
@@ -1,8 +1,18 @@
1
1
  import * as React from 'react';
2
- import { ActiveServiceObject } from '../../../../store/layerSelect/types';
2
+ import { ActiveServices } from '../../../../store/layerSelect/types';
3
+ import { PopupVariant } from '../ServicePopup/ServicePopup';
4
+ import { ReduxLayer } from '../../../../store/mapStore/types';
3
5
  interface ServiceOptionsDialogProps {
4
- services: Record<string, ActiveServiceObject>;
5
- mapStoreRemoveService?: (serviceId: string, serviceUrl: string) => void;
6
+ services: ActiveServices;
7
+ layerSelectRemoveService?: (serviceId: string, serviceUrl: string) => void;
8
+ selectedLayers: ReduxLayer[];
9
+ setServicePopupInfo?: (popupInfo: ServicePopupInfo) => void;
10
+ }
11
+ export interface ServicePopupInfo {
12
+ isOpen: boolean;
13
+ serviceId?: string;
14
+ serviceUrl?: string;
15
+ popupVariant?: PopupVariant;
6
16
  }
7
17
  declare const ServiceOptionsDialog: React.FC<ServiceOptionsDialogProps>;
8
18
  export default ServiceOptionsDialog;
@@ -5,9 +5,25 @@ declare const _default: {
5
5
  export default _default;
6
6
  export declare const ServiceOptionsDialogLight: {
7
7
  (): React.ReactElement;
8
- storyName: string;
8
+ story: {
9
+ name: string;
10
+ parameters: {
11
+ zeplinLink: {
12
+ name: string;
13
+ link: string;
14
+ }[];
15
+ };
16
+ };
9
17
  };
10
18
  export declare const ServiceOptionsDialogDark: {
11
19
  (): React.ReactElement;
12
- storyName: string;
20
+ story: {
21
+ name: string;
22
+ parameters: {
23
+ zeplinLink: {
24
+ name: string;
25
+ link: string;
26
+ }[];
27
+ };
28
+ };
13
29
  };
@@ -1,3 +1,8 @@
1
1
  import * as React from 'react';
2
- declare const ServiceOptionsDialogConnect: React.FC;
2
+ import { ServicePopupInfo } from './ServiceOptionsDialog';
3
+ interface ServiceOptionsDialogConnectProps {
4
+ mapId?: string;
5
+ setServicePopupInfo?: (popupInfo: ServicePopupInfo) => void;
6
+ }
7
+ declare const ServiceOptionsDialogConnect: React.FC<ServiceOptionsDialogConnectProps>;
3
8
  export default ServiceOptionsDialogConnect;
@@ -1,18 +1,24 @@
1
1
  import * as React from 'react';
2
2
  import { SetLayersForServicePayload } from '../../../../store/mapStore/types';
3
3
  import { ActiveServices } from '../../../../store/layerSelect/types';
4
- interface ServicePopupProps {
5
- servicePopupVariant: 'edit' | 'add' | 'save';
4
+ export declare type PopupVariant = 'edit' | 'add' | 'save' | 'show';
5
+ export interface ServicePopupProps {
6
+ servicePopupVariant: PopupVariant;
6
7
  hideBackdrop?: boolean;
7
8
  isOpen?: boolean;
8
9
  closePopup?: () => void;
9
10
  serviceId?: string;
10
- url?: string;
11
+ serviceUrl?: string;
12
+ serviceName?: string;
13
+ serviceAbstracts?: string;
11
14
  services?: ActiveServices;
12
15
  serviceSetLayers: (payload: SetLayersForServicePayload) => void;
16
+ showSnackbar?: (message: string) => void;
13
17
  }
14
18
  export declare const ADD_HEADING = "Add a new service";
15
19
  export declare const EDIT_HEADING = "Edit service";
16
20
  export declare const SAVE_HEADING = "Save service";
17
- declare const ServicePopup: React.FC<ServicePopupProps>;
18
- export default ServicePopup;
21
+ export declare const COPY_URL_MESSAGE = "Service URL copied to clipboard";
22
+ export declare const getSuccesMessage: (serviceName: string) => string;
23
+ declare const ServicePopupWrapper: React.FC<ServicePopupProps>;
24
+ export default ServicePopupWrapper;
@@ -1,13 +1,53 @@
1
1
  import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FC<import("./ServicePopup").ServicePopupProps>>;
5
4
  export default _default;
6
- export declare const ServicePopupLight: {
7
- (): React.ReactElement;
8
- storyName: string;
5
+ export declare const ServicePopupAddLight: {
6
+ (): JSX.Element;
7
+ story: {
8
+ name: string;
9
+ parameters: {
10
+ zeplinLink: {
11
+ name: string;
12
+ link: string;
13
+ }[];
14
+ };
15
+ };
16
+ };
17
+ export declare const ServicePopupAddDark: {
18
+ (): JSX.Element;
19
+ story: {
20
+ name: string;
21
+ parameters: {
22
+ zeplinLink: {
23
+ name: string;
24
+ link: string;
25
+ }[];
26
+ };
27
+ };
28
+ };
29
+ export declare const ServicePopupShowLight: {
30
+ (): JSX.Element;
31
+ story: {
32
+ name: string;
33
+ parameters: {
34
+ zeplinLink: {
35
+ name: string;
36
+ link: string;
37
+ }[];
38
+ };
39
+ };
9
40
  };
10
- export declare const ServicePopupDark: {
11
- (): React.ReactElement;
12
- storyName: string;
41
+ export declare const ServicePopupShowDark: {
42
+ (): JSX.Element;
43
+ story: {
44
+ name: string;
45
+ parameters: {
46
+ zeplinLink: {
47
+ name: string;
48
+ link: string;
49
+ }[];
50
+ };
51
+ };
13
52
  };
53
+ export declare const ServicePopupWithInvalidUrl: () => JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
+ import { PopupVariant } from './ServicePopup';
2
3
  interface ServicePopupConnectProps {
3
- servicePopupVariant: 'edit' | 'add' | 'save';
4
+ servicePopupVariant: PopupVariant;
4
5
  hideBackdrop?: boolean;
5
6
  isOpen?: boolean;
6
7
  closePopup?: () => void;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ServicePopupConnectAdd: React.FC;
7
+ export declare const ServicePopupConnectShow: React.FC;
8
+ export declare const ServicePopupAddWithExistingServiceError: React.FC;
9
+ export declare const ServicePopupEdit: React.FC;
@@ -0,0 +1,8 @@
1
+ import { ActiveServices } from '../../../../store/layerSelect/types';
2
+ export declare type ValidationResult = string | boolean;
3
+ export declare const VALIDATIONS_NAME_EXISTING = "This name already exists. Choose another name.";
4
+ export declare const VALIDATIONS_SERVICE_EXISTING = "URL already exists.";
5
+ export declare const VALIDATIONS_SERVICE_VALID_URL = "Not a valid URL.";
6
+ export declare const VALIDATIONS_REQUEST_FAILED = "Download failed. Check the URL.";
7
+ export declare const validateServiceName: (value: string, services: ActiveServices, ownServiceName?: string) => ValidationResult;
8
+ export declare const validateServiceUrl: (value: string, services: ActiveServices) => ValidationResult;
@@ -0,0 +1,4 @@
1
+ import { NoIdService, UserAddedServices } from '../../utils/types';
2
+ import { Service } from '../WMSLoader/services';
3
+ export declare const useFetchServices: (dialogType: string, preloadedServices?: Service[]) => void;
4
+ export declare const mergePresetsAndUserAddedServices: (presets: Service[], userAddedServices: UserAddedServices) => NoIdService[];