- npm updates, remove rxjs

- add draw.component.vue
- only load needed leaflet classes into map.component.vue an Submitter/Create.vue
- rename js/store.Map.ts to js/Stores/map.service.ts
-
This commit is contained in:
Kaimbacher 2023-04-06 18:56:41 +02:00
parent cd66f318b6
commit a744ae7e5b
19 changed files with 683 additions and 275 deletions

324
package-lock.json generated
View File

@ -30,7 +30,6 @@
"pg": "^8.9.0", "pg": "^8.9.0",
"proxy-addr": "^2.0.7", "proxy-addr": "^2.0.7",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"rxjs": "^7.8.0",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"vue-facing-decorator": "^2.1.13" "vue-facing-decorator": "^2.1.13"
}, },
@ -2502,6 +2501,30 @@
"node": ">=0.1.90" "node": ">=0.1.90"
} }
}, },
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/trace-mapping": "0.3.9"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"node_modules/@css-render/plugin-bem": { "node_modules/@css-render/plugin-bem": {
"version": "0.15.12", "version": "0.15.12",
"resolved": "https://registry.npmjs.org/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz", "resolved": "https://registry.npmjs.org/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz",
@ -2725,9 +2748,9 @@
} }
}, },
"node_modules/@inertiajs/core/node_modules/axios": { "node_modules/@inertiajs/core/node_modules/axios": {
"version": "1.3.4", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.5.tgz",
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", "integrity": "sha512-glL/PvG/E+xCWwV8S6nCHcrfg1exGx7vxyUIivIA1iL7BIh6bePylCfVHwp6k13ao7SATxB6imau2kqY+I67kw==",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.0", "follow-redirects": "^1.15.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@ -3601,6 +3624,34 @@
"node": ">=10.13.0" "node": ">=10.13.0"
} }
}, },
"node_modules/@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
"dev": true,
"peer": true
},
"node_modules/@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"dev": true,
"peer": true
},
"node_modules/@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
"dev": true,
"peer": true
},
"node_modules/@tsconfig/node16": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
"dev": true,
"peer": true
},
"node_modules/@types/body-parser": { "node_modules/@types/body-parser": {
"version": "1.19.2", "version": "1.19.2",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
@ -3808,9 +3859,9 @@
} }
}, },
"node_modules/@types/luxon": { "node_modules/@types/luxon": {
"version": "3.2.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.2.0.tgz", "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.0.tgz",
"integrity": "sha512-lGmaGFoaXHuOLXFvuju2bfvZRqxAqkHPx9Y9IQdQABrinJJshJwfNCKV+u7rR3kJbiqfTF/NhOkcxxAFrObyaA==" "integrity": "sha512-uKRI5QORDnrGFYgcdAVnHvEIvEZ8noTpP/Bg+HeUzZghwinDlIS87DEenV5r1YoOF9G4x600YsUXLWZ19rmTmg=="
}, },
"node_modules/@types/md5": { "node_modules/@types/md5": {
"version": "2.3.2", "version": "2.3.2",
@ -3973,15 +4024,15 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.1.tgz",
"integrity": "sha512-itag0qpN6q2UMM6Xgk6xoHa0D0/P+M17THnr4SVgqn9Rgam5k/He33MA7/D7QoJcdMxHFyX7U9imaBonAX/6qA==", "integrity": "sha512-1MeobQkQ9tztuleT3v72XmY0XuKXVXusAhryoLuU5YZ+mXoYKZP9SQ7Flulh1NX4DTjpGTc2b/eMu4u7M7dhnQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@typescript-eslint/scope-manager": "5.57.0", "@typescript-eslint/scope-manager": "5.57.1",
"@typescript-eslint/type-utils": "5.57.0", "@typescript-eslint/type-utils": "5.57.1",
"@typescript-eslint/utils": "5.57.0", "@typescript-eslint/utils": "5.57.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"grapheme-splitter": "^1.0.4", "grapheme-splitter": "^1.0.4",
"ignore": "^5.2.0", "ignore": "^5.2.0",
@ -4007,14 +4058,14 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.1.tgz",
"integrity": "sha512-orrduvpWYkgLCyAdNtR1QIWovcNZlEm6yL8nwH/eTxWLd8gsP+25pdLHYzL2QdkqrieaDwLpytHqycncv0woUQ==", "integrity": "sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "5.57.0", "@typescript-eslint/scope-manager": "5.57.1",
"@typescript-eslint/types": "5.57.0", "@typescript-eslint/types": "5.57.1",
"@typescript-eslint/typescript-estree": "5.57.0", "@typescript-eslint/typescript-estree": "5.57.1",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -4034,13 +4085,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz",
"integrity": "sha512-NANBNOQvllPlizl9LatX8+MHi7bx7WGIWYjPHDmQe5Si/0YEYfxSljJpoTyTWFTgRy3X8gLYSE4xQ2U+aCozSw==", "integrity": "sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.57.0", "@typescript-eslint/types": "5.57.1",
"@typescript-eslint/visitor-keys": "5.57.0" "@typescript-eslint/visitor-keys": "5.57.1"
}, },
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -4051,13 +4102,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.57.1.tgz",
"integrity": "sha512-kxXoq9zOTbvqzLbdNKy1yFrxLC6GDJFE2Yuo3KqSwTmDOFjUGeWSakgoXT864WcK5/NAJkkONCiKb1ddsqhLXQ==", "integrity": "sha512-/RIPQyx60Pt6ga86hKXesXkJ2WOS4UemFrmmq/7eOyiYjYv/MUSHPlkhU6k9T9W1ytnTJueqASW+wOmW4KrViw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "5.57.0", "@typescript-eslint/typescript-estree": "5.57.1",
"@typescript-eslint/utils": "5.57.0", "@typescript-eslint/utils": "5.57.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"tsutils": "^3.21.0" "tsutils": "^3.21.0"
}, },
@ -4078,9 +4129,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.57.1.tgz",
"integrity": "sha512-mxsod+aZRSyLT+jiqHw1KK6xrANm19/+VFALVFP5qa/aiJnlP38qpyaTd0fEKhWvQk6YeNZ5LGwI1pDpBRBhtQ==", "integrity": "sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -4091,13 +4142,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz",
"integrity": "sha512-LTzQ23TV82KpO8HPnWuxM2V7ieXW8O142I7hQTxWIHDcCEIjtkat6H96PFkYBQqGFLW/G/eVVOB9Z8rcvdY/Vw==", "integrity": "sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.57.0", "@typescript-eslint/types": "5.57.1",
"@typescript-eslint/visitor-keys": "5.57.0", "@typescript-eslint/visitor-keys": "5.57.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -4168,17 +4219,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.57.1.tgz",
"integrity": "sha512-ps/4WohXV7C+LTSgAL5CApxvxbMkl9B9AUZRtnEFonpIxZDIT7wC1xfvuJONMidrkB9scs4zhtRyIwHh4+18kw==", "integrity": "sha512-kN6vzzf9NkEtawECqze6v99LtmDiUJCVpvieTFA1uL7/jDghiJGubGZ5csicYHU1Xoqb3oH/R5cN5df6W41Nfg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9", "@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12", "@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.57.0", "@typescript-eslint/scope-manager": "5.57.1",
"@typescript-eslint/types": "5.57.0", "@typescript-eslint/types": "5.57.1",
"@typescript-eslint/typescript-estree": "5.57.0", "@typescript-eslint/typescript-estree": "5.57.1",
"eslint-scope": "^5.1.1", "eslint-scope": "^5.1.1",
"semver": "^7.3.7" "semver": "^7.3.7"
}, },
@ -4216,12 +4267,12 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "5.57.0", "version": "5.57.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz",
"integrity": "sha512-ery2g3k0hv5BLiKpPuwYt9KBkAp2ugT6VvyShXdLOkax895EC55sP0Tx5L0fZaQueiK3fBLvHVvEl3jFS5ia+g==", "integrity": "sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.57.0", "@typescript-eslint/types": "5.57.1",
"eslint-visitor-keys": "^3.3.0" "eslint-visitor-keys": "^3.3.0"
}, },
"engines": { "engines": {
@ -5826,9 +5877,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001473", "version": "1.0.30001474",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001473.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001474.tgz",
"integrity": "sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg==", "integrity": "sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -6469,9 +6520,9 @@
} }
}, },
"node_modules/core-js-compat": { "node_modules/core-js-compat": {
"version": "3.29.1", "version": "3.30.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.1.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.30.0.tgz",
"integrity": "sha512-QmchCua884D8wWskMX8tW5ydINzd8oSJVx38lx/pVkFGqztxt73GYre3pm/hyYq8bPf+MW5In4I/uRShFDsbrA==", "integrity": "sha512-P5A2h/9mRYZFIAP+5Ab8ns6083IyVpSclU74UNvbGVQ8VM7n3n3/g2yF3AkKQ9NXz2O+ioxLbEWKnDtgsFamhg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"browserslist": "^4.21.5" "browserslist": "^4.21.5"
@ -6505,6 +6556,22 @@
"url": "https://github.com/sponsors/d-fischer" "url": "https://github.com/sponsors/d-fischer"
} }
}, },
"node_modules/cosmiconfig-typescript-loader": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz",
"integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==",
"dev": true,
"engines": {
"node": ">=12",
"npm": ">=6"
},
"peerDependencies": {
"@types/node": "*",
"cosmiconfig": ">=7",
"ts-node": ">=10",
"typescript": ">=3"
}
},
"node_modules/cosmiconfig/node_modules/argparse": { "node_modules/cosmiconfig/node_modules/argparse": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@ -6588,6 +6655,13 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true,
"peer": true
},
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -7247,6 +7321,16 @@
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
"dev": true "dev": true
}, },
"node_modules/diff": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.3.1"
}
},
"node_modules/diff-sequences": { "node_modules/diff-sequences": {
"version": "29.4.3", "version": "29.4.3",
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz",
@ -7525,9 +7609,9 @@
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.347", "version": "1.4.353",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.347.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.353.tgz",
"integrity": "sha512-LNi3+/9nV0vT6Bz1OsSoZ/w7IgNuWdefZ7mjKNjZxyRlI/ag6uMXxsxAy5Etvuixq3Q26exw2fc4bNYvYQqXSw==", "integrity": "sha512-IdJVpMHJoBT/nn0GQ02wPfbhogDVpd1ud95lP//FTf5l35wzxKJwibB4HBdY7Q+xKPA1nkZ0UDLOMyRj5U5IAQ==",
"dev": true "dev": true
}, },
"node_modules/emittery": { "node_modules/emittery": {
@ -10885,6 +10969,13 @@
"semver": "bin/semver.js" "semver": "bin/semver.js"
} }
}, },
"node_modules/make-error": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true,
"peer": true
},
"node_modules/map-age-cleaner": { "node_modules/map-age-cleaner": {
"version": "0.1.3", "version": "0.1.3",
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
@ -12840,12 +12931,13 @@
} }
}, },
"node_modules/postcss-loader": { "node_modules/postcss-loader": {
"version": "7.1.0", "version": "7.2.4",
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.1.0.tgz", "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.2.4.tgz",
"integrity": "sha512-vTD2DJ8vJD0Vr1WzMQkRZWRjcynGh3t7NeoLg+Sb1TeuK7etiZfL/ZwHbaVa3M+Qni7Lj/29voV9IggnIUjlIw==", "integrity": "sha512-F88rpxxNspo5hatIc+orYwZDtHFaVFOSIVAx+fBfJC1GmhWbVmPWtmg2gXKE1OxJbneOSGn8PWdIwsZFcruS+w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"cosmiconfig": "^8.0.0", "cosmiconfig": "^8.1.3",
"cosmiconfig-typescript-loader": "^4.3.0",
"klona": "^2.0.6", "klona": "^2.0.6",
"semver": "^7.3.8" "semver": "^7.3.8"
}, },
@ -12858,7 +12950,17 @@
}, },
"peerDependencies": { "peerDependencies": {
"postcss": "^7.0.0 || ^8.0.1", "postcss": "^7.0.0 || ^8.0.1",
"ts-node": ">=10",
"typescript": ">=4",
"webpack": "^5.0.0" "webpack": "^5.0.0"
},
"peerDependenciesMeta": {
"ts-node": {
"optional": true
},
"typescript": {
"optional": true
}
} }
}, },
"node_modules/postcss-merge-longhand": { "node_modules/postcss-merge-longhand": {
@ -13829,11 +13931,11 @@
"dev": true "dev": true
}, },
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.22.1", "version": "1.22.2",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
"dependencies": { "dependencies": {
"is-core-module": "^2.9.0", "is-core-module": "^2.11.0",
"path-parse": "^1.0.7", "path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0" "supports-preserve-symlinks-flag": "^1.0.0"
}, },
@ -13977,14 +14079,6 @@
"queue-microtask": "^1.2.2" "queue-microtask": "^1.2.2"
} }
}, },
"node_modules/rxjs": {
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
"integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/safe-buffer": { "node_modules/safe-buffer": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@ -15712,6 +15806,57 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/ts-node": {
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
"peer": true,
"dependencies": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
"@tsconfig/node12": "^1.0.7",
"@tsconfig/node14": "^1.0.0",
"@tsconfig/node16": "^1.0.2",
"acorn": "^8.4.1",
"acorn-walk": "^8.1.1",
"arg": "^4.1.0",
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
"v8-compile-cache-lib": "^3.0.1",
"yn": "3.1.1"
},
"bin": {
"ts-node": "dist/bin.js",
"ts-node-cwd": "dist/bin-cwd.js",
"ts-node-esm": "dist/bin-esm.js",
"ts-node-script": "dist/bin-script.js",
"ts-node-transpile-only": "dist/bin-transpile.js",
"ts-script": "dist/bin-script-deprecated.js"
},
"peerDependencies": {
"@swc/core": ">=1.2.50",
"@swc/wasm": ">=1.2.50",
"@types/node": "*",
"typescript": ">=2.7"
},
"peerDependenciesMeta": {
"@swc/core": {
"optional": true
},
"@swc/wasm": {
"optional": true
}
}
},
"node_modules/ts-node/node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true,
"peer": true
},
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.5.0", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
@ -16046,6 +16191,13 @@
"uuid": "dist/bin/uuid" "uuid": "dist/bin/uuid"
} }
}, },
"node_modules/v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"dev": true,
"peer": true
},
"node_modules/valid-url": { "node_modules/valid-url": {
"version": "1.0.9", "version": "1.0.9",
"resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz",
@ -16114,9 +16266,9 @@
} }
}, },
"node_modules/vue-facing-decorator": { "node_modules/vue-facing-decorator": {
"version": "2.1.17", "version": "2.1.19",
"resolved": "https://registry.npmjs.org/vue-facing-decorator/-/vue-facing-decorator-2.1.17.tgz", "resolved": "https://registry.npmjs.org/vue-facing-decorator/-/vue-facing-decorator-2.1.19.tgz",
"integrity": "sha512-WgXtUgFipegf6bd7XecbzppDQbiB3ZdlfJbsoBdxaOoesWaODAW05OksDp5dXrlk+lDLlXZd42VB1vvutzeAfA==", "integrity": "sha512-kHb6b8GRbmuPr1KKzin32dD97rZZr5YVsojjW4HP7mE18kCXPqnelVDOcUXuXdW5fnvidITL+hpW4bwBkFSArg==",
"peerDependencies": { "peerDependencies": {
"vue": "^3.0.0" "vue": "^3.0.0"
} }
@ -16264,9 +16416,9 @@
} }
}, },
"node_modules/webpack": { "node_modules/webpack": {
"version": "5.77.0", "version": "5.78.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.77.0.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.78.0.tgz",
"integrity": "sha512-sbGNjBr5Ya5ss91yzjeJTLKyfiwo5C628AFjEa6WSXcZa4E+F57om3Cc8xLb1Jh0b243AWuSYRf3dn7HVeFQ9Q==", "integrity": "sha512-gT5DP72KInmE/3azEaQrISjTvLYlSM0j1Ezhht/KLVkrqtv10JoP/RXhwmX/frrutOPuSq3o5Vq0ehR/4Vmd1g==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@ -16458,9 +16610,9 @@
} }
}, },
"node_modules/webpack-dev-server": { "node_modules/webpack-dev-server": {
"version": "4.13.1", "version": "4.13.2",
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.13.1.tgz", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.13.2.tgz",
"integrity": "sha512-5tWg00bnWbYgkN+pd5yISQKDejRBYGEw15RaEEslH+zdbNDxxaZvEAO2WulaSaFKb5n3YG8JXsGaDsut1D0xdA==", "integrity": "sha512-5i6TrGBRxG4vnfDpB6qSQGfnB6skGBXNL5/542w2uRGLimX6qeE5BQMLrzIC3JYV/xlGOv+s+hTleI9AZKUQNw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/bonjour": "^3.5.9", "@types/bonjour": "^3.5.9",
@ -16823,6 +16975,16 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/yn": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6"
}
},
"node_modules/yocto-queue": { "node_modules/yocto-queue": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",

View File

@ -94,7 +94,6 @@
"pg": "^8.9.0", "pg": "^8.9.0",
"proxy-addr": "^2.0.7", "proxy-addr": "^2.0.7",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"rxjs": "^7.8.0",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"vue-facing-decorator": "^2.1.13" "vue-facing-decorator": "^2.1.13"
} }

