From 56003816ac56fd1f0f95df020957349ec226a4be Mon Sep 17 00:00:00 2001 From: Werner Kramer Date: Thu, 19 Sep 2024 12:51:16 +0200 Subject: [PATCH] WIP: TimeZone support --- package-lock.json | 502 ++++++++++++------ package.json | 11 +- src/App.vue | 8 +- src/assets/DefaultUserSettings.json | 36 +- src/components/charts/TimeSeriesChart.vue | 2 + .../user-settings/UserSettingsMenu.vue | 16 +- src/locales/index.ts | 12 +- src/plugins/vuetify.ts | 21 +- src/stores/userSettings.ts | 1 + src/views/AboutView.vue | 20 +- vite.config.ts | 4 +- 11 files changed, 442 insertions(+), 191 deletions(-) diff --git a/package-lock.json b/package-lock.json index a06e1c613..57dc1348d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "fews-weboc", "version": "1.1.0-rc.0", "dependencies": { + "@date-io/luxon": "^3.0.0", "@deltares/fews-pi-requests": "^1.1.3", "@deltares/fews-ssd-requests": "^1.0.1", "@deltares/fews-ssd-webcomponent": "^1.0.1", @@ -32,14 +33,14 @@ "oidc-client-ts": "^2.4.0", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", - "terra-draw": "^0.0.1-alpha.58", + "terra-draw": "^0.0.1-alpha.68", "typescript-json-serializer": "^6.0.1", "vue": "^3.4.21", "vue-i18n": "^9.9.1", "vue-maplibre-gl": "^3.1.3", "vue-router": "^4.3.0", "vue-slider-component": "^4.1.0-beta.7", - "vuetify": "^3.5.9" + "vuetify": "^3.6.9" }, "devDependencies": { "@mdi/font": "^7.4.47", @@ -64,9 +65,9 @@ "prettier": "3.2.5", "sonarqube-scanner": "^3.3.0", "typescript": "^5.4.2", - "vite": "^5.1.6", + "vite": "^5.2.13", "vite-plugin-vuetify": "^2.0.3", - "vitest": "^1.3.1", + "vitest": "^1.6.0", "vue-tsc": "^2.0.6" } }, @@ -90,6 +91,27 @@ "node": ">=6.0.0" } }, + "node_modules/@date-io/core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@date-io/core/-/core-3.0.0.tgz", + "integrity": "sha512-S3j+IAQVBYNkQzchVVhX40eBkGDreBpScy9RXwTS5j2+k07+62pMVPisQ44Gq76Rqy5AOG/EZXCwBpY/jbemvA==" + }, + "node_modules/@date-io/luxon": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@date-io/luxon/-/luxon-3.0.0.tgz", + "integrity": "sha512-AnTb5TowMOgBQfWDCL94jdWHGLWQ/ToFy6Z13/iPD219A3WQmcQpEoS/RDVcB1fiyknC+wLE2M4t12WTHOmQxw==", + "dependencies": { + "@date-io/core": "^3.0.0" + }, + "peerDependencies": { + "luxon": "^1.21.3 || ^2.x || ^3.x" + }, + "peerDependenciesMeta": { + "luxon": { + "optional": true + } + } + }, "node_modules/@deltares/fews-pi-requests": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@deltares/fews-pi-requests/-/fews-pi-requests-1.1.3.tgz", @@ -304,12 +326,12 @@ "dev": true }, "node_modules/@intlify/core-base": { - "version": "9.10.2", - "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.10.2.tgz", - "integrity": "sha512-HGStVnKobsJL0DoYIyRCGXBH63DMQqEZxDUGrkNI05FuTcruYUtOAxyL3zoAZu/uDGO6mcUvm3VXBaHG2GdZCg==", + "version": "9.13.1", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.13.1.tgz", + "integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==", "dependencies": { - "@intlify/message-compiler": "9.10.2", - "@intlify/shared": "9.10.2" + "@intlify/message-compiler": "9.13.1", + "@intlify/shared": "9.13.1" }, "engines": { "node": ">= 16" @@ -319,11 +341,11 @@ } }, "node_modules/@intlify/message-compiler": { - "version": "9.10.2", - "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.10.2.tgz", - "integrity": "sha512-ntY/kfBwQRtX5Zh6wL8cSATujPzWW2ZQd1QwKyWwAy5fMqJyyixHMeovN4fmEyCqSu+hFfYOE63nU94evsy4YA==", + "version": "9.13.1", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.13.1.tgz", + "integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==", "dependencies": { - "@intlify/shared": "9.10.2", + "@intlify/shared": "9.13.1", "source-map-js": "^1.0.2" }, "engines": { @@ -334,9 +356,9 @@ } }, "node_modules/@intlify/shared": { - "version": "9.10.2", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.10.2.tgz", - "integrity": "sha512-ttHCAJkRy7R5W2S9RVnN9KYQYPIpV2+GiS79T4EE37nrPyH6/1SrOh3bmdCRC1T3ocL8qCDx7x2lBJ0xaITU7Q==", + "version": "9.13.1", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.13.1.tgz", + "integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==", "engines": { "node": ">= 16" }, @@ -687,6 +709,214 @@ "node": ">=16" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -3047,13 +3277,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz", - "integrity": "sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", "dev": true, "dependencies": { - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", "chai": "^4.3.10" }, "funding": { @@ -3061,12 +3291,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.1.tgz", - "integrity": "sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", + "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", "dev": true, "dependencies": { - "@vitest/utils": "1.3.1", + "@vitest/utils": "1.6.0", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -3102,9 +3332,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.1.tgz", - "integrity": "sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", + "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -3116,9 +3346,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.1.tgz", - "integrity": "sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", + "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -3128,9 +3358,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.1.tgz", - "integrity": "sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", + "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -4316,9 +4546,9 @@ "dev": true }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "dependencies": { "type-detect": "^4.0.0" @@ -4561,7 +4791,7 @@ "version": "0.20.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", - "dev": true, + "devOptional": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -6821,9 +7051,9 @@ } }, "node_modules/postcss": { - "version": "8.4.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", - "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "funding": [ { "type": "opencollective", @@ -6841,7 +7071,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -6989,9 +7219,9 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/reflect-metadata": { @@ -7077,9 +7307,9 @@ "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" }, "node_modules/rollup": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", - "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", "devOptional": true, "dependencies": { "@types/estree": "1.0.5" @@ -7092,35 +7322,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.5", - "@rollup/rollup-android-arm64": "4.9.5", - "@rollup/rollup-darwin-arm64": "4.9.5", - "@rollup/rollup-darwin-x64": "4.9.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", - "@rollup/rollup-linux-arm64-gnu": "4.9.5", - "@rollup/rollup-linux-arm64-musl": "4.9.5", - "@rollup/rollup-linux-riscv64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-musl": "4.9.5", - "@rollup/rollup-win32-arm64-msvc": "4.9.5", - "@rollup/rollup-win32-ia32-msvc": "4.9.5", - "@rollup/rollup-win32-x64-msvc": "4.9.5", + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", "fsevents": "~2.3.2" } }, - "node_modules/rollup/node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz", - "integrity": "sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/rrweb-cssom": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", @@ -7369,9 +7589,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "engines": { "node": ">=0.10.0" } @@ -7599,9 +7819,9 @@ "dev": true }, "node_modules/terra-draw": { - "version": "0.0.1-alpha.58", - "resolved": "https://registry.npmjs.org/terra-draw/-/terra-draw-0.0.1-alpha.58.tgz", - "integrity": "sha512-GYADSUKp5BN7ARv8t30vwe3yJoUJoZMGa8smcPJe6ZrqLevo8DzQdCWAk9CrZPk3CBtX960+rDgEmlGjNhiwQA==" + "version": "0.0.1-alpha.68", + "resolved": "https://registry.npmjs.org/terra-draw/-/terra-draw-0.0.1-alpha.68.tgz", + "integrity": "sha512-kEpfwGUR75cbysmv9gcSE2vzD69GmgfT2F99z4osFHB6bkQ3lTIgfpgKWjfbpQsuQVWAPU21UEUQdg1GKPqWTg==" }, "node_modules/text-table": { "version": "0.2.0", @@ -7616,9 +7836,9 @@ "dev": true }, "node_modules/tinypool": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.2.tgz", - "integrity": "sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", "dev": true, "engines": { "node": ">=14.0.0" @@ -7866,14 +8086,14 @@ "dev": true }, "node_modules/vite": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.6.tgz", - "integrity": "sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==", + "version": "5.2.13", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.13.tgz", + "integrity": "sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==", "devOptional": true, "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.35", - "rollup": "^4.2.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" @@ -7921,9 +8141,9 @@ } }, "node_modules/vite-node": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.1.tgz", - "integrity": "sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", + "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -7961,60 +8181,6 @@ "vuetify": "^3.0.0" } }, - "node_modules/vite/node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", - "devOptional": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" - } - }, "node_modules/vite/node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -8030,16 +8196,16 @@ } }, "node_modules/vitest": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.1.tgz", - "integrity": "sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", "dev": true, "dependencies": { - "@vitest/expect": "1.3.1", - "@vitest/runner": "1.3.1", - "@vitest/snapshot": "1.3.1", - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -8051,9 +8217,9 @@ "std-env": "^3.5.0", "strip-literal": "^2.0.0", "tinybench": "^2.5.1", - "tinypool": "^0.8.2", + "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.3.1", + "vite-node": "1.6.0", "why-is-node-running": "^2.2.2" }, "bin": { @@ -8068,8 +8234,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.3.1", - "@vitest/ui": "1.3.1", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", "happy-dom": "*", "jsdom": "*" }, @@ -8155,12 +8321,12 @@ } }, "node_modules/vue-i18n": { - "version": "9.10.2", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.10.2.tgz", - "integrity": "sha512-ECJ8RIFd+3c1d3m1pctQ6ywG5Yj8Efy1oYoAKQ9neRdkLbuKLVeW4gaY5HPkD/9ssf1pOnUrmIFjx2/gkGxmEw==", + "version": "9.13.1", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.13.1.tgz", + "integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==", "dependencies": { - "@intlify/core-base": "9.10.2", - "@intlify/shared": "9.10.2", + "@intlify/core-base": "9.13.1", + "@intlify/shared": "9.13.1", "@vue/devtools-api": "^6.5.0" }, "engines": { @@ -8233,9 +8399,9 @@ } }, "node_modules/vuetify": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.5.9.tgz", - "integrity": "sha512-tA3N2uWZFNSZRFNnXN841x4rWozYXKC0fGW/mJIwcKkQiI0+gmVCETtjF8bnOS7L1s0buWzw94uYTlXQa5AQ4w==", + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.6.9.tgz", + "integrity": "sha512-LVIZL0OCwzg3Aw2F8nT1rK/renpTPOcDEPe5E002Vj+VjXwsCNqwwxNteGfrcNlp0vgIJ8WusMvaxp69UJ3NJg==", "engines": { "node": "^12.20 || >=14.13" }, @@ -8245,10 +8411,10 @@ }, "peerDependencies": { "typescript": ">=4.7", - "vite-plugin-vuetify": ">=1.0.0-alpha.12", + "vite-plugin-vuetify": ">=1.0.0", "vue": "^3.3.0", "vue-i18n": "^9.0.0", - "webpack-plugin-vuetify": ">=2.0.0-alpha.11" + "webpack-plugin-vuetify": ">=2.0.0" }, "peerDependenciesMeta": { "typescript": { diff --git a/package.json b/package.json index 31685ec55..c7775c264 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "test-ct": "playwright test -c playwright-ct.config.ts" }, "dependencies": { + "@date-io/luxon": "^3.0.0", "@deltares/fews-pi-requests": "^1.1.3", "@deltares/fews-ssd-requests": "^1.0.1", "@deltares/fews-ssd-webcomponent": "^1.0.1", @@ -41,14 +42,14 @@ "oidc-client-ts": "^2.4.0", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", - "terra-draw": "^0.0.1-alpha.58", + "terra-draw": "^0.0.1-alpha.68", "typescript-json-serializer": "^6.0.1", + "vue": "^3.4.21", "vue-i18n": "^9.9.1", "vue-maplibre-gl": "^3.1.3", "vue-router": "^4.3.0", "vue-slider-component": "^4.1.0-beta.7", - "vue": "^3.4.21", - "vuetify": "^3.5.9" + "vuetify": "^3.6.9" }, "devDependencies": { "@mdi/font": "^7.4.47", @@ -73,9 +74,9 @@ "prettier": "3.2.5", "sonarqube-scanner": "^3.3.0", "typescript": "^5.4.2", - "vite": "^5.1.6", + "vite": "^5.2.13", "vite-plugin-vuetify": "^2.0.3", - "vitest": "^1.3.1", + "vitest": "^1.6.0", "vue-tsc": "^2.0.6" }, "volta": { diff --git a/src/App.vue b/src/App.vue index 49bb38232..f7302044d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,6 +26,7 @@ import { useDark, useToggle } from '@vueuse/core' import '@/assets/fews-flags.css' import { DateTimeFormatWithOverride } from './locales' +import { Settings } from 'luxon' const { locale, getDateTimeFormat, setDateTimeFormat } = useI18n() @@ -88,12 +89,15 @@ function updateDateTimeFormat() { (userSettingsStore.get('ui.locale')?.value as string) ?? 'en' const timeZoneSetting = (userSettingsStore.get('ui.timeZone')?.value as string) ?? 'user' - // Reset locale to force rerender after dateTimeFormat - locale.value = '' let timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone if (timeZoneSetting !== 'user') { + Settings.defaultZone = timeZoneSetting timeZone = timeZoneSetting + } else { + Settings.defaultZone = 'system' } + // Reset locale to force rerender after dateTimeFormat + locale.value = '' const dateTimeFormat = getDateTimeFormat( currentLocale, ) as DateTimeFormatWithOverride diff --git a/src/assets/DefaultUserSettings.json b/src/assets/DefaultUserSettings.json index 28a8961a8..e6ef1036e 100644 --- a/src/assets/DefaultUserSettings.json +++ b/src/assets/DefaultUserSettings.json @@ -87,16 +87,44 @@ "value": "user", "items": [ { - "value": "user" + "value": "user", + "label": "System" }, { - "value": "UTC" + "value": "Etc/GMT+12", + "label": "IDLW" }, { - "value": "Etc/GMT-1" + "value": "Pacific/Kiritimati", + "label": "LINT" }, { - "value": "Europe/Amsterdam" + "value": "Australia/Perth", + "label": "AWST" + }, + { + "value": "Australia/Eucla", + "label": "ACWST" + }, + { + "value": "Australia/Adelaide", + "label": "ACST" + }, + { + "value": "Australia/Sydney", + "label": "AEST" + }, + { + "value": "Australia/Lord_Howe", + "label": "LHST" + }, + { + "value": "Etc/GMT-1", + "label": "GMT+1" + }, + { + "value": "Europe/Amsterdam", + "label": "CET/CEST" } ], "group": "UI" diff --git a/src/components/charts/TimeSeriesChart.vue b/src/components/charts/TimeSeriesChart.vue index 9de4600cd..80a3175c3 100644 --- a/src/components/charts/TimeSeriesChart.vue +++ b/src/components/charts/TimeSeriesChart.vue @@ -121,6 +121,8 @@ onMounted(() => { type: AxisType.time, position: AxisPosition.Bottom, showGrid: true, + timeZone: 'Australia/Eucla', + locale: 'en', }, ], y: [ diff --git a/src/components/user-settings/UserSettingsMenu.vue b/src/components/user-settings/UserSettingsMenu.vue index 495e0c526..bb4623086 100644 --- a/src/components/user-settings/UserSettingsMenu.vue +++ b/src/components/user-settings/UserSettingsMenu.vue @@ -13,7 +13,21 @@ > {{ setting.label }} + + {{ item.icon }} {{ item.value }} {{ - item.value + item.label }} diff --git a/src/locales/index.ts b/src/locales/index.ts index 69d0adb13..3b6140610 100644 --- a/src/locales/index.ts +++ b/src/locales/index.ts @@ -33,13 +33,20 @@ export const datetimeFormats: Record< day: 'numeric', hour: 'numeric', minute: 'numeric', - hour12: true, timeZone: 'UTC', overrideTimeZone: true, }, + 'datetimeslider-UTC': { + year: 'numeric', + month: 'numeric', + day: 'numeric', + hour: 'numeric', + minute: 'numeric', + timeZone: 'UTC' + }, table: { year: 'numeric', - month: 'short', + month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', @@ -51,6 +58,7 @@ export const datetimeFormats: Record< minute: 'numeric', timeZoneName: 'short', timeZone: 'UTC', + hour12: true, overrideTimeZone: true, }, }, diff --git a/src/plugins/vuetify.ts b/src/plugins/vuetify.ts index ac677326b..eda2b44b5 100644 --- a/src/plugins/vuetify.ts +++ b/src/plugins/vuetify.ts @@ -4,16 +4,25 @@ import '@mdi/font/css/materialdesignicons.css' import { createVuetify } from 'vuetify' import * as directives from 'vuetify/directives' import * as components from 'vuetify/components' -import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n' -import { i18n } from './i18n' -import { useI18n } from 'vue-i18n' +// import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n' +// import { i18n } from './i18n' +// import { useI18n } from 'vue-i18n' +import { VTimePicker } from 'vuetify/labs/VTimePicker' + +import LuxonAdapter from '@date-io/luxon' const vuetify = createVuetify({ - components, + components: { + ...components, + VTimePicker, + }, directives, - locale: { - adapter: createVueI18nAdapter({ i18n, useI18n }), + date: { + adapter: LuxonAdapter, }, + // locale: { + // adapter: createVueI18nAdapter({ i18n, useI18n }), + // }, }) export default vuetify diff --git a/src/stores/userSettings.ts b/src/stores/userSettings.ts index c33aa4e1a..82cec4024 100644 --- a/src/stores/userSettings.ts +++ b/src/stores/userSettings.ts @@ -12,6 +12,7 @@ export type UserSettingsType = export interface UserSettingsWithIcon { value: string + label: string, disabled?: boolean icon?: string } diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue index d1dd1a348..030d7050a 100644 --- a/src/views/AboutView.vue +++ b/src/views/AboutView.vue @@ -48,16 +48,32 @@ + + + + {{ myDate }} {{ myDate.zone }} +