@opengeoweb/core 4.0.0 → 4.1.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 (24) hide show
  1. package/index.esm.js +930 -990
  2. package/index.umd.js +953 -994
  3. package/lib/components/LayerManager/LayerManager.stories.d.ts +12 -0
  4. package/lib/components/LayerManager/LayerManagerConnect.stories.d.ts +18 -2
  5. package/lib/components/LayerManager/LayerManagerUtils.d.ts +49 -2
  6. package/lib/components/LayerManager/LayerSelect/LayerSelect.stories.d.ts +12 -0
  7. package/lib/components/MapView/useKeyboardZoomAndPan.d.ts +1 -0
  8. package/lib/components/MapView/useKeyboardZoomAndPan.spec.d.ts +1 -0
  9. package/lib/components/MapView/useTouchZoomPan.d.ts +1 -0
  10. package/lib/components/MapView/useTouchZoomPan.spec.d.ts +1 -0
  11. package/lib/components/MapWarning/MapWarningProperties.d.ts +1 -0
  12. package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +0 -1
  13. package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -0
  14. package/lib/components/Snackbar/index.d.ts +1 -0
  15. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +0 -3
  16. package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.d.ts +4 -3
  17. package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.stories.d.ts +9 -0
  18. package/lib/components/TimeSlider/TimeSliderConnect.stories.d.ts +6 -0
  19. package/lib/index.d.ts +4 -3
  20. package/lib/store/snackbar/types.d.ts +2 -4
  21. package/lib/storybookUtils/HelperComponents.d.ts +0 -1
  22. package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +34 -7
  23. package/package.json +5 -6
  24. package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +0 -4
@@ -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
@@ -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
  };
@@ -0,0 +1 @@
1
+ export declare const useKeyboardZoomAndPan: (mapIsActive: boolean, mapId: string) => void;
@@ -0,0 +1 @@
1
+ export declare const useTouchZoomPan: (mapIsActive: boolean, mapId: string) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -9,6 +9,7 @@ interface WarningListProps {
9
9
  expires?: string;
10
10
  languages?: Language[];
11
11
  };
12
+ languageIndex?: number;
12
13
  }
