diff --git a/app/src/app/app.components.ts b/app/src/app/app.components.ts index 9c6b90a6dd..8bf0e4606a 100644 --- a/app/src/app/app.components.ts +++ b/app/src/app/app.components.ts @@ -23,7 +23,6 @@ */ import { Component, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; import { AppService } from '@alfresco/aca-shared'; @Component({ @@ -33,8 +32,6 @@ import { AppService } from '@alfresco/aca-shared'; encapsulation: ViewEncapsulation.None }) export class AppComponent { - onDestroy$: Subject = new Subject(); - constructor(private appService: AppService) { this.appService.init(); } diff --git a/package-lock.json b/package-lock.json index 72c07d9dd5..c2b3598d00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,11 @@ "version": "5.2.0", "license": "LGPL-3.0", "dependencies": { - "@alfresco/adf-content-services": "7.0.0-alpha.6", - "@alfresco/adf-core": "7.0.0-alpha.6", - "@alfresco/adf-extensions": "7.0.0-alpha.6", - "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.6", - "@alfresco/js-api": "8.0.0-alpha.6", + "@alfresco/adf-content-services": "7.0.0-alpha.6-11937616463", + "@alfresco/adf-core": "7.0.0-alpha.6-11937616463", + "@alfresco/adf-extensions": "7.0.0-alpha.6-11937616463", + "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.6-11937616463", + "@alfresco/js-api": "8.0.0-alpha.6-11937616463", "@angular/animations": "16.2.9", "@angular/cdk": "16.2.9", "@angular/common": "16.2.9", @@ -41,7 +41,7 @@ "zone.js": "0.13.3" }, "devDependencies": { - "@alfresco/adf-cli": "7.0.0-alpha.6", + "@alfresco/adf-cli": "7.0.0-alpha.6-11937616463", "@angular-devkit/build-angular": "16.2.9", "@angular-devkit/core": "16.2.9", "@angular-devkit/schematics": "16.2.9", @@ -100,18 +100,18 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", - "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.1.tgz", + "integrity": "sha512-12WGKBQzjUAI4ayyF4IAtfw2QR/IDoqk6jTddXDhtYTJF9ASmoE1zst7cVtP0aL/F1jUJL5r+JxKXKEgHNbEUQ==", "dev": true }, "node_modules/@alfresco/adf-cli": { - "version": "7.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-7.0.0-alpha.6.tgz", - "integrity": "sha512-I6YRpcWZCaCSVCx6p2qkLge8qad4+KyJCFQqguTJNywrwYZQOvTFa9yRgkFFekcKdGs+6cXH9WB/e+nHd9xW1g==", + "version": "7.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-7.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-dONhqtOTbAQQxV1u+MrCrHREeMsePMyP33KMo5SckOa+bjbRGfFyRZgNhoDrBDj7JyJNDbHXCjLoI64arJ9cLw==", "dev": true, "dependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.4", + "@alfresco/js-api": ">=8.0.0-alpha.6-11937616463", "commander": "^6.2.1", "ejs": "^3.1.9", "license-checker": "^25.0.1", @@ -125,23 +125,6 @@ "adf-cli": "bin/adf-cli" } }, - "node_modules/@alfresco/adf-cli/node_modules/@alfresco/js-api": { - "version": "8.0.0-alpha.6-11937616463", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.6-11937616463.tgz", - "integrity": "sha512-D+VvhGpZXBc/hfeimTf8SMdMANboDiCroJunnm1eiqiSt4nLxeU3NnQOpfCY4dLU1fDIcsl0YRFW25rMvKH+Eg==", - "dev": true, - "dependencies": { - "event-emitter": "^0.3.5", - "superagent": "^9.0.1", - "tslib": "^2.6.1" - } - }, - "node_modules/@alfresco/adf-cli/node_modules/@alfresco/js-api/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true - }, "node_modules/@alfresco/adf-cli/node_modules/rxjs": { "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", @@ -161,15 +144,15 @@ "dev": true }, "node_modules/@alfresco/adf-content-services": { - "version": "7.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-7.0.0-alpha.6.tgz", - "integrity": "sha512-WkQxUbWdDgroSJUvgez37D9hv742WflOGWC+/9jA2M5yLcoCqGgFp9+0vH6zhg7pqWh0l9bCt3sNhgdk2iov/g==", + "version": "7.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-7.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-6blmdaY/kGILDV+RSIBdfCyA2UIAvCen3xO879KYDnf+CGTQ2R3yVwpYLaAkzIkdQgenhN1Dzd5s8vQTlZ0AHw==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@alfresco/adf-core": ">=7.0.0-alpha.6", - "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/adf-core": ">=7.0.0-alpha.6-11937616463", + "@alfresco/js-api": ">=8.0.0-alpha.6-11937616463", "@angular/animations": ">=14.1.3", "@angular/cdk": ">=14.1.2", "@angular/common": ">=14.1.3", @@ -184,9 +167,9 @@ } }, "node_modules/@alfresco/adf-core": { - "version": "7.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-7.0.0-alpha.6.tgz", - "integrity": "sha512-ziByPOtBURp+iEWcjzGlwL0mP+gD4aUcX+WEJHpZf0rNGEMULiGOecie30VmHqnVR6eF1Y5I51ND7K7U77+9XA==", + "version": "7.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-7.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-wlJCFt9MLT4Qhd5WPRI7Z3jr7RPGmcgAKJ3uuVD5ziQP38aa4K2eIClXQarNamaYFFeN0qgO6E0iBLSLOs4GGQ==", "dependencies": { "angular-oauth2-oidc": "^15.0.1", "angular-oauth2-oidc-jwks": "^17.0.2", @@ -194,8 +177,8 @@ "tslib": "^2.3.0" }, "peerDependencies": { - "@alfresco/adf-extensions": ">=7.0.0-alpha.6", - "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/adf-extensions": ">=7.0.0-alpha.6-11937616463", + "@alfresco/js-api": ">=8.0.0-alpha.6-11937616463", "@angular/animations": ">=14.1.3", "@angular/cdk": ">=14.1.2", "@angular/common": ">=14.1.3", @@ -211,31 +194,31 @@ } }, "node_modules/@alfresco/adf-extensions": { - "version": "7.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-7.0.0-alpha.6.tgz", - "integrity": "sha512-YJaK4cNee4rgxFXQddMeG36zutxmOP+VveJCkGE9+4/4y7tD2iLguxkJLrsIeql+OkiWzG20EKyrU0Grf7yIFQ==", + "version": "7.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-7.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-eoQgjBtVG5I5pg4irgb/Hq240F2kcVu621Yr5e+TjyXrgIzgk18EN8qFzHe6bFt810Lg8215Bj0DDhwb1V/GXg==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/js-api": ">=8.0.0-alpha.6-11937616463", "@angular/common": ">=14.1.3", "@angular/core": ">=14.1.3" } }, "node_modules/@alfresco/eslint-plugin-eslint-angular": { - "version": "7.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-7.0.0-alpha.6.tgz", - "integrity": "sha512-gw7GMWwRfbbdsOgfxDBnG9LqrXSoVnwsvMDjsjFbJqYcFj5WrlYKRkzNPRjDa+6hTS8SOHiMt+X9Sau0Wp30XA==", + "version": "7.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-7.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-gVbQ9bYoWF+YqUYIT0EvbPRa7Bk4fOVaDMooMuBykiTluLxPecv9ye37qddJ38I3eAqG4msNDfPmELJKcrdh0w==", "dependencies": { "@angular-eslint/utils": "16.3.1", "@typescript-eslint/utils": "5.62.0" } }, "node_modules/@alfresco/js-api": { - "version": "8.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.6.tgz", - "integrity": "sha512-EM38SCl98dXGpPVXApADOE7RIGV4MthYjyQZf7MqktGvJvj62Mj99SUcusNd9zXL2jOZ3LoLE+vHZjZmBCRcQw==", + "version": "8.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-D+VvhGpZXBc/hfeimTf8SMdMANboDiCroJunnm1eiqiSt4nLxeU3NnQOpfCY4dLU1fDIcsl0YRFW25rMvKH+Eg==", "dependencies": { "event-emitter": "^0.3.5", "superagent": "^9.0.1", @@ -2086,9 +2069,9 @@ "dev": true }, "node_modules/@babel/code-frame": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.0.tgz", - "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -2100,9 +2083,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.0.tgz", - "integrity": "sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -2293,9 +2276,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz", + "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -2551,9 +2534,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", - "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "dependencies": { "@babel/types": "^7.26.0" @@ -3991,12 +3974,12 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz", - "integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "dev": true, "dependencies": { - "@babel/parser": "^7.26.0", + "@babel/parser": "^7.26.2", "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -4061,16 +4044,17 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.15.4.tgz", - "integrity": "sha512-t5b2JwGeUmzmjl319mCuaeKGxTvmzLLRmrpdHr+ZZGRO4nf7L48Lbe9A6uwNUvsZe0cXohiNXsrrsuzRVXswVA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.16.0.tgz", + "integrity": "sha512-R0Eqq5kTZnmZ0elih5uY3TWjMqqAeMl7ciU7maUs+m1FNjCEdJXtJ9wrQxNgjmXi0tX8cvahZRO3O558tEz/KA==", "dev": true, "dependencies": { "@cspell/dict-ada": "^4.0.5", + "@cspell/dict-al": "^1.0.3", "@cspell/dict-aws": "^4.0.7", "@cspell/dict-bash": "^4.1.8", "@cspell/dict-companies": "^3.1.7", - "@cspell/dict-cpp": "^5.1.22", + "@cspell/dict-cpp": "^6.0.1", "@cspell/dict-cryptocurrencies": "^5.0.3", "@cspell/dict-csharp": "^4.0.5", "@cspell/dict-css": "^4.0.16", @@ -4082,7 +4066,7 @@ "@cspell/dict-en_us": "^4.3.26", "@cspell/dict-en-common-misspellings": "^2.0.7", "@cspell/dict-en-gb": "1.1.33", - "@cspell/dict-filetypes": "^3.0.7", + "@cspell/dict-filetypes": "^3.0.8", "@cspell/dict-flutter": "^1.0.3", "@cspell/dict-fonts": "^4.0.3", "@cspell/dict-fsharp": "^1.0.4", @@ -4092,7 +4076,7 @@ "@cspell/dict-golang": "^6.0.16", "@cspell/dict-google": "^1.0.4", "@cspell/dict-haskell": "^4.0.4", - "@cspell/dict-html": "^4.0.9", + "@cspell/dict-html": "^4.0.10", "@cspell/dict-html-symbol-entities": "^4.0.3", "@cspell/dict-java": "^5.0.10", "@cspell/dict-julia": "^1.0.4", @@ -4101,9 +4085,10 @@ "@cspell/dict-lorem-ipsum": "^4.0.3", "@cspell/dict-lua": "^4.0.6", "@cspell/dict-makefile": "^1.0.3", + "@cspell/dict-markdown": "^2.0.7", "@cspell/dict-monkeyc": "^1.0.9", - "@cspell/dict-node": "^5.0.4", - "@cspell/dict-npm": "^5.1.8", + "@cspell/dict-node": "^5.0.5", + "@cspell/dict-npm": "^5.1.11", "@cspell/dict-php": "^4.0.13", "@cspell/dict-powershell": "^5.0.13", "@cspell/dict-public-licenses": "^2.0.11", @@ -4112,12 +4097,12 @@ "@cspell/dict-ruby": "^5.0.7", "@cspell/dict-rust": "^4.0.9", "@cspell/dict-scala": "^5.0.6", - "@cspell/dict-software-terms": "^4.1.11", + "@cspell/dict-software-terms": "^4.1.13", "@cspell/dict-sql": "^2.1.8", "@cspell/dict-svelte": "^1.0.5", "@cspell/dict-swift": "^2.0.4", - "@cspell/dict-terraform": "^1.0.5", - "@cspell/dict-typescript": "^3.1.10", + "@cspell/dict-terraform": "^1.0.6", + "@cspell/dict-typescript": "^3.1.11", "@cspell/dict-vue": "^3.0.3" }, "engines": { @@ -4125,18 +4110,18 @@ } }, "node_modules/@cspell/cspell-pipe": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.15.4.tgz", - "integrity": "sha512-WfCmZVFC6mX6vYlf02hWwelcSBTbDQgc5YqY+1miuMk+OHSUAHSACjZId6/a4IAID94xScvFfj7jgrdejUVvIQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.16.0.tgz", + "integrity": "sha512-WoCgrv/mrtwCY4lhc6vEcqN3AQ7lT6K0NW5ShoSo116U2tRaW0unApIYH4Va8u7T9g3wyspFEceQRR1xD9qb9w==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-resolver": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.15.4.tgz", - "integrity": "sha512-Zr428o+uUTqywrdKyjluJVnDPVAJEqZ1chQLKIrHggUah1cgs5aQ7rZ+0Rv5euYMlC2idZnP7IL6TDaIib80oA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.16.0.tgz", + "integrity": "sha512-b+99bph43ptkXlQHgPXSkN/jK6LQHy2zL1Fm9up7+x6Yr64bxAzWzoeqJAPtnrPvFuOrFN0jZasZzKBw8CvrrQ==", "dev": true, "dependencies": { "global-directory": "^4.0.1" @@ -4146,18 +4131,18 @@ } }, "node_modules/@cspell/cspell-service-bus": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.15.4.tgz", - "integrity": "sha512-pXYofnV/V9Y3LZdfFGbmhdxPX/ABjiD3wFjGHt5YhIU9hjVVuvjFlgY7pH2AvRjs4F8xKXv1ReWl44BJOL9gLA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.16.0.tgz", + "integrity": "sha512-+fn763JKA4EYCOv+1VShFq015UMEBAFRDr+rlCnesgLE0fv9TSFVLsjOfh9/g6GuGQLCRLUqKztwwuueeErstQ==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-types": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.15.4.tgz", - "integrity": "sha512-1hDtgYDQVW11zgtrr12EmGW45Deoi7IjZOhzPFLb+3WkhZ46ggWdbrRalWwBolQPDDo6+B2Q6WXz5hdND+Tpwg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.16.0.tgz", + "integrity": "sha512-bGrIK7p4NVsK+QX/CYWmjax+FkzfSIZaIaoiBESGV5gmwgXDVRMJ3IP6tQVAmTtckOYHCmtT5CZgI8zXWr8dHQ==", "dev": true, "engines": { "node": ">=18" @@ -4169,6 +4154,12 @@ "integrity": "sha512-6/RtZ/a+lhFVmrx/B7bfP7rzC4yjEYe8o74EybXcvu4Oue6J4Ey2WSYj96iuodloj1LWrkNCQyX5h4Pmcj0Iag==", "dev": true }, + "node_modules/@cspell/dict-al": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-al/-/dict-al-1.0.3.tgz", + "integrity": "sha512-V1HClwlfU/qwSq2Kt+MkqRAsonNu3mxjSCDyGRecdLGIHmh7yeEeaxqRiO/VZ4KP+eVSiSIlbwrb5YNFfxYZbw==", + "dev": true + }, "node_modules/@cspell/dict-aws": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.7.tgz", @@ -4188,9 +4179,9 @@ "dev": true }, "node_modules/@cspell/dict-cpp": { - "version": "5.1.23", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-5.1.23.tgz", - "integrity": "sha512-59VUam6bYWzn50j8FASWWLww0rBPA0PZfjMZBvvt0aqMpkvXzoJPnAAI4eDDSibPWVHKutjpqLmast+uMLHVsQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.2.tgz", + "integrity": "sha512-yw5eejWvY4bAnc6LUA44m4WsFwlmgPt2uMSnO7QViGMBDuoeopMma4z9XYvs4lSjTi8fIJs/A1YDfM9AVzb8eg==", "dev": true }, "node_modules/@cspell/dict-cryptocurrencies": { @@ -4248,9 +4239,9 @@ "dev": true }, "node_modules/@cspell/dict-en_us": { - "version": "4.3.26", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.26.tgz", - "integrity": "sha512-hDbHYJsi3UgU1J++B0WLiYhWQdsmve3CH53FIaMRAdhrWOHcuw7h1dYkQXHFEP5lOjaq53KUHp/oh5su6VkIZg==", + "version": "4.3.27", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.27.tgz", + "integrity": "sha512-7JYHahRWpi0VykWFTSM03KL/0fs6YtYfpOaTAg4N/d0wB2GfwVG/FJ/SBCjD4LBc6Rx9dzdo95Hs4BB8GPQbOA==", "dev": true }, "node_modules/@cspell/dict-en-common-misspellings": { @@ -4379,6 +4370,18 @@ "integrity": "sha512-R3U0DSpvTs6qdqfyBATnePj9Q/pypkje0Nj26mQJ8TOBQutCRAJbr2ZFAeDjgRx5EAJU/+8txiyVF97fbVRViw==", "dev": true }, + "node_modules/@cspell/dict-markdown": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.7.tgz", + "integrity": "sha512-F9SGsSOokFn976DV4u/1eL4FtKQDSgJHSZ3+haPRU5ki6OEqojxKa8hhj4AUrtNFpmBaJx/WJ4YaEzWqG7hgqg==", + "dev": true, + "peerDependencies": { + "@cspell/dict-css": "^4.0.16", + "@cspell/dict-html": "^4.0.10", + "@cspell/dict-html-symbol-entities": "^4.0.3", + "@cspell/dict-typescript": "^3.1.11" + } + }, "node_modules/@cspell/dict-monkeyc": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.9.tgz", @@ -4386,15 +4389,15 @@ "dev": true }, "node_modules/@cspell/dict-node": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.4.tgz", - "integrity": "sha512-Hz5hiuOvZTd7Cp1IBqUZ7/ChwJeQpD5BJuwCaDn4mPNq4iMcQ1iWBYMThvNVqCEDgKv63X52nT8RAWacss98qg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.5.tgz", + "integrity": "sha512-7NbCS2E8ZZRZwlLrh2sA0vAk9n1kcTUiRp/Nia8YvKaItGXLfxYqD2rMQ3HpB1kEutal6hQLVic3N2Yi1X7AaA==", "dev": true }, "node_modules/@cspell/dict-npm": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.8.tgz", - "integrity": "sha512-AJELYXeB4fQdIoNfmuaQxB1Hli3cX6XPsQCjfBxlu0QYXhrjB/IrCLLQAjWIywDqJiWyGUFTz4DqaANm8C/r9Q==", + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.13.tgz", + "integrity": "sha512-7S1Pwq16M4sqvv/op7iHErc6Diz+DXsBYRMS0dDj6HUS44VXMvgejXa3RMd5jwBmcHzkInFm3DW1eb2exBs0cg==", "dev": true }, "node_modules/@cspell/dict-php": { @@ -4437,9 +4440,9 @@ "dev": true }, "node_modules/@cspell/dict-rust": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.9.tgz", - "integrity": "sha512-Dhr6TIZsMV92xcikKIWei6p/qswS4M+gTkivpWwz4/1oaVk2nRrxJmCdRoVkJlZkkAc17rjxrS12mpnJZI0iWw==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.10.tgz", + "integrity": "sha512-6o5C8566VGTTctgcwfF3Iy7314W0oMlFFSQOadQ0OEdJ9Z9ERX/PDimrzP3LGuOrvhtEFoK8pj+BLnunNwRNrw==", "dev": true }, "node_modules/@cspell/dict-scala": { @@ -4449,9 +4452,9 @@ "dev": true }, "node_modules/@cspell/dict-software-terms": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-4.1.12.tgz", - "integrity": "sha512-MHDAK/WlEdMJiDQ6lJ3SF7VogdfJcRXGYWfO4v90rxW8HDVfKDXVk3zpJhjoZGq56ujR1qmeYkQsM6MlB69uJA==", + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-4.1.17.tgz", + "integrity": "sha512-QORIk1R5DV8oOQ+oAlUWE7UomaJwUucqu2srrc2+PmkoI6R1fJwwg2uHCPBWlIb4PGDNEdXLv9BAD13H+0wytQ==", "dev": true }, "node_modules/@cspell/dict-sql": { @@ -4473,9 +4476,9 @@ "dev": true }, "node_modules/@cspell/dict-terraform": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.0.5.tgz", - "integrity": "sha512-qH3epPB2d6d5w1l4hR2OsnN8qDQ4P0z6oDB7+YiNH+BoECXv4Z38MIV1H8cxIzD2wkzkt2JTcFYaVW72MDZAlg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.0.6.tgz", + "integrity": "sha512-Sqm5vGbXuI9hCFcr4w6xWf4Y25J9SdleE/IqfM6RySPnk8lISEmVdax4k6+Kinv9qaxyvnIbUUN4WFLWcBPQAg==", "dev": true }, "node_modules/@cspell/dict-typescript": { @@ -4491,9 +4494,9 @@ "dev": true }, "node_modules/@cspell/dynamic-import": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.15.4.tgz", - "integrity": "sha512-tr0F6EYN6qtniNvt1Uib+PgYQHeo4dQHXE2Optap+hYTOoQ2VoQ+SwBVjZ+Q2bmSAB0fmOyf0AvgsUtnWIpavw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.16.0.tgz", + "integrity": "sha512-FH+B5y71qfunagXiLSJhXP9h/Vwb1Z8Cc/hLmliGekw/Y8BuYknL86tMg9grXBYNmM0kifIv6ZesQl8Km/p/rA==", "dev": true, "dependencies": { "import-meta-resolve": "^4.1.0" @@ -4503,14 +4506,14 @@ } }, "node_modules/@cspell/eslint-plugin": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/eslint-plugin/-/eslint-plugin-8.15.4.tgz", - "integrity": "sha512-KySdPTi1of8FiSvGG6cC1nN9GF9xad/2AgDthHv2DJ0UTMTpX7fqccVpWdQ0Yo4qt32XUQgO4EmvwWSNgo1d3w==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/eslint-plugin/-/eslint-plugin-8.16.0.tgz", + "integrity": "sha512-j4vmbq30cq2kRR5xMAjfLraFW6ZrSxlAbEk06vC1T3Zxl9fOclOQVsxZ2afLd7TB0NKsrSjS2mFBHBlNkDmSFA==", "dev": true, "dependencies": { - "@cspell/cspell-types": "8.15.4", - "@cspell/url": "8.15.4", - "cspell-lib": "8.15.4", + "@cspell/cspell-types": "8.16.0", + "@cspell/url": "8.16.0", + "cspell-lib": "8.16.0", "synckit": "^0.9.2" }, "engines": { @@ -4521,27 +4524,27 @@ } }, "node_modules/@cspell/filetypes": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.15.4.tgz", - "integrity": "sha512-sNl6jr3ym/4151EY76qlI/00HHsiLZBqW7Vb1tqCzsgSg3EpL30ddjr74So6Sg2PN26Yf09hvxGTJzXn1R4aYw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.16.0.tgz", + "integrity": "sha512-u2Ub0uSwXFPJFvXhAO/0FZBj3sMr4CeYCiQwTUsdFRkRMFpbTc7Vf+a+aC2vIj6WcaWrYXrJy3NZF/yjqF6SGw==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@cspell/strong-weak-map": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.15.4.tgz", - "integrity": "sha512-m5DeQksbhJFqcSYF8Q0Af/WXmXCMAJocCUShkzOXK+uZNXnvhBZN7VyQ9hL+GRzX8JTPEPdVcz2lFyVE5p+LzQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.16.0.tgz", + "integrity": "sha512-R6N12wEIQpBk2uyni/FU1SFSIjP0uql7ynXVcF1ob8/JJeRoikssydi9Xq5J6ghMw+X50u35mFvg9BgWKz0d+g==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@cspell/url": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.15.4.tgz", - "integrity": "sha512-K2oZu/oLQPs5suRpLS8uu04O3YMUioSlEU1D66fRoOxzI5NzLt7i7yMg3HQHjChGa09N5bzqmrVdhmQrRZXwGg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.16.0.tgz", + "integrity": "sha512-zW+6hAieD/FjysfjY4mVv7iHWWasBP3ldj6L+xy2p4Kuax1nug7uuJqMHlAVude/OywNwENG0rYaP/P9Pg4O+w==", "dev": true, "engines": { "node": ">=18.0" @@ -6962,9 +6965,9 @@ } }, "node_modules/@nx/angular/node_modules/magic-string": { - "version": "0.30.12", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", - "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "version": "0.30.13", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", + "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -8783,12 +8786,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.48.2", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.2.tgz", - "integrity": "sha512-54w1xCWfXuax7dz4W2M9uw0gDyh+ti/0K/MxcCUxChFh37kkdxPdfZDw5QBbuPUJHr1CiHJ1hXgSs+GgeQc5Zw==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0.tgz", + "integrity": "sha512-DMulbwQURa8rNIQrf94+jPJQ4FmOVdpE5ZppRNvWVjvhC+6sOeo28r8MgIpQRYouXRtt/FCCXU7zn20jnHR4Qw==", "dev": true, "dependencies": { - "playwright": "1.48.2" + "playwright": "1.49.0" }, "bin": { "playwright": "cli.js" @@ -9726,9 +9729,9 @@ "dev": true }, "node_modules/@types/qs": { - "version": "6.9.16", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.16.tgz", - "integrity": "sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==", + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==", "dev": true }, "node_modules/@types/range-parser": { @@ -9810,9 +9813,9 @@ } }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", "dev": true, "dependencies": { "@types/node": "*" @@ -10073,148 +10076,148 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -10362,6 +10365,7 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "deprecated": "package has been renamed to acorn-import-attributes", "dev": true, "peerDependencies": { "acorn": "^8" @@ -11137,13 +11141,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", - "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz", + "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.2", + "@babel/helper-define-polyfill-provider": "^0.6.3", "semver": "^6.3.1" }, "peerDependencies": { @@ -11414,9 +11418,9 @@ "dev": true }, "node_modules/bonjour-service": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", - "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -11716,9 +11720,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001673", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz", - "integrity": "sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==", + "version": "1.0.30001683", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz", + "integrity": "sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==", "dev": true, "funding": [ { @@ -11832,9 +11836,9 @@ } }, "node_modules/ci-info": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", - "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", + "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", "dev": true, "funding": [ { @@ -12214,32 +12218,23 @@ } }, "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.5.tgz", + "integrity": "sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q==", "dev": true, "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", + "bytes": "3.1.2", + "compressible": "~2.0.18", "debug": "2.6.9", + "negotiator": "~0.6.4", "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.1", "vary": "~1.1.2" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -12255,6 +12250,26 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -12458,12 +12473,12 @@ } }, "node_modules/core-js-compat": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", - "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", "dev": true, "dependencies": { - "browserslist": "^4.23.3" + "browserslist": "^4.24.2" }, "funding": { "type": "opencollective", @@ -12554,12 +12569,12 @@ } }, "node_modules/cspell-config-lib": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.15.4.tgz", - "integrity": "sha512-vUgikQTRkRMTdkZqSs7F2cTdPpX61cTjr/9L/VCkXkbW38ObCr4650ioiF1Wq3zDF3Gy2bc4ECTpD2PZUXX5SA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.16.0.tgz", + "integrity": "sha512-PGT6ohLtIYXYLIm+R5hTcTrF0dzj8e7WAUJSJe5WlV/7lrwVdwgWaliLcXtSSPmfxgczr6sndX9TMJ2IEmPrmg==", "dev": true, "dependencies": { - "@cspell/cspell-types": "8.15.4", + "@cspell/cspell-types": "8.16.0", "comment-json": "^4.2.5", "yaml": "^2.6.0" }, @@ -12568,9 +12583,9 @@ } }, "node_modules/cspell-config-lib/node_modules/yaml": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", - "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", "dev": true, "bin": { "yaml": "bin.mjs" @@ -12580,14 +12595,14 @@ } }, "node_modules/cspell-dictionary": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.15.4.tgz", - "integrity": "sha512-8+p/l9Saac7qyCbqtELneDoT7CwHu9gYmnI8uXMu34/lPGjhVhy10ZeI0+t1djaO2YyASK400YFKq5uP/5KulA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.16.0.tgz", + "integrity": "sha512-Y3sN6ttLBKbu0dOLcduY641n5QP1srUvZkW4bOTnG455DbIZfilrP1El/2Hl0RS6hC8LN9PM4bsIm/2xgdbApA==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "8.15.4", - "@cspell/cspell-types": "8.15.4", - "cspell-trie-lib": "8.15.4", + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-types": "8.16.0", + "cspell-trie-lib": "8.16.0", "fast-equals": "^5.0.1" }, "engines": { @@ -12595,12 +12610,12 @@ } }, "node_modules/cspell-glob": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.15.4.tgz", - "integrity": "sha512-TTfRRHRAN+PN9drIz4MAEgKKYnPThBOlPMdFddyuisvU33Do1sPAnqkkOjTEFdi3jAA5KwnSva68SVH6IzzMBQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.16.0.tgz", + "integrity": "sha512-xJSXRHwfENCNFmjpVSEucXY8E3BrpSCA+TukmOYtLyaMKtn6EAwoCpEU7Oj2tZOjdivprPmQ74k4Dqb1RHjIVQ==", "dev": true, "dependencies": { - "@cspell/url": "8.15.4", + "@cspell/url": "8.16.0", "micromatch": "^4.0.8" }, "engines": { @@ -12608,13 +12623,13 @@ } }, "node_modules/cspell-grammar": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.15.4.tgz", - "integrity": "sha512-MKiKyYi05mRtXOxPoTv3Ksi0GwYLiK84Uq0C+5PaMrnIjXeed0bsddSFXCT+7ywFJc7PdjhTtz0M/9WWK3UgbA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.16.0.tgz", + "integrity": "sha512-vvbJEkBqXocGH/H975RtkfMzVpNxNGMd0JCDd+NjbpeRyZceuChFw5Tie7kHteFY29SwZovub+Am3F4H1kmf9A==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "8.15.4", - "@cspell/cspell-types": "8.15.4" + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-types": "8.16.0" }, "bin": { "cspell-grammar": "bin.mjs" @@ -12624,40 +12639,40 @@ } }, "node_modules/cspell-io": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.15.4.tgz", - "integrity": "sha512-rXIEREPTFV9dwwg4EKfvzqlCNOvT6910AYED5YrSt8Y68usRJ9lbqdx0BrDndVCd33bp1o+9JBfHuRiFIQC81g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.16.0.tgz", + "integrity": "sha512-WIK5uhPMjGsTAzm2/fGRbIdr7zWsMVG1fn8wNJYUiYELuyvzvLelfI1VG6szaFCGYqd6Uvgb/fS0uNbwGqCLAQ==", "dev": true, "dependencies": { - "@cspell/cspell-service-bus": "8.15.4", - "@cspell/url": "8.15.4" + "@cspell/cspell-service-bus": "8.16.0", + "@cspell/url": "8.16.0" }, "engines": { "node": ">=18" } }, "node_modules/cspell-lib": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.15.4.tgz", - "integrity": "sha512-iLp/625fvCyFFxSyZYLMgqHIKcrhN4hT7Hw5+ySa38Bp/OfA81ANqWHpsDQ0bGsALTRn/DHBpQYj4xCW/aN9tw==", - "dev": true, - "dependencies": { - "@cspell/cspell-bundled-dicts": "8.15.4", - "@cspell/cspell-pipe": "8.15.4", - "@cspell/cspell-resolver": "8.15.4", - "@cspell/cspell-types": "8.15.4", - "@cspell/dynamic-import": "8.15.4", - "@cspell/filetypes": "8.15.4", - "@cspell/strong-weak-map": "8.15.4", - "@cspell/url": "8.15.4", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.16.0.tgz", + "integrity": "sha512-fU8CfECyuhT12COIi4ViQu2bTkdqaa+05YSd2ZV8k8NA7lapPaMFnlooxdfcwwgZJfHeMhRVMzvQF1OhWmwGfA==", + "dev": true, + "dependencies": { + "@cspell/cspell-bundled-dicts": "8.16.0", + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-resolver": "8.16.0", + "@cspell/cspell-types": "8.16.0", + "@cspell/dynamic-import": "8.16.0", + "@cspell/filetypes": "8.16.0", + "@cspell/strong-weak-map": "8.16.0", + "@cspell/url": "8.16.0", "clear-module": "^4.1.2", "comment-json": "^4.2.5", - "cspell-config-lib": "8.15.4", - "cspell-dictionary": "8.15.4", - "cspell-glob": "8.15.4", - "cspell-grammar": "8.15.4", - "cspell-io": "8.15.4", - "cspell-trie-lib": "8.15.4", + "cspell-config-lib": "8.16.0", + "cspell-dictionary": "8.16.0", + "cspell-glob": "8.16.0", + "cspell-grammar": "8.16.0", + "cspell-io": "8.16.0", + "cspell-trie-lib": "8.16.0", "env-paths": "^3.0.0", "fast-equals": "^5.0.1", "gensequence": "^7.0.0", @@ -12672,13 +12687,13 @@ } }, "node_modules/cspell-trie-lib": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.15.4.tgz", - "integrity": "sha512-sg9klsNHyrfos0Boiio+qy5d6fI9cCNjBqFYrNxvpKpwZ4gEzDzjgEKdZY1C76RD2KoBQ8I1NF5YcGc0+hhhCw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.16.0.tgz", + "integrity": "sha512-Io1qqI0r4U9ewAWBLClFBBlxLeAoIi15PUGJi4Za1xrlgQJwRE8PMNIJNHKmPEIp78Iute3o/JyC2OfWlxl4Sw==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "8.15.4", - "@cspell/cspell-types": "8.15.4", + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-types": "8.16.0", "gensequence": "^7.0.0" }, "engines": { @@ -13640,9 +13655,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.47", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz", - "integrity": "sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==", + "version": "1.5.63", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", + "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==", "dev": true }, "node_modules/emittery": { @@ -13777,6 +13792,19 @@ "node": ">=10.13.0" } }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "extraneous": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/ent": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.1.tgz", @@ -13854,9 +13882,9 @@ } }, "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "version": "1.23.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.5.tgz", + "integrity": "sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", @@ -13874,7 +13902,7 @@ "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.4", "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", + "globalthis": "^1.0.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.3", @@ -13890,10 +13918,10 @@ "is-string": "^1.0.7", "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "object-inspect": "^1.13.3", "object-keys": "^1.1.1", "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", + "regexp.prototype.flags": "^1.5.3", "safe-array-concat": "^1.1.2", "safe-regex-test": "^1.0.3", "string.prototype.trim": "^1.2.9", @@ -14412,9 +14440,9 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -14424,14 +14452,14 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -14466,9 +14494,6 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-1.8.3.tgz", "integrity": "sha512-h87JPFHkz8a6oPhn8GRGGhSQoAJjx0AkOv1jME6NoMk2FpEsfvfJJNaQDxLSqSALkCr0IJXPGTnp6SIRVu5Nqg==", "dev": true, - "workspaces": [ - "examples" - ], "dependencies": { "globals": "^13.23.0" }, @@ -14597,9 +14622,9 @@ } }, "node_modules/eslint-plugin-unicorn/node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -14642,9 +14667,9 @@ "dev": true }, "node_modules/eslint-plugin-unicorn/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -14654,14 +14679,14 @@ } }, "node_modules/eslint-plugin-unicorn/node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -15519,9 +15544,9 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==" }, "node_modules/follow-redirects": { "version": "1.15.9", @@ -16582,9 +16607,9 @@ } }, "node_modules/husky": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", - "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "dev": true, "bin": { "husky": "bin.js" @@ -17417,12 +17442,12 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/@babel/generator": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz", - "integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "dev": true, "dependencies": { - "@babel/parser": "^7.26.0", + "@babel/parser": "^7.26.2", "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -20778,9 +20803,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", - "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "dev": true, "bin": { "node-gyp-build": "bin.js", @@ -21463,9 +21488,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "engines": { "node": ">= 0.4" }, @@ -22041,9 +22066,9 @@ } }, "node_modules/parse5": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", - "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", "devOptional": true, "dependencies": { "entities": "^4.5.0" @@ -22253,12 +22278,12 @@ } }, "node_modules/playwright": { - "version": "1.48.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.2.tgz", - "integrity": "sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0.tgz", + "integrity": "sha512-eKpmys0UFDnfNb3vfsf8Vx2LEOtflgRebl0Im2eQQnYMA4Aqd+Zw8bEOB+7ZKvN76901mRnqdsiOGKxzVTbi7A==", "dev": true, "dependencies": { - "playwright-core": "1.48.2" + "playwright-core": "1.49.0" }, "bin": { "playwright": "cli.js" @@ -22271,9 +22296,9 @@ } }, "node_modules/playwright-core": { - "version": "1.48.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.2.tgz", - "integrity": "sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0.tgz", + "integrity": "sha512-R+3KKTQF3npy5GTiKH/T+kdhoJfJojjHESR1YEWhYuEKRVfVaxH3+4+GvXE5xyCngCxhxnykk0Vlah9v8fs3jA==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -22672,13 +22697,13 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", - "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz", + "integrity": "sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==", "dev": true, "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -22688,13 +22713,26 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-modules-local-by-default/node_modules/postcss-selector-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-modules-scope": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", - "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -22703,6 +22741,19 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-modules-scope/node_modules/postcss-selector-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-modules-values": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", @@ -23182,10 +23233,22 @@ "optional": true }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.10.0.tgz", + "integrity": "sha512-KSKHEbjAnpUuAUserOq0FxGXCUrzC3WniuSJhvdbs102rL55266ZcHBqLWOsG30spQMlPdpy7icATiAQehg/iA==", + "dev": true, + "dependencies": { + "punycode": "^2.3.1" + } + }, + "node_modules/psl/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } }, "node_modules/punycode": { "version": "1.4.1", @@ -26470,9 +26533,9 @@ } }, "node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsutils": { "version": "3.21.0", diff --git a/package.json b/package.json index efd102c2d6..34f4855efe 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ }, "private": true, "dependencies": { - "@alfresco/adf-content-services": "7.0.0-alpha.6", - "@alfresco/adf-core": "7.0.0-alpha.6", - "@alfresco/adf-extensions": "7.0.0-alpha.6", - "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.6", - "@alfresco/js-api": "8.0.0-alpha.6", + "@alfresco/adf-content-services": "7.0.0-alpha.6-11937616463", + "@alfresco/adf-core": "7.0.0-alpha.6-11937616463", + "@alfresco/adf-extensions": "7.0.0-alpha.6-11937616463", + "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.6-11937616463", + "@alfresco/js-api": "8.0.0-alpha.6-11937616463", "@angular/animations": "16.2.9", "@angular/cdk": "16.2.9", "@angular/common": "16.2.9", @@ -62,7 +62,7 @@ "zone.js": "0.13.3" }, "devDependencies": { - "@alfresco/adf-cli": "7.0.0-alpha.6", + "@alfresco/adf-cli": "7.0.0-alpha.6-11937616463", "@angular-devkit/build-angular": "16.2.9", "@angular-devkit/core": "16.2.9", "@angular-devkit/schematics": "16.2.9", diff --git a/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.ts b/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.ts index 86908ea52a..79ca5b7706 100644 --- a/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.ts +++ b/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.ts @@ -22,17 +22,17 @@ * from Hyland Software. If not, see . */ -import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { CommonModule, Location } from '@angular/common'; import { FolderRulesService } from '../services/folder-rules.service'; -import { Observable, Subject, Subscription } from 'rxjs'; +import { Observable } from 'rxjs'; import { Rule } from '../model/rule.model'; import { ActivatedRoute, RouterModule } from '@angular/router'; import { NodeInfo } from '@alfresco/aca-shared/store'; -import { delay, takeUntil } from 'rxjs/operators'; +import { delay } from 'rxjs/operators'; import { EditRuleDialogUiComponent } from '../rule-details/edit-rule-dialog.ui-component'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; -import { NotificationService, TemplateModule, ToolbarModule, ConfirmDialogComponent } from '@alfresco/adf-core'; +import { ConfirmDialogComponent, NotificationService, TemplateModule, ToolbarModule } from '@alfresco/adf-core'; import { ActionDefinitionTransformed } from '../model/rule-action.model'; import { ActionsService } from '../services/actions.service'; import { FolderRuleSetsService } from '../services/folder-rule-sets.service'; @@ -48,6 +48,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatDividerModule } from '@angular/material/divider'; import { RuleListUiComponent } from '../rule-list/rule-list/rule-list.ui-component'; import { RuleDetailsUiComponent } from '../rule-details/rule-details.ui-component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -75,7 +76,7 @@ import { RuleDetailsUiComponent } from '../rule-details/rule-details.ui-componen changeDetection: ChangeDetectionStrategy.Default, host: { class: 'aca-manage-rules' } }) -export class ManageRulesSmartComponent implements OnInit, OnDestroy { +export class ManageRulesSmartComponent implements OnInit { nodeId = ''; isInheritanceEnabled = true; isInheritanceToggleDisabled = false; @@ -96,8 +97,7 @@ export class ManageRulesSmartComponent implements OnInit, OnDestroy { isMainRuleSetNotEmpty = false; isInheritedRuleSetsNotEmpty = false; - private destroyed$ = new Subject(); - private _actionDefinitionsSub: Subscription; + private readonly destroyRef = inject(DestroyRef); constructor( private location: Location, @@ -122,7 +122,7 @@ export class ManageRulesSmartComponent implements OnInit, OnDestroy { this.actionDefinitions$ = this.actionsService.actionDefinitionsListing$; this.parameterConstraints$ = this.actionsService.parameterConstraints$; - this.folderRulesService.deletedRuleId$.pipe(takeUntil(this.destroyed$)).subscribe((deletedRuleId) => this.onRuleDelete(deletedRuleId)); + this.folderRulesService.deletedRuleId$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((deletedRuleId) => this.onRuleDelete(deletedRuleId)); this.actionsService.loadActionDefinitions(); @@ -137,30 +137,24 @@ export class ManageRulesSmartComponent implements OnInit, OnDestroy { } }); - this._actionDefinitionsSub = this.actionDefinitions$.subscribe((actionDefinitions: ActionDefinitionTransformed[]) => - this.actionsService.loadActionParameterConstraints(actionDefinitions) - ); + this.actionDefinitions$ + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe((actionDefinitions: ActionDefinitionTransformed[]) => this.actionsService.loadActionParameterConstraints(actionDefinitions)); - this.mainRuleSet$.pipe(takeUntil(this.destroyed$)).subscribe((ruleSet) => { + this.mainRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((ruleSet) => { this.canEditMainRule = this.canEditRule(ruleSet); this.isMainRuleSetNotEmpty = !!ruleSet; }); - this.inheritedRuleSets$.pipe(takeUntil(this.destroyed$)).subscribe((inheritedRuleSet) => { + this.inheritedRuleSets$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((inheritedRuleSet) => { this.isInheritedRuleSetsNotEmpty = inheritedRuleSet.some((ruleSet) => ruleSet.rules.some((rule: Rule) => rule.isEnabled)); }); - this.selectedRuleSet$.pipe(takeUntil(this.destroyed$)).subscribe((ruleSet) => { + this.selectedRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((ruleSet) => { this.canEditSelectedRule = this.canEditRule(ruleSet); }); } - ngOnDestroy() { - this.destroyed$.next(); - this.destroyed$.complete(); - this._actionDefinitionsSub.unsubscribe(); - } - goBack(): void { this.location.back(); } diff --git a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.ts b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.ts index a488f4f324..712db2e21a 100644 --- a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.ts +++ b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.ts @@ -22,7 +22,7 @@ * from Hyland Software. If not, see . */ -import { Component, forwardRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, forwardRef, inject, Input, OnChanges, OnInit, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { ControlValueAccessor, FormControl, FormGroup, NG_VALUE_ACCESSOR, ReactiveFormsModule, Validators } from '@angular/forms'; import { ActionDefinitionTransformed, RuleAction } from '../../model/rule-action.model'; import { @@ -37,23 +37,24 @@ import { } from '@alfresco/adf-core'; import { ActionParameterDefinition, Category, Node, SecurityMark } from '@alfresco/js-api'; import { from, of, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { map } from 'rxjs/operators'; import { ActionParameterConstraint, ConstraintValue } from '../../model/action-parameter-constraint.model'; import { + CategorySelectorDialogComponent, + CategorySelectorDialogOptions, CategoryService, ContentNodeSelectorComponent, ContentNodeSelectorComponentData, NodeAction, - TagService, - CategorySelectorDialogComponent, - CategorySelectorDialogOptions, - SecurityControlsService + SecurityControlsService, + TagService } from '@alfresco/adf-content-services'; import { MatDialog } from '@angular/material/dialog'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -72,7 +73,7 @@ import { MatSelectModule } from '@angular/material/select'; CardViewUpdateService ] }) -export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy { +export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnChanges { @Input() nodeId = ''; @@ -107,7 +108,6 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh cardViewItems: CardViewItem[] = []; parameters: { [key: string]: unknown } = {}; - private onDestroy$ = new Subject(); get selectedActionDefinitionId(): string { return this.form.get('actionDefinitionId').value; @@ -120,6 +120,8 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh onChange: (action: RuleAction) => void = () => undefined; onTouch: () => void = () => undefined; + private readonly destroyRef = inject(DestroyRef); + constructor( private cardViewUpdateService: CardViewUpdateService, private dialog: MatDialog, @@ -156,7 +158,7 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh firstActionDefinition.title.localeCompare(secondActionDefinition.title) ); - this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.setDefaultParameters(); this.setCardViewProperties(); this.onChange({ @@ -166,7 +168,7 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh this.onTouch(); }); - this.cardViewUpdateService.itemUpdated$.pipe(takeUntil(this.onDestroy$)).subscribe((updateNotification: UpdateNotification) => { + this.cardViewUpdateService.itemUpdated$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((updateNotification: UpdateNotification) => { const isSecurityGroupUpdated = updateNotification.target.key === 'securityGroupId'; if (isSecurityGroupUpdated) { this.parameters.securityMarkId = null; @@ -202,11 +204,6 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh } } - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - setCardViewProperties(securityMarkOptions?: CardViewSelectItemOption[]) { const disabledTags = !this.tagService.areTagsEnabled(); const disabledCategories = !this.categoryService.areCategoriesEnabled(); @@ -338,7 +335,7 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh width: '630px' }); - data.select.pipe(takeUntil(this.onDestroy$)).subscribe((selections: Category[]) => { + data.select.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((selections: Category[]) => { if (selections[0].id) { this.writeValue({ actionDefinitionId: this.selectedActionDefinitionId, diff --git a/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.ts b/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.ts index 0b355dc555..81669d3d8d 100644 --- a/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.ts +++ b/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.ts @@ -22,7 +22,7 @@ * from Hyland Software. If not, see . */ -import { Component, forwardRef, inject, Input, OnDestroy, OnInit, ViewEncapsulation, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, DestroyRef, forwardRef, inject, Input, OnChanges, OnInit, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms'; import { RuleSimpleCondition } from '../../model/rule-simple-condition.model'; import { comparatorHiddenForConditionFieldType, RuleConditionField, ruleConditionFields } from './rule-condition-fields'; @@ -34,12 +34,13 @@ import { MatSelectModule } from '@angular/material/select'; import { MatInputModule } from '@angular/material/input'; import { CategoryService, TagService } from '@alfresco/adf-content-services'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { debounceTime, distinctUntilChanged, first, takeUntil } from 'rxjs/operators'; -import { Subject, Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged, first } from 'rxjs/operators'; +import { Subscription } from 'rxjs'; import { MatOptionModule } from '@angular/material/core'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { CategoryEntry } from '@alfresco/js-api'; import { AlfrescoMimeType, AppSettingsService } from '@alfresco/aca-shared'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; interface AutoCompleteOption { displayLabel: string; @@ -75,7 +76,7 @@ const AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME = 500; } ] }) -export class RuleSimpleConditionUiComponent implements OnInit, ControlValueAccessor, OnChanges, OnDestroy { +export class RuleSimpleConditionUiComponent implements OnInit, ControlValueAccessor, OnChanges { private appSettings = inject(AppSettingsService); private categoryService = inject(CategoryService); private tagService = inject(TagService); @@ -92,9 +93,9 @@ export class RuleSimpleConditionUiComponent implements OnInit, ControlValueAcces @Input() readOnly = false; - private onDestroy$ = new Subject(); private autoCompleteOptionsSubscription: Subscription; + private readonly destroyRef = inject(DestroyRef); private readonly disabledTags = !this.tagService.areTagsEnabled(); private readonly disabledCategories = !this.categoryService.areCategoriesEnabled(); @@ -175,25 +176,20 @@ export class RuleSimpleConditionUiComponent implements OnInit, ControlValueAcces } } - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - ngOnInit() { - this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((value: RuleSimpleCondition) => { + this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value: RuleSimpleCondition) => { this.onChange(value); this.onTouch(); }); this.form .get('field') - .valueChanges.pipe(distinctUntilChanged(), takeUntil(this.onDestroy$)) + .valueChanges.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)) .subscribe((field: string) => { if (field === 'category') { this.autoCompleteOptionsSubscription = this.form .get('parameter') - .valueChanges.pipe(distinctUntilChanged(), debounceTime(AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME), takeUntil(this.onDestroy$)) + .valueChanges.pipe(distinctUntilChanged(), debounceTime(AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME), takeUntilDestroyed(this.destroyRef)) .subscribe((categoryName) => { this.getCategories(categoryName); }); diff --git a/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.ts b/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.ts index ac3860a0b2..e1bb008e34 100644 --- a/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.ts +++ b/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.ts @@ -22,10 +22,9 @@ * from Hyland Software. If not, see . */ -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; -import { UntypedFormGroup, UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { distinctUntilChanged, map, takeUntil } from 'rxjs/operators'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { ReactiveFormsModule, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; +import { distinctUntilChanged, map } from 'rxjs/operators'; import { Rule, RuleForForm } from '../model/rule.model'; import { ruleCompositeConditionValidator } from './validators/rule-composite-condition.validator'; import { FolderRulesService } from '../services/folder-rules.service'; @@ -41,6 +40,7 @@ import { RuleCompositeConditionUiComponent } from './conditions/rule-composite-c import { RuleActionListUiComponent } from './actions/rule-action-list.ui-component'; import { RuleOptionsUiComponent } from './options/rule-options.ui-component'; import { CategoryService } from '@alfresco/adf-content-services'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -61,7 +61,7 @@ import { CategoryService } from '@alfresco/adf-content-services'; encapsulation: ViewEncapsulation.None, host: { class: 'aca-rule-details' } }) -export class RuleDetailsUiComponent implements OnInit, OnDestroy { +export class RuleDetailsUiComponent implements OnInit { @Input() readOnly: boolean; @@ -115,7 +115,6 @@ export class RuleDetailsUiComponent implements OnInit, OnDestroy { @Output() formValueChanged = new EventEmitter>(); - private onDestroy$ = new Subject(); form: UntypedFormGroup; errorScriptConstraint: ActionParameterConstraint; @@ -137,6 +136,8 @@ export class RuleDetailsUiComponent implements OnInit, OnDestroy { return !this.readOnly || this.value.isAsynchronous || this.value.isInheritable; } + private readonly destroyRef = inject(DestroyRef); + constructor(private categoryService: CategoryService) {} ngOnInit() { @@ -169,14 +170,14 @@ export class RuleDetailsUiComponent implements OnInit, OnDestroy { .pipe( map(() => this.form.valid), distinctUntilChanged(), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((value: boolean) => { this.formValidationChanged.emit(value); }); this.formValidationChanged.emit(this.form.valid); - this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.formValueChanged.emit(this.value); }); @@ -194,9 +195,4 @@ export class RuleDetailsUiComponent implements OnInit, OnDestroy { (parameterConstraint: ActionParameterConstraint) => parameterConstraint.name === 'script-ref' ); } - - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.ts b/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.ts index 7c3655c7f3..a2cf50c25c 100644 --- a/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.ts +++ b/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.ts @@ -22,7 +22,7 @@ * from Hyland Software. If not, see . */ -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { RuleSet } from '../../model/rule-set.model'; import { Rule } from '../../model/rule.model'; import { RuleGroupingItem } from '../../model/rule-grouping-item.model'; @@ -35,7 +35,8 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { RuleListGroupingUiComponent } from '../rule-list-grouping/rule-list-grouping.ui-component'; import { RouterModule } from '@angular/router'; import { MatButtonModule } from '@angular/material/button'; -import { Observable, Subscription } from 'rxjs'; +import { Observable } from 'rxjs'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -55,7 +56,7 @@ import { Observable, Subscription } from 'rxjs'; encapsulation: ViewEncapsulation.None, host: { class: 'aca-rule-list' } }) -export class RuleListUiComponent implements OnInit, OnDestroy { +export class RuleListUiComponent implements OnInit { @Input() mainRuleSet$: Observable; @Input() @@ -90,10 +91,10 @@ export class RuleListUiComponent implements OnInit, OnDestroy { isMainRuleSetOwned = false; isMainRuleSetLinked = false; - private _mainRuleSetSub: Subscription; + private readonly destroyRef = inject(DestroyRef); ngOnInit() { - this._mainRuleSetSub = this.mainRuleSet$.subscribe((ruleSet: RuleSet) => { + this.mainRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((ruleSet: RuleSet) => { if (ruleSet) { this.mainRuleSet = ruleSet; this.isMainRuleSetOwned = FolderRuleSetsService.isOwnedRuleSet(ruleSet, this.folderId); @@ -114,10 +115,6 @@ export class RuleListUiComponent implements OnInit, OnDestroy { } } - ngOnDestroy() { - this._mainRuleSetSub.unsubscribe(); - } - getRuleSetGroupingItems(ruleSet: RuleSet, filterOutDisabledRules: boolean): RuleGroupingItem[] { const items: RuleGroupingItem[] = ruleSet.rules .filter((rule: Rule) => rule.isEnabled || !filterOutDisabledRules) diff --git a/projects/aca-content/folder-rules/src/rule-set-picker/rule-set-picker.smart-component.ts b/projects/aca-content/folder-rules/src/rule-set-picker/rule-set-picker.smart-component.ts index 19734ede7c..1bac8e0cec 100644 --- a/projects/aca-content/folder-rules/src/rule-set-picker/rule-set-picker.smart-component.ts +++ b/projects/aca-content/folder-rules/src/rule-set-picker/rule-set-picker.smart-component.ts @@ -22,13 +22,13 @@ * from Hyland Software. If not, see . */ -import { Component, Inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Inject, OnInit, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { FolderRuleSetsService } from '../services/folder-rule-sets.service'; import { Node } from '@alfresco/js-api'; import { RuleSet } from '../model/rule-set.model'; -import { BehaviorSubject, combineLatest, from, of, Subject } from 'rxjs'; -import { finalize, map, switchMap, takeUntil } from 'rxjs/operators'; +import { BehaviorSubject, combineLatest, from, of } from 'rxjs'; +import { finalize, map, switchMap } from 'rxjs/operators'; import { NotificationService, TemplateModule } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; @@ -37,6 +37,7 @@ import { MatIconModule } from '@angular/material/icon'; import { ContentNodeSelectorModule } from '@alfresco/adf-content-services'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { RuleListItemUiComponent } from '../rule-list/rule-list-item/rule-list-item.ui-component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export interface RuleSetPickerOptions { nodeId: string; @@ -64,7 +65,7 @@ export interface RuleSetPickerOptions { host: { class: 'aca-rule-set-picker' }, providers: [FolderRuleSetsService] }) -export class RuleSetPickerSmartComponent implements OnInit, OnDestroy { +export class RuleSetPickerSmartComponent implements OnInit { nodeId = '-root-'; defaultNodeId = '-root-'; isBusy = false; @@ -79,7 +80,7 @@ export class RuleSetPickerSmartComponent implements OnInit, OnDestroy { map(([rulesLoading, folderLoading]) => rulesLoading || folderLoading) ); - onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( @Inject(MAT_DIALOG_DATA) public data: RuleSetPickerOptions, @@ -93,16 +94,11 @@ export class RuleSetPickerSmartComponent implements OnInit, OnDestroy { } ngOnInit(): void { - this.mainRuleSet$.pipe(takeUntil(this.onDestroy$)).subscribe((mainRuleSet) => { + this.mainRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((mainRuleSet) => { this.hasOwnedRules = mainRuleSet?.rules.length > 0 && FolderRuleSetsService.isOwnedRuleSet(mainRuleSet, this.selectedNodeId); }); } - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - onNodeSelect(nodes: Node[]) { if (nodes?.length && nodes[0].isFolder && nodes[0].id !== this.selectedNodeId) { this.selectedNodeId = nodes[0].id; diff --git a/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts b/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts index 5f078168b9..a08d5d90c2 100644 --- a/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts +++ b/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts @@ -25,15 +25,16 @@ import { ContentActionRef } from '@alfresco/adf-extensions'; import { AppStore, getSearchItemsTotalCount } from '@alfresco/aca-shared/store'; import { CommonModule } from '@angular/common'; -import { Component, inject, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { MatSelectModule } from '@angular/material/select'; import { Store } from '@ngrx/store'; import { TranslateModule } from '@ngx-translate/core'; -import { combineLatest, Observable, Subject } from 'rxjs'; +import { combineLatest, Observable } from 'rxjs'; import { IconComponent, TranslationService } from '@alfresco/adf-core'; import { FormControl, ReactiveFormsModule } from '@angular/forms'; -import { switchMap, takeUntil } from 'rxjs/operators'; +import { switchMap } from 'rxjs/operators'; import { AppExtensionService } from '@alfresco/aca-shared'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -43,7 +44,7 @@ import { AppExtensionService } from '@alfresco/aca-shared'; imports: [CommonModule, TranslateModule, MatSelectModule, IconComponent, ReactiveFormsModule], encapsulation: ViewEncapsulation.None }) -export class BulkActionsDropdownComponent implements OnInit, OnDestroy { +export class BulkActionsDropdownComponent implements OnInit { @Input() items: ContentActionRef[]; placeholder: string; @@ -53,9 +54,9 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy { private readonly store = inject>(Store); private readonly translationService = inject(TranslationService); private readonly extensions = inject(AppExtensionService); - - private readonly onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); private readonly totalItems$: Observable = this.store.select(getSearchItemsTotalCount); + ngOnInit() { this.totalItems$ .pipe( @@ -76,23 +77,18 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy { ]); } }), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(([placeholder, title]) => { this.tooltip = title; this.placeholder = placeholder; }); - this.extensions.bulkActionExecuted$.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.extensions.bulkActionExecuted$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.bulkSelectControl.setValue(null); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - runAction(actionOption: ContentActionRef) { this.extensions.runActionById(actionOption.actions.click, { focusedElementOnCloseSelector: '.adf-context-menu-source' diff --git a/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.spec.ts b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.spec.ts index 4942f47931..185a5a8d85 100644 --- a/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.spec.ts +++ b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.spec.ts @@ -24,6 +24,7 @@ import { ToggleSharedComponent } from './toggle-shared.component'; import { of } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; describe('ToggleSharedComponent', () => { let component; @@ -41,7 +42,9 @@ describe('ToggleSharedComponent', () => { } }; - component = new ToggleSharedComponent(storeMock); + TestBed.runInInjectionContext(() => { + component = new ToggleSharedComponent(storeMock); + }); }); it('should get Store selection entry on initialization', (done) => { diff --git a/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.ts b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.ts index 4feacbceb8..6e939bee24 100644 --- a/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.ts +++ b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.ts @@ -22,17 +22,17 @@ * from Hyland Software. If not, see . */ -import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { Observable, Subject } from 'rxjs'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; +import { Observable } from 'rxjs'; import { Store } from '@ngrx/store'; import { SelectionState } from '@alfresco/adf-extensions'; -import { AppStore, ShareNodeAction, getAppSelection } from '@alfresco/aca-shared/store'; +import { AppStore, getAppSelection, ShareNodeAction } from '@alfresco/aca-shared/store'; import { CommonModule } from '@angular/common'; import { MatMenuModule } from '@angular/material/menu'; import { MatIconModule } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -41,7 +41,7 @@ import { takeUntil } from 'rxjs/operators'; templateUrl: './toggle-shared.component.html', encapsulation: ViewEncapsulation.None }) -export class ToggleSharedComponent implements OnInit, OnDestroy { +export class ToggleSharedComponent implements OnInit { @Input() data: { iconButton?: string; @@ -52,13 +52,13 @@ export class ToggleSharedComponent implements OnInit, OnDestroy { selectionLabel = ''; isShared = false; - onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private store: Store) {} ngOnInit() { this.selection$ = this.store.select(getAppSelection); - this.selection$.pipe(takeUntil(this.onDestroy$)).subscribe((selectionState) => { + this.selection$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((selectionState) => { this.selectionState = selectionState; this.isShared = @@ -69,10 +69,6 @@ export class ToggleSharedComponent implements OnInit, OnDestroy { }); } - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } editSharedNode(selection: SelectionState, focusedElementOnCloseSelector: string) { this.store.dispatch( new ShareNodeAction(selection.first, { diff --git a/projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.ts b/projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.ts index f75ddcd2f7..b4d313d5af 100644 --- a/projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.ts +++ b/projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.ts @@ -22,31 +22,28 @@ * from Hyland Software. If not, see . */ -import { Directive, Output, EventEmitter, OnInit, OnDestroy } from '@angular/core'; -import { fromEvent, Subscription } from 'rxjs'; +import { DestroyRef, Directive, EventEmitter, inject, OnInit, Output } from '@angular/core'; +import { fromEvent } from 'rxjs'; import { filter } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, selector: '[acaContextMenuOutsideEvent]' }) -export class OutsideEventDirective implements OnInit, OnDestroy { - private subscriptions: Subscription[] = []; - +export class OutsideEventDirective implements OnInit { @Output() clickOutside: EventEmitter = new EventEmitter(); - ngOnInit() { - this.subscriptions = this.subscriptions.concat([ - fromEvent(document.body, 'click') - .pipe(filter((event) => !this.findAncestor(event.target as Element))) - .subscribe(() => this.clickOutside.next()) - ]); - } + private readonly destroyRef = inject(DestroyRef); - ngOnDestroy() { - this.subscriptions.forEach((subscription) => subscription.unsubscribe()); - this.subscriptions = []; + ngOnInit() { + fromEvent(document.body, 'click') + .pipe( + filter((event) => !this.findAncestor(event.target as Element)), + takeUntilDestroyed(this.destroyRef) + ) + .subscribe(() => this.clickOutside.next()); } private findAncestor(el: Element): boolean { diff --git a/projects/aca-content/src/lib/components/context-menu/context-menu.component.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.component.ts index 4eaf339089..13bc6ea66f 100644 --- a/projects/aca-content/src/lib/components/context-menu/context-menu.component.ts +++ b/projects/aca-content/src/lib/components/context-menu/context-menu.component.ts @@ -22,7 +22,7 @@ * from Hyland Software. If not, see . */ -import { Component, ViewEncapsulation, OnInit, AfterViewInit, Inject, inject, DestroyRef } from '@angular/core'; +import { AfterViewInit, Component, DestroyRef, inject, Inject, OnInit, ViewEncapsulation } from '@angular/core'; import { MatMenuModule } from '@angular/material/menu'; import { DynamicExtensionComponent } from '@alfresco/adf-extensions'; import { ContextMenuOverlayRef } from './context-menu-overlay'; diff --git a/projects/aca-content/src/lib/components/details/details.component.ts b/projects/aca-content/src/lib/components/details/details.component.ts index 056e745403..a75964295c 100644 --- a/projects/aca-content/src/lib/components/details/details.component.ts +++ b/projects/aca-content/src/lib/components/details/details.component.ts @@ -67,12 +67,13 @@ import { FileSizePipe, InfoDrawerButtonsDirective } from '@alfresco/adf-core'; export class DetailsComponent extends PageComponent implements OnInit, OnDestroy { nodeId: string; isLoading: boolean; - onDestroy$ = new Subject(); activeTab = 1; aspectActions: Array = []; nodeIcon: string; canManagePermissions = true; + private readonly onDestroy$: Subject = new Subject(); + constructor(private route: ActivatedRoute, private contentApi: ContentApiService, private contentService: ContentService) { super(); } @@ -145,9 +146,10 @@ export class DetailsComponent extends PageComponent implements OnInit, OnDestroy } ngOnDestroy(): void { - this.store.dispatch(new SetSelectedNodesAction([])); this.onDestroy$.next(); this.onDestroy$.complete(); + this.store.dispatch(new SetSelectedNodesAction([])); + super.ngOnDestroy(); } private isSmartFolder(): boolean { diff --git a/projects/aca-content/src/lib/components/dl-custom-components/datatable-cell-badges/datatable-cell-badges.component.ts b/projects/aca-content/src/lib/components/dl-custom-components/datatable-cell-badges/datatable-cell-badges.component.ts index 024b25ae90..89e503b09c 100644 --- a/projects/aca-content/src/lib/components/dl-custom-components/datatable-cell-badges/datatable-cell-badges.component.ts +++ b/projects/aca-content/src/lib/components/dl-custom-components/datatable-cell-badges/datatable-cell-badges.component.ts @@ -27,10 +27,9 @@ import { IconComponent } from '@alfresco/adf-core'; import { DynamicExtensionComponent } from '@alfresco/adf-extensions'; import { NodeEntry } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; -import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'aca-datatable-cell-badges', @@ -41,29 +40,24 @@ import { takeUntil } from 'rxjs/operators'; imports: [CommonModule, TranslateModule, DynamicExtensionComponent, IconComponent], standalone: true }) -export class DatatableCellBadgesComponent implements OnInit, OnDestroy { +export class DatatableCellBadgesComponent implements OnInit { @Input() node: NodeEntry; badges: Badge[]; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private appExtensionService: AppExtensionService) {} ngOnInit() { this.appExtensionService .getBadges(this.node) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((badges) => { this.badges = badges; }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - onBadgeClick(badge: Badge) { if (badge.actions?.click) { this.appExtensionService.runActionById(badge.actions?.click, this.node); diff --git a/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.ts b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.ts index 538fc89f42..4cb8c1a5db 100644 --- a/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.ts +++ b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.ts @@ -23,17 +23,17 @@ */ import { NameColumnComponent, NodeNameTooltipPipe, NodesApiService } from '@alfresco/adf-content-services'; -import { ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectorRef, Component, DestroyRef, ElementRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { Actions, ofType } from '@ngrx/effects'; -import { Subject } from 'rxjs'; -import { filter, takeUntil } from 'rxjs/operators'; +import { filter } from 'rxjs/operators'; import { NodeActionTypes } from '@alfresco/aca-shared/store'; -import { LockedByComponent, isLocked } from '@alfresco/aca-shared'; +import { isLocked, LockedByComponent } from '@alfresco/aca-shared'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { IconComponent } from '@alfresco/adf-core'; import { DynamicExtensionComponent } from '@alfresco/adf-extensions'; import { DatatableCellBadgesComponent } from '../datatable-cell-badges/datatable-cell-badges.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -54,12 +54,12 @@ import { DatatableCellBadgesComponent } from '../datatable-cell-badges/datatable class: 'adf-datatable-content-cell adf-datatable-link adf-name-column aca-custom-name-column' } }) -export class CustomNameColumnComponent extends NameColumnComponent implements OnInit, OnDestroy { - private onDestroy$$ = new Subject(); - +export class CustomNameColumnComponent extends NameColumnComponent implements OnInit { isFile: boolean; isFileWriteLocked: boolean; + private readonly destroy = inject(DestroyRef); + constructor(element: ElementRef, private cd: ChangeDetectorRef, private actions$: Actions, private nodesService: NodesApiService) { super(element, nodesService); } @@ -69,7 +69,7 @@ export class CustomNameColumnComponent extends NameColumnComponent implements On this.isFile = this.node?.entry && !this.node.entry.isFolder; this.isFileWriteLocked = isLocked(this.node); - this.nodesService.nodeUpdated.pipe(takeUntil(this.onDestroy$$)).subscribe((node: any) => { + this.nodesService.nodeUpdated.pipe(takeUntilDestroyed(this.destroy)).subscribe((node: any) => { const row = this.context.row; if (row) { const { entry } = row.node; @@ -91,7 +91,7 @@ export class CustomNameColumnComponent extends NameColumnComponent implements On .pipe( ofType(NodeActionTypes.EditOffline), filter((val) => this.node.entry.id === val.payload.entry.id), - takeUntil(this.onDestroy$$) + takeUntilDestroyed(this.destroy) ) .subscribe(() => { this.isFileWriteLocked = isLocked(this.node); @@ -103,9 +103,4 @@ export class CustomNameColumnComponent extends NameColumnComponent implements On event.stopPropagation(); this.onClick(); } - - ngOnDestroy() { - this.onDestroy$$.next(true); - this.onDestroy$$.complete(); - } } diff --git a/projects/aca-content/src/lib/components/files/files.component.ts b/projects/aca-content/src/lib/components/files/files.component.ts index 62746a938e..84d420a92c 100644 --- a/projects/aca-content/src/lib/components/files/files.component.ts +++ b/projects/aca-content/src/lib/components/files/files.component.ts @@ -31,7 +31,7 @@ import { } from '@alfresco/adf-core'; import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute, Params } from '@angular/router'; -import { NodeEntry, Node, PathElement } from '@alfresco/js-api'; +import { Node, NodeEntry, PathElement } from '@alfresco/js-api'; import { NodeActionsService } from '../../services/node-actions.service'; import { ContentApiService, @@ -43,8 +43,8 @@ import { PaginationDirective, ToolbarComponent } from '@alfresco/aca-shared'; -import { SetCurrentFolderAction, isAdmin, UploadFileVersionAction, showLoaderSelector } from '@alfresco/aca-shared/store'; -import { debounceTime, takeUntil } from 'rxjs/operators'; +import { isAdmin, SetCurrentFolderAction, showLoaderSelector, UploadFileVersionAction } from '@alfresco/aca-shared/store'; +import { debounceTime } from 'rxjs/operators'; import { BreadcrumbComponent, DocumentListComponent, @@ -59,6 +59,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { DocumentListDirective } from '../../directives/document-list.directive'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { SearchAiInputContainerComponent } from '../knowledge-retrieval/search-ai/search-ai-input-container/search-ai-input-container.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -109,15 +110,15 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { this.title = data.title; - this.route.queryParamMap.pipe(takeUntil(this.onDestroy$)).subscribe((queryMap: Params) => { + this.route.queryParamMap.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((queryMap: Params) => { this.queryParams = queryMap.params; }); - this.route.params.pipe(takeUntil(this.onDestroy$)).subscribe(({ folderId }: Params) => { + this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ folderId }: Params) => { const nodeId = folderId || data.defaultNodeId; this.contentApi .getNode(nodeId) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( (node) => { this.isValidPath = true; @@ -142,12 +143,12 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { this.store .select(isAdmin) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((value) => { this.isAdmin = value; }); - this.extensions.filesDocumentListPreset$.pipe(takeUntil(this.onDestroy$)).subscribe((preset) => { + this.extensions.filesDocumentListPreset$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((preset) => { this.columns = preset; }); diff --git a/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts b/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts index ac23ad491b..5251b76c0a 100644 --- a/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts +++ b/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts @@ -22,32 +22,32 @@ * from Hyland Software. If not, see . */ -import { Component, Input, OnChanges, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnChanges, OnInit, ViewEncapsulation } from '@angular/core'; import { - UntypedFormGroup, - UntypedFormControl, - Validators, + FormControl, FormGroupDirective, - NgForm, FormsModule, + NgForm, ReactiveFormsModule, - FormControl, - ValidationErrors + UntypedFormControl, + UntypedFormGroup, + ValidationErrors, + Validators } from '@angular/forms'; import { QueriesApi, SiteEntry, SitePaging } from '@alfresco/js-api'; import { Store } from '@ngrx/store'; import { AppStore, + isAdmin, SnackbarAction, SnackbarActionTypes, SnackbarErrorAction, SnackbarInfoAction, - UpdateLibraryAction, - isAdmin + UpdateLibraryAction } from '@alfresco/aca-shared/store'; -import { debounceTime, filter, mergeMap, takeUntil } from 'rxjs/operators'; +import { debounceTime, filter, mergeMap } from 'rxjs/operators'; import { AlfrescoApiService } from '@alfresco/adf-content-services'; -import { Observable, from, Subject } from 'rxjs'; +import { from, Observable } from 'rxjs'; import { ErrorStateMatcher, MatOptionModule } from '@angular/material/core'; import { CommonModule } from '@angular/common'; import { MatCardModule } from '@angular/material/card'; @@ -58,6 +58,7 @@ import { MatInputModule } from '@angular/material/input'; import { A11yModule } from '@angular/cdk/a11y'; import { MatButtonModule } from '@angular/material/button'; import { Actions, ofType } from '@ngrx/effects'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export class InstantErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean { @@ -86,7 +87,7 @@ export class InstantErrorStateMatcher implements ErrorStateMatcher { styleUrls: ['./library-metadata-form.component.scss'], encapsulation: ViewEncapsulation.None }) -export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestroy { +export class LibraryMetadataFormComponent implements OnInit, OnChanges { private _queriesApi: QueriesApi; private _titleErrorTranslationKey: string; @@ -121,7 +122,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro canUpdateLibrary = false; isAdmin = false; - onDestroy$: Subject = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private alfrescoApiService: AlfrescoApiService, protected store: Store, private actions$: Actions) {} @@ -148,7 +149,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro this.toggleEdit(); this.updateForm(this.node); this.form.controls.title.statusChanges - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( () => (this._titleErrorTranslationKey = this.form.controls.title.errors?.empty @@ -159,7 +160,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro .pipe( debounceTime(300), mergeMap((title) => this.findLibraryByTitle(title)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((result) => { const { entries } = result.list; @@ -176,7 +177,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro }); this.store .select(isAdmin) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((value) => { this.isAdmin = value; }); @@ -187,11 +188,6 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro this.handleUpdatingEvent(SnackbarActionTypes.Error, 'LIBRARY.ERRORS.LIBRARY_UPDATE_ERROR', () => this.form.markAsDirty()); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - ngOnChanges() { this.updateForm(this.node); this.canUpdateLibrary = this.node?.entry?.role === 'SiteManager' || this.isAdmin; @@ -236,7 +232,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro .pipe( ofType(actionType), filter((action) => action.payload === payload), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(handle); } diff --git a/projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.ts b/projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.ts index d46092a0d0..db1b4c9df9 100644 --- a/projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.ts +++ b/projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.ts @@ -22,23 +22,24 @@ * from Hyland Software. If not, see . */ -import { Component, Input, ViewEncapsulation, OnInit, OnDestroy } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { Node } from '@alfresco/js-api'; -import { NodePermissionService, isLocked, AppExtensionService } from '@alfresco/aca-shared'; -import { AppStore, EditOfflineAction, NodeActionTypes, infoDrawerMetadataAspect } from '@alfresco/aca-shared/store'; +import { AppExtensionService, isLocked, NodePermissionService } from '@alfresco/aca-shared'; +import { AppStore, EditOfflineAction, infoDrawerMetadataAspect, NodeActionTypes } from '@alfresco/aca-shared/store'; import { AppConfigService, NotificationService } from '@alfresco/adf-core'; -import { Observable, Subject } from 'rxjs'; +import { Observable } from 'rxjs'; import { - ContentMetadataService, - ContentMetadataCustomPanel, - TagService, CategoryService, - ContentMetadataComponent + ContentMetadataComponent, + ContentMetadataCustomPanel, + ContentMetadataService, + TagService } from '@alfresco/adf-content-services'; -import { filter, map, takeUntil } from 'rxjs/operators'; +import { filter, map } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -58,8 +59,7 @@ import { Store } from '@ngrx/store'; encapsulation: ViewEncapsulation.None, host: { class: 'app-metadata-tab' } }) -export class MetadataTabComponent implements OnInit, OnDestroy { - protected onDestroy$ = new Subject(); +export class MetadataTabComponent implements OnInit { private _displayCategories = true; private _displayTags = true; @@ -77,6 +77,8 @@ export class MetadataTabComponent implements OnInit, OnDestroy { return this._displayTags; } + private readonly destroyRef = inject(DestroyRef); + constructor( private permission: NodePermissionService, protected extensions: AppExtensionService, @@ -97,7 +99,7 @@ export class MetadataTabComponent implements OnInit, OnDestroy { this._displayTags = this.tagService.areTagsEnabled(); this._displayCategories = this.categoryService.areCategoriesEnabled(); - this.contentMetadataService.error.pipe(takeUntil(this.onDestroy$)).subscribe((err: { message: string }) => { + this.contentMetadataService.error.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((err: { message: string }) => { this.notificationService.showError(err.message); }); this.checkIfNodeIsUpdatable(this.node); @@ -105,7 +107,7 @@ export class MetadataTabComponent implements OnInit, OnDestroy { .pipe( ofType(NodeActionTypes.EditOffline), filter((updatedNode) => this.node.id === updatedNode.payload.entry.id), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((updatedNode) => { this.checkIfNodeIsUpdatable(updatedNode?.payload.entry); @@ -116,19 +118,14 @@ export class MetadataTabComponent implements OnInit, OnDestroy { return { panelTitle: panel.title, component: panel.component }; }); }), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ); this.store .select(infoDrawerMetadataAspect) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((metadataAspect) => (this.metadataAspect = metadataAspect)); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - private checkIfNodeIsUpdatable(node: Node) { this.readOnly = !(node && !isLocked({ entry: node }) ? this.permission.check(node, ['update']) : false); } diff --git a/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/agents-button/agents-button.component.ts b/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/agents-button/agents-button.component.ts index e216e561a3..03f35f38c9 100644 --- a/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/agents-button/agents-button.component.ts +++ b/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/agents-button/agents-button.component.ts @@ -22,20 +22,21 @@ * from Hyland Software. If not, see . */ -import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectorRef, Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SelectionState } from '@alfresco/adf-extensions'; import { Store } from '@ngrx/store'; import { AppStore, getAppSelection } from '@alfresco/aca-shared/store'; import { AvatarComponent, IconComponent, NotificationService } from '@alfresco/adf-core'; -import { forkJoin, Subject, throwError } from 'rxjs'; -import { catchError, take, takeUntil } from 'rxjs/operators'; +import { forkJoin, throwError } from 'rxjs'; +import { catchError, take } from 'rxjs/operators'; import { MatMenuModule } from '@angular/material/menu'; import { MatListModule, MatSelectionListChange } from '@angular/material/list'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Agent } from '@alfresco/js-api'; import { AgentService, SearchAiService } from '@alfresco/adf-content-services'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -46,13 +47,12 @@ import { MatTooltipModule } from '@angular/material/tooltip'; encapsulation: ViewEncapsulation.None, host: { class: 'aca-agents-button' } }) -export class AgentsButtonComponent implements OnInit, OnDestroy { +export class AgentsButtonComponent implements OnInit { @Input() data: { trigger: string }; private selectedNodesState: SelectionState; private _agents: Agent[] = []; - private onDestroy$ = new Subject(); private _disabled = true; private _initialsByAgentId: { [key: string]: string } = {}; private _hxInsightUrl: string; @@ -73,6 +73,8 @@ export class AgentsButtonComponent implements OnInit, OnDestroy { return this._hxInsightUrl; } + private readonly destroyRef = inject(DestroyRef); + constructor( private store: Store, private notificationService: NotificationService, @@ -85,7 +87,7 @@ export class AgentsButtonComponent implements OnInit, OnDestroy { ngOnInit(): void { this.store .select(getAppSelection) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((selection) => { this.selectedNodesState = selection; }); @@ -114,11 +116,6 @@ export class AgentsButtonComponent implements OnInit, OnDestroy { ); } - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - onClick(): void { if (!this.selectedNodesState.isEmpty) { const message = this.searchAiService.checkSearchAvailability(this.selectedNodesState); diff --git a/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-input/search-ai-input.component.ts b/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-input/search-ai-input.component.ts index 327040f397..36801dae33 100644 --- a/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-input/search-ai-input.component.ts +++ b/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-input/search-ai-input.component.ts @@ -22,7 +22,7 @@ * from Hyland Software. If not, see . */ -import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { CommonModule } from '@angular/common'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; @@ -32,10 +32,8 @@ import { MatInputModule } from '@angular/material/input'; import { A11yModule } from '@angular/cdk/a11y'; import { AvatarComponent, IconComponent, NotificationService, UserPreferencesService } from '@alfresco/adf-core'; import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { Subject } from 'rxjs'; import { Store } from '@ngrx/store'; import { AiSearchByTermPayload, AppStore, getAppSelection, SearchByTermAiAction, ToggleAISearchInput } from '@alfresco/aca-shared/store'; -import { takeUntil } from 'rxjs/operators'; import { SelectionState } from '@alfresco/adf-extensions'; import { MatSelectModule } from '@angular/material/select'; import { AgentService, SearchAiService } from '@alfresco/adf-content-services'; @@ -48,6 +46,7 @@ import { } from '@angular/material/tooltip'; import { ModalAiService } from '../../../../services/modal-ai.service'; import { Agent } from '@alfresco/js-api'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const MatTooltipOptions: MatTooltipDefaultOptions = { ...MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY(), @@ -78,7 +77,7 @@ const MatTooltipOptions: MatTooltipDefaultOptions = { encapsulation: ViewEncapsulation.None, providers: [{ provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: MatTooltipOptions }] }) -export class SearchAiInputComponent implements OnInit, OnDestroy { +export class SearchAiInputComponent implements OnInit { @Input() placeholder: string; @@ -95,7 +94,6 @@ export class SearchAiInputComponent implements OnInit, OnDestroy { private _agentControl = new FormControl(null); private _agents: Agent[] = []; - private onDestroy$ = new Subject(); private selectedNodesState: SelectionState; private _queryControl = new FormControl(''); private _initialsByAgentId: { [key: string]: string } = {}; @@ -116,6 +114,8 @@ export class SearchAiInputComponent implements OnInit, OnDestroy { return this._initialsByAgentId; } + private readonly destroyRef = inject(DestroyRef); + constructor( private store: Store, private searchAiService: SearchAiService, @@ -133,7 +133,7 @@ export class SearchAiInputComponent implements OnInit, OnDestroy { if (!this.usedInAiResultsPage) { this.store .select(getAppSelection) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((selection) => { this.selectedNodesState = selection; }); @@ -143,7 +143,7 @@ export class SearchAiInputComponent implements OnInit, OnDestroy { this.agentService .getAgents() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( (agents) => { this._agents = agents; @@ -159,11 +159,6 @@ export class SearchAiInputComponent implements OnInit, OnDestroy { ); } - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - onSearchSubmit() { this.modalAiService.openUnsavedChangesModal(() => this.search()); } diff --git a/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component.ts b/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component.ts index c0a027f2e4..0edb23aa7d 100644 --- a/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component.ts +++ b/projects/aca-content/src/lib/components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component.ts @@ -22,10 +22,10 @@ * from Hyland Software. If not, see . */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { PageComponent, PageLayoutComponent, ToolbarActionComponent, ToolbarComponent } from '@alfresco/aca-shared'; -import { concatMap, delay, filter, finalize, retryWhen, skipWhile, switchMap, takeUntil } from 'rxjs/operators'; +import { concatMap, delay, filter, finalize, retryWhen, skipWhile, switchMap } from 'rxjs/operators'; import { AvatarComponent, ClipboardService, EmptyContentComponent, ThumbnailService, ToolbarModule, UnsavedChangesGuard } from '@alfresco/adf-core'; import { AiAnswer, Node } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; @@ -42,6 +42,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { ModalAiService } from '../../../../services/modal-ai.service'; import { ViewNodeAction } from '@alfresco/aca-shared/store'; import { ViewerService } from '@alfresco/aca-content/viewer'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -67,7 +68,7 @@ import { ViewerService } from '@alfresco/aca-content/viewer'; encapsulation: ViewEncapsulation.None, host: { class: 'aca-search-ai-results' } }) -export class SearchAiResultsComponent extends PageComponent implements OnInit, OnDestroy { +export class SearchAiResultsComponent extends PageComponent implements OnInit { private _agentId: string; private _hasAnsweringError = false; private _hasError = false; @@ -133,7 +134,7 @@ export class SearchAiResultsComponent extends PageComponent implements OnInit, O this.openedViewer = !!params.location; return !this.openedViewer && (!openedViewerPreviously || !this.queryAnswer); }), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((params) => { this._agentId = params.agentId; @@ -156,11 +157,6 @@ export class SearchAiResultsComponent extends PageComponent implements OnInit, O }; } - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - copyResponseToClipboard(): void { this.clipboardService.copyContentToClipboard( this.queryAnswer.answer, @@ -192,7 +188,7 @@ export class SearchAiResultsComponent extends PageComponent implements OnInit, O }), retryWhen((errors: Observable) => this.aiSearchRetryWhen(errors)), finalize(() => (this._loading = false)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe( (nodes) => { diff --git a/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.ts b/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.ts index 50fd391adc..23259a0f2d 100644 --- a/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.ts +++ b/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.ts @@ -22,8 +22,7 @@ * from Hyland Software. If not, see . */ -import { Component, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, ViewChild, ElementRef } from '@angular/core'; -import { Subject } from 'rxjs'; +import { Component, ElementRef, EventEmitter, Input, Output, ViewChild, ViewEncapsulation } from '@angular/core'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; @@ -41,9 +40,7 @@ import { FormsModule } from '@angular/forms'; encapsulation: ViewEncapsulation.None, host: { class: 'app-search-control' } }) -export class SearchInputControlComponent implements OnDestroy { - onDestroy$: Subject = new Subject(); - +export class SearchInputControlComponent { /** Type of the input field to render, e.g. "search" or "text" (default). */ @Input() inputType = 'text'; @@ -68,11 +65,6 @@ export class SearchInputControlComponent implements OnDestroy { searchTerm = ''; - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - searchSubmit(event: any) { this.submit.emit(event); } diff --git a/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts b/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts index 0473cce0c9..106baac711 100644 --- a/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts +++ b/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts @@ -26,12 +26,10 @@ import { AppHookService, AppService } from '@alfresco/aca-shared'; import { AppStore, SearchByTermAction, SearchOptionIds, SearchOptionModel } from '@alfresco/aca-shared/store'; import { SearchQueryBuilderService } from '@alfresco/adf-content-services'; import { AppConfigService, NotificationService } from '@alfresco/adf-core'; -import { Component, inject, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu'; import { ActivatedRoute, Params, PRIMARY_OUTLET, Router, UrlSegment, UrlSegmentGroup, UrlTree } from '@angular/router'; import { Store } from '@ngrx/store'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { SearchInputControlComponent } from '../search-input-control/search-input-control.component'; import { SearchNavigationService } from '../search-navigation.service'; import { SearchLibrariesQueryBuilderService } from '../search-libraries-results/search-libraries-query-builder.service'; @@ -45,6 +43,7 @@ import { A11yModule } from '@angular/cdk/a11y'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { FormsModule } from '@angular/forms'; import { extractSearchedWordFromEncodedQuery } from '../../../utils/aca-search-utils'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -70,7 +69,6 @@ import { extractSearchedWordFromEncodedQuery } from '../../../utils/aca-search-u export class SearchInputComponent implements OnInit, OnDestroy { private readonly notificationService = inject(NotificationService); - onDestroy$: Subject = new Subject(); has400LibraryError = false; hasLibrariesConstraint = false; searchOnChange: boolean; @@ -103,6 +101,8 @@ export class SearchInputComponent implements OnInit, OnDestroy { @ViewChild(MatMenuTrigger, { static: true }) trigger: MatMenuTrigger; + private readonly destroyRef = inject(DestroyRef); + constructor( private readonly queryBuilder: SearchQueryBuilderService, private readonly queryLibrariesBuilder: SearchLibrariesQueryBuilderService, @@ -120,7 +120,7 @@ export class SearchInputComponent implements OnInit, OnDestroy { ngOnInit() { this.showInputValue(); - this.route.queryParams.pipe(takeUntil(this.onDestroy$)).subscribe((params: Params) => { + this.route.queryParams.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((params: Params) => { const encodedQuery = params['q']; if (encodedQuery && this.searchInputControl) { this.searchedWord = extractSearchedWordFromEncodedQuery(encodedQuery); @@ -128,7 +128,7 @@ export class SearchInputComponent implements OnInit, OnDestroy { } }); - this.appHookService.library400Error.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.appHookService.library400Error.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.has400LibraryError = true; this.hasLibrariesConstraint = this.evaluateLibrariesConstraint(); }); @@ -151,8 +151,6 @@ export class SearchInputComponent implements OnInit, OnDestroy { ngOnDestroy(): void { this.appService.setAppNavbarMode('expanded'); - this.onDestroy$.next(true); - this.onDestroy$.complete(); this.removeContentFilters(); } diff --git a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts index 81bfacf178..33e3824a8d 100644 --- a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts +++ b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts @@ -46,7 +46,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar'; import { DocumentListDirective } from '../../../directives/document-list.directive'; import { DocumentListComponent } from '@alfresco/adf-content-services'; import { extractSearchedWordFromEncodedQuery } from '../../../utils/aca-search-utils'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -130,7 +130,7 @@ export class SearchLibrariesResultsComponent extends PageComponent implements On ); if (this.route) { - this.route.queryParams.pipe(takeUntil(this.onDestroy$)).subscribe((params: Params) => { + this.route.queryParams.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((params: Params) => { const encodedQuery = params[this.queryParamName] || null; this.searchedWord = extractSearchedWordFromEncodedQuery(encodedQuery); if (this.searchedWord?.length > 1) { diff --git a/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts index c7410a3da0..d57fa92ae4 100644 --- a/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts +++ b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts @@ -22,19 +22,19 @@ * from Hyland Software. If not, see . */ -import { Component, Input, OnInit, ViewEncapsulation, ChangeDetectionStrategy, OnDestroy, inject } from '@angular/core'; +import { ChangeDetectionStrategy, Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { NodeEntry, SearchEntryHighlight } from '@alfresco/js-api'; import { NavigateToFolder, ViewNodeAction } from '@alfresco/aca-shared/store'; import { Store } from '@ngrx/store'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { NodesApiService } from '@alfresco/adf-content-services'; -import { takeUntil } from 'rxjs/operators'; import { Router } from '@angular/router'; -import { AutoDownloadService, AppSettingsService } from '@alfresco/aca-shared'; +import { AppSettingsService, AutoDownloadService } from '@alfresco/aca-shared'; import { CommonModule } from '@angular/common'; import { LocationLinkComponent } from '../../common/location-link/location-link.component'; import { MatDialogModule } from '@angular/material/dialog'; import { DatatableCellBadgesComponent } from '../../dl-custom-components/datatable-cell-badges/datatable-cell-badges.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -46,14 +46,13 @@ import { DatatableCellBadgesComponent } from '../../dl-custom-components/datatab changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-search-results-row' } }) -export class SearchResultsRowComponent implements OnInit, OnDestroy { +export class SearchResultsRowComponent implements OnInit { private settings = inject(AppSettingsService); private readonly highlightPrefix = ""; private readonly highlightPostfix = ''; private node: NodeEntry; - private onDestroy$ = new Subject(); @Input() context: any; @@ -68,6 +67,8 @@ export class SearchResultsRowComponent implements OnInit, OnDestroy { contentStripped = ''; isFile = false; + private readonly destroyRef = inject(DestroyRef); + constructor( private store: Store, private nodesApiService: NodesApiService, @@ -78,7 +79,7 @@ export class SearchResultsRowComponent implements OnInit, OnDestroy { ngOnInit() { this.updateValues(); - this.nodesApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => { + this.nodesApiService.nodeUpdated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((node) => { const row = this.context.row; if (row) { const { entry } = row.node; @@ -136,11 +137,6 @@ export class SearchResultsRowComponent implements OnInit, OnDestroy { } } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - showPreview(event: Event) { event.stopPropagation(); diff --git a/projects/aca-content/src/lib/components/search/search-results/search-results.component.ts b/projects/aca-content/src/lib/components/search/search-results/search-results.component.ts index d39d17d72e..8989396927 100644 --- a/projects/aca-content/src/lib/components/search/search-results/search-results.component.ts +++ b/projects/aca-content/src/lib/components/search/search-results/search-results.component.ts @@ -22,7 +22,7 @@ * from Hyland Software. If not, see . */ -import { ChangeDetectorRef, Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectorRef, Component, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { NodeEntry, Pagination, ResultSetPaging } from '@alfresco/js-api'; import { ActivatedRoute, Params } from '@angular/router'; import { @@ -153,8 +153,6 @@ export class SearchResultsComponent extends PageComponent implements OnInit { searchConfig: SearchConfiguration; private readonly loadedFilters$ = new Subject(); - private readonly destroyRef = inject(DestroyRef); - constructor( tagsService: TagService, private readonly queryBuilder: SearchQueryBuilderService, diff --git a/projects/aca-content/src/lib/components/search/search-save/sidenav/save-search-sidenav.component.ts b/projects/aca-content/src/lib/components/search/search-save/sidenav/save-search-sidenav.component.ts index 29d6a8e054..9fb736e73a 100644 --- a/projects/aca-content/src/lib/components/search/search-save/sidenav/save-search-sidenav.component.ts +++ b/projects/aca-content/src/lib/components/search/search-save/sidenav/save-search-sidenav.component.ts @@ -22,15 +22,14 @@ * from Hyland Software. If not, see . */ -import { Component, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { SavedSearch, SavedSearchesService } from '@alfresco/adf-content-services'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { CoreModule, TranslationService } from '@alfresco/adf-core'; import { DynamicExtensionComponent, NavBarLinkRef } from '@alfresco/adf-extensions'; import { ExpandMenuComponent } from '../../../sidenav/components/expand-menu.component'; import { SidenavHeaderComponent } from '../../../sidenav/components/sidenav-header.component'; import { AppService } from '@alfresco/aca-shared'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'aca-save-search-sidenav', @@ -39,30 +38,25 @@ import { AppService } from '@alfresco/aca-shared'; templateUrl: './save-search-sidenav.component.html', encapsulation: ViewEncapsulation.None }) -export class SaveSearchSidenavComponent implements OnInit, OnDestroy { +export class SaveSearchSidenavComponent implements OnInit { savedSearchesService = inject(SavedSearchesService); appService = inject(AppService); translationService = inject(TranslationService); - destroy$ = new Subject(); item: NavBarLinkRef; private readonly manageSearchesId = 'manage-saved-searches'; + private readonly destroyRef = inject(DestroyRef); ngOnInit() { this.savedSearchesService.innit(); this.savedSearchesService.savedSearches$ .asObservable() - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((savedSearches) => { this.item = this.createNavBarLinkRef(savedSearches); }); } - ngOnDestroy(): void { - this.destroy$.next(); - this.destroy$.complete(); - } - onActionClick(el: NavBarLinkRef): void { if (el.id !== this.manageSearchesId) { this.appService.appNavNarMode$.next('collapsed'); diff --git a/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.ts b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.ts index 84d35ca46d..4290a43d87 100644 --- a/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.ts +++ b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.ts @@ -26,14 +26,15 @@ import { AppStore, SetSelectedNodesAction } from '@alfresco/aca-shared/store'; import { ViewerModule } from '@alfresco/adf-core'; import { ContentActionRef } from '@alfresco/adf-extensions'; import { SharedLinkEntry, SharedlinksApi } from '@alfresco/js-api'; -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Store } from '@ngrx/store'; -import { forkJoin, from, of, Subject } from 'rxjs'; -import { catchError, mergeMap, takeUntil } from 'rxjs/operators'; +import { forkJoin, from, of } from 'rxjs'; +import { catchError, mergeMap } from 'rxjs/operators'; import { AppExtensionService, AppService, ToolbarComponent } from '@alfresco/aca-shared'; import { CommonModule } from '@angular/common'; import { AlfrescoApiService, AlfrescoViewerModule } from '@alfresco/adf-content-services'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -44,12 +45,14 @@ import { AlfrescoApiService, AlfrescoViewerModule } from '@alfresco/adf-content- encapsulation: ViewEncapsulation.None, host: { class: 'app-shared-link-view' } }) -export class SharedLinkViewComponent implements OnInit, OnDestroy { - private onDestroy$: Subject = new Subject(); - private sharedLinksApi: SharedlinksApi; +export class SharedLinkViewComponent implements OnInit { sharedLinkId: string = null; viewerToolbarActions: Array = []; + private sharedLinksApi: SharedlinksApi; + + private readonly destroyRef = inject(DestroyRef); + constructor( private route: ActivatedRoute, private store: Store, @@ -77,14 +80,9 @@ export class SharedLinkViewComponent implements OnInit, OnDestroy { this.extensions .getSharedLinkViewerToolbarActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.viewerToolbarActions = actions; }); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/projects/aca-content/src/lib/components/sidenav/components/sidenav-header.component.ts b/projects/aca-content/src/lib/components/sidenav/components/sidenav-header.component.ts index 294d66f477..770d43770e 100644 --- a/projects/aca-content/src/lib/components/sidenav/components/sidenav-header.component.ts +++ b/projects/aca-content/src/lib/components/sidenav/components/sidenav-header.component.ts @@ -22,14 +22,13 @@ * from Hyland Software. If not, see . */ -import { Component, EventEmitter, inject, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; +import { Component, DestroyRef, EventEmitter, inject, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { ContentActionRef } from '@alfresco/adf-extensions'; import { AppExtensionService, AppSettingsService, ToolbarComponent } from '@alfresco/aca-shared'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { RouterModule } from '@angular/router'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -39,11 +38,12 @@ import { RouterModule } from '@angular/router'; encapsulation: ViewEncapsulation.None, host: { class: 'app-sidenav-header' } }) -export class SidenavHeaderComponent implements OnInit, OnDestroy { - private onDestroy$ = new Subject(); +export class SidenavHeaderComponent implements OnInit { private appSettings = inject(AppSettingsService); private appExtensions = inject(AppExtensionService); + private readonly destroyRef = inject(DestroyRef); + appName = this.appSettings.appName; logoUrl = this.appSettings.appLogoUrl; landingPage = this.appSettings.landingPage; @@ -55,14 +55,9 @@ export class SidenavHeaderComponent implements OnInit, OnDestroy { ngOnInit() { this.appExtensions .getHeaderActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.actions = actions; }); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.ts index 7a8693b5a7..7e9aba6399 100644 --- a/projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.ts +++ b/projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.ts @@ -22,11 +22,23 @@ * from Hyland Software. If not, see . */ -import { AfterContentInit, ContentChildren, Directive, ElementRef, Input, OnInit, Optional, QueryList, Renderer2 } from '@angular/core'; +import { + AfterContentInit, + ContentChildren, + DestroyRef, + Directive, + ElementRef, + inject, + Input, + OnInit, + Optional, + QueryList, + Renderer2 +} from '@angular/core'; import { NavigationEnd, Router } from '@angular/router'; -import { filter, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { filter } from 'rxjs/operators'; import { ActionDirective } from './action.directive'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, @@ -39,7 +51,7 @@ export class ActiveLinkDirective implements OnInit, AfterContentInit { links: QueryList; isLinkActive = false; - private onDestroy$: Subject = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private router: Router, private element: ElementRef, private renderer: Renderer2, @Optional() private action?: ActionDirective) {} @@ -47,7 +59,7 @@ export class ActiveLinkDirective implements OnInit, AfterContentInit { this.router.events .pipe( filter((event) => event instanceof NavigationEnd), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((event: NavigationEnd) => { this.update(event.urlAfterRedirects); diff --git a/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.spec.ts b/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.spec.ts index 10c8a8b4e2..3f86743365 100644 --- a/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.spec.ts +++ b/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.spec.ts @@ -25,6 +25,7 @@ import { NavigationEnd } from '@angular/router'; import { ExpansionPanelDirective } from './expansion-panel.directive'; import { Subject } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; class RouterStub { url; @@ -64,7 +65,10 @@ describe('AcaExpansionPanel', () => { const item = { children: [{ url: 'dummy-route-1' }, { url: 'dummy-route-2' }] }; - const directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + let directive: ExpansionPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + }); directive.acaExpansionPanel = item; @@ -75,7 +79,10 @@ describe('AcaExpansionPanel', () => { const item = { children: [{ url: 'dummy-route-1' }, { url: 'dummy-route-2' }] }; - const directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + let directive: ExpansionPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + }); directive.acaExpansionPanel = item; @@ -93,7 +100,10 @@ describe('AcaExpansionPanel', () => { mockMatExpansionPanel.expanded = true; - const directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + let directive: ExpansionPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + }); directive.acaExpansionPanel = item; @@ -109,7 +119,10 @@ describe('AcaExpansionPanel', () => { children: [{ url: 'dummy-route-1' }, { url: 'dummy-route-2' }] }; - const directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + let directive: ExpansionPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + }); directive.acaExpansionPanel = item; mockMatExpansionPanel.expanded = true; @@ -129,7 +142,10 @@ describe('AcaExpansionPanel', () => { } }; - const directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + let directive: ExpansionPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new ExpansionPanelDirective(mockStore, router, mockMatExpansionPanel); + }); directive.acaExpansionPanel = item; mockMatExpansionPanel.expanded = true; diff --git a/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.ts index be559ff4b3..f9271438dc 100644 --- a/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.ts +++ b/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.ts @@ -22,24 +22,22 @@ * from Hyland Software. If not, see . */ -import { Directive, Input, HostListener, OnInit, OnDestroy } from '@angular/core'; -import { Router, NavigationEnd, PRIMARY_OUTLET } from '@angular/router'; -import { filter, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { DestroyRef, Directive, HostListener, inject, Input, OnInit } from '@angular/core'; +import { NavigationEnd, PRIMARY_OUTLET, Router } from '@angular/router'; +import { filter } from 'rxjs/operators'; import { MatExpansionPanel } from '@angular/material/expansion'; import { Store } from '@ngrx/store'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, selector: '[acaExpansionPanel]', exportAs: 'acaExpansionPanel' }) -export class ExpansionPanelDirective implements OnInit, OnDestroy { +export class ExpansionPanelDirective implements OnInit { @Input() acaExpansionPanel; public hasActiveChildren = false; - private onDestroy$: Subject = new Subject(); - @HostListener('click') onClick() { if (this.expansionPanel.expanded && !this.hasActiveLinks() && !this.acaExpansionPanel.data?.canBeInactive) { @@ -55,6 +53,8 @@ export class ExpansionPanelDirective implements OnInit, OnDestroy { } } + private readonly destroyRef = inject(DestroyRef); + constructor(private store: Store, private router: Router, private expansionPanel: MatExpansionPanel) {} hasActiveLinks() { @@ -70,18 +70,13 @@ export class ExpansionPanelDirective implements OnInit, OnDestroy { this.router.events .pipe( filter((event) => event instanceof NavigationEnd), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.hasActiveChildren = this.hasActiveLinks(); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - private getNavigationCommands(url: string): any[] { const urlTree = this.router.parseUrl(url); const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET]; diff --git a/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.spec.ts b/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.spec.ts index e1c767f462..d87422eefc 100644 --- a/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.spec.ts +++ b/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.spec.ts @@ -25,6 +25,7 @@ import { NavigationEnd } from '@angular/router'; import { MenuPanelDirective } from './menu-panel.directive'; import { Subject } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; class RouterStub { url; @@ -64,7 +65,10 @@ describe('MenuPanelDirective', () => { const item = { children: [{ url: 'dummy-route-1' }, { url: 'dummy-route-2' }] }; - const directive = new MenuPanelDirective(mockStore, router); + let directive: MenuPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new MenuPanelDirective(mockStore, router); + }); directive.acaMenuPanel = item; @@ -75,7 +79,10 @@ describe('MenuPanelDirective', () => { const item = { children: [{ url: 'dummy-route-1' }, { url: 'dummy-route-2' }] }; - const directive = new MenuPanelDirective(mockStore, router); + let directive: MenuPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new MenuPanelDirective(mockStore, router); + }); directive.acaMenuPanel = item; @@ -93,7 +100,10 @@ describe('MenuPanelDirective', () => { mockMatExpansionPanel.expanded = true; - const directive = new MenuPanelDirective(mockStore, router); + let directive: MenuPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new MenuPanelDirective(mockStore, router); + }); directive.acaMenuPanel = item; @@ -109,7 +119,10 @@ describe('MenuPanelDirective', () => { children: [{ url: 'dummy-route-1' }, { url: 'dummy-route-2' }] }; - const directive = new MenuPanelDirective(mockStore, router); + let directive: MenuPanelDirective; + TestBed.runInInjectionContext(() => { + directive = new MenuPanelDirective(mockStore, router); + }); directive.acaMenuPanel = item; mockMatExpansionPanel.expanded = true; diff --git a/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.ts index f32cb9af5d..d8ba038067 100644 --- a/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.ts +++ b/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.ts @@ -22,23 +22,21 @@ * from Hyland Software. If not, see . */ -import { Directive, Input, OnInit, OnDestroy, HostListener } from '@angular/core'; -import { Router, NavigationEnd, PRIMARY_OUTLET } from '@angular/router'; -import { filter, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { DestroyRef, Directive, HostListener, inject, Input, OnInit } from '@angular/core'; +import { NavigationEnd, PRIMARY_OUTLET, Router } from '@angular/router'; +import { filter } from 'rxjs/operators'; import { Store } from '@ngrx/store'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, selector: '[acaMenuPanel]', exportAs: 'acaMenuPanel' }) -export class MenuPanelDirective implements OnInit, OnDestroy { +export class MenuPanelDirective implements OnInit { @Input() acaMenuPanel; hasActiveChildren = false; - private onDestroy$: Subject = new Subject(); - @HostListener('menuOpened') menuOpened() { if (this.acaMenuPanel.children && !this.hasActiveLinks()) { @@ -54,6 +52,8 @@ export class MenuPanelDirective implements OnInit, OnDestroy { } } + private readonly destroyRef = inject(DestroyRef); + constructor(private store: Store, private router: Router) {} hasActiveLinks() { @@ -69,18 +69,13 @@ export class MenuPanelDirective implements OnInit, OnDestroy { this.router.events .pipe( filter((event) => event instanceof NavigationEnd), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.hasActiveChildren = this.hasActiveLinks(); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - private getNavigationCommands(url: string): any[] { const urlTree = this.router.parseUrl(url); const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET]; diff --git a/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts b/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts index 9f808fbe60..7a25ff6edf 100755 --- a/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts +++ b/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts @@ -22,12 +22,11 @@ * from Hyland Software. If not, see . */ -import { Component, Input, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { DynamicExtensionComponent, NavBarGroupRef, NavBarLinkRef } from '@alfresco/adf-extensions'; import { Store } from '@ngrx/store'; import { AppStore, getSideNavState } from '@alfresco/aca-shared/store'; -import { Subject } from 'rxjs'; -import { takeUntil, distinctUntilChanged, debounceTime } from 'rxjs/operators'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { AppExtensionService, AppService, NavigationHistoryService } from '@alfresco/aca-shared'; import { SidenavLayoutComponent } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; @@ -35,6 +34,7 @@ import { SidenavHeaderComponent } from './components/sidenav-header.component'; import { MatListModule } from '@angular/material/list'; import { ExpandMenuComponent } from './components/expand-menu.component'; import { NavigationEnd } from '@angular/router'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -45,7 +45,7 @@ import { NavigationEnd } from '@angular/router'; encapsulation: ViewEncapsulation.None, host: { class: 'app-sidenav' } }) -export class SidenavComponent implements OnInit, OnDestroy { +export class SidenavComponent implements OnInit { @Input() data: { layout?: SidenavLayoutComponent; @@ -53,7 +53,8 @@ export class SidenavComponent implements OnInit, OnDestroy { } = {}; groups: Array = []; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor( private store: Store, @@ -65,17 +66,17 @@ export class SidenavComponent implements OnInit, OnDestroy { ngOnInit() { this.store .select(getSideNavState) - .pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.onDestroy$)) + .pipe(debounceTime(300), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)) .subscribe(() => { this.groups = this.extensions.getApplicationNavigation(this.extensions.navbar); }); this.appService.setAppNavbarMode(this.data.mode); - this.appService.toggleAppNavBar$.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.toggleNavBar()); - this.data.layout.expanded.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.setNavBarMode()); + this.appService.toggleAppNavBar$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.toggleNavBar()); + this.data.layout.expanded.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.setNavBarMode()); this.navigationHistoryService .listenToRouteChanges() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((event: NavigationEnd) => { this.navigationHistoryService.setHistory(event, 3); }); @@ -101,9 +102,4 @@ export class SidenavComponent implements OnInit, OnDestroy { this.data.layout.toggleMenu(); this.setNavBarMode(); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts index 941f586a64..645b123172 100644 --- a/projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts +++ b/projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts @@ -22,19 +22,19 @@ * from Hyland Software. If not, see . */ -import { Component, ViewEncapsulation, OnInit, OnDestroy } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { Store } from '@ngrx/store'; import { AppHookService } from '@alfresco/aca-shared'; import { AppStore, getAppSelection } from '@alfresco/aca-shared/store'; import { SelectionState } from '@alfresco/adf-extensions'; -import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; +import { distinctUntilChanged } from 'rxjs/operators'; import { Router } from '@angular/router'; -import { Subject } from 'rxjs'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { LibraryFavoriteDirective } from '@alfresco/adf-content-services'; import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -55,9 +55,10 @@ import { MatMenuModule } from '@angular/material/menu'; encapsulation: ViewEncapsulation.None, host: { class: 'app-toggle-favorite-library' } }) -export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy { +export class ToggleFavoriteLibraryComponent implements OnInit { library; - private onDestroy$: Subject = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(private store: Store, private appHookService: AppHookService, private router: Router) {} @@ -66,7 +67,7 @@ export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy { this.store .select(getAppSelection) - .pipe(distinctUntilChanged(), takeUntil(this.onDestroy$)) + .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)) .subscribe((selection: SelectionState) => { this.library = { ...selection.library }; @@ -77,11 +78,6 @@ export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy { }); } - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - onToggleEvent() { this.appHookService.favoriteLibraryToggle.next(); } diff --git a/projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.ts b/projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.ts index 114d118696..9b43fccaf1 100644 --- a/projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.ts +++ b/projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.ts @@ -22,13 +22,14 @@ * from Hyland Software. If not, see . */ -import { Component, OnDestroy, ViewEncapsulation } from '@angular/core'; -import { Observable, Subject } from 'rxjs'; -import { delay, takeUntil } from 'rxjs/operators'; +import { Component, ViewEncapsulation } from '@angular/core'; +import { Observable } from 'rxjs'; +import { delay } from 'rxjs/operators'; import { Store } from '@ngrx/store'; import { AppStore, getFileUploadingDialog } from '@alfresco/aca-shared/store'; import { CommonModule } from '@angular/common'; import { UploadModule } from '@alfresco/adf-content-services'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -37,17 +38,10 @@ import { UploadModule } from '@alfresco/adf-content-services'; templateUrl: './upload-files-dialog.component.html', encapsulation: ViewEncapsulation.None }) -export class UploadFilesDialogComponent implements OnDestroy { +export class UploadFilesDialogComponent { showFileUploadingDialog$: Observable; - private onDestroy$: Subject = new Subject(); - constructor(private store: Store) { - this.showFileUploadingDialog$ = this.store.select(getFileUploadingDialog).pipe(delay(0), takeUntil(this.onDestroy$)); - } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); + this.showFileUploadingDialog$ = this.store.select(getFileUploadingDialog).pipe(delay(0), takeUntilDestroyed()); } } diff --git a/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts b/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts index 9d8ef3c27a..80100e93d4 100644 --- a/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts +++ b/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts @@ -24,18 +24,18 @@ import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { PeopleApi, Person } from '@alfresco/js-api'; -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import { Observable, Subject, throwError } from 'rxjs'; +import { Observable, throwError } from 'rxjs'; import { AppService } from '@alfresco/aca-shared'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; import { MatDividerModule } from '@angular/material/divider'; import { MatFormFieldModule } from '@angular/material/form-field'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -45,7 +45,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'; styleUrls: ['./view-profile.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ViewProfileComponent implements OnInit, OnDestroy { +export class ViewProfileComponent implements OnInit { peopleApi: PeopleApi; profileForm: FormGroup; @@ -61,11 +61,10 @@ export class ViewProfileComponent implements OnInit, OnDestroy { contactSectionDropdown = false; contactSectionButtonsToggle = true; appNavNarMode$: Observable<'collapsed' | 'expanded'>; - private onDestroy$ = new Subject(); constructor(private router: Router, apiService: AlfrescoApiService, private appService: AppService) { this.peopleApi = new PeopleApi(apiService.getInstance()); - this.appNavNarMode$ = appService.appNavNarMode$.pipe(takeUntil(this.onDestroy$)); + this.appNavNarMode$ = appService.appNavNarMode$.pipe(takeUntilDestroyed()); } ngOnInit() { @@ -205,9 +204,4 @@ export class ViewProfileComponent implements OnInit, OnDestroy { isSaveButtonDisabled(): boolean { return this.profileForm.invalid; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/projects/aca-content/src/lib/directives/document-list.directive.spec.ts b/projects/aca-content/src/lib/directives/document-list.directive.spec.ts index e597bad904..16c0601048 100644 --- a/projects/aca-content/src/lib/directives/document-list.directive.spec.ts +++ b/projects/aca-content/src/lib/directives/document-list.directive.spec.ts @@ -25,6 +25,7 @@ import { DocumentListDirective } from './document-list.directive'; import { Subject } from 'rxjs'; import { SetSelectedNodesAction } from '@alfresco/aca-shared/store'; +import { TestBed } from '@angular/core/testing'; describe('DocumentListDirective', () => { let documentListDirective: DocumentListDirective; @@ -74,14 +75,16 @@ describe('DocumentListDirective', () => { }; beforeEach(() => { - documentListDirective = new DocumentListDirective( - storeMock, - documentListMock, - userPreferencesServiceMock, - mockRoute, - mockRouter, - documentListServiceMock as any - ); + TestBed.runInInjectionContext(() => { + documentListDirective = new DocumentListDirective( + storeMock, + documentListMock, + userPreferencesServiceMock, + mockRoute, + mockRouter, + documentListServiceMock as any + ); + }); }); afterEach(() => { diff --git a/projects/aca-content/src/lib/directives/document-list.directive.ts b/projects/aca-content/src/lib/directives/document-list.directive.ts index e8950bf620..6a6378364b 100644 --- a/projects/aca-content/src/lib/directives/document-list.directive.ts +++ b/projects/aca-content/src/lib/directives/document-list.directive.ts @@ -22,30 +22,30 @@ * from Hyland Software. If not, see . */ -import { Directive, OnDestroy, OnInit, HostListener } from '@angular/core'; +import { DestroyRef, Directive, HostListener, inject, OnInit } from '@angular/core'; import { DocumentListComponent, DocumentListService } from '@alfresco/adf-content-services'; import { ActivatedRoute, Router } from '@angular/router'; import { UserPreferencesService } from '@alfresco/adf-core'; -import { Subject } from 'rxjs'; import { Store } from '@ngrx/store'; import { SetSelectedNodesAction } from '@alfresco/aca-shared/store'; -import { takeUntil, filter } from 'rxjs/operators'; +import { filter } from 'rxjs/operators'; import { NodeEntry } from '@alfresco/js-api'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, selector: '[acaDocumentList]' }) -export class DocumentListDirective implements OnInit, OnDestroy { +export class DocumentListDirective implements OnInit { private isLibrary = false; selectedNode: NodeEntry; - onDestroy$ = new Subject(); - get sortingPreferenceKey(): string { return this.route.snapshot.data.sortingPreferenceKey; } + private readonly destroyRef = inject(DestroyRef); + constructor( private store: Store, private documentList: DocumentListComponent, @@ -87,24 +87,19 @@ export class DocumentListDirective implements OnInit, OnDestroy { this.documentList.ready .pipe( filter(() => !this.router.url.includes('viewer:view')), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => this.onReady()); - this.documentListService.reload$.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.documentListService.reload$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.reload(); }); - this.documentListService.resetSelection$.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.documentListService.resetSelection$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.reset(); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - @HostListener('sorting-changed', ['$event']) onSortingChanged(event: CustomEvent) { if (this.sortingPreferenceKey) { diff --git a/projects/aca-content/viewer/src/lib/components/preview/preview.component.ts b/projects/aca-content/viewer/src/lib/components/preview/preview.component.ts index 47025703a4..c82009e509 100644 --- a/projects/aca-content/viewer/src/lib/components/preview/preview.component.ts +++ b/projects/aca-content/viewer/src/lib/components/preview/preview.component.ts @@ -22,25 +22,26 @@ * from Hyland Software. If not, see . */ -import { Component, OnInit, OnDestroy, ViewEncapsulation, HostListener } from '@angular/core'; +import { Component, HostListener, OnInit, ViewEncapsulation } from '@angular/core'; import { CommonModule, Location } from '@angular/common'; -import { UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET, ActivatedRoute } from '@angular/router'; -import { debounceTime, map, takeUntil } from 'rxjs/operators'; +import { ActivatedRoute, PRIMARY_OUTLET, UrlSegment, UrlSegmentGroup, UrlTree } from '@angular/router'; +import { debounceTime, map } from 'rxjs/operators'; import { ViewerModule } from '@alfresco/adf-core'; -import { ClosePreviewAction, ViewerActionTypes, SetSelectedNodesAction } from '@alfresco/aca-shared/store'; +import { ClosePreviewAction, SetSelectedNodesAction, ViewerActionTypes } from '@alfresco/aca-shared/store'; import { - PageComponent, AppHookService, ContentApiService, InfoDrawerComponent, - ToolbarMenuItemComponent, - ToolbarComponent + PageComponent, + ToolbarComponent, + ToolbarMenuItemComponent } from '@alfresco/aca-shared'; import { ContentActionRef } from '@alfresco/adf-extensions'; import { from } from 'rxjs'; import { Actions, ofType } from '@ngrx/effects'; import { AlfrescoViewerModule, NodesApiService } from '@alfresco/adf-content-services'; import { ViewerService } from '../../services/viewer.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -51,7 +52,7 @@ import { ViewerService } from '../../services/viewer.service'; encapsulation: ViewEncapsulation.None, host: { class: 'app-preview' } }) -export class PreviewComponent extends PageComponent implements OnInit, OnDestroy { +export class PreviewComponent extends PageComponent implements OnInit { folderId: string = null; navigateBackAsClose = false; navigateMultiple = false; @@ -84,7 +85,7 @@ export class PreviewComponent extends PageComponent implements OnInit, OnDestroy super.ngOnInit(); from(this.infoDrawerOpened$) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((val) => { this.showRightSide = val; }); @@ -131,16 +132,12 @@ export class PreviewComponent extends PageComponent implements OnInit, OnDestroy this.extensions .getOpenWithActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.openWith = actions; }); } - ngOnDestroy() { - super.ngOnDestroy(); - } - /** * Loads the particular node into the Viewer * diff --git a/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts b/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts index 7560617b59..0276a484e7 100644 --- a/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts +++ b/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts @@ -44,16 +44,17 @@ import { } from '@alfresco/aca-shared/store'; import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions'; import { Node, VersionEntry, VersionsApi } from '@alfresco/js-api'; -import { Component, HostListener, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, HostListener, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute, PRIMARY_OUTLET, Router } from '@angular/router'; import { ViewerOpenWithComponent, ViewerSidebarComponent, ViewerToolbarActionsComponent } from '@alfresco/adf-core'; import { Store } from '@ngrx/store'; -import { from, Observable, Subject } from 'rxjs'; -import { debounceTime, takeUntil } from 'rxjs/operators'; +import { from, Observable } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; import { Actions, ofType } from '@ngrx/effects'; import { AlfrescoApiService, AlfrescoViewerComponent, DocumentListService, NodesApiService, UploadService } from '@alfresco/adf-content-services'; import { CommonModule } from '@angular/common'; import { ViewerService } from '../../services/viewer.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -84,8 +85,6 @@ export class AcaViewerComponent implements OnInit, OnDestroy { return this._versionsApi; } - onDestroy$ = new Subject(); - fileName: string; folderId: string = null; infoDrawerOpened$: Observable; @@ -106,6 +105,8 @@ export class AcaViewerComponent implements OnInit, OnDestroy { private previewLocation: string; private containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer']; + private readonly destroyRef = inject(DestroyRef); + constructor( private actions$: Actions, private apiService: AlfrescoApiService, @@ -124,28 +125,28 @@ export class AcaViewerComponent implements OnInit, OnDestroy { this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened); from(this.infoDrawerOpened$) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((val) => { this.showRightSide = val; }); this.store .select(getAppSelection) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((selection) => { this.selection = selection; }); this.extensions .getViewerToolbarActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.toolbarActions = actions; }); this.extensions .getOpenWithActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.openWith = actions; }); @@ -177,23 +178,23 @@ export class AcaViewerComponent implements OnInit, OnDestroy { } } - this.actions$.pipe(ofType(ViewerActionTypes.ClosePreview), takeUntil(this.onDestroy$)).subscribe(() => { + this.actions$.pipe(ofType(ViewerActionTypes.ClosePreview), takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.store.dispatch(new SetCurrentNodeVersionAction(null)); this.navigateToFileLocation(); }); this.actions$ - .pipe(ofType(ViewerActionTypes.RefreshPreview), takeUntil(this.onDestroy$)) + .pipe(ofType(ViewerActionTypes.RefreshPreview), takeUntilDestroyed(this.destroyRef)) .subscribe((action: RefreshPreviewAction) => { this.nodesApiService.nodeUpdated.next(action.node); void this.displayNode(action.node.id); }); - this.appHookService.nodesDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation()); + this.appHookService.nodesDeleted.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.navigateToFileLocation()); - this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation()); + this.uploadService.fileUploadDeleted.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.navigateToFileLocation()); - this.uploadService.fileUploadComplete.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((file) => { + this.uploadService.fileUploadComplete.pipe(debounceTime(300), takeUntilDestroyed(this.destroyRef)).subscribe((file) => { this.nodesApiService.nodeUpdated.next(file.data.entry); void this.displayNode(file.data.entry.id); }); @@ -208,8 +209,6 @@ export class AcaViewerComponent implements OnInit, OnDestroy { ngOnDestroy() { this.store.dispatch(new SetCurrentNodeVersionAction(null)); - this.onDestroy$.next(true); - this.onDestroy$.complete(); } trackByActionId(_: number, obj: ContentActionRef): string { diff --git a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts index f188d2c894..da7203e560 100644 --- a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts +++ b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts @@ -32,20 +32,19 @@ import { } from '@alfresco/adf-content-services'; import { ShowHeaderMode, UserPreferencesService } from '@alfresco/adf-core'; import { ContentActionRef, DocumentListPresetRef, SelectionState } from '@alfresco/adf-extensions'; -import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive, inject, HostListener } from '@angular/core'; +import { DestroyRef, Directive, HostListener, inject, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { Store } from '@ngrx/store'; -import { NodeEntry, Node, NodePaging } from '@alfresco/js-api'; -import { Observable, Subject, Subscription } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { Node, NodeEntry, NodePaging } from '@alfresco/js-api'; +import { Observable, Subscription } from 'rxjs'; import { DocumentBasePageService } from './document-base-page.service'; import { AppStore, - getCurrentFolder, getAppSelection, + getCurrentFolder, isInfoDrawerOpened, + SetSelectedNodesAction, ViewNodeAction, - ViewNodeExtras, - SetSelectedNodesAction + ViewNodeExtras } from '@alfresco/aca-shared/store'; import { AppExtensionService } from '../../services/app.extension.service'; import { isLibrary, isLocked } from '../../utils/node.utils'; @@ -54,12 +53,11 @@ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; import { Router } from '@angular/router'; import { AppSettingsService } from '../../services/app-settings.service'; import { NavigationHistoryService } from '../../services/navigation-history.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /* eslint-disable @angular-eslint/directive-class-suffix */ @Directive() export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { - onDestroy$: Subject = new Subject(); - @ViewChild(DocumentListComponent) documentList: DocumentListComponent; @@ -90,6 +88,9 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { protected router = inject(Router); protected userPreferencesService = inject(UserPreferencesService); protected searchAiService = inject(SearchAiService); + + protected readonly destroyRef = inject(DestroyRef); + private autoDownloadService = inject(AutoDownloadService, { optional: true }); private navigationHistoryService = inject(NavigationHistoryService); @@ -106,7 +107,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { ngOnInit() { this.extensions .getCreateActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.createActions = actions; }); @@ -115,7 +116,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { this.store .select(getAppSelection) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((selection) => { this.selection = selection; this.canUpdateNode = this.selection.count === 1 && this.content.canUpdateNode(selection.first); @@ -123,41 +124,41 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { this.extensions .getAllowedToolbarActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.actions = actions; }); this.extensions .getBulkActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.bulkActions = actions; }); this.extensions .getViewerToolbarActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.viewerToolbarActions = actions; }); this.store .select(getCurrentFolder) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((node) => { this.canUpload = node && this.content.canUploadContent(node); }); this.breakpointObserver .observe([Breakpoints.HandsetPortrait, Breakpoints.HandsetLandscape]) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((result) => { this.isSmallScreen = result.matches; }); this.searchAiService.toggleSearchAiInput$ - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((searchAiInputState) => (this._searchAiInputState = searchAiInputState)); this.setKnowledgeRetrievalState(); @@ -173,8 +174,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { this.subscriptions.forEach((subscription) => subscription.unsubscribe()); this.subscriptions = []; - this.onDestroy$.next(); - this.onDestroy$.complete(); this.store.dispatch(new SetSelectedNodesAction([])); } diff --git a/projects/aca-shared/src/lib/components/info-drawer/info-drawer.component.ts b/projects/aca-shared/src/lib/components/info-drawer/info-drawer.component.ts index 2a95707967..83ab083a3a 100644 --- a/projects/aca-shared/src/lib/components/info-drawer/info-drawer.component.ts +++ b/projects/aca-shared/src/lib/components/info-drawer/info-drawer.component.ts @@ -22,15 +22,13 @@ * from Hyland Software. If not, see . */ -import { Component, HostListener, Input, OnChanges, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { NodeEntry, Node, SiteEntry } from '@alfresco/js-api'; +import { Component, DestroyRef, HostListener, inject, Input, OnChanges, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Node, NodeEntry, SiteEntry } from '@alfresco/js-api'; import { ContentActionRef, DynamicTabComponent, SidebarTabRef } from '@alfresco/adf-extensions'; import { Store } from '@ngrx/store'; -import { SetInfoDrawerStateAction, ToggleInfoDrawerAction, infoDrawerPreview } from '@alfresco/aca-shared/store'; +import { infoDrawerPreview, SetInfoDrawerStateAction, ToggleInfoDrawerAction } from '@alfresco/aca-shared/store'; import { AppExtensionService } from '../../services/app.extension.service'; import { ContentApiService } from '../../services/content-api.service'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; import { CommonModule } from '@angular/common'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { InfoDrawerModule } from '@alfresco/adf-core'; @@ -38,6 +36,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { A11yModule } from '@angular/cdk/a11y'; import { ToolbarComponent } from '../toolbar/toolbar.component'; import { ContentService, NodesApiService } from '@alfresco/adf-content-services'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -57,7 +56,7 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy { displayNode: Node | SiteEntry; tabs: Array = []; actions: Array = []; - onDestroy$ = new Subject(); + preventFromClosing = false; icon: string = null; @@ -66,6 +65,8 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy { this.close(); } + private readonly destroyRef = inject(DestroyRef); + constructor( private store: Store, private contentApi: ContentApiService, @@ -78,26 +79,24 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy { this.tabs = this.extensions.getSidebarTabs(); this.extensions .getAllowedSidebarActions() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((actions) => { this.actions = actions; }); this.store .select(infoDrawerPreview) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((isInfoDrawerPreviewOpened) => { this.preventFromClosing = isInfoDrawerPreviewOpened; }); - this.nodesService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node: any) => { + this.nodesService.nodeUpdated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((node: any) => { this.node.entry = node; }); } ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); if (!this.preventFromClosing) { this.store.dispatch(new SetInfoDrawerStateAction(false)); } diff --git a/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts b/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts index 1a5299c7c4..a6439d2e91 100644 --- a/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts +++ b/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts @@ -22,14 +22,14 @@ * from Hyland Software. If not, see . */ -import { Component, ViewEncapsulation, Input, OnDestroy } from '@angular/core'; -import { Observable, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { Component, Input, ViewEncapsulation } from '@angular/core'; +import { Observable } from 'rxjs'; import { AppService } from '../../services/app.service'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -40,23 +40,17 @@ import { MatIconModule } from '@angular/material/icon'; encapsulation: ViewEncapsulation.None, host: { class: 'aca-page-layout' } }) -export class PageLayoutComponent implements OnDestroy { +export class PageLayoutComponent { @Input() hasError = false; - private onDestroy$ = new Subject(); appNavNarMode$: Observable<'collapsed' | 'expanded'>; constructor(private appService: AppService) { - this.appNavNarMode$ = appService.appNavNarMode$.pipe(takeUntil(this.onDestroy$)); + this.appNavNarMode$ = appService.appNavNarMode$.pipe(takeUntilDestroyed()); } toggleClick() { this.appService.toggleAppNavBar$.next(); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.spec.ts b/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.spec.ts index c207c70131..76996d16da 100644 --- a/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.spec.ts +++ b/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.spec.ts @@ -25,7 +25,9 @@ import { ContextActionsDirective } from './contextmenu.directive'; import { ContextMenu, CustomContextMenu } from '@alfresco/aca-shared/store'; import { ContentActionRef, ContentActionType } from '@alfresco/adf-extensions'; -import { fakeAsync, tick } from '@angular/core/testing'; +import { fakeAsync, TestBed, tick } from '@angular/core/testing'; +import { Store } from '@ngrx/store'; +import { Injector, runInInjectionContext } from '@angular/core'; const customActionsMock: ContentActionRef[] = [ { @@ -46,7 +48,13 @@ describe('ContextActionsDirective', () => { }; beforeEach(() => { - directive = new ContextActionsDirective(storeMock); + TestBed.configureTestingModule({ + imports: [ContextActionsDirective], + providers: [{ provide: Store, useValue: storeMock }] + }); + runInInjectionContext(TestBed.inject(Injector), () => { + directive = new ContextActionsDirective(storeMock); + }); }); it('should not render context menu when `enabled` property is false', () => { diff --git a/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.ts b/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.ts index b212fb1a4b..2dbfa8357b 100644 --- a/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.ts +++ b/projects/aca-shared/src/lib/directives/contextmenu/contextmenu.directive.ts @@ -22,22 +22,20 @@ * from Hyland Software. If not, see . */ -import { Directive, HostListener, Input, OnInit, OnDestroy } from '@angular/core'; -import { debounceTime, takeUntil } from 'rxjs/operators'; +import { DestroyRef, Directive, HostListener, inject, Input, OnInit } from '@angular/core'; +import { debounceTime } from 'rxjs/operators'; import { Subject } from 'rxjs'; import { Store } from '@ngrx/store'; import { AppStore, ContextMenu, CustomContextMenu } from '@alfresco/aca-shared/store'; import { ContentActionRef } from '@alfresco/adf-extensions'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, selector: '[acaContextActions]', exportAs: 'acaContextActions' }) -export class ContextActionsDirective implements OnInit, OnDestroy { - private execute$: Subject = new Subject(); - onDestroy$: Subject = new Subject(); - +export class ContextActionsDirective implements OnInit { // eslint-disable-next-line @Input('acaContextEnable') enabled = true; @@ -59,10 +57,14 @@ export class ContextActionsDirective implements OnInit, OnDestroy { } } + private execute$: Subject = new Subject(); + + private readonly destroyRef = inject(DestroyRef); + constructor(private store: Store) {} ngOnInit() { - this.execute$.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((event: MouseEvent) => { + this.execute$.pipe(debounceTime(300), takeUntilDestroyed(this.destroyRef)).subscribe((event: MouseEvent) => { if (this.customActions?.length) { this.store.dispatch(new CustomContextMenu(event, this.customActions)); } else { @@ -70,12 +72,6 @@ export class ContextActionsDirective implements OnInit, OnDestroy { } }); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - execute(event: MouseEvent, target: Element) { if (!this.isSelected(target)) { target.dispatchEvent(new MouseEvent('click')); diff --git a/projects/aca-shared/src/lib/directives/pagination.directive.spec.ts b/projects/aca-shared/src/lib/directives/pagination.directive.spec.ts index 7b504afb76..31a4628d49 100644 --- a/projects/aca-shared/src/lib/directives/pagination.directive.spec.ts +++ b/projects/aca-shared/src/lib/directives/pagination.directive.spec.ts @@ -23,10 +23,11 @@ */ import { PaginationDirective } from './pagination.directive'; -import { TestBed, ComponentFixture } from '@angular/core/testing'; -import { UserPreferencesService, AppConfigService, PaginationComponent, PaginationModel } from '@alfresco/adf-core'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { AppConfigService, PaginationComponent, PaginationModel, UserPreferencesService } from '@alfresco/adf-core'; import { initialState, LibTestingModule } from '../testing/lib-testing-module'; import { provideMockStore } from '@ngrx/store/testing'; +import { Injector, runInInjectionContext } from '@angular/core'; describe('PaginationDirective', () => { let preferences: UserPreferencesService; @@ -45,12 +46,13 @@ describe('PaginationDirective', () => { config = TestBed.inject(AppConfigService); fixture = TestBed.createComponent(PaginationComponent); pagination = fixture.componentInstance; - directive = new PaginationDirective(pagination, preferences, config); + runInInjectionContext(TestBed.inject(Injector), () => { + directive = new PaginationDirective(pagination, preferences, config); + }); }); afterEach(() => { fixture.destroy(); - directive.ngOnDestroy(); }); it('should setup supported page sizes from app config', () => { diff --git a/projects/aca-shared/src/lib/directives/pagination.directive.ts b/projects/aca-shared/src/lib/directives/pagination.directive.ts index 5914bbb3f3..082cf93b77 100644 --- a/projects/aca-shared/src/lib/directives/pagination.directive.ts +++ b/projects/aca-shared/src/lib/directives/pagination.directive.ts @@ -22,31 +22,23 @@ * from Hyland Software. If not, see . */ -import { Directive, OnInit, OnDestroy } from '@angular/core'; -import { PaginationComponent, UserPreferencesService, PaginationModel, AppConfigService } from '@alfresco/adf-core'; -import { Subscription } from 'rxjs'; +import { DestroyRef, Directive, inject, OnInit } from '@angular/core'; +import { AppConfigService, PaginationComponent, PaginationModel, UserPreferencesService } from '@alfresco/adf-core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ standalone: true, selector: '[acaPagination]' }) -export class PaginationDirective implements OnInit, OnDestroy { - private subscriptions: Subscription[] = []; +export class PaginationDirective implements OnInit { + private readonly destroyRef = inject(DestroyRef); constructor(private pagination: PaginationComponent, private preferences: UserPreferencesService, private config: AppConfigService) {} ngOnInit() { this.pagination.supportedPageSizes = this.config.get('pagination.supportedPageSizes'); - - this.subscriptions.push( - this.pagination.changePageSize.subscribe((event: PaginationModel) => { - this.preferences.paginationSize = event.maxItems; - }) - ); - } - - ngOnDestroy() { - this.subscriptions.forEach((subscription) => subscription.unsubscribe()); - this.subscriptions = []; + this.pagination.changePageSize.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event: PaginationModel) => { + this.preferences.paginationSize = event.maxItems; + }); } } diff --git a/projects/aca-shared/src/lib/services/app.service.ts b/projects/aca-shared/src/lib/services/app.service.ts index bc3c0d19a0..be4e75a870 100644 --- a/projects/aca-shared/src/lib/services/app.service.ts +++ b/projects/aca-shared/src/lib/services/app.service.ts @@ -22,20 +22,20 @@ * from Hyland Software. If not, see . */ -import { inject, Injectable, OnDestroy } from '@angular/core'; -import { AuthenticationService, AppConfigService, PageTitleService, UserPreferencesService, NotificationService } from '@alfresco/adf-core'; -import { Observable, BehaviorSubject, Subject } from 'rxjs'; +import { inject, Injectable } from '@angular/core'; +import { AppConfigService, AuthenticationService, NotificationService, PageTitleService, UserPreferencesService } from '@alfresco/adf-core'; +import { BehaviorSubject, Observable, Subject } from 'rxjs'; import { AlfrescoApiService, + FileUploadErrorEvent, SearchQueryBuilderService, SharedLinksApiService, - UploadService, - FileUploadErrorEvent + UploadService } from '@alfresco/adf-content-services'; import { OverlayContainer } from '@angular/cdk/overlay'; import { ActivatedRoute, ActivationEnd, NavigationStart, Router } from '@angular/router'; import { filter, map } from 'rxjs/operators'; -import { AppStore, SetCurrentUrlAction, SetRepositoryInfoAction, SetUserProfileAction, ResetSelectionAction } from '@alfresco/aca-shared/store'; +import { AppStore, ResetSelectionAction, SetCurrentUrlAction, SetRepositoryInfoAction, SetUserProfileAction } from '@alfresco/aca-shared/store'; import { ContentApiService } from './content-api.service'; import { RouterExtensionService } from './router.extension.service'; import { Store } from '@ngrx/store'; @@ -50,7 +50,7 @@ import { MatDialog } from '@angular/material/dialog'; providedIn: 'root' }) // After moving shell to ADF to core, AppService will implement ShellAppService -export class AppService implements ShellAppService, OnDestroy { +export class AppService implements ShellAppService { private notificationService = inject(NotificationService); private matDialog = inject(MatDialog); private ready: BehaviorSubject; @@ -67,8 +67,6 @@ export class AppService implements ShellAppService, OnDestroy { hideSidenavConditions = ['/preview/']; minimizeSidenavConditions = ['/search']; - onDestroy$ = new Subject(); - /** * Whether `withCredentials` mode is enabled. * Usually means that `Kerberos` mode is used. @@ -121,11 +119,6 @@ export class AppService implements ShellAppService, OnDestroy { }); } - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - init(): void { this.alfrescoApiService.getInstance().on('error', (error: { status: number; response: any }) => { if (error.status === 401 && !this.alfrescoApiService.isExcludedErrorListener(error?.response?.req?.url)) {