diff --git a/frontend/package.json b/frontend/package.json index d634339b..b0d6cd32 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,7 +18,7 @@ "@sveltejs/adapter-auto": "^3.2.5", "@sveltejs/adapter-static": "^3.0.5", "@sveltejs/kit": "^2.5.28", - "@sveltejs/vite-plugin-svelte": "^3.1.2", + "@sveltejs/vite-plugin-svelte": "4.0.0-next.7", "@tailwindcss/typography": "^0.5.15", "@testing-library/svelte": "^5.2.1", "@types/eslint": "^9.6.1", @@ -29,13 +29,13 @@ "eslint-plugin-svelte": "^2.44.0", "flowbite": "^2.5.1", "flowbite-svelte": "^0.46.17", - "flowbite-svelte-icons": "^1.6.1", + "flowbite-svelte-icons": "2.0.0-next.16", "globals": "^15.9.0", "jsdom": "^25.0.1", "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.2.6", "prettier-plugin-tailwindcss": "^0.6.6", - "svelte": "^4.2.19", + "svelte": "5.0.0-next.263", "svelte-check": "^3.8.6", "tailwindcss": "^3.4.13", "typescript": "^5.6.2", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index cbaf27fe..9ca3d16a 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -16,29 +16,29 @@ importers: version: 3.1.3 svelte-i18n: specifier: ^4.0.0 - version: 4.0.0(svelte@4.2.19) + version: 4.0.0(svelte@5.0.0-next.263) devDependencies: '@hey-api/openapi-ts': specifier: 0.53.5 version: 0.53.5(magicast@0.3.5)(typescript@5.6.2) '@sveltejs/adapter-auto': specifier: ^3.2.5 - version: 3.2.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7)) + version: 3.2.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7)) '@sveltejs/adapter-static': specifier: ^3.0.5 - version: 3.0.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7)) + version: 3.0.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7)) '@sveltejs/kit': specifier: ^2.5.28 - version: 2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7) + version: 2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.2 - version: 3.1.2(svelte@4.2.19)(vite@5.4.7) + specifier: 4.0.0-next.7 + version: 4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7) '@tailwindcss/typography': specifier: ^0.5.15 version: 0.5.15(tailwindcss@3.4.13) '@testing-library/svelte': specifier: ^5.2.1 - version: 5.2.1(svelte@4.2.19)(vite@5.4.7)(vitest@2.1.1(jsdom@25.0.1)) + version: 5.2.1(svelte@5.0.0-next.263)(vite@5.4.7)(vitest@2.1.1(jsdom@25.0.1)) '@types/eslint': specifier: ^9.6.1 version: 9.6.1 @@ -56,16 +56,16 @@ importers: version: 9.1.0(eslint@9.11.1(jiti@1.21.6)) eslint-plugin-svelte: specifier: ^2.44.0 - version: 2.44.0(eslint@9.11.1(jiti@1.21.6))(svelte@4.2.19) + version: 2.44.0(eslint@9.11.1(jiti@1.21.6))(svelte@5.0.0-next.263) flowbite: specifier: ^2.5.1 version: 2.5.1(rollup@4.22.4) flowbite-svelte: specifier: ^0.46.17 - version: 0.46.17(rollup@4.22.4)(svelte@4.2.19) + version: 0.46.17(rollup@4.22.4)(svelte@5.0.0-next.263) flowbite-svelte-icons: - specifier: ^1.6.1 - version: 1.6.1(svelte@4.2.19)(tailwind-merge@2.5.2)(tailwindcss@3.4.13) + specifier: 2.0.0-next.16 + version: 2.0.0-next.16(svelte@5.0.0-next.263)(tailwind-merge@2.5.2)(tailwindcss@3.4.13) globals: specifier: ^15.9.0 version: 15.9.0 @@ -77,16 +77,16 @@ importers: version: 3.3.3 prettier-plugin-svelte: specifier: ^3.2.6 - version: 3.2.6(prettier@3.3.3)(svelte@4.2.19) + version: 3.2.6(prettier@3.3.3)(svelte@5.0.0-next.263) prettier-plugin-tailwindcss: specifier: ^0.6.6 - version: 0.6.6(prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@4.2.19))(prettier@3.3.3) + version: 0.6.6(prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@5.0.0-next.263))(prettier@3.3.3) svelte: - specifier: ^4.2.19 - version: 4.2.19 + specifier: 5.0.0-next.263 + version: 5.0.0-next.263 svelte-check: specifier: ^3.8.6 - version: 3.8.6(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@4.2.19) + version: 3.8.6(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@5.0.0-next.263) tailwindcss: specifier: ^3.4.13 version: 3.4.13 @@ -669,19 +669,19 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.3 - '@sveltejs/vite-plugin-svelte-inspector@2.1.0': - resolution: {integrity: sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==} - engines: {node: ^18.0.0 || >=20} + '@sveltejs/vite-plugin-svelte-inspector@3.0.0-next.3': + resolution: {integrity: sha512-kuGJ2CZ5lAw3gKF8Kw0AfKtUJWbwdlDHY14K413B0MCyrzvQvsKTorwmwZcky0+QqY6RnVIZ/5FttB9bQmkLXg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} peerDependencies: - '@sveltejs/vite-plugin-svelte': ^3.0.0 - svelte: ^4.0.0 || ^5.0.0-next.0 + '@sveltejs/vite-plugin-svelte': ^4.0.0-next.0||^4.0.0 + svelte: ^5.0.0-next.96 || ^5.0.0 vite: ^5.0.0 - '@sveltejs/vite-plugin-svelte@3.1.2': - resolution: {integrity: sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==} - engines: {node: ^18.0.0 || >=20} + '@sveltejs/vite-plugin-svelte@4.0.0-next.7': + resolution: {integrity: sha512-yMUnAqquoayvBDztk1rWUgdtvjv7YcHgopCAB7sWl9SQht8U/7lqwTlJU0ZTAY09pFFRe6bbakd7YoiyyIvJiA==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.0 + svelte: ^5.0.0-next.96 || ^5.0.0 vite: ^5.0.0 '@tailwindcss/typography@0.5.15': @@ -834,6 +834,11 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-typescript@1.4.13: + resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==} + peerDependencies: + acorn: '>=8.9.0' + acorn@8.12.1: resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} @@ -991,9 +996,6 @@ packages: resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} engines: {node: '>=0.10'} - code-red@1.0.4: - resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} - color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -1037,10 +1039,6 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -1237,6 +1235,9 @@ packages: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} + esrap@1.2.2: + resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==} + esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -1303,12 +1304,13 @@ packages: flowbite-datepicker@1.3.0: resolution: {integrity: sha512-CLVqzuoE2vkUvWYK/lJ6GzT0be5dlTbH3uuhVwyB67+PjqJWABm2wv68xhBf5BqjpBxvTSQ3mrmLHpPJ2tvrSQ==} - flowbite-svelte-icons@1.6.1: - resolution: {integrity: sha512-Kw/7BzA6fqlFq7tBNudwX0KVU4cbyyXcMcgHTraMwGBtvBQan0RKMbvWwqm4JZNvLGAvRv1BM2EF7rzo/oam1Q==} + flowbite-svelte-icons@2.0.0-next.16: + resolution: {integrity: sha512-Zovg4N1Fb9Jt15yLMs5KhbR4EQ0X6L3eEXtDzKygdEcQ+GxP4Ezg7tyACEeqzfKDdnFTfussya0rFZw4B/wpdQ==} + engines: {node: '>=18.0.0', npm: '>=7.0.0'} peerDependencies: - svelte: ^3.54.0 || ^4.0.0 || ^5.0.0 - tailwind-merge: ^2.0.0 - tailwindcss: ^3.3.2 + svelte: ^5.0.0 || ^5.0.0-next.1 + tailwind-merge: ^2.3.0 + tailwindcss: ^3.4.3 flowbite-svelte@0.46.17: resolution: {integrity: sha512-NueTRkYw7Alk6DAqcEZIOXmqsdhNNjg+LxAb2wfzd/LAJML6I0kpbOJkv2cIojkLB90Er+nrEs0zMgmxrY/gfA==} @@ -1620,9 +1622,6 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} - mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - memoizee@0.4.17: resolution: {integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==} engines: {node: '>=0.12'} @@ -1823,9 +1822,6 @@ packages: perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} - periscopic@3.1.0: - resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} - picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} @@ -2157,12 +2153,6 @@ packages: svelte: optional: true - svelte-hmr@0.16.0: - resolution: {integrity: sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==} - engines: {node: ^12.20 || ^14.13.1 || >= 16} - peerDependencies: - svelte: ^3.19.0 || ^4.0.0 - svelte-i18n@4.0.0: resolution: {integrity: sha512-4vivjKZADUMRIhTs38JuBNy3unbnh9AFRxWFLxq62P4NHic+/BaIZZlAsvqsCdnp7IdJf5EoSiH6TNdItcjA6g==} engines: {node: '>= 16'} @@ -2207,9 +2197,9 @@ packages: typescript: optional: true - svelte@4.2.19: - resolution: {integrity: sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==} - engines: {node: '>=16'} + svelte@5.0.0-next.263: + resolution: {integrity: sha512-vusQUBK3fIazd8D1uDP/r2y9aHNCKwmsG8rjOFQ5dgx7w/uuHF29tt+onVFlbRgaudlFwpjLNo3OVylrhD6zoQ==} + engines: {node: '>=18'} svg.draggable.js@2.2.2: resolution: {integrity: sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==} @@ -2412,8 +2402,8 @@ packages: terser: optional: true - vitefu@0.2.5: - resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} + vitefu@1.0.2: + resolution: {integrity: sha512-0/iAvbXyM3RiPPJ4lyD4w6Mjgtf4ejTK6TPvTNG3H32PLwuT0N/ZjJLiXug7ETE/LWtTeHw9WRv7uX/tIKYyKg==} peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 peerDependenciesMeta: @@ -2528,6 +2518,9 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zimmerframe@1.1.2: + resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} + snapshots: '@alloc/quick-lru@5.2.0': {} @@ -2918,18 +2911,18 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.22.4': optional: true - '@sveltejs/adapter-auto@3.2.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7))': + '@sveltejs/adapter-auto@3.2.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7))': dependencies: - '@sveltejs/kit': 2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7) + '@sveltejs/kit': 2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7) import-meta-resolve: 4.1.0 - '@sveltejs/adapter-static@3.0.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7))': + '@sveltejs/adapter-static@3.0.5(@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7))': dependencies: - '@sveltejs/kit': 2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7) + '@sveltejs/kit': 2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7) - '@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7)': + '@sveltejs/kit@2.5.28(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7)': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@5.4.7) + '@sveltejs/vite-plugin-svelte': 4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7) '@types/cookie': 0.6.0 cookie: 0.6.0 devalue: 5.0.0 @@ -2941,30 +2934,29 @@ snapshots: sade: 1.8.1 set-cookie-parser: 2.7.0 sirv: 2.0.4 - svelte: 4.2.19 + svelte: 5.0.0-next.263 tiny-glob: 0.2.9 vite: 5.4.7 - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7)': + '@sveltejs/vite-plugin-svelte-inspector@3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7)': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@5.4.7) + '@sveltejs/vite-plugin-svelte': 4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7) debug: 4.3.7 - svelte: 4.2.19 + svelte: 5.0.0-next.263 vite: 5.4.7 transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7)': + '@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7)': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.7))(svelte@4.2.19)(vite@5.4.7) + '@sveltejs/vite-plugin-svelte-inspector': 3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.263)(vite@5.4.7))(svelte@5.0.0-next.263)(vite@5.4.7) debug: 4.3.7 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.11 - svelte: 4.2.19 - svelte-hmr: 0.16.0(svelte@4.2.19) + svelte: 5.0.0-next.263 vite: 5.4.7 - vitefu: 0.2.5(vite@5.4.7) + vitefu: 1.0.2(vite@5.4.7) transitivePeerDependencies: - supports-color @@ -2987,10 +2979,10 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/svelte@5.2.1(svelte@4.2.19)(vite@5.4.7)(vitest@2.1.1(jsdom@25.0.1))': + '@testing-library/svelte@5.2.1(svelte@5.0.0-next.263)(vite@5.4.7)(vitest@2.1.1(jsdom@25.0.1))': dependencies: '@testing-library/dom': 10.4.0 - svelte: 4.2.19 + svelte: 5.0.0-next.263 optionalDependencies: vite: 5.4.7 vitest: 2.1.1(jsdom@25.0.1) @@ -3159,6 +3151,10 @@ snapshots: dependencies: acorn: 8.12.1 + acorn-typescript@1.4.13(acorn@8.12.1): + dependencies: + acorn: 8.12.1 + acorn@8.12.1: {} agent-base@7.1.1: @@ -3331,14 +3327,6 @@ snapshots: memoizee: 0.4.17 timers-ext: 0.1.8 - code-red@1.0.4: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.6 - acorn: 8.12.1 - estree-walker: 3.0.3 - periscopic: 3.1.0 - color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -3373,11 +3361,6 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - css-tree@2.3.1: - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.2.1 - cssesc@3.0.0: {} cssstyle@4.1.0: @@ -3530,7 +3513,7 @@ snapshots: dependencies: eslint: 9.11.1(jiti@1.21.6) - eslint-plugin-svelte@2.44.0(eslint@9.11.1(jiti@1.21.6))(svelte@4.2.19): + eslint-plugin-svelte@2.44.0(eslint@9.11.1(jiti@1.21.6))(svelte@5.0.0-next.263): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) '@jridgewell/sourcemap-codec': 1.5.0 @@ -3543,9 +3526,9 @@ snapshots: postcss-safe-parser: 6.0.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 semver: 7.6.3 - svelte-eslint-parser: 0.41.1(svelte@4.2.19) + svelte-eslint-parser: 0.41.1(svelte@5.0.0-next.263) optionalDependencies: - svelte: 4.2.19 + svelte: 5.0.0-next.263 transitivePeerDependencies: - ts-node @@ -3632,6 +3615,11 @@ snapshots: dependencies: estraverse: 5.3.0 + esrap@1.2.2: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + '@types/estree': 1.0.6 + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -3712,18 +3700,18 @@ snapshots: transitivePeerDependencies: - rollup - flowbite-svelte-icons@1.6.1(svelte@4.2.19)(tailwind-merge@2.5.2)(tailwindcss@3.4.13): + flowbite-svelte-icons@2.0.0-next.16(svelte@5.0.0-next.263)(tailwind-merge@2.5.2)(tailwindcss@3.4.13): dependencies: - svelte: 4.2.19 + svelte: 5.0.0-next.263 tailwind-merge: 2.5.2 tailwindcss: 3.4.13 - flowbite-svelte@0.46.17(rollup@4.22.4)(svelte@4.2.19): + flowbite-svelte@0.46.17(rollup@4.22.4)(svelte@5.0.0-next.263): dependencies: '@floating-ui/dom': 1.6.11 apexcharts: 3.53.0 flowbite: 2.5.1(rollup@4.22.4) - svelte: 4.2.19 + svelte: 5.0.0-next.263 tailwind-merge: 2.5.2 transitivePeerDependencies: - rollup @@ -4043,8 +4031,6 @@ snapshots: dependencies: semver: 7.6.3 - mdn-data@2.0.30: {} - memoizee@0.4.17: dependencies: d: 1.0.2 @@ -4218,12 +4204,6 @@ snapshots: perfect-debounce@1.0.0: {} - periscopic@3.1.0: - dependencies: - '@types/estree': 1.0.6 - estree-walker: 3.0.3 - is-reference: 3.0.2 - picocolors@1.1.0: {} picomatch@2.3.1: {} @@ -4297,16 +4277,16 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@4.2.19): + prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@5.0.0-next.263): dependencies: prettier: 3.3.3 - svelte: 4.2.19 + svelte: 5.0.0-next.263 - prettier-plugin-tailwindcss@0.6.6(prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@4.2.19))(prettier@3.3.3): + prettier-plugin-tailwindcss@0.6.6(prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@5.0.0-next.263))(prettier@3.3.3): dependencies: prettier: 3.3.3 optionalDependencies: - prettier-plugin-svelte: 3.2.6(prettier@3.3.3)(svelte@4.2.19) + prettier-plugin-svelte: 3.2.6(prettier@3.3.3)(svelte@5.0.0-next.263) prettier@3.3.3: {} @@ -4479,14 +4459,14 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-check@3.8.6(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@4.2.19): + svelte-check@3.8.6(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@5.0.0-next.263): dependencies: '@jridgewell/trace-mapping': 0.3.25 chokidar: 3.6.0 picocolors: 1.1.0 sade: 1.8.1 - svelte: 4.2.19 - svelte-preprocess: 5.1.4(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@4.2.19)(typescript@5.6.2) + svelte: 5.0.0-next.263 + svelte-preprocess: 5.1.4(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@5.0.0-next.263)(typescript@5.6.2) typescript: 5.6.2 transitivePeerDependencies: - '@babel/core' @@ -4499,7 +4479,7 @@ snapshots: - stylus - sugarss - svelte-eslint-parser@0.41.1(svelte@4.2.19): + svelte-eslint-parser@0.41.1(svelte@5.0.0-next.263): dependencies: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 @@ -4507,13 +4487,9 @@ snapshots: postcss: 8.4.47 postcss-scss: 4.0.9(postcss@8.4.47) optionalDependencies: - svelte: 4.2.19 - - svelte-hmr@0.16.0(svelte@4.2.19): - dependencies: - svelte: 4.2.19 + svelte: 5.0.0-next.263 - svelte-i18n@4.0.0(svelte@4.2.19): + svelte-i18n@4.0.0(svelte@5.0.0-next.263): dependencies: cli-color: 2.0.4 deepmerge: 4.3.1 @@ -4521,38 +4497,37 @@ snapshots: estree-walker: 2.0.2 intl-messageformat: 10.5.14 sade: 1.8.1 - svelte: 4.2.19 + svelte: 5.0.0-next.263 tiny-glob: 0.2.9 - svelte-preprocess@5.1.4(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@4.2.19)(typescript@5.6.2): + svelte-preprocess@5.1.4(postcss-load-config@4.0.2(postcss@8.4.47))(postcss@8.4.47)(svelte@5.0.0-next.263)(typescript@5.6.2): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 magic-string: 0.30.11 sorcery: 0.11.1 strip-indent: 3.0.0 - svelte: 4.2.19 + svelte: 5.0.0-next.263 optionalDependencies: postcss: 8.4.47 postcss-load-config: 4.0.2(postcss@8.4.47) typescript: 5.6.2 - svelte@4.2.19: + svelte@5.0.0-next.263: dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 '@types/estree': 1.0.6 acorn: 8.12.1 + acorn-typescript: 1.4.13(acorn@8.12.1) aria-query: 5.3.2 axobject-query: 4.1.0 - code-red: 1.0.4 - css-tree: 2.3.1 - estree-walker: 3.0.3 + esm-env: 1.0.0 + esrap: 1.2.2 is-reference: 3.0.2 locate-character: 3.0.0 magic-string: 0.30.11 - periscopic: 3.1.0 + zimmerframe: 1.1.2 svg.draggable.js@2.2.2: dependencies: @@ -4752,7 +4727,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - vitefu@0.2.5(vite@5.4.7): + vitefu@1.0.2(vite@5.4.7): optionalDependencies: vite: 5.4.7 @@ -4847,3 +4822,5 @@ snapshots: yaml@2.5.1: {} yocto-queue@0.1.0: {} + + zimmerframe@1.1.2: {} diff --git a/frontend/src/lib/admin.svelte.ts b/frontend/src/lib/admin.svelte.ts new file mode 100644 index 00000000..b2ffa4c5 --- /dev/null +++ b/frontend/src/lib/admin.svelte.ts @@ -0,0 +1,73 @@ +import { milestoneGroups, userQuestions } from '$lib/stores/adminStore'; +import { + authCookieLogin, + getMilestoneGroupsAdmin, + getUserQuestionsAdmin, + usersCurrentUser +} from '$lib/client/services.gen'; +import type { + GetLanguagesResponse, + MilestoneGroupAdmin, + UserQuestionAdmin, + UserRead, + Body_auth_cookie_login_auth_login_post +} from '$lib/client/types.gen'; + +function AdminUser() { + let user = $state(null as UserRead | null); + return { + get value(): UserRead | null { + return user; + }, + login: async function (loginData: Body_auth_cookie_login_auth_login_post) { + console.log(loginData); + const { data, error } = await authCookieLogin({ body: loginData }); + if (error) { + return error?.detail as string; + } else { + await this.refresh(); + if (!user || !user.is_superuser) { + return 'Admin account required'; + } + return ''; + } + }, + refresh: async function () { + const { data, error } = await usersCurrentUser(); + if (error || data === undefined) { + console.log('Failed to get current User'); + user = null; + } else { + user = data; + } + } + }; +} + +export const adminUser = AdminUser(); + +export async function refreshMilestoneGroups() { + console.log('refreshMilestoneGroups...'); + const { data, error } = await getMilestoneGroupsAdmin(); + if (error || data == undefined) { + console.log('Failed to get MilestoneGroups'); + milestoneGroups.set([]); + } else { + milestoneGroups.set(data); + } +} + +export function milestoneGroupImageUrl(id: number) { + return `${import.meta.env.VITE_MONDEY_API_URL}/static/mg${id}.jpg`; +} + +export async function refreshUserQuestions() { + console.log('refreshQuestions...'); + const { data, error } = await getUserQuestionsAdmin(); + if (error || data === undefined) { + console.log('Failed to get UserQuestions'); + userQuestions.set([]); + } else { + userQuestions.set(data); + } +} diff --git a/frontend/src/lib/admin.ts b/frontend/src/lib/admin.ts deleted file mode 100644 index c6418f77..00000000 --- a/frontend/src/lib/admin.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { milestoneGroups, userQuestions } from '$lib/stores/adminStore'; -import { getMilestoneGroupsAdmin, getUserQuestionsAdmin } from '$lib/client/services.gen'; - -export async function refreshMilestoneGroups() { - console.log('refreshMilestoneGroups...'); - const { data, error } = await getMilestoneGroupsAdmin(); - if (error || data == undefined) { - console.log('Failed to get MilestoneGroups'); - milestoneGroups.set([]); - } else { - milestoneGroups.set(data); - } -} - -export function milestoneGroupImageUrl(id: number) { - return `${import.meta.env.VITE_MONDEY_API_URL}/static/mg${id}.jpg`; -} - -export async function refreshUserQuestions() { - console.log('refreshQuestions...'); - const { data, error } = await getUserQuestionsAdmin(); - if (error || data === undefined) { - console.log('Failed to get UserQuestions'); - userQuestions.set([]); - } else { - userQuestions.set(data); - } -} diff --git a/frontend/src/lib/components/Admin/AddButton.svelte b/frontend/src/lib/components/Admin/AddButton.svelte index fa856e10..e4478354 100644 --- a/frontend/src/lib/components/Admin/AddButton.svelte +++ b/frontend/src/lib/components/Admin/AddButton.svelte @@ -1,12 +1,13 @@ + + - diff --git a/frontend/src/lib/components/Admin/CancelButton.svelte b/frontend/src/lib/components/Admin/CancelButton.svelte new file mode 100644 index 00000000..b3fc7c4e --- /dev/null +++ b/frontend/src/lib/components/Admin/CancelButton.svelte @@ -0,0 +1,13 @@ + + + + + diff --git a/frontend/src/lib/components/Admin/DeleteButton.svelte b/frontend/src/lib/components/Admin/DeleteButton.svelte index da626515..71f5b48c 100644 --- a/frontend/src/lib/components/Admin/DeleteButton.svelte +++ b/frontend/src/lib/components/Admin/DeleteButton.svelte @@ -1,11 +1,11 @@ + + - + diff --git a/frontend/src/lib/components/Admin/DeleteModal.svelte b/frontend/src/lib/components/Admin/DeleteModal.svelte index f5f1c27a..8caca477 100644 --- a/frontend/src/lib/components/Admin/DeleteModal.svelte +++ b/frontend/src/lib/components/Admin/DeleteModal.svelte @@ -1,10 +1,11 @@ + + @@ -13,7 +14,7 @@

