From bba2523943c4b75829a5de4dbb33e886cc145476 Mon Sep 17 00:00:00 2001 From: Dennis Sen Date: Wed, 15 Jan 2025 06:37:37 +0100 Subject: [PATCH 1/8] add locale register to docs --- package-lock.json | 492 ++++++++++++++++++ package.json | 14 +- .../dish/src/{locales.ts => language.ts} | 4 +- packages/clients/dish/src/mapConfig.ts | 2 +- .../src/{locales.ts => language.ts} | 0 packages/clients/textLocator/src/mapConfig.ts | 2 +- packages/core/README.md | 4 +- packages/core/src/{language => i18n}/index.ts | 14 +- packages/core/src/language.ts | 47 ++ packages/core/src/language/locales/de.ts | 22 - packages/core/src/language/locales/en.ts | 19 - packages/core/src/utils/createMap/index.ts | 4 +- scripts/{makeDocs.js => makeDocs.ts} | 133 ++++- 13 files changed, 670 insertions(+), 87 deletions(-) rename packages/clients/dish/src/{locales.ts => language.ts} (97%) rename packages/clients/textLocator/src/{locales.ts => language.ts} (100%) rename packages/core/src/{language => i18n}/index.ts (74%) create mode 100644 packages/core/src/language.ts delete mode 100644 packages/core/src/language/locales/de.ts delete mode 100644 packages/core/src/language/locales/en.ts rename scripts/{makeDocs.js => makeDocs.ts} (70%) diff --git a/package-lock.json b/package-lock.json index 200c9ec9c..f3fdbb214 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,6 +64,7 @@ "ts-jest": "^29.0.5", "ts-node": "^10.9.1", "tslib": "^2.3.0", + "tsx": "^4.19.2", "typescript": "^5.6.2", "vite": "^5.4.8", "vite-plugin-commonjs": "^0.6.2", @@ -2351,6 +2352,23 @@ "node": ">=12" } }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/openbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", @@ -9878,6 +9896,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/github-markdown-css": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/github-markdown-css/-/github-markdown-css-5.8.0.tgz", @@ -14056,6 +14087,16 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve-protobuf-schema": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", @@ -15372,6 +15413,457 @@ "dev": true, "license": "0BSD" }, + "node_modules/tsx": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", diff --git a/package.json b/package.json index 89d2e1f22..16883bc41 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ "pages:build": "rimraf ./pages/docs && npm run generic:build && bash ./scripts/buildPages.sh", "pages:build:serve": "http-server pages -o index.html", "clean": "nx reset && rimraf --glob packages/**/{.cache,dist,docs} && rimraf --glob {.cache,dist} && node ./scripts/clean", - "docs:afm": "node ./scripts/makeDocs afm", - "docs:generic": "node ./scripts/makeDocs generic", - "docs:meldemichel": "node ./scripts/makeDocs meldemichel && npm run meldemichel:build && cp -r ./packages/clients/meldemichel/dist ./packages/clients/meldemichel/example ./packages/clients/meldemichel/docs", - "docs:snowbox": "node ./scripts/makeDocs snowbox", - "docs:textLocator": "node ./scripts/makeDocs textLocator && npm run textLocator:build && cp -r ./packages/clients/textLocator/dist ./packages/clients/textLocator/docs", + "docs:afm": "npx tsx ./scripts/makeDocs afm", + "docs:generic": "npx tsx ./scripts/makeDocs generic", + "docs:meldemichel": "npx tsx ./scripts/makeDocs meldemichel && npm run meldemichel:build && cp -r ./packages/clients/meldemichel/dist ./packages/clients/meldemichel/example ./packages/clients/meldemichel/docs", + "docs:snowbox": "npx tsx ./scripts/makeDocs snowbox", + "docs:textLocator": "npx tsx ./scripts/makeDocs textLocator && npm run textLocator:build && cp -r ./packages/clients/textLocator/dist ./packages/clients/textLocator/docs", "lint": "npx eslint . --cache --ext .js,.ts,.vue", "lint:ci": "npx eslint . --ext .js,.ts,.vue", "lint:fix": "npx eslint . --fix --cache --ext .js,.ts,.vue", @@ -102,10 +102,10 @@ "ts-jest": "^29.0.5", "ts-node": "^10.9.1", "tslib": "^2.3.0", + "tsx": "^4.19.2", "typescript": "^5.6.2", "vite": "^5.4.8", "vite-plugin-commonjs": "^0.6.2", "vue-template-compiler": "^2.7.16" - }, - "dependencies": {} + } } diff --git a/packages/clients/dish/src/locales.ts b/packages/clients/dish/src/language.ts similarity index 97% rename from packages/clients/dish/src/locales.ts rename to packages/clients/dish/src/language.ts index 204ce5bd6..5a6d6f4ef 100644 --- a/packages/clients/dish/src/locales.ts +++ b/packages/clients/dish/src/language.ts @@ -1,4 +1,4 @@ -const locales = [ +const language = [ { type: 'de', resources: { @@ -44,4 +44,4 @@ const locales = [ }, ] -export default locales +export default language diff --git a/packages/clients/dish/src/mapConfig.ts b/packages/clients/dish/src/mapConfig.ts index 0d674cd58..dd29dd3b0 100644 --- a/packages/clients/dish/src/mapConfig.ts +++ b/packages/clients/dish/src/mapConfig.ts @@ -7,7 +7,7 @@ import { dishBaseUrl, // servicePrefix, s.u. } from './services' -import locales from './locales' +import locales from './language' const shBlue = '#003064' const shWhite = '#FFFFFF' diff --git a/packages/clients/textLocator/src/locales.ts b/packages/clients/textLocator/src/language.ts similarity index 100% rename from packages/clients/textLocator/src/locales.ts rename to packages/clients/textLocator/src/language.ts diff --git a/packages/clients/textLocator/src/mapConfig.ts b/packages/clients/textLocator/src/mapConfig.ts index fa8ca3c30..ab54b5ba4 100644 --- a/packages/clients/textLocator/src/mapConfig.ts +++ b/packages/clients/textLocator/src/mapConfig.ts @@ -1,5 +1,5 @@ import { MapConfig } from '@polar/lib-custom-types' -import locales from './locales' +import locales from './language' import { openStreetMap, openSeaMap, diff --git a/packages/core/README.md b/packages/core/README.md index 77aac6c89..603383cff 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -174,7 +174,9 @@ const languageOptions: LanguageOption[] = [ ] ``` -To figure out the name of the locales to override, inspect the matching plugin in GitHub's file browser. In `packages/plugins`, open the plugin you desire to override. Each plugin's `src` folder contains a `language.ts` listing all used locale keys with appropriate nesting. +To figure out the name of overridable locales, inspect the documentation of your client; [for example, this is the documentation page of the snowbox](https://dataport.github.io/polar/docs/snowbox/client-snowbox.html). All child documents with locales feature a table of default translations at the end, and some clients bring their own locales and pre-existing overrides. + +When reading the locale tables, please mind that the dot notation (`a.b.c | value`) has to be written as separate keys in nested objects as seen in the example above (`{a: {b: {c: "value"}}}`). ##### mapConfiguration.extendedMasterportalapiMarkers diff --git a/packages/core/src/language/index.ts b/packages/core/src/i18n/index.ts similarity index 74% rename from packages/core/src/language/index.ts rename to packages/core/src/i18n/index.ts index ddecfab97..a618a4c6b 100644 --- a/packages/core/src/language/index.ts +++ b/packages/core/src/i18n/index.ts @@ -2,27 +2,31 @@ import i18next, { init, use } from 'i18next' import LanguageDetector from 'i18next-browser-languagedetector' import Vue from 'vue' import VueI18Next from 'i18next-vue' -import de from './locales/de' -import en from './locales/en' +import language from '../language' use(LanguageDetector) Vue.use(VueI18Next, { i18next }) +const supportedLngs = language.map(({ type }) => type) + /** * @param initialLanguage - If given, the initial language set in the mapConfiguration. */ export default (initialLanguage?: string) => init({ - resources: { de, en }, + resources: language.reduce((accumulator, { type, resources }) => { + accumulator[type] = resources + return accumulator + }, {}), detection: { lookupQuerystring: 'lng', order: ['querystring', 'navigator', 'htmlTag'], }, load: 'languageOnly', - fallbackLng: 'de', + fallbackLng: supportedLngs[0], fallbackNS: 'common', ns: ['common'], - supportedLngs: ['de', 'en'], + supportedLngs, ...(initialLanguage ? { lng: initialLanguage } : {}), }) .then(() => { diff --git a/packages/core/src/language.ts b/packages/core/src/language.ts new file mode 100644 index 000000000..981361180 --- /dev/null +++ b/packages/core/src/language.ts @@ -0,0 +1,47 @@ +import { LanguageOption } from '@polar/lib-custom-types' + +// first type will be used as fallback language +const language: LanguageOption[] = [ + { + type: 'de', + resources: { + common: { + canvas: { + label: 'Kartenanwendung', + }, + error: { + serviceUnavailable: + 'Der Kartendienst "{{serviceName}}" (ID: {{serviceId}}) ist derzeit nicht verfügbar. Dies kann die Funktionalität der Karte einschränken.', + }, + overlay: { + noControlOnZoom: 'Verwenden Sie Strg+Scrollen zum Zoomen der Karte', + noCommandOnZoom: + 'Verwenden Sie Command ⌘ + Scrollen zum Zoomen der Karte', + oneFingerPan: + 'Verwenden Sie mindestens zwei Finger zum Verschieben der Karte', + }, + }, + }, + }, + { + type: 'en', + resources: { + common: { + canvas: { + label: 'Map application', + }, + error: { + serviceUnavailable: + 'Service "{{serviceName}}" (ID: {{serviceId}}) is unavailable. This may limit the map\'s functionality.', + }, + overlay: { + noControlOnZoom: 'Use Ctrl+Mousewheel to zoom into the map', + noCommandOnZoom: 'Use Command ⌘ + Mousewheel to zoom into the map', + oneFingerPan: 'Use at least two fingers to pan the map', + }, + }, + }, + }, +] + +export default language diff --git a/packages/core/src/language/locales/de.ts b/packages/core/src/language/locales/de.ts deleted file mode 100644 index 31343040e..000000000 --- a/packages/core/src/language/locales/de.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Resource } from 'i18next' - -const de: Resource = { - common: { - canvas: { - label: 'Kartenanwendung', - }, - error: { - serviceUnavailable: - 'Der Kartendienst "{{serviceName}}" (ID: {{serviceId}}) ist derzeit nicht verfügbar. Dies kann die Funktionalität der Karte einschränken.', - }, - overlay: { - noControlOnZoom: 'Verwenden Sie Strg+Scrollen zum Zoomen der Karte', - noCommandOnZoom: - 'Verwenden Sie Command ⌘ + Scrollen zum Zoomen der Karte', - oneFingerPan: - 'Verwenden Sie mindestens zwei Finger zum Verschieben der Karte', - }, - }, -} - -export default de diff --git a/packages/core/src/language/locales/en.ts b/packages/core/src/language/locales/en.ts deleted file mode 100644 index cda125e19..000000000 --- a/packages/core/src/language/locales/en.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Resource } from 'i18next' - -const en: Resource = { - common: { - canvas: { - label: 'Map application', - }, - error: { - serviceUnavailable: - 'Service "{{serviceName}}" (ID: {{serviceId}}) is unavailable. This may limit the map\'s functionality.', - }, - overlay: { - noControlOnZoom: 'Use Ctrl+Mousewheel to zoom into the map', - noCommandOnZoom: 'Use Command ⌘ + Mousewheel to zoom into the map', - oneFingerPan: 'Use at least two fingers to pan the map', - }, - }, -} -export default en diff --git a/packages/core/src/utils/createMap/index.ts b/packages/core/src/utils/createMap/index.ts index 8616d0755..3d415a01e 100644 --- a/packages/core/src/utils/createMap/index.ts +++ b/packages/core/src/utils/createMap/index.ts @@ -1,7 +1,7 @@ import Vue from 'vue' import { makeStore } from '../../vuePlugins/vuex' import vuetify from '../../vuePlugins/vuetify' -import language from '../../language' +import initializeI18n from '../../i18n' import { MapContainer } from '../../components' import { CreateOptions, MapInstance } from '../../types' import defaults from './defaults' @@ -25,7 +25,7 @@ export default async function createMap({ }: CreateOptions): Promise { const shadowRoot = await makeShadowRoot(containerId) - await language(mapConfiguration?.language) + await initializeI18n(mapConfiguration?.language) const instance: MapInstance = new Vue({ vuetify: vuetify(mapConfiguration?.vuetify), diff --git a/scripts/makeDocs.js b/scripts/makeDocs.ts similarity index 70% rename from scripts/makeDocs.js rename to scripts/makeDocs.ts index d2443d643..69be2bc03 100644 --- a/scripts/makeDocs.js +++ b/scripts/makeDocs.ts @@ -1,8 +1,10 @@ -/* eslint-env node */ - /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable no-console */ +// keeping it simply stupid; .ts is just here to get to import language.ts files +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-nocheck + /* * Generates documentation page for clients from * @@ -14,7 +16,7 @@ * longer publish a client's API.md, as it will be included twice. (Generated * docs and .md.) * - * Call like `node ./scripts/makeDocs.js ./path/to/client`. + * Call like `npx tsx ./scripts/makeDocs.ts ./path/to/client`. * * Headings in markdowns will get a slugified ID by markdown-it-anchor to be linkable. * It uses the default slugify function: @@ -24,6 +26,7 @@ // IMPORTS const fs = require('fs') +const path = require('path') const MarkdownIt = require('markdown-it') // SETUP @@ -41,9 +44,28 @@ const markdownIt = new MarkdownIt({ html: true, xhtmlOut: true, }).use(require('markdown-it-anchor')) +const head = ` + + + 🧊📚 POLAR Documentation + + +` const defaultHTMLRender = markdownIt.renderer.rules.html_block - markdownIt.renderer.rules.html_block = (tokens, idx, options, env, self) => { ;[...tokens[idx].content.matchAll(/.*src="([^"]*)".*/g)].forEach((match) => { fs.cp(`${env.basePath}/${match[1]}`, `${docPath}/${match[1]}`, (err) => { @@ -58,6 +80,73 @@ markdownIt.renderer.rules.html_block = (tokens, idx, options, env, self) => { return defaultHTMLRender(tokens, idx, options, env, self) } +/** + * Flattens an object, e.g. { a: { b: 4 }} becomes { "a.b": 4 }. + * @param {*} maybeObject maybe not an object + * @returns {*} flattened object or input back if it wasn't an object + */ +const flattenObject = (maybeObject) => { + if (typeof maybeObject !== 'object') { + return maybeObject + } + + return Object.entries(maybeObject).reduce((accumulator, [key, value]) => { + if (typeof value === 'object') { + const flatChild = flattenObject(value) + Object.entries(flatChild).forEach(([childKey, childValue]) => { + accumulator[`${key}.${childKey}`] = childValue + }) + } else { + accumulator[key] = value + } + return accumulator + }, {}) +} + +/** + * @param {LanguageOption[]} locales as seen in the packages' language.ts files + * @returns {string} html table + */ +function makeLocaleTable(locales) { + const keyMap = {} + + locales.forEach(({ type, resources }) => { + const flatResources = flattenObject(resources) + Object.entries(flatResources).forEach(([key, value]) => { + if (keyMap[key]) { + keyMap[key][type] = value + } else { + keyMap[key] = { [type]: value } + } + }) + }) + + return ` + + + + + + + + + + ${Object.entries(keyMap) + .map( + ([key, { en, de }]) => ` + + + + + + ` + ) + .join('')} + +
Locale KeyGerman defaultEnglish default
${key}${de ?? ''}${en ?? ''}
+ ` +} + /** * HTMLifies and styles a markdown file. * @param {string} basePath base path client or dependency @@ -65,31 +154,20 @@ markdownIt.renderer.rules.html_block = (tokens, idx, options, env, self) => { * @param {string[]} [children] files to link to at end of document * @returns {string} html document */ -function toHtml(basePath, markdownFileName, children) { +async function toHtml(basePath, markdownFileName, children) { const markdownFilePath = `${basePath}/${markdownFileName}` const clientText = fs.readFileSync(markdownFilePath, fsOptions) + + let maybeLocales + const localesPath = path.join(basePath, 'src', 'language') + if (fs.existsSync(`${localesPath}.ts`)) { + maybeLocales = (await import(`../${localesPath.replaceAll('\\', '/')}.ts`)) + .default + } + return ` - - - - 🧊📚 POLAR Documentation - - - +${head}
${markdownIt.render(clientText, { basePath })} @@ -105,6 +183,7 @@ function toHtml(basePath, markdownFileName, children) { ` : '' } + ${maybeLocales ? `

Locales

${makeLocaleTable(maybeLocales)}` : ''}

Legal Notice (Impressum) @@ -165,10 +244,10 @@ const adjustRelativePathsInHtml = (htmlContent) => { fs.readdirSync(docPath).forEach((f) => fs.rmSync(`${docPath}/${f}`, { recursive: true }) ) -;[clientPath, ...dependencyPaths].forEach((basePath) => { +;[clientPath, ...dependencyPaths].forEach(async (basePath) => { const isMain = basePath === clientPath const markdownFileName = `${isMain ? 'API.md' : 'README.md'}` - let html = toHtml( + let html = await toHtml( basePath, markdownFileName, isMain From 6a1ca4d31ee5da3566fa0481e6f3b181398d1c4f Mon Sep 17 00:00:00 2001 From: Pascal Roehling Date: Thu, 30 Jan 2025 11:04:41 +0100 Subject: [PATCH 2/8] Update @masterportal/masterportalapi to v2.45.0 and thus ol to v10.3.1 Also, fix all type and dependency issues introduced by the ol update. --- jest.config.ts | 2 +- package-lock.json | 205 ++++++++++++------ package.json | 6 +- packages/clients/dish/CHANGELOG.md | 2 +- packages/clients/dish/package.json | 2 +- .../clients/meldemichel/src/polar-client.ts | 2 +- packages/clients/textLocator/CHANGELOG.md | 1 + packages/clients/textLocator/package.json | 3 + .../GeometrySearch/utils/vectorDisplay.ts | 3 +- packages/core/CHANGELOG.md | 4 + packages/core/package.json | 4 +- packages/core/src/utils/setupStyling.ts | 17 +- .../index.ts | 6 +- .../setLayerId.ts | 2 +- packages/lib/getCluster/CHANGELOG.md | 4 + packages/lib/getCluster/package.json | 2 +- packages/lib/getFeatures/CHANGELOG.md | 4 + packages/lib/getFeatures/package.json | 2 +- packages/lib/invisibleStyle/CHANGELOG.md | 4 + packages/lib/invisibleStyle/package.json | 2 +- packages/lib/passesBoundaryCheck/CHANGELOG.md | 4 + packages/lib/passesBoundaryCheck/index.ts | 6 +- packages/lib/passesBoundaryCheck/package.json | 2 +- packages/plugins/AddressSearch/CHANGELOG.md | 4 + packages/plugins/AddressSearch/package.json | 4 +- packages/plugins/Attributions/CHANGELOG.md | 4 + packages/plugins/Attributions/package.json | 2 +- packages/plugins/Draw/CHANGELOG.md | 4 + packages/plugins/Draw/package.json | 2 +- .../createDeleteInteractions.ts | 3 +- packages/plugins/Draw/src/types.ts | 2 +- packages/plugins/Filter/CHANGELOG.md | 4 + packages/plugins/Filter/package.json | 2 +- packages/plugins/GeoLocation/CHANGELOG.md | 4 + packages/plugins/GeoLocation/package.json | 2 +- packages/plugins/GeoLocation/src/types.ts | 8 +- packages/plugins/Gfi/CHANGELOG.md | 4 + packages/plugins/Gfi/package.json | 4 +- .../src/store/actions/debouncedGfiRequest.ts | 10 +- .../Gfi/src/utils/displayFeatureLayer.ts | 7 +- .../plugins/Gfi/src/utils/renderFeatures.ts | 4 +- .../Gfi/src/utils/requestGfiGeoJson.ts | 2 +- packages/plugins/LayerChooser/CHANGELOG.md | 4 + packages/plugins/LayerChooser/package.json | 4 +- packages/plugins/Pins/CHANGELOG.md | 4 + packages/plugins/Pins/package.json | 2 +- packages/plugins/Pins/src/store/index.ts | 2 +- packages/plugins/ReverseGeocoder/CHANGELOG.md | 4 + packages/plugins/ReverseGeocoder/package.json | 2 +- packages/plugins/Scale/CHANGELOG.md | 4 + packages/plugins/Scale/package.json | 2 +- 51 files changed, 259 insertions(+), 134 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index ba7fcead9..cc090f025 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -23,7 +23,7 @@ const config: Config.InitialOptions = { setupFiles: ['jest-canvas-mock'], setupFilesAfterEnv: ['./__mocks__/jest.setup.js'], transformIgnorePatterns: [ - '/node_modules/(?!(@repositoryname/vuex-generators|@masterportal/masterportalapi|ol|geotiff|quick-lru|color-(space|parse|rgba|name))/)', + '/node_modules/(?!(@repositoryname/vuex-generators|@masterportal/masterportalapi|ol|pbf|earcut|geotiff|rbush|quickselect|quick-lru|color-(space|parse|rgba|name))/)', ], } diff --git a/package-lock.json b/package-lock.json index fb6a64e9c..5e85d227d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@actions/github": "^6.0.0", "@babel/core": "^7.24.8", "@babel/preset-env": "^7.24.8", - "@cesium/engine": "^9.2.0", + "@cesium/engine": "^13.0.0", "@jest/types": "^29.3.1", "@nx/js": "^19.8.2", "@playwright/test": "^1.47.2", @@ -35,6 +35,7 @@ "@vue/test-utils": "^1.2.2", "@vue/vue2-jest": "^28.1.0", "babel-core": "^7.0.0-bridge.0", + "cesium": "^1.125.0", "copyfiles": "^2.4.1", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", @@ -1960,29 +1961,29 @@ "license": "MIT" }, "node_modules/@cesium/engine": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@cesium/engine/-/engine-9.2.0.tgz", - "integrity": "sha512-vFVITo7UwIY1H8zK53etljv1w0CVaFSzOcLyItrM88r47zyPL7/RgooVKqZXnM5V8prs33S5TO/JSqJmvpyMTQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@cesium/engine/-/engine-13.1.0.tgz", + "integrity": "sha512-1PX7sMhtgBgaSOtyQ0lTPvG35bMfR1ngtgBZqzNnR67lp+tVv9lNyAg/byBSnijL2b2NJNC2Iec6A6Z/Rj12OA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@tweenjs/tween.js": "^23.1.1", + "@tweenjs/tween.js": "^25.0.0", "@zip.js/zip.js": "^2.7.34", "autolinker": "^4.0.0", "bitmap-sdf": "^1.0.3", "dompurify": "^3.0.2", "draco3d": "^1.5.1", - "earcut": "^2.2.4", + "earcut": "^3.0.0", "grapheme-splitter": "^1.0.4", "jsep": "^1.3.8", "kdbush": "^4.0.1", "ktx-parse": "^0.7.0", "lerc": "^2.0.0", "mersenne-twister": "^1.1.0", - "meshoptimizer": "^0.20.0", + "meshoptimizer": "^0.22.0", "pako": "^2.0.4", "protobufjs": "^7.1.0", - "rbush": "^3.0.1", + "rbush": "3.0.1", "topojson-client": "^3.1.0", "urijs": "^1.19.7" }, @@ -1990,6 +1991,20 @@ "node": ">=14.0.0" } }, + "node_modules/@cesium/widgets": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@cesium/widgets/-/widgets-10.1.0.tgz", + "integrity": "sha512-IWT+8cCsnJo1Mtr+xrkdVEZrP88/UqF5oDyDPVmlOJ47MPjUauu93k6LeAwxQQ2CYqqgpFIZbIX19mMfQMwSfA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@cesium/engine": "^13.1.0", + "nosleep.js": "^0.12.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "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", @@ -3241,16 +3256,16 @@ "license": "BSD-2-Clause" }, "node_modules/@masterportal/masterportalapi": { - "version": "2.40.0", - "resolved": "https://registry.npmjs.org/@masterportal/masterportalapi/-/masterportalapi-2.40.0.tgz", - "integrity": "sha512-1NuoV2a4X4XOyK61ViRDDyXDNzQYUOAopL65Sj23OpJNCr9fQ3NSAuhdOsb43Wj9nBMR4FECa62wjyVEyVNIZg==", + "version": "2.45.0", + "resolved": "https://registry.npmjs.org/@masterportal/masterportalapi/-/masterportalapi-2.45.0.tgz", + "integrity": "sha512-DU/rwoJXr/BH38AUDmQPCJPz+giWMwaYAECCneII4pWnESW6r8kwG8gsYMbZAKstXqLOqbc+osWyiQ9ilNxTPQ==", "license": "MIT", "dependencies": { "core-js": "^3.33.1", "dayjs": "^1.11.10", - "ol": "9.2.4", - "ol-mapbox-style": "12.2.1", - "olcs": "2.20.0", + "ol": "^10.3.1", + "ol-mapbox-style": "^12.3.5", + "olcs": "^2.22.1", "proj4": "^2.10.0", "xml2js": "^0.6.2" }, @@ -3259,7 +3274,7 @@ "npm": "^8.1.2 || ^9.3.1 || ^10.5.0" }, "peerDependencies": { - "@cesium/engine": "^9.2.0" + "@cesium/engine": "^13.0.0" } }, "node_modules/@microsoft/tsdoc": { @@ -4492,9 +4507,9 @@ } }, "node_modules/@petamoriken/float16": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.9.0.tgz", - "integrity": "sha512-rYUZ+VFjPHD0NT2JYKj64NxXxrV642IiyaUxxorTEj0S3hT7B5Ixezyc9Fn+XvSk0ETEBp5VWjGIErzh0ug0Xw==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.9.1.tgz", + "integrity": "sha512-j+ejhYwY6PeB+v1kn7lZFACUIG97u90WxMuGosILFsl9d4Ovi0sjk0GlPfoEcx+FzvXZDAfioD+NGnnPamXgMA==", "license": "MIT" }, "node_modules/@pkgjs/parseargs": { @@ -5440,9 +5455,9 @@ } }, "node_modules/@tweenjs/tween.js": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz", - "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-25.0.0.tgz", + "integrity": "sha512-XKLA6syeBUaPzx4j3qwMqzzq+V4uo72BnlbOjmuljLrRqdsd3qnzvZZoxvMHZ23ndsRS4aufU6JOZYpCbU6T1A==", "dev": true, "license": "MIT" }, @@ -5620,6 +5635,12 @@ "license": "MIT", "optional": true }, + "node_modules/@types/rbush": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/rbush/-/rbush-4.0.0.tgz", + "integrity": "sha512-+N+2H39P8X+Hy1I5mC6awlTX54k3FhiUmvt7HWzGJZvF+syUAAxP/stwppS8JE84YHqFgRMv6fCy31202CMFxQ==", + "license": "MIT" + }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -7184,6 +7205,24 @@ "license": "MIT", "optional": true }, + "node_modules/cesium": { + "version": "1.125.0", + "resolved": "https://registry.npmjs.org/cesium/-/cesium-1.125.0.tgz", + "integrity": "sha512-T6V1xKFQOxydJJtG6ammyDOwKMerkGLdxQJLJSLHhhh6VKqpUyp+GXSKjnzlAmpLDjQLF1UkhbJ98WC59am/fA==", + "dev": true, + "license": "Apache-2.0", + "workspaces": [ + "packages/engine", + "packages/widgets" + ], + "dependencies": { + "@cesium/engine": "^13.1.0", + "@cesium/widgets": "^10.1.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7368,9 +7407,9 @@ } }, "node_modules/color-space": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-space/-/color-space-2.0.1.tgz", - "integrity": "sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/color-space/-/color-space-2.1.0.tgz", + "integrity": "sha512-zVS/1YXvFB4AoYqpKzcQ694s7dOKXHtSbQfcfuxeuTr4oE1U40zkrqvyEsu8OD9e2pTuGjfRFNUR2Ii4XkoE9w==", "license": "MIT" }, "node_modules/colorette": { @@ -8079,9 +8118,9 @@ "license": "MIT" }, "node_modules/earcut": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", - "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.1.tgz", + "integrity": "sha512-0l1/0gOjESMeQyYaK5IDiPNvFeu93Z/cO0TjZh9eZ1vyCtZnA7KMZ8rQggpsJHIbGSdrqYq9OhuveadOVHCshw==", "license": "ISC" }, "node_modules/eastasianwidth": { @@ -10371,6 +10410,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -12425,9 +12465,9 @@ "license": "MIT" }, "node_modules/meshoptimizer": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.20.0.tgz", - "integrity": "sha512-olcJ1q+YVnjroRJpCL1Dj5aZxr2JMr2hRutMUwhuHZvpAL7SIZgOT6eMlFF4TbBGSR89tawE/gqB79J/LrW/Nw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.22.0.tgz", + "integrity": "sha512-IebiK79sqIy+E4EgOr+CAw+Ke8hAspXKzBd0JdgEmPHiAwmvEj2S4h1rfvo+o/BnfEYd/jAOg5IeeIjzlzSnDg==", "dev": true, "license": "MIT" }, @@ -12660,6 +12700,13 @@ "node": ">=0.10.0" } }, + "node_modules/nosleep.js": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/nosleep.js/-/nosleep.js-0.12.0.tgz", + "integrity": "sha512-9d1HbpKLh3sdWlhXMhU6MMH+wQzKkrgfRkYV0EBdvt99YJfj0ilCJrWRDYG2130Tm4GXbEoTCx5b34JSaP+HhA==", + "dev": true, + "license": "MIT" + }, "node_modules/npm-package-arg": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", @@ -12921,17 +12968,18 @@ } }, "node_modules/ol": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/ol/-/ol-9.2.4.tgz", - "integrity": "sha512-bsbu4ObaAlbELMIZWnYEvX4Z9jO+OyCBshtODhDKmqYTPEfnKOX3RieCr97tpJkqWTZvyV4tS9UQDvHoCdxS+A==", + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/ol/-/ol-10.3.1.tgz", + "integrity": "sha512-D1nRQVLOBCRempVqBFV8pSI5H13BtnhuLDjGl+3NKdMOFyjx/UqRX/tcMspEw3LhFOSPWn1Ev+1KIRV8AlHM7A==", "license": "BSD-2-Clause", "dependencies": { + "@types/rbush": "4.0.0", "color-rgba": "^3.0.0", "color-space": "^2.0.1", - "earcut": "^2.2.3", - "geotiff": "^2.0.7", - "pbf": "3.2.1", - "rbush": "^3.0.1" + "earcut": "^3.0.0", + "geotiff": "^2.1.3", + "pbf": "4.0.1", + "rbush": "^4.0.0" }, "funding": { "type": "opencollective", @@ -12939,26 +12987,41 @@ } }, "node_modules/ol-mapbox-style": { - "version": "12.2.1", - "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-12.2.1.tgz", - "integrity": "sha512-soh8x+8CwlA+e3fd8grotA4XXnm0DSWnpzu5Ef3aEQwpM1o2OfoGPSk/hpjhXL5kFUm79pEyiONTw+kdth2FEQ==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-12.4.0.tgz", + "integrity": "sha512-P8Jg9AXSG6FpUNrADejpwMG0HbmHTZOJQQocACzaDL0QrU4kzmCvj06xUIKhTxT5mtC413pCVAbyXJ4mx0XFnQ==", "license": "BSD-2-Clause", "dependencies": { "@mapbox/mapbox-gl-style-spec": "^13.23.1", "mapbox-to-css-font": "^2.4.1" }, "peerDependencies": { - "ol": ">=9.0.0 || >=9.0.0-dev.0 <9.0.0 || =9.0.0-dev || >=8.0.0 <=8.2.0 || >=7.0.0 <=7.5.2" + "ol": "*" + } + }, + "node_modules/ol/node_modules/quickselect": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz", + "integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==", + "license": "ISC" + }, + "node_modules/ol/node_modules/rbush": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.1.tgz", + "integrity": "sha512-IP0UpfeWQujYC8Jg162rMNc01Rf0gWMMAb2Uxus/Q0qOFw4lCcq6ZnQEZwUoJqWyUGJ9th7JjwI4yIWo+uvoAQ==", + "license": "MIT", + "dependencies": { + "quickselect": "^3.0.0" } }, "node_modules/olcs": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/olcs/-/olcs-2.20.0.tgz", - "integrity": "sha512-VNjjfIbO/dzQxKbVv2IS4WbM/CRlQ5T5xnMIlOoOA3HnAZUPK6cajxYoxDDxKnJ+3I+XJNNdBybNFAX1U4ADqw==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/olcs/-/olcs-2.22.1.tgz", + "integrity": "sha512-QWpFA84km7bOZFh0PDrKa35HkvI+mud9fcRZ4NHbRMFtBIQnY8l9oba+WocimIhXer4hIybc4nx0q60sEngLKg==", "license": "BSD-2-Clause", "peerDependencies": { "cesium": ">= 1.90.0", - "ol": "7 || 8 || 9" + "ol": ">= 9.2, >= 10" } }, "node_modules/once": { @@ -13241,12 +13304,11 @@ } }, "node_modules/pbf": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", - "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", + "integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==", "license": "BSD-3-Clause", "dependencies": { - "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" }, "bin": { @@ -13805,6 +13867,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==", + "dev": true, "license": "ISC" }, "node_modules/raf": { @@ -13821,6 +13884,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", + "dev": true, "license": "MIT", "dependencies": { "quickselect": "^2.0.0" @@ -16479,7 +16543,7 @@ "version": "1.1.1", "license": "EUPL-1.2", "devDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@polar/core": "^2.0.0", "@polar/lib-custom-types": "^1.5.0", "@polar/lib-get-features": "^2.0.0", @@ -16596,6 +16660,9 @@ "@turf/union": "^7.1.0", "js-levenshtein": "^1.1.6", "lodash.debounce": "^4.0.8" + }, + "peerDependencies": { + "ol": "^10.3.1" } }, "packages/components": { @@ -16615,7 +16682,7 @@ "license": "EUPL-1.2", "dependencies": { "@fortawesome/fontawesome-free": "^6.5.2", - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@polar/components": "^2.2.0", "@polar/lib-get-cluster": "^2.0.0", "@polar/lib-idx": "^1.0.0", @@ -16637,7 +16704,7 @@ "@polar/lib-custom-types": "^1.4.0" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } }, "packages/lib/getCluster": { @@ -16645,7 +16712,7 @@ "version": "2.0.0", "license": "EUPL-1.2", "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } }, "packages/lib/getFeatures": { @@ -16656,7 +16723,7 @@ "@polar/lib-custom-types": "^1.5.0" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } }, "packages/lib/idx": { @@ -16669,7 +16736,7 @@ "version": "2.0.0", "license": "EUPL-1.2", "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } }, "packages/lib/passesBoundaryCheck": { @@ -16678,7 +16745,7 @@ "license": "EUPL-1.2", "devDependencies": { "@polar/lib-custom-types": "^1.1.0", - "ol": "^9.2.4" + "ol": "^10.3.1" } }, "packages/lib/testMountParameters": { @@ -16710,9 +16777,9 @@ "@polar/lib-custom-types": "^1.5.0" }, "peerDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } @@ -16724,7 +16791,7 @@ "devDependencies": { "@polar/lib-custom-types": "^1.5.0", "@polar/lib-test-mount-parameters": "^1.3.0", - "ol": "^9.2.4" + "ol": "^10.3.1" }, "peerDependencies": { "@repositoryname/noop": "^1.0.6", @@ -16742,7 +16809,7 @@ }, "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } @@ -16773,7 +16840,7 @@ }, "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } @@ -16798,7 +16865,7 @@ "@polar/lib-tooltip": "^1.0.0" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } }, "packages/plugins/Gfi": { @@ -16817,9 +16884,9 @@ "@polar/lib-tooltip": "^1.0.0" }, "peerDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } @@ -16847,9 +16914,9 @@ "@polar/lib-test-mount-parameters": "^1.3.0" }, "peerDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } @@ -16889,7 +16956,7 @@ }, "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } @@ -16903,7 +16970,7 @@ "lodash.mapvalues": "^4.6.0" }, "peerDependencies": { - "ol": "^9.2.4", + "ol": "^10.3.1", "xml2js": "^0.4.23" } }, @@ -16918,7 +16985,7 @@ "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", "i18next": "^23.x", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" } diff --git a/package.json b/package.json index 89d2e1f22..14c561f08 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@actions/github": "^6.0.0", "@babel/core": "^7.24.8", "@babel/preset-env": "^7.24.8", - "@cesium/engine": "^9.2.0", + "@cesium/engine": "^13.0.0", "@jest/types": "^29.3.1", "@nx/js": "^19.8.2", "@playwright/test": "^1.47.2", @@ -73,6 +73,7 @@ "@vue/test-utils": "^1.2.2", "@vue/vue2-jest": "^28.1.0", "babel-core": "^7.0.0-bridge.0", + "cesium": "^1.125.0", "copyfiles": "^2.4.1", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", @@ -106,6 +107,5 @@ "vite": "^5.4.8", "vite-plugin-commonjs": "^0.6.2", "vue-template-compiler": "^2.7.16" - }, - "dependencies": {} + } } diff --git a/packages/clients/dish/CHANGELOG.md b/packages/clients/dish/CHANGELOG.md index 360c579f4..48aee808e 100644 --- a/packages/clients/dish/CHANGELOG.md +++ b/packages/clients/dish/CHANGELOG.md @@ -7,7 +7,7 @@ - Fix: Import types `AddressSearchState` and `AddressSearchGetters` from correct position. - Fix: Import enum `SearchResultSymbols` from correct position. - Chore: Change value of `pins.movable` configuration to `'drag'` as using a boolean has been deprecated in a future release. -- Chore: Upgrade `@masterportal/masterportalapi` from `2.8.0` to `2.40.0` and subsequently `ol` from `^7.1.0` to `^9.2.4`. +- Chore: Upgrade `@masterportal/masterportalapi` from `2.8.0` to `2.45.0` and subsequently `ol` from `^7.1.0` to `^10.3.1`. - Chore: Update `@polar`-dependencies to the latest versions. ## 1.1.1 diff --git a/packages/clients/dish/package.json b/packages/clients/dish/package.json index b49363cc7..f227e48a1 100644 --- a/packages/clients/dish/package.json +++ b/packages/clients/dish/package.json @@ -22,7 +22,7 @@ "dev": "vite --host" }, "devDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@polar/core": "^2.0.0", "@polar/lib-custom-types": "^1.5.0", "@polar/lib-get-features": "^2.0.0", diff --git a/packages/clients/meldemichel/src/polar-client.ts b/packages/clients/meldemichel/src/polar-client.ts index 00a0bfdb0..dd0bf2af7 100644 --- a/packages/clients/meldemichel/src/polar-client.ts +++ b/packages/clients/meldemichel/src/polar-client.ts @@ -26,7 +26,7 @@ const hideHamburgBorder = (map: Map) => { map .getLayers() .getArray() - .find((layer) => layer.get('id') === hamburgBorder) as Vector + .find((layer) => layer.get('id') === hamburgBorder) as Vector ).setStyle(null) } diff --git a/packages/clients/textLocator/CHANGELOG.md b/packages/clients/textLocator/CHANGELOG.md index 2d13cc6fd..82058da63 100644 --- a/packages/clients/textLocator/CHANGELOG.md +++ b/packages/clients/textLocator/CHANGELOG.md @@ -3,6 +3,7 @@ ## unpublished - Chore: Update `@polar`-dependencies to the latest versions. +- Chore: Add missing `ol` peerDependency. ## 1.0.0 diff --git a/packages/clients/textLocator/package.json b/packages/clients/textLocator/package.json index 8a3cc6560..d0c0c6f36 100644 --- a/packages/clients/textLocator/package.json +++ b/packages/clients/textLocator/package.json @@ -40,6 +40,9 @@ "js-levenshtein": "^1.1.6", "lodash.debounce": "^4.0.8" }, + "peerDependencies": { + "ol": "^10.3.1" + }, "nx": { "includedScripts": ["build", "dev"] } diff --git a/packages/clients/textLocator/src/plugins/GeometrySearch/utils/vectorDisplay.ts b/packages/clients/textLocator/src/plugins/GeometrySearch/utils/vectorDisplay.ts index b9cb21b7a..a64eda9e6 100644 --- a/packages/clients/textLocator/src/plugins/GeometrySearch/utils/vectorDisplay.ts +++ b/packages/clients/textLocator/src/plugins/GeometrySearch/utils/vectorDisplay.ts @@ -56,7 +56,8 @@ export const updateVectorLayer = ( ) => { vectorSource.clear() const preparedFeatures = features.map((feature) => { - const olFeature = geoJson.readFeature(feature) + // Since ol@10, readFeature may also return a Feature[]? + const olFeature = geoJson.readFeature(feature) as OlFeature olFeature.set('featureType', getFeatureType(olFeature)) return olFeature }) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index e8cad4423..243753efe 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade `@masterportal/masterportalapi` from `2.40.0` to `2.45.0` and subsequently `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.1 - Fix: Add `crossOrigin` differently to layer sources that are an instance of `ImageWMS` as they require it being set as `crossOrigin_` to be recognized. diff --git a/packages/core/package.json b/packages/core/package.json index addb977f1..d4f0e0ccb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^6.5.2", - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@polar/components": "^2.2.0", "@polar/lib-idx": "^1.0.0", "@polar/lib-get-cluster": "^2.0.0", @@ -39,7 +39,7 @@ "vuex": "^3.6.2" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" }, "devDependencies": { "@polar/lib-custom-types": "^1.4.0" diff --git a/packages/core/src/utils/setupStyling.ts b/packages/core/src/utils/setupStyling.ts index 348457a1b..3e7629c50 100644 --- a/packages/core/src/utils/setupStyling.ts +++ b/packages/core/src/utils/setupStyling.ts @@ -36,15 +36,14 @@ export async function setupStyling(mapConfiguration: MapConfig, map: Map) { } const styleObject = styleList.returnStyleObject(layer.get('styleId')) if (styleObject) { - ;(layer as VectorLayer).setStyle( - (feature: Feature | FeatureLike) => - createStyle.createStyle( - styleObject, - feature, - feature.get('features') !== undefined, - // NOTE: This field may be implemented in the future to be able to style points with graphics - '' - ) + ;(layer as VectorLayer).setStyle((feature: Feature | FeatureLike) => + createStyle.createStyle( + styleObject, + feature, + feature.get('features') !== undefined, + // NOTE: This field may be implemented in the future to be able to style points with graphics + '' + ) ) } }) diff --git a/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/index.ts b/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/index.ts index 12bf015bd..b85a668fc 100644 --- a/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/index.ts +++ b/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/index.ts @@ -102,7 +102,7 @@ export function useExtendedMasterportalapiMarkers( .filter(layerFilter) .forEach((layer) => { // only vector layers reach this - const source = (layer as VectorLayer).getSource() + const source = (layer as VectorLayer).getSource() if (source !== null) { // @ts-expect-error | Undocumented hook. source.geometryFunction = @@ -110,8 +110,8 @@ export function useExtendedMasterportalapiMarkers( (feature: Feature) => isVisible(feature) ? feature.getGeometry() : null } - const originalStyleFunction = (layer as VectorLayer).getStyle() - ;(layer as VectorLayer).setStyle((feature) => { + const originalStyleFunction = (layer as VectorLayer).getStyle() + ;(layer as VectorLayer).setStyle((feature) => { if ( typeof isSelectable === 'undefined' || isSelectable(feature as Feature) diff --git a/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/setLayerId.ts b/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/setLayerId.ts index a3fc7b87e..d8f4d0977 100644 --- a/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/setLayerId.ts +++ b/packages/core/src/vuePlugins/actions/useExtendedMasterportalapiMarkers/setLayerId.ts @@ -13,7 +13,7 @@ export const setLayerId = (map: Map, feature: Feature): void => { .getArray() .find((layer) => { if (layer instanceof VectorLayer) { - let step: VectorLayer | VectorSource | Cluster = layer + let step: VectorLayer | VectorSource | Cluster = layer while (step instanceof VectorLayer || step instanceof Cluster) { // @ts-expect-error | Clusters in masterportalapi always have a source. step = step.getSource() diff --git a/packages/lib/getCluster/CHANGELOG.md b/packages/lib/getCluster/CHANGELOG.md index b21d6d0ef..fcb92dff6 100644 --- a/packages/lib/getCluster/CHANGELOG.md +++ b/packages/lib/getCluster/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency of `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/lib/getCluster/package.json b/packages/lib/getCluster/package.json index 30c473d0a..dc0cff2d6 100644 --- a/packages/lib/getCluster/package.json +++ b/packages/lib/getCluster/package.json @@ -19,6 +19,6 @@ "directory": "packages/lib/getCluster" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } } diff --git a/packages/lib/getFeatures/CHANGELOG.md b/packages/lib/getFeatures/CHANGELOG.md index e2bf36a15..5a8405cfe 100644 --- a/packages/lib/getFeatures/CHANGELOG.md +++ b/packages/lib/getFeatures/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency of `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/lib/getFeatures/package.json b/packages/lib/getFeatures/package.json index cd96415db..d7b7ca615 100644 --- a/packages/lib/getFeatures/package.json +++ b/packages/lib/getFeatures/package.json @@ -20,7 +20,7 @@ "directory": "packages/lib/getFeatures" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" }, "devDependencies": { "@polar/lib-custom-types": "^1.5.0" diff --git a/packages/lib/invisibleStyle/CHANGELOG.md b/packages/lib/invisibleStyle/CHANGELOG.md index 7f002cbc8..bcde7f26e 100644 --- a/packages/lib/invisibleStyle/CHANGELOG.md +++ b/packages/lib/invisibleStyle/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/lib/invisibleStyle/package.json b/packages/lib/invisibleStyle/package.json index 680df54d0..af3cfcabd 100644 --- a/packages/lib/invisibleStyle/package.json +++ b/packages/lib/invisibleStyle/package.json @@ -20,6 +20,6 @@ "directory": "packages/lib/invisibleStyle" }, "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" } } diff --git a/packages/lib/passesBoundaryCheck/CHANGELOG.md b/packages/lib/passesBoundaryCheck/CHANGELOG.md index 8a100a82e..be2f0f5b3 100644 --- a/packages/lib/passesBoundaryCheck/CHANGELOG.md +++ b/packages/lib/passesBoundaryCheck/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Chore: Upgrade devDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: `passesBoundaryCheck` now only resolves true or false when the result is indicative of the true-ness of the coordinate being contained within the boundary, and symbols indicative of occurring errors in other scenarios. (Previously: Errors resolved false.) It is now up to using plugins to decide how to respond to errors. diff --git a/packages/lib/passesBoundaryCheck/index.ts b/packages/lib/passesBoundaryCheck/index.ts index a5f69dc4d..d1cf2d27d 100644 --- a/packages/lib/passesBoundaryCheck/index.ts +++ b/packages/lib/passesBoundaryCheck/index.ts @@ -1,4 +1,4 @@ -import { Feature, Map } from 'ol' +import { Map } from 'ol' import { Coordinate } from 'ol/coordinate' import VectorLayer from 'ol/layer/Vector' import VectorSource from 'ol/source/Vector' @@ -50,9 +50,7 @@ export const passesBoundaryCheck = async ( const boundaryLayer = map .getLayers() .getArray() - .find( - (layer) => layer.get('id') === boundaryLayerId - ) as VectorLayer + .find((layer) => layer.get('id') === boundaryLayerId) as VectorLayer if (!boundaryLayer) { console.error( diff --git a/packages/lib/passesBoundaryCheck/package.json b/packages/lib/passesBoundaryCheck/package.json index 162f11774..b349e26cf 100644 --- a/packages/lib/passesBoundaryCheck/package.json +++ b/packages/lib/passesBoundaryCheck/package.json @@ -14,6 +14,6 @@ }, "devDependencies": { "@polar/lib-custom-types": "^1.1.0", - "ol": "^9.2.4" + "ol": "^10.3.1" } } diff --git a/packages/plugins/AddressSearch/CHANGELOG.md b/packages/plugins/AddressSearch/CHANGELOG.md index bc2078618..0b22e6267 100644 --- a/packages/plugins/AddressSearch/CHANGELOG.md +++ b/packages/plugins/AddressSearch/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade `@masterportal/masterportalapi` from `2.40.0` to `2.45.0` and subsequently `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade `@masterportal/masterportalapi` from `2.8.0` to `2.40.0` and subsequently `ol` from `7.1.0` to `^9.2.4`. diff --git a/packages/plugins/AddressSearch/package.json b/packages/plugins/AddressSearch/package.json index a06a2ebdd..461e31ec9 100644 --- a/packages/plugins/AddressSearch/package.json +++ b/packages/plugins/AddressSearch/package.json @@ -26,9 +26,9 @@ "CHANGELOG.md" ], "peerDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, diff --git a/packages/plugins/Attributions/CHANGELOG.md b/packages/plugins/Attributions/CHANGELOG.md index 164edbff6..38a680147 100644 --- a/packages/plugins/Attributions/CHANGELOG.md +++ b/packages/plugins/Attributions/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Chore: Upgrade `ol` from `^9.2.4` to `^10.3.1`. + ## 1.3.0 - Feature: Add new option `'footer'` to configuration parameter `renderType` that changes the attributions to be displayed as a small version of the information box that is always visible. diff --git a/packages/plugins/Attributions/package.json b/packages/plugins/Attributions/package.json index e9cdc451b..f387a4767 100644 --- a/packages/plugins/Attributions/package.json +++ b/packages/plugins/Attributions/package.json @@ -32,6 +32,6 @@ "devDependencies": { "@polar/lib-custom-types": "^1.5.0", "@polar/lib-test-mount-parameters": "^1.3.0", - "ol": "^9.2.4" + "ol": "^10.3.1" } } diff --git a/packages/plugins/Draw/CHANGELOG.md b/packages/plugins/Draw/CHANGELOG.md index 605bc40ed..9d3b19e47 100644 --- a/packages/plugins/Draw/CHANGELOG.md +++ b/packages/plugins/Draw/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/plugins/Draw/package.json b/packages/plugins/Draw/package.json index fc31d2c6a..f73c84968 100644 --- a/packages/plugins/Draw/package.json +++ b/packages/plugins/Draw/package.json @@ -25,7 +25,7 @@ ], "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, diff --git a/packages/plugins/Draw/src/store/createInteractions/createDeleteInteractions.ts b/packages/plugins/Draw/src/store/createInteractions/createDeleteInteractions.ts index 999a754a7..409a71b0f 100644 --- a/packages/plugins/Draw/src/store/createInteractions/createDeleteInteractions.ts +++ b/packages/plugins/Draw/src/store/createInteractions/createDeleteInteractions.ts @@ -3,11 +3,10 @@ import VectorLayer from 'ol/layer/Vector' import Interaction from 'ol/interaction/Interaction' import { DragBox, Select } from 'ol/interaction' import { platformModifierKeyOnly } from 'ol/events/condition' -import { Feature } from 'ol' export default function ( drawSource: VectorSource, - drawLayer: VectorLayer + drawLayer: VectorLayer ): Interaction[] { const selectInteraction = new Select({ layers: [drawLayer] }) const selectedFeatures = selectInteraction.getFeatures() diff --git a/packages/plugins/Draw/src/types.ts b/packages/plugins/Draw/src/types.ts index 654697c7c..167a5660a 100644 --- a/packages/plugins/Draw/src/types.ts +++ b/packages/plugins/Draw/src/types.ts @@ -17,7 +17,7 @@ export type Mode = 'none' | 'draw' | 'edit' | 'delete' export interface CreateInteractionsPayload { drawSource: VectorSource - drawLayer: VectorLayer + drawLayer: VectorLayer } export interface DrawState { diff --git a/packages/plugins/Filter/CHANGELOG.md b/packages/plugins/Filter/CHANGELOG.md index ad3afcf3c..9e6daa3e2 100644 --- a/packages/plugins/Filter/CHANGELOG.md +++ b/packages/plugins/Filter/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/plugins/Filter/package.json b/packages/plugins/Filter/package.json index 648938969..edc3d9a8c 100644 --- a/packages/plugins/Filter/package.json +++ b/packages/plugins/Filter/package.json @@ -19,7 +19,7 @@ ], "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, diff --git a/packages/plugins/GeoLocation/CHANGELOG.md b/packages/plugins/GeoLocation/CHANGELOG.md index fa646633b..0d674fd50 100644 --- a/packages/plugins/GeoLocation/CHANGELOG.md +++ b/packages/plugins/GeoLocation/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 1.4.0 - Feature: Position is now tracked when user is outside of the boundary layer but inside the map extent. diff --git a/packages/plugins/GeoLocation/package.json b/packages/plugins/GeoLocation/package.json index 15f00b713..d5138324b 100644 --- a/packages/plugins/GeoLocation/package.json +++ b/packages/plugins/GeoLocation/package.json @@ -24,7 +24,7 @@ "CHANGELOG.md" ], "peerDependencies": { - "ol": "^9.2.4" + "ol": "^10.3.1" }, "devDependencies": { "@polar/lib-passes-boundary-check": "^2.0.0", diff --git a/packages/plugins/GeoLocation/src/types.ts b/packages/plugins/GeoLocation/src/types.ts index 53cd10cd0..76f54d899 100644 --- a/packages/plugins/GeoLocation/src/types.ts +++ b/packages/plugins/GeoLocation/src/types.ts @@ -1,7 +1,7 @@ -import Geolocation from 'ol/Geolocation.js' -import VectorLayer from 'ol/layer/Vector' -import Feature from 'ol/Feature' import { GeoLocationConfiguration } from '@polar/lib-custom-types' +import Feature from 'ol/Feature' +import Geolocation from 'ol/Geolocation' +import VectorLayer from 'ol/layer/Vector' export interface GeoLocationState { geolocation: Geolocation | null @@ -17,7 +17,7 @@ export interface GeoLocationGetters extends GeoLocationState { toastAction: string | undefined configuredEpsg: string checkLocationInitially: boolean - geoLocationMarkerLayer: VectorLayer + geoLocationMarkerLayer: VectorLayer keepCentered: boolean markerFeature: Feature renderType: string diff --git a/packages/plugins/Gfi/CHANGELOG.md b/packages/plugins/Gfi/CHANGELOG.md index 6d9c6e852..a1f04bc47 100644 --- a/packages/plugins/Gfi/CHANGELOG.md +++ b/packages/plugins/Gfi/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade `@masterportal/masterportalapi` from `2.40.0` to `2.45.0` and subsequently `ol` from `^9.2.4` to `^10.3.1`. + ## 2.1.0 - Feature: Add new action `setFeatureInformation` to be able to set feature information in the store and trigger all relevant processes so that the information displayed to the user is as if he has selected the features himself. diff --git a/packages/plugins/Gfi/package.json b/packages/plugins/Gfi/package.json index fc6192af5..e5fd95c38 100644 --- a/packages/plugins/Gfi/package.json +++ b/packages/plugins/Gfi/package.json @@ -24,9 +24,9 @@ "CHANGELOG.md" ], "peerDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, diff --git a/packages/plugins/Gfi/src/store/actions/debouncedGfiRequest.ts b/packages/plugins/Gfi/src/store/actions/debouncedGfiRequest.ts index 286e67970..2f6813a6f 100644 --- a/packages/plugins/Gfi/src/store/actions/debouncedGfiRequest.ts +++ b/packages/plugins/Gfi/src/store/actions/debouncedGfiRequest.ts @@ -6,8 +6,7 @@ import { MapConfig, PolarActionContext, } from '@polar/lib-custom-types' -import { Map, Feature } from 'ol' -import { Geometry } from 'ol/geom' +import { Map } from 'ol' import VectorLayer from 'ol/layer/Vector' import compare from 'just-compare' import { filterFeatures } from '../../utils/filterFeatures' @@ -125,7 +124,7 @@ const errorSymbol = (err) => Symbol(err) */ // eslint-disable-next-line max-lines-per-function const gfiRequest = - (featureDisplayLayer: VectorLayer>) => + (featureDisplayLayer: VectorLayer) => async ( { commit, @@ -173,6 +172,5 @@ const gfiRequest = ) } -export const debouncedGfiRequest = ( - featureDisplayLayer: VectorLayer> -) => debounce(gfiRequest(featureDisplayLayer), 50) +export const debouncedGfiRequest = (featureDisplayLayer: VectorLayer) => + debounce(gfiRequest(featureDisplayLayer), 50) diff --git a/packages/plugins/Gfi/src/utils/displayFeatureLayer.ts b/packages/plugins/Gfi/src/utils/displayFeatureLayer.ts index 08b9edbb0..88b75608b 100644 --- a/packages/plugins/Gfi/src/utils/displayFeatureLayer.ts +++ b/packages/plugins/Gfi/src/utils/displayFeatureLayer.ts @@ -26,7 +26,7 @@ function isVectorSource(source): source is Vector { /** * reset feature layer's features. */ -export function clear(featureDisplayLayer: VectorLayer): void { +export function clear(featureDisplayLayer: VectorLayer): void { const source = featureDisplayLayer.getSource() if (isVectorSource(source)) { source.clear() @@ -38,10 +38,11 @@ export function clear(featureDisplayLayer: VectorLayer): void { */ export function addFeature( feature: GeoJsonFeature, - featureDisplayLayer: VectorLayer + featureDisplayLayer: VectorLayer ): void { const source = featureDisplayLayer.getSource() if (isVectorSource(source)) { - source.addFeature(new GeoJSON().readFeature(feature)) + // Since ol@10, readFeature may also return a Feature[]? + source.addFeature(new GeoJSON().readFeature(feature) as Feature) } } diff --git a/packages/plugins/Gfi/src/utils/renderFeatures.ts b/packages/plugins/Gfi/src/utils/renderFeatures.ts index 0f0f8ad49..cba31f8b2 100644 --- a/packages/plugins/Gfi/src/utils/renderFeatures.ts +++ b/packages/plugins/Gfi/src/utils/renderFeatures.ts @@ -1,12 +1,10 @@ import VectorLayer from 'ol/layer/Vector' -import { Feature } from 'ol' -import { Geometry } from 'ol/geom' import { FeaturesByLayerId } from '../types' import { addFeature } from './displayFeatureLayer' import { filterFeatures } from './filterFeatures' export function renderFeatures( - featureDisplayLayer: VectorLayer>, + featureDisplayLayer: VectorLayer, geometryLayerKeys: string[], features: FeaturesByLayerId ) { diff --git a/packages/plugins/Gfi/src/utils/requestGfiGeoJson.ts b/packages/plugins/Gfi/src/utils/requestGfiGeoJson.ts index 2ff091bf7..9088c7b2b 100644 --- a/packages/plugins/Gfi/src/utils/requestGfiGeoJson.ts +++ b/packages/plugins/Gfi/src/utils/requestGfiGeoJson.ts @@ -25,7 +25,7 @@ export default ({ }: { map: Map coordinateOrExtent: [number, number] | [number, number, number, number] - layer: VectorLayer + layer: VectorLayer }): Promise => Promise.resolve( (coordinateOrExtent.length === 2 diff --git a/packages/plugins/LayerChooser/CHANGELOG.md b/packages/plugins/LayerChooser/CHANGELOG.md index c93f8f8d2..bb4827c6d 100644 --- a/packages/plugins/LayerChooser/CHANGELOG.md +++ b/packages/plugins/LayerChooser/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade `@masterportal/masterportalapi` from `2.40.0` to `2.45.0` and subsequently `ol` from `^9.2.4` to `^10.3.1`. + ## 1.2.1 - Fix: Move relevant documentation of `layers` to `@polar/core`. diff --git a/packages/plugins/LayerChooser/package.json b/packages/plugins/LayerChooser/package.json index 8fd0fae3b..21d790c3c 100644 --- a/packages/plugins/LayerChooser/package.json +++ b/packages/plugins/LayerChooser/package.json @@ -24,9 +24,9 @@ "CHANGELOG.md" ], "peerDependencies": { - "@masterportal/masterportalapi": "2.40.0", + "@masterportal/masterportalapi": "2.45.0", "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, diff --git a/packages/plugins/Pins/CHANGELOG.md b/packages/plugins/Pins/CHANGELOG.md index 1bb549452..611777311 100644 --- a/packages/plugins/Pins/CHANGELOG.md +++ b/packages/plugins/Pins/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/plugins/Pins/package.json b/packages/plugins/Pins/package.json index f5a672c5e..1a9e82b92 100644 --- a/packages/plugins/Pins/package.json +++ b/packages/plugins/Pins/package.json @@ -25,7 +25,7 @@ ], "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, diff --git a/packages/plugins/Pins/src/store/index.ts b/packages/plugins/Pins/src/store/index.ts index 6cea4486d..e5a6a892b 100644 --- a/packages/plugins/Pins/src/store/index.ts +++ b/packages/plugins/Pins/src/store/index.ts @@ -18,7 +18,7 @@ import getters from './getters' // OK for module creation // eslint-disable-next-line max-lines-per-function export const makeStoreModule = () => { - let pinsLayer: VectorLayer> + let pinsLayer: VectorLayer const move = new Select({ layers: (l) => l === pinsLayer, style: null, diff --git a/packages/plugins/ReverseGeocoder/CHANGELOG.md b/packages/plugins/ReverseGeocoder/CHANGELOG.md index 9f0390229..88e747002 100644 --- a/packages/plugins/ReverseGeocoder/CHANGELOG.md +++ b/packages/plugins/ReverseGeocoder/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.0 - Breaking: Upgrade peerDependency `ol` from `^7.1.0` to `^9.2.4`. diff --git a/packages/plugins/ReverseGeocoder/package.json b/packages/plugins/ReverseGeocoder/package.json index ebaec4a0a..c856460f7 100644 --- a/packages/plugins/ReverseGeocoder/package.json +++ b/packages/plugins/ReverseGeocoder/package.json @@ -23,7 +23,7 @@ "CHANGELOG.md" ], "peerDependencies": { - "ol": "^9.2.4", + "ol": "^10.3.1", "xml2js": "^0.4.23" }, "devDependencies": { diff --git a/packages/plugins/Scale/CHANGELOG.md b/packages/plugins/Scale/CHANGELOG.md index d9a345919..18be58020 100644 --- a/packages/plugins/Scale/CHANGELOG.md +++ b/packages/plugins/Scale/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Breaking: Upgrade peerDependency `ol` from `^9.2.4` to `^10.3.1`. + ## 2.0.1 - Fix: Add missing translations for scale switcher. diff --git a/packages/plugins/Scale/package.json b/packages/plugins/Scale/package.json index d331904ca..4d3248634 100644 --- a/packages/plugins/Scale/package.json +++ b/packages/plugins/Scale/package.json @@ -25,7 +25,7 @@ "peerDependencies": { "@repositoryname/vuex-generators": "^1.1.2", "i18next": "^23.x", - "ol": "^9.2.4", + "ol": "^10.3.1", "vue": "^2.6.14", "vuex": "^3.6.2" }, From 86eb35174f5c6e002db1dfe2522e55bc5da1fae6 Mon Sep 17 00:00:00 2001 From: Pascal Roehling Date: Thu, 30 Jan 2025 16:24:19 +0100 Subject: [PATCH 3/8] Remove unused import --- packages/clients/meldemichel/src/polar-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/clients/meldemichel/src/polar-client.ts b/packages/clients/meldemichel/src/polar-client.ts index dd0bf2af7..13f73b9d5 100644 --- a/packages/clients/meldemichel/src/polar-client.ts +++ b/packages/clients/meldemichel/src/polar-client.ts @@ -1,7 +1,7 @@ import core, { NineLayoutTag } from '@polar/core' import merge from 'lodash.merge' import { Vector } from 'ol/layer' -import { Feature, Map } from 'ol' +import { Map } from 'ol' import { MapInstance } from '@polar/core/src/types' import packageInfo from '../package.json' import { MODE } from './enums' From 66879b91888bdcccb315bf8e7e1a5eb139c5c96b Mon Sep 17 00:00:00 2001 From: Dennis Sen <108349707+warm-coolguy@users.noreply.github.com> Date: Mon, 3 Feb 2025 06:59:47 +0100 Subject: [PATCH 4/8] Update package.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apply suggestion "remove optional npx" Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com> --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 16883bc41..7188bf30e 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ "pages:build": "rimraf ./pages/docs && npm run generic:build && bash ./scripts/buildPages.sh", "pages:build:serve": "http-server pages -o index.html", "clean": "nx reset && rimraf --glob packages/**/{.cache,dist,docs} && rimraf --glob {.cache,dist} && node ./scripts/clean", - "docs:afm": "npx tsx ./scripts/makeDocs afm", - "docs:generic": "npx tsx ./scripts/makeDocs generic", - "docs:meldemichel": "npx tsx ./scripts/makeDocs meldemichel && npm run meldemichel:build && cp -r ./packages/clients/meldemichel/dist ./packages/clients/meldemichel/example ./packages/clients/meldemichel/docs", - "docs:snowbox": "npx tsx ./scripts/makeDocs snowbox", - "docs:textLocator": "npx tsx ./scripts/makeDocs textLocator && npm run textLocator:build && cp -r ./packages/clients/textLocator/dist ./packages/clients/textLocator/docs", + "docs:afm": "tsx ./scripts/makeDocs afm", + "docs:generic": "tsx ./scripts/makeDocs generic", + "docs:meldemichel": "tsx ./scripts/makeDocs meldemichel && npm run meldemichel:build && cp -r ./packages/clients/meldemichel/dist ./packages/clients/meldemichel/example ./packages/clients/meldemichel/docs", + "docs:snowbox": "tsx ./scripts/makeDocs snowbox", + "docs:textLocator": "tsx ./scripts/makeDocs textLocator && npm run textLocator:build && cp -r ./packages/clients/textLocator/dist ./packages/clients/textLocator/docs", "lint": "npx eslint . --cache --ext .js,.ts,.vue", "lint:ci": "npx eslint . --ext .js,.ts,.vue", "lint:fix": "npx eslint . --fix --cache --ext .js,.ts,.vue", From 15487b90f8693b5c4cc3bebe77187e3aec4b6f22 Mon Sep 17 00:00:00 2001 From: Dennis Sen <108349707+warm-coolguy@users.noreply.github.com> Date: Mon, 3 Feb 2025 07:00:08 +0100 Subject: [PATCH 5/8] Update scripts/makeDocs.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apply suggestion "remove optional npx" Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com> --- scripts/makeDocs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makeDocs.ts b/scripts/makeDocs.ts index 69be2bc03..60ea82fd1 100644 --- a/scripts/makeDocs.ts +++ b/scripts/makeDocs.ts @@ -16,7 +16,7 @@ * longer publish a client's API.md, as it will be included twice. (Generated * docs and .md.) * - * Call like `npx tsx ./scripts/makeDocs.ts ./path/to/client`. + * Call like `tsx ./scripts/makeDocs.ts ./path/to/client`. * * Headings in markdowns will get a slugified ID by markdown-it-anchor to be linkable. * It uses the default slugify function: From 2a8c4c9ec37d11672d92fb7b2104d34f7ea01921 Mon Sep 17 00:00:00 2001 From: Dennis Sen Date: Mon, 3 Feb 2025 07:01:18 +0100 Subject: [PATCH 6/8] add missing type LanguageOption --- packages/clients/dish/src/language.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/clients/dish/src/language.ts b/packages/clients/dish/src/language.ts index 5a6d6f4ef..f1372b375 100644 --- a/packages/clients/dish/src/language.ts +++ b/packages/clients/dish/src/language.ts @@ -1,4 +1,6 @@ -const language = [ +import { LanguageOption } from '@polar/lib-custom-types' + +const language: LanguageOption[] = [ { type: 'de', resources: { From 7d94f4929540313cb194da7889e55f8ba4683a30 Mon Sep 17 00:00:00 2001 From: Pascal Roehling Date: Mon, 3 Feb 2025 11:22:05 +0100 Subject: [PATCH 7/8] Add missing translations in German --- packages/plugins/Draw/src/language.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/plugins/Draw/src/language.ts b/packages/plugins/Draw/src/language.ts index b987c4e3d..7e5b86766 100644 --- a/packages/plugins/Draw/src/language.ts +++ b/packages/plugins/Draw/src/language.ts @@ -24,8 +24,10 @@ const language: LanguageOption[] = [ }, measureMode: { none: 'Keine Messung', - metres: 'm / m²', - kilometres: 'km / km²', + metres: 'm', + metresArea: 'm / m²', + kilometres: 'km', + kilometresArea: 'km / km²', hectares: 'km / ha', }, options: { From fa4b3e4c97c0fba57a6f662d6b674df8992fa090 Mon Sep 17 00:00:00 2001 From: Pascal Roehling Date: Mon, 3 Feb 2025 11:45:44 +0100 Subject: [PATCH 8/8] Move changelog entry to the correct position --- packages/core/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 6eccfd94e..79a52aad2 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,11 +3,11 @@ ## unpublished - Feature: Add new reusable component `RadioCard.vue` to the package. +- Fix: Do not break themes of external Vuetify apps. ## 2.0.1 - Fix: Add `crossOrigin` differently to layer sources that are an instance of `ImageWMS` as they require it being set as `crossOrigin_` to be recognized. - Fix: Add missing `font-family` css so that tooltips are always `Arial, sans-serif`. -- Fix: Do not break themes of external Vuetify apps. ## 2.0.0