View File

@ -1,4 +1,4 @@
import {PartialObserver, Subject, Subscription} from 'rxjs'; // import { PartialObserver, Subject, Subscription } from 'rxjs';
/** /**
* Use in components with the `@Output` directive to emit custom events * Use in components with the `@Output` directive to emit custom events
@ -51,103 +51,149 @@ import {PartialObserver, Subject, Subscription} from 'rxjs';
* @see [Observables in Angular](guide/observables-in-angular) * @see [Observables in Angular](guide/observables-in-angular)
* @publicApi * @publicApi
*/ */
export interface EventEmitter<T> extends Subject<T> { // export interface EventEmitter<T> extends Subject<T> {
/** // /**
* @internal // * @internal
*/ // */
__isAsync: boolean; // __isAsync: boolean;
/** // /**
* Creates an instance of this class that can // * Creates an instance of this class that can
* deliver events synchronously or asynchronously. // * deliver events synchronously or asynchronously.
* // *
* @param [isAsync=false] When true, deliver events asynchronously. // * @param [isAsync=false] When true, deliver events asynchronously.
* // *
*/ // */
new(isAsync?: boolean): EventEmitter<T>; // new(isAsync?: boolean): EventEmitter<T>;
/** // /**
* Emits an event containing a given value. // * Emits an event containing a given value.
* @param value The value to emit. // * @param value The value to emit.
*/ // */
emit(value?: T): void; // emit(value?: T): void;
/** // /**
* Registers handlers for events emitted by this instance. // * Registers handlers for events emitted by this instance.
* @param next When supplied, a custom handler for emitted events. // * @param next When supplied, a custom handler for emitted events.
* @param error When supplied, a custom handler for an error notification from this emitter. // * @param error When supplied, a custom handler for an error notification from this emitter.
* @param complete When supplied, a custom handler for a completion notification from this // * @param complete When supplied, a custom handler for a completion notification from this
* emitter. // * emitter.
*/ // */
subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): // subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void):
Subscription; // Subscription;
/** // /**
* Registers handlers for events emitted by this instance. // * Registers handlers for events emitted by this instance.
* @param observerOrNext When supplied, a custom handler for emitted events, or an observer // * @param observerOrNext When supplied, a custom handler for emitted events, or an observer
* object. // * object.
* @param error When supplied, a custom handler for an error notification from this emitter. // * @param error When supplied, a custom handler for an error notification from this emitter.
* @param complete When supplied, a custom handler for a completion notification from this // * @param complete When supplied, a custom handler for a completion notification from this
* emitter. // * emitter.
*/ // */
subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription; // subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
// }
// class EventEmitter_ extends Subject<any> {
// __isAsync: boolean; // tslint:disable-line
// constructor(isAsync: boolean = false) {
// super();
// this.__isAsync = isAsync;
// }
// emit(value?: any) {
// super.next(value);
// }
// override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {
// let nextFn = observerOrNext;
// let errorFn = error || (() => null);
// let completeFn = complete;
// if (observerOrNext && typeof observerOrNext === 'object') {
// const observer = observerOrNext as PartialObserver<unknown>;
// nextFn = observer.next?.bind(observer);
// errorFn = observer.error?.bind(observer);
// completeFn = observer.complete?.bind(observer);
// }
// if (this.__isAsync) {
// errorFn = _wrapInTimeout(errorFn);
// if (nextFn) {
// nextFn = _wrapInTimeout(nextFn);
// }
// if (completeFn) {
// completeFn = _wrapInTimeout(completeFn);
// }
// }
// const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});
// if (observerOrNext instanceof Subscription) {
// observerOrNext.add(sink);
// }
// return sink;
// }
// }
// function _wrapInTimeout(fn: (value: unknown) => any) {
// return (value: unknown) => {
// setTimeout(fn, undefined, value);
// };
// }
// /**
// * @publicApi
// */
// export const EventEmitter: {
// new (isAsync?: boolean): EventEmitter<any>; new<T>(isAsync?: boolean): EventEmitter<T>;
// readonly prototype: EventEmitter<any>;
// } = EventEmitter_ as any;
export interface Listener<T> {
(event: T): any;
} }
class EventEmitter_ extends Subject<any> { export interface Disposable {
__isAsync: boolean; // tslint:disable-line dispose();
constructor(isAsync: boolean = false) {
super();
this.__isAsync = isAsync;
}
emit(value?: any) {
super.next(value);
}
override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {
let nextFn = observerOrNext;
let errorFn = error || (() => null);
let completeFn = complete;
if (observerOrNext && typeof observerOrNext === 'object') {
const observer = observerOrNext as PartialObserver<unknown>;
nextFn = observer.next?.bind(observer);
errorFn = observer.error?.bind(observer);
completeFn = observer.complete?.bind(observer);
}
if (this.__isAsync) {
errorFn = _wrapInTimeout(errorFn);
if (nextFn) {
nextFn = _wrapInTimeout(nextFn);
}
if (completeFn) {
completeFn = _wrapInTimeout(completeFn);
}
}
const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});
if (observerOrNext instanceof Subscription) {
observerOrNext.add(sink);
}
return sink;
}
} }
function _wrapInTimeout(fn: (value: unknown) => any) { /** passes through events as they happen. You will not get events from before you start listening */
return (value: unknown) => { export class EventEmitter<T> {
setTimeout(fn, undefined, value); private listeners: Listener<T>[] = [];
private listenersOncer: Listener<T>[] = [];
on = (listener: Listener<T>): Disposable => {
this.listeners.push(listener);
return {
dispose: () => this.off(listener),
};
};
once = (listener: Listener<T>): void => {
this.listenersOncer.push(listener);
};
off = (listener: Listener<T>) => {
var callbackIndex = this.listeners.indexOf(listener);
if (callbackIndex > -1) this.listeners.splice(callbackIndex, 1);
};
emit = (event: T) => {
/** Update any general listeners */
this.listeners.forEach((listener) => listener(event));
/** Clear the `once` queue */
if (this.listenersOncer.length > 0) {
const toCall = this.listenersOncer;
this.listenersOncer = [];
toCall.forEach((listener) => listener(event));
}
};
pipe = (te: EventEmitter<T>): Disposable => {
return this.on((e) => te.emit(e));
}; };
} }
/**
* @publicApi
*/
export const EventEmitter: {
new (isAsync?: boolean): EventEmitter<any>; new<T>(isAsync?: boolean): EventEmitter<T>;
readonly prototype: EventEmitter<any>;
} = EventEmitter_ as any;

