@map-colonies/react-components 4.5.0 → 4.7.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.
@@ -67,6 +67,7 @@ export interface CesiumMapProps extends ViewerProps {
67
67
  };
68
68
  legends?: ILegends;
69
69
  layerManagerFootprintMetaFieldPath?: string;
70
+ displayZoomButtons?: boolean;
70
71
  }
71
72
  export declare const useCesiumMap: () => CesiumViewer;
72
73
  export declare const CesiumMap: React.FC<CesiumMapProps>;
@@ -6,6 +6,7 @@ export interface IBaseMap {
6
6
  title?: string;
7
7
  thumbnail?: string;
8
8
  isCurrent?: boolean;
9
+ isForPreview?: boolean;
9
10
  baseRasteLayers: IRasterLayer[];
10
11
  baseVectorLayers: IVectorLayer[];
11
12
  }
@@ -0,0 +1,33 @@
1
+ .zoom-buttons-container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 2px;
5
+ --full-screen-button-offset: 8px;
6
+ --full-screen-button-size: 29px;
7
+ --full-screen-button-bottom: 8px;
8
+ position: absolute;
9
+ bottom: calc(var(--full-screen-button-offset) + var(--full-screen-button-size) + var(--full-screen-button-bottom));
10
+ right: var(--full-screen-button-offset);
11
+ left: unset;
12
+ }
13
+
14
+ body[dir='rtl'] .zoom-buttons-container {
15
+ left: var(--full-screen-button-offset);
16
+ right: unset;
17
+ }
18
+
19
+ .zoom-button {
20
+ cursor: pointer;
21
+ width: 29px;
22
+ height: 29px;
23
+ text-align: center;
24
+ background: #303336;
25
+ border: 1px solid #444;
26
+ border-radius: 4px;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .zoom-button:hover {
31
+ background: #48b;
32
+ border-color: #aef;
33
+ }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ZoomButtons: React.FC;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './date-range-picker-with-presets';
3
3
  export * from './date-picker';
4
4
  export * from './map-filter-container';
5
5
  export * from './models';
6
+ export * from './ol-map';
6
7
  export * from './smart-table';
7
8
  export * from './popover';
8
9
  export * from './box';
@@ -1,6 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Geometry } from 'geojson';
3
+ import { FitOptions } from 'ol/View';
4
+ import { Style } from 'ol/style';
3
5
  export interface FeatureProps {
4
6
  geometry: Geometry;
7
+ fitOptions?: FitOptions;
8
+ fit?: boolean;
9
+ featureStyle?: Style;
5
10
  }
6
11
  export declare const GeoJSONFeature: React.FC<FeatureProps>;
