Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Chorehancement: update to Angular v22, 'zoneless' / 'reactive' (#13114)

shamoon106b41a15cd4
diff --git a/src-ui/angular.json b/src-ui/angular.json
index 9ed7488b6..391dcc710 100644
--- a/src-ui/angular.json
+++ b/src-ui/angular.json
@@ -155,7 +155,9 @@
"builder": "@angular-builders/jest:run",
"options": {
"tsConfig": "tsconfig.spec.json",
- "zoneless": false
+ "zoneless": true,
+ "watch": false,
+ "coverage": true
}
},
"lint": {
diff --git a/src-ui/eslint.config.js b/src-ui/eslint.config.js
index 6ee2e4de8..20922c1eb 100644
--- a/src-ui/eslint.config.js
+++ b/src-ui/eslint.config.js
@@ -3,6 +3,27 @@ const angularTemplatePlugin = require('@angular-eslint/eslint-plugin-template')
const angularTemplateParser = require('@angular-eslint/template-parser')
const tsParser = require('@typescript-eslint/parser')
+const angularTsRecommendedRules = {
+ '@angular-eslint/contextual-lifecycle': 'error',
+ '@angular-eslint/no-empty-lifecycle-method': 'error',
+ '@angular-eslint/no-input-rename': 'error',
+ '@angular-eslint/no-inputs-metadata-property': 'error',
+ '@angular-eslint/no-output-native': 'error',
+ '@angular-eslint/no-output-on-prefix': 'error',
+ '@angular-eslint/no-output-rename': 'error',
+ '@angular-eslint/no-outputs-metadata-property': 'error',
+ '@angular-eslint/prefer-inject': 'error',
+ '@angular-eslint/prefer-standalone': 'error',
+ '@angular-eslint/use-pipe-transform-interface': 'error',
+ '@angular-eslint/use-lifecycle-interface': 'warn',
+}
+const angularTemplateRecommendedRules = {
+ '@angular-eslint/template/banana-in-box': 'error',
+ '@angular-eslint/template/eqeqeq': 'error',
+ '@angular-eslint/template/no-negated-async': 'error',
+ '@angular-eslint/template/prefer-control-flow': 'error',
+}
+
module.exports = [
{
ignores: ['projects/**/*', 'src/app/components/common/pdf-viewer/**'],
@@ -12,8 +33,6 @@ module.exports = [
languageOptions: {
parser: tsParser,
parserOptions: {
- project: ['tsconfig.json'],
- createDefaultProgram: true,
ecmaVersion: 2020,
sourceType: 'module',
},
@@ -22,9 +41,9 @@ module.exports = [
'@angular-eslint': angularEslintPlugin,
'@angular-eslint/template': angularTemplatePlugin,
},
- processor: '@angular-eslint/template/extract-inline-html',
+ processor: angularTemplatePlugin.processors['extract-inline-html'],
rules: {
- ...angularEslintPlugin.configs.recommended.rules,
+ ...angularTsRecommendedRules,
'@angular-eslint/directive-selector': [
'error',
{
@@ -52,7 +71,7 @@ module.exports = [
'@angular-eslint/template': angularTemplatePlugin,
},
rules: {
- ...angularTemplatePlugin.configs.recommended.rules,
+ ...angularTemplateRecommendedRules,
},
},
]
diff --git a/src-ui/package.json b/src-ui/package.json
index fbaaf76a4..2a7bdfe11 100644
--- a/src-ui/package.json
+++ b/src-ui/package.json
@@ -6,22 +6,22 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
- "test": "ng test --no-watch --coverage",
+ "test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
- "@angular/cdk": "^21.2.12",
- "@angular/common": "~21.2.17",
- "@angular/compiler": "~21.2.17",
- "@angular/core": "~21.2.17",
- "@angular/forms": "~21.2.14",
- "@angular/localize": "~21.2.14",
- "@angular/platform-browser": "~21.2.14",
- "@angular/platform-browser-dynamic": "~21.2.14",
- "@angular/router": "~21.2.14",
- "@ng-bootstrap/ng-bootstrap": "^20.0.0",
- "@ng-select/ng-select": "^21.8.2",
+ "@angular/cdk": "^22.0.3",
+ "@angular/common": "~22.0.5",
+ "@angular/compiler": "~22.0.5",
+ "@angular/core": "~22.0.5",
+ "@angular/forms": "~22.0.5",
+ "@angular/localize": "~22.0.5",
+ "@angular/platform-browser": "~22.0.5",
+ "@angular/platform-browser-dynamic": "~22.0.5",
+ "@angular/router": "~22.0.5",
+ "@ng-bootstrap/ng-bootstrap": "^21.0.0",
+ "@ng-select/ng-select": "^23.2.0",
"@ngneat/dirty-check-forms": "^3.0.3",
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.8",
@@ -29,30 +29,29 @@
"mime-names": "^1.0.0",
"ngx-bootstrap-icons": "^1.9.3",
"ngx-color": "^10.1.0",
- "ngx-cookie-service": "^21.3.1",
- "ngx-device-detector": "^11.0.0",
- "ngx-ui-tour-ng-bootstrap": "^18.0.0",
+ "ngx-cookie-service": "^22.0.0",
+ "ngx-device-detector": "^12.0.0",
+ "ngx-ui-tour-ng-bootstrap": "^19.0.0",
"normalize-diacritics": "^5.0.0",
"pdfjs-dist": "^6.0.227",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"utif": "^3.1.0",
- "uuid": "^14.0.1",
- "zone.js": "^0.16.2"
+ "uuid": "^14.0.1"
},
"devDependencies": {
- "@angular-builders/custom-webpack": "^21.0.3",
- "@angular-builders/jest": "^21.0.3",
- "@angular-devkit/core": "^21.2.12",
- "@angular-devkit/schematics": "^21.2.12",
- "@angular-eslint/builder": "21.4.0",
- "@angular-eslint/eslint-plugin": "21.4.0",
- "@angular-eslint/eslint-plugin-template": "21.4.0",
- "@angular-eslint/schematics": "21.4.0",
- "@angular-eslint/template-parser": "21.4.0",
- "@angular/build": "^21.2.12",
- "@angular/cli": "~21.2.12",
- "@angular/compiler-cli": "~21.2.14",
+ "@angular-builders/custom-webpack": "^22.0.1",
+ "@angular-builders/jest": "^22.0.1",
+ "@angular-devkit/core": "^22.0.5",
+ "@angular-devkit/schematics": "^22.0.5",
+ "@angular-eslint/builder": "22.0.0",
+ "@angular-eslint/eslint-plugin": "22.0.0",
+ "@angular-eslint/eslint-plugin-template": "22.0.0",
+ "@angular-eslint/schematics": "22.0.0",
+ "@angular-eslint/template-parser": "22.0.0",
+ "@angular/build": "^22.0.5",
+ "@angular/cli": "~22.0.5",
+ "@angular/compiler-cli": "~22.0.5",
"@codecov/webpack-plugin": "^2.0.1",
"@playwright/test": "^1.61.1",
"@types/jest": "^30.0.0",
@@ -68,17 +67,8 @@
"jest-websocket-mock": "^2.5.0",
"prettier-plugin-organize-imports": "^4.3.0",
"ts-node": "~10.9.1",
- "typescript": "^5.9.3",
+ "typescript": "^6.0.3",
"webpack": "^5.107.2"
},
- "packageManager": "[email protected]",
- "pnpm": {
- "onlyBuiltDependencies": [
- "@parcel/watcher",
- "canvas",
- "esbuild",
- "lmdb",
- "msgpackr-extract"
- ]
- }
+ "packageManager": "[email protected]"
}
diff --git a/src-ui/pnpm-lock.yaml b/src-ui/pnpm-lock.yaml
index 9a3c1e725..cd3076cb0 100644
--- a/src-ui/pnpm-lock.yaml
+++ b/src-ui/pnpm-lock.yaml
@@ -9,41 +9,41 @@ importers:
.:
dependencies:
'@angular/cdk':
- specifier: ^21.2.12
+ specifier: ^22.0.3
'@angular/common':
- specifier: ~21.2.17
+ specifier: ~22.0.5
'@angular/compiler':
- specifier: ~21.2.17
- version: 21.2.17
+ specifier: ~22.0.5
+ version: 22.0.5
'@angular/core':
- specifier: ~21.2.17
+ specifier: ~22.0.5
'@angular/forms':
- specifier: ~21.2.14
+ specifier: ~22.0.5
'@angular/localize':
- specifier: ~21.2.14
- version: 21.2.14(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
+ specifier: ~22.0.5
+ version: 22.0.5(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
'@angular/platform-browser':
- specifier: ~21.2.14
+ specifier: ~22.0.5
'@angular/platform-browser-dynamic':
- specifier: ~21.2.14
+ specifier: ~22.0.5
'@angular/router':
- specifier: ~21.2.14
+ specifier: ~22.0.5
'@ng-bootstrap/ng-bootstrap':
- specifier: ^20.0.0
+ specifier: ^21.0.0
'@ng-select/ng-select':
- specifier: ^21.8.2
+ specifier: ^23.2.0
'@ngneat/dirty-check-forms':
specifier: ^3.0.3
- version: 3.0.3(ad2c8ff51b8ef8626e139c84727a024d)
'@popperjs/core':
specifier: ^2.11.8
version: 2.11.8
@@ -58,19 +58,19 @@ importers:
version: 1.0.0
ngx-bootstrap-icons:
specifier: ^1.9.3
ngx-color:
specifier: ^10.1.0
ngx-cookie-service:
- specifier: ^21.3.1
+ specifier: ^22.0.0
ngx-device-detector:
- specifier: ^11.0.0
+ specifier: ^12.0.0
ngx-ui-tour-ng-bootstrap:
- specifier: ^18.0.0
- version: 18.0.0(4ccfccfbcf381a309618492b31e99276)
+ specifier: ^19.0.0
+ version: 19.0.0(5d0f9d2d91ce22b3b7a50a70fd62ec66)
normalize-diacritics:
specifier: ^5.0.0
version: 5.0.0
@@ -89,46 +89,43 @@ importers:
uuid:
specifier: ^14.0.1
version: 14.0.1
- zone.js:
- specifier: ^0.16.2
- version: 0.16.2
devDependencies:
'@angular-builders/custom-webpack':
- specifier: ^21.0.3
+ specifier: ^22.0.1
'@angular-builders/jest':
- specifier: ^21.0.3
- version: 21.0.3(85f8e4dacd8f3c5fc95b573860b0c5c2)
+ specifier: ^22.0.1
+ version: 22.0.1(41a81beaf45fc81545506474f268b72a)
'@angular-devkit/core':
- specifier: ^21.2.12
- version: 21.2.12([email protected])
+ specifier: ^22.0.5
+ version: 22.0.5([email protected])
'@angular-devkit/schematics':
- specifier: ^21.2.12
- version: 21.2.12([email protected])
+ specifier: ^22.0.5
+ version: 22.0.5([email protected])
'@angular-eslint/builder':
- specifier: 21.4.0
+ specifier: 22.0.0
'@angular-eslint/eslint-plugin':
- specifier: 21.4.0
+ specifier: 22.0.0
'@angular-eslint/eslint-plugin-template':
- specifier: 21.4.0
+ specifier: 22.0.0
'@angular-eslint/schematics':
- specifier: 21.4.0
+ specifier: 22.0.0
'@angular-eslint/template-parser':
- specifier: 21.4.0
+ specifier: 22.0.0
'@angular/build':
- specifier: ^21.2.12
+ specifier: ^22.0.5
'@angular/cli':
- specifier: ~21.2.12
- version: 21.2.12(@types/[email protected])([email protected])
+ specifier: ~22.0.5
+ version: 22.0.5(@types/[email protected])([email protected])
'@angular/compiler-cli':
- specifier: ~21.2.14
- version: 21.2.14(@angular/[email protected])([email protected])
+ specifier: ~22.0.5
+ version: 22.0.5(@angular/[email protected])([email protected])
'@codecov/webpack-plugin':
specifier: ^2.0.1
@@ -143,19 +140,19 @@ importers:
version: 26.0.0
'@typescript-eslint/eslint-plugin':
specifier: ^8.62.0
'@typescript-eslint/parser':
specifier: ^8.62.0
'@typescript-eslint/utils':
specifier: ^8.62.0
eslint:
specifier: ^10.5.0
- version: 10.5.0([email protected])
+ version: 10.5.0([email protected])
jest:
specifier: 30.4.2
jest-environment-jsdom:
specifier: ^30.4.1
version: 30.4.1([email protected])
@@ -164,19 +161,19 @@ importers:
version: 17.0.0
jest-preset-angular:
specifier: ^17.0.0
jest-websocket-mock:
specifier: ^2.5.0
version: 2.5.0
prettier-plugin-organize-imports:
specifier: ^4.3.0
ts-node:
specifier: ~10.9.1
- version: 10.9.2(@types/[email protected])([email protected])
+ version: 10.9.2(@types/[email protected])([email protected])
typescript:
- specifier: ^5.9.3
- version: 5.9.3
+ specifier: ^6.0.3
+ version: 6.0.3
webpack:
specifier: ^5.107.2
version: 5.107.2([email protected])
@@ -201,121 +198,110 @@ packages:
'@actions/[email protected]':
resolution: {integrity: sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-Dkj0BgPiLAaim9sbQ97UKDFHJE/880wgStAM18U++NaJ/2Cws34J5731ovJifr6E3Pv4T2CqvMXf8qLCC417Ew==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-8siuLG+FIns1AjZ/g2SDVwHz9S+ObacDQISEJvS8XsNei1zl3FXqfqQrBpmrG7ACWCyesXHbicMJtvRbg00FEw==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-LV5qCJdj+/m9I+Aj91o+glYszrzd7CX6NgKaYdTOj4+tUYfbS62pwYgUfZprYNayhkQpVFcrW8x8ZlIHpS23Vw==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-wtwPgyPmO7b7sQPVgoK29c1VpfS08DnnJCmxX/oU1pV2DlMRJCzQcLN7JSloYpodyKHwM8+9wOzlAM0co3TDmA==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-/AVoMqHhPm14CcHq7mwB+bUJbfCv+jrxlNvRjXAuO+TQa+V37N8k1b0ijaRBPdmSjULMd8KtJbQyUyabXOu6Kg==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-9KY36bRl4AH7RjqSeDDOKnjsz4IxQFBEOB8/fWmEbdQe+Isbs5jGzVJu9NEPQ1Tgwxlf8Uf07Swj3jZyMNUZ2g==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-VXO+qu2Ep6ota28ktvBm3sG53wUHS2n7bgLWmce5jTskdlCD0/JrV4tnBm1l7qpla1CeoQb8D7ShFhad+UoSOw==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-3a/qM3dzJqqfTx7Yrw7uGQ98I3Q0rDfb4Vkv0wEzko96l7YQMxfBVz/VbLq2N+c59GweYv6Vhp8mPeqnWJSITw==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-zl+Qyb0nLg+Y5YvKp1Ij+u9OaPaKg2/EPzTwKNiVyOHnQJlFxmXyUZL1EInczAZsEY8hVpPCLtNfhMhfxluXKQ==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-Rki7ACbMcvbQW0BuM84x9dkGHY47ABmv4jU6tYssat2k02p3mIUms2YOLUAMeknhmnFsj6lb6ZzOXdMWMyc1sA==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-r89Qf9Oo9mKWQXumRu/1LtvVJAmEDpn8mHZMc485pRfQUMAwSSrsnaw1tQ3sszqzEgAr1c7rw6fjBI+zrAXTOw==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-96s4Uzc3kk+/f4jJXIVVGWP5XlngOGNQ1x6hW9AT59pOixHlOs5tqJg+ZUS/GQ6h/iYP0ceQcmxDQeLyCLTaDQ==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-TPKNPKfghKG/bMSc7mQYD9HxHRUkBZA4q1PEmHgICaSeHQscGqL4wBrKkhfPlDV1uYBKW02pbFMUhsOt7p4ZpA==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-lqeycNpSPe5Qa0OUWpejVvYQjQWV5nQuLT0a4aq7XzRAvCxprV/6Lf841EygdD2nrFnuS58ok7Au1uOtXzpnkg==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-4Fu7dnzQyQmMFknYwTiN/HxPbH4DyxvQ1m+IxpPp5oslOgz8m6PG5qhiGbqJzH4HiT1I58ecDiCAC716UyVA8Q==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-ly1wETVGRo30cx61O7fetESN+ElL9c9K+bD/AVgnT1ar4c6v+/Yqjrhdtu6Fm4D0s4NZP081Isf6tunH1wUXHg==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-/RFq3TqtXDUUawwic/A9xylA2P3LDMO8dNhphHAUOU51b1ZLHrmZ6YYJm3df1APz7xLY1aht6okCQf+/vmrV9w==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-U4EeTvgmluRjj39ykZSAd5X+a6LD5m7/mcOWDmB7hqm1R6QY0yT8jLxpNVEjYhzgEN5hcDGW6X67EWQY8KiYGQ==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-Of0jTeAZRyRhC7XzDSjJef0aBkgRcvRAaw0ooYRlOw57APii7lZdq+layuNdeL72BRq1snaJhoMMwkmLIpJScw==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-FCPnDcILfpTE94u7BVlV4DmnSV5wE3+j25EEF+3dYPrVzkVCSoAHs318oWDGxnxsAgiL4HpL12Jc4XHmw9shpA==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-bE7JcpFXzxF5zHwj/vkl2eiCBvyR1zQ7aoUdO+GDXxGp0DGw7nI0p8Xj6u8VmRQ+RDuPcICFQcCwRIJT5tDJFw==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-br3DO7n4N8CXwTRbZS0MnB4WQ9YHfNjCwkCEzVR/wek/qNTDQKDb0nROmkFaNZ8ucUqUVKZi074dbwMwRDlK8Q==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-MK3wZ2koLDnvH/AmqIF1EKbJlhRS5j74OZGkLpxI4rYvNi9Jn/C7vb5DytBnQ4KUWts7QsmbdwHkxY5txQHXVw==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-b0T/Ca2c9KyEslKsVrGZvbe1UrrKKSdfXhBZ2pbpKahFUzJfziRZ0urbOm7V65O0tO/jwU+Lo/+bIiiyhzGt8w==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-2oDT43Y5HWRSIQMPQI4tA/W+TN/N2tjggZCUsqQV440kxzzoPGsvv9QP1GhQ4CoDa+yn6ygUsGp6Dr+a9sPPSg==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-ozBT8J/mtD4H4IAojw8QPirlcL2gHrI1BGuZ4/ZXXO/rTE1yQ4VIPJj4mTTbwo4FbkS1MoJsD/DsrqLzhnc4/g==}
engines: {node: '>= 14.0.0'}
- '@algolia/[email protected]':
- resolution: {integrity: sha512-xcaCqbhupVWhuBP1nwbk1XNvwrGljozutEiLx06mvqDf3o8cHyEgQSHS4fKJM+UAggaWVnnFW+Nne5aQ8SUJXg==}
+ '@algolia/[email protected]':
+ resolution: {integrity: sha512-gyyWcLD22tnabmoit4iukCXuoRc5HYJuUjPSEa8a0D/f/NlRafpWi52AlAaa4Uu/rsl7saHsJFTNjTptWbu2+A==}
engines: {node: '>= 14.0.0'}
'@ampproject/[email protected]':
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
engines: {node: '>=6.0.0'}
- '@angular-builders/[email protected]':
- resolution: {integrity: sha512-Dro3574mu4/xqmjdA3159+TXDhgTbIJpEY/iBETSKUvHJiCgHel+R3eT105RpHN5o7NaD2rau5Zk2wuZqOk35Q==}
+ '@angular-builders/[email protected]':
+ resolution: {integrity: sha512-7qZDXSS3CmN4W7z/p+VwH38id4Tq++pjl0GqH6XVp7Jj7RZGH+d4vPfsqF/ePG4N1XEJjL9ieG0vP6MNtf9UMQ==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
- '@angular-builders/[email protected]':
- resolution: {integrity: sha512-Aq3PZoQxY4jmfDb1sT5E6ZFAdiv35PziFmgYoW5DGX8xbYsV7EoKWZN2ZIjEI3Zr/WUZWGlxmxa11XK9WOtidg==}
+ '@angular-builders/[email protected]':
+ resolution: {integrity: sha512-0wTSs9eH8LJjQYfuwySV9xOTxhfekbSaCFPHQv+GKsG0sAC/rjFG3sgRzObOd3ae3R8DW2389yZwu9juOWqRug==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
peerDependencies:
- '@angular/compiler-cli': ^21.0.0
+ '@angular/compiler-cli': ^22.0.0
+ rxjs: '>=7.0.0'
- '@angular-builders/[email protected]':
- resolution: {integrity: sha512-RYIsJQJkke4Dns+lYBYzn0JcmABCQKvTWkqMibi5v8dgtNS8pgPS8pE5x8DSmgraqJikL3ukqaUQmdeL6r38aw==}
+ '@angular-builders/[email protected]':
+ resolution: {integrity: sha512-bSsV1a8A7KJs1RwsmKH5C9/K3j9GqRYQKiXPgrKOLUJ7dzsAvvlF58n5NX0Pn975ZCrGa1wY3tx8iwQpo+aj3g==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
peerDependencies:
- '@angular-devkit/build-angular': ^21.0.0
- '@angular/compiler-cli': ^21.0.0
- '@angular/core': ^21.0.0
- '@angular/platform-browser-dynamic': ^21.0.0
+ '@angular-devkit/build-angular': ^22.0.0
+ '@angular/compiler-cli': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@angular/platform-browser-dynamic': ^22.0.0
jest: ^30.0.0
+ rxjs: '>=7.0.0'
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-pV2onJgp16xO0vAqEfRWVynRPPLVHydYLANNa3UX3l5T39JcYdMIoOHSIIl8tWrxVeOwiWd1ajub0VsFTUok4Q==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- hasBin: true
-
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-w9FSMHYeeHkk0kRSAOCvNqEVyOHqpC1SUf3iN7tDnXBOA0dtc6JYvJU7O4joiwf7wMPZDK8LKc/6eu8/Tx87Fw==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- hasBin: true
-
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-fheyi0gPx6b7tT+WQ+ePlzdGqKjPLUK72wg5Z9pkVtQ5+VN/8yB9mlRlmoivngd2FeNG9wMeNynWZGYycnOWVw==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@angular-devkit/[email protected]':
+ resolution: {integrity: sha512-Fbki7xEx37gn8uH5AFOh0EmfGV4y5xag2fTv1vn6KxY/h33L02KuAjiUX3h2YmSjnYSc1dXto3Q5c4lWs/I5Zw==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
hasBin: true
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-i/FTbqVwj0Wk6B5RA2H9iVsDC/kIK/5koSEwkIQjXGZuDVFUoEuWiIR2PGGSSQ9u3DmkpVPZmKEXWRl+g7Qn5g==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- peerDependencies:
- '@angular/compiler-cli': ^21.0.0
- '@angular/core': ^21.0.0
- '@angular/localize': ^21.0.0
- '@angular/platform-browser': ^21.0.0
- '@angular/platform-server': ^21.0.0
- '@angular/service-worker': ^21.0.0
- '@angular/ssr': ^21.1.2
- '@web/test-runner': ^0.20.0
+ '@angular-devkit/[email protected]':
+ resolution: {integrity: sha512-+YUOzWeQCwUpV2usFQwHBh01DQYxhcqUpxFKHw73ASIFC4+QsJNX+92++J9PvDOsXWHtGivX+6YmwI9/rcudIA==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ deprecated: Angular's Webpack support is deprecated. Use the esbuild and Vite-based "@angular/build" package instead.
+ peerDependencies:
+ '@angular/compiler-cli': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@angular/localize': ^22.0.0
+ '@angular/platform-browser': ^22.0.0
+ '@angular/platform-server': ^22.0.0
+ '@angular/service-worker': ^22.0.0
+ '@angular/ssr': ^22.0.5
browser-sync: ^3.0.2
- jest: ^30.2.0
- jest-environment-jsdom: ^30.2.0
karma: ^6.3.0
- ng-packagr: ^21.0.0
- protractor: ^7.0.0
+ ng-packagr: ^22.0.0
tailwindcss: ^2.0.0 || ^3.0.0 || ^4.0.0
- typescript: '>=5.9 <6.0'
+ typescript: '>=6.0 <6.1'
peerDependenciesMeta:
'@angular/core':
optional: true
@@ -329,124 +315,99 @@ packages:
optional: true
'@angular/ssr':
optional: true
- '@web/test-runner':
- optional: true
browser-sync:
optional: true
- jest:
- optional: true
- jest-environment-jsdom:
- optional: true
karma:
optional: true
ng-packagr:
optional: true
- protractor:
- optional: true
tailwindcss:
optional: true
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-/rC9rcrG+Tn8MZIEW9LTHmBuLiQdCHZyscgqgMXD049qgB858gS1Y/lP/tt0xrP3Yhan5XNcRYjcv6sYPtmPUw==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@angular-devkit/[email protected]':
+ resolution: {integrity: sha512-oLNCK+Zpv0/iY9yC/kX9wxZINqdwBQNcidXteC2xtcj99FE0PS8D5zHTZquoGyu9/v91FIt3q1dGtHXSz6MpTg==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
peerDependencies:
webpack: ^5.30.0
webpack-dev-server: ^5.0.2
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-0wl5nJlFWsbwfUB2CQeTSmnVQ8AtqqwM3bYPYtXSc+vA8+hzsOAjjDuRnBxZS9zTnqtXKXB1e7M3Iy7KUwh7LA==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- peerDependencies:
- chokidar: ^5.0.0
- peerDependenciesMeta:
- chokidar:
- optional: true
-
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-nXms0jVWwHOJK+z6vHvhw7HYFBelxh2gEnkij0OQMABXZN5hoUlTD0DDP1lYR7hQNi8Yb2Ar0UN9ihyUFVM5Kg==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- peerDependencies:
- chokidar: ^5.0.0
- peerDependenciesMeta:
- chokidar:
- optional: true
-
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-9jLaHcUr6BumIY9nCsBib1q62p259nf++gd2igYJ7mLm1w/0wEacsZ1cC8wCGEe6vx8a+DrD+EVCQ6zivePG2A==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@angular-devkit/[email protected]':
+ resolution: {integrity: sha512-xxd3b9X0bbdGuYqDj1OgxtlGotrb/gsxQ5+4aqivWBHq4q/1RI8JfVB7gqcoYTvAfTq63Dwsk7Qd33hC4yJ1Wg==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
peerDependencies:
chokidar: ^5.0.0
peerDependenciesMeta:
chokidar:
optional: true
- '@angular-devkit/[email protected]':
- resolution: {integrity: sha512-29xe6C9nwHejV9zBcu0js7NmzLWuCFzBGBTmL6eD4JN1NcxEZ/nO1JuaGINjPjzb/UDXPZIqEwHbnFNcGS5v1A==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@angular-devkit/[email protected]':
+ resolution: {integrity: sha512-yKkImZuFLIbylmk1REyoW3EWQeqnr6qwtrzs4EPeaJgzjj+MZurq5slQ3fanK9lfX2q+W+dnSQFKBXHxlUGJ8Q==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-3kgGmrVaCYbLtDjC8g4BmMBbdz4thsOB8/NYly8JtXM8EuDZEk5Pz6VTRpJR02ARprwayraTTmhyvq6OGBlQ9w==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-T2vWQYUhJs6iUlgocHV12OgoxbmN63f17a+tgW+3sYrKN0KAB3xuHsPOoYpRYoWqkVVC44HD441Ju4IDvo8vKg==}
peerDependencies:
- '@angular/cli': '>= 21.0.0 < 22.0.0'
- eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
+ '@angular/cli': '>= 22.0.0 < 23.0.0'
+ eslint: ^9.0.0 || ^10.0.0
typescript: '*'
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-/3H4BPbQ1BHJkkrUsfusZtmHc+qiFWBBZ9UDPWah4xZMjflexOK9U4GYeH7nMjcuyqFnIlMMeJJNwNLGt/hmdg==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-rv15vGDpGW8zZFaLdhQ+iIO1f0bZds/xvuxoX277hFisXp5Kt6FumJNNIb4g/qxq3xsY46a7fD6R7KvGY3smHg==}
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-sJEHx2WYnvOgPpzP1eHnUdRS06zgKmRxbiIR0JiCcaSen5iv1HlsMieXy//FS9TtNW+abHOy4UtDuGuSPflPFA==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-y6XL5HJ8C31NpBvkVHpU3bWc+Rk9g1zRtHrs39omhuT29eEUcS3zu47HMFV6tf8rHOI97B2Mstg6qYS5XL9ATg==}
peerDependencies:
- '@angular-eslint/template-parser': 21.4.0
- '@typescript-eslint/types': ^7.11.0 || ^8.0.0
- '@typescript-eslint/utils': ^7.11.0 || ^8.0.0
- eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
+ '@angular-eslint/template-parser': 22.0.0
+ '@typescript-eslint/types': ^8.0.0
+ '@typescript-eslint/utils': ^8.0.0
+ eslint: ^9.0.0 || ^10.0.0
typescript: '*'
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-mow2DMj+xBvGl5t7jzC34R8YfbHbaGNyCNFzpovtl9qc0JbuqLyg6htmt8xb05f8ZjATOr4nz0ESt6HV4c51hw==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-mKLScPZhqG64ic0KIQoxqSqCdkPwtEZuTOuunvc9lYTw05MJSHRUM2yVFODlCGq97c6BN1F6KBk2I+a+KFnr1g==}
peerDependencies:
- '@typescript-eslint/utils': ^7.11.0 || ^8.0.0
- eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
+ '@typescript-eslint/utils': ^8.0.0
+ eslint: ^9.0.0 || ^10.0.0
typescript: '*'
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-crD6Hfxs7x5bN9FCqTZI7uVSiGvprfCS3MCPOpyIQl87bRr/9aNhnicJ3ROUHv+2A713BgPHIgiCII/bxzrfPw==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-gsJQx6c+WIWC5d+NAqn4rRdUzwhinUCTNmCM9x4wygV9DrbAfVG+6OFPEbaDMryNvf0HYDcnGclbIbXjukGCaw==}
peerDependencies:
- '@angular/cli': '>= 21.0.0 < 22.0.0'
+ '@angular/cli': '>= 22.0.0 < 23.0.0'
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-BaUSLSyS+43fzDoJkTMkGqNdCXq3fGnUZsfXTmrlZPJf5AYFbgAlAPGZXDJyoNWw43fux+DafdlrlKcYUSgSIw==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-jU5MKQ24bBB4J99gSSexmUrLm2LvTJZCuCHhNTQ1LavWX4e1lrIxhm+6pJILOm6Cixf8jyNXnHMty6nljX8J+Q==}
peerDependencies:
- eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
+ eslint: ^9.0.0 || ^10.0.0
typescript: '*'
- '@angular-eslint/[email protected]':
- resolution: {integrity: sha512-7pi+Ga7QmdH5Ig/diau6fR5L4yubgKr9TOjdCg7OeuE/zo0O3osTCNT6JOodzS/iQM1kSCJFDoIBKFeUOttiNw==}
+ '@angular-eslint/[email protected]':
+ resolution: {integrity: sha512-VFodMojghnPYm+B3U+HRYrqebPMj8NyobNjVzDdY8V5XIBW+4ivOSEINIz81G48rmm/NZKwj56+bJ88bVX4KIw==}
peerDependencies:
- '@typescript-eslint/utils': ^7.11.0 || ^8.0.0
- eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
+ '@typescript-eslint/utils': ^8.0.0
+ eslint: ^9.0.0 || ^10.0.0
typescript: '*'
- '@angular/[email protected]':
- resolution: {integrity: sha512-5hl7OTZeQcdkr/3LXSijLuUCwlcqGyYJYOb8GbFqSifSR03JFI3tLQtyQ0LX2CXv3MOx1qFUQbYVfcjW5M36QQ==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- peerDependencies:
- '@angular/compiler': ^21.0.0
- '@angular/compiler-cli': ^21.0.0
- '@angular/core': ^21.0.0
- '@angular/localize': ^21.0.0
- '@angular/platform-browser': ^21.0.0
- '@angular/platform-server': ^21.0.0
- '@angular/service-worker': ^21.0.0
- '@angular/ssr': ^21.1.2
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-uVXf1cSKTMDvpiP5x0X8h7D7dICHC2XsbmvRYtxdyTRy+zJduqtCdZTwnwmCrwIc5hOF+bmwa5p17P6XirYVfw==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ peerDependencies:
+ '@angular/compiler': ^22.0.0
+ '@angular/compiler-cli': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@angular/localize': ^22.0.0
+ '@angular/platform-browser': ^22.0.0
+ '@angular/platform-server': ^22.0.0
+ '@angular/service-worker': ^22.0.0
+ '@angular/ssr': ^22.0.5
+ istanbul-lib-instrument: ^6.0.0
karma: ^6.4.0
less: ^4.2.0
- ng-packagr: ^21.0.0
+ ng-packagr: ^22.0.0
postcss: ^8.4.0
tailwindcss: ^2.0.0 || ^3.0.0 || ^4.0.0
tslib: ^2.3.0
- typescript: '>=5.9 <6.0'
+ typescript: '>=6.0 <6.1'
vitest: ^4.0.8
peerDependenciesMeta:
'@angular/core':
@@ -461,51 +422,7 @@ packages:
optional: true
'@angular/ssr':
optional: true
- karma:
- optional: true
- less:
- optional: true
- ng-packagr:
- optional: true
- postcss:
- optional: true
- tailwindcss:
- optional: true
- vitest:
- optional: true
-
- '@angular/[email protected]':
- resolution: {integrity: sha512-zYfo21RuldDWXnshuPfWYtmh5ltlO9+XFHpNObdIInQTFxKD6grLNVNOblFFpi+oIIm4Km+CGSXvBHs/aH0ufA==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
- peerDependencies:
- '@angular/compiler': ^21.0.0
- '@angular/compiler-cli': ^21.0.0
- '@angular/core': ^21.0.0
- '@angular/localize': ^21.0.0
- '@angular/platform-browser': ^21.0.0
- '@angular/platform-server': ^21.0.0
- '@angular/service-worker': ^21.0.0
- '@angular/ssr': ^21.2.12
- karma: ^6.4.0
- less: ^4.2.0
- ng-packagr: ^21.0.0
- postcss: ^8.4.0
- tailwindcss: ^2.0.0 || ^3.0.0 || ^4.0.0
- tslib: ^2.3.0
- typescript: '>=5.9 <6.0'
- vitest: ^4.0.8
- peerDependenciesMeta:
- '@angular/core':
- optional: true
- '@angular/localize':
- optional: true
- '@angular/platform-browser':
- optional: true
- '@angular/platform-server':
- optional: true
- '@angular/service-worker':
- optional: true
- '@angular/ssr':
+ istanbul-lib-instrument:
optional: true
karma:
optional: true
@@ -520,46 +437,46 @@ packages:
vitest:
optional: true
- '@angular/[email protected]':
- resolution: {integrity: sha512-wB4FLlAdYzQp5htHVKn+fXlNxkFSNw89jPfsJKc15UiadCay6GdzYASLyLqtbk6D4Jz1pBHUpI2ib3mjkCcwxg==}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-dNPQHkxIM8Hkn028eJxBjBDXFBYJtYjGZCZTG6xGb6OugIuDvPM4hGVqOdXkGnvabfuLNgxbtiSL8l3xXPjUqQ==}
peerDependencies:
- '@angular/common': ^21.0.0 || ^22.0.0
- '@angular/core': ^21.0.0 || ^22.0.0
- '@angular/platform-browser': ^21.0.0 || ^22.0.0
+ '@angular/common': ^22.0.0 || ^23.0.0
+ '@angular/core': ^22.0.0 || ^23.0.0
+ '@angular/platform-browser': ^22.0.0 || ^23.0.0
rxjs: ^6.5.3 || ^7.4.0
- '@angular/[email protected]':
- resolution: {integrity: sha512-oLEL1C1fI39b1eQo5f2cyQhQfE+QMv7dm8z2MmxbP7YR7jAdQPVfGU8CXECR5g7mrYi9WgvIRKB+9Oeq2aH6Jw==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-BYg2dWsbqdbpv3UVLNtDns1DoUbsROR8htPPIJEETj4Nfu7VF+g0nnM1CX2Ia+3002xtASgHp4YnRGQN/vAhWA==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
hasBin: true
- '@angular/[email protected]':
- resolution: {integrity: sha512-hqAQxRfi5ldFE42suAXRcY+JCANrUh7fuSQ/DtZ7L896id5BT/exuv6dWNBC1PyAfQmRbpD5Pt6/pd+tNLyhDQ==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-8HUuQms6bVjjRBF9FScYzepjhesrsPAjJh8UcHaw9YdGwMSn2eUiLZj9V1PnPV9BVu0beBcnAhX50ceeldbcTg==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
peerDependencies:
- '@angular/core': 21.2.17
+ '@angular/core': 22.0.5
rxjs: ^6.5.3 || ^7.4.0
- '@angular/[email protected]':
- resolution: {integrity: sha512-h+WQfPKFxaDfDhMqUUdOQ1TsDMccav8kLFERmKTRfD4MNOczSMpOMyeXJHCL0Rq4I8WDQvaBJGMG7DXRDefSog==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-DR9kahfd5P/xrXbX8HJu8jBkkUZNqCZuMCod4lyo4a9MTOSKs2ltNU9VEDT7Qw++hDYowr37/lLfIzrvDEFPEQ==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
hasBin: true
peerDependencies:
- '@angular/compiler': 21.2.14
- typescript: '>=5.9 <6.1'
+ '@angular/compiler': 22.0.5
+ typescript: '>=6.0 <6.1'
peerDependenciesMeta:
typescript:
optional: true
- '@angular/[email protected]':
- resolution: {integrity: sha512-p+NdjYiwAz9Zmu2yul0LlMXaFjMISVVa24+/MVMoKFeQeI82QE8jDywPlnOSHQHvdCcQVpS7saeEriZzX3JuBQ==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-yGhbEBh2WU1kCubjBD+Eo5bwvZPR+zacDhyPao/PgopH0PiVETd4Iv1gK0ZAvg7XdImgzZfipJXKqTK4JbOFiQ==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
- '@angular/[email protected]':
- resolution: {integrity: sha512-wYHpwIdnUnjQFOJJNqRcGx7LS3u64jT+R9L0TnMR/ViBM9dQgGYImlSikkftg2yrFCNo5aKRxhG2LLskQurVdg==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-8cc6CLC1u7kNHpUZA15tak0WPHAZTF16DPslXxDdWbw/WIlDGPsNdTW8Nsaeb/G45mLvBcMwcZpOC70R6iRzmA==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
peerDependencies:
- '@angular/compiler': 21.2.17
+ '@angular/compiler': 22.0.5
rxjs: ^6.5.3 || ^7.4.0
zone.js: ~0.15.0 || ~0.16.0
peerDependenciesMeta:
@@ -568,51 +485,51 @@ packages:
zone.js:
optional: true
- '@angular/[email protected]':
- resolution: {integrity: sha512-HQYIybyMt0CrI31rW6vXbiDsSM2DDtTcOVeT/nWDRNCoqBrREDg8rVsm2Y+fUMsiQVJNa6dCXPwvYhjzJ4r7ug==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-kdmLo956pUMG6ZS0v9crAu16pEzBrz6i7rdfCsgI6A3lcfOWNTZLysMGHHiGGqfdP6LJR88ziHIEKrgtkCkK1A==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
peerDependencies:
- '@angular/common': 21.2.14
- '@angular/core': 21.2.14
- '@angular/platform-browser': 21.2.14
+ '@angular/common': 22.0.5
+ '@angular/core': 22.0.5
+ '@angular/platform-browser': 22.0.5
rxjs: ^6.5.3 || ^7.4.0
- '@angular/[email protected]':
- resolution: {integrity: sha512-cVqQag+O8mIuH5Dz8Lw4uElWtFogr+xgUFbakI3QQAbnLaqeQaDqHvXE8VGkTmhGvEMnE0cvPn+rOQ/N5exzbw==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-jpJqSCdAt1TPg8Zea+tkmqdfZF+qJhlGlQylYCrT56NLBUf0qqAl32KjxlBjZvFrUm7AqNkHN7L+E/YMcXmwzw==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
hasBin: true
peerDependencies:
- '@angular/compiler': 21.2.14
- '@angular/compiler-cli': 21.2.14
+ '@angular/compiler': 22.0.5
+ '@angular/compiler-cli': 22.0.5
- '@angular/[email protected]':
- resolution: {integrity: sha512-m5U4zX8JFnxTAIGpsBXIAyefSmYqdORY/OfHC0aMmZovuFCbXXIYqYRQDBB7+YVNpSDSHllCrKEZFu/CC6dq3g==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-KEhGMknnX30assVhIfp04cxKrkdV5ngtWjRs4suNs0ev9vBmcj+KXtfEGGnW+2i4TjnaB4veGUxnq/snoG+AtA==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
deprecated: '@angular/platform-browser-dynamic is deprecated. Use `@angular/platform-browser` instead.'
peerDependencies:
- '@angular/common': 21.2.14
- '@angular/compiler': 21.2.14
- '@angular/core': 21.2.14
- '@angular/platform-browser': 21.2.14
+ '@angular/common': 22.0.5
+ '@angular/compiler': 22.0.5
+ '@angular/core': 22.0.5
+ '@angular/platform-browser': 22.0.5
- '@angular/[email protected]':
- resolution: {integrity: sha512-34tBwxh86yN2YifBDhCesm6N+nn9WcbuXjRwfo0mTme15OZ/zt56yw7v1mcK3UFLegIIALtsIgpXXrPWWQoKkA==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-Jm0YQ0NsJl3vhzziO+BEmtW5AYIyI+jVGNJHs4nFKLqSPG7DWkBfx4EykHBN5pAR4NLwwaJyFgbgNE/epZJDZQ==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
peerDependencies:
- '@angular/animations': 21.2.14
- '@angular/common': 21.2.14
- '@angular/core': 21.2.14
+ '@angular/animations': 22.0.5
+ '@angular/common': 22.0.5
+ '@angular/core': 22.0.5
peerDependenciesMeta:
'@angular/animations':
optional: true
- '@angular/[email protected]':
- resolution: {integrity: sha512-Yo3LdgcqkfMu2/Ycl8o/4QjCBqZhtA+a7B8JVdW5cWdrpFTxKCOrzm+YRUMuIFmH5nzSv9oGnUuz64uk1+7r5Q==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ '@angular/[email protected]':
+ resolution: {integrity: sha512-1S5PCHicRQkQX4z/zjBu9VHMSoT9kOkWI0kuXuswiZtcFhK7kZbVvzrP/dBjc2YUg3AlsxS8iZY6fKFzj3/nBA==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0}
peerDependencies:
- '@angular/common': 21.2.14
- '@angular/core': 21.2.14
- '@angular/platform-browser': 21.2.14
+ '@angular/common': 22.0.5
+ '@angular/core': 22.0.5
+ '@angular/platform-browser': 22.0.5
rxjs: ^6.5.3 || ^7.4.0
'@asamuzakjp/[email protected]':
@@ -622,18 +539,10 @@ packages:
resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==}
engines: {node: '>=6.9.0'}
@@ -642,8 +551,8 @@ packages:
resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==}
engines: {node: '>=6.9.0'}
@@ -670,8 +579,8 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0
- '@babel/[email protected]':
- resolution: {integrity: sha512-mOAsxeeKkUKayvZR3HeTYD/fICpCPLJrU5ZjelT/PA6WHtNDBOE436YiaEUvHN454bRM3CebhDsIpieCc4texA==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
@@ -683,10 +592,6 @@ packages:
resolution: {integrity: sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==}
engines: {node: '>=6.9.0'}
@@ -701,10 +606,6 @@ packages:
resolution: {integrity: sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==}
engines: {node: '>=6.9.0'}
@@ -721,8 +622,8 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0
- '@babel/[email protected]':
- resolution: {integrity: sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==}
engines: {node: '>=6.9.0'}
@@ -737,10 +638,6 @@ packages:
resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==}
engines: {node: '>=6.9.0'}
@@ -776,6 +673,12 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-oBNVCvnO5tND+xSopWvV8WNGfpTfgP4Zr/YXXSj8zfmcPktp5Ku/aZlsIowgSD4fjmgHn6sGmB9APVsU5zOdhA==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0
+
resolution: {integrity: sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==}
engines: {node: '>=6.9.0'}
@@ -821,12 +724,6 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0
- '@babel/[email protected]':
- resolution: {integrity: sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
-
resolution: {integrity: sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==}
engines: {node: '>=6.9.0'}
@@ -909,14 +806,14 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0
- '@babel/[email protected]':
- resolution: {integrity: sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-va0VdWro4zlBr2JsXC+ofCPB2iG12wPtVGTWFx2WLDOM3nYQZZIGP82qku2eW/JR83sD+k2k+CsNtyEbUqhU6w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
- '@babel/[email protected]':
- resolution: {integrity: sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-ilTRcmbuXjsMmcZ3HASTe4caH5Tpo93PkTxF9oG2VZsSWsahydmcEHhix9Ik122RcTnZnUzPbmux4wh1swfv7g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
@@ -1155,8 +1052,8 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0
- '@babel/[email protected]':
- resolution: {integrity: sha512-20NUVgOrinudkIBzQ2bNxP08YpKprUkRTiRSd2/Z5GOdPImJGkoN4Z7IQe1T5AdyKI1i5L6RBmluqdSzvaq9/w==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-jlaRT5dJtMaMCV6fAuLbsQMSwz/QkvaHOHOSXRitGGwSpR1blCY4KUKoyP2tYO8vJcqYe8cEj96cqSztv3uF9w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
@@ -1215,8 +1112,8 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0
- '@babel/[email protected]':
- resolution: {integrity: sha512-S36mOoi1Sb6Fz98fBfE+UZSpYw5mJm0NUHtIKrOuNcqeFauy1J6dIvXm2KRVKobOSaGq4t/hBXdN4HGU3wL9Wg==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-ySZypNLAIH1ClygLDQzVMoGQRViATnkHkYYV6TcNDz+8+jwZCdsguGvsb3EY5d9wyWyhmF1iSuFM0Yh5XPnqSA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
@@ -1226,8 +1123,8 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0
- '@babel/[email protected]':
- resolution: {integrity: sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==}
engines: {node: '>=6.9.0'}
@@ -1291,8 +1188,8 @@ packages:
resolution: {integrity: sha512-kzyuwOAQnXJNLS9PSyrk0CWk35nWJW/zl/6KvnTBMFK65gm7U1/Z5BqjxeapjZCIhQcM/DsrEmcbRwDyXyXK4A==}
engines: {node: '>=14'}
- '@discoveryjs/[email protected]':
- resolution: {integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==}
+ '@discoveryjs/[email protected]':
+ resolution: {integrity: sha512-Xc3VhU02wqZ1HvHRJUwL09HkZSTvidqY5Ya0NXBSYOxAp+Ln9dcJr9fySI+CkONzP3PekQo9WdzCv0PGER/mOA==}
engines: {node: '>=14.17.0'}
'@emnapi/[email protected]':
@@ -1304,12 +1201,6 @@ packages:
'@emnapi/[email protected]':
resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==}
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==}
- engines: {node: '>=18'}
- cpu: [ppc64]
- os: [aix]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==}
engines: {node: '>=18'}
@@ -1322,12 +1213,6 @@ packages:
cpu: [ppc64]
os: [aix]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==}
engines: {node: '>=18'}
@@ -1340,12 +1225,6 @@ packages:
cpu: [arm64]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==}
- engines: {node: '>=18'}
- cpu: [arm]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==}
engines: {node: '>=18'}
@@ -1358,12 +1237,6 @@ packages:
cpu: [arm]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==}
engines: {node: '>=18'}
@@ -1376,12 +1249,6 @@ packages:
cpu: [x64]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [darwin]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==}
engines: {node: '>=18'}
@@ -1394,12 +1261,6 @@ packages:
cpu: [arm64]
os: [darwin]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [darwin]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==}
engines: {node: '>=18'}
@@ -1412,12 +1273,6 @@ packages:
cpu: [x64]
os: [darwin]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [freebsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==}
engines: {node: '>=18'}
@@ -1430,12 +1285,6 @@ packages:
cpu: [arm64]
os: [freebsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [freebsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==}
engines: {node: '>=18'}
@@ -1448,12 +1297,6 @@ packages:
cpu: [x64]
os: [freebsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==}
engines: {node: '>=18'}
@@ -1466,12 +1309,6 @@ packages:
cpu: [arm64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==}
- engines: {node: '>=18'}
- cpu: [arm]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==}
engines: {node: '>=18'}
@@ -1484,12 +1321,6 @@ packages:
cpu: [arm]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==}
- engines: {node: '>=18'}
- cpu: [ia32]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==}
engines: {node: '>=18'}
@@ -1502,12 +1333,6 @@ packages:
cpu: [ia32]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==}
- engines: {node: '>=18'}
- cpu: [loong64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==}
engines: {node: '>=18'}
@@ -1520,12 +1345,6 @@ packages:
cpu: [loong64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==}
- engines: {node: '>=18'}
- cpu: [mips64el]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==}
engines: {node: '>=18'}
@@ -1538,12 +1357,6 @@ packages:
cpu: [mips64el]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==}
- engines: {node: '>=18'}
- cpu: [ppc64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==}
engines: {node: '>=18'}
@@ -1556,12 +1369,6 @@ packages:
cpu: [ppc64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==}
- engines: {node: '>=18'}
- cpu: [riscv64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==}
engines: {node: '>=18'}
@@ -1574,12 +1381,6 @@ packages:
cpu: [riscv64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==}
- engines: {node: '>=18'}
- cpu: [s390x]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==}
engines: {node: '>=18'}
@@ -1592,12 +1393,6 @@ packages:
cpu: [s390x]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==}
engines: {node: '>=18'}
@@ -1610,12 +1405,6 @@ packages:
cpu: [x64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [netbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==}
engines: {node: '>=18'}
@@ -1628,12 +1417,6 @@ packages:
cpu: [arm64]
os: [netbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [netbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==}
engines: {node: '>=18'}
@@ -1646,12 +1429,6 @@ packages:
cpu: [x64]
os: [netbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [openbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==}
engines: {node: '>=18'}
@@ -1664,12 +1441,6 @@ packages:
cpu: [arm64]
os: [openbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [openbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==}
engines: {node: '>=18'}
@@ -1682,12 +1453,6 @@ packages:
cpu: [x64]
os: [openbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [openharmony]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==}
engines: {node: '>=18'}
@@ -1700,12 +1465,6 @@ packages:
cpu: [arm64]
os: [openharmony]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [sunos]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==}
engines: {node: '>=18'}
@@ -1718,12 +1477,6 @@ packages:
cpu: [x64]
os: [sunos]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==}
engines: {node: '>=18'}
@@ -1736,12 +1489,6 @@ packages:
cpu: [arm64]
os: [win32]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==}
- engines: {node: '>=18'}
- cpu: [ia32]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==}
engines: {node: '>=18'}
@@ -1754,12 +1501,6 @@ packages:
cpu: [ia32]
os: [win32]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==}
engines: {node: '>=18'}
@@ -1835,134 +1576,143 @@ packages:
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
engines: {node: '>=18.18'}
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-b6xmA/VlTe0ZgDQHDui+Nav470u7u49nRd8/iuhOcQPO9Ch7lGuogydhi2VOmNlZ+zXcM8IcPuNSwQcdJaF/kw==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-h9FgGun3QwVYNj5TWIZZ+slii73bMoBFjPfVIGtnFuL4t8gBiNDV9PcSfIzkuxvgquJKt9nr1QzszpBzTbH8Og==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-eb8DBZcz/2qHWQda4rk2JiQk5h9QV/cVHi1yjt0f69WFZMRFn0sJTye3EAP8icut8UDMjQPsaH5KbcOogefrFQ==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-Qd6GJT1yVyrZZCfN8W2qKF5ApmqryXRhRKCuip8h01x2w/esJQ2XIYc6f9abMIHgKQdBfFTSOdbHRLAhuM09UA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-ZRVd/oD+sYsUd5zVm0NflqEzlqfYCyHNsqkHl2oWXEUHs12tCbcSFi+wVFEvD8+LGRaMUsVrE7qeo6lSG/S1Vg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-YmQpenjbFSHAK3sOd44puHh3V1KXXr+JiNpUztoSQ4drLh2rTVzTap/YtlAVu/5xavifIlBfNEzJ/neZJ1a/1g==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-6thf5I8q7lZwzGLAxPaaGEREEkZ3nyePPDQ1oyobblxmEE8mqTLguScP7pDjUTAibiyb4hfXl+qjUEJ+di/aNA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-9K/DDBSQpOyZSkt6sOVP9Vo0TR7atX2kuILsUu0x3wVcVbe97lJwIJKMLdMw25tDYuXl/qp6erT0Xs1rfmcfZg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-XF4IXAbPnGPgw0wsbC/i2tPcyfdZgDpUlhsqU0SfT4IRIGWha6Xm9VRgN5yYxJq+jnyXlfXI/nQ3ulfk0iEICA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-3XBfF7DAsp5qeDsvN5Rd1HmbNokVvEQoUM0QLrRcybC9nX96w3Pbmu7qUsb3IT3J3jBvs2+mTXaKHOUsgHMLzg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-XJmn/wY4AX56l1BRU+ZjDrFtg9+2uBEi4JvJQj82kwJDQKiPgSn4CEsbfGGygS4Gw6rkL4W18oATjfVfaqub2Q==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-QqdTqQddL3qPX/PPrjobpsO25NZ4dWXgTLenrR445L2ptLEYE6Z+PD5c5CNDJNx4ugRgELAIpSIJxZaO2jJ2Og==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-xJj8QWKRSrfKoBIITLZK61dD3zwo0Rz11fgDImku30/Oe81zMdIdGgrLY2h6RkJ+KZ/GhNYIRMKnH/62qBTA5g==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-FlDndEUww8m7BfukO2nJa25vhD+H5jxxCv4oGioKqzyWz3nPHhhw4LKdYRSlXuAx7DsdWia7iyaBPKKS95Evfw==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
- '@inquirer/[email protected]':
- resolution: {integrity: sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==}
- engines: {node: '>=18'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-t28inv14nMQ1PhKpsJPY+kEs/c00qzeCOS2gTNRyTjG5d6qsVA2fItxW4hkvGZ5lvanGLdtCzVIx5dwdRpN1+g==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
@@ -2250,85 +2000,50 @@ packages:
'@leichtgewicht/[email protected]':
resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==}
- '@listr2/[email protected]':
- resolution: {integrity: sha512-WELs+hj6xcilkloBXYf9XXK8tYEnKsgLj01Xl5ONUJpKjmT5hGVUzNUS5tooUxs7pGMrw+jFD/41WpqW4V3LDA==}
- engines: {node: '>=20.0.0'}
+ '@listr2/[email protected]':
+ resolution: {integrity: sha512-Co9U3AJ3LW0J8XBHjVoNKA79dMAyFt8EZH3OaKTMcDTj8r+6kG3vSUPq/eGLHT7P0iK3uLaFfhdFYd3033P24g==}
+ engines: {node: '>=22.13.0'}
peerDependencies:
- '@inquirer/prompts': '>= 3 < 8'
- listr2: 9.0.5
-
- resolution: {integrity: sha512-XaKL705gDWd6XVls3ATDj13ZdML/LqSIxwgnYpG8xTzH2ifArx8fMMDdvqGE/Emd+W6R90W2fveZcJ0AyS8Y0w==}
- cpu: [arm64]
- os: [darwin]
+ '@inquirer/prompts': '>= 3 < 9'
+ listr2: 10.2.1
- resolution: {integrity: sha512-tpfN4kKrrMpQ+If1l8bhmoNkECJi0iOu6AEdrTJvWVC+32sLxTARX5Rsu579mPImRP9YFWfWgeRQ5oav7zApQQ==}
+ resolution: {integrity: sha512-Kk4Kz3iyu1QiLsLZBS9Af1eSKUC8VR2T+/jyE2iAyuGw2VwK08pp5iTbZnXn6sWu0LogO/RFktMxOjiDA2sS3w==}
cpu: [arm64]
os: [darwin]
- resolution: {integrity: sha512-GPHGEVcwJlkD01GmIr7B4kvbIcUDS2+kBadVEd7lU4can1RZaZQLDDBJRrrNfS2Kavvl0VLI/cMv7UASAXGrww==}
+ resolution: {integrity: sha512-BEe5Rp3trn26oxoXOVL5HVDoiYmjUDwr8NRPkBOdUdCSBEorKI+7JrZLRKAdxO+G6cGQLgseXk0gR7qIQa7aGw==}
cpu: [x64]
os: [darwin]
- resolution: {integrity: sha512-+a2tTfc3rmWhLAolFUWRgJtpSuu+Fw/yjn4rF406NMxhfjbMuiOUTDRvRlMFV+DzyjkwnokisskHbCWkS3Ly5w==}
- cpu: [x64]
- os: [darwin]
-
- resolution: {integrity: sha512-mALqr7DE42HsiwVTKpQWxacjHoJk+e9p00RWIJqTACh/hpucxp/0lK/XMh5XzWnU/TDCZLukq1+vNqnNumTP/Q==}
- cpu: [arm64]
- os: [linux]
-
- resolution: {integrity: sha512-aoERa5B6ywXdyFeYGQ1gbQpkMkDbEo45qVoXE5QpIRavqjnyPwjOulMkmkypkmsbJ5z4Wi0TBztON8agCTG0Vg==}
+ resolution: {integrity: sha512-cUXEengO8o60v1SWerJTH4/RH4U3+9jC0/4njp2Z9NdmvaGzhKsbRM2wpXuRYrN8tytsoJCg0SvWEWwHAwLbCA==}
cpu: [arm64]
os: [linux]
- resolution: {integrity: sha512-cmev5/dZr5ACKri9f6GU6lZCXTjMhV72xujlbOhFCgFXrt4W0TxGsmY8kA1BITvH60JBKE50cSxsiulybAbrrw==}
- cpu: [arm]
- os: [linux]
-
- resolution: {integrity: sha512-0EgcE6reYr8InjD7V37EgXcYrloqpxVPINy3ig1MwDSbl6LF/vXTYRH9OE1Ti1D8YZnB35ZH9aTcdfSb5lql2A==}
+ resolution: {integrity: sha512-SGbFR7816uBcTHc2ZY4S6WyOkl9bICnzqTQd2Mv4V/j24cfds88xx2nC6cm/y8zGQL7Ds31YF/5NGxjgcdM5Hw==}
cpu: [arm]
os: [linux]
- resolution: {integrity: sha512-QjLs8OcmCNcraAcLoZyFlo0atzBJniQLLwhtR+ymQqS5kLYpV5RqwriL87BW+ZiR9ZiGgZx3evrz5vnWPtJ1fQ==}
- cpu: [x64]
- os: [linux]
-
- resolution: {integrity: sha512-SqNDY1+vpji7bh0sFH5wlWyFTOzjbDOl0/kB5RLLYDAFyd/uw3n7wyrmas3rYPpAW7z18lMOi1yKlTPv967E3g==}
+ resolution: {integrity: sha512-Gxq8jpgOWXwd0PUR+c9R2Ik1/uBnGd5GMIIzRRDqABCkvmjtC3KWcyhesV9jSPCz759isl0NlbsstZ2oyvk8lA==}
cpu: [x64]
os: [linux]
- resolution: {integrity: sha512-tr/pwHDlZ33forLGAr0tI04cRmP4SgF93yHbb+2zvZiDEyln5yMHhbKDySxY66aUOkhvBvTuHq9q/3YmTj6ZHQ==}
+ resolution: {integrity: sha512-pKv1DJ1bPZAaHkdFsSz5IDfUG8x9vntgquXF9/Dm2xuupcIe/EkLzylpoBxppFVK5vzbV561Dq26jNY2fIMA7g==}
cpu: [arm64]
os: [win32]
- resolution: {integrity: sha512-50v0O1Lt37cwrmR9vWZK5hRW0Aw+KEmxJJ75fge/zIYdvNKB/0bSMSVR5Uc2OV9JhosIUyklOmrEvavwNJ8D6w==}
- cpu: [arm64]
- os: [win32]
-
- resolution: {integrity: sha512-KRzfocJzB/mgoTCqnMawuLSKheHRVTqWfSmouIgYpFs6Hx4zvZSvsZKSCEb5gHmICy7qsx9l06jk3MFTtiFVAQ==}
- cpu: [x64]
- os: [win32]
-
- resolution: {integrity: sha512-qwosvPyl+zpUlp3gRb7UcJ3H8S28XHCzkv0Y0EgQToXjQP91ZD67EHSCDmaLjtKhe+GVIW5om1KUpzVLA0l6pg==}
+ resolution: {integrity: sha512-JF1BmLCm9kGEVZgYmJq43zeQVdHVgAJnTi/NURWEsy6L1ZrrlSmdltS+D17QN4LODwf+1LMXAA9auIZVXtWwzw==}
cpu: [x64]
os: [win32]
- '@modelcontextprotocol/[email protected]':
- resolution: {integrity: sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg==}
+ '@modelcontextprotocol/[email protected]':
+ resolution: {integrity: sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==}
engines: {node: '>=18'}
peerDependencies:
'@cfworker/json-schema': ^4.1.1
@@ -2549,23 +2264,23 @@ packages:
'@emnapi/core': ^1.7.1
'@emnapi/runtime': ^1.7.1
- '@ng-bootstrap/[email protected]':
- resolution: {integrity: sha512-Jt+GUQ0PdM8VsOUUVr7vTQXhwcGwe2DCe1mmfS21vz9pLSOtGRz41ohZKc1egUevj5Rxm2sHVq5Sve68/nTMfA==}
+ '@ng-bootstrap/[email protected]':
+ resolution: {integrity: sha512-H7lGYGQGERoX5PeU1nf99U8tvPBJwQod6G99NoaJYwhBtKDoA/W0auUJqcbPMOGnO3gHtjtnOCji49tRbUIbPw==}
peerDependencies:
- '@angular/common': ^21.0.0
- '@angular/core': ^21.0.0
- '@angular/forms': ^21.0.0
- '@angular/localize': ^21.0.0
+ '@angular/common': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@angular/forms': ^22.0.0
+ '@angular/localize': ^22.0.0
'@popperjs/core': ^2.11.8
rxjs: ^6.5.3 || ^7.4.0
- '@ng-select/[email protected]':
- resolution: {integrity: sha512-Gk5xlVKLOG3WTIgOteduwlKBZTt0njkoUXheKgUSKn+h+poYQAf61uENCK08Tj0XWxes9BQUc5J+R2GC+86jgA==}
- engines: {node: ^20.19.0 || ^22.12.0 || ^24.0.0}
+ '@ng-select/[email protected]':
+ resolution: {integrity: sha512-AM1/60UnZmowGvehrr4f8Ff0PJlK5doQh1LH6rTche+DhquaSkG2WBEWFfyK0ujIXNdjeWx+9yf2RcFSZWZ+Wg==}
+ engines: {node: ^22.12.0 || ^24.0.0 || ^26.0.0}
peerDependencies:
- '@angular/common': ^21.0.0
- '@angular/core': ^21.0.0
- '@angular/forms': ^21.0.0
+ '@angular/common': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@angular/forms': ^22.0.0
'@ngneat/[email protected]':
resolution: {integrity: sha512-YGlKrAaqTRO8lfT1xyN9LkYN0GH0crzdnXAxQFNEuNDQpCHv9cQ0j9XPDsonek6X4K7fLug84n0CQ42rSmGBqw==}
@@ -2576,14 +2291,19 @@ packages:
lodash-es: '>=4.17.0'
rxjs: '>=6.0.0'
- '@ngtools/[email protected]':
- resolution: {integrity: sha512-ZNMMD35urDKqYtx1drxPyGAvUPMOoiKjvrH8owpN+mzIO1nYpssCgmAseo1hePAduSvv8tAsY1NLtJfMSNzubw==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@ngtools/[email protected]':
+ resolution: {integrity: sha512-f0vNCwM4Z4GIl1XORd2z9TyMiq1Vs5lcK9Se4joQiTPd5yEIS1+UPDhJ1Lh38J+nXzdJyieZzQi0GjmS6Iv7Cw==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ deprecated: Angular's Webpack support is deprecated. Use the esbuild and Vite-based "@angular/build" package instead.
peerDependencies:
- '@angular/compiler-cli': ^21.0.0
- typescript: '>=5.9 <6.0'
+ '@angular/compiler-cli': ^22.0.0
+ typescript: '>=6.0 <6.1'
webpack: ^5.54.0
+ '@noble/[email protected]':
+ resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==}
+ engines: {node: '>= 16'}
+
'@npmcli/[email protected]':
resolution: {integrity: sha512-EUEuWAxnL07Sp5/iC/1X6Xj+XThUvnbei9zfRWZdEXa7lss9RTHMhAHBeg+MZ5To9s/gGaSI+UwZTPdYMvKSeg==}
engines: {node: ^20.17.0 || >=22.9.0}
@@ -2663,12 +2383,6 @@ packages:
'@octokit/[email protected]':
resolution: {integrity: sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==}
- '@oxc-project/[email protected]':
- resolution: {integrity: sha512-QdsH3rZq480VnOHSHgPYOhjL8O8LBdcnSjM408BpPCCUc0JYYZPG9Gafl9i3OcGk/7137o+gweb4cCv3WAUykg==}
-
- '@oxc-project/[email protected]':
- resolution: {integrity: sha512-Tp3XmgxwNQ9pEN9vxgJBAqdRamHibi76iowQ38O2I4PMpcvNRQNVsU2n1x1nv9yh0XoTrGFzf7cZSGxmixxrhA==}
-
'@parcel/[email protected]':
resolution: {integrity: sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==}
engines: {node: '>= 10.0.0'}
@@ -2751,6 +2465,43 @@ packages:
resolution: {integrity: sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==}
engines: {node: '>= 10.0.0'}
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-NgekZOrSJFSBFLFoLfwePguAWAx7z1+f2TEsWFUMyiqqfntZ4+S/S5hzqME3q4pCA0iOsFKdwiQ35dwY24eVqA==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-akbF8+uvleHs8sejNPQxwmVFuInAg6FMNHOwMILXfP518YfFJwdR3jr6oNUPOaEJfuEhn/vkNOCIT6ASUd4mbg==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-ohwlk+u9Rv2NOAY1c6MfHj45ATVF8R1DUN/WCgABiRtLi2ZftlZWZX7KvpAbU8v9xPcmoILfELeEABj/rn18AQ==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-5yof1ytoB++RQtaFbqSUJ8pxDJtZT6vbVqZ8XoJ61ph7UjNVvfFwAilnCodqkNsAodpy13gDhoxZXw00pghnyg==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-qAKXtLpBEw9LqhKpjw3ajZSXlBur+ipW+y2ivVBQAG6F6qRx94yO+1ZR4mvw+YaCfKSaOzLeYEzsPaBp4SJELA==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-b5nDWCnkV60+cQ141D6sVVwK9nz64R5n3zSVnklGd+ECdkW2Ol3U1a6yYFlalpSOaD557yuJB64A+q42jG7lUQ==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-zHEUlCqB2mk7x2lxDwHHJy7hWZOPdGHVlsmITWKB5/PbQo61atbu9PJ/0r9dQNMwFzbKPXZ8uK8/91eUhRznSg==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-7YT0U/ze0tF2QOBbE15gKZwy5tvgGyLRiRHLzhlbOpf7BT032oBSd0haZqXn5W6l26WLlu3dyxzjM+2638/z2Q==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-tHjkfS/qhMnmrlB2J9NhflQlQ7In3khO3CfmVrriOlpTeErY9ZIKOso1hQ5JQiyrJ7ShvqVPk7E5fQmbclkSKA==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-N0CMuhWUzsWEVq6F1q9X6+VKUnWzSW+cSVg+aPaGGwDdbFoFWTYgin5MHwXgpWd6y9COMBxnfy/Qc+Xc7F0Zwg==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-+oL3HPFRIZ1St2K50lWCXiioIgSoxzz7R1J3uF6neO2yl1sgmpgY6XXJH4BdpoDkMWznQTeYF6oWNDZLCdQ4eQ==}
+
+ '@peculiar/[email protected]':
+ resolution: {integrity: sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==}
+ engines: {node: '>=20.0.0'}
+
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
@@ -2767,294 +2518,259 @@ packages:
'@popperjs/[email protected]':
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-mWj5eE4Qc8TbPdGGaaLvBb9XfDPvE1EmZkJQgiGKwchkWH4oAJcRAKMTw7ZHnb1L+t7Ah41sBkAecaIsuUgsug==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==}
+ cpu: [arm]
os: [android]
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-vRq9f4NzvbdZavhQbjkJBx7rRebDKYR9zHfO/Wg486+I7bSecdUapzCm5cyXoK+LHokTxgSq7A5baAXUZkIz0w==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [android]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-wFxUymI/5R8bH8qZFYDfAxAN9CyISEIYke+95oZPiv6EWo88aa5rskjVcCpKA532R+klFmdqjbbaD56GNmTF4Q==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [darwin]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-kFgEvkWLqt3YCgKB5re9RlIrx9bRsvyVUnaTakEpOPuLGzLpLapYxE9BufJNvPg8GjT6mB1alN4yN1NjzoeM8Q==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [darwin]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-ybp3MkPj23VDV9PhtRwdU5qrGhlViWRV5BjKwO6epaSlUD5lW0WyY+roN3ZAzbma/9RrMTgZ/a/gtQq8YXOcqw==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [darwin]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-JXmaOJGsL/+rsmMfutcDjxWM2fTaVgCHGoXS7nE8Z3c9NAYjGqHvXrAhMUZvMpHS/k7Mg+X7n/MVKb7NYWKKww==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [darwin]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-Evxj3yh7FWvyklUYZa0qTVT9N2zX9TPDqGF056hl8hlCZ9/ndQ2xMv6uw9PD1VlLpukbsqL+/C6M0qwipL0QMg==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [freebsd]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-ep3Catd6sPnHTM0P4hNEvIv5arnDvk01PfyJIJ+J3wVCG1eEaPo09tvFqdtcaTrkwQy0VWR24uz+cb4IsK53Qw==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [freebsd]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-tYeXprDOrEgVHUbPXH6MPso4cM/c6RTkmJNICMQlYdki4hGMh92aj3yU6CKs+4X5gfG0yj5kVUw/L4M685SYag==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-LwA5ayKIpnsgXJEwWc3h8wPiS33NMIHd9BhsV92T8VetVAbGe2qXlJwNVDGHN5cOQ22R9uYvbrQir2AB+ntT2w==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-N78vmZzP6zG967Ohr+MasCjmKtis0geZ1SOVmxrA0/bklTQSzH5kHEjW5Qn+i1taFno6GEre1E40v0wuWsNOQw==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-AC1WsGdlV1MtGay/OQ4J9T7GRadVnpYRzTcygV1hKnypbYN20Yh4t6O1Sa2qRBMqv1etulUknqXjc3CTIsBu6A==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-l+p4QVtG72C7wI2SIkNQw/KQtSjuYwS3rV6AKcWrRBF62ClsFUcif5vLaZIEbPrCXu5OFRXigXFJnxYsVVZqdQ==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-lU+6rgXXViO61B4EudxtVMXSOfiZONR29Sys5VGSetUY7X8mg9FCKIIjcPPj8xNDeYzKl+H8F/qSKOBVFJChCQ==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-urzJX0HrXxIh0FfxwWRjfPCMeInU9qsImLQxHBgLp5ivji1EEUnOfux8KxPPnRQthJyneBrN2LeqUix9DYrNaQ==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-DZaN1f0PGp/bSvKhtw50pPsnln4T13ycDq1FrDWRiHmWt1JeW+UtYg9touPFf8yt993p8tS2QjybpzKNTxYEwg==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-7ijfVK3GISnXIwq/1FZo+KyAUJjL3kWPJ7rViAL6MWeEBhEgRzJ0yEd9I8N9aut8Y8ab+EKFJyRNMWZuUBwQ0A==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-RnGxwZLN7fhMMAItnD6dZ7lvy+TI7ba+2V54UF4dhaWa/p8I/ys1E73KO6HmPmgz92ZkfD8TXS1IMV8+uhbR9g==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [linux]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-/m7sKZCS+cUULbzyJTIlv8JbjNohxbpAOA6cM+lgWgqVzPee3U6jpwydrib328JFN/gF9A99IZEnuGYqEDJdww==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [openharmony]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-6lcI79+X8klGiGd8yHuTgQRjuuJYNggmEml+RsyN596P23l/zf9FVmJ7K0KVKkFAeYEdg0iMUKyIxiV5vebDNQ==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [openharmony]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-6SZk7zMgv+y3wFFQ9qE5P9NnRHcRsptL1ypmudD26PDY+PvFCvfHRkJNfclWnvacVGxjowr7JOL3a9fd1wWhUw==}
- engines: {node: '>=14.0.0'}
- cpu: [wasm32]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-wz7ohsKCAIWy91blZ/1FlpPdqrsm1xpcEOQVveWoL6+aSPKL4VUcoYmmzuLTssyZxRpEwzuIxL/GDsvpjaBtOw==}
- engines: {node: '>=14.0.0'}
- cpu: [wasm32]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-sFqfYPnBZ6xBhMkadB7UD0yjEDRvs7ipR3nCggblN+N4ODCXY6qhg/bKL39+W+dgQybL7ErD4EGERVbW9DAWvg==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [win32]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-cfiMrfuWCIgsFmcVG0IPuO6qTRHvF7NuG3wngX1RZzc6dU8FuBFb+J3MIR5WrdTNozlumfgL4cvz+R4ozBCvsQ==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [arm64]
- os: [win32]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-AnFWJdAqB8+IDPcGrATYs67Kik/6tnndNJV2jGRmwlbeNiQQ8GhRJU8ETRlINfII0pqi9k4WWLnb00p1QCxw/Q==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [win32]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-p6UeR9y7ht82AH57qwGuFYn69S6CZ7LLKdCKy/8T3zS9VTrJei2/CGsTUV45Da4Z9Rbhc7G4gyWQ/Ioamqn09g==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [x64]
- os: [win32]
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-qWhDs6yFGR5xDfdrwiSa3CWGIHxD597uGE/A9xGqytBjANvh4rLCTTkq7szhMV4+Ygh+PMS90KVJ8xWG/TkX4w==}
-
- '@rolldown/[email protected]':
- resolution: {integrity: sha512-1BrrmTu0TWfOP1riA8uakjFc9bpIUGzVKETsOtzY39pPga8zELGDl8eu1Dx7/gjM5CAz14UknsUMpBO8L+YntQ==}
-
'@rollup/[email protected]':
resolution: {integrity: sha512-dnxczajOqt0gesZlN5pGQ1s1imQVrsmCw5G2Ci4oM+0WvNz3pyRnlWrT7McoZIb8VlFwCawdmbWRmxRn7HI+VQ==}
cpu: [arm]
os: [android]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==}
+ cpu: [arm64]
+ os: [android]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-Bp3JpGP00Vu3f238ivRrjf7z3xSzVPXqCmaJYA9t2c+c8vKYvOzmXF7LkkeUalTEGd6cZcSWe+PFIP3Vy48fRg==}
cpu: [arm64]
os: [android]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==}
+ cpu: [arm64]
+ os: [darwin]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-zaYIpr670mUmmZ1tVzUFplbQbG7h3Gugx3L5FoqhsC2m/YnLlR1a7zVLmXNPy+iY1tFPEbNG+HHBXZGyId0G5w==}
cpu: [arm64]
os: [darwin]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==}
+ cpu: [x64]
+ os: [darwin]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-+P49fvkv2dSoeevUW+lgZ/I2JHSsJCK1Lyjj7Cu6E4UHG4tS9XIefzIjo5qhgELjAclnen1rLzK2PMKJdo+Dyg==}
cpu: [x64]
os: [darwin]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==}
+ cpu: [arm64]
+ os: [freebsd]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-l3FAAOyKJXH2ea6KNFN+MMgC/rnE94YGLXs2ehYqDcCoHt1DpvgWX75BhUJxN38XojP7Ul+4H8PRn7EdyqSDrw==}
cpu: [arm64]
os: [freebsd]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==}
+ cpu: [x64]
+ os: [freebsd]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-VokPN3TSctKj65cyCNPaUh4vMFA8awxOot/0sp+4J7ZlNRKQEhXhawqPwajoi8H5ZFt61i0ugZJuTKXBjGJ17Q==}
cpu: [x64]
os: [freebsd]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==}
+ cpu: [arm]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-DxH0P3wxm+Yzs/p3zrk9dw1rURu8p0Nv5+MRK/L7OtnLNg5rLZraSBFZ8iUXOd9f2BlhJyEpIZUH/emjq4UJ4g==}
cpu: [arm]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==}
+ cpu: [arm]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-T6ZvMNe84kAz6TBWHC7hGAoEtzP1LWYw/AqayGWEF6uISt3Abk/st06LqRD9THd7Xz3NxzurUpzAuEAUbZf+nw==}
cpu: [arm]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==}
+ cpu: [arm64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-q/4hzvQkDs8b4jIBab1pnLiiM0ayTZsN2amBFPDzuyZxjEd4wDwx0UJFYM3cOZzSf5Kw8fnWSprJzIBMkcR44Q==}
cpu: [arm64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==}
+ cpu: [arm64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-vvYWX3akdEAY6km+9wAqFDnk6pQsbJKVnj7xawcvs/+fdlYBGp+U+Qq/lLfpIxYIZvZLHMAKD9HLdacSx/r3dw==}
cpu: [arm64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==}
+ cpu: [loong64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-DePa5cqOxDP/Zp0VOXpeWaGew5iIv5DXp9NYbzkX5PFQyWVX9184WCTh3hvr/7lhXo8ZVlbFLkz8+o/q1dU6gA==}
cpu: [loong64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==}
+ cpu: [loong64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-LV8aWMB8UChglMCEzs7RkN0GsH29RJaLLqwm9fCIjlqwxQTiWAqNcc7wjBkH31hV0PU/yVxGYvrYsgfea2qw6g==}
cpu: [loong64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==}
+ cpu: [ppc64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-QoNSnwQtaeNu5grdBbsL0tt1uyl5EnS8DA8Mr3nluMXbhdQNyhN+G4tBax7VCdxLKj8YJ0/4OO9Ho84jMnJtKA==}
cpu: [ppc64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==}
+ cpu: [ppc64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-/zZp5MKapIIApE8trN8qLGNSiRN9TUoaUZ1cmVu4XnVdd5LQLOXTtyi+vtfUbNnT3iyjzpPqYeKXmvJ+gJGYWw==}
cpu: [ppc64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==}
+ cpu: [riscv64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-RbrzcD3aJ1k3UbtMRRBNwojdVVyXjuVAFTfn/xPa6EEl6GE9Sm/akPgFTb9aAC9pMKGJ6CtWxaGrqWcabH+ySg==}
cpu: [riscv64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==}
+ cpu: [riscv64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-ZF+onDsBso8PJf1XaG9lB+O9RnBpKGnY6OrzC4CSHrtC1jb6jWLTKK4bRqdoCXHd22gyr2hiYmEAm8Wns/BOCw==}
cpu: [riscv64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==}
+ cpu: [s390x]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-Atk0aSIk5Zx2Wuh9dgRQgLP0Koc8hOeYpbWryMXyk8G8/HmPkwPPkMqIIDhrXHHYqfUzSJA/I7IWSBv8xSmRBA==}
cpu: [s390x]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==}
+ cpu: [x64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-0uMOcf3eZ5K+K4cYHkdxShFMPlPXCOdfDFEFn9dNYAEEd2cVvmOfH7zFgRVoDgmtQ1m9k5q7qfrHzyMAubKYUA==}
cpu: [x64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==}
+ cpu: [x64]
+ os: [linux]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-mvFtE4A/t/7hRJ7X8Ozmu8FsIkAUat2nzl12pgU337BRmq87AQUJztwHz2Zv5/tjo9/C95E66CK03SI/ToEDJw==}
cpu: [x64]
os: [linux]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==}
+ cpu: [x64]
+ os: [openbsd]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-z9b9+aTxvt8n2rNltMPvyaUfB8NJ+CVyOrGK/MdIKHx7B+lXmZpm/XbRsU7Rpf3fRqJ2uS6mBJiJveCtq8LHDg==}
cpu: [x64]
os: [openbsd]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==}
+ cpu: [arm64]
+ os: [openharmony]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-jXaXFqKMehsOc+g8R6oo33RRC6w07G9jDBxAE5eAKX7mOcCbZloYIPNhfG9Wl+P9O9IWHFO4OJgPi1Ml2qkt7w==}
cpu: [arm64]
os: [openharmony]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==}
+ cpu: [arm64]
+ os: [win32]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-OXNWVFocS2IA4+QplhTZZ2a+8hPZR7T8KuozsNmJKK8y7cp83StHvGksfHzPG3wczWTczyWHVQuqeiTUbjiyBg==}
cpu: [arm64]
os: [win32]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==}
+ cpu: [ia32]
+ os: [win32]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-AlAbNtBO637LxSldqV43z0FfXoGfl2TW1DgAg/bs7aQswFbDewz2SJm3BUhiGfbOVtW571xbc9p+REdxhyN/Eg==}
cpu: [ia32]
os: [win32]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==}
+ cpu: [x64]
+ os: [win32]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-QRSrQXyJ1M4tjNXdR0/G/IgV6lzfQQJYBjlWIEYkY2Xs86DRl/iEpQ4blMDjJxSl7n19eDKKXMg0AmuBVYy8pQ==}
cpu: [x64]
os: [win32]
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==}
+ cpu: [x64]
+ os: [win32]
+
'@rollup/[email protected]':
resolution: {integrity: sha512-tkuFxhvKO/HlGd0VsINF6vHSYH8AF8W0TcNxKDK6JZmrehngFj78pToc8iemtnvwilDjs2G/qSzYFhe9U8q+fw==}
cpu: [x64]
os: [win32]
- '@schematics/[email protected]':
- resolution: {integrity: sha512-eHoAbxd6Kdw9YIQeZO/6lBXTmKKi10t4WTujY8CM5v4qv1zoJu9yiwVeQp9y3e7/Sybz5Ec3m4FmQ0Tw8iVDiA==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
+ '@schematics/[email protected]':
+ resolution: {integrity: sha512-e+1Ob5Kxt9QH2Gige0Bl56CXclG819RMl5Fso3kwO58+9AQnR2QxvjbetB7LDRl+YEG3TXCE4s3vdrV4gqRRAQ==}
+ engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
'@sigstore/[email protected]':
resolution: {integrity: sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A==}
@@ -3151,6 +2867,9 @@ packages:
resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
+
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
@@ -3187,9 +2906,6 @@ packages:
resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==}
- '@types/[email protected]':
- resolution: {integrity: sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==}
-
resolution: {integrity: sha512-vf2YFi1iY9lHGwNJMs01biZFbKJkrZR1T6/MlzjhJLPdntOHLhTrDSnSVcdtvjihi4VQNlrFRIxLsDBlQpAipA==}
@@ -3404,17 +3120,11 @@ packages:
cpu: [x64]
os: [win32]
- '@vitejs/[email protected]':
- resolution: {integrity: sha512-dOxxrhgyDIEUADhb/8OlV9JIqYLgos03YorAueTIeOUskLJSEsfwCByjbu98ctXitUN3znXKp0bYD/WHSudCeA==}
+ '@vitejs/[email protected]':
+ resolution: {integrity: sha512-bdyo8rB3NnQbikdMpHaML9Z1OZPBu6fFOBo+OtxsBlvMJtysWskmBcnbIDhUqgC8tcxNv/a+BcV5U+2nQMm1OQ==}
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
peerDependencies:
- vite: ^6.0.0 || ^7.0.0
-
- '@vitejs/[email protected]':
- resolution: {integrity: sha512-HXciTXN/sDBYWgeAD4V4s0DN0g72x5mlxQhHxtYu3Tt8BLa6MzcJZUyDVFCdtjNs3bfENVHVzOsmooTVuNgAAw==}
- engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
- peerDependencies:
- vite: ^6.0.0 || ^7.0.0
+ vite: ^6.0.0 || ^7.0.0 || ^8.0.0
'@webassemblyjs/[email protected]':
resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==}
@@ -3515,6 +3225,10 @@ packages:
resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
engines: {node: '>= 14'}
+ resolution: {integrity: sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==}
+ engines: {node: '>= 20'}
+
resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==}
peerDependencies:
@@ -3539,17 +3253,11 @@ packages:
resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==}
- resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
-
- resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==}
-
resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}
- resolution: {integrity: sha512-Rf7xmeuIo7nb6S4mp4abW2faW8DauZyE2faBIKFaUfP3wnpOvNSbiI5AwVhqBNj0jPgBWEvhyCu0sLjN2q77Rg==}
+ resolution: {integrity: sha512-0ZzY9mjqV7gop/AH8pIBiAS8giXP7WcSiUfoFYIzYAK9QC5c37E4SIVtJVBMwlURc0/uNt2o4RcNRvdHa4CJ5w==}
engines: {node: '>= 14.0.0'}
@@ -3609,8 +3317,12 @@ packages:
resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==}
- resolution: {integrity: sha512-YYTXSFulfwytnjAPlw8QHncHJmlvFKtczb8InXaAx9Q0LbfDnfEYDE55omerIJKihhmU61Ft+cAOSzQVaBUmeA==}
+ resolution: {integrity: sha512-S2s3aOytiKdFRdulw2qPE51MzjzVOisppcVv7jVFR+Kw0kxwvFrDcYA0h7Ndqbmj0HkMIXYWaoj7fli8kgx1eg==}
+ engines: {node: '>=12.0.0'}
+
+ resolution: {integrity: sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==}
engines: {node: ^10 || ^12 || >=14}
hasBin: true
peerDependencies:
@@ -3626,12 +3338,18 @@ packages:
peerDependencies:
'@babel/core': ^7.11.0 || ^8.0.0-0
- resolution: {integrity: sha512-z8jt+EdS61AMw22nSfoNJAZ0vrtmhPRVi6ghL3rCeRZI8cdNYFiV5xeV3HbE7rlZZNmGH8BVccwWt8/ED0QOHA==}
+ resolution: {integrity: sha512-JwKSzk2kjIe7mgPK+/lyZ2QAaJcpahNAdM+hgR2HI8D0OJVkdj8Rl6J3kaLYki9pwF7P2iWnD8qVv80Lq1ABtg==}
engines: {node: ^18.20.0 || ^20.10.0 || >=22.0.0}
peerDependencies:
- '@babel/core': ^7.12.0
+ '@babel/core': ^7.12.0 || ^8.0.0-beta.1
+ '@rspack/core': ^1.0.0 || ^2.0.0-0
webpack: '>=5.61.0'
+ peerDependenciesMeta:
+ '@rspack/core':
+ optional: true
+ webpack:
+ optional: true
resolution: {integrity: sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==}
@@ -3651,6 +3369,11 @@ packages:
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
+ resolution: {integrity: sha512-coWpDLJ410R781Npmn/SIBZEsAetR4xVi0SxLMXPaMO4lSf1MwnkGYMtkFxew0Dn8B3/CpbpYxN0JCgg8mn67g==}
+ peerDependencies:
+ '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
+
resolution: {integrity: sha512-hYm+XLYRMvupxiQzrvXUj7YyvFFVfv5gI0R71AJzudg1g2AI2vyCPPIFEBjk162/wFzti3inBHo7isWFuEVS/A==}
peerDependencies:
@@ -3685,12 +3408,8 @@ packages:
resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==}
- resolution: {integrity: sha512-NaWu+f4YrJxEttJSm16AzMIFtVldCvaJ68b1L098KpqXmxt9xOLtKoLkKxb8ekhOrLqEJAbvT6n6SEvB/sac7A==}
- engines: {node: '>=14.0.0'}
-
- resolution: {integrity: sha512-2Imdcw3LznDuxAbJM26RHniOLAzE6WgrK8OuvVXCQtNBS8rsnD9zsSEa3fHl4hHpUY7BYTlrpvtPVbvu9G6neg==}
+ resolution: {integrity: sha512-NvcGjG/7AVUAfRbvrJmHunDQS9uHnE6Q/7AkaPr8oKE8HjOlpjRG5075z/th2Tmlezk3VlaaS8+X9I1RwHJMQw==}
engines: {node: '>=18.0.0'}
@@ -3765,6 +3484,10 @@ packages:
resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
engines: {node: '>= 0.8'}
+ resolution: {integrity: sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==}
+ engines: {node: '>=6.0.0'}
+
resolution: {integrity: sha512-M3Lab8NPYlZU2exsL3bMVvMrMqgwCnMWfdZbK28bn3pK6APT/Te/I8hjRPNu1uwORY9a1eEQoifXbKPQMfMTOA==}
engines: {node: ^20.17.0 || >=22.9.0}
@@ -3937,12 +3660,13 @@ packages:
resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}
engines: {node: '>= 0.6'}
- resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==}
+ resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==}
+ engines: {node: '>=12.13'}
- resolution: {integrity: sha512-J+YV3WfhY6W/Xf9h+J1znYuqTye2xkBUIGyTPWuBAT27qajBa5mR4f8WBmfDY3YjRftT2kqZZiLi1qf0H+UOFw==}
- engines: {node: '>= 18.12.0'}
+ resolution: {integrity: sha512-3JLW90aBGeaTLpM7mYQKpnVdgsUZRExY55giiZgLuX/xTQRUs1dOCwbBnWnvY6Q6rfZoXMNwzOQJCSZPppfqXA==}
+ engines: {node: '>= 20.9.0'}
peerDependencies:
webpack: ^5.1.0
@@ -3972,11 +3696,11 @@ packages:
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
engines: {node: '>= 8'}
- resolution: {integrity: sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==}
+ resolution: {integrity: sha512-vv3J9tlOl04WjiMvHQI/9tmIrCxVrj6PFbHemBB1iihpeRbi/I4h033eoFIhwxBBqLhI0KYFS7yvynBFhIZfTw==}
engines: {node: '>= 18.12.0'}
peerDependencies:
- '@rspack/core': 0.x || 1.x
+ '@rspack/core': 0.x || ^1.0.0 || ^2.0.0-0
webpack: ^5.27.0
peerDependenciesMeta:
'@rspack/core':
@@ -4176,9 +3900,6 @@ packages:
resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==}
engines: {node: '>=18'}
- resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==}
-
resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
hasBin: true
@@ -4201,21 +3922,11 @@ packages:
resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
engines: {node: '>= 0.4'}
- resolution: {integrity: sha512-eUTnl8eh+v8UZIZh4MrMOKDAc8Lm7+NqP3pyuTORGFY1s/o9WoiJgKnwXy+te2J3hX7iRbFSHEyig7GsPeeJyw==}
- engines: {node: '>=18'}
- hasBin: true
-
resolution: {integrity: sha512-p/GD4E8oYRjg3kjdKrnMb0s4PzXgJF42e0MF4H0+ACyK/kIlFRp3e0fzOleIG+wBBm6MM3XQrbpe7soEA+vJIA==}
engines: {node: '>=18'}
hasBin: true
- resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==}
- engines: {node: '>=18'}
- hasBin: true
-
resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==}
engines: {node: '>=18'}
@@ -4367,9 +4078,18 @@ packages:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
+ resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==}
+
+ resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==}
+
resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==}
+ resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==}
+
resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==}
engines: {node: '>=0.8.0'}
@@ -4503,6 +4223,9 @@ packages:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==}
+
resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
@@ -4559,10 +4282,6 @@ packages:
resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
engines: {node: '>= 0.4'}
- resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
- engines: {node: '>= 0.4'}
-
resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}
engines: {node: '>= 0.4'}
@@ -4630,6 +4349,10 @@ packages:
resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}
engines: {node: '>= 14'}
+ resolution: {integrity: sha512-/MVmHp58WkOypgFhCLk4fzpPcFQvTJ/e6LBI7irpIO2HfxUbpmYoHF+KzipzJpxxzJu7aJNWQ0xojJ/dzV2G5g==}
+ engines: {node: '>= 20'}
+
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
@@ -4801,8 +4524,9 @@ packages:
resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==}
engines: {node: '>=18'}
- resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
+ resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
+ engines: {node: '>=12.13'}
resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==}
@@ -4960,18 +4684,6 @@ packages:
jest-resolve:
optional: true
- resolution: {integrity: sha512-8LW2Ljp6RKJu4B2PLloWX8na0ropo6yRFr89L+aiUGuvQ86PrzgkzHdZQ7lmjJJtZasVLDWY8pUvbNVmM1AEGw==}
- engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0}
- peerDependencies:
- '@angular/compiler-cli': '>=19.0.0 <23.0.0'
- '@angular/core': '>=19.0.0 <23.0.0'
- '@angular/platform-browser': '>=19.0.0 <23.0.0'
- '@angular/platform-browser-dynamic': '>=19.0.0 <23.0.0'
- jest: ^30.0.0
- jsdom: '>=26.0.0'
- typescript: '>=5.5'
-
resolution: {integrity: sha512-2yAHkA1c5rSICGJVtLYYqPC5RDsvo4+i4CwWFHVXwv41cHNX7gCWeh074IuZ5mFw7Vwsr+i25EowCnGtKkxNWw==}
engines: {node: ^20.11.1 || >=22.0.0}
@@ -5048,8 +4760,8 @@ packages:
node-notifier:
optional: true
- resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==}
+ resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==}
hasBin: true
@@ -5130,11 +4842,11 @@ packages:
resolution: {integrity: sha512-giOHXoOtifjdHqUamwKq6c49GzBdLjvxrd2D+Q4V6uOHopJv7p9VJxikDsQ/CBXZbEITgUqSVHXLTG3VhPP1Dg==}
- resolution: {integrity: sha512-0M6+uYulvYIWs52y0LqN4+QM9TqWAohYSNTo4htE8Z7Cn3G/qQMEmktfHmyJT23k+20kU9zHH2wrfFXkxNLtVw==}
+ resolution: {integrity: sha512-uLV5c702ff2jBvO7qewpkLRzkh/I9QW07ur2NKkv8TVTrtX2lrKjEbEU/LLXAn7cgpCIBbkfyUm4qYXCQs5/+w==}
engines: {node: '>= 18.12.0'}
peerDependencies:
- '@rspack/core': 0.x || 1.x
+ '@rspack/core': 0.x || ^1.0.0 || ^2.0.0-0
less: ^3.5.0 || ^4.0.0
webpack: ^5.0.0
peerDependenciesMeta:
@@ -5143,9 +4855,9 @@ packages:
webpack:
optional: true
- resolution: {integrity: sha512-j1n1IuTX1VQjIy3tT7cyGbX7nvQOsFLoIqobZv4ttI5axP923gA44zUj6miiA6R5Aoms4sEGVIIcucXUbRI14g==}
- engines: {node: '>=14'}
+ resolution: {integrity: sha512-OJmO5+HxZLLw0RLzkqaNHzcgEAQG7C0y3aMbwtCzIUFZsLMNNq/1IdAdHEycQ58CwUO3jPTHmoN+tE5I7FQxNg==}
+ engines: {node: '>=18'}
hasBin: true
@@ -5167,16 +4879,12 @@ packages:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
- resolution: {integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==}
- engines: {node: '>=20.0.0'}
-
- resolution: {integrity: sha512-+Y2DqovevLkb6DrSQ6SXTYLEd6kvlRbhsxzgJrk7BUfOVA/mt21ak6pFDZDKxiAczHMWxrb02kXBTSTIA0O94A==}
- hasBin: true
+ resolution: {integrity: sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q==}
+ engines: {node: '>=22.13.0'}
- resolution: {integrity: sha512-NYHA0MRPjvNX+vSw8Xxg6FLKxzAG+e7Pt8RqAQA/EehzHVXq9SxDqJIN3JL1hK0dweb884y8kIh6rkWvPyg9Wg==}
+ resolution: {integrity: sha512-9FKQA6G1MMtqNxfxvSBNXD/axeG2QRjYbNh0/ykRL5xYcRbCm2vXq7B9bhc7nSuKdHzr8/BHIwfPuYYH1UsXXw==}
hasBin: true
@@ -5328,8 +5036,8 @@ packages:
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-ZWYT7ln73Hptxqxk2DxPU9MmapXRhxkJD6tkSR04dnQxm8BGu2hzgKLugK5yySD97u/8yy7Ma7E76k9ZdvtjkQ==}
+ resolution: {integrity: sha512-AOSS0IdEB95ayVkxn5oGzNQwqAi2J0Jb/kKm43t7H73s8+f5873g0yuj0PNvK4dO75mu5DHg4nlgp4k6Kga8eg==}
engines: {node: '>= 12.13.0'}
peerDependencies:
webpack: ^5.0.0
@@ -5416,14 +5124,9 @@ packages:
resolution: {integrity: sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==}
hasBin: true
- resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==}
- engines: {node: ^18.17.0 || >=20.5.0}
-
- resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
- engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
- hasBin: true
+ resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==}
+ engines: {node: ^20.17.0 || >=22.9.0}
resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==}
@@ -5474,32 +5177,32 @@ packages:
'@angular/common': '>=19.0.0-0'
'@angular/core': '>=19.0.0-0'
- resolution: {integrity: sha512-8VEA2W7W2W3yPXhemJoVtXxr+3WW2DNLV4OaCIKDzLdzUUxJ6SzPHMmXXa26Pg8pa+fZxHK1hZfqJfUxr9RMBw==}
+ resolution: {integrity: sha512-7V8am8MqTr7R1xCePfo3w+AfbunNQl+vaWPAeLtIruhsAqBXp0uunh4mYv+ikrYrdPg9pqBjckCX3ubNv8HX7w==}
peerDependencies:
- '@angular/common': ^21.0.0
- '@angular/core': ^21.0.0
+ '@angular/common': ^22.0.0
+ '@angular/core': ^22.0.0
- resolution: {integrity: sha512-vQ07MpUvVKgxGMPmNvbZ9mUcgH4cH0KMVCj9skMOciPh4sBUKNsorWE/FUs2eSYiLbtu7oq1JcPMcRuEWZ1rug==}
+ resolution: {integrity: sha512-n9mlKvClPP3El+pj7+v6/C+ywm4iq+xz2Jh5GRV3TH9dEc1yycvzh6lRCjd/d1ymLmGRHAD5cBlDIo5jfs1F7w==}
peerDependencies:
- '@angular/common': ^21.0.0
- '@angular/core': ^21.0.0
+ '@angular/common': ^22.0.0
+ '@angular/core': ^22.0.0
- resolution: {integrity: sha512-pfIUsYwZ0x5hHZTewxHT8V/mOFUnXLM8w+3m0UlYvH0ikFMtY8WaDK4YGnAyf4ASPEx/14jtgU5VyEf9aTgcJA==}
+ resolution: {integrity: sha512-ClXPAyNLOiNtVEibaYZZTUH/y5z6IgaJi3eRM/kNVtN/y6AGpAh2HtrTTU3v/TPvlZWShic2yjg2/jggjtL3sg==}
peerDependencies:
- '@angular/common': ^21.1.0
- '@angular/core': ^21.1.0
- '@angular/router': ^21.1.0
+ '@angular/common': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@angular/router': ^22.0.0
rxjs: ^7.4.0
- resolution: {integrity: sha512-2yfpyRPRnxXd407yI8uU1MpZr4430JbDIgR7aRVsE7QGrC4FiRtYQdGAQx+gf/iazcpWTxK4mK9oouJB3M/acQ==}
+ resolution: {integrity: sha512-QtcYHW4e8PwN+1BA6HmM/RZ6t02IC0pcSB8Pe73Bw9N70btpmX8RLwsU9HUrbuqFG3I0KsF0IikIh3QXBk67CQ==}
peerDependencies:
- '@angular/common': ^21.1.0
- '@angular/core': ^21.1.0
- '@ng-bootstrap/ng-bootstrap': ^20.0.0
+ '@angular/common': ^22.0.0
+ '@angular/core': ^22.0.0
+ '@ng-bootstrap/ng-bootstrap': ^21.0.0
resolution: {integrity: sha512-Cu6yUpX5Iavugm8BeX7c0wgU9CvOqfd1yM6A1d2q2ZMjym7GjpASv2GdRcTq3Fx+Sb5OgBkEEpw4VnAbY6Y5RA==}
@@ -5511,10 +5214,6 @@ packages:
resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
- resolution: {integrity: sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==}
- engines: {node: '>= 6.13.0'}
-
resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==}
hasBin: true
@@ -5624,12 +5323,8 @@ packages:
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
- resolution: {integrity: sha512-m0pg2zscbYgWbqRR6ABga5c3sZdEon7bSgjnlXC64kxtxLOyjRcbbUkLj7HFyy/FTD+P2xdBWu8snGhYI0jc4A==}
- engines: {node: '>=20'}
-
- resolution: {integrity: sha512-lBX72MWFduWEf7v7uWf5DHp9Jn5BI8bNPGuFgtXMmr2uDz2Gz2749y3am3agSDdkhHPHYmmxEGSKH85ZLGzgXw==}
+ resolution: {integrity: sha512-84cglkRILFxdtA8hAvLNdMrtBpPNBTrQ9/ulg0FA7xLMnD6mifv+enAIeRmvtv+WgdCE+LPGOfQmtJRrVaIVhQ==}
engines: {node: '>=20'}
@@ -5666,8 +5361,8 @@ packages:
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
- resolution: {integrity: sha512-O0EDXi85LF4AzdjG74GUwEArhdvawi/YOHcsW6IijKNj7wm8IvEWNF5GnfuxNpQ/ZpO3L37+v8hqdVh8GgWYhg==}
+ resolution: {integrity: sha512-KvcJ9iy3crysCsgqc4+PknH/w6jkrp8JN36mpZBPwNaDRwTfMZD37YzRazNstiZUOhuF5pno9f78n9mEJBavwg==}
engines: {node: ^20.17.0 || >=22.9.0}
hasBin: true
@@ -5686,8 +5381,8 @@ packages:
resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==}
engines: {node: '>= 0.10'}
- resolution: {integrity: sha512-wzh11mj8KKkno1pZEu+l2EVeWsuKDfR5KNWZOTsslfUX8lPDZx77m9T0kIoAVkFtD1nx6YF8oh4BnPHvxMtNMw==}
+ resolution: {integrity: sha512-NaRku2aMpUN1Sh1Gyk1KWUh2A7EJx2c6qYzvwsPtqhoHoaURshdrceYK3LunVCm3WHhm6FS7Vcczbvdh3/UIVw==}
resolution: {integrity: sha512-/dQ8UzHZwnrzs3EvDj6IkKrD/jIZyTlB+8XrHJvcjNgRdmWruNdN9i9RK/JtxakmlUdPwKubKPTCqvbTgzGhrw==}
@@ -5742,10 +5437,6 @@ packages:
resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==}
engines: {node: '>=8.6'}
- resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==}
engines: {node: '>=12'}
@@ -5758,8 +5449,8 @@ packages:
resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==}
engines: {node: '>= 6'}
- resolution: {integrity: sha512-7uU4ZnKeQq22t9AsmHGD2w4OYQGonwFnTypDypaWi7Qr2EvQIFVtG8J5D/3bE7W123Wdc9+v4CZDu5hJXVCtBg==}
+ resolution: {integrity: sha512-DszUCKeVN/5G5QKo6jAVHL8fmKnkJvQ0ACiVgY7YGCq3TUB2oznAOayvZPIAdEThvhczkXR+qm3IHsNXpFCYfA==}
engines: {node: '>=20.x'}
@@ -5770,6 +5461,10 @@ packages:
resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==}
+ engines: {node: '>=16.0.0'}
+
resolution: {integrity: sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==}
engines: {node: '>=18'}
@@ -5780,11 +5475,11 @@ packages:
engines: {node: '>=18'}
hasBin: true
- resolution: {integrity: sha512-tHX+RkpsXVcc7st4dSdDGliI+r4aAQDuv+v3vFYHixb6YgjreG5AG4SEB0kDK8u2s6htqEEpKlkhSBUTvWKYnA==}
+ resolution: {integrity: sha512-k98jtRzthjj3f76MYTs9JTpRqV1RaaMhEU0Lpw9OTmQZQdppg4B30VZ74BojuBHt3F4KyubHJoXCMUeM8Bqeow==}
engines: {node: '>= 18.12.0'}
peerDependencies:
- '@rspack/core': 0.x || 1.x
+ '@rspack/core': 0.x || ^1.0.0 || ^2.0.0-0
postcss: ^7.0.0 || ^8.0.1
webpack: ^5.0.0
peerDependenciesMeta:
@@ -5833,12 +5528,12 @@ packages:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
- resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==}
+ resolution: {integrity: sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==}
engines: {node: ^10 || ^12 || >=14}
- resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}
+ resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==}
engines: {node: ^10 || ^12 || >=14}
@@ -5889,10 +5584,6 @@ packages:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
- resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==}
- engines: {node: '>=10'}
-
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
engines: {node: '>= 0.10'}
@@ -5910,13 +5601,17 @@ packages:
resolution: {integrity: sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==}
+ resolution: {integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==}
+
+ resolution: {integrity: sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==}
+ engines: {node: '>=16.0.0'}
+
resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==}
engines: {node: '>=0.6'}
- resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
-
resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}
engines: {node: '>= 0.6'}
@@ -6005,6 +5700,9 @@ packages:
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
+
resolution: {integrity: sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==}
engines: {node: '>=12'}
@@ -6018,10 +5716,6 @@ packages:
resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==}
engines: {node: '>=18'}
- resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==}
- engines: {node: '>= 4'}
-
resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==}
engines: {node: '>= 4'}
@@ -6029,14 +5723,9 @@ packages:
resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
- resolution: {integrity: sha512-v1FCjMZCan7f+xGAHBi+mqiE4MlH7I+SXEHSQSJoMOGNNB2UYtvMiejsq9YuUOiZjNeUeV/a21nSFbrUR+4ZCQ==}
- engines: {node: ^20.19.0 || >=22.12.0}
- hasBin: true
-
- resolution: {integrity: sha512-V2tPDUrY3WSevrvU2E41ijZlpF+5PbZu4giH+VpNraaadsJGHa4fR6IFwsocVwEXDoAdIv5qgPPxgrvKAOIPtA==}
- engines: {node: ^20.19.0 || >=22.12.0}
+ resolution: {integrity: sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==}
+ engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@@ -6067,11 +5756,11 @@ packages:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
- resolution: {integrity: sha512-sglGzId5gmlfxNs4gK2U3h7HlVRfx278YK6Ono5lwzuvi1jxig80YiuHkaDBVsYIKFhx8wN7XSCI0M2IDS/3qA==}
+ resolution: {integrity: sha512-w6q+fRHourZ+e+xA1kcsF27iGM6jdB8teexYCfdUw0sYgcDNeZESnDNT9sUmmPm3ooziwUJXGwZJSTF3kOdBfA==}
engines: {node: '>= 18.12.0'}
peerDependencies:
- '@rspack/core': 0.x || 1.x
+ '@rspack/core': 0.x || ^1.0.0 || ^2.0.0-0
node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0
sass: ^1.3.0
sass-embedded: '*'
@@ -6088,13 +5777,8 @@ packages:
webpack:
optional: true
- resolution: {integrity: sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==}
- engines: {node: '>=14.0.0'}
- hasBin: true
-
- resolution: {integrity: sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==}
+ resolution: {integrity: sha512-kgW13M54DUB7IsIRM5LvJkNlpH+WhMpooUcaWGFARkF1Tc82v9mIWkCbCYf+MBvpIUBSeSOTilpZjEPr2VYE6Q==}
engines: {node: '>=14.0.0'}
hasBin: true
@@ -6113,9 +5797,9 @@ packages:
resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==}
- resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==}
- engines: {node: '>=10'}
+ resolution: {integrity: sha512-ftnu3TW4+3eBfLRFnDEkzGxSF/10BJBkaLJuBHZX0kiPS7bRdlpZGu6YGt4KngMkdTwJE6MbjavFpqHvqVt+Ew==}
+ engines: {node: '>=18'}
resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==}
@@ -6125,18 +5809,13 @@ packages:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
- resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==}
+ resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==}
engines: {node: '>=10'}
hasBin: true
- resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==}
- engines: {node: '>=10'}
- hasBin: true
-
- resolution: {integrity: sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==}
+ resolution: {integrity: sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==}
engines: {node: '>=10'}
hasBin: true
@@ -6153,8 +5832,9 @@ packages:
resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==}
engines: {node: '>= 18'}
- resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
+ resolution: {integrity: sha512-YAy8Od6KV+uuwUuU50np8fGB/Aues6Y0nAhA9y/hId74PlKUcme4pXcBD46NWKr1Q4osN/iseZ17YqO1XfmI8g==}
+ engines: {node: '>=20.0.0'}
resolution: {integrity: sha512-KDj11HScOaLmrPxl70KYNW1PksP4Nb/CLL2yvC+Qd2kHMPEEpfc4Re2e4FOay+bC/+XQl/7zAcWON3JVo5v3KQ==}
@@ -6309,10 +5989,6 @@ packages:
resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==}
engines: {node: '>= 0.8'}
- resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}
- engines: {node: '>=18'}
-
resolution: {integrity: sha512-eCPu1qRxPVkl5605OTWF8Wz40b4Mf45NY5LQmVPQ599knfs5QhASUm9GbJ5BDMDOXgrnh0wyEdvzmL//YMlw0A==}
engines: {node: '>=18'}
@@ -6351,10 +6027,6 @@ packages:
resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
- engines: {node: '>=4'}
-
resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==}
engines: {node: '>=8'}
@@ -6448,8 +6120,8 @@ packages:
uglify-js:
optional: true
- resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==}
+ resolution: {integrity: sha512-uxfo9fPcSgLDYob/w1FuL0c99MWiJDnv+5qXSQc5+Ki5NjVNsYi66INnMFBjf6uFz6OnX12piJQPF4IpjJTNTw==}
engines: {node: '>=10'}
hasBin: true
@@ -6471,8 +6143,8 @@ packages:
resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==}
- resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
+ resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==}
engines: {node: '>=12.0.0'}
@@ -6511,10 +6183,6 @@ packages:
peerDependencies:
tslib: '2'
- resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
- hasBin: true
-
resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==}
engines: {node: '>=18.12'}
@@ -6562,13 +6230,16 @@ packages:
'@swc/wasm':
optional: true
- resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==}
- engines: {node: '>=6'}
+ resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
+ resolution: {integrity: sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==}
+ engines: {node: '>= 6.0.0'}
+
resolution: {integrity: sha512-50QV99kCKH5P/Vs4E2Gzp7BopNV+KzTXqWeaxrfu5IQJBOULRsTIS9seSsOVT8ZnGXzCyx55nYWAi4qJzpZKEQ==}
engines: {node: ^20.17.0 || >=22.9.0}
@@ -6607,8 +6278,8 @@ packages:
resolution: {integrity: sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==}
- resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
+ resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
engines: {node: '>=14.17'}
hasBin: true
@@ -6624,14 +6295,6 @@ packages:
resolution: {integrity: sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==}
engines: {node: '>=18.17'}
- resolution: {integrity: sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==}
- engines: {node: '>=20.18.1'}
-
- resolution: {integrity: sha512-BM/JzwwaRXxrLdElV2Uo6cTLEjhSb3WXboncJamZ15NgUURmvlXvxa6xkwIOILIjPNo9i8ku136ZvWV0Uly8+w==}
- engines: {node: '>=20.18.1'}
-
resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==}
engines: {node: '>=4'}
@@ -6705,48 +6368,8 @@ packages:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
- resolution: {integrity: sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==}
- engines: {node: ^20.19.0 || >=22.12.0}
- hasBin: true
- peerDependencies:
- '@types/node': ^20.19.0 || >=22.12.0
- jiti: '>=1.21.0'
- less: ^4.0.0
- lightningcss: ^1.21.0
- sass: ^1.70.0
- sass-embedded: ^1.70.0
- stylus: '>=0.54.8'
- sugarss: ^5.0.0
- terser: ^5.16.0
- tsx: ^4.8.1
- yaml: ^2.4.2
- peerDependenciesMeta:
- '@types/node':
- optional: true
- jiti:
- optional: true
- less:
- optional: true
- lightningcss:
- optional: true
- sass:
- optional: true
- sass-embedded:
- optional: true
- stylus:
- optional: true
- sugarss:
- optional: true
- terser:
- optional: true
- tsx:
- optional: true
- yaml:
- optional: true
-
- resolution: {integrity: sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==}
+ resolution: {integrity: sha512-KuOaNhcnGFN2zIPGA7wRmzF+lJA1sea7rHq17aiJ++9lzY1WWG6Jpwqwe1KNbRVPIqHmr8GLYx7jbrQcN/7/ww==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
@@ -6792,10 +6415,6 @@ packages:
resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==}
- resolution: {integrity: sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==}
- engines: {node: '>=10.13.0'}
-
resolution: {integrity: sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==}
engines: {node: '>=10.13.0'}
@@ -6819,8 +6438,17 @@ packages:
webpack:
optional: true
- resolution: {integrity: sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==}
+ resolution: {integrity: sha512-zWrde9VZDiRaFuWsjHO40wm9LxxtXEk8DdzFXdU7eU5ZpiANnZZDBbZgN3guxbEoKqUHd9YupBmynyioz42nkA==}
+ engines: {node: '>= 20.9.0'}
+ peerDependencies:
+ webpack: ^5.101.0
+ peerDependenciesMeta:
+ webpack:
+ optional: true
+
+ resolution: {integrity: sha512-9Gyu2F7+bg4Vv+pjbovuYDhHX+mqdqITykfzdM9UyKqKHlsE5aAjRhR+oOEfXW5vBeu8tarzlJFIZva4ZjAdrQ==}
engines: {node: '>= 18.12.0'}
hasBin: true
peerDependencies:
@@ -6853,8 +6481,8 @@ packages:
resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==}
- resolution: {integrity: sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==}
+ resolution: {integrity: sha512-wGN3qcrBQIFmQ/c0AiOAQBvrZ5lmY8vbbMv4Mxfgzqd/B6+9pXtLo73WuS1dSGXM5QYY3hZnIbvx+K1xxe6FyA==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
@@ -6914,9 +6542,9 @@ packages:
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
- resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
- engines: {node: '>=8'}
+ resolution: {integrity: sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ==}
+ engines: {node: '>=20'}
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
@@ -7010,10 +6638,6 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==}
- engines: {node: '>=18'}
-
resolution: {integrity: sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==}
engines: {node: '>=18'}
@@ -7029,6 +6653,9 @@ packages:
resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==}
+ resolution: {integrity: sha512-IynmDyxsEsb9RKzO3J9+4SxXnl2FTFSzNBaKKaMV6tsSk0rw9gYw9gs+JFCq/qk2LCZ78KDwyj+Z289TijSkUw==}
+
resolution: {integrity: sha512-Eky7p2Z1Ig3NnbfodSPoARCjKBSTFMnE/ACsP1L/XJEfY4SdOFce19BsUCWVwL6K5ABZFy5J3bjcMWffX+YM3Q==}
@@ -7065,116 +6692,117 @@ snapshots:
'@actions/[email protected]': {}
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]': {}
+ '@algolia/[email protected]': {}
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ '@algolia/client-common': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
+ '@algolia/client-common': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
+ '@algolia/client-common': 5.52.0
- '@algolia/[email protected]':
+ '@algolia/[email protected]':
dependencies:
- '@algolia/client-common': 5.48.1
+ '@algolia/client-common': 5.52.0
'@ampproject/[email protected]':
dependencies:
'@jridgewell/gen-mapping': 0.3.13
'@jridgewell/trace-mapping': 0.3.31
+ '@angular-builders/[email protected]([email protected])':
dependencies:
- '@angular-devkit/core': 21.2.12([email protected])
- ts-node: 10.9.2(@types/[email protected])([email protected])
- tsconfig-paths: 4.2.0
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular-devkit/schematics': 22.0.5([email protected])
+ '@schematics/angular': 22.0.5([email protected])
+ get-tsconfig: 4.14.0
+ jiti: 2.7.0
transitivePeerDependencies:
- - '@swc/core'
- - '@swc/wasm'
- - '@types/node'
- chokidar
- - typescript
dependencies:
- '@angular-builders/common': 5.0.3(@types/[email protected])([email protected])([email protected])
- '@angular-devkit/architect': 0.2101.2([email protected])
- '@angular-devkit/core': 21.2.12([email protected])
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
+ '@angular-builders/common': 6.0.1([email protected])
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular-devkit/schematics': 22.0.5([email protected])
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ '@schematics/angular': 22.0.5([email protected])
lodash: 4.18.1
+ rxjs: 7.8.2
webpack-merge: 6.0.1
transitivePeerDependencies:
- '@angular/compiler'
@@ -7184,16 +6812,12 @@ snapshots:
- '@angular/platform-server'
- '@angular/service-worker'
- '@angular/ssr'
- - '@emnapi/core'
- - '@emnapi/runtime'
- '@minify-html/node'
- '@rspack/core'
- '@swc/core'
- '@swc/css'
- '@swc/html'
- - '@swc/wasm'
- '@types/node'
- - '@web/test-runner'
- browser-sync
- bufferutil
- chokidar
@@ -7203,8 +6827,7 @@ snapshots:
- debug
- html-minifier-terser
- html-webpack-plugin
- - jest
- - jest-environment-jsdom
+ - istanbul-lib-instrument
- jiti
- karma
- less
@@ -7212,7 +6835,6 @@ snapshots:
- ng-packagr
- node-sass
- postcss
- - protractor
- sass-embedded
- stylus
- sugarss
@@ -7228,122 +6850,103 @@ snapshots:
- webpack-cli
- yaml
- '@angular-builders/[email protected](85f8e4dacd8f3c5fc95b573860b0c5c2)':
- dependencies:
- '@angular-builders/common': 5.0.3(@types/[email protected])([email protected])([email protected])
- '@angular-devkit/architect': 0.2101.2([email protected])
- '@angular-devkit/core': 21.2.12([email protected])
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
- jest-preset-angular: 16.2.0(e96fadfc92734847d5b251a1c2992786)
+ '@angular-builders/[email protected](41a81beaf45fc81545506474f268b72a)':
+ dependencies:
+ '@angular-builders/common': 6.0.1([email protected])
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular-devkit/schematics': 22.0.5([email protected])
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
+ '@schematics/angular': 22.0.5([email protected])
lodash: 4.18.1
+ rxjs: 7.8.2
transitivePeerDependencies:
- '@angular/platform-browser'
- '@babel/core'
- '@jest/transform'
- '@jest/types'
- - '@swc/core'
- - '@swc/wasm'
- - '@types/node'
- babel-jest
- canvas
- chokidar
- jsdom
- typescript
dependencies:
- '@angular-devkit/core': 21.1.2([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
rxjs: 7.8.2
transitivePeerDependencies:
- chokidar
- dependencies:
- '@angular-devkit/core': 21.2.12([email protected])
- rxjs: 7.8.2
- transitivePeerDependencies:
- - chokidar
-
- dependencies:
- '@angular-devkit/core': 21.2.13([email protected])
- rxjs: 7.8.2
- transitivePeerDependencies:
- - chokidar
-
dependencies:
'@ampproject/remapping': 2.3.0
- '@angular-devkit/architect': 0.2101.2([email protected])
- '@angular-devkit/core': 21.1.2([email protected])
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- '@babel/core': 7.28.5
- '@babel/generator': 7.28.5
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ '@babel/core': 7.29.0
+ '@babel/generator': 7.29.1
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-split-export-declaration': 7.24.7
- '@babel/plugin-transform-async-generator-functions': 7.28.0(@babel/[email protected])
- '@babel/plugin-transform-async-to-generator': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-runtime': 7.28.5(@babel/[email protected])
- '@babel/preset-env': 7.28.5(@babel/[email protected])
- '@babel/runtime': 7.28.4
- '@discoveryjs/json-ext': 0.6.3
+ '@babel/plugin-transform-async-generator-functions': 7.29.0(@babel/[email protected])
+ '@babel/plugin-transform-async-to-generator': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-runtime': 7.29.0(@babel/[email protected])
+ '@babel/preset-env': 7.29.3(@babel/[email protected])
+ '@babel/runtime': 7.29.2
+ '@discoveryjs/json-ext': 1.1.0
ansi-colors: 4.1.3
- autoprefixer: 10.4.23([email protected])
+ autoprefixer: 10.5.0([email protected])
browserslist: 4.28.2
- esbuild-wasm: 0.27.2
+ esbuild-wasm: 0.28.1
http-proxy-middleware: 3.0.5
istanbul-lib-instrument: 6.0.3
jsonc-parser: 3.3.1
karma-source-map-support: 1.4.0
- less: 4.4.2
- license-webpack-plugin: 4.0.2([email protected]([email protected])([email protected]))
+ less: 4.6.4
+ license-webpack-plugin: 4.0.2([email protected]([email protected])([email protected]))
loader-utils: 3.3.1
- mini-css-extract-plugin: 2.9.4([email protected]([email protected])([email protected]))
+ mini-css-extract-plugin: 2.10.2([email protected]([email protected])([email protected]))
open: 11.0.0
- ora: 9.0.0
- picomatch: 4.0.3
- piscina: 5.1.4
- postcss: 8.5.6
+ ora: 9.4.0
+ picomatch: 4.0.4
+ piscina: 5.2.0
+ postcss: 8.5.13
resolve-url-loader: 5.0.0
rxjs: 7.8.2
- sass: 1.97.1
- semver: 7.7.3
+ sass: 1.99.0
+ semver: 7.7.4
source-map-support: 0.5.21
- terser: 5.44.1
- tinyglobby: 0.2.15
- tree-kill: 1.2.2
+ terser: 5.46.2
+ tinyglobby: 0.2.16
tslib: 2.8.1
- typescript: 5.9.3
+ typescript: 6.0.3
webpack-merge: 6.0.1
- webpack-subresource-integrity: 5.1.0([email protected]([email protected])([email protected]))
+ webpack-subresource-integrity: 5.1.0([email protected]([email protected])([email protected]))
optionalDependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
- '@angular/localize': 21.2.14(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
- esbuild: 0.27.2
- jest-environment-jsdom: 30.4.1([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
+ '@angular/localize': 22.0.5(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
+ esbuild: 0.28.1
transitivePeerDependencies:
- '@angular/compiler'
- - '@emnapi/core'
- - '@emnapi/runtime'
- '@minify-html/node'
- '@rspack/core'
- '@swc/core'
@@ -7372,41 +6975,19 @@ snapshots:
- webpack-cli
- yaml
dependencies:
- '@angular-devkit/architect': 0.2101.2([email protected])
+ '@angular-devkit/architect': 0.2200.5([email protected])
rxjs: 7.8.2
transitivePeerDependencies:
- chokidar
dependencies:
- ajv: 8.17.1
- ajv-formats: 3.0.1([email protected])
- jsonc-parser: 3.3.1
- picomatch: 4.0.3
- rxjs: 7.8.2
- source-map: 0.7.6
- optionalDependencies:
- chokidar: 5.0.0
-
- dependencies:
- ajv: 8.18.0
- ajv-formats: 3.0.1([email protected])
- jsonc-parser: 3.3.1
- picomatch: 4.0.4
- rxjs: 7.8.2
- source-map: 0.7.6
- optionalDependencies:
- chokidar: 5.0.0
-
- dependencies:
- ajv: 8.18.0
- ajv-formats: 3.0.1([email protected])
+ ajv: 8.20.0
+ ajv-formats: 3.0.1([email protected])
jsonc-parser: 3.3.1
picomatch: 4.0.4
rxjs: 7.8.2
@@ -7414,58 +6995,58 @@ snapshots:
optionalDependencies:
chokidar: 5.0.0
dependencies:
- '@angular-devkit/core': 21.2.12([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
jsonc-parser: 3.3.1
magic-string: 0.30.21
- ora: 9.3.0
+ ora: 9.4.0
rxjs: 7.8.2
transitivePeerDependencies:
- chokidar
dependencies:
- '@angular-devkit/architect': 0.2102.13([email protected])
- '@angular-devkit/core': 21.2.12([email protected])
- '@angular/cli': 21.2.12(@types/[email protected])([email protected])
- eslint: 10.5.0([email protected])
- typescript: 5.9.3
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular/cli': 22.0.5(@types/[email protected])([email protected])
+ eslint: 10.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- chokidar
- '@angular-eslint/[email protected]': {}
+ '@angular-eslint/[email protected]': {}
dependencies:
- '@angular-eslint/bundled-angular-compiler': 21.4.0
- '@angular-eslint/template-parser': 21.4.0([email protected]([email protected]))([email protected])
+ '@angular-eslint/bundled-angular-compiler': 22.0.0
+ '@angular-eslint/template-parser': 22.0.0([email protected]([email protected]))([email protected])
'@typescript-eslint/types': 8.62.0
- '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
aria-query: 5.3.2
axobject-query: 4.1.0
- eslint: 10.5.0([email protected])
- typescript: 5.9.3
+ eslint: 10.5.0([email protected])
+ typescript: 6.0.3
dependencies:
- '@angular-eslint/bundled-angular-compiler': 21.4.0
- '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
- eslint: 10.5.0([email protected])
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ '@angular-eslint/bundled-angular-compiler': 22.0.0
+ '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
+ eslint: 10.5.0([email protected])
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
dependencies:
- '@angular-devkit/core': 21.2.12([email protected])
- '@angular-devkit/schematics': 21.2.12([email protected])
- '@angular/cli': 21.2.12(@types/[email protected])([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular-devkit/schematics': 22.0.5([email protected])
+ '@angular/cli': 22.0.5(@types/[email protected])([email protected])
ignore: 7.0.5
- semver: 7.7.4
+ semver: 7.8.0
strip-json-comments: 3.1.1
transitivePeerDependencies:
- '@angular-eslint/template-parser'
@@ -7475,63 +7056,60 @@ snapshots:
- eslint
- typescript
dependencies:
- '@angular-eslint/bundled-angular-compiler': 21.4.0
- eslint: 10.5.0([email protected])
+ '@angular-eslint/bundled-angular-compiler': 22.0.0
+ eslint: 10.5.0([email protected])
eslint-scope: 9.1.2
- typescript: 5.9.3
+ typescript: 6.0.3
dependencies:
- '@angular-eslint/bundled-angular-compiler': 21.4.0
- '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
- eslint: 10.5.0([email protected])
- typescript: 5.9.3
+ '@angular-eslint/bundled-angular-compiler': 22.0.0
+ '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
+ eslint: 10.5.0([email protected])
+ typescript: 6.0.3
dependencies:
'@ampproject/remapping': 2.3.0
- '@angular-devkit/architect': 0.2101.2([email protected])
- '@angular/compiler': 21.2.17
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- '@babel/core': 7.28.5
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular/compiler': 22.0.5
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ '@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-split-export-declaration': 7.24.7
- '@inquirer/confirm': 5.1.21(@types/[email protected])
- beasties: 0.3.5
+ '@inquirer/confirm': 6.0.12(@types/[email protected])
+ beasties: 0.4.2
browserslist: 4.28.2
- esbuild: 0.27.2
- https-proxy-agent: 7.0.6
- istanbul-lib-instrument: 6.0.3
+ esbuild: 0.28.1
+ https-proxy-agent: 9.0.0
jsonc-parser: 3.3.1
- listr2: 9.0.5
+ listr2: 10.2.1
magic-string: 0.30.21
mrmime: 2.0.1
- parse5-html-rewriting-stream: 8.0.0
- picomatch: 4.0.3
- piscina: 5.1.4
- rolldown: 1.0.0-beta.58(@emnapi/[email protected])(@emnapi/[email protected])
- sass: 1.97.1
- semver: 7.7.3
+ parse5-html-rewriting-stream: 8.0.1
+ picomatch: 4.0.4
+ piscina: 5.2.0
+ rollup: 4.60.2
+ sass: 1.99.0
+ semver: 7.7.4
source-map-support: 0.5.21
- tinyglobby: 0.2.15
+ tinyglobby: 0.2.16
tslib: 2.8.1
- typescript: 5.9.3
- undici: 7.18.2
- watchpack: 2.5.0
+ typescript: 6.0.3
+ watchpack: 2.5.1
optionalDependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
- '@angular/localize': 21.2.14(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
- less: 4.4.2
- lmdb: 3.4.4
- postcss: 8.5.6
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
+ '@angular/localize': 22.0.5(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
+ istanbul-lib-instrument: 6.0.3
+ less: 4.6.4
+ lmdb: 3.5.4
+ postcss: 8.5.13
transitivePeerDependencies:
- - '@emnapi/core'
- - '@emnapi/runtime'
- '@types/node'
- chokidar
- jiti
@@ -7544,49 +7122,46 @@ snapshots:
- tsx
- yaml
dependencies:
'@ampproject/remapping': 2.3.0
- '@angular-devkit/architect': 0.2102.12([email protected])
- '@angular/compiler': 21.2.17
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular/compiler': 22.0.5
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
'@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-split-export-declaration': 7.24.7
- '@inquirer/confirm': 5.1.21(@types/[email protected])
- beasties: 0.4.1
+ '@inquirer/confirm': 6.0.12(@types/[email protected])
+ beasties: 0.4.2
browserslist: 4.28.2
- esbuild: 0.27.3
- https-proxy-agent: 7.0.6
- istanbul-lib-instrument: 6.0.3
+ esbuild: 0.28.1
+ https-proxy-agent: 9.0.0
jsonc-parser: 3.3.1
- listr2: 9.0.5
+ listr2: 10.2.1
magic-string: 0.30.21
mrmime: 2.0.1
- parse5-html-rewriting-stream: 8.0.0
+ parse5-html-rewriting-stream: 8.0.1
picomatch: 4.0.4
- piscina: 5.1.4
- rolldown: 1.0.0-rc.4(@emnapi/[email protected])(@emnapi/[email protected])
- sass: 1.97.3
+ piscina: 5.2.0
+ rollup: 4.60.2
+ sass: 1.99.0
semver: 7.7.4
source-map-support: 0.5.21
- tinyglobby: 0.2.15
+ tinyglobby: 0.2.16
tslib: 2.8.1
- typescript: 5.9.3
- undici: 7.24.4
+ typescript: 6.0.3
watchpack: 2.5.1
optionalDependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
- '@angular/localize': 21.2.14(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
- less: 4.4.2
- lmdb: 3.5.1
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
+ '@angular/localize': 22.0.5(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
+ istanbul-lib-instrument: 6.0.3
+ less: 4.6.4
+ lmdb: 3.5.4
postcss: 8.5.15
transitivePeerDependencies:
- - '@emnapi/core'
- - '@emnapi/runtime'
- '@types/node'
- chokidar
- jiti
@@ -7599,114 +7174,115 @@ snapshots:
- tsx
- yaml
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
parse5: 8.0.1
rxjs: 7.8.2
tslib: 2.8.1
dependencies:
- '@angular-devkit/architect': 0.2102.12([email protected])
- '@angular-devkit/core': 21.2.12([email protected])
- '@angular-devkit/schematics': 21.2.12([email protected])
- '@inquirer/prompts': 7.10.1(@types/[email protected])
- '@listr2/prompt-adapter-inquirer': 3.0.5(@inquirer/[email protected](@types/[email protected]))(@types/[email protected])([email protected])
- '@modelcontextprotocol/sdk': 1.26.0([email protected])
- '@schematics/angular': 21.2.12([email protected])
+ '@angular-devkit/architect': 0.2200.5([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular-devkit/schematics': 22.0.5([email protected])
+ '@inquirer/prompts': 8.4.2(@types/[email protected])
+ '@listr2/prompt-adapter-inquirer': 4.2.3(@inquirer/[email protected](@types/[email protected]))(@types/[email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.29.0([email protected])
+ '@schematics/angular': 22.0.5([email protected])
'@yarnpkg/lockfile': 1.1.0
- algoliasearch: 5.48.1
+ algoliasearch: 5.52.0
ini: 6.0.0
jsonc-parser: 3.3.1
- listr2: 9.0.5
+ listr2: 10.2.1
npm-package-arg: 13.0.2
- pacote: 21.3.1
- parse5-html-rewriting-stream: 8.0.0
+ pacote: 21.5.1
+ parse5-html-rewriting-stream: 8.0.1
semver: 7.7.4
yargs: 18.0.0
- zod: 4.3.6
+ zod: 4.4.2
transitivePeerDependencies:
- '@cfworker/json-schema'
- '@types/node'
- chokidar
- supports-color
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
rxjs: 7.8.2
tslib: 2.8.1
dependencies:
- '@angular/compiler': 21.2.17
- '@babel/core': 7.29.0
+ '@angular/compiler': 22.0.5
+ '@babel/core': 7.29.7
'@jridgewell/sourcemap-codec': 1.5.5
chokidar: 5.0.0
convert-source-map: 1.9.0
reflect-metadata: 0.2.2
- semver: 7.8.1
+ semver: 7.8.5
tslib: 2.8.1
yargs: 18.0.0
optionalDependencies:
- typescript: 5.9.3
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
- '@angular/[email protected]':
+ '@angular/[email protected]':
dependencies:
tslib: 2.8.1
dependencies:
rxjs: 7.8.2
tslib: 2.8.1
optionalDependencies:
- '@angular/compiler': 21.2.17
+ '@angular/compiler': 22.0.5
zone.js: 0.16.2
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
'@standard-schema/spec': 1.1.0
rxjs: 7.8.2
tslib: 2.8.1
+ zod: 4.3.6
dependencies:
- '@angular/compiler': 21.2.17
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- '@babel/core': 7.29.0
+ '@angular/compiler': 22.0.5
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ '@babel/core': 7.29.7
'@types/babel__core': 7.20.5
tinyglobby: 0.2.17
yargs: 18.0.0
transitivePeerDependencies:
- supports-color
dependencies:
- '@angular/compiler': 21.2.17
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/compiler': 22.0.5
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
rxjs: 7.8.2
tslib: 2.8.1
@@ -7724,30 +7300,8 @@ snapshots:
js-tokens: 4.0.0
picocolors: 1.1.1
- '@babel/[email protected]': {}
-
'@babel/[email protected]': {}
- '@babel/[email protected]':
- dependencies:
- '@babel/code-frame': 7.29.7
- '@babel/generator': 7.28.5
- '@babel/helper-compilation-targets': 7.29.7
- '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
- '@babel/helpers': 7.29.7
- '@babel/parser': 7.29.7
- '@babel/template': 7.29.7
- '@babel/traverse': 7.29.7
- '@babel/types': 7.29.7
- '@jridgewell/remapping': 2.3.5
- convert-source-map: 2.0.0
- debug: 4.4.3
- gensync: 1.0.0-beta.2
- json5: 2.2.3
- semver: 6.3.1
- transitivePeerDependencies:
- - supports-color
-
dependencies:
'@babel/code-frame': 7.29.7
@@ -7788,7 +7342,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@babel/[email protected]':
+ '@babel/[email protected]':
dependencies:
'@babel/parser': 7.29.7
'@babel/types': 7.29.7
@@ -7816,31 +7370,31 @@ snapshots:
lru-cache: 5.1.1
semver: 6.3.1
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-member-expression-to-functions': 7.28.5
'@babel/helper-optimise-call-expression': 7.27.1
- '@babel/helper-replace-supers': 7.28.6(@babel/[email protected])
- '@babel/helper-skip-transparent-expression-wrappers': 7.27.1
+ '@babel/helper-replace-supers': 7.28.6(@babel/[email protected])
+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7
'@babel/traverse': 7.29.7
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
regexpu-core: 6.4.0
semver: 6.3.1
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-compilation-targets': 7.29.7
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/helper-plugin-utils': 7.29.7
debug: 4.4.3
lodash.debounce: 4.0.8
resolve: 1.22.11
@@ -7856,13 +7410,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@babel/[email protected]':
- dependencies:
- '@babel/traverse': 7.29.7
- '@babel/types': 7.29.7
- transitivePeerDependencies:
- - supports-color
-
dependencies:
'@babel/traverse': 7.29.7
@@ -7870,15 +7417,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-imports': 7.29.7
- '@babel/helper-validator-identifier': 7.29.7
- '@babel/traverse': 7.29.7
- transitivePeerDependencies:
- - supports-color
-
dependencies:
'@babel/core': 7.29.0
@@ -7901,29 +7439,27 @@ snapshots:
dependencies:
'@babel/types': 7.29.7
- '@babel/[email protected]': {}
-
'@babel/[email protected]': {}
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-wrap-function': 7.28.6
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-member-expression-to-functions': 7.28.5
'@babel/helper-optimise-call-expression': 7.27.1
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
- '@babel/[email protected]':
+ '@babel/[email protected]':
dependencies:
'@babel/traverse': 7.29.7
'@babel/types': 7.29.7
@@ -7938,8 +7474,6 @@ snapshots:
'@babel/[email protected]': {}
- '@babel/[email protected]': {}
-
'@babel/[email protected]': {}
@@ -7959,44 +7493,52 @@ snapshots:
dependencies:
'@babel/types': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+
+ '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1(@babel/[email protected])':
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
- '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1(@babel/[email protected])':
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7
+ transitivePeerDependencies:
+ - supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-skip-transparent-expression-wrappers': 7.27.1
- '@babel/plugin-transform-optional-chaining': 7.28.6(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7
+ '@babel/plugin-transform-optional-chaining': 7.28.6(@babel/[email protected])
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
- '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/[email protected])':
+ '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/[email protected])':
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
dependencies:
@@ -8018,15 +7560,15 @@ snapshots:
'@babel/core': 7.29.7
'@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
@@ -8093,441 +7635,442 @@ snapshots:
'@babel/core': 7.29.7
'@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-remap-async-to-generator': 7.27.1(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-remap-async-to-generator': 7.27.1(@babel/[email protected])
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-imports': 7.28.6
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-remap-async-to-generator': 7.27.1(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-module-imports': 7.29.7
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-remap-async-to-generator': 7.27.1(@babel/[email protected])
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-compilation-targets': 7.29.7
'@babel/helper-globals': 7.29.7
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-replace-supers': 7.28.6(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-replace-supers': 7.28.6(@babel/[email protected])
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/template': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/plugin-transform-destructuring': 7.28.5(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/plugin-transform-destructuring': 7.28.5(@babel/[email protected])
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-skip-transparent-expression-wrappers': 7.27.1
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-compilation-targets': 7.29.7
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/helper-validator-identifier': 7.29.7
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-compilation-targets': 7.29.7
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/plugin-transform-destructuring': 7.28.5(@babel/[email protected])
- '@babel/plugin-transform-parameters': 7.27.7(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/plugin-transform-destructuring': 7.28.5(@babel/[email protected])
+ '@babel/plugin-transform-parameters': 7.27.7(@babel/[email protected])
'@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-replace-supers': 7.28.6(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-replace-supers': 7.28.6(@babel/[email protected])
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-skip-transparent-expression-wrappers': 7.27.1
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
'@babel/helper-annotate-as-pure': 7.27.3
- '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/helper-create-class-features-plugin': 7.28.6(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-module-imports': 7.28.6
- '@babel/helper-plugin-utils': 7.28.6
- babel-plugin-polyfill-corejs2: 0.4.15(@babel/[email protected])
- babel-plugin-polyfill-corejs3: 0.13.0(@babel/[email protected])
- babel-plugin-polyfill-regenerator: 0.6.6(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-module-imports': 7.29.7
+ '@babel/helper-plugin-utils': 7.29.7
+ babel-plugin-polyfill-corejs2: 0.4.15(@babel/[email protected])
+ babel-plugin-polyfill-corejs3: 0.13.0(@babel/[email protected])
+ babel-plugin-polyfill-regenerator: 0.6.6(@babel/[email protected])
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-skip-transparent-expression-wrappers': 7.27.1
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-create-regexp-features-plugin': 7.28.5(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
dependencies:
- '@babel/compat-data': 7.29.0
- '@babel/core': 7.28.5
+ '@babel/compat-data': 7.29.7
+ '@babel/core': 7.29.0
'@babel/helper-compilation-targets': 7.29.7
- '@babel/helper-plugin-utils': 7.28.6
- '@babel/helper-validator-option': 7.27.1
- '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.28.5(@babel/[email protected])
- '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.27.1(@babel/[email protected])
- '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.27.1(@babel/[email protected])
- '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.27.1(@babel/[email protected])
- '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.28.6(@babel/[email protected])
- '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/[email protected])
- '@babel/plugin-syntax-import-assertions': 7.28.6(@babel/[email protected])
- '@babel/plugin-syntax-import-attributes': 7.28.6(@babel/[email protected])
- '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/[email protected])
- '@babel/plugin-transform-arrow-functions': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-async-generator-functions': 7.28.0(@babel/[email protected])
- '@babel/plugin-transform-async-to-generator': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-block-scoped-functions': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-block-scoping': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-class-properties': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-class-static-block': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-classes': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-computed-properties': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-destructuring': 7.28.5(@babel/[email protected])
- '@babel/plugin-transform-dotall-regex': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-duplicate-keys': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.29.0(@babel/[email protected])
- '@babel/plugin-transform-dynamic-import': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-explicit-resource-management': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-exponentiation-operator': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-export-namespace-from': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-for-of': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-function-name': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-json-strings': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-literals': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-logical-assignment-operators': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-member-expression-literals': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-modules-amd': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-modules-commonjs': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-modules-systemjs': 7.29.4(@babel/[email protected])
- '@babel/plugin-transform-modules-umd': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-named-capturing-groups-regex': 7.29.0(@babel/[email protected])
- '@babel/plugin-transform-new-target': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-nullish-coalescing-operator': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-numeric-separator': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-object-rest-spread': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-object-super': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-optional-catch-binding': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-optional-chaining': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-parameters': 7.27.7(@babel/[email protected])
- '@babel/plugin-transform-private-methods': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-private-property-in-object': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-property-literals': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-regenerator': 7.29.0(@babel/[email protected])
- '@babel/plugin-transform-regexp-modifiers': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-reserved-words': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-shorthand-properties': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-spread': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-sticky-regex': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-template-literals': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-typeof-symbol': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-escapes': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-property-regex': 7.28.6(@babel/[email protected])
- '@babel/plugin-transform-unicode-regex': 7.27.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-sets-regex': 7.28.6(@babel/[email protected])
- '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/[email protected])
- babel-plugin-polyfill-corejs2: 0.4.15(@babel/[email protected])
- babel-plugin-polyfill-corejs3: 0.13.0(@babel/[email protected])
- babel-plugin-polyfill-regenerator: 0.6.6(@babel/[email protected])
+ '@babel/helper-plugin-utils': 7.29.7
+ '@babel/helper-validator-option': 7.29.7
+ '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.28.5(@babel/[email protected])
+ '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.27.1(@babel/[email protected])
+ '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.27.1(@babel/[email protected])
+ '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array': 7.29.7(@babel/[email protected])
+ '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.27.1(@babel/[email protected])
+ '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.28.6(@babel/[email protected])
+ '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/[email protected])
+ '@babel/plugin-syntax-import-assertions': 7.28.6(@babel/[email protected])
+ '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/[email protected])
+ '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/[email protected])
+ '@babel/plugin-transform-arrow-functions': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-async-generator-functions': 7.29.0(@babel/[email protected])
+ '@babel/plugin-transform-async-to-generator': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-block-scoped-functions': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-block-scoping': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-class-properties': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-class-static-block': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-classes': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-computed-properties': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-destructuring': 7.28.5(@babel/[email protected])
+ '@babel/plugin-transform-dotall-regex': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-duplicate-keys': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.29.0(@babel/[email protected])
+ '@babel/plugin-transform-dynamic-import': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-explicit-resource-management': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-exponentiation-operator': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-export-namespace-from': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-for-of': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-function-name': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-json-strings': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-literals': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-logical-assignment-operators': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-member-expression-literals': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-amd': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-commonjs': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-modules-systemjs': 7.29.4(@babel/[email protected])
+ '@babel/plugin-transform-modules-umd': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-named-capturing-groups-regex': 7.29.0(@babel/[email protected])
+ '@babel/plugin-transform-new-target': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-nullish-coalescing-operator': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-numeric-separator': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-object-rest-spread': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-object-super': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-optional-catch-binding': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-optional-chaining': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-parameters': 7.27.7(@babel/[email protected])
+ '@babel/plugin-transform-private-methods': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-private-property-in-object': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-property-literals': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-regenerator': 7.29.0(@babel/[email protected])
+ '@babel/plugin-transform-regexp-modifiers': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-reserved-words': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-shorthand-properties': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-spread': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-sticky-regex': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-template-literals': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-typeof-symbol': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-escapes': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-property-regex': 7.28.6(@babel/[email protected])
+ '@babel/plugin-transform-unicode-regex': 7.27.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-sets-regex': 7.28.6(@babel/[email protected])
+ '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/[email protected])
+ babel-plugin-polyfill-corejs2: 0.4.15(@babel/[email protected])
+ babel-plugin-polyfill-corejs3: 0.14.2(@babel/[email protected])
+ babel-plugin-polyfill-regenerator: 0.6.6(@babel/[email protected])
core-js-compat: 3.48.0
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-plugin-utils': 7.28.6
+ '@babel/core': 7.29.0
+ '@babel/helper-plugin-utils': 7.29.7
'@babel/types': 7.29.7
esutils: 2.0.3
- '@babel/[email protected]': {}
+ '@babel/[email protected]': {}
dependencies:
@@ -8559,7 +8102,7 @@ snapshots:
'@actions/core': 3.0.1
'@actions/github': 9.1.1
chalk: 4.1.2
- semver: 7.8.1
+ semver: 7.8.5
unplugin: 1.16.1
zod: 3.25.76
@@ -8595,7 +8138,7 @@ snapshots:
'@ctrl/[email protected]': {}
- '@discoveryjs/[email protected]': {}
+ '@discoveryjs/[email protected]': {}
'@emnapi/[email protected]':
dependencies:
@@ -8613,243 +8156,165 @@ snapshots:
tslib: 2.8.1
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
dependencies:
- eslint: 10.5.0([email protected])
+ eslint: 10.5.0([email protected])
eslint-visitor-keys: 3.4.3
'@eslint-community/[email protected]': {}
@@ -8902,128 +8367,129 @@ snapshots:
'@humanwhocodes/[email protected]': {}
- '@inquirer/[email protected]': {}
+ '@inquirer/[email protected]': {}
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/ansi': 1.0.2
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/figures': 1.0.15
- '@inquirer/type': 3.0.10(@types/[email protected])
- yoctocolors-cjs: 2.1.3
+ '@inquirer/ansi': 2.0.7
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/figures': 2.0.7
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/ansi': 1.0.2
- '@inquirer/figures': 1.0.15
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 26.0.0
+
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/ansi': 2.0.7
+ '@inquirer/figures': 2.0.7
+ '@inquirer/type': 4.0.7(@types/[email protected])
cli-width: 4.1.0
- mute-stream: 2.0.0
+ fast-wrap-ansi: 0.2.2
+ mute-stream: 3.0.0
signal-exit: 4.1.0
- wrap-ansi: 6.2.0
- yoctocolors-cjs: 2.1.3
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/external-editor': 1.0.3(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/external-editor': 3.0.3(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
- yoctocolors-cjs: 2.1.3
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
chardet: 2.1.1
iconv-lite: 0.7.2
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected]': {}
+ '@inquirer/[email protected]': {}
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/ansi': 1.0.2
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/ansi': 2.0.7
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
- dependencies:
- '@inquirer/checkbox': 4.3.2(@types/[email protected])
- '@inquirer/confirm': 5.1.21(@types/[email protected])
- '@inquirer/editor': 4.2.23(@types/[email protected])
- '@inquirer/expand': 4.0.23(@types/[email protected])
- '@inquirer/input': 4.3.1(@types/[email protected])
- '@inquirer/number': 3.0.23(@types/[email protected])
- '@inquirer/password': 4.0.23(@types/[email protected])
- '@inquirer/rawlist': 4.1.11(@types/[email protected])
- '@inquirer/search': 3.2.2(@types/[email protected])
- '@inquirer/select': 4.4.2(@types/[email protected])
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/checkbox': 5.2.1(@types/[email protected])
+ '@inquirer/confirm': 6.1.1(@types/[email protected])
+ '@inquirer/editor': 5.2.2(@types/[email protected])
+ '@inquirer/expand': 5.1.1(@types/[email protected])
+ '@inquirer/input': 5.1.2(@types/[email protected])
+ '@inquirer/number': 4.1.1(@types/[email protected])
+ '@inquirer/password': 5.1.1(@types/[email protected])
+ '@inquirer/rawlist': 5.3.1(@types/[email protected])
+ '@inquirer/search': 4.2.1(@types/[email protected])
+ '@inquirer/select': 5.2.1(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
- yoctocolors-cjs: 2.1.3
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/figures': 1.0.15
- '@inquirer/type': 3.0.10(@types/[email protected])
- yoctocolors-cjs: 2.1.3
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/figures': 2.0.7
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/ansi': 1.0.2
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/figures': 1.0.15
- '@inquirer/type': 3.0.10(@types/[email protected])
- yoctocolors-cjs: 2.1.3
+ '@inquirer/ansi': 2.0.7
+ '@inquirer/core': 11.2.1(@types/[email protected])
+ '@inquirer/figures': 2.0.7
+ '@inquirer/type': 4.0.7(@types/[email protected])
optionalDependencies:
'@types/node': 26.0.0
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
optionalDependencies:
'@types/node': 26.0.0
@@ -9059,7 +8525,7 @@ snapshots:
jest-util: 30.4.1
slash: 3.0.0
dependencies:
'@jest/console': 30.4.1
'@jest/pattern': 30.4.0
@@ -9075,7 +8541,7 @@ snapshots:
fast-json-stable-stringify: 2.1.0
graceful-fs: 4.2.11
jest-changed-files: 30.4.1
jest-haste-map: 30.4.1
jest-message-util: 30.4.1
jest-regex-util: 30.4.0
@@ -9430,57 +8896,36 @@ snapshots:
'@leichtgewicht/[email protected]': {}
dependencies:
- '@inquirer/prompts': 7.10.1(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
- listr2: 9.0.5
+ '@inquirer/prompts': 8.4.2(@types/[email protected])
+ '@inquirer/type': 4.0.7(@types/[email protected])
+ listr2: 10.2.1
transitivePeerDependencies:
- '@types/node'
- optional: true
-
- optional: true
-
optional: true
optional: true
optional: true
optional: true
optional: true
optional: true
optional: true
- optional: true
-
- optional: true
-
- optional: true
-
- optional: true
-
- optional: true
-
- '@modelcontextprotocol/[email protected]([email protected])':
+ '@modelcontextprotocol/[email protected]([email protected])':
dependencies:
'@hono/node-server': 1.19.14([email protected])
ajv: 8.20.0
@@ -9497,8 +8942,8 @@ snapshots:
json-schema-typed: 8.0.2
pkce-challenge: 5.0.1
raw-body: 3.0.2
- zod: 4.3.6
- zod-to-json-schema: 3.25.2([email protected])
+ zod: 4.4.2
+ zod-to-json-schema: 3.25.2([email protected])
transitivePeerDependencies:
- supports-color
@@ -9647,37 +9092,39 @@ snapshots:
'@tybys/wasm-util': 0.10.2
optional: true
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
- '@angular/localize': 21.2.14(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
+ '@angular/localize': 22.0.5(@angular/[email protected](@angular/[email protected])([email protected]))(@angular/[email protected])
'@popperjs/core': 2.11.8
rxjs: 7.8.2
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
- '@ngneat/[email protected](ad2c8ff51b8ef8626e139c84727a024d)':
- dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ : dependencies:
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
lodash-es: 4.17.21
rxjs: 7.8.2
tslib: 2.8.1
dependencies:
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- typescript: 5.9.3
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ typescript: 6.0.3
+
+ '@noble/[email protected]': {}
'@npmcli/[email protected]':
dependencies:
@@ -9691,7 +9138,7 @@ snapshots:
'@npmcli/[email protected]':
dependencies:
- semver: 7.7.4
+ semver: 7.8.5
'@npmcli/[email protected]':
dependencies:
@@ -9701,7 +9148,7 @@ snapshots:
lru-cache: 11.5.1
npm-pick-manifest: 11.0.3
proc-log: 6.1.0
- semver: 7.7.4
+ semver: 7.8.5
which: 6.0.1
'@npmcli/[email protected]':
@@ -9718,7 +9165,7 @@ snapshots:
hosted-git-info: 9.0.3
json-parse-even-better-errors: 5.0.0
proc-log: 6.1.0
- semver: 7.7.4
+ semver: 7.8.5
spdx-expression-parse: 4.0.0
'@npmcli/[email protected]':
@@ -9787,10 +9234,6 @@ snapshots:
dependencies:
'@octokit/openapi-types': 27.0.0
- '@oxc-project/[email protected]': {}
-
- '@oxc-project/[email protected]': {}
-
'@parcel/[email protected]':
optional: true
@@ -9852,189 +9295,267 @@ snapshots:
'@parcel/watcher-win32-x64': 2.5.6
optional: true
- '@pkgjs/[email protected]':
- optional: true
-
- '@pkgr/[email protected]': {}
-
- '@playwright/[email protected]':
+ '@peculiar/[email protected]':
dependencies:
- playwright: 1.61.1
-
- '@popperjs/[email protected]': {}
-
- '@rolldown/[email protected]':
- optional: true
-
- '@rolldown/[email protected]':
- optional: true
-
- '@rolldown/[email protected]':
- optional: true
-
- '@rolldown/[email protected]':
- optional: true
-
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ '@peculiar/asn1-x509-attr': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-cms': 2.8.0
+ '@peculiar/asn1-pkcs8': 2.8.0
+ '@peculiar/asn1-rsa': 2.8.0
+ '@peculiar/asn1-schema': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-cms': 2.8.0
+ '@peculiar/asn1-pfx': 2.8.0
+ '@peculiar/asn1-pkcs8': 2.8.0
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ '@peculiar/asn1-x509-attr': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/utils': 2.0.3
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/utils': 2.0.3
+ asn1js: 3.0.10
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ tslib: 2.8.1
- '@rolldown/[email protected]':
- optional: true
+ '@peculiar/[email protected]':
+ dependencies:
+ '@peculiar/asn1-cms': 2.8.0
+ '@peculiar/asn1-csr': 2.8.0
+ '@peculiar/asn1-ecc': 2.8.0
+ '@peculiar/asn1-pkcs9': 2.8.0
+ '@peculiar/asn1-rsa': 2.8.0
+ '@peculiar/asn1-schema': 2.8.0
+ '@peculiar/asn1-x509': 2.8.0
+ pvtsutils: 1.3.6
+ reflect-metadata: 0.2.2
+ tslib: 2.8.1
+ tsyringe: 4.10.0
- '@rolldown/[email protected]':
+ '@pkgjs/[email protected]':
optional: true
- '@rolldown/[email protected]':
- optional: true
+ '@pkgr/[email protected]': {}
- '@rolldown/[email protected]':
- optional: true
+ '@playwright/[email protected]':
+ dependencies:
+ playwright: 1.61.1
- '@rolldown/[email protected]':
- optional: true
+ '@popperjs/[email protected]': {}
- dependencies:
- '@napi-rs/wasm-runtime': 1.1.4(@emnapi/[email protected])(@emnapi/[email protected])
- transitivePeerDependencies:
- - '@emnapi/core'
- - '@emnapi/runtime'
+ '@rollup/[email protected]':
optional: true
- dependencies:
- '@napi-rs/wasm-runtime': 1.1.4(@emnapi/[email protected])(@emnapi/[email protected])
- transitivePeerDependencies:
- - '@emnapi/core'
- - '@emnapi/runtime'
+ '@rollup/[email protected]':
optional: true
- '@rolldown/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rolldown/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rolldown/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rolldown/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rolldown/[email protected]': {}
-
- '@rolldown/[email protected]': {}
-
- '@rollup/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rollup/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rollup/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rollup/[email protected]':
+ '@rollup/[email protected]':
optional: true
- '@rollup/[email protected]':
+ '@rollup/[email protected]':
optional: true
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
+ '@rollup/[email protected]':
+ optional: true
+
'@rollup/[email protected]':
optional: true
dependencies:
- '@angular-devkit/core': 21.2.12([email protected])
- '@angular-devkit/schematics': 21.2.12([email protected])
+ '@angular-devkit/core': 22.0.5([email protected])
+ '@angular-devkit/schematics': 22.0.5([email protected])
jsonc-parser: 3.3.1
+ typescript: 6.0.3
transitivePeerDependencies:
- chokidar
@@ -10155,6 +9676,8 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
@@ -10202,10 +9725,6 @@ snapshots:
'@types/[email protected]': {}
- '@types/[email protected]':
- dependencies:
- '@types/node': 26.0.0
-
dependencies:
undici-types: 8.3.0
@@ -10253,40 +9772,40 @@ snapshots:
dependencies:
'@types/yargs-parser': 21.0.3
dependencies:
'@eslint-community/regexpp': 4.12.2
- '@typescript-eslint/parser': 8.62.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/parser': 8.62.0([email protected]([email protected]))([email protected])
'@typescript-eslint/scope-manager': 8.62.0
- '@typescript-eslint/type-utils': 8.62.0([email protected]([email protected]))([email protected])
- '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/type-utils': 8.62.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
'@typescript-eslint/visitor-keys': 8.62.0
- eslint: 10.5.0([email protected])
+ eslint: 10.5.0([email protected])
ignore: 7.0.5
natural-compare: 1.4.0
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
dependencies:
'@typescript-eslint/scope-manager': 8.62.0
'@typescript-eslint/types': 8.62.0
- '@typescript-eslint/typescript-estree': 8.62.0([email protected])
+ '@typescript-eslint/typescript-estree': 8.62.0([email protected])
'@typescript-eslint/visitor-keys': 8.62.0
debug: 4.4.3
- eslint: 10.5.0([email protected])
- typescript: 5.9.3
+ eslint: 10.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/[email protected]([email protected])':
+ '@typescript-eslint/[email protected]([email protected])':
dependencies:
- '@typescript-eslint/tsconfig-utils': 8.62.0([email protected])
+ '@typescript-eslint/tsconfig-utils': 8.62.0([email protected])
'@typescript-eslint/types': 8.62.0
debug: 4.4.3
- typescript: 5.9.3
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -10295,47 +9814,47 @@ snapshots:
'@typescript-eslint/types': 8.62.0
'@typescript-eslint/visitor-keys': 8.62.0
- '@typescript-eslint/[email protected]([email protected])':
+ '@typescript-eslint/[email protected]([email protected])':
dependencies:
- typescript: 5.9.3
+ typescript: 6.0.3
dependencies:
'@typescript-eslint/types': 8.62.0
- '@typescript-eslint/typescript-estree': 8.62.0([email protected])
- '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/typescript-estree': 8.62.0([email protected])
+ '@typescript-eslint/utils': 8.62.0([email protected]([email protected]))([email protected])
debug: 4.4.3
- eslint: 10.5.0([email protected])
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ eslint: 10.5.0([email protected])
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/[email protected]': {}
- '@typescript-eslint/[email protected]([email protected])':
+ '@typescript-eslint/[email protected]([email protected])':
dependencies:
- '@typescript-eslint/project-service': 8.62.0([email protected])
- '@typescript-eslint/tsconfig-utils': 8.62.0([email protected])
+ '@typescript-eslint/project-service': 8.62.0([email protected])
+ '@typescript-eslint/tsconfig-utils': 8.62.0([email protected])
'@typescript-eslint/types': 8.62.0
'@typescript-eslint/visitor-keys': 8.62.0
debug: 4.4.3
minimatch: 10.2.5
semver: 7.8.5
tinyglobby: 0.2.17
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
dependencies:
- '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
'@typescript-eslint/scope-manager': 8.62.0
'@typescript-eslint/types': 8.62.0
- '@typescript-eslint/typescript-estree': 8.62.0([email protected])
- eslint: 10.5.0([email protected])
- typescript: 5.9.3
+ '@typescript-eslint/typescript-estree': 8.62.0([email protected])
+ eslint: 10.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -10416,13 +9935,9 @@ snapshots:
optional: true
- dependencies:
-
dependencies:
'@webassemblyjs/[email protected]':
dependencies:
@@ -10543,18 +10058,12 @@ snapshots:
+
optionalDependencies:
ajv: 8.20.0
- optionalDependencies:
- ajv: 8.17.1
-
- optionalDependencies:
- ajv: 8.18.0
-
optionalDependencies:
ajv: 8.20.0
@@ -10571,20 +10080,6 @@ snapshots:
json-schema-traverse: 0.4.1
uri-js: 4.4.1
- dependencies:
- fast-deep-equal: 3.1.3
- fast-uri: 3.1.2
- json-schema-traverse: 1.0.0
- require-from-string: 2.0.2
-
- dependencies:
- fast-deep-equal: 3.1.3
- fast-uri: 3.1.2
- json-schema-traverse: 1.0.0
- require-from-string: 2.0.2
-
dependencies:
fast-deep-equal: 3.1.3
@@ -10592,22 +10087,22 @@ snapshots:
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
- dependencies:
- '@algolia/abtesting': 1.14.1
- '@algolia/client-abtesting': 5.48.1
- '@algolia/client-analytics': 5.48.1
- '@algolia/client-common': 5.48.1
- '@algolia/client-insights': 5.48.1
- '@algolia/client-personalization': 5.48.1
- '@algolia/client-query-suggestions': 5.48.1
- '@algolia/client-search': 5.48.1
- '@algolia/ingestion': 1.48.1
- '@algolia/monitoring': 1.48.1
- '@algolia/recommend': 5.48.1
- '@algolia/requester-browser-xhr': 5.48.1
- '@algolia/requester-fetch': 5.48.1
- '@algolia/requester-node-http': 5.48.1
+ dependencies:
+ '@algolia/abtesting': 1.18.0
+ '@algolia/client-abtesting': 5.52.0
+ '@algolia/client-analytics': 5.52.0
+ '@algolia/client-common': 5.52.0
+ '@algolia/client-insights': 5.52.0
+ '@algolia/client-personalization': 5.52.0
+ '@algolia/client-query-suggestions': 5.52.0
+ '@algolia/client-search': 5.52.0
+ '@algolia/ingestion': 1.52.0
+ '@algolia/monitoring': 1.52.0
+ '@algolia/recommend': 5.52.0
+ '@algolia/requester-browser-xhr': 5.52.0
+ '@algolia/requester-fetch': 5.52.0
+ '@algolia/requester-node-http': 5.52.0
@@ -10650,13 +10145,19 @@ snapshots:
+ dependencies:
+ pvtsutils: 1.3.6
+ pvutils: 1.1.5
+ tslib: 2.8.1
+
dependencies:
browserslist: 4.28.2
caniuse-lite: 1.0.30001793
fraction.js: 5.3.4
picocolors: 1.1.1
- postcss: 8.5.6
+ postcss: 8.5.13
postcss-value-parser: 4.2.0
@@ -10674,11 +10175,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
+ '@babel/core': 7.29.0
find-up: 5.0.0
+ optionalDependencies:
dependencies:
@@ -10694,27 +10196,35 @@ snapshots:
dependencies:
'@types/babel__core': 7.20.5
dependencies:
- '@babel/compat-data': 7.29.0
- '@babel/core': 7.28.5
- '@babel/helper-define-polyfill-provider': 0.6.6(@babel/[email protected])
+ '@babel/compat-data': 7.29.7
+ '@babel/core': 7.29.0
+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])
semver: 6.3.1
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@babel/core': 7.29.0
+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])
+ core-js-compat: 3.48.0
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-define-polyfill-provider': 0.6.6(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])
core-js-compat: 3.48.0
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.28.5
- '@babel/helper-define-polyfill-provider': 0.6.6(@babel/[email protected])
+ '@babel/core': 7.29.0
+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])
transitivePeerDependencies:
- supports-color
@@ -10754,18 +10264,7 @@ snapshots:
- dependencies:
- css-select: 6.0.0
- css-what: 7.0.0
- dom-serializer: 2.0.0
- domhandler: 5.0.3
- htmlparser2: 10.1.0
- picocolors: 1.1.1
- postcss: 8.5.6
- postcss-media-query-parser: 0.2.3
-
dependencies:
css-select: 6.0.0
css-what: 7.0.0
@@ -10879,6 +10378,8 @@ snapshots:
+
dependencies:
'@npmcli/fs': 5.0.0
@@ -11044,18 +10545,18 @@ snapshots:
dependencies:
- is-what: 3.14.1
+ is-what: 4.1.16
dependencies:
glob-parent: 6.0.2
normalize-path: 3.0.0
schema-utils: 4.3.3
- serialize-javascript: 6.0.2
- tinyglobby: 0.2.15
+ serialize-javascript: 7.0.7
+ tinyglobby: 0.2.17
dependencies:
@@ -11068,14 +10569,14 @@ snapshots:
object-assign: 4.1.1
vary: 1.1.2
dependencies:
env-paths: 2.2.1
import-fresh: 3.3.1
js-yaml: 4.1.1
parse-json: 5.2.0
optionalDependencies:
- typescript: 5.9.3
+ typescript: 6.0.3
@@ -11085,18 +10586,18 @@ snapshots:
shebang-command: 2.0.0
which: 2.0.2
dependencies:
- icss-utils: 5.1.0([email protected])
- postcss: 8.5.6
- postcss-modules-extract-imports: 3.1.0([email protected])
- postcss-modules-local-by-default: 4.2.0([email protected])
- postcss-modules-scope: 3.2.1([email protected])
- postcss-modules-values: 4.0.0([email protected])
+ icss-utils: 5.1.0([email protected])
+ postcss: 8.5.15
+ postcss-modules-extract-imports: 3.1.0([email protected])
+ postcss-modules-local-by-default: 4.2.0([email protected])
+ postcss-modules-scope: 3.2.1([email protected])
+ postcss-modules-values: 4.0.0([email protected])
postcss-value-parser: 4.2.0
- semver: 7.7.3
+ semver: 7.8.5
optionalDependencies:
dependencies:
@@ -11243,8 +10744,6 @@ snapshots:
-
dependencies:
prr: 1.0.1
@@ -11264,39 +10763,8 @@ snapshots:
dependencies:
es-errors: 1.3.0
-
- optionalDependencies:
- '@esbuild/aix-ppc64': 0.27.2
- '@esbuild/android-arm': 0.27.2
- '@esbuild/android-arm64': 0.27.2
- '@esbuild/android-x64': 0.27.2
- '@esbuild/darwin-arm64': 0.27.2
- '@esbuild/darwin-x64': 0.27.2
- '@esbuild/freebsd-arm64': 0.27.2
- '@esbuild/freebsd-x64': 0.27.2
- '@esbuild/linux-arm': 0.27.2
- '@esbuild/linux-arm64': 0.27.2
- '@esbuild/linux-ia32': 0.27.2
- '@esbuild/linux-loong64': 0.27.2
- '@esbuild/linux-mips64el': 0.27.2
- '@esbuild/linux-ppc64': 0.27.2
- '@esbuild/linux-riscv64': 0.27.2
- '@esbuild/linux-s390x': 0.27.2
- '@esbuild/linux-x64': 0.27.2
- '@esbuild/netbsd-arm64': 0.27.2
- '@esbuild/netbsd-x64': 0.27.2
- '@esbuild/openbsd-arm64': 0.27.2
- '@esbuild/openbsd-x64': 0.27.2
- '@esbuild/openharmony-arm64': 0.27.2
- '@esbuild/sunos-x64': 0.27.2
- '@esbuild/win32-arm64': 0.27.2
- '@esbuild/win32-ia32': 0.27.2
- '@esbuild/win32-x64': 0.27.2
-
optionalDependencies:
'@esbuild/aix-ppc64': 0.27.3
@@ -11354,7 +10822,6 @@ snapshots:
'@esbuild/win32-arm64': 0.28.1
'@esbuild/win32-ia32': 0.28.1
'@esbuild/win32-x64': 0.28.1
- optional: true
@@ -11380,9 +10847,9 @@ snapshots:
dependencies:
- '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
'@eslint-community/regexpp': 4.12.2
'@eslint/config-array': 0.23.5
'@eslint/config-helpers': 0.6.0
@@ -11413,7 +10880,7 @@ snapshots:
natural-compare: 1.4.0
optionator: 0.9.4
optionalDependencies:
- jiti: 2.6.1
+ jiti: 2.7.0
transitivePeerDependencies:
- supports-color
@@ -11572,8 +11039,18 @@ snapshots:
+
+ dependencies:
+ fast-string-truncated-width: 3.0.3
+
+ dependencies:
+ fast-string-width: 3.0.2
+
dependencies:
websocket-driver: 0.7.4
@@ -11582,10 +11059,6 @@ snapshots:
dependencies:
bser: 2.1.1
- optionalDependencies:
- picomatch: 4.0.3
-
optionalDependencies:
picomatch: 4.0.4
@@ -11704,6 +11177,10 @@ snapshots:
+ dependencies:
+ resolve-pkg-maps: 1.0.0
+
optional: true
@@ -11764,10 +11241,6 @@ snapshots:
- dependencies:
- function-bind: 1.1.2
-
dependencies:
function-bind: 1.1.2
@@ -11865,6 +11338,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ agent-base: 9.0.0
+ debug: 4.4.3
+ transitivePeerDependencies:
+ - supports-color
+
@@ -11881,9 +11361,9 @@ snapshots:
dependencies:
safer-buffer: 2.1.2
dependencies:
- postcss: 8.5.6
+ postcss: 8.5.15
optional: true
@@ -11939,7 +11419,7 @@ snapshots:
dependencies:
- hasown: 2.0.2
+ hasown: 2.0.4
@@ -11985,7 +11465,7 @@ snapshots:
dependencies:
@@ -12003,11 +11483,11 @@ snapshots:
dependencies:
- '@babel/core': 7.29.0
+ '@babel/core': 7.29.7
'@babel/parser': 7.29.7
'@istanbuljs/schema': 0.1.6
istanbul-lib-coverage: 3.2.2
- semver: 7.7.4
+ semver: 7.8.5
transitivePeerDependencies:
- supports-color
@@ -12068,15 +11548,15 @@ snapshots:
- babel-plugin-macros
- supports-color
dependencies:
'@jest/test-result': 30.4.1
'@jest/types': 30.4.1
chalk: 4.1.2
exit-x: 0.2.2
import-local: 3.2.0
jest-util: 30.4.1
jest-validate: 30.4.1
yargs: 17.7.2
@@ -12087,7 +11567,7 @@ snapshots:
- supports-color
- ts-node
dependencies:
'@babel/core': 7.29.7
'@jest/get-type': 30.1.0
@@ -12114,7 +11594,7 @@ snapshots:
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 26.0.0
- ts-node: 10.9.2(@types/[email protected])([email protected])
+ ts-node: 10.9.2(@types/[email protected])([email protected])
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -12258,44 +11738,20 @@ snapshots:
optionalDependencies:
jest-resolve: 30.4.1
- [email protected](e96fadfc92734847d5b251a1c2992786):
- dependencies:
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
- '@jest/environment-jsdom-abstract': 30.4.1([email protected])([email protected]([email protected]))
- bs-logger: 0.2.6
- esbuild-wasm: 0.28.1
- jest-util: 30.4.1
- jsdom: 26.1.0([email protected])
- pretty-format: 30.4.1
- typescript: 5.9.3
- optionalDependencies:
- esbuild: 0.28.1
- transitivePeerDependencies:
- - '@babel/core'
- - '@jest/transform'
- - '@jest/types'
- - babel-jest
- - canvas
-
dependencies:
- '@angular/compiler-cli': 21.2.14(@angular/[email protected])([email protected])
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/compiler-cli': 22.0.5(@angular/[email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
'@jest/environment-jsdom-abstract': 30.4.1([email protected])([email protected]([email protected]))
bs-logger: 0.2.6
esbuild-wasm: 0.28.1
jest-util: 30.4.1
jsdom: 26.1.0([email protected])
pretty-format: 30.4.1
- typescript: 5.9.3
+ typescript: 6.0.3
optionalDependencies:
esbuild: 0.28.1
transitivePeerDependencies:
@@ -12464,12 +11920,12 @@ snapshots:
merge-stream: 2.0.0
supports-color: 8.1.1
dependencies:
'@jest/types': 30.4.1
import-local: 3.2.0
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
@@ -12477,7 +11933,7 @@ snapshots:
- supports-color
- ts-node
@@ -12560,17 +12016,16 @@ snapshots:
picocolors: 1.1.1
shell-quote: 1.8.3
dependencies:
- less: 4.4.2
+ less: 4.6.4
optionalDependencies:
dependencies:
- copy-anything: 2.0.6
+ copy-anything: 3.0.5
parse-node-version: 1.0.1
- tslib: 2.8.1
optionalDependencies:
errno: 0.1.8
graceful-fs: 4.2.11
@@ -12587,41 +12042,23 @@ snapshots:
prelude-ls: 1.2.1
type-check: 0.4.0
dependencies:
webpack-sources: 3.5.0
optionalDependencies:
dependencies:
cli-truncate: 5.2.0
- colorette: 2.0.20
eventemitter3: 5.0.4
log-update: 6.1.0
rfdc: 1.4.1
- wrap-ansi: 9.0.2
-
- dependencies:
- msgpackr: 1.11.12
- node-addon-api: 6.1.0
- node-gyp-build-optional-packages: 5.2.2
- ordered-binary: 1.6.1
- weak-lru-cache: 1.2.2
- optionalDependencies:
- '@lmdb/lmdb-darwin-arm64': 3.4.4
- '@lmdb/lmdb-darwin-x64': 3.4.4
- '@lmdb/lmdb-linux-arm': 3.4.4
- '@lmdb/lmdb-linux-arm64': 3.4.4
- '@lmdb/lmdb-linux-x64': 3.4.4
- '@lmdb/lmdb-win32-arm64': 3.4.4
- '@lmdb/lmdb-win32-x64': 3.4.4
- optional: true
+ wrap-ansi: 10.0.0
dependencies:
'@harperfast/extended-iterable': 1.0.3
msgpackr: 1.11.12
@@ -12630,13 +12067,13 @@ snapshots:
ordered-binary: 1.6.1
weak-lru-cache: 1.2.2
optionalDependencies:
- '@lmdb/lmdb-darwin-arm64': 3.5.1
- '@lmdb/lmdb-darwin-x64': 3.5.1
- '@lmdb/lmdb-linux-arm': 3.5.1
- '@lmdb/lmdb-linux-arm64': 3.5.1
- '@lmdb/lmdb-linux-x64': 3.5.1
- '@lmdb/lmdb-win32-arm64': 3.5.1
- '@lmdb/lmdb-win32-x64': 3.5.1
+ '@lmdb/lmdb-darwin-arm64': 3.5.4
+ '@lmdb/lmdb-darwin-x64': 3.5.4
+ '@lmdb/lmdb-linux-arm': 3.5.4
+ '@lmdb/lmdb-linux-arm64': 3.5.4
+ '@lmdb/lmdb-linux-x64': 3.5.4
+ '@lmdb/lmdb-win32-arm64': 3.5.4
+ '@lmdb/lmdb-win32-x64': 3.5.4
optional: true
@@ -12787,11 +12224,11 @@ snapshots:
optional: true
dependencies:
schema-utils: 4.3.3
tapable: 2.3.3
@@ -12878,9 +12315,7 @@ snapshots:
dns-packet: 5.6.1
thunky: 1.1.0
-
@@ -12905,46 +12340,46 @@ snapshots:
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
'@ctrl/tinycolor': 4.2.0
material-colors: 1.2.6
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
rxjs: 7.8.2
tslib: 2.8.1
- [email protected](4ccfccfbcf381a309618492b31e99276):
+ [email protected](5d0f9d2d91ce22b3b7a50a70fd62ec66):
dependencies:
- '@angular/core': 21.2.17(@angular/[email protected])([email protected])([email protected])
+ '@angular/core': 22.0.5(@angular/[email protected])([email protected])([email protected])
tslib: 2.8.1
transitivePeerDependencies:
- '@angular/router'
@@ -12961,8 +12396,6 @@ snapshots:
optional: true
-
dependencies:
detect-libc: 2.1.2
@@ -12975,7 +12408,7 @@ snapshots:
graceful-fs: 4.2.11
nopt: 9.0.0
proc-log: 6.1.0
- semver: 7.7.4
+ semver: 7.8.5
tar: 7.5.16
tinyglobby: 0.2.17
undici: 6.26.0
@@ -13001,7 +12434,7 @@ snapshots:
dependencies:
- semver: 7.7.4
+ semver: 7.8.5
@@ -13009,7 +12442,7 @@ snapshots:
dependencies:
hosted-git-info: 9.0.3
proc-log: 6.1.0
- semver: 7.7.4
+ semver: 7.8.5
validate-npm-package-name: 7.0.2
@@ -13022,7 +12455,7 @@ snapshots:
npm-install-checks: 8.0.0
npm-normalize-package-bin: 5.0.0
npm-package-arg: 13.0.2
- semver: 7.7.4
+ semver: 7.8.5
dependencies:
@@ -13096,19 +12529,7 @@ snapshots:
type-check: 0.4.0
word-wrap: 1.2.5
- dependencies:
- chalk: 5.6.2
- cli-cursor: 5.0.0
- cli-spinners: 3.4.0
- is-interactive: 2.0.0
- is-unicode-supported: 2.1.0
- log-symbols: 7.0.1
- stdin-discarder: 0.2.2
- string-width: 8.2.1
- strip-ansi: 7.2.0
-
dependencies:
chalk: 5.6.2
cli-cursor: 5.0.0
@@ -13150,8 +12571,9 @@ snapshots:
dependencies:
+ '@gar/promise-retry': 1.0.3
'@npmcli/git': 7.0.2
'@npmcli/installed-package-contents': 4.0.0
'@npmcli/package-json': 7.0.5
@@ -13165,7 +12587,6 @@ snapshots:
npm-pick-manifest: 11.0.3
npm-registry-fetch: 19.1.1
proc-log: 6.1.0
- promise-retry: 2.0.1
sigstore: 4.1.1
ssri: 13.0.1
tar: 7.5.16
@@ -13187,9 +12608,9 @@ snapshots:
dependencies:
- entities: 6.0.1
+ entities: 8.0.0
parse5: 8.0.1
parse5-sax-parser: 8.0.0
@@ -13237,8 +12658,6 @@ snapshots:
-
@@ -13246,7 +12665,7 @@ snapshots:
optionalDependencies:
'@napi-rs/nice': 1.1.1
@@ -13256,6 +12675,15 @@ snapshots:
dependencies:
find-up: 4.1.0
+ dependencies:
+ '@noble/hashes': 1.4.0
+ asn1js: 3.0.10
+ bytestreamjs: 2.0.1
+ pvtsutils: 1.3.6
+ pvutils: 1.1.5
+ tslib: 2.8.1
+
@@ -13264,39 +12692,39 @@ snapshots:
optionalDependencies:
fsevents: 2.3.2
dependencies:
- cosmiconfig: 9.0.0([email protected])
- jiti: 2.6.1
- postcss: 8.5.6
- semver: 7.7.3
+ cosmiconfig: 9.0.0([email protected])
+ jiti: 2.7.0
+ postcss: 8.5.13
+ semver: 7.8.5
optionalDependencies:
transitivePeerDependencies:
- typescript
dependencies:
- postcss: 8.5.6
+ postcss: 8.5.15
dependencies:
- icss-utils: 5.1.0([email protected])
- postcss: 8.5.6
+ icss-utils: 5.1.0([email protected])
+ postcss: 8.5.15
postcss-selector-parser: 7.1.1
postcss-value-parser: 4.2.0
dependencies:
- postcss: 8.5.6
+ postcss: 8.5.15
postcss-selector-parser: 7.1.1
dependencies:
- icss-utils: 5.1.0([email protected])
- postcss: 8.5.6
+ icss-utils: 5.1.0([email protected])
+ postcss: 8.5.15
dependencies:
@@ -13309,15 +12737,15 @@ snapshots:
dependencies:
nanoid: 3.3.12
picocolors: 1.1.1
source-map-js: 1.2.1
dependencies:
- nanoid: 3.3.11
+ nanoid: 3.3.12
picocolors: 1.1.1
source-map-js: 1.2.1
@@ -13341,10 +12769,10 @@ snapshots:
dependencies:
prettier: 3.4.2
- typescript: 5.9.3
+ typescript: 6.0.3
@@ -13371,11 +12799,6 @@ snapshots:
- dependencies:
- err-code: 2.0.3
- retry: 0.12.0
-
dependencies:
forwarded: 0.2.0
@@ -13394,13 +12817,15 @@ snapshots:
dependencies:
- side-channel: 1.1.0
+ tslib: 2.8.1
+
dependencies:
- safe-buffer: 5.2.1
+ side-channel: 1.1.0
@@ -13493,12 +12918,14 @@ snapshots:
+
dependencies:
adjust-sourcemap-loader: 4.0.0
convert-source-map: 1.9.0
loader-utils: 2.0.4
- postcss: 8.5.6
+ postcss: 8.5.15
source-map: 0.6.1
@@ -13512,55 +12939,40 @@ snapshots:
onetime: 7.0.0
signal-exit: 4.1.0
-
- dependencies:
- '@oxc-project/types': 0.106.0
- '@rolldown/pluginutils': 1.0.0-beta.58
- optionalDependencies:
- '@rolldown/binding-android-arm64': 1.0.0-beta.58
- '@rolldown/binding-darwin-arm64': 1.0.0-beta.58
- '@rolldown/binding-darwin-x64': 1.0.0-beta.58
- '@rolldown/binding-freebsd-x64': 1.0.0-beta.58
- '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.58
- '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.58
- '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.58
- '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.58
- '@rolldown/binding-linux-x64-musl': 1.0.0-beta.58
- '@rolldown/binding-openharmony-arm64': 1.0.0-beta.58
- '@rolldown/binding-wasm32-wasi': 1.0.0-beta.58(@emnapi/[email protected])(@emnapi/[email protected])
- '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.58
- '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.58
- transitivePeerDependencies:
- - '@emnapi/core'
- - '@emnapi/runtime'
-
dependencies:
- '@oxc-project/types': 0.113.0
- '@rolldown/pluginutils': 1.0.0-rc.4
+ '@types/estree': 1.0.8
optionalDependencies:
- '@rolldown/binding-android-arm64': 1.0.0-rc.4
- '@rolldown/binding-darwin-arm64': 1.0.0-rc.4
- '@rolldown/binding-darwin-x64': 1.0.0-rc.4
- '@rolldown/binding-freebsd-x64': 1.0.0-rc.4
- '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.4
- '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.4
- '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.4
- '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.4
- '@rolldown/binding-linux-x64-musl': 1.0.0-rc.4
- '@rolldown/binding-openharmony-arm64': 1.0.0-rc.4
- '@rolldown/binding-wasm32-wasi': 1.0.0-rc.4(@emnapi/[email protected])(@emnapi/[email protected])
- '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.4
- '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.4
- transitivePeerDependencies:
- - '@emnapi/core'
- - '@emnapi/runtime'
+ '@rollup/rollup-android-arm-eabi': 4.60.2
+ '@rollup/rollup-android-arm64': 4.60.2
+ '@rollup/rollup-darwin-arm64': 4.60.2
+ '@rollup/rollup-darwin-x64': 4.60.2
+ '@rollup/rollup-freebsd-arm64': 4.60.2
+ '@rollup/rollup-freebsd-x64': 4.60.2
+ '@rollup/rollup-linux-arm-gnueabihf': 4.60.2
+ '@rollup/rollup-linux-arm-musleabihf': 4.60.2
+ '@rollup/rollup-linux-arm64-gnu': 4.60.2
+ '@rollup/rollup-linux-arm64-musl': 4.60.2
+ '@rollup/rollup-linux-loong64-gnu': 4.60.2
+ '@rollup/rollup-linux-loong64-musl': 4.60.2
+ '@rollup/rollup-linux-ppc64-gnu': 4.60.2
+ '@rollup/rollup-linux-ppc64-musl': 4.60.2
+ '@rollup/rollup-linux-riscv64-gnu': 4.60.2
+ '@rollup/rollup-linux-riscv64-musl': 4.60.2
+ '@rollup/rollup-linux-s390x-gnu': 4.60.2
+ '@rollup/rollup-linux-x64-gnu': 4.60.2
+ '@rollup/rollup-linux-x64-musl': 4.60.2
+ '@rollup/rollup-openbsd-x64': 4.60.2
+ '@rollup/rollup-openharmony-arm64': 4.60.2
+ '@rollup/rollup-win32-arm64-msvc': 4.60.2
+ '@rollup/rollup-win32-ia32-msvc': 4.60.2
+ '@rollup/rollup-win32-x64-gnu': 4.60.2
+ '@rollup/rollup-win32-x64-msvc': 4.60.2
+ fsevents: 2.3.3
dependencies:
@@ -13617,22 +13029,14 @@ snapshots:
dependencies:
neo-async: 2.6.2
optionalDependencies:
- sass: 1.97.1
-
- dependencies:
- chokidar: 4.0.3
- immutable: 5.1.6
- source-map-js: 1.2.1
- optionalDependencies:
- '@parcel/watcher': 2.5.6
+ sass: 1.99.0
dependencies:
chokidar: 4.0.3
immutable: 5.1.6
@@ -13656,21 +13060,19 @@ snapshots:
dependencies:
- '@types/node-forge': 1.3.14
- node-forge: 1.3.3
+ '@peculiar/x509': 1.14.3
+ pkijs: 3.4.0
optional: true
-
@@ -13708,9 +13110,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- dependencies:
- randombytes: 2.1.0
dependencies:
@@ -13851,11 +13251,11 @@ snapshots:
dependencies:
iconv-lite: 0.6.3
source-map-js: 1.2.1
dependencies:
@@ -13915,8 +13315,6 @@ snapshots:
-
@@ -13963,8 +13361,6 @@ snapshots:
dependencies:
ansi-regex: 6.2.2
-
@@ -14017,16 +13413,16 @@ snapshots:
minizlib: 3.1.0
yallist: 5.0.0
dependencies:
'@jridgewell/trace-mapping': 0.3.31
jest-worker: 27.5.1
schema-utils: 4.3.3
terser: 5.48.0
optionalDependencies:
- esbuild: 0.27.2
- postcss: 8.5.6
+ esbuild: 0.28.1
+ postcss: 8.5.13
dependencies:
@@ -14038,7 +13434,7 @@ snapshots:
optionalDependencies:
postcss: 8.5.15
dependencies:
'@jridgewell/source-map': 0.3.11
acorn: 8.17.0
@@ -14048,7 +13444,7 @@ snapshots:
dependencies:
'@jridgewell/source-map': 0.3.11
- acorn: 8.16.0
+ acorn: 8.17.0
commander: 2.20.3
source-map-support: 0.5.21
@@ -14064,7 +13460,7 @@ snapshots:
dependencies:
fdir: 6.5.0([email protected])
picomatch: 4.0.4
@@ -14100,24 +13496,22 @@ snapshots:
dependencies:
tslib: 2.8.1
-
dependencies:
- typescript: 5.9.3
+ typescript: 6.0.3
dependencies:
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
handlebars: 4.7.9
json5: 2.2.3
lodash.memoize: 4.1.2
make-error: 1.3.6
semver: 7.8.5
type-fest: 4.41.0
- typescript: 5.9.3
+ typescript: 6.0.3
yargs-parser: 21.1.1
optionalDependencies:
'@babel/core': 7.29.7
@@ -14127,7 +13521,7 @@ snapshots:
esbuild: 0.28.1
jest-util: 30.4.1
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
@@ -14141,18 +13535,18 @@ snapshots:
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
- typescript: 5.9.3
+ typescript: 6.0.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
- dependencies:
- json5: 2.2.3
- minimist: 1.2.8
- strip-bom: 3.0.0
+ dependencies:
+ tslib: 1.14.1
+
dependencies:
'@tufjs/models': 4.1.0
@@ -14191,7 +13585,7 @@ snapshots:
optional: true
@@ -14200,10 +13594,6 @@ snapshots:
-
-
@@ -14285,38 +13675,38 @@ snapshots:
dependencies:
- esbuild: 0.27.2
- fdir: 6.5.0([email protected])
- picomatch: 4.0.3
- postcss: 8.5.6
+ esbuild: 0.27.3
+ fdir: 6.5.0([email protected])
+ picomatch: 4.0.4
+ postcss: 8.5.15
rollup: 4.61.0
- tinyglobby: 0.2.15
+ tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 26.0.0
fsevents: 2.3.3
- jiti: 2.6.1
- less: 4.4.2
- sass: 1.97.1
- terser: 5.44.1
+ jiti: 2.7.0
+ less: 4.6.4
+ sass: 1.99.0
+ terser: 5.46.2
yaml: 2.7.0
dependencies:
esbuild: 0.27.3
fdir: 6.5.0([email protected])
picomatch: 4.0.4
postcss: 8.5.15
rollup: 4.61.0
- tinyglobby: 0.2.15
+ tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 26.0.0
fsevents: 2.3.3
- jiti: 2.6.1
- less: 4.4.2
- sass: 1.97.3
- terser: 5.44.1
+ jiti: 2.7.0
+ less: 4.6.4
+ sass: 1.99.0
+ terser: 5.48.0
yaml: 2.7.0
@@ -14327,11 +13717,6 @@ snapshots:
dependencies:
makeerror: 1.0.12
- dependencies:
- glob-to-regexp: 0.4.1
- graceful-fs: 4.2.11
-
dependencies:
glob-to-regexp: 0.4.1
@@ -14346,7 +13731,7 @@ snapshots:
dependencies:
colorette: 2.0.20
memfs: 4.56.10([email protected])
@@ -14355,7 +13740,7 @@ snapshots:
range-parser: 1.2.1
schema-utils: 4.3.3
optionalDependencies:
transitivePeerDependencies:
- tslib
@@ -14372,7 +13757,19 @@ snapshots:
transitivePeerDependencies:
- tslib
+ dependencies:
+ memfs: 4.56.10([email protected])
+ mime-types: 3.0.2
+ on-finished: 2.4.1
+ range-parser: 1.2.1
+ schema-utils: 4.3.3
+ optionalDependencies:
+ transitivePeerDependencies:
+ - tslib
+
dependencies:
'@types/bonjour': 3.5.13
'@types/connect-history-api-fallback': 1.5.4
@@ -14396,14 +13793,14 @@ snapshots:
open: 10.2.0
p-retry: 6.2.1
schema-utils: 4.3.3
- selfsigned: 2.4.1
+ selfsigned: 5.5.0
serve-index: 1.9.2
sockjs: 0.3.24
spdy: 4.0.2
ws: 8.21.0
optionalDependencies:
transitivePeerDependencies:
- bufferutil
- debug
@@ -14411,7 +13808,7 @@ snapshots:
- tslib
- utf-8-validate
dependencies:
'@types/bonjour': 3.5.13
'@types/connect-history-api-fallback': 1.5.4
@@ -14435,7 +13832,7 @@ snapshots:
open: 10.2.0
p-retry: 6.2.1
schema-utils: 4.3.3
- selfsigned: 2.4.1
+ selfsigned: 5.5.0
serve-index: 1.9.2
sockjs: 0.3.24
spdy: 4.0.2
@@ -14458,14 +13855,14 @@ snapshots:
dependencies:
typed-assert: 1.0.9
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.9
@@ -14483,13 +13880,12 @@ snapshots:
events: 3.3.0
glob-to-regexp: 0.4.1
graceful-fs: 4.2.11
- json-parse-even-better-errors: 2.3.1
loader-runner: 4.3.2
- mime-types: 2.1.35
+ mime-db: 1.54.0
neo-async: 2.6.2
schema-utils: 4.3.3
tapable: 2.3.3
watchpack: 2.5.1
webpack-sources: 3.5.0
transitivePeerDependencies:
@@ -14578,11 +13974,11 @@ snapshots:
dependencies:
- ansi-styles: 4.3.0
- string-width: 4.2.3
- strip-ansi: 6.0.1
+ ansi-styles: 6.2.3
+ string-width: 8.2.1
+ strip-ansi: 7.2.0
dependencies:
@@ -14664,16 +14060,17 @@ snapshots:
-
dependencies:
- zod: 4.3.6
+ zod: 4.4.2
+
+ optional: true
diff --git a/src-ui/pnpm-workspace.yaml b/src-ui/pnpm-workspace.yaml
new file mode 100644
index 000000000..0065ff09b
--- /dev/null
+++ b/src-ui/pnpm-workspace.yaml
@@ -0,0 +1,21 @@
+packages:
+ - "."
+minimumReleaseAge: 10080
+trustPolicy: no-downgrade
+allowBuilds:
+ "@parcel/watcher": true
+ canvas: true
+ esbuild: true
+ lmdb: true
+ msgpackr-extract: true
+ normalize-diacritics: false
+ unrs-resolver: false
+onlyBuiltDependencies:
+ - "@parcel/watcher"
+ - canvas
+ - esbuild
+ - lmdb
+ - msgpackr-extract
+ignoredBuiltDependencies:
+ - normalize-diacritics
+ - unrs-resolver
diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts
index 86e447b59..b90d97b2f 100644
--- a/src-ui/setup-jest.ts
+++ b/src-ui/setup-jest.ts
@@ -1,9 +1,9 @@
import '@angular/localize/init'
import { jest } from '@jest/globals'
-import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone'
+import { setupZonelessTestEnv } from 'jest-preset-angular/setup-env/zoneless'
import { TextDecoder, TextEncoder } from 'node:util'
if (process.env.NODE_ENV === 'test') {
- setupZoneTestEnv()
+ setupZonelessTestEnv()
}
;(globalThis as any).TextEncoder = TextEncoder as unknown as {
new (): TextEncoder
diff --git a/src-ui/src/app/app.component.spec.ts b/src-ui/src/app/app.component.spec.ts
index 0d23d4feb..721aa37b3 100644
--- a/src-ui/src/app/app.component.spec.ts
+++ b/src-ui/src/app/app.component.spec.ts
@@ -1,11 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- fakeAsync,
- TestBed,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { Router, RouterModule } from '@angular/router'
import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap'
import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -72,7 +67,8 @@ describe('AppComponent', () => {
component = fixture.componentInstance
})
- it('should initialize the tour service & toggle class on body for styling', fakeAsync(() => {
+ it('should initialize the tour service & toggle class on body for styling', () => {
+ jest.useFakeTimers()
jest.spyOn(console, 'warn').mockImplementation(() => {})
fixture.detectChanges()
const tourSpy = jest.spyOn(tourService, 'initialize')
@@ -81,9 +77,10 @@ describe('AppComponent', () => {
tourService.start()
expect(document.body.classList).toContain('tour-active')
tourService.end()
- tick(500)
+ jest.advanceTimersByTime(500)
expect(document.body.classList).not.toContain('tour-active')
- }))
+ jest.useRealTimers()
+ })
it('should display toast on document consumed with link if user has access', () => {
const navigateSpy = jest.spyOn(router, 'navigate')
diff --git a/src-ui/src/app/components/admin/config/config.component.html b/src-ui/src/app/components/admin/config/config.component.html
index 38ddbf3a7..7c8a65628 100644
--- a/src-ui/src/app/components/admin/config/config.component.html
+++ b/src-ui/src/app/components/admin/config/config.component.html
@@ -59,10 +59,10 @@
<div [ngbNavOutlet]="nav" class="border-start border-end border-bottom p-3 mb-3 shadow-sm"></div>
<div class="btn-toolbar" role="toolbar">
<div class="btn-group me-2">
- <button type="button" (click)="discardChanges()" class="btn btn-outline-secondary" [disabled]="loading || (isDirty$ | async) === false" i18n>Cancel</button>
+ <button type="button" (click)="discardChanges()" class="btn btn-outline-secondary" [disabled]="loading() || (isDirty$ | async) === false" i18n>Cancel</button>
</div>
<div class="btn-group">
- <button type="submit" class="btn btn-primary" [disabled]="loading || !configForm.valid || (isDirty$ | async) === false" i18n>Save</button>
+ <button type="submit" class="btn btn-primary" [disabled]="loading() || !configForm.valid || (isDirty$ | async) === false" i18n>Save</button>
</div>
</div>
</form>
diff --git a/src-ui/src/app/components/admin/config/config.component.ts b/src-ui/src/app/components/admin/config/config.component.ts
index 9e69c9dc6..9c2946438 100644
--- a/src-ui/src/app/components/admin/config/config.component.ts
+++ b/src-ui/src/app/components/admin/config/config.component.ts
@@ -97,11 +97,11 @@ export class ConfigComponent
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (config) => {
- this.loading = false
+ this.loading.set(false)
this.initialize(config)
},
error: (e) => {
- this.loading = false
+ this.loading.set(false)
this.toastService.showError($localize`Error retrieving config`, e)
},
})
@@ -162,20 +162,20 @@ export class ConfigComponent
}
public saveConfig() {
- this.loading = true
+ this.loading.set(true)
this.configService
.saveConfig(this.configForm.value as PaperlessConfig)
.pipe(takeUntil(this.unsubscribeNotifier), first())
.subscribe({
next: (config) => {
- this.loading = false
+ this.loading.set(false)
this.initialize(config)
this.store.next(config)
this.settingsService.initializeSettings().subscribe()
this.toastService.showInfo($localize`Configuration updated`)
},
error: (e) => {
- this.loading = false
+ this.loading.set(false)
this.toastService.showError(
$localize`An error occurred updating configuration`,
e
@@ -189,20 +189,20 @@ export class ConfigComponent
}
public uploadFile(file: File, key: string) {
- this.loading = true
+ this.loading.set(true)
this.configService
.uploadFile(file, this.configForm.value['id'], key)
.pipe(takeUntil(this.unsubscribeNotifier), first())
.subscribe({
next: (config) => {
- this.loading = false
+ this.loading.set(false)
this.initialize(config)
this.store.next(config)
this.settingsService.initializeSettings().subscribe()
this.toastService.showInfo($localize`File successfully updated`)
},
error: (e) => {
- this.loading = false
+ this.loading.set(false)
this.toastService.showError(
$localize`An error occurred uploading file`,
e
diff --git a/src-ui/src/app/components/admin/logs/logs.component.html b/src-ui/src/app/components/admin/logs/logs.component.html
index 17ceb1e89..2099429b3 100644
--- a/src-ui/src/app/components/admin/logs/logs.component.html
+++ b/src-ui/src/app/components/admin/logs/logs.component.html
@@ -11,30 +11,30 @@
type="number"
min="100"
step="100"
- [(ngModel)]="limit"
- (ngModelChange)="onLimitChange($event)"
+ [ngModel]="limit()"
+ (ngModelChange)="limit.set($event); onLimitChange($event)"
style="width: 100px;">
<span class="input-group-text text-muted" i18n>lines</span>
</div>
<div class="form-check form-switch mt-1">
- <input class="form-check-input" type="checkbox" role="switch" [(ngModel)]="autoRefreshEnabled">
+ <input class="form-check-input" type="checkbox" role="switch" [ngModel]="autoRefreshEnabled()" (ngModelChange)="autoRefreshEnabled.set($event)">
<label class="form-check-label" for="autoRefreshSwitch" i18n>Auto refresh</label>
</div>
</div>
</pngx-page-header>
-<ul ngbNav #nav="ngbNav" [(activeId)]="activeLog" (activeIdChange)="reloadLogs()" class="nav-tabs">
- @for (logFile of logFiles; track logFile) {
+<ul ngbNav #nav="ngbNav" [activeId]="activeLog()" (activeIdChange)="activeLog.set($event); reloadLogs()" class="nav-tabs">
+ @for (logFile of logFiles(); track logFile) {
<li [ngbNavItem]="logFile">
<a ngbNavLink>
{{logFile}}.log
</a>
</li>
}
- @if (loading || !logFiles.length) {
+ @if (loading() || !logFiles().length) {
<div class="ps-2 d-flex align-items-center">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
- @if (!logFiles.length) {
+ @if (!logFiles().length) {
<ng-container i18n>Loading...</ng-container>
}
</div>
@@ -42,13 +42,13 @@
</ul>
<div #logContainer class="bg-dark text-light font-monospace log-container p-3" (scroll)="onScroll()">
- @if (loading && !logFiles.length) {
+ @if (loading() && !logFiles().length) {
<div>
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
<ng-container i18n>Loading...</ng-container>
</div>
} @else {
- @for (log of logs; track log) {
+ @for (log of logs(); track log) {
<p class="m-0 p-0" [ngClass]="'log-entry-' + log.level">{{log.message}}</p>
}
}
@@ -56,7 +56,7 @@
<button
type="button"
class="btn btn-sm btn-secondary jump-to-bottom position-fixed bottom-0 end-0 m-5"
- [class.visible]="showJumpToBottom"
+ [class.visible]="showJumpToBottom()"
(click)="scrollToBottom()"
>
↓ <span i18n>Jump to bottom</span>
diff --git a/src-ui/src/app/components/admin/logs/logs.component.spec.ts b/src-ui/src/app/components/admin/logs/logs.component.spec.ts
index 1b8425427..c458804ce 100644
--- a/src-ui/src/app/components/admin/logs/logs.component.spec.ts
+++ b/src-ui/src/app/components/admin/logs/logs.component.spec.ts
@@ -86,7 +86,7 @@ describe('LogsComponent', () => {
throwError(() => new Error('error getting logs'))
)
component.reloadLogs()
- expect(component.logs).toHaveLength(0)
+ expect(component.logs()).toHaveLength(0)
})
it('should auto refresh, allow toggle', () => {
@@ -97,7 +97,7 @@ describe('LogsComponent', () => {
jest.advanceTimersByTime(6000)
expect(reloadSpy).toHaveBeenCalledTimes(2)
- component.autoRefreshEnabled = false
+ component.autoRefreshEnabled.set(false)
jest.advanceTimersByTime(6000)
expect(reloadSpy).toHaveBeenCalledTimes(2)
})
@@ -112,9 +112,9 @@ describe('LogsComponent', () => {
})
it('should update jump to bottom visibility on scroll', () => {
- component.showJumpToBottom = false
+ component.showJumpToBottom.set(false)
jest.spyOn(component as any, 'isNearBottom').mockReturnValue(false)
component.onScroll()
- expect(component.showJumpToBottom).toBe(true)
+ expect(component.showJumpToBottom()).toBe(true)
})
})
diff --git a/src-ui/src/app/components/admin/logs/logs.component.ts b/src-ui/src/app/components/admin/logs/logs.component.ts
index e186b27b0..48c70218c 100644
--- a/src-ui/src/app/components/admin/logs/logs.component.ts
+++ b/src-ui/src/app/components/admin/logs/logs.component.ts
@@ -7,6 +7,7 @@ import {
OnInit,
ViewChild,
inject,
+ signal,
} from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'
@@ -34,17 +35,17 @@ export class LogsComponent
private logService = inject(LogService)
private changedetectorRef = inject(ChangeDetectorRef)
- public logs: Array<{ message: string; level: number }> = []
+ readonly logs = signal<Array<{ message: string; level: number }>>([])
- public logFiles: string[] = []
+ readonly logFiles = signal<string[]>([])
- public activeLog: string
+ readonly activeLog = signal<string>(undefined)
- public autoRefreshEnabled: boolean = true
+ readonly autoRefreshEnabled = signal<boolean>(true)
- public limit: number = 5000
+ readonly limit = signal<number>(5000)
- public showJumpToBottom = false
+ readonly showJumpToBottom = signal<boolean>(false)
private readonly limitChange$ = new Subject<number>()
@@ -59,15 +60,15 @@ export class LogsComponent
.list()
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((result) => {
- this.logFiles = result
- this.loading = false
- if (this.logFiles.length > 0) {
- this.activeLog = this.logFiles[0]
+ this.logFiles.set(result)
+ this.loading.set(false)
+ if (this.logFiles().length > 0) {
+ this.activeLog.set(this.logFiles()[0])
this.reloadLogs()
}
timer(5000, 5000)
.pipe(
- filter(() => this.autoRefreshEnabled),
+ filter(() => this.autoRefreshEnabled()),
takeUntil(this.unsubscribeNotifier)
)
.subscribe(() => {
@@ -85,19 +86,19 @@ export class LogsComponent
}
reloadLogs() {
- this.loading = true
+ this.loading.set(true)
const shouldStickToBottom = this.isNearBottom()
this.logService
- .get(this.activeLog, this.limit)
+ .get(this.activeLog(), this.limit())
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (result) => {
- this.loading = false
+ this.loading.set(false)
const parsed = this.parseLogsWithLevel(result)
const hasChanges =
- parsed.length !== this.logs.length ||
+ parsed.length !== this.logs().length ||
parsed.some((log, idx) => {
- const current = this.logs[idx]
+ const current = this.logs()[idx]
return (
!current ||
current.message !== log.message ||
@@ -105,16 +106,16 @@ export class LogsComponent
)
})
if (hasChanges) {
- this.logs = parsed
+ this.logs.set(parsed)
if (shouldStickToBottom) {
this.scrollToBottom()
}
- this.showJumpToBottom = !shouldStickToBottom
+ this.showJumpToBottom.set(!shouldStickToBottom)
}
},
error: () => {
- this.logs = []
- this.loading = false
+ this.logs.set([])
+ this.loading.set(false)
},
})
}
@@ -149,7 +150,7 @@ export class LogsComponent
}
this.changedetectorRef.detectChanges()
viewport.scrollTop = viewport.scrollHeight
- this.showJumpToBottom = false
+ this.showJumpToBottom.set(false)
}
private isNearBottom(): boolean {
@@ -162,6 +163,6 @@ export class LogsComponent
}
onScroll(): void {
- this.showJumpToBottom = !this.isNearBottom()
+ this.showJumpToBottom.set(!this.isNearBottom())
}
}
diff --git a/src-ui/src/app/components/admin/settings/settings.component.html b/src-ui/src/app/components/admin/settings/settings.component.html
index c8a30ccea..80d7d1524 100644
--- a/src-ui/src/app/components/admin/settings/settings.component.html
+++ b/src-ui/src/app/components/admin/settings/settings.component.html
@@ -9,8 +9,8 @@
</button>
@if (canViewSystemStatus) {
<button class="btn btn-sm btn-outline-primary position-relative ms-md-5 me-1" (click)="showSystemStatus()"
- [disabled]="!systemStatus">
- @if (!systemStatus) {
+ [disabled]="!systemStatus()">
+ @if (!systemStatus()) {
<div class="spinner-border spinner-border-sm me-2 h-75" role="status"></div>
} @else {
<i-bs class="me-2" name="card-checklist"></i-bs>
@@ -313,7 +313,7 @@
<span i18n>Default Owner</span>
</div>
<div class="col-md-5">
- <pngx-input-select [items]="users" bindLabel="username" formControlName="defaultPermsOwner" [allowNull]="true"></pngx-input-select>
+ <pngx-input-select [items]="users()" bindLabel="username" formControlName="defaultPermsOwner" [allowNull]="true"></pngx-input-select>
<small class="form-text text-muted text-end d-block mt-n2" i18n>Objects without an owner can be viewed and edited by all users</small>
</div>
</div>
diff --git a/src-ui/src/app/components/admin/settings/settings.component.spec.ts b/src-ui/src/app/components/admin/settings/settings.component.spec.ts
index 854444e98..540e7b5c7 100644
--- a/src-ui/src/app/components/admin/settings/settings.component.spec.ts
+++ b/src-ui/src/app/components/admin/settings/settings.component.spec.ts
@@ -99,6 +99,13 @@ const status: SystemStatus = {
llmindex_status: SystemStatusItemStatus.DISABLED,
llmindex_last_modified: new Date().toISOString(),
llmindex_error: null,
+ summary: {
+ days: 30,
+ total_count: 12,
+ pending_count: 1,
+ success_count: 10,
+ failure_count: 1,
+ },
},
}
@@ -161,7 +168,7 @@ describe('SettingsComponent', () => {
viewportScroller = TestBed.inject(ViewportScroller)
toastService = TestBed.inject(ToastService)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = users[0]
+ settingsService.currentUser.set(users[0])
userService = TestBed.inject(UserService)
permissionsService = TestBed.inject(PermissionsService)
modalService = TestBed.inject(NgbModal)
@@ -202,7 +209,7 @@ describe('SettingsComponent', () => {
fixture.detectChanges()
}
- it('should support tabbed settings & change URL, prevent navigation if dirty confirmation rejected', () => {
+ it('should support tabbed settings & change URL, prevent navigation if dirty confirmation rejected', async () => {
completeSetup()
const navigateSpy = jest.spyOn(router, 'navigate')
const tabButtons = fixture.debugElement.queryAll(By.directive(NgbNavLink))
@@ -210,16 +217,19 @@ describe('SettingsComponent', () => {
expect(navigateSpy).toHaveBeenCalledWith(['settings', 'documents'])
tabButtons[2].nativeElement.dispatchEvent(new MouseEvent('click'))
expect(navigateSpy).toHaveBeenCalledWith(['settings', 'permissions'])
+ await fixture.whenStable()
const initSpy = jest.spyOn(component, 'initialize')
component.isDirty = true // mock dirty
navigateSpy.mockResolvedValueOnce(false) // nav rejected cause dirty
tabButtons[0].nativeElement.dispatchEvent(new MouseEvent('click'))
+ await fixture.whenStable()
expect(navigateSpy).toHaveBeenCalledWith(['settings', 'general'])
expect(initSpy).not.toHaveBeenCalled()
navigateSpy.mockResolvedValueOnce(true) // nav accepted even though dirty
tabButtons[2].nativeElement.dispatchEvent(new MouseEvent('click'))
+ await fixture.whenStable()
expect(navigateSpy).toHaveBeenCalledWith(['settings', 'permissions'])
expect(initSpy).toHaveBeenCalled()
})
@@ -340,13 +350,13 @@ describe('SettingsComponent', () => {
type === PermissionType.SystemMonitoring
)
completeSetup()
- expect(component['systemStatus']).toEqual(status) // private
+ expect(component.systemStatus()).toEqual(status)
expect(component.systemStatusHasErrors).toBeTruthy()
// coverage
- component['systemStatus'].database.status = SystemStatusItemStatus.OK
- component['systemStatus'].tasks.redis_status = SystemStatusItemStatus.OK
- component['systemStatus'].tasks.celery_status = SystemStatusItemStatus.OK
- component['systemStatus'].tasks.sanity_check_status =
+ component.systemStatus().database.status = SystemStatusItemStatus.OK
+ component.systemStatus().tasks.redis_status = SystemStatusItemStatus.OK
+ component.systemStatus().tasks.celery_status = SystemStatusItemStatus.OK
+ component.systemStatus().tasks.sanity_check_status =
SystemStatusItemStatus.OK
expect(component.systemStatusHasErrors).toBeFalsy()
})
diff --git a/src-ui/src/app/components/admin/settings/settings.component.ts b/src-ui/src/app/components/admin/settings/settings.component.ts
index 8d6805bbc..86e5d36cd 100644
--- a/src-ui/src/app/components/admin/settings/settings.component.ts
+++ b/src-ui/src/app/components/admin/settings/settings.component.ts
@@ -6,6 +6,7 @@ import {
OnDestroy,
OnInit,
inject,
+ signal,
} from '@angular/core'
import {
FormControl,
@@ -189,10 +190,10 @@ export class SettingsComponent
unsubscribeNotifier: Subject<any> = new Subject()
savePending: boolean = false
- users: User[]
- groups: Group[]
+ readonly users = signal<User[]>(undefined)
+ readonly groups = signal<Group[]>(undefined)
- public systemStatus: SystemStatus
+ public readonly systemStatus = signal<SystemStatus>(undefined)
public readonly GlobalSearchType = GlobalSearchType
@@ -203,16 +204,18 @@ export class SettingsComponent
public readonly documentDetailFieldOptions = documentDetailFieldOptions
get systemStatusHasErrors(): boolean {
+ const status = this.systemStatus()
+ if (!status) {
+ return false
+ }
return (
- this.systemStatus.database.status === SystemStatusItemStatus.ERROR ||
- this.systemStatus.tasks.redis_status === SystemStatusItemStatus.ERROR ||
- this.systemStatus.tasks.celery_status === SystemStatusItemStatus.ERROR ||
- this.systemStatus.tasks.index_status === SystemStatusItemStatus.ERROR ||
- this.systemStatus.tasks.classifier_status ===
- SystemStatusItemStatus.ERROR ||
- this.systemStatus.tasks.sanity_check_status ===
- SystemStatusItemStatus.ERROR ||
- this.systemStatus.websocket_connected === SystemStatusItemStatus.ERROR
+ status.database.status === SystemStatusItemStatus.ERROR ||
+ status.tasks.redis_status === SystemStatusItemStatus.ERROR ||
+ status.tasks.celery_status === SystemStatusItemStatus.ERROR ||
+ status.tasks.index_status === SystemStatusItemStatus.ERROR ||
+ status.tasks.classifier_status === SystemStatusItemStatus.ERROR ||
+ status.tasks.sanity_check_status === SystemStatusItemStatus.ERROR ||
+ status.websocket_connected === SystemStatusItemStatus.ERROR
)
}
@@ -246,7 +249,7 @@ export class SettingsComponent
.pipe(first())
.subscribe({
next: (r) => {
- this.users = r.results
+ this.users.set(r.results)
},
error: (e) => {
this.toastService.showError($localize`Error retrieving users`, e)
@@ -265,7 +268,7 @@ export class SettingsComponent
.pipe(first())
.subscribe({
next: (r) => {
- this.groups = r.results
+ this.groups.set(r.results)
},
error: (e) => {
this.toastService.showError($localize`Error retrieving groups`, e)
@@ -431,7 +434,7 @@ export class SettingsComponent
if (this.canViewSystemStatus) {
this.systemStatusService.get().subscribe((status) => {
- this.systemStatus = status
+ this.systemStatus.set(status)
})
}
}
@@ -664,6 +667,6 @@ export class SettingsComponent
size: 'xl',
}
)
- modal.componentInstance.status = this.systemStatus
+ modal.componentInstance.status.set(this.systemStatus())
}
}
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.html b/src-ui/src/app/components/admin/tasks/tasks.component.html
index e1d6bc900..05a224a0a 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.html
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.html
@@ -11,7 +11,7 @@
<button class="btn btn-sm btn-outline-primary me-2" (click)="dismissTasks()" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }" [disabled]="visibleTasks.length === 0">
<i-bs name="check2-all" class="me-1"></i-bs>{{dismissButtonText}}
</button>
- <button class="btn btn-sm btn-outline-primary me-2" (click)="dismissAllTasks()" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }" [disabled]="totalTasks === 0">
+ <button class="btn btn-sm btn-outline-primary me-2" (click)="dismissAllTasks()" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }" [disabled]="totalTasks() === 0">
<i-bs name="check2-all" class="me-1"></i-bs><ng-container i18n>Dismiss all</ng-container>
</button>
<div class="form-check form-switch mb-0 ms-2">
@@ -107,7 +107,7 @@
<ngb-pagination
[pageSize]="pageSize"
- [collectionSize]="totalTasks"
+ [collectionSize]="totalTasks()"
[page]="page"
[maxSize]="5"
[rotate]="true"
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts
index 315dc2455..15069a9ba 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts
@@ -362,7 +362,7 @@ describe('TasksComponent', () => {
)
req.flush({ count: 2, results: [tasks[0], tasks[1]] })
- expect(component.totalTasks).toBe(2)
+ expect(component.totalTasks()).toBe(2)
})
it('should apply task type and trigger source filters to the server-side task query', () => {
@@ -435,8 +435,8 @@ describe('TasksComponent', () => {
.flush(pageTwoTasks)
expect(component.page).toBe(2)
- expect(component.totalTasks).toBe(30)
- expect(component.pagedTasks).toEqual([tasks[0]])
+ expect(component.totalTasks()).toBe(30)
+ expect(component.pagedTasks()).toEqual([tasks[0]])
})
it('should not replace section counts with current-page counts', () => {
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.ts b/src-ui/src/app/components/admin/tasks/tasks.component.ts
index 276dc6a8f..edf606c12 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.ts
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.ts
@@ -1,5 +1,5 @@
import { JsonPipe, NgTemplateOutlet } from '@angular/common'
-import { Component, inject, OnDestroy, OnInit } from '@angular/core'
+import { Component, inject, OnDestroy, OnInit, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { Router, RouterLink } from '@angular/router'
import {
@@ -166,14 +166,14 @@ export class TasksComponent
public autoRefreshEnabled: boolean = true
public readonly pageSize = 25
public page: number = 1
- public totalTasks: number = 0
- public sectionCounts: Record<TaskSection, number> = {
+ readonly totalTasks = signal(0)
+ readonly sectionCounts = signal<Record<TaskSection, number>>({
[TaskSection.All]: 0,
[TaskSection.NeedsAttention]: 0,
[TaskSection.InProgress]: 0,
[TaskSection.Completed]: 0,
- }
- public pagedTasks: PaperlessTask[] = []
+ })
+ readonly pagedTasks = signal<PaperlessTask[]>([])
public selectedSection: TaskSection = TaskSection.All
public selectedTaskType: PaperlessTaskType | null = null
public selectedTriggerSource: PaperlessTaskTriggerSource | null = null
@@ -346,7 +346,7 @@ export class TasksComponent
backdrop: 'static',
})
modal.componentInstance.title = $localize`Confirm Dismiss All`
- modal.componentInstance.messageBold = $localize`Dismiss all ${this.totalTasks} tasks?`
+ modal.componentInstance.messageBold = $localize`Dismiss all ${this.totalTasks()} tasks?`
modal.componentInstance.btnClass = 'btn-warning'
modal.componentInstance.btnCaption = $localize`Dismiss`
modal.componentInstance.confirmClicked.pipe(first()).subscribe(() => {
@@ -465,7 +465,7 @@ export class TasksComponent
}
tasksForSection(section: TaskSection): PaperlessTask[] {
- let tasks = this.pagedTasks.filter((task) =>
+ let tasks = this.pagedTasks().filter((task) =>
this.taskBelongsToSection(task, section)
)
@@ -477,7 +477,14 @@ export class TasksComponent
}
sectionCount(section: TaskSection): number {
- return this.sectionCounts[section]
+ return this.sectionCounts()[section]
+ }
+
+ private setSectionCount(section: TaskSection, count: number) {
+ this.sectionCounts.update((counts) => ({
+ ...counts,
+ [section]: count,
+ }))
}
sectionShowsResults(section: TaskSection): boolean {
@@ -652,7 +659,7 @@ export class TasksComponent
? this.sections
: [this.selectedSection]
- return this.pagedTasks.filter(
+ return this.pagedTasks().filter(
(task) =>
sections.some((section) => this.taskBelongsToSection(task, section)) &&
this.taskMatchesFilters(task, { taskType, triggerSource })
@@ -664,10 +671,12 @@ export class TasksComponent
.statusCounts(this.getParamsForSection(TaskSection.All))
.pipe(first(), takeUntil(this.unsubscribeNotifier))
.subscribe((counts) => {
- this.sectionCounts[TaskSection.All] = counts.all
- this.sectionCounts[TaskSection.NeedsAttention] = counts.needs_attention
- this.sectionCounts[TaskSection.InProgress] = counts.in_progress
- this.sectionCounts[TaskSection.Completed] = counts.completed
+ this.sectionCounts.set({
+ [TaskSection.All]: counts.all,
+ [TaskSection.NeedsAttention]: counts.needs_attention,
+ [TaskSection.InProgress]: counts.in_progress,
+ [TaskSection.Completed]: counts.completed,
+ })
})
}
@@ -723,7 +732,7 @@ export class TasksComponent
this.reloadSectionCounts()
- this.loading = true
+ this.loading.set(true)
this.tasksService
.list(
this.page,
@@ -733,24 +742,24 @@ export class TasksComponent
.pipe(first(), takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (result) => {
- this.pagedTasks = result.results
- this.totalTasks = result.count
- this.sectionCounts[TaskSection.All] = result.count
+ this.pagedTasks.set(result.results)
+ this.totalTasks.set(result.count)
+ this.setSectionCount(TaskSection.All, result.count)
if (this.selectedSection !== TaskSection.All) {
- this.sectionCounts[this.selectedSection] = result.count
+ this.setSectionCount(this.selectedSection, result.count)
}
- this.loading = false
+ this.loading.set(false)
if (
this.page > 1 &&
- this.pagedTasks.length === 0 &&
- this.totalTasks > 0
+ this.pagedTasks().length === 0 &&
+ this.totalTasks() > 0
) {
this.page -= 1
this.reloadPage()
}
},
error: () => {
- this.loading = false
+ this.loading.set(false)
},
})
}
diff --git a/src-ui/src/app/components/admin/trash/trash.component.html b/src-ui/src/app/components/admin/trash/trash.component.html
index c729d26f2..9f7037efd 100644
--- a/src-ui/src/app/components/admin/trash/trash.component.html
+++ b/src-ui/src/app/components/admin/trash/trash.component.html
@@ -4,22 +4,22 @@
info="Manage trashed documents that are pending deletion."
i18n-info
infoLink="usage/#document-trash">
- <button class="btn btn-sm btn-outline-secondary" (click)="clearSelection()" [hidden]="selectedDocuments.size === 0">
+ <button class="btn btn-sm btn-outline-secondary" (click)="clearSelection()" [hidden]="selectedDocuments().size === 0">
<i-bs name="x" class="me-1"></i-bs><ng-container i18n>Clear selection</ng-container>
</button>
- <button type="button" class="btn btn-sm btn-outline-primary" (click)="restoreAll(selectedDocuments)" [disabled]="selectedDocuments.size === 0">
+ <button type="button" class="btn btn-sm btn-outline-primary" (click)="restoreAll(selectedDocuments())" [disabled]="selectedDocuments().size === 0">
<i-bs name="arrow-counterclockwise" class="me-1"></i-bs><ng-container i18n>Restore selected</ng-container>
</button>
- <button type="button" class="btn btn-sm btn-outline-danger" (click)="emptyTrash(selectedDocuments)" [disabled]="selectedDocuments.size === 0">
+ <button type="button" class="btn btn-sm btn-outline-danger" (click)="emptyTrash(selectedDocuments())" [disabled]="selectedDocuments().size === 0">
<i-bs name="trash" class="me-1"></i-bs><ng-container i18n>Delete selected</ng-container>
</button>
- <button type="button" class="btn btn-sm btn-outline-danger" (click)="emptyTrash()" [disabled]="documentsInTrash.length === 0">
+ <button type="button" class="btn btn-sm btn-outline-danger" (click)="emptyTrash()" [disabled]="documentsInTrash().length === 0">
<i-bs name="trash" class="me-1"></i-bs><ng-container i18n>Empty trash</ng-container>
</button>
</pngx-page-header>
<div class="row mb-3">
- <ngb-pagination class="col-auto" [pageSize]="25" [collectionSize]="totalDocuments" [(page)]="page" [maxSize]="5" (pageChange)="reload()" size="sm" aria-label="Pagination"></ngb-pagination>
+ <ngb-pagination class="col-auto" [pageSize]="25" [collectionSize]="totalDocuments()" [page]="page()" [maxSize]="5" (pageChange)="page.set($event); reload()" size="sm" aria-label="Pagination"></ngb-pagination>
</div>
<div class="card border table-responsive mb-3">
@@ -28,7 +28,7 @@
<tr>
<th scope="col">
<div class="form-check m-0 ms-2 me-n2">
- <input type="checkbox" class="form-check-input" id="all-objects" [(ngModel)]="allToggled" [disabled]="documentsInTrash.length === 0" (click)="toggleAll($event); $event.stopPropagation();">
+ <input type="checkbox" class="form-check-input" id="all-objects" [ngModel]="allToggled()" (ngModelChange)="allToggled.set($event)" [disabled]="documentsInTrash().length === 0" (click)="toggleAll($event); $event.stopPropagation();">
<label class="form-check-label" for="all-objects"></label>
</div>
</th>
@@ -38,7 +38,7 @@
</tr>
</thead>
<tbody>
- @if (loading) {
+ @if (loading()) {
<tr>
<td colspan="5">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
@@ -46,11 +46,11 @@
</td>
</tr>
}
- @for (document of documentsInTrash; track document.id) {
- <tr (click)="toggleSelected(document); $event.stopPropagation();" (mouseleave)="popupPreview.close()" class="data-row fade" [class.show]="show">
+ @for (document of documentsInTrash(); track document.id) {
+ <tr (click)="toggleSelected(document); $event.stopPropagation();" (mouseleave)="popupPreview.close()" class="data-row fade" [class.show]="show()">
<td>
<div class="form-check m-0 ms-2 me-n2">
- <input type="checkbox" class="form-check-input" id="{{document.id}}" [checked]="selectedDocuments.has(document.id)" (click)="toggleSelected(document); $event.stopPropagation();">
+ <input type="checkbox" class="form-check-input" id="{{document.id}}" [checked]="selectedDocuments().has(document.id)" (click)="toggleSelected(document); $event.stopPropagation();">
<label class="form-check-label" for="{{document.id}}"></label>
</div>
</td>
@@ -88,16 +88,16 @@
</table>
</div>
-@if (!loading) {
+@if (!loading()) {
<div class="d-flex mb-2">
<div>
- <ng-container i18n>{totalDocuments, plural, =1 {One document in trash} other {{{totalDocuments || 0}} total documents in trash}}</ng-container>
- @if (selectedDocuments.size > 0) {
- &nbsp;({{selectedDocuments.size}} selected)
+ <ng-container i18n>{totalDocuments(), plural, =1 {One document in trash} other {{{totalDocuments() || 0}} total documents in trash}}</ng-container>
+ @if (selectedDocuments().size > 0) {
+ &nbsp;({{selectedDocuments().size}} selected)
}
</div>
- @if (documentsInTrash.length > 20) {
- <ngb-pagination class="ms-auto" [pageSize]="25" [collectionSize]="totalDocuments" [(page)]="page" [maxSize]="5" (pageChange)="reload()" size="sm" aria-label="Pagination"></ngb-pagination>
+ @if (documentsInTrash().length > 20) {
+ <ngb-pagination class="ms-auto" [pageSize]="25" [collectionSize]="totalDocuments()" [page]="page()" [maxSize]="5" (pageChange)="page.set($event); reload()" size="sm" aria-label="Pagination"></ngb-pagination>
}
</div>
}
diff --git a/src-ui/src/app/components/admin/trash/trash.component.spec.ts b/src-ui/src/app/components/admin/trash/trash.component.spec.ts
index 215b0b253..7edb7121e 100644
--- a/src-ui/src/app/components/admin/trash/trash.component.spec.ts
+++ b/src-ui/src/app/components/admin/trash/trash.component.spec.ts
@@ -60,10 +60,15 @@ describe('TrashComponent', () => {
modalService = TestBed.inject(NgbModal)
toastService = TestBed.inject(ToastService)
router = TestBed.inject(Router)
+ jest.spyOn(router, 'navigate').mockResolvedValue(true)
component = fixture.componentInstance
fixture.detectChanges()
})
+ afterEach(() => {
+ jest.useRealTimers()
+ })
+
it('should call correct service method on reload', () => {
jest.useFakeTimers()
const trashSpy = jest.spyOn(trashService, 'getTrash')
@@ -77,7 +82,7 @@ describe('TrashComponent', () => {
component.reload()
jest.advanceTimersByTime(100)
expect(trashSpy).toHaveBeenCalled()
- expect(component.documentsInTrash).toEqual(documentsInTrash)
+ expect(component.documentsInTrash()).toEqual(documentsInTrash)
})
it('should support delete document, show error if needed', () => {
@@ -179,8 +184,8 @@ describe('TrashComponent', () => {
})
it('should support toggle all items in view', () => {
- component.documentsInTrash = documentsInTrash
- expect(component.selectedDocuments.size).toEqual(0)
+ component.documentsInTrash.set(documentsInTrash)
+ expect(component.selectedDocuments().size).toEqual(0)
const toggleAllSpy = jest.spyOn(component, 'toggleAll')
const checkButton = fixture.debugElement.queryAll(
By.css('input.form-check-input')
@@ -189,21 +194,21 @@ describe('TrashComponent', () => {
checkButton.nativeElement.checked = true
checkButton.nativeElement.dispatchEvent(new Event('click'))
expect(toggleAllSpy).toHaveBeenCalled()
- expect(component.selectedDocuments.size).toEqual(documentsInTrash.length)
+ expect(component.selectedDocuments().size).toEqual(documentsInTrash.length)
})
it('should support toggle item', () => {
- component.selectedDocuments = new Set([1])
+ component.selectedDocuments.set(new Set([1]))
component.toggleSelected(documentsInTrash[0])
- expect(component.selectedDocuments.size).toEqual(0)
+ expect(component.selectedDocuments().size).toEqual(0)
component.toggleSelected(documentsInTrash[0])
- expect(component.selectedDocuments.size).toEqual(1)
+ expect(component.selectedDocuments().size).toEqual(1)
})
it('should support clear selection', () => {
- component.selectedDocuments = new Set([1])
+ component.selectedDocuments.set(new Set([1]))
component.clearSelection()
- expect(component.selectedDocuments.size).toEqual(0)
+ expect(component.selectedDocuments().size).toEqual(0)
})
it('should correctly display days remaining', () => {
diff --git a/src-ui/src/app/components/admin/trash/trash.component.ts b/src-ui/src/app/components/admin/trash/trash.component.ts
index dce6a6e88..68b3464eb 100644
--- a/src-ui/src/app/components/admin/trash/trash.component.ts
+++ b/src-ui/src/app/components/admin/trash/trash.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnDestroy, inject } from '@angular/core'
+import { Component, OnDestroy, inject, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { Router } from '@angular/router'
import {
@@ -7,7 +7,7 @@ import {
NgbPaginationModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { delay, takeUntil, tap } from 'rxjs'
+import { takeUntil, tap } from 'rxjs'
import { Document } from 'src/app/data/document'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { SettingsService } from 'src/app/services/settings.service'
@@ -42,11 +42,11 @@ export class TrashComponent
private settingsService = inject(SettingsService)
private router = inject(Router)
- public documentsInTrash: Document[] = []
- public selectedDocuments: Set<number> = new Set()
- public allToggled: boolean = false
- public page: number = 1
- public totalDocuments: number
+ readonly documentsInTrash = signal<Document[]>([])
+ readonly selectedDocuments = signal<Set<number>>(new Set())
+ readonly allToggled = signal(false)
+ readonly page = signal(1)
+ readonly totalDocuments = signal<number>(undefined)
constructor() {
super()
@@ -54,20 +54,19 @@ export class TrashComponent
}
reload() {
- this.loading = true
+ this.loading.set(true)
this.trashService
- .getTrash(this.page)
+ .getTrash(this.page())
.pipe(
tap((r) => {
- this.documentsInTrash = r.results
- this.totalDocuments = r.count
- this.selectedDocuments.clear()
- this.loading = false
- }),
- delay(100)
+ this.documentsInTrash.set(r.results)
+ this.totalDocuments.set(r.count)
+ this.selectedDocuments.set(new Set())
+ this.loading.set(false)
+ })
)
.subscribe(() => {
- this.show = true
+ this.show.set(true)
})
}
@@ -122,7 +121,7 @@ export class TrashComponent
.subscribe({
next: () => {
this.toastService.showInfo($localize`Document(s) deleted`)
- this.allToggled = false
+ this.allToggled.set(false)
modal.close()
this.reload()
},
@@ -165,7 +164,7 @@ export class TrashComponent
.subscribe({
next: () => {
this.toastService.showInfo($localize`Document(s) restored`)
- this.allToggled = false
+ this.allToggled.set(false)
this.reload()
},
error: (err) => {
@@ -179,24 +178,29 @@ export class TrashComponent
toggleAll(event: PointerEvent) {
if ((event.target as HTMLInputElement).checked) {
- this.selectedDocuments = new Set(this.documentsInTrash.map((t) => t.id))
+ this.selectedDocuments.set(
+ new Set(this.documentsInTrash().map((t) => t.id))
+ )
} else {
this.clearSelection()
}
}
toggleSelected(object: Document) {
- this.selectedDocuments.has(object.id)
- ? this.selectedDocuments.delete(object.id)
- : this.selectedDocuments.add(object.id)
+ const selectedDocuments = new Set(this.selectedDocuments())
+ selectedDocuments.has(object.id)
+ ? selectedDocuments.delete(object.id)
+ : selectedDocuments.add(object.id)
+ this.selectedDocuments.set(selectedDocuments)
}
clearSelection() {
- this.allToggled = false
- this.selectedDocuments.clear()
+ this.allToggled.set(false)
+ this.selectedDocuments.set(new Set())
}
getDaysRemaining(document: Document): number {
+ this.settingsService.trackChanges()
const delay = this.settingsService.get(SETTINGS_KEYS.EMPTY_TRASH_DELAY)
const diff = new Date().getTime() - new Date(document.deleted_at).getTime()
const days = Math.ceil(diff / (1000 * 3600 * 24))
diff --git a/src-ui/src/app/components/admin/users-groups/users-groups.component.html b/src-ui/src/app/components/admin/users-groups/users-groups.component.html
index a13bb6633..cdabad926 100644
--- a/src-ui/src/app/components/admin/users-groups/users-groups.component.html
+++ b/src-ui/src/app/components/admin/users-groups/users-groups.component.html
@@ -7,7 +7,7 @@
>
</pngx-page-header>
-@if (canViewUsers && users) {
+@if (canViewUsers && users()) {
<h4 class="d-flex">
<ng-container i18n>Users</ng-container>
<button type="button" class="btn btn-sm btn-outline-primary ms-4" (click)="editUser()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.User }">
@@ -23,7 +23,7 @@
<div class="col" i18n>Actions</div>
</div>
</li>
- @for (user of users; track user) {
+ @for (user of users(); track user) {
<li class="list-group-item">
<div class="row">
<div class="col d-flex align-items-center" [class.opacity-50]="!user.is_active"><button class="btn btn-link p-0 text-start" type="button" (click)="editUser(user)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.User)">{{user.username}}</button></div>
@@ -45,7 +45,7 @@
</ul>
}
-@if (canViewGroups && groups) {
+@if (canViewGroups && groups()) {
<h4 class="mt-4 d-flex">
<ng-container i18n>Groups</ng-container>
<button type="button" class="btn btn-sm btn-outline-primary ms-4" (click)="editGroup()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Group }">
@@ -61,7 +61,7 @@
<div class="col" i18n>Actions</div>
</div>
</li>
- @for (group of groups; track group) {
+ @for (group of groups(); track group) {
<li class="list-group-item">
<div class="row">
<div class="col d-flex align-items-center"><button class="btn btn-link p-0 text-start" type="button" (click)="editGroup(group)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.Group)">{{group.name}}</button></div>
@@ -80,13 +80,13 @@
</div>
</li>
}
- @if (groups.length === 0) {
+ @if (groups().length === 0) {
<li class="list-group-item" i18n>No groups defined</li>
}
</ul>
}
-@if ((canViewUsers && !users) || (canViewGroups && !groups)) {
+@if ((canViewUsers && !users()) || (canViewGroups && !groups())) {
<div>
<div class="spinner-border spinner-border-sm fw-normal ms-2 me-auto" role="status"></div>
<div class="visually-hidden" i18n>Loading...</div>
diff --git a/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts b/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts
index 20566a9b0..a06852994 100644
--- a/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts
+++ b/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts
@@ -1,12 +1,7 @@
import { DatePipe } from '@angular/common'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { of, throwError } from 'rxjs'
@@ -57,7 +52,7 @@ describe('UsersAndGroupsComponent', () => {
}).compileComponents()
fixture = TestBed.createComponent(UsersAndGroupsComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = users[0]
+ settingsService.currentUser.set(users[0])
userService = TestBed.inject(UserService)
modalService = TestBed.inject(NgbModal)
toastService = TestBed.inject(ToastService)
@@ -109,7 +104,7 @@ describe('UsersAndGroupsComponent', () => {
const toastInfoSpy = jest.spyOn(toastService, 'showInfo')
editDialog.failed.emit()
expect(toastErrorSpy).toHaveBeenCalled()
- settingsService.currentUser = users[1] // simulate logged in as different user
+ settingsService.currentUser.set(users[1]) // simulate logged in as different user
editDialog.succeeded.emit(users[0])
expect(toastInfoSpy).toHaveBeenCalledWith(
`Saved user "${users[0].username}".`
@@ -138,7 +133,8 @@ describe('UsersAndGroupsComponent', () => {
expect(toastInfoSpy).toHaveBeenCalledWith('Deleted user "user1"')
})
- it('should logout current user if password changed, after delay', fakeAsync(() => {
+ it('should logout current user if password changed, after delay', () => {
+ jest.useFakeTimers()
completeSetup()
let modal: NgbModalRef
modalService.activeInstances.subscribe((refs) => (modal = refs[0]))
@@ -148,14 +144,15 @@ describe('UsersAndGroupsComponent', () => {
.mockImplementation(() => {})
const editDialog = modal.componentInstance as UserEditDialogComponent
editDialog.passwordIsSet = true
- settingsService.currentUser = users[0] // simulate logged in as same user
+ settingsService.currentUser.set(users[0]) // simulate logged in as same user
editDialog.succeeded.emit(users[0])
fixture.detectChanges()
- tick(2600)
+ jest.advanceTimersByTime(2600)
expect(navSpy).toHaveBeenCalledWith(
`${window.location.origin}/accounts/logout/?next=/accounts/login/?next=/`
)
- }))
+ jest.useRealTimers()
+ })
it('should support edit / create group, show error if needed', () => {
completeSetup()
diff --git a/src-ui/src/app/components/admin/users-groups/users-groups.component.ts b/src-ui/src/app/components/admin/users-groups/users-groups.component.ts
index 960b2e0c4..252c60640 100644
--- a/src-ui/src/app/components/admin/users-groups/users-groups.component.ts
+++ b/src-ui/src/app/components/admin/users-groups/users-groups.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import { Component, OnDestroy, OnInit, inject, signal } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { Subject, first, takeUntil } from 'rxjs'
@@ -43,8 +43,8 @@ export class UsersAndGroupsComponent
permissionsService = inject(PermissionsService)
private settings = inject(SettingsService)
- users: User[]
- groups: Group[]
+ readonly users = signal<User[]>(null)
+ readonly groups = signal<Group[]>(null)
unsubscribeNotifier: Subject<any> = new Subject()
@@ -69,7 +69,7 @@ export class UsersAndGroupsComponent
.pipe(first(), takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (r) => {
- this.users = r.results
+ this.users.set(r.results)
},
error: (e) => {
this.toastService.showError($localize`Error retrieving users`, e)
@@ -83,7 +83,7 @@ export class UsersAndGroupsComponent
.pipe(first(), takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (r) => {
- this.groups = r.results
+ this.groups.set(r.results)
},
error: (e) => {
this.toastService.showError($localize`Error retrieving groups`, e)
@@ -101,15 +101,15 @@ export class UsersAndGroupsComponent
backdrop: 'static',
size: 'xl',
})
- modal.componentInstance.dialogMode = user
- ? EditDialogMode.EDIT
- : EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(
+ user ? EditDialogMode.EDIT : EditDialogMode.CREATE
+ )
modal.componentInstance.object = user
modal.componentInstance.succeeded
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((newUser: User) => {
if (
- newUser.id === this.settings.currentUser.id &&
+ newUser.id === this.settings.currentUser().id &&
(modal.componentInstance as UserEditDialogComponent).passwordIsSet
) {
this.toastService.showInfo(
@@ -125,7 +125,7 @@ export class UsersAndGroupsComponent
$localize`Saved user "${newUser.username}".`
)
this.usersService.listAll().subscribe((r) => {
- this.users = r.results
+ this.users.set(r.results)
})
}
})
@@ -152,7 +152,7 @@ export class UsersAndGroupsComponent
modal.close()
this.toastService.showInfo($localize`Deleted user "${user.username}"`)
this.usersService.listAll().subscribe((r) => {
- this.users = r.results
+ this.users.set(r.results)
})
},
error: (e) => {
@@ -170,16 +170,16 @@ export class UsersAndGroupsComponent
backdrop: 'static',
size: 'lg',
})
- modal.componentInstance.dialogMode = group
- ? EditDialogMode.EDIT
- : EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(
+ group ? EditDialogMode.EDIT : EditDialogMode.CREATE
+ )
modal.componentInstance.object = group
modal.componentInstance.succeeded
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((newGroup) => {
this.toastService.showInfo($localize`Saved group "${newGroup.name}".`)
this.groupsService.listAll().subscribe((r) => {
- this.groups = r.results
+ this.groups.set(r.results)
})
})
modal.componentInstance.failed
@@ -205,7 +205,7 @@ export class UsersAndGroupsComponent
modal.close()
this.toastService.showInfo($localize`Deleted group "${group.name}"`)
this.groupsService.listAll().subscribe((r) => {
- this.groups = r.results
+ this.groups.set(r.results)
})
},
error: (e) => {
@@ -219,6 +219,6 @@ export class UsersAndGroupsComponent
}
getGroupName(id: number): string {
- return this.groups?.find((g) => g.id === id)?.name ?? ''
+ return this.groups()?.find((g) => g.id === id)?.name ?? ''
}
}
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html
index 9fa8b8016..475bbac0c 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.html
+++ b/src-ui/src/app/components/app-frame/app-frame.component.html
@@ -1,7 +1,7 @@
<nav class="navbar navbar-dark fixed-top bg-primary flex-md-nowrap p-0 shadow-sm">
<button class="navbar-toggler d-md-none collapsed border-0" type="button" data-toggle="collapse"
data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation"
- (click)="mobileSearchHidden = false; isMenuCollapsed = !isMenuCollapsed">
+ (click)="closeMobileSearch(); toggleMenuCollapsed()">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand d-flex align-items-center me-0 px-3 py-3 order-sm-0"
@@ -23,7 +23,7 @@
</div>
</a>
<div class="search-container flex-grow-1 py-2 pb-3 pb-sm-2 px-3 ps-md-4 me-sm-auto order-3 order-sm-1"
- [class.mobile-hidden]="mobileSearchHidden">
+ [class.mobile-hidden]="mobileSearchHidden()">
<div class="col-12 col-md-7">
<pngx-global-search></pngx-global-search>
</div>
@@ -68,8 +68,8 @@
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="d-md-block bg-light sidebar collapse"
- [ngClass]="slimSidebarEnabled ? 'slim' : 'col-md-3 col-lg-2 col-xxxl-1'" [class.animating]="slimSidebarAnimating"
- [ngbCollapse]="isMenuCollapsed">
+ [ngClass]="slimSidebarEnabled ? 'slim' : 'col-md-3 col-lg-2 col-xxxl-1'" [class.animating]="slimSidebarAnimating()"
+ [ngbCollapse]="isMenuCollapsed()">
@if (canSaveSettings) {
<button class="btn btn-sm btn-dark sidebar-slim-toggler" (click)="toggleSlimSidebar()">
@if (slimSidebarEnabled) {
@@ -104,7 +104,7 @@
</h6>
<ul class="nav flex-column mb-2" cdkDropList (cdkDropListDropped)="onDrop($event)">
@for (view of savedViewService.sidebarViews; track view.id) {
- <li class="nav-item w-100 app-link" cdkDrag [cdkDragDisabled]="!settingsService.organizingSidebarSavedViews"
+ <li class="nav-item w-100 app-link" cdkDrag [cdkDragDisabled]="!settingsService.organizingSidebarSavedViews()"
cdkDragPreviewContainer="parent" cdkDragPreviewClass="navItemDrag" (cdkDragStarted)="onDragStart($event)"
(cdkDragEnded)="onDragEnd($event)">
<a class="nav-link" routerLink="view/{{view.id}}"
@@ -120,7 +120,7 @@
<span class="badge bg-info text-dark position-absolute top-0 end-0 d-none d-md-block">{{ savedViewService.getDocumentCount(view) }}</span>
}
</a>
- @if (settingsService.organizingSidebarSavedViews) {
+ @if (settingsService.organizingSidebarSavedViews()) {
<div class="position-absolute end-0 top-0 px-3 py-2" [class.me-n3]="slimSidebarEnabled" cdkDragHandle>
<i-bs name="grip-vertical"></i-bs>
</div>
@@ -329,10 +329,10 @@
{{ versionString }}
</a>
</div>
- @if (!settingsService.updateCheckingIsSet || appRemoteVersion) {
+ @if (!settingsService.updateCheckingIsSet || appRemoteVersion()) {
<div class="version-check">
<ng-template #updateAvailablePopContent>
- <span class="small">Paperless-ngx {{ appRemoteVersion.version }} <ng-container i18n>is
+ <span class="small">Paperless-ngx {{ appRemoteVersion().version }} <ng-container i18n>is
available.</ng-container><br /><ng-container i18n>Click to view.</ng-container></span>
</ng-template>
<ng-template #updateCheckingNotEnabledPopContent>
@@ -350,13 +350,13 @@
</p>
</ng-template>
@if (settingsService.updateCheckingIsSet) {
- @if (appRemoteVersion.update_available) {
+ @if (appRemoteVersion().update_available) {
<a class="small text-decoration-none" target="_blank" rel="noopener noreferrer"
href="https://github.com/paperless-ngx/paperless-ngx/releases"
[ngbPopover]="updateAvailablePopContent" popoverClass="shadow" triggers="mouseenter:mouseleave"
container="body">
<i-bs width="1.2em" height="1.2em" name="info-circle" class="me-1"></i-bs>
- @if (appRemoteVersion?.update_available) {
+ @if (appRemoteVersion()?.update_available) {
<ng-container i18n>Update available</ng-container>
}
</a>
@@ -377,7 +377,7 @@
</div>
</nav>
- <main role="main" class="ms-sm-auto px-md-4" [class.mobile-search-hidden]="mobileSearchHidden"
+ <main role="main" class="ms-sm-auto px-md-4" [class.mobile-search-hidden]="mobileSearchHidden()"
[ngClass]="slimSidebarEnabled ? 'col-slim' : 'col-md-9 col-lg-10 col-xxxl-11'">
<router-outlet></router-outlet>
</main>
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts
index d6f84276f..71b22bef1 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts
+++ b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts
@@ -4,12 +4,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { BrowserModule } from '@angular/platform-browser'
import { ActivatedRoute, Router } from '@angular/router'
@@ -244,11 +239,12 @@ describe('AppFrameComponent', () => {
expect(toastSpy).toHaveBeenCalled()
})
- it('should support toggling slim sidebar and saving', fakeAsync(() => {
+ it('should support toggling slim sidebar and saving', () => {
+ jest.useFakeTimers()
const saveSettingSpy = jest.spyOn(settingsService, 'set')
settingsService.set(SETTINGS_KEYS.ATTRIBUTES_SECTIONS_COLLAPSED, [])
expect(component.slimSidebarEnabled).toBeFalsy()
- expect(component.slimSidebarAnimating).toBeFalsy()
+ expect(component.slimSidebarAnimating()).toBeFalsy()
component.toggleSlimSidebar()
const requests = httpTestingController.match(
`${environment.apiBaseUrl}ui_settings/`
@@ -259,9 +255,9 @@ describe('AppFrameComponent', () => {
requests[0].request.body.settings.attributes_sections_collapsed
).toEqual(['attributes'])
requests[0].flush({ success: true })
- expect(component.slimSidebarAnimating).toBeTruthy()
- tick(200)
- expect(component.slimSidebarAnimating).toBeFalsy()
+ expect(component.slimSidebarAnimating()).toBeTruthy()
+ jest.advanceTimersByTime(200)
+ expect(component.slimSidebarAnimating()).toBeFalsy()
expect(component.slimSidebarEnabled).toBeTruthy()
expect(saveSettingSpy).toHaveBeenCalledWith(
SETTINGS_KEYS.SLIM_SIDEBAR,
@@ -271,7 +267,8 @@ describe('AppFrameComponent', () => {
SETTINGS_KEYS.ATTRIBUTES_SECTIONS_COLLAPSED,
['attributes']
)
- }))
+ jest.useRealTimers()
+ })
it('should show error on toggle slim sidebar if store settings fails', () => {
jest.spyOn(console, 'warn').mockImplementation(() => {})
@@ -291,9 +288,9 @@ describe('AppFrameComponent', () => {
fixture.nativeElement as HTMLDivElement
).querySelector('button[data-toggle=collapse]')
button.dispatchEvent(new MouseEvent('click'))
- expect(component.isMenuCollapsed).toBeFalsy()
+ expect(component.isMenuCollapsed()).toBeFalsy()
component.closeMenu()
- expect(component.isMenuCollapsed).toBeTruthy()
+ expect(component.isMenuCollapsed()).toBeTruthy()
})
it('should hide mobile search when scrolling down and show it when scrolling up', () => {
@@ -308,14 +305,14 @@ describe('AppFrameComponent', () => {
value: 40,
})
component.onWindowScroll()
- expect(component.mobileSearchHidden).toBe(true)
+ expect(component.mobileSearchHidden()).toBe(true)
Object.defineProperty(globalThis, 'scrollY', {
configurable: true,
value: 0,
})
component.onWindowScroll()
- expect(component.mobileSearchHidden).toBe(false)
+ expect(component.mobileSearchHidden()).toBe(false)
})
it('should keep mobile search visible on desktop scroll or resize', () => {
@@ -323,13 +320,13 @@ describe('AppFrameComponent', () => {
value: 1024,
})
component.ngOnInit()
- component.mobileSearchHidden = true
+ component.mobileSearchHidden.set(true)
component.onWindowScroll()
- expect(component.mobileSearchHidden).toBe(false)
+ expect(component.mobileSearchHidden()).toBe(false)
- component.mobileSearchHidden = true
+ component.mobileSearchHidden.set(true)
component.onWindowResize()
})
@@ -338,7 +335,7 @@ describe('AppFrameComponent', () => {
value: 767,
})
component.ngOnInit()
- component.isMenuCollapsed = false
+ component.isMenuCollapsed.set(false)
Object.defineProperty(globalThis, 'scrollY', {
configurable: true,
@@ -346,7 +343,7 @@ describe('AppFrameComponent', () => {
})
component.onWindowScroll()
- expect(component.mobileSearchHidden).toBe(false)
+ expect(component.mobileSearchHidden()).toBe(false)
})
it('should support close document & navigate on close current doc', () => {
@@ -379,11 +376,11 @@ describe('AppFrameComponent', () => {
})
it('should disable global dropzone on start drag + drop, re-enable after', () => {
- expect(settingsService.globalDropzoneEnabled).toBeTruthy()
+ expect(settingsService.globalDropzoneEnabled()).toBeTruthy()
component.onDragStart(null)
- expect(settingsService.globalDropzoneEnabled).toBeFalsy()
+ expect(settingsService.globalDropzoneEnabled()).toBeFalsy()
component.onDragEnd(null)
- expect(settingsService.globalDropzoneEnabled).toBeTruthy()
+ expect(settingsService.globalDropzoneEnabled()).toBeTruthy()
})
it('should update saved view sorting on drag + drop, show info', () => {
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts
index 7989eb3e1..db752dde7 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.ts
+++ b/src-ui/src/app/components/app-frame/app-frame.component.ts
@@ -6,7 +6,7 @@ import {
moveItemInArray,
} from '@angular/cdk/drag-drop'
import { NgClass } from '@angular/common'
-import { Component, HostListener, inject, OnInit } from '@angular/core'
+import { Component, HostListener, inject, OnInit, signal } from '@angular/core'
import { ActivatedRoute, Router, RouterModule } from '@angular/router'
import {
NgbCollapseModule,
@@ -90,14 +90,10 @@ export class AppFrameComponent
permissionsService = inject(PermissionsService)
private djangoMessagesService = inject(DjangoMessagesService)
- appRemoteVersion: AppRemoteVersion
-
- isMenuCollapsed: boolean = true
-
- slimSidebarAnimating: boolean = false
-
- public mobileSearchHidden: boolean = false
-
+ readonly appRemoteVersion = signal<AppRemoteVersion>(null)
+ readonly isMenuCollapsed = signal(true)
+ readonly slimSidebarAnimating = signal(false)
+ readonly mobileSearchHidden = signal(false)
private lastScrollY: number = 0
constructor() {
@@ -147,7 +143,7 @@ export class AppFrameComponent
}
toggleSlimSidebar(): void {
- this.slimSidebarAnimating = true
+ this.slimSidebarAnimating.set(true)
const slimSidebarEnabled = !this.slimSidebarEnabled
this.settingsService.set(SETTINGS_KEYS.SLIM_SIDEBAR, slimSidebarEnabled)
if (slimSidebarEnabled) {
@@ -167,7 +163,7 @@ export class AppFrameComponent
},
})
setTimeout(() => {
- this.slimSidebarAnimating = false
+ this.slimSidebarAnimating.set(false)
}, 200) // slightly longer than css animation for slim sidebar
}
@@ -177,11 +173,25 @@ export class AppFrameComponent
this.attributesSectionsCollapsed = !this.attributesSectionsCollapsed
}
+ toggleMenuCollapsed(): void {
+ this.isMenuCollapsed.set(!this.isMenuCollapsed())
+ }
+
+ closeMobileSearch(): void {
+ this.mobileSearchHidden.set(false)
+ }
+
+ setMobileSearchHidden(hidden: boolean): void {
+ this.mobileSearchHidden.set(hidden)
+ }
+
get versionString(): string {
+ this.settingsService.trackChanges()
return `${environment.appTitle} v${this.settingsService.get(SETTINGS_KEYS.VERSION)}${environment.tag === 'prod' ? '' : ` #${environment.tag}`}`
}
get customAppTitle(): string {
+ this.settingsService.trackChanges()
return this.settingsService.get(SETTINGS_KEYS.APP_TITLE)
}
@@ -224,6 +234,7 @@ export class AppFrameComponent
}
get slimSidebarEnabled(): boolean {
+ this.settingsService.trackChanges()
return this.settingsService.get(SETTINGS_KEYS.SLIM_SIDEBAR)
}
@@ -243,6 +254,7 @@ export class AppFrameComponent
}
get attributesSectionsCollapsed(): boolean {
+ this.settingsService.trackChanges()
return this.settingsService
.get(SETTINGS_KEYS.ATTRIBUTES_SECTIONS_COLLAPSED)
?.includes(CollapsibleSection.ATTRIBUTES)
@@ -268,13 +280,14 @@ export class AppFrameComponent
}
get aiEnabled(): boolean {
+ this.settingsService.trackChanges()
return this.settingsService.get(SETTINGS_KEYS.AI_ENABLED)
}
@HostListener('window:resize')
onWindowResize(): void {
if (!this.isMobileViewport()) {
- this.mobileSearchHidden = false
+ this.mobileSearchHidden.set(false)
}
}
@@ -282,8 +295,8 @@ export class AppFrameComponent
onWindowScroll(): void {
const currentScrollY = window.scrollY
- if (!this.isMobileViewport() || this.isMenuCollapsed === false) {
- this.mobileSearchHidden = false
+ if (!this.isMobileViewport() || this.isMenuCollapsed() === false) {
+ this.mobileSearchHidden.set(false)
this.lastScrollY = currentScrollY
return
}
@@ -291,9 +304,9 @@ export class AppFrameComponent
const delta = currentScrollY - this.lastScrollY
if (currentScrollY <= 0 || delta < -SCROLL_THRESHOLD) {
- this.mobileSearchHidden = false
+ this.mobileSearchHidden.set(false)
} else if (currentScrollY > SCROLL_THRESHOLD && delta > SCROLL_THRESHOLD) {
- this.mobileSearchHidden = true
+ this.mobileSearchHidden.set(true)
}
this.lastScrollY = currentScrollY
@@ -304,7 +317,7 @@ export class AppFrameComponent
}
closeMenu() {
- this.isMenuCollapsed = true
+ this.isMenuCollapsed.set(true)
}
editProfile() {
@@ -367,11 +380,11 @@ export class AppFrameComponent
}
onDragStart(event: CdkDragStart) {
- this.settingsService.globalDropzoneEnabled = false
+ this.settingsService.globalDropzoneEnabled.set(false)
}
onDragEnd(event: CdkDragEnd) {
- this.settingsService.globalDropzoneEnabled = true
+ this.settingsService.globalDropzoneEnabled.set(true)
}
onDrop(event: CdkDragDrop<SavedView[]>) {
@@ -392,7 +405,7 @@ export class AppFrameComponent
this.remoteVersionService
.checkForUpdates()
.subscribe((appRemoteVersion: AppRemoteVersion) => {
- this.appRemoteVersion = appRemoteVersion
+ this.appRemoteVersion.set(appRemoteVersion)
})
}
@@ -419,9 +432,10 @@ export class AppFrameComponent
}
get showSidebarCounts(): boolean {
+ this.settingsService.trackChanges()
return (
this.settingsService.get(SETTINGS_KEYS.SIDEBAR_VIEWS_SHOW_COUNT) &&
- !this.settingsService.organizingSidebarSavedViews
+ !this.settingsService.organizingSidebarSavedViews()
)
}
}
diff --git a/src-ui/src/app/components/app-frame/global-search/global-search.component.html b/src-ui/src/app/components/app-frame/global-search/global-search.component.html
index 5fdf8b9a7..06c77ac3d 100644
--- a/src-ui/src/app/components/app-frame/global-search/global-search.component.html
+++ b/src-ui/src/app/components/app-frame/global-search/global-search.component.html
@@ -8,17 +8,17 @@
placeholder="Search" aria-label="Search" i18n-placeholder
autocomplete="off"
spellcheck="false"
- [(ngModel)]="query"
- (ngModelChange)="this.queryDebounce.next($event)"
+ [ngModel]="query()"
+ (ngModelChange)="queryDebounce.next($event)"
(keydown)="searchInputKeyDown($event)"
ngbDropdownAnchor>
<div class="position-absolute top-50 end-0 translate-middle">
- @if (loading) {
+ @if (loading()) {
<div class="spinner-border spinner-border-sm text-muted mt-1"></div>
}
</div>
</div>
- @if (query) {
+ @if (query()) {
<button class="btn btn-sm btn-outline-secondary" type="button" (click)="runFullSearch()">
@if (useAdvancedForFullSearch) {
<ng-container i18n>Advanced search</ng-container>
@@ -77,88 +77,88 @@
<div ngbDropdownMenu class="w-100 mh-75 overflow-y-scroll shadow-lg">
<div (keydown)="dropdownKeyDown($event)">
- @if (searchResults?.total === 0) {
+ @if (searchResults()?.total === 0) {
<h6 class="dropdown-header" i18n="@@searchResults.noResults">No results</h6>
} @else {
- @if (searchResults?.documents.length) {
+ @if (searchResults()?.documents.length) {
<h6 class="dropdown-header" i18n="@@searchResults.documents">Documents</h6>
- @for (document of searchResults.documents; track document.id) {
+ @for (document of searchResults().documents; track document.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: document, nameProp: 'title', type: DataType.Document, icon: 'file-text', date: document.created}"></ng-container>
}
}
- @if (searchResults?.saved_views.length) {
+ @if (searchResults()?.saved_views.length) {
<h6 class="dropdown-header" i18n="@@searchResults.saved_views">Saved Views</h6>
- @for (saved_view of searchResults.saved_views; track saved_view.id) {
+ @for (saved_view of searchResults().saved_views; track saved_view.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: saved_view, nameProp: 'name', type: DataType.SavedView, icon: 'funnel'}"></ng-container>
}
}
- @if (searchResults?.tags.length) {
+ @if (searchResults()?.tags.length) {
<h6 class="dropdown-header" i18n="@@searchResults.tags">Tags</h6>
- @for (tag of searchResults.tags; track tag.id) {
+ @for (tag of searchResults().tags; track tag.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: tag, nameProp: 'name', type: DataType.Tag, icon: 'tag'}"></ng-container>
}
}
- @if (searchResults?.correspondents.length) {
+ @if (searchResults()?.correspondents.length) {
<h6 class="dropdown-header" i18n="@@searchResults.correspondents">Correspondents</h6>
- @for (correspondent of searchResults.correspondents; track correspondent.id) {
+ @for (correspondent of searchResults().correspondents; track correspondent.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: correspondent, nameProp: 'name', type: DataType.Correspondent, icon: 'person'}"></ng-container>
}
}
- @if (searchResults?.document_types.length) {
+ @if (searchResults()?.document_types.length) {
<h6 class="dropdown-header" i18n="@@searchResults.documentTypes">Document types</h6>
- @for (documentType of searchResults.document_types; track documentType.id) {
+ @for (documentType of searchResults().document_types; track documentType.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: documentType, nameProp: 'name', type: DataType.DocumentType, icon: 'file-earmark'}"></ng-container>
}
}
- @if (searchResults?.storage_paths.length) {
+ @if (searchResults()?.storage_paths.length) {
<h6 class="dropdown-header" i18n="@@searchResults.storagePaths">Storage paths</h6>
- @for (storagePath of searchResults.storage_paths; track storagePath.id) {
+ @for (storagePath of searchResults().storage_paths; track storagePath.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: storagePath, nameProp: 'name', type: DataType.StoragePath, icon: 'folder'}"></ng-container>
}
}
- @if (searchResults?.users.length) {
+ @if (searchResults()?.users.length) {
<h6 class="dropdown-header" i18n="@@searchResults.users">Users</h6>
- @for (user of searchResults.users; track user.id) {
+ @for (user of searchResults().users; track user.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: user, nameProp: 'username', type: DataType.User, icon: 'person-square'}"></ng-container>
}
}
- @if (searchResults?.groups.length) {
+ @if (searchResults()?.groups.length) {
<h6 class="dropdown-header" i18n="@@searchResults.groups">Groups</h6>
- @for (group of searchResults.groups; track group.id) {
+ @for (group of searchResults().groups; track group.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: group, nameProp: 'name', type: DataType.Group, icon: 'people'}"></ng-container>
}
}
- @if (searchResults?.custom_fields.length) {
+ @if (searchResults()?.custom_fields.length) {
<h6 class="dropdown-header" i18n="@@searchResults.customFields">Custom fields</h6>
- @for (customField of searchResults.custom_fields; track customField.id) {
+ @for (customField of searchResults().custom_fields; track customField.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: customField, nameProp: 'name', type: DataType.CustomField, icon: 'ui-radios'}"></ng-container>
}
}
- @if (searchResults?.mail_accounts.length) {
+ @if (searchResults()?.mail_accounts.length) {
<h6 class="dropdown-header" i18n="@@searchResults.mailAccounts">Mail accounts</h6>
- @for (mailAccount of searchResults.mail_accounts; track mailAccount.id) {
+ @for (mailAccount of searchResults().mail_accounts; track mailAccount.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: mailAccount, nameProp: 'name', type: DataType.MailAccount, icon: 'envelope-at'}"></ng-container>
}
}
- @if (searchResults?.mail_rules.length) {
+ @if (searchResults()?.mail_rules.length) {
<h6 class="dropdown-header" i18n="@@searchResults.mailRules">Mail rules</h6>
- @for (mailRule of searchResults.mail_rules; track mailRule.id) {
+ @for (mailRule of searchResults().mail_rules; track mailRule.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: mailRule, nameProp: 'name', type: DataType.MailRule, icon: 'envelope'}"></ng-container>
}
}
- @if (searchResults?.workflows.length) {
+ @if (searchResults()?.workflows.length) {
<h6 class="dropdown-header" i18n="@@searchResults.workflows">Workflows</h6>
- @for (workflow of searchResults.workflows; track workflow.id) {
+ @for (workflow of searchResults().workflows; track workflow.id) {
<ng-container *ngTemplateOutlet="resultItemTemplate; context: {item: workflow, nameProp: 'name', type: DataType.Workflow, icon: 'boxes'}"></ng-container>
}
}
diff --git a/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts b/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts
index 1be801478..a497f3e50 100644
--- a/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts
+++ b/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts
@@ -1,12 +1,7 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
import { ElementRef } from '@angular/core'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { Router } from '@angular/router'
import {
@@ -154,6 +149,7 @@ describe('GlobalSearchComponent', () => {
searchService = TestBed.inject(SearchService)
router = TestBed.inject(Router)
+ jest.spyOn(router, 'navigate').mockResolvedValue(true)
modalService = TestBed.inject(NgbModal)
documentService = TestBed.inject(DocumentService)
documentListViewService = TestBed.inject(DocumentListViewService)
@@ -170,7 +166,7 @@ describe('GlobalSearchComponent', () => {
document.dispatchEvent(new KeyboardEvent('keydown', { key: '/' }))
expect(focusSpy).toHaveBeenCalled()
- component.searchResults = searchResults as any
+ component.searchResults.set(searchResults as any)
component.resultsDropdown.open()
fixture.detectChanges()
@@ -238,26 +234,26 @@ describe('GlobalSearchComponent', () => {
)
expect(component['currentItemIndex']).toBe(0)
- component.searchResults = { total: 1 } as any
+ component.searchResults.set({ total: 1 } as any)
const primaryActionSpy = jest.spyOn(component, 'primaryAction')
component.searchInputKeyDown(new KeyboardEvent('keydown', { key: 'Enter' }))
expect(primaryActionSpy).toHaveBeenCalled()
- component.query = 'test'
+ component.query.set('test')
const resetSpy = jest.spyOn(GlobalSearchComponent.prototype as any, 'reset')
component.searchInputKeyDown(
new KeyboardEvent('keydown', { key: 'Escape' })
)
expect(resetSpy).toHaveBeenCalled()
- component.query = ''
+ component.query.set('')
const blurSpy = jest.spyOn(component.searchInput.nativeElement, 'blur')
component.searchInputKeyDown(
new KeyboardEvent('keydown', { key: 'Escape' })
)
expect(blurSpy).toHaveBeenCalled()
- component.searchResults = { total: 1 } as any
+ component.searchResults.set({ total: 1 } as any)
component.resultsDropdown.open()
component.searchInputKeyDown(
@@ -268,28 +264,30 @@ describe('GlobalSearchComponent', () => {
component.dropdownKeyDown(new KeyboardEvent('keydown', { key: 'Escape' }))
expect(closeSpy).toHaveBeenCalled()
- component.searchResults = searchResults as any
+ component.searchResults.set(searchResults as any)
component.resultsDropdown.open()
- component.query = 'test'
+ component.query.set('test')
const advancedSearchSpy = jest.spyOn(component, 'runFullSearch')
component.searchInputKeyDown(new KeyboardEvent('keydown', { key: 'Enter' }))
expect(advancedSearchSpy).toHaveBeenCalled()
})
- it('should search on query debounce', fakeAsync(() => {
+ it('should search on query debounce', () => {
+ jest.useFakeTimers()
const query = 'test'
const searchSpy = jest.spyOn(searchService, 'globalSearch')
searchSpy.mockReturnValue(of({} as any))
const dropdownOpenSpy = jest.spyOn(component.resultsDropdown, 'open')
component.queryDebounce.next(query)
- tick(401)
+ jest.advanceTimersByTime(401)
expect(searchSpy).toHaveBeenCalledWith(query)
expect(dropdownOpenSpy).toHaveBeenCalled()
- }))
+ jest.useRealTimers()
+ })
it('should support primary action', () => {
const object = { id: 1 }
- const routerSpy = jest.spyOn(router, 'navigate')
+ const routerSpy = jest.mocked(router.navigate)
const modalSpy = jest.spyOn(modalService, 'open')
let modal: NgbModalRef
@@ -465,13 +463,13 @@ describe('GlobalSearchComponent', () => {
const closeSpy = jest.spyOn(component.resultsDropdown, 'close')
component['reset'](true)
expect(debounce).toHaveBeenCalledWith(null)
- expect(component.searchResults).toBeNull()
+ expect(component.searchResults()).toBeNull()
expect(component['currentItemIndex']).toBe(-1)
expect(closeSpy).toHaveBeenCalled()
})
it('should support focus current item', () => {
- component.searchResults = searchResults as any
+ component.searchResults.set(searchResults as any)
fixture.detectChanges()
const focusSpy = jest.spyOn(
component.primaryButtons.get(0).nativeElement,
@@ -489,7 +487,7 @@ describe('GlobalSearchComponent', () => {
})
it('should focus button on dropdown item hover', () => {
- component.searchResults = searchResults as any
+ component.searchResults.set(searchResults as any)
fixture.detectChanges()
const item: ElementRef = component.resultItems.first
const focusSpy = jest.spyOn(
@@ -515,7 +513,7 @@ describe('GlobalSearchComponent', () => {
component.primaryAction(DataType.Document, { id: 2 }, event as any)
expect(openSpy).toHaveBeenCalledWith('/documents/2', '_blank')
- component.searchResults = searchResults as any
+ component.searchResults.set(searchResults as any)
component.resultsDropdown.open()
fixture.detectChanges()
@@ -542,7 +540,7 @@ describe('GlobalSearchComponent', () => {
it('should support title content search and advanced search', () => {
const qfSpy = jest.spyOn(documentListViewService, 'quickFilter')
- component.query = 'test'
+ component.query.set('test')
component.runFullSearch()
expect(qfSpy).toHaveBeenCalledWith([
{ rule_type: FILTER_SIMPLE_TEXT, value: 'test' },
@@ -552,7 +550,7 @@ describe('GlobalSearchComponent', () => {
SETTINGS_KEYS.SEARCH_FULL_TYPE,
GlobalSearchType.ADVANCED
)
- component.query = 'test'
+ component.query.set('test')
component.runFullSearch()
expect(qfSpy).toHaveBeenCalledWith([
{ rule_type: FILTER_FULLTEXT_QUERY, value: 'test' },
diff --git a/src-ui/src/app/components/app-frame/global-search/global-search.component.ts b/src-ui/src/app/components/app-frame/global-search/global-search.component.ts
index e95b52cfc..aea247b52 100644
--- a/src-ui/src/app/components/app-frame/global-search/global-search.component.ts
+++ b/src-ui/src/app/components/app-frame/global-search/global-search.component.ts
@@ -7,6 +7,7 @@ import {
ViewChild,
ViewChildren,
inject,
+ signal,
} from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { Router } from '@angular/router'
@@ -82,12 +83,12 @@ export class GlobalSearchComponent implements OnInit {
private locationStrategy = inject(LocationStrategy)
public DataType = DataType
- public query: string
+ readonly query = signal<string>(null)
public queryDebounce: Subject<string>
- public searchResults: GlobalSearchResult
+ readonly searchResults = signal<GlobalSearchResult>(null)
private currentItemIndex: number = -1
private domIndex: number = -1
- public loading: boolean = false
+ readonly loading = signal(false)
@ViewChild('searchInput') searchInput: ElementRef
@ViewChild('resultsDropdown') resultsDropdown: NgbDropdown
@@ -96,6 +97,7 @@ export class GlobalSearchComponent implements OnInit {
@ViewChildren('secondaryButton') secondaryButtons: QueryList<ElementRef>
get useAdvancedForFullSearch(): boolean {
+ this.settingsService.trackChanges()
return (
this.settingsService.get(SETTINGS_KEYS.SEARCH_FULL_TYPE) ===
GlobalSearchType.ADVANCED
@@ -112,7 +114,7 @@ export class GlobalSearchComponent implements OnInit {
distinctUntilChanged()
)
.subscribe((text) => {
- this.query = text
+ this.query.set(text)
if (text) this.search(text)
})
}
@@ -126,10 +128,10 @@ export class GlobalSearchComponent implements OnInit {
}
private search(query: string) {
- this.loading = true
+ this.loading.set(true)
this.searchService.globalSearch(query.trim()).subscribe((results) => {
- this.searchResults = results
- this.loading = false
+ this.searchResults.set(results)
+ this.loading.set(false)
this.resultsDropdown.open()
})
}
@@ -205,7 +207,7 @@ export class GlobalSearchComponent implements OnInit {
editDialogComponent,
{ size }
)
- modalRef.componentInstance.dialogMode = EditDialogMode.EDIT
+ modalRef.componentInstance.dialogMode.set(EditDialogMode.EDIT)
modalRef.componentInstance.object = object
modalRef.componentInstance.succeeded.subscribe(() => {
this.toastService.showInfo($localize`Successfully updated object.`)
@@ -243,7 +245,7 @@ export class GlobalSearchComponent implements OnInit {
editDialogComponent,
{ size }
)
- modalRef.componentInstance.dialogMode = EditDialogMode.EDIT
+ modalRef.componentInstance.dialogMode.set(EditDialogMode.EDIT)
modalRef.componentInstance.object = object
modalRef.componentInstance.succeeded.subscribe(() => {
this.toastService.showInfo($localize`Successfully updated object.`)
@@ -256,8 +258,8 @@ export class GlobalSearchComponent implements OnInit {
private reset(close: boolean = false) {
this.queryDebounce.next(null)
- this.query = null
- this.searchResults = null
+ this.query.set(null)
+ this.searchResults.set(null)
this.currentItemIndex = -1
if (close) {
this.resultsDropdown.close()
@@ -292,7 +294,7 @@ export class GlobalSearchComponent implements OnInit {
public searchInputKeyDown(event: KeyboardEvent) {
if (
event.key === 'ArrowDown' &&
- this.searchResults?.total &&
+ this.searchResults()?.total &&
this.resultsDropdown.isOpen()
) {
event.preventDefault()
@@ -300,22 +302,22 @@ export class GlobalSearchComponent implements OnInit {
this.setCurrentItem()
} else if (
event.key === 'ArrowUp' &&
- this.searchResults?.total &&
+ this.searchResults()?.total &&
this.resultsDropdown.isOpen()
) {
event.preventDefault()
- this.currentItemIndex = this.searchResults.total - 1
+ this.currentItemIndex = this.searchResults()?.total - 1
this.setCurrentItem()
} else if (event.key === 'Enter') {
- if (this.searchResults?.total === 1 && this.resultsDropdown.isOpen()) {
+ if (this.searchResults()?.total === 1 && this.resultsDropdown.isOpen()) {
this.primaryButtons.first.nativeElement.click()
this.searchInput.nativeElement.blur()
- } else if (this.query?.length) {
+ } else if (this.query()?.length) {
this.runFullSearch()
this.reset(true)
}
} else if (event.key === 'Escape' && !this.resultsDropdown.isOpen()) {
- if (this.query?.length) {
+ if (this.query()?.length) {
this.reset(true)
} else {
this.searchInput.nativeElement.blur()
@@ -325,14 +327,14 @@ export class GlobalSearchComponent implements OnInit {
public dropdownKeyDown(event: KeyboardEvent) {
if (
- this.searchResults?.total &&
+ this.searchResults()?.total &&
this.resultsDropdown.isOpen() &&
document.activeElement !== this.searchInput.nativeElement
) {
if (event.key === 'ArrowDown') {
event.preventDefault()
event.stopImmediatePropagation()
- if (this.currentItemIndex < this.searchResults.total - 1) {
+ if (this.currentItemIndex < this.searchResults()?.total - 1) {
this.currentItemIndex++
this.setCurrentItem()
} else {
@@ -412,10 +414,10 @@ export class GlobalSearchComponent implements OnInit {
? FILTER_FULLTEXT_QUERY
: FILTER_SIMPLE_TEXT
this.documentService.searchQuery = this.useAdvancedForFullSearch
- ? this.query
+ ? this.query()
: ''
this.documentListViewService.quickFilter([
- { rule_type: ruleType, value: this.query },
+ { rule_type: ruleType, value: this.query() },
])
this.reset(true)
}
diff --git a/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.html b/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.html
index 285cb07ea..5a235d972 100644
--- a/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.html
+++ b/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.html
@@ -1,7 +1,7 @@
<li ngbDropdown class="nav-item mx-1" (openChange)="onOpenChange($event)">
- @if (toasts.length) {
- <span class="badge rounded-pill z-3 pe-none bg-secondary me-2 position-absolute top-0 left-0">{{ toasts.length }}</span>
+ @if (toasts().length) {
+ <span class="badge rounded-pill z-3 pe-none bg-secondary me-2 position-absolute top-0 left-0">{{ toasts().length }}</span>
}
<button class="btn border-0" id="notificationsDropdown" ngbDropdownToggle>
<i-bs width="1.3em" height="1.3em" name="bell"></i-bs>
@@ -12,15 +12,15 @@
<div class="btn-group ms-auto">
<button class="btn btn-sm btn-outline-secondary mb-2 ms-auto"
(click)="toastService.clearToasts()"
- [disabled]="toasts.length === 0"
+ [disabled]="toasts().length === 0"
i18n>Clear All</button>
</div>
</div>
- @if (toasts.length === 0) {
+ @if (toasts().length === 0) {
<p class="text-center mb-0 small text-muted"><em i18n>No notifications</em></p>
}
<div class="scroll-list">
- @for (toast of toasts; track toast.id) {
+ @for (toast of toasts(); track toast.id) {
<pngx-toast [autohide]="false" [toast]="toast" (hidden)="onHidden(toast)" (closed)="toastService.closeToast(toast)"></pngx-toast>
}
</div>
diff --git a/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.spec.ts b/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.spec.ts
index 33b948f30..42a891642 100644
--- a/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.spec.ts
@@ -1,12 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- discardPeriodicTasks,
- fakeAsync,
- flush,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { Subject } from 'rxjs'
import { Toast, ToastService } from 'src/app/services/toast.service'
@@ -42,7 +36,8 @@ describe('ToastsDropdownComponent', () => {
let component: ToastsDropdownComponent
let fixture: ComponentFixture<ToastsDropdownComponent>
let toastService: ToastService
- let toastsSubject: Subject<Toast[]> = new Subject()
+ let toastsSubject: Subject<Toast[]>
+ let getToastsSpy: jest.SpyInstance
beforeEach(async () => {
TestBed.configureTestingModule({
@@ -56,57 +51,43 @@ describe('ToastsDropdownComponent', () => {
],
}).compileComponents()
- fixture = TestBed.createComponent(ToastsDropdownComponent)
toastService = TestBed.inject(ToastService)
- jest.spyOn(toastService, 'getToasts').mockReturnValue(toastsSubject)
+ toastsSubject = new Subject()
+ getToastsSpy = jest
+ .spyOn(toastService, 'getToasts')
+ .mockReturnValue(toastsSubject)
+ fixture = TestBed.createComponent(ToastsDropdownComponent)
component = fixture.componentInstance
fixture.detectChanges()
})
- it('should call getToasts and return toasts', fakeAsync(() => {
- const spy = jest.spyOn(toastService, 'getToasts')
-
- component.ngOnInit()
+ it('should call getToasts and return toasts', () => {
toastsSubject.next(toasts)
fixture.detectChanges()
- expect(spy).toHaveBeenCalled()
- expect(component.toasts).toContainEqual({
+ expect(getToastsSpy).toHaveBeenCalled()
+ expect(component.toasts()).toContainEqual({
id: 'abc-123',
content: 'foo bar',
delay: 5000,
})
+ })
- component.ngOnDestroy()
- flush()
- discardPeriodicTasks()
- }))
-
- it('should show a toast', fakeAsync(() => {
- component.ngOnInit()
+ it('should show a toast', () => {
toastsSubject.next(toasts)
fixture.detectChanges()
expect(fixture.nativeElement.textContent).toContain('foo bar')
+ })
- component.ngOnDestroy()
- flush()
- discardPeriodicTasks()
- }))
-
- it('should toggle suppressPopupToasts', fakeAsync((finish) => {
- component.ngOnInit()
+ it('should toggle suppressPopupToasts', () => {
fixture.detectChanges()
toastsSubject.next(toasts)
const spy = jest.spyOn(toastService, 'suppressPopupToasts', 'set')
component.onOpenChange(true)
expect(spy).toHaveBeenCalledWith(true)
-
- component.ngOnDestroy()
- flush()
- discardPeriodicTasks()
- }))
+ })
})
diff --git a/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.ts b/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.ts
index 7274f2b53..b0bcafd68 100644
--- a/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.ts
+++ b/src-ui/src/app/components/app-frame/toasts-dropdown/toasts-dropdown.component.ts
@@ -1,10 +1,11 @@
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import { Component, inject } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
NgbDropdownModule,
NgbProgressbarModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { Subscription } from 'rxjs'
+import { map } from 'rxjs'
import { Toast, ToastService } from 'src/app/services/toast.service'
import { ToastComponent } from '../../common/toast/toast.component'
@@ -19,22 +20,13 @@ import { ToastComponent } from '../../common/toast/toast.component'
NgxBootstrapIconsModule,
],
})
-export class ToastsDropdownComponent implements OnInit, OnDestroy {
+export class ToastsDropdownComponent {
toastService = inject(ToastService)
- private subscription: Subscription
-
- public toasts: Toast[] = []
-
- ngOnDestroy(): void {
- this.subscription?.unsubscribe()
- }
-
- ngOnInit(): void {
- this.subscription = this.toastService.getToasts().subscribe((toasts) => {
- this.toasts = [...toasts]
- })
- }
+ readonly toasts = toSignal(
+ this.toastService.getToasts().pipe(map((toasts) => [...toasts])),
+ { initialValue: [] as Toast[] }
+ )
onOpenChange(open: boolean): void {
this.toastService.suppressPopupToasts = open
diff --git a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.html b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.html
index 831bb1b55..7292ba8ea 100644
--- a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.html
+++ b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.html
@@ -1,10 +1,10 @@
-@if (active) {
+@if (active()) {
<button class="position-absolute top-0 start-100 translate-middle badge bg-secondary border border-light rounded-pill p-1" title="Clear" i18n-title (click)="onClick($event)">
- @if (!isNumbered && selected) {
+ @if (!isNumbered() && selected()) {
<i-bs class="check" width="1em" height="1em" name="check-lg"></i-bs>
}
- @if (isNumbered) {
- <div class="number">{{number}}<span class="visually-hidden">selected</span></div>
+ @if (isNumbered()) {
+ <div class="number">{{number()}}<span class="visually-hidden">selected</span></div>
}
<i-bs class="x" width=".9em" height="1em" name="x-lg"></i-bs>
</button>
diff --git a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts
index 2f45dd902..50cb5c3bb 100644
--- a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts
+++ b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts
@@ -21,20 +21,20 @@ describe('ClearableBadgeComponent', () => {
})
it('should support selected', () => {
- component.selected = true
- expect(component.active).toBeTruthy()
+ fixture.componentRef.setInput('selected', true)
+ expect(component.active()).toBeTruthy()
})
it('should support numbered', () => {
- component.number = 3
+ fixture.componentRef.setInput('number', 3)
fixture.detectChanges()
- expect(component.active).toBeTruthy()
+ expect(component.active()).toBeTruthy()
expect((fixture.nativeElement as HTMLDivElement).textContent).toContain('3')
})
it('should support selected', () => {
let clearedResult
- component.selected = true
+ fixture.componentRef.setInput('selected', true)
fixture.detectChanges()
component.cleared.subscribe((clear) => {
clearedResult = clear
diff --git a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts
index 51ae812c7..0ee366110 100644
--- a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts
+++ b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts
@@ -1,4 +1,4 @@
-import { Component, EventEmitter, Input, Output } from '@angular/core'
+import { Component, computed, EventEmitter, input, Output } from '@angular/core'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@Component({
@@ -8,24 +8,15 @@ import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
imports: [NgxBootstrapIconsModule],
})
export class ClearableBadgeComponent {
- constructor() {}
-
- @Input()
- number: number
-
- @Input()
- selected: boolean
+ readonly number = input<number>(undefined)
+ readonly selected = input<boolean>(undefined)
@Output()
cleared: EventEmitter<boolean> = new EventEmitter()
- get active(): boolean {
- return this.selected || this.number > -1
- }
+ readonly active = computed(() => this.selected() || this.number() > -1)
- get isNumbered(): boolean {
- return this.number > -1
- }
+ readonly isNumbered = computed(() => this.number() > -1)
onClick(event: PointerEvent) {
this.cleared.emit(true)
diff --git a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts
index 7ef9ccce0..da7149673 100644
--- a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts
+++ b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts
@@ -23,10 +23,10 @@ export class ConfirmDialogComponent extends LoadingComponentWithPermissions {
title = $localize`Confirmation`
@Input()
- messageBold
+ messageBold: string
@Input()
- message
+ message: string
@Input()
btnClass = 'btn-primary'
@@ -38,7 +38,7 @@ export class ConfirmDialogComponent extends LoadingComponentWithPermissions {
alternativeBtnClass = 'btn-secondary'
@Input()
- alternativeBtnCaption
+ alternativeBtnCaption: string
@Input()
cancelBtnClass = 'btn-outline-secondary'
diff --git a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.html b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.html
index ab0951d54..26f0464bf 100644
--- a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.html
+++ b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.html
@@ -9,9 +9,9 @@
<label class="form-label" for="metadataDocumentID" i18n>Documents:</label>
<ul class="list-group"
cdkDropList
- [cdkDropListData]="documentIDs"
+ [cdkDropListData]="documentIDs()"
(cdkDropListDropped)="onDrop($event)">
- @for (documentID of documentIDs; track documentID) {
+ @for (documentID of documentIDs(); track documentID) {
@let document = getDocument(documentID);
@if (document) {
<li class="list-group-item d-flex align-items-center" cdkDrag>
@@ -36,22 +36,22 @@
</div>
<div class="form-group mt-4">
<label class="form-label" for="metadataDocumentID" i18n>Use metadata from:</label>
- <select class="form-select" [(ngModel)]="metadataDocumentID">
+ <select class="form-select" [ngModel]="metadataDocumentID()" (ngModelChange)="metadataDocumentID.set($event)">
<option [ngValue]="-1" i18n>Regenerate all metadata</option>
- @for (document of documents; track document.id) {
+ @for (document of documents(); track document.id) {
<option [ngValue]="document.id">{{document.title}}</option>
}
</select>
</div>
<div class="form-check form-switch mt-4">
- <input class="form-check-input" type="checkbox" role="switch" id="archiveFallbackSwitch" [(ngModel)]="archiveFallback">
+ <input class="form-check-input" type="checkbox" role="switch" id="archiveFallbackSwitch" [ngModel]="archiveFallback()" (ngModelChange)="archiveFallback.set($event)">
<label class="form-check-label" for="archiveFallbackSwitch" i18n>Try to include archive version in merge for non-PDF files</label>
</div>
<div class="form-check form-switch mt-2">
- <input class="form-check-input" type="checkbox" role="switch" id="deleteOriginalsSwitch" [(ngModel)]="deleteOriginals" [disabled]="!userOwnsAllDocuments">
+ <input class="form-check-input" type="checkbox" role="switch" id="deleteOriginalsSwitch" [ngModel]="deleteOriginals()" (ngModelChange)="deleteOriginals.set($event)" [disabled]="!userOwnsAllDocuments">
<label class="form-check-label" for="deleteOriginalsSwitch" i18n>Delete original documents after successful merge</label>
</div>
- @if (!archiveFallback) {
+ @if (!archiveFallback()) {
<p class="small text-muted fst-italic mt-4" i18n>Note that only PDFs will be included.</p>
}
</div>
diff --git a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts
index db772c592..e9b99763a 100644
--- a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts
@@ -50,12 +50,12 @@ describe('MergeConfirmDialogComponent', () => {
component.ngOnInit()
- expect(component.documents).toEqual(documents)
- expect(documentService.getFew).toHaveBeenCalledWith(component.documentIDs)
+ expect(component.documents()).toEqual(documents)
+ expect(documentService.getFew).toHaveBeenCalledWith(component.documentIDs())
})
it('should move documentIDs on drop', () => {
- component.documentIDs = [1, 2, 3]
+ component.documentIDs.set([1, 2, 3])
const event = {
previousIndex: 1,
currentIndex: 2,
@@ -63,7 +63,7 @@ describe('MergeConfirmDialogComponent', () => {
component.onDrop(event as any)
- expect(component.documentIDs).toEqual([1, 3, 2])
+ expect(component.documentIDs()).toEqual([1, 3, 2])
})
it('should get document by ID', () => {
diff --git a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts
index dbf269a23..e852e5a93 100644
--- a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts
+++ b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts
@@ -4,7 +4,7 @@ import {
moveItemInArray,
} from '@angular/cdk/drag-drop'
import { AsyncPipe } from '@angular/common'
-import { Component, OnInit, inject } from '@angular/core'
+import { Component, OnInit, inject, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { takeUntil } from 'rxjs'
@@ -36,15 +36,11 @@ export class MergeConfirmDialogComponent
private documentService = inject(DocumentService)
private permissionService = inject(PermissionsService)
- public documentIDs: number[] = []
- public archiveFallback: boolean = false
- public deleteOriginals: boolean = false
- private _documents: Document[] = []
- get documents(): Document[] {
- return this._documents
- }
-
- public metadataDocumentID: number = -1
+ readonly documentIDs = signal<number[]>([])
+ readonly archiveFallback = signal(false)
+ readonly deleteOriginals = signal(false)
+ readonly documents = signal<Document[]>([])
+ readonly metadataDocumentID = signal(-1)
constructor() {
super()
@@ -52,23 +48,25 @@ export class MergeConfirmDialogComponent
ngOnInit() {
this.documentService
- .getFew(this.documentIDs)
+ .getFew(this.documentIDs())
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((r) => {
- this._documents = r.results
+ this.documents.set(r.results)
})
}
onDrop(event: CdkDragDrop<number[]>) {
- moveItemInArray(this.documentIDs, event.previousIndex, event.currentIndex)
+ const documentIDs = this.documentIDs().concat()
+ moveItemInArray(documentIDs, event.previousIndex, event.currentIndex)
+ this.documentIDs.set(documentIDs)
}
getDocument(documentID: number): Document {
- return this.documents.find((d) => d.id === documentID)
+ return this.documents().find((d) => d.id === documentID)
}
get userOwnsAllDocuments(): boolean {
- return this.documents.every((d) =>
+ return this.documents().every((d) =>
this.permissionService.currentUserOwnsObject(d)
)
}
diff --git a/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.ts
index 82444ad13..28e78fc88 100644
--- a/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.ts
+++ b/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input } from '@angular/core'
+import { Component } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { ConfirmDialogComponent } from '../confirm-dialog.component'
@@ -14,18 +14,11 @@ export class PasswordRemovalConfirmDialogComponent extends ConfirmDialogComponen
includeMetadata: boolean = true
deleteOriginal: boolean = false
- @Input()
- override title = $localize`Remove password protection`
-
- @Input()
- override message =
- $localize`Create an unprotected copy or replace the existing file.`
-
- @Input()
- override btnCaption = $localize`Start`
-
constructor() {
super()
+ this.title = $localize`Remove password protection`
+ this.message = $localize`Create an unprotected copy or replace the existing file.`
+ this.btnCaption = $localize`Start`
}
onUpdateDocumentChange(updateDocument: boolean) {
diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html
index ebd5b1fa8..8f8ecf1f1 100644
--- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html
+++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html
@@ -11,8 +11,8 @@
</button>
</div>
<div class="col-8 d-flex align-items-center">
- @if (documentID) {
- <img class="w-75 m-auto" [ngStyle]="{'transform': 'rotate('+rotation+'deg)'}" [src]="documentService.getThumbUrl(documentID)" />
+ @if (documentID()) {
+ <img class="w-75 m-auto" [ngStyle]="{'transform': 'rotate('+rotation()+'deg)'}" [src]="documentService.getThumbUrl(documentID())" />
}
</div>
<div class="col-2 d-flex">
@@ -21,7 +21,7 @@
</button>
</div>
</div>
- @if (showPDFNote) {
+ @if (showPDFNote()) {
<p class="small text-muted fst-italic mt-4" i18n>Note that only PDFs will be rotated.</p>
}
</div>
diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts
index f33f2638c..6e0bca287 100644
--- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts
@@ -28,7 +28,7 @@ describe('RotateConfirmDialogComponent', () => {
})
it('should support rotating the image', () => {
- component.documentID = 1
+ component.documentID.set(1)
fixture.detectChanges()
component.rotate()
fixture.detectChanges()
diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts
index 90d759da3..18d844ef9 100644
--- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts
+++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts
@@ -1,5 +1,5 @@
import { NgStyle } from '@angular/common'
-import { Component, inject } from '@angular/core'
+import { Component, inject, signal } from '@angular/core'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { DocumentService } from 'src/app/services/rest/document.service'
import { ConfirmDialogComponent } from '../confirm-dialog.component'
@@ -13,14 +13,12 @@ import { ConfirmDialogComponent } from '../confirm-dialog.component'
export class RotateConfirmDialogComponent extends ConfirmDialogComponent {
documentService = inject(DocumentService)
- public documentID: number
- public showPDFNote: boolean = true
-
- // animation is better if we dont normalize yet
- public rotation: number = 0
+ readonly documentID = signal<number>(undefined)
+ readonly showPDFNote = signal(true)
+ readonly rotation = signal(0)
public get degrees(): number {
- let degrees = this.rotation % 360
+ let degrees = this.rotation() % 360
if (degrees < 0) degrees += 360
return degrees
}
@@ -30,6 +28,6 @@ export class RotateConfirmDialogComponent extends ConfirmDialogComponent {
}
rotate(clockwise: boolean = true) {
- this.rotation += clockwise ? 90 : -90
+ this.rotation.update((rotation) => rotation + (clockwise ? 90 : -90))
}
}
diff --git a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts
index 78df9c74f..a0d954a03 100644
--- a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts
@@ -1,11 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { By } from '@angular/platform-browser'
import {
@@ -74,7 +69,7 @@ describe('CustomFieldsDropdownComponent', () => {
})
)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 1, username: 'test' }
+ settingsService.currentUser.set({ id: 1, username: 'test' })
fixture = TestBed.createComponent(CustomFieldsDropdownComponent)
component = fixture.componentInstance
fixture.detectChanges()
@@ -110,7 +105,8 @@ describe('CustomFieldsDropdownComponent', () => {
)
})
- it('should support creating field, show error if necessary, then add', fakeAsync(() => {
+ it('should support creating field, show error if necessary, then add', () => {
+ jest.useFakeTimers()
let modal: NgbModalRef
modalService.activeInstances.subscribe((m) => (modal = m[m.length - 1]))
const toastErrorSpy = jest.spyOn(toastService, 'showError')
@@ -134,11 +130,12 @@ describe('CustomFieldsDropdownComponent', () => {
// succeed
editDialog.succeeded.emit(fields[0])
- tick(100)
+ jest.advanceTimersByTime(100)
expect(toastInfoSpy).toHaveBeenCalled()
expect(getFieldsSpy).toHaveBeenCalled()
expect(addFieldSpy).toHaveBeenCalled()
- }))
+ jest.useRealTimers()
+ })
it('should support creating field with name', () => {
let modal: NgbModalRef
@@ -150,12 +147,13 @@ describe('CustomFieldsDropdownComponent', () => {
expect(editDialog.object.name).toEqual('Foo bar')
})
- it('should support arrow keyboard navigation', fakeAsync(() => {
+ it('should support arrow keyboard navigation', () => {
+ jest.useFakeTimers()
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ jest.advanceTimersByTime(100)
const filterInputEl: HTMLInputElement =
component.listFilterTextInput.nativeElement
expect(document.activeElement).toEqual(filterInputEl)
@@ -193,14 +191,16 @@ describe('CustomFieldsDropdownComponent', () => {
new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true })
)
expect(document.activeElement).toEqual(itemButtons[0])
- }))
+ jest.useRealTimers()
+ })
- it('should support arrow keyboard navigation after tab keyboard navigation', fakeAsync(() => {
+ it('should support arrow keyboard navigation after tab keyboard navigation', () => {
+ jest.useFakeTimers()
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ jest.advanceTimersByTime(100)
const filterInputEl: HTMLInputElement =
component.listFilterTextInput.nativeElement
expect(document.activeElement).toEqual(filterInputEl)
@@ -229,9 +229,10 @@ describe('CustomFieldsDropdownComponent', () => {
new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true })
)
expect(document.activeElement).toEqual(itemButtons[1])
- }))
+ jest.useRealTimers()
+ })
- it('should support enter keyboard navigation', fakeAsync(() => {
+ it('should support enter keyboard navigation', () => {
jest.spyOn(component, 'canCreateFields', 'get').mockReturnValue(true)
const addFieldSpy = jest.spyOn(component, 'addField')
const createFieldSpy = jest.spyOn(component, 'createField')
@@ -250,5 +251,5 @@ describe('CustomFieldsDropdownComponent', () => {
component.listFilterEnter()
expect(createFieldSpy).not.toHaveBeenCalled()
expect(addFieldSpy).not.toHaveBeenCalled()
- }))
+ })
})
diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html
index 1c0134f70..724616363 100644
--- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html
+++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html
@@ -75,7 +75,7 @@
<ng-template #queryAtom let-atom="atom">
<div class="input-group input-group-sm">
- <ng-select
+ <ng-select #fieldSelects
class="paperless-input-select"
[items]="customFields"
[(ngModel)]="atom.field"
diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts
index 69f89f74e..4ac087ea1 100644
--- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts
@@ -1,11 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- fakeAsync,
- TestBed,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'
import { NgSelectModule } from '@ng-select/ng-select'
@@ -210,14 +205,13 @@ describe('CustomFieldsQueryDropdownComponent', () => {
expect(component.name).toBe('test_title')
})
- it('should add a default atom on open and focus the select field', fakeAsync(() => {
+ it('should add a default atom on open', async () => {
expect(component.selectionModel.queries.length).toBe(0)
component.onOpenChange(true)
fixture.detectChanges()
- tick()
+ await fixture.whenStable()
expect(component.selectionModel.queries.length).toBe(1)
- expect(window.document.activeElement.tagName).toBe('INPUT')
- }))
+ })
describe('CustomFieldQueriesModel', () => {
let model: CustomFieldQueriesModel
diff --git a/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts b/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts
index ee99a726b..91e06c428 100644
--- a/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts
@@ -1,12 +1,7 @@
import { DatePipe } from '@angular/common'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
@@ -59,27 +54,32 @@ describe('DatesDropdownComponent', () => {
expect(settingsSpy).toHaveBeenCalled()
})
- it('should support date input, emit change', fakeAsync(() => {
+ it('should support date input, emit change', () => {
+ jest.useFakeTimers()
let result: string
component.createdDateFromChange.subscribe((date) => (result = date))
const input: HTMLInputElement = fixture.nativeElement.querySelector('input')
input.value = '5/30/2023'
input.dispatchEvent(new Event('change'))
- tick(500)
+ jest.advanceTimersByTime(500)
expect(result).not.toBeNull()
- }))
+ jest.useRealTimers()
+ })
- it('should support date select, emit datesSet change', fakeAsync(() => {
+ it('should support date select, emit datesSet change', () => {
+ jest.useFakeTimers()
let result: DateSelection
component.datesSet.subscribe((date) => (result = date))
const input: HTMLInputElement = fixture.nativeElement.querySelector('input')
input.value = '5/30/2023'
input.dispatchEvent(new Event('dateSelect'))
- tick(500)
+ jest.advanceTimersByTime(500)
expect(result).not.toBeNull()
- }))
+ jest.useRealTimers()
+ })
- it('should support relative dates', fakeAsync(() => {
+ it('should support relative dates', () => {
+ jest.useFakeTimers()
let result: DateSelection
component.datesSet.subscribe((date) => (result = date))
component.createdRelativeDate = RelativeDate.WITHIN_1_WEEK // normally set by ngModel binding in dropdown
@@ -88,7 +88,7 @@ describe('DatesDropdownComponent', () => {
} as any)
component.addedRelativeDate = RelativeDate.WITHIN_1_WEEK // normally set by ngModel binding in dropdown
component.onSetAddedRelativeDate({ id: RelativeDate.WITHIN_1_WEEK } as any)
- tick(500)
+ jest.advanceTimersByTime(500)
expect(result).toEqual({
createdFrom: null,
createdTo: null,
@@ -97,7 +97,8 @@ describe('DatesDropdownComponent', () => {
addedTo: null,
addedRelativeDateID: RelativeDate.WITHIN_1_WEEK,
})
- }))
+ jest.useRealTimers()
+ })
it('should support report if active', () => {
component.createdRelativeDate = RelativeDate.WITHIN_1_WEEK
@@ -177,11 +178,12 @@ describe('DatesDropdownComponent', () => {
expect(eventSpy).toHaveBeenCalled()
})
- it('should support debounce', fakeAsync(() => {
+ it('should support debounce', () => {
+ jest.useFakeTimers()
let result: DateSelection
component.datesSet.subscribe((date) => (result = date))
component.onChangeDebounce()
- tick(500)
+ jest.advanceTimersByTime(500)
expect(result).toEqual({
createdFrom: null,
createdTo: null,
@@ -190,5 +192,6 @@ describe('DatesDropdownComponent', () => {
addedTo: null,
addedRelativeDateID: null,
})
- }))
+ jest.useRealTimers()
+ })
})
diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts
index 467aabc4f..9e1661a13 100644
--- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts
@@ -41,20 +41,20 @@ describe('CorrespondentEditDialogComponent', () => {
fixture = TestBed.createComponent(CorrespondentEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts
index 419fd89bb..970c7f364 100644
--- a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts
@@ -44,33 +44,33 @@ describe('CustomFieldEditDialogComponent', () => {
fixture = TestBed.createComponent(CustomFieldEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
it('should disable data type select on edit', () => {
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
component.ngOnInit()
expect(component.objectForm.get('data_type').disabled).toBeTruthy()
})
it('should initialize select options on edit', () => {
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
component.object = {
id: 1,
name: 'Field 1',
@@ -91,7 +91,7 @@ describe('CustomFieldEditDialogComponent', () => {
})
it('should support add / remove select options', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
fixture.detectChanges()
component.ngOnInit()
expect(
@@ -115,7 +115,7 @@ describe('CustomFieldEditDialogComponent', () => {
const selectOptionInputs = component[
'selectOptionInputs'
] as QueryList<ElementRef>
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
component.objectForm.get('data_type').setValue(CustomFieldDataType.Select)
component.ngOnInit()
component.ngAfterViewInit()
@@ -125,7 +125,7 @@ describe('CustomFieldEditDialogComponent', () => {
})
it('should send all select options including those changed in form on save', () => {
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
component.object = {
id: 1,
name: 'Field 1',
diff --git a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts
index 8e8bddfab..78fd7e748 100644
--- a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts
@@ -149,7 +149,7 @@ export class CustomFieldEditDialogComponent
}
get typeFieldDisabled(): boolean {
- return this.dialogMode === EditDialogMode.EDIT
+ return this.dialogMode() === EditDialogMode.EDIT
}
private updateSelectOptions() {
diff --git a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts
index c3c46c980..c107c39d3 100644
--- a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts
@@ -41,20 +41,20 @@ describe('DocumentTypeEditDialogComponent', () => {
fixture = TestBed.createComponent(DocumentTypeEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts
index 1dbd54edf..6dd1e11c9 100644
--- a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts
@@ -4,12 +4,7 @@ import {
provideHttpClientTesting,
} from '@angular/common/http/testing'
import { Component } from '@angular/core'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import {
FormControl,
FormGroup,
@@ -122,7 +117,7 @@ describe('EditDialogComponent', () => {
tagService = TestBed.inject(TagService)
permissionsService = TestBed.inject(PermissionsService)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = currentUser
+ settingsService.currentUser.set(currentUser as any)
permissionsService.initialize([], currentUser as any)
activeModal = TestBed.inject(NgbActiveModal)
httpTestingController = TestBed.inject(HttpTestingController)
@@ -136,7 +131,7 @@ describe('EditDialogComponent', () => {
it('should interpolate object permissions', () => {
component.getMatchingAlgorithms() // coverage
component.object = tag
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
component.ngOnInit()
expect(component.objectForm.get('permissions_form').value).toEqual({
@@ -145,15 +140,17 @@ describe('EditDialogComponent', () => {
})
})
- it('should delay close enabled', fakeAsync(() => {
+ it('should delay close enabled', () => {
+ jest.useFakeTimers()
expect(component.closeEnabled).toBeFalsy()
component.ngOnInit()
- tick(100)
+ jest.advanceTimersByTime(100)
expect(component.closeEnabled).toBeTruthy()
- }))
+ jest.useRealTimers()
+ })
it('should set default owner when in create mode if unset', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
component.ngOnInit()
expect(component.objectForm.get('permissions_form').value.owner).toEqual(
currentUser.id
@@ -164,7 +161,7 @@ describe('EditDialogComponent', () => {
})
it('should set default perms when in create mode if set', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
settingsService.set(SETTINGS_KEYS.DEFAULT_PERMS_OWNER, 11)
settingsService.set(SETTINGS_KEYS.DEFAULT_PERMS_VIEW_USERS, [1, 2])
settingsService.set(SETTINGS_KEYS.DEFAULT_PERMS_VIEW_GROUPS, [3])
@@ -203,18 +200,18 @@ describe('EditDialogComponent', () => {
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
- fixture.detectChanges()
+ component.getTitle()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
- fixture.detectChanges()
+ component.dialogMode.set(EditDialogMode.EDIT)
+ component.getTitle()
expect(editTitleSpy).toHaveBeenCalled()
// coverage
- component.dialogMode = null
- fixture.detectChanges()
+ component.dialogMode.set(null)
+ component.getTitle()
})
it('should close on cancel', () => {
@@ -225,14 +222,14 @@ describe('EditDialogComponent', () => {
it('should update an object on save in edit mode', () => {
const updateSpy = jest.spyOn(tagService, 'update')
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
component.save()
expect(updateSpy).toHaveBeenCalled()
})
it('should not submit owner or permissions for non-owner edits', () => {
component.object = tag
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
component.ngOnInit()
component.objectForm.get('name').setValue('Updated tag')
@@ -251,7 +248,7 @@ describe('EditDialogComponent', () => {
it('should create an object on save in edit mode', () => {
const createSpy = jest.spyOn(tagService, 'create')
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
component.save()
expect(createSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts
index 3d9026833..456ba69f9 100644
--- a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts
@@ -5,6 +5,7 @@ import {
OnInit,
Output,
inject,
+ model,
} from '@angular/core'
import { FormGroup } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
@@ -45,10 +46,7 @@ export abstract class EditDialogComponent<
protected settingsService = inject(SettingsService)
protected permissionsService = inject(PermissionsService)
- users: User[]
-
- @Input()
- dialogMode: EditDialogMode = EditDialogMode.CREATE
+ dialogMode = model(EditDialogMode.CREATE)
@Input()
object: T
@@ -59,18 +57,20 @@ export abstract class EditDialogComponent<
@Output()
failed = new EventEmitter()
+ users: User[]
+
networkActive = false
closeEnabled = false
- error = null
+ error: any = null
abstract getForm(): FormGroup
objectForm: FormGroup = this.getForm()
ngOnInit(): void {
- if (this.object != null && this.dialogMode !== EditDialogMode.CREATE) {
+ if (this.object != null && this.dialogMode() !== EditDialogMode.CREATE) {
this.object['permissions_form'] = {
owner: (this.object as ObjectWithPermissions).owner,
set_permissions: (this.object as ObjectWithPermissions).permissions,
@@ -124,7 +124,7 @@ export abstract class EditDialogComponent<
}
getTitle() {
- switch (this.dialogMode) {
+ switch (this.dialogMode()) {
case EditDialogMode.CREATE:
return this.getCreateTitle()
case EditDialogMode.EDIT:
@@ -151,7 +151,7 @@ export abstract class EditDialogComponent<
protected shouldSubmitPermissions(): boolean {
return (
- this.dialogMode === EditDialogMode.CREATE ||
+ this.dialogMode() === EditDialogMode.CREATE ||
this.permissionsService.currentUserOwnsObject(this.object)
)
}
@@ -172,7 +172,7 @@ export abstract class EditDialogComponent<
delete newObject['set_permissions']
}
var serverResponse: Observable<T>
- switch (this.dialogMode) {
+ switch (this.dialogMode()) {
case EditDialogMode.CREATE:
serverResponse = this.service.create(newObject)
break
diff --git a/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts
index 88e989942..b7002853b 100644
--- a/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts
@@ -45,20 +45,20 @@ describe('GroupEditDialogComponent', () => {
fixture = TestBed.createComponent(GroupEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html
index feb834035..af99a5f91 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html
@@ -25,8 +25,8 @@
</div>
<div class="modal-footer">
<div class="m-0 me-2">
- @if (testResult) {
- <ngb-alert #testResultAlert [type]="testResult" class="mb-0 py-2" (closed)="testResult = null">{{testResultMessage}}</ngb-alert>
+ @if (testResult()) {
+ <ngb-alert #testResultAlert [type]="testResult()" class="mb-0 py-2" (closed)="testResult.set(null)">{{testResultMessage}}</ngb-alert>
}
</div>
<button type="button" class="btn btn-outline-primary" (click)="test()" [disabled]="networkActive || testActive">
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts
index bdb5863a7..57ff40ed0 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts
@@ -3,12 +3,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'
import { NgSelectModule } from '@ng-select/ng-select'
@@ -58,25 +53,26 @@ describe('MailAccountEditDialogComponent', () => {
fixture = TestBed.createComponent(MailAccountEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
- it('should support test mail account and show appropriate expiring alert', fakeAsync(() => {
+ it('should support test mail account and show appropriate expiring alert', () => {
+ jest.useFakeTimers()
component.object = {
name: 'example',
imap_server: 'imap.example.com',
@@ -97,7 +93,7 @@ describe('MailAccountEditDialogComponent', () => {
expect(fixture.nativeElement.textContent).toContain(
'Successfully connected'
)
- tick(6000)
+ jest.advanceTimersByTime(6000)
fixture.detectChanges()
expect(fixture.nativeElement.textContent).not.toContain(
'Successfully connected'
@@ -118,6 +114,7 @@ describe('MailAccountEditDialogComponent', () => {
.flush({}, { status: 500, statusText: 'error' })
fixture.detectChanges()
expect(fixture.nativeElement.textContent).toContain('Unable to connect')
- tick(6000)
- }))
+ jest.advanceTimersByTime(6000)
+ jest.useRealTimers()
+ })
})
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts
index 855a79a4e..2b99b6aa5 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts
@@ -1,4 +1,4 @@
-import { Component, ViewChild, inject } from '@angular/core'
+import { Component, ViewChild, inject, signal } from '@angular/core'
import {
FormControl,
FormGroup,
@@ -38,7 +38,7 @@ const IMAP_SECURITY_OPTIONS = [
})
export class MailAccountEditDialogComponent extends EditDialogComponent<MailAccount> {
testActive: boolean = false
- testResult: string
+ readonly testResult = signal<string>(undefined)
alertTimeout
@ViewChild('testResultAlert', { static: false }) testResultAlert: NgbAlert
@@ -77,7 +77,7 @@ export class MailAccountEditDialogComponent extends EditDialogComponent<MailAcco
test() {
this.testActive = true
- this.testResult = null
+ this.testResult.set(null)
clearTimeout(this.alertTimeout)
const mailService = this.service as MailAccountService
const newObject = Object.assign(
@@ -87,19 +87,19 @@ export class MailAccountEditDialogComponent extends EditDialogComponent<MailAcco
mailService.test(newObject).subscribe({
next: (result: { success: boolean }) => {
this.testActive = false
- this.testResult = result.success ? 'success' : 'danger'
+ this.testResult.set(result.success ? 'success' : 'danger')
this.alertTimeout = setTimeout(() => this.testResultAlert.close(), 5000)
},
error: (e) => {
this.testActive = false
- this.testResult = 'danger'
+ this.testResult.set('danger')
this.alertTimeout = setTimeout(() => this.testResultAlert.close(), 5000)
},
})
}
get testResultMessage() {
- return this.testResult === 'success'
+ return this.testResult() === 'success'
? $localize`Successfully connected to the mail server`
: $localize`Unable to connect to the mail server`
}
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html
index 0b06616fb..2c791c4c8 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html
@@ -13,7 +13,7 @@
<pngx-input-text [horizontal]="true" i18n-title title="Name" formControlName="name" [error]="error?.name" autocomplete="off"></pngx-input-text>
</div>
<div class="col-md-4">
- <pngx-input-select [horizontal]="true" i18n-title title="Account" [items]="accounts" formControlName="account"></pngx-input-select>
+ <pngx-input-select [horizontal]="true" i18n-title title="Account" [items]="accounts()" formControlName="account"></pngx-input-select>
</div>
<div class="col-md-2 pt-2">
<pngx-input-switch [horizontal]="true" i18n-title title="Enabled" formControlName="enabled"></pngx-input-switch>
@@ -65,10 +65,10 @@
</div>
<div class="col-md-6">
<pngx-input-tags [horizontal]="true" [allowCreate]="false" formControlName="assign_tags"></pngx-input-tags>
- <pngx-input-select [horizontal]="true" i18n-title title="Assign document type" [items]="documentTypes" [allowNull]="true" formControlName="assign_document_type"></pngx-input-select>
+ <pngx-input-select [horizontal]="true" i18n-title title="Assign document type" [items]="documentTypes()" [allowNull]="true" formControlName="assign_document_type"></pngx-input-select>
<pngx-input-select [horizontal]="true" i18n-title title="Assign correspondent from" [items]="metadataCorrespondentOptions" formControlName="assign_correspondent_from"></pngx-input-select>
@if (showCorrespondentField) {
- <pngx-input-select [horizontal]="true" i18n-title title="Assign correspondent" [items]="correspondents" [allowNull]="true" formControlName="assign_correspondent"></pngx-input-select>
+ <pngx-input-select [horizontal]="true" i18n-title title="Assign correspondent" [items]="correspondents()" [allowNull]="true" formControlName="assign_correspondent"></pngx-input-select>
}
</div>
</div>
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts
index af3b4dbd8..a818c752b 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts
@@ -75,20 +75,20 @@ describe('MailRuleEditDialogComponent', () => {
fixture = TestBed.createComponent(MailRuleEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
index 436569a08..a123c097c 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
@@ -1,11 +1,12 @@
import { Component, inject } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
FormControl,
FormGroup,
FormsModule,
ReactiveFormsModule,
} from '@angular/forms'
-import { first } from 'rxjs'
+import { map } from 'rxjs'
import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'
import { Correspondent } from 'src/app/data/correspondent'
import { DocumentType } from 'src/app/data/document-type'
@@ -154,37 +155,28 @@ const METADATA_CORRESPONDENT_OPTIONS = [
],
})
export class MailRuleEditDialogComponent extends EditDialogComponent<MailRule> {
- private accountService: MailAccountService
- private correspondentService: CorrespondentService
- private documentTypeService: DocumentTypeService
+ private readonly accountService = inject(MailAccountService)
+ private readonly correspondentService = inject(CorrespondentService)
+ private readonly documentTypeService = inject(DocumentTypeService)
- accounts: MailAccount[]
- correspondents: Correspondent[]
- documentTypes: DocumentType[]
+ readonly accounts = toSignal(
+ this.accountService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as MailAccount[] }
+ )
+ readonly correspondents = toSignal(
+ this.correspondentService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as Correspondent[] }
+ )
+ readonly documentTypes = toSignal(
+ this.documentTypeService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as DocumentType[] }
+ )
constructor() {
super()
this.service = inject(MailRuleService)
- this.accountService = inject(MailAccountService)
- this.correspondentService = inject(CorrespondentService)
- this.documentTypeService = inject(DocumentTypeService)
this.userService = inject(UserService)
this.settingsService = inject(SettingsService)
-
- this.accountService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.accounts = result.results))
-
- this.correspondentService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.correspondents = result.results))
-
- this.documentTypeService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.documentTypes = result.results))
}
getCreateTitle() {
diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts
index 2466ced73..67bbba641 100644
--- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts
@@ -30,20 +30,20 @@ describe('StoragePathEditDialogComponent', () => {
documentService = TestBed.inject(DocumentService)
fixture = TestBed.createComponent(StoragePathEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
index 68ce40f5e..f0d17a965 100644
--- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
@@ -67,11 +67,11 @@ export class StoragePathEditDialogComponent
private testDocument: Document
public testResult: string
public testFailed: boolean = false
- public loading = false
public testLoading = false
constructor() {
super()
+ this.loading.set(false)
this.service = inject(StoragePathService)
this.userService = inject(UserService)
this.settingsService = inject(SettingsService)
@@ -138,7 +138,7 @@ export class StoragePathEditDialogComponent
this.documentsInput$.pipe(
distinctUntilChanged(),
takeUntil(this.unsubscribeNotifier),
- tap(() => (this.loading = true)),
+ tap(() => this.loading.set(true)),
switchMap((title) =>
this.documentsService
.listFiltered(
@@ -152,7 +152,7 @@ export class StoragePathEditDialogComponent
.pipe(
map((result) => result.results),
catchError(() => of([])), // empty on error
- tap(() => (this.loading = false))
+ tap(() => this.loading.set(false))
)
)
)
diff --git a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts
index 16fb7a9f3..c16130a18 100644
--- a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts
@@ -48,20 +48,20 @@ describe('TagEditDialogComponent', () => {
fixture = TestBed.createComponent(TagEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
diff --git a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.html
index df1593073..3bab247dc 100644
--- a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.html
@@ -31,7 +31,7 @@
</div>
</div>
- <pngx-input-select i18n-title title="Groups" [items]="groups" multiple="true" formControlName="groups"></pngx-input-select>
+ <pngx-input-select i18n-title title="Groups" [items]="groups()" multiple="true" formControlName="groups"></pngx-input-select>
@if (object?.is_mfa_enabled && currentUserIsSuperUser) {
<label class="form-label" i18n>Two-factor Authentication</label>
@@ -42,7 +42,7 @@
i18n-title
buttonClasses="btn-outline-danger btn-sm"
iconName="trash"
- [disabled]="totpLoading"
+ [disabled]="totpLoading()"
(confirm)="deactivateTotp()">
</pngx-confirm-button>
}
diff --git a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts
index 9ffa1ea95..f50bf830e 100644
--- a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts
@@ -73,7 +73,7 @@ describe('UserEditDialogComponent', () => {
fixture = TestBed.createComponent(UserEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
permissionsService = TestBed.inject(PermissionsService)
toastService = TestBed.inject(ToastService)
component = fixture.componentInstance
@@ -82,13 +82,13 @@ describe('UserEditDialogComponent', () => {
})
it('should support create and edit modes', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
expect(createTitleSpy).toHaveBeenCalled()
expect(editTitleSpy).not.toHaveBeenCalled()
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
@@ -114,17 +114,17 @@ describe('UserEditDialogComponent', () => {
it('should detect whether password was changed in form on save', () => {
component.objectForm.get('password').setValue(null)
component.save()
- expect(component.passwordIsSet).toBeFalsy()
+ expect(component.passwordIsSet()).toBeFalsy()
// unchanged pw
component.objectForm.get('password').setValue('*******')
component.save()
- expect(component.passwordIsSet).toBeFalsy()
+ expect(component.passwordIsSet()).toBeFalsy()
// unchanged pw
component.objectForm.get('password').setValue('helloworld')
component.save()
- expect(component.passwordIsSet).toBeTruthy()
+ expect(component.passwordIsSet()).toBeTruthy()
})
it('should support deactivation of TOTP', () => {
diff --git a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts
index 215b2c137..426fc67e2 100644
--- a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts
@@ -1,11 +1,12 @@
-import { Component, OnInit, inject } from '@angular/core'
+import { Component, OnInit, inject, signal } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
FormControl,
FormGroup,
FormsModule,
ReactiveFormsModule,
} from '@angular/forms'
-import { first } from 'rxjs'
+import { first, map } from 'rxjs'
import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'
import { Group } from 'src/app/data/group'
import { User } from 'src/app/data/user'
@@ -38,22 +39,19 @@ export class UserEditDialogComponent
implements OnInit
{
private toastService = inject(ToastService)
- private groupsService: GroupService
+ private readonly groupsService = inject(GroupService)
- groups: Group[]
- passwordIsSet: boolean = false
- public totpLoading: boolean = false
+ readonly groups = toSignal(
+ this.groupsService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as Group[] }
+ )
+ readonly passwordIsSet = signal(false)
+ readonly totpLoading = signal(false)
constructor() {
super()
this.service = inject(UserService)
- this.groupsService = inject(GroupService)
this.settingsService = inject(SettingsService)
-
- this.groupsService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.groups = result.results))
}
ngOnInit(): void {
@@ -103,14 +101,15 @@ export class UserEditDialogComponent
if (!groupsVal) return []
else
return groupsVal.flatMap(
- (id) => this.groups.find((g) => g.id == id)?.permissions
+ (id) => this.groups()?.find((g) => g.id == id)?.permissions
)
}
save(): void {
- this.passwordIsSet =
+ this.passwordIsSet.set(
this.objectForm.get('password').value?.toString().replaceAll('*', '')
.length > 0
+ )
super.save()
}
@@ -119,13 +118,13 @@ export class UserEditDialogComponent
}
deactivateTotp() {
- this.totpLoading = true
+ this.totpLoading.set(true)
;(this.service as UserService)
.deactivateTotp(this.object)
.pipe(first())
.subscribe({
next: (result) => {
- this.totpLoading = false
+ this.totpLoading.set(false)
if (result) {
this.toastService.showInfo($localize`Totp deactivated`)
this.object.is_mfa_enabled = false
@@ -134,7 +133,7 @@ export class UserEditDialogComponent
}
},
error: (e) => {
- this.totpLoading = false
+ this.totpLoading.set(false)
this.toastService.showError($localize`Totp deactivation failed`, e)
},
})
diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
index 51b8a2a5d..9dce30891 100644
--- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
@@ -140,7 +140,7 @@
</div>
@if (formGroup.get('schedule_date_field').value === 'custom_field') {
<div class="col-4">
- <pngx-input-select i18n-title title="Custom field" formControlName="schedule_date_custom_field" [items]="dateCustomFields" i18n-hint hint="Custom field to use for date." [error]="error?.schedule_date_custom_field"></pngx-input-select>
+ <pngx-input-select i18n-title title="Custom field" formControlName="schedule_date_custom_field" [items]="dateCustomFields()" i18n-hint hint="Custom field to use for date." [error]="error?.schedule_date_custom_field"></pngx-input-select>
</div>
}
</div>
@@ -162,7 +162,7 @@
@if (formGroup.get('type').value === WorkflowTriggerType.Consumption) {
<pngx-input-select i18n-title title="Filter sources" [items]="sourceOptions" horizontal="true" [multiple]="true" formControlName="sources" [error]="error?.sources"></pngx-input-select>
<pngx-input-text i18n-title title="Filter path" formControlName="filter_path" horizontal="true" i18n-hint hint="Apply to documents that match this path. Wildcards specified as * are allowed. Case-normalized." [error]="error?.filter_path"></pngx-input-text>
- <pngx-input-select i18n-title title="Filter mail rule" [items]="mailRules" horizontal="true" [allowNull]="true" formControlName="filter_mailrule" i18n-hint hint="Apply to documents consumed via this mail rule." [error]="error?.filter_mailrule"></pngx-input-select>
+ <pngx-input-select i18n-title title="Filter mail rule" [items]="mailRules()" horizontal="true" [allowNull]="true" formControlName="filter_mailrule" i18n-hint hint="Apply to documents consumed via this mail rule." [error]="error?.filter_mailrule"></pngx-input-select>
}
@if (formGroup.get('type').value === WorkflowTriggerType.DocumentAdded || formGroup.get('type').value === WorkflowTriggerType.DocumentUpdated || formGroup.get('type').value === WorkflowTriggerType.Scheduled) {
<pngx-input-select i18n-title title="Content matching algorithm" horizontal="true" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></pngx-input-select>
@@ -262,10 +262,10 @@
<div class="col">
<pngx-input-text i18n-title title="Assign title" formControlName="assign_title" i18n-hint hint="Can include some placeholders, see <a target='_blank' href='https://docs.paperless-ngx.com/usage/#workflows'>documentation</a>." [error]="error?.actions?.[i]?.assign_title"></pngx-input-text>
<pngx-input-tags [allowCreate]="false" i18n-title title="Assign tags" formControlName="assign_tags"></pngx-input-tags>
- <pngx-input-select i18n-title title="Assign document type" [items]="documentTypes" [allowNull]="true" formControlName="assign_document_type"></pngx-input-select>
- <pngx-input-select i18n-title title="Assign correspondent" [items]="correspondents" [allowNull]="true" formControlName="assign_correspondent"></pngx-input-select>
- <pngx-input-select i18n-title title="Assign storage path" [items]="storagePaths" [allowNull]="true" formControlName="assign_storage_path"></pngx-input-select>
- <pngx-input-select i18n-title title="Assign custom fields" multiple="true" [items]="customFields" [allowNull]="true" formControlName="assign_custom_fields"></pngx-input-select>
+ <pngx-input-select i18n-title title="Assign document type" [items]="documentTypes()" [allowNull]="true" formControlName="assign_document_type"></pngx-input-select>
+ <pngx-input-select i18n-title title="Assign correspondent" [items]="correspondents()" [allowNull]="true" formControlName="assign_correspondent"></pngx-input-select>
+ <pngx-input-select i18n-title title="Assign storage path" [items]="storagePaths()" [allowNull]="true" formControlName="assign_storage_path"></pngx-input-select>
+ <pngx-input-select i18n-title title="Assign custom fields" multiple="true" [items]="customFields()" [allowNull]="true" formControlName="assign_custom_fields"></pngx-input-select>
<pngx-input-custom-fields-values formControlName="assign_custom_fields_values" [selectedFields]="formGroup.get('assign_custom_fields').value" (removeSelectedField)="removeSelectedCustomField($event, formGroup)"></pngx-input-custom-fields-values>
</div>
<div class="col">
@@ -326,25 +326,25 @@
<h6 class="form-label" i18n>Remove correspondents</h6>
<pngx-input-switch i18n-title title="Remove all" [horizontal]="true" formControlName="remove_all_correspondents"></pngx-input-switch>
<div class="mt-n3">
- <pngx-input-select i18n-title title="" multiple="true" [items]="correspondents" formControlName="remove_correspondents"></pngx-input-select>
+ <pngx-input-select i18n-title title="" multiple="true" [items]="correspondents()" formControlName="remove_correspondents"></pngx-input-select>
</div>
<h6 class="form-label" i18n>Remove document types</h6>
<pngx-input-switch i18n-title title="Remove all" [horizontal]="true" formControlName="remove_all_document_types"></pngx-input-switch>
<div class="mt-n3">
- <pngx-input-select i18n-title title="" multiple="true" [items]="documentTypes" formControlName="remove_document_types"></pngx-input-select>
+ <pngx-input-select i18n-title title="" multiple="true" [items]="documentTypes()" formControlName="remove_document_types"></pngx-input-select>
</div>
<h6 class="form-label" i18n>Remove storage paths</h6>
<pngx-input-switch i18n-title title="Remove all" [horizontal]="true" formControlName="remove_all_storage_paths"></pngx-input-switch>
<div class="mt-n3">
- <pngx-input-select i18n-title title="" multiple="true" [items]="storagePaths" formControlName="remove_storage_paths"></pngx-input-select>
+ <pngx-input-select i18n-title title="" multiple="true" [items]="storagePaths()" formControlName="remove_storage_paths"></pngx-input-select>
</div>
<h6 class="form-label" i18n>Remove custom fields</h6>
<pngx-input-switch i18n-title title="Remove all" [horizontal]="true" formControlName="remove_all_custom_fields"></pngx-input-switch>
<div class="mt-n3">
- <pngx-input-select i18n-title title="" multiple="true" [items]="customFields" formControlName="remove_custom_fields"></pngx-input-select>
+ <pngx-input-select i18n-title title="" multiple="true" [items]="customFields()" formControlName="remove_custom_fields"></pngx-input-select>
</div>
</div>
<div class="col">
diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts
index 070e5124f..abc773ddf 100644
--- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts
@@ -187,14 +187,14 @@ describe('WorkflowEditDialogComponent', () => {
fixture = TestBed.createComponent(WorkflowEditDialogComponent)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 99, username: 'user99' }
+ settingsService.currentUser.set({ id: 99, username: 'user99' })
component = fixture.componentInstance
fixture.detectChanges()
})
it('should support create and edit modes, support adding triggers and actions on new workflow', () => {
- component.dialogMode = EditDialogMode.CREATE
+ component.dialogMode.set(EditDialogMode.CREATE)
const createTitleSpy = jest.spyOn(component, 'getCreateTitle')
const editTitleSpy = jest.spyOn(component, 'getEditTitle')
fixture.detectChanges()
@@ -209,7 +209,7 @@ describe('WorkflowEditDialogComponent', () => {
expect(component.object).not.toBeUndefined()
expect(component.object.triggers).toHaveLength(1)
- component.dialogMode = EditDialogMode.EDIT
+ component.dialogMode.set(EditDialogMode.EDIT)
fixture.detectChanges()
expect(editTitleSpy).toHaveBeenCalled()
})
@@ -771,25 +771,21 @@ describe('WorkflowEditDialogComponent', () => {
false
)
- component.correspondents = [{ id: 1, name: 'C1' } as any]
- component.documentTypes = [{ id: 2, name: 'DT' } as any]
- component.storagePaths = [{ id: 3, name: 'SP' } as any]
-
expect(
component.getFilterSelectItems(TriggerFilterType.CorrespondentIs)
- ).toEqual(component.correspondents)
+ ).toEqual(component.correspondents())
expect(
component.getFilterSelectItems(TriggerFilterType.DocumentTypeIs)
- ).toEqual(component.documentTypes)
+ ).toEqual(component.documentTypes())
expect(
component.getFilterSelectItems(TriggerFilterType.DocumentTypeAny)
- ).toEqual(component.documentTypes)
+ ).toEqual(component.documentTypes())
expect(
component.getFilterSelectItems(TriggerFilterType.StoragePathIs)
- ).toEqual(component.storagePaths)
+ ).toEqual(component.storagePaths())
expect(
component.getFilterSelectItems(TriggerFilterType.StoragePathAny)
- ).toEqual(component.storagePaths)
+ ).toEqual(component.storagePaths())
expect(component.getFilterSelectItems(TriggerFilterType.TagsAll)).toEqual(
[]
)
diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
index 83e7a40f9..4db656149 100644
--- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
@@ -4,7 +4,8 @@ import {
moveItemInArray,
} from '@angular/cdk/drag-drop'
import { NgTemplateOutlet } from '@angular/common'
-import { Component, OnInit, inject } from '@angular/core'
+import { Component, OnInit, computed, inject, signal } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
AbstractControl,
FormArray,
@@ -15,7 +16,7 @@ import {
} from '@angular/forms'
import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { Subscription, first, takeUntil } from 'rxjs'
+import { Subscription, map, takeUntil } from 'rxjs'
import { Correspondent } from 'src/app/data/correspondent'
import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field'
import { DocumentType } from 'src/app/data/document-type'
@@ -470,23 +471,40 @@ export class WorkflowEditDialogComponent
public TriggerFilterType = TriggerFilterType
public filterDefinitions = TRIGGER_FILTER_DEFINITIONS
- private correspondentService: CorrespondentService
- private documentTypeService: DocumentTypeService
- private storagePathService: StoragePathService
- private mailRuleService: MailRuleService
- private customFieldsService: CustomFieldsService
-
- templates: Workflow[]
- correspondents: Correspondent[]
- documentTypes: DocumentType[]
- storagePaths: StoragePath[]
- mailRules: MailRule[]
- customFields: CustomField[]
- dateCustomFields: CustomField[]
+ private readonly correspondentService = inject(CorrespondentService)
+ private readonly documentTypeService = inject(DocumentTypeService)
+ private readonly storagePathService = inject(StoragePathService)
+ private readonly mailRuleService = inject(MailRuleService)
+ private readonly customFieldsService = inject(CustomFieldsService)
+
+ readonly templates = signal<Workflow[]>(undefined)
+ readonly correspondents = toSignal(
+ this.correspondentService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as Correspondent[] }
+ )
+ readonly documentTypes = toSignal(
+ this.documentTypeService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as DocumentType[] }
+ )
+ readonly storagePaths = toSignal(
+ this.storagePathService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as StoragePath[] }
+ )
+ readonly mailRules = toSignal(
+ this.mailRuleService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as MailRule[] }
+ )
+ readonly customFields = toSignal(
+ this.customFieldsService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as CustomField[] }
+ )
+ readonly dateCustomFields = computed(() =>
+ this.customFields()?.filter((f) => f.data_type === CustomFieldDataType.Date)
+ )
expandedItem: number = null
- private allowedActionTypes = []
+ readonly allowedActionTypes = signal([])
private readonly triggerFilterOptionsMap = new WeakMap<
FormArray,
@@ -496,43 +514,8 @@ export class WorkflowEditDialogComponent
constructor() {
super()
this.service = inject(WorkflowService)
- this.correspondentService = inject(CorrespondentService)
- this.documentTypeService = inject(DocumentTypeService)
- this.storagePathService = inject(StoragePathService)
- this.mailRuleService = inject(MailRuleService)
this.userService = inject(UserService)
this.settingsService = inject(SettingsService)
- this.customFieldsService = inject(CustomFieldsService)
-
- this.correspondentService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.correspondents = result.results))
-
- this.documentTypeService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.documentTypes = result.results))
-
- this.storagePathService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.storagePaths = result.results))
-
- this.mailRuleService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.mailRules = result.results))
-
- this.customFieldsService
- .listAll()
- .pipe(first())
- .subscribe((result) => {
- this.customFields = result.results
- this.dateCustomFields = this.customFields?.filter(
- (f) => f.data_type === CustomFieldDataType.Date
- )
- })
}
getCreateTitle() {
@@ -565,11 +548,13 @@ export class WorkflowEditDialogComponent
this.checkRemovalActionFields.bind(this)
)
this.checkRemovalActionFields(this.objectForm.value)
- this.allowedActionTypes = this.settingsService.get(
- SETTINGS_KEYS.EMAIL_ENABLED
+ this.allowedActionTypes.set(
+ this.settingsService.get(SETTINGS_KEYS.EMAIL_ENABLED)
+ ? WORKFLOW_ACTION_OPTIONS
+ : WORKFLOW_ACTION_OPTIONS.filter(
+ (a) => a.id !== WorkflowActionType.Email
+ )
)
- ? WORKFLOW_ACTION_OPTIONS
- : WORKFLOW_ACTION_OPTIONS.filter((a) => a.id !== WorkflowActionType.Email)
}
private checkRemovalActionFields(formWorkflow: Workflow) {
@@ -954,11 +939,11 @@ export class WorkflowEditDialogComponent
switch (definition.selectItems) {
case 'correspondents':
- return this.correspondents
+ return this.correspondents()
case 'documentTypes':
- return this.documentTypes
+ return this.documentTypes()
case 'storagePaths':
- return this.storagePaths
+ return this.storagePaths()
default:
return []
}
@@ -1294,7 +1279,8 @@ export class WorkflowEditDialogComponent
}
get actionTypeOptions() {
- return this.allowedActionTypes
+ this.settingsService.trackChanges()
+ return this.allowedActionTypes()
}
getActionTypeOptionName(type: WorkflowActionType): string {
diff --git a/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.html b/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.html
index 079790c4b..3a5d5799a 100644
--- a/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.html
+++ b/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.html
@@ -1,8 +1,8 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title" i18n>{
- documentIds.length,
+ documentIds().length,
plural,
- =1 {Email Document} other {Email {{documentIds.length}} Documents}
+ =1 {Email Document} other {Email {{documentIds().length}} Documents}
}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
</div>
@@ -23,11 +23,11 @@
<div class="modal-footer">
<div class="input-group">
<div class="input-group-text flex-grow-1">
- <input class="form-check-input mt-0 me-2" type="checkbox" role="switch" id="useArchiveVersion" [disabled]="!hasArchiveVersion" [(ngModel)]="useArchiveVersion">
+ <input class="form-check-input mt-0 me-2" type="checkbox" role="switch" id="useArchiveVersion" [disabled]="!hasArchiveVersion()" [ngModel]="useArchiveVersion()" (ngModelChange)="useArchiveVersion.set($event)">
<label class="form-check-label w-100 text-start" for="useArchiveVersion" i18n>Use archive version</label>
</div>
- <button type="submit" class="btn btn-outline-primary" (click)="emailDocuments()" [disabled]="loading || emailAddress.length === 0 || emailMessage.length === 0 || emailSubject.length === 0">
- @if (loading) {
+ <button type="submit" class="btn btn-outline-primary" (click)="emailDocuments()" [disabled]="loading() || emailAddress.length === 0 || emailMessage.length === 0 || emailSubject.length === 0">
+ @if (loading()) {
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
}
<ng-container i18n>Send email</ng-container>
diff --git a/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.spec.ts b/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.spec.ts
index 462d93477..a9b885e1a 100644
--- a/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.spec.ts
@@ -36,23 +36,24 @@ describe('EmailDocumentDialogComponent', () => {
documentService = TestBed.inject(DocumentService)
toastService = TestBed.inject(ToastService)
component = fixture.componentInstance
- component.documentIds = [1]
+ component.documentIds.set([1])
fixture.detectChanges()
})
it('should set hasArchiveVersion and useArchiveVersion', () => {
- expect(component.hasArchiveVersion).toBeTruthy()
- expect(component.useArchiveVersion).toBeTruthy()
+ expect(component.hasArchiveVersion()).toBeTruthy()
+ expect(component.useArchiveVersion()).toBeTruthy()
- component.hasArchiveVersion = false
- expect(component.hasArchiveVersion).toBeFalsy()
- expect(component.useArchiveVersion).toBeFalsy()
+ component.hasArchiveVersion.set(false)
+ fixture.detectChanges()
+ expect(component.hasArchiveVersion()).toBeFalsy()
+ expect(component.useArchiveVersion()).toBeFalsy()
})
it('should support sending single document via email, showing error if needed', () => {
const toastErrorSpy = jest.spyOn(toastService, 'showError')
const toastSuccessSpy = jest.spyOn(toastService, 'showInfo')
- component.documentIds = [1]
+ component.documentIds.set([1])
component.emailAddress = '[email protected]'
component.emailSubject = 'Hello'
component.emailMessage = 'World'
@@ -73,7 +74,7 @@ describe('EmailDocumentDialogComponent', () => {
it('should support sending multiple documents via email, showing appropriate messages', () => {
const toastErrorSpy = jest.spyOn(toastService, 'showError')
const toastSuccessSpy = jest.spyOn(toastService, 'showInfo')
- component.documentIds = [1, 2, 3]
+ component.documentIds.set([1, 2, 3])
component.emailAddress = '[email protected]'
component.emailSubject = 'Hello'
component.emailMessage = 'World'
diff --git a/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.ts b/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.ts
index 96e236e11..704a495d8 100644
--- a/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.ts
+++ b/src-ui/src/app/components/common/email-document-dialog/email-document-dialog.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input, inject } from '@angular/core'
+import { Component, effect, inject, signal } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -17,22 +17,9 @@ export class EmailDocumentDialogComponent extends LoadingComponentWithPermission
private documentService = inject(DocumentService)
private toastService = inject(ToastService)
- @Input()
- documentIds: number[]
-
- private _hasArchiveVersion: boolean = true
-
- @Input()
- set hasArchiveVersion(value: boolean) {
- this._hasArchiveVersion = value
- this.useArchiveVersion = value
- }
-
- get hasArchiveVersion(): boolean {
- return this._hasArchiveVersion
- }
-
- public useArchiveVersion: boolean = true
+ readonly documentIds = signal<number[]>(undefined)
+ readonly hasArchiveVersion = signal(true)
+ readonly useArchiveVersion = signal(true)
public emailAddress: string = ''
public emailSubject: string = ''
@@ -40,22 +27,25 @@ export class EmailDocumentDialogComponent extends LoadingComponentWithPermission
constructor() {
super()
- this.loading = false
+ this.loading.set(false)
+ effect(() => {
+ this.useArchiveVersion.set(this.hasArchiveVersion())
+ })
}
public emailDocuments() {
- this.loading = true
+ this.loading.set(true)
this.documentService
.emailDocuments(
- this.documentIds,
+ this.documentIds(),
this.emailAddress,
this.emailSubject,
this.emailMessage,
- this.useArchiveVersion
+ this.useArchiveVersion()
)
.subscribe({
next: () => {
- this.loading = false
+ this.loading.set(false)
this.emailAddress = ''
this.emailSubject = ''
this.emailMessage = ''
@@ -63,9 +53,9 @@ export class EmailDocumentDialogComponent extends LoadingComponentWithPermission
this.toastService.showInfo($localize`Email sent`)
},
error: (e) => {
- this.loading = false
+ this.loading.set(false)
const errorMessage =
- this.documentIds.length > 1
+ this.documentIds().length > 1
? $localize`Error emailing documents`
: $localize`Error emailing document`
this.toastService.showError(errorMessage, e)
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts
index c8a536eab..e517fa7ac 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts
@@ -1,12 +1,7 @@
import { ScrollingModule } from '@angular/cdk/scrolling'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { NEGATIVE_NULL_FILTER_VALUE } from 'src/app/data/filter-rule-type'
import {
@@ -52,6 +47,7 @@ const negativeNullItem = {
}
let selectionModel: FilterableDropdownSelectionModel
+const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () => {
let component: FilterableDropdownComponent
@@ -255,14 +251,17 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
expect(applyResult).toEqual({ itemsToAdd: [items[0]], itemsToRemove: [] })
})
- it('should focus text filter on open, support filtering, clear on close', fakeAsync(() => {
+ it('should focus text filter on open, support filtering, clear on close', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
expect(document.activeElement).toEqual(
component.listFilterTextInput.nativeElement
)
@@ -270,12 +269,16 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
component.filterText = 'Tag2'
fixture.detectChanges()
- expect(component.buttonsViewport.getRenderedRange().end).toEqual(1) // filtered
+ component.buttonsViewport.checkViewportSize()
+ fixture.detectChanges()
+ expect(component.scrollViewportHeight).toEqual(
+ component.FILTERABLE_BUTTON_HEIGHT_PX
+ ) // filtered
component.dropdown.close()
expect(component.filterText).toHaveLength(0)
- }))
+ })
- it('should toggle & close on enter inside filter field if 1 item remains', fakeAsync(() => {
+ it('should toggle & close on enter inside filter field if 1 item remains', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
expect(component.selectionModel.getSelectedItems()).toEqual([])
@@ -283,7 +286,10 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.filterText = 'Tag2'
fixture.detectChanges()
const closeSpy = jest.spyOn(component.dropdown, 'close')
@@ -291,11 +297,11 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
new KeyboardEvent('keyup', { key: 'Enter' })
)
expect(component.selectionModel.getSelectedItems()).toEqual([items[1]])
- tick(300)
+ await wait(300)
expect(closeSpy).toHaveBeenCalled()
- }))
+ })
- it('should apply & close on enter inside filter field if 1 item remains if editing', fakeAsync(() => {
+ it('should apply & close on enter inside filter field if 1 item remains if editing', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
component.editing = true
@@ -306,25 +312,31 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.filterText = 'Tag2'
fixture.detectChanges()
component.listFilterTextInput.nativeElement.dispatchEvent(
new KeyboardEvent('keyup', { key: 'Enter' })
)
expect(component.selectionModel.getSelectedItems()).toEqual([items[1]])
- tick(300)
+ await wait(300)
expect(applyResult).toEqual({ itemsToAdd: [items[1]], itemsToRemove: [] })
- }))
+ })
- it('should support arrow keyboard navigation', fakeAsync(() => {
+ it('should support arrow keyboard navigation', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.buttonsViewport?.checkViewportSize()
fixture.detectChanges()
const filterInputEl: HTMLInputElement =
@@ -362,16 +374,19 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true })
)
expect(document.activeElement).toEqual(itemButtons[0])
- }))
+ })
- it('should support arrow keyboard navigation after tab keyboard navigation', fakeAsync(() => {
+ it('should support arrow keyboard navigation after tab keyboard navigation', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.buttonsViewport?.checkViewportSize()
fixture.detectChanges()
const filterInputEl: HTMLInputElement =
@@ -400,16 +415,19 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true })
)
expect(document.activeElement).toEqual(itemButtons[1])
- }))
+ })
- it('should support arrow keyboard navigation after click', fakeAsync(() => {
+ it('should support arrow keyboard navigation after click', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.buttonsViewport?.checkViewportSize()
fixture.detectChanges()
const filterInputEl: HTMLInputElement =
@@ -427,9 +445,9 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true })
)
expect(document.activeElement).toEqual(itemButtons[1])
- }))
+ })
- it('should toggle logical operator', fakeAsync(() => {
+ it('should toggle logical operator', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
component.selectionModel.manyToOne = true
@@ -445,7 +463,10 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
expect(component.modifierToggleEnabled).toBeTruthy()
const operatorButtons: HTMLInputElement[] = Array.from(
@@ -456,9 +477,9 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
fixture.detectChanges()
expect(selectionModel.logicalOperator).toEqual(LogicalOperator.Or)
expect(changedResult.logicalOperator).toEqual(LogicalOperator.Or)
- }))
+ })
- it('should toggle intersection include / exclude', fakeAsync(() => {
+ it('should toggle intersection include / exclude', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
selectionModel.set(items[0].id, ToggleableItemState.Selected)
@@ -473,7 +494,10 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
expect(component.modifierToggleEnabled).toBeTruthy()
const intersectionButtons: HTMLInputElement[] = Array.from(
@@ -486,7 +510,7 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
expect(changedResult.intersection).toEqual(Intersection.Exclude)
expect(changedResult.getSelectedItems()).toEqual([])
expect(changedResult.getExcludedItems()).toEqual(items)
- }))
+ })
it('should update null item selection on toggleIntersection', () => {
component.selectionModel.items = items
@@ -819,7 +843,7 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
expect(getRootDocCount(rootWithoutCounts.id)).toEqual(0)
})
- it('should set support create, keep open model and call createRef method', fakeAsync(() => {
+ it('should set support create, keep open model and call createRef method', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
component.selectionModel = selectionModel
@@ -827,7 +851,10 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
fixture.detectChanges()
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.filterText = 'Test Filter Text'
component.createRef = jest.fn()
@@ -837,9 +864,9 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
const openSpy = jest.spyOn(component.dropdown, 'open')
component.dropdownOpenChange(false)
expect(openSpy).toHaveBeenCalled() // should keep open
- }))
+ })
- it('should call create on enter inside filter field if 0 items remain while editing', fakeAsync(() => {
+ it('should call create on enter inside filter field if 0 items remain while editing', async () => {
component.selectionModel.items = items
component.icon = 'tag-fill'
component.editing = true
@@ -849,12 +876,15 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
fixture.nativeElement
.querySelector('button')
.dispatchEvent(new MouseEvent('click')) // open
- tick(100)
+ await wait(100)
+ fixture.detectChanges()
+ component.buttonsViewport?.checkViewportSize()
+ fixture.detectChanges()
component.filterText = 'FooBar'
component.listFilterEnter()
expect(component.selectionModel.getSelectedItems()).toEqual([])
expect(createSpy).toHaveBeenCalled()
- }))
+ })
it('should exclude item and trigger change event', () => {
const id = 1
diff --git a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.html b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.html
index c98a96ee0..c6aea0fb2 100644
--- a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.html
+++ b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.html
@@ -1,11 +1,11 @@
<div class="modal-header">
- <h4 class="modal-title" id="modal-basic-title">{{title}}</h4>
+ <h4 class="modal-title" id="modal-basic-title">{{title()}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
</div>
<div class="modal-body">
<table class="table">
<tbody>
- @for (key of hotkeys.entries(); track key[0]) {
+ @for (key of hotkeys().entries(); track key[0]) {
<tr>
<td>{{ key[1] }}</td>
<td class="d-flex justify-content-end">
diff --git a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts
index 180fc1005..acf9f2646 100644
--- a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts
+++ b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts
@@ -1,4 +1,4 @@
-import { Component, inject } from '@angular/core'
+import { Component, inject, signal } from '@angular/core'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
const SYMBOLS = {
@@ -20,9 +20,8 @@ const SYMBOLS = {
})
export class HotkeyDialogComponent {
activeModal = inject(NgbActiveModal)
-
- public title: string = $localize`Keyboard shortcuts`
- public hotkeys: Map<string, string> = new Map()
+ readonly title = signal($localize`Keyboard shortcuts`)
+ readonly hotkeys = signal<Map<string, string>>(new Map())
public close(): void {
this.activeModal.close()
diff --git a/src-ui/src/app/components/common/input/abstract-input.ts b/src-ui/src/app/components/common/input/abstract-input.ts
index 5e95de0bf..252da855f 100644
--- a/src-ui/src/app/components/common/input/abstract-input.ts
+++ b/src-ui/src/app/components/common/input/abstract-input.ts
@@ -1,4 +1,5 @@
import {
+ ChangeDetectorRef,
Directive,
ElementRef,
EventEmitter,
@@ -6,12 +7,15 @@ import {
OnInit,
Output,
ViewChild,
+ inject,
} from '@angular/core'
import { ControlValueAccessor } from '@angular/forms'
import { v4 as uuidv4 } from 'uuid'
@Directive()
export class AbstractInputComponent<T> implements OnInit, ControlValueAccessor {
+ protected readonly changeDetector = inject(ChangeDetectorRef)
+
@ViewChild('inputField')
inputField: ElementRef
@@ -23,6 +27,7 @@ export class AbstractInputComponent<T> implements OnInit, ControlValueAccessor {
writeValue(newValue: any): void {
this.value = newValue
+ this.changeDetector.markForCheck()
}
registerOnChange(fn: any): void {
this.onChange = fn
@@ -32,6 +37,7 @@ export class AbstractInputComponent<T> implements OnInit, ControlValueAccessor {
}
setDisabledState?(isDisabled: boolean): void {
this.disabled = isDisabled
+ this.changeDetector.markForCheck()
}
focus() {
diff --git a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.html b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.html
index 6cf5689a9..b3377da2d 100644
--- a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.html
+++ b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.html
@@ -3,7 +3,7 @@
<ng-select name="inputId" [(ngModel)]="value"
[disabled]="disabled"
clearable="true"
- [items]="groups"
+ [items]="groups()"
multiple="true"
bindLabel="name"
bindValue="id"
diff --git a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts
index 005dc5477..7367a9ac0 100644
--- a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts
+++ b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts
@@ -1,11 +1,12 @@
import { Component, forwardRef, inject } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
FormsModule,
NG_VALUE_ACCESSOR,
ReactiveFormsModule,
} from '@angular/forms'
import { NgSelectComponent } from '@ng-select/ng-select'
-import { first } from 'rxjs/operators'
+import { map } from 'rxjs/operators'
import { Group } from 'src/app/data/group'
import { GroupService } from 'src/app/services/rest/group.service'
import { AbstractInputComponent } from '../../abstract-input'
@@ -24,15 +25,9 @@ import { AbstractInputComponent } from '../../abstract-input'
imports: [NgSelectComponent, FormsModule, ReactiveFormsModule],
})
export class PermissionsGroupComponent extends AbstractInputComponent<Group> {
- groups: Group[]
-
- constructor() {
- const groupService = inject(GroupService)
-
- super()
- groupService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.groups = result.results))
- }
+ private readonly groupService = inject(GroupService)
+ readonly groups = toSignal(
+ this.groupService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as Group[] }
+ )
}
diff --git a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.html b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.html
index 9e0e2025d..18a56d89c 100644
--- a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.html
+++ b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.html
@@ -3,7 +3,7 @@
<ng-select name="inputId" [(ngModel)]="value"
[disabled]="disabled"
clearable="true"
- [items]="users"
+ [items]="users()"
multiple="true"
bindLabel="username"
bindValue="id"
diff --git a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts
index 8a071c1c1..f63ebecc4 100644
--- a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts
+++ b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts
@@ -1,11 +1,12 @@
import { Component, forwardRef, inject } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
FormsModule,
NG_VALUE_ACCESSOR,
ReactiveFormsModule,
} from '@angular/forms'
import { NgSelectComponent } from '@ng-select/ng-select'
-import { first } from 'rxjs/operators'
+import { map } from 'rxjs/operators'
import { User } from 'src/app/data/user'
import { UserService } from 'src/app/services/rest/user.service'
import { AbstractInputComponent } from '../../abstract-input'
@@ -24,15 +25,9 @@ import { AbstractInputComponent } from '../../abstract-input'
imports: [NgSelectComponent, FormsModule, ReactiveFormsModule],
})
export class PermissionsUserComponent extends AbstractInputComponent<User[]> {
- users: User[]
-
- constructor() {
- const userService = inject(UserService)
-
- super()
- userService
- .listAll()
- .pipe(first())
- .subscribe((result) => (this.users = result.results))
- }
+ private readonly userService = inject(UserService)
+ readonly users = toSignal(
+ this.userService.listAll().pipe(map((result) => result.results)),
+ { initialValue: undefined as User[] }
+ )
}
diff --git a/src-ui/src/app/components/common/input/select/select.component.spec.ts b/src-ui/src/app/components/common/input/select/select.component.spec.ts
index 9104faf45..a71f37afb 100644
--- a/src-ui/src/app/components/common/input/select/select.component.spec.ts
+++ b/src-ui/src/app/components/common/input/select/select.component.spec.ts
@@ -1,9 +1,4 @@
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import {
FormsModule,
NG_VALUE_ACCESSOR,
@@ -121,12 +116,14 @@ describe('SelectComponent', () => {
).toBeFalsy()
})
- it('should clear search term on blur after delay', fakeAsync(() => {
+ it('should clear search term on blur after delay', () => {
+ jest.useFakeTimers()
const clearSpy = jest.spyOn(component, 'clearLastSearchTerm')
component.onBlur()
- tick(3000)
+ jest.advanceTimersByTime(3000)
expect(clearSpy).toHaveBeenCalled()
- }))
+ jest.useRealTimers()
+ })
it('should emit filtered documents', () => {
component.value = 10
diff --git a/src-ui/src/app/components/common/input/tags/tags.component.spec.ts b/src-ui/src/app/components/common/input/tags/tags.component.spec.ts
index 1b761a5db..054a79394 100644
--- a/src-ui/src/app/components/common/input/tags/tags.component.spec.ts
+++ b/src-ui/src/app/components/common/input/tags/tags.component.spec.ts
@@ -106,7 +106,7 @@ describe('TagsComponent', () => {
modalService = TestBed.inject(NgbModal)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 1 }
+ settingsService.currentUser.set({ id: 1 } as any)
fixture = TestBed.createComponent(TagsComponent)
fixture.debugElement.injector.get(NG_VALUE_ACCESSOR)
component = fixture.componentInstance
@@ -136,20 +136,13 @@ describe('TagsComponent', () => {
})
it('should support create new using last search term and open a modal', () => {
- settingsService.currentUser = { id: 1 }
+ settingsService.currentUser.set({ id: 1 })
let activeInstances: NgbModalRef[]
modalService.activeInstances.subscribe((v) => (activeInstances = v))
component.select.filter('foobar')
component.createTag()
expect(modalService.hasOpenModals()).toBeTruthy()
expect(activeInstances[0].componentInstance.object.name).toEqual('foobar')
- const editDialog = activeInstances[0]
- .componentInstance as TagEditDialogComponent
- editDialog.save() // create is mocked
- fixture.detectChanges()
- fixture.whenStable().then(() => {
- expect(fixture.debugElement.nativeElement.textContent).toContain('foobar')
- })
})
it('support remove tags', () => {
diff --git a/src-ui/src/app/components/common/input/tags/tags.component.ts b/src-ui/src/app/components/common/input/tags/tags.component.ts
index 6b7d3150f..e1447e214 100644
--- a/src-ui/src/app/components/common/input/tags/tags.component.ts
+++ b/src-ui/src/app/components/common/input/tags/tags.component.ts
@@ -1,4 +1,5 @@
import {
+ ChangeDetectorRef,
Component,
EventEmitter,
forwardRef,
@@ -49,6 +50,7 @@ import { TagComponent } from '../../tag/tag.component'
export class TagsComponent implements OnInit, ControlValueAccessor {
private tagService = inject(TagService)
private modalService = inject(NgbModal)
+ private readonly changeDetector = inject(ChangeDetectorRef)
constructor() {
this.createTagRef = this.createTag.bind(this)
@@ -60,6 +62,7 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
writeValue(newValue: number[]): void {
this.value = newValue
+ this.changeDetector.markForCheck()
}
registerOnChange(fn: any): void {
this.onChange = fn
@@ -69,11 +72,13 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
}
setDisabledState?(isDisabled: boolean): void {
this.disabled = isDisabled
+ this.changeDetector.markForCheck()
}
ngOnInit(): void {
this.tagService.listAll().subscribe((result) => {
this.tags = result.results
+ this.changeDetector.markForCheck()
})
}
@@ -176,7 +181,7 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
var modal = this.modalService.open(TagEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
if (name) modal.componentInstance.object = { name: name }
else if (this.select.searchTerm)
modal.componentInstance.object = { name: this.select.searchTerm }
diff --git a/src-ui/src/app/components/common/logo/logo.component.html b/src-ui/src/app/components/common/logo/logo.component.html
index 15a7ee71c..f8ca689d7 100644
--- a/src-ui/src/app/components/common/logo/logo.component.html
+++ b/src-ui/src/app/components/common/logo/logo.component.html
@@ -1,7 +1,7 @@
@if (customLogo) {
- <img src="{{customLogo}}" [class]="getClasses()" [attr.style]="'height:'+height" />
+ <img src="{{customLogo}}" [class]="getClasses()" [attr.style]="'height:'+height()" />
} @else {
- <svg [class]="getClasses()" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2670 860" [attr.style]="'height:'+height">
+ <svg [class]="getClasses()" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2670 860" [attr.style]="'height:'+height()">
<path class="leaf" style="fill:#005616;" d="M2227.4,821.2c-6.1-17.8-18.1-53.6-19.2-53.4-174.7-77.8-159.8-201.2-117.5-304.2,26.3,120.1,235.3,130.3,128,294.1-.7,2,8.8,24.3,17.1,44.9,19.9-45.4,51.3-101.1,48.8-105.7-199.9-357.4,278.8-444.7,350.7-690.2,72.6,220.1,46.5,577.5-330.4,713.3-1.8,1.2-55.6,130-58.5,131.4-.2-1.9-29.1,2.5-26.4-7.6,1.4-6.2,4.2-14.2,7.2-22.4h0v-.2h.2,0ZM2211.7,731.2c42.3-62.9-11.1-105.7-49.8-133.2,71,94,58.1,105.7,49.8,133.2h0Z"/>
<g class="text" style="fill: #000;">
<path class="st1" d="M654.6,393.2l-.7,137.7h-85.5V188.7h85.4c.4,11.3-.3,21.7,1.3,33.8,23.1-34.1,62.3-50,101.1-38.3,16.5,5,29.6,16.4,39.7,30,34.4,46.5,35.1,134,3.6,182.2-10.1,14.4-22.5,26.9-39,33.4-39.5,15.7-81,1.1-105.9-36.6h0ZM721,362.2c21-26.1,21-82.7-.4-108.4-13.2-15.9-36.4-16.1-49.9-.4-22.2,25.8-21.7,85.3.5,110.1,13.6,15.2,36.6,15,49.7-1.3h.1Z"/>
diff --git a/src-ui/src/app/components/common/logo/logo.component.spec.ts b/src-ui/src/app/components/common/logo/logo.component.spec.ts
index cb6112016..d210167c7 100644
--- a/src-ui/src/app/components/common/logo/logo.component.spec.ts
+++ b/src-ui/src/app/components/common/logo/logo.component.spec.ts
@@ -28,7 +28,7 @@ describe('LogoComponent', () => {
it('should support extra classes', () => {
expect(fixture.debugElement.queryAll(By.css('.foo'))).toHaveLength(0)
- component.extra_classes = 'foo'
+ fixture.componentRef.setInput('extra_classes', 'foo')
fixture.detectChanges()
expect(fixture.debugElement.queryAll(By.css('.foo'))).toHaveLength(1)
})
@@ -37,7 +37,7 @@ describe('LogoComponent', () => {
expect(fixture.debugElement.query(By.css('svg')).attributes.style).toEqual(
'height:6em'
)
- component.height = '10em'
+ fixture.componentRef.setInput('height', '10em')
fixture.detectChanges()
expect(fixture.debugElement.query(By.css('svg')).attributes.style).toEqual(
'height:10em'
diff --git a/src-ui/src/app/components/common/logo/logo.component.ts b/src-ui/src/app/components/common/logo/logo.component.ts
index e15be24bf..f9b0a09c3 100644
--- a/src-ui/src/app/components/common/logo/logo.component.ts
+++ b/src-ui/src/app/components/common/logo/logo.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input, inject } from '@angular/core'
+import { Component, inject, input } from '@angular/core'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { SettingsService } from 'src/app/services/settings.service'
import { environment } from 'src/environments/environment'
@@ -10,12 +10,8 @@ import { environment } from 'src/environments/environment'
})
export class LogoComponent {
private settingsService = inject(SettingsService)
-
- @Input()
- extra_classes: string
-
- @Input()
- height = '6em'
+ readonly extra_classes = input<string>(undefined)
+ readonly height = input('6em')
get customLogo(): string {
return this.settingsService.get(SETTINGS_KEYS.APP_LOGO)?.length
@@ -27,6 +23,6 @@ export class LogoComponent {
}
getClasses() {
- return ['logo'].concat(this.extra_classes).join(' ')
+ return ['logo'].concat(this.extra_classes()).join(' ')
}
}
diff --git a/src-ui/src/app/components/common/page-header/page-header.component.html b/src-ui/src/app/components/common/page-header/page-header.component.html
index 6ee0388cd..05df7dcd5 100644
--- a/src-ui/src/app/components/common/page-header/page-header.component.html
+++ b/src-ui/src/app/components/common/page-header/page-header.component.html
@@ -1,32 +1,32 @@
<div class="row pt-3 pb-3 pb-md-2 align-items-center">
<div class="col-md text-truncate">
<h3 class="d-flex align-items-center mb-1" style="line-height: 1.4">
- <span class="text-truncate">{{title}}</span>
- @if (id) {
+ <span class="text-truncate">{{title()}}</span>
+ @if (id()) {
<span class="badge bg-primary text-primary-text-contrast ms-3 small fs-normal cursor-pointer" (click)="copyID()">
- @if (copied) {
+ @if (copied()) {
<i-bs width="1em" height="1em" name="clipboard-check" class="me-1"></i-bs><ng-container i18n>Copied!</ng-container>
} @else {
- ID: {{id}}
+ ID: {{id()}}
}
</span>
}
- @if (subTitle) {
- <span class="h6 mb-0 mt-1 d-block d-md-inline fw-normal ms-md-3 text-truncate" style="line-height: 1.4">{{subTitle}}</span>
+ @if (subTitle()) {
+ <span class="h6 mb-0 mt-1 d-block d-md-inline fw-normal ms-md-3 text-truncate" style="line-height: 1.4">{{subTitle()}}</span>
}
- @if (info) {
+ @if (info()) {
<button class="btn btn-sm btn-link text-muted p-0 p-md-2" title="What's this?" i18n-title type="button" [ngbPopover]="infoPopover" [autoClose]="true">
<i-bs name="question-circle"></i-bs>
</button>
<ng-template #infoPopover>
- <p [class.mb-0]="!infoLink" [innerHTML]="info"></p>
- @if (infoLink) {
- <a href="https://docs.paperless-ngx.com/{{infoLink}}" target="_blank" referrerpolicy="noopener noreferrer" i18n>Read more</a>
+ <p [class.mb-0]="!infoLink()" [innerHTML]="info()"></p>
+ @if (infoLink()) {
+ <a href="https://docs.paperless-ngx.com/{{infoLink()}}" target="_blank" referrerpolicy="noopener noreferrer" i18n>Read more</a>
<i-bs class="ms-1" width=".8em" height=".8em" name="box-arrow-up-right"></i-bs>
}
</ng-template>
}
- @if (loading) {
+ @if (loading()) {
<output class="spinner-border spinner-border-sm fs-6 fw-normal" aria-hidden="true"><span class="visually-hidden" i18n>Loading...</span></output>
}
</h3>
diff --git a/src-ui/src/app/components/common/page-header/page-header.component.spec.ts b/src-ui/src/app/components/common/page-header/page-header.component.spec.ts
index 8fa9ad369..1bdcd4279 100644
--- a/src-ui/src/app/components/common/page-header/page-header.component.spec.ts
+++ b/src-ui/src/app/components/common/page-header/page-header.component.spec.ts
@@ -1,6 +1,7 @@
import { Clipboard } from '@angular/cdk/clipboard'
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { Title } from '@angular/platform-browser'
+import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { environment } from 'src/environments/environment'
import { PageHeaderComponent } from './page-header.component'
@@ -13,7 +14,7 @@ describe('PageHeaderComponent', () => {
beforeEach(async () => {
TestBed.configureTestingModule({
providers: [],
- imports: [PageHeaderComponent],
+ imports: [NgxBootstrapIconsModule.pick(allIcons), PageHeaderComponent],
}).compileComponents()
titleService = TestBed.inject(Title)
@@ -23,9 +24,13 @@ describe('PageHeaderComponent', () => {
fixture.detectChanges()
})
+ afterEach(() => {
+ jest.useRealTimers()
+ })
+
it('should display title + subtitle', () => {
- component.title = 'Foo'
- component.subTitle = 'Bar'
+ fixture.componentRef.setInput('title', 'Foo')
+ fixture.componentRef.setInput('subTitle', 'Bar')
fixture.detectChanges()
expect(fixture.nativeElement.textContent).toContain('Foo')
expect(fixture.nativeElement.textContent).toContain('Bar')
@@ -33,19 +38,20 @@ describe('PageHeaderComponent', () => {
it('should set html title', () => {
const titleSpy = jest.spyOn(titleService, 'setTitle')
- component.title = 'Foo Bar'
+ fixture.componentRef.setInput('title', 'Foo Bar')
+ fixture.detectChanges()
expect(titleSpy).toHaveBeenCalledWith(`Foo Bar - ${environment.appTitle}`)
})
it('should copy id to clipboard, reset after 3 seconds', () => {
jest.useFakeTimers()
- component.id = 42 as any
+ fixture.componentRef.setInput('id', 42)
jest.spyOn(clipboard, 'copy').mockReturnValue(true)
component.copyID()
expect(clipboard.copy).toHaveBeenCalledWith('42')
- expect(component.copied).toBe(true)
+ expect(component.copied()).toBe(true)
jest.advanceTimersByTime(3000)
- expect(component.copied).toBe(false)
+ expect(component.copied()).toBe(false)
})
})
diff --git a/src-ui/src/app/components/common/page-header/page-header.component.ts b/src-ui/src/app/components/common/page-header/page-header.component.ts
index ec0525b4b..ec209bf2e 100644
--- a/src-ui/src/app/components/common/page-header/page-header.component.ts
+++ b/src-ui/src/app/components/common/page-header/page-header.component.ts
@@ -1,5 +1,5 @@
import { Clipboard } from '@angular/cdk/clipboard'
-import { Component, Input, inject } from '@angular/core'
+import { Component, effect, inject, input, signal } from '@angular/core'
import { Title } from '@angular/platform-browser'
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -16,40 +16,26 @@ export class PageHeaderComponent {
private titleService = inject(Title)
private clipboard = inject(Clipboard)
- private _title = ''
- public copied: boolean = false
+ readonly id = input<number>(undefined)
+ readonly subTitle = input('')
+ readonly info = input<string>(undefined)
+ readonly infoLink = input<string>(undefined)
+ readonly loading = input(false)
+ readonly title = input('')
+ readonly copied = signal(false)
private copyTimeout: any
- @Input()
- set title(title: string) {
- this._title = title
- this.titleService.setTitle(`${this.title} - ${environment.appTitle}`)
+ constructor() {
+ effect(() => {
+ this.titleService.setTitle(`${this.title()} - ${environment.appTitle}`)
+ })
}
- get title() {
- return this._title
- }
-
- @Input()
- id: number
-
- @Input()
- subTitle: string = ''
-
- @Input()
- info: string
-
- @Input()
- infoLink: string
-
- @Input()
- loading: boolean = false
-
public copyID() {
- this.copied = this.clipboard.copy(this.id.toString())
+ this.copied.set(this.clipboard.copy(this.id().toString()))
clearTimeout(this.copyTimeout)
this.copyTimeout = setTimeout(() => {
- this.copied = false
+ this.copied.set(false)
}, 3000)
}
}
diff --git a/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.spec.ts b/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.spec.ts
index 0e9abafbb..41fee5a7e 100644
--- a/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.spec.ts
+++ b/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.spec.ts
@@ -146,8 +146,8 @@ describe('PDFEditorComponent', () => {
const previewSpy = jest
.spyOn(documentService, 'getPreviewUrl')
.mockReturnValue('preview-version')
- component.documentID = 3
- component.versionID = 10
+ component.documentID.set(3)
+ component.versionID.set(10)
expect(component.pdfSrc).toBe('preview-version')
expect(previewSpy).toHaveBeenCalledWith(3, false, 10)
diff --git a/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.ts b/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.ts
index 5ea624aef..8ba458062 100644
--- a/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.ts
+++ b/src-ui/src/app/components/common/pdf-editor/pdf-editor.component.ts
@@ -3,7 +3,7 @@ import {
DragDropModule,
moveItemInArray,
} from '@angular/cdk/drag-drop'
-import { Component, inject } from '@angular/core'
+import { Component, inject, signal } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -45,8 +45,9 @@ export class PDFEditorComponent extends ConfirmDialogComponent {
private readonly settingsService = inject(SettingsService)
activeModal: NgbActiveModal = inject(NgbActiveModal)
- documentID: number
- versionID?: number
+ readonly documentID = signal<number>(undefined)
+ readonly versionID = signal<number>(undefined)
+
pages: PageOperation[] = []
totalPages = 0
editMode: PdfEditorEditMode = this.settingsService.get(
@@ -57,9 +58,9 @@ export class PDFEditorComponent extends ConfirmDialogComponent {
get pdfSrc(): string {
return this.documentService.getPreviewUrl(
- this.documentID,
+ this.documentID(),
false,
- this.versionID
+ this.versionID()
)
}
diff --git a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts
index 54783f9d7..2bb5273ac 100644
--- a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts
+++ b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts
@@ -291,7 +291,7 @@ export class PngxPdfViewerComponent
this.eventBus.dispatch('find', {
query,
caseSensitive: false,
- highlightAll: query.length > 0,
+ highlightAll: query?.length > 0,
phraseSearch: true,
})
}
diff --git a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.html b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.html
index f11fc9760..7ac84c6cc 100644
--- a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.html
+++ b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.html
@@ -1,5 +1,5 @@
<div class="modal-header">
- <h4 class="modal-title" id="modal-basic-title">{{title}}</h4>
+ <h4 class="modal-title" id="modal-basic-title">{{title()}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="cancelClicked()">
</button>
</div>
@@ -7,7 +7,7 @@
<form [formGroup]="form">
<div class="form-group">
- <pngx-permissions-form [users]="users" formControlName="permissions_form"></pngx-permissions-form>
+ <pngx-permissions-form [users]="users()" formControlName="permissions_form"></pngx-permissions-form>
</div>
<div class="form-group mt-4">
<div class="offset-lg-3 row">
@@ -16,18 +16,18 @@
</div>
</form>
- @if (note) {
+ @if (note()) {
<div class="small text-muted fst-italic mt-2">
- {{ note }}
+ {{ note() }}
</div>
}
</div>
<div class="modal-footer">
- @if (!buttonsEnabled) {
+ @if (!buttonsEnabled()) {
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
<span class="visually-hidden" i18n>Loading...</span>
}
- <button type="button" class="btn btn-outline-primary" (click)="cancelClicked()" [disabled]="!buttonsEnabled" i18n>Cancel</button>
- <button type="button" class="btn btn-primary" (click)="confirm()" [disabled]="!buttonsEnabled" i18n>Confirm</button>
+ <button type="button" class="btn btn-outline-primary" (click)="cancelClicked()" [disabled]="!buttonsEnabled()" i18n>Cancel</button>
+ <button type="button" class="btn btn-primary" (click)="confirm()" [disabled]="!buttonsEnabled()" i18n>Confirm</button>
</div>
diff --git a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts
index e59671921..004b2df0b 100644
--- a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts
@@ -109,7 +109,7 @@ describe('PermissionsDialogComponent', () => {
permissions: set_permissions.set_permissions,
}
component.object = obj
- expect(component.title).toEqual(`Edit permissions for ${obj.name}`)
+ expect(component.title()).toEqual(`Edit permissions for ${obj.name}`)
expect(component.permissions).toEqual(set_permissions)
})
diff --git a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts
index 56c26f785..1194886fd 100644
--- a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts
+++ b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts
@@ -1,4 +1,12 @@
-import { Component, EventEmitter, Input, Output, inject } from '@angular/core'
+import {
+ Component,
+ EventEmitter,
+ Input,
+ Output,
+ inject,
+ signal,
+} from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
FormControl,
FormGroup,
@@ -6,6 +14,7 @@ import {
ReactiveFormsModule,
} from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
+import { map } from 'rxjs'
import { ObjectWithPermissions } from 'src/app/data/object-with-permissions'
import { User } from 'src/app/data/user'
import { UserService } from 'src/app/services/rest/user.service'
@@ -27,26 +36,22 @@ export class PermissionsDialogComponent {
activeModal = inject(NgbActiveModal)
private userService = inject(UserService)
- users: User[]
+ readonly users = toSignal(
+ this.userService.listAll().pipe(map((r) => r.results)),
+ { initialValue: undefined as User[] }
+ )
+ readonly title = signal($localize`Set permissions`)
+ readonly note = signal<string>(null)
+ readonly buttonsEnabled = signal(true)
private o: ObjectWithPermissions = undefined
- constructor() {
- this.userService.listAll().subscribe((r) => (this.users = r.results))
- }
-
@Output()
public confirmClicked = new EventEmitter()
- @Input()
- title = $localize`Set permissions`
-
- @Input()
- note: string = null
-
@Input()
set object(o: ObjectWithPermissions) {
this.o = o
- this.title = $localize`Edit permissions for ` + o['name']
+ this.title.set($localize`Edit permissions for ` + o['name'])
this.form.patchValue({
merge: true,
permissions_form: {
@@ -65,8 +70,6 @@ export class PermissionsDialogComponent {
merge: new FormControl(true),
})
- buttonsEnabled: boolean = true
-
get permissions() {
return {
owner: this.form.get('permissions_form').value?.owner ?? null,
diff --git a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts
index fd8e261a0..569aa39c0 100644
--- a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts
@@ -64,9 +64,9 @@ describe('PermissionsFilterDropdownComponent', () => {
{
provide: SettingsService,
useValue: {
- currentUser: {
+ currentUser: () => ({
id: currentUserID,
- },
+ }),
},
},
provideHttpClient(withInterceptorsFromDi()),
diff --git a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts
index 83e632b68..8476ed0f3 100644
--- a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts
+++ b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts
@@ -117,12 +117,12 @@ export class PermissionsFilterDropdownComponent extends ComponentWithPermissions
if (this.selectionModel.ownerFilter === OwnerFilterType.SELF) {
this.selectionModel.includeUsers = []
this.selectionModel.excludeUsers = []
- this.selectionModel.userID = this.settingsService.currentUser.id
+ this.selectionModel.userID = this.settingsService.currentUser().id
this.selectionModel.hideUnowned = false
} else if (this.selectionModel.ownerFilter === OwnerFilterType.NOT_SELF) {
this.selectionModel.userID = null
this.selectionModel.includeUsers = []
- this.selectionModel.excludeUsers = [this.settingsService.currentUser.id]
+ this.selectionModel.excludeUsers = [this.settingsService.currentUser().id]
this.selectionModel.hideUnowned = false
} else if (this.selectionModel.ownerFilter === OwnerFilterType.NONE) {
this.selectionModel.userID = null
@@ -132,7 +132,7 @@ export class PermissionsFilterDropdownComponent extends ComponentWithPermissions
} else if (
this.selectionModel.ownerFilter === OwnerFilterType.SHARED_BY_ME
) {
- this.selectionModel.userID = this.settingsService.currentUser.id
+ this.selectionModel.userID = this.settingsService.currentUser()?.id
this.selectionModel.includeUsers = []
this.selectionModel.excludeUsers = []
this.selectionModel.hideUnowned = false
diff --git a/src-ui/src/app/components/common/preview-popup/preview-popup.component.html b/src-ui/src/app/components/common/preview-popup/preview-popup.component.html
index e949b7b0b..0bf21029b 100644
--- a/src-ui/src/app/components/common/preview-popup/preview-popup.component.html
+++ b/src-ui/src/app/components/common/preview-popup/preview-popup.component.html
@@ -1,28 +1,28 @@
<a [href]="link ?? previewUrl" class="{{linkClasses}}" [target]="linkTarget" [title]="linkTitle"
[ngbPopover]="previewContent" [popoverTitle]="document.title | documentTitle" container="body"
- autoClose="true" [popoverClass]="popoverClass" (mouseenter)="mouseEnterPreview()" (mouseleave)="mouseLeavePreview()" #popover="ngbPopover">
+ autoClose="true" [popoverClass]="popoverClass()" (mouseenter)="mouseEnterPreview()" (mouseleave)="mouseLeavePreview()" #popover="ngbPopover">
<ng-content></ng-content>
</a>
<ng-template #previewContent>
<div class="preview-popup-container" (mouseenter)="mouseEnterPreview()" (mouseleave)="mouseLeavePreview(); close()">
- @if (error) {
+ @if (error()) {
<div class="w-100 h-100 position-relative">
<p class="fst-italic position-absolute top-50 start-50 translate-middle" i18n>Error loading preview</p>
</div>
} @else {
@if (renderAsObject) {
- @if (previewText) {
- <div class="bg-light p-3 overflow-auto whitespace-preserve" width="100%">{{previewText}}</div>
+ @if (previewText()) {
+ <div class="bg-light p-3 overflow-auto whitespace-preserve" width="100%">{{previewText()}}</div>
} @else {
<object [data]="previewUrl | safeUrl" width="100%" class="bg-light" [class.p-2]="!isPdf"></object>
}
} @else {
- @if (requiresPassword) {
+ @if (requiresPassword()) {
<div class="w-100 h-100 position-relative">
<i-bs width="2em" height="2em" class="position-absolute top-50 start-50 translate-middle" name="file-earmark-lock"></i-bs>
</div>
}
- @if (!requiresPassword) {
+ @if (!requiresPassword()) {
<pngx-pdf-viewer
[src]="previewUrl"
[renderMode]="PdfRenderMode.All"
diff --git a/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts b/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts
index 643464ee8..10a36d73c 100644
--- a/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts
+++ b/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts
@@ -87,7 +87,7 @@ describe('PreviewPopupComponent', () => {
component.popover.open()
component.onError({ name: 'PasswordException' })
fixture.detectChanges()
- expect(component.requiresPassword).toBeTruthy()
+ expect(component.requiresPassword()).toBeTruthy()
expect(fixture.debugElement.query(By.css('i-bs'))).not.toBeNull()
})
@@ -121,16 +121,18 @@ describe('PreviewPopupComponent', () => {
)
component.init()
expect(httpSpy).toHaveBeenCalled()
- expect(component.error).toBeTruthy()
+ expect(component.error()).toBeTruthy()
httpSpy.mockReturnValueOnce(of('Preview text'))
component.init()
- expect(component.previewText).toEqual('Preview text')
+ expect(component.previewText()).toEqual('Preview text')
})
it('should show preview on mouseover after delay to preload content', () => {
component.mouseEnterPreview()
expect(component.popover.isOpen()).toBeTruthy()
+ expect(component.popoverClass()).toContain('opacity-0')
jest.advanceTimersByTime(600)
+ expect(component.popoverClass()).not.toContain('opacity-0')
component.close()
jest.advanceTimersByTime(600)
})
diff --git a/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts b/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts
index 9c42d1a61..ae271ffe4 100644
--- a/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts
+++ b/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts
@@ -1,5 +1,12 @@
import { HttpClient } from '@angular/common/http'
-import { Component, inject, Input, OnDestroy, ViewChild } from '@angular/core'
+import {
+ Component,
+ inject,
+ Input,
+ OnDestroy,
+ signal,
+ ViewChild,
+} from '@angular/core'
import { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { first, Subject, takeUntil } from 'rxjs'
@@ -55,17 +62,17 @@ export class PreviewPopupComponent implements OnDestroy {
unsubscribeNotifier: Subject<any> = new Subject()
- error = false
+ readonly error = signal(false)
- requiresPassword: boolean = false
+ readonly requiresPassword = signal(false)
- previewText: string
+ readonly previewText = signal<string>(null)
@ViewChild('popover') popover: NgbPopover
- mouseOnPreview: boolean = false
+ readonly mouseOnPreview = signal(false)
- popoverClass: string = 'shadow popover-preview'
+ readonly popoverClass = signal('shadow popover-preview')
get renderAsObject(): boolean {
return (this.isPdf && this.useNativePdfViewer) || !this.isPdf
@@ -97,10 +104,10 @@ export class PreviewPopupComponent implements OnDestroy {
.pipe(first(), takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (res) => {
- this.previewText = res.toString()
+ this.previewText.set(res.toString())
},
error: (err) => {
- this.error = err
+ this.error.set(err)
},
})
}
@@ -108,22 +115,24 @@ export class PreviewPopupComponent implements OnDestroy {
onError(event: any) {
if (event.name == 'PasswordException') {
- this.requiresPassword = true
+ this.requiresPassword.set(true)
} else {
- this.error = true
+ this.error.set(true)
}
}
mouseEnterPreview() {
- this.mouseOnPreview = true
+ this.mouseOnPreview.set(true)
if (!this.popover.isOpen()) {
// we're going to open but hide to pre-load content during hover delay
this.popover.open()
- this.popoverClass = 'shadow popover-preview pe-none opacity-0'
+ this.popoverClass.set('shadow popover-preview pe-none opacity-0')
setTimeout(() => {
- if (this.mouseOnPreview) {
+ if (this.mouseOnPreview()) {
// show popover
- this.popoverClass = this.popoverClass.replace('pe-none opacity-0', '')
+ this.popoverClass.set(
+ this.popoverClass().replace('pe-none opacity-0', '')
+ )
} else {
this.popover.close(true)
}
@@ -132,13 +141,13 @@ export class PreviewPopupComponent implements OnDestroy {
}
mouseLeavePreview() {
- this.mouseOnPreview = false
+ this.mouseOnPreview.set(false)
}
public close(immediate: boolean = false) {
setTimeout(
() => {
- if (!this.mouseOnPreview) this.popover.close()
+ if (!this.mouseOnPreview()) this.popover.close()
},
immediate ? 0 : 300
)
diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html
index c329beb92..73bad631a 100644
--- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html
@@ -7,38 +7,38 @@
<div class="modal-body">
<div class="row">
<div class="col-12 col-md-6">
- <pngx-input-text i18n-title title="Email" formControlName="email" (keyup)="onEmailKeyUp($event)" [error]="error?.email"></pngx-input-text>
+ <pngx-input-text i18n-title title="Email" formControlName="email" (keyup)="onEmailKeyUp($event)" [error]="error()?.email"></pngx-input-text>
<div ngbAccordion>
- <div ngbAccordionItem="first" [collapsed]="!showEmailConfirm" class="border-0 bg-transparent">
+ <div ngbAccordionItem="first" [collapsed]="!showEmailConfirm()" class="border-0 bg-transparent">
<div ngbAccordionCollapse>
<div ngbAccordionBody class="p-0 pb-3">
- <pngx-input-text i18n-title title="Confirm Email" formControlName="email_confirm" (keyup)="onEmailConfirmKeyUp($event)" autocomplete="email" [error]="error?.email_confirm"></pngx-input-text>
+ <pngx-input-text i18n-title title="Confirm Email" formControlName="email_confirm" (keyup)="onEmailConfirmKeyUp($event)" autocomplete="email" [error]="error()?.email_confirm"></pngx-input-text>
</div>
</div>
</div>
</div>
- <pngx-input-password i18n-title title="Password" formControlName="password" (keyup)="onPasswordKeyUp($event)" [showReveal]="true" autocomplete="current-password" [error]="error?.password"></pngx-input-password>
+ <pngx-input-password i18n-title title="Password" formControlName="password" (keyup)="onPasswordKeyUp($event)" [showReveal]="true" autocomplete="current-password" [error]="error()?.password"></pngx-input-password>
<div ngbAccordion>
- <div ngbAccordionItem="first" [collapsed]="!showPasswordConfirm" class="border-0 bg-transparent">
+ <div ngbAccordionItem="first" [collapsed]="!showPasswordConfirm()" class="border-0 bg-transparent">
<div ngbAccordionCollapse>
<div ngbAccordionBody class="p-0 pb-3">
- <pngx-input-password i18n-title title="Confirm Password" formControlName="password_confirm" (keyup)="onPasswordConfirmKeyUp($event)" autocomplete="new-password" [error]="error?.password_confirm"></pngx-input-password>
+ <pngx-input-password i18n-title title="Confirm Password" formControlName="password_confirm" (keyup)="onPasswordConfirmKeyUp($event)" autocomplete="new-password" [error]="error()?.password_confirm"></pngx-input-password>
</div>
</div>
</div>
</div>
- <pngx-input-text i18n-title title="First name" formControlName="first_name" [error]="error?.first_name"></pngx-input-text>
- <pngx-input-text i18n-title title="Last name" formControlName="last_name" [error]="error?.first_name"></pngx-input-text>
+ <pngx-input-text i18n-title title="First name" formControlName="first_name" [error]="error()?.first_name"></pngx-input-text>
+ <pngx-input-text i18n-title title="Last name" formControlName="last_name" [error]="error()?.first_name"></pngx-input-text>
<div class="mb-3">
<label class="form-label" i18n>API Auth Token</label>
<div class="position-relative">
<div class="input-group">
<input type="text" class="form-control" formControlName="auth_token" readonly>
<button type="button" class="btn btn-outline-secondary" (click)="copyAuthToken()" i18n-title title="Copy">
- @if (!copied) {
+ @if (!copied()) {
<i-bs width="1em" height="1em" name="clipboard-fill"></i-bs>
}
- @if (copied) {
+ @if (copied()) {
<i-bs width="1em" height="1em" name="clipboard-check-fill"></i-bs>
}
<span class="visually-hidden" i18n>Copy</span>
@@ -51,7 +51,7 @@
(confirm)="generateAuthToken()">
</pngx-confirm-button>
</div>
- <span class="badge copied-badge bg-primary small fade ms-4 position-absolute top-50 translate-middle-y pe-none z-3" [class.show]="copied" i18n>Copied!</span>
+ <span class="badge copied-badge bg-primary small fade ms-4 position-absolute top-50 translate-middle-y pe-none z-3" [class.show]="copied()" i18n>Copied!</span>
</div>
<div class="form-text text-muted text-end fst-italic" i18n>Warning: changing the token cannot be undone</div>
</div>
@@ -155,10 +155,10 @@
}
</ul>
<button type="button" class="btn btn-sm btn-outline-secondary ms-2" (click)="copyRecoveryCodes()" i18n-title title="Copy">
- @if (!codesCopied) {
+ @if (!codesCopied()) {
<i-bs width="1em" height="1em" name="clipboard-fill" class="me-1"></i-bs><span i18n>Copy codes</span>
}
- @if (codesCopied) {
+ @if (codesCopied()) {
<i-bs width="1em" height="1em" name="clipboard-check-fill" class="text-primary me-1"></i-bs><span class="text-primary" i18n>Copied!</span>
}
</button>
@@ -179,7 +179,7 @@
</div>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-outline-secondary" (click)="cancel()" i18n [disabled]="networkActive">Cancel</button>
- <button type="submit" class="btn btn-primary" i18n [disabled]="networkActive || saveDisabled">Save</button>
+ <button type="button" class="btn btn-outline-secondary" (click)="cancel()" i18n [disabled]="networkActive()">Cancel</button>
+ <button type="submit" class="btn btn-primary" i18n [disabled]="networkActive() || saveDisabled">Save</button>
</div>
</form>
diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
index 101406990..6dcae6c6b 100644
--- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
@@ -1,9 +1,4 @@
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { Clipboard } from '@angular/cdk/clipboard'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
@@ -191,7 +186,8 @@ describe('ProfileEditDialogComponent', () => {
expect(component.saveDisabled).toBeFalsy()
})
- it('should logout on save if password changed', fakeAsync(() => {
+ it('should logout on save if password changed', () => {
+ jest.useFakeTimers()
const getSpy = jest.spyOn(profileService, 'get')
getSpy.mockReturnValue(of(profile))
const getProvidersSpy = jest.spyOn(
@@ -211,13 +207,15 @@ describe('ProfileEditDialogComponent', () => {
.mockImplementation(() => {})
component.save()
expect(updateSpy).toHaveBeenCalled()
- tick(2600)
+ jest.advanceTimersByTime(2600)
expect(navSpy).toHaveBeenCalledWith(
`${window.location.origin}/accounts/logout/?next=/accounts/login/?next=/`
)
- }))
+ jest.useRealTimers()
+ })
- it('should support auth token copy', fakeAsync(() => {
+ it('should support auth token copy', () => {
+ jest.useFakeTimers()
const getSpy = jest.spyOn(profileService, 'get')
getSpy.mockReturnValue(of(profile))
const getProvidersSpy = jest.spyOn(
@@ -229,10 +227,11 @@ describe('ProfileEditDialogComponent', () => {
const copySpy = jest.spyOn(clipboard, 'copy')
component.copyAuthToken()
expect(copySpy).toHaveBeenCalledWith(profile.auth_token)
- expect(component.copied).toBeTruthy()
- tick(3000)
- expect(component.copied).toBeFalsy()
- }))
+ expect(component.copied()).toBeTruthy()
+ jest.advanceTimersByTime(3000)
+ expect(component.copied()).toBeFalsy()
+ jest.useRealTimers()
+ })
it('should support generate token, display error if needed', () => {
const getSpy = jest.spyOn(profileService, 'get')
@@ -366,11 +365,13 @@ describe('ProfileEditDialogComponent', () => {
expect(component.isTotpEnabled).toBeFalsy()
})
- it('should copy recovery codes', fakeAsync(() => {
+ it('should copy recovery codes', () => {
+ jest.useFakeTimers()
const copySpy = jest.spyOn(clipboard, 'copy')
component.recoveryCodes = ['1', '2', '3']
component.copyRecoveryCodes()
expect(copySpy).toHaveBeenCalledWith('1\n2\n3')
- tick(3000)
- }))
+ jest.advanceTimersByTime(3000)
+ jest.useRealTimers()
+ })
})
diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts
index d6c839f1e..fd17a26da 100644
--- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts
@@ -1,5 +1,5 @@
import { Clipboard } from '@angular/cdk/clipboard'
-import { Component, OnInit, inject } from '@angular/core'
+import { Component, OnInit, inject, signal } from '@angular/core'
import {
FormControl,
FormGroup,
@@ -50,8 +50,12 @@ export class ProfileEditDialogComponent
private toastService = inject(ToastService)
private clipboard = inject(Clipboard)
- public networkActive: boolean = false
- public error: any
+ readonly networkActive = signal(false)
+ readonly error = signal<any>(undefined)
+ readonly showPasswordConfirm = signal(false)
+ readonly showEmailConfirm = signal(false)
+ readonly copied = signal(false)
+ readonly codesCopied = signal(false)
public form = new FormGroup({
email: new FormControl(''),
@@ -67,23 +71,18 @@ export class ProfileEditDialogComponent
private currentPassword: string
private newPassword: string
private passwordConfirm: string
- public showPasswordConfirm: boolean = false
+
public hasUsablePassword: boolean = false
private currentEmail: string
private newEmail: string
private emailConfirm: string
- public showEmailConfirm: boolean = false
public isTotpEnabled: boolean = false
public totpSettings: TotpSettings
public totpSettingsLoading: boolean = false
public totpLoading: boolean = false
public recoveryCodes: string[]
-
- public copied: boolean = false
- public codesCopied: boolean = false
-
public socialAccounts: SocialAccount[] = []
public socialAccountProviders: SocialAccountProvider[] = []
@@ -95,12 +94,12 @@ export class ProfileEditDialogComponent
}
ngOnInit(): void {
- this.networkActive = true
+ this.networkActive.set(true)
this.profileService
.get()
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((profile) => {
- this.networkActive = false
+ this.networkActive.set(false)
this.form.patchValue(profile)
this.currentEmail = profile.email
this.form.get('email').valueChanges.subscribe((newEmail) => {
@@ -126,7 +125,7 @@ export class ProfileEditDialogComponent
}
get saveDisabled(): boolean {
- return this.error?.password_confirm || this.error?.email_confirm
+ return this.error()?.password_confirm || this.error()?.email_confirm
}
onEmailKeyUp(event: KeyboardEvent): void {
@@ -140,18 +139,17 @@ export class ProfileEditDialogComponent
}
onEmailChange(): void {
- this.showEmailConfirm = this.currentEmail !== this.newEmail
- if (this.showEmailConfirm) {
+ this.showEmailConfirm.set(this.currentEmail !== this.newEmail)
+ if (this.showEmailConfirm()) {
this.form.get('email_confirm').enable()
if (this.newEmail !== this.emailConfirm) {
- if (!this.error) this.error = {}
- this.error.email_confirm = $localize`Emails must match`
+ this.setFieldError('email_confirm', $localize`Emails must match`)
} else {
- delete this.error?.email_confirm
+ this.clearFieldError('email_confirm')
}
} else {
this.form.get('email_confirm').disable()
- delete this.error?.email_confirm
+ this.clearFieldError('email_confirm')
}
}
@@ -167,29 +165,42 @@ export class ProfileEditDialogComponent
}
onPasswordChange(): void {
- this.showPasswordConfirm = this.currentPassword !== this.newPassword
+ this.showPasswordConfirm.set(this.currentPassword !== this.newPassword)
- if (this.showPasswordConfirm) {
+ if (this.showPasswordConfirm()) {
this.form.get('password_confirm').enable()
if (this.newPassword !== this.passwordConfirm) {
- if (!this.error) this.error = {}
- this.error.password_confirm = $localize`Passwords must match`
+ this.setFieldError('password_confirm', $localize`Passwords must match`)
} else {
- delete this.error?.password_confirm
+ this.clearFieldError('password_confirm')
}
} else {
this.form.get('password_confirm').disable()
- delete this.error?.password_confirm
+ this.clearFieldError('password_confirm')
}
}
+ private setFieldError(fieldName: string, message: string): void {
+ this.error.set({
+ ...this.error(),
+ [fieldName]: message,
+ })
+ }
+
+ private clearFieldError(fieldName: string): void {
+ if (!this.error()) return
+ const error = { ...this.error() }
+ delete error[fieldName]
+ this.error.set(Object.keys(error).length ? error : undefined)
+ }
+
save(): void {
const passwordChanged =
this.newPassword && this.currentPassword !== this.newPassword
const profile = Object.assign({}, this.form.value)
delete profile.totp_code
- this.error = null
- this.networkActive = true
+ this.error.set(null)
+ this.networkActive.set(true)
this.profileService
.update(profile)
.pipe(takeUntil(this.unsubscribeNotifier))
@@ -210,8 +221,8 @@ export class ProfileEditDialogComponent
},
error: (error) => {
this.toastService.showError($localize`Error saving profile`, error)
- this.error = error?.error
- this.networkActive = false
+ this.error.set(error?.error)
+ this.networkActive.set(false)
},
})
}
@@ -236,9 +247,9 @@ export class ProfileEditDialogComponent
copyAuthToken(): void {
this.clipboard.copy(this.form.get('auth_token').value)
- this.copied = true
+ this.copied.set(true)
setTimeout(() => {
- this.copied = false
+ this.copied.set(false)
}, 3000)
}
@@ -330,9 +341,9 @@ export class ProfileEditDialogComponent
public copyRecoveryCodes(): void {
this.clipboard.copy(this.recoveryCodes.join('\n'))
- this.codesCopied = true
+ this.codesCopied.set(true)
setTimeout(() => {
- this.codesCopied = false
+ this.codesCopied.set(false)
}, 3000)
}
}
diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html
index b7fed28e1..2814e1cf1 100644
--- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html
+++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html
@@ -8,18 +8,18 @@
<div>
<p class="mb-1">
<ng-container i18n>Selected documents:</ng-container>
- {{ selectionCount }}
+ {{ selectionCount() }}
</p>
- @if (documentPreview.length > 0) {
+ @if (documentPreview().length > 0) {
<ul class="list-unstyled small mb-0">
- @for (doc of documentPreview; track doc.id) {
+ @for (doc of documentPreview(); track doc.id) {
<li>
<strong>{{ doc.title | documentTitle }}</strong>
</li>
}
- @if (selectionCount > documentPreview.length) {
+ @if (selectionCount() > documentPreview().length) {
<li>
- <ng-container i18n>+ {{ selectionCount - documentPreview.length }} more…</ng-container>
+ <ng-container i18n>+ {{ selectionCount() - documentPreview().length }} more…</ng-container>
</li>
}
</ul>
@@ -72,10 +72,10 @@
type="button"
(click)="copy(createdBundle)"
>
- @if (copied) {
+ @if (copied()) {
<i-bs name="clipboard-check"></i-bs>
}
- @if (!copied) {
+ @if (!copied()) {
<i-bs name="clipboard"></i-bs>
}
<span class="visually-hidden" i18n>Copy link</span>
@@ -118,8 +118,8 @@
type="button"
class="btn btn-primary btn-sm d-inline-flex align-items-center gap-2 text-nowrap"
(click)="submit()"
- [disabled]="loading || !buttonsEnabled">
- @if (loading) {
+ [disabled]="loading() || !buttonsEnabled">
+ @if (loading()) {
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
}
{{ btnCaption }}
diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts
index da4d93c6a..d7c695131 100644
--- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts
@@ -1,10 +1,5 @@
import { Clipboard } from '@angular/cdk/clipboard'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { FileVersion } from 'src/app/data/share-link'
@@ -58,10 +53,10 @@ describe('ShareLinkBundleDialogComponent', () => {
it('builds payload and emits confirm on submit', () => {
const confirmSpy = jest.spyOn(component.confirmClicked, 'emit')
- component.documents = [
+ component.setDocuments([
{ id: 1, title: 'Doc 1' } as any,
{ id: 2, title: 'Doc 2' } as any,
- ]
+ ])
component.form.setValue({
shareArchiveVersion: false,
expirationDays: 3,
@@ -101,14 +96,15 @@ describe('ShareLinkBundleDialogComponent', () => {
const docs = Array.from({ length: 12 }).map((_, index) => ({
id: index + 1,
}))
- component.documents = docs as any
+ component.setDocuments(docs as any)
- expect(component.selectionCount).toBe(12)
- expect(component.documentPreview).toHaveLength(10)
- expect(component.documentPreview[0].id).toBe(1)
+ expect(component.selectionCount()).toBe(12)
+ expect(component.documentPreview()).toHaveLength(10)
+ expect(component.documentPreview()[0].id).toBe(1)
})
- it('copies share link and resets state after timeout', fakeAsync(() => {
+ it('copies share link and resets state after timeout', () => {
+ jest.useFakeTimers()
const copySpy = jest.spyOn(clipboard, 'copy').mockReturnValue(true)
const bundle = {
slug: 'bundle-slug',
@@ -118,12 +114,13 @@ describe('ShareLinkBundleDialogComponent', () => {
component.copy(bundle)
expect(copySpy).toHaveBeenCalledWith(component.getShareUrl(bundle))
- expect(component.copied).toBe(true)
+ expect(component.copied()).toBe(true)
expect(toastService.showInfo).toHaveBeenCalled()
- tick(3000)
- expect(component.copied).toBe(false)
- }))
+ jest.advanceTimersByTime(3000)
+ expect(component.copied()).toBe(false)
+ jest.useRealTimers()
+ })
it('generates share URLs based on API base URL', () => {
environment.apiBaseUrl = 'https://example.com/api/'
diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts
index 37aa70950..903e572c3 100644
--- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts
+++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts
@@ -1,6 +1,6 @@
import { Clipboard } from '@angular/cdk/clipboard'
import { CommonModule } from '@angular/common'
-import { Component, Input, inject } from '@angular/core'
+import { Component, inject, signal } from '@angular/core'
import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { Document } from 'src/app/data/document'
@@ -38,10 +38,11 @@ export class ShareLinkBundleDialogComponent extends ConfirmDialogComponent {
private readonly clipboard = inject(Clipboard)
private readonly toastService = inject(ToastService)
- private _documents: Document[] = []
+ readonly documents = signal<Document[]>([])
+ readonly selectionCount = signal(0)
+ readonly documentPreview = signal<Document[]>([])
+ readonly copied = signal(false)
- selectionCount = 0
- documentPreview: Document[] = []
form: FormGroup = this.formBuilder.group({
shareArchiveVersion: true,
expirationDays: [7],
@@ -51,28 +52,27 @@ export class ShareLinkBundleDialogComponent extends ConfirmDialogComponent {
readonly expirationOptions = SHARE_LINK_EXPIRATION_OPTIONS
createdBundle: ShareLinkBundleSummary | null = null
- copied = false
onOpenManage?: () => void
readonly statuses = ShareLinkBundleStatus
constructor() {
super()
- this.loading = false
+ this.loading.set(false)
this.title = $localize`Create share link bundle`
this.btnCaption = $localize`Create link`
}
- @Input()
- set documents(docs: Document[]) {
- this._documents = docs.concat()
- this.selectionCount = this._documents.length
- this.documentPreview = this._documents.slice(0, 10)
+ setDocuments(docs: Document[]) {
+ const documents = docs.concat()
+ this.documents.set(documents)
+ this.selectionCount.set(documents.length)
+ this.documentPreview.set(documents.slice(0, 10))
}
submit() {
if (this.createdBundle) return
this.payload = {
- document_ids: this._documents.map((doc) => doc.id),
+ document_ids: this.documents().map((doc) => doc.id),
file_version: this.form.value.shareArchiveVersion
? FileVersion.Archive
: FileVersion.Original,
@@ -92,10 +92,10 @@ export class ShareLinkBundleDialogComponent extends ConfirmDialogComponent {
copy(bundle: ShareLinkBundleSummary): void {
const success = this.clipboard.copy(this.getShareUrl(bundle))
if (success) {
- this.copied = true
+ this.copied.set(true)
this.toastService.showInfo($localize`Share link copied to clipboard.`)
setTimeout(() => {
- this.copied = false
+ this.copied.set(false)
}, 3000)
}
}
diff --git a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.html b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.html
index 2f2155412..15b5bc9de 100644
--- a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.html
+++ b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.html
@@ -4,27 +4,27 @@
</div>
<div class="modal-body">
- @if (loading) {
+ @if (loading()) {
<div class="d-flex align-items-center gap-2">
<div class="spinner-border spinner-border-sm" role="status"></div>
<span i18n>Loading share link bundles…</span>
</div>
}
- @if (!loading && error) {
+ @if (!loading() && error()) {
<div class="alert alert-danger mb-0" role="alert">
- {{ error }}
+ {{ error() }}
</div>
}
- @if (!loading && !error) {
+ @if (!loading() && !error()) {
<div class="d-flex justify-content-between align-items-center mb-2">
<p class="mb-0 text-muted small">
<ng-container i18n>Status updates every few seconds while bundles are being prepared.</ng-container>
</p>
</div>
- @if (bundles.length === 0) {
+ @if (bundles().length === 0) {
<p class="mb-0 text-muted fst-italic" i18n>No share link bundles currently exist.</p>
}
- @if (bundles.length > 0) {
+ @if (bundles().length > 0) {
<div class="table-responsive">
<table class="table table-sm align-middle mb-0">
<thead>
@@ -39,7 +39,7 @@
</tr>
</thead>
<tbody>
- @for (bundle of bundles; track bundle.id) {
+ @for (bundle of bundles(); track bundle.id) {
<tr>
<td>
<div>{{ bundle.created | date: 'short' }}</div>
@@ -113,10 +113,10 @@
title="Copy share link"
i18n-title
>
- @if (copiedSlug === bundle.slug) {
+ @if (copiedSlug() === bundle.slug) {
<i-bs name="clipboard-check"></i-bs>
}
- @if (copiedSlug !== bundle.slug) {
+ @if (copiedSlug() !== bundle.slug) {
<i-bs name="clipboard"></i-bs>
}
<span class="visually-hidden" i18n>Copy share link</span>
@@ -125,7 +125,7 @@
<button
type="button"
class="btn btn-outline-warning"
- [disabled]="loading"
+ [disabled]="loading()"
(click)="retry(bundle)"
>
<i-bs name="arrow-clockwise"></i-bs>
@@ -134,7 +134,7 @@
}
<pngx-confirm-button
buttonClasses="btn btn-sm btn-outline-danger"
- [disabled]="loading"
+ [disabled]="loading()"
(confirm)="delete(bundle)"
iconName="trash"
>
diff --git a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts
index 113cd65a3..5c943b190 100644
--- a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts
@@ -1,10 +1,5 @@
import { Clipboard } from '@angular/cdk/clipboard'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { of, throwError } from 'rxjs'
@@ -70,6 +65,7 @@ describe('ShareLinkBundleManageDialogComponent', () => {
fixture.destroy()
environment.apiBaseUrl = originalApiBaseUrl
jest.clearAllMocks()
+ jest.useRealTimers()
})
const sampleBundle = (overrides: Partial<ShareLinkBundleSummary> = {}) =>
@@ -85,7 +81,8 @@ describe('ShareLinkBundleManageDialogComponent', () => {
...overrides,
}) as ShareLinkBundleSummary
- it('loads bundles on init and polls periodically', fakeAsync(() => {
+ it('loads bundles on init and polls periodically', () => {
+ jest.useFakeTimers()
const bundles = [sampleBundle({ status: ShareLinkBundleStatus.Ready })]
service.listAllBundles.mockReset()
service.listAllBundles
@@ -93,38 +90,37 @@ describe('ShareLinkBundleManageDialogComponent', () => {
.mockReturnValue(of(bundles))
fixture.detectChanges()
- tick()
expect(service.listAllBundles).toHaveBeenCalledTimes(1)
- expect(component.bundles).toEqual(bundles)
- expect(component.loading).toBe(false)
- expect(component.error).toBeNull()
+ expect(component.bundles()).toEqual(bundles)
+ expect(component.loading()).toBe(false)
+ expect(component.error()).toBeNull()
- tick(5000)
+ jest.advanceTimersByTime(5000)
expect(service.listAllBundles).toHaveBeenCalledTimes(2)
- }))
+ })
- it('handles errors when loading bundles', fakeAsync(() => {
+ it('handles errors when loading bundles', () => {
+ jest.useFakeTimers()
service.listAllBundles.mockReset()
service.listAllBundles
.mockReturnValueOnce(throwError(() => new Error('load fail')))
.mockReturnValue(of([]))
fixture.detectChanges()
- tick()
- expect(component.error).toContain('Failed to load share link bundles.')
+ expect(component.error()).toContain('Failed to load share link bundles.')
expect(toastService.showError).toHaveBeenCalled()
- expect(component.loading).toBe(false)
+ expect(component.loading()).toBe(false)
- tick(5000)
+ jest.advanceTimersByTime(5000)
expect(service.listAllBundles).toHaveBeenCalledTimes(2)
- }))
+ })
- it('copies bundle links when ready', fakeAsync(() => {
+ it('copies bundle links when ready', () => {
+ jest.useFakeTimers()
jest.spyOn(clipboard, 'copy').mockReturnValue(true)
fixture.detectChanges()
- tick()
const readyBundle = sampleBundle({
slug: 'ready-slug',
@@ -135,103 +131,91 @@ describe('ShareLinkBundleManageDialogComponent', () => {
expect(clipboard.copy).toHaveBeenCalledWith(
component.getShareUrl(readyBundle)
)
- expect(component.copiedSlug).toBe('ready-slug')
+ expect(component.copiedSlug()).toBe('ready-slug')
expect(toastService.showInfo).toHaveBeenCalled()
- tick(3000)
- expect(component.copiedSlug).toBeNull()
- }))
+ jest.advanceTimersByTime(3000)
+ expect(component.copiedSlug()).toBeNull()
+ })
- it('ignores copy requests for non-ready bundles', fakeAsync(() => {
+ it('ignores copy requests for non-ready bundles', () => {
const copySpy = jest.spyOn(clipboard, 'copy')
fixture.detectChanges()
- tick()
component.copy(sampleBundle({ status: ShareLinkBundleStatus.Pending }))
expect(copySpy).not.toHaveBeenCalled()
- }))
+ })
- it('deletes bundles and refreshes list', fakeAsync(() => {
+ it('deletes bundles and refreshes list', () => {
service.listAllBundles.mockReturnValue(of([]))
service.delete.mockReturnValue(of(true))
fixture.detectChanges()
- tick()
component.delete(sampleBundle())
- tick()
expect(service.delete).toHaveBeenCalled()
expect(toastService.showInfo).toHaveBeenCalledWith(
expect.stringContaining('deleted.')
)
expect(service.listAllBundles).toHaveBeenCalledTimes(2)
- expect(component.loading).toBe(false)
- }))
+ expect(component.loading()).toBe(false)
+ })
- it('handles delete errors gracefully', fakeAsync(() => {
+ it('handles delete errors gracefully', () => {
service.listAllBundles.mockReturnValue(of([]))
service.delete.mockReturnValue(throwError(() => new Error('delete fail')))
fixture.detectChanges()
- tick()
component.delete(sampleBundle())
- tick()
expect(toastService.showError).toHaveBeenCalled()
- expect(component.loading).toBe(false)
- }))
+ expect(component.loading()).toBe(false)
+ })
- it('retries bundle build and replaces existing entry', fakeAsync(() => {
+ it('retries bundle build and replaces existing entry', () => {
service.listAllBundles.mockReturnValue(of([]))
const updated = sampleBundle({ status: ShareLinkBundleStatus.Ready })
service.rebuildBundle.mockReturnValue(of(updated))
fixture.detectChanges()
- tick()
- component.bundles = [sampleBundle()]
- component.retry(component.bundles[0])
- tick()
+ component.bundles.set([sampleBundle()])
+ component.retry(component.bundles()[0])
expect(service.rebuildBundle).toHaveBeenCalledWith(updated.id)
- expect(component.bundles[0].status).toBe(ShareLinkBundleStatus.Ready)
+ expect(component.bundles()[0].status).toBe(ShareLinkBundleStatus.Ready)
expect(toastService.showInfo).toHaveBeenCalled()
- }))
+ })
- it('adds new bundle when retry returns unknown entry', fakeAsync(() => {
+ it('adds new bundle when retry returns unknown entry', () => {
service.listAllBundles.mockReturnValue(of([]))
service.rebuildBundle.mockReturnValue(
of(sampleBundle({ id: 99, slug: 'new-slug' }))
)
fixture.detectChanges()
- tick()
- component.bundles = [sampleBundle()]
+ component.bundles.set([sampleBundle()])
component.retry({ id: 99 } as ShareLinkBundleSummary)
- tick()
- expect(component.bundles.find((bundle) => bundle.id === 99)).toBeTruthy()
- }))
+ expect(component.bundles().find((bundle) => bundle.id === 99)).toBeTruthy()
+ })
- it('handles retry errors', fakeAsync(() => {
+ it('handles retry errors', () => {
service.listAllBundles.mockReturnValue(of([]))
service.rebuildBundle.mockReturnValue(throwError(() => new Error('fail')))
fixture.detectChanges()
- tick()
component.retry(sampleBundle())
- tick()
expect(toastService.showError).toHaveBeenCalled()
- }))
+ })
- it('maps helpers and closes dialog', fakeAsync(() => {
+ it('maps helpers and closes dialog', () => {
service.listAllBundles.mockReturnValue(of([]))
fixture.detectChanges()
- tick()
expect(component.statusLabel(ShareLinkBundleStatus.Processing)).toContain(
'Processing'
@@ -247,5 +231,5 @@ describe('ShareLinkBundleManageDialogComponent', () => {
const closeSpy = jest.spyOn(activeModal, 'close')
component.close()
expect(closeSpy).toHaveBeenCalled()
- }))
+ })
})
diff --git a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.ts b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.ts
index 6eef144f9..5da728e5a 100644
--- a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.ts
+++ b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.ts
@@ -1,6 +1,6 @@
import { Clipboard } from '@angular/cdk/clipboard'
import { CommonModule } from '@angular/common'
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import { Component, OnDestroy, OnInit, inject, signal } from '@angular/core'
import { NgbActiveModal, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { Subject, catchError, of, switchMap, takeUntil, timer } from 'rxjs'
@@ -40,10 +40,9 @@ export class ShareLinkBundleManageDialogComponent
private readonly clipboard = inject(Clipboard)
title = $localize`Share link bundles`
-
- bundles: ShareLinkBundleSummary[] = []
- error: string | null = null
- copiedSlug: string | null = null
+ readonly bundles = signal<ShareLinkBundleSummary[]>([])
+ readonly error = signal<string | null>(null)
+ readonly copiedSlug = signal<string | null>(null)
readonly statuses = ShareLinkBundleStatus
readonly fileVersions = FileVersion
@@ -55,15 +54,15 @@ export class ShareLinkBundleManageDialogComponent
.pipe(
switchMap((silent) => {
if (!silent) {
- this.loading = true
+ this.loading.set(true)
}
- this.error = null
+ this.error.set(null)
return this.shareLinkBundleService.listAllBundles().pipe(
catchError((error) => {
if (!silent) {
- this.loading = false
+ this.loading.set(false)
}
- this.error = $localize`Failed to load share link bundles.`
+ this.error.set($localize`Failed to load share link bundles.`)
this.toastService.showError(
$localize`Error retrieving share link bundles.`,
error
@@ -76,10 +75,10 @@ export class ShareLinkBundleManageDialogComponent
)
.subscribe((results) => {
if (results) {
- this.bundles = results
- this.copiedSlug = null
+ this.bundles.set(results)
+ this.copiedSlug.set(null)
}
- this.loading = false
+ this.loading.set(false)
})
this.triggerRefresh(false)
@@ -105,24 +104,24 @@ export class ShareLinkBundleManageDialogComponent
}
const success = this.clipboard.copy(this.getShareUrl(bundle))
if (success) {
- this.copiedSlug = bundle.slug
+ this.copiedSlug.set(bundle.slug)
setTimeout(() => {
- this.copiedSlug = null
+ this.copiedSlug.set(null)
}, 3000)
this.toastService.showInfo($localize`Share link copied to clipboard.`)
}
}
delete(bundle: ShareLinkBundleSummary): void {
- this.error = null
- this.loading = true
+ this.error.set(null)
+ this.loading.set(true)
this.shareLinkBundleService.delete(bundle).subscribe({
next: () => {
this.toastService.showInfo($localize`Share link bundle deleted.`)
this.triggerRefresh(false)
},
error: (e) => {
- this.loading = false
+ this.loading.set(false)
this.toastService.showError(
$localize`Error deleting share link bundle.`,
e
@@ -132,7 +131,7 @@ export class ShareLinkBundleManageDialogComponent
}
retry(bundle: ShareLinkBundleSummary): void {
- this.error = null
+ this.error.set(null)
this.shareLinkBundleService.rebuildBundle(bundle.id).subscribe({
next: (updated) => {
this.toastService.showInfo(
@@ -159,15 +158,16 @@ export class ShareLinkBundleManageDialogComponent
}
private replaceBundle(updated: ShareLinkBundleSummary): void {
- const index = this.bundles.findIndex((bundle) => bundle.id === updated.id)
+ const bundles = this.bundles()
+ const index = bundles.findIndex((bundle) => bundle.id === updated.id)
if (index >= 0) {
- this.bundles = [
- ...this.bundles.slice(0, index),
+ this.bundles.set([
+ ...bundles.slice(0, index),
updated,
- ...this.bundles.slice(index + 1),
- ]
+ ...bundles.slice(index + 1),
+ ])
} else {
- this.bundles = [updated, ...this.bundles]
+ this.bundles.set([updated, ...bundles])
}
}
diff --git a/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.html b/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.html
index e41a897a8..f13202cfd 100644
--- a/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.html
+++ b/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.html
@@ -1,15 +1,15 @@
<div class="modal-header">
- <h4 class="modal-title" id="modal-basic-title">{{title}}</h4>
+ <h4 class="modal-title" id="modal-basic-title">{{title()}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
</div>
<div class="modal-body p-0">
<ul class="list-group list-group-flush">
- @if (!shareLinks || shareLinks.length === 0) {
+ @if (!shareLinks() || shareLinks().length === 0) {
<li class="list-group-item fst-italic small text-center text-secondary" i18n>
No existing links
</li>
}
- @for (link of shareLinks; track link) {
+ @for (link of shareLinks(); track link) {
<li class="list-group-item">
<div class="input-group w-100">
<input type="text" class="form-control" aria-label="Share link" [value]="getShareUrl(link)" readonly>
@@ -19,10 +19,10 @@
</span>
}
<button type="button" class="btn btn-outline-primary" (click)="copy(link)">
- @if (copied !== link.id) {
+ @if (copied() !== link.id) {
<i-bs width="1.2em" height="1.2em" name="clipboard-fill"></i-bs>
}
- @if (copied === link.id) {
+ @if (copied() === link.id) {
<i-bs width="1.2em" height="1.2em" name="clipboard-check-fill"></i-bs>
}
<span class="visually-hidden" i18n>Copy</span>
@@ -36,7 +36,7 @@
<i-bs width="1.2em" height="1.2em" name="trash"></i-bs><span class="visually-hidden" i18n>Delete</span>
</button>
</div>
- <span class="badge copied-badge bg-primary small fade ms-4 position-absolute top-50 translate-middle-y pe-none z-3" [class.show]="copied === link.id" i18n>Copied!</span>
+ <span class="badge copied-badge bg-primary small fade ms-4 position-absolute top-50 translate-middle-y pe-none z-3" [class.show]="copied() === link.id" i18n>Copied!</span>
</li>
}
</ul>
@@ -44,7 +44,7 @@
<div class="modal-footer">
<div class="input-group w-100">
<div class="form-check form-switch ms-auto">
- <input class="form-check-input" type="checkbox" role="switch" id="versionSwitch" [disabled]="!hasArchiveVersion" [(ngModel)]="useArchiveVersion">
+ <input class="form-check-input" type="checkbox" role="switch" id="versionSwitch" [disabled]="!hasArchiveVersion()" [(ngModel)]="useArchiveVersion">
<label class="form-check-label" for="versionSwitch" i18n>Share archive version</label>
</div>
</div>
@@ -55,11 +55,11 @@
<option [ngValue]="option.value">{{ option.label }}</option>
}
</select>
- <button class="btn btn-outline-primary ms-auto" type="button" (click)="createLink()" [disabled]="loading">
- @if (loading) {
+ <button class="btn btn-outline-primary ms-auto" type="button" (click)="createLink()" [disabled]="loading()">
+ @if (loading()) {
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
}
- @if (!loading) {
+ @if (!loading()) {
<i-bs name="plus"></i-bs>
}
<ng-container i18n>Create</ng-container>
diff --git a/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.spec.ts b/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.spec.ts
index 05915c09e..3e6be2e94 100644
--- a/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.spec.ts
@@ -4,12 +4,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { By } from '@angular/platform-browser'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
@@ -56,7 +51,7 @@ describe('ShareLinksDialogComponent', () => {
it('should support refresh to retrieve links', () => {
const getSpy = jest.spyOn(shareLinkService, 'getLinksForDocument')
- component.documentId = 99
+ component.documentId.set(99)
const now = new Date()
const expiration7days = new Date()
@@ -88,7 +83,7 @@ describe('ShareLinksDialogComponent', () => {
fixture.detectChanges()
- expect(component.shareLinks).toHaveLength(2)
+ expect(component.shareLinks()).toHaveLength(2)
})
it('should show error on refresh if needed', () => {
@@ -96,16 +91,17 @@ describe('ShareLinksDialogComponent', () => {
jest
.spyOn(shareLinkService, 'getLinksForDocument')
.mockReturnValueOnce(throwError(() => new Error('Unable to get links')))
- component.documentId = 99
+ component.documentId.set(99)
component.ngOnInit()
fixture.detectChanges()
expect(toastSpy).toHaveBeenCalled()
})
- it('should support link creation then refresh & copy url', fakeAsync(() => {
+ it('should support link creation then refresh & copy url', () => {
+ jest.useFakeTimers()
const createSpy = jest.spyOn(shareLinkService, 'createLinkForDocument')
- component.documentId = 99
+ component.documentId.set(99)
component.expirationDays = 7
component.useArchiveVersion = false
@@ -126,16 +122,17 @@ describe('ShareLinksDialogComponent', () => {
expiration: expiration.toISOString(),
})
fixture.detectChanges()
- tick(3000)
+ jest.advanceTimersByTime(3000)
expect(refreshSpy).toHaveBeenCalled()
expect(copySpy).toHaveBeenCalled()
- expect(component.copied).toEqual(1)
- tick(100) // copy timeout
- }))
+ expect(component.copied()).toEqual(1)
+ jest.advanceTimersByTime(100) // copy timeout
+ jest.useRealTimers()
+ })
it('should show error on link creation if needed', () => {
- component.documentId = 99
+ component.documentId.set(99)
component.expirationDays = 7
const expiration = new Date()
@@ -227,7 +224,7 @@ describe('ShareLinksDialogComponent', () => {
})
it('should disable archive switch & option if no archive available', (done) => {
- component.hasArchiveVersion = false
+ component.hasArchiveVersion.set(false)
component.ngOnInit()
fixture.detectChanges()
expect(component.useArchiveVersion).toBeFalsy()
diff --git a/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.ts b/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.ts
index 9df3d438b..f3d4b8f27 100644
--- a/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.ts
+++ b/src-ui/src/app/components/common/share-links-dialog/share-links-dialog.component.ts
@@ -1,5 +1,5 @@
import { Clipboard } from '@angular/cdk/clipboard'
-import { Component, Input, OnInit, inject } from '@angular/core'
+import { Component, OnInit, effect, inject, input, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -27,55 +27,40 @@ export class ShareLinksDialogComponent implements OnInit {
readonly expirationOptions = SHARE_LINK_EXPIRATION_OPTIONS
- @Input()
- title = $localize`Share Links`
-
- _documentId: number
-
- @Input()
- set documentId(id: number) {
- if (id !== undefined) {
- this._documentId = id
- this.refresh()
- }
- }
-
- private _hasArchiveVersion: boolean = true
-
- @Input()
- set hasArchiveVersion(value: boolean) {
- this._hasArchiveVersion = value
- this.useArchiveVersion = value
- }
-
- get hasArchiveVersion(): boolean {
- return this._hasArchiveVersion
- }
-
- shareLinks: ShareLink[]
-
- loading: boolean = false
-
- copied: number
+ readonly title = input($localize`Share Links`)
+ readonly documentId = signal<number>(undefined)
+ readonly hasArchiveVersion = signal(true)
+ readonly shareLinks = signal<ShareLink[]>(undefined)
+ readonly loading = signal(false)
+ readonly copied = signal<number>(undefined)
expirationDays: number = 7
-
useArchiveVersion: boolean = true
+ constructor() {
+ effect(() => {
+ const id = this.documentId()
+ if (id !== undefined) this.refresh()
+ })
+ effect(() => {
+ this.useArchiveVersion = this.hasArchiveVersion()
+ })
+ }
+
ngOnInit(): void {
- if (this._documentId !== undefined) this.refresh()
+ if (this.documentId() !== undefined) this.refresh()
}
refresh() {
- if (this._documentId === undefined) return
- this.loading = true
+ if (this.documentId() === undefined) return
+ this.loading.set(true)
this.shareLinkService
- .getLinksForDocument(this._documentId)
+ .getLinksForDocument(this.documentId())
.pipe(first())
.subscribe({
next: (results) => {
- this.loading = false
- this.shareLinks = results
+ this.loading.set(false)
+ this.shareLinks.set(results)
},
error: (e) => {
this.toastService.showError(
@@ -104,9 +89,9 @@ export class ShareLinksDialogComponent implements OnInit {
copy(link: ShareLink) {
const success = this.clipboard.copy(this.getShareUrl(link))
if (success) {
- this.copied = link.id
+ this.copied.set(link.id)
setTimeout(() => {
- this.copied = null
+ this.copied.set(null)
}, 3000)
}
}
@@ -138,23 +123,23 @@ export class ShareLinksDialogComponent implements OnInit {
expiration = new Date()
expiration.setDate(expiration.getDate() + this.expirationDays)
}
- this.loading = true
+ this.loading.set(true)
this.shareLinkService
.createLinkForDocument(
- this._documentId,
+ this.documentId(),
this.useArchiveVersion ? FileVersion.Archive : FileVersion.Original,
expiration
)
.subscribe({
next: (result) => {
- this.loading = false
+ this.loading.set(false)
setTimeout(() => {
this.copy(result)
}, 10)
this.refresh()
},
error: (e) => {
- this.loading = false
+ this.loading.set(false)
this.toastService.showError($localize`Error creating link`, 10000, e)
},
})
diff --git a/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.html b/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.html
index 8fb900eaa..b42177d93 100644
--- a/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.html
+++ b/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.html
@@ -1,6 +1,6 @@
<div class="btn-group">
- <button type="button" class="btn btn-sm btn-outline-primary" (click)="clickSuggest()" [disabled]="disabled || loading || (suggestions && !aiEnabled)">
- @if (loading) {
+ <button type="button" class="btn btn-sm btn-outline-primary" (click)="clickSuggest()" [disabled]="disabled() || loading() || (suggestions() && !aiEnabled())">
+ @if (loading()) {
<div class="spinner-border spinner-border-sm" role="status"></div>
} @else {
<i-bs width="1.2em" height="1.2em" name="stars"></i-bs>
@@ -11,34 +11,34 @@
}
</button>
- @if (aiEnabled) {
+ @if (aiEnabled()) {
<div class="btn-group" ngbDropdown #dropdown="ngbDropdown" [popperOptions]="popperOptions">
- <button type="button" class="btn btn-sm btn-outline-primary" ngbDropdownToggle [disabled]="disabled || loading || !suggestions" aria-expanded="false" aria-controls="suggestionsDropdown" aria-label="Suggestions dropdown">
+ <button type="button" class="btn btn-sm btn-outline-primary" ngbDropdownToggle [disabled]="disabled() || loading() || !suggestions()" aria-expanded="false" aria-controls="suggestionsDropdown" aria-label="Suggestions dropdown">
<span class="visually-hidden" i18n>Show suggestions</span>
</button>
<div ngbDropdownMenu aria-labelledby="suggestionsDropdown" class="shadow suggestions-dropdown">
<div class="list-group list-group-flush small pb-0">
- @if (!suggestions?.suggested_tags && !suggestions?.suggested_document_types && !suggestions?.suggested_correspondents) {
+ @if (!suggestions()?.suggested_tags && !suggestions()?.suggested_document_types && !suggestions()?.suggested_correspondents) {
<div class="list-group-item text-muted fst-italic">
<small class="text-muted small fst-italic" i18n>No novel suggestions</small>
</div>
}
- @if (suggestions?.suggested_tags.length > 0) {
+ @if (suggestions()?.suggested_tags.length > 0) {
<small class="list-group-item text-uppercase text-muted small"><i-bs class="me-2" name="tags"></i-bs><ng-container i18n>Tags</ng-container></small>
- @for (tag of suggestions.suggested_tags; track tag) {
+ @for (tag of suggestions().suggested_tags; track tag) {
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addTag.emit(tag)">{{ tag }}</button>
}
}
- @if (suggestions?.suggested_document_types.length > 0) {
+ @if (suggestions()?.suggested_document_types.length > 0) {
<div class="list-group-item text-uppercase text-muted small"><i-bs class="me-2" name="hash"></i-bs><ng-container i18n>Document Types</ng-container></div>
- @for (type of suggestions.suggested_document_types; track type) {
+ @for (type of suggestions().suggested_document_types; track type) {
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addDocumentType.emit(type)">{{ type }}</button>
}
}
- @if (suggestions?.suggested_correspondents.length > 0) {
+ @if (suggestions()?.suggested_correspondents.length > 0) {
<div class="list-group-item text-uppercase text-muted small"><i-bs class="me-2" name="person"></i-bs><ng-container i18n>Correspondents</ng-container></div>
- @for (correspondent of suggestions.suggested_correspondents; track correspondent) {
+ @for (correspondent of suggestions().suggested_correspondents; track correspondent) {
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addCorrespondent.emit(correspondent)">{{ correspondent }}</button>
}
}
diff --git a/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.spec.ts b/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.spec.ts
index 863393ace..ffb63b420 100644
--- a/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.spec.ts
+++ b/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.spec.ts
@@ -22,25 +22,25 @@ describe('SuggestionsDropdownComponent', () => {
})
it('should calculate totalSuggestions', () => {
- component.suggestions = {
+ fixture.componentRef.setInput('suggestions', {
suggested_correspondents: ['John Doe'],
suggested_tags: ['Tag1', 'Tag2'],
suggested_document_types: ['Type1'],
- }
+ })
expect(component.totalSuggestions).toBe(4)
})
it('should emit getSuggestions when clickSuggest is called and suggestions are null', () => {
jest.spyOn(component.getSuggestions, 'emit')
- component.suggestions = null
+ fixture.componentRef.setInput('suggestions', null)
component.clickSuggest()
expect(component.getSuggestions.emit).toHaveBeenCalled()
})
it('should not emit getSuggestions when disabled', () => {
jest.spyOn(component.getSuggestions, 'emit')
- component.disabled = true
- component.suggestions = null
+ fixture.componentRef.setInput('disabled', true)
+ fixture.componentRef.setInput('suggestions', null)
fixture.detectChanges()
component.clickSuggest()
@@ -50,13 +50,13 @@ describe('SuggestionsDropdownComponent', () => {
})
it('should toggle dropdown when clickSuggest is called and suggestions are not null', () => {
- component.aiEnabled = true
+ fixture.componentRef.setInput('aiEnabled', true)
fixture.detectChanges()
- component.suggestions = {
+ fixture.componentRef.setInput('suggestions', {
suggested_correspondents: [],
suggested_tags: [],
suggested_document_types: [],
- }
+ })
component.clickSuggest()
expect(component.dropdown.open).toBeTruthy()
})
diff --git a/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.ts b/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.ts
index 6cf63f683..5c4c54e06 100644
--- a/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.ts
+++ b/src-ui/src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.ts
@@ -1,9 +1,9 @@
import {
Component,
EventEmitter,
- Input,
Output,
ViewChild,
+ input,
} from '@angular/core'
import { NgbDropdown, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -20,18 +20,10 @@ export class SuggestionsDropdownComponent {
public popperOptions = pngxPopperOptions
@ViewChild('dropdown') dropdown: NgbDropdown
-
- @Input()
- suggestions: DocumentSuggestions = null
-
- @Input()
- aiEnabled: boolean = false
-
- @Input()
- loading: boolean = false
-
- @Input()
- disabled: boolean = false
+ readonly suggestions = input<DocumentSuggestions>(null)
+ readonly aiEnabled = input(false)
+ readonly loading = input(false)
+ readonly disabled = input(false)
@Output()
getSuggestions: EventEmitter<SuggestionsDropdownComponent> =
@@ -48,14 +40,14 @@ export class SuggestionsDropdownComponent {
public clickSuggest(): void {
if (
- this.disabled ||
- this.loading ||
- (this.suggestions && !this.aiEnabled)
+ this.disabled() ||
+ this.loading() ||
+ (this.suggestions() && !this.aiEnabled())
) {
return
}
- if (!this.suggestions) {
+ if (!this.suggestions()) {
this.getSuggestions.emit(this)
} else {
this.dropdown?.toggle()
@@ -64,9 +56,9 @@ export class SuggestionsDropdownComponent {
get totalSuggestions(): number {
return (
- this.suggestions?.suggested_correspondents?.length +
- this.suggestions?.suggested_tags?.length +
- this.suggestions?.suggested_document_types?.length || 0
+ this.suggestions()?.suggested_correspondents?.length +
+ this.suggestions()?.suggested_tags?.length +
+ this.suggestions()?.suggested_document_types?.length || 0
)
}
}
diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
index 5422c875e..badd44b5d 100644
--- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
+++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
@@ -3,7 +3,7 @@
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
</div>
<div class="modal-body">
- @if (!status) {
+ @if (!status()) {
<div class="w-100 h-100 d-flex align-items-center justify-content-center">
<div>
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
@@ -21,25 +21,25 @@
<dl class="card-text">
<dt i18n>Paperless-ngx Version</dt>
<dd>
- {{status.pngx_version}}
- @if (versionMismatch) {
+ {{status().pngx_version}}
+ @if (versionMismatch()) {
<button class="btn btn-sm d-inline align-items-center btn-dark text-uppercase small" [ngbPopover]="versionPopover" triggers="click mouseenter:mouseleave">
<i-bs name="exclamation-triangle-fill" class="text-danger lh-1"></i-bs>
</button>
}
<ng-template #versionPopover>
Frontend version: {{frontendVersion}}<br>
- Backend version: {{status.pngx_version}}
+ Backend version: {{status().pngx_version}}
</ng-template>
</dd>
<dt i18n>Install Type</dt>
- <dd>{{status.install_type}}</dd>
+ <dd>{{status().install_type}}</dd>
<dt i18n>Server OS</dt>
- <dd>{{status.server_os}}</dd>
+ <dd>{{status().server_os}}</dd>
<dt i18n>Media Storage</dt>
<dd>
- <ngb-progressbar style="height: 4px;" class="mt-2 mb-1" type="primary" [max]="status.storage.total" [value]="status.storage.total - status.storage.available"></ngb-progressbar>
- <span class="small">{{status.storage.available | fileSize}} <ng-container i18n>available</ng-container> ({{status.storage.total | fileSize}} <ng-container i18n>total</ng-container>)</span>
+ <ngb-progressbar style="height: 4px;" class="mt-2 mb-1" type="primary" [max]="status().storage.total" [value]="status().storage.total - status().storage.available"></ngb-progressbar>
+ <span class="small">{{status().storage.available | fileSize}} <ng-container i18n>available</ng-container> ({{status().storage.total | fileSize}} <ng-container i18n>total</ng-container>)</span>
</dd>
</dl>
</div>
@@ -54,39 +54,39 @@
<div class="card-body">
<dl class="card-text">
<dt i18n>Type</dt>
- <dd>{{status.database.type}}</dd>
+ <dd>{{status().database.type}}</dd>
<dt i18n>Status</dt>
<dd>
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="databaseStatus" triggers="click mouseenter:mouseleave">
- {{status.database.status}}
- @if (status.database.status === 'OK') {
+ {{status().database.status}}
+ @if (status().database.status === 'OK') {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
} @else {
<i-bs name="exclamation-triangle-fill" class="text-danger ms-2 lh-1"></i-bs>
}
</button>
<ng-template #databaseStatus>
- @if (status.database.status === 'OK') {
- {{status.database.url}}
+ @if (status().database.status === 'OK') {
+ {{status().database.url}}
} @else {
- {{status.database.url}}: {{status.database.error}}
+ {{status().database.url}}: {{status().database.error}}
}
</ng-template>
</dd>
<dt i18n>Migration Status</dt>
<dd>
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="migrationStatus" triggers="click mouseenter:mouseleave">
- @if (status.database.migration_status.unapplied_migrations.length === 0) {
+ @if (status().database.migration_status.unapplied_migrations.length === 0) {
<ng-container i18n>Up to date</ng-container><i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
} @else {
- <ng-container>{{status.database.migration_status.unapplied_migrations.length}} Pending</ng-container><i-bs name="exclamation-triangle-fill" class="text-warning ms-2 lh-1"></i-bs>
+ <ng-container>{{status().database.migration_status.unapplied_migrations.length}} Pending</ng-container><i-bs name="exclamation-triangle-fill" class="text-warning ms-2 lh-1"></i-bs>
}
<ng-template #migrationStatus>
- <h6><ng-container i18n>Latest Migration</ng-container>:</h6> <span class="font-monospace small">{{status.database.migration_status.latest_migration}}</span>
- @if (status.database.migration_status.unapplied_migrations.length > 0) {
+ <h6><ng-container i18n>Latest Migration</ng-container>:</h6> <span class="font-monospace small">{{status().database.migration_status.latest_migration}}</span>
+ @if (status().database.migration_status.unapplied_migrations.length > 0) {
<h6 class="mt-3"><ng-container i18n>Pending Migrations</ng-container>:</h6>
<ul>
- @for (migration of status.database.migration_status.unapplied_migrations; track migration) {
+ @for (migration of status().database.migration_status.unapplied_migrations; track migration) {
<li class="font-monospace small">{{migration}}</li>
}
</ul>
@@ -109,60 +109,60 @@
<dt i18n>Redis Status</dt>
<dd>
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="redisStatus" triggers="click mouseenter:mouseleave">
- {{status.tasks.redis_status}}
- @if (status.tasks.redis_status === 'OK') {
+ {{status().tasks.redis_status}}
+ @if (status().tasks.redis_status === 'OK') {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
} @else {
<i-bs name="exclamation-triangle-fill" class="text-danger ms-2 lh-1"></i-bs>
}
</button>
<ng-template #redisStatus>
- @if (status.tasks.redis_status === 'OK') {
- {{status.tasks.redis_url}}
+ @if (status().tasks.redis_status === 'OK') {
+ {{status().tasks.redis_url}}
} @else {
- {{status.tasks.redis_url}}: {{status.tasks.redis_error}}
+ {{status().tasks.redis_url}}: {{status().tasks.redis_error}}
}
</ng-template>
</dd>
<dt i18n>Celery Status</dt>
<dd>
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="celeryStatus" triggers="click mouseenter:mouseleave">
- {{status.tasks.celery_status}}
- @if (status.tasks.celery_status === 'OK') {
+ {{status().tasks.celery_status}}
+ @if (status().tasks.celery_status === 'OK') {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
} @else {
<i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
- [class.text-danger]="status.tasks.celery_status === SystemStatusItemStatus.ERROR"
- [class.text-warning]="status.tasks.celery_status === SystemStatusItemStatus.WARNING"></i-bs>
+ [class.text-danger]="status().tasks.celery_status === SystemStatusItemStatus.ERROR"
+ [class.text-warning]="status().tasks.celery_status === SystemStatusItemStatus.WARNING"></i-bs>
}
</button>
<ng-template #celeryStatus>
- @if (status.tasks.celery_status === 'OK') {
- {{status.tasks.celery_url}}
+ @if (status().tasks.celery_status === 'OK') {
+ {{status().tasks.celery_url}}
} @else {
- {{status.tasks.celery_error}}
+ {{status().tasks.celery_error}}
}
</ng-template>
</dd>
- <dt i18n>Recent Task Activity <span class="small text-muted fw-light">({{status.tasks.summary.days}} days)</span></dt>
+ <dt i18n>Recent Task Activity <span class="small text-muted fw-light">({{status().tasks.summary.days}} days)</span></dt>
<dd class="mb-0">
- @if (status.tasks.summary.total_count > 0) {
+ @if (status().tasks.summary.total_count > 0) {
<ul class="list-group border-light mt-2">
<li class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
<span class="small"><ng-container i18n>Total</ng-container>:</span>
- <span class="badge bg-light rounded-pill">{{status.tasks.summary.total_count}}</span>
+ <span class="badge bg-light rounded-pill">{{status().tasks.summary.total_count}}</span>
</li>
<li class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
<span class="small"><ng-container i18n>Successful</ng-container>:</span>
- <span class="badge bg-primary rounded-pill">{{status.tasks.summary.success_count}}</span>
+ <span class="badge bg-primary rounded-pill">{{status().tasks.summary.success_count}}</span>
</li>
<li class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
<span class="small"><ng-container i18n>Failed</ng-container>:</span>
- <span class="badge bg-danger rounded-pill">{{status.tasks.summary.failure_count}}</span>
+ <span class="badge bg-danger rounded-pill">{{status().tasks.summary.failure_count}}</span>
</li>
<li class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
<span class="small"><ng-container i18n>Pending</ng-container>:</span>
- <span class="badge bg-warning rounded-pill">{{status.tasks.summary.pending_count}}</span>
+ <span class="badge bg-warning rounded-pill">{{status().tasks.summary.pending_count}}</span>
</li>
</ul>
} @else {
@@ -184,8 +184,8 @@
<dt i18n>Search Index</dt>
<dd class="d-flex align-items-center">
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="indexStatus" triggers="click mouseenter:mouseleave">
- {{status.tasks.index_status}}
- @if (status.tasks.index_status === 'OK') {
+ {{status().tasks.index_status}}
+ @if (status().tasks.index_status === 'OK') {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
} @else {
<i-bs name="exclamation-triangle-fill" class="text-danger ms-2 lh-1"></i-bs>
@@ -193,26 +193,26 @@
</button>
</dd>
<ng-template #indexStatus>
- @if (status.tasks.index_status === 'OK') {
- <h6><ng-container i18n>Last Updated</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.index_last_modified | customDate:'medium'}}</span>
+ @if (status().tasks.index_status === 'OK') {
+ <h6><ng-container i18n>Last Updated</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.index_last_modified | customDate:'medium'}}</span>
} @else {
- <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.index_error}}</span>
+ <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.index_error}}</span>
}
</ng-template>
<dt i18n>Classifier</dt>
<dd class="d-flex align-items-center">
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="classifierStatus" triggers="click mouseenter:mouseleave">
- {{status.tasks.classifier_status}}
- @if (status.tasks.classifier_status === 'OK') {
- @if (isStale(status.tasks.classifier_last_trained)) {
+ {{status().tasks.classifier_status}}
+ @if (status().tasks.classifier_status === 'OK') {
+ @if (isStale(status().tasks.classifier_last_trained)) {
<i-bs name="exclamation-triangle-fill" class="text-warning ms-2 lh-1"></i-bs>
} @else {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
}
} @else {
<i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
- [class.text-danger]="status.tasks.classifier_status === SystemStatusItemStatus.ERROR"
- [class.text-warning]="status.tasks.classifier_status === SystemStatusItemStatus.WARNING"></i-bs>
+ [class.text-danger]="status().tasks.classifier_status === SystemStatusItemStatus.ERROR"
+ [class.text-warning]="status().tasks.classifier_status === SystemStatusItemStatus.WARNING"></i-bs>
}
</button>
@if (currentUserIsSuperUser) {
@@ -227,26 +227,26 @@
}
</dd>
<ng-template #classifierStatus>
- @if (status.tasks.classifier_status === 'OK') {
- <h6><ng-container i18n>Last Trained</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.classifier_last_trained | customDate:'medium'}}</span>
+ @if (status().tasks.classifier_status === 'OK') {
+ <h6><ng-container i18n>Last Trained</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.classifier_last_trained | customDate:'medium'}}</span>
} @else {
- <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.classifier_error}}</span>
+ <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.classifier_error}}</span>
}
</ng-template>
<dt i18n>Sanity Checker</dt>
<dd class="d-flex align-items-center">
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="sanityCheckerStatus" triggers="click mouseenter:mouseleave">
- {{status.tasks.sanity_check_status}}
- @if (status.tasks.sanity_check_status === 'OK') {
- @if (isStale(status.tasks.sanity_check_last_run)) {
+ {{status().tasks.sanity_check_status}}
+ @if (status().tasks.sanity_check_status === 'OK') {
+ @if (isStale(status().tasks.sanity_check_last_run)) {
<i-bs name="exclamation-triangle-fill" class="text-warning ms-2 lh-1"></i-bs>
} @else {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
}
} @else {
<i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
- [class.text-danger]="status.tasks.sanity_check_status === SystemStatusItemStatus.ERROR"
- [class.text-warning]="status.tasks.sanity_check_status === SystemStatusItemStatus.WARNING"></i-bs>
+ [class.text-danger]="status().tasks.sanity_check_status === SystemStatusItemStatus.ERROR"
+ [class.text-warning]="status().tasks.sanity_check_status === SystemStatusItemStatus.WARNING"></i-bs>
}
</button>
@if (currentUserIsSuperUser) {
@@ -261,16 +261,16 @@
}
</dd>
<ng-template #sanityCheckerStatus>
- @if (status.tasks.sanity_check_status === 'OK') {
- <h6><ng-container i18n>Last Run</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.sanity_check_last_run | customDate:'medium'}}</span>
+ @if (status().tasks.sanity_check_status === 'OK') {
+ <h6><ng-container i18n>Last Run</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.sanity_check_last_run | customDate:'medium'}}</span>
} @else {
- <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.sanity_check_error}}</span>
+ <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.sanity_check_error}}</span>
}
</ng-template>
<dt i18n>WebSocket Connection</dt>
<dd>
<span class="btn btn-sm pe-none align-items-center btn-dark text-uppercase small">
- @if (status.websocket_connected === 'OK') {
+ @if (status().websocket_connected === 'OK') {
<ng-container i18n>OK</ng-container>
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
} @else {
@@ -283,18 +283,18 @@
<dt i18n>AI Index</dt>
<dd class="d-flex align-items-center">
<button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="llmIndexStatus" triggers="click mouseenter:mouseleave">
- {{status.tasks.llmindex_status}}
- @if (status.tasks.llmindex_status === 'OK') {
- @if (isStale(status.tasks.llmindex_last_modified)) {
+ {{status().tasks.llmindex_status}}
+ @if (status().tasks.llmindex_status === 'OK') {
+ @if (isStale(status().tasks.llmindex_last_modified)) {
<i-bs name="exclamation-triangle-fill" class="text-warning ms-2 lh-1"></i-bs>
} @else {
<i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
}
} @else {
<i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
- [class.text-danger]="status.tasks.llmindex_status === SystemStatusItemStatus.ERROR"
- [class.text-warning]="status.tasks.llmindex_status === SystemStatusItemStatus.WARNING"
- [class.text-muted]="status.tasks.llmindex_status === SystemStatusItemStatus.DISABLED"></i-bs>
+ [class.text-danger]="status().tasks.llmindex_status === SystemStatusItemStatus.ERROR"
+ [class.text-warning]="status().tasks.llmindex_status === SystemStatusItemStatus.WARNING"
+ [class.text-muted]="status().tasks.llmindex_status === SystemStatusItemStatus.DISABLED"></i-bs>
}
</button>
@if (currentUserIsSuperUser) {
@@ -309,10 +309,10 @@
}
</dd>
<ng-template #llmIndexStatus>
- @if (status.tasks.llmindex_status === 'OK') {
- <h6><ng-container i18n>Last Run</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.llmindex_last_modified | customDate:'medium'}}</span>
+ @if (status().tasks.llmindex_status === 'OK') {
+ <h6><ng-container i18n>Last Run</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.llmindex_last_modified | customDate:'medium'}}</span>
} @else {
- <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.llmindex_error}}</span>
+ <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status().tasks.llmindex_error}}</span>
}
</ng-template>
}
@@ -325,10 +325,10 @@
</div>
<div class="modal-footer">
<button class="btn btn-sm d-flex align-items-center btn-dark btn btn-sm d-flex align-items-center btn-dark btn-outline-secondary" (click)="copy()">
- @if (!copied) {
+ @if (!copied()) {
<i-bs name="clipboard-fill" class="me-1"></i-bs>
}
- @if (copied) {
+ @if (copied()) {
<i-bs name="clipboard-check-fill" class="me-1"></i-bs>
}
<ng-container i18n>Copy</ng-container>
diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts
index 4c69feed4..df65f7678 100644
--- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts
@@ -16,12 +16,7 @@ jest.mock('src/environments/environment', () => ({
import { Clipboard } from '@angular/cdk/clipboard'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { Subject, of, throwError } from 'rxjs'
@@ -106,7 +101,7 @@ describe('SystemStatusDialogComponent', () => {
fixture = TestBed.createComponent(SystemStatusDialogComponent)
component = fixture.componentInstance
- component.status = status
+ component.status.set({ ...status })
clipboard = TestBed.inject(Clipboard)
tasksService = TestBed.inject(TasksService)
systemStatusService = TestBed.inject(SystemStatusService)
@@ -126,16 +121,18 @@ describe('SystemStatusDialogComponent', () => {
expect(closeSpy).toHaveBeenCalled()
})
- it('should copy the system status to clipboard', fakeAsync(() => {
+ it('should copy the system status to clipboard', () => {
+ jest.useFakeTimers()
jest.spyOn(clipboard, 'copy')
component.copy()
expect(clipboard.copy).toHaveBeenCalledWith(
- JSON.stringify(component.status, null, 4)
+ JSON.stringify(component.status(), null, 4)
)
- expect(component.copied).toBeTruthy()
- tick(3000)
- expect(component.copied).toBeFalsy()
- }))
+ expect(component.copied()).toBeTruthy()
+ jest.advanceTimersByTime(3000)
+ expect(component.copied()).toBeFalsy()
+ jest.useRealTimers()
+ })
it('should calculate if date is stale', () => {
const date = new Date()
@@ -180,25 +177,28 @@ describe('SystemStatusDialogComponent', () => {
it('shoduld handle version mismatch', () => {
component.frontendVersion = '2.4.2'
component.ngOnInit()
- expect(component.versionMismatch).toBeTruthy()
- expect(component.status.pngx_version).toContain('(frontend: 2.4.2)')
+ expect(component.versionMismatch()).toBeTruthy()
+ expect(component.status().pngx_version).toContain('(frontend: 2.4.2)')
component.frontendVersion = '2.4.3'
- component.status.pngx_version = '2.4.3'
+ component.status.update((status) => ({
+ ...status,
+ pngx_version: '2.4.3',
+ }))
component.ngOnInit()
- expect(component.versionMismatch).toBeFalsy()
+ expect(component.versionMismatch()).toBeFalsy()
})
it('should update websocket connection status', () => {
websocketSubject.next(true)
- expect(component.status.websocket_connected).toEqual(
+ expect(component.status().websocket_connected).toEqual(
SystemStatusItemStatus.OK
)
websocketSubject.next(false)
- expect(component.status.websocket_connected).toEqual(
+ expect(component.status().websocket_connected).toEqual(
SystemStatusItemStatus.ERROR
)
websocketSubject.next(true)
- expect(component.status.websocket_connected).toEqual(
+ expect(component.status().websocket_connected).toEqual(
SystemStatusItemStatus.OK
)
})
diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts
index 88426186c..cf9982400 100644
--- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts
+++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts
@@ -1,5 +1,12 @@
import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard'
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import {
+ Component,
+ Input,
+ OnDestroy,
+ OnInit,
+ inject,
+ signal,
+} from '@angular/core'
import {
NgbActiveModal,
NgbModalModule,
@@ -50,13 +57,11 @@ export class SystemStatusDialogComponent implements OnInit, OnDestroy {
public SystemStatusItemStatus = SystemStatusItemStatus
public PaperlessTaskType = PaperlessTaskType
- public status: SystemStatus
+ @Input() status = signal<SystemStatus>(undefined)
public frontendVersion: string = environment.version
- public versionMismatch: boolean = false
-
- public copied: boolean = false
-
- private runningTasks: Set<PaperlessTaskType> = new Set()
+ readonly versionMismatch = signal(false)
+ readonly copied = signal(false)
+ readonly runningTasks = signal<Set<PaperlessTaskType>>(new Set())
private unsubscribeNotifier: Subject<any> = new Subject()
get currentUserIsSuperUser(): boolean {
@@ -68,25 +73,24 @@ export class SystemStatusDialogComponent implements OnInit, OnDestroy {
}
public ngOnInit() {
- this.versionMismatch =
+ const status = this.status()
+ this.versionMismatch.set(
environment.production &&
- this.status.pngx_version &&
- this.frontendVersion &&
- this.status.pngx_version !== this.frontendVersion
- if (this.versionMismatch) {
- this.status.pngx_version = `${this.status.pngx_version} (frontend: ${this.frontendVersion})`
+ status.pngx_version &&
+ this.frontendVersion &&
+ status.pngx_version !== this.frontendVersion
+ )
+ if (this.versionMismatch()) {
+ this.status.set({
+ ...status,
+ pngx_version: `${status.pngx_version} (frontend: ${this.frontendVersion})`,
+ })
}
- this.status.websocket_connected = this.websocketStatusService.isConnected()
- ? SystemStatusItemStatus.OK
- : SystemStatusItemStatus.ERROR
+ this.updateWebsocketStatus(this.websocketStatusService.isConnected())
this.websocketStatusService
.onConnectionStatus()
.pipe(takeUntil(this.unsubscribeNotifier))
- .subscribe((connected) => {
- this.status.websocket_connected = connected
- ? SystemStatusItemStatus.OK
- : SystemStatusItemStatus.ERROR
- })
+ .subscribe((connected) => this.updateWebsocketStatus(connected))
}
public close() {
@@ -94,10 +98,10 @@ export class SystemStatusDialogComponent implements OnInit, OnDestroy {
}
public copy() {
- this.clipboard.copy(JSON.stringify(this.status, null, 4))
- this.copied = true
+ this.clipboard.copy(JSON.stringify(this.status(), null, 4))
+ this.copied.set(true)
setTimeout(() => {
- this.copied = false
+ this.copied.set(false)
}, 3000)
}
@@ -108,23 +112,26 @@ export class SystemStatusDialogComponent implements OnInit, OnDestroy {
}
public isRunning(taskName: PaperlessTaskType): boolean {
- return this.runningTasks.has(taskName)
+ return this.runningTasks().has(taskName)
}
public runTask(taskName: PaperlessTaskType) {
- this.runningTasks.add(taskName)
+ this.setTaskRunning(taskName, true)
this.toastService.showInfo(`Task ${taskName} started`)
this.tasksService.run(taskName).subscribe({
next: () => {
- this.runningTasks.delete(taskName)
+ this.setTaskRunning(taskName, false)
this.systemStatusService.get().subscribe({
- next: (status) => {
- Object.assign(this.status, status)
+ next: (statusUpdate) => {
+ this.status.set({
+ ...this.status(),
+ ...statusUpdate,
+ })
},
})
},
error: (err) => {
- this.runningTasks.delete(taskName)
+ this.setTaskRunning(taskName, false)
this.toastService.showError(
`Failed to start task ${taskName}, see the logs for more details`,
err
@@ -133,6 +140,25 @@ export class SystemStatusDialogComponent implements OnInit, OnDestroy {
})
}
+ private updateWebsocketStatus(connected: boolean): void {
+ this.status.set({
+ ...this.status(),
+ websocket_connected: connected
+ ? SystemStatusItemStatus.OK
+ : SystemStatusItemStatus.ERROR,
+ })
+ }
+
+ private setTaskRunning(taskName: PaperlessTaskType, running: boolean): void {
+ const runningTasks = new Set(this.runningTasks())
+ if (running) {
+ runningTasks.add(taskName)
+ } else {
+ runningTasks.delete(taskName)
+ }
+ this.runningTasks.set(runningTasks)
+ }
+
ngOnDestroy(): void {
this.unsubscribeNotifier.next(this)
this.unsubscribeNotifier.complete()
diff --git a/src-ui/src/app/components/common/tag/tag.component.html b/src-ui/src/app/components/common/tag/tag.component.html
index ebf32d0b5..a7f2de44c 100644
--- a/src-ui/src/app/components/common/tag/tag.component.html
+++ b/src-ui/src/app/components/common/tag/tag.component.html
@@ -1,13 +1,13 @@
-@if (tag) {
- @if (showParents && tag.parent) {
- <pngx-tag [tagID]="tag.parent" [clickable]="clickable" [linkTitle]="linkTitle"></pngx-tag>
+@if (tag()) {
+ @if (showParents() && tag().parent) {
+ <pngx-tag [tagID]="tag().parent" [clickable]="clickable()" [linkTitle]="linkTitle()"></pngx-tag>
&nbsp;&gt;&nbsp;
}
- @if (!clickable) {
- <span class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</span>
+ @if (!clickable()) {
+ <span class="badge" [style.background]="tag().color" [style.color]="tag().text_color">{{tag().name}}</span>
}
- @if (clickable) {
- <a [title]="linkTitle" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</a>
+ @if (clickable()) {
+ <a [title]="linkTitle()" class="badge" [style.background]="tag().color" [style.color]="tag().text_color">{{tag().name}}</a>
}
} @else if (loading) {
<span class="placeholder-glow">
@@ -16,10 +16,10 @@
</span>
</span>
} @else {
- @if (!clickable) {
+ @if (!clickable()) {
<span class="badge private" i18n>Private</span>
}
- @if (clickable) {
- <a [title]="linkTitle" class="badge private" i18n>Private</a>
+ @if (clickable()) {
+ <a [title]="linkTitle()" class="badge private" i18n>Private</a>
}
}
diff --git a/src-ui/src/app/components/common/tag/tag.component.spec.ts b/src-ui/src/app/components/common/tag/tag.component.spec.ts
index e84e7fc5c..06d79d96a 100644
--- a/src-ui/src/app/components/common/tag/tag.component.spec.ts
+++ b/src-ui/src/app/components/common/tag/tag.component.spec.ts
@@ -37,7 +37,7 @@ describe('TagComponent', () => {
})
it('should create tag with background color', () => {
- component.tag = tag
+ component.tag.set(tag)
fixture.detectChanges()
expect(
fixture.debugElement.query(By.css('span')).nativeElement.style
@@ -52,10 +52,10 @@ describe('TagComponent', () => {
})
it('should support clickable option', () => {
- component.tag = tag
+ component.tag.set(tag)
fixture.detectChanges()
expect(fixture.debugElement.query(By.css('a.badge'))).toBeNull()
- component.clickable = true
+ fixture.componentRef.setInput('clickable', true)
fixture.detectChanges()
expect(fixture.debugElement.query(By.css('a.badge'))).not.toBeNull()
})
@@ -64,8 +64,9 @@ describe('TagComponent', () => {
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
const getCachedSpy = jest.spyOn(tagService, 'getCached')
getCachedSpy.mockReturnValue(of(tag))
- component.tagID = 1
+ fixture.componentRef.setInput('tagID', 1)
+ fixture.detectChanges()
expect(getCachedSpy).toHaveBeenCalledWith(1)
- expect(component.tag).toEqual(tag)
+ expect(component.tag()).toEqual(tag)
})
})
diff --git a/src-ui/src/app/components/common/tag/tag.component.ts b/src-ui/src/app/components/common/tag/tag.component.ts
index 35fd80a00..0cb17ad8e 100644
--- a/src-ui/src/app/components/common/tag/tag.component.ts
+++ b/src-ui/src/app/components/common/tag/tag.component.ts
@@ -1,4 +1,4 @@
-import { Component, inject, Input } from '@angular/core'
+import { Component, effect, inject, input, model } from '@angular/core'
import { Tag } from 'src/app/data/tag'
import {
PermissionAction,
@@ -16,44 +16,33 @@ export class TagComponent {
private permissionsService = inject(PermissionsService)
private tagService = inject(TagService)
- private _tag: Tag
- private _tagID: number
-
- @Input()
- public set tag(tag: Tag) {
- this._tag = tag
- }
-
- public get tag(): Tag {
- return this._tag
- }
-
- @Input()
- set tagID(tagID: number) {
- if (tagID !== this._tagID) {
- this._tagID = tagID
- if (
- this.permissionsService.currentUserCan(
- PermissionAction.View,
- PermissionType.Tag
- )
- ) {
- this.tagService.getCached(this._tagID).subscribe((tag) => {
- this.tag = tag
- })
+ readonly tag = model<Tag>(null)
+ readonly tagID = input<number>(undefined)
+ readonly linkTitle = input('')
+ readonly clickable = input(false, {
+ transform: (value: boolean | string) =>
+ value === '' || value === true || value === 'true',
+ })
+ readonly showParents = input(false)
+
+ constructor() {
+ effect(() => {
+ const tagID = this.tagID()
+ if (tagID) {
+ if (
+ this.permissionsService.currentUserCan(
+ PermissionAction.View,
+ PermissionType.Tag
+ )
+ ) {
+ this.tagService.getCached(tagID).subscribe((tag) => {
+ this.tag.set(tag)
+ })
+ }
}
- }
+ })
}
- @Input()
- linkTitle: string = ''
-
- @Input()
- clickable: boolean = false
-
- @Input()
- showParents: boolean = false
-
public get loading(): boolean {
return this.tagService.loading
}
diff --git a/src-ui/src/app/components/common/toast/toast.component.html b/src-ui/src/app/components/common/toast/toast.component.html
index 3fec3899e..f241d3cea 100644
--- a/src-ui/src/app/components/common/toast/toast.component.html
+++ b/src-ui/src/app/components/common/toast/toast.component.html
@@ -34,10 +34,10 @@
<div class="row">
<div class="col offset-sm-3">
<button class="btn btn-sm btn-outline-secondary" (click)="copyError(toast.error)">
- @if (!copied) {
+ @if (!copied()) {
<i-bs name="clipboard" class="me-1"></i-bs>
}
- @if (copied) {
+ @if (copied()) {
<i-bs name="clipboard-check" class="me-1"></i-bs>
}
<ng-container i18n>Copy Raw Error</ng-container>
diff --git a/src-ui/src/app/components/common/toast/toast.component.spec.ts b/src-ui/src/app/components/common/toast/toast.component.spec.ts
index c5d52a28f..2d0eb8341 100644
--- a/src-ui/src/app/components/common/toast/toast.component.spec.ts
+++ b/src-ui/src/app/components/common/toast/toast.component.spec.ts
@@ -1,11 +1,4 @@
-import {
- ComponentFixture,
- discardPeriodicTasks,
- fakeAsync,
- flush,
- TestBed,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { Clipboard } from '@angular/cdk/clipboard'
import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -48,28 +41,25 @@ describe('ToastComponent', () => {
expect(component).toBeTruthy()
})
- it('should countdown toast', fakeAsync(() => {
+ it('should countdown toast', () => {
+ jest.useFakeTimers()
component.toast = toast2
fixture.detectChanges()
component.onShown(toast2)
- tick(5000)
+ jest.advanceTimersByTime(5000)
expect(component.toast.delayRemaining).toEqual(0)
- flush()
- discardPeriodicTasks()
- }))
+ jest.useRealTimers()
+ })
- it('should show an error if given with toast', fakeAsync(() => {
+ it('should show an error if given with toast', () => {
component.toast = toast1
fixture.detectChanges()
expect(fixture.nativeElement.querySelector('details')).not.toBeNull()
expect(fixture.nativeElement.textContent).toContain('Error 1 content')
+ })
- flush()
- discardPeriodicTasks()
- }))
-
- it('should show error details, support copy', fakeAsync(() => {
+ it('should show error details, support copy', () => {
component.toast = toast2
fixture.detectChanges()
@@ -81,10 +71,7 @@ describe('ToastComponent', () => {
const copySpy = jest.spyOn(clipboard, 'copy')
component.copyError(toast2.error)
expect(copySpy).toHaveBeenCalled()
-
- flush()
- discardPeriodicTasks()
- }))
+ })
it('should parse error text, add ellipsis', () => {
expect(component.getErrorText(toast2.error)).toEqual(
diff --git a/src-ui/src/app/components/common/toast/toast.component.ts b/src-ui/src/app/components/common/toast/toast.component.ts
index 02b347f06..7ab75d1ad 100644
--- a/src-ui/src/app/components/common/toast/toast.component.ts
+++ b/src-ui/src/app/components/common/toast/toast.component.ts
@@ -1,6 +1,13 @@
import { Clipboard } from '@angular/cdk/clipboard'
import { DecimalPipe } from '@angular/common'
-import { Component, EventEmitter, Input, Output, inject } from '@angular/core'
+import {
+ Component,
+ EventEmitter,
+ Input,
+ Output,
+ inject,
+ signal,
+} from '@angular/core'
import {
NgbProgressbarModule,
NgbToastModule,
@@ -22,6 +29,7 @@ import { Toast } from 'src/app/services/toast.service'
})
export class ToastComponent {
private clipboard = inject(Clipboard)
+ readonly copied = signal(false)
@Input() toast: Toast
@@ -31,8 +39,6 @@ export class ToastComponent {
@Output() closed: EventEmitter<Toast> = new EventEmitter<Toast>()
- public copied: boolean = false
-
onShown(toast: Toast) {
if (!this.autohide) return
@@ -62,9 +68,9 @@ export class ToastComponent {
public copyError(error: any) {
this.clipboard.copy(JSON.stringify(error))
- this.copied = true
+ this.copied.set(true)
setTimeout(() => {
- this.copied = false
+ this.copied.set(false)
}, 3000)
}
diff --git a/src-ui/src/app/components/common/toasts/toasts.component.html b/src-ui/src/app/components/common/toasts/toasts.component.html
index 3bd39d1ec..d04c4dc7b 100644
--- a/src-ui/src/app/components/common/toasts/toasts.component.html
+++ b/src-ui/src/app/components/common/toasts/toasts.component.html
@@ -1,3 +1,3 @@
-@for (toast of toasts; track toast.id) {
+@for (toast of toasts(); track toast.id) {
<pngx-toast [toast]="toast" [autohide]="true" (closed)="closeToast()"></pngx-toast>
}
diff --git a/src-ui/src/app/components/common/toasts/toasts.component.spec.ts b/src-ui/src/app/components/common/toasts/toasts.component.spec.ts
index bbea04c9c..1e7c686dc 100644
--- a/src-ui/src/app/components/common/toasts/toasts.component.spec.ts
+++ b/src-ui/src/app/components/common/toasts/toasts.component.spec.ts
@@ -22,7 +22,7 @@ describe('ToastsComponent', () => {
let component: ToastsComponent
let fixture: ComponentFixture<ToastsComponent>
let toastService: ToastService
- let toastSubject: Subject<Toast> = new Subject()
+ let toastSubject: Subject<Toast>
beforeEach(async () => {
TestBed.configureTestingModule({
@@ -33,10 +33,11 @@ describe('ToastsComponent', () => {
],
}).compileComponents()
- fixture = TestBed.createComponent(ToastsComponent)
toastService = TestBed.inject(ToastService)
+ toastSubject = new Subject()
jest.replaceProperty(toastService, 'showToast', toastSubject)
+ fixture = TestBed.createComponent(ToastsComponent)
component = fixture.componentInstance
fixture.detectChanges()
@@ -47,25 +48,15 @@ describe('ToastsComponent', () => {
})
it('should close toast', () => {
- component.toasts = [toast]
+ toastSubject.next(toast)
const closeToastSpy = jest.spyOn(toastService, 'closeToast')
component.closeToast()
- expect(component.toasts).toEqual([])
+ expect(component.toasts()).toEqual([])
expect(closeToastSpy).toHaveBeenCalledWith(toast)
})
- it('should unsubscribe', () => {
- const unsubscribeSpy = jest.spyOn(
- (component as any).subscription,
- 'unsubscribe'
- )
- component.ngOnDestroy()
- expect(unsubscribeSpy).toHaveBeenCalled()
- })
-
- it('should subscribe to toastService', () => {
- component.ngOnInit()
+ it('should update from toastService', () => {
toastSubject.next(toast)
- expect(component.toasts).toEqual([toast])
+ expect(component.toasts()).toEqual([toast])
})
})
diff --git a/src-ui/src/app/components/common/toasts/toasts.component.ts b/src-ui/src/app/components/common/toasts/toasts.component.ts
index e4da0dfd3..ab1f71154 100644
--- a/src-ui/src/app/components/common/toasts/toasts.component.ts
+++ b/src-ui/src/app/components/common/toasts/toasts.component.ts
@@ -1,10 +1,11 @@
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import { Component, inject } from '@angular/core'
+import { toSignal } from '@angular/core/rxjs-interop'
import {
NgbAccordionModule,
NgbProgressbarModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { Subscription } from 'rxjs'
+import { map, merge, Subject } from 'rxjs'
import { Toast, ToastService } from 'src/app/services/toast.service'
import { ToastComponent } from '../toast/toast.component'
@@ -19,25 +20,21 @@ import { ToastComponent } from '../toast/toast.component'
NgxBootstrapIconsModule,
],
})
-export class ToastsComponent implements OnInit, OnDestroy {
+export class ToastsComponent {
toastService = inject(ToastService)
- private subscription: Subscription
+ private readonly closedToast = new Subject<void>()
- public toasts: Toast[] = [] // array to force change detection
-
- ngOnDestroy(): void {
- this.subscription?.unsubscribe()
- }
-
- ngOnInit(): void {
- this.subscription = this.toastService.showToast.subscribe((toast) => {
- this.toasts = toast ? [toast] : []
- })
- }
+ readonly toasts = toSignal(
+ merge(
+ this.toastService.showToast.pipe(map((toast) => (toast ? [toast] : []))),
+ this.closedToast.pipe(map(() => [] as Toast[]))
+ ),
+ { initialValue: [] as Toast[] }
+ )
closeToast() {
- this.toastService.closeToast(this.toasts[0])
- this.toasts = []
+ this.toastService.closeToast(this.toasts()[0])
+ this.closedToast.next()
}
}
diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.html
index 41b124544..7008dc27a 100644
--- a/src-ui/src/app/components/dashboard/dashboard.component.html
+++ b/src-ui/src/app/components/dashboard/dashboard.component.html
@@ -6,7 +6,7 @@
<div class="col-12 col-lg-8 col-xl-9 mb-4">
<div class="row row-cols-1 g-4"
cdkDropList
- [cdkDropListDisabled]="settingsService.globalDropzoneActive"
+ [cdkDropListDisabled]="settingsService.globalDropzoneActive()"
(cdkDropListDropped)="onDrop($event)"
>
@if (savedViewService.loading) {
@@ -45,7 +45,7 @@
</div>
</div>
}
- @for (v of dashboardViews; track v.id) {
+ @for (v of dashboardViews(); track v.id) {
<div class="col">
<pngx-saved-view-widget
[savedView]="v"
diff --git a/src-ui/src/app/components/dashboard/dashboard.component.spec.ts b/src-ui/src/app/components/dashboard/dashboard.component.spec.ts
index a23eefb2b..48bc7353e 100644
--- a/src-ui/src/app/components/dashboard/dashboard.component.spec.ts
+++ b/src-ui/src/app/components/dashboard/dashboard.component.spec.ts
@@ -120,10 +120,10 @@ describe('DashboardComponent', () => {
}).compileComponents()
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = {
+ settingsService.currentUser.set({
first_name: 'Foo',
last_name: 'Bar',
- }
+ })
jest.spyOn(settingsService, 'get').mockImplementation((key) => {
if (key === SETTINGS_KEYS.DASHBOARD_VIEWS_SORT_ORDER) return [0, 2, 3]
})
@@ -137,9 +137,9 @@ describe('DashboardComponent', () => {
it('should show a welcome message', () => {
expect(component.subtitle).toEqual(`Hello Foo, welcome to Paperless-ngx`)
- settingsService.currentUser = {
+ settingsService.currentUser.set({
id: 1,
- }
+ })
expect(component.subtitle).toEqual(`Welcome to Paperless-ngx`)
})
@@ -164,11 +164,11 @@ describe('DashboardComponent', () => {
})
it('should disable global dropzone on start drag + drop, re-enable after', () => {
- expect(settingsService.globalDropzoneEnabled).toBeTruthy()
+ expect(settingsService.globalDropzoneEnabled()).toBeTruthy()
component.onDragStart(null)
- expect(settingsService.globalDropzoneEnabled).toBeFalsy()
+ expect(settingsService.globalDropzoneEnabled()).toBeFalsy()
component.onDragEnd(null)
- expect(settingsService.globalDropzoneEnabled).toBeTruthy()
+ expect(settingsService.globalDropzoneEnabled()).toBeTruthy()
})
it('should update saved view sorting on drag + drop, show info', () => {
diff --git a/src-ui/src/app/components/dashboard/dashboard.component.ts b/src-ui/src/app/components/dashboard/dashboard.component.ts
index 2d7e9445e..35c5bb093 100644
--- a/src-ui/src/app/components/dashboard/dashboard.component.ts
+++ b/src-ui/src/app/components/dashboard/dashboard.component.ts
@@ -5,7 +5,7 @@ import {
DragDropModule,
moveItemInArray,
} from '@angular/cdk/drag-drop'
-import { Component, inject } from '@angular/core'
+import { Component, inject, signal } from '@angular/core'
import { RouterModule } from '@angular/router'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { TourNgBootstrap, TourService } from 'ngx-ui-tour-ng-bootstrap'
@@ -47,12 +47,12 @@ export class DashboardComponent extends ComponentWithPermissions {
private tourService = inject(TourService)
private toastService = inject(ToastService)
- public dashboardViews: SavedView[] = []
+ readonly dashboardViews = signal<SavedView[]>([])
constructor() {
super()
this.savedViewService.listAll().subscribe(() => {
- this.dashboardViews = this.savedViewService.dashboardViews
+ this.dashboardViews.set(this.savedViewService.dashboardViews)
})
}
@@ -73,22 +73,20 @@ export class DashboardComponent extends ComponentWithPermissions {
}
onDragStart(event: CdkDragStart) {
- this.settingsService.globalDropzoneEnabled = false
+ this.settingsService.globalDropzoneEnabled.set(false)
}
onDragEnd(event: CdkDragEnd) {
- this.settingsService.globalDropzoneEnabled = true
+ this.settingsService.globalDropzoneEnabled.set(true)
}
onDrop(event: CdkDragDrop<SavedView[]>) {
- moveItemInArray(
- this.dashboardViews,
- event.previousIndex,
- event.currentIndex
- )
+ const dashboardViews = [...this.dashboardViews()]
+ moveItemInArray(dashboardViews, event.previousIndex, event.currentIndex)
+ this.dashboardViews.set(dashboardViews)
this.settingsService
- .updateDashboardViewsSort(this.dashboardViews)
+ .updateDashboardViewsSort(this.dashboardViews())
.subscribe({
next: () => {
this.toastService.showInfo($localize`Dashboard updated`)
diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html
index ef82a96a3..d53e39bbf 100644
--- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html
+++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html
@@ -1,22 +1,25 @@
<pngx-widget-frame
*pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }"
[title]="savedView.name"
- [badge]="count"
- [loading]="loading"
+ [loading]="false"
[draggable]="savedView"
>
- @if (documents.length) {
+ @if (count() !== null) {
+ <span title-badge class="badge bg-info text-dark ms-2">{{count()}}</span>
+ }
+
+ @if (documents().length) {
<a class="btn-link text-decoration-none" header-buttons [routerLink]="[]" (click)="showAll()" i18n>Show all</a>
}
- <div content class="wrapper fade" [class.show]="show">
- @if (displayMode === DisplayMode.TABLE) {
+ <div content class="wrapper fade" [class.show]="show()">
+ @if (displayMode() === DisplayMode.TABLE) {
<table class="table table-hover mb-0 mt-n2 align-middle">
<thead>
<tr>
- @for (field of displayFields; track field; let i = $index) {
- @if (displayFields.includes(field)) {
+ @for (field of displayFields(); track field; let i = $index) {
+ @if (displayFields().includes(field)) {
<th
scope="col"
[ngClass]="{
@@ -30,13 +33,26 @@
</tr>
</thead>
<tbody>
- @for (doc of documents; track doc.id; let i = $index) {
+ @if (loading() && !documents().length) {
+ @for (row of placeholderRows; track row) {
+ <tr>
+ @for (field of displayFields(); track field; let j = $index) {
+ <td class="py-2 py-md-3 position-relative" [ngClass]="{ 'd-none d-md-table-cell': j > 1 }">
+ <div class="placeholder-glow text-start">
+ <span class="placeholder bg-secondary w-50" [ngStyle]="{ opacity: 1 - (row * 1/placeholderRows.length) }"></span>
+ </div>
+ </td>
+ }
+ </tr>
+ }
+ }
+ @for (doc of documents(); track doc.id; let i = $index) {
<tr>
- @for (field of displayFields; track field; let j = $index) {
+ @for (field of displayFields(); track field; let j = $index) {
<td class="py-2 py-md-3 position-relative" [ngClass]="{ 'd-none d-md-table-cell': j > 1 }">
- @if (loading && show) {
+ @if (loading() && !documents().length) {
<div class="placeholder-glow text-start">
- <span class="placeholder bg-secondary w-50" [ngStyle]="{ opacity: 1 - (i * 1/documents.length) }"></span>
+ <span class="placeholder bg-secondary w-50" [ngStyle]="{ opacity: 1 - (i * 1/documents().length) }"></span>
</div>
} @else {
@switch (field) {
@@ -96,7 +112,7 @@
@if (field.startsWith(DisplayField.CUSTOM_FIELD)) {
<pngx-custom-field-display [document]="doc" [fieldDisplayKey]="field"></pngx-custom-field-display>
}
- @if (j === displayFields.length - 1) {
+ @if (j === displayFields().length - 1) {
<div class="btn-group position-absolute top-50 end-0 translate-middle-y" (mouseleave)="popupPreview.close()">
<pngx-preview-popup [document]="doc" linkClasses="btn px-4 btn-dark border-dark-subtle" #popupPreview>
<i-bs width="0.8em" height="0.8em" name="eye"></i-bs>
@@ -113,15 +129,25 @@
}
</tbody>
</table>
- } @else if (displayMode === DisplayMode.SMALL_CARDS) {
+ } @else if (displayMode() === DisplayMode.SMALL_CARDS) {
<div class="row row-cols-paperless-cards my-n2">
- @for (d of documents; track d.id; let i = $index) {
+ @if (loading() && !documents().length) {
+ @for (row of placeholderRows; track row) {
+ <pngx-document-card-small
+ class="p-0"
+ [ngStyle]="{ opacity: 1 - (row * 1/placeholderRows.length) }"
+ [document]="null"
+ [displayFields]="displayFields()">
+ </pngx-document-card-small>
+ }
+ }
+ @for (d of documents(); track d.id; let i = $index) {
<pngx-document-card-small
class="p-0"
- [ngStyle]="{ opacity: !loading && show ? 1 : 1 - (i * 1/documents.length) }"
+ [ngStyle]="{ opacity: show() ? 1 : 1 - (i * 1/documents().length) }"
(dblClickDocument)="openDocumentDetail(d)"
- [document]="!loading && show ? d : null"
- [displayFields]="displayFields"
+ [document]="d"
+ [displayFields]="displayFields()"
(clickTag)="clickTag($event)"
(clickCorrespondent)="clickCorrespondent($event)"
(clickStoragePath)="clickStoragePath($event)"
@@ -129,14 +155,23 @@
</pngx-document-card-small>
}
</div>
- } @else if (displayMode === DisplayMode.LARGE_CARDS) {
+ } @else if (displayMode() === DisplayMode.LARGE_CARDS) {
<div class="row my-n2">
- @for (d of documents; track d.id; let i = $index) {
+ @if (loading() && !documents().length) {
+ @for (row of placeholderRows; track row) {
+ <pngx-document-card-large
+ [document]="null"
+ [ngStyle]="{ opacity: 1 - (row * 1/placeholderRows.length) }"
+ [displayFields]="displayFields()">
+ </pngx-document-card-large>
+ }
+ }
+ @for (d of documents(); track d.id; let i = $index) {
<pngx-document-card-large
(dblClickDocument)="openDocumentDetail(d)"
- [document]="!loading && show ? d : null"
- [ngStyle]="{ opacity: !loading && show ? 1 : 1 - (i * 1/documents.length) }"
- [displayFields]="displayFields"
+ [document]="d"
+ [ngStyle]="{ opacity: show() ? 1 : 1 - (i * 1/documents().length) }"
+ [displayFields]="displayFields()"
(clickTag)="clickTag($event)"
(clickCorrespondent)="clickCorrespondent($event)"
(clickStoragePath)="clickStoragePath($event)"
diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts
index 621a90491..39480d373 100644
--- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts
+++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts
@@ -2,12 +2,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop'
import { DatePipe } from '@angular/common'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { By } from '@angular/platform-browser'
import { Router } from '@angular/router'
import { RouterTestingModule } from '@angular/router/testing'
@@ -186,7 +181,8 @@ describe('SavedViewWidgetComponent', () => {
fixture.detectChanges()
})
- it('should show a list of documents', fakeAsync(() => {
+ it('should show a list of documents', async () => {
+ jest.useFakeTimers()
jest.spyOn(documentService, 'listFiltered').mockReturnValue(
of({
all: [2, 3],
@@ -195,7 +191,8 @@ describe('SavedViewWidgetComponent', () => {
})
)
component.ngOnInit()
- tick(500)
+ jest.advanceTimersByTime(500)
+ await fixture.whenStable()
fixture.detectChanges()
expect(fixture.debugElement.nativeElement.textContent).toContain('doc2')
expect(fixture.debugElement.nativeElement.textContent).toContain('doc3')
@@ -206,7 +203,8 @@ describe('SavedViewWidgetComponent', () => {
expect(
fixture.debugElement.queryAll(By.css('td a.btn'))[1].attributes['href']
).toEqual(component.getDownloadUrl(documentResults[0]))
- }))
+ jest.useRealTimers()
+ })
it('should call api endpoint and load results', () => {
const listAllSpy = jest.spyOn(documentService, 'listFiltered')
@@ -229,7 +227,7 @@ describe('SavedViewWidgetComponent', () => {
}
)
fixture.detectChanges()
- expect(component.documents).toEqual(documentResults)
+ expect(component.documents()).toEqual(documentResults)
})
it('should reload on document consumption finished', () => {
diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts
index 198feb423..271ce16bb 100644
--- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts
+++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts
@@ -6,12 +6,13 @@ import {
OnDestroy,
OnInit,
QueryList,
+ signal,
ViewChildren,
} from '@angular/core'
import { Router, RouterModule } from '@angular/router'
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { delay, Subject, takeUntil, tap } from 'rxjs'
+import { Subject, takeUntil } from 'rxjs'
import { CustomFieldDisplayComponent } from 'src/app/components/common/custom-field-display/custom-field-display.component'
import { PreviewPopupComponent } from 'src/app/components/common/preview-popup/preview-popup.component'
import { TagComponent } from 'src/app/components/common/tag/tag.component'
@@ -106,7 +107,7 @@ export class SavedViewWidgetComponent
@Input()
savedView: SavedView
- documents: Document[] = []
+ readonly documents = signal<Document[]>([])
unsubscribeNotifier: Subject<any> = new Subject()
@@ -116,21 +117,24 @@ export class SavedViewWidgetComponent
mouseOnPreview = false
popoverHidden = true
- displayMode: DisplayMode
+ readonly displayMode = signal<DisplayMode>(null)
- displayFields: DisplayField[] = DEFAULT_DASHBOARD_DISPLAY_FIELDS
+ readonly displayFields = signal<DisplayField[]>(
+ DEFAULT_DASHBOARD_DISPLAY_FIELDS
+ )
- count: number
+ readonly count = signal<number>(null)
+
+ placeholderRows: number[] = []
ngOnInit(): void {
- this.reload()
- this.displayMode = this.savedView.display_mode ?? DisplayMode.TABLE
- this.websocketStatusService
- .onDocumentConsumptionFinished()
- .pipe(takeUntil(this.unsubscribeNotifier))
- .subscribe(() => {
- this.reload()
- })
+ this.placeholderRows = Array.from(
+ {
+ length: this.savedView?.page_size ?? DEFAULT_DASHBOARD_VIEW_PAGE_SIZE,
+ },
+ (_, index) => index
+ )
+ this.displayMode.set(this.savedView.display_mode ?? DisplayMode.TABLE)
if (
this.permissionsService.currentUserCan(
@@ -150,15 +154,23 @@ export class SavedViewWidgetComponent
this.savedView.display_fields &&
this.savedView.display_fields.length > 0
) {
- this.displayFields = this.savedView.display_fields
+ this.displayFields.set(this.savedView.display_fields)
}
// filter by perms etc
- this.displayFields = this.displayFields.filter(
- (field) =>
- this.settingsService.allDisplayFields.find((f) => f.id === field) !==
- undefined
+ this.displayFields.set(
+ this.displayFields().filter((field) =>
+ this.settingsService.allDisplayFields().some((f) => f.id === field)
+ )
)
+
+ this.reload()
+ this.websocketStatusService
+ .onDocumentConsumptionFinished()
+ .pipe(takeUntil(this.unsubscribeNotifier))
+ .subscribe(() => {
+ this.reload()
+ })
}
ngOnDestroy(): void {
@@ -167,7 +179,8 @@ export class SavedViewWidgetComponent
}
reload() {
- this.loading = this.documents.length == 0
+ this.loading.set(this.documents().length == 0)
+ this.show.set(true)
this.documentService
.listFiltered(
1,
@@ -177,18 +190,13 @@ export class SavedViewWidgetComponent
this.savedView.filter_rules,
{ truncate_content: true }
)
- .pipe(
- takeUntil(this.unsubscribeNotifier),
- tap((result) => {
- this.show = true
- this.documents = result.results
- this.count = result.count
- this.savedViewService.setDocumentCount(this.savedView, result.count)
- }),
- delay(500)
- )
+ .pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((result) => {
- this.loading = false
+ this.documents.set(result.results)
+ this.count.set(result.count)
+ this.savedViewService.setDocumentCount(this.savedView, result.count)
+ this.loading.set(false)
+ this.show.set(true)
})
}
diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html
index ef2b47b02..9660836b2 100644
--- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html
+++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html
@@ -1,7 +1,7 @@
-<pngx-widget-frame title="Statistics" [loading]="loading" i18n-title>
+<pngx-widget-frame title="Statistics" [loading]="loading()" i18n-title>
<ng-container content>
<div class="list-group border-light placeholder-glow">
- @if (loading) {
+ @if (loading()) {
<div class="list-group-item d-flex">
<div class="placeholder w-50"></div>
<span class="placeholder badge rounded-pill ms-auto" style="width: 25px;">&nbsp;</span>
@@ -24,32 +24,32 @@
<div class="placeholder w-100 d-block"></div>
</div>
} @else {
- @if (statistics?.documents_inbox !== null) {
+ @if (statistics()?.documents_inbox !== null) {
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to inbox" i18n-title href="javascript:void(0)" (click)="goToInbox()">
<ng-container i18n>Documents in inbox</ng-container>:
- <span class="badge rounded-pill" [class.bg-primary]="statistics?.documents_inbox > 0" [class.bg-muted]="statistics?.documents_inbox === 0">{{statistics?.documents_inbox}}</span>
+ <span class="badge rounded-pill" [class.bg-primary]="statistics()?.documents_inbox > 0" [class.bg-muted]="statistics()?.documents_inbox === 0">{{statistics()?.documents_inbox}}</span>
</a>
}
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to documents" i18n-title routerLink="/documents/">
<ng-container i18n>Total documents</ng-container>:
- <span class="badge bg-primary rounded-pill">{{statistics?.documents_total}}</span>
+ <span class="badge bg-primary rounded-pill">{{statistics()?.documents_total}}</span>
</a>
<div class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documents/">
<ng-container i18n>Total characters</ng-container>:
- <span class="badge bg-secondary text-light rounded-pill">{{statistics?.character_count | number}}</span>
+ <span class="badge bg-secondary text-light rounded-pill">{{statistics()?.character_count | number}}</span>
</div>
- @if (statistics?.current_asn) {
+ @if (statistics()?.current_asn) {
<div class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documents/">
<ng-container i18n>Current ASN</ng-container>:
- <span class="badge bg-secondary text-light rounded-pill">{{statistics?.current_asn}}</span>
+ <span class="badge bg-secondary text-light rounded-pill">{{statistics()?.current_asn}}</span>
</div>
}
}
- @if (statistics?.document_file_type_counts?.length > 1) {
+ @if (statistics()?.document_file_type_counts?.length > 1) {
<div class="list-group-item filetypes">
<div class="d-flex justify-content-between align-items-center my-2">
<div class="progress flex-grow-1">
- @for (filetype of statistics?.document_file_type_counts; track filetype; let i = $index; let last = $last) {
+ @for (filetype of statistics()?.document_file_type_counts; track filetype; let i = $index; let last = $last) {
<div
class="progress-bar bg-primary"
role="progressbar"
@@ -69,7 +69,7 @@
</div>
</div>
<div class="d-flex flex-wrap align-items-start">
- @for (filetype of statistics?.document_file_type_counts; track filetype; let i = $index) {
+ @for (filetype of statistics()?.document_file_type_counts; track filetype; let i = $index) {
<div class="d-flex">
<div class="text-nowrap me-2" [class.cursor-pointer]="!filetype.is_other" (click)="filterByFileType(filetype)">
<span class="badge rounded-pill bg-primary d-inline-block p-0 me-1" [style.opacity]="getItemOpacity(i)"></span>
@@ -84,54 +84,54 @@
<div class="list-group border-light mt-3">
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }">
- @if (loading) {
+ @if (loading()) {
<div class="placeholder-glow list-group-item">
<span class="placeholder w-100"></span>
</div>
}
- @if (statistics?.tag_count > 0) {
+ @if (statistics()?.tag_count > 0) {
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/tags/">
<ng-container i18n>Tags</ng-container>:
- <span class="badge bg-secondary text-light rounded-pill">{{statistics?.tag_count | number}}</span>
+ <span class="badge bg-secondary text-light rounded-pill">{{statistics()?.tag_count | number}}</span>
</a>
}
</ng-container>
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }">
- @if (loading) {
+ @if (loading()) {
<div class="placeholder-glow list-group-item">
<span class="placeholder w-100"></span>
</div>
}
- @if (statistics?.correspondent_count > 0) {
+ @if (statistics()?.correspondent_count > 0) {
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/correspondents/">
<ng-container i18n>Correspondents</ng-container>:
- <span class="badge bg-secondary text-light rounded-pill">{{statistics?.correspondent_count | number}}</span>
+ <span class="badge bg-secondary text-light rounded-pill">{{statistics()?.correspondent_count | number}}</span>
</a>
}
</ng-container>
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }">
- @if (loading) {
+ @if (loading()) {
<div class="placeholder-glow list-group-item">
<span class="placeholder w-100"></span>
</div>
}
- @if (statistics?.document_type_count > 0) {
+ @if (statistics()?.document_type_count > 0) {
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documenttypes/">
<ng-container i18n>Document Types</ng-container>:
- <span class="badge bg-secondary text-light rounded-pill">{{statistics?.document_type_count | number}}</span>
+ <span class="badge bg-secondary text-light rounded-pill">{{statistics()?.document_type_count | number}}</span>
</a>
}
</ng-container>
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }">
- @if (loading) {
+ @if (loading()) {
<div class="placeholder-glow list-group-item">
<span class="placeholder w-100"></span>
</div>
}
- @if (statistics?.storage_path_count > 0) {
+ @if (statistics()?.storage_path_count > 0) {
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/storagepaths/">
<ng-container i18n>Storage Paths</ng-container>:
- <span class="badge bg-secondary text-light rounded-pill">{{statistics?.storage_path_count | number}}</span>
+ <span class="badge bg-secondary text-light rounded-pill">{{statistics()?.storage_path_count | number}}</span>
</a>
}
</ng-container>
diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts
index f5f930190..74ba2c8ab 100644
--- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts
+++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts
@@ -74,7 +74,7 @@ describe('StatisticsWidgetComponent', () => {
it('should not call statistics endpoint on reload if already loading', () => {
httpTestingController.expectOne(`${environment.apiBaseUrl}statistics/`)
- component.loading = true
+ component.loading.set(true)
component.reload()
httpTestingController.expectNone(`${environment.apiBaseUrl}statistics/`)
})
diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts
index 8b26690db..a1e984061 100644
--- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts
+++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts
@@ -1,6 +1,6 @@
import { DecimalPipe } from '@angular/common'
import { HttpClient } from '@angular/common/http'
-import { Component, inject, OnDestroy, OnInit } from '@angular/core'
+import { Component, inject, OnDestroy, OnInit, signal } from '@angular/core'
import { RouterModule } from '@angular/router'
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import * as mimeTypeNames from 'mime-names'
@@ -55,21 +55,20 @@ export class StatisticsWidgetComponent
private websocketConnectionService = inject(WebsocketStatusService)
private documentListViewService = inject(DocumentListViewService)
- loading: boolean = false
-
- statistics: Statistics = {}
+ readonly loading = signal(false)
+ readonly statistics = signal<Statistics>({})
subscription: Subscription
private unsubscribeNotifer: Subject<any> = new Subject()
reload() {
- if (this.loading) return
- this.loading = true
+ if (this.loading()) return
+ this.loading.set(true)
this.http
.get<Statistics>(`${environment.apiBaseUrl}statistics/`)
.pipe(takeUntil(this.unsubscribeNotifer), first())
.subscribe((statistics) => {
- this.loading = false
+ this.loading.set(false)
const fileTypeMax = 5
if (statistics.document_file_type_counts?.length > fileTypeMax) {
const others = statistics.document_file_type_counts.slice(fileTypeMax)
@@ -85,7 +84,7 @@ export class StatisticsWidgetComponent
),
})
}
- this.statistics = statistics
+ this.statistics.set(statistics)
})
}
@@ -101,11 +100,11 @@ export class StatisticsWidgetComponent
}
getFileTypePercent(filetype: DocumentFileType): number {
- return (filetype.mime_type_count / this.statistics?.documents_total) * 100
+ return (filetype.mime_type_count / this.statistics()?.documents_total) * 100
}
getItemOpacity(i: number): number {
- return 1 - i / this.statistics?.document_file_type_counts.length
+ return 1 - i / this.statistics()?.document_file_type_counts.length
}
ngOnInit(): void {
@@ -127,8 +126,8 @@ export class StatisticsWidgetComponent
this.documentListViewService.quickFilter([
{
rule_type: FILTER_HAS_TAGS_ANY,
- value: this.statistics.inbox_tags
- .map((tagID) => tagID.toString())
+ value: this.statistics()
+ .inbox_tags.map((tagID) => tagID.toString())
.join(','),
},
])
diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts
index c27cadbda..9506c81a8 100644
--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts
+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts
@@ -1,11 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { By } from '@angular/platform-browser'
import { RouterTestingModule } from '@angular/router/testing'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
@@ -133,7 +128,8 @@ describe('UploadFileWidgetComponent', () => {
expect(dismissSpy).toHaveBeenCalled()
})
- it('should allow dismissing completed alerts', fakeAsync(() => {
+ it('should allow dismissing completed alerts', () => {
+ jest.useFakeTimers()
mockConsumerStatuses(websocketStatusService)
fixture.detectChanges()
jest
@@ -141,10 +137,11 @@ describe('UploadFileWidgetComponent', () => {
.mockImplementation(() => SUCCESS_STATUSES)
const dismissSpy = jest.spyOn(websocketStatusService, 'dismiss')
component.dismissCompleted()
- tick(1000)
+ jest.advanceTimersByTime(1000)
fixture.detectChanges()
expect(dismissSpy).toHaveBeenCalledTimes(4)
- }))
+ jest.useRealTimers()
+ })
})
function mockConsumerStatuses(consumerStatusService) {
diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html
index 45dcdf7d8..6029e2167 100644
--- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html
+++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html
@@ -1,19 +1,20 @@
-@if (!cardless) {
- <div class="card shadow-sm bg-light fade" [class.show]="show" cdkDrag [cdkDragDisabled]="!draggable" cdkDragPreviewContainer="parent">
+@if (!cardless()) {
+ <div class="card shadow-sm bg-light fade" [class.show]="show()" cdkDrag [cdkDragDisabled]="!draggable()" cdkDragPreviewContainer="parent">
<div class="card-header">
<div class="d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
- @if (draggable) {
+ @if (draggable()) {
<div class="ms-n2 me-1" cdkDragHandle>
<i-bs name="grip-vertical"></i-bs>
</div>
}
- <h6 class="card-title mb-0">{{title}}</h6>
- @if (badge) {
- <span class="badge bg-info text-dark ms-2">{{badge}}</span>
+ <h6 class="card-title mb-0">{{title()}}</h6>
+ <ng-content select="[title-badge]"></ng-content>
+ @if (badge() !== null && badge() !== undefined) {
+ <span class="badge bg-info text-dark ms-2">{{badge()}}</span>
}
</div>
- @if (loading) {
+ @if (loading()) {
<div class="spinner-border spinner-border-sm fw-normal ms-2 me-auto" role="status"></div>
<div class="visually-hidden" i18n>Loading...</div>
}
@@ -25,7 +26,7 @@
</div>
</div>
} @else {
- <div class="fade" [class.show]="show">
+ <div class="fade" [class.show]="show()">
<ng-container [ngTemplateOutlet]="content"></ng-container>
</div>
}
diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss
index 4efdb0876..8fa4881d6 100644
--- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss
+++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss
@@ -1,3 +1,23 @@
i-bs {
cursor: move;
}
+
+.fade.show {
+ animation: pngx-entry-fade 160ms ease-out;
+}
+
+@keyframes pngx-entry-fade {
+ from {
+ opacity: 0;
+ }
+
+ to {
+ opacity: 1;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .fade.show {
+ animation: none;
+ }
+}
diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts
index e61697587..8ad7fa448 100644
--- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts
+++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts
@@ -45,21 +45,19 @@ describe('WidgetFrameComponent', () => {
})
it('should show title', () => {
- component.title = 'Foo'
+ fixture.componentRef.setInput('title', 'Foo')
fixture.detectChanges()
expect(fixture.debugElement.nativeElement.textContent).toContain('Foo')
})
it('should show loading indicator', () => {
expect(fixture.debugElement.query(By.css('.spinner-border'))).toBeNull()
- component.loading = true
+ fixture.componentRef.setInput('loading', true)
fixture.detectChanges()
expect(fixture.debugElement.query(By.css('.spinner-border'))).not.toBeNull()
})
it('should show', () => {
- expect(component.show).toBeFalsy()
- jest.advanceTimersByTime(100)
- expect(component.show).toBeTruthy()
+ expect(component.show()).toBeTruthy()
})
})
diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts
index a638cb52c..d22fc2eb4 100644
--- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts
+++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts
@@ -1,8 +1,7 @@
import { DragDropModule } from '@angular/cdk/drag-drop'
import { NgTemplateOutlet } from '@angular/common'
-import { AfterViewInit, Component, Input } from '@angular/core'
+import { AfterViewInit, Component, input, signal } from '@angular/core'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { LoadingComponentWithPermissions } from 'src/app/components/loading-component/loading.component'
@Component({
selector: 'pngx-widget-frame',
@@ -10,32 +9,20 @@ import { LoadingComponentWithPermissions } from 'src/app/components/loading-comp
styleUrls: ['./widget-frame.component.scss'],
imports: [DragDropModule, NgxBootstrapIconsModule, NgTemplateOutlet],
})
-export class WidgetFrameComponent
- extends LoadingComponentWithPermissions
- implements AfterViewInit
-{
- constructor() {
- super()
- }
+export class WidgetFrameComponent implements AfterViewInit {
+ readonly show = signal(false)
- @Input()
- title: string
+ loading = input(false)
- @Input()
- loading: boolean = false
+ title = input<string>()
- @Input()
- draggable: any
+ draggable = input<any>()
- @Input()
- cardless: boolean = false
+ cardless = input(false)
- @Input()
- badge: string
+ badge = input<string | number>(null)
ngAfterViewInit(): void {
- setTimeout(() => {
- this.show = true
- }, 100)
+ this.show.set(true)
}
}
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html
index edcda7ce2..1ff5c3d7f 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.html
+++ b/src-ui/src/app/components/document-detail/document-detail.component.html
@@ -1,10 +1,10 @@
-<pngx-page-header [(title)]="title" [id]="documentId">
+<pngx-page-header [title]="title()" [id]="documentId()">
@if (archiveContentRenderType === ContentRenderType.PDF && !useNativePdfViewer) {
- @if (previewNumPages) {
+ @if (previewNumPages()) {
<div class="input-group input-group-sm ms-2 d-none d-md-flex">
<div class="input-group-text" i18n>Page</div>
- <input class="form-control flex-grow-0 w-auto" type="number" min="1" [max]="previewNumPages" [(ngModel)]="previewCurrentPage" />
- <div class="input-group-text" i18n>of {{previewNumPages}}</div>
+ <input class="form-control flex-grow-0 w-auto" type="number" min="1" [max]="previewNumPages()" [ngModel]="previewCurrentPage()" (ngModelChange)="previewCurrentPage.set($event)" />
+ <div class="input-group-text" i18n>of {{previewNumPages()}}</div>
</div>
}
<div class="input-group input-group-sm me-md-5 d-none d-md-flex">
@@ -25,9 +25,9 @@
</button>
<pngx-document-version-dropdown
- [documentId]="documentId"
- [versions]="document?.versions ?? []"
- [selectedVersionId]="selectedVersionId"
+ [documentId]="documentId()"
+ [versions]="document()?.versions ?? []"
+ [selectedVersionId]="selectedVersionId()"
[userIsOwner]="userIsOwner"
[userCanEdit]="userCanEdit"
(versionSelected)="onVersionSelected($event)"
@@ -35,8 +35,8 @@
/>
<div class="btn-group">
- <button (click)="download()" class="btn btn-sm btn-outline-primary" [disabled]="downloading">
- @if (downloading) {
+ <button (click)="download()" class="btn btn-sm btn-outline-primary" [disabled]="downloading()">
+ @if (downloading()) {
<div class="spinner-border spinner-border-sm" role="status"></div>
} @else {
<i-bs width="1.2em" height="1.2em" name="download"></i-bs>
@@ -45,10 +45,10 @@
</button>
<div class="btn-group" ngbDropdown role="group">
- <button class="btn btn-sm btn-outline-primary dropdown-toggle" [disabled]="downloading" ngbDropdownToggle></button>
+ <button class="btn btn-sm btn-outline-primary dropdown-toggle" [disabled]="downloading()" ngbDropdownToggle></button>
<div class="dropdown-menu shadow" ngbDropdownMenu>
- @if (metadata?.has_archive_version) {
- <button ngbDropdownItem (click)="download(true)" [disabled]="downloading" i18n>Download original</button>
+ @if (metadata()?.has_archive_version) {
+ <button ngbDropdownItem (click)="download(true)" [disabled]="downloading()" i18n>Download original</button>
<div class="dropdown-divider"></div>
}
<form class="px-3 py-1">
@@ -129,9 +129,9 @@
<ng-container *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
<div class="btn-group pb-3 ms-auto">
<pngx-suggestions-dropdown *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }"
- [disabled]="!userCanEdit || suggestionsLoading"
- [loading]="suggestionsLoading"
- [suggestions]="suggestions"
+ [disabled]="!userCanEdit || suggestionsLoading()"
+ [loading]="suggestionsLoading()"
+ [suggestions]="suggestions()"
[aiEnabled]="aiEnabled"
(getSuggestions)="getSuggestions()"
(addTag)="createTag($event)"
@@ -143,9 +143,9 @@
<div class="btn-group pb-3 ms-2">
<pngx-custom-fields-dropdown
*pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.CustomField }"
- [documentId]="documentId"
+ [documentId]="documentId()"
[disabled]="!userCanEdit"
- [existingFields]="document?.custom_fields"
+ [existingFields]="document()?.custom_fields"
(created)="refreshCustomFields()"
(added)="addField($event)">
</pngx-custom-fields-dropdown>
@@ -155,33 +155,33 @@
<ng-container *ngTemplateOutlet="saveButtons"></ng-container>
</div>
- <ul ngbNav #nav="ngbNav" class="nav-underline flex-nowrap flex-md-wrap overflow-auto" (navChange)="onNavChange($event)" [(activeId)]="activeNavID">
+ <ul ngbNav #nav="ngbNav" class="nav-underline flex-nowrap flex-md-wrap overflow-auto" (navChange)="onNavChange($event)" [activeId]="activeNavID()" (activeIdChange)="activeNavID.set($event)">
<li [ngbNavItem]="DocumentDetailNavIDs.Details">
<a ngbNavLink i18n>Details</a>
<ng-template ngbNavContent>
<div>
- <pngx-input-text #inputTitle i18n-title title="Title" formControlName="title" [horizontal]="true" [suggestion]="suggestions?.title" (keyup)="titleKeyUp($event)" [error]="error?.title"></pngx-input-text>
+ <pngx-input-text #inputTitle i18n-title title="Title" formControlName="title" [horizontal]="true" [suggestion]="suggestions()?.title" (keyup)="titleKeyUp($event)" [error]="error()?.title"></pngx-input-text>
@if (!isFieldHidden(DocumentDetailFieldID.ArchiveSerialNumber)) {
- <pngx-input-number i18n-title title="Archive serial number" [error]="error?.archive_serial_number" [horizontal]="true" formControlName='archive_serial_number'></pngx-input-number>
+ <pngx-input-number i18n-title title="Archive serial number" [error]="error()?.archive_serial_number" [horizontal]="true" formControlName='archive_serial_number'></pngx-input-number>
}
- <pngx-input-date i18n-title title="Date created" formControlName="created" [suggestions]="suggestions?.dates" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event)"
- [error]="error?.created"></pngx-input-date>
+ <pngx-input-date i18n-title title="Date created" formControlName="created" [suggestions]="suggestions()?.dates" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event)"
+ [error]="error()?.created"></pngx-input-date>
@if (!isFieldHidden(DocumentDetailFieldID.Correspondent)) {
- <pngx-input-select [items]="correspondents" i18n-title title="Correspondent" formControlName="correspondent" [allowNull]="true" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.Correspondent)"
- (createNew)="createCorrespondent($event)" [hideAddButton]="createDisabled(DataType.Correspondent)" [suggestions]="suggestions?.correspondents" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }"></pngx-input-select>
+ <pngx-input-select [items]="correspondents()" i18n-title title="Correspondent" formControlName="correspondent" [allowNull]="true" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.Correspondent)"
+ (createNew)="createCorrespondent($event)" [hideAddButton]="createDisabled(DataType.Correspondent)" [suggestions]="suggestions()?.correspondents" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }"></pngx-input-select>
}
@if (!isFieldHidden(DocumentDetailFieldID.DocumentType)) {
- <pngx-input-select [items]="documentTypes" i18n-title title="Document type" formControlName="document_type" [allowNull]="true" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.DocumentType)"
- (createNew)="createDocumentType($event)" [hideAddButton]="createDisabled(DataType.DocumentType)" [suggestions]="suggestions?.document_types" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }"></pngx-input-select>
+ <pngx-input-select [items]="documentTypes()" i18n-title title="Document type" formControlName="document_type" [allowNull]="true" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.DocumentType)"
+ (createNew)="createDocumentType($event)" [hideAddButton]="createDisabled(DataType.DocumentType)" [suggestions]="suggestions()?.document_types" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }"></pngx-input-select>
}
@if (!isFieldHidden(DocumentDetailFieldID.StoragePath)) {
- <pngx-input-select [items]="storagePaths" i18n-title title="Storage path" formControlName="storage_path" [allowNull]="true" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.StoragePath)"
- (createNew)="createStoragePath($event)" [hideAddButton]="createDisabled(DataType.StoragePath)" [suggestions]="suggestions?.storage_paths" i18n-placeholder placeholder="Default" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }"></pngx-input-select>
+ <pngx-input-select [items]="storagePaths()" i18n-title title="Storage path" formControlName="storage_path" [allowNull]="true" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.StoragePath)"
+ (createNew)="createStoragePath($event)" [hideAddButton]="createDisabled(DataType.StoragePath)" [suggestions]="suggestions()?.storage_paths" i18n-placeholder placeholder="Default" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }"></pngx-input-select>
}
@if (!isFieldHidden(DocumentDetailFieldID.Tags)) {
- <pngx-input-tags #tagsInput formControlName="tags" [suggestions]="suggestions?.tags" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.Tag)" [hideAddButton]="createDisabled(DataType.Tag)" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }"></pngx-input-tags>
+ <pngx-input-tags #tagsInput formControlName="tags" [suggestions]="suggestions()?.tags" [showFilter]="true" [horizontal]="true" (filterDocuments)="filterDocuments($event, DataType.Tag)" [hideAddButton]="createDisabled(DataType.Tag)" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }"></pngx-input-tags>
}
- @for (fieldInstance of document?.custom_fields; track fieldInstance.field; let i = $index) {
+ @for (fieldInstance of document()?.custom_fields; track fieldInstance.field; let i = $index) {
<div [formGroup]="customFieldFormFields.controls[i]">
@switch (getCustomFieldFromInstance(fieldInstance)?.data_type) {
@case (CustomFieldDataType.String) {
@@ -246,7 +246,7 @@
@case (CustomFieldDataType.DocumentLink) {
<pngx-input-document-link formControlName="value"
[title]="getCustomFieldFromInstance(fieldInstance)?.name"
- [parentDocumentID]="documentId"
+ [parentDocumentID]="documentId()"
[removable]="userCanEdit"
(removed)="removeField(fieldInstance)"
[horizontal]="true"
@@ -295,58 +295,58 @@
<a ngbNavLink i18n>Metadata</a>
<ng-template ngbNavContent>
- @if (document) {
+ @if (document()) {
<table class="table table-borderless">
<tbody>
<tr>
<td i18n>Date modified</td>
- <td>{{document.modified | customDate}}</td>
+ <td>{{document().modified | customDate}}</td>
</tr>
<tr>
<td i18n>Date added</td>
- <td>{{document.added | customDate}}</td>
+ <td>{{document().added | customDate}}</td>
</tr>
<tr>
<td i18n>Media filename</td>
- <td>{{metadata?.media_filename}}</td>
+ <td>{{metadata()?.media_filename}}</td>
</tr>
<tr>
<td i18n>Original filename</td>
- <td>{{metadata?.original_filename}}</td>
+ <td>{{metadata()?.original_filename}}</td>
</tr>
<tr>
<td i18n>Original MD5 checksum</td>
- <td>{{metadata?.original_checksum}}</td>
+ <td>{{metadata()?.original_checksum}}</td>
</tr>
<tr>
<td i18n>Original file size</td>
- <td>{{metadata?.original_size | fileSize}}</td>
+ <td>{{metadata()?.original_size | fileSize}}</td>
</tr>
<tr>
<td i18n>Original mime type</td>
- <td>{{metadata?.original_mime_type}}</td>
+ <td>{{metadata()?.original_mime_type}}</td>
</tr>
- @if (metadata?.has_archive_version) {
+ @if (metadata()?.has_archive_version) {
<tr>
<td i18n>Archive MD5 checksum</td>
- <td>{{metadata?.archive_checksum}}</td>
+ <td>{{metadata()?.archive_checksum}}</td>
</tr>
}
- @if (metadata?.has_archive_version) {
+ @if (metadata()?.has_archive_version) {
<tr>
<td i18n>Archive file size</td>
- <td>{{metadata?.archive_size | fileSize}}</td>
+ <td>{{metadata()?.archive_size | fileSize}}</td>
</tr>
}
</tbody>
</table>
}
- @if (metadata?.original_metadata?.length > 0) {
- <pngx-metadata-collapse i18n-title title="Original document metadata" [metadata]="metadata.original_metadata"></pngx-metadata-collapse>
+ @if (metadata()?.original_metadata?.length > 0) {
+ <pngx-metadata-collapse i18n-title title="Original document metadata" [metadata]="metadata()?.original_metadata"></pngx-metadata-collapse>
}
- @if (metadata?.archive_metadata?.length > 0) {
- <pngx-metadata-collapse i18n-title title="Archived document metadata" [metadata]="metadata.archive_metadata"></pngx-metadata-collapse>
+ @if (metadata()?.archive_metadata?.length > 0) {
+ <pngx-metadata-collapse i18n-title title="Archived document metadata" [metadata]="metadata()?.archive_metadata"></pngx-metadata-collapse>
}
</ng-template>
@@ -365,11 +365,11 @@
@if (notesEnabled) {
<li [ngbNavItem]="DocumentDetailNavIDs.Notes">
- <a class="text-nowrap" ngbNavLink i18n>Notes @if (document?.notes.length) {
- <span class="badge text-bg-secondary ms-1">{{document.notes.length}}</span>
+ <a class="text-nowrap" ngbNavLink i18n>Notes @if (document()?.notes.length) {
+ <span class="badge text-bg-secondary ms-1">{{document().notes.length}}</span>
}</a>
<ng-template ngbNavContent>
- <pngx-document-notes [documentId]="documentId" [notes]="document?.notes" [addDisabled]="!userCanEdit" (updated)="notesUpdated($event)"></pngx-document-notes>
+ <pngx-document-notes [documentId]="documentId()" [notes]="document()?.notes" [addDisabled]="!userCanEdit" (updated)="notesUpdated($event)"></pngx-document-notes>
</ng-template>
</li>
}
@@ -379,7 +379,7 @@
<a ngbNavLink i18n>History</a>
<ng-template ngbNavContent>
<div class="mb-3">
- <pngx-document-history [documentId]="documentId"></pngx-document-history>
+ <pngx-document-history [documentId]="documentId()"></pngx-document-history>
</div>
</ng-template>
</li>
@@ -390,23 +390,23 @@
<a ngbNavLink i18n>Permissions</a>
<ng-template ngbNavContent>
<div class="mb-3">
- <pngx-permissions-form [users]="users" formControlName="permissions_form"></pngx-permissions-form>
+ <pngx-permissions-form [users]="users()" formControlName="permissions_form"></pngx-permissions-form>
</div>
</ng-template>
</li>
}
- @if (document?.duplicate_documents?.length) {
+ @if (document()?.duplicate_documents?.length) {
<li [ngbNavItem]="DocumentDetailNavIDs.Duplicates">
<a class="text-nowrap" ngbNavLink i18n>
Duplicates
- <span class="badge text-bg-secondary ms-1">{{ document.duplicate_documents.length }}</span>
+ <span class="badge text-bg-secondary ms-1">{{ document().duplicate_documents.length }}</span>
</a>
<ng-template ngbNavContent>
<div class="d-flex flex-column gap-2">
<div class="fst-italic" i18n>Duplicate documents detected:</div>
<div class="list-group">
- @for (duplicate of document.duplicate_documents; track duplicate.id) {
+ @for (duplicate of document()?.duplicate_documents; track duplicate.id) {
<a
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
[routerLink]="['/documents', duplicate.id, 'details']"
@@ -442,22 +442,21 @@
<ng-template #saveButtons>
<div class="btn-group pb-3 ms-4">
<ng-container *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
- <button type="submit" class="order-3 btn btn-sm btn-primary" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save</button>
+ <button type="submit" class="order-3 btn btn-sm btn-primary" i18n [disabled]="!userCanEdit || networkActive() || (isDirty$ | async) !== true">Save</button>
@if (hasNext()) {
- <button type="button" class="order-1 btn btn-sm btn-outline-primary" (click)="saveEditNext()" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save &amp; next</button>
- }
- @if (!hasNext()) {
- <button type="button" class="order-2 btn btn-sm btn-outline-primary" (click)="save(true)" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save &amp; close</button>
+ <button type="button" class="order-1 btn btn-sm btn-outline-primary" (click)="saveEditNext()" i18n [disabled]="!userCanEdit || networkActive() || (isDirty$ | async) !== true">Save &amp; next</button>
+ } @else {
+ <button type="button" class="order-2 btn btn-sm btn-outline-primary" (click)="save(true)" i18n [disabled]="!userCanEdit || networkActive() || (isDirty$ | async) !== true">Save &amp; close</button>
}
- <button type="button" class="order-0 btn btn-sm btn-outline-secondary" (click)="discard()" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Discard</button>
+ <button type="button" class="order-0 btn btn-sm btn-outline-secondary" (click)="discard()" i18n [disabled]="!userCanEdit || networkActive() || (isDirty$ | async) !== true">Discard</button>
</ng-container>
</div>
</ng-template>
<ng-template #previewContent>
- <div class="thumb-preview position-absolute pe-none text-center" [class.fade]="previewLoaded">
+ <div class="thumb-preview position-absolute pe-none text-center" [class.fade]="previewLoaded()">
@if (showThumbnailOverlay) {
- <img [src]="thumbUrl" class="mx-auto" [attr.width]="previewZoomScale === 'page-fit' ? 'auto' : '100%'" [attr.height]="previewZoomScale === 'page-fit' ? '100%' : 'auto'" alt="Document loading..." i18n-alt />
+ <img [src]="thumbUrl()" class="mx-auto" [attr.width]="previewZoomScale() === 'page-fit' ? 'auto' : '100%'" [attr.height]="previewZoomScale() === 'page-fit' ? '100%' : 'auto'" alt="Document loading..." i18n-alt />
}
<div class="position-absolute top-0 start-0 m-2 p-2 d-flex align-items-center justify-content-center">
<div>
@@ -466,45 +465,49 @@
</div>
</div>
</div>
- @if (document) {
+ @if (document()) {
@switch (archiveContentRenderType) {
@case (ContentRenderType.PDF) {
@if (!useNativePdfViewer) {
<div class="preview-sticky pdf-viewer-container">
<pngx-pdf-viewer
- [src]="pdfSource"
- [password]="pdfPassword"
+ [src]="pdfSource()"
+ [password]="pdfPassword()"
[renderMode]="PdfRenderMode.All"
- [(page)]="previewCurrentPage"
- [zoomScale]="previewZoomScale"
- [zoom]="previewZoomSetting"
+ [page]="previewCurrentPage()" (pageChange)="previewCurrentPage.set($event)"
+ [zoomScale]="previewZoomScale()"
+ [zoom]="previewZoomSetting()"
(loadError)="onError($event)"
(afterLoadComplete)="pdfPreviewLoaded($event)">
</pngx-pdf-viewer>
</div>
} @else {
- <object [data]="previewUrl | safeUrl" class="preview-sticky" width="100%"></object>
+ <object [data]="previewUrl() | safeUrl" class="preview-sticky" width="100%">
+ <span>Preview is unavailable.</span>
+ </object>
}
}
@case (ContentRenderType.Text) {
- <div class="preview-sticky bg-light p-3 overflow-auto whitespace-preserve" width="100%">{{previewText}}</div>
+ <div class="preview-sticky bg-light p-3 overflow-auto whitespace-preserve" width="100%">{{previewText()}}</div>
}
@case (ContentRenderType.Image) {
<div class="preview-sticky">
- <img [src]="previewUrl" width="100%" height="100%" alt="{{title}}" />
+ <img [src]="previewUrl()" width="100%" height="100%" alt="{{title()}}" />
</div>
}
@case (ContentRenderType.TIFF) {
- @if (!tiffError) {
+ @if (!tiffError()) {
<div class="preview-sticky">
- <img [src]="tiffURL" width="100%" height="100%" alt="{{title}}" />
+ <img [src]="tiffURL()" width="100%" height="100%" alt="{{title()}}" />
</div>
} @else {
- <div class="preview-sticky bg-light p-3 overflow-auto whitespace-preserve" width="100%">{{tiffError}}</div>
+ <div class="preview-sticky bg-light p-3 overflow-auto whitespace-preserve" width="100%">{{tiffError()}}</div>
}
}
@case (ContentRenderType.Other) {
- <object [data]="previewUrl | safeUrl" class="preview-sticky" width="100%"></object>
+ <object [data]="previewUrl() | safeUrl" class="preview-sticky" width="100%">
+ <span>Preview is unavailable.</span>
+ </object>
}
}
@if (requiresPassword) {
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
index c550534f9..46a9307f2 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
@@ -9,13 +9,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- discardPeriodicTasks,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { By } from '@angular/platform-browser'
import {
ActivatedRoute,
@@ -279,6 +273,7 @@ describe('DocumentDetailComponent', () => {
}).compileComponents()
router = TestBed.inject(Router)
+ jest.spyOn(router, 'navigate').mockResolvedValue(true)
activatedRoute = TestBed.inject(ActivatedRoute)
openDocumentsService = TestBed.inject(OpenDocumentsService)
documentService = TestBed.inject(DocumentService)
@@ -286,7 +281,7 @@ describe('DocumentDetailComponent', () => {
toastService = TestBed.inject(ToastService)
documentListViewService = TestBed.inject(DocumentListViewService)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 1 }
+ settingsService.currentUser.set({ id: 1 })
customFieldsService = TestBed.inject(CustomFieldsService)
deviceDetectorService = TestBed.inject(DeviceDetectorService)
fixture = TestBed.createComponent(DocumentDetailComponent)
@@ -295,6 +290,10 @@ describe('DocumentDetailComponent', () => {
component = fixture.componentInstance
})
+ afterEach(() => {
+ jest.useRealTimers()
+ })
+
function initNormally() {
jest
.spyOn(activatedRoute, 'paramMap', 'get')
@@ -325,10 +324,13 @@ describe('DocumentDetailComponent', () => {
.spyOn(openDocumentsService, 'openDocument')
.mockReturnValueOnce(of(true))
fixture.detectChanges()
- expect(component.activeNavID).toEqual(component.DocumentDetailNavIDs.Notes)
+ expect(component.activeNavID()).toEqual(
+ component.DocumentDetailNavIDs.Notes
+ )
})
- it('should switch from preview to details when pdf preview enters the DOM', fakeAsync(() => {
+ it('should switch from preview to details when pdf preview enters the DOM', () => {
+ jest.useFakeTimers()
component.nav = {
activeId: component.DocumentDetailNavIDs.Preview,
select: jest.fn(),
@@ -337,11 +339,11 @@ describe('DocumentDetailComponent', () => {
nativeElement: { offsetParent: {} },
}
- tick()
+ jest.advanceTimersByTime(0)
expect(component.nav.select).toHaveBeenCalledWith(
component.DocumentDetailNavIDs.Details
)
- }))
+ })
it('should forward title key up value to titleSubject', () => {
const subjectSpy = jest.spyOn(component.titleSubject, 'next')
@@ -375,28 +377,29 @@ describe('DocumentDetailComponent', () => {
})
})
- it('should update title after debounce', fakeAsync(() => {
+ it('should update title after debounce', () => {
+ jest.useFakeTimers()
initNormally()
component.titleInput.value = 'Foo Bar'
component.titleSubject.next('Foo Bar')
- tick(1000)
+ jest.advanceTimersByTime(1000)
expect(component.documentForm.get('title').value).toEqual('Foo Bar')
- discardPeriodicTasks()
- }))
+ })
- it('should update title before doc change if was not updated via debounce', fakeAsync(() => {
+ it('should update title before doc change if was not updated via debounce', () => {
+ jest.useFakeTimers()
initNormally()
component.titleInput.value = 'Foo Bar'
component.titleInput.inputField.nativeElement.dispatchEvent(
new Event('change')
)
- tick(1000)
+ jest.advanceTimersByTime(1000)
expect(component.documentForm.get('title').value).toEqual('Foo Bar')
- }))
+ })
it('should load non-open document via param', () => {
initNormally()
- expect(component.document).toEqual(doc)
+ expect(component.document()).toEqual(doc)
})
it('should redirect to root when opening a version document id', () => {
@@ -423,7 +426,7 @@ describe('DocumentDetailComponent', () => {
)
fixture.detectChanges()
- httpTestingController.expectOne(component.previewUrl).flush('preview')
+ httpTestingController.expectOne(component.previewUrl()).flush('preview')
expect(getRootSpy).toHaveBeenCalledWith(10)
expect(navigateSpy).toHaveBeenCalledWith(['documents', 3, 'details'], {
@@ -455,7 +458,7 @@ describe('DocumentDetailComponent', () => {
)
fixture.detectChanges()
- httpTestingController.expectOne(component.previewUrl).flush('preview')
+ httpTestingController.expectOne(component.previewUrl()).flush('preview')
expect(navigateSpy).toHaveBeenCalledWith(['404'], { replaceUrl: true })
})
@@ -501,7 +504,7 @@ describe('DocumentDetailComponent', () => {
)
fixture.detectChanges()
- httpTestingController.expectOne(component.previewUrl).flush('preview')
+ httpTestingController.expectOne(component.previewUrl()).flush('preview')
fixture.detectChanges()
const deleteButtons = fixture.debugElement.queryAll(
@@ -512,12 +515,12 @@ describe('DocumentDetailComponent', () => {
it('should fall back to details tab when duplicates tab is active but no duplicates', () => {
initNormally()
- component.activeNavID = component.DocumentDetailNavIDs.Duplicates
+ component.activeNavID.set(component.DocumentDetailNavIDs.Duplicates)
const noDupDoc = { ...doc, duplicate_documents: [] }
component.updateComponent(noDupDoc)
- expect(component.activeNavID).toEqual(
+ expect(component.activeNavID()).toEqual(
component.DocumentDetailNavIDs.Details
)
})
@@ -534,7 +537,7 @@ describe('DocumentDetailComponent', () => {
})
)
fixture.detectChanges() // calls ngOnInit
- expect(component.document).toEqual(doc)
+ expect(component.document()).toEqual(doc)
})
it('should update cached open document duplicates when reloading an open doc', () => {
@@ -578,10 +581,10 @@ describe('DocumentDetailComponent', () => {
it('should not attempt to retrieve objects if user does not have permissions', () => {
currentUserCan = false
initNormally()
- expect(component.correspondents).toBeUndefined()
- expect(component.documentTypes).toBeUndefined()
- expect(component.storagePaths).toBeUndefined()
- expect(component.users).toBeUndefined()
+ expect(component.correspondents()).toBeUndefined()
+ expect(component.documentTypes()).toBeUndefined()
+ expect(component.storagePaths()).toBeUndefined()
+ expect(component.users()).toBeUndefined()
httpTestingController.expectNone(`${environment.apiBaseUrl}documents/tags/`)
httpTestingController.expectNone(
`${environment.apiBaseUrl}documents/correspondents/`
@@ -597,9 +600,9 @@ describe('DocumentDetailComponent', () => {
it('should support creating tag, remove from suggestions', () => {
initNormally()
- component.suggestions = {
+ component.suggestions.set({
suggested_tags: ['Tag1', 'NewTag12'],
- }
+ })
let openModal: NgbModalRef
modalService.activeInstances.subscribe((modal) => (openModal = modal[0]))
const modalSpy = jest.spyOn(modalService, 'open')
@@ -613,14 +616,14 @@ describe('DocumentDetailComponent', () => {
text_color: '#000000',
})
expect(component.tagsInput.value).toContain(12)
- expect(component.suggestions.suggested_tags).not.toContain('NewTag12')
+ expect(component.suggestions().suggested_tags).not.toContain('NewTag12')
})
it('should support creating document type, remove from suggestions', () => {
initNormally()
- component.suggestions = {
+ component.suggestions.set({
suggested_document_types: ['DocumentType1', 'NewDocType2'],
- }
+ })
let openModal: NgbModalRef
modalService.activeInstances.subscribe((modal) => (openModal = modal[0]))
const modalSpy = jest.spyOn(modalService, 'open')
@@ -628,16 +631,16 @@ describe('DocumentDetailComponent', () => {
expect(modalSpy).toHaveBeenCalled()
openModal.componentInstance.succeeded.next({ id: 12, name: 'NewDocType12' })
expect(component.documentForm.get('document_type').value).toEqual(12)
- expect(component.suggestions.suggested_document_types).not.toContain(
+ expect(component.suggestions().suggested_document_types).not.toContain(
'NewDocType2'
)
})
it('should support creating correspondent, remove from suggestions', () => {
initNormally()
- component.suggestions = {
+ component.suggestions.set({
suggested_correspondents: ['Correspondent1', 'NewCorrrespondent12'],
- }
+ })
let openModal: NgbModalRef
modalService.activeInstances.subscribe((modal) => (openModal = modal[0]))
const modalSpy = jest.spyOn(modalService, 'open')
@@ -648,7 +651,7 @@ describe('DocumentDetailComponent', () => {
name: 'NewCorrrespondent12',
})
expect(component.documentForm.get('correspondent').value).toEqual(12)
- expect(component.suggestions.suggested_correspondents).not.toContain(
+ expect(component.suggestions().suggested_correspondents).not.toContain(
'NewCorrrespondent12'
)
})
@@ -669,15 +672,15 @@ describe('DocumentDetailComponent', () => {
it('should allow dischard changes', () => {
initNormally()
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
fixture.detectChanges()
jest.spyOn(documentService, 'get').mockReturnValueOnce(of(doc))
component.discard()
fixture.detectChanges()
- expect(component.title).toEqual(doc.title)
+ expect(component.title()).toEqual(doc.title)
expect(openDocumentsService.hasDirty()).toBeFalsy()
// this time with error, mostly for coverage
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
fixture.detectChanges()
const navigateSpy = jest.spyOn(router, 'navigate')
jest
@@ -694,10 +697,10 @@ describe('DocumentDetailComponent', () => {
getSpy.mockClear()
getSpy.mockReturnValueOnce(of(doc))
- component.selectedVersionId = 10
+ component.selectedVersionId.set(10)
component.discard()
- expect(getSpy).toHaveBeenCalledWith(component.documentId, 10)
+ expect(getSpy).toHaveBeenCalledWith(component.documentId(), 10)
})
it('should 404 on invalid id', () => {
@@ -724,7 +727,7 @@ describe('DocumentDetailComponent', () => {
it('should support save, close and show success toast', () => {
initNormally()
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
const closeSpy = jest.spyOn(component, 'close')
const patchSpy = jest.spyOn(documentService, 'patch')
const toastSpy = jest.spyOn(toastService, 'showInfo')
@@ -739,7 +742,7 @@ describe('DocumentDetailComponent', () => {
it('should support save without close and show success toast', () => {
initNormally()
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
const closeSpy = jest.spyOn(component, 'close')
const patchSpy = jest.spyOn(documentService, 'patch')
const toastSpy = jest.spyOn(toastService, 'showInfo')
@@ -754,7 +757,7 @@ describe('DocumentDetailComponent', () => {
it('save should target currently selected version', () => {
initNormally()
- component.selectedVersionId = 10
+ component.selectedVersionId.set(10)
const patchSpy = jest.spyOn(documentService, 'patch')
patchSpy.mockReturnValue(of(doc))
@@ -767,7 +770,7 @@ describe('DocumentDetailComponent', () => {
it('should show toast error on save if error occurs', () => {
currentUserHasObjectPermissions = true
initNormally()
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
const closeSpy = jest.spyOn(component, 'close')
const patchSpy = jest.spyOn(documentService, 'patch')
const toastSpy = jest.spyOn(toastService, 'showError')
@@ -785,7 +788,7 @@ describe('DocumentDetailComponent', () => {
it('should show error toast on save but close if user can no longer edit', () => {
currentUserHasObjectPermissions = false
initNormally()
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
const closeSpy = jest.spyOn(component, 'close')
const patchSpy = jest.spyOn(documentService, 'patch')
const toastSpy = jest.spyOn(toastService, 'showInfo')
@@ -803,7 +806,7 @@ describe('DocumentDetailComponent', () => {
it('should allow save and next', () => {
initNormally()
const nextDocId = 100
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
const patchSpy = jest.spyOn(documentService, 'patch')
patchSpy.mockReturnValue(of(doc))
const nextSpy = jest.spyOn(documentListViewService, 'getNext')
@@ -821,7 +824,7 @@ describe('DocumentDetailComponent', () => {
it('should show toast error on save & next if error occurs', () => {
currentUserHasObjectPermissions = true
initNormally()
- component.title = 'Foo Bar'
+ component.title.set('Foo Bar')
const closeSpy = jest.spyOn(component, 'close')
const patchSpy = jest.spyOn(documentService, 'patch')
const toastSpy = jest.spyOn(toastService, 'showError')
@@ -853,6 +856,7 @@ describe('DocumentDetailComponent', () => {
.find((b) => b.nativeElement.textContent === 'Save & next')
).toBeUndefined()
nextSpy.mockReturnValue(true)
+ component.networkActive.set(true)
fixture.detectChanges()
expect(
fixture.debugElement
@@ -1014,7 +1018,7 @@ describe('DocumentDetailComponent', () => {
it('should support Enter key in password field', () => {
initNormally()
- component.metadata = { has_archive_version: true }
+ component.metadata.set({ has_archive_version: true })
component.onError({ name: 'PasswordException' }) // normally dispatched by pdf viewer
fixture.detectChanges()
expect(component.password).toBeUndefined()
@@ -1029,45 +1033,44 @@ describe('DocumentDetailComponent', () => {
it('should update n pages after pdf loaded', () => {
initNormally()
component.pdfPreviewLoaded({ numPages: 1000 } as any)
- expect(component.previewNumPages).toEqual(1000)
+ expect(component.previewNumPages()).toEqual(1000)
})
- it('should include delay of 300ms after previewloaded before showing pdf', fakeAsync(() => {
+ it('should mark preview loaded after pdf loads', () => {
initNormally()
- expect(component.previewLoaded).toBeFalsy()
+ expect(component.previewLoaded()).toBeFalsy()
component.pdfPreviewLoaded({ numPages: 1000 } as any)
- expect(component.previewNumPages).toEqual(1000)
- tick(300)
- expect(component.previewLoaded).toBeTruthy()
- }))
+ expect(component.previewNumPages()).toEqual(1000)
+ expect(component.previewLoaded()).toBeTruthy()
+ })
it('should support zoom controls', () => {
initNormally()
component.setZoom(PdfZoomLevel.One) // from select
- expect(component.previewZoomSetting).toEqual('1')
+ expect(component.previewZoomSetting()).toEqual('1')
component.increaseZoom()
- expect(component.previewZoomSetting).toEqual('1.5')
+ expect(component.previewZoomSetting()).toEqual('1.5')
component.increaseZoom()
- expect(component.previewZoomSetting).toEqual('2')
+ expect(component.previewZoomSetting()).toEqual('2')
component.decreaseZoom()
- expect(component.previewZoomSetting).toEqual('1.5')
+ expect(component.previewZoomSetting()).toEqual('1.5')
component.setZoom(PdfZoomLevel.One) // from select
component.decreaseZoom()
- expect(component.previewZoomSetting).toEqual('.75')
+ expect(component.previewZoomSetting()).toEqual('.75')
component.setZoom(PdfZoomScale.PageFit) // from select
- expect(component.previewZoomScale).toEqual('page-fit')
- expect(component.previewZoomSetting).toEqual('1')
+ expect(component.previewZoomScale()).toEqual('page-fit')
+ expect(component.previewZoomSetting()).toEqual('1')
component.increaseZoom()
- expect(component.previewZoomSetting).toEqual('1.5')
- expect(component.previewZoomScale).toEqual('page-width')
+ expect(component.previewZoomSetting()).toEqual('1.5')
+ expect(component.previewZoomScale()).toEqual('page-width')
component.setZoom(PdfZoomScale.PageFit) // from select
- expect(component.previewZoomScale).toEqual('page-fit')
- expect(component.previewZoomSetting).toEqual('1')
+ expect(component.previewZoomScale()).toEqual('page-fit')
+ expect(component.previewZoomSetting()).toEqual('1')
component.decreaseZoom()
- expect(component.previewZoomSetting).toEqual('.5')
- expect(component.previewZoomScale).toEqual('page-width')
+ expect(component.previewZoomSetting()).toEqual('.5')
+ expect(component.previewZoomScale()).toEqual('page-width')
})
it('should select correct zoom setting in dropdown', () => {
@@ -1088,7 +1091,7 @@ describe('DocumentDetailComponent', () => {
initNormally()
const refreshSpy = jest.spyOn(openDocumentsService, 'refreshDocument')
component.notesUpdated(notes) // called by notes component
- expect(component.document.notes).toEqual(notes)
+ expect(component.document().notes).toEqual(notes)
expect(refreshSpy).toHaveBeenCalled()
})
@@ -1187,7 +1190,7 @@ describe('DocumentDetailComponent', () => {
it('should detect RTL languages and add css class to content textarea', () => {
initNormally()
- component.metadata = { lang: 'he' }
+ component.metadata.set({ lang: 'he' })
component.nav.select(2) // content
fixture.detectChanges()
expect(component.isRTL).toBeTruthy()
@@ -1196,7 +1199,7 @@ describe('DocumentDetailComponent', () => {
it('should display built-in pdf viewer if not disabled', () => {
initNormally()
- component.document.archived_file_name = 'file.pdf'
+ component.document().archived_file_name = 'file.pdf'
settingsService.set(SETTINGS_KEYS.USE_NATIVE_PDF_VIEWER, false)
expect(component.useNativePdfViewer).toBeFalsy()
fixture.detectChanges()
@@ -1205,7 +1208,7 @@ describe('DocumentDetailComponent', () => {
it('should display native pdf viewer if enabled', () => {
initNormally()
- component.document.archived_file_name = 'file.pdf'
+ component.document().archived_file_name = 'file.pdf'
settingsService.set(SETTINGS_KEYS.USE_NATIVE_PDF_VIEWER, true)
expect(component.useNativePdfViewer).toBeTruthy()
fixture.detectChanges()
@@ -1223,12 +1226,12 @@ describe('DocumentDetailComponent', () => {
const metadataSpy = jest.spyOn(documentService, 'getMetadata')
metadataSpy.mockReturnValue(of({ has_archive_version: true }))
initNormally()
- httpTestingController.expectOne(component.previewUrl).flush('preview')
+ httpTestingController.expectOne(component.previewUrl()).flush('preview')
expect(metadataSpy).toHaveBeenCalledWith(doc.id, null)
metadataSpy.mockClear()
- component.document.versions = [
+ component.document().versions = [
{ id: doc.id, is_root: true },
{ id: 10, is_root: false },
] as any
@@ -1267,7 +1270,7 @@ describe('DocumentDetailComponent', () => {
expect(component.customFieldFormFields).toHaveLength(initialLength)
component.addField(customFields[1])
fixture.detectChanges()
- expect(component.document.custom_fields).toHaveLength(initialLength + 1)
+ expect(component.document().custom_fields).toHaveLength(initialLength + 1)
expect(component.customFieldFormFields).toHaveLength(initialLength + 1)
expect(fixture.debugElement.nativeElement.textContent).toContain(
customFields[1].name
@@ -1287,7 +1290,7 @@ describe('DocumentDetailComponent', () => {
expect(component.customFieldFormFields).toHaveLength(initialLength)
component.removeField(doc.custom_fields[0])
fixture.detectChanges()
- expect(component.document.custom_fields).toHaveLength(initialLength - 1)
+ expect(component.document().custom_fields).toHaveLength(initialLength - 1)
expect(component.customFieldFormFields).toHaveLength(initialLength - 1)
expect(
fixture.debugElement.query(By.css('form ul')).nativeElement.textContent
@@ -1355,7 +1358,7 @@ describe('DocumentDetailComponent', () => {
it('should show custom field errors', () => {
initNormally()
- component.error = {
+ component.error.set({
custom_fields: [
{},
{},
@@ -1363,7 +1366,7 @@ describe('DocumentDetailComponent', () => {
{},
{ non_field_errors: ['Enter a valid URL.'] },
],
- }
+ })
expect(component.getCustomFieldError(2)).toEqual([
'This field may not be null.',
])
@@ -1393,7 +1396,7 @@ describe('DocumentDetailComponent', () => {
initNormally()
expect(suggestionsSpy).toHaveBeenCalled()
expect(aiSuggestionsSpy).not.toHaveBeenCalled()
- expect(component.suggestions).toEqual({
+ expect(component.suggestions()).toEqual({
tags: [42, 43],
suggested_tags: [],
suggested_document_types: [],
@@ -1421,7 +1424,7 @@ describe('DocumentDetailComponent', () => {
initNormally()
expect(suggestionsSpy).not.toHaveBeenCalled()
expect(aiSuggestionsSpy).toHaveBeenCalled()
- expect(component.suggestions).toEqual({
+ expect(component.suggestions()).toEqual({
tags: [42, 43],
suggested_tags: [],
suggested_document_types: [],
@@ -1474,7 +1477,7 @@ describe('DocumentDetailComponent', () => {
it('should react to websocket document updated notifications', () => {
initNormally()
const updateMessage = {
- document_id: component.documentId,
+ document_id: component.documentId(),
modified: '2026-02-17T00:00:00Z',
owner_id: 1,
}
@@ -1493,18 +1496,18 @@ describe('DocumentDetailComponent', () => {
const loadSpy = jest.spyOn(component as any, 'loadDocument')
const toastSpy = jest.spyOn(toastService, 'showInfo')
- component.networkActive = true
+ component.networkActive.set(true)
;(component as any).handleIncomingDocumentUpdated({
- document_id: component.documentId,
+ document_id: component.documentId(),
modified: '2026-02-17T00:00:00Z',
})
expect(loadSpy).not.toHaveBeenCalled()
- component.networkActive = false
+ component.networkActive.set(false)
;(component as any).flushPendingIncomingUpdate()
- expect(loadSpy).toHaveBeenCalledWith(component.documentId, true)
+ expect(loadSpy).toHaveBeenCalledWith(component.documentId(), true)
expect(toastSpy).toHaveBeenCalledWith(
'Document reloaded with latest changes.'
)
@@ -1515,14 +1518,14 @@ describe('DocumentDetailComponent', () => {
const loadSpy = jest.spyOn(component as any, 'loadDocument')
const toastSpy = jest.spyOn(toastService, 'showInfo')
- component.networkActive = true
+ component.networkActive.set(true)
;(component as any).lastLocalSaveModified = '2026-02-17T00:00:00+00:00'
;(component as any).handleIncomingDocumentUpdated({
- document_id: component.documentId,
+ document_id: component.documentId(),
modified: '2026-02-17T00:00:00+00:00',
})
- component.networkActive = false
+ component.networkActive.set(false)
;(component as any).flushPendingIncomingUpdate()
expect(loadSpy).not.toHaveBeenCalled()
@@ -1530,13 +1533,13 @@ describe('DocumentDetailComponent', () => {
})
it('should clear pdf source if preview URL is empty', () => {
- component.pdfSource = '/preview'
- component.pdfPassword = 'secret'
- component.previewUrl = null
+ component.pdfSource.set('/preview')
+ component.pdfPassword.set('secret')
+ component.previewUrl.set(null)
;(component as any).updatePdfSource()
- expect(component.pdfSource).toEqual(null)
- expect(component.pdfPassword).toBeUndefined()
+ expect(component.pdfSource()).toBeNull()
+ expect(component.pdfPassword()).toBeUndefined()
})
it('should close incoming update modal if one is open', () => {
@@ -1606,7 +1609,7 @@ describe('DocumentDetailComponent', () => {
const loadSpy = jest.spyOn(component as any, 'loadDocument')
;(component as any).handleIncomingDocumentUpdated({
- document_id: component.documentId + 1,
+ document_id: component.documentId() + 1,
modified: '2026-02-17T00:00:00Z',
})
@@ -1621,7 +1624,7 @@ describe('DocumentDetailComponent', () => {
.mockImplementation(() => {})
;(component as any).handleIncomingDocumentUpdated({
- document_id: component.documentId,
+ document_id: component.documentId(),
modified: '2026-02-17T00:00:00Z',
})
@@ -1629,7 +1632,7 @@ describe('DocumentDetailComponent', () => {
})
it('should reload current document and show toast when reloading remote version', () => {
- component.documentId = doc.id
+ component.documentId.set(doc.id)
const closeModalSpy = jest
.spyOn(component as any, 'closeIncomingUpdateModal')
.mockImplementation(() => {})
@@ -1649,7 +1652,7 @@ describe('DocumentDetailComponent', () => {
it('should change preview element by render type', () => {
initNormally()
- component.document.archived_file_name = 'file.pdf'
+ component.document().archived_file_name = 'file.pdf'
fixture.detectChanges()
expect(component.archiveContentRenderType).toEqual(
component.ContentRenderType.PDF
@@ -1658,8 +1661,8 @@ describe('DocumentDetailComponent', () => {
fixture.debugElement.query(By.css('pdf-viewer-container'))
).not.toBeUndefined()
- component.document.archived_file_name = undefined
- component.document.mime_type = 'text/plain'
+ component.document().archived_file_name = undefined
+ component.document().mime_type = 'text/plain'
fixture.detectChanges()
expect(component.archiveContentRenderType).toEqual(
component.ContentRenderType.Text
@@ -1668,7 +1671,7 @@ describe('DocumentDetailComponent', () => {
fixture.debugElement.query(By.css('div.preview-sticky'))
).not.toBeUndefined()
- component.document.mime_type = 'image/jpeg'
+ component.document().mime_type = 'image/jpeg'
fixture.detectChanges()
expect(component.archiveContentRenderType).toEqual(
component.ContentRenderType.Image
@@ -1676,7 +1679,7 @@ describe('DocumentDetailComponent', () => {
expect(
fixture.debugElement.query(By.css('.preview-sticky img'))
).not.toBeUndefined()
- ;((component.document.mime_type =
+ ;((component.document().mime_type =
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'),
fixture.detectChanges())
expect(component.archiveContentRenderType).toEqual(
@@ -1693,11 +1696,11 @@ describe('DocumentDetailComponent', () => {
const closeSpy = jest.spyOn(openDocumentsService, 'closeDocument')
const errorSpy = jest.spyOn(toastService, 'showError')
initNormally()
- component.selectedVersionId = 10
+ component.selectedVersionId.set(10)
component.editPdf()
expect(modal).not.toBeUndefined()
- modal.componentInstance.documentID = doc.id
- expect(modal.componentInstance.versionID).toBe(10)
+ modal.componentInstance.documentID.set(doc.id)
+ expect(modal.componentInstance.versionID()).toBe(10)
modal.componentInstance.pages = [{ page: 1, rotate: 0, splitAfter: false }]
modal.componentInstance.confirm()
let req = httpTestingController.expectOne(
@@ -1715,7 +1718,7 @@ describe('DocumentDetailComponent', () => {
expect(errorSpy).toHaveBeenCalled()
component.editPdf()
- modal.componentInstance.documentID = doc.id
+ modal.componentInstance.documentID.set(doc.id)
modal.componentInstance.pages = [{ page: 1, rotate: 0, splitAfter: true }]
modal.componentInstance.deleteOriginal = true
modal.componentInstance.confirm()
@@ -1730,7 +1733,7 @@ describe('DocumentDetailComponent', () => {
let modal: NgbModalRef
modalService.activeInstances.subscribe((m) => (modal = m[0]))
initNormally()
- component.selectedVersionId = 10
+ component.selectedVersionId.set(10)
component.password = 'secret'
component.removePassword()
const dialog =
@@ -1784,7 +1787,7 @@ describe('DocumentDetailComponent', () => {
req.error(new ErrorEvent('failed'))
expect(errorSpy).toHaveBeenCalled()
- expect(component.networkActive).toBe(false)
+ expect(component.networkActive()).toBe(false)
expect(dialog.buttonsEnabled).toBe(true)
})
@@ -1858,7 +1861,7 @@ describe('DocumentDetailComponent', () => {
it('selectVersion should update preview and handle preview failures', () => {
const previewSpy = jest.spyOn(documentService, 'getPreviewUrl')
initNormally()
- httpTestingController.expectOne(component.previewUrl).flush('preview')
+ httpTestingController.expectOne(component.previewUrl()).flush('preview')
previewSpy.mockReturnValueOnce('preview-version')
jest.spyOn(documentService, 'getThumbUrl').mockReturnValue('thumb-version')
@@ -1869,12 +1872,12 @@ describe('DocumentDetailComponent', () => {
component.selectVersion(10)
httpTestingController.expectOne('preview-version').flush('version text')
- expect(component.previewUrl).toBe('preview-version')
- expect(component.thumbUrl).toBe('thumb-version')
- expect(component.previewText).toBe('version text')
+ expect(component.previewUrl()).toBe('preview-version')
+ expect(component.thumbUrl()).toBe('thumb-version')
+ expect(component.previewText()).toBe('version text')
expect(component.documentForm.get('content').value).toBe('version-content')
- expect(component.pdfSource).toBe('preview-version')
- expect(component.pdfPassword).toBeUndefined()
+ expect(component.pdfSource()).toBe('preview-version')
+ expect(component.pdfPassword()).toBeUndefined()
previewSpy.mockReturnValueOnce('preview-error')
component.selectVersion(11)
@@ -1882,12 +1885,14 @@ describe('DocumentDetailComponent', () => {
.expectOne('preview-error')
.error(new ErrorEvent('fail'))
- expect(component.previewText).toContain('An error occurred loading content')
+ expect(component.previewText()).toContain(
+ 'An error occurred loading content'
+ )
})
it('selectVersion should show toast if version content retrieval fails', () => {
initNormally()
- httpTestingController.expectOne(component.previewUrl).flush('preview')
+ httpTestingController.expectOne(component.previewUrl()).flush('preview')
jest.spyOn(documentService, 'getPreviewUrl').mockReturnValue('preview-ok')
jest.spyOn(documentService, 'getThumbUrl').mockReturnValue('thumb-ok')
@@ -1920,8 +1925,8 @@ describe('DocumentDetailComponent', () => {
})
it('onVersionsUpdated should sync open document versions and save', () => {
- component.documentId = doc.id
- component.document = { ...doc, versions: [] } as Document
+ component.documentId.set(doc.id)
+ component.document.set({ ...doc, versions: [] } as Document)
const updatedVersions = [
{ id: doc.id, is_root: true },
{ id: 10, is_root: false },
@@ -1932,7 +1937,7 @@ describe('DocumentDetailComponent', () => {
component.onVersionsUpdated(updatedVersions)
- expect(component.document.versions).toEqual(updatedVersions)
+ expect(component.document().versions).toEqual(updatedVersions)
expect(openDoc.versions).toEqual(updatedVersions)
expect(saveSpy).toHaveBeenCalled()
})
@@ -1967,7 +1972,7 @@ describe('DocumentDetailComponent', () => {
DocumentDetailComponent.prototype as any,
'tryRenderTiff'
)
- const doc = Object.assign({}, component.document)
+ const doc = Object.assign({}, component.document())
doc.archived_file_name = null
doc.mime_type = 'image/tiff'
jest
@@ -1986,21 +1991,21 @@ describe('DocumentDetailComponent', () => {
it('should try to render tiff and show error if failed', () => {
initNormally()
// just the text request
- httpTestingController.expectOne(component.previewUrl)
+ httpTestingController.expectOne(component.previewUrl())
// invalid tiff
component['tryRenderTiff']()
httpTestingController
- .expectOne(component.previewUrl)
+ .expectOne(component.previewUrl())
.flush(new ArrayBuffer(100)) // arraybuffer
- expect(component.tiffError).not.toBeUndefined()
+ expect(component.tiffError()).not.toBeUndefined()
// http error
component['tryRenderTiff']()
httpTestingController
- .expectOne(component.previewUrl)
+ .expectOne(component.previewUrl())
.error(new ErrorEvent('failed'))
- expect(component.tiffError).not.toBeUndefined()
+ expect(component.tiffError()).not.toBeUndefined()
})
it('should support download using share sheet on mobile, direct download otherwise', () => {
@@ -2039,7 +2044,7 @@ describe('DocumentDetailComponent', () => {
it('should include version in download and print only for non-latest selected version', () => {
initNormally()
- component.document.versions = [
+ component.document().versions = [
{ id: doc.id, is_root: true },
{ id: 10, is_root: false },
] as any
@@ -2051,7 +2056,7 @@ describe('DocumentDetailComponent', () => {
.mockReturnValueOnce('download-non-latest')
.mockReturnValueOnce('print-non-latest')
- component.selectedVersionId = 10
+ component.selectedVersionId.set(10)
component.download()
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(
1,
@@ -2070,7 +2075,7 @@ describe('DocumentDetailComponent', () => {
.expectOne('print-latest')
.error(new ProgressEvent('failed'))
- component.selectedVersionId = doc.id
+ component.selectedVersionId.set(doc.id)
component.download()
expect(getDownloadUrlSpy).toHaveBeenNthCalledWith(
3,
@@ -2092,7 +2097,7 @@ describe('DocumentDetailComponent', () => {
it('should omit version in download and print when no version is selected', () => {
initNormally()
- component.document.versions = [] as any
+ component.document().versions = [] as any
;(component as any).selectedVersionId = undefined
const getDownloadUrlSpy = jest
@@ -2129,7 +2134,7 @@ describe('DocumentDetailComponent', () => {
})
const downloadUrl = 'http://example.com/download'
- component.documentId = 123
+ component.documentId.set(123)
jest.spyOn(documentService, 'getDownloadUrl').mockReturnValue(downloadUrl)
const createSpy = jest.spyOn(document, 'createElement')
@@ -2164,19 +2169,22 @@ describe('DocumentDetailComponent', () => {
it('should set previewText', () => {
initNormally()
const previewText = 'Hello world, this is a test'
- httpTestingController.expectOne(component.previewUrl).flush(previewText)
- expect(component.previewText).toEqual(previewText)
+ httpTestingController.expectOne(component.previewUrl()).flush(previewText)
+ expect(component.previewText()).toEqual(previewText)
})
it('should set previewText to error message if preview fails', () => {
initNormally()
httpTestingController
- .expectOne(component.previewUrl)
+ .expectOne(component.previewUrl())
.flush('fail', { status: 500, statusText: 'Server Error' })
- expect(component.previewText).toContain('An error occurred loading content')
+ expect(component.previewText()).toContain(
+ 'An error occurred loading content'
+ )
})
- it('should print document successfully', fakeAsync(() => {
+ it('should print document successfully', () => {
+ jest.useFakeTimers()
initNormally()
const appendChildSpy = jest
@@ -2217,8 +2225,6 @@ describe('DocumentDetailComponent', () => {
)
req.flush(blob)
- tick()
-
expect(createElementSpy).toHaveBeenCalledWith('iframe')
expect(appendChildSpy).toHaveBeenCalledWith(mockIframe)
expect(createObjectURLSpy).toHaveBeenCalledWith(blob)
@@ -2235,7 +2241,7 @@ describe('DocumentDetailComponent', () => {
if (mockIframe.onload) {
mockIframe.onload({} as any)
}
- tick()
+ jest.advanceTimersByTime(0)
expect(mockContentWindow.focus).toHaveBeenCalled()
expect(mockContentWindow.print).toHaveBeenCalled()
@@ -2248,8 +2254,6 @@ describe('DocumentDetailComponent', () => {
mockContentWindow.onafterprint(new Event('afterprint'))
}
- tick(500)
-
expect(removeChildSpy).toHaveBeenCalledWith(mockIframe)
expect(revokeObjectURLSpy).toHaveBeenCalledWith('blob:mock-url')
@@ -2258,7 +2262,7 @@ describe('DocumentDetailComponent', () => {
removeChildSpy.mockRestore()
createObjectURLSpy.mockRestore()
revokeObjectURLSpy.mockRestore()
- }))
+ })
it('should show error toast if print document fails', () => {
initNormally()
@@ -2295,76 +2299,71 @@ describe('DocumentDetailComponent', () => {
]
iframePrintErrorCases.forEach(({ description, thrownError, expectToast }) => {
- it(
- description,
- fakeAsync(() => {
- initNormally()
-
- const appendChildSpy = jest
- .spyOn(document.body, 'appendChild')
- .mockImplementation((node: Node) => node)
- const removeChildSpy = jest
- .spyOn(document.body, 'removeChild')
- .mockImplementation((node: Node) => node)
- const createObjectURLSpy = jest
- .spyOn(URL, 'createObjectURL')
- .mockReturnValue('blob:mock-url')
- const revokeObjectURLSpy = jest
- .spyOn(URL, 'revokeObjectURL')
- .mockImplementation(() => {})
-
- const toastSpy = jest.spyOn(toastService, 'showError')
-
- const mockContentWindow = {
- focus: jest.fn().mockImplementation(() => {
- throw thrownError
- }),
- print: jest.fn(),
- onafterprint: null,
- }
-
- const mockIframe: any = {
- style: {},
- src: '',
- onload: null,
- contentWindow: mockContentWindow,
- }
-
- const createElementSpy = jest
- .spyOn(document, 'createElement')
- .mockReturnValue(mockIframe as any)
-
- const blob = new Blob(['test'], { type: 'application/pdf' })
- component.printDocument()
-
- const req = httpTestingController.expectOne(
- `${environment.apiBaseUrl}documents/${doc.id}/download/`
- )
- req.flush(blob)
-
- tick()
-
- if (mockIframe.onload) {
- mockIframe.onload(new Event('load'))
- }
-
- tick()
- tick(200)
-
- if (expectToast) {
- expect(toastSpy).toHaveBeenCalled()
- } else {
- expect(toastSpy).not.toHaveBeenCalled()
- }
- expect(removeChildSpy).toHaveBeenCalledWith(mockIframe)
- expect(revokeObjectURLSpy).toHaveBeenCalledWith('blob:mock-url')
-
- createElementSpy.mockRestore()
- appendChildSpy.mockRestore()
- removeChildSpy.mockRestore()
- createObjectURLSpy.mockRestore()
- revokeObjectURLSpy.mockRestore()
- })
- )
+ it(description, () => {
+ jest.useFakeTimers()
+ initNormally()
+
+ const appendChildSpy = jest
+ .spyOn(document.body, 'appendChild')
+ .mockImplementation((node: Node) => node)
+ const removeChildSpy = jest
+ .spyOn(document.body, 'removeChild')
+ .mockImplementation((node: Node) => node)
+ const createObjectURLSpy = jest
+ .spyOn(URL, 'createObjectURL')
+ .mockReturnValue('blob:mock-url')
+ const revokeObjectURLSpy = jest
+ .spyOn(URL, 'revokeObjectURL')
+ .mockImplementation(() => {})
+
+ const toastSpy = jest.spyOn(toastService, 'showError')
+
+ const mockContentWindow = {
+ focus: jest.fn().mockImplementation(() => {
+ throw thrownError
+ }),
+ print: jest.fn(),
+ onafterprint: null,
+ }
+
+ const mockIframe: any = {
+ style: {},
+ src: '',
+ onload: null,
+ contentWindow: mockContentWindow,
+ }
+
+ const createElementSpy = jest
+ .spyOn(document, 'createElement')
+ .mockReturnValue(mockIframe as any)
+
+ const blob = new Blob(['test'], { type: 'application/pdf' })
+ component.printDocument()
+
+ const req = httpTestingController.expectOne(
+ `${environment.apiBaseUrl}documents/${doc.id}/download/`
+ )
+ req.flush(blob)
+
+ if (mockIframe.onload) {
+ mockIframe.onload(new Event('load'))
+ }
+
+ jest.advanceTimersByTime(200)
+
+ if (expectToast) {
+ expect(toastSpy).toHaveBeenCalled()
+ } else {
+ expect(toastSpy).not.toHaveBeenCalled()
+ }
+ expect(removeChildSpy).toHaveBeenCalledWith(mockIframe)
+ expect(revokeObjectURLSpy).toHaveBeenCalledWith('blob:mock-url')
+
+ createElementSpy.mockRestore()
+ appendChildSpy.mockRestore()
+ removeChildSpy.mockRestore()
+ createObjectURLSpy.mockRestore()
+ revokeObjectURLSpy.mockRestore()
+ })
})
})
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index a0fee743b..f2cc502c0 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -1,6 +1,13 @@
import { AsyncPipe, NgTemplateOutlet } from '@angular/common'
import { HttpClient, HttpResponse } from '@angular/common/http'
-import { Component, inject, OnDestroy, OnInit, ViewChild } from '@angular/core'
+import {
+ Component,
+ inject,
+ OnDestroy,
+ OnInit,
+ signal,
+ ViewChild,
+} from '@angular/core'
import {
FormArray,
FormControl,
@@ -227,34 +234,34 @@ export class DocumentDetailComponent
expandOriginalMetadata = false
expandArchivedMetadata = false
- error: any
+ readonly error = signal<any>(undefined)
- networkActive = false
+ readonly networkActive = signal(false)
- documentId: number
- document: Document
- metadata: DocumentMetadata
- suggestions: DocumentSuggestions
- suggestionsLoading: boolean = false
- users: User[]
+ readonly documentId = signal<number>(undefined)
+ readonly document = signal<Document>(undefined)
+ readonly metadata = signal<DocumentMetadata>(undefined)
+ readonly suggestions = signal<DocumentSuggestions>(undefined)
+ readonly suggestionsLoading = signal(false)
+ readonly users = signal<User[]>(undefined)
- title: string
+ readonly title = signal<string>(undefined)
titleSubject: Subject<string> = new Subject()
- previewUrl: string
- pdfSource?: string
- pdfPassword?: string
- thumbUrl: string
- previewText: string
- previewLoaded: boolean = false
- tiffURL: string
- tiffError: string
+ readonly previewUrl = signal<string>(undefined)
+ readonly pdfSource = signal<string>(undefined)
+ readonly pdfPassword = signal<string>(undefined)
+ readonly thumbUrl = signal<string>(undefined)
+ readonly previewText = signal<string>(undefined)
+ readonly previewLoaded = signal(false)
+ readonly tiffURL = signal<string>(undefined)
+ readonly tiffError = signal<string>(undefined)
// Versioning
- selectedVersionId: number
+ readonly selectedVersionId = signal<number>(undefined)
- correspondents: Correspondent[]
- documentTypes: DocumentType[]
- storagePaths: StoragePath[]
+ readonly correspondents = signal<Correspondent[]>(undefined)
+ readonly documentTypes = signal<DocumentType[]>(undefined)
+ readonly storagePaths = signal<StoragePath[]>(undefined)
documentForm: FormGroup = new FormGroup({
title: new FormControl(''),
@@ -269,10 +276,10 @@ export class DocumentDetailComponent
custom_fields: new FormArray([]),
})
- previewCurrentPage: number = 1
- previewNumPages: number
- previewZoomSetting: PdfZoomLevel = PdfZoomLevel.One
- previewZoomScale: PdfZoomScale = PdfZoomScale.PageWidth
+ readonly previewCurrentPage = signal(1)
+ readonly previewNumPages = signal<number>(undefined)
+ readonly previewZoomSetting = signal<PdfZoomLevel>(PdfZoomLevel.One)
+ readonly previewZoomScale = signal<PdfZoomScale>(PdfZoomScale.PageWidth)
store: BehaviorSubject<any>
isDirty$: Observable<boolean>
@@ -287,9 +294,9 @@ export class DocumentDetailComponent
ogDate: Date
- customFields: CustomField[]
+ readonly customFields = signal<CustomField[]>(undefined)
- public downloading: boolean = false
+ readonly downloading = signal(false)
public useFormattedFilename: boolean = false
public readonly CustomFieldDataType = CustomFieldDataType
@@ -314,13 +321,14 @@ export class DocumentDetailComponent
}
DocumentDetailNavIDs = DocumentDetailNavIDs
- activeNavID: number
+ readonly activeNavID = signal<number>(undefined)
titleKeyUp(event) {
this.titleSubject.next(event.target?.value)
}
get useNativePdfViewer(): boolean {
+ this.settings.trackChanges()
return this.settings.get(SETTINGS_KEYS.USE_NATIVE_PDF_VIEWER)
}
@@ -329,30 +337,36 @@ export class DocumentDetailComponent
}
get aiEnabled(): boolean {
+ this.settings.trackChanges()
return this.settings.get(SETTINGS_KEYS.AI_ENABLED)
}
get archiveContentRenderType(): ContentRenderType {
+ this.settings.trackChanges()
const hasArchiveVersion =
- this.metadata?.has_archive_version ?? !!this.document?.archived_file_name
+ this.metadata()?.has_archive_version ??
+ !!this.document()?.archived_file_name
return hasArchiveVersion
? this.getRenderType('application/pdf')
: this.getRenderType(
- this.metadata?.original_mime_type || this.document?.mime_type
+ this.metadata()?.original_mime_type || this.document()?.mime_type
)
}
get originalContentRenderType(): ContentRenderType {
+ this.settings.trackChanges()
return this.getRenderType(
- this.metadata?.original_mime_type || this.document?.mime_type
+ this.metadata()?.original_mime_type || this.document()?.mime_type
)
}
get showThumbnailOverlay(): boolean {
+ this.settings.trackChanges()
return this.settings.get(SETTINGS_KEYS.DOCUMENT_EDITING_OVERLAY_THUMBNAIL)
}
isFieldHidden(fieldId: DocumentDetailFieldID): boolean {
+ this.settings.trackChanges()
return this.settings
.get(SETTINGS_KEYS.DOCUMENT_DETAILS_HIDDEN_FIELDS)
.includes(fieldId)
@@ -375,14 +389,14 @@ export class DocumentDetailComponent
}
private updatePdfSource() {
- this.pdfSource = this.previewUrl
- this.pdfPassword = this.password
+ this.pdfSource.set(this.previewUrl())
+ this.pdfPassword.set(this.password)
}
private loadMetadataForSelectedVersion() {
const selectedVersionId = this.getSelectedNonLatestVersionId()
this.documentsService
- .getMetadata(this.documentId, selectedVersionId)
+ .getMetadata(this.documentId(), selectedVersionId)
.pipe(
first(),
takeUntil(this.unsubscribeNotifier),
@@ -390,9 +404,9 @@ export class DocumentDetailComponent
)
.subscribe({
next: (result) => {
- this.metadata = result
- this.tiffURL = null
- this.tiffError = null
+ this.metadata.set(result)
+ this.tiffURL.set(null)
+ this.tiffError.set(null)
if (this.archiveContentRenderType === ContentRenderType.TIFF) {
this.tryRenderTiff()
}
@@ -400,11 +414,11 @@ export class DocumentDetailComponent
this.archiveContentRenderType !== ContentRenderType.PDF ||
this.useNativePdfViewer
) {
- this.previewLoaded = true
+ this.previewLoaded.set(true)
}
},
error: (error) => {
- this.metadata = {} // allow display to fallback to <object> tag
+ this.metadata.set({}) // allow display to fallback to <object> tag
this.toastService.showError(
$localize`Error retrieving metadata`,
error
@@ -414,9 +428,9 @@ export class DocumentDetailComponent
}
get isRTL() {
- if (!this.metadata || !this.metadata.lang) return false
+ if (!this.metadata()?.lang) return false
else {
- return ['ar', 'he', 'fe'].includes(this.metadata.lang)
+ return ['ar', 'he', 'fe'].includes(this.metadata().lang)
}
}
@@ -491,27 +505,31 @@ export class DocumentDetailComponent
let redirectedToRoot = false
this.closeIncomingUpdateModal()
this.pendingIncomingUpdate = null
- this.selectedVersionId = documentId
+ this.selectedVersionId.set(documentId)
this.lastLocalSaveModified = null
- this.previewUrl = this.documentsService.getPreviewUrl(
- this.selectedVersionId
+ this.previewUrl.set(
+ this.documentsService.getPreviewUrl(this.selectedVersionId())
)
this.updatePdfSource()
this.http
- .get(this.previewUrl, { responseType: 'text' })
+ .get(this.previewUrl(), { responseType: 'text' })
.pipe(
first(),
takeUntil(this.unsubscribeNotifier),
takeUntil(this.docChangeNotifier)
)
.subscribe({
- next: (res) => (this.previewText = res.toString()),
+ next: (res) => this.previewText.set(res.toString()),
error: (err) =>
- (this.previewText = $localize`An error occurred loading content: ${
- err.message ?? err.toString()
- }`),
+ this.previewText.set(
+ $localize`An error occurred loading content: ${
+ err.message ?? err.toString()
+ }`
+ ),
})
- this.thumbUrl = this.documentsService.getThumbUrl(this.selectedVersionId)
+ this.thumbUrl.set(
+ this.documentsService.getThumbUrl(this.selectedVersionId())
+ )
this.documentsService
.get(documentId)
.pipe(
@@ -550,10 +568,10 @@ export class DocumentDetailComponent
this.router.navigate(['404'], { replaceUrl: true })
return
}
- this.documentId = doc.id
- this.suggestions = null
+ this.documentId.set(doc.id)
+ this.suggestions.set(null)
const openDocument = this.openDocumentService.getOpenDocument(
- this.documentId
+ this.documentId()
)
// update duplicate documents if present
if (openDocument && doc?.duplicate_documents) {
@@ -600,7 +618,7 @@ export class DocumentDetailComponent
)
.subscribe((titleValue) => {
if (titleValue !== this.titleInput.value) return
- this.title = titleValue
+ this.title.set(titleValue)
this.documentForm.patchValue({ title: titleValue })
this.documentForm.get('title').markAsDirty()
})
@@ -651,7 +669,7 @@ export class DocumentDetailComponent
}
private flushPendingIncomingUpdate() {
- if (!this.pendingIncomingUpdate || this.networkActive) return
+ if (!this.pendingIncomingUpdate || this.networkActive()) return
const pendingUpdate = this.pendingIncomingUpdate
this.pendingIncomingUpdate = null
this.handleIncomingDocumentUpdated(pendingUpdate)
@@ -659,12 +677,12 @@ export class DocumentDetailComponent
private handleIncomingDocumentUpdated(data: IncomingDocumentUpdate): void {
if (
- !this.documentId ||
- !this.document ||
- data.document_id !== this.documentId
+ !this.documentId() ||
+ !this.document() ||
+ data.document_id !== this.documentId()
)
return
- if (this.networkActive) {
+ if (this.networkActive()) {
this.pendingIncomingUpdate = data
return
}
@@ -681,11 +699,11 @@ export class DocumentDetailComponent
}
this.lastLocalSaveModified = null
- if (this.openDocumentService.isDirty(this.document)) {
+ if (this.openDocumentService.isDirty(this.document())) {
this.showIncomingUpdateModal(data.modified)
} else {
- this.docChangeNotifier.next(this.documentId)
- this.loadDocument(this.documentId, true)
+ this.docChangeNotifier.next(this.documentId())
+ this.loadDocument(this.documentId(), true)
this.toastService.showInfo(
$localize`Document reloaded with latest changes.`
)
@@ -693,11 +711,11 @@ export class DocumentDetailComponent
}
private reloadRemoteVersion() {
- if (!this.documentId) return
+ if (!this.documentId()) return
this.closeIncomingUpdateModal()
- this.docChangeNotifier.next(this.documentId)
- this.loadDocument(this.documentId, true)
+ this.docChangeNotifier.next(this.documentId())
+ this.loadDocument(this.documentId(), true)
this.toastService.showInfo($localize`Document reloaded.`)
}
@@ -708,8 +726,8 @@ export class DocumentDetailComponent
this.documentForm.valueChanges
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((values) => {
- this.error = null
- Object.assign(this.document, this.mapFormToDoc(values))
+ this.error.set(null)
+ Object.assign(this.document(), this.mapFormToDoc(values))
})
if (
@@ -721,7 +739,7 @@ export class DocumentDetailComponent
this.correspondentService
.listAll()
.pipe(first(), takeUntil(this.unsubscribeNotifier))
- .subscribe((result) => (this.correspondents = result.results))
+ .subscribe((result) => this.correspondents.set(result.results))
}
if (
this.permissionsService.currentUserCan(
@@ -732,7 +750,7 @@ export class DocumentDetailComponent
this.documentTypeService
.listAll()
.pipe(first(), takeUntil(this.unsubscribeNotifier))
- .subscribe((result) => (this.documentTypes = result.results))
+ .subscribe((result) => this.documentTypes.set(result.results))
}
if (
this.permissionsService.currentUserCan(
@@ -743,7 +761,7 @@ export class DocumentDetailComponent
this.storagePathService
.listAll()
.pipe(first(), takeUntil(this.unsubscribeNotifier))
- .subscribe((result) => (this.storagePaths = result.results))
+ .subscribe((result) => this.storagePaths.set(result.results))
}
if (
this.permissionsService.currentUserCan(
@@ -754,7 +772,7 @@ export class DocumentDetailComponent
this.userService
.listAll()
.pipe(first(), takeUntil(this.unsubscribeNotifier))
- .subscribe((result) => (this.users = result.results))
+ .subscribe((result) => this.users.set(result.results))
}
this.getCustomFields()
@@ -768,7 +786,7 @@ export class DocumentDetailComponent
.pipe(
filter(
(paramMap) =>
- +paramMap.get('id') !== this.documentId &&
+ +paramMap.get('id') !== this.documentId() &&
paramMap.get('section')?.length > 0
),
takeUntil(this.unsubscribeNotifier)
@@ -788,7 +806,7 @@ export class DocumentDetailComponent
(navID) => navID.toLowerCase() == section
)
if (navIDKey) {
- this.activeNavID = DocumentDetailNavIDs[navIDKey]
+ this.activeNavID.set(DocumentDetailNavIDs[navIDKey])
}
} else if (paramMap.get('id')) {
this.router.navigate(['documents', +paramMap.get('id'), 'details'], {
@@ -828,7 +846,7 @@ export class DocumentDetailComponent
.addShortcut({ keys: 'control.s', description: $localize`Save document` })
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
- if (this.openDocumentService.isDirty(this.document)) this.save()
+ if (this.openDocumentService.isDirty(this.document())) this.save()
})
this.hotKeyService
@@ -838,7 +856,7 @@ export class DocumentDetailComponent
})
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
- if (this.openDocumentService.isDirty(this.document)) {
+ if (this.openDocumentService.isDirty(this.document())) {
if (this.hasNext()) this.saveEditNext()
else this.save(true)
}
@@ -857,19 +875,21 @@ export class DocumentDetailComponent
if (foundNavIDkey)
this.router.navigate([
'documents',
- this.documentId,
+ this.documentId(),
foundNavIDkey.toLowerCase(),
])
}
updateComponent(doc: Document) {
- this.document = doc
+ this.document.set(doc)
// Default selected version is the newest version
const versions = doc.versions ?? []
- this.selectedVersionId = versions.length
- ? Math.max(...versions.map((version) => version.id))
- : doc.id
- this.previewLoaded = false
+ this.selectedVersionId.set(
+ versions.length
+ ? Math.max(...versions.map((version) => version.id))
+ : doc.id
+ )
+ this.previewLoaded.set(false)
this.requiresPassword = false
this.updateFormForCustomFields()
this.loadMetadataForSelectedVersion()
@@ -890,34 +910,38 @@ export class DocumentDetailComponent
}
})
}
- this.title = this.documentTitlePipe.transform(doc.title)
+ this.title.set(this.documentTitlePipe.transform(doc.title))
this.prepareForm(doc)
if (
- this.activeNavID === DocumentDetailNavIDs.Duplicates &&
+ this.activeNavID() === DocumentDetailNavIDs.Duplicates &&
!doc?.duplicate_documents?.length
) {
- this.activeNavID = DocumentDetailNavIDs.Details
+ this.activeNavID.set(DocumentDetailNavIDs.Details)
}
}
// Update file preview and download target to a specific version (by document id)
selectVersion(versionId: number) {
- this.selectedVersionId = versionId
- this.previewLoaded = false
- this.previewUrl = this.documentsService.getPreviewUrl(
- this.documentId,
- false,
- this.selectedVersionId
+ this.selectedVersionId.set(versionId)
+ this.previewLoaded.set(false)
+ this.previewUrl.set(
+ this.documentsService.getPreviewUrl(
+ this.documentId(),
+ false,
+ this.selectedVersionId()
+ )
)
this.updatePdfSource()
- this.thumbUrl = this.documentsService.getThumbUrl(
- this.documentId,
- this.selectedVersionId
+ this.thumbUrl.set(
+ this.documentsService.getThumbUrl(
+ this.documentId(),
+ this.selectedVersionId()
+ )
)
this.loadMetadataForSelectedVersion()
this.documentsService
- .get(this.documentId, this.selectedVersionId, 'content')
+ .get(this.documentId(), this.selectedVersionId(), 'content')
.pipe(
first(),
takeUntil(this.unsubscribeNotifier),
@@ -926,7 +950,7 @@ export class DocumentDetailComponent
.subscribe({
next: (doc) => {
const content = doc?.content ?? ''
- this.document.content = content
+ this.document().content = content
this.documentForm.patchValue(
{
content,
@@ -945,18 +969,20 @@ export class DocumentDetailComponent
})
// For text previews, refresh content
this.http
- .get(this.previewUrl, { responseType: 'text' })
+ .get(this.previewUrl(), { responseType: 'text' })
.pipe(
first(),
takeUntil(this.unsubscribeNotifier),
takeUntil(this.docChangeNotifier)
)
.subscribe({
- next: (res) => (this.previewText = res.toString()),
+ next: (res) => this.previewText.set(res.toString()),
error: (err) =>
- (this.previewText = $localize`An error occurred loading content: ${
- err.message ?? err.toString()
- }`),
+ this.previewText.set(
+ $localize`An error occurred loading content: ${
+ err.message ?? err.toString()
+ }`
+ ),
})
}
@@ -965,8 +991,8 @@ export class DocumentDetailComponent
}
onVersionsUpdated(versions: DocumentVersionInfo[]) {
- this.document.versions = versions
- const openDoc = this.openDocumentService.getOpenDocument(this.documentId)
+ this.document().versions = versions
+ const openDoc = this.openDocumentService.getOpenDocument(this.documentId())
if (openDoc) {
openDoc.versions = versions
this.openDocumentService.save()
@@ -978,10 +1004,10 @@ export class DocumentDetailComponent
}
getSuggestions() {
- this.suggestionsLoading = true
+ this.suggestionsLoading.set(true)
const suggestionsObservable = this.aiEnabled
- ? this.documentsService.getAiSuggestions(this.documentId)
- : this.documentsService.getSuggestions(this.documentId)
+ ? this.documentsService.getAiSuggestions(this.documentId())
+ : this.documentsService.getSuggestions(this.documentId())
suggestionsObservable
.pipe(
first(),
@@ -990,12 +1016,12 @@ export class DocumentDetailComponent
)
.subscribe({
next: (result) => {
- this.suggestions = result
- this.suggestionsLoading = false
+ this.suggestions.set(result)
+ this.suggestionsLoading.set(false)
},
error: (error) => {
- this.suggestions = null
- this.suggestionsLoading = false
+ this.suggestions.set(null)
+ this.suggestionsLoading.set(false)
this.toastService.showError(
$localize`Error retrieving suggestions.`,
error
@@ -1008,19 +1034,19 @@ export class DocumentDetailComponent
var modal = this.modalService.open(TagEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
if (newName) modal.componentInstance.object = { name: newName }
modal.componentInstance.succeeded
.pipe(
tap((newTag: Tag) => {
// remove from suggestions if present
- if (this.suggestions) {
- this.suggestions = {
- ...this.suggestions,
- suggested_tags: this.suggestions.suggested_tags.filter(
+ if (this.suggestions()) {
+ this.suggestions.set({
+ ...this.suggestions(),
+ suggested_tags: this.suggestions().suggested_tags.filter(
(tag) => tag !== newTag.name
),
- }
+ })
}
}),
switchMap((newTag: Tag) => {
@@ -1040,7 +1066,7 @@ export class DocumentDetailComponent
var modal = this.modalService.open(DocumentTypeEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
if (newName) modal.componentInstance.object = { name: newName }
modal.componentInstance.succeeded
.pipe(
@@ -1052,12 +1078,12 @@ export class DocumentDetailComponent
)
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(({ newDocumentType, documentTypes }) => {
- this.documentTypes = documentTypes.results
+ this.documentTypes.set(documentTypes.results)
this.documentForm.get('document_type').setValue(newDocumentType.id)
this.documentForm.get('document_type').markAsDirty()
- if (this.suggestions) {
- this.suggestions.suggested_document_types =
- this.suggestions.suggested_document_types.filter(
+ if (this.suggestions()) {
+ this.suggestions().suggested_document_types =
+ this.suggestions().suggested_document_types.filter(
(dt) => dt !== newName
)
}
@@ -1068,7 +1094,7 @@ export class DocumentDetailComponent
var modal = this.modalService.open(CorrespondentEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
if (newName) modal.componentInstance.object = { name: newName }
modal.componentInstance.succeeded
.pipe(
@@ -1082,12 +1108,12 @@ export class DocumentDetailComponent
)
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(({ newCorrespondent, correspondents }) => {
- this.correspondents = correspondents.results
+ this.correspondents.set(correspondents.results)
this.documentForm.get('correspondent').setValue(newCorrespondent.id)
this.documentForm.get('correspondent').markAsDirty()
- if (this.suggestions) {
- this.suggestions.suggested_correspondents =
- this.suggestions.suggested_correspondents.filter(
+ if (this.suggestions()) {
+ this.suggestions().suggested_correspondents =
+ this.suggestions().suggested_correspondents.filter(
(c) => c !== newName
)
}
@@ -1098,7 +1124,7 @@ export class DocumentDetailComponent
var modal = this.modalService.open(StoragePathEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
if (newName) modal.componentInstance.object = { name: newName }
modal.componentInstance.succeeded
.pipe(
@@ -1110,7 +1136,7 @@ export class DocumentDetailComponent
)
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(({ newStoragePath, storagePaths }) => {
- this.storagePaths = storagePaths.results
+ this.storagePaths.set(storagePaths.results)
this.documentForm.get('storage_path').setValue(newStoragePath.id)
this.documentForm.get('storage_path').markAsDirty()
})
@@ -1143,7 +1169,7 @@ export class DocumentDetailComponent
discard() {
this.documentsService
- .get(this.documentId, this.selectedVersionId)
+ .get(this.documentId(), this.selectedVersionId())
.pipe(
first(),
takeUntil(this.unsubscribeNotifier),
@@ -1152,12 +1178,12 @@ export class DocumentDetailComponent
.subscribe({
next: (doc) => {
this.closeIncomingUpdateModal()
- Object.assign(this.document, doc)
+ Object.assign(this.document(), doc)
doc['permissions_form'] = {
owner: doc.owner,
set_permissions: doc.permissions,
}
- this.title = doc.title
+ this.title.set(doc.title)
this.updateFormForCustomFields()
this.documentForm.patchValue(doc)
this.documentForm.markAsPristine()
@@ -1173,7 +1199,7 @@ export class DocumentDetailComponent
private getChangedFields(): any {
const changes = {
- id: this.document.id,
+ id: this.document().id,
}
Object.keys(this.documentForm.controls).forEach((key) => {
if (this.documentForm.get(key).dirty) {
@@ -1191,10 +1217,10 @@ export class DocumentDetailComponent
}
save(close: boolean = false) {
- this.networkActive = true
+ this.networkActive.set(true)
;(document.activeElement as HTMLElement)?.dispatchEvent(new Event('change'))
this.documentsService
- .patch(this.getChangedFields(), this.selectedVersionId)
+ .patch(this.getChangedFields(), this.selectedVersionId())
.pipe(first())
.subscribe({
next: (docValues) => {
@@ -1206,43 +1232,43 @@ export class DocumentDetailComponent
newValues.tags = [...docValues.tags]
newValues.custom_fields = [...docValues.custom_fields]
this.store.next(newValues)
- this.openDocumentService.setDirty(this.document, false)
+ this.openDocumentService.setDirty(this.document(), false)
this.openDocumentService.save()
this.toastService.showInfo(
$localize`Document "${newValues.title}" saved successfully.`
)
- this.networkActive = false
- this.error = null
+ this.networkActive.set(false)
+ this.error.set(null)
if (close) {
this.pendingIncomingUpdate = null
this.close(() =>
- this.openDocumentService.refreshDocument(this.documentId)
+ this.openDocumentService.refreshDocument(this.documentId())
)
} else {
- this.openDocumentService.refreshDocument(this.documentId)
+ this.openDocumentService.refreshDocument(this.documentId())
this.flushPendingIncomingUpdate()
}
this.savedViewService.maybeRefreshDocumentCounts()
},
error: (error) => {
- this.networkActive = false
+ this.networkActive.set(false)
this.lastLocalSaveModified = null
const canEdit =
this.permissionsService.currentUserHasObjectPermissions(
PermissionAction.Change,
- this.document
+ this.document()
)
if (!canEdit) {
// document was 'given away'
- this.openDocumentService.setDirty(this.document, false)
+ this.openDocumentService.setDirty(this.document(), false)
this.toastService.showInfo(
- $localize`Document "${this.document.title}" saved successfully.`
+ $localize`Document "${this.document().title}" saved successfully.`
)
this.close()
} else {
- this.error = error.error
+ this.error.set(error.error)
this.toastService.showError(
- $localize`Error saving document "${this.document.title}"`,
+ $localize`Error saving document "${this.document().title}"`,
error
)
}
@@ -1252,14 +1278,14 @@ export class DocumentDetailComponent
}
saveEditNext() {
- this.networkActive = true
+ this.networkActive.set(true)
this.store.next(this.documentForm.value)
this.documentsService
- .patch(this.getChangedFields(), this.selectedVersionId)
+ .patch(this.getChangedFields(), this.selectedVersionId())
.pipe(
switchMap((updateResult) => {
this.savedViewService.maybeRefreshDocumentCounts()
- return this.documentListViewService.getNext(this.documentId).pipe(
+ return this.documentListViewService.getNext(this.documentId()).pipe(
map((nextDocId) => ({ nextDocId, updateResult })),
takeUntil(this.unsubscribeNotifier)
)
@@ -1268,9 +1294,9 @@ export class DocumentDetailComponent
.pipe(
switchMap(({ nextDocId, updateResult }) => {
if (nextDocId && updateResult) {
- this.openDocumentService.setDirty(this.document, false)
+ this.openDocumentService.setDirty(this.document(), false)
return this.openDocumentService
- .closeDocument(this.document)
+ .closeDocument(this.document())
.pipe(
map(
(closeResult) => ({ updateResult, nextDocId, closeResult }),
@@ -1284,8 +1310,8 @@ export class DocumentDetailComponent
.subscribe({
next: ({ updateResult, nextDocId, closeResult }) => {
this.closeIncomingUpdateModal()
- this.error = null
- this.networkActive = false
+ this.error.set(null)
+ this.networkActive.set(false)
this.pendingIncomingUpdate = null
this.lastLocalSaveModified = null
if (closeResult && updateResult && nextDocId) {
@@ -1294,9 +1320,9 @@ export class DocumentDetailComponent
}
},
error: (error) => {
- this.networkActive = false
+ this.networkActive.set(false)
this.lastLocalSaveModified = null
- this.error = error.error
+ this.error.set(error.error)
this.toastService.showError($localize`Error saving document`, error)
this.flushPendingIncomingUpdate()
},
@@ -1305,7 +1331,7 @@ export class DocumentDetailComponent
close(closedCallback: () => void = null) {
this.openDocumentService
- .closeDocument(this.document)
+ .closeDocument(this.document())
.pipe(first())
.subscribe((closed) => {
if (!closed) return
@@ -1330,7 +1356,7 @@ export class DocumentDetailComponent
backdrop: 'static',
})
modal.componentInstance.title = $localize`Confirm`
- modal.componentInstance.messageBold = $localize`Do you really want to move the document "${this.document.title}" to the trash?`
+ modal.componentInstance.messageBold = $localize`Do you really want to move the document "${this.document().title}" to the trash?`
modal.componentInstance.message = $localize`Documents can be restored prior to permanent deletion.`
modal.componentInstance.btnClass = 'btn-danger'
modal.componentInstance.btnCaption = $localize`Move to trash`
@@ -1342,7 +1368,7 @@ export class DocumentDetailComponent
.pipe(
switchMap(() => {
modal.componentInstance.buttonsEnabled = false
- return this.documentsService.delete(this.document)
+ return this.documentsService.delete(this.document())
})
)
.pipe(takeUntil(this.unsubscribeNotifier))
@@ -1363,7 +1389,7 @@ export class DocumentDetailComponent
this.documentListViewService.quickFilter([
{
rule_type: FILTER_FULLTEXT_MORELIKE,
- value: this.documentId.toString(),
+ value: this.documentId().toString(),
},
])
}
@@ -1380,11 +1406,11 @@ export class DocumentDetailComponent
modal.componentInstance.confirmClicked.subscribe(() => {
modal.componentInstance.buttonsEnabled = false
this.documentsService
- .reprocessDocuments({ documents: [this.document.id] })
+ .reprocessDocuments({ documents: [this.document().id] })
.subscribe({
next: () => {
this.toastService.showInfo(
- $localize`Reprocess operation for "${this.document.title}" will begin in the background.`
+ $localize`Reprocess operation for "${this.document().title}" will begin in the background.`
)
if (modal) {
modal.close()
@@ -1404,21 +1430,21 @@ export class DocumentDetailComponent
}
private getSelectedNonLatestVersionId(): number | null {
- const versions = this.document?.versions ?? []
- if (!versions.length || !this.selectedVersionId) {
+ const versions = this.document()?.versions ?? []
+ if (!versions.length || !this.selectedVersionId()) {
return null
}
const latestVersionId = Math.max(...versions.map((version) => version.id))
- return this.selectedVersionId === latestVersionId
+ return this.selectedVersionId() === latestVersionId
? null
- : this.selectedVersionId
+ : this.selectedVersionId()
}
download(original: boolean = false) {
- this.downloading = true
+ this.downloading.set(true)
const selectedVersionId = this.getSelectedNonLatestVersionId()
const downloadUrl = this.documentsService.getDownloadUrl(
- this.documentId,
+ this.documentId(),
original,
selectedVersionId,
this.useFormattedFilename
@@ -1430,11 +1456,11 @@ export class DocumentDetailComponent
const contentDisposition = response.headers.get('Content-Disposition')
const filename =
getFilenameFromContentDisposition(contentDisposition) ||
- this.document.title
+ this.document().title
const blob = new Blob([response.body], {
type: response.body.type,
})
- this.downloading = false
+ this.downloading.set(false)
const file = new File([blob], filename, {
type: response.body.type,
})
@@ -1456,7 +1482,7 @@ export class DocumentDetailComponent
}
},
error: (error) => {
- this.downloading = false
+ this.downloading.set(false)
this.toastService.showError(
$localize`Error downloading document`,
error
@@ -1466,16 +1492,16 @@ export class DocumentDetailComponent
}
hasNext() {
- return this.documentListViewService.hasNext(this.documentId)
+ return this.documentListViewService.hasNext(this.documentId())
}
hasPrevious() {
- return this.documentListViewService.hasPrevious(this.documentId)
+ return this.documentListViewService.hasPrevious(this.documentId())
}
nextDoc() {
this.documentListViewService
- .getNext(this.document.id)
+ .getNext(this.document().id)
.subscribe((nextDocId: number) => {
this.router.navigate(['documents', nextDocId])
})
@@ -1483,24 +1509,22 @@ export class DocumentDetailComponent
previousDoc() {
this.documentListViewService
- .getPrevious(this.document.id)
+ .getPrevious(this.document().id)
.subscribe((prevDocId: number) => {
this.router.navigate(['documents', prevDocId])
})
}
pdfPreviewLoaded(pdf: PngxPdfDocumentProxy) {
- this.previewNumPages = pdf.numPages
+ this.previewNumPages.set(pdf.numPages)
if (this.password) this.requiresPassword = false
- setTimeout(() => {
- this.previewLoaded = true
- }, 300)
+ this.previewLoaded.set(true)
}
onError(event) {
if (event.name == 'PasswordException') {
this.requiresPassword = true
- this.previewLoaded = true
+ this.previewLoaded.set(true)
}
}
@@ -1516,12 +1540,12 @@ export class DocumentDetailComponent
setting === PdfZoomScale.PageFit ||
setting === PdfZoomScale.PageWidth
) {
- this.previewZoomScale = setting
- this.previewZoomSetting = PdfZoomLevel.One
+ this.previewZoomScale.set(setting)
+ this.previewZoomSetting.set(PdfZoomLevel.One)
return
}
- this.previewZoomSetting = setting
- this.previewZoomScale = PdfZoomScale.PageWidth
+ this.previewZoomSetting.set(setting)
+ this.previewZoomScale.set(PdfZoomScale.PageWidth)
}
get zoomSettings() {
@@ -1529,10 +1553,10 @@ export class DocumentDetailComponent
}
get currentZoom() {
- if (this.previewZoomScale === PdfZoomScale.PageFit) {
+ if (this.previewZoomScale() === PdfZoomScale.PageFit) {
return PdfZoomScale.PageFit
}
- return this.previewZoomSetting
+ return this.previewZoomSetting()
}
getZoomSettingTitle(setting: PdfZoomScale | PdfZoomLevel): string {
@@ -1546,23 +1570,24 @@ export class DocumentDetailComponent
increaseZoom(): void {
const zoomLevels = Object.values(PdfZoomLevel)
- let currentIndex = zoomLevels.indexOf(this.previewZoomSetting)
- if (this.previewZoomScale === PdfZoomScale.PageFit) {
+ let currentIndex = zoomLevels.indexOf(this.previewZoomSetting())
+ if (this.previewZoomScale() === PdfZoomScale.PageFit) {
currentIndex = zoomLevels.indexOf(PdfZoomLevel.One)
}
- this.previewZoomScale = PdfZoomScale.PageWidth
- this.previewZoomSetting =
+ this.previewZoomScale.set(PdfZoomScale.PageWidth)
+ this.previewZoomSetting.set(
zoomLevels[Math.min(zoomLevels.length - 1, currentIndex + 1)]
+ )
}
decreaseZoom(): void {
const zoomLevels = Object.values(PdfZoomLevel)
- let currentIndex = zoomLevels.indexOf(this.previewZoomSetting)
- if (this.previewZoomScale === PdfZoomScale.PageFit) {
+ let currentIndex = zoomLevels.indexOf(this.previewZoomSetting())
+ if (this.previewZoomScale() === PdfZoomScale.PageFit) {
currentIndex = zoomLevels.indexOf(PdfZoomLevel.ThreeQuarters)
}
- this.previewZoomScale = PdfZoomScale.PageWidth
- this.previewZoomSetting = zoomLevels[Math.max(0, currentIndex - 1)]
+ this.previewZoomScale.set(PdfZoomScale.PageWidth)
+ this.previewZoomSetting.set(zoomLevels[Math.max(0, currentIndex - 1)])
}
get showPermissions(): boolean {
@@ -1596,33 +1621,35 @@ export class DocumentDetailComponent
}
notesUpdated(notes: DocumentNote[]) {
- this.document.notes = notes
- this.openDocumentService.refreshDocument(this.documentId)
+ this.document().notes = notes
+ this.openDocumentService.refreshDocument(this.documentId())
this.savedViewService.maybeRefreshDocumentCounts()
}
get userIsOwner(): boolean {
- let doc: Document = Object.assign({}, this.document)
+ let doc: Document = { ...this.document() }
// dont disable while editing
if (
- this.document &&
+ this.document() &&
this.store?.value.permissions_form?.hasOwnProperty('owner')
) {
doc.owner = this.store.value.permissions_form.owner
}
- return !this.document || this.permissionsService.currentUserOwnsObject(doc)
+ return (
+ !this.document() || this.permissionsService.currentUserOwnsObject(doc)
+ )
}
get userCanEdit(): boolean {
- let doc: Document = Object.assign({}, this.document)
+ let doc: Document = { ...this.document() }
// dont disable while editing
if (
- this.document &&
+ this.document() &&
this.store?.value.permissions_form?.hasOwnProperty('owner')
) {
doc.owner = this.store.value.permissions_form.owner
}
- return !this.document || this.userCanEditDoc(doc)
+ return !this.document() || this.userCanEditDoc(doc)
}
private userCanEditDoc(doc: Document): boolean {
@@ -1696,7 +1723,7 @@ export class DocumentDetailComponent
this.customFieldsService
.listAll()
.pipe(first(), takeUntil(this.unsubscribeNotifier))
- .subscribe((result) => (this.customFields = result.results))
+ .subscribe((result) => this.customFields.set(result.results))
}
public refreshCustomFields() {
@@ -1707,17 +1734,17 @@ export class DocumentDetailComponent
public getCustomFieldFromInstance(
instance: CustomFieldInstance
): CustomField {
- return this.customFields?.find((f) => f.id === instance.field)
+ return this.customFields()?.find((f) => f.id === instance.field)
}
public getCustomFieldError(index: number) {
- const fieldError = this.error?.custom_fields?.[index]
+ const fieldError = this.error()?.custom_fields?.[index]
return fieldError?.['non_field_errors'] ?? fieldError?.['value']
}
private updateFormForCustomFields(emitEvent: boolean = false) {
this.customFieldFormFields.clear({ emitEvent: false })
- this.document.custom_fields?.forEach((fieldInstance) => {
+ this.document().custom_fields?.forEach((fieldInstance) => {
this.customFieldFormFields.push(
new FormGroup({
field: new FormControl(fieldInstance.field),
@@ -1729,10 +1756,10 @@ export class DocumentDetailComponent
}
public addField(field: CustomField) {
- this.document.custom_fields.push({
+ this.document().custom_fields.push({
field: field.id,
value: null,
- document: this.documentId,
+ document: this.documentId(),
created: new Date(),
})
this.updateFormForCustomFields(true)
@@ -1741,8 +1768,8 @@ export class DocumentDetailComponent
}
public removeField(fieldInstance: CustomFieldInstance) {
- this.document.custom_fields.splice(
- this.document.custom_fields.indexOf(fieldInstance),
+ this.document().custom_fields.splice(
+ this.document().custom_fields.indexOf(fieldInstance),
1
)
this.updateFormForCustomFields(true)
@@ -1756,11 +1783,11 @@ export class DocumentDetailComponent
size: 'xl',
scrollable: true,
})
- const sourceDocumentId = this.selectedVersionId ?? this.document.id
+ const sourceDocumentId = this.selectedVersionId() ?? this.document().id
modal.componentInstance.title = $localize`PDF Editor`
modal.componentInstance.btnCaption = $localize`Proceed`
- modal.componentInstance.documentID = this.document.id
- modal.componentInstance.versionID = sourceDocumentId
+ modal.componentInstance.documentID.set(this.document().id)
+ modal.componentInstance.versionID.set(sourceDocumentId)
modal.componentInstance.confirmClicked
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
@@ -1778,11 +1805,11 @@ export class DocumentDetailComponent
.subscribe({
next: () => {
this.toastService.showInfo(
- $localize`PDF edit operation for "${this.document.title}" will begin in the background.`
+ $localize`PDF edit operation for "${this.document().title}" will begin in the background.`
)
modal.close()
if (modal.componentInstance.deleteOriginal) {
- this.openDocumentService.closeDocument(this.document)
+ this.openDocumentService.closeDocument(this.document())
}
},
error: (error) => {
@@ -1818,11 +1845,11 @@ export class DocumentDetailComponent
modal.componentInstance.confirmClicked
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
- const sourceDocumentId = this.selectedVersionId ?? this.document.id
+ const sourceDocumentId = this.selectedVersionId() ?? this.document().id
const dialog =
modal.componentInstance as PasswordRemovalConfirmDialogComponent
dialog.buttonsEnabled = false
- this.networkActive = true
+ this.networkActive.set(true)
this.documentsService
.removePasswordDocuments([sourceDocumentId], {
password: this.password,
@@ -1835,19 +1862,19 @@ export class DocumentDetailComponent
.subscribe({
next: () => {
this.toastService.showInfo(
- $localize`Password removal operation for "${this.document.title}" will begin in the background.`
+ $localize`Password removal operation for "${this.document().title}" will begin in the background.`
)
- this.networkActive = false
+ this.networkActive.set(false)
modal.close()
if (!dialog.updateDocument && dialog.deleteOriginal) {
- this.openDocumentService.closeDocument(this.document)
+ this.openDocumentService.closeDocument(this.document())
} else if (dialog.updateDocument) {
- this.openDocumentService.refreshDocument(this.documentId)
+ this.openDocumentService.refreshDocument(this.documentId())
}
},
error: (error) => {
dialog.buttonsEnabled = true
- this.networkActive = false
+ this.networkActive.set(false)
this.toastService.showError(
$localize`Error executing password removal operation`,
error
@@ -1860,7 +1887,7 @@ export class DocumentDetailComponent
printDocument() {
const selectedVersionId = this.getSelectedNonLatestVersionId()
const printUrl = this.documentsService.getDownloadUrl(
- this.document.id,
+ this.document().id,
false,
selectedVersionId
)
@@ -1916,9 +1943,11 @@ export class DocumentDetailComponent
public openShareLinks() {
const modal = this.modalService.open(ShareLinksDialogComponent)
- modal.componentInstance.documentId = this.document.id
- modal.componentInstance.hasArchiveVersion =
- this.metadata?.has_archive_version ?? !!this.document?.archived_file_name
+ modal.componentInstance.documentId.set(this.document().id)
+ modal.componentInstance.hasArchiveVersion.set(
+ this.metadata()?.has_archive_version ??
+ !!this.document()?.archived_file_name
+ )
}
get emailEnabled(): boolean {
@@ -1929,14 +1958,16 @@ export class DocumentDetailComponent
const modal = this.modalService.open(EmailDocumentDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.documentIds = [this.document.id]
- modal.componentInstance.hasArchiveVersion =
- this.metadata?.has_archive_version ?? !!this.document?.archived_file_name
+ modal.componentInstance.documentIds.set([this.document().id])
+ modal.componentInstance.hasArchiveVersion.set(
+ this.metadata()?.has_archive_version ??
+ !!this.document()?.archived_file_name
+ )
}
private tryRenderTiff() {
this.http
- .get(this.previewUrl, { responseType: 'arraybuffer' })
+ .get(this.previewUrl(), { responseType: 'arraybuffer' })
.pipe(
first(),
takeUntil(this.unsubscribeNotifier),
@@ -1971,13 +2002,17 @@ export class DocumentDetailComponent
imgd = ctx.createImageData(w, h)
for (var i = 0; i < rgba.length; i++) imgd.data[i] = rgba[i]
ctx.putImageData(imgd, 0, 0)
- this.tiffURL = cnv.toDataURL()
+ this.tiffURL.set(cnv.toDataURL())
} catch (err) {
- this.tiffError = $localize`An error occurred loading tiff: ${err.toString()}`
+ this.tiffError.set(
+ $localize`An error occurred loading tiff: ${err.toString()}`
+ )
}
},
error: (err) => {
- this.tiffError = $localize`An error occurred loading tiff: ${err.toString()}`
+ this.tiffError.set(
+ $localize`An error occurred loading tiff: ${err.toString()}`
+ )
},
})
}
diff --git a/src-ui/src/app/components/document-detail/document-history/document-history.component.html b/src-ui/src/app/components/document-detail/document-history/document-history.component.html
index 01447ef03..0818efadf 100644
--- a/src-ui/src/app/components/document-detail/document-history/document-history.component.html
+++ b/src-ui/src/app/components/document-detail/document-history/document-history.component.html
@@ -1,17 +1,17 @@
-@if (loading) {
+@if (loading()) {
<div class="d-flex">
<output class="spinner-border spinner-border-sm fw-normal" role="status"></output>
</div>
} @else {
<ul class="list-group">
- @if (entries.length === 0) {
+ @if (entries().length === 0) {
<li class="list-group-item">
<div class="d-flex justify-content-center">
<span class="fst-italic" i18n>No entries found.</span>
</div>
</li>
} @else {
- @for (entry of entries; track entry.id) {
+ @for (entry of entries(); track entry.id) {
<li class="list-group-item">
<div class="d-flex justify-content-between align-items-center">
<ng-template #timestamp>
diff --git a/src-ui/src/app/components/document-detail/document-history/document-history.component.ts b/src-ui/src/app/components/document-detail/document-history/document-history.component.ts
index a2bbede3c..b4a21270c 100644
--- a/src-ui/src/app/components/document-detail/document-history/document-history.component.ts
+++ b/src-ui/src/app/components/document-detail/document-history/document-history.component.ts
@@ -1,5 +1,5 @@
import { AsyncPipe, KeyValuePipe, TitleCasePipe } from '@angular/common'
-import { Component, Input, OnInit, inject } from '@angular/core'
+import { Component, Input, OnInit, inject, signal } from '@angular/core'
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { Observable, first, map, of, shareReplay } from 'rxjs'
@@ -44,8 +44,8 @@ export class DocumentHistoryComponent implements OnInit {
}
}
- public loading: boolean = true
- public entries: AuditLogEntry[] = []
+ readonly loading = signal(true)
+ readonly entries = signal<AuditLogEntry[]>([])
private readonly prettyNameCache = new Map<string, Observable<string>>()
@@ -55,10 +55,10 @@ export class DocumentHistoryComponent implements OnInit {
private loadHistory(): void {
if (this._documentId) {
- this.loading = true
+ this.loading.set(true)
this.documentService.getHistory(this._documentId).subscribe((entries) => {
- this.entries = entries
- this.loading = false
+ this.entries.set(entries)
+ this.loading.set(false)
})
}
}
diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts
index 8f82be1ab..07cdabc9a 100644
--- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts
+++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts
@@ -4,7 +4,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import { EventEmitter } from '@angular/core'
+import { EventEmitter, signal } from '@angular/core'
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { By } from '@angular/platform-browser'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
@@ -38,7 +38,6 @@ import { environment } from 'src/environments/environment'
import { CorrespondentEditDialogComponent } from '../../common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component'
import { CustomFieldEditDialogComponent } from '../../common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component'
import { DocumentTypeEditDialogComponent } from '../../common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component'
-import { EditDialogMode } from '../../common/edit-dialog/edit-dialog.component'
import { StoragePathEditDialogComponent } from '../../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component'
import { TagEditDialogComponent } from '../../common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component'
import { FilterableDropdownComponent } from '../../common/filterable-dropdown/filterable-dropdown.component'
@@ -1146,7 +1145,7 @@ describe('BulkEditorComponent', () => {
fixture.detectChanges()
component.mergeSelected()
expect(modal).not.toBeUndefined()
- modal.componentInstance.metadataDocumentID = 3
+ modal.componentInstance.metadataDocumentID.set(3)
modal.componentInstance.confirm()
let req = httpTestingController.expectOne(
`${environment.apiBaseUrl}documents/merge/`
@@ -1164,7 +1163,7 @@ describe('BulkEditorComponent', () => {
) // listAllFilteredIds
// Test with Delete Originals enabled
- modal.componentInstance.deleteOriginals = true
+ modal.componentInstance.deleteOriginals.set(true)
modal.componentInstance.confirm()
req = httpTestingController.expectOne(
`${environment.apiBaseUrl}documents/merge/`
@@ -1184,8 +1183,8 @@ describe('BulkEditorComponent', () => {
expect(documentListViewService.selected.size).toEqual(0)
// Test with archiveFallback enabled
- modal.componentInstance.deleteOriginals = false
- modal.componentInstance.archiveFallback = true
+ modal.componentInstance.deleteOriginals.set(false)
+ modal.componentInstance.archiveFallback.set(true)
modal.componentInstance.confirm()
req = httpTestingController.expectOne(
`${environment.apiBaseUrl}documents/merge/`
@@ -1339,7 +1338,7 @@ describe('BulkEditorComponent', () => {
const modalInstance = {
componentInstance: {
- dialogMode: EditDialogMode.CREATE,
+ dialogMode: { set: jest.fn() },
object: { name },
succeeded: of(newTag),
},
@@ -1382,7 +1381,7 @@ describe('BulkEditorComponent', () => {
const modalInstance = {
componentInstance: {
- dialogMode: EditDialogMode.CREATE,
+ dialogMode: { set: jest.fn() },
object: { name },
succeeded: of(newCorrespondent),
},
@@ -1431,7 +1430,7 @@ describe('BulkEditorComponent', () => {
const modalInstance = {
componentInstance: {
- dialogMode: EditDialogMode.CREATE,
+ dialogMode: { set: jest.fn() },
object: { name },
succeeded: of(newDocumentType),
},
@@ -1477,7 +1476,7 @@ describe('BulkEditorComponent', () => {
const modalInstance = {
componentInstance: {
- dialogMode: EditDialogMode.CREATE,
+ dialogMode: { set: jest.fn() },
object: { name },
succeeded: of(newStoragePath),
},
@@ -1531,7 +1530,7 @@ describe('BulkEditorComponent', () => {
const modalInstance = {
componentInstance: {
- dialogMode: EditDialogMode.CREATE,
+ dialogMode: { set: jest.fn() },
object: { name },
succeeded: of(newCustomField),
},
@@ -1629,15 +1628,18 @@ describe('BulkEditorComponent', () => {
close: jest.fn(),
componentInstance: {
documents: [],
+ setDocuments(docs) {
+ this.documents = docs
+ },
confirmClicked,
payload: {
document_ids: [5, 7],
file_version: 'archive',
expiration_days: 7,
},
- loading: false,
+ loading: signal(false),
buttonsEnabled: true,
- copied: false,
+ copied: signal(false),
},
}
@@ -1667,7 +1669,7 @@ describe('BulkEditorComponent', () => {
file_version: 'archive',
expiration_days: 7,
})
- expect(dialogInstance.loading).toBe(false)
+ expect(dialogInstance.loading()).toBe(false)
expect(dialogInstance.buttonsEnabled).toBe(false)
expect(dialogInstance.createdBundle).toEqual({ id: 42 })
expect(typeof dialogInstance.onOpenManage).toBe('function')
@@ -1698,13 +1700,16 @@ describe('BulkEditorComponent', () => {
const modalRef: Partial<NgbModalRef> = {
componentInstance: {
documents: [],
+ setDocuments(docs) {
+ this.documents = docs
+ },
confirmClicked,
payload: {
document_ids: [9],
file_version: 'original',
expiration_days: null,
},
- loading: false,
+ loading: signal(false),
buttonsEnabled: true,
},
}
@@ -1726,7 +1731,7 @@ describe('BulkEditorComponent', () => {
$localize`Share link bundle creation is not available yet.`,
expect.any(Error)
)
- expect(dialogInstance.loading).toBe(false)
+ expect(dialogInstance.loading()).toBe(false)
expect(dialogInstance.buttonsEnabled).toBe(true)
openSpy.mockRestore()
})
diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts
index a456ec2cb..92ff38e9d 100644
--- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts
+++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -266,7 +266,7 @@ export class BulkEditorComponent
overrideSelection?: DocumentSelectionQuery
) {
if (modal) {
- modal.componentInstance.buttonsEnabled = false
+ this.setModalButtonsEnabled(modal, false)
}
this.documentService
.bulkEdit(overrideSelection ?? this.getSelectionQuery(), method, args)
@@ -283,7 +283,7 @@ export class BulkEditorComponent
options: { deleteOriginals?: boolean } = {}
) {
if (modal) {
- modal.componentInstance.buttonsEnabled = false
+ this.setModalButtonsEnabled(modal, false)
}
request.pipe(first()).subscribe({
next: () => {
@@ -313,7 +313,7 @@ export class BulkEditorComponent
private handleOperationError(modal: NgbModalRef, error: any) {
if (modal) {
- modal.componentInstance.buttonsEnabled = true
+ this.setModalButtonsEnabled(modal, true)
}
this.toastService.showError(
$localize`Error executing bulk operation`,
@@ -321,6 +321,15 @@ export class BulkEditorComponent
)
}
+ private setModalButtonsEnabled(modal: NgbModalRef, enabled: boolean) {
+ const buttonsEnabled = modal.componentInstance.buttonsEnabled
+ if (typeof buttonsEnabled?.set === 'function') {
+ buttonsEnabled.set(enabled)
+ } else {
+ modal.componentInstance.buttonsEnabled = enabled
+ }
+ }
+
private applySelectionData(
items: SelectionDataItem[],
selectionModel: FilterableDropdownSelectionModel
@@ -736,7 +745,7 @@ export class BulkEditorComponent
let modal = this.modalService.open(TagEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
modal.componentInstance.object = { name }
modal.componentInstance.succeeded
.pipe(
@@ -757,7 +766,7 @@ export class BulkEditorComponent
let modal = this.modalService.open(CorrespondentEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
modal.componentInstance.object = { name }
modal.componentInstance.succeeded
.pipe(
@@ -780,7 +789,7 @@ export class BulkEditorComponent
let modal = this.modalService.open(DocumentTypeEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
modal.componentInstance.object = { name }
modal.componentInstance.succeeded
.pipe(
@@ -801,7 +810,7 @@ export class BulkEditorComponent
let modal = this.modalService.open(StoragePathEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
modal.componentInstance.object = { name }
modal.componentInstance.succeeded
.pipe(
@@ -822,7 +831,7 @@ export class BulkEditorComponent
let modal = this.modalService.open(CustomFieldEditDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.dialogMode = EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
modal.componentInstance.object = { name }
modal.componentInstance.succeeded
.pipe(
@@ -914,7 +923,7 @@ export class BulkEditorComponent
})
modal.componentInstance.confirmClicked.subscribe(
({ permissions, merge }) => {
- modal.componentInstance.buttonsEnabled = false
+ modal.componentInstance.buttonsEnabled.set(false)
this.executeBulkEditMethod(modal, 'set_permissions', {
...permissions,
merge,
@@ -933,7 +942,7 @@ export class BulkEditorComponent
rotateDialog.messageBold = $localize`This operation will add rotated versions of the ${this.getSelectionSize()} document(s).`
rotateDialog.btnClass = 'btn-danger'
rotateDialog.btnCaption = $localize`Proceed`
- rotateDialog.documentID = Array.from(this.list.selected)[0]
+ rotateDialog.documentID.set(Array.from(this.list.selected)[0])
rotateDialog.confirmClicked
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
@@ -956,24 +965,24 @@ export class BulkEditorComponent
mergeDialog.title = $localize`Merge confirm`
mergeDialog.messageBold = $localize`This operation will merge ${this.getSelectionSize()} selected documents into a new document.`
mergeDialog.btnCaption = $localize`Proceed`
- mergeDialog.documentIDs = Array.from(this.list.selected)
+ mergeDialog.documentIDs.set(Array.from(this.list.selected))
mergeDialog.confirmClicked
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
const args: MergeDocumentsRequest = {}
- if (mergeDialog.metadataDocumentID > -1) {
- args.metadata_document_id = mergeDialog.metadataDocumentID
+ if (mergeDialog.metadataDocumentID() > -1) {
+ args.metadata_document_id = mergeDialog.metadataDocumentID()
}
- if (mergeDialog.deleteOriginals) {
+ if (mergeDialog.deleteOriginals()) {
args.delete_originals = true
}
- if (mergeDialog.archiveFallback) {
+ if (mergeDialog.archiveFallback()) {
args.archive_fallback = true
}
mergeDialog.buttonsEnabled = false
this.executeDocumentAction(
modal,
- this.documentService.mergeDocuments(mergeDialog.documentIDs, args),
+ this.documentService.mergeDocuments(mergeDialog.documentIDs(), args),
{ deleteOriginals: !!args.delete_originals }
)
this.toastService.showInfo(
@@ -1029,21 +1038,21 @@ export class BulkEditorComponent
const selectedDocuments = this.list.documents.filter((d) =>
this.list.selected.has(d.id)
)
- dialog.documents = selectedDocuments
+ dialog.setDocuments(selectedDocuments)
dialog.confirmClicked
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
- dialog.loading = true
+ dialog.loading.set(true)
dialog.buttonsEnabled = false
this.shareLinkBundleService
.createBundle(dialog.payload)
.pipe(first())
.subscribe({
next: (result) => {
- dialog.loading = false
+ dialog.loading.set(false)
dialog.buttonsEnabled = false
dialog.createdBundle = result
- dialog.copied = false
+ dialog.copied.set(false)
dialog.payload = null
dialog.onOpenManage = () => {
modal.close()
@@ -1054,7 +1063,7 @@ export class BulkEditorComponent
)
},
error: (error) => {
- dialog.loading = false
+ dialog.loading.set(false)
dialog.buttonsEnabled = true
this.toastService.showError(
$localize`Share link bundle creation is not available yet.`,
@@ -1080,7 +1089,7 @@ export class BulkEditorComponent
const modal = this.modalService.open(EmailDocumentDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.documentIds = Array.from(this.list.selected)
- modal.componentInstance.hasArchiveVersion = allHaveArchiveVersion
+ modal.componentInstance.documentIds.set(Array.from(this.list.selected))
+ modal.componentInstance.hasArchiveVersion.set(allHaveArchiveVersion)
}
}
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html
index 1c69d0f53..08d232185 100644
--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html
+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html
@@ -1,13 +1,13 @@
-<div class="card document-card-large mb-3 shadow-sm bg-light placeholder-glow fade" [class.show]="show" [class.card-selected]="selected" [class.document-card]="selectable" (mouseleave)="mouseLeaveCard()">
+<div class="card document-card-large mb-3 shadow-sm bg-light placeholder-glow fade" [class.show]="show()" [class.card-selected]="selected()" [class.document-card]="selectable" (mouseleave)="mouseLeaveCard()">
<div class="row g-0">
<div class="col-md-2 doc-img-container rounded-start" (click)="this.toggleSelected.emit($event)" (dblclick)="dblClickDocument.emit()">
- @if (document) {
+ @if (document()) {
<img [src]="getThumbUrl()" class="card-img doc-img border-end rounded-start" [class.inverted]="getIsThumbInverted()">
<div class="border-end border-bottom bg-light document-card-check">
<div class="form-check">
- <input type="checkbox" class="form-check-input" id="smallCardCheck{{document.id}}" [checked]="selected" (click)="this.toggleSelected.emit($event)">
- <label class="form-check-label" for="smallCardCheck{{document.id}}"></label>
+ <input type="checkbox" class="form-check-input" id="smallCardCheck{{document().id}}" [checked]="selected()" (click)="this.toggleSelected.emit($event)">
+ <label class="form-check-label" for="smallCardCheck{{document().id}}"></label>
</div>
</div>
} @else {
@@ -19,20 +19,20 @@
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<h5 class="card-title w-100">
- @if (document) {
- @if (displayFields.includes(DisplayField.CORRESPONDENT) && document.correspondent) {
+ @if (document()) {
+ @if (displayFields().includes(DisplayField.CORRESPONDENT) && document().correspondent) {
@if (clickCorrespondent.observers.length ) {
- <a title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="fw-bold btn-link">{{document.correspondent | correspondentName | async}}</a>
+ <a title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document().correspondent);$event.stopPropagation()" class="fw-bold btn-link">{{document().correspondent | correspondentName | async}}</a>
} @else {
- {{document.correspondent | correspondentName | async}}
+ {{document().correspondent | correspondentName | async}}
}
- @if (displayFields.includes(DisplayField.TITLE)) {:}
+ @if (displayFields().includes(DisplayField.TITLE)) {:}
}
- @if (displayFields.includes(DisplayField.TITLE)) {
- {{document.title | documentTitle}}
+ @if (displayFields().includes(DisplayField.TITLE)) {
+ {{document().title | documentTitle}}
}
- @if (displayFields.includes(DisplayField.TAGS)) {
- @for (tagID of document.tags; track tagID) {
+ @if (displayFields().includes(DisplayField.TAGS)) {
+ @for (tagID of document().tags; track tagID) {
<pngx-tag [tagID]="tagID" linkTitle="Filter by tag" i18n-linkTitle class="ms-1" (click)="clickTag.emit(tagID);$event.stopPropagation()" [clickable]="clickTag.observers.length"></pngx-tag>
}
}
@@ -42,9 +42,9 @@
</h5>
</div>
<p class="card-text">
- @if (document) {
+ @if (document()) {
@if (hasSearchHighlights) {
- <span [innerHtml]="document.__search_hit__.highlights"></span>
+ <span [innerHtml]="document().__search_hit__.highlights"></span>
}
@for (highlight of searchNoteHighlights; track highlight) {
<span class="d-block">
@@ -64,14 +64,14 @@
<div class="d-flex flex-column flex-md-row align-items-md-center">
<div class="btn-group">
- @if (document) {
+ @if (document()) {
<a class="btn btn-sm btn-outline-secondary" (click)="clickMoreLike.emit()">
<i-bs name="diagram-3" class="me-1"></i-bs><span class="d-none d-md-inline" i18n>More like this</span>
</a>
- <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
+ <a routerLink="/documents/{{document().id}}" class="btn btn-sm btn-outline-secondary" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
<i-bs name="file-earmark-richtext" class="me-1"></i-bs><span class="d-none d-md-inline" i18n>Open</span>
</a>
- <pngx-preview-popup [document]="document" #popupPreview>
+ <pngx-preview-popup [document]="document()" #popupPreview>
<i-bs name="eye" class="me-1"></i-bs><span class="d-none d-md-inline" i18n>View</span>
</pngx-preview-popup>
<a class="btn btn-sm btn-outline-secondary" [href]="getDownloadUrl()">
@@ -86,76 +86,76 @@
</div>
<div class="list-group list-group-horizontal border-0 card-info ms-md-auto mt-2 mt-md-0">
- @if (document) {
- @if (displayFields.includes(DisplayField.NOTES) && notesEnabled && document.notes.length) {
- <button routerLink="/documents/{{document.id}}/notes" class="list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title="View notes" i18n-title>
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="chat-left-text"></i-bs><small>{{document.notes.length}} Notes</small>
+ @if (document()) {
+ @if (displayFields().includes(DisplayField.NOTES) && notesEnabled && document().notes.length) {
+ <button routerLink="/documents/{{document().id}}/notes" class="list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title="View notes" i18n-title>
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="chat-left-text"></i-bs><small>{{document().notes.length}} Notes</small>
</button>
}
- @if (displayFields.includes(DisplayField.DOCUMENT_TYPE) && document.document_type) {
+ @if (displayFields().includes(DisplayField.DOCUMENT_TYPE) && document().document_type) {
<button type="button" class="list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title="Filter by document type" i18n-title
- (click)="clickDocumentType.emit(document.document_type);$event.stopPropagation()">
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="file-earmark"></i-bs><small>{{document.document_type | documentTypeName | async}}</small>
+ (click)="clickDocumentType.emit(document().document_type);$event.stopPropagation()">
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="file-earmark"></i-bs><small>{{document().document_type | documentTypeName | async}}</small>
</button>
}
- @if (displayFields.includes(DisplayField.STORAGE_PATH) && document.storage_path) {
+ @if (displayFields().includes(DisplayField.STORAGE_PATH) && document().storage_path) {
<button type="button" class="list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title="Filter by storage path" i18n-title
- (click)="clickStoragePath.emit(document.storage_path);$event.stopPropagation()">
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="archive"></i-bs><small>{{document.storage_path | storagePathName | async}}</small>
+ (click)="clickStoragePath.emit(document().storage_path);$event.stopPropagation()">
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="archive"></i-bs><small>{{document().storage_path | storagePathName | async}}</small>
</button>
}
- @if (displayFields.includes(DisplayField.ASN) && document.archive_serial_number | isNumber) {
+ @if (displayFields().includes(DisplayField.ASN) && document().archive_serial_number | isNumber) {
<div class="list-group-item me-2 bg-light text-dark p-1 border-0 d-flex align-items-center">
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="upc-scan"></i-bs><small>#{{document.archive_serial_number}}</small>
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="upc-scan"></i-bs><small>#{{document().archive_serial_number}}</small>
</div>
}
- @if (displayFields.includes(DisplayField.CREATED) || displayFields.includes(DisplayField.ADDED)) {
+ @if (displayFields().includes(DisplayField.CREATED) || displayFields().includes(DisplayField.ADDED)) {
<ng-template #dateTooltip>
<div class="d-flex flex-column text-light">
- <span i18n>Created: {{ document.created | customDate }}</span>
- <span i18n>Added: {{ document.added | customDate }}</span>
- <span i18n>Modified: {{ document.modified | customDate }}</span>
+ <span i18n>Created: {{ document().created | customDate }}</span>
+ <span i18n>Added: {{ document().added | customDate }}</span>
+ <span i18n>Modified: {{ document().modified | customDate }}</span>
</div>
</ng-template>
- @if (displayFields.includes(DisplayField.CREATED)) {
+ @if (displayFields().includes(DisplayField.CREATED)) {
<div class="list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" [ngbTooltip]="dateTooltip">
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="calendar-event"></i-bs><small>{{document.created | customDate:'mediumDate'}}</small>
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="calendar-event"></i-bs><small>{{document().created | customDate:'mediumDate'}}</small>
</div>
}
- @if (displayFields.includes(DisplayField.ADDED)) {
+ @if (displayFields().includes(DisplayField.ADDED)) {
<div class="list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" [ngbTooltip]="dateTooltip">
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="calendar-event"></i-bs><small>{{document.added | customDate:'mediumDate'}}</small>
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="calendar-event"></i-bs><small>{{document().added | customDate:'mediumDate'}}</small>
</div>
}
}
- @if (displayFields.includes(DisplayField.PAGE_COUNT) && document.page_count) {
+ @if (displayFields().includes(DisplayField.PAGE_COUNT) && document().page_count) {
<div class="list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center">
<i-bs width=".9em" height=".9em" class="me-2 text-muted" name="files"></i-bs>
- <small i18n>{document.page_count, plural, =1 {1 page} other {{{document.page_count}} pages}}</small>
+ <small i18n>{document().page_count, plural, =1 {1 page} other {{{document().page_count}} pages}}</small>
</div>
}
- @if (displayFields.includes(DisplayField.OWNER) && document.owner && document.owner !== settingsService.currentUser.id) {
+ @if (displayFields().includes(DisplayField.OWNER) && document().owner && document().owner !== settingsService.currentUser().id) {
<div class="list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center">
- <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="person-fill-lock"></i-bs><small>{{document.owner | username | async}}</small>
+ <i-bs width=".9em" height=".9em" class="me-2 text-muted" name="person-fill-lock"></i-bs><small>{{document().owner | username | async}}</small>
</div>
}
- @if (displayFields.includes(DisplayField.SHARED) && document.is_shared_by_requester) {
+ @if (displayFields().includes(DisplayField.SHARED) && document().is_shared_by_requester) {
<div class="list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center">
<i-bs width=".9em" height=".9em" class="me-2 text-muted" name="people-fill"></i-bs><small i18n>Shared</small>
</div>
}
- @if (document.__search_hit__?.score) {
+ @if (document().__search_hit__?.score) {
<div class="list-group-item bg-light text-dark border-0 d-flex p-0 ps-4 search-score">
<small class="me-2 text-muted" i18n>Score:</small>
- <ngb-progressbar [type]="searchScoreClass" [value]="document.__search_hit__.score" class="search-score-bar mx-2 mt-1" [max]="1"></ngb-progressbar>
+ <ngb-progressbar [type]="searchScoreClass" [value]="document().__search_hit__.score" class="search-score-bar mx-2 mt-1" [max]="1"></ngb-progressbar>
</div>
}
- @for (field of document.custom_fields; track field.field) {
- @if (displayFields.includes(DisplayField.CUSTOM_FIELD + field.field)) {
+ @for (field of document().custom_fields; track field.field) {
+ @if (displayFields().includes(DisplayField.CUSTOM_FIELD + field.field)) {
<div class="list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center">
<i-bs width=".9em" height=".9em" class="me-2 text-muted" name="ui-radios"></i-bs>
<small>
- <pngx-custom-field-display [document]="document" [fieldId]="field.field" showNameIfEmpty="true"></pngx-custom-field-display>
+ <pngx-custom-field-display [document]="document()" [fieldId]="field.field" showNameIfEmpty="true"></pngx-custom-field-display>
</small>
</div>
}
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss
index 359346867..b89b6e4a8 100644
--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss
+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss
@@ -2,6 +2,26 @@
overflow-wrap: anywhere;
}
+.fade.show {
+ animation: pngx-entry-fade 160ms ease-out;
+}
+
+@keyframes pngx-entry-fade {
+ from {
+ opacity: 0;
+ }
+
+ to {
+ opacity: 1;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .fade.show {
+ animation: none;
+ }
+}
+
.doc-img-container {
position: relative;
}
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts
index e4e2bca74..d50bba65f 100644
--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts
+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts
@@ -67,16 +67,19 @@ describe('DocumentCardLargeComponent', () => {
fixture = TestBed.createComponent(DocumentCardLargeComponent)
component = fixture.componentInstance
- component.document = doc
+ fixture.componentRef.setInput('document', {
+ ...doc,
+ tags: [...doc.tags],
+ notes: [...doc.notes],
+ })
fixture.detectChanges()
jest.useFakeTimers()
})
it('should show the card', () => {
- expect(component.show).toBeFalsy()
+ expect(component.show()).toBeTruthy()
component.ngAfterViewInit()
- jest.advanceTimersByTime(100)
- expect(component.show).toBeTruthy()
+ expect(component.show()).toBeTruthy()
})
it('should display a document', () => {
@@ -91,25 +94,34 @@ describe('DocumentCardLargeComponent', () => {
it('should display search hits with colored score', () => {
// high
- component.document.__search_hit__ = {
- score: 0.9,
- rank: 1,
- highlights: 'cheesecake',
- }
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ __search_hit__: {
+ score: 0.9,
+ rank: 1,
+ highlights: 'cheesecake',
+ },
+ })
fixture.detectChanges()
let search_hit = fixture.debugElement.query(By.css('.search-score'))
expect(search_hit).not.toBeUndefined()
expect(component.searchScoreClass).toEqual('success')
// medium
- component.document.__search_hit__.score = 0.6
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ __search_hit__: { ...component.document().__search_hit__, score: 0.6 },
+ })
fixture.detectChanges()
search_hit = fixture.debugElement.query(By.css('.search-score'))
expect(search_hit).not.toBeUndefined()
expect(component.searchScoreClass).toEqual('warning')
// low
- component.document.__search_hit__.score = 0.1
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ __search_hit__: { ...component.document().__search_hit__, score: 0.1 },
+ })
fixture.detectChanges()
search_hit = fixture.debugElement.query(By.css('.search-score'))
expect(search_hit).not.toBeUndefined()
@@ -117,23 +129,29 @@ describe('DocumentCardLargeComponent', () => {
})
it('should display note highlights', () => {
- component.document.__search_hit__ = {
- score: 0.9,
- rank: 1,
- note_highlights: '<span>bananas</span>',
- }
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ __search_hit__: {
+ score: 0.9,
+ rank: 1,
+ note_highlights: '<span>bananas</span>',
+ },
+ })
fixture.detectChanges()
expect(fixture.nativeElement.textContent).toContain('bananas')
expect(component.searchNoteHighlights).toContain('<span>bananas</span>')
})
it('should fall back to document content when a search hit has no highlights', () => {
- component.document.__search_hit__ = {
- score: 0.9,
- rank: 1,
- highlights: '',
- note_highlights: null,
- }
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ __search_hit__: {
+ score: 0.9,
+ rank: 1,
+ highlights: '',
+ note_highlights: null,
+ },
+ })
fixture.detectChanges()
expect(fixture.nativeElement.textContent).toContain('Cupcake ipsum')
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts
index 8f77489ec..1dac73959 100644
--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts
+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts
@@ -3,10 +3,10 @@ import {
AfterViewInit,
Component,
EventEmitter,
- Input,
Output,
ViewChild,
inject,
+ input,
} from '@angular/core'
import { RouterModule } from '@angular/router'
import {
@@ -14,7 +14,6 @@ import {
NgbTooltipModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { delay, of } from 'rxjs'
import {
DEFAULT_DISPLAY_FIELDS,
DisplayField,
@@ -65,15 +64,14 @@ export class DocumentCardLargeComponent
{
private documentService = inject(DocumentService)
settingsService = inject(SettingsService)
+ readonly selected = input(false)
+ readonly displayFields = input<string[]>(
+ DEFAULT_DISPLAY_FIELDS.map((f) => f.id)
+ )
+ readonly document = input<Document>(undefined)
DisplayField = DisplayField
- @Input()
- selected = false
-
- @Input()
- displayFields: string[] = DEFAULT_DISPLAY_FIELDS.map((f) => f.id)
-
@Output()
toggleSelected = new EventEmitter()
@@ -81,9 +79,6 @@ export class DocumentCardLargeComponent
return this.toggleSelected.observers.length > 0
}
- @Input()
- document: Document
-
@Output()
dblClickDocument = new EventEmitter()
@@ -108,18 +103,15 @@ export class DocumentCardLargeComponent
popoverHidden = true
ngAfterViewInit(): void {
- of(true)
- .pipe(delay(50))
- .subscribe(() => {
- this.show = true
- })
+ this.show.set(true)
}
get searchScoreClass() {
- if (this.document.__search_hit__) {
- if (this.document.__search_hit__.score > 0.7) {
+ const document = this.document()
+ if (document.__search_hit__) {
+ if (document.__search_hit__.score > 0.7) {
return 'success'
- } else if (this.document.__search_hit__.score > 0.3) {
+ } else if (document.__search_hit__.score > 0.3) {
return 'warning'
} else {
return 'danger'
@@ -129,12 +121,10 @@ export class DocumentCardLargeComponent
get searchNoteHighlights() {
let highlights = []
- if (
- this.document['__search_hit__'] &&
- this.document['__search_hit__'].note_highlights
- ) {
+ const document = this.document()
+ if (document?.['__search_hit__']?.note_highlights) {
// only show notes with a match
- highlights = (this.document['__search_hit__'].note_highlights as string)
+ highlights = (document['__search_hit__'].note_highlights as string)
.split(',')
.filter((highlight) => highlight.includes('<span'))
}
@@ -146,11 +136,11 @@ export class DocumentCardLargeComponent
}
getThumbUrl() {
- return this.documentService.getThumbUrl(this.document.id)
+ return this.documentService.getThumbUrl(this.document().id)
}
getDownloadUrl() {
- return this.documentService.getDownloadUrl(this.document.id)
+ return this.documentService.getDownloadUrl(this.document().id)
}
mouseLeaveCard() {
@@ -158,19 +148,21 @@ export class DocumentCardLargeComponent
}
get contentTrimmed() {
+ const document = this.document()
return (
- this.document.content.substring(0, 500) +
- (this.document.content.length > 500 ? '...' : '')
+ document.content.substring(0, 500) +
+ (document.content.length > 500 ? '...' : '')
)
}
get hasSearchHighlights() {
- return Boolean(this.document?.__search_hit__?.highlights?.trim()?.length)
+ return Boolean(this.document()?.__search_hit__?.highlights?.trim()?.length)
}
get shouldShowContentFallback() {
+ const document = this.document()
return (
- this.document?.__search_hit__?.score == null ||
+ document?.__search_hit__?.score == null ||
(!this.hasSearchHighlights && this.searchNoteHighlights.length === 0)
)
}
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html
index b3a29aed4..a7a30c790 100644
--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html
+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html
@@ -1,21 +1,21 @@
-<div class="col p-2 h-100 fade" [class.show]="show">
- <div class="card h-100 shadow-sm document-card" [class.placeholder-glow]="!document" [class.card-selected]="selected" (mouseleave)="mouseLeaveCard()">
+<div class="col p-2 h-100 fade" [class.show]="show()">
+ <div class="card h-100 shadow-sm document-card" [class.placeholder-glow]="!document()" [class.card-selected]="selected()" (mouseleave)="mouseLeaveCard()">
<div class="border-bottom doc-img-container rounded-top" (click)="this.toggleSelected.emit($event)" (dblclick)="dblClickDocument.emit(this)">
- @if (document) {
+ @if (document()) {
<img class="card-img doc-img" [class.inverted]="getIsThumbInverted()" [src]="getThumbUrl()">
<div class="border-end border-bottom bg-light py-1 px-2 document-card-check">
<div class="form-check">
- <input type="checkbox" class="form-check-input" id="smallCardCheck{{document.id}}" [checked]="selected" (click)="this.toggleSelected.emit($event)">
- <label class="form-check-label" for="smallCardCheck{{document.id}}"></label>
+ <input type="checkbox" class="form-check-input" id="smallCardCheck{{document().id}}" [checked]="selected()" (click)="this.toggleSelected.emit($event)">
+ <label class="form-check-label" for="smallCardCheck{{document().id}}"></label>
</div>
</div>
} @else {
<div class="placeholder bg-secondary w-100 card-img doc-img"></div>
}
- @if (document && displayFields?.includes(DisplayField.TAGS)) {
- <div class="tags d-flex flex-column text-end position-absolute me-1 fs-6" [class.tags-no-wrap]="document.tags.length > 3">
+ @if (document() && displayFields().includes(DisplayField.TAGS)) {
+ <div class="tags d-flex flex-column text-end position-absolute me-1 fs-6" [class.tags-no-wrap]="document().tags.length > 3">
@for (tagID of tagIDs; track tagID) {
<pngx-tag [tagID]="tagID" (click)="clickTag.emit(tagID);$event.stopPropagation()" [clickable]="true" linkTitle="Toggle tag filter" i18n-linkTitle></pngx-tag>
}
@@ -28,23 +28,23 @@
}
</div>
- @if (document && displayFields.includes(DisplayField.NOTES) && notesEnabled && document.notes.length) {
- <a routerLink="/documents/{{document.id}}/notes" class="document-card-notes py-2 px-1">
+ @if (document() && displayFields().includes(DisplayField.NOTES) && notesEnabled && document().notes.length) {
+ <a routerLink="/documents/{{document().id}}/notes" class="document-card-notes py-2 px-1">
<span class="badge rounded-pill bg-light border text-primary">
<i-bs width="1.2em" height="1.2em" class="ms-1 me-1" name="chat-left-text"></i-bs>
- {{document.notes.length}}</span>
+ {{document().notes.length}}</span>
</a>
}
<div class="card-body bg-light p-2">
<p class="card-text">
- @if (document) {
- @if (displayFields.includes(DisplayField.CORRESPONDENT) && document.correspondent) {
- <a title="Toggle correspondent filter" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="fw-bold btn-link">{{document.correspondent | correspondentName | async}}</a>
- @if (displayFields.includes(DisplayField.TITLE)) {:}
+ @if (document()) {
+ @if (displayFields().includes(DisplayField.CORRESPONDENT) && document().correspondent) {
+ <a title="Toggle correspondent filter" i18n-title (click)="clickCorrespondent.emit(document().correspondent);$event.stopPropagation()" class="fw-bold btn-link">{{document().correspondent | correspondentName | async}}</a>
+ @if (displayFields().includes(DisplayField.TITLE)) {:}
}
- @if (displayFields.includes(DisplayField.TITLE)) {
- {{document.title | documentTitle}}
+ @if (displayFields().includes(DisplayField.TITLE)) {
+ {{document().title | documentTitle}}
}
} @else {
<div class="placeholder bg-secondary w-100"></div>
@@ -54,82 +54,82 @@
</div>
<div class="card-footer pt-0 pb-2 px-2">
<div class="list-group list-group-flush border-0 pt-1 pb-2 card-info">
- @if (document) {
- @if (displayFields.includes(DisplayField.DOCUMENT_TYPE) && document.document_type) {
+ @if (document()) {
+ @if (displayFields().includes(DisplayField.DOCUMENT_TYPE) && document().document_type) {
<button type="button" class="list-group-item list-group-item-action bg-transparent ps-0 p-1 border-0" title="Toggle document type filter" i18n-title
- (click)="clickDocumentType.emit(document.document_type);$event.stopPropagation()">
+ (click)="clickDocumentType.emit(document().document_type);$event.stopPropagation()">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="file-earmark"></i-bs>
- <small>{{document.document_type | documentTypeName | async}}</small>
+ <small>{{document().document_type | documentTypeName | async}}</small>
</button>
}
- @if (displayFields.includes(DisplayField.STORAGE_PATH) && document.storage_path) {
+ @if (displayFields().includes(DisplayField.STORAGE_PATH) && document().storage_path) {
<button type="button" class="list-group-item list-group-item-action bg-transparent ps-0 p-1 border-0" title="Toggle storage path filter" i18n-title
- (click)="clickStoragePath.emit(document.storage_path);$event.stopPropagation()">
+ (click)="clickStoragePath.emit(document().storage_path);$event.stopPropagation()">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="folder"></i-bs>
- <small>{{document.storage_path | storagePathName | async}}</small>
+ <small>{{document().storage_path | storagePathName | async}}</small>
</button>
}
- @if (displayFields.includes(DisplayField.CREATED)) {
+ @if (displayFields().includes(DisplayField.CREATED)) {
<div class="list-group-item bg-transparent p-0 border-0 d-flex flex-wrap-reverse justify-content-between">
<ng-template #dateCreatedTooltip>
<div class="d-flex flex-column text-light">
- <span i18n>Created: {{ document.created | customDate }}</span>
- <span i18n>Added: {{ document.added | customDate }}</span>
- <span i18n>Modified: {{ document.modified | customDate }}</span>
+ <span i18n>Created: {{ document().created | customDate }}</span>
+ <span i18n>Added: {{ document().added | customDate }}</span>
+ <span i18n>Modified: {{ document().modified | customDate }}</span>
</div>
</ng-template>
<div class="ps-0 p-1" placement="top" [ngbTooltip]="dateCreatedTooltip">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="calendar-event"></i-bs>
- <small>{{document.created | customDate:'mediumDate'}}</small>
+ <small>{{document().created | customDate:'mediumDate'}}</small>
</div>
</div>
}
- @if (displayFields.includes(DisplayField.ADDED)) {
+ @if (displayFields().includes(DisplayField.ADDED)) {
<div class="list-group-item bg-transparent p-0 border-0 d-flex flex-wrap-reverse justify-content-between">
<ng-template #dateAddedTooltip>
<div class="d-flex flex-column text-light">
- <span i18n>Created: {{ document.created | customDate }}</span>
- <span i18n>Added: {{ document.added | customDate }}</span>
- <span i18n>Modified: {{ document.modified | customDate }}</span>
+ <span i18n>Created: {{ document().created | customDate }}</span>
+ <span i18n>Added: {{ document().added | customDate }}</span>
+ <span i18n>Modified: {{ document().modified | customDate }}</span>
</div>
</ng-template>
<div class="ps-0 p-1" placement="top" [ngbTooltip]="dateAddedTooltip">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="calendar-event"></i-bs>
- <small>{{document.added | customDate:'mediumDate'}}</small>
+ <small>{{document().added | customDate:'mediumDate'}}</small>
</div>
</div>
}
- @if (displayFields.includes(DisplayField.PAGE_COUNT) && document.page_count) {
+ @if (displayFields().includes(DisplayField.PAGE_COUNT) && document().page_count) {
<div class="list-group-item bg-transparent p-0 border-0 d-flex flex-wrap-reverse justify-content-between">
<div class="ps-0 p-1" placement="top">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="files"></i-bs>
- <small i18n>{document.page_count, plural, =1 {1 page} other {{{document.page_count}} pages}}</small>
+ <small i18n>{document().page_count, plural, =1 {1 page} other {{{document().page_count}} pages}}</small>
</div>
</div>
}
- @if (displayFields.includes(DisplayField.ASN) && document.archive_serial_number | isNumber) {
+ @if (displayFields().includes(DisplayField.ASN) && document().archive_serial_number | isNumber) {
<div class="ps-0 p-1">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="upc-scan"></i-bs>
- <small>#{{document.archive_serial_number}}</small>
+ <small>#{{document().archive_serial_number}}</small>
</div>
}
- @if (displayFields.includes(DisplayField.OWNER) && document.owner && document.owner !== settingsService.currentUser.id) {
+ @if (displayFields().includes(DisplayField.OWNER) && document().owner && document().owner !== settingsService.currentUser().id) {
<div class="ps-0 p-1">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="person-fill-lock"></i-bs>
- <small>{{document.owner | username | async}}</small>
+ <small>{{document().owner | username | async}}</small>
</div>
}
- @if (displayFields.includes(DisplayField.SHARED) && document.is_shared_by_requester) {
+ @if (displayFields().includes(DisplayField.SHARED) && document().is_shared_by_requester) {
<div class="ps-0 p-1">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="people-fill"></i-bs>
<small i18n>Shared</small>
</div>
}
- @for (field of document.custom_fields; track field.field) {
- @if (displayFields.includes(DisplayField.CUSTOM_FIELD + field.field)) {
+ @for (field of document().custom_fields; track field.field) {
+ @if (displayFields().includes(DisplayField.CUSTOM_FIELD + field.field)) {
<div class="ps-0 p-1 d-flex align-items-center overflow-hidden">
<i-bs width="1em" height="1em" class="me-2 text-muted" name="ui-radios"></i-bs>
- <small><pngx-custom-field-display [document]="document" [fieldId]="field.field" showNameIfEmpty="true"></pngx-custom-field-display></small>
+ <small><pngx-custom-field-display [document]="document()" [fieldId]="field.field" showNameIfEmpty="true"></pngx-custom-field-display></small>
</div>
}
}
@@ -139,11 +139,11 @@
</div>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group w-100">
- @if (document) {
- <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" title="Open" i18n-title *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }" i18n-title>
+ @if (document()) {
+ <a routerLink="/documents/{{document().id}}" class="btn btn-sm btn-outline-secondary" title="Open" i18n-title *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }" i18n-title>
<i-bs name="file-earmark-richtext"></i-bs>
</a>
- <pngx-preview-popup [document]="document" #popupPreview>
+ <pngx-preview-popup [document]="document()" #popupPreview>
<i-bs name="eye"></i-bs>
</pngx-preview-popup>
<a [href]="getDownloadUrl()" class="btn btn-sm btn-outline-secondary" title="Download" i18n-title (click)="$event.stopPropagation()">
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss
index dce77802e..6f2260e47 100644
--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss
+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss
@@ -2,6 +2,26 @@
font-size: 90%;
}
+.fade.show {
+ animation: pngx-entry-fade 160ms ease-out;
+}
+
+@keyframes pngx-entry-fade {
+ from {
+ opacity: 0;
+ }
+
+ to {
+ opacity: 1;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .fade.show {
+ animation: none;
+ }
+}
+
.doc-img {
object-fit: cover;
object-position: top left;
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts
index 982b3980b..45b812462 100644
--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts
+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts
@@ -46,16 +46,15 @@ describe('DocumentCardSmallComponent', () => {
fixture = TestBed.createComponent(DocumentCardSmallComponent)
component = fixture.componentInstance
- component.document = Object.assign({}, doc)
+ fixture.componentRef.setInput('document', Object.assign({}, doc))
fixture.detectChanges()
jest.useFakeTimers()
})
it('should show the card', () => {
- expect(component.show).toBeFalsy()
+ expect(component.show()).toBeTruthy()
component.ngAfterViewInit()
- jest.advanceTimersByTime(100)
- expect(component.show).toBeTruthy()
+ expect(component.show()).toBeTruthy()
})
it('should display page count', () => {
@@ -67,7 +66,10 @@ describe('DocumentCardSmallComponent', () => {
expect(
fixture.debugElement.queryAll(By.directive(TagComponent))
).toHaveLength(5)
- component.document.tags = [1, 2]
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ tags: [1, 2],
+ })
fixture.detectChanges()
expect(
fixture.debugElement.queryAll(By.directive(TagComponent))
@@ -75,7 +77,10 @@ describe('DocumentCardSmallComponent', () => {
})
it('should increase limit tags to 6 if no notes', () => {
- component.document.notes = []
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ notes: [],
+ })
fixture.detectChanges()
expect(
fixture.debugElement.queryAll(By.directive(TagComponent))
@@ -85,7 +90,10 @@ describe('DocumentCardSmallComponent', () => {
it('should clear hidden tag counter when tag count falls below the limit', () => {
expect(component.moreTags).toEqual(3)
- component.document.tags = [1, 2, 3, 4, 5, 6]
+ fixture.componentRef.setInput('document', {
+ ...component.document(),
+ tags: [1, 2, 3, 4, 5, 6],
+ })
fixture.detectChanges()
expect(component.moreTags).toBeNull()
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts
index 05f84d752..1e45b982a 100644
--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts
+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts
@@ -3,10 +3,10 @@ import {
AfterViewInit,
Component,
EventEmitter,
- Input,
Output,
ViewChild,
inject,
+ input,
} from '@angular/core'
import { RouterModule } from '@angular/router'
import {
@@ -14,8 +14,6 @@ import {
NgbTooltipModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { of } from 'rxjs'
-import { delay } from 'rxjs/operators'
import {
DEFAULT_DISPLAY_FIELDS,
DisplayField,
@@ -66,21 +64,17 @@ export class DocumentCardSmallComponent
{
private documentService = inject(DocumentService)
settingsService = inject(SettingsService)
+ readonly selected = input(false)
+ readonly document = input<Document>(undefined)
+ readonly displayFields = input<string[]>(
+ DEFAULT_DISPLAY_FIELDS.map((f) => f.id)
+ )
DisplayField = DisplayField
- @Input()
- selected = false
-
@Output()
toggleSelected = new EventEmitter()
- @Input()
- document: Document
-
- @Input()
- displayFields: string[] = DEFAULT_DISPLAY_FIELDS.map((f) => f.id)
-
@Output()
dblClickDocument = new EventEmitter()
@@ -96,16 +90,18 @@ export class DocumentCardSmallComponent
@Output()
clickStoragePath = new EventEmitter<number>()
- moreTags: number = null
+ get moreTags(): number {
+ const document = this.document()
+ const limit = document?.notes.length > 0 ? 6 : 7
+ return document?.tags.length > limit
+ ? document.tags.length - (limit - 1)
+ : null
+ }
@ViewChild('popupPreview') popupPreview: PreviewPopupComponent
ngAfterViewInit(): void {
- of(true)
- .pipe(delay(50))
- .subscribe(() => {
- this.show = true
- })
+ this.show.set(true)
}
getIsThumbInverted() {
@@ -113,21 +109,20 @@ export class DocumentCardSmallComponent
}
getThumbUrl() {
- return this.documentService.getThumbUrl(this.document.id)
+ return this.documentService.getThumbUrl(this.document().id)
}
getDownloadUrl() {
- return this.documentService.getDownloadUrl(this.document.id)
+ return this.documentService.getDownloadUrl(this.document().id)
}
get tagIDs() {
- const limit = this.document.notes.length > 0 ? 6 : 7
- if (this.document.tags.length > limit) {
- this.moreTags = this.document.tags.length - (limit - 1)
- return this.document.tags.slice(0, limit - 1)
+ const document = this.document()
+ const limit = document.notes.length > 0 ? 6 : 7
+ if (document.tags.length > limit) {
+ return document.tags.slice(0, limit - 1)
} else {
- this.moreTags = null
- return this.document.tags
+ return document.tags
}
}
diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html
index aadec7d77..b33322cdf 100644
--- a/src-ui/src/app/components/document-list/document-list.component.html
+++ b/src-ui/src/app/components/document-list/document-list.component.html
@@ -36,7 +36,7 @@
</button>
<div ngbDropdownMenu aria-labelledby="dropdownDisplayFields" class="shadow">
<div class="px-3">
- @for (field of settingsService.allDisplayFields; track field.id) {
+ @for (field of settingsService.allDisplayFields(); track field.id) {
<div class="form-check my-1">
<input class="form-check-input mt-1" type="checkbox" id="displayField{{field.id}}" [checked]="activeDisplayFields.includes(field.id)" (change)="toggleDisplayField(field.id)">
<label class="form-check-label" for="displayField{{field.id}}">{{field.name}}</label>
diff --git a/src-ui/src/app/components/document-list/document-list.component.spec.ts b/src-ui/src/app/components/document-list/document-list.component.spec.ts
index 9ea7f27de..3ef7a7ffa 100644
--- a/src-ui/src/app/components/document-list/document-list.component.spec.ts
+++ b/src-ui/src/app/components/document-list/document-list.component.spec.ts
@@ -730,7 +730,9 @@ describe('DocumentListComponent', () => {
showInSideBar: true,
})
expect(updateVisibilitySpy).not.toHaveBeenCalled()
- expect(openModal.componentInstance.error).toEqual({ filter_rules: ['11'] })
+ expect(openModal.componentInstance.error()).toEqual({
+ filter_rules: ['11'],
+ })
})
it('should detect saved view changes', () => {
@@ -777,7 +779,7 @@ describe('DocumentListComponent', () => {
})
it('should hide columns if no perms or notes disabled', () => {
- jest.spyOn(permissionService, 'currentUserCan').mockReturnValue(true)
+ permissionService.initialize([], { is_superuser: true } as any)
jest.spyOn(documentListService, 'documents', 'get').mockReturnValue(docs)
expect(documentListService.sortField).toEqual('created')
@@ -798,7 +800,7 @@ describe('DocumentListComponent', () => {
).toHaveLength(9)
// insufficient perms
- jest.spyOn(permissionService, 'currentUserCan').mockReturnValue(false)
+ permissionService.initialize([], { is_superuser: false } as any)
fixture.detectChanges()
expect(
fixture.debugElement.queryAll(By.directive(SortableDirective))
@@ -837,11 +839,10 @@ describe('DocumentListComponent', () => {
it('should get custom field title', () => {
fixture.detectChanges()
- jest
- .spyOn(settingsService, 'allDisplayFields', 'get')
- .mockReturnValue([
- { id: 'custom_field_1' as any, name: 'Custom Field 1' },
- ])
+ const mockDisplayFields = [
+ { id: 'custom_field_1' as any, name: 'Custom Field 1' },
+ ]
+ settingsService.allDisplayFields = jest.fn(() => mockDisplayFields) as any
expect(component.getDisplayCustomFieldTitle('custom_field_1')).toEqual(
'Custom Field 1'
)
diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.ts
index eb453d4dc..ee8f3bd55 100644
--- a/src-ui/src/app/components/document-list/document-list.component.ts
+++ b/src-ui/src/app/components/document-list/document-list.component.ts
@@ -255,7 +255,7 @@ export class DocumentListComponent
}
public getDisplayCustomFieldTitle(field: string) {
- return this.settingsService.allDisplayFields.find((f) => f.id === field)
+ return this.settingsService.allDisplayFields().find((f) => f.id === field)
?.name
}
@@ -449,9 +449,11 @@ export class DocumentListComponent
let modal = this.modalService.open(SaveViewConfigDialogComponent, {
backdrop: 'static',
})
- modal.componentInstance.defaultName = this.filterEditor.generateFilterName()
+ modal.componentInstance.setDefaultName(
+ this.filterEditor.generateFilterName()
+ )
modal.componentInstance.saveClicked.pipe(first()).subscribe((formValue) => {
- modal.componentInstance.buttonsEnabled = false
+ modal.componentInstance.buttonsEnabled.set(false)
let savedView: SavedView = {
name: formValue.name,
filter_rules: this.list.filterRules,
@@ -502,8 +504,8 @@ export class DocumentListComponent
if (error.filter_rules) {
error.filter_rules = error.filter_rules.map((r) => r.value)
}
- modal.componentInstance.error = error
- modal.componentInstance.buttonsEnabled = true
+ modal.componentInstance.error.set(error)
+ modal.componentInstance.buttonsEnabled.set(true)
},
})
})
@@ -570,6 +572,7 @@ export class DocumentListComponent
}
get notesEnabled(): boolean {
+ this.settingsService.trackChanges()
return this.settingsService.get(SETTINGS_KEYS.NOTES_ENABLED)
}
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html
index f4a7938b7..2a03727f6 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html
@@ -1,6 +1,6 @@
<div class="row flex-wrap row-gap-3" tourAnchor="tour.documents-filter-editor">
<div class="col">
- <div class="form-inline d-flex align-items-center fade" [class.show]="show">
+ <div class="form-inline d-flex align-items-center fade" [class.show]="show()">
<div class="input-group input-group-sm flex-fill w-auto flex-nowrap">
<div ngbDropdown>
<button class="btn btn-sm btn-outline-primary" ngbDropdownToggle>{{textFilterTargetName}}</button>
@@ -36,7 +36,7 @@
<div class="d-flex flex-wrap gap-3">
<div class="d-flex flex-wrap gap-2">
@if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.Tag) && tagSelectionModel.items.length > 0) {
- <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show" title="Tags" icon="tag-fill" i18n-title
+ <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show()" title="Tags" icon="tag-fill" i18n-title
filterPlaceholder="Filter tags" i18n-filterPlaceholder
[(selectionModel)]="tagSelectionModel"
(selectionModelChange)="updateRules()"
@@ -47,7 +47,7 @@
shortcutKey="t"></pngx-filterable-dropdown>
}
@if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.Correspondent) && correspondentSelectionModel.items.length > 0) {
- <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show" title="Correspondent" icon="person-fill" i18n-title
+ <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show()" title="Correspondent" icon="person-fill" i18n-title
filterPlaceholder="Filter correspondents" i18n-filterPlaceholder
[(selectionModel)]="correspondentSelectionModel"
(selectionModelChange)="updateRules()"
@@ -58,7 +58,7 @@
shortcutKey="y"></pngx-filterable-dropdown>
}
@if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.DocumentType) && documentTypeSelectionModel.items.length > 0) {
- <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show" title="Document type" icon="file-earmark-fill" i18n-title
+ <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show()" title="Document type" icon="file-earmark-fill" i18n-title
filterPlaceholder="Filter document types" i18n-filterPlaceholder
[(selectionModel)]="documentTypeSelectionModel"
(selectionModelChange)="updateRules()"
@@ -69,7 +69,7 @@
shortcutKey="u"></pngx-filterable-dropdown>
}
@if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.StoragePath) && storagePathSelectionModel.items.length > 0) {
- <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show" title="Storage path" icon="folder-fill" i18n-title
+ <pngx-filterable-dropdown class="flex-fill fade" [class.show]="show()" title="Storage path" icon="folder-fill" i18n-title
filterPlaceholder="Filter storage paths" i18n-filterPlaceholder
[(selectionModel)]="storagePathSelectionModel"
(selectionModelChange)="updateRules()"
@@ -81,12 +81,12 @@
}
@if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.CustomField) && customFields.length > 0) {
- <pngx-custom-fields-query-dropdown class="flex-fill fade" [class.show]="show" title="Custom fields" icon="ui-radios" i18n-title
+ <pngx-custom-fields-query-dropdown class="flex-fill fade" [class.show]="show()" title="Custom fields" icon="ui-radios" i18n-title
[(selectionModel)]="customFieldQueriesModel"
(selectionModelChange)="updateRules()"
></pngx-custom-fields-query-dropdown>
}
- <pngx-dates-dropdown class="flex-fill fade" [class.show]="show"
+ <pngx-dates-dropdown class="flex-fill fade" [class.show]="show()"
title="Dates" i18n-title
placement="bottom-end"
(datesSet)="updateRules()"
@@ -97,7 +97,7 @@
[(addedDateFrom)]="dateAddedFrom"
[(addedRelativeDate)]="dateAddedRelativeDate">
</pngx-dates-dropdown>
- <pngx-permissions-filter-dropdown class="flex-fill fade" [class.show]="show"
+ <pngx-permissions-filter-dropdown class="flex-fill fade" [class.show]="show()"
title="Permissions" i18n-title
(ownerFilterSet)="updateRules()"
[(selectionModel)]="permissionsSelectionModel"></pngx-permissions-filter-dropdown>
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts
index d75e38630..63d61fbad 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts
@@ -4,12 +4,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { By } from '@angular/platform-browser'
import { RouterModule } from '@angular/router'
@@ -189,8 +184,13 @@ describe('FilterEditorComponent', () => {
let httpTestingController: HttpTestingController
let searchService: SearchService
- beforeEach(fakeAsync(() => {
- TestBed.configureTestingModule({
+ const tick = (ms: number = 0) => {
+ jest.advanceTimersByTime(ms)
+ fixture.detectChanges()
+ }
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
imports: [
RouterModule,
NgbDropdownModule,
@@ -260,7 +260,7 @@ describe('FilterEditorComponent', () => {
documentService = TestBed.inject(DocumentService)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = users[0]
+ settingsService.currentUser.set(users[0])
permissionsService = TestBed.inject(PermissionsService)
searchService = TestBed.inject(SearchService)
jest
@@ -275,8 +275,13 @@ describe('FilterEditorComponent', () => {
component = fixture.componentInstance
component.filterRules = []
fixture.detectChanges()
- tick()
- }))
+ await fixture.whenStable()
+ jest.useFakeTimers()
+ })
+
+ afterEach(() => {
+ jest.useRealTimers()
+ })
it('should not attempt to retrieve objects if user does not have permissions', () => {
jest.spyOn(permissionsService, 'currentUserCan').mockReset()
@@ -298,7 +303,7 @@ describe('FilterEditorComponent', () => {
// SET filterRules
- it('should ingest text filter rules for doc title', fakeAsync(() => {
+ it('should ingest text filter rules for doc title', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -308,9 +313,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('foo')
expect(component.textFilterTarget).toEqual('title') // TEXT_FILTER_TARGET_TITLE
- }))
+ })
- it('should ingest text filter rules for doc title + content', fakeAsync(() => {
+ it('should ingest text filter rules for doc title + content', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -320,9 +325,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('foo')
expect(component.textFilterTarget).toEqual('title-content') // TEXT_FILTER_TARGET_TITLE_CONTENT
- }))
+ })
- it('should ingest legacy text filter rules for doc title + content', fakeAsync(() => {
+ it('should ingest legacy text filter rules for doc title + content', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -332,9 +337,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('legacy foo')
expect(component.textFilterTarget).toEqual('title-content') // TEXT_FILTER_TARGET_TITLE_CONTENT
- }))
+ })
- it('should ingest text filter rules for doc asn', fakeAsync(() => {
+ it('should ingest text filter rules for doc asn', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -344,9 +349,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('foo')
expect(component.textFilterTarget).toEqual('asn') // TEXT_FILTER_TARGET_ASN
- }))
+ })
- it('should ingest text filter rules for custom fields', fakeAsync(() => {
+ it('should ingest text filter rules for custom fields', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -356,9 +361,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('foo')
expect(component.textFilterTarget).toEqual('custom-fields') // TEXT_FILTER_TARGET_CUSTOM_FIELDS
- }))
+ })
- it('should ingest text filter rules for doc asn is null', fakeAsync(() => {
+ it('should ingest text filter rules for doc asn is null', () => {
expect(component.textFilterTarget).toEqual('title-content')
expect(component.textFilterModifier).toEqual('equals') // TEXT_FILTER_MODIFIER_EQUALS
component.filterRules = [
@@ -369,9 +374,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilterTarget).toEqual('asn') // TEXT_FILTER_TARGET_ASN
expect(component.textFilterModifier).toEqual('is null') // TEXT_FILTER_MODIFIER_NULL
- }))
+ })
- it('should ingest text filter rules for doc asn is not null', fakeAsync(() => {
+ it('should ingest text filter rules for doc asn is not null', () => {
expect(component.textFilterTarget).toEqual('title-content')
expect(component.textFilterModifier).toEqual('equals') // TEXT_FILTER_MODIFIER_EQUALS
component.filterRules = [
@@ -382,9 +387,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilterTarget).toEqual('asn') // TEXT_FILTER_TARGET_ASN
expect(component.textFilterModifier).toEqual('not null') // TEXT_FILTER_MODIFIER_NOTNULL
- }))
+ })
- it('should ingest text filter rules for doc asn greater than', fakeAsync(() => {
+ it('should ingest text filter rules for doc asn greater than', () => {
expect(component.textFilterTarget).toEqual('title-content')
expect(component.textFilterModifier).toEqual('equals') // TEXT_FILTER_MODIFIER_EQUALS
component.filterRules = [
@@ -395,9 +400,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilterTarget).toEqual('asn') // TEXT_FILTER_TARGET_ASN
expect(component.textFilterModifier).toEqual('greater') // TEXT_FILTER_MODIFIER_GT
- }))
+ })
- it('should ingest text filter rules for doc asn less than', fakeAsync(() => {
+ it('should ingest text filter rules for doc asn less than', () => {
expect(component.textFilterTarget).toEqual('title-content')
expect(component.textFilterModifier).toEqual('equals') // TEXT_FILTER_MODIFIER_EQUALS
component.filterRules = [
@@ -408,9 +413,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilterTarget).toEqual('asn') // TEXT_FILTER_TARGET_ASN
expect(component.textFilterModifier).toEqual('less') // TEXT_FILTER_MODIFIER_LT
- }))
+ })
- it('should ingest text filter rules for mime type', fakeAsync(() => {
+ it('should ingest text filter rules for mime type', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -420,9 +425,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('pdf')
expect(component.textFilterTarget).toEqual('mime-type') // TEXT_FILTER_TARGET_MIME_TYPE
- }))
+ })
- it('should ingest text filter rules for fulltext query', fakeAsync(() => {
+ it('should ingest text filter rules for fulltext query', () => {
expect(component.textFilter).toEqual(null)
component.filterRules = [
{
@@ -432,9 +437,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.textFilter).toEqual('foo,bar')
expect(component.textFilterTarget).toEqual('fulltext-query') // TEXT_FILTER_TARGET_FULLTEXT_QUERY
- }))
+ })
- it('should ingest text filter rules for fulltext query that include date created', fakeAsync(() => {
+ it('should ingest text filter rules for fulltext query that include date created', () => {
expect(component.dateCreatedRelativeDate).toBeNull()
component.filterRules = [
{
@@ -444,9 +449,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.dateCreatedRelativeDate).toEqual(1) // RELATIVE_DATE_QUERYSTRINGS['-1 week to now']
expect(component.textFilter).toBeNull()
- }))
+ })
- it('should ingest text filter rules for fulltext query that include date added', fakeAsync(() => {
+ it('should ingest text filter rules for fulltext query that include date added', () => {
expect(component.dateAddedRelativeDate).toBeNull()
component.filterRules = [
{
@@ -456,9 +461,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.dateAddedRelativeDate).toEqual(1) // RELATIVE_DATE_QUERYSTRINGS['-1 week to now']
expect(component.textFilter).toBeNull()
- }))
+ })
- it('should ingest text filter content with relative dates that are not in quick list', fakeAsync(() => {
+ it('should ingest text filter content with relative dates that are not in quick list', () => {
expect(component.dateAddedRelativeDate).toBeNull()
component.filterRules = [
{
@@ -478,9 +483,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.dateCreatedRelativeDate).toBeNull()
expect(component.textFilter).toEqual('created:[-2 week to now]')
- }))
+ })
- it('should ingest text filter rules for more like', fakeAsync(() => {
+ it('should ingest text filter rules for more like', () => {
const moreLikeSpy = jest.spyOn(documentService, 'get')
moreLikeSpy.mockReturnValue(of({ id: 1, title: 'Foo Bar' }))
expect(component.textFilter).toEqual(null)
@@ -500,9 +505,9 @@ describe('FilterEditorComponent', () => {
value: '1',
},
])
- }))
+ })
- it('should ingest filter rules for date created after and adjust date by 1 day', fakeAsync(() => {
+ it('should ingest filter rules for date created after and adjust date by 1 day', () => {
expect(component.dateCreatedFrom).toBeNull()
component.filterRules = [
{
@@ -511,9 +516,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateCreatedFrom).toEqual('2023-05-15')
- }))
+ })
- it('should ingest filter rules for date created from', fakeAsync(() => {
+ it('should ingest filter rules for date created from', () => {
expect(component.dateCreatedFrom).toBeNull()
component.filterRules = [
{
@@ -522,9 +527,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateCreatedFrom).toEqual('2023-05-14')
- }))
+ })
- it('should ingest filter rules for date created before and adjust date by 1 day', fakeAsync(() => {
+ it('should ingest filter rules for date created before and adjust date by 1 day', () => {
expect(component.dateCreatedTo).toBeNull()
component.filterRules = [
{
@@ -533,9 +538,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateCreatedTo).toEqual('2023-05-13')
- }))
+ })
- it('should ingest filter rules for date created to', fakeAsync(() => {
+ it('should ingest filter rules for date created to', () => {
expect(component.dateCreatedTo).toBeNull()
component.filterRules = [
{
@@ -544,9 +549,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateCreatedTo).toEqual('2023-05-14')
- }))
+ })
- it('should ingest filter rules for date added after and adjust date by 1 day', fakeAsync(() => {
+ it('should ingest filter rules for date added after and adjust date by 1 day', () => {
expect(component.dateAddedFrom).toBeNull()
component.filterRules = [
{
@@ -555,9 +560,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateAddedFrom).toEqual('2023-05-15')
- }))
+ })
- it('should ingest filter rules for date added from', fakeAsync(() => {
+ it('should ingest filter rules for date added from', () => {
expect(component.dateAddedFrom).toBeNull()
component.filterRules = [
{
@@ -566,9 +571,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateAddedFrom).toEqual('2023-05-14')
- }))
+ })
- it('should ingest filter rules for date added before and adjust date by 1 day', fakeAsync(() => {
+ it('should ingest filter rules for date added before and adjust date by 1 day', () => {
expect(component.dateAddedTo).toBeNull()
component.filterRules = [
{
@@ -577,9 +582,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateAddedTo).toEqual('2023-05-13')
- }))
+ })
- it('should ingest filter rules for date added to', fakeAsync(() => {
+ it('should ingest filter rules for date added to', () => {
expect(component.dateAddedTo).toBeNull()
component.filterRules = [
{
@@ -588,9 +593,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.dateAddedTo).toEqual('2023-05-14')
- }))
+ })
- it('should ingest filter rules for has all tags', fakeAsync(() => {
+ it('should ingest filter rules for has all tags', () => {
expect(component.tagSelectionModel.getSelectedItems()).toHaveLength(0)
component.filterRules = [
{
@@ -614,9 +619,9 @@ describe('FilterEditorComponent', () => {
},
]
component.toggleTag(2) // coverage
- }))
+ })
- it('should ingest filter rules for has any tags', fakeAsync(() => {
+ it('should ingest filter rules for has any tags', () => {
expect(component.tagSelectionModel.getSelectedItems()).toHaveLength(0)
component.filterRules = [
{
@@ -639,9 +644,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for has any tag', fakeAsync(() => {
+ it('should ingest filter rules for has any tag', () => {
expect(component.tagSelectionModel.getSelectedItems()).toHaveLength(0)
component.filterRules = [
{
@@ -651,9 +656,9 @@ describe('FilterEditorComponent', () => {
]
expect(component.tagSelectionModel.getSelectedItems()).toHaveLength(1)
expect(component.tagSelectionModel.get(null)).toBeTruthy()
- }))
+ })
- it('should ingest filter rules for exclude tag(s)', fakeAsync(() => {
+ it('should ingest filter rules for exclude tag(s)', () => {
expect(component.tagSelectionModel.getExcludedItems()).toHaveLength(0)
component.filterRules = [
{
@@ -676,9 +681,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for has correspondent', fakeAsync(() => {
+ it('should ingest filter rules for has correspondent', () => {
expect(
component.correspondentSelectionModel.getSelectedItems()
).toHaveLength(0)
@@ -708,9 +713,9 @@ describe('FilterEditorComponent', () => {
expect(component.correspondentSelectionModel.getExcludedItems()).toEqual([
{ id: NEGATIVE_NULL_FILTER_VALUE, name: 'Not assigned' },
])
- }))
+ })
- it('should ingest filter rules for has any of correspondents', fakeAsync(() => {
+ it('should ingest filter rules for has any of correspondents', () => {
expect(
component.correspondentSelectionModel.getSelectedItems()
).toHaveLength(0)
@@ -740,9 +745,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for does not have any of correspondents', fakeAsync(() => {
+ it('should ingest filter rules for does not have any of correspondents', () => {
expect(
component.correspondentSelectionModel.getExcludedItems()
).toHaveLength(0)
@@ -769,9 +774,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for has document type', fakeAsync(() => {
+ it('should ingest filter rules for has document type', () => {
expect(
component.documentTypeSelectionModel.getSelectedItems()
).toHaveLength(0)
@@ -801,9 +806,9 @@ describe('FilterEditorComponent', () => {
expect(component.documentTypeSelectionModel.getExcludedItems()).toEqual([
{ id: NEGATIVE_NULL_FILTER_VALUE, name: 'Not assigned' },
])
- }))
+ })
- it('should ingest filter rules for has any of document types', fakeAsync(() => {
+ it('should ingest filter rules for has any of document types', () => {
expect(
component.documentTypeSelectionModel.getSelectedItems()
).toHaveLength(0)
@@ -830,9 +835,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for does not have any of document types', fakeAsync(() => {
+ it('should ingest filter rules for does not have any of document types', () => {
expect(
component.documentTypeSelectionModel.getExcludedItems()
).toHaveLength(0)
@@ -859,9 +864,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for has storage path', fakeAsync(() => {
+ it('should ingest filter rules for has storage path', () => {
expect(component.storagePathSelectionModel.getSelectedItems()).toHaveLength(
0
)
@@ -891,9 +896,9 @@ describe('FilterEditorComponent', () => {
expect(component.storagePathSelectionModel.getExcludedItems()).toEqual([
{ id: NEGATIVE_NULL_FILTER_VALUE, name: 'Not assigned' },
])
- }))
+ })
- it('should ingest filter rules for has any of storage paths', fakeAsync(() => {
+ it('should ingest filter rules for has any of storage paths', () => {
expect(component.storagePathSelectionModel.getSelectedItems()).toHaveLength(
0
)
@@ -923,9 +928,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for does not have any of storage paths', fakeAsync(() => {
+ it('should ingest filter rules for does not have any of storage paths', () => {
expect(component.storagePathSelectionModel.getExcludedItems()).toHaveLength(
0
)
@@ -952,9 +957,9 @@ describe('FilterEditorComponent', () => {
value: null,
},
]
- }))
+ })
- it('should ingest filter rules for custom fields all', fakeAsync(() => {
+ it('should ingest filter rules for custom fields all', () => {
expect(component.customFieldQueriesModel.isEmpty()).toBeTruthy()
component.filterRules = [
{
@@ -972,9 +977,9 @@ describe('FilterEditorComponent', () => {
.value[0] as CustomFieldQueryAtom
).serialize()
).toEqual(['42', CustomFieldQueryOperator.Exists, 'true'])
- }))
+ })
- it('should ingest filter rules for has any custom fields', fakeAsync(() => {
+ it('should ingest filter rules for has any custom fields', () => {
expect(component.customFieldQueriesModel.isEmpty()).toBeTruthy()
component.filterRules = [
{
@@ -992,9 +997,9 @@ describe('FilterEditorComponent', () => {
.value[0] as CustomFieldQueryAtom
).serialize()
).toEqual(['42', CustomFieldQueryOperator.Exists, 'true'])
- }))
+ })
- it('should ingest filter rules for custom field queries', fakeAsync(() => {
+ it('should ingest filter rules for custom field queries', () => {
expect(component.customFieldQueriesModel.isEmpty()).toBeTruthy()
component.filterRules = [
{
@@ -1027,9 +1032,9 @@ describe('FilterEditorComponent', () => {
.value[0] as CustomFieldQueryAtom
).serialize()
).toEqual([42, CustomFieldQueryOperator.Exists, 'true'])
- }))
+ })
- it('should ingest filter rules for owner', fakeAsync(() => {
+ it('should ingest filter rules for owner', () => {
expect(component.permissionsSelectionModel.ownerFilter).toEqual(
OwnerFilterType.NONE
)
@@ -1044,9 +1049,9 @@ describe('FilterEditorComponent', () => {
)
expect(component.permissionsSelectionModel.hideUnowned).toBeFalsy()
expect(component.permissionsSelectionModel.userID).toEqual(100)
- }))
+ })
- it('should ingest filter rules for owner is others', fakeAsync(() => {
+ it('should ingest filter rules for owner is others', () => {
expect(component.permissionsSelectionModel.ownerFilter).toEqual(
OwnerFilterType.NONE
)
@@ -1060,9 +1065,9 @@ describe('FilterEditorComponent', () => {
OwnerFilterType.OTHERS
)
expect(component.permissionsSelectionModel.includeUsers).toContain(50)
- }))
+ })
- it('should ingest filter rules for owner does not include others', fakeAsync(() => {
+ it('should ingest filter rules for owner does not include others', () => {
expect(component.permissionsSelectionModel.ownerFilter).toEqual(
OwnerFilterType.NONE
)
@@ -1076,9 +1081,9 @@ describe('FilterEditorComponent', () => {
OwnerFilterType.NOT_SELF
)
expect(component.permissionsSelectionModel.excludeUsers).toContain(50)
- }))
+ })
- it('should ingest filter rules for owner is null', fakeAsync(() => {
+ it('should ingest filter rules for owner is null', () => {
expect(component.permissionsSelectionModel.ownerFilter).toEqual(
OwnerFilterType.NONE
)
@@ -1092,9 +1097,9 @@ describe('FilterEditorComponent', () => {
OwnerFilterType.UNOWNED
)
expect(component.permissionsSelectionModel.hideUnowned).toBeFalsy()
- }))
+ })
- it('should ingest filter rules for owner is not null', fakeAsync(() => {
+ it('should ingest filter rules for owner is not null', () => {
component.filterRules = [
{
rule_type: FILTER_OWNER_ISNULL,
@@ -1109,9 +1114,9 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.permissionsSelectionModel.hideUnowned).toBeTruthy()
- }))
+ })
- it('should ingest filter rules for shared by me', fakeAsync(() => {
+ it('should ingest filter rules for shared by me', () => {
component.filterRules = [
{
rule_type: FILTER_SHARED_BY_USER,
@@ -1119,11 +1124,11 @@ describe('FilterEditorComponent', () => {
},
]
expect(component.permissionsSelectionModel.userID).toEqual(2)
- }))
+ })
// GET filterRules
- it('should convert user input to correct filter rules on text field search title + content', fakeAsync(() => {
+ it('should convert user input to correct filter rules on text field search title + content', () => {
component.textFilterInput.nativeElement.value = 'foo'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
fixture.detectChanges()
@@ -1135,9 +1140,9 @@ describe('FilterEditorComponent', () => {
value: 'foo',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on text field search title only', fakeAsync(() => {
+ it('should convert user input to correct filter rules on text field search title only', () => {
component.textFilterInput.nativeElement.value = 'foo'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.query(
@@ -1154,9 +1159,9 @@ describe('FilterEditorComponent', () => {
value: 'foo',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on text field search equals asn', fakeAsync(() => {
+ it('should convert user input to correct filter rules on text field search equals asn', () => {
component.textFilterInput.nativeElement.value = '1234'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.queryAll(
@@ -1174,9 +1179,9 @@ describe('FilterEditorComponent', () => {
value: '1234',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on text field search greater than asn', fakeAsync(() => {
+ it('should convert user input to correct filter rules on text field search greater than asn', () => {
component.textFilterInput.nativeElement.value = '123'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.queryAll(
@@ -1198,9 +1203,9 @@ describe('FilterEditorComponent', () => {
value: '123',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on text field search less than asn', fakeAsync(() => {
+ it('should convert user input to correct filter rules on text field search less than asn', () => {
component.textFilterInput.nativeElement.value = '999'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.queryAll(
@@ -1222,9 +1227,9 @@ describe('FilterEditorComponent', () => {
value: '999',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on asn is null', fakeAsync(() => {
+ it('should convert user input to correct filter rules on asn is null', () => {
const textFieldTargetDropdown = fixture.debugElement.queryAll(
By.directive(NgbDropdownItem)
)[2]
@@ -1242,9 +1247,9 @@ describe('FilterEditorComponent', () => {
value: 'true',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on asn is not null', fakeAsync(() => {
+ it('should convert user input to correct filter rules on asn is not null', () => {
const textFieldTargetDropdown = fixture.debugElement.queryAll(
By.directive(NgbDropdownItem)
)[2]
@@ -1262,9 +1267,9 @@ describe('FilterEditorComponent', () => {
value: 'false',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on mime type', fakeAsync(() => {
+ it('should convert user input to correct filter rules on mime type', () => {
component.textFilterInput.nativeElement.value = 'pdf'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.queryAll(
@@ -1280,9 +1285,9 @@ describe('FilterEditorComponent', () => {
value: 'pdf',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on full text query', fakeAsync(() => {
+ it('should convert user input to correct filter rules on full text query', () => {
component.textFilterInput.nativeElement.value = 'foo'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.queryAll(
@@ -1298,9 +1303,9 @@ describe('FilterEditorComponent', () => {
value: 'foo',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on tag select not assigned', fakeAsync(() => {
+ it('should convert user input to correct filter rules on tag select not assigned', () => {
const tagsFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[0]
@@ -1317,9 +1322,9 @@ describe('FilterEditorComponent', () => {
value: 'false',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on tag selections', fakeAsync(() => {
+ it('should convert user input to correct filter rules on tag selections', () => {
const tagsFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[0] // Tags dropdown
@@ -1369,9 +1374,9 @@ describe('FilterEditorComponent', () => {
value: tags[1].id.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on correspondent selections', fakeAsync(() => {
+ it('should convert user input to correct filter rules on correspondent selections', () => {
const correspondentsFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[1] // Corresp dropdown
@@ -1409,9 +1414,9 @@ describe('FilterEditorComponent', () => {
value: correspondents[1].id.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on correspondent select not assigned', fakeAsync(() => {
+ it('should convert user input to correct filter rules on correspondent select not assigned', () => {
const correspondentsFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[1]
@@ -1441,9 +1446,9 @@ describe('FilterEditorComponent', () => {
value: NEGATIVE_NULL_FILTER_VALUE.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on document type selections', fakeAsync(() => {
+ it('should convert user input to correct filter rules on document type selections', () => {
const documentTypesFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[2] // DocType dropdown
@@ -1481,9 +1486,9 @@ describe('FilterEditorComponent', () => {
value: document_types[1].id.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on doc type select not assigned', fakeAsync(() => {
+ it('should convert user input to correct filter rules on doc type select not assigned', () => {
const docTypesFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[2]
@@ -1513,9 +1518,9 @@ describe('FilterEditorComponent', () => {
value: NEGATIVE_NULL_FILTER_VALUE.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on storage path selections', fakeAsync(() => {
+ it('should convert user input to correct filter rules on storage path selections', () => {
const storagePathFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[3] // StoragePath dropdown
@@ -1553,9 +1558,9 @@ describe('FilterEditorComponent', () => {
value: storage_paths[1].id.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on storage path select not assigned', fakeAsync(() => {
+ it('should convert user input to correct filter rules on storage path select not assigned', () => {
const storagePathsFilterableDropdown = fixture.debugElement.queryAll(
By.directive(FilterableDropdownComponent)
)[3]
@@ -1585,9 +1590,9 @@ describe('FilterEditorComponent', () => {
value: NEGATIVE_NULL_FILTER_VALUE.toString(),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on custom field selections', fakeAsync(() => {
+ it('should convert user input to correct filter rules on custom field selections', () => {
const customFieldsQueryDropdown = fixture.debugElement.queryAll(
By.directive(CustomFieldsQueryDropdownComponent)
)[0]
@@ -1617,9 +1622,9 @@ describe('FilterEditorComponent', () => {
]),
},
])
- }))
+ })
- it('should convert user input to correct filter rules on date created from', fakeAsync(() => {
+ it('should convert user input to correct filter rules on date created from', () => {
const dateCreatedDropdown = fixture.debugElement.queryAll(
By.directive(DatesDropdownComponent)
)[0]
@@ -1637,9 +1642,9 @@ describe('FilterEditorComponent', () => {
value: '2023-05-14',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on date created to', fakeAsync(() => {
+ it('should convert user input to correct filter rules on date created to', () => {
const dateCreatedDropdown = fixture.debugElement.queryAll(
By.directive(DatesDropdownComponent)
)[0]
@@ -1657,9 +1662,9 @@ describe('FilterEditorComponent', () => {
value: '2023-05-14',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on date created with relative date', fakeAsync(() => {
+ it('should convert user input to correct filter rules on date created with relative date', () => {
const dateCreatedDropdown = fixture.debugElement.queryAll(
By.directive(DatesDropdownComponent)
)[0]
@@ -1673,9 +1678,9 @@ describe('FilterEditorComponent', () => {
value: 'created:[-1 week to now]',
},
])
- }))
+ })
- it('should carry over text filtering on date created with relative date', fakeAsync(() => {
+ it('should carry over text filtering on date created with relative date', () => {
component.textFilter = 'foo'
const dateCreatedDropdown = fixture.debugElement.queryAll(
By.directive(DatesDropdownComponent)
@@ -1690,9 +1695,9 @@ describe('FilterEditorComponent', () => {
value: 'foo,created:[-1 week to now]',
},
])
- }))
+ })
- it('should convert legacy title filters into full text query when adding a created relative date', fakeAsync(() => {
+ it('should convert legacy title filters into full text query when adding a created relative date', () => {
component.filterRules = [
{
rule_type: FILTER_TITLE,
@@ -1712,9 +1717,9 @@ describe('FilterEditorComponent', () => {
value: 'foo,created:[-1 week to now]',
},
])
- }))
+ })
- it('should convert simple title filters into full text query when adding a created relative date', fakeAsync(() => {
+ it('should convert simple title filters into full text query when adding a created relative date', () => {
component.filterRules = [
{
rule_type: FILTER_SIMPLE_TITLE,
@@ -1734,9 +1739,9 @@ describe('FilterEditorComponent', () => {
value: 'foo,created:[-1 week to now]',
},
])
- }))
+ })
- it('should leave relative dates not in quick list intact', fakeAsync(() => {
+ it('should leave relative dates not in quick list intact', () => {
component.textFilterInput.nativeElement.value = 'created:[-2 week to now]'
component.textFilterInput.nativeElement.dispatchEvent(new Event('input'))
const textFieldTargetDropdown = fixture.debugElement.queryAll(
@@ -1762,9 +1767,9 @@ describe('FilterEditorComponent', () => {
value: 'added:[-2 month to now]',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on date added after', fakeAsync(() => {
+ it('should convert user input to correct filter rules on date added after', () => {
const datesDropdown = fixture.debugElement.query(
By.directive(DatesDropdownComponent)
)
@@ -1782,9 +1787,9 @@ describe('FilterEditorComponent', () => {
value: '2023-05-14',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on date added before', fakeAsync(() => {
+ it('should convert user input to correct filter rules on date added before', () => {
const datesDropdown = fixture.debugElement.query(
By.directive(DatesDropdownComponent)
)
@@ -1802,9 +1807,9 @@ describe('FilterEditorComponent', () => {
value: '2023-05-14',
},
])
- }))
+ })
- it('should convert user input to correct filter rules on date added with relative date', fakeAsync(() => {
+ it('should convert user input to correct filter rules on date added with relative date', () => {
const datesDropdown = fixture.debugElement.query(
By.directive(DatesDropdownComponent)
)
@@ -1818,9 +1823,9 @@ describe('FilterEditorComponent', () => {
value: 'added:[-1 week to now]',
},
])
- }))
+ })
- it('should carry over text filtering on date added with relative date', fakeAsync(() => {
+ it('should carry over text filtering on date added with relative date', () => {
component.textFilter = 'foo'
const datesDropdown = fixture.debugElement.query(
By.directive(DatesDropdownComponent)
@@ -1835,9 +1840,9 @@ describe('FilterEditorComponent', () => {
value: 'foo,added:[-1 week to now]',
},
])
- }))
+ })
- it('should convert user input to correct filter on permissions select my docs', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions select my docs', () => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
@@ -1851,24 +1856,9 @@ describe('FilterEditorComponent', () => {
value: '1',
},
])
- }))
-
- it('should convert user input to correct filter on permissions select shared with me', fakeAsync(() => {
- const permissionsDropdown = fixture.debugElement.query(
- By.directive(PermissionsFilterDropdownComponent)
- )
- const sharedWithMe = permissionsDropdown.queryAll(By.css('button'))[3]
- sharedWithMe.triggerEventHandler('click')
- fixture.detectChanges()
- expect(component.filterRules).toEqual([
- {
- rule_type: FILTER_OWNER_DOES_NOT_INCLUDE,
- value: '1',
- },
- ])
- }))
+ })
- it('should convert user input to correct filter on permissions select shared with me', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions select shared with me', () => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
@@ -1889,9 +1879,9 @@ describe('FilterEditorComponent', () => {
value: '1,2',
},
])
- }))
+ })
- it('should convert user input to correct filter on permissions select shared by me', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions select shared by me', () => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
@@ -1904,9 +1894,9 @@ describe('FilterEditorComponent', () => {
value: '1',
},
])
- }))
+ })
- it('should convert user input to correct filter on permissions select unowned', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions select unowned', () => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
@@ -1919,9 +1909,9 @@ describe('FilterEditorComponent', () => {
value: 'true',
},
])
- }))
+ })
- it('should convert user input to correct filter on permissions select others', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions select others', () => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
@@ -1940,9 +1930,9 @@ describe('FilterEditorComponent', () => {
value: '3',
},
])
- }))
+ })
- it('should convert user input to correct filter on permissions hide unowned', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions hide unowned', () => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
@@ -1960,7 +1950,7 @@ describe('FilterEditorComponent', () => {
value: 'false',
},
])
- }))
+ })
// The rest
@@ -2221,7 +2211,7 @@ describe('FilterEditorComponent', () => {
})
})
- it('should keep deprecated custom fields target available for legacy filters', fakeAsync(() => {
+ it('should keep deprecated custom fields target available for legacy filters', () => {
component.filterRules = [
{
rule_type: FILTER_CUSTOM_FIELDS_TEXT,
@@ -2242,9 +2232,9 @@ describe('FilterEditorComponent', () => {
value: 'foo',
},
])
- }))
+ })
- it('should call autocomplete endpoint on input', fakeAsync(() => {
+ it('should call autocomplete endpoint on input', () => {
component.textFilterTarget = 'fulltext-query' // TEXT_FILTER_TARGET_FULLTEXT_QUERY
const autocompleteSpy = jest.spyOn(searchService, 'autocomplete')
component.searchAutoComplete(of('hello')).subscribe()
@@ -2254,9 +2244,9 @@ describe('FilterEditorComponent', () => {
component.searchAutoComplete(of('hello world 1')).subscribe()
tick(250)
expect(autocompleteSpy).toHaveBeenCalled()
- }))
+ })
- it('should handle autocomplete backend failure gracefully', fakeAsync(() => {
+ it('should handle autocomplete backend failure gracefully', () => {
component.textFilterTarget = 'fulltext-query' // TEXT_FILTER_TARGET_FULLTEXT_QUERY
const serviceAutocompleteSpy = jest.spyOn(searchService, 'autocomplete')
serviceAutocompleteSpy.mockReturnValue(
@@ -2270,7 +2260,7 @@ describe('FilterEditorComponent', () => {
tick(250)
expect(serviceAutocompleteSpy).toHaveBeenCalled()
expect(result).toEqual([])
- }))
+ })
it('should support choosing a autocomplete item', () => {
expect(component.textFilter).toBeNull()
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
index b4e63317a..dc08d17ee 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
@@ -1166,13 +1166,13 @@ export class FilterEditorComponent
private maybeCompleteLoading() {
this.loadingCount++
if (this.loadingCount == this.loadingCountTotal) {
- this.loading = false
- this.show = true
+ this.loading.set(false)
+ this.show.set(true)
}
}
ngOnInit() {
- this.loading = true
+ this.loading.set(true)
if (
this.permissionsService.currentUserCan(
PermissionAction.View,
diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
index 4e4bf2cd3..c1058bde2 100644
--- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
+++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
@@ -1,24 +1,24 @@
<form [formGroup]="saveViewConfigForm" (ngSubmit)="save()">
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title" i18n>Save current view</h4>
- <button type="button" [disabled]="!closeEnabled" class="btn-close" aria-label="Close" (click)="cancel()">
+ <button type="button" [disabled]="!closeEnabled()" class="btn-close" aria-label="Close" (click)="cancel()">
</button>
</div>
<div class="modal-body">
- <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name" autocomplete="off"></pngx-input-text>
+ <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error()?.name" autocomplete="off"></pngx-input-text>
<pngx-input-check i18n-title title="Show in sidebar" formControlName="showInSideBar"></pngx-input-check>
<pngx-input-check i18n-title title="Show on dashboard" formControlName="showOnDashboard"></pngx-input-check>
<pngx-permissions-form accordion="true" formControlName="permissions_form"></pngx-permissions-form>
- @if (error?.filter_rules) {
+ @if (error()?.filter_rules) {
<div class="alert alert-danger" role="alert">
<h6 class="alert-heading" i18n>Filter rules error occurred while saving this view</h6>
<ng-container i18n>The error returned was</ng-container>:<br/>
- {{ error.filter_rules }}
+ {{ error().filter_rules }}
</div>
}
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-outline-secondary" (click)="cancel()" i18n [disabled]="!buttonsEnabled">Cancel</button>
- <button type="submit" class="btn btn-primary" i18n [disabled]="!buttonsEnabled">Save</button>
+ <button type="button" class="btn btn-outline-secondary" (click)="cancel()" i18n [disabled]="!buttonsEnabled()">Cancel</button>
+ <button type="submit" class="btn btn-primary" i18n [disabled]="!buttonsEnabled()">Save</button>
</div>
</form>
diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts
index 5726c4255..26f33adaf 100644
--- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts
+++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts
@@ -1,9 +1,4 @@
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { By } from '@angular/platform-browser'
import { NgbActiveModal, NgbModalModule } from '@ng-bootstrap/ng-bootstrap'
@@ -22,8 +17,8 @@ describe('SaveViewConfigDialogComponent', () => {
let fixture: ComponentFixture<SaveViewConfigDialogComponent>
let modal: NgbActiveModal
- beforeEach(fakeAsync(() => {
- TestBed.configureTestingModule({
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
providers: [
NgbActiveModal,
{
@@ -56,16 +51,16 @@ describe('SaveViewConfigDialogComponent', () => {
fixture = TestBed.createComponent(SaveViewConfigDialogComponent)
component = fixture.componentInstance
fixture.detectChanges()
- tick()
- }))
+ await fixture.whenStable()
+ })
it('should support default name', () => {
const name = 'Tag: Inbox'
let result
component.saveClicked.subscribe((saveResult) => (result = saveResult))
- component.defaultName = name
+ component.setDefaultName(name)
component.save()
- expect(component.defaultName).toEqual(name)
+ expect(component.defaultName()).toEqual(name)
expect(result).toEqual({
name,
showInSideBar: false,
diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts
index 78ac67e36..3ac56cc50 100644
--- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts
+++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts
@@ -1,10 +1,10 @@
import {
Component,
EventEmitter,
- Input,
OnInit,
Output,
inject,
+ signal,
} from '@angular/core'
import {
FormControl,
@@ -32,29 +32,18 @@ import { TextComponent } from '../../common/input/text/text.component'
})
export class SaveViewConfigDialogComponent implements OnInit {
private modal = inject(NgbActiveModal)
+ readonly error = signal(undefined)
+ readonly buttonsEnabled = signal(true)
+ readonly defaultName = signal('')
+ readonly closeEnabled = signal(false)
@Output()
public saveClicked = new EventEmitter()
- @Input()
- error
-
- @Input()
- buttonsEnabled = true
-
- closeEnabled = false
-
users: User[]
- _defaultName = ''
-
- get defaultName() {
- return this._defaultName
- }
-
- @Input()
- set defaultName(value: string) {
- this._defaultName = value
+ setDefaultName(value: string) {
+ this.defaultName.set(value)
this.saveViewConfigForm.patchValue({ name: value })
}
@@ -68,7 +57,7 @@ export class SaveViewConfigDialogComponent implements OnInit {
ngOnInit(): void {
// wait to enable close button so it doesn't steal focus from input since its the first clickable element in the DOM
setTimeout(() => {
- this.closeEnabled = true
+ this.closeEnabled.set(true)
})
}
diff --git a/src-ui/src/app/components/document-notes/document-notes.component.html b/src-ui/src/app/components/document-notes/document-notes.component.html
index cf52b39b3..55f4357ec 100644
--- a/src-ui/src/app/components/document-notes/document-notes.component.html
+++ b/src-ui/src/app/components/document-notes/document-notes.component.html
@@ -1,4 +1,4 @@
-@if (notes) {
+@if (notes()) {
<div>
<form [formGroup]="noteForm" class="needs-validation mt-3" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Note }" novalidate>
<div class="form-group">
@@ -8,14 +8,14 @@
</div>
</div>
<div class="form-group mt-2 d-flex justify-content-end align-items-center">
- @if (networkActive) {
+ @if (networkActive()) {
<div class="spinner-border spinner-border-sm fw-normal me-auto" role="status"></div>
}
- <button type="button" class="btn btn-primary btn-sm" [disabled]="networkActive || addDisabled" (click)="addNote()" i18n>Add note</button>
+ <button type="button" class="btn btn-primary btn-sm" [disabled]="networkActive() || addDisabled()" (click)="addNote()" i18n>Add note</button>
</div>
</form>
<hr>
- @for (note of notes; track note) {
+ @for (note of notes(); track note) {
<div class="card border mb-3">
<div class="card-body text-dark">
<p class="card-text">{{note.note}}</p>
diff --git a/src-ui/src/app/components/document-notes/document-notes.component.spec.ts b/src-ui/src/app/components/document-notes/document-notes.component.spec.ts
index 1c86c03a5..85b8c9570 100644
--- a/src-ui/src/app/components/document-notes/document-notes.component.spec.ts
+++ b/src-ui/src/app/components/document-notes/document-notes.component.spec.ts
@@ -110,7 +110,7 @@ describe('DocumentNotesComponent', () => {
})
it('should display notes with user name / username', () => {
- component.notes = notes
+ component.notes.set(notes)
fixture.detectChanges()
expect(fixture.debugElement.nativeElement.textContent).toContain(
notes[0].note
@@ -154,7 +154,7 @@ describe('DocumentNotesComponent', () => {
})
it('should support note entry, show error if fails', () => {
- component.documentId = 12
+ component.documentId.set(12)
const note = 'This is the new note.'
const noteTextArea = fixture.debugElement.query(By.css('textarea'))
noteTextArea.nativeElement.value = note
@@ -177,7 +177,7 @@ describe('DocumentNotesComponent', () => {
})
it('should support note save on ctrl+Enter', () => {
- component.documentId = 12
+ component.documentId.set(12)
const note = 'This is the new note.'
const noteTextArea = fixture.debugElement.query(By.css('textarea'))
noteTextArea.nativeElement.value = note
@@ -189,8 +189,8 @@ describe('DocumentNotesComponent', () => {
})
it('should support delete note, show error if fails', () => {
- component.documentId = 12
- component.notes = notes
+ component.documentId.set(12)
+ component.notes.set(notes)
fixture.detectChanges()
const deleteButton = fixture.debugElement.queryAll(By.css('button'))[1] // 0 is add button
const deleteSpy = jest.spyOn(notesService, 'deleteNote')
diff --git a/src-ui/src/app/components/document-notes/document-notes.component.ts b/src-ui/src/app/components/document-notes/document-notes.component.ts
index 43530ce7c..19dbdf486 100644
--- a/src-ui/src/app/components/document-notes/document-notes.component.ts
+++ b/src-ui/src/app/components/document-notes/document-notes.component.ts
@@ -1,4 +1,12 @@
-import { Component, EventEmitter, Input, Output, inject } from '@angular/core'
+import {
+ Component,
+ EventEmitter,
+ Output,
+ inject,
+ input,
+ model,
+ signal,
+} from '@angular/core'
import {
FormControl,
FormGroup,
@@ -31,23 +39,17 @@ export class DocumentNotesComponent extends ComponentWithPermissions {
private notesService = inject(DocumentNotesService)
private toastService = inject(ToastService)
private usersService = inject(UserService)
+ readonly documentId = model<number>(undefined)
+ readonly notes = model<DocumentNote[]>([])
+ readonly addDisabled = input(false)
+ readonly networkActive = signal(false)
noteForm: FormGroup = new FormGroup({
newNote: new FormControl(''),
})
- networkActive = false
newNoteError: boolean = false
- @Input()
- documentId: number
-
- @Input()
- notes: DocumentNote[] = []
-
- @Input()
- addDisabled: boolean = false
-
@Output()
updated: EventEmitter<DocumentNote[]> = new EventEmitter()
users: User[]
@@ -68,30 +70,30 @@ export class DocumentNotesComponent extends ComponentWithPermissions {
return
}
this.newNoteError = false
- this.networkActive = true
- this.notesService.addNote(this.documentId, note).subscribe({
+ this.networkActive.set(true)
+ this.notesService.addNote(this.documentId(), note).subscribe({
next: (result) => {
- this.notes = result
+ this.notes.set(result)
this.noteForm.get('newNote').reset()
- this.networkActive = false
- this.updated.emit(this.notes)
+ this.networkActive.set(false)
+ this.updated.emit(this.notes())
},
error: (e) => {
- this.networkActive = false
+ this.networkActive.set(false)
this.toastService.showError($localize`Error saving note`, e)
},
})
}
deleteNote(noteId: number) {
- this.notesService.deleteNote(this.documentId, noteId).subscribe({
+ this.notesService.deleteNote(this.documentId(), noteId).subscribe({
next: (result) => {
- this.notes = result
- this.networkActive = false
- this.updated.emit(this.notes)
+ this.notes.set(result)
+ this.networkActive.set(false)
+ this.updated.emit(this.notes())
},
error: (e) => {
- this.networkActive = false
+ this.networkActive.set(false)
this.toastService.showError($localize`Error deleting note`, e)
},
})
diff --git a/src-ui/src/app/components/file-drop/file-drop.component.html b/src-ui/src/app/components/file-drop/file-drop.component.html
index 71a008b3f..fa03f2522 100644
--- a/src-ui/src/app/components/file-drop/file-drop.component.html
+++ b/src-ui/src/app/components/file-drop/file-drop.component.html
@@ -1,7 +1,7 @@
-<div [class.pe-none]="fileIsOver">
+<div [class.pe-none]="fileIsOver()">
<ng-content select="[content]"></ng-content>
</div>
-<div class="global-dropzone-overlay position-fixed top-0 start-0 bottom-0 end-0 text-center pe-none" [class.active]="fileIsOver && !hidden">
+<div class="global-dropzone-overlay position-fixed top-0 start-0 bottom-0 end-0 text-center pe-none" [class.active]="fileIsOver() && !hidden()">
<h2 class="pe-none position-absolute top-50 start-50 translate-middle" i18n>Drop files to begin upload</h2>
</div>
diff --git a/src-ui/src/app/components/file-drop/file-drop.component.spec.ts b/src-ui/src/app/components/file-drop/file-drop.component.spec.ts
index 78e024955..f6ea9572a 100644
--- a/src-ui/src/app/components/file-drop/file-drop.component.spec.ts
+++ b/src-ui/src/app/components/file-drop/file-drop.component.spec.ts
@@ -1,13 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- discardPeriodicTasks,
- fakeAsync,
- flush,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { By } from '@angular/platform-browser'
import { PermissionsService } from 'src/app/services/permissions.service'
import { SettingsService } from 'src/app/services/settings.service'
@@ -24,8 +17,18 @@ describe('FileDropComponent', () => {
let settingsService: SettingsService
let uploadDocumentsService: UploadDocumentsService
- beforeEach(() => {
- TestBed.configureTestingModule({
+ const advanceTimers = (ms: number) => {
+ jest.advanceTimersByTime(ms)
+ fixture.detectChanges()
+ }
+
+ const flushPromises = async () => {
+ await Promise.resolve()
+ await Promise.resolve()
+ }
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
imports: [FileDropComponent, ToastsComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
@@ -43,6 +46,10 @@ describe('FileDropComponent', () => {
fixture.detectChanges()
})
+ afterEach(() => {
+ jest.useRealTimers()
+ })
+
it('should enable drag-drop if user has permissions', () => {
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
expect(component.dragDropEnabled).toBeTruthy()
@@ -53,22 +60,21 @@ describe('FileDropComponent', () => {
expect(component.dragDropEnabled).toBeFalsy()
})
- it('should disable drag-drop if disabled in settings', fakeAsync(() => {
+ it('should disable drag-drop if disabled in settings', () => {
+ jest.useFakeTimers()
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
- settingsService.globalDropzoneEnabled = false
+ settingsService.globalDropzoneEnabled.set(false)
expect(component.dragDropEnabled).toBeFalsy()
component.onDragOver(new Event('dragover') as DragEvent)
- tick(1)
- fixture.detectChanges()
- expect(component.fileIsOver).toBeFalsy()
+ advanceTimers(1)
+ expect(component.fileIsOver()).toBeFalsy()
const dropzone = fixture.debugElement.query(
By.css('.global-dropzone-overlay')
)
expect(dropzone.classes['active']).toBeFalsy()
component.onDragLeave(new Event('dragleave') as DragEvent)
- tick(700)
- fixture.detectChanges()
+ advanceTimers(700)
// drop
const uploadSpy = jest.spyOn(uploadDocumentsService, 'uploadFile')
const dragEvent = new Event('drop')
@@ -79,22 +85,21 @@ describe('FileDropComponent', () => {
},
}
component.onDrop(dragEvent as DragEvent)
- tick(3000)
+ advanceTimers(3000)
expect(uploadSpy).not.toHaveBeenCalled()
- }))
+ })
- it('should support drag drop, initiate upload', fakeAsync(() => {
+ it('should support drag drop, initiate upload', () => {
+ jest.useFakeTimers()
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
- expect(component.fileIsOver).toBeFalsy()
+ expect(component.fileIsOver()).toBeFalsy()
const overEvent = new Event('dragover') as DragEvent
;(overEvent as any).dataTransfer = { types: ['Files'] }
component.onDragOver(overEvent)
- tick(1)
- fixture.detectChanges()
- expect(component.fileIsOver).toBeTruthy()
+ advanceTimers(1)
+ expect(component.fileIsOver()).toBeTruthy()
component.onDragLeave(new Event('dragleave') as DragEvent)
- tick(700)
- fixture.detectChanges()
+ advanceTimers(700)
// drop
const toastSpy = jest.spyOn(toastService, 'show')
const uploadSpy = jest.spyOn(uploadDocumentsService, 'uploadFile')
@@ -113,24 +118,22 @@ describe('FileDropComponent', () => {
],
}
component.onDrop(dragEvent as DragEvent)
- tick(3000)
+ advanceTimers(3000)
expect(toastSpy).toHaveBeenCalled()
expect(uploadSpy).toHaveBeenCalled()
- discardPeriodicTasks()
- }))
+ })
- it('should support drag drop, initiate upload with webkitGetAsEntry', fakeAsync(() => {
+ it('should support drag drop, initiate upload with webkitGetAsEntry', async () => {
+ jest.useFakeTimers()
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
- expect(component.fileIsOver).toBeFalsy()
+ expect(component.fileIsOver()).toBeFalsy()
const overEvent = new Event('dragover') as DragEvent
;(overEvent as any).dataTransfer = { types: ['Files'] }
component.onDragOver(overEvent)
- tick(1)
- fixture.detectChanges()
- expect(component.fileIsOver).toBeTruthy()
+ advanceTimers(1)
+ expect(component.fileIsOver()).toBeTruthy()
component.onDragLeave(new Event('dragleave') as DragEvent)
- tick(700)
- fixture.detectChanges()
+ advanceTimers(700)
// drop
const toastSpy = jest.spyOn(toastService, 'show')
const uploadSpy = jest.spyOn(uploadDocumentsService, 'uploadFile')
@@ -154,13 +157,14 @@ describe('FileDropComponent', () => {
files: [],
}
component.onDrop(dragEvent as DragEvent)
- tick(3000)
+ await flushPromises()
+ advanceTimers(3000)
expect(toastSpy).toHaveBeenCalled()
expect(uploadSpy).toHaveBeenCalled()
- discardPeriodicTasks()
- }))
+ })
- it('should show an error on traverseFileTree error', fakeAsync(() => {
+ it('should show an error on traverseFileTree error', async () => {
+ jest.useFakeTimers()
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
const toastSpy = jest.spyOn(toastService, 'showError')
const traverseSpy = jest
@@ -190,28 +194,25 @@ describe('FileDropComponent', () => {
component.onDrop(event)
- tick() // flush microtasks (e.g., Promise.reject)
+ await flushPromises()
expect(traverseSpy).toHaveBeenCalled()
expect(toastSpy).toHaveBeenCalledWith(
$localize`Failed to read dropped items: Error traversing file tree`
)
+ })
- discardPeriodicTasks()
- }))
-
- it('should support drag drop, initiate upload without DataTransfer API support', fakeAsync(() => {
+ it('should support drag drop, initiate upload without DataTransfer API support', () => {
+ jest.useFakeTimers()
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
- expect(component.fileIsOver).toBeFalsy()
+ expect(component.fileIsOver()).toBeFalsy()
const overEvent = new Event('dragover') as DragEvent
;(overEvent as any).dataTransfer = { types: ['Files'] }
component.onDragOver(overEvent)
- tick(1)
- fixture.detectChanges()
- expect(component.fileIsOver).toBeTruthy()
+ advanceTimers(1)
+ expect(component.fileIsOver()).toBeTruthy()
component.onDragLeave(new Event('dragleave') as DragEvent)
- tick(700)
- fixture.detectChanges()
+ advanceTimers(700)
// drop
const toastSpy = jest.spyOn(toastService, 'show')
const uploadSpy = jest.spyOn(uploadDocumentsService, 'uploadFile')
@@ -225,11 +226,10 @@ describe('FileDropComponent', () => {
files: [file],
}
component.onDrop(dragEvent as DragEvent)
- tick(3000)
+ advanceTimers(3000)
expect(toastSpy).toHaveBeenCalled()
expect(uploadSpy).toHaveBeenCalled()
- discardPeriodicTasks()
- }))
+ })
it('should resolve a single file when entry isFile', () => {
const mockFile = new File(['data'], 'test.txt', { type: 'text/plain' })
@@ -295,47 +295,47 @@ describe('FileDropComponent', () => {
})
})
- it('should ignore events if disabled', fakeAsync(() => {
- settingsService.globalDropzoneEnabled = false
- expect(settingsService.globalDropzoneActive).toBeFalsy()
+ it('should ignore events if disabled', () => {
+ settingsService.globalDropzoneEnabled.set(false)
+ expect(settingsService.globalDropzoneActive()).toBeFalsy()
component.onDragOver(new Event('dragover') as DragEvent)
- expect(settingsService.globalDropzoneActive).toBeFalsy()
- settingsService.globalDropzoneActive = true
+ expect(settingsService.globalDropzoneActive()).toBeFalsy()
+ settingsService.globalDropzoneActive.set(true)
component.onDragLeave(new Event('dragleave') as DragEvent)
- expect(settingsService.globalDropzoneActive).toBeTruthy()
+ expect(settingsService.globalDropzoneActive()).toBeTruthy()
component.onDrop(new Event('drop') as DragEvent)
- expect(settingsService.globalDropzoneActive).toBeTruthy()
- }))
+ expect(settingsService.globalDropzoneActive()).toBeTruthy()
+ })
- it('should hide if app loses focus', fakeAsync(() => {
+ it('should hide if app loses focus', () => {
+ jest.useFakeTimers()
const leaveSpy = jest.spyOn(component, 'onDragLeave')
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
- settingsService.globalDropzoneEnabled = true
+ settingsService.globalDropzoneEnabled.set(true)
const overEvent = new Event('dragover') as DragEvent
;(overEvent as any).dataTransfer = { types: ['Files'] }
component.onDragOver(overEvent)
- tick(1)
- expect(component.hidden).toBeFalsy()
- expect(component.fileIsOver).toBeTruthy()
+ advanceTimers(1)
+ expect(component.hidden()).toBeFalsy()
+ expect(component.fileIsOver()).toBeTruthy()
jest.spyOn(document, 'hidden', 'get').mockReturnValue(true)
component.onVisibilityChange()
expect(leaveSpy).toHaveBeenCalled()
- flush()
- }))
+ })
- it('should hide on window blur', fakeAsync(() => {
+ it('should hide on window blur', () => {
+ jest.useFakeTimers()
const leaveSpy = jest.spyOn(component, 'onDragLeave')
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
- settingsService.globalDropzoneEnabled = true
+ settingsService.globalDropzoneEnabled.set(true)
const overEvent = new Event('dragover') as DragEvent
;(overEvent as any).dataTransfer = { types: ['Files'] }
component.onDragOver(overEvent)
- tick(1)
- expect(component.hidden).toBeFalsy()
- expect(component.fileIsOver).toBeTruthy()
+ advanceTimers(1)
+ expect(component.hidden()).toBeFalsy()
+ expect(component.fileIsOver()).toBeTruthy()
jest.spyOn(document, 'hidden', 'get').mockReturnValue(true)
component.onWindowBlur()
expect(leaveSpy).toHaveBeenCalled()
- flush()
- }))
+ })
})
diff --git a/src-ui/src/app/components/file-drop/file-drop.component.ts b/src-ui/src/app/components/file-drop/file-drop.component.ts
index 8fd0c7c22..a9a0f4b1d 100644
--- a/src-ui/src/app/components/file-drop/file-drop.component.ts
+++ b/src-ui/src/app/components/file-drop/file-drop.component.ts
@@ -1,4 +1,4 @@
-import { Component, HostListener, inject } from '@angular/core'
+import { Component, HostListener, inject, signal } from '@angular/core'
import {
PermissionAction,
PermissionsService,
@@ -21,12 +21,12 @@ export class FileDropComponent {
private permissionsService = inject(PermissionsService)
private fileLeaveTimeoutID: any
- fileIsOver: boolean = false
- hidden: boolean = true
+ fileIsOver = signal<boolean>(false)
+ hidden = signal<boolean>(true)
public get dragDropEnabled(): boolean {
return (
- this.settings.globalDropzoneEnabled &&
+ this.settings.globalDropzoneEnabled() &&
this.permissionsService.currentUserCan(
PermissionAction.Add,
PermissionType.Document
@@ -39,12 +39,12 @@ export class FileDropComponent {
return
event.preventDefault()
event.stopImmediatePropagation()
- this.settings.globalDropzoneActive = true
+ this.settings.globalDropzoneActive.set(true)
// allows transition
setTimeout(() => {
- this.fileIsOver = true
+ this.fileIsOver.set(true)
}, 1)
- this.hidden = false
+ this.hidden.set(false)
// stop fileLeave timeout
clearTimeout(this.fileLeaveTimeoutID)
}
@@ -56,15 +56,15 @@ export class FileDropComponent {
if (!this.dragDropEnabled) return
event?.preventDefault()
event?.stopImmediatePropagation()
- this.settings.globalDropzoneActive = false
+ this.settings.globalDropzoneActive.set(false)
const ms = immediate ? 0 : 500
this.fileLeaveTimeoutID = setTimeout(() => {
- this.fileIsOver = false
+ this.fileIsOver.set(false)
// await transition completed
setTimeout(() => {
- this.hidden = true
+ this.hidden.set(true)
}, 150)
}, ms)
}
diff --git a/src-ui/src/app/components/loading-component/loading.component.spec.ts b/src-ui/src/app/components/loading-component/loading.component.spec.ts
index d4667093d..5e898d752 100644
--- a/src-ui/src/app/components/loading-component/loading.component.spec.ts
+++ b/src-ui/src/app/components/loading-component/loading.component.spec.ts
@@ -25,11 +25,11 @@ describe('LoadingComponentWithPermissions', () => {
})
it('should have loading set to true by default', () => {
- expect(component.loading).toBeTruthy()
+ expect(component.loading()).toBeTruthy()
})
it('should have show set to false by default', () => {
- expect(component.show).toBeFalsy()
+ expect(component.show()).toBeFalsy()
})
it('should call next and complete on unsubscribeNotifier with itself on destroy', () => {
diff --git a/src-ui/src/app/components/loading-component/loading.component.ts b/src-ui/src/app/components/loading-component/loading.component.ts
index 0cde537d3..c3d2948e4 100644
--- a/src-ui/src/app/components/loading-component/loading.component.ts
+++ b/src-ui/src/app/components/loading-component/loading.component.ts
@@ -1,4 +1,4 @@
-import { Directive, OnDestroy } from '@angular/core'
+import { Directive, OnDestroy, signal } from '@angular/core'
import { Subject } from 'rxjs'
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
@@ -7,8 +7,8 @@ export abstract class LoadingComponentWithPermissions
extends ComponentWithPermissions
implements OnDestroy
{
- public loading: boolean = true
- public show: boolean = false
+ readonly loading = signal(true)
+ readonly show = signal(false)
protected unsubscribeNotifier: Subject<any> = new Subject()
diff --git a/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.html b/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.html
index b90f8d3d1..ed6304ea0 100644
--- a/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.html
+++ b/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.html
@@ -8,16 +8,16 @@
</div>
</li>
- @if (loading) {
+ @if (loading()) {
<li class="list-group-item">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
<ng-container i18n>Loading...</ng-container>
</li>
}
- @for (field of fields; track field) {
+ @for (field of fields(); track field) {
<li class="list-group-item">
- <div class="row fade" [class.show]="show">
+ <div class="row fade" [class.show]="show()">
<div class="col d-flex align-items-center"><button class="btn btn-link p-0 text-start" type="button" (click)="editField(field)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.CustomField)">{{field.name}}</button></div>
<div class="col d-flex align-items-center">{{getDataType(field)}}</div>
<div class="col">
@@ -64,7 +64,7 @@
</div>
</li>
}
- @if (!loading && fields.length === 0) {
+ @if (!loading() && fields().length === 0) {
<li class="list-group-item" i18n>No fields defined.</li>
}
</ul>
diff --git a/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.spec.ts b/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.spec.ts
index 96eaab503..8910b249b 100644
--- a/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.spec.ts
+++ b/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.spec.ts
@@ -94,7 +94,7 @@ describe('CustomFieldsComponent', () => {
toastService = TestBed.inject(ToastService)
listViewService = TestBed.inject(DocumentListViewService)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 0, username: 'test' }
+ settingsService.currentUser.set({ id: 0, username: 'test' })
fixture = TestBed.createComponent(CustomFieldsComponent)
component = fixture.componentInstance
diff --git a/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.ts b/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.ts
index 9b9eb98bf..b150ae1da 100644
--- a/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.ts
+++ b/src-ui/src/app/components/manage/document-attributes/custom-fields/custom-fields.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, inject } from '@angular/core'
+import { Component, OnInit, inject, signal } from '@angular/core'
import { RouterModule } from '@angular/router'
import {
NgbDropdownModule,
@@ -6,7 +6,7 @@ import {
NgbPaginationModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { delay, takeUntil, tap } from 'rxjs'
+import { takeUntil, tap } from 'rxjs'
import { ConfirmDialogComponent } from 'src/app/components/common/confirm-dialog/confirm-dialog.component'
import { CustomFieldEditDialogComponent } from 'src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component'
import { EditDialogMode } from 'src/app/components/common/edit-dialog/edit-dialog.component'
@@ -51,33 +51,33 @@ export class CustomFieldsComponent
private readonly documentService = inject(DocumentService)
private readonly savedViewService = inject(SavedViewService)
- public fields: CustomField[] = []
+ readonly fields = signal<CustomField[]>([])
ngOnInit() {
this.reload()
}
reload() {
+ this.loading.set(true)
this.customFieldsService
.listAll()
.pipe(
takeUntil(this.unsubscribeNotifier),
tap((r) => {
- this.fields = r.results
- }),
- delay(100)
+ this.fields.set(r.results)
+ })
)
.subscribe(() => {
- this.show = true
- this.loading = false
+ this.show.set(true)
+ this.loading.set(false)
})
}
editField(field: CustomField) {
const modal = this.modalService.open(CustomFieldEditDialogComponent)
- modal.componentInstance.dialogMode = field
- ? EditDialogMode.EDIT
- : EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(
+ field ? EditDialogMode.EDIT : EditDialogMode.CREATE
+ )
modal.componentInstance.object = field
modal.componentInstance.succeeded
.pipe(takeUntil(this.unsubscribeNotifier))
diff --git a/src-ui/src/app/components/manage/document-attributes/document-attributes.component.html b/src-ui/src/app/components/manage/document-attributes/document-attributes.component.html
index 118b61ce3..da6077039 100644
--- a/src-ui/src/app/components/manage/document-attributes/document-attributes.component.html
+++ b/src-ui/src/app/components/manage/document-attributes/document-attributes.component.html
@@ -59,7 +59,7 @@
}
</pngx-page-header>
-<ul ngbNav #nav="ngbNav" (navChange)="onNavChange($event)" [(activeId)]="activeNavID" class="nav-underline">
+<ul ngbNav #nav="ngbNav" (navChange)="onNavChange($event)" [activeId]="activeNavID()" (activeIdChange)="activeNavID.set($event)" class="nav-underline">
@for (section of visibleSections; track section.id) {
<li [ngbNavItem]="section.id">
<a ngbNavLink >
diff --git a/src-ui/src/app/components/manage/document-attributes/document-attributes.component.spec.ts b/src-ui/src/app/components/manage/document-attributes/document-attributes.component.spec.ts
index 54017a7e0..b0d010e19 100644
--- a/src-ui/src/app/components/manage/document-attributes/document-attributes.component.spec.ts
+++ b/src-ui/src/app/components/manage/document-attributes/document-attributes.component.spec.ts
@@ -100,7 +100,7 @@ describe('DocumentAttributesComponent', () => {
expect(router.navigate).toHaveBeenCalledWith(['attributes', 'tags'], {
replaceUrl: true,
})
- expect(component.activeNavID).toBe(1)
+ expect(component.activeNavID()).toBe(1)
})
it('should set active section from route param when valid', () => {
@@ -116,7 +116,7 @@ describe('DocumentAttributesComponent', () => {
fixture.detectChanges()
paramMapSubject.next(convertToParamMap({ section: 'customfields' }))
- expect(component.activeNavID).toBe(2)
+ expect(component.activeNavID()).toBe(2)
expect(router.navigate).not.toHaveBeenCalled()
})
@@ -124,10 +124,10 @@ describe('DocumentAttributesComponent', () => {
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
fixture.detectChanges()
- component.activeNavID = 1
+ component.activeNavID.set(1)
paramMapSubject.next(convertToParamMap({ section: 'customfields' }))
- expect(component.activeNavID).toBe(2)
+ expect(component.activeNavID()).toBe(2)
})
it('should redirect to dashboard when no sections are visible', () => {
@@ -169,7 +169,7 @@ describe('DocumentAttributesComponent', () => {
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
expect(component.activeManagementList).toBeNull()
- component.activeNavID = 1
+ component.activeNavID.set(1)
expect(component.activeSection.kind).toBe(
DocumentAttributesSectionKind.ManagementList
)
@@ -180,7 +180,7 @@ describe('DocumentAttributesComponent', () => {
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
expect(component.activeCustomFields).toBeNull()
- component.activeNavID = 2
+ component.activeNavID.set(2)
expect(component.activeSection.kind).toBe(
DocumentAttributesSectionKind.CustomFields
)
diff --git a/src-ui/src/app/components/manage/document-attributes/document-attributes.component.ts b/src-ui/src/app/components/manage/document-attributes/document-attributes.component.ts
index 8396ca6b2..d5e1e3c3a 100644
--- a/src-ui/src/app/components/manage/document-attributes/document-attributes.component.ts
+++ b/src-ui/src/app/components/manage/document-attributes/document-attributes.component.ts
@@ -1,11 +1,10 @@
import { NgComponentOutlet } from '@angular/common'
import {
- AfterViewChecked,
- ChangeDetectorRef,
Component,
inject,
OnDestroy,
OnInit,
+ signal,
Type,
ViewChild,
} from '@angular/core'
@@ -70,13 +69,10 @@ interface DocumentAttributesSection {
ClearableBadgeComponent,
],
})
-export class DocumentAttributesComponent
- implements OnInit, OnDestroy, AfterViewChecked
-{
+export class DocumentAttributesComponent implements OnInit, OnDestroy {
private readonly permissionsService = inject(PermissionsService)
private readonly activatedRoute = inject(ActivatedRoute)
private readonly router = inject(Router)
- private readonly cdr = inject(ChangeDetectorRef)
private readonly unsubscribeNotifier = new Subject<void>()
protected readonly PermissionAction = PermissionAction
@@ -136,11 +132,12 @@ export class DocumentAttributesComponent
]
@ViewChild('activeOutlet', { read: NgComponentOutlet })
- private readonly activeOutlet?: NgComponentOutlet
-
- private lastHeaderLoading: boolean
+ set activeOutlet(outlet: NgComponentOutlet | undefined) {
+ this.activeComponent.set(outlet?.componentInstance ?? null)
+ }
- activeNavID: number = null
+ readonly activeComponent = signal<unknown>(null)
+ readonly activeNavID = signal<number>(null)
get visibleSections(): DocumentAttributesSection[] {
return this.sections.filter((section) =>
@@ -153,8 +150,9 @@ export class DocumentAttributesComponent
get activeSection(): DocumentAttributesSection | null {
return (
- this.visibleSections.find((section) => section.id === this.activeNavID) ??
- null
+ this.visibleSections.find(
+ (section) => section.id === this.activeNavID()
+ ) ?? null
)
}
@@ -163,14 +161,14 @@ export class DocumentAttributesComponent
this.activeSection?.kind !== DocumentAttributesSectionKind.ManagementList
)
return null
- const instance = this.activeOutlet?.componentInstance
+ const instance = this.activeComponent()
return instance instanceof ManagementListComponent ? instance : null
}
get activeCustomFields(): CustomFieldsComponent | null {
if (this.activeSection?.kind !== DocumentAttributesSectionKind.CustomFields)
return null
- const instance = this.activeOutlet?.componentInstance
+ const instance = this.activeComponent()
return instance instanceof CustomFieldsComponent ? instance : null
}
@@ -184,8 +182,8 @@ export class DocumentAttributesComponent
get activeHeaderLoading(): boolean {
return (
- this.activeManagementList?.loading ??
- this.activeCustomFields?.loading ??
+ this.activeManagementList?.loading() ??
+ this.activeCustomFields?.loading() ??
false
)
}
@@ -203,13 +201,13 @@ export class DocumentAttributesComponent
return
}
- if (this.activeNavID !== navIDFromSection) {
- this.activeNavID = navIDFromSection
+ if (this.activeNavID() !== navIDFromSection) {
+ this.activeNavID.set(navIDFromSection)
}
if (!section || this.getNavIDForSection(section) == null) {
this.router.navigate(
- ['attributes', this.getSectionForNavID(this.activeNavID)],
+ ['attributes', this.getSectionForNavID(this.activeNavID())],
{ replaceUrl: true }
)
}
@@ -221,14 +219,6 @@ export class DocumentAttributesComponent
this.unsubscribeNotifier.complete()
}
- ngAfterViewChecked(): void {
- const current = this.activeHeaderLoading
- if (this.lastHeaderLoading !== current) {
- this.lastHeaderLoading = current
- this.cdr.detectChanges()
- }
- }
-
onNavChange(navChangeEvent: NgbNavChangeEvent): void {
const nextSection = this.getSectionForNavID(navChangeEvent.nextId)
if (!nextSection) {
diff --git a/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.html b/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.html
index f8417a264..0b0a40488 100644
--- a/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.html
+++ b/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.html
@@ -19,7 +19,7 @@
</select>
<span class="input-group-text text-muted d-none d-md-flex" i18n>per page</span>
</div>
- <ngb-pagination [pageSize]="pageSize" [collectionSize]="collectionSize" [(page)]="page" [maxSize]="5" (pageChange)="reloadData()" size="sm" aria-label="Pagination"></ngb-pagination>
+ <ngb-pagination [pageSize]="pageSize" [collectionSize]="collectionSize()" [page]="page()" [maxSize]="5" (pageChange)="page.set($event); reloadData()" size="sm" aria-label="Pagination"></ngb-pagination>
</div>
</div>
@@ -31,21 +31,21 @@
<tr>
<th>
<div class="form-check m-0 ms-2 me-n2">
- <input type="checkbox" class="form-check-input" id="all-objects" [(ngModel)]="togggleAll" [disabled]="data.length === 0" (change)="$event.target.checked ? selectPage() : clearSelection(); $event.stopPropagation();">
+ <input type="checkbox" class="form-check-input" id="all-objects" [ngModel]="togggleAll()" [disabled]="data().length === 0" (change)="$event.target.checked ? selectPage() : clearSelection(); $event.stopPropagation();">
<label class="form-check-label" for="all-objects"></label>
</div>
</th>
- <th class="fw-normal" pngxSortable="name" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Name</th>
- <th class="fw-normal d-none d-sm-table-cell" pngxSortable="matching_algorithm" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Matching</th>
- <th class="fw-normal" pngxSortable="document_count" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Document count</th>
+ <th class="fw-normal" pngxSortable="name" [currentSortField]="sortField()" [currentSortReverse]="sortReverse()" (sort)="onSort($event)" i18n>Name</th>
+ <th class="fw-normal d-none d-sm-table-cell" pngxSortable="matching_algorithm" [currentSortField]="sortField()" [currentSortReverse]="sortReverse()" (sort)="onSort($event)" i18n>Matching</th>
+ <th class="fw-normal" pngxSortable="document_count" [currentSortField]="sortField()" [currentSortReverse]="sortReverse()" (sort)="onSort($event)" i18n>Document count</th>
@for (column of extraColumns; track column) {
- <th class="fw-normal" [ngClass]="{ 'd-none d-sm-table-cell' : column.hideOnMobile }" pngxSortable="{{column.key}}" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)">{{column.name}}</th>
+ <th class="fw-normal" [ngClass]="{ 'd-none d-sm-table-cell' : column.hideOnMobile }" pngxSortable="{{column.key}}" [currentSortField]="sortField()" [currentSortReverse]="sortReverse()" (sort)="onSort($event)">{{column.name}}</th>
}
<th class="fw-normal" i18n>Actions</th>
</tr>
</thead>
<tbody>
- @if (loading && data.length === 0) {
+ @if (loading() && data().length === 0) {
<tr>
<td colspan="5">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
@@ -53,31 +53,31 @@
</td>
</tr>
}
- @for (object of data; track object) {
+ @for (object of data(); track object) {
<ng-container [ngTemplateOutlet]="objectRow" [ngTemplateOutletContext]="{ object: object, depth: 0 }"></ng-container>
}
</tbody>
</table>
</div>
-@if (!loading || data.length > 0) {
+@if (!loading() || data().length > 0) {
<div class="d-flex mb-2">
- @if (displayCollectionSize > 0) {
+ @if (displayCollectionSize() > 0) {
<div>
- <ng-container i18n>{displayCollectionSize, plural, =1 {One {{typeName}}} other {{{displayCollectionSize || 0}} total {{typeNamePlural}}}}</ng-container>
+ <ng-container i18n>{displayCollectionSize(), plural, =1 {One {{typeName}}} other {{{displayCollectionSize() || 0}} total {{typeNamePlural}}}}</ng-container>
@if (hasSelection) {
&nbsp;({{selectedCount}} selected)
}
</div>
}
- @if (collectionSize > 20) {
- <ngb-pagination class="ms-auto" [pageSize]="pageSize" [collectionSize]="collectionSize" [(page)]="page" [maxSize]="5" (pageChange)="reloadData()" size="sm" aria-label="Pagination"></ngb-pagination>
+ @if (collectionSize() > 20) {
+ <ngb-pagination class="ms-auto" [pageSize]="pageSize" [collectionSize]="collectionSize()" [page]="page()" [maxSize]="5" (pageChange)="page.set($event); reloadData()" size="sm" aria-label="Pagination"></ngb-pagination>
}
</div>
}
<ng-template #objectRow let-object="object" let-depth="depth">
- <tr (click)="toggleSelected(object); $event.stopPropagation();" class="data-row fade" [class.show]="show">
+ <tr (click)="toggleSelected(object); $event.stopPropagation();" class="data-row fade" [class.show]="show()">
<td>
<div class="form-check m-0 ms-2 me-n2">
<input type="checkbox" class="form-check-input" id="{{typeName}}{{object.id}}" [checked]="selectedObjects.has(object.id)" (click)="toggleSelected(object); $event.stopPropagation();">
diff --git a/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.spec.ts b/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.spec.ts
index cfc087ba4..7f4ff1dc1 100644
--- a/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.spec.ts
+++ b/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.spec.ts
@@ -5,12 +5,7 @@ import {
withInterceptorsFromDi,
} from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
-import {
- ComponentFixture,
- TestBed,
- fakeAsync,
- tick,
-} from '@angular/core/testing'
+import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { By } from '@angular/platform-browser'
import { RouterLinkWithHref } from '@angular/router'
@@ -140,24 +135,26 @@ describe('ManagementListComponent', () => {
// These tests are shared among all management list components
- it('should support filtering, clear on Esc key', fakeAsync(() => {
+ it('should support filtering, clear on Esc key', () => {
+ jest.useFakeTimers()
const nameFilterInput = fixture.debugElement.query(By.css('input'))
nameFilterInput.nativeElement.value = 'foo'
// nameFilterInput.nativeElement.dispatchEvent(new Event('input'))
component.nameFilter = 'foo' // subject normally triggered by ngModel
- tick(400) // debounce
+ jest.advanceTimersByTime(400) // debounce
fixture.detectChanges()
- expect(component.data).toEqual([tags[0]])
+ expect(component.data()).toEqual([tags[0]])
nameFilterInput.nativeElement.dispatchEvent(
new KeyboardEvent('keyup', { code: 'Escape' })
)
- tick(400) // debounce
+ jest.advanceTimersByTime(400) // debounce
fixture.detectChanges()
expect(component.nameFilter).toBeNull()
- expect(component.data).toEqual(tags)
- tick(100) // load
- }))
+ expect(component.data()).toEqual(tags)
+ jest.advanceTimersByTime(100) // load
+ jest.useRealTimers()
+ })
it('should support create, show notification on error / success', () => {
let modal: NgbModalRef
@@ -230,7 +227,8 @@ describe('ManagementListComponent', () => {
expect(reloadSpy).toHaveBeenCalled()
})
- it('should use API count for pagination and nested ids for displayed total', fakeAsync(() => {
+ it('should use API count for pagination and nested ids for displayed total', () => {
+ jest.useFakeTimers()
jest.spyOn(tagService, 'listFiltered').mockReturnValueOnce(
of({
count: 1,
@@ -240,11 +238,12 @@ describe('ManagementListComponent', () => {
)
component.reloadData()
- tick(100)
+ jest.advanceTimersByTime(100)
- expect(component.collectionSize).toBe(1)
- expect(component.displayCollectionSize).toBe(3)
- }))
+ expect(component.collectionSize()).toBe(1)
+ expect(component.displayCollectionSize()).toBe(3)
+ jest.useRealTimers()
+ })
it('should support quick filter for objects', () => {
const expectedUrl = documentListViewService.getQuickFilterUrl([
@@ -275,9 +274,9 @@ describe('ManagementListComponent', () => {
})
)
)
- component.page = 2
+ component.page.set(2)
component.reloadData()
- expect(component.page).toEqual(1)
+ expect(component.page()).toEqual(1)
})
it('should support toggle select page in vew', () => {
@@ -295,28 +294,28 @@ describe('ManagementListComponent', () => {
it('selectNone should clear selection and reset toggle flag', () => {
component.selectedObjects = new Set([tags[0].id, tags[1].id])
- component.togggleAll = true
+ component.togggleAll.set(true)
component.selectNone()
expect(component.selectedObjects.size).toBe(0)
- expect(component.togggleAll).toBe(false)
+ expect(component.togggleAll()).toBe(false)
})
it('selectPage should select current page items or clear selection', () => {
component.selectPage()
expect(component.selectedObjects).toEqual(new Set(tags.map((t) => t.id)))
- expect(component.togggleAll).toBe(true)
+ expect(component.togggleAll()).toBe(true)
- component.togggleAll = true
+ component.togggleAll.set(true)
component.clearSelection()
expect(component.selectedObjects.size).toBe(0)
- expect(component.togggleAll).toBe(false)
+ expect(component.togggleAll()).toBe(false)
})
it('selectAll should activate all-selection mode', () => {
;(tagService.listFiltered as jest.Mock).mockClear()
- component.collectionSize = tags.length
+ component.collectionSize.set(tags.length)
component.selectAll()
@@ -325,41 +324,41 @@ describe('ManagementListComponent', () => {
expect((component as any).allSelectionActive).toBe(true)
expect(component.hasSelection).toBe(true)
expect(component.selectedCount).toBe(tags.length)
- expect(component.togggleAll).toBe(true)
+ expect(component.togggleAll()).toBe(true)
})
it('selectAll should clear selection when collection size is zero', () => {
component.selectedObjects = new Set([1])
- component.collectionSize = 0
- component.togggleAll = true
+ component.collectionSize.set(0)
+ component.togggleAll.set(true)
component.selectAll()
expect(component.selectedObjects.size).toBe(0)
- expect(component.togggleAll).toBe(false)
+ expect(component.togggleAll()).toBe(false)
})
it('toggleSelected should toggle object selection and update toggle state', () => {
component.toggleSelected(tags[0])
expect(component.selectedObjects.has(tags[0].id)).toBe(true)
- expect(component.togggleAll).toBe(false)
+ expect(component.togggleAll()).toBe(false)
component.toggleSelected(tags[1])
component.toggleSelected(tags[2])
- expect(component.togggleAll).toBe(true)
+ expect(component.togggleAll()).toBe(true)
component.toggleSelected(tags[1])
expect(component.selectedObjects.has(tags[1].id)).toBe(false)
- expect(component.togggleAll).toBe(false)
+ expect(component.togggleAll()).toBe(false)
})
it('areAllPageItemsSelected should return false when page has no selectable items', () => {
- component.data = []
+ component.data.set([])
component.selectedObjects.clear()
expect((component as any).areAllPageItemsSelected()).toBe(false)
- component.data = tags
+ component.data.set(tags)
})
it('should support bulk edit permissions', () => {
@@ -498,7 +497,7 @@ describe('ManagementListComponent', () => {
document_count: 10,
parent: 1,
}
- component['unfilteredData'].push(childTag)
+ component['unfilteredData'].update((data) => [...data, childTag])
const original = component.getOriginalObject({ id: 4 } as Tag)
expect(original).toEqual(childTag)
})
@@ -525,7 +524,7 @@ describe('ManagementListComponent', () => {
expect(component.pageSize).toBe(25)
})
- it('pageSize setter should update settings, reset page and reload data on success', fakeAsync(() => {
+ it('pageSize setter should update settings, reset page and reload data on success', () => {
const reloadSpy = jest.spyOn(component, 'reloadData')
const toastErrorSpy = jest.spyOn(toastService, 'showError')
@@ -536,21 +535,19 @@ describe('ManagementListComponent', () => {
.mockReturnValue(of({ success: true }))
component.typeNamePlural = 'tags'
- component.page = 2
+ component.page.set(2)
component.pageSize = 100
- tick()
-
expect(settingsService.set).toHaveBeenCalledWith(
SETTINGS_KEYS.OBJECT_LIST_SIZES,
{ tags: 100 }
)
- expect(component.page).toBe(1)
+ expect(component.page()).toBe(1)
expect(reloadSpy).toHaveBeenCalled()
expect(toastErrorSpy).not.toHaveBeenCalled()
- }))
+ })
- it('pageSize setter should show error toast on settings store failure', fakeAsync(() => {
+ it('pageSize setter should show error toast on settings store failure', () => {
const reloadSpy = jest.spyOn(component, 'reloadData')
const toastErrorSpy = jest.spyOn(toastService, 'showError')
@@ -563,12 +560,10 @@ describe('ManagementListComponent', () => {
component.typeNamePlural = 'tags'
component.pageSize = 50
- tick()
-
expect(toastErrorSpy).toHaveBeenCalledWith(
'Error saving settings',
expect.any(Error)
)
expect(reloadSpy).not.toHaveBeenCalled()
- }))
+ })
})
diff --git a/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.ts b/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.ts
index fd7c1ae11..7156b6214 100644
--- a/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.ts
+++ b/src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.ts
@@ -5,13 +5,13 @@ import {
OnDestroy,
OnInit,
QueryList,
+ signal,
ViewChildren,
} from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { Subject } from 'rxjs'
import {
debounceTime,
- delay,
distinctUntilChanged,
takeUntil,
tap,
@@ -88,25 +88,25 @@ export abstract class ManagementListComponent<T extends MatchingModel>
@ViewChildren(SortableDirective) headers: QueryList<SortableDirective>
- public data: T[] = []
- private unfilteredData: T[] = []
+ readonly data = signal<T[]>([])
+ private readonly unfilteredData = signal<T[]>([])
private currentExtraParams: { [key: string]: any } = null
private allSelectionActive = false
- public page = 1
+ readonly page = signal(1)
- public collectionSize = 0
- public displayCollectionSize = 0
+ readonly collectionSize = signal(0)
+ readonly displayCollectionSize = signal(0)
- public sortField: string
- public sortReverse: boolean
+ readonly sortField = signal<string>(undefined)
+ readonly sortReverse = signal<boolean>(undefined)
private nameFilterDebounce: Subject<string>
protected unsubscribeNotifier: Subject<any> = new Subject()
protected _nameFilter: string
public selectedObjects: Set<number> = new Set()
- public togggleAll: boolean = false
+ readonly togggleAll = signal(false)
public get hasSelection(): boolean {
return this.selectedObjects.size > 0 || this.allSelectionActive
@@ -114,7 +114,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
public get selectedCount(): number {
return this.allSelectionActive
- ? this.displayCollectionSize
+ ? this.displayCollectionSize()
: this.selectedObjects.size
}
@@ -131,7 +131,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
)
.subscribe((title) => {
this._nameFilter = title
- this.page = 1
+ this.page.set(1)
this.reloadData()
})
}
@@ -151,8 +151,8 @@ export abstract class ManagementListComponent<T extends MatchingModel>
}
onSort(event: SortEvent) {
- this.sortField = event.column
- this.sortReverse = event.reverse
+ this.sortField.set(event.column)
+ this.sortReverse.set(event.reverse)
this.reloadData()
}
@@ -171,25 +171,25 @@ export abstract class ManagementListComponent<T extends MatchingModel>
getDocumentCount(object: MatchingModel): number {
return (
object.document_count ??
- this.unfilteredData.find((d) => d.id == object.id)?.document_count ??
+ this.unfilteredData().find((d) => d.id == object.id)?.document_count ??
0
)
}
public getOriginalObject(object: T): T {
- return this.unfilteredData.find((d) => d?.id == object?.id) || object
+ return this.unfilteredData().find((d) => d?.id == object?.id) || object
}
reloadData(extraParams: { [key: string]: any } = null) {
- this.loading = true
+ this.loading.set(true)
this.currentExtraParams = extraParams
this.clearSelection()
this.service
.listFiltered(
- this.page,
+ this.page(),
this.pageSize,
- this.sortField,
- this.sortReverse,
+ this.sortField(),
+ this.sortReverse(),
this._nameFilter,
true,
extraParams
@@ -197,23 +197,22 @@ export abstract class ManagementListComponent<T extends MatchingModel>
.pipe(
takeUntil(this.unsubscribeNotifier),
tap((c) => {
- this.unfilteredData = c.results
- this.data = this.filterData(c.results)
- this.collectionSize = this.getCollectionSize(c)
- this.displayCollectionSize = this.getDisplayCollectionSize(c)
- }),
- delay(100)
+ this.unfilteredData.set(c.results)
+ this.data.set(this.filterData(c.results))
+ this.collectionSize.set(this.getCollectionSize(c))
+ this.displayCollectionSize.set(this.getDisplayCollectionSize(c))
+ })
)
.subscribe({
error: (error: HttpErrorResponse) => {
if (error.error?.detail?.includes('Invalid page')) {
- this.page = 1
+ this.page.set(1)
this.reloadData()
}
},
next: () => {
- this.show = true
- this.loading = false
+ this.show.set(true)
+ this.loading.set(false)
},
})
}
@@ -222,7 +221,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
const activeModal = this.modalService.open(this.editDialogComponent, {
backdrop: 'static',
})
- activeModal.componentInstance.dialogMode = EditDialogMode.CREATE
+ activeModal.componentInstance.dialogMode.set(EditDialogMode.CREATE)
activeModal.componentInstance.succeeded.subscribe(() => {
this.reloadData()
this.toastService.showInfo(
@@ -242,7 +241,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
backdrop: 'static',
})
activeModal.componentInstance.object = object
- activeModal.componentInstance.dialogMode = EditDialogMode.EDIT
+ activeModal.componentInstance.dialogMode.set(EditDialogMode.EDIT)
activeModal.componentInstance.succeeded.subscribe(() => {
this.reloadData()
this.toastService.showInfo(
@@ -322,7 +321,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
})
this.settingsService.storeSettings().subscribe({
next: () => {
- this.page = 1
+ this.page.set(1)
this.reloadData()
},
error: (error) => {
@@ -346,7 +345,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
if (!this.permissionsService.currentUserCan(action, this.permissionType))
return false
let ownsAll: boolean = true
- const objects = this.data.filter((o) => this.selectedObjects.has(o.id))
+ const objects = this.data().filter((o) => this.selectedObjects.has(o.id))
ownsAll = objects.every((o) =>
this.permissionsService.currentUserOwnsObject(o)
)
@@ -367,7 +366,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
clearSelection() {
this.allSelectionActive = false
- this.togggleAll = false
+ this.togggleAll.set(false)
this.selectedObjects.clear()
}
@@ -377,19 +376,19 @@ export abstract class ManagementListComponent<T extends MatchingModel>
selectPage() {
this.allSelectionActive = false
- this.selectedObjects = new Set(this.getSelectableIDs(this.data))
- this.togggleAll = this.areAllPageItemsSelected()
+ this.selectedObjects = new Set(this.getSelectableIDs(this.data()))
+ this.togggleAll.set(this.areAllPageItemsSelected())
}
selectAll() {
- if (!this.collectionSize) {
+ if (!this.collectionSize()) {
this.clearSelection()
return
}
this.allSelectionActive = true
- this.selectedObjects = new Set(this.getSelectableIDs(this.data))
- this.togggleAll = this.areAllPageItemsSelected()
+ this.selectedObjects = new Set(this.getSelectableIDs(this.data()))
+ this.togggleAll.set(this.areAllPageItemsSelected())
}
toggleSelected(object) {
@@ -399,14 +398,14 @@ export abstract class ManagementListComponent<T extends MatchingModel>
this.selectedObjects.has(object.id)
? this.selectedObjects.delete(object.id)
: this.selectedObjects.add(object.id)
- this.togggleAll = this.areAllPageItemsSelected()
+ this.togggleAll.set(this.areAllPageItemsSelected())
}
protected areAllPageItemsSelected(): boolean {
if (this.allSelectionActive) {
- return this.data.length > 0
+ return this.data().length > 0
}
- const ids = this.getSelectableIDs(this.data)
+ const ids = this.getSelectableIDs(this.data())
return ids.length > 0 && ids.every((id) => this.selectedObjects.has(id))
}
@@ -416,7 +415,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
})
modal.componentInstance.confirmClicked.subscribe(
({ permissions, merge }) => {
- modal.componentInstance.buttonsEnabled = false
+ modal.componentInstance.buttonsEnabled.set(false)
this.service
.bulk_edit_objects(
this.allSelectionActive ? [] : Array.from(this.selectedObjects),
@@ -435,7 +434,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
this.reloadData()
},
error: (error) => {
- modal.componentInstance.buttonsEnabled = true
+ modal.componentInstance.buttonsEnabled.set(true)
this.toastService.showError(
$localize`Error updating permissions`,
error
diff --git a/src-ui/src/app/components/manage/document-attributes/management-list/tag-list/tag-list.component.spec.ts b/src-ui/src/app/components/manage/document-attributes/management-list/tag-list/tag-list.component.spec.ts
index dab6a5809..d30408a22 100644
--- a/src-ui/src/app/components/manage/document-attributes/management-list/tag-list/tag-list.component.spec.ts
+++ b/src-ui/src/app/components/manage/document-attributes/management-list/tag-list/tag-list.component.spec.ts
@@ -136,7 +136,7 @@ describe('TagListComponent', () => {
],
}
- component.data = [parent as any]
+ component.data.set([parent as any])
component.selectPage()
expect(component.selectedObjects.has(10)).toBe(true)
diff --git a/src-ui/src/app/components/manage/mail/mail.component.html b/src-ui/src/app/components/manage/mail/mail.component.html
index 204bc9e1c..c0eb0a346 100644
--- a/src-ui/src/app/components/manage/mail/mail.component.html
+++ b/src-ui/src/app/components/manage/mail/mail.component.html
@@ -34,16 +34,16 @@
</div>
</li>
- @if (loadingAccounts) {
+ @if (loadingAccounts()) {
<li class="list-group-item">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
<ng-container i18n>Loading...</ng-container>
</li>
}
- @for (account of mailAccounts; track account) {
+ @for (account of mailAccounts(); track account) {
<li class="list-group-item">
- <div class="row fade" [class.show]="showAccounts">
+ <div class="row fade" [class.show]="showAccounts()">
<div class="col d-flex align-items-center">
<button class="btn btn-link p-0 text-start" type="button" (click)="editMailAccount(account)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.MailAccount) || !userCanEdit(account)">
{{account.name}}@switch (account.account_type) {
@@ -91,7 +91,7 @@
</div>
</li>
}
- @if (!loadingAccounts && mailAccounts.length === 0) {
+ @if (!loadingAccounts() && mailAccounts().length === 0) {
<li class="list-group-item" i18n>No mail accounts defined.</li>
}
</ul>
@@ -117,19 +117,19 @@
</div>
</li>
- @if (loadingRules) {
+ @if (loadingRules()) {
<li class="list-group-item">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
<ng-container i18n>Loading...</ng-container>
</li>
}
- @for (rule of mailRules; track rule) {
+ @for (rule of mailRules(); track rule) {
<li class="list-group-item">
- <div class="row fade" [class.show]="showRules">
+ <div class="row fade" [class.show]="showRules()">
<div class="col d-flex align-items-center"><button class="btn btn-link p-0 text-start" type="button" (click)="editMailRule(rule)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.MailRule) || !userCanEdit(rule)">{{rule.name}}</button></div>
<div class="col-1 d-flex align-items-center d-none d-sm-flex">{{rule.order}}</div>
- <div class="col-2 d-flex align-items-center">{{ mailAccountsById.get(rule.account)?.name }}</div>
+ <div class="col-2 d-flex align-items-center">{{ mailAccountsById().get(rule.account)?.name }}</div>
<div class="col-2 d-flex align-items-center d-none d-sm-flex">
<div class="form-check form-switch mb-0">
<input #inputField type="checkbox" class="form-check-input cursor-pointer" [id]="rule.id+'_enable'" [(ngModel)]="rule.enabled" (change)="onMailRuleEnableToggled(rule)" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailRule }">
@@ -179,14 +179,14 @@
</div>
</li>
}
- @if (!loadingRules && mailRules.length === 0) {
+ @if (!loadingRules() && mailRules().length === 0) {
<li class="list-group-item" i18n>No mail rules defined.</li>
}
</ul>
</ng-container>
-@if (!mailAccounts || !mailRules) {
+@if (!mailAccounts() || !mailRules()) {
<div>
<div class="spinner-border spinner-border-sm fw-normal ms-2 me-auto" role="status"></div>
<div class="visually-hidden" i18n>Loading...</div>
diff --git a/src-ui/src/app/components/manage/mail/mail.component.spec.ts b/src-ui/src/app/components/manage/mail/mail.component.spec.ts
index c866160d4..cb2111fcd 100644
--- a/src-ui/src/app/components/manage/mail/mail.component.spec.ts
+++ b/src-ui/src/app/components/manage/mail/mail.component.spec.ts
@@ -113,7 +113,7 @@ describe('MailComponent', () => {
permissionsService = TestBed.inject(PermissionsService)
activatedRoute = TestBed.inject(ActivatedRoute)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = { id: 1 }
+ settingsService.currentUser.set({ id: 1 })
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(true)
jest
.spyOn(permissionsService, 'currentUserHasObjectPermissions')
@@ -261,7 +261,7 @@ describe('MailComponent', () => {
const editDialog = modal.componentInstance as MailRuleEditDialogComponent
expect(editDialog.object.id).toBeNull()
expect(editDialog.object.name).toEqual(`${mailRules[0].name} (copy)`)
- expect(editDialog.dialogMode).toEqual(EditDialogMode.CREATE)
+ expect(editDialog.dialogMode()).toEqual(EditDialogMode.CREATE)
})
it('should support delete mail rule, show error if needed', () => {
@@ -414,6 +414,6 @@ describe('MailComponent', () => {
modalService.activeInstances.subscribe((refs) => (modal = refs[0]))
component.viewProcessedMail(mailRules[0] as MailRule)
const dialog = modal.componentInstance as any
- expect(dialog.rule).toEqual(mailRules[0])
+ expect(dialog.rule()).toEqual(mailRules[0])
})
})
diff --git a/src-ui/src/app/components/manage/mail/mail.component.ts b/src-ui/src/app/components/manage/mail/mail.component.ts
index bc119f525..f8be041a3 100644
--- a/src-ui/src/app/components/manage/mail/mail.component.ts
+++ b/src-ui/src/app/components/manage/mail/mail.component.ts
@@ -1,9 +1,9 @@
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import { Component, OnDestroy, OnInit, inject, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { ActivatedRoute } from '@angular/router'
import { NgbDropdownModule, NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { Subject, delay, first, takeUntil, tap } from 'rxjs'
+import { Subject, first, takeUntil, tap } from 'rxjs'
import { MailAccount, MailAccountType } from 'src/app/data/mail-account'
import { MailRule } from 'src/app/data/mail-rule'
import { ObjectWithPermissions } from 'src/app/data/object-with-permissions'
@@ -56,19 +56,17 @@ export class MailComponent
public MailAccountType = MailAccountType
- private _mailAccounts: MailAccount[] = []
+ readonly mailAccounts = signal<MailAccount[]>([])
- public get mailAccounts() {
- return this._mailAccounts
- }
- private set mailAccounts(accounts: MailAccount[]) {
- this._mailAccounts = accounts
- this.mailAccountsById = new Map(
- accounts.map((account) => [account.id, account])
+ private setMailAccounts(accounts: MailAccount[]) {
+ this.mailAccounts.set(accounts)
+ this.mailAccountsById.set(
+ new Map(accounts.map((account) => [account.id, account]))
)
}
- public mailAccountsById: Map<number, MailAccount> = new Map()
- public mailRules: MailRule[] = []
+ readonly mailAccountsById = signal<Map<number, MailAccount>>(new Map())
+
+ readonly mailRules = signal<MailRule[]>([])
unsubscribeNotifier: Subject<any> = new Subject()
oAuthAccountId: number
@@ -81,10 +79,10 @@ export class MailComponent
return this.settingsService.get(SETTINGS_KEYS.OUTLOOK_OAUTH_URL)
}
- public loadingRules: boolean = true
- public showRules: boolean = false
- public loadingAccounts: boolean = true
- public showAccounts: boolean = false
+ readonly loadingRules = signal(true)
+ readonly showRules = signal(false)
+ readonly loadingAccounts = signal(true)
+ readonly showAccounts = signal(false)
ngOnInit(): void {
this.mailAccountService
@@ -93,23 +91,21 @@ export class MailComponent
first(),
takeUntil(this.unsubscribeNotifier),
tap((r) => {
- this.mailAccounts = r.results
+ this.setMailAccounts(r.results)
+ this.loadingAccounts.set(false)
+ this.showAccounts.set(true)
if (this.oAuthAccountId) {
this.editMailAccount(
- this.mailAccounts.find(
+ this.mailAccounts().find(
(account) => account.id === this.oAuthAccountId
)
)
}
- }),
- delay(100)
+ })
)
.subscribe({
- next: () => {
- this.loadingAccounts = false
- this.showAccounts = true
- },
error: (e) => {
+ this.loadingAccounts.set(false)
this.toastService.showError(
$localize`Error retrieving mail accounts`,
e
@@ -123,16 +119,14 @@ export class MailComponent
first(),
takeUntil(this.unsubscribeNotifier),
tap((r) => {
- this.mailRules = r.results
- }),
- delay(100)
+ this.mailRules.set(r.results)
+ this.loadingRules.set(false)
+ this.showRules.set(true)
+ })
)
.subscribe({
- next: (r) => {
- this.loadingRules = false
- this.showRules = true
- },
error: (e) => {
+ this.loadingRules.set(false)
this.toastService.showError($localize`Error retrieving mail rules`, e)
},
})
@@ -143,9 +137,9 @@ export class MailComponent
if (success) {
this.toastService.showInfo($localize`OAuth2 authentication success`)
this.oAuthAccountId = parseInt(params.get('account_id'))
- if (this.mailAccounts.length > 0) {
+ if (this.mailAccounts().length > 0) {
this.editMailAccount(
- this.mailAccounts.find(
+ this.mailAccounts().find(
(account) => account.id === this.oAuthAccountId
)
)
@@ -168,9 +162,9 @@ export class MailComponent
backdrop: 'static',
size: 'xl',
})
- modal.componentInstance.dialogMode = account
- ? EditDialogMode.EDIT
- : EditDialogMode.CREATE
+ modal.componentInstance.dialogMode.set(
+ account ? EditDialogMode.EDIT : EditDialogMode.CREATE
+ )
modal.componentInstance.object = account
modal.componentInstance.succeeded
.pipe(takeUntil(this.unsubscribeNotifier))
@@ -182,7 +176,7 @@ export class MailComponent
this.mailAccountService
.listAll(null, null, { full_perms: true })
.subscribe((r) => {
- this.mailAccounts = r.results
+ this.setMailAccounts(r.results)
})
})
modal.componentInstance.failed
@@ -213,7 +207,7 @@ export class MailComponent
this.mailAccountService
.listAll(null, null, { full_perms: true })
.subscribe((r) => {
- this.mailAccounts = r.results
+ this.setMailAccounts(r.results)
})
},
error: (e) => {
@@ -247,8 +241,9 @@ export class MailComponent
backdrop: 'static',
size: 'xl',
})
- modal.componentInstance.dialogMode =
+ modal.componentInstance.dialogMode.set(
rule && !forceCreate ? EditDialogMode.EDIT : EditDialogMode.CREATE
+ )
modal.componentInstance.object = rule
modal.componentInstance.succeeded
.pipe(takeUntil(this.unsubscribeNotifier))
@@ -258,7 +253,7 @@ export class MailComponent
this.mailRuleService
.listAll(null, null, { full_perms: true })
.subscribe((r) => {
- this.mailRules = r.results
+ this.mailRules.set(r.results)
})
})
modal.componentInstance.failed
@@ -314,7 +309,7 @@ export class MailComponent
this.mailRuleService
.listAll(null, null, { full_perms: true })
.subscribe((r) => {
- this.mailRules = r.results
+ this.mailRules.set(r.results)
})
},
error: (e) => {
@@ -336,7 +331,7 @@ export class MailComponent
dialog.object = object
modal.componentInstance.confirmClicked.subscribe(
({ permissions, merge }) => {
- modal.componentInstance.buttonsEnabled = false
+ modal.componentInstance.buttonsEnabled.set(false)
const service: AbstractPaperlessService<MailRule | MailAccount> =
'account' in object ? this.mailRuleService : this.mailAccountService
object.owner = permissions['owner']
@@ -362,7 +357,7 @@ export class MailComponent
backdrop: 'static',
size: 'xl',
})
- modal.componentInstance.rule = rule
+ modal.componentInstance.rule.set(rule)
}
userCanEdit(obj: ObjectWithPermissions): boolean {
diff --git a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html
index 26b63fd56..675b7284d 100644
--- a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html
+++ b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html
@@ -1,5 +1,5 @@
<div class="modal-header">
- <h6 class="modal-title" id="modal-basic-title" i18n>Processed Mail for <em>{{ rule.name }}</em></h6>
+ <h6 class="modal-title" id="modal-basic-title" i18n>Processed Mail for <em>{{ rule().name }}</em></h6>
<button class="btn btn-sm btn-link text-muted me-auto p-0 p-md-2" title="What's this?" i18n-title type="button" [ngbPopover]="infoPopover" [autoClose]="true">
<i-bs name="question-circle"></i-bs>
</button>
@@ -10,13 +10,13 @@
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
</div>
<div class="modal-body">
- @if (loading) {
+ @if (loading()) {
<div class="text-center my-5">
<div class="spinner-border" role="status">
<span class="visually-hidden" i18n>Loading...</span>
</div>
</div>
- } @else if (processedMails.length === 0) {
+ } @else if (processedMails().length === 0) {
<span i18n>No processed email messages found.</span>
} @else {
<div class="table-responsive">
@@ -25,7 +25,7 @@
<tr>
<th scope="col" style="width: 40px;">
<div class="form-check m-0 ms-2 me-n2">
- <input type="checkbox" class="form-check-input" id="all-objects" [(ngModel)]="toggleAllEnabled" [disabled]="processedMails.length === 0" (click)="toggleAll($event); $event.stopPropagation();">
+ <input type="checkbox" class="form-check-input" id="all-objects" [ngModel]="toggleAllEnabled()" (ngModelChange)="toggleAllEnabled.set($event)" [disabled]="processedMails().length === 0" (click)="toggleAll($event); $event.stopPropagation();">
<label class="form-check-label" for="all-objects"></label>
</div>
</th>
@@ -37,7 +37,7 @@
</tr>
</thead>
<tbody>
- @for (mail of processedMails; track mail.id) {
+ @for (mail of processedMails(); track mail.id) {
<ng-template #statusTooltip>
<div class="small text-light font-monospace">
{{mail.status}}
@@ -46,7 +46,7 @@
<tr>
<td>
<div class="form-check m-0 ms-2 me-n2">
- <input type="checkbox" class="form-check-input" [id]="mail.id" [checked]="selectedMailIds.has(mail.id)" (click)="toggleSelected(mail); $event.stopPropagation();">
+ <input type="checkbox" class="form-check-input" [id]="mail.id" [checked]="selectedMailIds().has(mail.id)" (click)="toggleSelected(mail); $event.stopPropagation();">
<label class="form-check-label" [for]="mail.id"></label>
</div>
</td>
@@ -82,7 +82,7 @@
</table>
</div>
<div class="btn-toolbar">
- <button type="button" class="btn btn-outline-secondary me-2" (click)="clearSelection()" [disabled]="selectedMailIds.size === 0" i18n>Clear</button>
+ <button type="button" class="btn btn-outline-secondary me-2" (click)="clearSelection()" [disabled]="selectedMailIds().size === 0" i18n>Clear</button>
<pngx-confirm-button
label="Delete selected"
i18n-label
@@ -90,12 +90,12 @@
i18n-title
buttonClasses="btn-outline-danger"
iconName="trash"
- [disabled]="selectedMailIds.size === 0"
+ [disabled]="selectedMailIds().size === 0"
(confirm)="deleteSelected()">
</pngx-confirm-button>
<div class="ms-auto">
<ngb-pagination
- [collectionSize]="processedMails.length"
+ [collectionSize]="processedMails().length"
[(page)]="page"
[pageSize]="50"
[maxSize]="5"
diff --git a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.spec.ts b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.spec.ts
index c34c97ef2..50f646671 100644
--- a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.spec.ts
+++ b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.spec.ts
@@ -64,7 +64,7 @@ describe('ProcessedMailDialogComponent', () => {
toastService = TestBed.inject(ToastService)
fixture = TestBed.createComponent(ProcessedMailDialogComponent)
component = fixture.componentInstance
- component.rule = rule
+ component.rule.set(rule)
})
afterEach(() => {
@@ -83,8 +83,8 @@ describe('ProcessedMailDialogComponent', () => {
fixture.detectChanges()
const req = expectListRequest(rule.id)
req.flush({ count: 2, results: mails })
- expect(component.loading).toBeFalsy()
- expect(component.processedMails).toEqual(mails)
+ expect(component.loading()).toBeFalsy()
+ expect(component.processedMails()).toEqual(mails)
})
it('should delete selected mails and reload', () => {
@@ -94,8 +94,8 @@ describe('ProcessedMailDialogComponent', () => {
initialReq.flush({ count: 0, results: [] })
// select a couple of mails and delete
- component.selectedMailIds.add(5)
- component.selectedMailIds.add(6)
+ component.selectedMailIds().add(5)
+ component.selectedMailIds().add(6)
const toastInfoSpy = jest.spyOn(toastService, 'showInfo')
component.deleteSelected()
@@ -127,18 +127,18 @@ describe('ProcessedMailDialogComponent', () => {
header.dispatchEvent(new Event('click'))
header.checked = true
header.dispatchEvent(new Event('click'))
- expect(component.selectedMailIds.size).toEqual(mails.length)
+ expect(component.selectedMailIds().size).toEqual(mails.length)
// toggle a single mail
component.toggleSelected(mails[0] as any)
- expect(component.selectedMailIds.has(mails[0].id)).toBeFalsy()
+ expect(component.selectedMailIds().has(mails[0].id)).toBeFalsy()
component.toggleSelected(mails[0] as any)
- expect(component.selectedMailIds.has(mails[0].id)).toBeTruthy()
+ expect(component.selectedMailIds().has(mails[0].id)).toBeTruthy()
// clear selection
component.clearSelection()
- expect(component.selectedMailIds.size).toEqual(0)
- expect(component.toggleAllEnabled).toBeFalsy()
+ expect(component.selectedMailIds().size).toEqual(0)
+ expect(component.toggleAllEnabled()).toBeFalsy()
})
it('should close the dialog', () => {
diff --git a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.ts b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.ts
index ed51ad0ed..32db2eb26 100644
--- a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.ts
+++ b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.ts
@@ -1,5 +1,5 @@
import { SlicePipe } from '@angular/common'
-import { Component, inject, Input, OnInit } from '@angular/core'
+import { Component, inject, OnInit, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import {
NgbActiveModal,
@@ -36,16 +36,14 @@ export class ProcessedMailDialogComponent implements OnInit {
private readonly processedMailService = inject(ProcessedMailService)
private readonly toastService = inject(ToastService)
- public processedMails: ProcessedMail[] = []
-
- public loading: boolean = true
- public toggleAllEnabled: boolean = false
- public readonly selectedMailIds: Set<number> = new Set<number>()
+ readonly rule = signal<MailRule>(undefined)
+ readonly processedMails = signal<ProcessedMail[]>([])
+ readonly loading = signal(true)
+ readonly toggleAllEnabled = signal(false)
+ readonly selectedMailIds = signal<Set<number>>(new Set())
public page: number = 1
- @Input() rule: MailRule
-
ngOnInit(): void {
this.loadProcessedMails()
}
@@ -55,19 +53,19 @@ export class ProcessedMailDialogComponent implements OnInit {
}
private loadProcessedMails(): void {
- this.loading = true
+ this.loading.set(true)
this.clearSelection()
this.processedMailService
- .list(this.page, 50, 'processed_at', true, { rule: this.rule.id })
+ .list(this.page, 50, 'processed_at', true, { rule: this.rule().id })
.subscribe((result) => {
- this.processedMails = result.results
- this.loading = false
+ this.processedMails.set(result.results)
+ this.loading.set(false)
})
}
public deleteSelected(): void {
this.processedMailService
- .bulk_delete(Array.from(this.selectedMailIds))
+ .bulk_delete(Array.from(this.selectedMailIds()))
.subscribe(() => {
this.toastService.showInfo($localize`Processed mail(s) deleted`)
this.loadProcessedMails()
@@ -75,22 +73,25 @@ export class ProcessedMailDialogComponent implements OnInit {
}
public toggleAll(event: PointerEvent) {
+ const selectedMailIds = new Set<number>()
if ((event.target as HTMLInputElement).checked) {
- this.selectedMailIds.clear()
- this.processedMails.forEach((mail) => this.selectedMailIds.add(mail.id))
+ this.processedMails().forEach((mail) => selectedMailIds.add(mail.id))
+ this.selectedMailIds.set(selectedMailIds)
} else {
this.clearSelection()
}
}
public clearSelection() {
- this.toggleAllEnabled = false
- this.selectedMailIds.clear()
+ this.toggleAllEnabled.set(false)
+ this.selectedMailIds.set(new Set())
}
public toggleSelected(mail: ProcessedMail) {
- this.selectedMailIds.has(mail.id)
- ? this.selectedMailIds.delete(mail.id)
- : this.selectedMailIds.add(mail.id)
+ const selectedMailIds = new Set(this.selectedMailIds())
+ selectedMailIds.has(mail.id)
+ ? selectedMailIds.delete(mail.id)
+ : selectedMailIds.add(mail.id)
+ this.selectedMailIds.set(selectedMailIds)
}
}
diff --git a/src-ui/src/app/components/manage/saved-views/saved-views.component.html b/src-ui/src/app/components/manage/saved-views/saved-views.component.html
index 1c14b6832..c4005cb2d 100644
--- a/src-ui/src/app/components/manage/saved-views/saved-views.component.html
+++ b/src-ui/src/app/components/manage/saved-views/saved-views.component.html
@@ -7,7 +7,7 @@
</pngx-page-header>
<form [formGroup]="savedViewsForm" (ngSubmit)="save()">
<ul class="list-group mb-3" formGroupName="savedViews">
- @for (view of savedViews; track view) {
+ @for (view of savedViews(); track view) {
<li class="list-group-item py-3">
<div [formGroupName]="view.id">
<div class="row">
@@ -65,13 +65,13 @@
</li>
}
- @if (savedViews && savedViews.length === 0) {
+ @if (savedViews() && savedViews().length === 0) {
<li class="list-group-item">
<div i18n>No saved views defined.</div>
</li>
}
- @if (loading) {
+ @if (loading()) {
<li class="list-group-item">
<div class="spinner-border spinner-border-sm fw-normal ms-2 me-auto" role="status"></div>
<div class="visually-hidden" i18n>Loading...</div>
diff --git a/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts b/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts
index de6c88f9a..735e5abf4 100644
--- a/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts
+++ b/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts
@@ -1,6 +1,7 @@
import { DragDropModule } from '@angular/cdk/drag-drop'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
+import { signal } from '@angular/core'
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'
@@ -226,7 +227,8 @@ describe('SavedViewsComponent', () => {
const modalRef = {
componentInstance: {
confirmClicked,
- buttonsEnabled: true,
+ buttonsEnabled: signal(true),
+ note: signal(null),
},
close: jest.fn(),
} as any
diff --git a/src-ui/src/app/components/manage/saved-views/saved-views.component.ts b/src-ui/src/app/components/manage/saved-views/saved-views.component.ts
index 9a0f11ea7..3d9ee84dd 100644
--- a/src-ui/src/app/components/manage/saved-views/saved-views.component.ts
+++ b/src-ui/src/app/components/manage/saved-views/saved-views.component.ts
@@ -1,5 +1,5 @@
import { AsyncPipe } from '@angular/common'
-import { Component, OnDestroy, OnInit, inject } from '@angular/core'
+import { Component, OnDestroy, OnInit, inject, signal } from '@angular/core'
import {
FormControl,
FormGroup,
@@ -56,7 +56,7 @@ export class SavedViewsComponent
DisplayMode = DisplayMode
- public savedViews: SavedView[]
+ readonly savedViews = signal<SavedView[]>(undefined)
private savedViewsGroup = new FormGroup({})
public savedViewsForm: FormGroup = new FormGroup({
savedViews: this.savedViewsGroup,
@@ -66,12 +66,12 @@ export class SavedViewsComponent
public isDirty$: Observable<boolean>
get displayFields() {
- return this.settings.allDisplayFields
+ return this.settings.allDisplayFields()
}
constructor() {
super()
- this.settings.organizingSidebarSavedViews = true
+ this.settings.organizingSidebarSavedViews.set(true)
}
ngOnInit(): void {
@@ -79,29 +79,29 @@ export class SavedViewsComponent
}
private reloadViews(): void {
- this.loading = true
+ this.loading.set(true)
this.savedViewService
.list(null, null, null, false, { full_perms: true })
.subscribe((r) => {
- this.savedViews = r.results
+ this.savedViews.set(r.results)
this.initialize()
})
}
ngOnDestroy(): void {
- this.settings.organizingSidebarSavedViews = false
+ this.settings.organizingSidebarSavedViews.set(false)
super.ngOnDestroy()
}
private initialize() {
- this.loading = false
+ this.loading.set(false)
this.emptyGroup(this.savedViewsGroup)
let storeData = {
savedViews: {},
}
- for (let view of this.savedViews) {
+ for (let view of this.savedViews()) {
storeData.savedViews[view.id.toString()] = {
id: view.id,
name: view.name,
@@ -148,7 +148,9 @@ export class SavedViewsComponent
public deleteSavedView(savedView: SavedView) {
this.savedViewService.delete(savedView).subscribe(() => {
this.savedViewsGroup.removeControl(savedView.id.toString())
- this.savedViews.splice(this.savedViews.indexOf(savedView), 1)
+ this.savedViews.update((savedViews) =>
+ savedViews.filter((view) => view !== savedView)
+ )
this.toastService.showInfo(
$localize`Saved view "${savedView.name}" deleted.`
)
@@ -254,10 +256,12 @@ export class SavedViewsComponent
})
const dialog = modal.componentInstance as PermissionsDialogComponent
dialog.object = savedView
- dialog.note = $localize`Note: Sharing saved views does not share the underlying documents.`
+ dialog.note.set(
+ $localize`Note: Sharing saved views does not share the underlying documents.`
+ )
modal.componentInstance.confirmClicked.subscribe(({ permissions }) => {
- modal.componentInstance.buttonsEnabled = false
+ modal.componentInstance.buttonsEnabled.set(false)
const view = {
id: savedView.id,
owner: permissions.owner,
diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.html b/src-ui/src/app/components/manage/workflows/workflows.component.html
index 1c03d871b..4849dbc6f 100644
--- a/src-ui/src/app/components/manage/workflows/workflows.component.html
+++ b/src-ui/src/app/components/manage/workflows/workflows.component.html
@@ -22,16 +22,16 @@
</div>
</li>
- @if (loading && workflows.length === 0) {
+ @if (loading() && workflows().length === 0) {
<li class="list-group-item">
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
<ng-container i18n>Loading...</ng-container>
</li>
}
- @for (workflow of workflows; track workflow.id) {
+ @for (workflow of workflows(); track workflow.id) {
<li class="list-group-item">
- <div class="row fade" [class.show]="show">
+ <div class="row fade" [class.show]="show()">
<div class="col d-flex align-items-center"><button class="btn btn-link p-0 text-start" type="button" (click)="editWorkflow(workflow)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.Workflow)">{{workflow.name}}</button></div>
<div class="col d-flex align-items-center d-none d-sm-flex"><code>{{workflow.order}}</code></div>
<div class="col d-flex align-items-center">
@@ -76,7 +76,7 @@
</div>
</li>
}
- @if (!loading && workflows.length === 0) {
- <li class="list-group-item" [class.show]="show" i18n>No workflows defined.</li>
+ @if (!loading() && workflows().length === 0) {
+ <li class="list-group-item" [class.show]="show()" i18n>No workflows defined.</li>
}
</ul>
diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts b/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts
index 636e03d54..c9e5e6ff8 100644
--- a/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts
+++ b/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts
@@ -183,7 +183,7 @@ describe('WorkflowsComponent', () => {
expect(modal).not.toBeUndefined()
const editDialog = modal.componentInstance as WorkflowEditDialogComponent
expect(editDialog.object.name).toEqual(workflows[0].name + ' (copy)')
- expect(editDialog.dialogMode).toEqual(EditDialogMode.CREATE)
+ expect(editDialog.dialogMode()).toEqual(EditDialogMode.CREATE)
})
it('should null ids on copy', () => {
diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.ts b/src-ui/src/app/components/manage/workflows/workflows.component.ts
index 710eb3aa3..554dfe91b 100644
--- a/src-ui/src/app/components/manage/workflows/workflows.component.ts
+++ b/src-ui/src/app/components/manage/workflows/workflows.component.ts
@@ -1,8 +1,8 @@
-import { Component, OnInit, inject } from '@angular/core'
+import { Component, OnInit, inject, signal } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgbDropdownModule, NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
-import { delay, takeUntil, tap } from 'rxjs'
+import { takeUntil, tap } from 'rxjs'
import { Workflow } from 'src/app/data/workflow'
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
import { PermissionsService } from 'src/app/services/permissions.service'
@@ -39,24 +39,23 @@ export class WorkflowsComponent
private modalService = inject(NgbModal)
private toastService = inject(ToastService)
- public workflows: Workflow[] = []
+ readonly workflows = signal<Workflow[]>([])
ngOnInit() {
this.reload()
}
reload() {
- this.loading = true
+ this.loading.set(true)
this.workflowService
.listAll()
.pipe(
takeUntil(this.unsubscribeNotifier),
- tap((r) => (this.workflows = r.results)),
- delay(100)
+ tap((r) => this.workflows.set(r.results))
)
.subscribe(() => {
- this.show = true
- this.loading = false
+ this.show.set(true)
+ this.loading.set(false)
})
}
@@ -74,8 +73,9 @@ export class WorkflowsComponent
backdrop: 'static',
size: 'xl',
})
- modal.componentInstance.dialogMode =
+ modal.componentInstance.dialogMode.set(
workflow && !forceCreate ? EditDialogMode.EDIT : EditDialogMode.CREATE
+ )
if (workflow) {
// quick "deep" clone so original doesn't get modified
const clone = Object.assign({}, workflow)
diff --git a/src-ui/src/app/services/document-list-view.service.spec.ts b/src-ui/src/app/services/document-list-view.service.spec.ts
index 30cb8c701..9447101ad 100644
--- a/src-ui/src/app/services/document-list-view.service.spec.ts
+++ b/src-ui/src/app/services/document-list-view.service.spec.ts
@@ -109,6 +109,7 @@ describe('DocumentListViewService', () => {
documentListViewService = TestBed.inject(DocumentListViewService)
settingsService = TestBed.inject(SettingsService)
router = TestBed.inject(Router)
+ jest.spyOn(router, 'navigate').mockResolvedValue(true)
})
afterEach(() => {
@@ -705,11 +706,16 @@ describe('DocumentListViewService', () => {
const customFields = ['custom_field_1', 'custom_field_2']
documentListViewService.displayFields = customFields as any
expect(documentListViewService.displayFields).toEqual(customFields)
- jest.spyOn(settingsService, 'allDisplayFields', 'get').mockReturnValue([
+ const mockDisplayFields = [
{ id: DisplayField.ADDED, name: 'Added' },
{ id: DisplayField.TITLE, name: 'Title' },
{ id: 'custom_field_1', name: 'Custom Field 1' },
- ] as any)
+ ] as any
+ jest
+ .spyOn(settingsService.allDisplayFields, 'toString')
+ .mockReturnValue(mockDisplayFields.toString() as any)
+ // Mock the signal directly by overriding its value
+ settingsService.allDisplayFields = jest.fn(() => mockDisplayFields) as any
settingsService.displayFieldsInit.emit(true)
expect(documentListViewService.displayFields).toEqual(['custom_field_1'])
diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts
index 1d37000bf..de1db2be6 100644
--- a/src-ui/src/app/services/document-list-view.service.ts
+++ b/src-ui/src/app/services/document-list-view.service.ts
@@ -1,4 +1,4 @@
-import { Injectable, inject } from '@angular/core'
+import { Injectable, inject, signal } from '@angular/core'
import { ParamMap, Router, UrlTree } from '@angular/router'
import { Observable, Subject, takeUntil } from 'rxjs'
import {
@@ -118,6 +118,7 @@ export class DocumentListViewService {
isReloading: boolean = false
initialized: boolean = false
error: string = null
+ private readonly stateVersion = signal(0)
rangeSelectionAnchorIndex: number
lastRangeSelectionToIndex: number
@@ -132,6 +133,14 @@ export class DocumentListViewService {
private displayFieldsInitialized: boolean = false
+ private markChanged(): void {
+ this.stateVersion.update((version) => version + 1)
+ }
+
+ private trackState(): void {
+ this.stateVersion()
+ }
+
private restoreListViewState(savedState: unknown): ListViewState {
const newState = this.defaultListViewState()
@@ -159,10 +168,12 @@ export class DocumentListViewService {
}
get activeSavedViewId() {
+ this.trackState()
return this._activeSavedViewId
}
get activeSavedViewTitle() {
+ this.trackState()
return this.activeListViewState.title
}
@@ -184,13 +195,12 @@ export class DocumentListViewService {
this.displayFieldsInitialized = true
if (this.activeListViewState.displayFields) {
this.activeListViewState.displayFields =
- this.activeListViewState.displayFields.filter(
- (field) =>
- this.settings.allDisplayFields.find((f) => f.id === field) !==
- undefined
+ this.activeListViewState.displayFields.filter((field) =>
+ this.settings.allDisplayFields().some((f) => f.id === field)
)
this.saveDocumentListView()
}
+ this.markChanged()
})
}
@@ -243,6 +253,7 @@ export class DocumentListViewService {
} else {
this._activeSavedViewId = null
}
+ this.markChanged()
}
activateSavedViewWithQueryParams(view: SavedView, queryParams: ParamMap) {
@@ -267,6 +278,7 @@ export class DocumentListViewService {
this.activeListViewState.displayFields = view.display_fields
this.reduceSelectionToFilter()
+ this.markChanged()
if (!this.router.routerState.snapshot.url.includes('/view/')) {
this.router.navigate(['view', view.id])
@@ -297,6 +309,7 @@ export class DocumentListViewService {
this.activeListViewState.sortField = newState.sortField
this.activeListViewState.sortReverse = newState.sortReverse
this.activeListViewState.currentPage = newState.currentPage
+ this.markChanged()
this.reload(null, paramsEmpty) // update the params if there aren't any
}
}
@@ -305,6 +318,7 @@ export class DocumentListViewService {
this.cancelPending()
this.isReloading = true
this.error = null
+ this.markChanged()
let activeListViewState = this.activeListViewState
this.documentService
.listFiltered(
@@ -325,6 +339,7 @@ export class DocumentListViewService {
activeListViewState.documents = result.results
this.selectionData = resultWithSelectionData.selection_data ?? null
this.syncSelectedToCurrentPage()
+ this.markChanged()
if (updateQueryParams && !this._activeSavedViewId) {
let base = ['/documents']
@@ -343,18 +358,20 @@ export class DocumentListViewService {
onFinish()
}
this.rangeSelectionAnchorIndex = this.lastRangeSelectionToIndex = null
+ this.markChanged()
},
error: (error) => {
this.isReloading = false
if (activeListViewState.currentPage != 1 && error.status == 404) {
// this happens when applying a filter: the current page might not be available anymore due to the reduced result set.
activeListViewState.currentPage = 1
+ this.markChanged()
this.reload()
} else if (
activeListViewState.sortField.indexOf('custom_field') === 0 &&
- this.settings.allDisplayFields.find(
- (f) => f.id === activeListViewState.sortField
- ) === undefined
+ !this.settings
+ .allDisplayFields()
+ .some((f) => f.id === activeListViewState.sortField)
) {
// e.g. field was deleted
this.sortField = 'created'
@@ -381,6 +398,7 @@ export class DocumentListViewService {
errorMessage = error.error
}
this.error = errorMessage
+ this.markChanged()
}
},
})
@@ -397,12 +415,14 @@ export class DocumentListViewService {
if (resetPage) {
this.activeListViewState.currentPage = 1
}
+ this.markChanged()
this.reload()
this.reduceSelectionToFilter()
this.saveDocumentListView()
}
get filterRules(): FilterRule[] {
+ this.trackState()
return this.activeListViewState.filterRules
}
@@ -416,48 +436,58 @@ export class DocumentListViewService {
set sortField(field: string) {
this.activeListViewState.sortField = field
+ this.markChanged()
this.reload()
this.saveDocumentListView()
}
get sortField(): string {
+ this.trackState()
return this.activeListViewState.sortField
}
set sortReverse(reverse: boolean) {
this.activeListViewState.sortReverse = reverse
+ this.markChanged()
this.reload()
this.saveDocumentListView()
}
get sortReverse(): boolean {
+ this.trackState()
return this.activeListViewState.sortReverse
}
get collectionSize(): number {
+ this.trackState()
return this.activeListViewState.collectionSize
}
get currentPage(): number {
+ this.trackState()
return this.activeListViewState.currentPage
}
set currentPage(page: number) {
if (this.activeListViewState.currentPage == page) return
this.activeListViewState.currentPage = page
+ this.markChanged()
this.reload()
this.saveDocumentListView()
}
get documents(): Document[] {
+ this.trackState()
return this.activeListViewState.documents
}
get selected(): Set<number> {
+ this.trackState()
return this.activeListViewState.selected
}
get allSelected(): boolean {
+ this.trackState()
return this.activeListViewState.allSelected ?? false
}
@@ -474,16 +504,19 @@ export class DocumentListViewService {
setSort(field: string, reverse: boolean) {
this.activeListViewState.sortField = field
this.activeListViewState.sortReverse = reverse
+ this.markChanged()
this.reload()
this.saveDocumentListView()
}
set displayMode(mode: DisplayMode) {
this.activeListViewState.displayMode = mode
+ this.markChanged()
this.saveDocumentListView()
}
get displayMode(): DisplayMode {
+ this.trackState()
const mode = this.activeListViewState.displayMode ?? DisplayMode.SMALL_CARDS
if (mode === ('details' as any)) {
// legacy
@@ -494,11 +527,13 @@ export class DocumentListViewService {
set pageSize(size: number) {
this.activeListViewState.pageSize = size
+ this.markChanged()
this.reload()
this.saveDocumentListView()
}
get pageSize(): number {
+ this.trackState()
return (
this.activeListViewState.pageSize ??
this.settings.get(SETTINGS_KEYS.DOCUMENT_LIST_SIZE)
@@ -506,17 +541,17 @@ export class DocumentListViewService {
}
get displayFields(): DisplayField[] {
+ this.trackState()
return this.activeListViewState.displayFields ?? LIST_DEFAULT_DISPLAY_FIELDS
}
set displayFields(fields: DisplayField[]) {
this.activeListViewState.displayFields = this.displayFieldsInitialized
- ? fields?.filter(
- (field) =>
- this.settings.allDisplayFields.find((f) => f.id === field) !==
- undefined
+ ? fields?.filter((field) =>
+ this.settings.allDisplayFields().some((f) => f.id === field)
)
: fields
+ this.markChanged()
this.saveDocumentListView()
}
@@ -540,6 +575,7 @@ export class DocumentListViewService {
quickFilter(filterRules: FilterRule[]) {
this._activeSavedViewId = null
+ this.markChanged()
this.setFilterRules(filterRules)
this.router.navigate(['documents'])
}
@@ -628,6 +664,7 @@ export class DocumentListViewService {
this.activeListViewState.allSelected = false
this.selected.clear()
this.rangeSelectionAnchorIndex = this.lastRangeSelectionToIndex = null
+ this.markChanged()
}
reduceSelectionToFilter() {
@@ -644,6 +681,7 @@ export class DocumentListViewService {
this.selected.delete(id)
}
}
+ this.markChanged()
})
}
}
@@ -651,6 +689,7 @@ export class DocumentListViewService {
selectAll() {
this.activeListViewState.allSelected = true
this.syncSelectedToCurrentPage()
+ this.markChanged()
}
selectPage() {
@@ -659,6 +698,7 @@ export class DocumentListViewService {
this.documents.forEach((doc) => {
this.selected.add(doc.id)
})
+ this.markChanged()
}
isSelected(d: Document) {
@@ -673,6 +713,7 @@ export class DocumentListViewService {
else this.selected.add(d.id)
this.rangeSelectionAnchorIndex = this.documentIndexInCurrentView(d.id)
this.lastRangeSelectionToIndex = null
+ this.markChanged()
}
selectRangeTo(d: Document) {
@@ -710,6 +751,7 @@ export class DocumentListViewService {
this.selected.add(d.id)
})
this.lastRangeSelectionToIndex = documentToIndex
+ this.markChanged()
} else {
// e.g. shift key but was first click
this.toggleSelected(d)
diff --git a/src-ui/src/app/services/hot-key.service.ts b/src-ui/src/app/services/hot-key.service.ts
index 0623e8f87..eeab4644c 100644
--- a/src-ui/src/app/services/hot-key.service.ts
+++ b/src-ui/src/app/services/hot-key.service.ts
@@ -94,6 +94,6 @@ export class HotKeyService {
private openHelpModal() {
const modal = this.modalService.open(HotkeyDialogComponent)
- modal.componentInstance.hotkeys = this.hotkeys
+ modal.componentInstance.hotkeys.set(this.hotkeys)
}
}
diff --git a/src-ui/src/app/services/open-documents.service.ts b/src-ui/src/app/services/open-documents.service.ts
index ebe90d8e8..f66a3ddca 100644
--- a/src-ui/src/app/services/open-documents.service.ts
+++ b/src-ui/src/app/services/open-documents.service.ts
@@ -1,4 +1,4 @@
-import { Injectable, inject } from '@angular/core'
+import { Injectable, inject, signal } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { Observable, Subject, of } from 'rxjs'
import { first } from 'rxjs/operators'
@@ -15,6 +15,7 @@ export class OpenDocumentsService {
private modalService = inject(NgbModal)
private MAX_OPEN_DOCUMENTS = 5
+ private readonly stateVersion = signal(0)
constructor() {
this.load()
@@ -36,6 +37,14 @@ export class OpenDocumentsService {
private openDocuments: Document[] = []
private dirtyDocuments: Set<number> = new Set<number>()
+ private trackState(): void {
+ this.stateVersion()
+ }
+
+ private markChanged(): void {
+ this.stateVersion.update((version) => version + 1)
+ }
+
refreshDocument(id: number) {
let index = this.openDocuments.findIndex((doc) => doc.id == id)
if (index > -1) {
@@ -53,10 +62,12 @@ export class OpenDocumentsService {
}
getOpenDocuments(): Document[] {
+ this.trackState()
return this.openDocuments
}
getOpenDocument(id: number): Document {
+ this.trackState()
return this.openDocuments.find((d) => d.id == id)
}
@@ -101,10 +112,12 @@ export class OpenDocumentsService {
}
hasDirty(): boolean {
+ this.trackState()
return this.dirtyDocuments.size > 0
}
isDirty(doc: Document): boolean {
+ this.trackState()
return this.dirtyDocuments.has(doc.id)
}
@@ -170,6 +183,7 @@ export class OpenDocumentsService {
}
save() {
+ this.markChanged()
try {
sessionStorage.setItem(
OPEN_DOCUMENT_SERVICE.DOCUMENTS,
diff --git a/src-ui/src/app/services/permissions.service.ts b/src-ui/src/app/services/permissions.service.ts
index 0627dca63..1d319fac7 100644
--- a/src-ui/src/app/services/permissions.service.ts
+++ b/src-ui/src/app/services/permissions.service.ts
@@ -1,4 +1,4 @@
-import { Injectable } from '@angular/core'
+import { Injectable, signal } from '@angular/core'
import { ObjectWithPermissions } from '../data/object-with-permissions'
import { User } from '../data/user'
@@ -39,16 +39,19 @@ export enum PermissionType {
export class PermissionsService {
private permissions: string[]
private currentUser: User
+ private readonly permissionsVersion = signal(0)
public initialize(permissions: string[], currentUser: User) {
this.permissions = permissions
this.currentUser = currentUser
+ this.permissionsVersion.update((version) => version + 1)
}
public currentUserCan(
action: PermissionAction,
type: PermissionType
): boolean {
+ this.permissionsVersion()
return (
this.currentUser?.is_superuser ||
this.permissions?.includes(this.getPermissionCode(action, type))
diff --git a/src-ui/src/app/services/rest/saved-view.service.spec.ts b/src-ui/src/app/services/rest/saved-view.service.spec.ts
index c72fb5409..faf4e9328 100644
--- a/src-ui/src/app/services/rest/saved-view.service.spec.ts
+++ b/src-ui/src/app/services/rest/saved-view.service.spec.ts
@@ -96,7 +96,7 @@ describe(`Additional service tests for SavedViewService`, () => {
})
it('should sort dashboard views', () => {
- service['savedViews'] = saved_views
+ service['savedViews'].set(saved_views)
jest.spyOn(settingsService, 'get').mockImplementation((key) => {
if (key === SETTINGS_KEYS.DASHBOARD_VIEWS_VISIBLE_IDS) return [1, 2, 3]
if (key === SETTINGS_KEYS.DASHBOARD_VIEWS_SORT_ORDER) return [3, 1, 2]
@@ -110,7 +110,7 @@ describe(`Additional service tests for SavedViewService`, () => {
})
it('should use user-specific dashboard visibility when configured', () => {
- service['savedViews'] = saved_views
+ service['savedViews'].set(saved_views)
jest.spyOn(settingsService, 'get').mockImplementation((key) => {
if (key === SETTINGS_KEYS.DASHBOARD_VIEWS_VISIBLE_IDS) return [4, 2]
if (key === SETTINGS_KEYS.DASHBOARD_VIEWS_SORT_ORDER) return []
@@ -119,7 +119,7 @@ describe(`Additional service tests for SavedViewService`, () => {
})
it('should sort sidebar views', () => {
- service['savedViews'] = saved_views
+ service['savedViews'].set(saved_views)
jest.spyOn(settingsService, 'get').mockImplementation((key) => {
if (key === SETTINGS_KEYS.SIDEBAR_VIEWS_VISIBLE_IDS) return [1, 2, 3]
if (key === SETTINGS_KEYS.SIDEBAR_VIEWS_SORT_ORDER) return [3, 1, 2]
@@ -133,7 +133,7 @@ describe(`Additional service tests for SavedViewService`, () => {
})
it('should use user-specific sidebar visibility when configured', () => {
- service['savedViews'] = saved_views
+ service['savedViews'].set(saved_views)
jest.spyOn(settingsService, 'get').mockImplementation((key) => {
if (key === SETTINGS_KEYS.SIDEBAR_VIEWS_VISIBLE_IDS) return [4, 2]
if (key === SETTINGS_KEYS.SIDEBAR_VIEWS_SORT_ORDER) return []
diff --git a/src-ui/src/app/services/rest/saved-view.service.ts b/src-ui/src/app/services/rest/saved-view.service.ts
index d9baec22b..556f11aad 100644
--- a/src-ui/src/app/services/rest/saved-view.service.ts
+++ b/src-ui/src/app/services/rest/saved-view.service.ts
@@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http'
-import { inject, Injectable } from '@angular/core'
+import { inject, Injectable, signal } from '@angular/core'
import { combineLatest, Observable, Subject } from 'rxjs'
import { takeUntil, tap } from 'rxjs/operators'
import { Results } from 'src/app/data/results'
@@ -17,8 +17,10 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
private settingsService = inject(SettingsService)
private documentService = inject(DocumentService)
- private savedViews: SavedView[] = []
- private savedViewDocumentCounts: Map<number, number> = new Map()
+ private readonly savedViews = signal<SavedView[]>([])
+ private readonly savedViewDocumentCounts = signal<Map<number, number>>(
+ new Map()
+ )
private unsubscribeNotifier: Subject<void> = new Subject<void>()
constructor() {
@@ -37,15 +39,16 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
tap({
next: (r) => {
const views = r.results.map((view) => this.withUserVisibility(view))
- this.savedViews = views
+ this.savedViews.set(views)
r.results = views
this._loading = false
- this.settingsService.dashboardIsEmpty =
+ this.settingsService.dashboardIsEmpty.set(
this.dashboardViews.length === 0
+ )
},
error: () => {
this._loading = false
- this.settingsService.dashboardIsEmpty = true
+ this.settingsService.dashboardIsEmpty.set(true)
},
})
)
@@ -63,8 +66,8 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
.subscribe()
}
- get allViews() {
- return this.savedViews
+ get allViews(): SavedView[] {
+ return this.savedViews()
}
private getVisibleViewIds(setting: string): number[] {
@@ -95,7 +98,9 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
}
get sidebarViews(): SavedView[] {
- const sidebarViews = this.savedViews.filter((v) => this.isSidebarVisible(v))
+ const sidebarViews = this.savedViews().filter((v) =>
+ this.isSidebarVisible(v)
+ )
const sorted: number[] = this.settingsService.get(
SETTINGS_KEYS.SIDEBAR_VIEWS_SORT_ORDER
@@ -110,7 +115,7 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
}
get dashboardViews(): SavedView[] {
- const dashboardViews = this.savedViews.filter((v) =>
+ const dashboardViews = this.savedViews().filter((v) =>
this.isDashboardVisible(v)
)
@@ -176,10 +181,12 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
}
public setDocumentCount(view: SavedView, count: number) {
- this.savedViewDocumentCounts.set(view.id, count)
+ const counts = new Map(this.savedViewDocumentCounts())
+ counts.set(view.id, count)
+ this.savedViewDocumentCounts.set(counts)
}
public getDocumentCount(view: SavedView): number {
- return this.savedViewDocumentCounts.get(view.id)
+ return this.savedViewDocumentCounts().get(view.id)
}
}
diff --git a/src-ui/src/app/services/settings.service.spec.ts b/src-ui/src/app/services/settings.service.spec.ts
index 5190bc549..c91296537 100644
--- a/src-ui/src/app/services/settings.service.spec.ts
+++ b/src-ui/src/app/services/settings.service.spec.ts
@@ -3,7 +3,7 @@ import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
-import { fakeAsync, TestBed, tick } from '@angular/core/testing'
+import { TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { RouterTestingModule } from '@angular/router/testing'
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
@@ -122,7 +122,8 @@ describe('SettingsService', () => {
expect(req.request.method).toEqual('GET')
})
- it('should catch error and show toast on retrieve ui_settings error', fakeAsync(() => {
+ it('should catch error and show toast on retrieve ui_settings error', () => {
+ jest.useFakeTimers()
const toastSpy = jest.spyOn(toastService, 'showError')
httpTestingController
.expectOne(`${environment.apiBaseUrl}ui_settings/`)
@@ -130,9 +131,10 @@ describe('SettingsService', () => {
{ detail: 'You do not have permission to perform this action.' },
{ status: 403, statusText: 'Forbidden' }
)
- tick(500)
+ jest.advanceTimersByTime(500)
expect(toastSpy).toHaveBeenCalled()
- }))
+ jest.useRealTimers()
+ })
it('calls ui_settings api endpoint with POST on store', () => {
let req = httpTestingController.expectOne(
@@ -392,22 +394,22 @@ describe('SettingsService', () => {
req.flush(ui_settings)
settingsService.initializeDisplayFields()
expect(
- settingsService.allDisplayFields.includes(DEFAULT_DISPLAY_FIELDS[0])
+ settingsService.allDisplayFields().includes(DEFAULT_DISPLAY_FIELDS[0])
).toBeTruthy() // title
expect(
- settingsService.allDisplayFields.includes(DEFAULT_DISPLAY_FIELDS[4])
+ settingsService.allDisplayFields().includes(DEFAULT_DISPLAY_FIELDS[4])
).toBeFalsy() // correspondent
settingsService.set(SETTINGS_KEYS.NOTES_ENABLED, false)
settingsService.initializeDisplayFields()
expect(
- settingsService.allDisplayFields.includes(DEFAULT_DISPLAY_FIELDS[8])
+ settingsService.allDisplayFields().includes(DEFAULT_DISPLAY_FIELDS[8])
).toBeFalsy() // notes
jest.spyOn(permissionService, 'currentUserCan').mockReturnValue(true)
settingsService.initializeDisplayFields()
expect(
- settingsService.allDisplayFields.includes(DEFAULT_DISPLAY_FIELDS[4])
+ settingsService.allDisplayFields().includes(DEFAULT_DISPLAY_FIELDS[4])
).toBeTruthy() // correspondent
})
@@ -422,12 +424,14 @@ describe('SettingsService', () => {
)
settingsService.initializeDisplayFields()
expect(
- settingsService.allDisplayFields.includes(DEFAULT_DISPLAY_FIELDS[0])
+ settingsService.allDisplayFields().includes(DEFAULT_DISPLAY_FIELDS[0])
).toBeTruthy()
expect(
- settingsService.allDisplayFields.find(
- (f) => f.id === `${DisplayField.CUSTOM_FIELD}${customFields[0].id}`
- ).name
+ settingsService
+ .allDisplayFields()
+ .find(
+ (f) => f.id === `${DisplayField.CUSTOM_FIELD}${customFields[0].id}`
+ ).name
).toEqual(customFields[0].name)
})
})
diff --git a/src-ui/src/app/services/settings.service.ts b/src-ui/src/app/services/settings.service.ts
index 8768a2058..2627de5f2 100644
--- a/src-ui/src/app/services/settings.service.ts
+++ b/src-ui/src/app/services/settings.service.ts
@@ -7,6 +7,7 @@ import {
LOCALE_ID,
Renderer2,
RendererFactory2,
+ signal,
} from '@angular/core'
import { Meta } from '@angular/platform-browser'
import { CookieService } from 'ngx-cookie-service'
@@ -294,7 +295,8 @@ export class SettingsService {
protected baseUrl: string = environment.apiBaseUrl + 'ui_settings/'
private settings: Record<string, any> = {}
- currentUser: User
+ private readonly settingsVersion = signal(0)
+ readonly currentUser = signal<User>(undefined)
public settingsSaved: EventEmitter<any> = new EventEmitter()
@@ -303,17 +305,14 @@ export class SettingsService {
return this._renderer
}
- public dashboardIsEmpty: boolean = false
+ readonly dashboardIsEmpty = signal(false)
+ readonly globalDropzoneEnabled = signal(true)
+ readonly globalDropzoneActive = signal(false)
+ readonly organizingSidebarSavedViews = signal(false)
- public globalDropzoneEnabled: boolean = true
- public globalDropzoneActive: boolean = false
- public organizingSidebarSavedViews: boolean = false
-
- private _allDisplayFields: Array<{ id: DisplayField; name: string }> =
+ readonly allDisplayFields = signal<Array<{ id: DisplayField; name: string }>>(
DEFAULT_DISPLAY_FIELDS
- public get allDisplayFields(): Array<{ id: DisplayField; name: string }> {
- return this._allDisplayFields
- }
+ )
public displayFieldsInit: EventEmitter<boolean> = new EventEmitter()
constructor() {
@@ -326,6 +325,10 @@ export class SettingsService {
return !UNSAFE_OBJECT_KEYS.has(key)
}
+ public trackChanges(): void {
+ this.settingsVersion()
+ }
+
private assignSafeSettings(source: Record<string, any>) {
if (!source || typeof source !== 'object' || Array.isArray(source)) {
return
@@ -363,10 +366,10 @@ export class SettingsService {
// to update lang cookie
if (this.settings['language']?.length)
this.setLanguage(this.settings['language'])
- this.currentUser = uisettings.user
+ this.currentUser.set(uisettings.user)
this.permissionsService.initialize(
uisettings.permissions,
- this.currentUser
+ this.currentUser()
)
this.initializeDisplayFields()
@@ -375,44 +378,39 @@ export class SettingsService {
}
public initializeDisplayFields() {
- this._allDisplayFields = DEFAULT_DISPLAY_FIELDS
-
- this._allDisplayFields = this._allDisplayFields
- ?.map((field) => {
- if (
- field.id === DisplayField.NOTES &&
- !this.get(SETTINGS_KEYS.NOTES_ENABLED)
- ) {
- return null
- }
+ const displayFields = DEFAULT_DISPLAY_FIELDS?.map((field) => {
+ if (
+ field.id === DisplayField.NOTES &&
+ !this.get(SETTINGS_KEYS.NOTES_ENABLED)
+ ) {
+ return null
+ }
- if (
- [
- DisplayField.TITLE,
- DisplayField.CREATED,
- DisplayField.ADDED,
- DisplayField.ASN,
- DisplayField.PAGE_COUNT,
- DisplayField.SHARED,
- ].includes(field.id)
- ) {
- return field
- }
+ if (
+ [
+ DisplayField.TITLE,
+ DisplayField.CREATED,
+ DisplayField.ADDED,
+ DisplayField.ASN,
+ DisplayField.PAGE_COUNT,
+ DisplayField.SHARED,
+ ].includes(field.id)
+ ) {
+ return field
+ }
- let type: PermissionType = Object.values(PermissionType).find((t) =>
- t.includes(field.id)
- )
- if (field.id === DisplayField.OWNER) {
- type = PermissionType.User
- }
- return this.permissionsService.currentUserCan(
- PermissionAction.View,
- type
- )
- ? field
- : null
- })
- .filter((f) => f)
+ let type: PermissionType = Object.values(PermissionType).find((t) =>
+ t.includes(field.id)
+ )
+ if (field.id === DisplayField.OWNER) {
+ type = PermissionType.User
+ }
+ return this.permissionsService.currentUserCan(PermissionAction.View, type)
+ ? field
+ : null
+ }).filter(Boolean)
+
+ this.allDisplayFields.set(displayFields)
if (
this.permissionsService.currentUserCan(
@@ -421,13 +419,15 @@ export class SettingsService {
)
) {
this.customFieldsService.listAll().subscribe((r) => {
- this._allDisplayFields = this._allDisplayFields.concat(
- r.results.map((field) => {
- return {
- id: `${DisplayField.CUSTOM_FIELD}${field.id}` as any,
- name: field.name,
- }
- })
+ this.allDisplayFields.set(
+ displayFields.concat(
+ r.results.map((field) => {
+ return {
+ id: `${DisplayField.CUSTOM_FIELD}${field.id}` as any,
+ name: field.name,
+ }
+ })
+ )
)
this.displayFieldsInit.emit(true)
})
@@ -438,8 +438,8 @@ export class SettingsService {
get displayName(): string {
return (
- this.currentUser.first_name ??
- this.currentUser.username ??
+ this.currentUser()?.first_name ??
+ this.currentUser()?.username ??
''
).trim()
}
@@ -572,7 +572,7 @@ export class SettingsService {
// special case to fallback
if (key === SETTINGS_KEYS.DEFAULT_PERMS_OWNER && value === undefined) {
- return this.currentUser.id
+ return this.currentUser()?.id
}
if (value !== undefined) {
@@ -606,6 +606,7 @@ export class SettingsService {
if (index == keys.length - 1) settingObj[keyPart] = value
else settingObj = settingObj[keyPart]
})
+ this.settingsVersion.update((version) => version + 1)
}
private settingIsSet(key: string): boolean {
@@ -688,7 +689,7 @@ export class SettingsService {
}
offerTour(): boolean {
- return this.dashboardIsEmpty && !this.get(SETTINGS_KEYS.TOUR_COMPLETE)
+ return this.dashboardIsEmpty() && !this.get(SETTINGS_KEYS.TOUR_COMPLETE)
}
completeTour() {
diff --git a/src-ui/src/app/services/tasks.service.ts b/src-ui/src/app/services/tasks.service.ts
index 404db589a..8b71c6923 100644
--- a/src-ui/src/app/services/tasks.service.ts
+++ b/src-ui/src/app/services/tasks.service.ts
@@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http'
-import { Injectable, inject } from '@angular/core'
+import { Injectable, inject, signal } from '@angular/core'
import { Observable, Subject } from 'rxjs'
import { first, map, takeUntil, tap } from 'rxjs/operators'
import {
@@ -23,44 +23,44 @@ export class TasksService {
public loading: boolean = false
- private fileTasks: PaperlessTask[] = []
+ private readonly fileTasks = signal<PaperlessTask[]>([])
private unsubscribeNotifer: Subject<any> = new Subject()
public get total(): number {
- return this.fileTasks.length
+ return this.fileTasks().length
}
public get allFileTasks(): PaperlessTask[] {
- return this.fileTasks.slice(0)
+ return this.fileTasks().slice(0)
}
public get queuedFileTasks(): PaperlessTask[] {
- return this.fileTasks.filter(
+ return this.fileTasks().filter(
(t) => t.status === PaperlessTaskStatus.Pending
)
}
public get startedFileTasks(): PaperlessTask[] {
- return this.fileTasks.filter(
+ return this.fileTasks().filter(
(t) => t.status === PaperlessTaskStatus.Started
)
}
public get completedFileTasks(): PaperlessTask[] {
- return this.fileTasks.filter(
+ return this.fileTasks().filter(
(t) => t.status === PaperlessTaskStatus.Success
)
}
public get failedFileTasks(): PaperlessTask[] {
- return this.fileTasks.filter(
+ return this.fileTasks().filter(
(t) => t.status === PaperlessTaskStatus.Failure
)
}
public get needsAttentionTasks(): PaperlessTask[] {
- return this.fileTasks.filter((t) =>
+ return this.fileTasks().filter((t) =>
[PaperlessTaskStatus.Failure, PaperlessTaskStatus.Revoked].includes(
t.status
)
@@ -81,7 +81,7 @@ export class TasksService {
.pipe(map((r) => r.results))
.pipe(takeUntil(this.unsubscribeNotifer), first())
.subscribe((r) => {
- this.fileTasks = r
+ this.fileTasks.set(r)
this.loading = false
})
}
diff --git a/src-ui/src/app/services/upload-documents.service.ts b/src-ui/src/app/services/upload-documents.service.ts
index 700e1e91a..7895a377b 100644
--- a/src-ui/src/app/services/upload-documents.service.ts
+++ b/src-ui/src/app/services/upload-documents.service.ts
@@ -23,6 +23,7 @@ export class UploadDocumentsService {
let status = this.websocketStatusService.newFileUpload(file.name)
status.message = $localize`Connecting...`
+ this.websocketStatusService.statusChanged()
this.uploadSubscriptions[file.name] = this.documentService
.uploadDocument(formData)
@@ -35,9 +36,11 @@ export class UploadDocumentsService {
event.total
)
status.message = $localize`Uploading...`
+ this.websocketStatusService.statusChanged()
} else if (event.type == HttpEventType.Response) {
status.taskId = event.body['task_id'] ?? event.body.toString()
status.message = $localize`Upload complete, waiting...`
+ this.websocketStatusService.statusChanged()
this.uploadSubscriptions[file.name]?.complete()
}
},
diff --git a/src-ui/src/app/services/websocket-status.service.spec.ts b/src-ui/src/app/services/websocket-status.service.spec.ts
index d6fdbb07d..50ea62c53 100644
--- a/src-ui/src/app/services/websocket-status.service.spec.ts
+++ b/src-ui/src/app/services/websocket-status.service.spec.ts
@@ -45,11 +45,11 @@ describe('ConsumerStatusService', () => {
httpTestingController = TestBed.inject(HttpTestingController)
settingsService = TestBed.inject(SettingsService)
- settingsService.currentUser = {
+ settingsService.currentUser.set({
id: 1,
username: 'testuser',
is_superuser: false,
- }
+ })
websocketStatusService = TestBed.inject(WebsocketStatusService)
documentService = TestBed.inject(DocumentService)
})
@@ -356,12 +356,12 @@ describe('ConsumerStatusService', () => {
})
it('should notify user if user can view or is in group', () => {
- settingsService.currentUser = {
+ settingsService.currentUser.set({
id: 1,
username: 'testuser',
is_superuser: false,
groups: [1],
- }
+ })
websocketStatusService.connect()
server.send({
type: WebsocketStatusType.STATUS_UPDATE,
diff --git a/src-ui/src/app/services/websocket-status.service.ts b/src-ui/src/app/services/websocket-status.service.ts
index 9e09522b7..51707c90e 100644
--- a/src-ui/src/app/services/websocket-status.service.ts
+++ b/src-ui/src/app/services/websocket-status.service.ts
@@ -1,4 +1,4 @@
-import { Injectable, inject } from '@angular/core'
+import { Injectable, inject, signal } from '@angular/core'
import { Subject } from 'rxjs'
import { environment } from 'src/environments/environment'
import { User } from '../data/user'
@@ -106,7 +106,7 @@ export class WebsocketStatusService {
private statusWebSocket: WebSocket
- private consumerStatus: FileStatus[] = []
+ private readonly consumerStatus = signal<FileStatus[]>([])
private readonly documentDetectedSubject = new Subject<FileStatus>()
private readonly documentConsumptionFinishedSubject =
@@ -119,14 +119,14 @@ export class WebsocketStatusService {
private get(taskId: string, filename?: string) {
let status =
- this.consumerStatus.find((e) => e.taskId == taskId) ||
- this.consumerStatus.find(
+ this.consumerStatus().find((e) => e.taskId == taskId) ||
+ this.consumerStatus().find(
(e) => e.filename == filename && e.taskId == null
)
let created = false
if (!status) {
status = new FileStatus()
- this.consumerStatus.push(status)
+ this.consumerStatus.update((statuses) => [...statuses, status])
created = true
}
status.taskId = taskId
@@ -137,24 +137,30 @@ export class WebsocketStatusService {
newFileUpload(filename: string): FileStatus {
let status = new FileStatus()
status.filename = filename
- this.consumerStatus.push(status)
+ this.consumerStatus.update((statuses) => [...statuses, status])
return status
}
+ statusChanged() {
+ this.consumerStatus.update((statuses) => [...statuses])
+ }
+
getConsumerStatus(phase?: FileStatusPhase) {
if (phase != null) {
- return this.consumerStatus.filter((s) => s.phase == phase)
+ return this.consumerStatus().filter((s) => s.phase == phase)
} else {
- return this.consumerStatus
+ return this.consumerStatus()
}
}
getConsumerStatusNotCompleted() {
- return this.consumerStatus.filter((s) => s.phase < FileStatusPhase.SUCCESS)
+ return this.consumerStatus().filter(
+ (s) => s.phase < FileStatusPhase.SUCCESS
+ )
}
getConsumerStatusCompleted() {
- return this.consumerStatus.filter(
+ return this.consumerStatus().filter(
(s) =>
s.phase == FileStatusPhase.FAILED || s.phase == FileStatusPhase.SUCCESS
)
@@ -211,7 +217,7 @@ export class WebsocketStatusService {
groups_can_view?: number[]
}): boolean {
// see paperless.consumers.StatusConsumer._can_view
- const user: User = this.settingsService.currentUser
+ const user: User = this.settingsService.currentUser()
return (
!messageData.owner_id ||
user.is_superuser ||
@@ -250,6 +256,7 @@ export class WebsocketStatusService {
if (messageData.status in FileStatusPhase) {
status.phase = FileStatusPhase[messageData.status]
}
+ this.statusChanged()
switch (status.phase) {
case FileStatusPhase.STARTED:
@@ -281,6 +288,7 @@ export class WebsocketStatusService {
fail(status: FileStatus, message: string) {
status.message = message
status.phase = FileStatusPhase.FAILED
+ this.statusChanged()
this.documentConsumptionFailedSubject.next(status)
}
@@ -294,24 +302,28 @@ export class WebsocketStatusService {
dismiss(status: FileStatus) {
let index
if (status.taskId != null) {
- index = this.consumerStatus.findIndex((s) => s.taskId == status.taskId)
+ index = this.consumerStatus().findIndex((s) => s.taskId == status.taskId)
} else {
- index = this.consumerStatus.findIndex(
+ index = this.consumerStatus().findIndex(
(s) => s.filename == status.filename
)
}
if (index > -1) {
- this.consumerStatus.splice(index, 1)
+ this.consumerStatus.update((statuses) =>
+ statuses.filter((_, statusIndex) => statusIndex !== index)
+ )
}
}
dismissCompleted() {
- this.consumerStatus = this.consumerStatus.filter(
- (status) =>
- ![FileStatusPhase.SUCCESS, FileStatusPhase.FAILED].includes(
- status.phase
- )
+ this.consumerStatus.update((statuses) =>
+ statuses.filter(
+ (status) =>
+ ![FileStatusPhase.SUCCESS, FileStatusPhase.FAILED].includes(
+ status.phase
+ )
+ )
)
}
diff --git a/src-ui/src/environments/environment.ts b/src-ui/src/environments/environment.ts
index e5823e27e..83567bc40 100644
--- a/src-ui/src/environments/environment.ts
+++ b/src-ui/src/environments/environment.ts
@@ -13,12 +13,3 @@ export const environment = {
webSocketProtocol: 'ws:',
webSocketBaseUrl: '/ws/',
}
-
-/*
- * For easier debugging in development mode, you can import the following file
- * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
- *
- * This import should be commented out in production mode because it will have a negative impact
- * on performance if an error is thrown.
- */
-// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index c5c94d3ff..60c23ed59 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -2,7 +2,7 @@ import {
importProvidersFrom,
inject,
provideAppInitializer,
- provideZoneChangeDetection,
+ provideZonelessChangeDetection,
} from '@angular/core'
import { DragDropModule } from '@angular/cdk/drag-drop'
@@ -372,7 +372,7 @@ const icons = {
bootstrapApplication(AppComponent, {
providers: [
- provideZoneChangeDetection(),
+ provideZonelessChangeDetection(),
importProvidersFrom(
BrowserModule,
AppRoutingModule,
diff --git a/src-ui/src/polyfills.ts b/src-ui/src/polyfills.ts
index ac9c93e4a..b2125ee9d 100644
--- a/src-ui/src/polyfills.ts
+++ b/src-ui/src/polyfills.ts
@@ -6,11 +6,6 @@ import '@angular/localize/init'
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
- * This file is divided into 2 sections:
- * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
- * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
- * file.
- *
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
@@ -18,39 +13,6 @@ import '@angular/localize/init'
* Learn more in https://angular.io/guide/browser-support
*/
-/***************************************************************************************************
- * BROWSER POLYFILLS
- */
-
-/**
- * By default, zone.js will patch all possible macroTask and DomEvents
- * user can disable parts of macroTask/DomEvents patch by setting following flags
- * because those flags need to be set before `zone.js` being loaded, and webpack
- * will put import in the top of bundle, so user need to create a separate file
- * in this directory (for example: zone-flags.ts), and put the following flags
- * into that file, and then add the following code before importing zone.js.
- * import './zone-flags';
- *
- * The flags allowed in zone-flags.ts are listed here.
- *
- * The following flags will work for all browsers.
- *
- * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
- * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
- * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
- *
- * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
- * with the following flag, it will bypass `zone.js` patch for IE/Edge
- *
- * (window as any).__Zone_enable_cross_context_check = true;
- *
- */
-
-/***************************************************************************************************
- * Zone JS is required by default for Angular itself.
- */
-import 'zone.js' // Included with Angular CLI.
-
/***************************************************************************************************
* APPLICATION IMPORTS
*/
diff --git a/src-ui/tsconfig.json b/src-ui/tsconfig.json
index 80af2f277..409ca51b8 100644
--- a/src-ui/tsconfig.json
+++ b/src-ui/tsconfig.json
@@ -10,6 +10,8 @@
"experimentalDecorators": true,
"moduleResolution": "bundler",
"importHelpers": true,
+ "ignoreDeprecations": "6.0",
+ "strict": false,
"target": "ES2022",
"module": "es2020",
"lib": [
@@ -20,5 +22,6 @@
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
+ "strictTemplates": false
}
}