From d87b60d90dba6f79b0795fea7520415ce5613bda Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 09:27:02 -0700 Subject: [PATCH 1/8] Update Deps --- api/web/package-lock.json | 320 +++++++++--------- .../CloudTAK/Menu/Mission/MissionLayers.vue | 144 +++----- .../CloudTAK/Menu/Overlays/TreeMission.vue | 135 +------- api/web/src/stores/base/mission.ts | 20 +- api/web/src/types.ts | 9 +- 5 files changed, 260 insertions(+), 368 deletions(-) diff --git a/api/web/package-lock.json b/api/web/package-lock.json index aedcb62f6..8df09072c 100644 --- a/api/web/package-lock.json +++ b/api/web/package-lock.json @@ -2152,9 +2152,9 @@ "license": "MIT" }, "node_modules/@eslint/js": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", - "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "license": "MIT", "engines": { @@ -2902,21 +2902,21 @@ } }, "node_modules/@redocly/config": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.16.0.tgz", - "integrity": "sha512-t9jnODbUcuANRSl/K4L9nb12V+U5acIHnVSl26NWrtSdDZVtoqUXk2yGFPZzohYf62cCfEQUT8ouJ3bhPfpnJg==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.17.1.tgz", + "integrity": "sha512-CEmvaJuG7pm2ylQg53emPmtgm4nW2nxBgwXzbVEHpGas/lGnMyN8Zlkgiz6rPw0unASg6VW3wlz27SOL5XFHYQ==", "dev": true, "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.25.14", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.25.14.tgz", - "integrity": "sha512-B9ewI0KVC1yqyeoQzErVnV4kdnxaYfwRMctxk/YwJxZZc/nVZ3VOVE+r2kXIFaGbUgc4ZHFn+aE2qvzCRXTXHw==", + "version": "1.25.15", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.25.15.tgz", + "integrity": "sha512-/dpr5zpGj2t1Bf7EIXEboRZm1hsJZBQfv3Q1pkivtdAEg3if2khv+b9gY68aquC6cM/2aQY2kMLy8LlY2tn+Og==", "dev": true, "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.16.0", + "@redocly/config": "^0.17.0", "colorette": "^1.2.0", "https-proxy-agent": "^7.0.4", "js-levenshtein": "^1.1.6", @@ -3040,9 +3040,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", - "integrity": "sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz", + "integrity": "sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==", "cpu": [ "arm" ], @@ -3054,9 +3054,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz", - "integrity": "sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz", + "integrity": "sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==", "cpu": [ "arm64" ], @@ -3068,9 +3068,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz", - "integrity": "sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz", + "integrity": "sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==", "cpu": [ "arm64" ], @@ -3082,9 +3082,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz", - "integrity": "sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz", + "integrity": "sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==", "cpu": [ "x64" ], @@ -3096,9 +3096,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz", - "integrity": "sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz", + "integrity": "sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==", "cpu": [ "arm64" ], @@ -3110,9 +3110,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz", - "integrity": "sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz", + "integrity": "sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==", "cpu": [ "x64" ], @@ -3124,9 +3124,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz", - "integrity": "sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz", + "integrity": "sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==", "cpu": [ "arm" ], @@ -3138,9 +3138,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz", - "integrity": "sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz", + "integrity": "sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==", "cpu": [ "arm" ], @@ -3152,9 +3152,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz", - "integrity": "sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz", + "integrity": "sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==", "cpu": [ "arm64" ], @@ -3166,9 +3166,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz", - "integrity": "sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz", + "integrity": "sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==", "cpu": [ "arm64" ], @@ -3180,9 +3180,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz", - "integrity": "sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz", + "integrity": "sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==", "cpu": [ "ppc64" ], @@ -3194,9 +3194,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz", - "integrity": "sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz", + "integrity": "sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==", "cpu": [ "riscv64" ], @@ -3208,9 +3208,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz", - "integrity": "sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz", + "integrity": "sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==", "cpu": [ "s390x" ], @@ -3222,9 +3222,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz", - "integrity": "sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz", + "integrity": "sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==", "cpu": [ "x64" ], @@ -3236,9 +3236,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz", - "integrity": "sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz", + "integrity": "sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==", "cpu": [ "x64" ], @@ -3250,9 +3250,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz", - "integrity": "sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz", + "integrity": "sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==", "cpu": [ "arm64" ], @@ -3264,9 +3264,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz", - "integrity": "sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz", + "integrity": "sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==", "cpu": [ "ia32" ], @@ -3278,9 +3278,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz", - "integrity": "sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz", + "integrity": "sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==", "cpu": [ "x64" ], @@ -3417,9 +3417,9 @@ } }, "node_modules/@tabler/icons": { - "version": "3.22.0", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.22.0.tgz", - "integrity": "sha512-IfgGzhFph5OBr2wTieWL/hyAs0FThnq9O155a6kfGYxqx7h5LQw91wnRswhEaGhXCcfmR7ZVDUr9H+x4b9Pb8g==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.23.0.tgz", + "integrity": "sha512-Cz+X58jfRm0g/KcupXXuPw5knj671lNR054AnmLXvCjudiQBWI0wZulDDSsqDoGezvBzMTNPQtNcjLkZs82ZxQ==", "license": "MIT", "funding": { "type": "github", @@ -3427,12 +3427,12 @@ } }, "node_modules/@tabler/icons-vue": { - "version": "3.22.0", - "resolved": "https://registry.npmjs.org/@tabler/icons-vue/-/icons-vue-3.22.0.tgz", - "integrity": "sha512-cgjvq+kjfqu7aJCAUmZByf+enUeLhSI7gVyWzBMCKNCehPoUHBmWNqM5zdnVJw/X2ogdvYL/H5arrSvKktH70Q==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@tabler/icons-vue/-/icons-vue-3.23.0.tgz", + "integrity": "sha512-py3ZSu80dIIEoSjGqv/4i+OppiMloz0kgBGSH4Px2Me16nS/kgvXxQSwiW6w3eZZM6hoDauxucioxU8tVItvjA==", "license": "MIT", "dependencies": { - "@tabler/icons": "3.22.0" + "@tabler/icons": "3.23.0" }, "funding": { "type": "github", @@ -5255,9 +5255,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001684", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", - "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", + "version": "1.0.30001685", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001685.tgz", + "integrity": "sha512-e/kJN1EMyHQzgcMEEgoo+YTCO1NGCmIYHk5Qk8jT6AazWemS5QFKJ5ShCJlH3GZrNIdZofcNCEwZqbMjjKzmnA==", "dev": true, "funding": [ { @@ -5755,9 +5755,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.66", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.66.tgz", - "integrity": "sha512-pI2QF6+i+zjPbqRzJwkMvtvkdI7MjVbSh2g8dlMguDJIXEPw+kwasS1Jl+YGPEBfGVxsVgGUratAKymPdPo2vQ==", + "version": "1.5.67", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.67.tgz", + "integrity": "sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==", "dev": true, "license": "ISC" }, @@ -5991,9 +5991,9 @@ } }, "node_modules/eslint": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", - "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", "dev": true, "license": "MIT", "dependencies": { @@ -6002,7 +6002,7 @@ "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.9.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.15.0", + "@eslint/js": "9.16.0", "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -6051,9 +6051,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.31.0.tgz", - "integrity": "sha512-aYMUCgivhz1o4tLkRHj5oq9YgYPM4/EJc0M7TAKRLCUA5OYxRLAhYEVD2nLtTwLyixEFI+/QXSvKU9ESZFgqjQ==", + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.32.0.tgz", + "integrity": "sha512-b/Y05HYmnB/32wqVcjxjHZzNpwxj1onBOvqW89W+V+XNG1dRuaFbNd3vT9CLbr2LXjEoq+3vn8DanWf7XU22Ug==", "dev": true, "license": "MIT", "dependencies": { @@ -6832,12 +6832,15 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.1.0.tgz", + "integrity": "sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==", "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.3" + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6889,10 +6892,13 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", + "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, "engines": { "node": ">= 0.4" }, @@ -7156,13 +7162,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.0.tgz", + "integrity": "sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7344,12 +7350,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.0.tgz", + "integrity": "sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7369,13 +7376,15 @@ } }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz", + "integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "gopd": "^1.1.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -7435,12 +7444,13 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.0.tgz", + "integrity": "sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7670,9 +7680,9 @@ } }, "node_modules/jsonata": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.0.5.tgz", - "integrity": "sha512-wEse9+QLIIU5IaCgtJCPsFi/H4F3qcikWzF4bAELZiRz08ohfx3Q6CjDRf4ZPF5P/92RI3KIHtb7u3jqPaHXdQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.0.6.tgz", + "integrity": "sha512-WhQB5tXQ32qjkx2GYHFw2XbL90u+LLzjofAYwi+86g6SyZeXHz9F1Q0amy3dWRYczshOC3Haok9J4pOCgHtwyQ==", "license": "MIT", "engines": { "node": ">= 8" @@ -8241,9 +8251,9 @@ } }, "node_modules/openapi-typescript": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.4.3.tgz", - "integrity": "sha512-xTIjMIIOv9kNhsr8JxaC00ucbIY/6ZwuJPJBZMSh5FA2dicZN5uM805DWVJojXdom8YI4AQTavPDPHMx/3g0vQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.4.4.tgz", + "integrity": "sha512-7j3nktnRzlQdlHnHsrcr6Gqz8f80/RhfA2I8s1clPI+jkY0hLNmnYVKBfuUEli5EEgK1B6M+ibdS5REasPlsUw==", "dev": true, "license": "MIT", "dependencies": { @@ -8485,9 +8495,9 @@ } }, "node_modules/pinia": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.7.tgz", - "integrity": "sha512-M+X9Eh9V5De+8wyj0rD1cgB0zy1mPN/aBEpCI9y+DgVmzXV2dIwjYBluJ5cMQd/jAoHs0VW+EyUSHMZv/Wtcnw==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.8.tgz", + "integrity": "sha512-NRTYy2g+kju5tBRe0oNlriZIbMNvma8ZJrpHsp3qudyiMEA8jMmPPKQ2QMHg0Oc4BkUyQYWagACabrwriCK9HQ==", "license": "MIT", "dependencies": { "@vue/devtools-api": "^6.6.3", @@ -8559,9 +8569,9 @@ } }, "node_modules/point-in-polygon-hao": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.2.0.tgz", - "integrity": "sha512-CZ7lsIwBeaWmsCUNY/zFiUFKdSg/X8ngMOhiTGW78iUB8frZm44TiDlLFN1xqJ0GI22hSJg2/SpzS+t/qrGvug==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.2.2.tgz", + "integrity": "sha512-pBNLuHSB/b4Zdh6XPO4KlIeYyWhalZSEQEnoTI5Pefx73TURdVleHP68HibPLjMwrjWvTG4FvWCsZrc8iqJPrA==", "license": "MIT", "dependencies": { "robust-predicates": "^3.0.2" @@ -9103,9 +9113,9 @@ "license": "Unlicense" }, "node_modules/rollup": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", - "integrity": "sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.0.tgz", + "integrity": "sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9119,24 +9129,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.27.4", - "@rollup/rollup-android-arm64": "4.27.4", - "@rollup/rollup-darwin-arm64": "4.27.4", - "@rollup/rollup-darwin-x64": "4.27.4", - "@rollup/rollup-freebsd-arm64": "4.27.4", - "@rollup/rollup-freebsd-x64": "4.27.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.27.4", - "@rollup/rollup-linux-arm-musleabihf": "4.27.4", - "@rollup/rollup-linux-arm64-gnu": "4.27.4", - "@rollup/rollup-linux-arm64-musl": "4.27.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.27.4", - "@rollup/rollup-linux-riscv64-gnu": "4.27.4", - "@rollup/rollup-linux-s390x-gnu": "4.27.4", - "@rollup/rollup-linux-x64-gnu": "4.27.4", - "@rollup/rollup-linux-x64-musl": "4.27.4", - "@rollup/rollup-win32-arm64-msvc": "4.27.4", - "@rollup/rollup-win32-ia32-msvc": "4.27.4", - "@rollup/rollup-win32-x64-msvc": "4.27.4", + "@rollup/rollup-android-arm-eabi": "4.28.0", + "@rollup/rollup-android-arm64": "4.28.0", + "@rollup/rollup-darwin-arm64": "4.28.0", + "@rollup/rollup-darwin-x64": "4.28.0", + "@rollup/rollup-freebsd-arm64": "4.28.0", + "@rollup/rollup-freebsd-x64": "4.28.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.28.0", + "@rollup/rollup-linux-arm-musleabihf": "4.28.0", + "@rollup/rollup-linux-arm64-gnu": "4.28.0", + "@rollup/rollup-linux-arm64-musl": "4.28.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.28.0", + "@rollup/rollup-linux-riscv64-gnu": "4.28.0", + "@rollup/rollup-linux-s390x-gnu": "4.28.0", + "@rollup/rollup-linux-x64-gnu": "4.28.0", + "@rollup/rollup-linux-x64-musl": "4.28.0", + "@rollup/rollup-win32-arm64-msvc": "4.28.0", + "@rollup/rollup-win32-ia32-msvc": "4.28.0", + "@rollup/rollup-win32-x64-msvc": "4.28.0", "fsevents": "~2.3.2" } }, @@ -9469,9 +9479,9 @@ "license": "MIT" }, "node_modules/sortablejs": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.5.tgz", - "integrity": "sha512-xDJLosRJzZ+nVnjaUYmO9H/wZth0lWTRq7VzV1eQyDSKsvxmoJ69HTGcwnwGYpJG/AkJ9OWiwWH4BhIycdonWw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.6.tgz", + "integrity": "sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==", "license": "MIT" }, "node_modules/source-map": { @@ -10106,9 +10116,9 @@ "license": "MIT" }, "node_modules/ts-api-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.2.tgz", - "integrity": "sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "license": "MIT", "engines": { @@ -10138,9 +10148,9 @@ } }, "node_modules/type-fest": { - "version": "4.29.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.29.0.tgz", - "integrity": "sha512-RPYt6dKyemXJe7I6oNstcH24myUGSReicxcHTvCLgzm4e0n8y05dGvcGB15/SoPRBmhlMthWQ9pvKyL81ko8nQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.29.1.tgz", + "integrity": "sha512-Y1zUveI92UYM/vo1EFlQSsNf74+hfKH+7saZJslF0Fw92FRaiTAnHPIvo9d7SLxXt/gAYqA4RXyDTioMQCCp0A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -10548,9 +10558,9 @@ } }, "node_modules/vite-plugin-pwa": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.21.0.tgz", - "integrity": "sha512-gnDE5sN2hdxA4vTl0pe6PCTPXqChk175jH8dZVVTBjFhWarZZoXaAdoTIKCIa8Zbx94sC0CnCOyERBWpxvry+g==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.21.1.tgz", + "integrity": "sha512-rkTbKFbd232WdiRJ9R3u+hZmf5SfQljX1b45NF6oLA6DSktEKpYllgTo1l2lkiZWMWV78pABJtFjNXfBef3/3Q==", "dev": true, "license": "MIT", "dependencies": { @@ -10568,7 +10578,7 @@ }, "peerDependencies": { "@vite-pwa/assets-generator": "^0.2.6", - "vite": "^3.1.0 || ^4.0.0 || ^5.0.0", + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", "workbox-build": "^7.3.0", "workbox-window": "^7.3.0" }, diff --git a/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue b/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue index a7c714f97..9b377623e 100644 --- a/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +++ b/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue @@ -6,7 +6,7 @@ > - diff --git a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue index 5ea8a6498..046aac16c 100644 --- a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +++ b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue @@ -1,126 +1,27 @@ - diff --git a/api/web/src/stores/base/mission.ts b/api/web/src/stores/base/mission.ts index a6fb55d90..e56ee491b 100644 --- a/api/web/src/stores/base/mission.ts +++ b/api/web/src/stores/base/mission.ts @@ -13,6 +13,7 @@ import type { MissionRole, MissionList, MissionLogList, + MissionLayerList, MissionSubscriptions } from '../../types.ts'; @@ -89,9 +90,7 @@ export default class Subscription { const sub = new Subscription(mission, role, logs, token); - const fc = await std('/api/marti/missions/' + encodeURIComponent(guid) + '/cot', { - headers: Subscription.headers(token) - }) as FeatureCollection; + const fc = await this.featList(guid, token); for (const feat of fc.features) { const cot = new COT(feat as Feature, { @@ -156,6 +155,12 @@ export default class Subscription { return res.data } + static async featList(guid: string, token?: string): Promise { + return await std('/api/marti/missions/' + encodeURIComponent(guid) + '/cot', { + headers: Subscription.headers(token) + }) as FeatureCollection; + } + static async logCreate(guid: string, token: string | undefined, body: object): Promise { const url = stdurl('/api/marti/missions/' + encodeURIComponent(guid) + '/log'); @@ -197,6 +202,15 @@ export default class Subscription { return list; } + static async layerList(guid: string, token?: string): Promise { + const url = stdurl(`/api/marti/missions/${guid}/layer`); + + return await std(url, { + method: 'GET', + headers: Subscription.headers(token) + }) as MissionLayerList; + } + static async layerDelete(guid: string, layeruid: string, token?: string): Promise { const url = stdurl(`/api/marti/missions/${guid}/layer/${layeruid}`); await std(url, { diff --git a/api/web/src/types.ts b/api/web/src/types.ts index faec83aca..6b2ba2891 100644 --- a/api/web/src/types.ts +++ b/api/web/src/types.ts @@ -36,11 +36,16 @@ export type VideoConnectionList = paths["/marti/video"]["get"]["responses"]["200 export type Mission = paths["/marti/missions/{:name}"]["get"]["responses"]["200"]["content"]["application/json"]; export type Mission_Create = paths["/marti/missions/{:name}"]["post"]["requestBody"]["content"]["application/json"] -export type MissionRole = paths["/marti/missions/{:name}/role"]["get"]["responses"]["200"]["content"]["application/json"]; export type MissionList = paths["/marti/mission"]["get"]["responses"]["200"]["content"]["application/json"]; + +export type MissionRole = paths["/marti/missions/{:name}/role"]["get"]["responses"]["200"]["content"]["application/json"]; + export type MissionLog = paths["/marti/missions/{:name}/log/{:logid}"]["patch"]["responses"]["200"]["content"]["application/json"]["data"]; -export type MissionLayer = paths["/marti/missions/{:name}/layer/{:layerid}"]["get"]["responses"]["200"]["content"]["application/json"]["data"]; export type MissionLogList = paths["/marti/missions/{:name}/log"]["get"]["responses"]["200"]["content"]["application/json"]; + +export type MissionLayer = paths["/marti/missions/{:name}/layer/{:layerid}"]["get"]["responses"]["200"]["content"]["application/json"]["data"]; +export type MissionLayerList = paths["/marti/missions/{:name}/layer"]["get"]["responses"]["200"]["content"]["application/json"]; + export type MissionSubscriptions = paths["/marti/missions/{:name}/subscriptions/roles"]["get"]["responses"]["200"]["content"]["application/json"]["data"]; export type Server_Update = paths["/server"]["patch"]["requestBody"]["content"]["application/json"] From 3ebd9c18b549d04d440a18c77cd5d499468171c9 Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 09:41:26 -0700 Subject: [PATCH 2/8] Update Internal Overlay Type --- .../src/components/CloudTAK/Menu/Overlays.vue | 1 - api/web/src/stores/base/overlay.ts | 57 ++++++++++++------- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/api/web/src/components/CloudTAK/Menu/Overlays.vue b/api/web/src/components/CloudTAK/Menu/Overlays.vue index b3b0792a7..4f07848d1 100644 --- a/api/web/src/components/CloudTAK/Menu/Overlays.vue +++ b/api/web/src/components/CloudTAK/Menu/Overlays.vue @@ -306,7 +306,6 @@ async function removeOverlay(id: number) { loading.value = true; for (const overlay of overlays) { if (overlay.id === id) { - // @ts-expect-error Type Error around map style await mapStore.removeOverlay(overlay); } } diff --git a/api/web/src/stores/base/overlay.ts b/api/web/src/stores/base/overlay.ts index 915380baf..565576cd5 100644 --- a/api/web/src/stores/base/overlay.ts +++ b/api/web/src/stores/base/overlay.ts @@ -8,12 +8,12 @@ import type { Map, LngLatBoundsLike, LayerSpecification, VectorTileSource, Raste import cotStyles from '../utils/styles.ts' import { std, stdurl } from '../../std.js'; import { useProfileStore } from '../profile.js'; +import { useMapStore } from '../map.js'; /** * @class */ export default class Overlay { - _map: Map; _destroyed: boolean; _internal: boolean; @@ -108,8 +108,6 @@ export default class Overlay { internal?: boolean; before?: string; } = {}) { - this._map = map; - this._destroyed = false; this._internal = opts.internal || false; this._clickable = []; @@ -138,7 +136,9 @@ export default class Overlay { } hasBounds(): boolean { - const source = this._map.getSource(String(this.id)) + const mapStore = useMapStore(); + if (!mapStore.map) return false; + const source = mapStore.map.getSource(String(this.id)) if (!source) return false; if (source.type === 'vector') { @@ -153,16 +153,18 @@ export default class Overlay { } async zoomTo(): Promise { - const source = this._map.getSource(String(this.id)) + const mapStore = useMapStore(); + if (!mapStore.map) return; + const source = mapStore.map.getSource(String(this.id)) if (!source) return; if (source.type === 'vector') { - this._map.fitBounds((source as VectorTileSource).bounds); + mapStore.map.fitBounds((source as VectorTileSource).bounds); } else if (source.type === 'raster') { - this._map.fitBounds((source as RasterTileSource).bounds); + mapStore.map.fitBounds((source as RasterTileSource).bounds); } else if (source.type === 'geojson') { const geojson = await (source as GeoJSONSource).getData(); - this._map.fitBounds(bbox(geojson) as LngLatBoundsLike); + mapStore.map.fitBounds(bbox(geojson) as LngLatBoundsLike); } } @@ -170,11 +172,14 @@ export default class Overlay { clickable?: Array<{ id: string; type: string }>; before?: string; } = {}) { + const mapStore = useMapStore(); + if (!mapStore.map) throw new Error('Map has not yet initialized'); + if (this.type ==='raster' && this.url) { const url = stdurl(this.url); url.searchParams.append('token', localStorage.token); - this._map.addSource(String(this.id), { + mapStore.map.addSource(String(this.id), { type: 'raster', url: String(url) }); @@ -182,15 +187,15 @@ export default class Overlay { const url = stdurl(this.url); url.searchParams.append('token', localStorage.token); - this._map.addSource(String(this.id), { + mapStore.map.addSource(String(this.id), { type: 'vector', url: String(url) }); } else if (this.type === 'geojson') { - if (!this._map.getSource(String(this.id))) { + if (!mapStore.map.getSource(String(this.id))) { const data: FeatureCollection = { type: 'FeatureCollection', features: [] }; - this._map.addSource(String(this.id), { + mapStore.map.addSource(String(this.id), { type: 'geojson', cluster: false, data @@ -245,9 +250,9 @@ export default class Overlay { for (const l of this.styles) { if (opts.before) { - this._map.addLayer(l, opts.before); + mapStore.map.addLayer(l, opts.before); } else { - this._map.addLayer(l) + mapStore.map.addLayer(l) } } @@ -262,11 +267,13 @@ export default class Overlay { } for (const click of opts.clickable) { - this._map.on('mouseenter', click.id, () => { - this._map.getCanvas().style.cursor = 'pointer'; + mapStore.map.on('mouseenter', click.id, () => { + if (!mapStore.map) throw new Error('Map has not yet initialized'); + mapStore.map.getCanvas().style.cursor = 'pointer'; }) - this._map.on('mouseleave', click.id, () => { - this._map.getCanvas().style.cursor = ''; + mapStore.map.on('mouseleave', click.id, () => { + if (!mapStore.map) throw new Error('Map has not yet initialized'); + mapStore.map.getCanvas().style.cursor = ''; }) } @@ -275,11 +282,14 @@ export default class Overlay { } remove() { + const mapStore = useMapStore(); + if (!mapStore.map) throw new Error('Map has not yet initialized'); + for (const l of this.styles) { - this._map.removeLayer(String(l.id)); + mapStore.map.removeLayer(String(l.id)); } - this._map.removeSource(String(this.id)); + mapStore.map.removeSource(String(this.id)); } async replace(body: { @@ -321,11 +331,14 @@ export default class Overlay { visible?: boolean; opacity?: number; }): Promise { + const mapStore = useMapStore(); + if (!mapStore.map) throw new Error('Map has not yet initialized'); + if (body.opacity !== undefined) { this.opacity = body.opacity; for (const l of this.styles) { if (this.type === 'raster') { - this._map.setPaintProperty(l.id, 'raster-opacity', Number(this.opacity)) + mapStore.map.setPaintProperty(l.id, 'raster-opacity', Number(this.opacity)) } } } @@ -333,7 +346,7 @@ export default class Overlay { if (body.visible !== undefined) { this.visible = body.visible; for (const l of this.styles) { - this._map.setLayoutProperty(l.id, 'visibility', this.visible ? 'visible' : 'none'); + mapStore.map.setLayoutProperty(l.id, 'visibility', this.visible ? 'visible' : 'none'); } } From eaf0d8d702e7bc4b828f65e91ec3e271c69c8480 Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 10:21:46 -0700 Subject: [PATCH 3/8] Use computed feats --- api/lib/api/mission-layer.ts | 1 + api/package-lock.json | 270 ++++++++++-------- .../CloudTAK/Menu/Mission/MissionLayers.vue | 8 +- .../CloudTAK/Menu/Overlays/TreeMission.vue | 18 +- 4 files changed, 168 insertions(+), 129 deletions(-) diff --git a/api/lib/api/mission-layer.ts b/api/lib/api/mission-layer.ts index 5cf2d6586..4e7f12c53 100644 --- a/api/lib/api/mission-layer.ts +++ b/api/lib/api/mission-layer.ts @@ -126,6 +126,7 @@ export default class { opts?: Static ): Promise>> { let res; + if (this.#isGUID(name)) { const url = new URL(`/Marti/api/missions/guid/${this.#encodeName(name)}/layers`, this.api.url); diff --git a/api/package-lock.json b/api/package-lock.json index c51f221bf..79fa9c60a 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -473,9 +473,9 @@ } }, "node_modules/@aws-sdk/client-cloudwatch-logs": { - "version": "3.699.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.699.0.tgz", - "integrity": "sha512-syTln/btJb5kkeuvXXXkQC2pSaNS7jxUVvzgxqXTmEDtVysDJYxV/uMoABYo5ycXYtlsCeqFLI/ALcUl6PRxfA==", + "version": "3.703.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.703.0.tgz", + "integrity": "sha512-KkLMwrNhkLZr3OCRWakJY16OF8pUZCoexxZkWzHfR/Pw3WBcDtBMEiEO13P6oHlGAn1VvIDxxMBSxeg/89xyJA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", @@ -586,9 +586,9 @@ } }, "node_modules/@aws-sdk/client-ec2": { - "version": "3.701.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ec2/-/client-ec2-3.701.0.tgz", - "integrity": "sha512-JTGunZM2UGO/F5WaA16IwhwMMaIsEEoLER0CkehPEnSIt8Y3Qn5j28rJfpI7TRBcFkRW8kEfbHJHPILg62oMiw==", + "version": "3.703.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ec2/-/client-ec2-3.703.0.tgz", + "integrity": "sha512-Ykmf40EIDt3XpF+3aVB6n/S/9FqxZ8vg84vARrX/ksnTLDZ99qbHaU7FwmreRd1Mwq+fLlgBdwODC4BiQvc2/g==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", @@ -695,9 +695,9 @@ } }, "node_modules/@aws-sdk/client-ecs": { - "version": "3.699.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.699.0.tgz", - "integrity": "sha512-IohplQtfljZUzTzhc5UlFATVymLx8UNgxfIKPib5vBPzuteJOA/X/SNBfeqY4XHYZjnBPxvPIeIEZm9ClATU5A==", + "version": "3.703.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.703.0.tgz", + "integrity": "sha512-mnPiTZc8tSFPN76qxbd0OMBLZ+OSTlUJviLjAgWrwb7bM0VnexKF4ynETgbLSSsZInvAUpTUXpjNq4tZ7BVf1g==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -751,9 +751,9 @@ } }, "node_modules/@aws-sdk/client-eventbridge": { - "version": "3.699.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-eventbridge/-/client-eventbridge-3.699.0.tgz", - "integrity": "sha512-j/5Bryvq1iWAc7E/BiNTVLE7SaqeFyuHOJQBU3eYQAye299g0uvnw/ho0snGVF3wUPXKiv2Qwa2BCFUzQ2xrZg==", + "version": "3.703.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-eventbridge/-/client-eventbridge-3.703.0.tgz", + "integrity": "sha512-gGhcNi9jItx23Q+FhI+yIz4AQfqluhSSQiOjRFxLUa2t3oYlKCV0j9m6YXagP7qrT60lnIG3PipThQ29lmDRzQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", @@ -861,9 +861,9 @@ } }, "node_modules/@aws-sdk/client-s3": { - "version": "3.701.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.701.0.tgz", - "integrity": "sha512-7iXmPC5r7YNjvwSsRbGq9oLVgfIWZesXtEYl908UqMmRj2sVAW/leLopDnbLT7TEedqlK0RasOZT05I0JTNdKw==", + "version": "3.703.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.703.0.tgz", + "integrity": "sha512-4TSrIamzASTeRPKXrTLcEwo+viPTuOSGcbXh4HC1R0m/rXwK0BHJ4btJ0Q34nZNF+WzvM+FiemXVjNc8qTAxog==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha1-browser": "5.2.0", @@ -1409,9 +1409,9 @@ } }, "node_modules/@aws-sdk/lib-storage": { - "version": "3.701.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.701.0.tgz", - "integrity": "sha512-eAbJ/3OgyFp1NnFdQfkZ7PuKCjrhbSQWf0EVTMhlg4aE5piCZ1We38NI1dQ58yr53rGc2gBkbYr8+/9CehpEvA==", + "version": "3.703.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.703.0.tgz", + "integrity": "sha512-0ejct/fmx/gF7aTcH5RUWiP9IodGWZY0tAfU8tYct0V41hPd9i9t55NbSk/jnzZcRN31NdSHfVxqGdISGAe0qg==", "license": "Apache-2.0", "dependencies": { "@smithy/abort-controller": "^3.1.7", @@ -1426,7 +1426,7 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-s3": "^3.701.0" + "@aws-sdk/client-s3": "^3.703.0" } }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { @@ -2815,9 +2815,9 @@ "license": "MIT" }, "node_modules/@eslint/js": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", - "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "license": "MIT", "engines": { @@ -3395,9 +3395,9 @@ } }, "node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-22.0.0.tgz", - "integrity": "sha512-kD8TxV6CdgHIEeam4xODVJNAT3hcvRhRl5RcNiu+FPR/JoMsExAQTruBGtv+jLppj4xt9V56pG/SHK8z6fv6xA==", + "version": "22.0.1", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-22.0.1.tgz", + "integrity": "sha512-V7bSw7Ui6+NhpeeuYqGoqamvKuy+3+uCvQ/t4ZJkwN8cx527CAlQQQ2kp+w5R9q+Tw6bUAH+fsq+mPEkicgT8g==", "license": "ISC", "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", @@ -4982,9 +4982,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.0.tgz", - "integrity": "sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -5155,17 +5155,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.16.0.tgz", - "integrity": "sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", + "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.16.0", - "@typescript-eslint/type-utils": "8.16.0", - "@typescript-eslint/utils": "8.16.0", - "@typescript-eslint/visitor-keys": "8.16.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/type-utils": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5189,16 +5189,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.16.0.tgz", - "integrity": "sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", + "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.16.0", - "@typescript-eslint/types": "8.16.0", - "@typescript-eslint/typescript-estree": "8.16.0", - "@typescript-eslint/visitor-keys": "8.16.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4" }, "engines": { @@ -5243,14 +5243,14 @@ "license": "MIT" }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz", - "integrity": "sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", + "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.16.0", - "@typescript-eslint/visitor-keys": "8.16.0" + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5261,14 +5261,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz", - "integrity": "sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", + "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.16.0", - "@typescript-eslint/utils": "8.16.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/utils": "8.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -5314,9 +5314,9 @@ "license": "MIT" }, "node_modules/@typescript-eslint/types": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.16.0.tgz", - "integrity": "sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", + "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", "dev": true, "license": "MIT", "engines": { @@ -5328,14 +5328,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz", - "integrity": "sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", + "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.16.0", - "@typescript-eslint/visitor-keys": "8.16.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -5408,16 +5408,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/utils": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.16.0.tgz", - "integrity": "sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", + "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.16.0", - "@typescript-eslint/types": "8.16.0", - "@typescript-eslint/typescript-estree": "8.16.0" + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5436,13 +5436,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz", - "integrity": "sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", + "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/types": "8.17.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -7055,9 +7055,9 @@ } }, "node_modules/eslint": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", - "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", "dev": true, "license": "MIT", "dependencies": { @@ -7066,7 +7066,7 @@ "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.9.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.15.0", + "@eslint/js": "9.16.0", "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -7889,12 +7889,15 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.1.0.tgz", + "integrity": "sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==", "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.3" + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8027,10 +8030,13 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", + "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, "engines": { "node": ">= 0.4" }, @@ -8039,9 +8045,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -8313,13 +8319,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.0.tgz", + "integrity": "sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -8488,12 +8494,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.0.tgz", + "integrity": "sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -8503,13 +8510,15 @@ } }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz", + "integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "gopd": "^1.1.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -8558,12 +8567,13 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.0.tgz", + "integrity": "sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -8767,9 +8777,9 @@ "license": "ISC" }, "node_modules/jsonata": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.0.5.tgz", - "integrity": "sha512-wEse9+QLIIU5IaCgtJCPsFi/H4F3qcikWzF4bAELZiRz08ohfx3Q6CjDRf4ZPF5P/92RI3KIHtb7u3jqPaHXdQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.0.6.tgz", + "integrity": "sha512-WhQB5tXQ32qjkx2GYHFw2XbL90u+LLzjofAYwi+86g6SyZeXHz9F1Q0amy3dWRYczshOC3Haok9J4pOCgHtwyQ==", "license": "MIT", "engines": { "node": ">= 8" @@ -9917,10 +9927,13 @@ } }, "node_modules/point-in-polygon-hao": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.1.0.tgz", - "integrity": "sha512-3hTIM2j/v9Lio+wOyur3kckD4NxruZhpowUbEgmyikW+a2Kppjtu1eN+AhnMQtoHW46zld88JiYWv6fxpsDrTQ==", - "license": "MIT" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.2.2.tgz", + "integrity": "sha512-pBNLuHSB/b4Zdh6XPO4KlIeYyWhalZSEQEnoTI5Pefx73TURdVleHP68HibPLjMwrjWvTG4FvWCsZrc8iqJPrA==", + "license": "MIT", + "dependencies": { + "robust-predicates": "^3.0.2" + } }, "node_modules/possible-typed-array-names": { "version": "1.0.0", @@ -10063,12 +10076,15 @@ } }, "node_modules/psl": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.13.0.tgz", - "integrity": "sha512-BFwmFXiJoFqlUpZ5Qssolv15DMyc84gTBds1BjsV1BfXEo1UyyD7GsmN67n7J77uRhoSNW1AXtXKPLcBFQn9Aw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", "license": "MIT", "dependencies": { "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" } }, "node_modules/punycode": { @@ -10450,6 +10466,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/robust-predicates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", + "license": "Unlicense" + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -11407,9 +11429,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.2.tgz", - "integrity": "sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "license": "MIT", "engines": { @@ -12003,15 +12025,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.16.0.tgz", - "integrity": "sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.17.0.tgz", + "integrity": "sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.16.0", - "@typescript-eslint/parser": "8.16.0", - "@typescript-eslint/utils": "8.16.0" + "@typescript-eslint/eslint-plugin": "8.17.0", + "@typescript-eslint/parser": "8.17.0", + "@typescript-eslint/utils": "8.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -12321,9 +12343,9 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", + "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", diff --git a/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue b/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue index 9b377623e..dbd8f93b7 100644 --- a/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +++ b/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue @@ -124,8 +124,8 @@ async function fetchFeats() { } } -async function removeFeatures() { - for (const layer of layers.value.mission_layers) { +async function removeFeatures(layers: MissionLayer[]) { + for (const layer of layers) { if (layer.type === 'UID' && layer.uids && layer.uids.length) { for (const cot of layer.uids) { orphaned.value.delete(cot.data); @@ -133,6 +133,7 @@ async function removeFeatures() { } if (layer.mission_layers) { + // @ts-expect-error Mission Layers is currently untyped due to recursive type limits removeFeatures(layer.mission_layers); } } @@ -140,6 +141,7 @@ async function removeFeatures() { async function fetchLayers() { layers.value = (await Subscription.layerList(props.mission.guid, props.token)).data; - removeFeatures(); + // @ts-expect-error Mission Layers is currently untyped due to recursive type limits + removeFeatures(layers.value.mission_layers); } diff --git a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue index 046aac16c..9b1b345fc 100644 --- a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +++ b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue @@ -2,7 +2,8 @@ From 318cee7d349b9b1e1f6ffad2db6106266e45a8c2 Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 10:39:12 -0700 Subject: [PATCH 4/8] Use GUID for now --- .../src/components/CloudTAK/Menu/Mission/MissionLayers.vue | 4 ++-- api/web/src/stores/base/mission.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue b/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue index dbd8f93b7..6ba6f9aca 100644 --- a/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +++ b/api/web/src/components/CloudTAK/Menu/Mission/MissionLayers.vue @@ -116,7 +116,7 @@ async function refresh() { } async function fetchFeats() { - const fc = await Subscription.featList(props.mission.guid, props.token) + const fc = await Subscription.featList(props.mission.name, props.token) for (const feat of fc.features) { feats.value.set(feat.id, feat); @@ -140,7 +140,7 @@ async function removeFeatures(layers: MissionLayer[]) { } async function fetchLayers() { - layers.value = (await Subscription.layerList(props.mission.guid, props.token)).data; + layers.value = (await Subscription.layerList(props.mission.name, props.token)).data; // @ts-expect-error Mission Layers is currently untyped due to recursive type limits removeFeatures(layers.value.mission_layers); } diff --git a/api/web/src/stores/base/mission.ts b/api/web/src/stores/base/mission.ts index e56ee491b..d2cde16dc 100644 --- a/api/web/src/stores/base/mission.ts +++ b/api/web/src/stores/base/mission.ts @@ -203,7 +203,7 @@ export default class Subscription { } static async layerList(guid: string, token?: string): Promise { - const url = stdurl(`/api/marti/missions/${guid}/layer`); + const url = stdurl(`/api/marti/missions/${encodeURIComponent(guid)}/layer`); return await std(url, { method: 'GET', From f674f2dd199fd457280de51fab951a0aff9b676b Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 11:34:46 -0700 Subject: [PATCH 5/8] Use MissionLayerTree in CoT sidepanel --- .../src/components/CloudTAK/Menu/Mission.vue | 1 + .../Menu/Mission/MissionLayerTree.vue | 219 +++++++++--------- .../CloudTAK/Menu/Mission/MissionLayers.vue | 28 ++- .../CloudTAK/Menu/Overlays/TreeMission.vue | 18 +- 4 files changed, 143 insertions(+), 123 deletions(-) diff --git a/api/web/src/components/CloudTAK/Menu/Mission.vue b/api/web/src/components/CloudTAK/Menu/Mission.vue index 2209eb43e..855886397 100644 --- a/api/web/src/components/CloudTAK/Menu/Mission.vue +++ b/api/web/src/components/CloudTAK/Menu/Mission.vue @@ -172,6 +172,7 @@ -
-
- - - - - - - - + diff --git a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue index 9b1b345fc..c86ba809a 100644 --- a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +++ b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue @@ -1,13 +1,15 @@ diff --git a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue index c86ba809a..9145e64f1 100644 --- a/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +++ b/api/web/src/components/CloudTAK/Menu/Overlays/TreeMission.vue @@ -13,7 +13,7 @@ From bec3de0682dd96e8c56702515ae307e260725e8e Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 13:17:15 -0700 Subject: [PATCH 7/8] Move flyTo onto COT object --- api/web/src/components/CloudTAK/CoTView.vue | 32 +------------------ .../src/components/CloudTAK/util/Feature.vue | 22 +------------ api/web/src/stores/base/cot.ts | 16 ++++++++++ 3 files changed, 18 insertions(+), 52 deletions(-) diff --git a/api/web/src/components/CloudTAK/CoTView.vue b/api/web/src/components/CloudTAK/CoTView.vue index 17e95a758..2a9a8d88f 100644 --- a/api/web/src/components/CloudTAK/CoTView.vue +++ b/api/web/src/components/CloudTAK/CoTView.vue @@ -93,7 +93,7 @@ diff --git a/api/web/src/components/CloudTAK/util/Feature.vue b/api/web/src/components/CloudTAK/util/Feature.vue index d9df83529..61c85bfbd 100644 --- a/api/web/src/components/CloudTAK/util/Feature.vue +++ b/api/web/src/components/CloudTAK/util/Feature.vue @@ -188,26 +188,6 @@ async function flyTo() { if (!cot) throw new Error('Could not find marker'); - if (cot.geometry.type === "Point") { - const flyTo = { - speed: Infinity, - center: cot.properties.center as LngLatLike, - zoom: 14 - }; - - if (mapStore.map.getZoom() < 3) flyTo.zoom = 4; - mapStore.map.flyTo(flyTo) - } else { - mapStore.map.fitBounds(cot.bounds() as LngLatBoundsLike, { - maxZoom: 14, - padding: { - top: 20, - bottom: 20, - left: 20, - right: 20 - }, - speed: Infinity, - }) - } + cot.flyTo(); } diff --git a/api/web/src/stores/base/cot.ts b/api/web/src/stores/base/cot.ts index c6fbd4375..faa4a8b31 100644 --- a/api/web/src/stores/base/cot.ts +++ b/api/web/src/stores/base/cot.ts @@ -209,6 +209,22 @@ export default class COT { return bbox(this._geometry); } + flyTo() { + const mapStore = useMapStore(); + if (!mapStore.map) return; + + mapStore.map.fitBounds(this.bounds() as LngLatBoundsLike, { + maxZoom: 20, + padding: { + top: 20, + bottom: 20, + left: 20, + right: 20 + }, + speed: Infinity, + }) + } + /** * Consistent feature manipulation between add & update */ From 370c89bf6ee4a97efc8f905b95a9bfcc8c73cca8 Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 2 Dec 2024 13:37:50 -0700 Subject: [PATCH 8/8] Fix lints & checks --- api/web/src/components/CloudTAK/CoTView.vue | 3 --- .../CloudTAK/Menu/Mission/MissionLayerTree.vue | 17 +++++++++++++---- .../CloudTAK/Menu/Mission/MissionLayers.vue | 4 +--- .../CloudTAK/Menu/Overlays/TreeMission.vue | 2 +- .../src/components/CloudTAK/util/Feature.vue | 1 - api/web/src/stores/base/cot.ts | 3 ++- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/api/web/src/components/CloudTAK/CoTView.vue b/api/web/src/components/CloudTAK/CoTView.vue index 2a9a8d88f..f08bafc5f 100644 --- a/api/web/src/components/CloudTAK/CoTView.vue +++ b/api/web/src/components/CloudTAK/CoTView.vue @@ -607,10 +607,8 @@