@opensystemslab/map 0.7.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensystemslab/map",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "license": "OGL-UK-3.0",
5
5
  "private": false,
6
6
  "repository": {
@@ -28,9 +28,12 @@
28
28
  "dependencies": {
29
29
  "@turf/union": "^6.5.0",
30
30
  "accessible-autocomplete": "^2.0.4",
31
+ "file-saver": "^2.0.5",
31
32
  "govuk-frontend": "^4.0.1",
33
+ "jspdf": "^2.5.1",
32
34
  "lit": "^2.3.1",
33
35
  "ol": "^7.0.0",
36
+ "ol-ext": "^4.0.4",
34
37
  "ol-mapbox-style": "^9.0.0",
35
38
  "postcode": "^5.1.0",
36
39
  "proj4": "^2.8.0",
@@ -38,11 +41,13 @@
38
41
  },
39
42
  "devDependencies": {
40
43
  "@glorious/pitsby": "^1.30.16",
41
- "@testing-library/dom": "^8.17.1",
44
+ "@testing-library/dom": "^9.0.0",
42
45
  "@testing-library/user-event": "^14.4.3",
46
+ "@types/file-saver": "^2.0.5",
43
47
  "@types/node": "^18.6.3",
48
+ "@types/ol-ext": "npm:@siedlerchr/types-ol-ext@^3.0.9",
44
49
  "@types/proj4": "^2.5.2",
45
- "@vitest/ui": "^0.27.0",
50
+ "@vitest/ui": "^0.28.4",
46
51
  "happy-dom": "^8.1.0",
47
52
  "husky": "^8.0.1",
48
53
  "lint-staged": "^13.0.3",
@@ -51,7 +56,7 @@
51
56
  "sass": "^1.44.0",
52
57
  "typescript": "^4.3.5",
53
58
  "vite": "^4.0.0",
54
- "vitest": "0.27.0",
59
+ "vitest": "0.28.5",
55
60
  "wait-for-expect": "^3.0.2"
56
61
  },
57
62
  "engines": {
@@ -1,5 +1,35 @@
1
+ import Map from "ol/Map";
1
2
  import { Control, ScaleLine } from "ol/control";
2
3
  import "ol/ol.css";
4
+ import "ol-ext/dist/ol-ext.css";
5
+ import PrintDialog from "ol-ext/control/PrintDialog";
6
+ import { Options } from "ol-ext/control/PrintDialog";
3
7
  export declare function scaleControl(useScaleBarStyle: boolean): ScaleLine;
4
8
  export declare function northArrowControl(): Control;
5
9
  export declare function resetControl(listener: any, icon: string): Control;
10
+ export interface PrintControlOptions extends Options {
11
+ map: Map;
12
+ }
13
+ export declare class PrintControl extends PrintDialog {
14
+ mainMap: Map;
15
+ constructor({ map }: PrintControlOptions);
16
+ /**
17
+ * Toggle scaleControl when printControl is open
18
+ * Instead, display CanvasScaleLine which can be printed
19
+ */
20
+ private setupCanvasScaleLine;
21
+ /**
22
+ * Setup custom styling and event listeners of print button displayed on map
23
+ */
24
+ private setupPrintButton;
25
+ /**
26
+ * Display scale (1:XXX) on CanvasScaleLine control
27
+ * This can not natively be done with this element, but it has all the inherited
28
+ * functions from OL ScaleLine to allow us to set this
29
+ */
30
+ private syncScaleText;
31
+ /**
32
+ * Hide browser dialog
33
+ */
34
+ private customiseContent;
35
+ }
@@ -53,6 +53,7 @@ export declare class MyMap extends LitElement {
53
53
  showScale: boolean;
54
54
  useScaleBarStyle: boolean;
55
55
  showNorthArrow: boolean;
56
+ showPrint: boolean;
56
57
  map?: Map;
57
58
  constructor();
58
59
  firstUpdated(): void;