Map refactored and dependency updates

This commit is contained in:
Dean 2022-03-11 11:17:15 +00:00
parent 39468c98c0
commit 318214fd72
3 changed files with 72 additions and 1275 deletions

View File

@ -32,10 +32,11 @@
"@spectrum-css/vars": "^3.0.1", "@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1", "apexcharts": "^3.22.1",
"dayjs": "^1.10.5", "dayjs": "^1.10.5",
"leaflet": "^1.7.1",
"downloadjs": "1.4.7", "downloadjs": "1.4.7",
"leaflet": "^1.7.1",
"regexparam": "^1.3.0", "regexparam": "^1.3.0",
"rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-polyfill-node": "^0.8.0",
"sanitize-html": "^2.7.0",
"screenfull": "^6.0.1", "screenfull": "^6.0.1",
"shortid": "^2.2.15", "shortid": "^2.2.15",
"svelte": "^3.38.2", "svelte": "^3.38.2",

View File

@ -1,6 +1,6 @@
<script> <script>
import L from "leaflet" import L from "leaflet"
import sanitizeHtml from 'sanitize-html' import sanitizeHtml from "sanitize-html"
import "leaflet/dist/leaflet.css" import "leaflet/dist/leaflet.css"
import { Helpers } from "@budibase/bbui" import { Helpers } from "@budibase/bbui"
import { getContext } from "svelte" import { getContext } from "svelte"
@ -238,11 +238,11 @@
mapMarkerGroup.addTo(mapInstance) mapMarkerGroup.addTo(mapInstance)
const cleanAttribution = sanitizeHtml(mapAttribution, { const cleanAttribution = sanitizeHtml(mapAttribution, {
allowedTags: [ 'a' ], allowedTags: ["a"],
allowedAttributes: { allowedAttributes: {
'a': [ 'href' ] a: ["href"],
} },
}); })
L.tileLayer(tileURL, { L.tileLayer(tileURL, {
attribution: "&copy; " + cleanAttribution, attribution: "&copy; " + cleanAttribution,

File diff suppressed because it is too large Load Diff