View File

@ -0,0 +1,14 @@
import type { Layer } from 'leaflet/src/layer/Layer';
// https://github.com/52North/helgoland-toolbox/blob/develop/libs/map/src/lib/base/map-options.ts
export interface LayerOptions {
label: string;
visible: boolean;
layer: Layer;
}
// export type LayerMap = Map<string, LayerOptions>;
export class LayerMap extends Map<string, LayerOptions> {
}

View File

@ -1,14 +1,61 @@
import { Layer } from 'leaflet'; import type { LatLngBoundsExpression } from 'leaflet/src/geo/LatLngBounds';
import type { LatLngExpression } from 'leaflet/src/geo/LatLng';
import type { Layer } from 'leaflet/src/layer/Layer';
import type { CRS } from 'leaflet/src/geo/crs/CRS';
// https://github.com/52North/helgoland-toolbox/blob/develop/libs/map/src/lib/base/map-options.ts export interface MapOptions {
preferCanvas?: boolean | undefined;
export interface LayerOptions { // Control options
label: string; attributionControl?: boolean | undefined;
visible: boolean; zoomControl?: boolean | undefined;
layer: Layer;
// Interaction options
closePopupOnClick?: boolean | undefined;
zoomSnap?: number | undefined;
zoomDelta?: number | undefined;
trackResize?: boolean | undefined;
boxZoom?: boolean | undefined;
// doubleClickZoom?: Zoom | undefined;
dragging?: boolean | undefined;
// Map state options
crs?: CRS | undefined;
center?: LatLngExpression | undefined;
zoom?: number | undefined;
minZoom?: number | undefined;
maxZoom?: number | undefined;
layers?: Layer[] | undefined;
maxBounds?: LatLngBoundsExpression | undefined;
// renderer?: Renderer | undefined;
// Animation options
fadeAnimation?: boolean | undefined;
markerZoomAnimation?: boolean | undefined;
transform3DLimit?: number | undefined;
zoomAnimation?: boolean | undefined;
zoomAnimationThreshold?: number | undefined;
// Panning inertia options
inertia?: boolean | undefined;
inertiaDeceleration?: number | undefined;
inertiaMaxSpeed?: number | undefined;
easeLinearity?: number | undefined;
worldCopyJump?: boolean | undefined;
maxBoundsViscosity?: number | undefined;
// Keyboard navigation options
keyboard?: boolean | undefined;
keyboardPanDelta?: number | undefined;
// Mousewheel options
// scrollWheelZoom?: Zoom | undefined;
wheelDebounceTime?: number | undefined;
wheelPxPerZoomLevel?: number | undefined;
// Touch interaction options
tap?: boolean | undefined;
tapTolerance?: number | undefined;
// touchZoom?: Zoom | undefined;
bounceAtZoomLimits?: boolean | undefined;
} }
// export type LayerMap = Map<string, LayerOptions>;
export class LayerMap extends Map<string, LayerOptions> {
}

