@opensystemslab/map 0.8.3 → 1.0.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +20 -0
- package/dist/component-lib.es.js +1 -1
- package/dist/component-lib.umd.js +116 -109
- package/dist/{html2canvas.esm-CKxSAI8P.mjs → html2canvas.esm-d2sM-0Wm.mjs} +54 -70
- package/dist/{index-CXqLab25.mjs → index-CnbGXbu3.mjs} +43733 -40342
- package/dist/{index.es-Cd2avOFl.mjs → index.es-iycsZptI.mjs} +167 -292
- package/dist/index.html +15 -8
- package/dist/{purify.es-ggP5g4xx.mjs → purify.es-B7BPtUgm.mjs} +9 -18
- package/dist/style.css +1 -1
- package/package.json +12 -12
- package/types/components/address-autocomplete/index.d.ts +5 -1
- package/types/components/my-map/drawing.d.ts +6 -5
- package/types/components/my-map/index.d.ts +35 -4
- package/types/components/my-map/layers.d.ts +10 -0
- package/types/components/my-map/os-features.d.ts +2 -2
- package/types/components/my-map/utils.d.ts +3 -3
- package/types/components/my-map/os-layers.d.ts +0 -5
- /package/types/components/my-map/{os-layers.test.d.ts → layers.test.d.ts} +0 -0
package/dist/index.html
CHANGED
@@ -41,11 +41,22 @@
|
|
41
41
|
|
42
42
|
<body style="font-family:Inter,Helvetica,sans-serif;">
|
43
43
|
<div style="display:flex;flex-direction:column;">
|
44
|
-
<h1 style="color:red;font-size:16px;"
|
45
|
-
|
44
|
+
<h1 style="color:red;font-size:16px;">
|
45
|
+
*** This is a testing sandbox - these components are unaware of each other!***
|
46
|
+
</h1>
|
46
47
|
<div style="margin-bottom:1em">
|
47
|
-
<my-map
|
48
|
-
|
48
|
+
<my-map
|
49
|
+
id="example-map"
|
50
|
+
ariaLabelOlFixedOverlay="Interactive example map"
|
51
|
+
zoom="20"
|
52
|
+
maxZoom="23"
|
53
|
+
drawMode
|
54
|
+
drawMany
|
55
|
+
basemap="MapboxSatellite"
|
56
|
+
showCentreMarker
|
57
|
+
osCopyright="© Crown copyright and database rights 2024 OS (0)100024857"
|
58
|
+
osProxyEndpoint="https://api.editor.planx.dev/proxy/ordnance-survey"
|
59
|
+
/>
|
49
60
|
</div>
|
50
61
|
<div style="margin-bottom:1em">
|
51
62
|
<postcode-search hintText="Optional hint text shows up here" id="example-postcode" />
|
@@ -67,7 +78,6 @@
|
|
67
78
|
<script>
|
68
79
|
// --- MAP --- //
|
69
80
|
const map = document.querySelector("my-map");
|
70
|
-
map.geojsonDataCopyright = `<a href="https://www.planning.data.gov.uk/dataset/title-boundary" target="_blank">Title boundary</a> subject to Crown copyright and database rights ${new Date().getFullYear()} OS (0)100026316`;
|
71
81
|
map.clipGeojsonData = {
|
72
82
|
"type": "Feature",
|
73
83
|
"geometry": {
|
@@ -104,9 +114,6 @@
|
|
104
114
|
});
|
105
115
|
|
106
116
|
// applicable when drawMode is enabled
|
107
|
-
map.addEventListener("areaChange", ({ detail: area }) => {
|
108
|
-
console.debug({ area });
|
109
|
-
});
|
110
117
|
map.addEventListener("geojsonChange", ({ detail: geojson }) => {
|
111
118
|
console.debug({ geojson });
|
112
119
|
});
|
@@ -13,10 +13,8 @@ function Pe(a, n) {
|
|
13
13
|
}, Pe(a, n);
|
14
14
|
}
|
15
15
|
function zt() {
|
16
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
17
|
-
|
18
|
-
if (typeof Proxy == "function")
|
19
|
-
return !0;
|
16
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
17
|
+
if (typeof Proxy == "function") return !0;
|
20
18
|
try {
|
21
19
|
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
22
20
|
})), !0;
|
@@ -36,28 +34,22 @@ function M(a) {
|
|
36
34
|
return Gt(a) || Wt(a) || Bt(a) || $t();
|
37
35
|
}
|
38
36
|
function Gt(a) {
|
39
|
-
if (Array.isArray(a))
|
40
|
-
return Fe(a);
|
37
|
+
if (Array.isArray(a)) return Fe(a);
|
41
38
|
}
|
42
39
|
function Wt(a) {
|
43
|
-
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null)
|
44
|
-
return Array.from(a);
|
40
|
+
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
45
41
|
}
|
46
42
|
function Bt(a, n) {
|
47
43
|
if (a) {
|
48
|
-
if (typeof a == "string")
|
49
|
-
return Fe(a, n);
|
44
|
+
if (typeof a == "string") return Fe(a, n);
|
50
45
|
var o = Object.prototype.toString.call(a).slice(8, -1);
|
51
|
-
if (o === "Object" && a.constructor && (o = a.constructor.name), o === "Map" || o === "Set")
|
52
|
-
|
53
|
-
if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))
|
54
|
-
return Fe(a, n);
|
46
|
+
if (o === "Object" && a.constructor && (o = a.constructor.name), o === "Map" || o === "Set") return Array.from(a);
|
47
|
+
if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return Fe(a, n);
|
55
48
|
}
|
56
49
|
}
|
57
50
|
function Fe(a, n) {
|
58
51
|
(n == null || n > a.length) && (n = a.length);
|
59
|
-
for (var o = 0, s = new Array(n); o < n; o++)
|
60
|
-
s[o] = a[o];
|
52
|
+
for (var o = 0, s = new Array(n); o < n; o++) s[o] = a[o];
|
61
53
|
return s;
|
62
54
|
}
|
63
55
|
function $t() {
|
@@ -338,8 +330,7 @@ function _t() {
|
|
338
330
|
!(ot(e) && (f.tagNameCheck instanceof RegExp && _(f.tagNameCheck, e) || f.tagNameCheck instanceof Function && f.tagNameCheck(e)) && (f.attributeNameCheck instanceof RegExp && _(f.attributeNameCheck, t) || f.attributeNameCheck instanceof Function && f.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
339
331
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
340
332
|
t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp && _(f.tagNameCheck, r) || f.tagNameCheck instanceof Function && f.tagNameCheck(r)))
|
341
|
-
)
|
342
|
-
return !1;
|
333
|
+
) return !1;
|
343
334
|
} else if (!be[t]) {
|
344
335
|
if (!_(_e, L(r, ze, ""))) {
|
345
336
|
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Zt(r, "data:") === 0 && qe[e])) {
|