diff --git a/package-lock.json b/package-lock.json index d3e22f9..878e5e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "dependencies": { "@angular/animations": "^18.0.1", - "@angular/cdk": "^17.3.9", + "@angular/cdk": "^18.0.1", "@angular/common": "^18.0.1", "@angular/compiler": "^18.0.1", "@angular/core": "^18.0.1", @@ -38,11 +38,11 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^18.0.2", - "@angular-eslint/builder": "17.4.1", - "@angular-eslint/eslint-plugin": "17.4.1", - "@angular-eslint/eslint-plugin-template": "17.4.1", - "@angular-eslint/schematics": "17.4.1", - "@angular-eslint/template-parser": "17.4.1", + "@angular-eslint/builder": "18.0.1", + "@angular-eslint/eslint-plugin": "18.0.1", + "@angular-eslint/eslint-plugin-template": "18.0.1", + "@angular-eslint/schematics": "18.0.1", + "@angular-eslint/template-parser": "18.0.1", "@angular/cli": "^18.0.2", "@angular/compiler-cli": "^18.0.1", "@types/clownface": "^2.0.7", @@ -382,101 +382,113 @@ } }, "node_modules/@angular-eslint/builder": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-17.4.1.tgz", - "integrity": "sha512-UVnErsAGXTi8OChkoSxDVVGV2jkFpTaXQT+0fgapSwaOt3Ki7BVwJJoNaX0Zs01c64bjNPZ5ONb/i6nC8QiP9Q==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-18.0.1.tgz", + "integrity": "sha512-b/VUeTQznAmGdwP4OyPWyegqSRWub7E8/WXBqojrSFyLkFhpTiHpk/3/5G3LsgTb0zBfyAsqkA0yaadsHu9pjA==", "dev": true, "dependencies": { - "@nx/devkit": "^17.2.8 || ^18.0.0 || ^19.0.0", - "nx": "^17.2.8 || ^18.0.0 || ^19.0.0" + "@nx/devkit": "^19.0.6", + "nx": "^19.0.6" }, "peerDependencies": { - "eslint": "^7.20.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.4.1.tgz", - "integrity": "sha512-QKQGspxsyMHRwvzqo+Fj42TS/vmnwOHuWC6EN+5KBx3cuImahqFHQW842zVy9f65jfH2xDnNWJ+NW+Tzcgg+pQ==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-18.0.1.tgz", + "integrity": "sha512-lr4Ysoo28FBOKcJFQUGTMpbWDcak+gyuYvyggp37ERvazE6EDomPFxzEHNqVT9EI9sZ+GDBOoPR+EdFh0ALGNw==", "dev": true }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-17.4.1.tgz", - "integrity": "sha512-05bN1UB4H2CuX7Sw6fz+rMobsa+Bl3g15IYldH08hbJSnVemO8mf86bIjRN2Th79sO9WOiXXimnfIt7KRf8l0Q==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-18.0.1.tgz", + "integrity": "sha512-pS3SYLa9DA+ENklGxEUlcw6/xCxgDk9fgjyaheuSjDxL3TIh1pTa4V2TptODdcPh7XCYXiVmy+e/w79mXlGzOw==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.4.1", - "@angular-eslint/utils": "17.4.1", - "@typescript-eslint/utils": "7.8.0" + "@angular-eslint/bundled-angular-compiler": "18.0.1", + "@angular-eslint/utils": "18.0.1" }, "peerDependencies": { - "eslint": "^7.20.0 || ^8.0.0", + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0-alpha.20", + "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-17.4.1.tgz", - "integrity": "sha512-oYP7yzOpn63g1Mpwc8F8ERiywaGRhAs27ttI9t+5NXaLrwHSfc/AJleC7jjkB5xu1p88JY1mb4oIYOjeZAhHIg==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-18.0.1.tgz", + "integrity": "sha512-u/eov/CFBb8l35D8dW78Dx5fBLd8FZFibKN9XQknhzXnDMpISuUOMny5g5/wvYYjqLgqEySXMiHKEAxEup7xtA==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.4.1", - "@angular-eslint/utils": "17.4.1", - "@typescript-eslint/type-utils": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@angular-eslint/bundled-angular-compiler": "18.0.1", + "@angular-eslint/utils": "18.0.1", "aria-query": "5.3.0", "axobject-query": "4.0.0" }, "peerDependencies": { - "eslint": "^7.20.0 || ^8.0.0", + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0-alpha.20", + "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, "node_modules/@angular-eslint/schematics": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-17.4.1.tgz", - "integrity": "sha512-CYpsGc0B/ZGO/RKYlyfeAi1pOvFmVs4pvoHU13uOdhdFJ6nAUTujHiBaULloIrUmuIhGW9S0g6w4ecD6ZP680w==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-18.0.1.tgz", + "integrity": "sha512-G9PgFrjyvBaQR8enMnP2scnQDLk99GMpifh3voiOmdEkxaQHRWqhCWncV7GATwpXDzeyj9J9XT9iHGJjnZTpJQ==", "dev": true, "dependencies": { - "@angular-eslint/eslint-plugin": "17.4.1", - "@angular-eslint/eslint-plugin-template": "17.4.1", - "@nx/devkit": "^17.2.8 || ^18.0.0 || ^19.0.0", + "@angular-eslint/eslint-plugin": "18.0.1", + "@angular-eslint/eslint-plugin-template": "18.0.1", + "@nx/devkit": "^19.0.6", "ignore": "5.3.1", - "nx": "^17.2.8 || ^18.0.0 || ^19.0.0", - "strip-json-comments": "3.1.1", - "tmp": "0.2.3" + "nx": "^19.0.6", + "semver": "7.6.2", + "strip-json-comments": "3.1.1" }, "peerDependencies": { - "@angular/cli": ">= 17.0.0 < 18.0.0" + "@angular-devkit/core": ">= 18.0.0 < 19.0.0", + "@angular-devkit/schematics": ">= 18.0.0 < 19.0.0" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/@angular-eslint/template-parser": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-17.4.1.tgz", - "integrity": "sha512-fJQpwQXexgs7Z3yYpQAfuAkFB2Y5H8SSlo+eAPPafOOPpPSIm/yP4dQ2e06tE8zWB5yjYnVBMJnUKSmG5GJSDw==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-18.0.1.tgz", + "integrity": "sha512-22fKzkWo9Ts8aY/WHL1A6seS2tpltgRRXVfnZnnqvQRyRiuPnx1FC0ly7+QPZkThh8vdLwxU+BvtLq9Uiqh9OQ==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.4.1", + "@angular-eslint/bundled-angular-compiler": "18.0.1", "eslint-scope": "^8.0.0" }, "peerDependencies": { - "eslint": "^7.20.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, "node_modules/@angular-eslint/utils": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-17.4.1.tgz", - "integrity": "sha512-ptpWSrN7hfLtbStOB5vlwjh088WRu+sT1XIXCROrX5uXR5sQMu5ZitnoObSe+Of+1lugguPvMvFm/pzTMp3LIg==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-18.0.1.tgz", + "integrity": "sha512-Q9lCySqg+9h2cz08+SoWj48cY1i04tL1k3bsQJmF2TsylAw2mSsNGX2X3h9WkdxY7sUoY0mP7MVW1iU54Gobcg==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.4.1", - "@typescript-eslint/utils": "7.8.0" + "@angular-eslint/bundled-angular-compiler": "18.0.1" }, "peerDependencies": { - "eslint": "^7.20.0 || ^8.0.0", + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0-alpha.20", + "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, @@ -620,9 +632,9 @@ } }, "node_modules/@angular/cdk": { - "version": "17.3.10", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.10.tgz", - "integrity": "sha512-b1qktT2c1TTTe5nTji/kFAVW92fULK0YhYAvJ+BjZTPKu2FniZNe8o4qqQ0pUuvtMu+ZQxp/QqFYoidIVCjScg==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-18.0.1.tgz", + "integrity": "sha512-2fCqX1sz5cM+LncO6ak4EU2ZBm8MWitv5V53go3Iz5dOVOdrvysBt8smEkWZ4nvEKkFYHEPpQo0YlxEWbuTEmA==", "dependencies": { "tslib": "^2.3.0" }, @@ -630,8 +642,8 @@ "parse5": "^7.1.2" }, "peerDependencies": { - "@angular/common": "^17.0.0 || ^18.0.0", - "@angular/core": "^17.0.0 || ^18.0.0", + "@angular/common": "^18.0.0 || ^19.0.0", + "@angular/core": "^18.0.0 || ^19.0.0", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -5578,12 +5590,6 @@ "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", "dev": true }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -5707,28 +5713,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz", - "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/typescript-estree": "7.11.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, "node_modules/@typescript-eslint/parser": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.11.0.tgz", @@ -5774,106 +5758,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz", - "integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/utils": "7.8.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz", - "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz", - "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz", - "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.8.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/types": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.11.0.tgz", @@ -5931,18 +5815,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz", - "integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz", + "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "semver": "^7.6.0" + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/typescript-estree": "7.11.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5955,96 +5836,6 @@ "eslint": "^8.56.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz", - "integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz", - "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz", - "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz", - "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.8.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.11.0.tgz", diff --git a/package.json b/package.json index 7df5a64..97772fa 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "private": true, "dependencies": { "@angular/animations": "^18.0.1", - "@angular/cdk": "^17.3.9", + "@angular/cdk": "^18.0.1", "@angular/common": "^18.0.1", "@angular/compiler": "^18.0.1", "@angular/core": "^18.0.1", @@ -41,11 +41,11 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^18.0.2", - "@angular-eslint/builder": "17.4.1", - "@angular-eslint/eslint-plugin": "17.4.1", - "@angular-eslint/eslint-plugin-template": "17.4.1", - "@angular-eslint/schematics": "17.4.1", - "@angular-eslint/template-parser": "17.4.1", + "@angular-eslint/builder": "18.0.1", + "@angular-eslint/eslint-plugin": "18.0.1", + "@angular-eslint/eslint-plugin-template": "18.0.1", + "@angular-eslint/schematics": "18.0.1", + "@angular-eslint/template-parser": "18.0.1", "@angular/cli": "^18.0.2", "@angular/compiler-cli": "^18.0.1", "@types/clownface": "^2.0.7", diff --git a/projects/blueprint/src/app/app.config.ts b/projects/blueprint/src/app/app.config.ts index 9f0cf08..eca42ca 100644 --- a/projects/blueprint/src/app/app.config.ts +++ b/projects/blueprint/src/app/app.config.ts @@ -4,13 +4,13 @@ import { } from '@angular/router'; import { routes } from './app.routes'; -import { APP_INITIALIZER, importProvidersFrom } from '@angular/core'; +import { APP_INITIALIZER } from '@angular/core'; -import { HTTP_INTERCEPTORS } from '@angular/common/http'; +import { provideHttpClient, withInterceptors } from '@angular/common/http'; import { provideAnimations } from '@angular/platform-browser/animations'; import { ConfigService } from './core/service/config/config.service'; +import { authInterceptor } from '@blueprint/http-interceptor/auth-interceptor/auth-interceptor.function'; -import { AuthInterceptor } from '@blueprint/http-interceptor/auth-interceptor/auth-interceptor.service'; function initializeAppFactory(configService: ConfigService): () => void { return () => configService.fetchConfig() @@ -18,7 +18,7 @@ function initializeAppFactory(configService: ConfigService): () => void { export const appConfig: ApplicationConfig = { providers: [ - importProvidersFrom(HttpClientModule), + provideHttpClient(withInterceptors([authInterceptor])), provideRouter(routes, withInMemoryScrolling({ anchorScrolling: 'enabled', scrollPositionRestoration: 'enabled' }), withComponentInputBinding() @@ -29,8 +29,7 @@ export const appConfig: ApplicationConfig = { useFactory: initializeAppFactory, deps: [ConfigService], multi: true - }, - { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true } + } ], }; \ No newline at end of file diff --git a/projects/blueprint/src/app/core/http-interceptor/auth-interceptor/auth-interceptor.function.ts b/projects/blueprint/src/app/core/http-interceptor/auth-interceptor/auth-interceptor.function.ts new file mode 100644 index 0000000..77e7076 --- /dev/null +++ b/projects/blueprint/src/app/core/http-interceptor/auth-interceptor/auth-interceptor.function.ts @@ -0,0 +1,50 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { inject } from '@angular/core'; +import { HttpRequest, HttpEvent, HttpHandlerFn } from '@angular/common/http'; +import { Observable, catchError, throwError } from 'rxjs'; +import { Router } from '@angular/router'; +import { LibraryConfigurationService } from '@blueprint/service/library-configuration/library-configuration.service'; +import { AuthService } from '@blueprint/service/auth/auth.service'; + +/** + * An HTTP interceptor that adds basic auth credentials to requests to the library configuration service. + */ + + +/** + * Intercepts HTTP requests and adds basic auth credentials to requests to the library configuration service. + * @param req The HTTP request. + * @param next The HTTP handler. + * @returns An observable of the HTTP event. + */ +export function authInterceptor(req: HttpRequest, next: HttpHandlerFn): Observable> { + const libraryConfig = inject(LibraryConfigurationService); + const authService = inject(AuthService); + const router = inject(Router); + // If the request is for the sparql endpoint, add the basic auth credentials. + if (req.url.includes(libraryConfig.endpointUrl)) { + // Create the authorization header by base64-encoding the username and password separated by a colon. + const credentials = authService.getCredentials(); + const authHeader = `Basic ${btoa(`${credentials ? credentials.username : ''}:${credentials ? credentials.password : ''}`)}`; + + // Clone the original request and add the authorization header to the headers. + const authReq = req.clone({ + headers: req.headers.set('Authorization', authHeader) + }); + + // Pass the modified request to the next handler in the chain. + return next(authReq).pipe( + catchError(error => { + // If the response returns an HTTP 401 status code (Unauthorized), navigate to the login page. + if (error.status === 401) { + router.navigate(['/login']); + } + // Rethrow the error. + return throwError(() => new Error(error.message)) + }) + ); + } else { + // If the request is not for the library configuration service, pass the original request to the next handler in the chain. + return next(req); + } +} diff --git a/projects/blueprint/src/app/core/http-interceptor/auth-interceptor/auth-interceptor.service.ts b/projects/blueprint/src/app/core/http-interceptor/auth-interceptor/auth-interceptor.service.ts deleted file mode 100644 index 522f20b..0000000 --- a/projects/blueprint/src/app/core/http-interceptor/auth-interceptor/auth-interceptor.service.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { Injectable, inject } from '@angular/core'; -import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http'; -import { Observable, catchError, throwError } from 'rxjs'; -import { Router } from '@angular/router'; -import { LibraryConfigurationService } from '@blueprint/service/library-configuration/library-configuration.service'; -import { AuthService } from '@blueprint/service/auth/auth.service'; - -/** - * An HTTP interceptor that adds basic auth credentials to requests to the library configuration service. - */ -@Injectable() -export class AuthInterceptor implements HttpInterceptor { - private readonly libraryConfig = inject(LibraryConfigurationService); - private readonly authService = inject(AuthService); - private readonly router = inject(Router); - - /** - * Intercepts HTTP requests and adds basic auth credentials to requests to the library configuration service. - * @param req The HTTP request. - * @param next The HTTP handler. - * @returns An observable of the HTTP event. - */ - intercept(req: HttpRequest, next: HttpHandler): Observable> { - // If the request is for the sparql endpoint, add the basic auth credentials. - if (req.url.includes(this.libraryConfig.endpointUrl)) { - // Create the authorization header by base64-encoding the username and password separated by a colon. - const credentials = this.authService.getCredentials(); - - const authHeader = `Basic ${btoa(`${credentials ? credentials.username : ''}:${credentials ? credentials.password : ''}`)}`; - - // Clone the original request and add the authorization header to the headers. - const authReq = req.clone({ - headers: req.headers.set('Authorization', authHeader) - }); - - // Pass the modified request to the next handler in the chain. - return next.handle(authReq).pipe( - catchError(error => { - // If the response returns an HTTP 401 status code (Unauthorized), navigate to the login page. - if (error.status === 401) { - this.router.navigate(['/login']); - } - // Rethrow the error. - return throwError(() => new Error(error.message)) - }) - ); - } else { - // If the request is not for the library configuration service, pass the original request to the next handler in the chain. - return next.handle(req); - } - } -} \ No newline at end of file diff --git a/projects/blueprint/src/app/core/http-interceptor/index.ts b/projects/blueprint/src/app/core/http-interceptor/index.ts index f3a3a09..67bd464 100644 --- a/projects/blueprint/src/app/core/http-interceptor/index.ts +++ b/projects/blueprint/src/app/core/http-interceptor/index.ts @@ -1 +1 @@ -export * from './auth-interceptor/auth-interceptor.service' \ No newline at end of file +export * from './auth-interceptor/auth-interceptor.function' \ No newline at end of file diff --git a/projects/blueprint/src/index.html b/projects/blueprint/src/index.html index 48a4b93..74cdc55 100644 --- a/projects/blueprint/src/index.html +++ b/projects/blueprint/src/index.html @@ -25,7 +25,7 @@ - +