@opensystemslab/map 0.4.5 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/component-lib.es.js +12682 -0
- package/dist/component-lib.umd.js +12682 -0
- package/dist/index.html +45 -3
- package/dist/style.css +1 -1
- package/package.json +13 -8
- package/types/components/address-autocomplete/index.d.ts +30 -0
- package/types/{drawing.d.ts → components/my-map/drawing.d.ts} +0 -0
- package/types/{my-map.d.ts → components/my-map/index.d.ts} +1 -1
- package/types/{os-features.d.ts → components/my-map/os-features.d.ts} +0 -0
- package/types/{os-layers.d.ts → components/my-map/os-layers.d.ts} +0 -0
- package/types/{scale-line.d.ts → components/my-map/scale-line.d.ts} +2 -2
- package/types/{snapping.d.ts → components/my-map/snapping.d.ts} +0 -0
- package/types/{utils.d.ts → components/my-map/utils.d.ts} +0 -0
- package/types/components/postcode-search/index.d.ts +30 -0
- package/types/index.d.ts +3 -0
- package/dist/map.es.js +0 -79
- package/dist/map.umd.js +0 -79
package/package.json
CHANGED
@@ -1,31 +1,34 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opensystemslab/map",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.8",
|
4
4
|
"license": "OGL-UK-3.0",
|
5
5
|
"private": false,
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
8
8
|
"url": "https://github.com/theopensystemslab/map.git"
|
9
9
|
},
|
10
|
-
"browser": "./dist/
|
11
|
-
"module": "./dist/
|
12
|
-
"exports": "./dist/
|
13
|
-
"types": "types/
|
10
|
+
"browser": "./dist/component-lib.umd.js",
|
11
|
+
"module": "./dist/component-lib.es.js",
|
12
|
+
"exports": "./dist/component-lib.es.js",
|
13
|
+
"types": "./dist/types/index.d.ts",
|
14
14
|
"files": [
|
15
15
|
"dist",
|
16
16
|
"types"
|
17
17
|
],
|
18
18
|
"scripts": {
|
19
19
|
"dev": "vite",
|
20
|
-
"build": "tsc && vite build && sed 's/src=\".*\"/src=\"
|
21
|
-
"prepublishOnly": "
|
20
|
+
"build": "rm -rf dist types && tsc && vite build && sed 's/src=\".*\"/src=\"component-lib.es.js\"/' index.html > dist/index.html",
|
21
|
+
"prepublishOnly": "npm run build",
|
22
22
|
"prepare": "husky install"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
25
|
"@turf/union": "^6.5.0",
|
26
|
+
"accessible-autocomplete": "^2.0.4",
|
27
|
+
"govuk-frontend": "^3.14.0",
|
26
28
|
"lit": "^2.0.0-rc.2",
|
27
29
|
"ol": "^6.9.0",
|
28
|
-
"ol-mapbox-style": "^
|
30
|
+
"ol-mapbox-style": "^7.1.1",
|
31
|
+
"postcode": "^5.1.0",
|
29
32
|
"rambda": "^7.0.1"
|
30
33
|
},
|
31
34
|
"devDependencies": {
|
@@ -33,6 +36,8 @@
|
|
33
36
|
"husky": "^7.0.1",
|
34
37
|
"lint-staged": "^12.0.3",
|
35
38
|
"prettier": "^2.3.2",
|
39
|
+
"rollup-plugin-postcss-lit": "^2.0.0",
|
40
|
+
"sass": "^1.44.0",
|
36
41
|
"typescript": "^4.3.5",
|
37
42
|
"vite": "^2.4.4"
|
38
43
|
},
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { LitElement } from "lit";
|
2
|
+
export declare class AddressAutocomplete extends LitElement {
|
3
|
+
static styles: import("lit").CSSResult;
|
4
|
+
id: string;
|
5
|
+
postcode: string;
|
6
|
+
label: string;
|
7
|
+
initialAddress: string;
|
8
|
+
osPlacesApiKey: string;
|
9
|
+
private _totalAddresses;
|
10
|
+
private _addressesInPostcode;
|
11
|
+
private _options;
|
12
|
+
private _selectedAddress;
|
13
|
+
private _osError;
|
14
|
+
connectedCallback(): void;
|
15
|
+
disconnectedCallback(): void;
|
16
|
+
firstUpdated(): void;
|
17
|
+
_fetchData(offset?: number, prevResults?: any[]): Promise<void>;
|
18
|
+
render(): import("lit").TemplateResult<1>;
|
19
|
+
/**
|
20
|
+
* dispatches an event for clients to subscribe to
|
21
|
+
* @param eventName
|
22
|
+
* @param payload
|
23
|
+
*/
|
24
|
+
private dispatch;
|
25
|
+
}
|
26
|
+
declare global {
|
27
|
+
interface HTMLElementTagNameMap {
|
28
|
+
"address-autocomplete": AddressAutocomplete;
|
29
|
+
}
|
30
|
+
}
|
File without changes
|
@@ -3,7 +3,7 @@ import Map from "ol/Map";
|
|
3
3
|
import { DrawPointerEnum } from "./drawing";
|
4
4
|
import { AreaUnitEnum } from "./utils";
|
5
5
|
export declare class MyMap extends LitElement {
|
6
|
-
static styles: import("lit").
|
6
|
+
static styles: import("lit").CSSResult;
|
7
7
|
id: string;
|
8
8
|
latitude: number;
|
9
9
|
longitude: number;
|
File without changes
|
File without changes
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
2
|
-
import { ScaleLine } from
|
1
|
+
import "ol/ol.css";
|
2
|
+
import { ScaleLine } from "ol/control";
|
3
3
|
export declare function scaleControl(useScaleBarStyle: boolean): ScaleLine;
|
File without changes
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { LitElement } from "lit";
|
2
|
+
export declare class PostcodeSearch extends LitElement {
|
3
|
+
static styles: import("lit").CSSResult;
|
4
|
+
id: string;
|
5
|
+
errorId: string;
|
6
|
+
label: string;
|
7
|
+
hintText: string;
|
8
|
+
errorMessage: string;
|
9
|
+
onlyQuestionOnPage: boolean;
|
10
|
+
private _postcode;
|
11
|
+
private _sanitizedPostcode;
|
12
|
+
private _showPostcodeError;
|
13
|
+
_onInputChange(e: any): void;
|
14
|
+
_onBlur(): void;
|
15
|
+
_onKeyUp(e: KeyboardEvent): void;
|
16
|
+
_showError(): void;
|
17
|
+
_makeLabel(): import("lit").TemplateResult<1>;
|
18
|
+
render(): import("lit").TemplateResult<1>;
|
19
|
+
/**
|
20
|
+
* dispatches an event for clients to subscribe to
|
21
|
+
* @param eventName
|
22
|
+
* @param payload
|
23
|
+
*/
|
24
|
+
private dispatch;
|
25
|
+
}
|
26
|
+
declare global {
|
27
|
+
interface HTMLElementTagNameMap {
|
28
|
+
"postcode-search": PostcodeSearch;
|
29
|
+
}
|
30
|
+
}
|
package/types/index.d.ts
ADDED