13
14
  interface Language {
14
15
  language: string;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { Bbox, Layer } from '../../store/mapStore/types';
3
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"box">;
4
3
  export interface MultiMapPreset {
5
4
  id: string;
6
5
  title?: string;
@@ -40,6 +40,17 @@ export interface FeatureEvent {
40
40
  isInEditMode: boolean;
41
41
  feature: GeoJsonFeature;
42
42
  }
43
+ export interface AdagucMapDrawDrawFunctionArgs {
44
+ context: CanvasRenderingContext2D;
45
+ featureIndex: number;
46
+ coord: Coordinate;
47
+ selected: boolean;
48
+ isInEditMode: boolean;
49
+ feature: GeoJsonFeature;
50
+ mouseX: number;
51
+ mouseY: number;
52
+ isHovered: boolean;
53
+ }
43
54
  export interface AdagucMapDrawProps {
44
55
  webmapjs: WMJSMap;
45
56
  geojson: GeoJSON.FeatureCollection;
@@ -117,6 +128,7 @@ export default class AdagucMapDraw extends React.PureComponent<AdagucMapDrawProp
117
128
  webmapjs: any;
118
129
  featureNrToEdit: number;
119
130
  };
131
+ featureEvent: FeatureEvent;
120
132
  constructor(props: AdagucMapDrawProps);
121
133
  componentDidMount(): void;
122
134
  componentDidUpdate(prevProps: AdagucMapDrawProps): void;
@@ -0,0 +1 @@
1
+ export { SnackbarWrapperConnect } from './SnackbarWrapperConnect';
@@ -1,10 +1,7 @@
1
1
  import * as React from 'react';
2
2
  interface TimeSliderButtonsProps {
3
- autoUpdateBtn?: React.ReactChild;
4
3
  optionsMenuBtn?: React.ReactChild;
5
4
  playBtn?: React.ReactChild;
6
- speedBtn?: React.ReactChild;
7
- timeStepBtn?: React.ReactChild;
8
5
  }
9
6
  declare const TimeSliderButtons: React.FC<TimeSliderButtonsProps>;
10
7
  export default TimeSliderButtons;
@@ -1,13 +1,14 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { Dimension, MapActionOrigin } from '../../../../store/mapStore/types';
3
3
  export declare const timeStepTitle = "Time step";
4
- interface TimeStepProps {
4
+ export interface TimeStepButtonProps {
5
5
  timeStep: number;
6
6
  disabled?: boolean;
7
7
  isTimestepAuto?: boolean;
8
8
  timeDimension?: Dimension;
9
9
  onChangeTimeStep: (scale: number, origin?: MapActionOrigin) => void;
10
10
  onToggleTimestepAuto?: () => void;
11
+ isOpenByDefault?: boolean;
11
12
  }
12
- declare const TimeStepButton: React.FC<TimeStepProps>;
13
+ declare const TimeStepButton: React.FC<TimeStepButtonProps>;
13
14
  export default TimeStepButton;
@@ -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 TimeStepButtonDemo: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ };
@@ -6,4 +6,10 @@ export default _default;
6
6
  export declare const DemoTimeSliderConnect: {
7
7
  (): React.ReactElement;
8
8
  storyName: string;
9
+ parameters: {
10
+ zeplinLink: {
11
+ name: string;
12
+ link: string;
13
+ }[];
14
+ };
9
15
  };
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { mapSelectors, uiActions, uiSelectors, layerActions, genericActions } from './store';
1
+ import { mapSelectors, uiActions, uiSelectors, layerActions, genericActions, snackbarActions } from './store';
2
2
  import * as mapTypes from './store/mapStore/types';
3
3
  import * as mapUtils from './store/mapStore/map/utils';
4
4
  import * as uiTypes from './store/ui/types';
@@ -74,7 +74,7 @@ export declare const mapActions: {
74
74
  setAvailableBaseLayers: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<mapTypes.AddAvailableBaseLayersPayload, string>;
75
75
  onUpdateLayerInformation: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<mapTypes.UpdateLayerInfoPayload, string>;
76
76
  };
77
- export { mapSelectors, mapTypes, mapUtils, layerReducer, layerActions, uiActions, uiSelectors, uiTypes, genericActions as syncGroupActions, };
77
+ export { mapSelectors, mapTypes, mapUtils, layerReducer, layerActions, uiActions, uiSelectors, uiTypes, genericActions as syncGroupActions, snackbarActions, };
78
78
  export { synchronizationGroupConfig as synchronizationGroupModuleConfig };
79
79
  export * from './components/ComponentsLookUp';
80
80
  export * from './components/ConfigurableMap';
@@ -93,8 +93,9 @@ export * from './utils/jsonPresetFilter';
93
93
  export * from './utils/types';
94
94
  export * as defaultConfigurations from './utils/defaultConfigurations';
95
95
  export * from './components/Providers/Providers';
96
+ export * from './components/Snackbar';
96
97
  export { default as uiModuleConfig } from './store/ui/config';
97
98
  export { default as mapModuleConfig } from './store/mapStore/config';
98
99
  export { default as synchronizationGroupsConfig } from './store/generic/config';
99
100
  export * from './components/MapWarning/MapWarningProperties';
100
- export type { FeatureEvent, GeoFeatureStyle, } from './components/ReactMapView/AdagucMapDraw';
101
+ export type { FeatureEvent, GeoFeatureStyle, AdagucMapDrawDrawFunctionArgs, GeoJsonFeature, } from './components/ReactMapView/AdagucMapDraw';
@@ -1,8 +1,6 @@
1
1
  import { EntityState } from '@reduxjs/toolkit';
2
- export interface SnackbarMessage {
2
+ export interface SnackbarItem {
3
3
  message: string;
4
- }
5
- export interface SnackbarItem extends SnackbarMessage {
6
4
  id: string;
7
5
  }
8
6
  export declare type SnackbarState = EntityState<SnackbarItem>;
@@ -10,7 +8,7 @@ export interface SnackbarModuleStore {
10
8
  snackbar?: SnackbarState;
11
9
  }
12
10
  export interface OpenSnackbarPayload {
13
- snackbarContent: SnackbarMessage;
11
+ message: string;
14
12
  }
15
13
  export interface TriggerOpenSnackbarBySagaPayload {
16
14
  snackbarContent: SnackbarItem;
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { Layer } from '../store/mapStore/layers/types';
3
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "root" | "chips">;
4
3
  declare type ExampleLayer = {
5
4
  title: string;
6
5
  layers: Layer[];
@@ -1,5 +1,36 @@
1
1
  import React from 'react';
2
- export declare const useDrawPolyStoryStyles: (props?: any) => import("@mui/styles").ClassNameMap<"MapDrawGeoJSONContainer" | "MapDrawGeoJSONMapContainer" | "MapDrawGeoJSONControlsContainer" | "MapDrawGeoJSONTextAreaContainer" | "MapDrawGeoJSONTextArea">;
2
+ export declare const drawPolyStoryStyles: {
3
+ MapDrawGeoJSONContainer: {
4
+ display: string;
5
+ gridTemplateColumns: string;
6
+ gridTemplateRows: string;
7
+ gridTemplateAreas: string;
8
+ width: string;
9
+ height: string;
10
+ };
11
+ MapDrawGeoJSONMapContainer: {
12
+ gridArea: string;
13
+ width: string;
14
+ height: string;
15
+ };
16
+ MapDrawGeoJSONControlsContainer: {
17
+ gridArea: string;
18
+ width: string;
19
+ height: string;
20
+ };
21
+ MapDrawGeoJSONTextAreaContainer: {
22
+ gridArea: string;
23
+ width: string;
24
+ height: string;
25
+ };
26
+ MapDrawGeoJSONTextArea: {
27
+ padding: number;
28
+ border: string;
29
+ width: string;
30
+ height: string;
31
+ fontSize: string;
32
+ };
33
+ };
3
34
  export declare const useGeoJSON: () => {
4
35
  editModes: {
5
36
  key: string;
@@ -16,9 +47,5 @@ export declare const useGeoJSON: () => {
16
47
  changeDrawMode: (mode: string) => void;
17
48
  setEditMode: (on: boolean) => void;
18
49
  };
19
- declare const _default: React.JSXElementConstructor<Omit<{
20
- classes: import("@mui/styles").ClassNameMap<string>;
21
- } & Record<string, unknown> & {
22
- children?: React.ReactNode;
23
- }, string> & import("@mui/styles").StyledComponentProps<string> & Record<string, unknown>>;
24
- export default _default;
50
+ declare const DrawPolyStory: React.FC;
51
+ export default DrawPolyStory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/core",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "GeoWeb Core library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -13,22 +13,21 @@
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
15
  "react": "^17.0.2",
16
- "@opengeoweb/theme": "4.0.0",
16
+ "@opengeoweb/theme": "4.1.0",
17
17
  "@mui/material": "^5.2.8",
18
18
  "moment": "^2.29.0",
19
19
  "react-redux": "^8.0.2",
20
- "@mui/styles": "^5.2.3",
21
20
  "react-intl": "^5.17.5",
22
21
  "lodash": "^4.17.20",
23
- "@opengeoweb/shared": "4.0.0",
22
+ "@opengeoweb/shared": "4.1.0",
24
23
  "react-draggable": "^4.4.3",
25
24
  "re-resizable": "^6.9.0",
26
- "@opengeoweb/form-fields": "4.0.0",
25
+ "@opengeoweb/form-fields": "4.1.0",
27
26
  "react-hook-form": "^6.12.1",
28
27
  "moment-timezone": "^0.5.31",
29
28
  "@mui/lab": "^5.0.0-alpha.64",
30
29
  "axios": "^0.25.0",
31
- "@opengeoweb/webmap": "4.0.0",
30
+ "@opengeoweb/webmap": "4.1.0",
32
31
  "throttle-debounce": "^3.0.1",
33
32
  "proj4": "^2.6.2",
34
33
  "react-sortablejs": "^6.0.0",
@@ -1,4 +0,0 @@
1
- import { Theme } from '@mui/material';
2
- import { StyleRulesCallback } from '@mui/styles';
3
- declare const mapDrawGeoJSONStyles: StyleRulesCallback<Theme, Record<string, unknown>>;
4
- export default mapDrawGeoJSONStyles;