{$_('admin.delete-are-you-sure')}

- diff --git a/frontend/src/lib/components/Admin/EditButton.svelte b/frontend/src/lib/components/Admin/EditButton.svelte index ff1dd121..62912d09 100644 --- a/frontend/src/lib/components/Admin/EditButton.svelte +++ b/frontend/src/lib/components/Admin/EditButton.svelte @@ -1,11 +1,11 @@ + + - + diff --git a/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte b/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte index b29ba12b..cae67a1b 100644 --- a/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte +++ b/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte @@ -1,26 +1,24 @@ + +
diff --git a/frontend/src/lib/components/Admin/Languages.svelte b/frontend/src/lib/components/Admin/Languages.svelte index 3cf0bde0..4efc7df2 100644 --- a/frontend/src/lib/components/Admin/Languages.svelte +++ b/frontend/src/lib/components/Admin/Languages.svelte @@ -1,3 +1,5 @@ + +
Admin login
-
+
Password + + + diff --git a/frontend/src/lib/components/Admin/UserQuestions.svelte b/frontend/src/lib/components/Admin/UserQuestions.svelte index 3156f8e2..8a09679b 100644 --- a/frontend/src/lib/components/Admin/UserQuestions.svelte +++ b/frontend/src/lib/components/Admin/UserQuestions.svelte @@ -1,3 +1,5 @@ + + -{#if !$isLoggedIn} +{#if !adminUser.value || !adminUser.value.is_superuser}
diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index 010dcac3..3ec1b119 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -6,7 +6,6 @@ const config = { // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors preprocess: vitePreprocess(), - kit: { adapter: adapter({ pages: 'build',