View File

@ -0,0 +1,71 @@
<template>
<div class="gba-control-draw btn-group-vertical map-control">
<!-- <button type="button" class="button is-light is-small" (click)="locateUser()" [ngClass]="isToggled ? 'is-primary': 'is-active'">
<fa-icon [icon]="faSearchLocation"></fa-icon>
</button> -->
<!-- -->
<button
ref="inputDraw"
class="inline-flex cursor-pointer justify-center items-center whitespace-nowrap focus:outline-none transition-colors duration-150 border rounded ring-blue-700 text-black border-teal-50 hover:bg-gray-200 text-sm p-1"
type="button"
:class="[isToggled ? 'cursor-not-allowed bg-gray-200' : 'bg-teal-50 is-active']"
@click.prevent="draw"
>
<BaseIcon v-if="mdiDrawPen" :path="mdiDrawPen" />
</button>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-facing-decorator';
import BaseIcon from '@/Components/BaseIcon.vue';
import { mdiDrawPen } from '@mdi/js';
@Component({
name: 'zoom-control',
components: {
BaseIcon,
},
})
export default class DrawControlComponent extends Vue {
mdiDrawPen = mdiDrawPen;
/**
* Connect map id.
*/
@Prop() public mapId: string;
public isToggled = false;
// @Ref('inputDraw') private _inputDraw: HTMLElement;
public draw() {
this.isToggled = !this.isToggled;
}
}
</script>
<style lang="css">
.gba-control-draw {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
border-radius: 4px;
position: absolute;
left: 10px;
top: 100px;
z-index: 500;
}
.btn-group-vertical button {
display: block;
margin-left: 0;
margin-top: 0.5em;
}
</style>