@@ -0,0 +1,7 @@
1
+ export * from './interactions';
2
+ export * from './layers';
3
+ export * from './source';
4
+ export * from './feature';
5
+ export * from './map';
6
+ export * from '../utils/projections';
7
+ export * from './legend';
@@ -0,0 +1 @@
1
+ export * from './draw';
@@ -0,0 +1,3 @@
1
+ export * from './tile-layer';
2
+ export * from './vector-layer';
3
+ export * from './vector-tile-layer';
@@ -0,0 +1,10 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import VectorTile from 'ol/layer/VectorTile';
3
+ import { Options } from 'ol/layer/Base';
4
+ import { MapStyle } from '../style';
5
+ export interface VectorTileLayerProps {
6
+ options?: Options;
7
+ style?: MapStyle;
8
+ }
9
+ export declare const useVectorTileLayer: () => VectorTile;
10
+ export declare const VectorTileLayer: React.FC<PropsWithChildren<VectorTileLayerProps>>;
@@ -0,0 +1 @@
1
+ export * from './legend';
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { Style } from 'ol/style';
3
+ export interface LegendItem {
4
+ title: string;
5
+ style: Style;
6
+ }
7
+ export interface LegendParams {
8
+ legendItems: LegendItem[];
9
+ title?: string;
10
+ isCollapsed?: boolean;
11
+ }
12
+ export declare const Legend: React.FC<LegendParams>;
@@ -0,0 +1,6 @@
1
+ export * from './osm';
2
+ export * from './vector-source';
3
+ export * from './wmts';
4
+ export * from './wms';
5
+ export * from './xyz';
6
+ export * from './mvt';
@@ -0,0 +1,11 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import VectorTileSource, { Options } from 'ol/source/VectorTile';
3
+ export declare const useVectorTileSource: () => VectorTileSource;
4
+ export interface MVTSourceProps {
5
+ options: Options;
6
+ }
7
+ export interface MVTOptionParams {
8
+ url: string;
9
+ }
10
+ export declare const getMVTOptions: (optionParams: MVTOptionParams) => Options;
11
+ export declare const MVTSource: React.FC<PropsWithChildren<MVTSourceProps>>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Options } from 'ol/source/TileWMS';
3
+ interface TileWMSProps {
4
+ options: Options;
5
+ }
6
+ export interface WMSOptionParams {
7
+ attributions?: string;
8
+ url: string;
9
+ params: {
10
+ [key: string]: any;
11
+ };
12
+ serverType: 'carmentaserver' | 'geoserver' | 'mapserver' | 'qgis';
13
+ transition: number;
14
+ }
15
+ export declare const getWMSOptions: (optionParams: WMSOptionParams) => Options;
16
+ export declare const TileWMS: React.FC<TileWMSProps>;
17
+ export {};
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { Options } from 'ol/source/WMTS';
3
+ import WMTSRequestEncoding from 'ol/source/WMTSRequestEncoding';
4
+ interface TileWMTSProps {
5
+ options: Options;
6
+ }
7
+ export interface WMTSOptionParams {
8
+ attributions?: string;
9
+ url: string;
10
+ layer: string;
11
+ projection: string;
12
+ format: string;
13
+ style: string;
14
+ matrixSet: string;
15
+ wrapX?: boolean;
16
+ heightWidthRatio?: number;
17
+ requestEncoding?: WMTSRequestEncoding | string;
18
+ }
19
+ export declare const getWMTSOptions: (params: WMTSOptionParams) => Options;
20
+ export declare const TileWMTS: React.FC<TileWMTSProps>;
21
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { Options } from 'ol/source/XYZ';
3
+ interface TileXYZProps {
4
+ options: Options;
5
+ }
6
+ export interface XYZOptionParams {
7
+ attributions?: string;
8
+ url: string;
9
+ }
10
+ export declare const getXYZOptions: (optionParams: XYZOptionParams) => Options;
11
+ export declare const TileXYZ: React.FC<TileXYZProps>;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Style } from 'ol/style';
2
+ import { StyleFunction } from 'ol/style/Style';
3
+ export type MapStyle = Style | Style[] | StyleFunction;
4
+ export declare const defaultStyle: Style[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@map-colonies/react-components",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "main": "./dist/@map-colonies/react-components.umd.js",
5
5
  "module": "./dist/@map-colonies/react-components.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -44,6 +44,7 @@
44
44
  "get-input-selection": "^1.1.4",
45
45
  "lodash": "^4.17.20",
46
46
  "ol": "^6.4.3",
47
+ "ol-ext": "^4.0.18",
47
48
  "react-datepicker": "^4.16.0",
48
49
  "resium": "1.16.1",
49
50
  "rimraf": "3.0.2",
@@ -60,6 +61,7 @@
60
61
  "@types/geojson": "^7946.0.10",
61
62
  "@types/lodash": "^4.14.165",
62
63
  "@types/ol": "^6.3.1",
64
+ "@types/ol-ext": "npm:@siedlerchr/types-ol-ext",
63
65
  "@types/textarea-caret": "^3.0.1",
64
66
  "enzyme": "^3.11.0",
65
67
  "jest-enzyme": "^7.1.2",
@@ -70,5 +72,5 @@
70
72
  "files": [
71
73
  "dist"
72
74
  ],
73
- "gitHead": "06c4766a767131c590eaa67daac2a6a1e4f14732"
75
+ "gitHead": "b2788382175ecda380784373477a20503e2d836d"
74
76
  }