View File

@ -3,6 +3,7 @@
<!-- <Map className="h-36" :center="state.center" :zoom="state.zoom"> // map component content </Map> --> <!-- <Map className="h-36" :center="state.center" :zoom="state.zoom"> // map component content </Map> -->
<div :id="mapId" class="map-container mapDesktop rounded"> <div :id="mapId" class="map-container mapDesktop rounded">
<ZoomControlComponent :mapId="mapId"></ZoomControlComponent> <ZoomControlComponent :mapId="mapId"></ZoomControlComponent>
<DrawControlComponent :mapId="mapId"></DrawControlComponent>
</div> </div>
</div> </div>
</template> </template>
@ -11,10 +12,21 @@
import { EventEmitter } from './EventEmitter'; import { EventEmitter } from './EventEmitter';
import { Component, Vue, Prop } from 'vue-facing-decorator'; import { Component, Vue, Prop } from 'vue-facing-decorator';
// import type { Coverage } from '@/Dataset'; // import type { Coverage } from '@/Dataset';
import { Map, Control, MapOptions, LatLngBoundsExpression, tileLayer, latLng, latLngBounds, FeatureGroup } from 'leaflet'; // import { Map, Control, MapOptions, LatLngBoundsExpression, tileLayer, latLng, latLngBounds, FeatureGroup } from 'leaflet';
import { LayerOptions, LayerMap } from './MapOptions'; import { Map } from 'leaflet/src/map/index';
import { MapService } from '@/Stores/map'; import { Control } from 'leaflet/src/control/Control';
import { LatLngBoundsExpression, toLatLngBounds } from 'leaflet/src/geo/LatLngBounds';
import { toLatLng } from 'leaflet/src/geo/LatLng';
import { tileLayerWMS } from 'leaflet/src/layer/tile/TileLayer.WMS';
import { Attribution } from 'leaflet/src/control/Control.Attribution';
// import { Attribution } from 'leaflet';
// import { FeatureGroup } from 'leaflet/src/layer/FeatureGroup';
import { MapOptions } from './MapOptions';
import { LayerOptions, LayerMap } from './LayerOptions';
import { MapService } from '@/Stores/map.service';
import ZoomControlComponent from './zoom.component.vue'; import ZoomControlComponent from './zoom.component.vue';
import DrawControlComponent from './draw.component.vue';
const DEFAULT_BASE_LAYER_NAME = 'BaseLayer'; const DEFAULT_BASE_LAYER_NAME = 'BaseLayer';
// const DEFAULT_BASE_LAYER_URL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; // const DEFAULT_BASE_LAYER_URL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
@ -24,6 +36,7 @@ const DEFAULT_BASE_LAYER_ATTRIBUTION = '&copy; <a target="_blank" href="http://o
name: 'MapComponent', name: 'MapComponent',
components: { components: {
ZoomControlComponent, ZoomControlComponent,
DrawControlComponent
}, },
}) })
export default class MapComponent extends Vue { export default class MapComponent extends Vue {
@ -64,7 +77,7 @@ export default class MapComponent extends Vue {
public onMapInitializedEvent: EventEmitter<string> = new EventEmitter<string>(); public onMapInitializedEvent: EventEmitter<string> = new EventEmitter<string>();
protected map!: Map; protected map!: Map;
protected drawnItems!: FeatureGroup<any>; // protected drawnItems!: FeatureGroup<any>;
// @Prop({ type: Object }) // @Prop({ type: Object })
// geolocation: Coverage; // geolocation: Coverage;
@ -91,14 +104,17 @@ export default class MapComponent extends Vue {
// if (this.fitBounds) { // if (this.fitBounds) {
// this.map.fitBounds(this.fitBounds); // this.map.fitBounds(this.fitBounds);
// } // }
const southWest = latLng(46.5, 9.9); const southWest = toLatLng(46.5, 9.9);
const northEast = latLng(48.9, 16.9); const northEast = toLatLng(48.9, 16.9);
const bounds = latLngBounds(southWest, northEast); const bounds = toLatLngBounds(southWest, northEast);
map.fitBounds(bounds); map.fitBounds(bounds);
const attributionControl = new Attribution().addTo(this.map);
attributionControl.setPrefix(false);
// Initialise the FeatureGroup to store editable layers // Initialise the FeatureGroup to store editable layers
let drawnItems = (this.drawnItems = new FeatureGroup()); // let drawnItems = (this.drawnItems = new FeatureGroup());
map.addLayer(drawnItems); // map.addLayer(drawnItems);
} }
private addBaseMap(layerOptions?: LayerOptions): void { private addBaseMap(layerOptions?: LayerOptions): void {
@ -108,7 +124,7 @@ export default class MapComponent extends Vue {
// subdomains: ['maps', 'maps1', 'maps2', 'maps3', 'maps4'], // subdomains: ['maps', 'maps1', 'maps2', 'maps3', 'maps4'],
// attribution: 'Datenquelle: <a href="http://www.basemap.at/">basemap.at</a>', // attribution: 'Datenquelle: <a href="http://www.basemap.at/">basemap.at</a>',
// }); // });
let osmGgray = tileLayer.wms('https://ows.terrestris.de/osm-gray/service', { let osmGgray = tileLayerWMS('https://ows.terrestris.de/osm-gray/service', {
format: 'image/png', format: 'image/png',
attribution: DEFAULT_BASE_LAYER_ATTRIBUTION, attribution: DEFAULT_BASE_LAYER_ATTRIBUTION,
layers: 'OSM-WMS', layers: 'OSM-WMS',
@ -118,7 +134,6 @@ export default class MapComponent extends Vue {
visible: true, visible: true,
layer: osmGgray, layer: osmGgray,
}; };
this.map.attributionControl.setPrefix(false);
layerOptions.layer.addTo(this.map); layerOptions.layer.addTo(this.map);
} }
} }

View File

@ -1,9 +1,5 @@
<template> <template>
<div class="gba-control-zoom btn-group-vertical"> <div class="gba-control-zoom btn-group-vertical">
<!-- <button ref="inputPlus" type="button" class="button is-light is-small" :click.prevent="zoomIn">
<fa-icon [icon]="faPlus"></fa-icon>
</button> -->
<!-- <BaseButton ref="inputPlus" :icon="mdiPlus" color="white" rounded small @click.prevent="zoomIn" /> -->
<button <button
ref="inputPlus" ref="inputPlus"
class="inline-flex cursor-pointer justify-center items-center whitespace-nowrap focus:outline-none transition-colors duration-150 border rounded ring-blue-700 bg-teal-50 text-black border-teal-50 hover:bg-gray-200 text-sm p-1" class="inline-flex cursor-pointer justify-center items-center whitespace-nowrap focus:outline-none transition-colors duration-150 border rounded ring-blue-700 bg-teal-50 text-black border-teal-50 hover:bg-gray-200 text-sm p-1"
@ -26,7 +22,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop, Ref } from 'vue-facing-decorator'; import { Component, Vue, Prop, Ref } from 'vue-facing-decorator';
import { MapService } from '@/Stores/map'; import { MapService } from '@/Stores/map.service';
import BaseIcon from '@/Components/BaseIcon.vue'; import BaseIcon from '@/Components/BaseIcon.vue';
import { mdiPlus, mdiMinus } from '@mdi/js'; import { mdiPlus, mdiMinus } from '@mdi/js';
@ -34,7 +30,7 @@ import { mdiPlus, mdiMinus } from '@mdi/js';
@Component({ @Component({
name: 'zoom-control', name: 'zoom-control',
components: { components: {
BaseIcon BaseIcon,
}, },
}) })
export default class ZoomControlComponent extends Vue { export default class ZoomControlComponent extends Vue {
@ -50,6 +46,16 @@ export default class ZoomControlComponent extends Vue {
@Ref('inputMinus') private _inpuMinus: HTMLElement; @Ref('inputMinus') private _inpuMinus: HTMLElement;
mapService = MapService(); mapService = MapService();
map;
// mounted() {
// let map = (this.map = this.mapService.getMap(this.mapId));
// map.on('zoomend zoomlevelschange', this.updateDisabled, this);
// }
// unmounted() {
// this.map.off('zoomend zoomlevelschange');
// }
public zoomIn() { public zoomIn() {
let map = this.mapService.getMap(this.mapId); let map = this.mapService.getMap(this.mapId);

View File

@ -34,7 +34,7 @@ import UserAvatarCurrentUser from '@/Components/UserAvatarCurrentUser.vue';
import BaseIcon from '@/Components/BaseIcon.vue'; import BaseIcon from '@/Components/BaseIcon.vue';
import NavBarSearch from '@/Components/NavBarSearch.vue'; import NavBarSearch from '@/Components/NavBarSearch.vue';
import { stardust } from '@eidellev/adonis-stardust/client'; import { stardust } from '@eidellev/adonis-stardust/client';
import IUser from "App/Models/User"; import type User from "App/Models/User";
// const mainStore = MainService(); // const mainStore = MainService();
// const userName = computed(() =>mainStore.userName); // const userName = computed(() =>mainStore.userName);
@ -50,8 +50,8 @@ const styleService = StyleService();
// }); // });
// const userName = computed(() => usePage().props.user.login) // const userName = computed(() => usePage().props.user.login)
const user: ComputedRef<IUser>= computed(() => { const user: ComputedRef<User>= computed(() => {
return usePage().props.authUser as IUser; return usePage().props.authUser as User;
}); });
// const userName = computed(() => props.user.login) // const userName = computed(() => props.user.login)

View File

@ -38,7 +38,7 @@ export const EmitterDirective: Directive<any> = {
if (vnode.ctx) { if (vnode.ctx) {
// @ts-ignore // @ts-ignore
emitter = vnode.ctx.data[binding.arg]; emitter = vnode.ctx.data[binding.arg];
emitter.subscribe(handler); emitter.on(handler);
} }
// for (const key in binding.value) { // for (const key in binding.value) {
@ -48,8 +48,9 @@ export const EmitterDirective: Directive<any> = {
// } // }
// } // }
}, },
unmounted() { unmounted(binding) {
emitter.unsubscribe(); const handler = binding.value;
emitter.off(handler);
}, },
// getSSRProps(binding) { // getSSRProps(binding) {
// /* c8 ignore next */ // /* c8 ignore next */

View File

@ -121,7 +121,7 @@ const onCancel = (id) => {
</div> </div>
</form> --> </form> -->
</CardBox> </CardBox>
<CardBox class="mb-6" has-table> <CardBox class="mb-6" has-form-data>
<table> <table>
<thead> <thead>
<tr> <tr>

View File

@ -54,7 +54,7 @@ export default {
<script lang ="ts"> <script lang ="ts">
import { Component, Vue, Prop } from 'vue-facing-decorator'; import { Component, Vue, Prop } from 'vue-facing-decorator';
import IUser from "App/Models/User"; import type User from "App/Models/User";
import { Link } from '@inertiajs/vue3'; import { Link } from '@inertiajs/vue3';
import DefaultLayout from '@/Layouts/Default.vue'; import DefaultLayout from '@/Layouts/Default.vue';
import { NInput, NButton } from 'naive-ui'; import { NInput, NButton } from 'naive-ui';
@ -82,6 +82,6 @@ export default class AppComponent extends Vue {
type: Array, type: Array,
default: () => ([]), default: () => ([]),
}) })
users: Array<IUser>; users: Array<User>;
} }
</script> </script>

View File

@ -37,8 +37,9 @@ import TablePersons from '@/Components/TablePersons.vue';
import { MainService } from '@/Stores/main'; import { MainService } from '@/Stores/main';
import { notify } from '@/notiwind'; import { notify } from '@/notiwind';
import LocationMap from '@/Components/Map/map.component.vue'; import LocationMap from '@/Components/Map/map.component.vue';
import { MapOptions, LatLngBoundsExpression } from 'leaflet'; import { MapOptions } from '@/Components/Map/MapOptions';
import { LayerOptions } from '@/Components/Map/MapOptions'; import { LatLngBoundsExpression } from 'leaflet/src/geo/LatLngBounds';
import { LayerOptions } from '@/Components/Map/LayerOptions';
const props = defineProps({ const props = defineProps({
licenses: { licenses: {
@ -169,6 +170,7 @@ const mapOptions: MapOptions = {
center: [48.208174, 16.373819], center: [48.208174, 16.373819],
zoom: 3, zoom: 3,
zoomControl: false, zoomControl: false,
attributionControl: false
}; };
const baseMaps: Map<string, LayerOptions> = new Map<string, LayerOptions>(); const baseMaps: Map<string, LayerOptions> = new Map<string, LayerOptions>();
const fitBounds: LatLngBoundsExpression = [ const fitBounds: LatLngBoundsExpression = [

View File

@ -24,7 +24,7 @@ export const MapService = defineStore('map', {
} }
}, },
getMap(id: string): L.Map { getMap(id: string) {
return this.mapService.get(id); return this.mapService.get(id);
}, },

View File

@ -0,0 +1,37 @@
import { defineStore } from 'pinia';
// import axios from 'axios';
// import dayjs from 'dayjs';
export const TimeService = defineStore('map', {
state: () => ({
// dataset: {} as Dataset,
mapService: new Map<string, any>(),
}),
actions: {
getMap(id: string) {
return this.mapService.get(id);
},
setMap(id: string, map) {
this.mapService.set(id, map);
},
hasMap(id: string): boolean {
return this.mapService.has(id);
},
deleteMap(id: string): boolean {
return this.mapService.delete(id);
},
// getDuration(timespan: Timespan): dayjs. {
// const from = dayjs(timespan.from);
// const to = dayjs(timespan.to);
// return dayjs.duration(to.diff(from));
// },
},
});

View File

@ -11,7 +11,7 @@ import { LayoutService } from '@/Stores/layout';
import { MainService } from '@/Stores/main'; import { MainService } from '@/Stores/main';
import { darkModeKey, styleKey } from '@/config'; import { darkModeKey, styleKey } from '@/config';
const pinia = createPinia(); const pinia = createPinia();
import { EmitterPlugin } from '@/test'; import { EmitterPlugin } from '@/EmitterDirective';
import { initRoutes } from '@eidellev/adonis-stardust/client'; import { initRoutes } from '@eidellev/adonis-stardust/client';
initRoutes(); initRoutes();

View File

@ -90,22 +90,22 @@ Route.group(() => {
return inertia.render('Admin/Settings'); return inertia.render('Admin/Settings');
}).as('settings'); }).as('settings');
Route.get('/user', 'UsersController.index').as('user.index'); Route.get('/user', 'UsersController.index').as('user.index').middleware(['can:user-list']);
Route.get('/user/create', 'UsersController.create').as('user.create'); Route.get('/user/create', 'UsersController.create').as('user.create').middleware(['can:user-create']);
Route.post('/user/store', 'UsersController.store').as('user.store'); Route.post('/user/store', 'UsersController.store').as('user.store').middleware(['can:user-create']);
Route.get('/user/:id', 'UsersController.show').as('user.show').where('id', Route.matchers.number()); Route.get('/user/:id', 'UsersController.show').as('user.show').where('id', Route.matchers.number());
Route.get('/user/:id/edit', 'UsersController.edit').as('user.edit').where('id', Route.matchers.number()); Route.get('/user/:id/edit', 'UsersController.edit').as('user.edit').where('id', Route.matchers.number()).middleware(['can:user-edit']);
Route.put('/user/:id/update', 'UsersController.update').as('user.update').where('id', Route.matchers.number()); Route.put('/user/:id/update', 'UsersController.update').as('user.update').where('id', Route.matchers.number()).middleware(['can:user-edit']);
Route.delete('/user/:id', 'UsersController.destroy').as('user.destroy').where('id', Route.matchers.number()); Route.delete('/user/:id', 'UsersController.destroy').as('user.destroy').where('id', Route.matchers.number()).middleware(['can:user-delete']);
// Route.resource('user', 'UsersController'); // Route.resource('user', 'UsersController');
Route.get('/role', 'RoleController.index').as('role.index'); Route.get('/role', 'RoleController.index').as('role.index').middleware(['can:user-list']);
Route.get('/role/create', 'RoleController.create').as('role.create'); Route.get('/role/create', 'RoleController.create').as('role.create').middleware(['can:user-create']);
Route.post('/role/store', 'RoleController.store').as('role.store'); Route.post('/role/store', 'RoleController.store').as('role.store').middleware(['can:user-create']);
Route.get('/role/:id', 'RoleController.show').as('role.show').where('id', Route.matchers.number()); Route.get('/role/:id', 'RoleController.show').as('role.show').where('id', Route.matchers.number());
Route.get('/role/:id/edit', 'RoleController.edit').as('role.edit').where('id', Route.matchers.number()); Route.get('/role/:id/edit', 'RoleController.edit').as('role.edit').where('id', Route.matchers.number()).middleware(['can:user-edit']);
Route.put('/role/:id/update', 'RoleController.update').as('role.update').where('id', Route.matchers.number()); Route.put('/role/:id/update', 'RoleController.update').as('role.update').where('id', Route.matchers.number()).middleware(['can:user-edit']);
Route.delete('/role/:id', 'RoleController.destroy').as('role.destroy').where('id', Route.matchers.number()); Route.delete('/role/:id', 'RoleController.destroy').as('role.destroy').where('id', Route.matchers.number()).middleware(['can:user-delete']);
}) })
.namespace('App/Controllers/Http/Admin') .namespace('App/Controllers/Http/Admin')
.prefix('admin') .prefix('admin')

View File

@ -1,18 +1,22 @@
{ {
// tsconfig.vue.json // tsconfig.vue.json
"extends": "@vue/tsconfig/tsconfig.web.json", "extends": "@vue/tsconfig/tsconfig.web.json",
"include": [ "include": ["./resources/js/**/*"],
"./resources/js/**/*"
],
"compilerOptions": { "compilerOptions": {
// "module": "commonjs", //for tehys.api...alos nodenext
// Process & infer types from .js files.
"allowJs": true, "allowJs": true,
// Target latest version 'esnext' of ECMAScript or minimal 'es6'.
"target": "ESNext", //neu
// //what module code is generated
"module": "ESNext", //neu
"experimentalDecorators": true, //neu
"strictPropertyInitialization": false //neu
},
"paths": { "paths": {
"App/*": ["./app/*"], // for App/modles/User
"@/*": ["./resources/js/*"] "@/*": ["./resources/js/*"]
}, },
"experimentalDecorators": true,//neu "files": ["./index.d.ts"]
"strictPropertyInitialization": false, //neu }
},
"files": [
"./index.d.ts",
]
}

View File

@ -298,6 +298,7 @@ Encore.addLoader(babelLoader)
// }) // })
.addAliases({ .addAliases({
'@': join(__dirname, 'resources/js'), '@': join(__dirname, 'resources/js'),
vue$: 'vue/dist/vue.runtime.esm-bundler.js'
}) })
.configureDefinePlugin((options) => { .configureDefinePlugin((options) => {
options['__VUE_OPTIONS_API__'] = true; options['__VUE_OPTIONS_API__'] = true;
@ -315,6 +316,42 @@ Encore.addLoader(babelLoader)
// uncomment if you use TypeScript // uncomment if you use TypeScript
// Encore.enableTypeScriptLoader() // Encore.enableTypeScriptLoader()
// Encore.addLoader(babelLoader) // Encore.addLoader(babelLoader)
// Encore.configureTerserPlugin((options) => {
// options.extractComments = false;
// options.parallel = true;
// options.terserOptions = {
// compress: {
// arrows: false,
// collapse_vars: false,
// comparisons: false,
// computed_props: false,
// hoist_funs: false,
// hoist_props: false,
// hoist_vars: false,
// inline: false,
// loops: false,
// negate_iife: false,
// properties: false,
// reduce_funcs: false,
// reduce_vars: false,
// switches: false,
// toplevel: false,
// typeofs: false,
// booleans: true,
// if_return: true,
// sequences: true,
// unused: true,
// conditionals: true,
// dead_code: true,
// evaluate: true,
// },
// mangle: {
// safari10: true,
// },
// };
// });
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Configure logging | Configure logging
@ -353,40 +390,7 @@ config.resolve.extensions = [ '.tsx', '.ts', '.mjs', '.js', '.jsx', '.vue', '.js
// } // }
// } // }
Encore.configureTerserPlugin((options) => {
options.extractComments = false;
options.parallel = true;
options.terserOptions = {
compress: {
arrows: false,
collapse_vars: false,
comparisons: false,
computed_props: false,
hoist_funs: false,
hoist_props: false,
hoist_vars: false,
inline: false,
loops: false,
negate_iife: false,
properties: false,
reduce_funcs: false,
reduce_vars: false,
switches: false,
toplevel: false,
typeofs: false,
booleans: true,
if_return: true,
sequences: true,
unused: true,
conditionals: true,
dead_code: true,
evaluate: true,
},
mangle: {
safari10: true,
},
};
});
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------