From 3adccc132e14c07b0dd9c52c5e14cc23b245bd53 Mon Sep 17 00:00:00 2001 From: MichalKinas <113341662+MichalKinas@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:14:42 +0100 Subject: [PATCH 01/35] [ACS-8991] Saved searches potential file conflict fix (#10393) --- .../services/saved-searches.service.spec.ts | 8 +-- .../common/services/saved-searches.service.ts | 60 +++++++------------ .../services/base-query-builder.service.ts | 1 - 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts b/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts index e34e95cb6f5..7f46da31fa7 100644 --- a/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts +++ b/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts @@ -59,7 +59,6 @@ describe('SavedSearchesService', () => { service = TestBed.inject(SavedSearchesService); authService = TestBed.inject(AuthenticationService); spyOn(service.nodesApi, 'getNode').and.callFake(() => Promise.resolve({ entry: { id: testNodeId } } as NodeEntry)); - spyOn(service.searchApi, 'search').and.callFake(() => Promise.resolve({ list: { entries: [] } })); spyOn(service.nodesApi, 'createNode').and.callFake(() => Promise.resolve({ entry: { id: 'new-node-id' } })); spyOn(service.nodesApi, 'updateNodeContent').and.callFake(() => Promise.resolve({ entry: {} } as NodeEntry)); getNodeContentSpy = spyOn(service.nodesApi, 'getNodeContent').and.callFake(() => createBlob()); @@ -85,14 +84,15 @@ describe('SavedSearchesService', () => { }); it('should create config.json file if it does not exist', (done) => { + const error: Error = { name: 'test', message: '{ "error": { "statusCode": 404 } }' }; spyOn(authService, 'getUsername').and.callFake(() => testUserName); + service.nodesApi.getNode = jasmine.createSpy().and.returnValue(Promise.reject(error)); getNodeContentSpy.and.callFake(() => Promise.resolve(new Blob(['']))); service.innit(); service.getSavedSearches().subscribe((searches) => { - expect(service.nodesApi.getNode).toHaveBeenCalledWith('-my-'); - expect(service.searchApi.search).toHaveBeenCalled(); - expect(service.nodesApi.createNode).toHaveBeenCalledWith(testNodeId, jasmine.objectContaining({ name: 'config.json' })); + expect(service.nodesApi.getNode).toHaveBeenCalledWith('-my-', { relativePath: 'config.json' }); + expect(service.nodesApi.createNode).toHaveBeenCalledWith('-my-', jasmine.objectContaining({ name: 'config.json' })); expect(searches.length).toBe(0); done(); }); diff --git a/lib/content-services/src/lib/common/services/saved-searches.service.ts b/lib/content-services/src/lib/common/services/saved-searches.service.ts index 9f82ec1f376..d1f3b88b8ef 100644 --- a/lib/content-services/src/lib/common/services/saved-searches.service.ts +++ b/lib/content-services/src/lib/common/services/saved-searches.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { NodesApi, NodeEntry, SearchApi, SEARCH_LANGUAGE, ResultSetPaging } from '@alfresco/js-api'; +import { NodesApi, NodeEntry } from '@alfresco/js-api'; import { Injectable } from '@angular/core'; import { Observable, of, from, ReplaySubject, throwError } from 'rxjs'; import { catchError, concatMap, first, map, switchMap, take, tap } from 'rxjs/operators'; @@ -27,12 +27,6 @@ import { AuthenticationService } from '@alfresco/adf-core'; providedIn: 'root' }) export class SavedSearchesService { - private _searchApi: SearchApi; - get searchApi(): SearchApi { - this._searchApi = this._searchApi ?? new SearchApi(this.apiService.getInstance()); - return this._searchApi; - } - private _nodesApi: NodesApi; get nodesApi(): NodesApi { this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance()); @@ -209,43 +203,35 @@ export class SavedSearchesService { this.currentUserLocalStorageKey = localStorageKey; let savedSearchesNodeId = localStorage.getItem(this.currentUserLocalStorageKey) ?? ''; if (savedSearchesNodeId === '') { - return from(this.nodesApi.getNode('-my-')).pipe( + return from(this.nodesApi.getNode('-my-', { relativePath: 'config.json' })).pipe( first(), - map((node) => node.entry.id), - concatMap((parentNodeId) => - from( - this.searchApi.search({ - query: { - language: SEARCH_LANGUAGE.AFTS, - query: `cm:name:"config.json" AND PARENT:"${parentNodeId}"` - } - }) - ).pipe( - first(), - concatMap((searchResult: ResultSetPaging) => { - if (searchResult.list.entries.length > 0) { - savedSearchesNodeId = searchResult.list.entries[0].entry.id; - localStorage.setItem(this.currentUserLocalStorageKey, savedSearchesNodeId); - } else { - return this.createSavedSearchesNode(parentNodeId).pipe( - first(), - map((node) => { - localStorage.setItem(this.currentUserLocalStorageKey, node.entry.id); - return node.entry.id; - }) - ); - } - this.savedSearchFileNodeId = savedSearchesNodeId; - return savedSearchesNodeId; - }) - ) - ) + concatMap((configNode) => { + savedSearchesNodeId = configNode.entry.id; + localStorage.setItem(this.currentUserLocalStorageKey, savedSearchesNodeId); + this.savedSearchFileNodeId = savedSearchesNodeId; + return savedSearchesNodeId; + }), + catchError((error) => { + const errorStatusCode = JSON.parse(error.message).error.statusCode; + if (errorStatusCode === 404) { + return this.createSavedSearchesNode('-my-').pipe( + first(), + map((node) => { + localStorage.setItem(this.currentUserLocalStorageKey, node.entry.id); + return node.entry.id; + }) + ); + } else { + return throwError(() => error); + } + }) ); } else { this.savedSearchFileNodeId = savedSearchesNodeId; return of(savedSearchesNodeId); } } + private createSavedSearchesNode(parentNodeId: string): Observable { return from(this.nodesApi.createNode(parentNodeId, { name: 'config.json', nodeType: 'cm:content' })); } diff --git a/lib/content-services/src/lib/search/services/base-query-builder.service.ts b/lib/content-services/src/lib/search/services/base-query-builder.service.ts index 42ca177c295..744f46782c2 100644 --- a/lib/content-services/src/lib/search/services/base-query-builder.service.ts +++ b/lib/content-services/src/lib/search/services/base-query-builder.service.ts @@ -596,7 +596,6 @@ export abstract class BaseQueryBuilderService { * @param searchUrl search url to navigate to */ async navigateToSearch(query: string, searchUrl: string) { - this.update(); this.userQuery = query; await this.execute(); await this.router.navigate([searchUrl], { From cbb5f1447387525a3f0c36254902df81d16b63c5 Mon Sep 17 00:00:00 2001 From: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:19:55 +0100 Subject: [PATCH 02/35] [ACS-8994] the upload new version button is not disabled when clicked and the uploading starts (#10391) * [ACS-8994] Disable upload button when new version is uploading * [ACS-8994] Disable upload button when new version is uploading --- .../components/upload-button.component.html | 1 + .../components/upload-button.component.scss | 7 ++ .../version-upload.component.spec.ts | 91 +++++++++++++------ .../version-upload.component.ts | 1 - .../src/lib/styles/_components-variables.scss | 1 + .../src/lib/styles/_reference-variables.scss | 1 + 6 files changed, 73 insertions(+), 29 deletions(-) diff --git a/lib/content-services/src/lib/upload/components/upload-button.component.html b/lib/content-services/src/lib/upload/components/upload-button.component.html index 4f8eaba0529..dd1879f7597 100644 --- a/lib/content-services/src/lib/upload/components/upload-button.component.html +++ b/lib/content-services/src/lib/upload/components/upload-button.component.html @@ -5,6 +5,7 @@ { let component: VersionUploadComponent; @@ -58,40 +61,12 @@ describe('VersionUploadComponent', () => { contentService = TestBed.inject(ContentService); spyOn(contentService, 'hasAllowableOperations').and.returnValue(true); component.node = node; - - fixture.detectChanges(); }); afterEach(() => { fixture.destroy(); }); - it('should disabled upload button on upload starts', () => { - component.uploadStarted.subscribe(() => { - expect(component.disabled).toEqual(true); - }); - - uploadService.fileUploadStarting.next(undefined); - }); - - it('should enable upload button on error', () => { - spyOn(component, 'canUpload').and.returnValue(true); - component.error.subscribe(() => { - expect(component.disabled).toEqual(false); - }); - component.onError({} as any); - fixture.detectChanges(); - }); - - it('should enable upload button on success', () => { - spyOn(component, 'canUpload').and.returnValue(true); - component.success.subscribe(() => { - expect(component.disabled).toEqual(false); - }); - component.onSuccess(true); - fixture.detectChanges(); - }); - it('should update next major version', () => { let majorVersion = component.getNextMajorVersion('1.0'); expect(majorVersion).toEqual('2.0'); @@ -105,4 +80,64 @@ describe('VersionUploadComponent', () => { minorVersion = component.getNextMinorVersion('1.10'); expect(minorVersion).toEqual('1.11'); }); + + describe('Upload version button', () => { + let uploadVersionButtonComponent: UploadVersionButtonComponent; + let upload$: Subject; + let uploadEvent: FileUploadEvent; + + beforeEach(() => { + upload$ = new Subject(); + uploadService.fileUploadStarting = upload$; + fixture.detectChanges(); + uploadVersionButtonComponent = fixture.debugElement.query(By.directive(UploadVersionButtonComponent)).componentInstance; + uploadEvent = { + file: { + name: 'some file' + } + } as FileUploadEvent; + spyOn(component.uploadStarted, 'emit'); + upload$.next(uploadEvent); + fixture.detectChanges(); + }); + + it('should be disabled when uploading', () => { + expect(uploadVersionButtonComponent.disabled).toBeTrue(); + }); + + it('should be disabled when uploading is successful', () => { + uploadVersionButtonComponent.success.next({}); + fixture.detectChanges(); + expect(uploadVersionButtonComponent.disabled).toBeTrue(); + }); + + it('should be enabled when uploading is failed', () => { + uploadVersionButtonComponent.error.next({} as FileUploadErrorEvent); + fixture.detectChanges(); + expect(uploadVersionButtonComponent.disabled).toBeFalse(); + }); + + it('should be emitted uploadStarted when started uploading', () => { + expect(component.uploadStarted.emit).toHaveBeenCalledWith(uploadEvent); + }); + + it('should be emitted success when uploading is successful', () => { + spyOn(component.success, 'emit'); + + uploadVersionButtonComponent.success.next({}); + fixture.detectChanges(); + expect(component.success.emit).toHaveBeenCalledWith({}); + }); + + it('should be emitted error when uploading is failed', () => { + spyOn(component.error, 'emit'); + const errorEvent = { + error: 'Some error' + } as FileUploadErrorEvent; + + uploadVersionButtonComponent.error.next(errorEvent); + fixture.detectChanges(); + expect(component.error.emit).toHaveBeenCalledWith(errorEvent); + }); + }); }); diff --git a/lib/content-services/src/lib/version-manager/version-upload.component.ts b/lib/content-services/src/lib/version-manager/version-upload.component.ts index 718e08c08f9..fe0769e136f 100644 --- a/lib/content-services/src/lib/version-manager/version-upload.component.ts +++ b/lib/content-services/src/lib/version-manager/version-upload.component.ts @@ -138,7 +138,6 @@ export class VersionUploadComponent implements OnInit, OnDestroy { } onSuccess(event: any) { - this.disabled = false; this.success.emit(event); } diff --git a/lib/core/src/lib/styles/_components-variables.scss b/lib/core/src/lib/styles/_components-variables.scss index 4df3beb1ea6..4f2467a5635 100644 --- a/lib/core/src/lib/styles/_components-variables.scss +++ b/lib/core/src/lib/styles/_components-variables.scss @@ -89,6 +89,7 @@ --adf-error-color: $adf-error-color, --adf-secondary-button-background: $adf-secondary-button-background, --adf-secondary-modal-text-color: $adf-secondary-modal-text-color, + --adf-disabled-button-background: $adf-disabled-button-background, --adf-display-external-property-widget-preview-selection-color: mat.get-color-from-palette($foreground, secondary-text) ); diff --git a/lib/core/src/lib/styles/_reference-variables.scss b/lib/core/src/lib/styles/_reference-variables.scss index dc662e77803..f00594d1330 100644 --- a/lib/core/src/lib/styles/_reference-variables.scss +++ b/lib/core/src/lib/styles/_reference-variables.scss @@ -28,3 +28,4 @@ $adf-ref-header-icon-border-radius: 50%; $adf-error-color: #ba1b1b; $adf-secondary-button-background: #2121210d; $adf-secondary-modal-text-color: #212121; +$adf-disabled-button-background: rgba(0, 0, 0, 0.12); From aa8d4a68cee026347b937635040298a1c3a9fbbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:54:40 +0100 Subject: [PATCH 03/35] build(deps): bump cross-spawn (#10404) Bumps and [cross-spawn](https://github.com/moxystudio/node-cross-spawn). These dependencies needed to be updated together. Updates `cross-spawn` from 7.0.3 to 7.0.6 - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) Updates `cross-spawn` from 6.0.5 to 7.0.6 - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 98d1d49fac5..bf87d9bf860 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15444,9 +15444,10 @@ "license": "MIT" }, "node_modules/cross-spawn": { - "version": "7.0.3", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -25065,9 +25066,10 @@ } }, "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, - "license": "MIT", "dependencies": { "nice-try": "^1.0.4", "path-key": "^2.0.1", From 3c1cfb253c30431b81a1f4209d3e900a6657273a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:11:54 +0100 Subject: [PATCH 04/35] build(deps): bump github/codeql-action from 3.27.0 to 3.27.4 (#10399) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/662472033e021d55d94146f66f6058822b0b39fd...ea9e4e37992a54ee68a9622e985e60c8e8f12d9f) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ca1e3acdfa1..792f23c66b9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,7 +30,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 + uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 # Override language selection by uncommenting this and choosing your languages with: languages: javascript @@ -39,7 +39,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 + uses: github/codeql-action/autobuild@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -53,4 +53,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 + uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 From 028d70a2f1d285f3bb7563e2dc78e9ca4e7d240d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:12:09 +0100 Subject: [PATCH 05/35] build(deps): bump Alfresco/alfresco-build-tools from 8.2.0 to 8.4.0 (#10397) Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 8.2.0 to 8.4.0. - [Release notes](https://github.com/alfresco/alfresco-build-tools/releases) - [Commits](https://github.com/alfresco/alfresco-build-tools/compare/231ca442a35bf41dbda3c9960d74e8d703c208f4...a0837df06d10de2cae8a99319e8e101a6cbe9083) --- updated-dependencies: - dependency-name: Alfresco/alfresco-build-tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 68097a02b8e..794baf37a40 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -84,10 +84,10 @@ jobs: fetch-depth: 0 - name: Get branch name - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@231ca442a35bf41dbda3c9960d74e8d703c208f4 # v8.2.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@a0837df06d10de2cae8a99319e8e101a6cbe9083 # v8.4.0 - name: Save commit message - uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@231ca442a35bf41dbda3c9960d74e8d703c208f4 # v8.2.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@a0837df06d10de2cae8a99319e8e101a6cbe9083 # v8.4.0 - name: ci:force flag parser shell: bash From 07474577626b271fe50499230fdb1f5f27364d24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:12:27 +0100 Subject: [PATCH 06/35] build(deps-dev): bump @typescript-eslint/typescript-estree (#10396) Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 7.1.1 to 8.14.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-estree/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.14.0/packages/typescript-estree) --- updated-dependencies: - dependency-name: "@typescript-eslint/typescript-estree" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 75 ++++++++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 55 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf87d9bf860..5f8772014a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,7 +94,7 @@ "@types/superagent": "^4.1.22", "@typescript-eslint/eslint-plugin": "5.59.8", "@typescript-eslint/parser": "5.62.0", - "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/typescript-estree": "8.14.0", "ajv": "^8.12.0", "commander": "12.0.0", "css-loader": "^7.1.2", @@ -12173,21 +12173,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.1.1", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", + "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -12200,11 +12201,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/types": { - "version": "7.1.1", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", + "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", "dev": true, - "license": "MIT", "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -12212,15 +12214,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.1.1", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", + "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.1.1", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "8.14.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -12229,16 +12232,34 @@ }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -12249,6 +12270,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/utils": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", diff --git a/package.json b/package.json index 8dbe8388dd3..323c4c77083 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "@types/superagent": "^4.1.22", "@typescript-eslint/eslint-plugin": "5.59.8", "@typescript-eslint/parser": "5.62.0", - "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/typescript-estree": "8.14.0", "ajv": "^8.12.0", "commander": "12.0.0", "css-loader": "^7.1.2", From 82a5dd6e1e519c75c1f424d1abf350936dcf36f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:12:40 +0100 Subject: [PATCH 07/35] build(deps): bump slackapi/slack-github-action from 1.27.0 to 2.0.0 (#10398) Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.27.0 to 2.0.0. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](https://github.com/slackapi/slack-github-action/compare/37ebaef184d7626c5f204ab8d3baff4262dd30f0...485a9d42d3a73031f12ec201c457e2162c45d02d) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pull-request.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 794baf37a40..b165ece00f4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -278,7 +278,7 @@ jobs: uses: ./.github/actions/slack-group-area with: affected: ${{ steps.e2e-result.outputs.result }} - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 name: Nofify QA failure if: ${{ github.event_name == 'schedule' && contains(needs.*.result, 'failure') }} env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69aa31df28f..60bc8e31381 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -213,7 +213,7 @@ jobs: needs: [release-storybook, release-npm, npm-check-bundle] steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 name: Nofify FE eng-guild-front-end workflow failed if: ${{ contains(toJson(needs.*.result), 'failure') }} env: From 1db68e849fdc67ac4a5bd2dbef77150c1eaec415 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:21:58 +0100 Subject: [PATCH 08/35] build(deps): bump crowdin/github-action from 2.2.0 to 2.3.0 (#10360) Bumps [crowdin/github-action](https://github.com/crowdin/github-action) from 2.2.0 to 2.3.0. - [Release notes](https://github.com/crowdin/github-action/releases) - [Commits](https://github.com/crowdin/github-action/compare/95d6e895e871c3c7acf0cfb962f296baa41e63c6...2d540f18b0a416b1fbf2ee5be35841bd380fc1da) --- updated-dependencies: - dependency-name: crowdin/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eugenio Romano --- .github/workflows/pull-from-crowdin.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-from-crowdin.yml b/.github/workflows/pull-from-crowdin.yml index a04a8e54340..bad8cbac4df 100644 --- a/.github/workflows/pull-from-crowdin.yml +++ b/.github/workflows/pull-from-crowdin.yml @@ -10,7 +10,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Pull translations from Crowdin - uses: crowdin/github-action@95d6e895e871c3c7acf0cfb962f296baa41e63c6 # v2.2.0 + uses: crowdin/github-action@2d540f18b0a416b1fbf2ee5be35841bd380fc1da # v2.3.0 with: upload_sources: false download_translations: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60bc8e31381..19c8cda9715 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -199,7 +199,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Push Source Files to Crowdin - uses: crowdin/github-action@95d6e895e871c3c7acf0cfb962f296baa41e63c6 # v2.2.0 + uses: crowdin/github-action@2d540f18b0a416b1fbf2ee5be35841bd380fc1da # v2.3.0 with: upload_sources: true upload_sources_args: --delete-obsolete From 76f88a57c30d712182721b9f1d268bc9971b60ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:22:16 +0100 Subject: [PATCH 09/35] build(deps): bump Alfresco/alfresco-build-tools (#10400) Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 8.3.0 to 8.4.0. - [Release notes](https://github.com/alfresco/alfresco-build-tools/releases) - [Commits](https://github.com/alfresco/alfresco-build-tools/compare/900580fcf2b637714a0198ff42e705f37aec7f5b...a0837df06d10de2cae8a99319e8e101a6cbe9083) --- updated-dependencies: - dependency-name: Alfresco/alfresco-build-tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eugenio Romano --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index fc17e3ce62f..20bcdefcbf5 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -26,7 +26,7 @@ runs: cache-dependency-path: package-lock.json - name: get latest tag sha id: tag-sha - uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@900580fcf2b637714a0198ff42e705f37aec7f5b # v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@a0837df06d10de2cae8a99319e8e101a6cbe9083 # v8.4.0 # CACHE - name: Node Modules cache id: node-modules-cache From 3f6b60760fb9e0f83655026a3cfd56775427dd91 Mon Sep 17 00:00:00 2001 From: Bartosz Sekula Date: Tue, 19 Nov 2024 04:22:31 -0500 Subject: [PATCH 10/35] AAE-28286 Clean redundant log (#10406) --- .../process-list/components/process-list-cloud.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts index 17e80536dd2..4d713062102 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts @@ -303,7 +303,6 @@ export class ProcessListCloudComponent extends DataTableSchema { - console.count('load'); if (this.searchMethod === 'POST') { const requestNode = this.createProcessListRequestNode(); this.processListRequestNode = requestNode; From 3078387325dc0932b5ea72fcd88121643706576c Mon Sep 17 00:00:00 2001 From: dominikiwanekhyland <141320833+dominikiwanekhyland@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:54:00 +0100 Subject: [PATCH 11/35] [ACS-8959] Introduce new `takeUntilDestroyed` operator where possible (#10388) --- .../lib/aspect-list/aspect-list.component.ts | 20 +++--- .../lib/breadcrumb/breadcrumb.component.ts | 27 ++++--- .../categories-management.component.ts | 28 +++++--- .../content-metadata.component.ts | 22 +++--- .../property-groups-translator.service.ts | 35 +++++---- .../content-node-selector-panel.component.ts | 72 ++++++++++++------- .../content-node-selector.component.ts | 32 ++++----- .../content-node-share.dialog.ts | 16 +---- .../content-node-share.directive.ts | 19 ++--- .../src/lib/dialogs/library/library.dialog.ts | 30 ++++---- .../document-list.component.spec.ts | 25 +++++-- .../components/document-list.component.ts | 29 ++++---- .../filter-header/filter-header.component.ts | 38 ++++++---- .../library-name-column.component.ts | 25 ++++--- .../library-role-column.component.ts | 27 +++---- .../library-status-column.component.ts | 16 ++--- .../name-column/name-column.component.ts | 25 ++++--- .../components/pop-over.directive.ts | 25 ++++--- .../search-check-list.component.ts | 18 ++--- ...earch-chip-autocomplete-input.component.ts | 33 +++++---- .../components/search-control.component.ts | 19 ++--- .../search-date-range-tabbed.component.ts | 20 +++--- .../search-date-range.component.ts | 26 +++---- .../search-datetime-range.component.ts | 35 +++++---- ...rch-filter-autocomplete-chips.component.ts | 17 ++--- .../search-facet-tabbed-content.component.ts | 18 ++--- .../search-filter-chips.component.ts | 16 ++--- .../search-filter-container.component.ts | 23 +++--- .../search-logical-filter.component.ts | 18 ++--- .../search-properties.component.ts | 16 ++--- .../search-slider/search-slider.component.ts | 17 ++--- .../search-text/search-text.component.ts | 19 ++--- .../lib/search/components/search.component.ts | 22 ++---- .../services/search-facet-filters.service.ts | 22 +++--- .../tag/tag-actions/tag-actions.component.ts | 26 ++++--- .../lib/tag/tag-list/tag-list.component.ts | 17 ++--- .../tag-node-list/tag-node-list.component.ts | 17 ++--- .../tags-creator/tags-creator.component.ts | 25 +++++-- .../components/base-upload/upload-base.ts | 16 ++--- .../file-uploading-dialog.component.ts | 46 ++++++------ .../version-manager/version-list.component.ts | 35 +++++---- .../version-upload.component.ts | 17 ++--- .../components/alfresco-viewer.component.ts | 22 +++--- .../feature-override-indicator.component.ts | 15 ++-- .../lib/components/flags/flags.component.ts | 26 +++---- .../src/lib/directives/features.directive.ts | 20 ++---- .../lib/directives/not-features.directive.ts | 18 ++--- .../lib/components/shell/shell.component.ts | 29 ++++---- .../card-view/components/base-card-view.ts | 15 ++-- .../card-view-dateitem.component.ts | 14 ++-- .../card-view-selectitem.component.ts | 3 +- .../select-filter-input.component.ts | 32 +++++---- .../card-view-textitem.component.ts | 24 ++++--- .../boolean-cell/boolean-cell.component.ts | 4 +- .../columns-selector.component.ts | 23 +++--- .../datatable-cell.component.ts | 25 ++++--- .../datatable/datatable.component.ts | 25 +++---- .../icon-cell/icon-cell.component.ts | 4 +- .../resizable/resizable.directive.spec.ts | 7 +- .../resizable/resizable.directive.ts | 16 ++--- .../resizable/resize-handle.directive.ts | 7 +- .../lib/dialogs/dialog/dialog.component.ts | 19 ++--- .../infinite-select-scroll.directive.ts | 16 ++--- .../dynamic-chip-list.component.ts | 4 -- .../widgets/date-time/date-time.widget.ts | 25 +++---- .../components/widgets/date/date.widget.ts | 18 ++--- .../identity-user-info.component.ts | 12 +--- .../sidenav-layout.component.ts | 26 +++---- .../login/components/login/login.component.ts | 17 ++--- .../notification-history.component.ts | 27 ++++--- .../infinite-pagination.component.ts | 20 +++--- .../lib/pagination/pagination.component.ts | 30 ++++---- .../src/lib/pipes/decimal-number.pipe.spec.ts | 8 ++- lib/core/src/lib/pipes/decimal-number.pipe.ts | 17 ++--- lib/core/src/lib/pipes/localized-date.pipe.ts | 8 +-- lib/core/src/lib/pipes/time-ago.pipe.spec.ts | 6 +- lib/core/src/lib/pipes/time-ago.pipe.ts | 32 +++------ .../search-text-input.component.ts | 31 +++++--- .../search-text/search-trigger.directive.ts | 18 +++-- .../pdf-viewer/pdf-viewer.component.ts | 3 - .../viewer-render/viewer-render.component.ts | 24 ++++--- .../lib/viewer/components/viewer.component.ts | 18 ++--- .../directives/viewer-extension.directive.ts | 16 ++--- .../analytics-report-parameters.component.ts | 20 +++--- .../form/components/form-cloud.component.ts | 60 ++++++++-------- ...attach-file-cloud-widget.component.spec.ts | 55 +++++++------- .../widgets/date/date-cloud.widget.ts | 28 +++----- .../widgets/dropdown/dropdown-cloud.widget.ts | 25 +++---- .../widgets/group/group-cloud.widget.ts | 24 +++---- .../widgets/people/people-cloud.widget.ts | 23 +++--- .../radio-buttons-cloud.widget.ts | 11 ++- .../form-cloud-spinner.service.spec.ts | 11 +-- .../spinner/form-cloud-spinner.service.ts | 9 ++- .../group/components/group-cloud.component.ts | 34 +++++---- .../components/people-cloud.component.ts | 36 +++++----- .../directives/cancel-process.directive.ts | 16 ++--- .../edit-process-filter-cloud.component.ts | 28 ++++---- .../process-filters-cloud.component.ts | 34 +++++---- .../process-header-cloud.component.ts | 34 +++++---- .../process-list-cloud.component.ts | 62 ++++++++-------- .../start-process-cloud.component.ts | 28 ++++---- .../components/start-task-cloud.component.ts | 20 +++--- .../base-task-filters-cloud.component.ts | 12 +--- .../base-edit-task-filter-cloud.component.ts | 26 +++---- ...dit-service-task-filter-cloud.component.ts | 8 +-- .../edit-task-filter-cloud.component.ts | 14 ++-- .../service-task-filters-cloud.component.ts | 15 +++- .../task-filters-cloud.component.ts | 20 ++++-- .../components/task-form-cloud.component.ts | 31 ++++---- .../components/task-header-cloud.component.ts | 46 ++++++------ .../base-task-list-cloud.component.ts | 52 ++++++++------ .../service-task-list-cloud.component.ts | 18 ++--- .../components/task-list-cloud.component.ts | 24 +++---- .../src/lib/app-list/apps-list.component.ts | 21 +++--- .../src/lib/form/form.component.ts | 44 ++++++------ .../form/start-form/start-form.component.ts | 7 +- .../attach-file-widget-dialog.component.ts | 25 +++---- .../attach-file-widget.component.ts | 35 +++++---- .../form/widgets/dropdown/dropdown.widget.ts | 26 +++---- .../process-filters.component.ts | 18 ++--- .../process-instance-tasks.component.ts | 21 +++--- .../start-process/start-process.component.ts | 42 +++++++---- .../no-task-detail-template.directive.spec.ts | 2 +- .../start-task/start-task.component.ts | 29 ++++---- .../task-details/task-details.component.ts | 28 ++++---- .../task-filters/task-filters.component.ts | 18 ++--- .../task-header/task-header.component.ts | 3 +- .../task-list/task-list.component.ts | 50 +++++++------ 128 files changed, 1436 insertions(+), 1530 deletions(-) diff --git a/lib/content-services/src/lib/aspect-list/aspect-list.component.ts b/lib/content-services/src/lib/aspect-list/aspect-list.component.ts index be229dff94e..6656fc3856a 100644 --- a/lib/content-services/src/lib/aspect-list/aspect-list.component.ts +++ b/lib/content-services/src/lib/aspect-list/aspect-list.component.ts @@ -15,10 +15,10 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { NodesApiService } from '../common/services/nodes-api.service'; -import { Observable, Subject, zip } from 'rxjs'; -import { concatMap, map, takeUntil, tap } from 'rxjs/operators'; +import { Observable, zip } from 'rxjs'; +import { concatMap, map, tap } from 'rxjs/operators'; import { AspectListService } from './services/aspect-list.service'; import { MatCheckboxChange, MatCheckboxModule } from '@angular/material/checkbox'; import { AspectEntry } from '@alfresco/js-api'; @@ -27,6 +27,7 @@ import { MatExpansionModule } from '@angular/material/expansion'; import { MatTableModule } from '@angular/material/table'; import { TranslateModule } from '@ngx-translate/core'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-aspect-list', @@ -36,7 +37,7 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; styleUrls: ['./aspect-list.component.scss'], encapsulation: ViewEncapsulation.None }) -export class AspectListComponent implements OnInit, OnDestroy { +export class AspectListComponent implements OnInit { /** Node Id of the node that we want to update */ @Input() nodeId: string = ''; @@ -60,15 +61,10 @@ export class AspectListComponent implements OnInit, OnDestroy { notDisplayedAspects: string[] = []; hasEqualAspect: boolean = true; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private aspectListService: AspectListService, private nodeApiService: NodesApiService) {} - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - ngOnInit(): void { let aspects$: Observable; if (this.nodeId) { @@ -89,10 +85,10 @@ export class AspectListComponent implements OnInit, OnDestroy { this.updateCounter.emit(this.nodeAspects.length); }), concatMap(() => this.aspectListService.getAspects()), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ); } else { - aspects$ = this.aspectListService.getAspects().pipe(takeUntil(this.onDestroy$)); + aspects$ = this.aspectListService.getAspects().pipe(takeUntilDestroyed(this.destroyRef)); } this.aspects$ = aspects$.pipe(map((aspects) => aspects.filter((aspect) => !this.excludedAspects.includes(aspect.entry.id)))); } diff --git a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts index 949d679a7bb..6676f6bd370 100644 --- a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts +++ b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts @@ -15,15 +15,25 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild, ViewEncapsulation, OnDestroy } from '@angular/core'; +import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import { MatSelect, MatSelectModule } from '@angular/material/select'; import { Node, PathElement } from '@alfresco/js-api'; import { DocumentListComponent } from '../document-list/components/document-list.component'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatIconModule } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-breadcrumb', @@ -34,7 +44,7 @@ import { TranslateModule } from '@ngx-translate/core'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-breadcrumb' } }) -export class BreadcrumbComponent implements OnInit, OnChanges, OnDestroy { +export class BreadcrumbComponent implements OnInit, OnChanges { /** Active node, builds UI based on folderNode.path.elements collection. */ @Input() folderNode: Node = null; @@ -86,7 +96,7 @@ export class BreadcrumbComponent implements OnInit, OnChanges, OnDestroy { route: PathElement[] = []; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); get hasRoot(): boolean { return !!this.root; @@ -104,7 +114,7 @@ export class BreadcrumbComponent implements OnInit, OnChanges, OnDestroy { this.transform = this.transform ? this.transform : null; if (this.target) { - this.target.$folderNode.pipe(takeUntil(this.onDestroy$)).subscribe((folderNode: Node) => { + this.target.$folderNode.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((folderNode: Node) => { this.folderNode = folderNode; this.recalculateNodes(); }); @@ -201,9 +211,4 @@ export class BreadcrumbComponent implements OnInit, OnChanges, OnDestroy { } } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/category/categories-management/categories-management.component.ts b/lib/content-services/src/lib/category/categories-management/categories-management.component.ts index 9e6513b4997..fe448d83084 100644 --- a/lib/content-services/src/lib/category/categories-management/categories-management.component.ts +++ b/lib/content-services/src/lib/category/categories-management/categories-management.component.ts @@ -16,10 +16,22 @@ */ import { Category } from '@alfresco/js-api'; -import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core'; +import { + Component, + DestroyRef, + ElementRef, + EventEmitter, + inject, + Input, + OnDestroy, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms'; import { EMPTY, Observable, Subject, timer } from 'rxjs'; -import { debounce, first, map, takeUntil, tap } from 'rxjs/operators'; +import { debounce, first, map, tap } from 'rxjs/operators'; import { CategoriesManagementMode } from './categories-management-mode'; import { CategoryService } from '../services/category.service'; import { CommonModule } from '@angular/common'; @@ -30,6 +42,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; interface CategoryNameControlErrors { duplicatedExistingCategory?: boolean; @@ -66,7 +79,6 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy { private existingCategoryLoaded$ = new Subject(); private cancelExistingCategoriesLoading$ = new Subject(); - private onDestroy$ = new Subject(); private _categoryNameControl = new FormControl( '', [this.validateIfNotAlreadyAdded.bind(this), this.validateEmptyCategory, Validators.required], @@ -147,6 +159,8 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy { @ViewChild('categoryNameInput') private categoryNameInputElement: ElementRef; + private readonly destroyRef = inject(DestroyRef); + constructor(private categoryService: CategoryService) {} ngOnInit() { @@ -162,11 +176,11 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy { this.cancelExistingCategoriesLoading$.next(); }), debounce((name: string) => (name ? timer(300) : EMPTY)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((name: string) => this.onNameControlValueChange(name)); - this.categoryNameControl.statusChanges.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.setCategoryNameControlErrorMessageKey()); + this.categoryNameControl.statusChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.setCategoryNameControlErrorMessageKey()); this.setCategoryNameControlErrorMessageKey(); @@ -178,7 +192,7 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy { this._categoryNameControl.removeValidators(Validators.required); this.categories.forEach((category) => this.initialCategories.push(category)); if (this.classifiableChanged) { - this.classifiableChanged.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.classifiableChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.categories = []; this.categoryNameControlVisible = false; this.categoryNameControlVisibleChange.emit(false); @@ -188,8 +202,6 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy { } ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); this.cancelExistingCategoriesLoading$.next(); this.cancelExistingCategoriesLoading$.complete(); } diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts index 32642942913..5cc86ba60e9 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnChanges, OnInit, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { Category, CategoryEntry, CategoryLinkBody, CategoryPaging, Node, TagBody, TagEntry, TagPaging } from '@alfresco/js-api'; import { forkJoin, Observable, of, Subject, zip } from 'rxjs'; import { @@ -28,8 +28,8 @@ import { UpdateNotification } from '@alfresco/adf-core'; import { ContentMetadataService } from '../../services/content-metadata.service'; -import { CardViewGroup, PresetConfig, ContentMetadataCustomPanel, ContentMetadataPanel } from '../../interfaces/content-metadata.interfaces'; -import { catchError, debounceTime, map, takeUntil } from 'rxjs/operators'; +import { CardViewGroup, ContentMetadataCustomPanel, ContentMetadataPanel, PresetConfig } from '../../interfaces/content-metadata.interfaces'; +import { catchError, debounceTime, map } from 'rxjs/operators'; import { CardViewContentUpdateService } from '../../../common/services/card-view-content-update.service'; import { NodesApiService } from '../../../common/services/nodes-api.service'; import { TagsCreatorMode } from '../../../tag/tags-creator/tags-creator-mode'; @@ -49,6 +49,7 @@ import { CategoriesManagementComponent } from '../../../category'; import { DynamicExtensionComponent } from '@alfresco/adf-extensions'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { TagsCreatorComponent } from '../../../tag'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const DEFAULT_SEPARATOR = ', '; @@ -80,9 +81,7 @@ enum DefaultPanels { host: { class: 'adf-content-metadata' }, encapsulation: ViewEncapsulation.None }) -export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy { - protected onDestroy$ = new Subject(); - +export class ContentMetadataComponent implements OnChanges, OnInit { /** (required) The node entity to fetch metadata about */ @Input() node: Node; @@ -167,6 +166,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy { panelTitle: '' }; + private readonly destroyRef = inject(DestroyRef); + constructor( private contentMetadataService: ContentMetadataService, private cardViewContentUpdateService: CardViewContentUpdateService, @@ -185,14 +186,14 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy { ngOnInit() { this.cardViewContentUpdateService.itemUpdated$ - .pipe(debounceTime(500), takeUntil(this.onDestroy$)) + .pipe(debounceTime(500), takeUntilDestroyed(this.destroyRef)) .subscribe((updatedNode: UpdateNotification) => { this.hasMetadataChanged = true; this.targetProperty = updatedNode.target; this.updateChanges(updatedNode.changed); }); - this.cardViewContentUpdateService.updatedAspect$.pipe(debounceTime(500), takeUntil(this.onDestroy$)).subscribe((node) => { + this.cardViewContentUpdateService.updatedAspect$.pipe(debounceTime(500), takeUntilDestroyed(this.destroyRef)).subscribe((node) => { this.node.aspectNames = node?.aspectNames; this.loadProperties(node); }); @@ -274,11 +275,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy { } } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - updateChanges(updatedNodeChanges) { Object.keys(updatedNodeChanges).map((propertyGroup: string) => { if (typeof updatedNodeChanges[propertyGroup] === 'object') { diff --git a/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.ts b/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.ts index 6f3e07da7fd..fc80722ca37 100644 --- a/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.ts +++ b/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.ts @@ -15,27 +15,27 @@ * limitations under the License. */ -import { inject, Injectable } from '@angular/core'; +import { inject, Injectable, Injector, runInInjectionContext } from '@angular/core'; import { - CardViewItemProperties, - CardViewItem, - CardViewTextItemModel, + AppConfigService, CardViewBoolItemModel, CardViewDateItemModel, - CardViewSelectItemModel, CardViewDatetimeItemModel, + CardViewFloatItemModel, CardViewIntItemModel, + CardViewItem, + CardViewItemProperties, CardViewLongItemModel, - CardViewFloatItemModel, - MultiValuePipe, - AppConfigService, + CardViewSelectItemModel, + CardViewTextItemModel, DecimalNumberPipe, LogService, + MultiValuePipe, UserPreferencesService } from '@alfresco/adf-core'; -import { Property, CardViewGroup, OrganisedPropertyGroup } from '../interfaces/content-metadata.interfaces'; +import { CardViewGroup, OrganisedPropertyGroup, Property } from '../interfaces/content-metadata.interfaces'; import { of } from 'rxjs'; -import { Definition, Constraint, Property as PropertyBase } from '@alfresco/js-api'; +import { Constraint, Definition, Property as PropertyBase } from '@alfresco/js-api'; const D_TEXT = 'd:text'; const D_MLTEXT = 'd:mltext'; @@ -59,6 +59,8 @@ export class PropertyGroupTranslatorService { valueSeparator: string; + private readonly injector = inject(Injector); + constructor() { this.valueSeparator = this.appConfig.get('content-metadata.multi-value-pipe-separator'); } @@ -156,10 +158,7 @@ export class PropertyGroupTranslatorService { cardViewItemProperty = new CardViewFloatItemModel( Object.assign(propertyDefinition, { multivalued: isMultiValued, - pipes: [ - { pipe: new DecimalNumberPipe(this.userPreferenceService, this.appConfig) }, - { pipe: new MultiValuePipe(), params: [this.valueSeparator] } - ] + pipes: [{ pipe: this.getDecimalNumberPipe() }, { pipe: new MultiValuePipe(), params: [this.valueSeparator] }] }) ); break; @@ -218,4 +217,12 @@ export class PropertyGroupTranslatorService { private isEmpty(value: any): boolean { return value === undefined || value === null || value === ''; } + + private getDecimalNumberPipe(): DecimalNumberPipe { + let decimalNumberPipe: DecimalNumberPipe; + runInInjectionContext(this.injector, () => { + decimalNumberPipe = new DecimalNumberPipe(this.userPreferenceService, this.appConfig); + }); + return decimalNumberPipe; + } } diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel/content-node-selector-panel.component.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel/content-node-selector-panel.component.ts index defd4222dff..1dbe2d79498 100644 --- a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel/content-node-selector-panel.component.ts +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel/content-node-selector-panel.component.ts @@ -15,32 +15,56 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnInit, Output, ViewChild, ViewEncapsulation, OnDestroy } from '@angular/core'; import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; +import { + CustomEmptyContentTemplateDirective, + DataColumnComponent, + DataColumnListComponent, + DataSorting, HighlightDirective, - UserPreferencesService, - UserPreferenceValues, InfinitePaginationComponent, PaginatedComponent, - DataSorting, ShowHeaderMode, - ToolbarTitleComponent, ToolbarComponent, - DataColumnListComponent, - DataColumnComponent, - CustomEmptyContentTemplateDirective + ToolbarTitleComponent, + UserPreferencesService, + UserPreferenceValues } from '@alfresco/adf-core'; -import { NodesApiService, UploadService, FileUploadCompleteEvent, FileUploadDeleteEvent, SitesService } from '../../common'; +import { + FileUploadCompleteEvent, + FileUploadDeleteEvent, + NodesApiService, + SitesService, + UploadService +} from '../../common'; import { ReactiveFormsModule, UntypedFormControl } from '@angular/forms'; -import { Node, NodePaging, Pagination, SiteEntry, SitePaging, NodeEntry, SearchRequest, RequestScope } from '@alfresco/js-api'; +import { + Node, + NodeEntry, + NodePaging, + Pagination, + RequestScope, + SearchRequest, + SiteEntry, + SitePaging +} from '@alfresco/js-api'; import { DocumentListComponent } from '../../document-list/components/document-list.component'; import { RowFilter } from '../../document-list/data/row-filter.model'; import { ImageResolver } from '../../document-list/data/image-resolver.model'; import { CustomResourcesService } from '../../document-list/services/custom-resources.service'; import { ShareDataRow } from '../../document-list/data/share-data-row.model'; import { NodeEntryEvent } from '../../document-list/components/node.event'; -import { debounceTime, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; @@ -55,6 +79,7 @@ import { NameLocationCellComponent } from '../name-location-cell/name-location-c import { DropdownBreadcrumbComponent } from '../../breadcrumb/dropdown-breadcrumb.component'; import { SearchQueryBuilderService } from '../../search/services/search-query-builder.service'; import { SearchPanelComponent } from '../../search/components/search-panel/search-panel.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export type ValidationFunction = (entry: Node) => boolean; @@ -92,7 +117,7 @@ export const defaultValidation = () => true; host: { class: 'adf-content-node-selector-panel' }, providers: [SearchQueryBuilderService] }) -export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { +export class ContentNodeSelectorPanelComponent implements OnInit { // eslint-disable-next-line @typescript-eslint/naming-convention DEFAULT_PAGINATION: Pagination = new Pagination({ maxItems: 25, @@ -303,7 +328,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { searchPanelExpanded: boolean = false; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private customResourcesService: CustomResourcesService, @@ -333,13 +358,13 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { } ngOnInit() { - this.searchInput.valueChanges.pipe(debounceTime(this.debounceSearch), takeUntil(this.onDestroy$)).subscribe((searchValue: string) => { + this.searchInput.valueChanges.pipe(debounceTime(this.debounceSearch), takeUntilDestroyed(this.destroyRef)).subscribe((searchValue: string) => { this.searchTerm = searchValue; this.queryBuilderService.userQuery = searchValue.length > 0 ? `${searchValue}*` : searchValue; this.queryBuilderService.update(); }); - this.queryBuilderService.updated.pipe(takeUntil(this.onDestroy$)).subscribe((searchRequest) => { + this.queryBuilderService.updated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((searchRequest) => { if (searchRequest) { this.hasValidQuery = true; this.prepareDialogForNewSearch(searchRequest); @@ -351,7 +376,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { } }); - this.queryBuilderService.executed.pipe(takeUntil(this.onDestroy$)).subscribe((results: NodePaging) => { + this.queryBuilderService.executed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((results: NodePaging) => { if (this.hasValidQuery) { this.showSearchResults(results); } @@ -359,7 +384,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { this.userPreferencesService .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((pagSize) => (this.pageSize = pagSize)); this.target = this.documentList; @@ -380,16 +405,11 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { this.resetPagination(); this.setSearchScopeToNodes(); - this.documentList.$folderNode.pipe(takeUntil(this.onDestroy$)).subscribe((currentNode: Node) => { + this.documentList.$folderNode.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((currentNode: Node) => { this.currentFolder.emit(currentNode); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - toggleSearchPanel() { this.searchPanelExpanded = !this.searchPanelExpanded; } @@ -400,7 +420,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { private onFileUploadEvent() { this.uploadService.fileUploadComplete - .pipe(debounceTime(500), takeUntil(this.onDestroy$)) + .pipe(debounceTime(500), takeUntilDestroyed(this.destroyRef)) .subscribe((fileUploadEvent: FileUploadCompleteEvent) => { this.currentUploadBatch.push(fileUploadEvent.data); if (!this.uploadService.isUploading()) { @@ -412,7 +432,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { } private onFileUploadDeletedEvent() { - this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe((deletedFileEvent: FileUploadDeleteEvent) => { + this.uploadService.fileUploadDeleted.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((deletedFileEvent: FileUploadDeleteEvent) => { this.documentList.unselectRowFromNodeId(deletedFileEvent.file.data.entry.id); this.documentList.reloadWithoutResettingSelection(); }); diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector.component.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector.component.ts index 5d3397c0351..837b1fd7379 100644 --- a/lib/content-services/src/lib/content-node-selector/content-node-selector.component.ts +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector.component.ts @@ -15,9 +15,15 @@ * limitations under the License. */ -import { Component, Inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Inject, OnInit, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; -import { TranslationService, NotificationService, ToolbarTitleComponent, ToolbarComponent, EmptyListComponent } from '@alfresco/adf-core'; +import { + EmptyListComponent, + NotificationService, + ToolbarComponent, + ToolbarTitleComponent, + TranslationService +} from '@alfresco/adf-core'; import { Node } from '@alfresco/js-api'; import { AllowableOperationsEnum } from '../common/models/allowable-operations.enum'; import { ContentService } from '../common/services/content.service'; @@ -26,8 +32,6 @@ import { ContentNodeSelectorComponentData } from './content-node-selector.compon import { NodeEntryEvent } from '../document-list/components/node.event'; import { NodeAction } from '../document-list/models/node-action.enum'; import { OverlayContainer } from '@angular/cdk/overlay'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatTabsModule } from '@angular/material/tabs'; import { TranslateModule } from '@ngx-translate/core'; @@ -39,6 +43,7 @@ import { FileUploadingDialogComponent } from '../upload/components/file-uploadin import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel/content-node-selector-panel.component'; import { UploadButtonComponent } from '../upload/components/upload-button.component'; import { MatButtonModule } from '@angular/material/button'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-content-node-selector', @@ -64,8 +69,7 @@ import { MatButtonModule } from '@angular/material/button'; styleUrls: ['./content-node-selector.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ContentNodeSelectorComponent implements OnInit, OnDestroy { - private onDestroy$ = new Subject(); +export class ContentNodeSelectorComponent implements OnInit { title: string; action: NodeAction; @@ -81,6 +85,8 @@ export class ContentNodeSelectorComponent implements OnInit, OnDestroy { emptyFolderImageUrl: string = './assets/images/empty_doc_lib.svg'; breadcrumbFolderNode: Node; + private readonly destroyRef = inject(DestroyRef); + constructor( private translation: TranslationService, private contentService: ContentService, @@ -99,7 +105,7 @@ export class ContentNodeSelectorComponent implements OnInit, OnDestroy { ngOnInit() { this.dialog .keydownEvents() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((event) => { if (event?.key === 'Escape') { event.preventDefault(); @@ -110,28 +116,22 @@ export class ContentNodeSelectorComponent implements OnInit, OnDestroy { this.dialog .backdropClick() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => { this.close(); }); this.dialog .afterOpened() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => { this.overlayContainer.getContainerElement().setAttribute('role', 'main'); }); - this.uploadService.fileUploadStarting.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.uploadService.fileUploadStarting.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.uploadStarted = true; }); } - - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - close() { this.dialog.close(); this.overlayContainer.getContainerElement().setAttribute('role', 'region'); diff --git a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts index 041d6f3a2cd..aa00520b1fa 100644 --- a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts +++ b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts @@ -15,18 +15,17 @@ * limitations under the License. */ -import { Component, Inject, OnInit, ViewEncapsulation, ViewChild, OnDestroy } from '@angular/core'; +import { Component, Inject, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { MatSlideToggleChange, MatSlideToggleModule } from '@angular/material/slide-toggle'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; import { ContentService } from '../common/services/content.service'; import { SharedLinksApiService } from './services/shared-links-api.service'; import { SharedLinkBodyCreate } from '@alfresco/js-api'; import { ClipboardDirective, ConfirmDialogComponent } from '@alfresco/adf-core'; import { ContentNodeShareSettings } from './content-node-share.settings'; import { RenditionService } from '../common/services/rendition.service'; -import { format, add, endOfDay, isBefore } from 'date-fns'; +import { add, endOfDay, format, isBefore } from 'date-fns'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatIconModule } from '@angular/material/icon'; @@ -61,7 +60,7 @@ interface SharedDialogFormProps { host: { class: 'adf-share-dialog' }, encapsulation: ViewEncapsulation.None }) -export class ShareDialogComponent implements OnInit, OnDestroy { +export class ShareDialogComponent implements OnInit { private minDateValidator = (control: FormControl): any => isBefore(endOfDay(new Date(control.value)), this.minDate) ? { invalidDate: true } : null; @@ -80,9 +79,6 @@ export class ShareDialogComponent implements OnInit, OnDestroy { @ViewChild('slideToggleExpirationDate', { static: true }) slideToggleExpirationDate; - - private onDestroy$ = new Subject(); - constructor( private sharedLinksApiService: SharedLinksApiService, private dialogRef: MatDialogRef, @@ -121,12 +117,6 @@ export class ShareDialogComponent implements OnInit, OnDestroy { get time(): FormControl { return this.form.controls['time']; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - onSlideShareChange(event: MatSlideToggleChange) { if (event.checked) { this.createSharedLinks(this.data.node.entry.id); diff --git a/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts b/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts index c438cc9b6a3..0b85d252f5d 100644 --- a/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts +++ b/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts @@ -15,21 +15,21 @@ * limitations under the License. */ -import { Directive, Input, HostListener, OnChanges, NgZone, OnDestroy } from '@angular/core'; +import { DestroyRef, Directive, HostListener, inject, Input, NgZone, OnChanges } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { NodeEntry, NodesApi } from '@alfresco/js-api'; import { ShareDialogComponent } from './content-node-share.dialog'; -import { Observable, from, Subject } from 'rxjs'; +import { from, Observable } from 'rxjs'; import { AlfrescoApiService } from '../services/alfresco-api.service'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ selector: '[adf-share]', standalone: true, exportAs: 'adfShare' }) -export class NodeSharedDirective implements OnChanges, OnDestroy { +export class NodeSharedDirective implements OnChanges { isFile: boolean = false; isShared: boolean = false; @@ -42,7 +42,6 @@ export class NodeSharedDirective implements OnChanges, OnDestroy { @Input() baseShareUrl: string; - private onDestroy$ = new Subject(); _nodesApi: NodesApi; get nodesApi(): NodesApi { @@ -50,13 +49,9 @@ export class NodeSharedDirective implements OnChanges, OnDestroy { return this._nodesApi; } - constructor(private dialog: MatDialog, private zone: NgZone, private alfrescoApiService: AlfrescoApiService) {} - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } + private readonly destroyRef = inject(DestroyRef); + constructor(private dialog: MatDialog, private zone: NgZone, private alfrescoApiService: AlfrescoApiService) {} shareNode(nodeEntry: NodeEntry) { if (nodeEntry?.entry?.isFile) { // shared and favorite @@ -92,7 +87,7 @@ export class NodeSharedDirective implements OnChanges, OnDestroy { } ngOnChanges() { - this.zone.onStable.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.zone.onStable.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { if (this.node?.entry) { this.isFile = this.node.entry.isFile; this.isShared = this.node.entry.properties ? this.node.entry.properties['qshare:sharedId'] : false; diff --git a/lib/content-services/src/lib/dialogs/library/library.dialog.ts b/lib/content-services/src/lib/dialogs/library/library.dialog.ts index ebae76c3194..fc9e99a01ef 100644 --- a/lib/content-services/src/lib/dialogs/library/library.dialog.ts +++ b/lib/content-services/src/lib/dialogs/library/library.dialog.ts @@ -15,21 +15,21 @@ * limitations under the License. */ -import { Observable, Subject } from 'rxjs'; -import { Component, OnInit, Output, EventEmitter, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { Observable } from 'rxjs'; +import { Component, DestroyRef, EventEmitter, inject, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { - UntypedFormBuilder, - UntypedFormGroup, - Validators, - UntypedFormControl, AbstractControl, + FormsModule, ReactiveFormsModule, - FormsModule + UntypedFormBuilder, + UntypedFormControl, + UntypedFormGroup, + Validators } from '@angular/forms'; import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { QueriesApi, SiteBodyCreate, SiteEntry, SitePaging } from '@alfresco/js-api'; import { NotificationService } from '@alfresco/adf-core'; -import { debounceTime, finalize, mergeMap, takeUntil } from 'rxjs/operators'; +import { debounceTime, finalize, mergeMap } from 'rxjs/operators'; import { SitesService } from '../../common/services/sites.service'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; @@ -39,6 +39,7 @@ import { AutoFocusDirective } from '../../directives'; import { MatRadioModule } from '@angular/material/radio'; import { MatButtonModule } from '@angular/material/button'; import { AlfrescoApiService } from '../../services'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-library-dialog', @@ -60,7 +61,7 @@ import { AlfrescoApiService } from '../../services'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-library-dialog' } }) -export class LibraryDialogComponent implements OnInit, OnDestroy { +export class LibraryDialogComponent implements OnInit { /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter(); @@ -73,8 +74,6 @@ export class LibraryDialogComponent implements OnInit, OnDestroy { @Output() success: EventEmitter = new EventEmitter(); - onDestroy$: Subject = new Subject(); - createTitle = 'LIBRARY.DIALOG.CREATE_TITLE'; libraryTitleExists = false; form: UntypedFormGroup; @@ -96,6 +95,8 @@ export class LibraryDialogComponent implements OnInit, OnDestroy { return this._queriesApi; } + private readonly destroyRef = inject(DestroyRef); + constructor( private alfrescoApiService: AlfrescoApiService, private sitesService: SitesService, @@ -126,7 +127,7 @@ export class LibraryDialogComponent implements OnInit, OnDestroy { (title) => this.checkLibraryNameExists(title), (title) => title ), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((title: string) => { if (!this.form.controls['id'].dirty && this.canGenerateId(title)) { @@ -136,11 +137,6 @@ export class LibraryDialogComponent implements OnInit, OnDestroy { }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - get title(): string { const { title } = this.form.value; diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts b/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts index 317f11bd1ad..e654dc3d2ac 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts @@ -30,7 +30,16 @@ import { import { FavoritePaging, FavoritePagingList, Node, NodeEntry, NodePaging } from '@alfresco/js-api'; import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; -import { Component, CUSTOM_ELEMENTS_SCHEMA, QueryList, SimpleChange, SimpleChanges, ViewChild } from '@angular/core'; +import { + Component, + CUSTOM_ELEMENTS_SCHEMA, + Injector, + QueryList, + runInInjectionContext, + SimpleChange, + SimpleChanges, + ViewChild +} from '@angular/core'; import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing'; import { By } from '@angular/platform-browser'; @@ -84,6 +93,7 @@ describe('DocumentList', () => { let spyFolder: any; let spyFolderNode: any; let authenticationService: AuthenticationService; + let injector: Injector; beforeEach(() => { TestBed.configureTestingModule({ @@ -106,6 +116,7 @@ describe('DocumentList', () => { contentService = TestBed.inject(ContentService); appConfigService = TestBed.inject(AppConfigService); authenticationService = TestBed.inject(AuthenticationService); + injector = TestBed.inject(Injector); spyFolder = spyOn(documentListService, 'getFolder').and.returnValue(of({ list: {} })); spyFolderNode = spyOn(documentListService, 'getFolderNode').and.returnValue(of(new NodeEntry({ entry: new Node() }))); @@ -140,7 +151,7 @@ describe('DocumentList', () => { spyOn(documentList, 'resetSelection').and.callThrough(); spyOn(documentList, 'reload').and.callThrough(); - documentList.ngOnDestroy(); + fixture.destroy(); documentListService.reload(); expect(documentList.resetSelection).not.toHaveBeenCalled(); @@ -158,7 +169,7 @@ describe('DocumentList', () => { it('should not reset selection after component is destroyed', () => { spyOn(documentList, 'resetSelection').and.callThrough(); - documentList.ngOnDestroy(); + fixture.destroy(); documentListService.resetSelection(); expect(documentList.resetSelection).not.toHaveBeenCalled(); @@ -1126,7 +1137,9 @@ describe('DocumentList', () => { it('should display [empty folder] template ', () => { fixture.detectChanges(); - documentList.dataTable = new DataTableComponent(null, null, matIconRegistryMock, domSanitizerMock); + runInInjectionContext(injector, () => { + documentList.dataTable = new DataTableComponent(null, null, matIconRegistryMock, domSanitizerMock); + }) expect(documentList.dataTable).toBeDefined(); expect(fixture.debugElement.query(By.css('adf-empty-list'))).not.toBeNull(); }); @@ -1145,7 +1158,9 @@ describe('DocumentList', () => { }); it('should empty folder NOT show the pagination', () => { - documentList.dataTable = new DataTableComponent(null, null, matIconRegistryMock, domSanitizerMock); + runInInjectionContext(injector, () => { + documentList.dataTable = new DataTableComponent(null, null, matIconRegistryMock, domSanitizerMock); + }) expect(documentList.isEmpty()).toBeTruthy(); expect(element.querySelector('alfresco-pagination')).toBe(null); diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.ts b/lib/content-services/src/lib/document-list/components/document-list.component.ts index 22930be07c7..f089cab00ca 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.ts @@ -51,12 +51,13 @@ import { AfterContentInit, Component, ContentChild, + DestroyRef, ElementRef, EventEmitter, HostListener, + inject, Input, OnChanges, - OnDestroy, OnInit, Output, SimpleChanges, @@ -65,7 +66,6 @@ import { } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { BehaviorSubject, of, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { ContentService, NodesApiService } from '../../common'; import { FilterSearch } from '../../search'; import { RowFilter } from '../data/row-filter.model'; @@ -86,6 +86,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { MatIconModule } from '@angular/material/icon'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const BYTES_TO_MB_CONVERSION_VALUE = 1048576; @@ -118,7 +119,7 @@ const BYTES_TO_MB_CONVERSION_VALUE = 1048576; encapsulation: ViewEncapsulation.None, host: { class: 'adf-document-list' } }) -export class DocumentListComponent extends DataTableSchema implements OnInit, OnChanges, OnDestroy, AfterContentInit, PaginatedComponent { +export class DocumentListComponent extends DataTableSchema implements OnInit, OnChanges, AfterContentInit, PaginatedComponent { static SINGLE_CLICK_NAVIGATION: string = 'click'; static DOUBLE_CLICK_NAVIGATION: string = 'dblclick'; @@ -444,7 +445,8 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On private rowMenuCache: { [key: string]: ContentActionModel[] } = {}; private loadingTimeout: any; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); private _nodesApi: NodesApi; get nodesApi(): NodesApi { @@ -466,13 +468,13 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On private dialog: MatDialog ) { super(appConfig, 'default', presetsDefaultModel); - this.nodeService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => { + this.nodeService.nodeUpdated.pipe(takeUntilDestroyed()).subscribe((node) => { this.dataTableService.rowUpdate.next({ id: node.id, obj: { entry: node } }); }); this.userPreferencesService .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed()) .subscribe((pagSize) => { this.maxItems = this._pagination.maxItems = pagSize; }); @@ -534,7 +536,7 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On this.data.setImageResolver(this.imageResolver); } - this.contextActionHandler.pipe(takeUntil(this.onDestroy$)).subscribe((val) => this.contextActionCallback(val)); + this.contextActionHandler.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((val) => this.contextActionCallback(val)); this.enforceSingleClickNavigationForMobile(); if (this.filterValue && Object.keys(this.filterValue).length > 0) { @@ -544,19 +546,19 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On this.setPresetKey(this.columnsPresetKey); } - this.documentListService.reload$.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.documentListService.reload$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.resetSelection(); this.reload(); }); - this.documentListService.resetSelection$.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.documentListService.resetSelection$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.resetSelection(); }); } ngAfterContentInit() { if (this.columnList) { - this.columnList.columns.changes.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.columnList.columns.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.createColumns(); this.data.setColumns(this.columns); }); @@ -751,7 +753,7 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On const handlerSub = typeof action.handler === 'function' ? action.handler(node, this, action.permission) : of(true); if (typeof action.execute === 'function' && handlerSub) { - handlerSub.pipe(takeUntil(this.onDestroy$)).subscribe(() => action.execute(node)); + handlerSub.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => action.execute(node)); } } } @@ -1038,11 +1040,6 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On this._pagination.maxItems = this.maxItems; } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - private handleError(err: any) { if (err.message) { try { diff --git a/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts b/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts index 24250a4b678..9f596fc1f62 100644 --- a/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts +++ b/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts @@ -15,15 +15,27 @@ * limitations under the License. */ -import { Component, Inject, OnInit, OnChanges, SimpleChanges, Input, Output, EventEmitter, OnDestroy } from '@angular/core'; -import { PaginationModel, DataSorting, HeaderFilterTemplateDirective } from '@alfresco/adf-core'; +import { + Component, + DestroyRef, + EventEmitter, + Inject, + inject, + Input, + OnChanges, + OnInit, + Output, + SimpleChanges +} from '@angular/core'; +import { DataSorting, HeaderFilterTemplateDirective, PaginationModel } from '@alfresco/adf-core'; import { SearchHeaderQueryBuilderService } from '../../../search/services/search-header-query-builder.service'; import { FilterSearch } from './../../../search/models/filter-search.interface'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { ADF_DOCUMENT_PARENT_COMPONENT } from '../document-list.token'; import { CommonModule } from '@angular/common'; -import { SearchFilterContainerComponent } from '../../../search/components/search-filter-container/search-filter-container.component'; +import { + SearchFilterContainerComponent +} from '../../../search/components/search-filter-container/search-filter-container.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-filter-header', @@ -31,7 +43,7 @@ import { SearchFilterContainerComponent } from '../../../search/components/searc imports: [CommonModule, HeaderFilterTemplateDirective, SearchFilterContainerComponent], templateUrl: './filter-header.component.html' }) -export class FilterHeaderComponent implements OnInit, OnChanges, OnDestroy { +export class FilterHeaderComponent implements OnInit, OnChanges { /** (optional) Initial filter value to sort . */ @Input() value: any = {}; @@ -45,14 +57,15 @@ export class FilterHeaderComponent implements OnInit, OnChanges, OnDestroy { filterSelection: EventEmitter = new EventEmitter(); isFilterServiceActive: boolean; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(@Inject(ADF_DOCUMENT_PARENT_COMPONENT) private documentList: any, private searchFilterQueryBuilder: SearchHeaderQueryBuilderService) { this.isFilterServiceActive = this.searchFilterQueryBuilder.isFilterServiceActive(); } ngOnInit() { - this.searchFilterQueryBuilder.executed.pipe(takeUntil(this.onDestroy$)).subscribe((newNodePaging) => { + this.searchFilterQueryBuilder.executed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newNodePaging) => { this.documentList.node = newNodePaging; this.documentList.reload(); }); @@ -81,13 +94,13 @@ export class FilterHeaderComponent implements OnInit, OnChanges, OnDestroy { } initDataPagination() { - this.documentList.pagination.pipe(takeUntil(this.onDestroy$)).subscribe((newPagination: PaginationModel) => { + this.documentList.pagination.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newPagination: PaginationModel) => { this.searchFilterQueryBuilder.setupCurrentPagination(newPagination.maxItems, newPagination.skipCount); }); } initDataSorting() { - this.documentList.sortingSubject.pipe(takeUntil(this.onDestroy$)).subscribe((sorting: DataSorting[]) => { + this.documentList.sortingSubject.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((sorting: DataSorting[]) => { this.searchFilterQueryBuilder.setSorting(sorting); }); } @@ -110,9 +123,4 @@ export class FilterHeaderComponent implements OnInit, OnChanges, OnDestroy { }); } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/document-list/components/library-name-column/library-name-column.component.ts b/lib/content-services/src/lib/document-list/components/library-name-column/library-name-column.component.ts index 9f46d70c89b..ed63f70978f 100644 --- a/lib/content-services/src/lib/document-list/components/library-name-column/library-name-column.component.ts +++ b/lib/content-services/src/lib/document-list/components/library-name-column/library-name-column.component.ts @@ -15,15 +15,24 @@ * limitations under the License. */ -import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, Input, ElementRef, OnDestroy } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + DestroyRef, + ElementRef, + inject, + Input, + OnInit, + ViewEncapsulation +} from '@angular/core'; import { NodeEntry, Site } from '@alfresco/js-api'; import { ShareDataRow } from '../../data/share-data-row.model'; import { NodesApiService } from '../../../common/services/nodes-api.service'; -import { BehaviorSubject, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { BehaviorSubject } from 'rxjs'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-library-name-column', @@ -54,7 +63,7 @@ import { TranslateModule } from '@ngx-translate/core'; class: 'adf-datatable-content-cell adf-datatable-link adf-library-name-column' } }) -export class LibraryNameColumnComponent implements OnInit, OnDestroy { +export class LibraryNameColumnComponent implements OnInit { @Input() context: any; @@ -62,14 +71,14 @@ export class LibraryNameColumnComponent implements OnInit, OnDestroy { displayText$ = new BehaviorSubject(''); node: NodeEntry; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private element: ElementRef, private nodesApiService: NodesApiService) {} ngOnInit() { this.updateValue(); - this.nodesApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => { + this.nodesApiService.nodeUpdated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((node) => { const row: ShareDataRow = this.context.row; if (row) { const { entry } = row.node; @@ -121,8 +130,4 @@ export class LibraryNameColumnComponent implements OnInit, OnDestroy { return isDuplicate ? `${title} (${id})` : `${title}`; } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts b/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts index 18913e38504..f050ec12699 100644 --- a/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts +++ b/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts @@ -15,14 +15,22 @@ * limitations under the License. */ -import { Component, OnInit, Input, ChangeDetectionStrategy, ViewEncapsulation, OnDestroy } from '@angular/core'; -import { BehaviorSubject, Subject } from 'rxjs'; -import { SiteEntry, Site } from '@alfresco/js-api'; +import { + ChangeDetectionStrategy, + Component, + DestroyRef, + inject, + Input, + OnInit, + ViewEncapsulation +} from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; +import { Site, SiteEntry } from '@alfresco/js-api'; import { ShareDataRow } from '../../data/share-data-row.model'; -import { takeUntil } from 'rxjs/operators'; import { NodesApiService } from '../../../common/services/nodes-api.service'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-library-role-column', @@ -37,20 +45,20 @@ import { TranslateModule } from '@ngx-translate/core'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-library-role-column adf-datatable-content-cell' } }) -export class LibraryRoleColumnComponent implements OnInit, OnDestroy { +export class LibraryRoleColumnComponent implements OnInit { @Input() context: any; displayText$ = new BehaviorSubject(''); - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private nodesApiService: NodesApiService) {} ngOnInit() { this.updateValue(); - this.nodesApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => { + this.nodesApiService.nodeUpdated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((node) => { const row: ShareDataRow = this.context.row; if (row) { const { entry } = row.node; @@ -86,9 +94,4 @@ export class LibraryRoleColumnComponent implements OnInit, OnDestroy { } } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/document-list/components/library-status-column/library-status-column.component.ts b/lib/content-services/src/lib/document-list/components/library-status-column/library-status-column.component.ts index e5ed8ffb159..3fa3ffae925 100644 --- a/lib/content-services/src/lib/document-list/components/library-status-column/library-status-column.component.ts +++ b/lib/content-services/src/lib/document-list/components/library-status-column/library-status-column.component.ts @@ -15,14 +15,14 @@ * limitations under the License. */ -import { Component, Input, OnInit, OnDestroy } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit } from '@angular/core'; import { NodesApiService } from '../../../common/services/nodes-api.service'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { Site, SiteEntry } from '@alfresco/js-api'; import { ShareDataRow } from '../../data/share-data-row.model'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-library-status-column', @@ -35,20 +35,20 @@ import { TranslateModule } from '@ngx-translate/core'; `, host: { class: 'adf-library-status-column adf-datatable-content-cell' } }) -export class LibraryStatusColumnComponent implements OnInit, OnDestroy { +export class LibraryStatusColumnComponent implements OnInit { @Input() context: any; displayText$ = new BehaviorSubject(''); - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private nodesApiService: NodesApiService) {} ngOnInit() { this.updateValue(); - this.nodesApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => { + this.nodesApiService.nodeUpdated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((node) => { const row: ShareDataRow = this.context.row; if (row) { const { entry } = row.node; @@ -83,8 +83,4 @@ export class LibraryStatusColumnComponent implements OnInit, OnDestroy { } } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/document-list/components/name-column/name-column.component.ts b/lib/content-services/src/lib/document-list/components/name-column/name-column.component.ts index 636db2aeb9e..665a43d833b 100644 --- a/lib/content-services/src/lib/document-list/components/name-column/name-column.component.ts +++ b/lib/content-services/src/lib/document-list/components/name-column/name-column.component.ts @@ -15,15 +15,24 @@ * limitations under the License. */ -import { Component, Input, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, OnDestroy } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + DestroyRef, + ElementRef, + inject, + Input, + OnInit, + ViewEncapsulation +} from '@angular/core'; import { NodeEntry } from '@alfresco/js-api'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { NodesApiService } from '../../../common/services/nodes-api.service'; import { ShareDataRow } from '../../data/share-data-row.model'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { NodeNameTooltipPipe } from '../../../pipes/node-name-tooltip.pipe'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-name-column', @@ -52,7 +61,7 @@ import { NodeNameTooltipPipe } from '../../../pipes/node-name-tooltip.pipe'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-datatable-content-cell adf-datatable-link adf-name-column' } }) -export class NameColumnComponent implements OnInit, OnDestroy { +export class NameColumnComponent implements OnInit { @Input() context: any; @@ -62,14 +71,14 @@ export class NameColumnComponent implements OnInit, OnDestroy { displayText$ = new BehaviorSubject(''); node: NodeEntry; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private element: ElementRef, private nodesApiService: NodesApiService) {} ngOnInit() { this.updateValue(); - this.nodesApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => { + this.nodesApiService.nodeUpdated.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((node) => { const row: ShareDataRow = this.context.row; if (row) { const { entry } = row.node; @@ -102,8 +111,4 @@ export class NameColumnComponent implements OnInit, OnDestroy { ); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/permission-manager/components/pop-over.directive.ts b/lib/content-services/src/lib/permission-manager/components/pop-over.directive.ts index 76ef650ba20..3104b95f0ef 100644 --- a/lib/content-services/src/lib/permission-manager/components/pop-over.directive.ts +++ b/lib/content-services/src/lib/permission-manager/components/pop-over.directive.ts @@ -15,12 +15,23 @@ * limitations under the License. */ -import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; +import { + AfterViewInit, + DestroyRef, + Directive, + ElementRef, + HostListener, + inject, + Input, + OnDestroy, + OnInit, + TemplateRef, + ViewContainerRef +} from '@angular/core'; import { ConnectionPositionPair, Overlay, OverlayRef } from '@angular/cdk/overlay'; import { TemplatePortal } from '@angular/cdk/portal'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ selector: '[adf-pop-over]', @@ -38,11 +49,11 @@ export class PopOverDirective implements OnInit, OnDestroy, AfterViewInit { @Input() autofocusedElementSelector: string; private _open = false; - private destroy$ = new Subject(); private overlayRef!: OverlayRef; - private focusTrap: ConfigurableFocusTrap; + private readonly destroyRef = inject(DestroyRef); + constructor( private element: ElementRef, private overlay: Overlay, @@ -62,8 +73,6 @@ export class PopOverDirective implements OnInit, OnDestroy, AfterViewInit { ngOnDestroy(): void { this.element.nativeElement.removeEventListener('keydown', this.preventDefaultForEnter); this.detachOverlay(); - this.destroy$.next(undefined); - this.destroy$.complete(); } private createOverlay(): void { @@ -87,7 +96,7 @@ export class PopOverDirective implements OnInit, OnDestroy, AfterViewInit { this.overlayRef .backdropClick() - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => { this.detachOverlay(); }); diff --git a/lib/content-services/src/lib/search/components/search-check-list/search-check-list.component.ts b/lib/content-services/src/lib/search/components/search-check-list/search-check-list.component.ts index 9b0f8fc63be..26fdca52359 100644 --- a/lib/content-services/src/lib/search/components/search-check-list/search-check-list.component.ts +++ b/lib/content-services/src/lib/search/components/search-check-list/search-check-list.component.ts @@ -15,19 +15,20 @@ * limitations under the License. */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { MatCheckboxChange, MatCheckboxModule } from '@angular/material/checkbox'; import { SearchWidget } from '../../models/search-widget.interface'; import { SearchWidgetSettings } from '../../models/search-widget-settings.interface'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; import { SearchFilterList } from '../../models/search-filter-list.model'; import { TranslationService } from '@alfresco/adf-core'; -import { ReplaySubject, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { ReplaySubject } from 'rxjs'; +import { map } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export interface SearchListOption { name: string; @@ -44,7 +45,7 @@ export interface SearchListOption { encapsulation: ViewEncapsulation.None, host: { class: 'adf-search-check-list' } }) -export class SearchCheckListComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchCheckListComponent implements SearchWidget, OnInit { id: string; settings?: SearchWidgetSettings; context?: SearchQueryBuilderService; @@ -56,7 +57,7 @@ export class SearchCheckListComponent implements SearchWidget, OnInit, OnDestroy enableChangeUpdate = true; displayValue$ = new ReplaySubject(1); - private readonly destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private translationService: TranslationService) { this.options = new SearchFilterList(); @@ -84,7 +85,7 @@ export class SearchCheckListComponent implements SearchWidget, OnInit, OnDestroy .asObservable() .pipe( map((filtersQueries) => filtersQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -102,11 +103,6 @@ export class SearchCheckListComponent implements SearchWidget, OnInit, OnDestroy }); } - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - clear() { this.isActive = false; this.clearOptions(); diff --git a/lib/content-services/src/lib/search/components/search-chip-autocomplete-input/search-chip-autocomplete-input.component.ts b/lib/content-services/src/lib/search/components/search-chip-autocomplete-input/search-chip-autocomplete-input.component.ts index 2a3f3a24ed4..16c5bd63554 100644 --- a/lib/content-services/src/lib/search/components/search-chip-autocomplete-input/search-chip-autocomplete-input.component.ts +++ b/lib/content-services/src/lib/search/components/search-chip-autocomplete-input/search-chip-autocomplete-input.component.ts @@ -17,28 +17,30 @@ import { Component, - ViewEncapsulation, + DestroyRef, ElementRef, - ViewChild, - OnInit, - OnDestroy, + EventEmitter, + inject, Input, + OnChanges, + OnInit, Output, - EventEmitter, SimpleChanges, - OnChanges + ViewChild, + ViewEncapsulation } from '@angular/core'; import { ENTER } from '@angular/cdk/keycodes'; import { FormControl, ReactiveFormsModule } from '@angular/forms'; import { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; import { MatChipInputEvent, MatChipsModule } from '@angular/material/chips'; -import { EMPTY, Observable, Subject, timer } from 'rxjs'; -import { debounce, startWith, takeUntil, tap } from 'rxjs/operators'; +import { EMPTY, Observable, timer } from 'rxjs'; +import { debounce, startWith, tap } from 'rxjs/operators'; import { AutocompleteOption } from '../../models/autocomplete-option.interface'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { TranslateModule } from '@ngx-translate/core'; import { MatIconModule } from '@angular/material/icon'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-chip-autocomplete-input', @@ -48,7 +50,7 @@ import { MatIconModule } from '@angular/material/icon'; styleUrls: ['./search-chip-autocomplete-input.component.scss'], encapsulation: ViewEncapsulation.None }) -export class SearchChipAutocompleteInputComponent implements OnInit, OnDestroy, OnChanges { +export class SearchChipAutocompleteInputComponent implements OnInit, OnChanges { @ViewChild('optionInput') optionInput: ElementRef; @@ -89,9 +91,11 @@ export class SearchChipAutocompleteInputComponent implements OnInit, OnDestroy, formCtrl = new FormControl(''); filteredOptions: AutocompleteOption[] = []; selectedOptions: AutocompleteOption[] = []; - private onDestroy$ = new Subject(); + private _activeAnyOption = false; + private readonly destroyRef = inject(DestroyRef); + set activeAnyOption(active: boolean) { this._activeAnyOption = active; } @@ -102,13 +106,13 @@ export class SearchChipAutocompleteInputComponent implements OnInit, OnDestroy, startWith(''), tap(() => (this.activeAnyOption = false)), debounce((value: string) => (value ? timer(300) : EMPTY)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((value: string) => { this.filteredOptions = value ? this.filter(this.autocompleteOptions, value) : []; this.inputChanged.emit(value); }); - this.onReset$?.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.reset()); + this.onReset$?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.reset()); this.selectedOptions = this.preselectedOptions ?? []; } @@ -121,11 +125,6 @@ export class SearchChipAutocompleteInputComponent implements OnInit, OnDestroy, } } - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - add(event: MatChipInputEvent) { if (!this._activeAnyOption) { let value = (event.value || '').trim(); diff --git a/lib/content-services/src/lib/search/components/search-control.component.ts b/lib/content-services/src/lib/search/components/search-control.component.ts index 5ef36ec7bad..1bb6c44e9f7 100644 --- a/lib/content-services/src/lib/search/components/search-control.component.ts +++ b/lib/content-services/src/lib/search/components/search-control.component.ts @@ -15,19 +15,18 @@ * limitations under the License. */ -import { AuthenticationService, ThumbnailService, SearchTextInputComponent, HighlightPipe } from '@alfresco/adf-core'; +import { AuthenticationService, HighlightPipe, SearchTextInputComponent, ThumbnailService } from '@alfresco/adf-core'; import { Component, + ContentChild, EventEmitter, Input, - OnDestroy, Output, QueryList, - ViewEncapsulation, + TemplateRef, ViewChild, ViewChildren, - TemplateRef, - ContentChild + ViewEncapsulation } from '@angular/core'; import { NodeEntry } from '@alfresco/js-api'; import { Subject } from 'rxjs'; @@ -47,7 +46,7 @@ import { TranslateModule } from '@ngx-translate/core'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-search-control' } }) -export class SearchControlComponent implements OnDestroy { +export class SearchControlComponent { /** Toggles highlighting of the search term in the results. */ @Input() highlight: boolean = false; @@ -111,19 +110,11 @@ export class SearchControlComponent implements OnDestroy { noSearchResultTemplate: TemplateRef = null; searchTerm: string = ''; - private onDestroy$ = new Subject(); - constructor(public authService: AuthenticationService, private thumbnailService: ThumbnailService) {} isNoSearchTemplatePresent(): boolean { return !!this.emptySearchTemplate; } - - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - isLoggedIn(): boolean { return this.authService.isEcmLoggedIn(); } diff --git a/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range-tabbed.component.ts b/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range-tabbed.component.ts index 37b870cbfc2..3c8e2145154 100644 --- a/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range-tabbed.component.ts +++ b/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range-tabbed.component.ts @@ -15,9 +15,9 @@ * limitations under the License. */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ReplaySubject, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { ReplaySubject } from 'rxjs'; +import { map } from 'rxjs/operators'; import { DateRangeType } from './search-date-range/date-range-type'; import { SearchDateRange } from './search-date-range/search-date-range'; import { SearchWidget } from '../../models/search-widget.interface'; @@ -30,6 +30,7 @@ import { CommonModule } from '@angular/common'; import { SearchFilterTabbedComponent } from '../search-filter-tabbed/search-filter-tabbed.component'; import { SearchDateRangeComponent } from './search-date-range/search-date-range.component'; import { SearchFilterTabDirective } from '../search-filter-tabbed/search-filter-tab.directive'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const DEFAULT_DATE_DISPLAY_FORMAT = 'dd-MMM-yy'; @@ -41,7 +42,7 @@ const DEFAULT_DATE_DISPLAY_FORMAT = 'dd-MMM-yy'; styleUrls: ['./search-date-range-tabbed.component.scss'], encapsulation: ViewEncapsulation.None }) -export class SearchDateRangeTabbedComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchDateRangeTabbedComponent implements SearchWidget, OnInit { displayValue$ = new ReplaySubject(1); id: string; startValue: SearchDateRange = { @@ -62,7 +63,8 @@ export class SearchDateRangeTabbedComponent implements SearchWidget, OnInit, OnD private value: { [key: string]: Partial } = {}; private queryMapByField: Map = new Map(); private displayValueMapByField: Map = new Map(); - private readonly destroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(private translateService: TranslationService) {} @@ -73,7 +75,7 @@ export class SearchDateRangeTabbedComponent implements SearchWidget, OnInit, OnD .asObservable() .pipe( map((filtersQueries) => filtersQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -94,12 +96,6 @@ export class SearchDateRangeTabbedComponent implements SearchWidget, OnInit, OnD this.context.filterLoaded.next(); }); } - - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - private setDefaultDateFormatSettings() { if (this.settings && !this.settings.dateFormat) { this.settings.dateFormat = DEFAULT_DATE_DISPLAY_FORMAT; diff --git a/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.ts b/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.ts index 0a8fb591fb8..e65478c094c 100644 --- a/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.ts +++ b/lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.ts @@ -15,17 +15,15 @@ * limitations under the License. */ -import { Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; -import { endOfDay, parse, isValid, isBefore, isAfter } from 'date-fns'; +import { Component, DestroyRef, EventEmitter, inject, Inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { endOfDay, isAfter, isBefore, isValid, parse } from 'date-fns'; import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatDateFormats } from '@angular/material/core'; import { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from '@angular/material-date-fns-adapter'; import { InLastDateType } from './in-last-date-type'; import { DateRangeType } from './date-range-type'; import { SearchDateRange } from './search-date-range'; import { FormBuilder, ReactiveFormsModule, UntypedFormControl, Validators } from '@angular/forms'; -import { takeUntil } from 'rxjs/operators'; -import { UserPreferencesService, UserPreferenceValues, DateFnsUtils } from '@alfresco/adf-core'; +import { DateFnsUtils, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; import { MatRadioModule } from '@angular/material/radio'; import { TranslateModule } from '@ngx-translate/core'; @@ -33,6 +31,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; import { MatDatepickerModule } from '@angular/material/datepicker'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const DEFAULT_DATE_DISPLAY_FORMAT = 'dd-MMM-yy'; @@ -58,7 +57,7 @@ const DEFAULT_DATE_DISPLAY_FORMAT = 'dd-MMM-yy'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-search-date-range' } }) -export class SearchDateRangeComponent implements OnInit, OnDestroy { +export class SearchDateRangeComponent implements OnInit { @Input() dateFormat = DEFAULT_DATE_DISPLAY_FORMAT; @Input() @@ -87,11 +86,12 @@ export class SearchDateRangeComponent implements OnInit, OnDestroy { betweenStartDateFormControl = this.form.controls.betweenStartDate; betweenEndDateFormControl = this.form.controls.betweenEndDate; convertedMaxDate: Date; - private readonly destroy$ = new Subject(); readonly DateRangeType = DateRangeType; readonly InLastDateType = InLastDateType; + private readonly destroyRef = inject(DestroyRef); + constructor( private formBuilder: FormBuilder, private userPreferencesService: UserPreferencesService, @@ -113,19 +113,13 @@ export class SearchDateRangeComponent implements OnInit, OnDestroy { this.convertedMaxDate = endOfDay(this.maxDate && this.maxDate !== 'today' ? parse(this.maxDate, this.dateFormat, new Date()) : new Date()); this.userPreferencesService .select(UserPreferenceValues.Locale) - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((locale) => this.dateAdapter.setLocale(DateFnsUtils.getLocaleFromString(locale))); this.form.controls.dateRangeType.valueChanges - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((dateRangeType) => this.updateValidators(dateRangeType)); - this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(() => this.onChange()); - } - - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); + this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.onChange()); } - private updateValidators(dateRangeType: DateRangeType) { switch (dateRangeType) { case DateRangeType.BETWEEN: diff --git a/lib/content-services/src/lib/search/components/search-datetime-range/search-datetime-range.component.ts b/lib/content-services/src/lib/search/components/search-datetime-range/search-datetime-range.component.ts index 38910c9fc28..2421c8a32bb 100644 --- a/lib/content-services/src/lib/search/components/search-datetime-range/search-datetime-range.component.ts +++ b/lib/content-services/src/lib/search/components/search-datetime-range/search-datetime-range.component.ts @@ -15,22 +15,34 @@ * limitations under the License. */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; -import { ADF_DATE_FORMATS, ADF_DATETIME_FORMATS, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, DateFnsUtils } from '@alfresco/adf-core'; +import { + ADF_DATE_FORMATS, + ADF_DATETIME_FORMATS, + AdfDateFnsAdapter, + AdfDateTimeFnsAdapter, + DateFnsUtils +} from '@alfresco/adf-core'; import { SearchWidget } from '../../models/search-widget.interface'; import { SearchWidgetSettings } from '../../models/search-widget-settings.interface'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; import { LiveErrorStateMatcher } from '../../forms/live-error-state-matcher'; -import { ReplaySubject, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; -import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepickerInputEvent, MatDatetimepickerModule } from '@mat-datetimepicker/core'; +import { ReplaySubject } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { + DatetimeAdapter, + MAT_DATETIME_FORMATS, + MatDatetimepickerInputEvent, + MatDatetimepickerModule +} from '@mat-datetimepicker/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; -import { isValid, isBefore, startOfMinute, endOfMinute, parseISO } from 'date-fns'; +import { endOfMinute, isBefore, isValid, parseISO, startOfMinute } from 'date-fns'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export interface DatetimeRangeValue { from: string; @@ -59,7 +71,7 @@ export const DEFAULT_DATETIME_FORMAT: string = 'dd/MM/yyyy HH:mm'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-search-date-range' } }) -export class SearchDatetimeRangeComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchDatetimeRangeComponent implements SearchWidget, OnInit { from: FormControl; to: FormControl; @@ -77,7 +89,7 @@ export class SearchDatetimeRangeComponent implements SearchWidget, OnInit, OnDes enableChangeUpdate: boolean; displayValue$ = new ReplaySubject(1); - private readonly destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private dateAdapter: DateAdapter, private dateTimeAdapter: DatetimeAdapter) {} @@ -140,7 +152,7 @@ export class SearchDatetimeRangeComponent implements SearchWidget, OnInit, OnDes .asObservable() .pipe( map((filtersQueries) => filtersQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -156,11 +168,6 @@ export class SearchDatetimeRangeComponent implements SearchWidget, OnInit, OnDes }); } - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - apply(model: Partial<{ from: Date; to: Date }>, isValidValue: boolean, updateContext = true) { if (isValidValue && this.id && this.context && this.settings && this.settings.field) { this.isActive = true; diff --git a/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.ts b/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.ts index 6fd4f72a710..392f0824974 100644 --- a/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.ts +++ b/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.ts @@ -15,9 +15,9 @@ * limitations under the License. */ -import { Component, ViewEncapsulation, OnInit, OnDestroy } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { BehaviorSubject, Observable, ReplaySubject, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { map } from 'rxjs/operators'; import { SearchWidget } from '../../models/search-widget.interface'; import { SearchWidgetSettings } from '../../models/search-widget-settings.interface'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; @@ -29,6 +29,7 @@ import { CommonModule } from '@angular/common'; import { SearchChipAutocompleteInputComponent } from '../search-chip-autocomplete-input'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-filter-autocomplete-chips', @@ -37,7 +38,7 @@ import { MatButtonModule } from '@angular/material/button'; templateUrl: './search-filter-autocomplete-chips.component.html', encapsulation: ViewEncapsulation.None }) -export class SearchFilterAutocompleteChipsComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchFilterAutocompleteChipsComponent implements SearchWidget, OnInit { id: string; settings?: SearchWidgetSettings; context?: SearchQueryBuilderService; @@ -51,7 +52,8 @@ export class SearchFilterAutocompleteChipsComponent implements SearchWidget, OnI reset$: Observable = this.resetSubject$.asObservable(); private autocompleteOptionsSubject$ = new BehaviorSubject([]); autocompleteOptions$: Observable = this.autocompleteOptionsSubject$.asObservable(); - private readonly destroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(private tagService: TagService, private categoryService: CategoryService) { this.options = new SearchFilterList(); @@ -69,7 +71,7 @@ export class SearchFilterAutocompleteChipsComponent implements SearchWidget, OnI .asObservable() .pipe( map((filterQueries) => filterQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -82,11 +84,6 @@ export class SearchFilterAutocompleteChipsComponent implements SearchWidget, OnI }); } - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - reset(updateContext = true) { this.selectedOptions = []; this.context.filterRawParams[this.id] = undefined; diff --git a/lib/content-services/src/lib/search/components/search-filter-chips/search-facet-chip-tabbed/search-facet-tabbed-content.component.ts b/lib/content-services/src/lib/search/components/search-filter-chips/search-facet-chip-tabbed/search-facet-tabbed-content.component.ts index 57df84c6759..17655eab825 100644 --- a/lib/content-services/src/lib/search/components/search-filter-chips/search-facet-chip-tabbed/search-facet-tabbed-content.component.ts +++ b/lib/content-services/src/lib/search/components/search-filter-chips/search-facet-chip-tabbed/search-facet-tabbed-content.component.ts @@ -15,19 +15,19 @@ * limitations under the License. */ -import { Component, EventEmitter, inject, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { SearchQueryBuilderService } from '../../../services/search-query-builder.service'; import { FacetWidget } from '../../../models/facet-widget.interface'; import { TranslationService } from '@alfresco/adf-core'; import { AutocompleteOption } from '../../../models/autocomplete-option.interface'; -import { takeUntil } from 'rxjs/operators'; import { TabbedFacetField } from '../../../models/tabbed-facet-field.interface'; import { SearchFacetFiltersService } from '../../../services/search-facet-filters.service'; import { CommonModule } from '@angular/common'; import { SearchChipAutocompleteInputComponent } from '../../search-chip-autocomplete-input'; import { SearchFilterTabbedComponent } from '../../search-filter-tabbed/search-filter-tabbed.component'; import { SearchFilterTabDirective } from '../../search-filter-tabbed'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-facet-tabbed-content', @@ -36,7 +36,7 @@ import { SearchFilterTabDirective } from '../../search-filter-tabbed'; templateUrl: './search-facet-tabbed-content.component.html', encapsulation: ViewEncapsulation.None }) -export class SearchFacetTabbedContentComponent implements OnInit, OnDestroy, OnChanges, FacetWidget { +export class SearchFacetTabbedContentComponent implements OnInit, OnChanges, FacetWidget { private queryBuilder = inject(SearchQueryBuilderService); private translationService = inject(TranslationService); private searchFacetFiltersService = inject(SearchFacetFiltersService); @@ -57,13 +57,14 @@ export class SearchFacetTabbedContentComponent implements OnInit, OnDestroy, OnC displayValue$ = new EventEmitter(); private resetSubject$ = new Subject(); - private onDestroy$ = new Subject(); reset$ = this.resetSubject$.asObservable(); chipIcon = 'keyboard_arrow_down'; autocompleteOptions = {}; selectedOptions = {}; + private readonly destroyRef = inject(DestroyRef); + ngOnInit() { this.tabbedFacet.fields.forEach((field) => { Object.defineProperty(this.selectedOptions, field, { @@ -72,13 +73,8 @@ export class SearchFacetTabbedContentComponent implements OnInit, OnDestroy, OnC }); }); - this.onReset$?.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.reset()); - this.onApply$?.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.submitValues()); - } - - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); + this.onReset$?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.reset()); + this.onApply$?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.submitValues()); } ngOnChanges(changes: SimpleChanges) { diff --git a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.ts b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.ts index ca8d08a991e..d2f92d1de3a 100644 --- a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.ts +++ b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.ts @@ -15,11 +15,9 @@ * limitations under the License. */ -import { Component, inject, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { SearchFacetFiltersService } from '../../services/search-facet-filters.service'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { FacetField, SearchCategory, TabbedFacetField } from '../../models'; import { CommonModule } from '@angular/common'; import { MatChipsModule } from '@angular/material/chips'; @@ -27,6 +25,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { SearchFacetChipTabbedComponent } from './search-facet-chip-tabbed/search-facet-chip-tabbed.component'; import { SearchFacetChipComponent } from './search-facet-chip/search-facet-chip.component'; import { SearchWidgetChipComponent } from './search-widget-chip/search-widget-chip.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-filter-chips', @@ -36,11 +35,11 @@ import { SearchWidgetChipComponent } from './search-widget-chip/search-widget-ch styleUrls: ['./search-filter-chips.component.scss'], encapsulation: ViewEncapsulation.None }) -export class SearchFilterChipsComponent implements OnInit, OnDestroy { +export class SearchFilterChipsComponent implements OnInit { private queryBuilder = inject(SearchQueryBuilderService); private facetFiltersService = inject(SearchFacetFiltersService); - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); /** Toggles whether to show or not the context facet filters. */ @Input() @@ -63,12 +62,7 @@ export class SearchFilterChipsComponent implements OnInit, OnDestroy { ngOnInit() { this.queryBuilder.executed .asObservable() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => (this.facetChipTabbedId = 'search-fact-chip-tabbed-' + this.facetFiltersService.tabbedFacet?.fields.join('-'))); } - - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/lib/content-services/src/lib/search/components/search-filter-container/search-filter-container.component.ts b/lib/content-services/src/lib/search/components/search-filter-container/search-filter-container.component.ts index b74f61c1055..223c373c869 100644 --- a/lib/content-services/src/lib/search/components/search-filter-container/search-filter-container.component.ts +++ b/lib/content-services/src/lib/search/components/search-filter-container/search-filter-container.component.ts @@ -15,13 +15,21 @@ * limitations under the License. */ -import { Component, Input, Output, OnInit, EventEmitter, ViewEncapsulation, ViewChild, OnDestroy, ElementRef } from '@angular/core'; -import { ConfigurableFocusTrapFactory, ConfigurableFocusTrap } from '@angular/cdk/a11y'; +import { + Component, + ElementRef, + EventEmitter, + Input, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; +import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y'; import { DataColumn, IconComponent, TranslationService } from '@alfresco/adf-core'; import { SearchWidgetContainerComponent } from '../search-widget-container/search-widget-container.component'; import { SearchHeaderQueryBuilderService } from '../../services/search-header-query-builder.service'; import { SearchCategory } from '../../models/search-category.interface'; -import { Subject } from 'rxjs'; import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu'; import { FilterSearch } from '../../models/filter-search.interface'; import { CommonModule } from '@angular/common'; @@ -47,7 +55,7 @@ import { MatDialogModule } from '@angular/material/dialog'; styleUrls: ['./search-filter-container.component.scss'], encapsulation: ViewEncapsulation.None }) -export class SearchFilterContainerComponent implements OnInit, OnDestroy { +export class SearchFilterContainerComponent implements OnInit { /** The column the filter will be applied on. */ @Input() col: DataColumn; @@ -70,8 +78,6 @@ export class SearchFilterContainerComponent implements OnInit, OnDestroy { focusTrap: ConfigurableFocusTrap; initialValue: any; - private onDestroy$ = new Subject(); - constructor( private searchFilterQueryBuilder: SearchHeaderQueryBuilderService, private translationService: TranslationService, @@ -83,11 +89,6 @@ export class SearchFilterContainerComponent implements OnInit, OnDestroy { this.initialValue = this.value?.[this.col.key] ? this.value[this.col.key] : undefined; } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - onKeyPressed(event: KeyboardEvent, menuTrigger: MatMenuTrigger) { if (event.key === 'Enter' && this.widgetContainer.selector !== 'check-list') { this.onApply(); diff --git a/lib/content-services/src/lib/search/components/search-logical-filter/search-logical-filter.component.ts b/lib/content-services/src/lib/search/components/search-logical-filter/search-logical-filter.component.ts index a10123dc076..03c4af97bcd 100644 --- a/lib/content-services/src/lib/search/components/search-logical-filter/search-logical-filter.component.ts +++ b/lib/content-services/src/lib/search/components/search-logical-filter/search-logical-filter.component.ts @@ -15,17 +15,18 @@ * limitations under the License. */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { SearchWidget } from '../../models/search-widget.interface'; import { SearchWidgetSettings } from '../../models/search-widget-settings.interface'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; -import { ReplaySubject, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { ReplaySubject } from 'rxjs'; +import { map } from 'rxjs/operators'; import { TranslationService } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { TranslateModule } from '@ngx-translate/core'; import { FormsModule } from '@angular/forms'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export enum LogicalSearchFields { MATCH_ALL = 'matchAll', @@ -46,7 +47,7 @@ export interface LogicalSearchCondition extends LogicalSearchConditionEnumValued styleUrls: ['./search-logical-filter.component.scss'], encapsulation: ViewEncapsulation.None }) -export class SearchLogicalFilterComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchLogicalFilterComponent implements SearchWidget, OnInit { id: string; settings?: SearchWidgetSettings; context?: SearchQueryBuilderService; @@ -56,7 +57,7 @@ export class SearchLogicalFilterComponent implements SearchWidget, OnInit, OnDes LogicalSearchFields = LogicalSearchFields; displayValue$ = new ReplaySubject(1); - private readonly destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private translationService: TranslationService) {} @@ -66,7 +67,7 @@ export class SearchLogicalFilterComponent implements SearchWidget, OnInit, OnDes .asObservable() .pipe( map((filtersQueries) => filtersQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -79,11 +80,6 @@ export class SearchLogicalFilterComponent implements SearchWidget, OnInit, OnDes }); } - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - submitValues(updateContext = true) { if (this.hasValidValue() && this.id && this.context && this.settings && this.settings.field) { this.updateDisplayValue(); diff --git a/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts b/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts index ee34979d412..a04601b09ee 100644 --- a/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts +++ b/lib/content-services/src/lib/search/components/search-properties/search-properties.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AfterViewChecked, Component, ElementRef, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { AfterViewChecked, Component, DestroyRef, ElementRef, inject, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; import { FileSizeCondition } from './file-size-condition'; import { FileSizeOperator } from './file-size-operator.enum'; @@ -31,7 +31,8 @@ import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; import { SearchChipAutocompleteInputComponent } from '../search-chip-autocomplete-input'; -import { map, takeUntil } from 'rxjs/operators'; +import { map } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-properties', @@ -41,7 +42,7 @@ import { map, takeUntil } from 'rxjs/operators'; styleUrls: ['./search-properties.component.scss'], encapsulation: ViewEncapsulation.None }) -export class SearchPropertiesComponent implements OnInit, AfterViewChecked, OnDestroy, SearchWidget { +export class SearchPropertiesComponent implements OnInit, AfterViewChecked, SearchWidget { id: string; settings?: SearchWidgetSettings; context?: SearchQueryBuilderService; @@ -95,7 +96,7 @@ export class SearchPropertiesComponent implements OnInit, AfterViewChecked, OnDe this._selectedExtensions = this.parseFromAutocompleteOptions(extensions); } - private readonly destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private formBuilder: FormBuilder, private translateService: TranslateService) {} @@ -114,7 +115,7 @@ export class SearchPropertiesComponent implements OnInit, AfterViewChecked, OnDe .asObservable() .pipe( map((filtersQueries) => filtersQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -149,11 +150,6 @@ export class SearchPropertiesComponent implements OnInit, AfterViewChecked, OnDe } } - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - narrowDownAllowedCharacters(event: Event) { const value = (event.target as HTMLInputElement).value; if (!(event.target as HTMLInputElement).value) { diff --git a/lib/content-services/src/lib/search/components/search-slider/search-slider.component.ts b/lib/content-services/src/lib/search/components/search-slider/search-slider.component.ts index b3d733d5d24..614c5520e2c 100644 --- a/lib/content-services/src/lib/search/components/search-slider/search-slider.component.ts +++ b/lib/content-services/src/lib/search/components/search-slider/search-slider.component.ts @@ -15,17 +15,17 @@ * limitations under the License. */ -import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { SearchWidget } from '../../models/search-widget.interface'; import { SearchWidgetSettings } from '../../models/search-widget-settings.interface'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; -import { ReplaySubject, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { ReplaySubject } from 'rxjs'; import { CommonModule } from '@angular/common'; import { MatSliderModule } from '@angular/material/slider'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-slider', @@ -36,7 +36,7 @@ import { TranslateModule } from '@ngx-translate/core'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-search-slider' } }) -export class SearchSliderComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchSliderComponent implements SearchWidget, OnInit { /** The numeric value represented by the slider. */ @Input() value: number | null; @@ -54,7 +54,7 @@ export class SearchSliderComponent implements SearchWidget, OnInit, OnDestroy { enableChangeUpdate: boolean; displayValue$ = new ReplaySubject(1); - private readonly destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); ngOnInit() { if (this.settings) { @@ -79,7 +79,7 @@ export class SearchSliderComponent implements SearchWidget, OnInit, OnDestroy { } this.context.populateFilters .asObservable() - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((filtersQueries) => { if (filtersQueries[this.id]) { this.value = filtersQueries[this.id]; @@ -91,11 +91,6 @@ export class SearchSliderComponent implements SearchWidget, OnInit, OnDestroy { }); } - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - clear() { this.value = this.min || 0; if (this.enableChangeUpdate) { diff --git a/lib/content-services/src/lib/search/components/search-text/search-text.component.ts b/lib/content-services/src/lib/search/components/search-text/search-text.component.ts index e12aeed9a11..466764fc36b 100644 --- a/lib/content-services/src/lib/search/components/search-text/search-text.component.ts +++ b/lib/content-services/src/lib/search/components/search-text/search-text.component.ts @@ -15,12 +15,12 @@ * limitations under the License. */ -import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { SearchWidget } from '../../models/search-widget.interface'; import { SearchWidgetSettings } from '../../models/search-widget-settings.interface'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; -import { ReplaySubject, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { ReplaySubject } from 'rxjs'; +import { map } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { TranslateModule } from '@ngx-translate/core'; @@ -28,6 +28,7 @@ import { MatInputModule } from '@angular/material/input'; import { MatButtonModule } from '@angular/material/button'; import { FormsModule } from '@angular/forms'; import { MatIconModule } from '@angular/material/icon'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-text', @@ -38,7 +39,7 @@ import { MatIconModule } from '@angular/material/icon'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-search-text' } }) -export class SearchTextComponent implements SearchWidget, OnInit, OnDestroy { +export class SearchTextComponent implements SearchWidget, OnInit { /** The content of the text box. */ @Input() value = ''; @@ -51,7 +52,7 @@ export class SearchTextComponent implements SearchWidget, OnInit, OnDestroy { enableChangeUpdate = true; displayValue$ = new ReplaySubject(1); - private readonly destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); ngOnInit() { if (this.context && this.settings && this.settings.pattern) { @@ -77,7 +78,7 @@ export class SearchTextComponent implements SearchWidget, OnInit, OnDestroy { .asObservable() .pipe( map((filtersQueries) => filtersQueries[this.id]), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((filterQuery) => { if (filterQuery) { @@ -89,12 +90,6 @@ export class SearchTextComponent implements SearchWidget, OnInit, OnDestroy { this.context.filterLoaded.next(); }); } - - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - clear() { this.isActive = false; this.value = ''; diff --git a/lib/content-services/src/lib/search/components/search.component.ts b/lib/content-services/src/lib/search/components/search.component.ts index 078dde0f731..94f67f8b3b6 100644 --- a/lib/content-services/src/lib/search/components/search.component.ts +++ b/lib/content-services/src/lib/search/components/search.component.ts @@ -25,18 +25,18 @@ import { Input, OnChanges, Output, + SimpleChanges, TemplateRef, ViewChild, - ViewEncapsulation, - OnDestroy, - SimpleChanges + ViewEncapsulation } from '@angular/core'; import { NodePaging, ResultSetPaging } from '@alfresco/js-api'; import { Subject } from 'rxjs'; -import { debounceTime, takeUntil } from 'rxjs/operators'; +import { debounceTime } from 'rxjs/operators'; import { SearchComponentInterface } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search', @@ -49,7 +49,7 @@ import { TranslateModule } from '@ngx-translate/core'; exportAs: 'searchAutocomplete', host: { class: 'adf-search' } }) -export class SearchComponent implements SearchComponentInterface, AfterContentInit, OnChanges, OnDestroy { +export class SearchComponent implements SearchComponentInterface, AfterContentInit, OnChanges { @ViewChild('panel', { static: true }) panel: ElementRef; @@ -107,14 +107,12 @@ export class SearchComponent implements SearchComponentInterface, AfterContentIn _isOpen: boolean = false; keyPressedStream = new Subject(); _classList: { [key: string]: boolean } = {}; - private onDestroy$ = new Subject(); - constructor(private searchService: SearchService, private _elementRef: ElementRef) { - this.keyPressedStream.pipe(debounceTime(200), takeUntil(this.onDestroy$)).subscribe((searchedWord) => { + this.keyPressedStream.pipe(debounceTime(200), takeUntilDestroyed()).subscribe((searchedWord) => { this.loadSearchResults(searchedWord); }); - searchService.dataLoaded.pipe(takeUntil(this.onDestroy$)).subscribe( + searchService.dataLoaded.pipe(takeUntilDestroyed()).subscribe( (nodePaging) => this.onSearchDataLoaded(nodePaging), (error) => this.onSearchDataError(error) ); @@ -129,12 +127,6 @@ export class SearchComponent implements SearchComponentInterface, AfterContentIn this.loadSearchResults(changes.searchTerm.currentValue); } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - resetResults() { this.cleanResults(); this.setVisibility(); diff --git a/lib/content-services/src/lib/search/services/search-facet-filters.service.ts b/lib/content-services/src/lib/search/services/search-facet-filters.service.ts index e05081e6672..7a6b7fbf251 100644 --- a/lib/content-services/src/lib/search/services/search-facet-filters.service.ts +++ b/lib/content-services/src/lib/search/services/search-facet-filters.service.ts @@ -15,18 +15,19 @@ * limitations under the License. */ -import { Injectable, OnDestroy } from '@angular/core'; +import { Injectable } from '@angular/core'; import { FacetBucketSortBy, FacetBucketSortDirection, FacetField } from '../models/facet-field.interface'; -import { Subject, throwError } from 'rxjs'; +import { throwError } from 'rxjs'; import { SearchQueryBuilderService } from './search-query-builder.service'; import { TranslationService } from '@alfresco/adf-core'; import { SearchService } from './search.service'; -import { catchError, takeUntil } from 'rxjs/operators'; +import { catchError } from 'rxjs/operators'; import { GenericBucket, GenericFacetResponse, ResultSetContext, ResultSetPaging } from '@alfresco/js-api'; import { SearchFilterList } from '../models/search-filter-list.model'; import { FacetFieldBucket } from '../models/facet-field-bucket.interface'; import { CategoryService } from '../../category/services/category.service'; import { TabbedFacetField } from '../models/tabbed-facet-field.interface'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export interface SelectedBucket { field: FacetField; @@ -38,7 +39,7 @@ const DEFAULT_PAGE_SIZE: number = 5; @Injectable({ providedIn: 'root' }) -export class SearchFacetFiltersService implements OnDestroy { +export class SearchFacetFiltersService { /** * All facet field items to be displayed in the component. These are updated according to the response. * When a new search is performed, the already existing items are updated with the new bucket count values and @@ -52,8 +53,6 @@ export class SearchFacetFiltersService implements OnDestroy { selectedBuckets: SelectedBucket[] = []; private readonly facetQueriesPageSize = DEFAULT_PAGE_SIZE; - private readonly onDestroy$ = new Subject(); - constructor( private queryBuilder: SearchQueryBuilderService, private searchService: SearchService, @@ -64,14 +63,14 @@ export class SearchFacetFiltersService implements OnDestroy { this.facetQueriesPageSize = queryBuilder.config.facetQueries.pageSize || DEFAULT_PAGE_SIZE; } - this.queryBuilder.configUpdated.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.queryBuilder.configUpdated.pipe(takeUntilDestroyed()).subscribe(() => { this.selectedBuckets = []; this.responseFacets = null; }); - this.queryBuilder.updated.pipe(takeUntil(this.onDestroy$)).subscribe((query) => this.queryBuilder.execute(true, query)); + this.queryBuilder.updated.pipe(takeUntilDestroyed()).subscribe((query) => this.queryBuilder.execute(true, query)); - this.queryBuilder.executed.pipe(takeUntil(this.onDestroy$)).subscribe((resultSetPaging: ResultSetPaging) => { + this.queryBuilder.executed.pipe(takeUntilDestroyed()).subscribe((resultSetPaging: ResultSetPaging) => { this.onDataLoaded(resultSetPaging); this.searchService.dataLoaded.next(resultSetPaging); }); @@ -420,11 +419,6 @@ export class SearchFacetFiltersService implements OnDestroy { } } - ngOnDestroy(): void { - this.onDestroy$.next(undefined); - this.onDestroy$.complete(); - } - resetAllSelectedBuckets() { this.responseFacets.forEach((facetField) => { if (facetField?.buckets) { diff --git a/lib/content-services/src/lib/tag/tag-actions/tag-actions.component.ts b/lib/content-services/src/lib/tag/tag-actions/tag-actions.component.ts index aa8aaf0b92b..3da853279a4 100644 --- a/lib/content-services/src/lib/tag/tag-actions/tag-actions.component.ts +++ b/lib/content-services/src/lib/tag/tag-actions/tag-actions.component.ts @@ -16,11 +16,19 @@ */ import { TranslationService } from '@alfresco/adf-core'; -import { Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation, OnDestroy, OnInit } from '@angular/core'; +import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + ViewEncapsulation +} from '@angular/core'; import { TagService } from '../services/tag.service'; -import { Subject } from 'rxjs'; import { TagPaging } from '@alfresco/js-api'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatListModule } from '@angular/material/list'; import { MatIconModule } from '@angular/material/icon'; @@ -29,6 +37,7 @@ import { MatInputModule } from '@angular/material/input'; import { TranslateModule } from '@ngx-translate/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /** * @@ -44,7 +53,7 @@ import { MatButtonModule } from '@angular/material/button'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-tag-node-actions-list' } }) -export class TagActionsComponent implements OnChanges, OnInit, OnDestroy { +export class TagActionsComponent implements OnChanges, OnInit { /** The identifier of a node. */ @Input() nodeId: string; @@ -66,23 +75,18 @@ export class TagActionsComponent implements OnChanges, OnInit, OnDestroy { errorMsg: string; disableAddTag: boolean = true; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private tagService: TagService, private translateService: TranslationService) {} ngOnInit() { - this.tagService.refresh.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.refreshTag()); + this.tagService.refresh.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.refreshTag()); } ngOnChanges() { return this.refreshTag(); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - refreshTag() { if (this.nodeId) { this.tagService.getTagsByNodeId(this.nodeId).subscribe( diff --git a/lib/content-services/src/lib/tag/tag-list/tag-list.component.ts b/lib/content-services/src/lib/tag/tag-list/tag-list.component.ts index 38e6e106313..ed34ab9c835 100644 --- a/lib/content-services/src/lib/tag/tag-list/tag-list.component.ts +++ b/lib/content-services/src/lib/tag/tag-list/tag-list.component.ts @@ -15,16 +15,15 @@ * limitations under the License. */ -import { Component, EventEmitter, OnInit, Output, ViewEncapsulation, OnDestroy } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { TagService } from '../services/tag.service'; import { PaginationModel } from '@alfresco/adf-core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { TagEntry } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; import { MatChipsModule } from '@angular/material/chips'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /** * This component provide a list of all the tag inside the ECM @@ -38,7 +37,7 @@ import { MatIconModule } from '@angular/material/icon'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-tag-list' } }) -export class TagListComponent implements OnInit, OnDestroy { +export class TagListComponent implements OnInit { /** Emitted when a tag is selected. */ @Output() result = new EventEmitter(); @@ -59,8 +58,6 @@ export class TagListComponent implements OnInit, OnDestroy { isLoading = false; isSizeMinimum = true; - private onDestroy$ = new Subject(); - constructor(private tagService: TagService) { this.defaultPagination = { skipCount: 0, @@ -70,7 +67,7 @@ export class TagListComponent implements OnInit, OnDestroy { this.pagination = this.defaultPagination; - this.tagService.refresh.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.tagService.refresh.pipe(takeUntilDestroyed()).subscribe(() => { this.tagsEntries = []; this.refreshTag(this.defaultPagination); }); @@ -79,12 +76,6 @@ export class TagListComponent implements OnInit, OnDestroy { ngOnInit() { this.refreshTag(this.defaultPagination); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - refreshTag(opts?: any) { this.tagService.getAllTheTags(opts).subscribe((tags) => { this.tagsEntries = this.tagsEntries.concat(tags.list.entries); diff --git a/lib/content-services/src/lib/tag/tag-node-list/tag-node-list.component.ts b/lib/content-services/src/lib/tag/tag-node-list/tag-node-list.component.ts index 7f46be393f3..54e3fba6a3f 100644 --- a/lib/content-services/src/lib/tag/tag-node-list/tag-node-list.component.ts +++ b/lib/content-services/src/lib/tag/tag-node-list/tag-node-list.component.ts @@ -15,12 +15,11 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { TagService } from '../services/tag.service'; import { TagEntry } from '@alfresco/js-api'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { Chip, DynamicChipListComponent } from '@alfresco/adf-core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /** * @@ -34,7 +33,7 @@ import { Chip, DynamicChipListComponent } from '@alfresco/adf-core'; templateUrl: './tag-node-list.component.html', encapsulation: ViewEncapsulation.None }) -export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit { +export class TagNodeListComponent implements OnChanges, OnInit { /** The identifier of a node. */ @Input() nodeId: string; @@ -51,13 +50,14 @@ export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit { @Output() results = new EventEmitter(); - private onDestroy$ = new Subject(); private _tagChips: Chip[] = []; get tagChips(): Chip[] { return this._tagChips; } + private readonly destroyRef = inject(DestroyRef); + constructor(private tagService: TagService) {} ngOnChanges(): void { @@ -65,12 +65,7 @@ export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit { } ngOnInit(): void { - this.tagService.refresh.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.refreshTag()); - } - - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); + this.tagService.refresh.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.refreshTag()); } refreshTag(): void { diff --git a/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.ts b/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.ts index b1fb1bcf2ac..2a97a406577 100644 --- a/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.ts +++ b/lib/content-services/src/lib/tag/tags-creator/tags-creator.component.ts @@ -16,7 +16,20 @@ */ import { TagEntry, TagPaging } from '@alfresco/js-api'; -import { Component, ElementRef, EventEmitter, HostBinding, Input, OnDestroy, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core'; +import { + Component, + DestroyRef, + ElementRef, + EventEmitter, + HostBinding, + inject, + Input, + OnDestroy, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms'; import { debounce, distinctUntilChanged, finalize, first, map, takeUntil, tap } from 'rxjs/operators'; import { EMPTY, forkJoin, Observable, Subject, timer } from 'rxjs'; @@ -32,6 +45,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; interface TagNameControlErrors { duplicatedExistingTag?: boolean; @@ -162,7 +176,6 @@ export class TagsCreatorComponent implements OnInit, OnDestroy { private _tagNameControlVisible = false; private _existingTags: TagEntry[]; private _initialExistingTags: TagEntry[]; - private onDestroy$ = new Subject(); private _tagNameErrorMessageKey = ''; private _spinnerVisible = false; private _typing = false; @@ -176,6 +189,8 @@ export class TagsCreatorComponent implements OnInit, OnDestroy { @ViewChild('tagNameInput') private tagNameInputElement: ElementRef; + private readonly destroyRef = inject(DestroyRef); + constructor(private tagService: TagService, private notificationService: NotificationService) {} ngOnInit(): void { @@ -201,18 +216,16 @@ export class TagsCreatorComponent implements OnInit, OnDestroy { this._existingTags = null; }), debounce((name: string) => (name ? timer(300) : EMPTY)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((name: string) => this.onTagNameControlValueChange(name)); - this.tagNameControl.statusChanges.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.setTagNameControlErrorMessageKey()); + this.tagNameControl.statusChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.setTagNameControlErrorMessageKey()); this.setTagNameControlErrorMessageKey(); } ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); this.cancelExistingTagsLoading$.next(); this.cancelExistingTagsLoading$.complete(); } diff --git a/lib/content-services/src/lib/upload/components/base-upload/upload-base.ts b/lib/content-services/src/lib/upload/components/base-upload/upload-base.ts index fd1aaac2d7c..e7d2b202570 100644 --- a/lib/content-services/src/lib/upload/components/base-upload/upload-base.ts +++ b/lib/content-services/src/lib/upload/components/base-upload/upload-base.ts @@ -19,14 +19,13 @@ import { FileInfo, TranslationService } from '@alfresco/adf-core'; import { FileUploadErrorEvent } from '../../../common/events/file.event'; import { FileModel } from '../../../common/models/file.model'; import { UploadService } from '../../../common/services/upload.service'; -import { EventEmitter, Input, Output, OnInit, OnDestroy, NgZone, Directive, inject } from '@angular/core'; -import { Subject } from 'rxjs'; +import { DestroyRef, Directive, EventEmitter, inject, Input, NgZone, OnInit, Output } from '@angular/core'; import { UploadFilesEvent } from '../upload-files.event'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive() // eslint-disable-next-line @angular-eslint/directive-class-suffix -export abstract class UploadBase implements OnInit, OnDestroy { +export abstract class UploadBase implements OnInit { protected uploadService = inject(UploadService); protected translationService = inject(TranslationService); protected ngZone = inject(NgZone); @@ -85,19 +84,14 @@ export abstract class UploadBase implements OnInit, OnDestroy { @Output() updateFileVersion = new EventEmitter(); - protected onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); ngOnInit() { this.uploadService.fileUploadError - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(error => this.error.emit(error)); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - /** * Upload a list of file in the specified path * diff --git a/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.ts b/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.ts index 63ccd750193..1284ef459ca 100644 --- a/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.ts +++ b/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.ts @@ -19,29 +19,32 @@ import { UserPreferencesService } from '@alfresco/adf-core'; import { ChangeDetectorRef, Component, - Input, - Output, + DestroyRef, + ElementRef, EventEmitter, + HostBinding, + inject, + Input, OnDestroy, OnInit, + Output, ViewChild, - HostBinding, - ElementRef, ViewEncapsulation } from '@angular/core'; -import { Subscription, merge, Subject } from 'rxjs'; +import { merge, Subject } from 'rxjs'; import { FileUploadingListComponent } from './file-uploading-list.component'; import { Direction } from '@angular/cdk/bidi'; -import { takeUntil, delay } from 'rxjs/operators'; +import { delay } from 'rxjs/operators'; import { UploadService } from '../../common/services/upload.service'; import { FileModel, FileUploadStatus } from '../../common/models/file.model'; -import { FileUploadDeleteEvent, FileUploadCompleteEvent } from '../../common/events/file.event'; +import { FileUploadCompleteEvent, FileUploadDeleteEvent } from '../../common/events/file.event'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { TranslateModule } from '@ngx-translate/core'; import { MatIconModule } from '@angular/material/icon'; import { FileUploadingListRowComponent } from './file-uploading-list-row.component'; import { A11yModule } from '@angular/cdk/a11y'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-file-uploading-dialog', @@ -54,7 +57,6 @@ import { A11yModule } from '@angular/cdk/a11y'; export class FileUploadingDialogComponent implements OnInit, OnDestroy { /** Dialog direction. Can be 'ltr' or 'rtl. */ private direction: Direction = 'ltr'; - private onDestroy$ = new Subject(); @ViewChild('uploadList') uploadList: FileUploadingListComponent; @@ -87,12 +89,10 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { isDialogMinimized: boolean = false; isConfirmation: boolean = false; - private listSubscription: Subscription; - private counterSubscription: Subscription; - private fileUploadSubscription: Subscription; - private errorSubscription: Subscription; private dialogActive = new Subject(); + private readonly destroyRef = inject(DestroyRef); + constructor( private uploadService: UploadService, private changeDetector: ChangeDetectorRef, @@ -101,14 +101,14 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { ) {} ngOnInit() { - this.dialogActive.pipe(delay(100), takeUntil(this.onDestroy$)).subscribe(() => { + this.dialogActive.pipe(delay(100), takeUntilDestroyed(this.destroyRef)).subscribe(() => { const element: any = this.elementRef.nativeElement.querySelector('#upload-dialog'); if (element) { element.focus(); } }); - this.listSubscription = this.uploadService.queueChanged.pipe(takeUntil(this.onDestroy$)).subscribe((fileList) => { + this.uploadService.queueChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((fileList) => { this.filesUploadingList = fileList; if (this.filesUploadingList.length && !this.isDialogActive) { @@ -119,23 +119,23 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { } }); - this.counterSubscription = merge(this.uploadService.fileUploadComplete, this.uploadService.fileUploadDeleted) - .pipe(takeUntil(this.onDestroy$)) + merge(this.uploadService.fileUploadComplete, this.uploadService.fileUploadDeleted) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((event: FileUploadCompleteEvent | FileUploadDeleteEvent) => { this.totalCompleted = event.totalComplete; this.changeDetector.detectChanges(); }); - this.errorSubscription = this.uploadService.fileUploadError.pipe(takeUntil(this.onDestroy$)).subscribe((event) => { + this.uploadService.fileUploadError.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => { this.totalErrors = event.totalError; this.changeDetector.detectChanges(); }); - this.fileUploadSubscription = this.uploadService.fileUpload.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.uploadService.fileUpload.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.changeDetector.detectChanges(); }); - this.uploadService.fileDeleted.pipe(takeUntil(this.onDestroy$)).subscribe((objId) => { + this.uploadService.fileDeleted.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((objId) => { if (this.filesUploadingList) { const uploadedFile = this.filesUploadingList.find((file) => (file.data ? file.data.entry.id === objId : false)); if (uploadedFile) { @@ -147,7 +147,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { this.userPreferencesService .select('textOrientation') - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((textOrientation: Direction) => { this.direction = textOrientation; }); @@ -201,12 +201,6 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { ngOnDestroy() { this.uploadService.clearQueue(); - this.listSubscription.unsubscribe(); - this.counterSubscription.unsubscribe(); - this.fileUploadSubscription.unsubscribe(); - this.errorSubscription.unsubscribe(); - this.onDestroy$.next(true); - this.onDestroy$.complete(); } canShowDialog(): boolean { diff --git a/lib/content-services/src/lib/version-manager/version-list.component.ts b/lib/content-services/src/lib/version-manager/version-list.component.ts index f28eb822188..dd44beb9887 100644 --- a/lib/content-services/src/lib/version-manager/version-list.component.ts +++ b/lib/content-services/src/lib/version-manager/version-list.component.ts @@ -17,14 +17,25 @@ import { ConfirmDialogComponent } from '@alfresco/adf-core'; import { AlfrescoApiService } from '../services/alfresco-api.service'; -import { Component, Input, OnChanges, ViewEncapsulation, EventEmitter, Output, OnInit, OnDestroy, ViewChild } from '@angular/core'; -import { VersionsApi, Node, VersionEntry, NodesApi, NodeEntry, ContentApi, ContentPagingQuery } from '@alfresco/js-api'; +import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; +import { ContentApi, ContentPagingQuery, Node, NodeEntry, NodesApi, VersionEntry, VersionsApi } from '@alfresco/js-api'; import { MatDialog } from '@angular/material/dialog'; import { ContentVersionService } from './content-version.service'; import { ContentService } from '../common'; import { InfiniteScrollDatasource } from '../infinite-scroll-datasource'; -import { from, Observable, Subject } from 'rxjs'; -import { map, take, takeUntil } from 'rxjs/operators'; +import { from, Observable } from 'rxjs'; +import { map, take } from 'rxjs/operators'; import { CdkFixedSizeVirtualScroll, CdkVirtualForOf, CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { CommonModule } from '@angular/common'; import { MatProgressBarModule } from '@angular/material/progress-bar'; @@ -34,6 +45,7 @@ import { MatMenuModule } from '@angular/material/menu'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; import { VersionCompatibilityDirective } from '../version-compatibility'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export class VersionListDataSource extends InfiniteScrollDatasource { constructor(private versionsApi: VersionsApi, private node: Node) { @@ -69,8 +81,7 @@ export class VersionListDataSource extends InfiniteScrollDatasource(); +export class VersionListComponent implements OnChanges, OnInit { private _contentApi: ContentApi; get contentApi(): ContentApi { this._contentApi = this._contentApi ?? new ContentApi(this.alfrescoApi.getInstance()); @@ -132,6 +143,8 @@ export class VersionListComponent implements OnChanges, OnInit, OnDestroy { @ViewChild('viewport') viewport: CdkVirtualScrollViewport; + private readonly destroyRef = inject(DestroyRef); + constructor( private alfrescoApi: AlfrescoApiService, private contentService: ContentService, @@ -141,7 +154,7 @@ export class VersionListComponent implements OnChanges, OnInit, OnDestroy { ngOnInit() { this.versionsDataSource = new VersionListDataSource(this.versionsApi, this.node); - this.versionsDataSource.isLoading.pipe(takeUntil(this.onDestroy$)).subscribe((isLoading) => { + this.versionsDataSource.isLoading.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((isLoading) => { this.isLoading = isLoading; this.latestVersion = this.versionsDataSource.firstItem; }); @@ -153,10 +166,6 @@ export class VersionListComponent implements OnChanges, OnInit, OnDestroy { } } - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } canUpdate(): boolean { return this.contentService.hasAllowableOperations(this.node, 'update') && this.versionsDataSource.itemsCount > 1; @@ -188,7 +197,7 @@ export class VersionListComponent implements OnChanges, OnInit, OnDestroy { if (this.allowDownload) { this.contentVersionService .getVersionContentUrl(this.node.id, versionId, true) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((versionDownloadUrl) => this.downloadContent(versionDownloadUrl)); } } @@ -207,7 +216,7 @@ export class VersionListComponent implements OnChanges, OnInit, OnDestroy { dialogRef .afterClosed() - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((result) => { if (result) { this.versionsApi.deleteVersion(this.node.id, versionId).then(() => this.onVersionDeleted(this.node)); diff --git a/lib/content-services/src/lib/version-manager/version-upload.component.ts b/lib/content-services/src/lib/version-manager/version-upload.component.ts index fe0769e136f..4d5da1dd399 100644 --- a/lib/content-services/src/lib/version-manager/version-upload.component.ts +++ b/lib/content-services/src/lib/version-manager/version-upload.component.ts @@ -15,10 +15,8 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { Node, Version } from '@alfresco/js-api'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { ContentService } from '../common/services/content.service'; import { UploadService } from '../common/services/upload.service'; import { FileUploadErrorEvent, FileUploadEvent } from '../common/events/file.event'; @@ -30,6 +28,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { MatButtonModule } from '@angular/material/button'; import { UploadVersionButtonComponent } from '../upload'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-version-upload', @@ -49,12 +48,11 @@ import { UploadVersionButtonComponent } from '../upload'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-version-upload' } }) -export class VersionUploadComponent implements OnInit, OnDestroy { +export class VersionUploadComponent implements OnInit { semanticVersion: string = 'minor'; comment: string; uploadVersion: boolean = false; disabled: boolean = false; - onDestroy$ = new Subject(); majorVersion = '2.0'; minorVersion = '1.1'; @@ -107,10 +105,12 @@ export class VersionUploadComponent implements OnInit, OnDestroy { @Output() uploadStarted = new EventEmitter(); + private readonly destroyRef = inject(DestroyRef); + constructor(private contentService: ContentService, private uploadService: UploadService) {} ngOnInit() { - this.uploadService.fileUploadStarting.pipe(takeUntil(this.onDestroy$)).subscribe((event: FileUploadEvent) => { + this.uploadService.fileUploadStarting.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event: FileUploadEvent) => { this.disabled = true; this.uploadStarted.emit(event); }); @@ -146,11 +146,6 @@ export class VersionUploadComponent implements OnInit, OnDestroy { this.error.emit(event); } - ngOnDestroy() { - this.onDestroy$.next(undefined); - this.onDestroy$.complete(); - } - getNextMinorVersion(version: string): string { const { major, minor } = this.getParsedVersion(version); return `${major}.${minor + 1}`; diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts index 365c66b2edb..99a56d33af7 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts @@ -19,10 +19,11 @@ import { ChangeDetectorRef, Component, ContentChild, + DestroyRef, EventEmitter, + inject, Input, OnChanges, - OnDestroy, OnInit, Output, SimpleChanges, @@ -33,8 +34,8 @@ import { import { CloseButtonPosition, Track, - ViewerComponent, VIEWER_DIRECTIVES, + ViewerComponent, ViewerMoreActionsComponent, ViewerOpenWithComponent, ViewerSidebarComponent, @@ -43,11 +44,10 @@ import { ViewUtilService } from '@alfresco/adf-core'; import { AlfrescoApiService } from '../../services/alfresco-api.service'; -import { Subject } from 'rxjs'; import { ContentApi, Node, NodeEntry, NodesApi, RenditionEntry, SharedlinksApi, Version, VersionEntry, VersionsApi } from '@alfresco/js-api'; import { RenditionService } from '../../common/services/rendition.service'; import { MatDialog } from '@angular/material/dialog'; -import { filter, takeUntil } from 'rxjs/operators'; +import { filter } from 'rxjs/operators'; import { ContentService } from '../../common/services/content.service'; import { NodesApiService } from '../../common/services/nodes-api.service'; import { UploadService } from '../../common/services/upload.service'; @@ -58,6 +58,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { NodeDownloadDirective } from '../../directives'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-alfresco-viewer', @@ -69,7 +70,7 @@ import { NodeDownloadDirective } from '../../directives'; encapsulation: ViewEncapsulation.None, providers: [ViewUtilService] }) -export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { +export class AlfrescoViewerComponent implements OnChanges, OnInit { @ViewChild('adfViewer') adfViewer: ViewerComponent<{ node: Node }>; @@ -204,8 +205,6 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { @Output() showViewerChange = new EventEmitter(); - private onDestroy$ = new Subject(); - private cacheBusterNumber: number; versionEntry: VersionEntry; @@ -247,6 +246,8 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { return this._contentApi; } + private readonly destroyRef = inject(DestroyRef); + constructor( private apiService: AlfrescoApiService, private nodesApiService: NodesApiService, @@ -268,7 +269,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { (node) => node && node.id === this.nodeId && this.getNodeVersionProperty(this.nodeEntry.entry) !== this.getNodeVersionProperty(node) ), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((node) => this.onNodeUpdated(node)); } @@ -458,11 +459,6 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { } } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - onDownloadFile() { this.nodeActionsService.downloadNode(this.nodeEntry); } diff --git a/lib/core/feature-flags/src/lib/components/feature-override-indicator.component.ts b/lib/core/feature-flags/src/lib/components/feature-override-indicator.component.ts index 884a3a0ac99..15e61d783de 100644 --- a/lib/core/feature-flags/src/lib/components/feature-override-indicator.component.ts +++ b/lib/core/feature-flags/src/lib/components/feature-override-indicator.component.ts @@ -15,11 +15,10 @@ * limitations under the License. */ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Input, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Input, ViewEncapsulation } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FeaturesServiceToken, IDebugFeaturesService } from '../interfaces/features.interface'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-feature-flags-override-indicator', @@ -49,9 +48,8 @@ import { Subject } from 'rxjs'; encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }) -export class FlagsOverrideComponent implements OnDestroy { +export class FlagsOverrideComponent { isEnabled = false; - destroy$ = new Subject(); @Input() size: 'small' | 'medium' | 'large' = 'medium'; @@ -64,16 +62,11 @@ export class FlagsOverrideComponent implements OnDestroy { if (this.featuresService.isEnabled$) { this.featuresService .isEnabled$() - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed()) .subscribe((isEnabled) => { this.isEnabled = isEnabled; changeDetectorRef.markForCheck(); }); } } - - ngOnDestroy(): void { - this.destroy$.next(); - this.destroy$.complete(); - } } diff --git a/lib/core/feature-flags/src/lib/components/flags/flags.component.ts b/lib/core/feature-flags/src/lib/components/flags/flags.component.ts index fbdc644a06d..0e02c9da837 100644 --- a/lib/core/feature-flags/src/lib/components/flags/flags.component.ts +++ b/lib/core/feature-flags/src/lib/components/flags/flags.component.ts @@ -15,18 +15,18 @@ * limitations under the License. */ -import { ChangeDetectionStrategy, Component, Inject, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Inject, ViewEncapsulation } from '@angular/core'; import { CommonModule } from '@angular/common'; import { - IWritableFeaturesService, FeaturesServiceToken, - WritableFeaturesServiceToken, IDebugFeaturesService, - WritableFlagChangeset, - IFeaturesService + IFeaturesService, + IWritableFeaturesService, + WritableFeaturesServiceToken, + WritableFlagChangeset } from '../../interfaces/features.interface'; -import { BehaviorSubject, Observable, Subject, combineLatest } from 'rxjs'; -import { debounceTime, map, take, takeUntil, tap } from 'rxjs/operators'; +import { BehaviorSubject, combineLatest, Observable } from 'rxjs'; +import { debounceTime, map, take, tap } from 'rxjs/operators'; import { MatTableModule } from '@angular/material/table'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatToolbarModule } from '@angular/material/toolbar'; @@ -37,6 +37,7 @@ import { FormsModule } from '@angular/forms'; import { FlagsOverrideComponent } from '../feature-override-indicator.component'; import { MatDialogModule } from '@angular/material/dialog'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-feature-flags-overrides', @@ -59,17 +60,15 @@ import { TranslateModule } from '@ngx-translate/core'; encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }) -export class FlagsComponent implements OnDestroy { +export class FlagsComponent { displayedColumns: string[] = ['icon', 'flag', 'value']; flags$: Observable<{ fictive: boolean; flag: string; value: any }[]>; isEnabled = false; - destroy$ = new Subject(); inputValue = ''; inputValue$ = new BehaviorSubject(''); showPlusButton$!: Observable; writableFlagChangeset: WritableFlagChangeset = {}; - constructor( @Inject(FeaturesServiceToken) private featuresService: IDebugFeaturesService & IFeaturesService, @@ -79,7 +78,7 @@ export class FlagsComponent implements OnDestroy { if (this.featuresService.isEnabled$) { this.featuresService .isEnabled$() - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed()) .subscribe((isEnabled) => { this.isEnabled = isEnabled; }); @@ -149,9 +148,4 @@ export class FlagsComponent implements OnDestroy { protected onDelete(flag: string) { this.writableFeaturesService.removeFlag(flag); } - - ngOnDestroy(): void { - this.destroy$.next(); - this.destroy$.complete(); - } } diff --git a/lib/core/feature-flags/src/lib/directives/features.directive.ts b/lib/core/feature-flags/src/lib/directives/features.directive.ts index 3a954f6bea9..a8400351a48 100644 --- a/lib/core/feature-flags/src/lib/directives/features.directive.ts +++ b/lib/core/feature-flags/src/lib/directives/features.directive.ts @@ -15,21 +15,20 @@ * limitations under the License. */ -import { Directive, Inject, Input, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core'; -import { BehaviorSubject, Subject, combineLatest } from 'rxjs'; -import { IFeaturesService, FeaturesServiceToken, FlagChangeset } from '../interfaces/features.interface'; -import { takeUntil } from 'rxjs/operators'; +import { Directive, Inject, Input, TemplateRef, ViewContainerRef } from '@angular/core'; +import { BehaviorSubject, combineLatest } from 'rxjs'; +import { FeaturesServiceToken, FlagChangeset, IFeaturesService } from '../interfaces/features.interface'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ /* eslint-disable-next-line @angular-eslint/directive-selector */ selector: '[adfForFeatures]', standalone: true }) -export class FeaturesDirective implements OnDestroy { +export class FeaturesDirective { private hasView = false; private inputUpdate$ = new BehaviorSubject([] as string[]); - private destroy$ = new Subject(); - + @Input() set adfForFeatures(feature: string[] | string) { this.inputUpdate$.next(Array.isArray(feature) ? feature : [feature]); @@ -41,7 +40,7 @@ export class FeaturesDirective implements OnDestroy { private viewContainer: ViewContainerRef ) { combineLatest([this.featuresService.getFlags$(), this.inputUpdate$]) - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed()) .subscribe(([flags, features]: any) => this.updateView(flags, features)); } @@ -56,9 +55,4 @@ export class FeaturesDirective implements OnDestroy { this.hasView = false; } } - - ngOnDestroy() { - this.destroy$.next({}); - this.destroy$.complete(); - } } diff --git a/lib/core/feature-flags/src/lib/directives/not-features.directive.ts b/lib/core/feature-flags/src/lib/directives/not-features.directive.ts index a1435a671ac..2cd840e008d 100644 --- a/lib/core/feature-flags/src/lib/directives/not-features.directive.ts +++ b/lib/core/feature-flags/src/lib/directives/not-features.directive.ts @@ -15,20 +15,19 @@ * limitations under the License. */ -import { Directive, Inject, Input, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core'; -import { BehaviorSubject, Subject, combineLatest } from 'rxjs'; -import { IFeaturesService, FeaturesServiceToken, FlagChangeset } from '../interfaces/features.interface'; -import { takeUntil } from 'rxjs/operators'; +import { Directive, Inject, Input, TemplateRef, ViewContainerRef } from '@angular/core'; +import { BehaviorSubject, combineLatest } from 'rxjs'; +import { FeaturesServiceToken, FlagChangeset, IFeaturesService } from '../interfaces/features.interface'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ /* eslint-disable-next-line @angular-eslint/directive-selector */ selector: '[adfNotForFeatures]', standalone: true }) -export class NotFeaturesDirective implements OnDestroy { +export class NotFeaturesDirective { private hasView = false; private inputUpdate$ = new BehaviorSubject([] as string[]); - private destroy$ = new Subject(); @Input() set adfNotForFeatures(feature: string[] | string) { @@ -41,7 +40,7 @@ export class NotFeaturesDirective implements OnDestroy { private viewContainer: ViewContainerRef ) { combineLatest([this.featuresService.getFlags$(), this.inputUpdate$]) - .pipe(takeUntil(this.destroy$)) + .pipe(takeUntilDestroyed()) .subscribe(([flags, features]: any) => this.updateView(flags, features)); } @@ -56,9 +55,4 @@ export class NotFeaturesDirective implements OnDestroy { this.hasView = false; } } - - ngOnDestroy() { - this.destroy$.next({}); - this.destroy$.complete(); - } } diff --git a/lib/core/shell/src/lib/components/shell/shell.component.ts b/lib/core/shell/src/lib/components/shell/shell.component.ts index dc7eb5ff3d3..85c006d6207 100644 --- a/lib/core/shell/src/lib/components/shell/shell.component.ts +++ b/lib/core/shell/src/lib/components/shell/shell.component.ts @@ -17,14 +17,20 @@ import { AppConfigService, SidenavLayoutComponent, SidenavLayoutModule } from '@alfresco/adf-core'; import { DynamicExtensionComponent } from '@alfresco/adf-extensions'; -import { Component, Inject, OnDestroy, OnInit, Optional, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Inject, OnInit, Optional, ViewChild, ViewEncapsulation } from '@angular/core'; import { NavigationEnd, Router, RouterModule } from '@angular/router'; -import { Subject, Observable } from 'rxjs'; -import { filter, takeUntil, map, withLatestFrom } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { filter, map, withLatestFrom } from 'rxjs/operators'; import { BreakpointObserver } from '@angular/cdk/layout'; import { Directionality } from '@angular/cdk/bidi'; -import { SHELL_APP_SERVICE, ShellAppService, SHELL_NAVBAR_MIN_WIDTH, SHELL_NAVBAR_MAX_WIDTH } from '../../services/shell-app.service'; +import { + SHELL_APP_SERVICE, + SHELL_NAVBAR_MAX_WIDTH, + SHELL_NAVBAR_MIN_WIDTH, + ShellAppService +} from '../../services/shell-app.service'; import { CommonModule } from '@angular/common'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'app-shell', @@ -35,11 +41,10 @@ import { CommonModule } from '@angular/common'; encapsulation: ViewEncapsulation.None, host: { class: 'app-shell' } }) -export class ShellLayoutComponent implements OnInit, OnDestroy { +export class ShellLayoutComponent implements OnInit { @ViewChild('layout', { static: true }) layout: SidenavLayoutComponent; - onDestroy$: Subject = new Subject(); isSmallScreen$: Observable; expandedSidenav: boolean; @@ -49,6 +54,8 @@ export class ShellLayoutComponent implements OnInit, OnDestroy { sidenavMax: number; direction: Directionality; + private readonly destroyRef = inject(DestroyRef); + constructor( private router: Router, private appConfigService: AppConfigService, @@ -77,7 +84,7 @@ export class ShellLayoutComponent implements OnInit, OnDestroy { .pipe( withLatestFrom(this.isSmallScreen$), filter(([event, isSmallScreen]) => isSmallScreen && event instanceof NavigationEnd), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.layout.container.sidenav.close(); @@ -86,7 +93,7 @@ export class ShellLayoutComponent implements OnInit, OnDestroy { this.router.events .pipe( filter((event) => event instanceof NavigationEnd), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((event: NavigationEnd) => { this.minimizeSidenav = this.shellService.minimizeSidenavConditions.some((el) => event.urlAfterRedirects.includes(el)); @@ -95,12 +102,6 @@ export class ShellLayoutComponent implements OnInit, OnDestroy { this.updateState(); }); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - hideMenu(event: Event) { if (this.layout.container.isMobileScreenSize) { event.preventDefault(); diff --git a/lib/core/src/lib/card-view/components/base-card-view.ts b/lib/core/src/lib/card-view/components/base-card-view.ts index 6ac45fcf820..063b713203b 100644 --- a/lib/core/src/lib/card-view/components/base-card-view.ts +++ b/lib/core/src/lib/card-view/components/base-card-view.ts @@ -15,15 +15,14 @@ * limitations under the License. */ -import { Input, OnDestroy, Directive, inject } from '@angular/core'; +import { Directive, inject, Input } from '@angular/core'; import { CardViewUpdateService } from '../services/card-view-update.service'; import { CardViewItem } from '../interfaces/card-view.interfaces'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive() // eslint-disable-next-line @angular-eslint/directive-class-suffix -export abstract class BaseCardView implements OnDestroy { +export abstract class BaseCardView { protected cardViewUpdateService = inject(CardViewUpdateService); @Input() @@ -32,10 +31,8 @@ export abstract class BaseCardView implements OnDestroy @Input() property: T; - protected destroy$ = new Subject(); - constructor() { - this.cardViewUpdateService.updateItem$.pipe(takeUntil(this.destroy$)).subscribe((itemModel) => { + this.cardViewUpdateService.updateItem$.pipe(takeUntilDestroyed()).subscribe((itemModel) => { if (this.property.key === itemModel.key) { this.property.value = itemModel.value; } @@ -54,8 +51,4 @@ export abstract class BaseCardView implements OnDestroy return !!this.property.icon; } - ngOnDestroy(): void { - this.destroy$.next(true); - this.destroy$.complete(); - } } diff --git a/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.ts b/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.ts index 09e236e1a7f..c522a9a8cc6 100644 --- a/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.ts +++ b/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, Input, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; import { DatetimeAdapter, @@ -26,7 +26,6 @@ import { } from '@mat-datetimepicker/core'; import { CardViewDateItemModel } from '../../models/card-view-dateitem.model'; import { UserPreferencesService, UserPreferenceValues } from '../../../common/services/user-preferences.service'; -import { takeUntil } from 'rxjs/operators'; import { BaseCardView } from '../base-card-view'; import { ClipboardService } from '../../../clipboard/clipboard.service'; import { TranslationService } from '../../../translation/translation.service'; @@ -41,6 +40,7 @@ import { MatChipsModule } from '@angular/material/chips'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ providers: [ @@ -66,7 +66,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-card-view-dateitem' } }) -export class CardViewDateItemComponent extends BaseCardView implements OnInit, OnDestroy { +export class CardViewDateItemComponent extends BaseCardView implements OnInit { @Input() displayEmpty = true; @@ -78,6 +78,8 @@ export class CardViewDateItemComponent extends BaseCardView, private userPreferencesService: UserPreferencesService, @@ -90,7 +92,7 @@ export class CardViewDateItemComponent extends BaseCardView { this.property.locale = locale; }); @@ -104,10 +106,6 @@ export class CardViewDateItemComponent extends BaseCardView> implements OnInit, OnChanges { private appConfig = inject(AppConfigService); - private readonly destroyRef = inject(DestroyRef); static HIDE_FILTER_LIMIT = 5; @Input() options$: Observable[]>; @@ -71,6 +70,8 @@ export class CardViewSelectItemComponent extends BaseCardView(); term = ''; previousSelected: any[]; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(@Inject(MatSelect) private matSelect: MatSelect) {} @@ -51,9 +62,9 @@ export class SelectFilterInputComponent implements OnInit, OnDestroy { } ngOnInit() { - this.change.pipe(takeUntil(this.onDestroy$)).subscribe((val: string) => (this.term = val)); + this.change.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((val: string) => (this.term = val)); - this.matSelect.openedChange.pipe(takeUntil(this.onDestroy$)).subscribe((isOpened: boolean) => { + this.matSelect.openedChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((isOpened: boolean) => { if (isOpened) { this.selectFilterInput.nativeElement.focus(); } else { @@ -63,7 +74,7 @@ export class SelectFilterInputComponent implements OnInit, OnDestroy { if (this.matSelect.ngControl) { this.previousSelected = this.matSelect.ngControl.value; - this.matSelect.ngControl.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((values) => { + this.matSelect.ngControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((values) => { let restoreSelection = false; if (this.matSelect.multiple && Array.isArray(this.previousSelected)) { if (!Array.isArray(values)) { @@ -109,9 +120,4 @@ export class SelectFilterInputComponent implements OnInit, OnDestroy { } } } - - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.ts b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.ts index 467238c0ce7..c79e6ee51b4 100644 --- a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.ts +++ b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.ts @@ -15,7 +15,16 @@ * limitations under the License. */ -import { ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, SimpleChanges, ViewEncapsulation } from '@angular/core'; +import { + ChangeDetectorRef, + Component, + DestroyRef, + inject, + Input, + OnChanges, + SimpleChanges, + ViewEncapsulation +} from '@angular/core'; import { CardViewTextItemModel } from '../../models/card-view-textitem.model'; import { BaseCardView } from '../base-card-view'; import { MatChipInputEvent, MatChipsModule } from '@angular/material/chips'; @@ -23,7 +32,7 @@ import { ClipboardService } from '../../../clipboard/clipboard.service'; import { TranslationService } from '../../../translation/translation.service'; import { CardViewItemValidator } from '../../interfaces/card-view-item-validator.interface'; import { FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms'; -import { debounceTime, takeUntil, filter } from 'rxjs/operators'; +import { debounceTime, filter } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { TranslateModule } from '@ngx-translate/core'; @@ -31,6 +40,7 @@ import { MatInputModule } from '@angular/material/input'; import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export const DEFAULT_SEPARATOR = ', '; const templateTypes = { @@ -61,7 +71,7 @@ const templateTypes = { encapsulation: ViewEncapsulation.None, host: { class: 'adf-card-view-textitem' } }) -export class CardViewTextItemComponent extends BaseCardView implements OnChanges, OnDestroy { +export class CardViewTextItemComponent extends BaseCardView implements OnChanges { @Input() displayEmpty = true; @@ -81,6 +91,8 @@ export class CardViewTextItemComponent extends BaseCardView textInputValue !== this.editedValue && textInputValue !== null), debounceTime(50), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((textInputValue) => { this.editedValue = textInputValue; @@ -222,10 +234,6 @@ export class CardViewTextItemComponent extends BaseCardView { + this.value$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => { this.boolValue = this.transformBoolean(value); }); } diff --git a/lib/core/src/lib/datatable/components/columns-selector/columns-selector.component.ts b/lib/core/src/lib/datatable/components/columns-selector/columns-selector.component.ts index c2b4e91f934..ba8b46261c9 100644 --- a/lib/core/src/lib/datatable/components/columns-selector/columns-selector.component.ts +++ b/lib/core/src/lib/datatable/components/columns-selector/columns-selector.component.ts @@ -15,11 +15,10 @@ * limitations under the License. */ -import { Component, EventEmitter, inject, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { ReactiveFormsModule, UntypedFormControl } from '@angular/forms'; import { MatMenuTrigger } from '@angular/material/menu'; -import { Subject } from 'rxjs'; -import { debounceTime, takeUntil } from 'rxjs/operators'; +import { debounceTime } from 'rxjs/operators'; import { DataColumn } from '../../data/data-column.model'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; @@ -28,6 +27,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatDividerModule } from '@angular/material/divider'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { TranslationService } from '../../../translation'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-datatable-column-selector', @@ -37,7 +37,7 @@ import { TranslationService } from '../../../translation'; styleUrls: ['./columns-selector.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ColumnsSelectorComponent implements OnInit, OnDestroy { +export class ColumnsSelectorComponent implements OnInit { private translationService = inject(TranslationService); @Input() @@ -55,21 +55,22 @@ export class ColumnsSelectorComponent implements OnInit, OnDestroy { @Output() submitColumnsVisibility = new EventEmitter(); - onDestroy$ = new Subject(); columnItems: DataColumn[] = []; searchInputControl = new UntypedFormControl(''); searchQuery = ''; + + private readonly destroyRef = inject(DestroyRef); ngOnInit(): void { - this.mainMenuTrigger.menuOpened.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.mainMenuTrigger.menuOpened.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.updateColumnItems(); }); - this.mainMenuTrigger.menuClosed.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.mainMenuTrigger.menuClosed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { this.searchInputControl.setValue(''); }); - this.searchInputControl.valueChanges.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((searchQuery) => { + this.searchInputControl.valueChanges.pipe(debounceTime(300), takeUntilDestroyed(this.destroyRef)).subscribe((searchQuery) => { this.searchQuery = searchQuery; this.updateColumnItems(); }); @@ -81,12 +82,6 @@ export class ColumnsSelectorComponent implements OnInit, OnDestroy { columns = this.sortColumns(columns); this.columnItems = columns; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - closeMenu(): void { this.mainMenuTrigger.closeMenu(); } diff --git a/lib/core/src/lib/datatable/components/datatable-cell/datatable-cell.component.ts b/lib/core/src/lib/datatable/components/datatable-cell/datatable-cell.component.ts index f31ad460ee3..88d54426b5d 100644 --- a/lib/core/src/lib/datatable/components/datatable-cell/datatable-cell.component.ts +++ b/lib/core/src/lib/datatable/components/datatable-cell/datatable-cell.component.ts @@ -15,15 +15,23 @@ * limitations under the License. */ -import { ChangeDetectionStrategy, Component, Input, OnInit, ViewEncapsulation, OnDestroy, inject } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + DestroyRef, + inject, + Input, + OnInit, + ViewEncapsulation +} from '@angular/core'; import { DataColumn } from '../../data/data-column.model'; import { DataRow } from '../../data/data-row.model'; import { DataTableAdapter } from '../../data/datatable-adapter'; -import { BehaviorSubject, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { BehaviorSubject } from 'rxjs'; import { DataTableService } from '../../services/datatable.service'; import { CommonModule } from '@angular/common'; import { ClipboardDirective } from '../../../clipboard/clipboard.directive'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-datatable-cell', @@ -49,7 +57,7 @@ import { ClipboardDirective } from '../../../clipboard/clipboard.directive'; encapsulation: ViewEncapsulation.None, host: { class: 'adf-datatable-content-cell' } }) -export class DataTableCellComponent implements OnInit, OnDestroy { +export class DataTableCellComponent implements OnInit { /** Data table adapter instance. */ @Input() data: DataTableAdapter; @@ -74,7 +82,7 @@ export class DataTableCellComponent implements OnInit, OnDestroy { @Input() resolverFn: (row: DataRow, col: DataColumn) => any = null; - protected onDestroy$ = new Subject(); + protected destroyRef = inject(DestroyRef); protected dataTableService = inject(DataTableService, { optional: true }); value$ = new BehaviorSubject(''); @@ -100,7 +108,7 @@ export class DataTableCellComponent implements OnInit, OnDestroy { return; } - this.dataTableService.rowUpdate.pipe(takeUntil(this.onDestroy$)).subscribe((data) => { + this.dataTableService.rowUpdate.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((data) => { if (data?.id === this.row?.id && data.obj) { this.row.obj = data.obj; this.row['cache'][this.column.key] = this.getNestedPropertyValue(data.obj, this.column.key); @@ -113,9 +121,4 @@ export class DataTableCellComponent implements OnInit, OnDestroy { private getNestedPropertyValue(obj: any, path: string) { return path.split('.').reduce((source, key) => (source ? source[key] : ''), obj); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts index 66ddc4a9733..7967780f8c2 100644 --- a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts +++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts @@ -22,10 +22,12 @@ import { AfterViewInit, Component, ContentChild, + DestroyRef, DoCheck, ElementRef, EventEmitter, HostListener, + inject, Input, IterableDiffers, OnChanges, @@ -79,6 +81,7 @@ import { BooleanCellComponent } from '../boolean-cell/boolean-cell.component'; import { JsonCellComponent } from '../json-cell/json-cell.component'; import { AmountCellComponent } from '../amount-cell/amount-cell.component'; import { NumberCellComponent } from '../number-cell/number-cell.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; // eslint-disable-next-line no-shadow export enum ShowHeaderMode { @@ -325,10 +328,10 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges, private differ: any; private rowMenuCache: any = {}; - private subscriptions: Subscription[] = []; private singleClickStreamSub: Subscription; private multiClickStreamSub: Subscription; - private dataRowsChanged: Subscription; + + private readonly destroyRef = inject(DestroyRef); @HostListener('keyup', ['$event']) onKeydown(event: KeyboardEvent): void { @@ -349,11 +352,9 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges, ngAfterContentInit() { if (this.columnList) { - this.subscriptions.push( - this.columnList.columns.changes.subscribe(() => { - this.setTableSchema(); - }) - ); + this.columnList.columns.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { + this.setTableSchema(); + }); } this.setTableSchema(); } @@ -713,7 +714,7 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges, this.isSelectAllIndeterminate = false; if (this.multiselect) { - const selectableRows = this.data.getRows().filter(row => row?.isSelectable); + const selectableRows = this.data.getRows().filter((row) => row?.isSelectable); if (selectableRows && selectableRows.length > 0) { for (let i = 0; i < selectableRows.length; i++) { this.selectRow(selectableRows[i], matCheckboxChange.checked); @@ -954,14 +955,6 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges, ngOnDestroy() { this.unsubscribeClickStream(); - - this.subscriptions.forEach((s) => s.unsubscribe()); - this.subscriptions = []; - - if (this.dataRowsChanged) { - this.dataRowsChanged.unsubscribe(); - this.dataRowsChanged = null; - } } getNameColumnValue() { diff --git a/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.ts b/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.ts index aa21ee3237b..77aae77cec1 100644 --- a/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.ts +++ b/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.ts @@ -19,7 +19,7 @@ import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewEncapsulation } from '@angular/core'; import { MatIconModule } from '@angular/material/icon'; import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ standalone: true, @@ -43,7 +43,7 @@ export class IconCellComponent extends DataTableCellComponent implements OnInit ngOnInit(): void { super.ngOnInit(); - this.value$.pipe(takeUntil(this.onDestroy$)).subscribe((value) => { + this.value$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => { const newIcon = this.validateIconValue(value) ? value : ''; if (this.icon !== newIcon) { this.icon = newIcon; diff --git a/lib/core/src/lib/datatable/directives/resizable/resizable.directive.spec.ts b/lib/core/src/lib/datatable/directives/resizable/resizable.directive.spec.ts index db114314dac..9188eef6e78 100644 --- a/lib/core/src/lib/datatable/directives/resizable/resizable.directive.spec.ts +++ b/lib/core/src/lib/datatable/directives/resizable/resizable.directive.spec.ts @@ -16,7 +16,7 @@ */ import { TestBed } from '@angular/core/testing'; -import { ElementRef, NgZone, Renderer2 } from '@angular/core'; +import { ElementRef, Injector, NgZone, Renderer2, runInInjectionContext } from '@angular/core'; import { ResizableDirective } from './resizable.directive'; describe('ResizableDirective', () => { @@ -64,9 +64,12 @@ describe('ResizableDirective', () => { element = TestBed.inject(ElementRef); renderer = TestBed.inject(Renderer2); ngZone = TestBed.inject(NgZone); + const injector = TestBed.inject(Injector); spyOn(ngZone, 'runOutsideAngular').and.callFake((fn) => fn()); spyOn(ngZone, 'run').and.callFake((fn) => fn()); - directive = new ResizableDirective(renderer, element, ngZone); + runInInjectionContext(injector, () => { + directive = new ResizableDirective(renderer, element, ngZone); + }); directive.ngOnInit(); }); diff --git a/lib/core/src/lib/datatable/directives/resizable/resizable.directive.ts b/lib/core/src/lib/datatable/directives/resizable/resizable.directive.ts index adcfcc217eb..373fb298ea5 100644 --- a/lib/core/src/lib/datatable/directives/resizable/resizable.directive.ts +++ b/lib/core/src/lib/datatable/directives/resizable/resizable.directive.ts @@ -15,10 +15,11 @@ * limitations under the License. */ -import { Subject, Observable, Observer, merge } from 'rxjs'; -import { BoundingRectangle, ResizeEvent, IResizeMouseEvent, ICoordinateX } from './types'; -import { map, take, share, filter, pairwise, mergeMap, takeUntil } from 'rxjs/operators'; -import { OnInit, Output, NgZone, OnDestroy, Directive, Renderer2, ElementRef, EventEmitter, Input } from '@angular/core'; +import { merge, Observable, Observer, Subject } from 'rxjs'; +import { BoundingRectangle, ICoordinateX, IResizeMouseEvent, ResizeEvent } from './types'; +import { filter, map, mergeMap, pairwise, share, take, takeUntil } from 'rxjs/operators'; +import { DestroyRef, Directive, ElementRef, EventEmitter, inject, Input, NgZone, OnDestroy, OnInit, Output, Renderer2 } from '@angular/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ selector: '[adf-resizable]', @@ -64,7 +65,7 @@ export class ResizableDirective implements OnInit, OnDestroy { private unsubscribeMouseMove?: () => void; private unsubscribeMouseUp?: () => void; - private destroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private readonly renderer: Renderer2, private readonly element: ElementRef, private readonly zone: NgZone) { this.pointerDown = new Observable((observer: Observer) => { @@ -133,7 +134,7 @@ export class ResizableDirective implements OnInit, OnDestroy { .pipe( map(({ resize = false }) => resize), filter((resize) => resize), - takeUntil(this.destroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { const startingRect: BoundingRectangle = this.getElementRect(this.element); @@ -151,7 +152,7 @@ export class ResizableDirective implements OnInit, OnDestroy { } }); - mouseup$.pipe(takeUntil(this.destroy$)).subscribe(() => { + mouseup$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { if (this.currentRect) { this.renderer.setStyle(document.body, 'cursor', ''); if (this.resizeEnd.observers.length > 0) { @@ -172,7 +173,6 @@ export class ResizableDirective implements OnInit, OnDestroy { this.unsubscribeMouseDown?.(); this.unsubscribeMouseMove?.(); this.unsubscribeMouseUp?.(); - this.destroy$.next(); } private getNewBoundingRectangle({ top, bottom, left, right }: BoundingRectangle, clientX: number): BoundingRectangle { diff --git a/lib/core/src/lib/datatable/directives/resizable/resize-handle.directive.ts b/lib/core/src/lib/datatable/directives/resizable/resize-handle.directive.ts index 01bbbdee459..de3308b4435 100644 --- a/lib/core/src/lib/datatable/directives/resizable/resize-handle.directive.ts +++ b/lib/core/src/lib/datatable/directives/resizable/resize-handle.directive.ts @@ -15,9 +15,8 @@ * limitations under the License. */ -import { Subject } from 'rxjs'; import { ResizableDirective } from './resizable.directive'; -import { Input, OnInit, Directive, Renderer2, ElementRef, OnDestroy, NgZone } from '@angular/core'; +import { Directive, ElementRef, Input, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core'; @Directive({ selector: '[adf-resize-handle]', @@ -32,9 +31,6 @@ export class ResizeHandleDirective implements OnInit, OnDestroy { private unlistenMouseDown?: () => void; private unlistenMouseMove?: () => void; private unlistenMouseUp?: () => void; - - private destroy$ = new Subject(); - constructor(private readonly renderer: Renderer2, private readonly element: ElementRef, private readonly zone: NgZone) {} ngOnInit(): void { @@ -49,7 +45,6 @@ export class ResizeHandleDirective implements OnInit, OnDestroy { this.unlistenMouseDown?.(); this.unlistenMouseMove?.(); this.unlistenMouseUp?.(); - this.destroy$.next(); } private onMousedown(event: MouseEvent): void { diff --git a/lib/core/src/lib/dialogs/dialog/dialog.component.ts b/lib/core/src/lib/dialogs/dialog/dialog.component.ts index 11d9c62b4a8..888c03c69de 100644 --- a/lib/core/src/lib/dialogs/dialog/dialog.component.ts +++ b/lib/core/src/lib/dialogs/dialog/dialog.component.ts @@ -15,16 +15,16 @@ * limitations under the License. */ -import { Component, Inject, InjectionToken, Injector, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { Component, Inject, InjectionToken, Injector, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { AdditionalDialogActionButton, DialogData } from './dialog-data.interface'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { DialogSize, DialogSizes } from './dialog.model'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; -import { takeUntil } from 'rxjs/operators'; import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export const DIALOG_COMPONENT_DATA = new InjectionToken('dialog component data'); @@ -36,7 +36,7 @@ export const DIALOG_COMPONENT_DATA = new InjectionToken('dialog component d imports: [CommonModule, TranslateModule, MatIconModule, MatDialogModule, MatButtonModule], encapsulation: ViewEncapsulation.None }) -export class DialogComponent implements OnDestroy { +export class DialogComponent { isConfirmButtonDisabled$ = new BehaviorSubject(false); isCloseButtonHidden: boolean; isCancelButtonHidden: boolean; @@ -48,8 +48,6 @@ export class DialogComponent implements OnDestroy { dataInjector: Injector; - private onDestroy$ = new Subject(); - constructor( @Inject(MAT_DIALOG_DATA) public data: DialogData, @@ -68,11 +66,11 @@ export class DialogComponent implements OnDestroy { }); if (data.isConfirmButtonDisabled$) { - data.isConfirmButtonDisabled$.pipe(takeUntil(this.onDestroy$)).subscribe((value) => this.isConfirmButtonDisabled$.next(value)); + data.isConfirmButtonDisabled$.pipe(takeUntilDestroyed()).subscribe((value) => this.isConfirmButtonDisabled$.next(value)); } if (data.dataOnConfirm$) { - data.dataOnConfirm$.pipe(takeUntil(this.onDestroy$)).subscribe((value) => (this.dataOnConfirm = value)); + data.dataOnConfirm$.pipe(takeUntilDestroyed()).subscribe((value) => (this.dataOnConfirm = value)); } } } @@ -81,9 +79,4 @@ export class DialogComponent implements OnDestroy { this.isConfirmButtonDisabled$.next(true); this.dialogRef.close(this.dataOnConfirm || true); } - - ngOnDestroy() { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/directives/infinite-select-scroll.directive.ts b/lib/core/src/lib/directives/infinite-select-scroll.directive.ts index b4b3b84b916..77be13fd4ce 100644 --- a/lib/core/src/lib/directives/infinite-select-scroll.directive.ts +++ b/lib/core/src/lib/directives/infinite-select-scroll.directive.ts @@ -15,10 +15,9 @@ * limitations under the License. */ -import { Inject, AfterViewInit, Directive, EventEmitter, OnDestroy, Output } from '@angular/core'; +import { AfterViewInit, DestroyRef, Directive, EventEmitter, inject, Inject, Output } from '@angular/core'; import { MatSelect } from '@angular/material/select'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const SELECT_ITEM_HEIGHT_EM = 3; @@ -26,19 +25,19 @@ const SELECT_ITEM_HEIGHT_EM = 3; selector: '[adf-infinite-select-scroll]', standalone: true }) -export class InfiniteSelectScrollDirective implements AfterViewInit, OnDestroy { +export class InfiniteSelectScrollDirective implements AfterViewInit { static readonly MAX_ITEMS = 50; /** Emitted when scroll reaches the last item. */ @Output() scrollEnd = new EventEmitter(); - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); private itemHeightToWaitBeforeLoadNext = 0; constructor(@Inject(MatSelect) private matSelect: MatSelect) {} ngAfterViewInit() { - this.matSelect.openedChange.pipe(takeUntil(this.onDestroy$)).subscribe((opened: boolean) => { + this.matSelect.openedChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((opened: boolean) => { if (opened) { this.itemHeightToWaitBeforeLoadNext = this.getItemHeight() * (InfiniteSelectScrollDirective.MAX_ITEMS / 2); this.matSelect.panel.nativeElement.addEventListener('scroll', (event: Event) => this.handleScrollEvent(event)); @@ -46,11 +45,6 @@ export class InfiniteSelectScrollDirective implements AfterViewInit, OnDestroy { }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - private handleScrollEvent(event: Event) { if (this.isScrollInNextFetchArea(event)) { this.scrollEnd.emit(event); diff --git a/lib/core/src/lib/dynamic-chip-list/dynamic-chip-list.component.ts b/lib/core/src/lib/dynamic-chip-list/dynamic-chip-list.component.ts index 57b830d1a09..bb60bf47645 100644 --- a/lib/core/src/lib/dynamic-chip-list/dynamic-chip-list.component.ts +++ b/lib/core/src/lib/dynamic-chip-list/dynamic-chip-list.component.ts @@ -38,7 +38,6 @@ import { MatButtonModule } from '@angular/material/button'; import { MatChip, MatChipsModule } from '@angular/material/chips'; import { MatIconModule } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; -import { Subject } from 'rxjs'; import { Chip } from './chip'; /** @@ -98,7 +97,6 @@ export class DynamicChipListComponent implements OnChanges, OnInit, AfterViewIni paginationData: Pagination; private initialChips: Chip[] = []; - private onDestroy$ = new Subject(); private initialLimitChipsDisplayed: boolean; private viewMoreButtonLeftOffsetBeforeFlexDirection: number; private requestedDisplayingAllChips = false; @@ -139,8 +137,6 @@ export class DynamicChipListComponent implements OnChanges, OnInit, AfterViewIni } ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); this.resizeObserver.unobserve(this.containerView.nativeElement); } diff --git a/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts b/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts index a76849b45e4..c33e16f3d59 100644 --- a/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts +++ b/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts @@ -18,20 +18,25 @@ /* eslint-disable @angular-eslint/component-selector */ import { NgIf } from '@angular/common'; -import { Component, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl, ReactiveFormsModule, ValidationErrors, Validators } from '@angular/forms'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepickerModule } from '@mat-datetimepicker/core'; import { TranslateModule } from '@ngx-translate/core'; -import { ADF_DATE_FORMATS, ADF_DATETIME_FORMATS, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, DateFnsUtils } from '../../../../common'; +import { + ADF_DATE_FORMATS, + ADF_DATETIME_FORMATS, + AdfDateFnsAdapter, + AdfDateTimeFnsAdapter, + DateFnsUtils +} from '../../../../common'; import { FormService } from '../../../services/form.service'; import { ErrorWidgetComponent } from '../error/error.component'; import { WidgetComponent } from '../widget.component'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { ErrorMessageModel } from '../core/error-message.model'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'date-time-widget', @@ -47,14 +52,15 @@ import { ErrorMessageModel } from '../core/error-message.model'; imports: [NgIf, TranslateModule, MatFormFieldModule, MatInputModule, MatDatetimepickerModule, ReactiveFormsModule, ErrorWidgetComponent], encapsulation: ViewEncapsulation.None }) -export class DateTimeWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { +export class DateTimeWidgetComponent extends WidgetComponent implements OnInit { minDate: Date; maxDate: Date; datetimeInputControl: FormControl = new FormControl(null); - private onDestroy$ = new Subject(); public readonly formService = inject(FormService); + + private readonly destroyRef = inject(DestroyRef); private readonly dateAdapter = inject(DateAdapter); private readonly dateTimeAdapter = inject(DatetimeAdapter); @@ -82,7 +88,7 @@ export class DateTimeWidgetComponent extends WidgetComponent implements OnInit, } private subscribeToDateChanges(): void { - this.datetimeInputControl.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((newDate: Date) => { + this.datetimeInputControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newDate: Date) => { this.field.value = newDate; this.updateField(); }); @@ -151,9 +157,4 @@ export class DateTimeWidgetComponent extends WidgetComponent implements OnInit, this.maxDate = DateFnsUtils.getDate(this.field.maxValue); } } - - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/form/components/widgets/date/date.widget.ts b/lib/core/src/lib/form/components/widgets/date/date.widget.ts index 918d44b2d23..52b972586d9 100644 --- a/lib/core/src/lib/form/components/widgets/date/date.widget.ts +++ b/lib/core/src/lib/form/components/widgets/date/date.widget.ts @@ -18,21 +18,20 @@ /* eslint-disable @angular-eslint/component-selector */ import { NgIf } from '@angular/common'; -import { Component, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl, ReactiveFormsModule, ValidationErrors, Validators } from '@angular/forms'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { TranslateModule } from '@ngx-translate/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { ADF_DATE_FORMATS, AdfDateFnsAdapter, DateFnsUtils, DEFAULT_DATE_FORMAT } from '../../../../common'; import { FormService } from '../../../services/form.service'; import { ErrorWidgetComponent } from '../error/error.component'; import { WidgetComponent } from '../widget.component'; import { ErrorMessageModel } from '../core/error-message.model'; import { parseISO } from 'date-fns'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'date-widget', @@ -56,17 +55,17 @@ import { parseISO } from 'date-fns'; imports: [MatFormFieldModule, TranslateModule, MatInputModule, MatDatepickerModule, ReactiveFormsModule, ErrorWidgetComponent, NgIf], encapsulation: ViewEncapsulation.None }) -export class DateWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { +export class DateWidgetComponent extends WidgetComponent implements OnInit { minDate: Date; maxDate: Date; startAt: Date; dateInputControl: FormControl = new FormControl(null); - private onDestroy$ = new Subject(); - public readonly formService = inject(FormService); + private readonly dateAdapter = inject(DateAdapter); + private readonly destroyRef = inject(DestroyRef); ngOnInit(): void { this.patchFormControl(); @@ -92,7 +91,7 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit, OnDe } private subscribeToDateChanges(): void { - this.dateInputControl.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((newDate: Date) => { + this.dateInputControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newDate: Date) => { this.field.value = newDate; this.updateField(); }); @@ -164,9 +163,4 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit, OnDe this.startAt = this.dateAdapter.parse(this.field.value, DEFAULT_DATE_FORMAT); } } - - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/identity-user-info/identity-user-info.component.ts b/lib/core/src/lib/identity-user-info/identity-user-info.component.ts index ecb1218dcd5..2fdcb231bc6 100644 --- a/lib/core/src/lib/identity-user-info/identity-user-info.component.ts +++ b/lib/core/src/lib/identity-user-info/identity-user-info.component.ts @@ -15,10 +15,9 @@ * limitations under the License. */ -import { Component, Input, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, Input, ViewChild, ViewEncapsulation } from '@angular/core'; import { MatMenuModule, MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu'; import { IdentityUserModel } from '../auth/models/identity-user.model'; -import { Subject } from 'rxjs'; import { CommonModule } from '@angular/common'; import { FullNamePipe, InitialUsernamePipe } from '../pipes'; import { MatButtonModule } from '@angular/material/button'; @@ -33,7 +32,7 @@ import { TranslateModule } from '@ngx-translate/core'; styleUrls: ['./identity-user-info.component.scss'], encapsulation: ViewEncapsulation.None }) -export class IdentityUserInfoComponent implements OnDestroy { +export class IdentityUserInfoComponent { @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger; /** Is the user logged in */ @@ -67,13 +66,6 @@ export class IdentityUserInfoComponent implements OnDestroy { @Input() namePosition: 'right' | 'left' = 'right'; - private destroy$ = new Subject(); - - ngOnDestroy(): void { - this.destroy$.next(true); - this.destroy$.complete(); - } - onKeyPress(event: KeyboardEvent) { this.closeUserModal(event); } diff --git a/lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts b/lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts index c57637119e0..2f84c745646 100644 --- a/lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts +++ b/lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts @@ -16,29 +16,31 @@ */ import { + AfterViewInit, + ChangeDetectorRef, Component, ContentChild, + DestroyRef, + EventEmitter, + inject, Input, - Output, - OnInit, - AfterViewInit, - ViewChild, OnDestroy, + OnInit, + Output, TemplateRef, - EventEmitter, - ViewEncapsulation, - ChangeDetectorRef + ViewChild, + ViewEncapsulation } from '@angular/core'; import { MediaMatcher } from '@angular/cdk/layout'; import { UserPreferencesService } from '../../../common/services/user-preferences.service'; import { SidenavLayoutContentDirective } from '../../directives/sidenav-layout-content.directive'; import { SidenavLayoutHeaderDirective } from '../../directives/sidenav-layout-header.directive'; import { SidenavLayoutNavigationDirective } from '../../directives/sidenav-layout-navigation.directive'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { Direction } from '@angular/cdk/bidi'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { LayoutContainerComponent } from '../layout-container/layout-container.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-sidenav-layout', @@ -99,7 +101,7 @@ export class SidenavLayoutComponent implements OnInit, AfterViewInit, OnDestroy isMenuMinimized: () => this.isMenuMinimized }; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private readonly mediaMatcher: MediaMatcher, @@ -120,7 +122,7 @@ export class SidenavLayoutComponent implements OnInit, AfterViewInit, OnDestroy this.userPreferencesService .select('textOrientation') - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((direction: Direction) => { this.dir = direction; }); @@ -132,8 +134,6 @@ export class SidenavLayoutComponent implements OnInit, AfterViewInit, OnDestroy ngOnDestroy(): void { this.mediaQueryList.removeListener(this.onMediaQueryChange); - this.onDestroy$.next(true); - this.onDestroy$.complete(); } toggleMenu() { diff --git a/lib/core/src/lib/login/components/login/login.component.ts b/lib/core/src/lib/login/components/login/login.component.ts index 5e05209be0a..abc844f002b 100644 --- a/lib/core/src/lib/login/components/login/login.component.ts +++ b/lib/core/src/lib/login/components/login/login.component.ts @@ -16,7 +16,7 @@ */ import { CommonModule } from '@angular/common'; -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, TemplateRef, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, TemplateRef, ViewEncapsulation } from '@angular/core'; import { AbstractControl, ReactiveFormsModule, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; @@ -27,8 +27,6 @@ import { MatInputModule } from '@angular/material/input'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { ActivatedRoute, Params, Router } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { AppConfigService, AppConfigValues } from '../../../app-config'; import { AuthenticationService, BasicAlfrescoAuthService } from '../../../auth'; import { OidcAuthenticationService } from '../../../auth/oidc/oidc-authentication.service'; @@ -38,6 +36,7 @@ import { TranslationService } from '../../../translation'; import { LoginErrorEvent } from '../../models/login-error.event'; import { LoginSubmitEvent } from '../../models/login-submit.event'; import { LoginSuccessEvent } from '../../models/login-success.event'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; // eslint-disable-next-line no-shadow enum LoginSteps { @@ -76,7 +75,7 @@ interface LoginFormValues { ], host: { class: 'adf-login' } }) -export class LoginComponent implements OnInit, OnDestroy { +export class LoginComponent implements OnInit { isPasswordShow: boolean = false; /** @@ -146,7 +145,8 @@ export class LoginComponent implements OnInit, OnDestroy { data: any; private _message: { [id: string]: { [id: string]: ValidationMessage } }; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor( private _fb: UntypedFormBuilder, @@ -191,12 +191,7 @@ export class LoginComponent implements OnInit, OnDestroy { this.form = this._fb.group(this.fieldsValidation); } - this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((data) => this.onValueChanged(data)); - } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); + this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((data) => this.onValueChanged(data)); } submit() { diff --git a/lib/core/src/lib/notifications/components/notification-history.component.ts b/lib/core/src/lib/notifications/components/notification-history.component.ts index 24483a1cc50..8e0dc1fa0dc 100644 --- a/lib/core/src/lib/notifications/components/notification-history.component.ts +++ b/lib/core/src/lib/notifications/components/notification-history.component.ts @@ -15,12 +15,20 @@ * limitations under the License. */ -import { AfterViewInit, ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { + AfterViewInit, + ChangeDetectorRef, + Component, + DestroyRef, + inject, + Input, + OnInit, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import { NotificationService } from '../services/notification.service'; import { NOTIFICATION_TYPE, NotificationModel } from '../models/notification.model'; import { MatMenuModule, MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; import { StorageService } from '../../common/services/storage.service'; import { PaginationModel } from '../../models/pagination.model'; import { MatButtonModule } from '@angular/material/button'; @@ -31,6 +39,7 @@ import { MatListModule } from '@angular/material/list'; import { NgForOf, NgIf } from '@angular/common'; import { InitialUsernamePipe, TimeAgoPipe } from '../../pipes'; import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-notification-history', @@ -52,7 +61,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar'; ], encapsulation: ViewEncapsulation.None }) -export class NotificationHistoryComponent implements OnDestroy, OnInit, AfterViewInit { +export class NotificationHistoryComponent implements OnInit, AfterViewInit { public static MAX_NOTIFICATION_STACK_LENGTH = 100; public static NOTIFICATION_STORAGE = 'notification-history'; @@ -71,11 +80,12 @@ export class NotificationHistoryComponent implements OnDestroy, OnInit, AfterVie @Input() maxNotifications: number = 5; - onDestroy$ = new Subject(); notifications: NotificationModel[] = []; paginatedNotifications: NotificationModel[] = []; pagination: PaginationModel; + private readonly destroyRef = inject(DestroyRef); + constructor(private notificationService: NotificationService, public storageService: StorageService, public cd: ChangeDetectorRef) {} ngOnInit() { @@ -83,17 +93,12 @@ export class NotificationHistoryComponent implements OnDestroy, OnInit, AfterVie } ngAfterViewInit(): void { - this.notificationService.notifications$.pipe(takeUntil(this.onDestroy$)).subscribe((notification: NotificationModel) => { + this.notificationService.notifications$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((notification: NotificationModel) => { this.addNewNotification(notification); this.cd.detectChanges(); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - addNewNotification(notification: NotificationModel) { this.notifications.unshift(notification); diff --git a/lib/core/src/lib/pagination/infinite-pagination.component.ts b/lib/core/src/lib/pagination/infinite-pagination.component.ts index 67d50aba675..5915b9f926c 100644 --- a/lib/core/src/lib/pagination/infinite-pagination.component.ts +++ b/lib/core/src/lib/pagination/infinite-pagination.component.ts @@ -22,25 +22,25 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, + DestroyRef, EventEmitter, + inject, Input, OnInit, Output, - OnDestroy, ViewEncapsulation } from '@angular/core'; import { PaginatedComponent } from './paginated-component.interface'; -import { Subject } from 'rxjs'; import { PaginationComponentInterface } from './pagination-component.interface'; import { RequestPaginationModel } from '../models/request-pagination.model'; import { UserPreferencesService, UserPreferenceValues } from '../common/services/user-preferences.service'; import { PaginationModel } from '../models/pagination.model'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-infinite-pagination', @@ -52,7 +52,7 @@ import { TranslateModule } from '@ngx-translate/core'; standalone: true, imports: [CommonModule, MatButtonModule, MatProgressBarModule, TranslateModule] }) -export class InfinitePaginationComponent implements OnInit, OnDestroy, PaginationComponentInterface { +export class InfinitePaginationComponent implements OnInit, PaginationComponentInterface { static DEFAULT_PAGINATION: PaginationModel = new PaginationModel({ skipCount: 0, maxItems: 25, @@ -60,14 +60,13 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio }); _target: PaginatedComponent; - private onDestroy$ = new Subject(); /** Component that provides custom pagination support. */ @Input() set target(target: PaginatedComponent) { if (target) { this._target = target; - target.pagination.pipe(takeUntil(this.onDestroy$)).subscribe((pagination) => { + target.pagination.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((pagination) => { this.isLoading = false; this.pagination = pagination; @@ -103,12 +102,14 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio merge: true }; + private readonly destroyRef = inject(DestroyRef); + constructor(private cdr: ChangeDetectorRef, private userPreferencesService: UserPreferencesService) {} ngOnInit() { this.userPreferencesService .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((pageSize: number) => { this.pageSize = this.pageSize || pageSize; this.requestPaginationModel.maxItems = this.pageSize; @@ -137,9 +138,4 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio this._target.updatePagination(this.pagination); } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/pagination/pagination.component.ts b/lib/core/src/lib/pagination/pagination.component.ts index 9d1e238ed03..91943f1c9d6 100644 --- a/lib/core/src/lib/pagination/pagination.component.ts +++ b/lib/core/src/lib/pagination/pagination.component.ts @@ -16,29 +16,29 @@ */ import { + ChangeDetectionStrategy, + ChangeDetectorRef, Component, + DestroyRef, + ElementRef, EventEmitter, + inject, Input, OnInit, Output, - ViewEncapsulation, - OnDestroy, - ElementRef, - ChangeDetectionStrategy, - ChangeDetectorRef, - Renderer2 + Renderer2, + ViewEncapsulation } from '@angular/core'; import { PaginatedComponent } from './paginated-component.interface'; import { PaginationComponentInterface } from './pagination-component.interface'; -import { Subject } from 'rxjs'; import { PaginationModel } from '../models/pagination.model'; import { UserPreferencesService, UserPreferenceValues } from '../common/services/user-preferences.service'; -import { takeUntil } from 'rxjs/operators'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export type PaginationAction = 'NEXT_PAGE' | 'PREV_PAGE' | 'CHANGE_PAGE_SIZE' | 'CHANGE_PAGE_NUMBER'; @@ -60,7 +60,7 @@ export const DEFAULT_PAGINATION: PaginationModel = { standalone: true, imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatMenuModule] }) -export class PaginationComponent implements OnInit, OnDestroy, PaginationComponentInterface { +export class PaginationComponent implements OnInit, PaginationComponentInterface { private _pagination: PaginationModel; private _isEmpty = true; private _hasItems = false; @@ -117,7 +117,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone @Output() prevPage = new EventEmitter(); - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private elementRef: ElementRef, @@ -130,7 +130,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone ngOnInit() { this.userPreferencesService .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((maxItems) => { this.pagination = { ...DEFAULT_PAGINATION, @@ -144,7 +144,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone } if (this.target) { - this.target.pagination.pipe(takeUntil(this.onDestroy$)).subscribe((pagination) => { + this.target.pagination.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((pagination) => { if (pagination.count === 0 && !this.isFirstPage) { this.goPrevious(); } @@ -303,12 +303,6 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone this.userPreferencesService.paginationSize = maxItems; this.handlePaginationEvent('CHANGE_PAGE_SIZE'); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - handlePaginationEvent(action: PaginationAction) { const paginationModel = { ...this.pagination }; diff --git a/lib/core/src/lib/pipes/decimal-number.pipe.spec.ts b/lib/core/src/lib/pipes/decimal-number.pipe.spec.ts index f87610ce5ef..edd447a0565 100644 --- a/lib/core/src/lib/pipes/decimal-number.pipe.spec.ts +++ b/lib/core/src/lib/pipes/decimal-number.pipe.spec.ts @@ -16,11 +16,12 @@ */ import { TestBed } from '@angular/core/testing'; -import { AppConfigService } from '../app-config/app-config.service'; import { UserPreferencesService } from '../common/services/user-preferences.service'; import { of } from 'rxjs'; import { CoreTestingModule } from '../testing/core.testing.module'; import { DecimalNumberPipe } from './decimal-number.pipe'; +import { Injector, runInInjectionContext } from '@angular/core'; +import { AppConfigService } from '@alfresco/adf-core'; describe('DecimalNumberPipe', () => { let pipe: DecimalNumberPipe; @@ -31,8 +32,11 @@ describe('DecimalNumberPipe', () => { imports: [CoreTestingModule] }); userPreferences = TestBed.inject(UserPreferencesService); + const injector = TestBed.inject(Injector); spyOn(userPreferences, 'select').and.returnValue(of('')); - pipe = new DecimalNumberPipe(userPreferences, TestBed.inject(AppConfigService)); + runInInjectionContext(injector, () => { + pipe = new DecimalNumberPipe(userPreferences, TestBed.inject(AppConfigService)); + }); }); it('should return number localized and rounded following the default config', () => { diff --git a/lib/core/src/lib/pipes/decimal-number.pipe.ts b/lib/core/src/lib/pipes/decimal-number.pipe.ts index 2e823ceb144..809086f049f 100644 --- a/lib/core/src/lib/pipes/decimal-number.pipe.ts +++ b/lib/core/src/lib/pipes/decimal-number.pipe.ts @@ -16,19 +16,18 @@ */ import { DecimalPipe } from '@angular/common'; -import { Pipe, PipeTransform, OnDestroy } from '@angular/core'; +import { Pipe, PipeTransform } from '@angular/core'; import { AppConfigService } from '../app-config/app-config.service'; import { UserPreferencesService, UserPreferenceValues } from '../common/services/user-preferences.service'; import { DecimalNumberModel } from '../models/decimal-number.model'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Pipe({ name: 'adfDecimalNumber', pure: false, standalone: true }) -export class DecimalNumberPipe implements PipeTransform, OnDestroy { +export class DecimalNumberPipe implements PipeTransform { static DEFAULT_LOCALE = 'en-US'; static DEFAULT_MIN_INTEGER_DIGITS = 1; static DEFAULT_MIN_FRACTION_DIGITS = 0; @@ -38,14 +37,11 @@ export class DecimalNumberPipe implements PipeTransform, OnDestroy { defaultMinIntegerDigits: number = DecimalNumberPipe.DEFAULT_MIN_INTEGER_DIGITS; defaultMinFractionDigits: number = DecimalNumberPipe.DEFAULT_MIN_FRACTION_DIGITS; defaultMaxFractionDigits: number = DecimalNumberPipe.DEFAULT_MAX_FRACTION_DIGITS; - - onDestroy$: Subject = new Subject(); - constructor(public userPreferenceService?: UserPreferencesService, public appConfig?: AppConfigService) { if (this.userPreferenceService) { this.userPreferenceService .select(UserPreferenceValues.Locale) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed()) .subscribe((locale) => { if (locale) { this.defaultLocale = locale; @@ -82,9 +78,4 @@ export class DecimalNumberPipe implements PipeTransform, OnDestroy { return decimalPipe.transform(value, actualDigitsInfo); } } - - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/pipes/localized-date.pipe.ts b/lib/core/src/lib/pipes/localized-date.pipe.ts index 0592125fe2d..0364941dbda 100644 --- a/lib/core/src/lib/pipes/localized-date.pipe.ts +++ b/lib/core/src/lib/pipes/localized-date.pipe.ts @@ -28,7 +28,6 @@ import { takeUntil } from 'rxjs/operators'; pure: false }) export class LocalizedDatePipe implements PipeTransform, OnDestroy { - static DEFAULT_LOCALE = 'en-US'; static DEFAULT_DATE_FORMAT = 'mediumDate'; @@ -37,14 +36,12 @@ export class LocalizedDatePipe implements PipeTransform, OnDestroy { private onDestroy$ = new Subject(); - constructor(public userPreferenceService?: UserPreferencesService, - public appConfig?: AppConfigService) { - + constructor(public userPreferenceService?: UserPreferencesService, public appConfig?: AppConfigService) { if (this.userPreferenceService) { this.userPreferenceService .select(UserPreferenceValues.Locale) .pipe(takeUntil(this.onDestroy$)) - .subscribe(locale => { + .subscribe((locale) => { if (locale) { this.defaultLocale = locale; } @@ -67,5 +64,4 @@ export class LocalizedDatePipe implements PipeTransform, OnDestroy { this.onDestroy$.next(true); this.onDestroy$.complete(); } - } diff --git a/lib/core/src/lib/pipes/time-ago.pipe.spec.ts b/lib/core/src/lib/pipes/time-ago.pipe.spec.ts index 87fc122a5cd..854c56422b4 100644 --- a/lib/core/src/lib/pipes/time-ago.pipe.spec.ts +++ b/lib/core/src/lib/pipes/time-ago.pipe.spec.ts @@ -21,6 +21,7 @@ import { AppConfigService } from '../app-config/app-config.service'; import { UserPreferencesService } from '../common/services/user-preferences.service'; import { CoreTestingModule } from '../testing/core.testing.module'; import { of } from 'rxjs'; +import { Injector, runInInjectionContext } from '@angular/core'; describe('TimeAgoPipe', () => { let pipe: TimeAgoPipe; @@ -31,8 +32,11 @@ describe('TimeAgoPipe', () => { imports: [CoreTestingModule] }); userPreferences = TestBed.inject(UserPreferencesService); + const injector = TestBed.inject(Injector); spyOn(userPreferences, 'select').and.returnValue(of('')); - pipe = new TimeAgoPipe(userPreferences, TestBed.inject(AppConfigService)); + runInInjectionContext(injector, () => { + pipe = new TimeAgoPipe(userPreferences, TestBed.inject(AppConfigService)); + }); }); it('should return time difference for a given date', () => { diff --git a/lib/core/src/lib/pipes/time-ago.pipe.ts b/lib/core/src/lib/pipes/time-ago.pipe.ts index df0eae8c348..4ce1919260f 100644 --- a/lib/core/src/lib/pipes/time-ago.pipe.ts +++ b/lib/core/src/lib/pipes/time-ago.pipe.ts @@ -15,58 +15,46 @@ * limitations under the License. */ -import { Pipe, PipeTransform, OnDestroy } from '@angular/core'; +import { Pipe, PipeTransform } from '@angular/core'; import { AppConfigService } from '../app-config/app-config.service'; -import { UserPreferenceValues, UserPreferencesService } from '../common/services/user-preferences.service'; +import { UserPreferencesService, UserPreferenceValues } from '../common/services/user-preferences.service'; import { DatePipe } from '@angular/common'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { differenceInDays, formatDistance } from 'date-fns'; import * as Locales from 'date-fns/locale'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Pipe({ standalone: true, name: 'adfTimeAgo' }) -export class TimeAgoPipe implements PipeTransform, OnDestroy { - +export class TimeAgoPipe implements PipeTransform { static DEFAULT_LOCALE = 'en-US'; static DEFAULT_DATE_TIME_FORMAT = 'dd/MM/yyyy HH:mm'; defaultLocale: string; defaultDateTimeFormat: string; - private onDestroy$ = new Subject(); - - constructor( - public userPreferenceService: UserPreferencesService, - public appConfig: AppConfigService - ) { + constructor(public userPreferenceService: UserPreferencesService, public appConfig: AppConfigService) { this.userPreferenceService .select(UserPreferenceValues.Locale) - .pipe(takeUntil(this.onDestroy$)) - .subscribe(locale => { + .pipe(takeUntilDestroyed()) + .subscribe((locale) => { this.defaultLocale = locale || TimeAgoPipe.DEFAULT_LOCALE; }); this.defaultDateTimeFormat = this.appConfig.get('dateValues.defaultDateTimeFormat', TimeAgoPipe.DEFAULT_DATE_TIME_FORMAT); } transform(value: Date, locale?: string) { - if (value !== null && value !== undefined ) { + if (value !== null && value !== undefined) { const actualLocale = locale || this.defaultLocale; const diff = differenceInDays(new Date(), new Date(value)); - if ( diff > 7) { + if (diff > 7) { const datePipe: DatePipe = new DatePipe(actualLocale); return datePipe.transform(value, this.defaultDateTimeFormat); } else { - return formatDistance(new Date(value) , new Date(), { addSuffix: true , locale: Locales[actualLocale] }); + return formatDistance(new Date(value), new Date(), { addSuffix: true, locale: Locales[actualLocale] }); } } return ''; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/core/src/lib/search-text/search-text-input.component.ts b/lib/core/src/lib/search-text/search-text-input.component.ts index 25316f9faa1..3e1011a3819 100644 --- a/lib/core/src/lib/search-text/search-text-input.component.ts +++ b/lib/core/src/lib/search-text/search-text-input.component.ts @@ -17,7 +17,19 @@ import { Direction } from '@angular/cdk/bidi'; import { NgClass, NgIf } from '@angular/common'; -import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core'; +import { + Component, + DestroyRef, + ElementRef, + EventEmitter, + inject, + Input, + OnDestroy, + OnInit, + Output, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; @@ -25,11 +37,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { TranslateModule } from '@ngx-translate/core'; import { Observable, Subject, Subscription } from 'rxjs'; -import { debounceTime, filter, takeUntil } from 'rxjs/operators'; +import { debounceTime, filter } from 'rxjs/operators'; import { UserPreferencesService } from '../common'; import { searchAnimation } from './animations'; import { SearchAnimationDirection, SearchAnimationState, SearchTextStateEnum } from './models/search-text-input.model'; import { SearchTriggerDirective } from './search-trigger.directive'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-search-text-input', @@ -162,7 +175,6 @@ export class SearchTextInputComponent implements OnInit, OnDestroy { }; private dir = 'ltr'; - private onDestroy$ = new Subject(); private toggleSearch = new Subject(); private focusSubscription: Subscription; private valueChange = new Subject(); @@ -170,8 +182,10 @@ export class SearchTextInputComponent implements OnInit, OnDestroy { toggle$ = this.toggleSearch.asObservable(); + private readonly destroyRef = inject(DestroyRef); + constructor(private userPreferencesService: UserPreferencesService) { - this.toggleSubscription = this.toggle$.pipe(debounceTime(200), takeUntil(this.onDestroy$)).subscribe(() => { + this.toggleSubscription = this.toggle$.pipe(debounceTime(200), takeUntilDestroyed()).subscribe(() => { if (this.expandable) { this.subscriptAnimationState = this.toggleAnimation(); if (this.subscriptAnimationState.value === 'inactive') { @@ -189,7 +203,7 @@ export class SearchTextInputComponent implements OnInit, OnDestroy { ngOnInit() { this.userPreferencesService .select('textOrientation') - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((direction: Direction) => { this.dir = direction; this.subscriptAnimationState = this.getDefaultState(this.dir); @@ -246,7 +260,7 @@ export class SearchTextInputComponent implements OnInit, OnDestroy { filter( ($event: any) => this.isSearchBarActive() && ($event.type === 'blur' || $event.type === 'focusout' || $event.type === 'focus') ), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ); this.focusSubscription = focusEvents.subscribe((event: FocusEvent) => { @@ -260,7 +274,7 @@ export class SearchTextInputComponent implements OnInit, OnDestroy { } private setValueChangeHandler() { - this.valueChange.pipe(debounceTime(this.debounceTime), takeUntil(this.onDestroy$)).subscribe((value: string) => { + this.valueChange.pipe(debounceTime(this.debounceTime), takeUntilDestroyed(this.destroyRef)).subscribe((value: string) => { this.searchChange.emit(value); }); } @@ -315,9 +329,6 @@ export class SearchTextInputComponent implements OnInit, OnDestroy { this.focusSubscription = null; this.focusListener = null; } - - this.onDestroy$.next(true); - this.onDestroy$.complete(); } canShowClearSearch(): boolean { diff --git a/lib/core/src/lib/search-text/search-trigger.directive.ts b/lib/core/src/lib/search-text/search-trigger.directive.ts index aa5c916e18e..d33cbb1199f 100644 --- a/lib/core/src/lib/search-text/search-trigger.directive.ts +++ b/lib/core/src/lib/search-text/search-trigger.directive.ts @@ -18,12 +18,13 @@ /* eslint-disable @angular-eslint/no-input-rename, @typescript-eslint/no-use-before-define, @angular-eslint/no-input-rename */ import { ENTER, ESCAPE } from '@angular/cdk/keycodes'; -import { ChangeDetectorRef, Directive, ElementRef, forwardRef, Inject, Input, NgZone, OnDestroy, Optional } from '@angular/core'; +import { ChangeDetectorRef, DestroyRef, Directive, ElementRef, forwardRef, inject, Inject, Input, NgZone, OnDestroy, Optional } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { DOCUMENT } from '@angular/common'; -import { Observable, Subject, Subscription, merge, of, fromEvent } from 'rxjs'; -import { filter, switchMap, takeUntil } from 'rxjs/operators'; +import { fromEvent, merge, Observable, of, Subject, Subscription } from 'rxjs'; +import { filter, switchMap } from 'rxjs/operators'; import { SearchComponentInterface } from '../common/interface/search-component.interface'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export const SEARCH_AUTOCOMPLETE_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -50,8 +51,6 @@ export const SEARCH_AUTOCOMPLETE_VALUE_ACCESSOR: any = { providers: [SEARCH_AUTOCOMPLETE_VALUE_ACCESSOR] }) export class SearchTriggerDirective implements ControlValueAccessor, OnDestroy { - private onDestroy$: Subject = new Subject(); - @Input('searchAutocomplete') searchPanel: SearchComponentInterface; @@ -66,6 +65,8 @@ export class SearchTriggerDirective implements ControlValueAccessor, OnDestroy { onTouched = () => {}; + private readonly destroyRef = inject(DestroyRef); + constructor( private element: ElementRef, private ngZone: NgZone, @@ -74,9 +75,6 @@ export class SearchTriggerDirective implements ControlValueAccessor, OnDestroy { ) {} ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - if (this.escapeEventStream) { this.escapeEventStream = null; } @@ -118,7 +116,7 @@ export class SearchTriggerDirective implements ControlValueAccessor, OnDestroy { const clickTarget = event.target as HTMLElement; return this._panelOpen && clickTarget !== this.element.nativeElement; }), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ); } @@ -183,7 +181,7 @@ export class SearchTriggerDirective implements ControlValueAccessor, OnDestroy { this.searchPanel.setVisibility(); return this.panelClosingActions; }), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((event) => this.setValueAndClose(event)); } diff --git a/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.ts b/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.ts index 1014f9ad190..7bfc29b2ec6 100644 --- a/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.ts +++ b/lib/core/src/lib/viewer/components/pdf-viewer/pdf-viewer.component.ts @@ -134,7 +134,6 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { cMapPacked: true }; private pdfjsWorkerDestroy$ = new Subject(); - private onDestroy$ = new Subject(); constructor(private dialog: MatDialog, private renderingQueueServices: RenderingQueueServices, private appConfigService: AppConfigService) { // needed to preserve "this" context @@ -276,9 +275,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { if (this.loadingTask) { this.pdfjsWorkerDestroy$.next(true); } - this.onDestroy$.next(true); this.pdfjsWorkerDestroy$.complete(); - this.onDestroy$.complete(); } private destroyPdJsWorker() { diff --git a/lib/core/src/lib/viewer/components/viewer-render/viewer-render.component.ts b/lib/core/src/lib/viewer/components/viewer-render/viewer-render.component.ts index e3b49764dec..97e0e81ac99 100644 --- a/lib/core/src/lib/viewer/components/viewer-render/viewer-render.component.ts +++ b/lib/core/src/lib/viewer/components/viewer-render/viewer-render.component.ts @@ -15,13 +15,22 @@ * limitations under the License. */ -import { AppExtensionService, ViewerExtensionRef, ExtensionsModule } from '@alfresco/adf-extensions'; +import { AppExtensionService, ExtensionsModule, ViewerExtensionRef } from '@alfresco/adf-extensions'; import { NgForOf, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet } from '@angular/common'; -import { Component, EventEmitter, Injector, Input, OnChanges, OnDestroy, OnInit, Output, TemplateRef, ViewEncapsulation } from '@angular/core'; +import { + Component, + EventEmitter, + Injector, + Input, + OnChanges, + OnInit, + Output, + TemplateRef, + ViewEncapsulation +} from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { TranslateModule } from '@ngx-translate/core'; -import { Subject } from 'rxjs'; import { Track } from '../../models/viewer.model'; import { ViewUtilService } from '../../services/view-util.service'; import { ImgViewerComponent } from '../img-viewer/img-viewer.component'; @@ -55,7 +64,7 @@ import { UnknownFormatComponent } from '../unknown-format/unknown-format.compone ], providers: [ViewUtilService] }) -export class ViewerRenderComponent implements OnChanges, OnInit, OnDestroy { +export class ViewerRenderComponent implements OnChanges, OnInit { /** * If you want to load an external file that does not come from ACS you * can use this URL to specify where to load the file from. @@ -169,8 +178,6 @@ export class ViewerRenderComponent implements OnChanges, OnInit, OnDestroy { cacheTypeForContent = 'no-cache'; - private onDestroy$ = new Subject(); - constructor( private viewUtilService: ViewUtilService, private extensionService: AppExtensionService, @@ -182,11 +189,6 @@ export class ViewerRenderComponent implements OnChanges, OnInit, OnDestroy { this.cacheTypeForContent = 'no-cache'; } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - ngOnChanges() { this.isLoading = !this.blobFile && !this.urlFile; diff --git a/lib/core/src/lib/viewer/components/viewer.component.ts b/lib/core/src/lib/viewer/components/viewer.component.ts index 6dd9508df59..1becfddf802 100644 --- a/lib/core/src/lib/viewer/components/viewer.component.ts +++ b/lib/core/src/lib/viewer/components/viewer.component.ts @@ -20,6 +20,7 @@ import { NgIf, NgTemplateOutlet } from '@angular/common'; import { Component, ContentChild, + DestroyRef, ElementRef, EventEmitter, HostListener, @@ -38,8 +39,8 @@ import { MatDialog } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { TranslateModule } from '@ngx-translate/core'; -import { fromEvent, Subject } from 'rxjs'; -import { filter, first, skipWhile, takeUntil } from 'rxjs/operators'; +import { fromEvent } from 'rxjs'; +import { filter, first, skipWhile } from 'rxjs/operators'; import { AppConfigService } from '../../app-config'; import { ToolbarComponent, ToolbarDividerComponent, ToolbarTitleComponent } from '../../toolbar'; import { DownloadPromptActions } from '../models/download-prompt.actions'; @@ -55,6 +56,7 @@ import { ViewerToolbarActionsComponent } from './viewer-toolbar-actions.componen import { ViewerToolbarCustomActionsComponent } from './viewer-toolbar-custom-actions.component'; import { IconComponent } from '../../icon'; import { ThumbnailService } from '../../common'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const DEFAULT_NON_PREVIEW_CONFIG = { enableDownloadPrompt: false, @@ -284,8 +286,6 @@ export class ViewerComponent implements OnDestroy, OnInit, OnChanges { @Output() submitFile = new EventEmitter(); - private onDestroy$ = new Subject(); - private closeViewer = true; private keyDown$ = fromEvent(document, 'keydown'); private isDialogVisible: boolean = false; @@ -293,6 +293,8 @@ export class ViewerComponent implements OnDestroy, OnInit, OnChanges { public downloadPromptReminderTimer: number; public mimeTypeIconUrl: string; + private readonly destroyRef = inject(DestroyRef); + constructor( private el: ElementRef, public dialog: MatDialog, @@ -326,14 +328,14 @@ export class ViewerComponent implements OnDestroy, OnInit, OnChanges { this.dialog.afterOpened .pipe( skipWhile(() => !this.overlayMode), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => (this.closeViewer = false)); this.dialog.afterAllClosed .pipe( skipWhile(() => !this.overlayMode), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => (this.closeViewer = true)); @@ -341,7 +343,7 @@ export class ViewerComponent implements OnDestroy, OnInit, OnChanges { .pipe( skipWhile(() => !this.overlayMode), filter((e: KeyboardEvent) => e.keyCode === 27), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((event: KeyboardEvent) => { event.preventDefault(); @@ -429,8 +431,6 @@ export class ViewerComponent implements OnDestroy, OnInit, OnChanges { ngOnDestroy() { this.clearDownloadPromptTimeouts(); - this.onDestroy$.next(true); - this.onDestroy$.complete(); } private configureAndInitDownloadPrompt() { diff --git a/lib/core/src/lib/viewer/directives/viewer-extension.directive.ts b/lib/core/src/lib/viewer/directives/viewer-extension.directive.ts index 74db01c363f..1bd480f1e50 100644 --- a/lib/core/src/lib/viewer/directives/viewer-extension.directive.ts +++ b/lib/core/src/lib/viewer/directives/viewer-extension.directive.ts @@ -15,16 +15,15 @@ * limitations under the License. */ -import { AfterContentInit, ContentChild, Directive, Input, TemplateRef, OnDestroy } from '@angular/core'; +import { AfterContentInit, ContentChild, DestroyRef, Directive, inject, Input, TemplateRef } from '@angular/core'; import { ViewerRenderComponent } from '../components/viewer-render/viewer-render.component'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ selector: 'adf-viewer-extension', standalone: true }) -export class ViewerExtensionDirective implements AfterContentInit, OnDestroy { +export class ViewerExtensionDirective implements AfterContentInit { @ContentChild(TemplateRef) template: any; @@ -39,7 +38,7 @@ export class ViewerExtensionDirective implements AfterContentInit, OnDestroy { templateModel: any; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private viewerComponent: ViewerRenderComponent) {} @@ -48,16 +47,11 @@ export class ViewerExtensionDirective implements AfterContentInit, OnDestroy { this.viewerComponent.extensionsSupportedByTemplates.push(...this.supportedExtensions); this.viewerComponent.extensionTemplates.push(this.templateModel); - this.viewerComponent.extensionChange.pipe(takeUntil(this.onDestroy$)).subscribe((fileExtension) => { + this.viewerComponent.extensionChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((fileExtension) => { this.templateModel.isVisible = this.isVisible(fileExtension); }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - /** * Check if the current extension in the viewer is compatible with this extension checking against `supportedExtensions` * diff --git a/lib/insights/src/lib/analytics-process/components/analytics-report-parameters.component.ts b/lib/insights/src/lib/analytics-process/components/analytics-report-parameters.component.ts index 8b11914ff87..0789cb19aea 100644 --- a/lib/insights/src/lib/analytics-process/components/analytics-report-parameters.component.ts +++ b/lib/insights/src/lib/analytics-process/components/analytics-report-parameters.component.ts @@ -19,10 +19,11 @@ import { ADF_DATE_FORMATS, AdfDateFnsAdapter, DownloadService, ToolbarComponent, import { AfterContentChecked, Component, + DestroyRef, EventEmitter, + inject, Input, OnChanges, - OnDestroy, OnInit, Output, SimpleChanges, @@ -35,8 +36,6 @@ import { ReportParameterDetailsModel } from '../../diagram/models/report/report- import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model'; import { ReportQuery } from '../../diagram/models/report/report-query.model'; import { AnalyticsService } from '../services/analytics.service'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatIconModule } from '@angular/material/icon'; @@ -47,6 +46,7 @@ import { WIDGET_DIRECTIVES } from './widgets'; import { MatButtonModule } from '@angular/material/button'; import { ButtonsMenuComponent } from './buttons-menu/buttons-menu.component'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const FORMAT_DATE_ACTIVITI = 'YYYY-MM-DD'; @@ -133,7 +133,7 @@ export interface ReportFormValues { styleUrls: ['./analytics-report-parameters.component.scss'], encapsulation: ViewEncapsulation.None }) -export class AnalyticsReportParametersComponent implements OnInit, OnChanges, OnDestroy, AfterContentChecked { +export class AnalyticsReportParametersComponent implements OnInit, OnChanges, AfterContentChecked { /** appId ID of the target app. */ @Input() appId: number; @@ -186,7 +186,8 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On formValidState: boolean = false; private hideParameters: boolean = true; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor( private analyticsService: AnalyticsService, @@ -197,14 +198,14 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On ) {} ngOnInit() { - this.onDropdownChanged.pipe(takeUntil(this.onDestroy$)).subscribe((field: any) => { + this.onDropdownChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((field: any) => { const paramDependOn = this.reportParameters.definition.parameters.find((param) => param.dependsOn === field.id); if (paramDependOn) { this.retrieveParameterOptions(this.reportParameters.definition.parameters, this.appId, this.reportId, field.value); } }); - this.successReportParams.pipe(takeUntil(this.onDestroy$)).subscribe((report) => { + this.successReportParams.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((report) => { if (report.hasParameters()) { this.retrieveParameterOptions(report.definition.parameters, this.appId); this.generateFormGroupFromParameter(report.definition.parameters); @@ -310,11 +311,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On return reportParamQuery; } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - editEnable() { this.isEditable = true; } diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts index 676e5467821..e5054d83e43 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts @@ -16,35 +16,35 @@ */ import { + ChangeDetectorRef, Component, + DestroyRef, EventEmitter, + HostListener, + inject, Input, OnChanges, - Output, - SimpleChanges, - OnDestroy, - HostListener, OnInit, - ChangeDetectorRef, - inject + Output, + SimpleChanges } from '@angular/core'; -import { Observable, of, forkJoin, Subject, Subscription } from 'rxjs'; -import { switchMap, takeUntil, map, filter } from 'rxjs/operators'; +import { forkJoin, Observable, of, Subscription } from 'rxjs'; +import { filter, map, switchMap } from 'rxjs/operators'; import { + ConfirmDialogComponent, + ContentLinkModel, + FORM_FIELD_VALIDATORS, FormBaseComponent, + FormEvent, FormFieldModel, + FormFieldValidator, + FormModel, FormOutcomeEvent, FormOutcomeModel, - WidgetVisibilityService, FormService, - FORM_FIELD_VALIDATORS, - FormFieldValidator, FormValues, - FormModel, - ContentLinkModel, UploadWidgetContentLinkModel, - FormEvent, - ConfirmDialogComponent + WidgetVisibilityService } from '@alfresco/adf-core'; import { FormCloudService } from '../services/form-cloud.service'; import { TaskVariableCloud } from '../models/task-variable-cloud.model'; @@ -54,13 +54,14 @@ import { v4 as uuidGeneration } from 'uuid'; import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces'; import { FormCloudSpinnerService } from '../services/spinner/form-cloud-spinner.service'; import { DisplayModeService } from '../services/display-mode.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-form', templateUrl: './form-cloud.component.html', styleUrls: ['./form-cloud.component.scss'] }) -export class FormCloudComponent extends FormBaseComponent implements OnChanges, OnInit, OnDestroy { +export class FormCloudComponent extends FormBaseComponent implements OnChanges, OnInit { /** App name to fetch corresponding form and values. */ @Input() appName: string = ''; @@ -131,8 +132,6 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, nodeId: string; formCloudRepresentationJSON: any; - protected onDestroy$ = new Subject(); - readonly id: string; displayMode: string; displayConfiguration: FormCloudDisplayModeConfiguration = DisplayModeService.DEFAULT_DISPLAY_MODE_CONFIGURATIONS[0]; @@ -146,14 +145,16 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, protected displayModeService = inject(DisplayModeService); protected changeDetector = inject(ChangeDetectorRef); + private readonly destroyRef = inject(DestroyRef); + constructor() { super(); - this.spinnerService.initSpinnerHandling(this.onDestroy$); + this.spinnerService.initSpinnerHandling(this.destroyRef); this.id = uuidGeneration(); - this.formService.formContentClicked.pipe(takeUntil(this.onDestroy$)).subscribe((content) => { + this.formService.formContentClicked.pipe(takeUntilDestroyed()).subscribe((content) => { if (content instanceof UploadWidgetContentLinkModel) { this.form.setNodeIdValueForViewersLinkedToUploadWidget(content); this.onFormDataRefreshed(this.form); @@ -163,12 +164,12 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, } }); - this.formService.updateFormValuesRequested.pipe(takeUntil(this.onDestroy$)).subscribe((valuesToSetIfNotPresent) => { + this.formService.updateFormValuesRequested.pipe(takeUntilDestroyed()).subscribe((valuesToSetIfNotPresent) => { this.form.addValuesNotPresent(valuesToSetIfNotPresent); this.onFormDataRefreshed(this.form); }); - this.formService.formFieldValueChanged.pipe(takeUntil(this.onDestroy$)).subscribe(() => { + this.formService.formFieldValueChanged.pipe(takeUntilDestroyed()).subscribe(() => { if (this.disableSaveButton) { this.disableSaveButton = false; } @@ -222,7 +223,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, DisplayModeService.displayMode$ .pipe( filter((change) => change.id === this.id), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((displayModeChange) => { const oldDisplayMode = this.displayMode; @@ -281,7 +282,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, getFormByTaskId(appName: string, taskId: string, version?: number): Promise { return new Promise((resolve) => { forkJoin(this.formCloudService.getTaskForm(appName, taskId, version), this.formCloudService.getTaskVariables(appName, taskId)) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( (data) => { this.formCloudRepresentationJSON = data[0]; @@ -314,7 +315,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, delete flattenForm.formDefinition; return flattenForm; }), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe( (form) => { @@ -337,7 +338,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, if (this.form && this.appName && this.taskId) { this.formCloudService .saveTaskForm(this.appName, this.taskId, this.processInstanceId, `${this.form.id}`, this.form.values) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( () => { this.onTaskSaved(this.form); @@ -372,7 +373,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, if (this.form && this.appName && this.taskId) { this.formCloudService .completeTaskForm(this.appName, this.taskId, this.processInstanceId, `${this.form.id}`, this.form.values, outcome, this.appVersion) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( () => { this.onTaskCompleted(this.form); @@ -478,11 +479,6 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, protected storeFormAsMetadata() {} - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - switchToDisplayMode(newDisplayMode?: string) { this.displayModeService.switchToDisplayMode(this.id, FormCloudDisplayMode[newDisplayMode], this.displayMode, this.displayModeConfigurations); } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts index 1fc5ef56afd..1c6fc7ad229 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts @@ -21,47 +21,47 @@ import { ContentCloudNodeSelectorService } from '../../../services/content-cloud import { ProcessCloudContentService } from '../../../services/process-cloud-content.service'; import { AttachFileCloudWidgetComponent } from './attach-file-cloud-widget.component'; import { + AppConfigService, + ContentLinkModel, + DownloadService, FormFieldModel, - FormModel, FormFieldTypes, + FormModel, FormService, - DownloadService, - AppConfigService, - UploadWidgetContentLinkModel, LocalizedDatePipe, NotificationService, - ContentLinkModel + UploadWidgetContentLinkModel } from '@alfresco/adf-core'; import { allSourceParams, + allSourceParamsWithRelativePath, + allSourceWithNoAliasParams, + allSourceWithStringTypeEmptyValue, + allSourceWithWrongAliasParams, contentSourceParam, - fakeNode, - mockNodeId, + displayableCMParams, + expectedValues, + fakeLocalPhysicalRecordResponse, + fakeLocalPngAnswer, + fakeLocalPngHavingCMProperties, fakeLocalPngResponse, - onlyLocalParams, - allSourceWithWrongAliasParams, - allSourceWithNoAliasParams, + fakeNode, fakeNodeWithProperties, + formVariables, menuTestSourceParam, - expectedValues, - fakeLocalPngAnswer, - allSourceWithStringTypeEmptyValue, - mockNodeIdBasedOnStringVariableValue, - mockAllFileSourceWithStringVariablePathType, mockAllFileSourceWithFolderVariablePathType, - mockContentFileSource, - mockAllFileSourceWithStaticPathType, - formVariables, - processVariables, mockAllFileSourceWithRenamedFolderVariablePathType, - allSourceParamsWithRelativePath, - fakeLocalPhysicalRecordResponse, - displayableCMParams, - fakeLocalPngHavingCMProperties, - mockMyNodeId + mockAllFileSourceWithStaticPathType, + mockAllFileSourceWithStringVariablePathType, + mockContentFileSource, + mockMyNodeId, + mockNodeId, + mockNodeIdBasedOnStringVariableValue, + onlyLocalParams, + processVariables } from '../../../mocks/attach-file-cloud-widget.mock'; import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module'; -import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { CUSTOM_ELEMENTS_SCHEMA, Injector, runInInjectionContext } from '@angular/core'; import { ContentModule, ContentNodeSelectorPanelService, @@ -162,9 +162,12 @@ describe('AttachFileCloudWidgetComponent', () => { contentCloudNodeSelectorService = TestBed.inject(ContentCloudNodeSelectorService); appConfigService = TestBed.inject(AppConfigService); formService = TestBed.inject(FormService); + const injector = TestBed.inject(Injector); contentNodeSelectorPanelService = TestBed.inject(ContentNodeSelectorPanelService); openUploadFileDialogSpy = spyOn(contentCloudNodeSelectorService, 'openUploadFileDialog').and.returnValue(of([fakeNode])); - localizedDataPipe = new LocalizedDatePipe(); + runInInjectionContext(injector, () => { + localizedDataPipe = new LocalizedDatePipe(); + }); }); afterEach(() => { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts index b90066be3e3..a1313d93ffb 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts @@ -17,19 +17,17 @@ /* eslint-disable @angular-eslint/component-selector */ -import { Component, OnInit, ViewEncapsulation, OnDestroy, inject } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { - WidgetComponent, - FormService, + ADF_DATE_FORMATS, AdfDateFnsAdapter, DateFnsUtils, - ADF_DATE_FORMATS, - ErrorWidgetComponent, + DEFAULT_DATE_FORMAT, ErrorMessageModel, - DEFAULT_DATE_FORMAT + ErrorWidgetComponent, + FormService, + WidgetComponent } from '@alfresco/adf-core'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { addDays, parseISO } from 'date-fns'; @@ -38,6 +36,7 @@ import { NgIf } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'date-widget', @@ -62,7 +61,7 @@ import { MatInputModule } from '@angular/material/input'; }, encapsulation: ViewEncapsulation.None }) -export class DateCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { +export class DateCloudWidgetComponent extends WidgetComponent implements OnInit { typeId = 'DateCloudWidgetComponent'; minDate: Date = null; @@ -71,9 +70,9 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit, dateInputControl: FormControl = new FormControl(null); - private onDestroy$ = new Subject(); - public readonly formService = inject(FormService); + + private readonly destroyRef = inject(DestroyRef); private readonly dateAdapter = inject(DateAdapter); ngOnInit(): void { @@ -101,7 +100,7 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit, } private subscribeToDateChanges(): void { - this.dateInputControl.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((newDate: Date) => { + this.dateInputControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newDate: Date) => { this.field.value = newDate; this.updateField(); }); @@ -198,9 +197,4 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit, this.maxDate = parseISO(this.field.maxValue); } } - - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts index 018ee94176e..f12a170cbf7 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts @@ -29,15 +29,16 @@ import { WidgetComponent } from '@alfresco/adf-core'; import { AsyncPipe, NgFor, NgIf } from '@angular/common'; -import { Component, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; import { TranslateModule } from '@ngx-translate/core'; -import { BehaviorSubject, Subject } from 'rxjs'; -import { filter, map, takeUntil } from 'rxjs/operators'; +import { BehaviorSubject } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; import { TaskVariableCloud } from '../../../models/task-variable-cloud.model'; import { FormCloudService } from '../../../services/form-cloud.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export const DEFAULT_OPTION = { id: 'empty', @@ -65,7 +66,7 @@ export const HIDE_FILTER_LIMIT = 5; SelectFilterInputComponent ] }) -export class DropdownCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { +export class DropdownCloudWidgetComponent extends WidgetComponent implements OnInit { public formService = inject(FormService); private formCloudService = inject(FormCloudService); private appConfig = inject(AppConfigService); @@ -84,8 +85,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI private readonly defaultVariableOptionId = 'id'; private readonly defaultVariableOptionLabel = 'name'; private readonly defaultVariableOptionPath = 'data'; - - protected onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); get showRequiredMessage(): boolean { return this.dropdownControl.touched && this.dropdownControl.errors?.required && !this.isRestApiFailed && !this.variableOptionsFailed; @@ -133,11 +133,6 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - compareDropdownValues(opt1: FormFieldOption | string, opt2: FormFieldOption | string): boolean { if (!opt1 || !opt2) { return false; @@ -186,7 +181,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI this.dropdownControl.valueChanges .pipe( filter(() => !!this.field), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((value) => { this.setOptionValue(value, this.field); @@ -216,7 +211,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI map((search) => search ? this.field.options.filter(({ name }) => name.toLowerCase().includes(search.toLowerCase())) : this.field.options ), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((result) => this.list$.next(result)); } @@ -333,7 +328,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI const bodyParam = this.buildBodyParam(); this.formCloudService .getRestWidgetData(this.field.form.id, this.field.id, bodyParam) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe({ next: (result: FormFieldOption[]) => { this.resetRestApiErrorMessage(); @@ -366,7 +361,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI this.formService.formFieldValueChanged .pipe( filter((event: FormFieldEvent) => this.isFormFieldEventOfTypeDropdown(event) && this.isParentFormFieldEvent(event)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((event: FormFieldEvent) => { const valueOfParentWidget = event.field.value; diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts index d022b94271e..1284df4ba3b 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts @@ -15,13 +15,13 @@ * limitations under the License. */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { WidgetComponent, FormService } from '@alfresco/adf-core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormService, WidgetComponent } from '@alfresco/adf-core'; import { UntypedFormControl } from '@angular/forms'; -import { filter, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { filter } from 'rxjs/operators'; import { ComponentSelectionMode } from '../../../../types'; import { IdentityGroupModel } from '../../../../group/models/identity-group.model'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /* eslint-disable @angular-eslint/component-selector */ @@ -41,9 +41,7 @@ import { IdentityGroupModel } from '../../../../group/models/identity-group.mode }, encapsulation: ViewEncapsulation.None }) -export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { - - private onDestroy$ = new Subject(); +export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit { typeId = 'GroupCloudWidgetComponent'; roles: string[]; @@ -53,6 +51,8 @@ export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit search: UntypedFormControl; validate = false; + private readonly destroyRef = inject(DestroyRef); + constructor(formService: FormService) { super(formService); } @@ -71,7 +71,7 @@ export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit this.search.statusChanges .pipe( filter((value: string) => value === 'INVALID'), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.field.markAsInvalid(); @@ -81,19 +81,13 @@ export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit this.search.statusChanges .pipe( filter((value: string) => value === 'VALID'), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.field.validate(); this.field.form.validateForm(); }); } - - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - onChangedGroup(groups: IdentityGroupModel[]): void { this.field.value = groups?.length ? [...groups] : null; this.onFieldChanged(this.field); diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts index 5d3f924673c..d68a89a3a05 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts @@ -15,14 +15,14 @@ * limitations under the License. */ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { WidgetComponent, FormService } from '@alfresco/adf-core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormService, WidgetComponent } from '@alfresco/adf-core'; import { UntypedFormControl } from '@angular/forms'; -import { filter, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { filter } from 'rxjs/operators'; import { ComponentSelectionMode } from '../../../../types'; import { IdentityUserModel } from '../../../../people/models/identity-user.model'; import { IdentityUserService } from '../../../../people/services/identity-user.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /* eslint-disable @angular-eslint/component-selector */ @@ -42,9 +42,7 @@ import { IdentityUserService } from '../../../../people/services/identity-user.s }, encapsulation: ViewEncapsulation.None }) -export class PeopleCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { - - private onDestroy$ = new Subject(); +export class PeopleCloudWidgetComponent extends WidgetComponent implements OnInit { typeId = 'PeopleCloudWidgetComponent'; appName: string; @@ -56,6 +54,8 @@ export class PeopleCloudWidgetComponent extends WidgetComponent implements OnIni groupsRestriction: string[]; validate = false; + private readonly destroyRef = inject(DestroyRef); + constructor(formService: FormService, private identityUserService: IdentityUserService) { super(formService); } @@ -75,7 +75,7 @@ export class PeopleCloudWidgetComponent extends WidgetComponent implements OnIni this.search.statusChanges .pipe( filter((value: string) => value === 'INVALID'), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.field.markAsInvalid(); @@ -85,7 +85,7 @@ export class PeopleCloudWidgetComponent extends WidgetComponent implements OnIni this.search.statusChanges .pipe( filter((value: string) => value === 'VALID'), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { this.field.validate(); @@ -99,11 +99,6 @@ export class PeopleCloudWidgetComponent extends WidgetComponent implements OnIni } } - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - onChangedUser(users: IdentityUserModel[]): void { this.field.value = users?.length ? [...users] : null; this.onFieldChanged(this.field); diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/radio-buttons/radio-buttons-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/radio-buttons/radio-buttons-cloud.widget.ts index 5fcb8d07c9b..67e65118e47 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/radio-buttons/radio-buttons-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/radio-buttons/radio-buttons-cloud.widget.ts @@ -17,12 +17,11 @@ /* eslint-disable @angular-eslint/component-selector */ -import { Component, OnInit, ViewEncapsulation } from '@angular/core'; -import { WidgetComponent, FormService, FormFieldOption, ErrorMessageModel } from '@alfresco/adf-core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { ErrorMessageModel, FormFieldOption, FormService, WidgetComponent } from '@alfresco/adf-core'; import { FormCloudService } from '../../../services/form-cloud.service'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'radio-buttons-cloud-widget', @@ -45,7 +44,7 @@ export class RadioButtonsCloudWidgetComponent extends WidgetComponent implements typeId = 'RadioButtonsCloudWidgetComponent'; restApiError: ErrorMessageModel; - protected onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(public formService: FormService, private formCloudService: FormCloudService, private translateService: TranslateService) { super(formService); @@ -60,7 +59,7 @@ export class RadioButtonsCloudWidgetComponent extends WidgetComponent implements getValuesFromRestApi() { this.formCloudService .getRestWidgetData(this.field.form.id, this.field.id) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( (result: FormFieldOption[]) => { this.field.options = result; diff --git a/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts index 7a6b029e0a4..e8574be9180 100644 --- a/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts +++ b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts @@ -21,7 +21,7 @@ import { OverlayModule } from '@angular/cdk/overlay'; import { FormService, FormSpinnerEvent } from '@alfresco/adf-core'; import { Subject } from 'rxjs'; import { TranslateModule } from '@ngx-translate/core'; -import { Component } from '@angular/core'; +import { Component, DestroyRef, inject } from '@angular/core'; import { FormSpinnerComponent } from '../../components/spinner/form-spinner.component'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing'; @@ -33,18 +33,20 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; selector: 'adf-cloud-overlay-test', template: `
adf-cloud-overlay-test
` }) -class SpinnerTestComponent {} +class SpinnerTestComponent { + destroyRef = inject(DestroyRef) +} describe('FormCloudSpinnerService', () => { let fixture: ComponentFixture; let rootLoader: HarnessLoader; let spinnerService: FormCloudSpinnerService; let formService: FormService; + let destroyRef: DestroyRef; const showSpinnerEvent = new FormSpinnerEvent('toggle-spinner', { showSpinner: true, message: 'LOAD_SPINNER_MESSAGE' }); const hideSpinnerEvent = new FormSpinnerEvent('toggle-spinner', { showSpinner: false }); - const onDestroy$ = new Subject(); beforeEach(() => { TestBed.configureTestingModule({ @@ -65,10 +67,11 @@ describe('FormCloudSpinnerService', () => { rootLoader = TestbedHarnessEnvironment.documentRootLoader(fixture); spinnerService = TestBed.inject(FormCloudSpinnerService); formService = TestBed.inject(FormService); + destroyRef = fixture.componentInstance.destroyRef }); it('should toggle spinner', async () => { - spinnerService.initSpinnerHandling(onDestroy$); + spinnerService.initSpinnerHandling(destroyRef); formService.toggleFormSpinner.next(showSpinnerEvent); fixture.detectChanges(); diff --git a/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts index 7722b9afed5..8a37197818b 100644 --- a/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts +++ b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts @@ -15,13 +15,12 @@ * limitations under the License. */ -import { Injectable, inject } from '@angular/core'; +import { DestroyRef, inject, Injectable } from '@angular/core'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { ComponentPortal } from '@angular/cdk/portal'; import { FormService, FormSpinnerEvent } from '@alfresco/adf-core'; -import { Observable } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; import { FormSpinnerComponent } from '../../components/spinner/form-spinner.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Injectable() export class FormCloudSpinnerService { @@ -30,8 +29,8 @@ export class FormCloudSpinnerService { private overlayRef?: OverlayRef; - initSpinnerHandling(onDestroy$: Observable): void { - this.formService.toggleFormSpinner.pipe(takeUntil(onDestroy$)).subscribe((event: FormSpinnerEvent) => { + initSpinnerHandling(destroyRef: DestroyRef): void { + this.formService.toggleFormSpinner.pipe(takeUntilDestroyed(destroyRef)).subscribe((event: FormSpinnerEvent) => { if (event?.payload.showSpinner) { this.overlayRef = this.overlay.create({ hasBackdrop: true diff --git a/lib/process-services-cloud/src/lib/group/components/group-cloud.component.ts b/lib/process-services-cloud/src/lib/group/components/group-cloud.component.ts index 6284142fa77..fd98e26abf6 100644 --- a/lib/process-services-cloud/src/lib/group/components/group-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/group/components/group-cloud.component.ts @@ -17,26 +17,28 @@ import { Component, + DestroyRef, ElementRef, - OnInit, - Output, EventEmitter, - ViewChild, - ViewEncapsulation, + Inject, + inject, Input, - SimpleChanges, OnChanges, - OnDestroy, - Inject + OnInit, + Output, + SimpleChanges, + ViewChild, + ViewEncapsulation } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; -import { trigger, state, style, transition, animate } from '@angular/animations'; -import { BehaviorSubject, Observable, Subject } from 'rxjs'; -import { distinctUntilChanged, switchMap, mergeMap, filter, tap, takeUntil, debounceTime } from 'rxjs/operators'; +import { animate, state, style, transition, trigger } from '@angular/animations'; +import { BehaviorSubject, Observable } from 'rxjs'; +import { debounceTime, distinctUntilChanged, filter, mergeMap, switchMap, tap } from 'rxjs/operators'; import { ComponentSelectionMode } from '../../types'; import { IdentityGroupModel } from '../models/identity-group.model'; import { IdentityGroupServiceInterface } from '../services/identity-group.service.interface'; import { IDENTITY_GROUP_SERVICE_TOKEN } from '../services/identity-group-service.token'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-group', @@ -50,7 +52,7 @@ import { IDENTITY_GROUP_SERVICE_TOKEN } from '../services/identity-group-service ], encapsulation: ViewEncapsulation.None }) -export class GroupCloudComponent implements OnInit, OnChanges, OnDestroy { +export class GroupCloudComponent implements OnInit, OnChanges { /** Name of the application. If specified this shows the groups who have access to the app. */ @Input() appName: string; @@ -119,7 +121,6 @@ export class GroupCloudComponent implements OnInit, OnChanges, OnDestroy { private groupInput: ElementRef; private searchGroups: IdentityGroupModel[] = []; - private onDestroy$ = new Subject(); selectedGroups: IdentityGroupModel[] = []; invalidGroups: IdentityGroupModel[] = []; @@ -137,6 +138,8 @@ export class GroupCloudComponent implements OnInit, OnChanges, OnDestroy { typingUniqueValueNotEmpty$: Observable; + private readonly destroyRef = inject(DestroyRef); + constructor( @Inject(IDENTITY_GROUP_SERVICE_TOKEN) private identityGroupService: IdentityGroupServiceInterface @@ -172,7 +175,7 @@ export class GroupCloudComponent implements OnInit, OnChanges, OnDestroy { return groups; }), filter((group) => !this.isGroupAlreadySelected(group)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((searchedGroup: IdentityGroupModel) => { this.searchGroups.push(searchedGroup); @@ -467,9 +470,4 @@ export class GroupCloudComponent implements OnInit, OnChanges, OnDestroy { getValidationMinLength(): string { return this.searchGroupsControl.errors.minlength.requiredLength; } - - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/people/components/people-cloud.component.ts b/lib/process-services-cloud/src/lib/people/components/people-cloud.component.ts index c02496be0d6..bde0e1d1a7a 100644 --- a/lib/process-services-cloud/src/lib/people/components/people-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/people/components/people-cloud.component.ts @@ -17,29 +17,31 @@ import { UntypedFormControl } from '@angular/forms'; import { + AfterViewInit, Component, - OnInit, - Output, + DestroyRef, + ElementRef, EventEmitter, - ViewEncapsulation, + Inject, + inject, Input, - SimpleChanges, OnChanges, - OnDestroy, + OnInit, + Output, + SimpleChanges, ViewChild, - ElementRef, - Inject, - AfterViewInit + ViewEncapsulation } from '@angular/core'; -import { BehaviorSubject, Observable, Subject } from 'rxjs'; -import { switchMap, debounceTime, distinctUntilChanged, mergeMap, tap, filter, takeUntil } from 'rxjs/operators'; +import { BehaviorSubject, Observable } from 'rxjs'; +import { debounceTime, distinctUntilChanged, filter, mergeMap, switchMap, tap } from 'rxjs/operators'; import { FullNamePipe } from '@alfresco/adf-core'; -import { trigger, state, style, transition, animate } from '@angular/animations'; +import { animate, state, style, transition, trigger } from '@angular/animations'; import { ComponentSelectionMode } from '../../types'; import { IdentityUserModel } from '../models/identity-user.model'; import { IdentityUserServiceInterface } from '../services/identity-user.service.interface'; import { IDENTITY_USER_SERVICE_TOKEN } from '../services/identity-user-service.token'; import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-people', @@ -54,7 +56,7 @@ import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form- providers: [FullNamePipe], encapsulation: ViewEncapsulation.None }) -export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit { +export class PeopleCloudComponent implements OnInit, OnChanges, AfterViewInit { /** Name of the application. If specified, this shows the users who have access to the app. */ @Input() appName: string; @@ -175,7 +177,6 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, After private userInput: ElementRef; private searchUsers: IdentityUserModel[] = []; - private onDestroy$ = new Subject(); selectedUsers: IdentityUserModel[] = []; invalidUsers: IdentityUserModel[] = []; @@ -193,6 +194,8 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, After typingUniqueValueNotEmpty$: Observable; + private readonly destroyRef = inject(DestroyRef); + constructor( @Inject(IDENTITY_USER_SERVICE_TOKEN) private identityUserService: IdentityUserServiceInterface @@ -245,7 +248,7 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, After return users; }), filter((user) => !this.isUserAlreadySelected(user) && !this.isExcludedUser(user)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((user: IdentityUserModel) => { this.searchUsers.push(user); @@ -563,9 +566,4 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, After getValidationMinLength(): string { return this.searchUserCtrl.errors.minlength.requiredLength; } - - ngOnDestroy(): void { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/process/directives/cancel-process.directive.ts b/lib/process-services-cloud/src/lib/process/directives/cancel-process.directive.ts index 6084ebdbfa7..df7d9418c41 100644 --- a/lib/process-services-cloud/src/lib/process/directives/cancel-process.directive.ts +++ b/lib/process-services-cloud/src/lib/process/directives/cancel-process.directive.ts @@ -15,18 +15,17 @@ * limitations under the License. */ -import { Directive, HostListener, Output, EventEmitter, OnInit, OnDestroy, ElementRef } from '@angular/core'; +import { DestroyRef, Directive, ElementRef, EventEmitter, HostListener, inject, OnInit, Output } from '@angular/core'; import { ProcessCloudService } from '../services/process-cloud.service'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; import { ProcessInstanceCloud } from '../start-process/models/process-instance-cloud.model'; import { IdentityUserService } from '../../people/services/identity-user.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector selector: '[adf-cloud-cancel-process]' }) -export class CancelProcessDirective implements OnInit, OnDestroy { +export class CancelProcessDirective implements OnInit { /** Emitted when the process is cancelled. */ @Output() @@ -40,7 +39,7 @@ export class CancelProcessDirective implements OnInit, OnDestroy { canCancelProcess = false; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private elementRef: ElementRef, @@ -49,7 +48,7 @@ export class CancelProcessDirective implements OnInit, OnDestroy { ngOnInit() { this.processCloudService.dataChangesDetected - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((processDetails) => { this.processInstanceDetails = processDetails; this.canCancelProcess = this.checkCanCancelProcess(); @@ -82,9 +81,4 @@ export class CancelProcessDirective implements OnInit, OnDestroy { this.error.emit('Permission denied, only process initiator can cancel the process'); } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts index 3000825c23e..4c045f4633f 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts @@ -15,18 +15,18 @@ * limitations under the License. */ -import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, OnDestroy, ViewEncapsulation } from '@angular/core'; -import { FormBuilder, AbstractControl, FormGroup, FormControl } from '@angular/forms'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; +import { AbstractControl, FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { DateAdapter } from '@angular/material/core'; import { MatDialog } from '@angular/material/dialog'; -import { debounceTime, filter, takeUntil, finalize, switchMap, tap } from 'rxjs/operators'; -import { Subject, Observable, Subscription } from 'rxjs'; +import { debounceTime, filter, finalize, switchMap, tap } from 'rxjs/operators'; +import { Observable, Subscription } from 'rxjs'; import { AppsProcessCloudService } from '../../../app/services/apps-process-cloud.service'; import { - ProcessFilterCloudModel, - ProcessFilterProperties, ProcessFilterAction, + ProcessFilterCloudModel, ProcessFilterOptions, + ProcessFilterProperties, ProcessSortFilterProperty } from '../models/process-filter-cloud.model'; import { DateFnsUtils, TranslationService, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core'; @@ -37,6 +37,7 @@ import { DateCloudFilterType, DateRangeFilter } from '../../../models/date-cloud import { IdentityUserModel } from '../../../people/models/identity-user.model'; import { Environment } from '../../../common/interface/environment.interface'; import { endOfDay, isValid, startOfDay } from 'date-fns'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export const PROCESS_FILTER_ACTION_SAVE = 'save'; export const PROCESS_FILTER_ACTION_SAVE_AS = 'saveAs'; @@ -71,7 +72,7 @@ interface ProcessFilterFormProps { styleUrls: ['./edit-process-filter-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDestroy { +export class EditProcessFilterCloudComponent implements OnInit, OnChanges { /** The name of the application. */ @Input() appName: string = ''; @@ -184,10 +185,11 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes appVersionOptions: ProcessFilterOptions[] = []; initiatorOptions: IdentityUserModel[] = []; - private onDestroy$ = new Subject(); isLoading: boolean = false; private filterChangeSub: Subscription; + private readonly destroyRef = inject(DestroyRef); + constructor( private formBuilder: FormBuilder, public dialog: MatDialog, @@ -202,7 +204,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes ngOnInit() { this.userPreferencesService .select(UserPreferenceValues.Locale) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((locale) => this.dateAdapter.setLocale(locale)); } @@ -212,12 +214,6 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes this.retrieveProcessFilterAndBuildForm(); } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - filterTracker(_index: number, item: ProcessFilterProperties) { return item.key; } @@ -284,7 +280,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes .pipe( debounceTime(500), filter(() => this.isFormValid()), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((formValues: Partial) => { this.setLastModifiedFromFilter(formValues); diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts index 78eb2f5de7d..8bf7cc2b06f 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts @@ -15,16 +15,28 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, OnDestroy, OnInit, ViewEncapsulation, inject } from '@angular/core'; -import { Observable, Subject } from 'rxjs'; +import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + SimpleChanges, + ViewEncapsulation +} from '@angular/core'; +import { Observable } from 'rxjs'; import { ProcessFilterCloudService } from '../services/process-filter-cloud.service'; import { ProcessFilterCloudModel } from '../models/process-filter-cloud.model'; import { AppConfigService, TranslationService } from '@alfresco/adf-core'; import { FilterParamsModel } from '../../../task/task-filters/models/filter-cloud.model'; -import { debounceTime, takeUntil, tap } from 'rxjs/operators'; +import { debounceTime, tap } from 'rxjs/operators'; import { ProcessListCloudService } from '../../../process/process-list/services/process-list-cloud.service'; import { PROCESS_SEARCH_API_METHOD_TOKEN } from '../../../services/cloud-token.service'; import { ProcessFilterCloudAdapter } from '../../process-list/models/process-cloud-query-request.model'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-process-filters', @@ -32,7 +44,7 @@ import { ProcessFilterCloudAdapter } from '../../process-list/models/process-clo styleUrls: ['./process-filters-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ProcessFiltersCloudComponent implements OnInit, OnChanges, OnDestroy { +export class ProcessFiltersCloudComponent implements OnInit, OnChanges { /** (required) The application name */ @Input() appName: string = ''; @@ -73,8 +85,7 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges, OnDestro currentFiltersValues: { [key: string]: number } = {}; updatedFiltersSet = new Set(); - private onDestroy$ = new Subject(); - + private readonly destroyRef = inject(DestroyRef); private readonly processFilterCloudService = inject(ProcessFilterCloudService); private readonly translationService = inject(TranslationService); private readonly appConfigService = inject(AppConfigService); @@ -108,7 +119,7 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges, OnDestro getFilters(appName: string): void { this.filters$ = this.processFilterCloudService.getProcessFilters(appName); - this.filters$.pipe(takeUntil(this.onDestroy$)).subscribe({ + this.filters$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe({ next: (res) => { this.resetFilter(); this.filters = res || []; @@ -240,11 +251,6 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges, OnDestro this.currentFilter = undefined; } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - isActiveFilter(filter: ProcessFilterCloudModel): boolean { return this.currentFilter.name === filter.name; } @@ -253,7 +259,7 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges, OnDestro if (this.appName && this.enableNotifications) { this.processFilterCloudService .getProcessNotificationSubscription(this.appName) - .pipe(debounceTime(1000), takeUntil(this.onDestroy$)) + .pipe(debounceTime(1000), takeUntilDestroyed(this.destroyRef)) .subscribe(() => { this.updateFilterCounters(); }); @@ -310,7 +316,7 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges, OnDestro * */ getFilterKeysAfterExternalRefreshing(): void { - this.processFilterCloudService.filterKeyToBeRefreshed$.pipe(takeUntil(this.onDestroy$)).subscribe((filterKey: string) => { + this.processFilterCloudService.filterKeyToBeRefreshed$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((filterKey: string) => { this.updatedFiltersSet.delete(filterKey); }); } diff --git a/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts index a9506efc591..95c0290fe78 100644 --- a/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts @@ -15,19 +15,28 @@ * limitations under the License. */ -import { Component, Input, OnChanges, OnInit, OnDestroy, EventEmitter, ViewEncapsulation, Output } from '@angular/core'; import { - CardViewItem, - CardViewTextItemModel, - TranslationService, + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + ViewEncapsulation +} from '@angular/core'; +import { AppConfigService, + CardViewBaseItemModel, CardViewDateItemModel, - CardViewBaseItemModel + CardViewItem, + CardViewTextItemModel, + TranslationService } from '@alfresco/adf-core'; import { ProcessInstanceCloud } from '../../start-process/models/process-instance-cloud.model'; import { ProcessCloudService } from '../../services/process-cloud.service'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-process-header', @@ -36,7 +45,7 @@ import { Subject } from 'rxjs'; styleUrls: ['./process-header-cloud.component.scss'], host: { class: 'adf-cloud-process-header' } }) -export class ProcessHeaderCloudComponent implements OnChanges, OnInit, OnDestroy { +export class ProcessHeaderCloudComponent implements OnChanges, OnInit { /** (Required) The name of the application. */ @Input() appName: string = ''; @@ -54,7 +63,7 @@ export class ProcessHeaderCloudComponent implements OnChanges, OnInit, OnDestroy dateFormat: string; dateLocale: string; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private processCloudService: ProcessCloudService, @@ -66,7 +75,7 @@ export class ProcessHeaderCloudComponent implements OnChanges, OnInit, OnDestroy this.dateFormat = this.appConfig.get('adf-cloud-process-header.defaultDateFormat'); this.dateLocale = this.appConfig.get('dateValues.defaultDateLocale'); - this.processCloudService.dataChangesDetected.pipe(takeUntil(this.onDestroy$)).subscribe((processDetails) => this.onLoaded(processDetails)); + this.processCloudService.dataChangesDetected.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((processDetails) => this.onLoaded(processDetails)); } ngOnChanges() { @@ -152,9 +161,4 @@ export class ProcessHeaderCloudComponent implements OnChanges, OnInit, OnDestroy private isValidSelection(filteredProperties: string[], cardItem: CardViewBaseItemModel): boolean { return filteredProperties ? filteredProperties.indexOf(cardItem.key) >= 0 : true; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts index 4d713062102..96f852d2458 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts @@ -16,47 +16,53 @@ */ import { - Component, - ViewEncapsulation, - OnChanges, AfterContentInit, + Component, ContentChild, - Output, EventEmitter, - SimpleChanges, + Inject, Input, + OnChanges, + Optional, + Output, + SimpleChanges, ViewChild, - Inject, - OnDestroy, - Optional + ViewEncapsulation } from '@angular/core'; import { - DataTableSchema, - PaginatedComponent, - CustomEmptyContentTemplateDirective, AppConfigService, - UserPreferencesService, - PaginationModel, - UserPreferenceValues, - DataRowEvent, + CustomEmptyContentTemplateDirective, CustomLoadingContentTemplateDirective, DataCellEvent, + DataColumn, DataRowActionEvent, + DataRowEvent, DataTableComponent, - DataColumn + DataTableSchema, + PaginatedComponent, + PaginationModel, + UserPreferencesService, + UserPreferenceValues } from '@alfresco/adf-core'; import { ProcessListCloudService } from '../services/process-list-cloud.service'; import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; import { processCloudPresetsDefaultModel } from '../models/process-cloud-preset.model'; import { ProcessListRequestModel, ProcessQueryCloudRequestModel } from '../models/process-cloud-query-request.model'; import { ProcessListCloudSortingModel } from '../models/process-list-sorting.model'; -import { filter, map, switchMap, take, takeUntil } from 'rxjs/operators'; +import { filter, map, switchMap, take } from 'rxjs/operators'; import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; -import { PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN, PROCESS_SEARCH_API_METHOD_TOKEN } from '../../../services/cloud-token.service'; +import { + PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN, + PROCESS_SEARCH_API_METHOD_TOKEN +} from '../../../services/cloud-token.service'; import { ProcessListCloudPreferences } from '../models/process-cloud-preferences'; import { ProcessListDatatableAdapter } from '../datatable/process-list-datatable-adapter'; -import { ProcessListDataColumnCustomData, PROCESS_LIST_CUSTOM_VARIABLE_COLUMN } from '../../../models/data-column-custom-data'; +import { + PROCESS_LIST_CUSTOM_VARIABLE_COLUMN, + ProcessListDataColumnCustomData +} from '../../../models/data-column-custom-data'; import { VariableMapperService } from '../../../services/variable-mapper.sevice'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const PRESET_KEY = 'adf-cloud-process-list.presets'; @@ -66,7 +72,9 @@ const PRESET_KEY = 'adf-cloud-process-list.presets'; styleUrls: ['./process-list-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ProcessListCloudComponent extends DataTableSchema implements OnChanges, AfterContentInit, PaginatedComponent, OnDestroy { +export class ProcessListCloudComponent + extends DataTableSchema + implements OnChanges, AfterContentInit, PaginatedComponent { @ViewChild(DataTableComponent) dataTable: DataTableComponent; @@ -255,8 +263,6 @@ export class ProcessListCloudComponent extends DataTableSchema = new EventEmitter(); - private onDestroy$ = new Subject(); - pagination: BehaviorSubject; size: number; skipCount: number = 0; @@ -299,9 +305,7 @@ export class ProcessListCloudComponent extends DataTableSchema { - return isColumnSchemaCreated; - }), + filter(([isColumnSchemaCreated]) => isColumnSchemaCreated), switchMap(() => { if (this.searchMethod === 'POST') { const requestNode = this.createProcessListRequestNode(); @@ -313,7 +317,7 @@ export class ProcessListCloudComponent extends DataTableSchema { this.rows = this.variableMapperService.mapVariablesByColumnTitle(processes.list.entries, this.columns); @@ -367,12 +371,6 @@ export class ProcessListCloudComponent extends DataTableSchema(); isProcessStarting = false; isFormCloudLoaded = false; @@ -154,6 +160,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy processDefinition: new FormControl('', [Validators.required, this.processDefinitionNameValidator()]) }); + private readonly destroyRef = inject(DestroyRef); private readonly startProcessCloudService = inject(StartProcessCloudService); private readonly processNameCloudPipe = inject(ProcessNameCloudPipe); @@ -204,7 +211,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy this.processDefinition.setValue(this.processDefinitionName); this.processDefinition.valueChanges .pipe(debounceTime(PROCESS_DEFINITION_DEBOUNCE)) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((processDefinitionName) => { this.selectProcessDefinitionByProcessDefinitionName(processDefinitionName); }); @@ -327,7 +334,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy this.startProcessCloudService .getProcessDefinitions(this.appName) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( (processDefinitionRepresentations: ProcessDefinitionCloud[]) => { this.processDefinitionList = processDefinitionRepresentations; @@ -498,9 +505,4 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy this.processInstanceName.markAsDirty(); this.processInstanceName.markAsTouched(); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts index 5247bbf2b07..ab09cfa5fe8 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts @@ -15,21 +15,21 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, OnDestroy, ViewChild } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; -import { Observable, Subject } from 'rxjs'; -import { UntypedFormBuilder, Validators, UntypedFormGroup, UntypedFormControl } from '@angular/forms'; +import { Observable } from 'rxjs'; +import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { DateFnsUtils, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core'; import { PeopleCloudComponent } from '../../../people/components/people-cloud.component'; import { GroupCloudComponent } from '../../../group/components/group-cloud.component'; import { TaskCloudService } from '../../services/task-cloud.service'; import { StartTaskCloudRequestModel } from '../models/start-task-cloud-request.model'; -import { takeUntil } from 'rxjs/operators'; import { TaskPriorityOption } from '../../models/task.model'; import { IdentityUserService } from '../../../people/services/identity-user.service'; import { IdentityUserModel } from '../../../people/models/identity-user.model'; import { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from '@angular/material-date-fns-adapter'; import { isValid, parse } from 'date-fns'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const MAX_NAME_LENGTH = 255; const DATE_FORMAT: string = 'dd/MM/yyyy'; @@ -44,7 +44,7 @@ const DATE_FORMAT: string = 'dd/MM/yyyy'; ], encapsulation: ViewEncapsulation.None }) -export class StartTaskCloudComponent implements OnInit, OnDestroy { +export class StartTaskCloudComponent implements OnInit { /** (required) Name of the app. */ @Input() appName: string = ''; @@ -99,7 +99,8 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy { private assigneeForm = new UntypedFormControl(''); private groupForm = new UntypedFormControl(''); - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor( private taskService: TaskCloudService, @@ -112,18 +113,13 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy { ngOnInit() { this.userPreferencesService .select(UserPreferenceValues.Locale) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((locale) => this.dateAdapter.setLocale(DateFnsUtils.getLocaleFromString(locale))); this.loadCurrentUser(); this.buildForm(); this.loadDefaultPriorities(); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - buildForm() { this.taskForm = this.formBuilder.group({ name: new UntypedFormControl(this.name, [Validators.required, Validators.maxLength(this.getMaxNameLength()), this.whitespaceValidator]), diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/base-task-filters-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/base-task-filters-cloud.component.ts index 22e36788648..00a9b442a53 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/base-task-filters-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/base-task-filters-cloud.component.ts @@ -15,13 +15,12 @@ * limitations under the License. */ -import { Directive, EventEmitter, Input, OnDestroy, Output } from '@angular/core'; -import { Subject } from 'rxjs'; +import { DestroyRef, Directive, EventEmitter, inject, Input, Output } from '@angular/core'; import { FilterParamsModel } from '../models/filter-cloud.model'; @Directive() // eslint-disable-next-line @angular-eslint/directive-class-suffix -export abstract class BaseTaskFiltersCloudComponent implements OnDestroy { +export abstract class BaseTaskFiltersCloudComponent { /** Display filters available to the current user for the application with the specified name. */ @Input() appName: string = ''; @@ -48,12 +47,7 @@ export abstract class BaseTaskFiltersCloudComponent implements OnDestroy { counters: { [key: string]: number } = {}; updatedCountersSet = new Set(); - protected onDestroy$ = new Subject(); - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } + protected destroyRef = inject(DestroyRef); wasFilterUpdated(filterKey: string): boolean { return this.updatedCountersSet.has(filterKey); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.ts index c93162d833b..33b137b144d 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.ts @@ -15,14 +15,14 @@ * limitations under the License. */ -import { OnChanges, SimpleChanges, OnInit, OnDestroy, Directive, Input, Output, EventEmitter, inject } from '@angular/core'; +import { DestroyRef, Directive, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { AssignmentType, FilterOptions, TaskFilterAction, TaskFilterProperties, TaskStatusFilter } from '../../models/filter-cloud.model'; import { TaskCloudService } from './../../../services/task-cloud.service'; import { AppsProcessCloudService } from './../../../../app/services/apps-process-cloud.service'; import { DateCloudFilterType, DateRangeFilter } from '../../../../models/date-cloud-filter.model'; import { AbstractControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { debounceTime, filter, finalize, switchMap, takeUntil } from 'rxjs/operators'; -import { Observable, Subject } from 'rxjs'; +import { debounceTime, filter, finalize, switchMap } from 'rxjs/operators'; +import { Observable } from 'rxjs'; import { DateAdapter } from '@angular/material/core'; import { DateFnsUtils, TranslationService, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core'; import { TaskFilterDialogCloudComponent } from '../task-filter-dialog/task-filter-dialog-cloud.component'; @@ -32,6 +32,7 @@ import { IdentityGroupModel } from '../../../../group/models/identity-group.mode import { MatSelectChange } from '@angular/material/select'; import { Environment } from '../../../../common/interface/environment.interface'; import { isValid } from 'date-fns'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; /* eslint-disable @typescript-eslint/naming-convention */ @@ -54,7 +55,7 @@ const ORDER_PROPERTY = 'order'; @Directive() // eslint-disable-next-line @angular-eslint/directive-class-suffix -export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnChanges, OnDestroy { +export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnChanges { public static ACTIONS_DISABLED_BY_DEFAULT = [ACTION_SAVE, ACTION_DELETE]; /** (required) Name of the app. */ @@ -133,9 +134,9 @@ export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnC @Output() filterChange = new EventEmitter(); - protected onDestroy$ = new Subject(); isLoading: boolean = false; + protected destroyRef = inject(DestroyRef); protected translateService = inject(TranslationService); protected taskCloudService = inject(TaskCloudService); protected userPreferencesService = inject(UserPreferencesService); @@ -147,7 +148,7 @@ export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnC ngOnInit() { this.userPreferencesService .select(UserPreferenceValues.Locale) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((locale) => this.dateAdapter.setLocale(locale)); } @@ -158,11 +159,6 @@ export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnC } } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - createFilterActions(): TaskFilterAction[] { return [ { @@ -430,7 +426,7 @@ export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnC .pipe( debounceTime(500), filter(() => this.isFormValid()), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((formValues) => { this.assignNewFilter(formValues); @@ -471,7 +467,7 @@ export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnC this.getTaskFilterById(this.appName, this.id) .pipe( finalize(() => (this.isLoading = false)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((response) => { this.taskFilter = response; @@ -490,14 +486,14 @@ export abstract class BaseEditTaskFilterCloudComponent implements OnInit, OnC return filters.length === 0; }), switchMap(() => this.restoreDefaultTaskFilters()), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe(() => {}); } save(saveAction: TaskFilterAction): void { this.updateFilter(this.changedTaskFilter) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => { saveAction.filter = this.changedTaskFilter; this.action.emit(saveAction); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.ts index deebc8a348e..efcf6c47ada 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.ts @@ -15,12 +15,12 @@ * limitations under the License. */ -import { Component, ViewEncapsulation, inject } from '@angular/core'; -import { takeUntil } from 'rxjs/operators'; +import { Component, inject, ViewEncapsulation } from '@angular/core'; import { Observable } from 'rxjs'; -import { TaskFilterProperties, TaskFilterAction, ServiceTaskFilterCloudModel } from '../../models/filter-cloud.model'; +import { ServiceTaskFilterCloudModel, TaskFilterAction, TaskFilterProperties } from '../../models/filter-cloud.model'; import { ServiceTaskFilterCloudService } from '../../services/service-task-filter-cloud.service'; import { BaseEditTaskFilterCloudComponent, DropdownOption } from './base-edit-task-filter-cloud.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-edit-service-task-filter', @@ -64,7 +64,7 @@ export class EditServiceTaskFilterCloudComponent extends BaseEditTaskFilterCloud protected addFilter(filterToAdd: ServiceTaskFilterCloudModel): Observable { return this.serviceTaskFilterCloudService .addFilter(filterToAdd) - .pipe(takeUntil(this.onDestroy$)); + .pipe(takeUntilDestroyed(this.destroyRef)); } isDisabledForDefaultFilters(action: TaskFilterAction): boolean { diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.ts index d4196ac1024..13d20a6fc1e 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.ts @@ -15,14 +15,20 @@ * limitations under the License. */ -import { Component, ViewEncapsulation, inject } from '@angular/core'; -import { takeUntil, map } from 'rxjs/operators'; +import { Component, inject, ViewEncapsulation } from '@angular/core'; +import { map } from 'rxjs/operators'; import { Observable } from 'rxjs'; -import { TaskFilterCloudModel, TaskFilterProperties, TaskFilterAction, TaskStatusFilter } from '../../models/filter-cloud.model'; +import { + TaskFilterAction, + TaskFilterCloudModel, + TaskFilterProperties, + TaskStatusFilter +} from '../../models/filter-cloud.model'; import { TaskFilterCloudService } from '../../services/task-filter-cloud.service'; import { DateCloudFilterType } from '../../../../models/date-cloud-filter.model'; import { BaseEditTaskFilterCloudComponent, DropdownOption } from './base-edit-task-filter-cloud.component'; import { set } from 'date-fns'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-edit-task-filter', @@ -98,7 +104,7 @@ export class EditTaskFilterCloudComponent extends BaseEditTaskFilterCloudCompone protected addFilter(filterToAdd: TaskFilterCloudModel): Observable { return this.taskFilterCloudService .addFilter(filterToAdd) - .pipe(takeUntil(this.onDestroy$)); + .pipe(takeUntilDestroyed(this.destroyRef)); } isDisabledForDefaultFilters(action: TaskFilterAction): boolean { diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters-cloud.component.ts index 5a704369dcf..7b95849f46d 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters-cloud.component.ts @@ -15,13 +15,22 @@ * limitations under the License. */ -import { Component, EventEmitter, OnChanges, Output, SimpleChanges, OnInit, ViewEncapsulation, inject } from '@angular/core'; +import { + Component, + EventEmitter, + inject, + OnChanges, + OnInit, + Output, + SimpleChanges, + ViewEncapsulation +} from '@angular/core'; import { Observable } from 'rxjs'; import { FilterParamsModel, ServiceTaskFilterCloudModel } from '../models/filter-cloud.model'; -import { takeUntil } from 'rxjs/operators'; import { BaseTaskFiltersCloudComponent } from './base-task-filters-cloud.component'; import { ServiceTaskFilterCloudService } from '../services/service-task-filter-cloud.service'; import { TranslationService } from '@alfresco/adf-core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-service-task-filters', @@ -67,7 +76,7 @@ export class ServiceTaskFiltersCloudComponent extends BaseTaskFiltersCloudCompon getFilters(appName: string): void { this.filters$ = this.serviceTaskFilterCloudService.getTaskListFilters(appName); - this.filters$.pipe(takeUntil(this.onDestroy$)).subscribe( + this.filters$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe( (res: ServiceTaskFilterCloudModel[]) => { this.resetFilter(); this.filters = res || []; diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.ts index 5ef4d3c3cb9..cc4281533d8 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.ts @@ -15,18 +15,28 @@ * limitations under the License. */ -import { Component, EventEmitter, OnChanges, Output, SimpleChanges, OnInit, ViewEncapsulation, inject } from '@angular/core'; +import { + Component, + EventEmitter, + inject, + OnChanges, + OnInit, + Output, + SimpleChanges, + ViewEncapsulation +} from '@angular/core'; import { Observable } from 'rxjs'; import { TaskFilterCloudService } from '../services/task-filter-cloud.service'; -import { TaskFilterCloudModel, FilterParamsModel } from '../models/filter-cloud.model'; +import { FilterParamsModel, TaskFilterCloudModel } from '../models/filter-cloud.model'; import { AppConfigService, TranslationService } from '@alfresco/adf-core'; -import { debounceTime, takeUntil, tap } from 'rxjs/operators'; +import { debounceTime, tap } from 'rxjs/operators'; import { BaseTaskFiltersCloudComponent } from './base-task-filters-cloud.component'; import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model'; import { TaskCloudEngineEvent } from '../../../models/engine-event-cloud.model'; import { TaskListCloudService } from '../../task-list/services/task-list-cloud.service'; import { TaskFilterCloudAdapter } from '../../../models/filter-cloud-model'; import { TASK_SEARCH_API_METHOD_TOKEN } from '../../../services/cloud-token.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-task-filters', @@ -88,7 +98,7 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp getFilters(appName: string): void { this.filters$ = this.taskFilterCloudService.getTaskListFilters(appName); - this.filters$.pipe(takeUntil(this.onDestroy$)).subscribe( + this.filters$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe( (res) => { this.resetFilter(); this.filters = res || []; @@ -267,7 +277,7 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp * */ getFilterKeysAfterExternalRefreshing(): void { - this.taskFilterCloudService.filterKeyToBeRefreshed$.pipe(takeUntil(this.onDestroy$)).subscribe((filterKey: string) => { + this.taskFilterCloudService.filterKeyToBeRefreshed$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((filterKey: string) => { this.updatedCountersSet.delete(filterKey); }); } diff --git a/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.ts index 5a3097c4ddf..fbf86f03843 100644 --- a/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.ts @@ -15,17 +15,28 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, OnInit, ViewEncapsulation, OnDestroy, ViewChild } from '@angular/core'; +import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + SimpleChanges, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model'; import { TaskCloudService } from '../../services/task-cloud.service'; -import { FormRenderingService, FormModel, ContentLinkModel, FormOutcomeEvent, FormFieldValidator, FORM_FIELD_VALIDATORS } from '@alfresco/adf-core'; +import { ContentLinkModel, FORM_FIELD_VALIDATORS, FormFieldValidator, FormModel, FormOutcomeEvent, FormRenderingService } from '@alfresco/adf-core'; import { AttachFileCloudWidgetComponent } from '../../../form/components/widgets/attach-file/attach-file-cloud-widget.component'; import { DropdownCloudWidgetComponent } from '../../../form/components/widgets/dropdown/dropdown-cloud.widget'; import { DateCloudWidgetComponent } from '../../../form/components/widgets/date/date-cloud.widget'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; import { FormCloudDisplayModeConfiguration } from '../../../services/form-fields.interfaces'; import { FormCloudComponent } from '../../../form/components/form-cloud.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-task-form', @@ -33,7 +44,7 @@ import { FormCloudComponent } from '../../../form/components/form-cloud.componen styleUrls: ['./task-form-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class TaskFormCloudComponent implements OnInit, OnChanges, OnDestroy { +export class TaskFormCloudComponent implements OnInit, OnChanges { /** App id to fetch corresponding form and values. */ @Input() appName: string = ''; @@ -138,7 +149,8 @@ export class TaskFormCloudComponent implements OnInit, OnChanges, OnDestroy { candidateGroups: string[] = []; loading: boolean = false; - onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(private taskCloudService: TaskCloudService, private formRenderingService: FormRenderingService) { this.formRenderingService.setComponentTypeResolver('upload', () => AttachFileCloudWidgetComponent, true); @@ -176,7 +188,7 @@ export class TaskFormCloudComponent implements OnInit, OnChanges, OnDestroy { this.loading = true; this.taskCloudService .getTaskById(this.appName, this.taskId) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((details) => { this.taskDetails = details; this.loading = false; @@ -271,9 +283,4 @@ export class TaskFormCloudComponent implements OnInit, OnChanges, OnDestroy { onDisplayModeOff(displayModeConfiguration: FormCloudDisplayModeConfiguration) { this.displayModeOff.emit(displayModeConfiguration); } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts index 191df48ed19..fdc490083d9 100644 --- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.ts @@ -15,25 +15,36 @@ * limitations under the License. */ -import { Component, Input, EventEmitter, Output, OnDestroy, OnChanges, OnInit, ViewEncapsulation } from '@angular/core'; -import { takeUntil, concatMap, catchError, finalize } from 'rxjs/operators'; -import { Subject, of, forkJoin } from 'rxjs'; import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + ViewEncapsulation +} from '@angular/core'; +import { catchError, concatMap, finalize } from 'rxjs/operators'; +import { forkJoin, of } from 'rxjs'; +import { + AppConfigService, + CardViewArrayItem, + CardViewArrayItemModel, + CardViewBaseItemModel, CardViewDateItemModel, + CardViewDatetimeItemModel, CardViewItem, + CardViewSelectItemModel, CardViewTextItemModel, - CardViewBaseItemModel, - CardViewArrayItemModel, - TranslationService, - AppConfigService, - UpdateNotification, CardViewUpdateService, - CardViewDatetimeItemModel, - CardViewArrayItem, - CardViewSelectItemModel + TranslationService, + UpdateNotification } from '@alfresco/adf-core'; import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model'; import { TaskCloudService } from '../../services/task-cloud.service'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-cloud-task-header', @@ -41,7 +52,7 @@ import { TaskCloudService } from '../../services/task-cloud.service'; styleUrls: ['./task-header-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges { +export class TaskHeaderCloudComponent implements OnInit, OnChanges { /** (Required) The name of the application. */ @Input() @@ -79,7 +90,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges { isLoading = true; processInstanceId: string; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private taskCloudService: TaskCloudService, @@ -93,13 +104,13 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges { ngOnInit() { this.taskCloudService.dataChangesDetected$ - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => { this.loadTaskDetailsById(this.appName, this.taskId); }); this.cardViewUpdateService.itemUpdated$ - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(this.updateTaskDetails.bind(this) ); } @@ -346,9 +357,4 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges { private isValidSelection(filteredProperties: string[], cardItem: CardViewBaseItemModel): boolean { return filteredProperties ? filteredProperties.indexOf(cardItem.key) >= 0 : true; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts index 367a585c429..fc091d4a6d1 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts @@ -15,38 +15,51 @@ * limitations under the License. */ -import { OnChanges, Input, SimpleChanges, Output, EventEmitter, ContentChild, AfterContentInit, OnDestroy, OnInit, Directive } from '@angular/core'; +import { + AfterContentInit, + ContentChild, + DestroyRef, + Directive, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + SimpleChanges +} from '@angular/core'; import { AppConfigService, - UserPreferencesService, - DataTableSchema, - UserPreferenceValues, - PaginatedComponent, - PaginationModel, - DataRowEvent, CustomEmptyContentTemplateDirective, DataCellEvent, - DataRowActionEvent, - DataRow, DataColumn, - ObjectDataTableAdapter + DataRow, + DataRowActionEvent, + DataRowEvent, + DataTableSchema, + ObjectDataTableAdapter, + PaginatedComponent, + PaginationModel, + UserPreferencesService, + UserPreferenceValues } from '@alfresco/adf-core'; import { taskPresetsCloudDefaultModel } from '../models/task-preset-cloud.model'; import { TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model'; -import { BehaviorSubject, Observable, Subject } from 'rxjs'; +import { BehaviorSubject, Observable } from 'rxjs'; import { TaskListCloudSortingModel } from '../../../models/task-list-sorting.model'; -import { map, take, takeUntil } from 'rxjs/operators'; +import { map, take } from 'rxjs/operators'; import { TaskCloudService } from '../../services/task-cloud.service'; import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { TasksListCloudPreferences } from '../models/tasks-cloud-preferences'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Directive() // eslint-disable-next-line @angular-eslint/directive-class-suffix export abstract class BaseTaskListCloudComponent extends DataTableSchema - implements OnChanges, AfterContentInit, PaginatedComponent, OnDestroy, OnInit // eslint-disable-next-line @typescript-eslint/brace-style -{ + implements OnChanges, AfterContentInit, PaginatedComponent, OnInit { + @ContentChild(CustomEmptyContentTemplateDirective) emptyCustomContent: CustomEmptyContentTemplateDirective; @@ -138,11 +151,11 @@ export abstract class BaseTaskListCloudComponent private defaultSorting = { key: 'startDate', direction: 'desc' }; boundReplacePriorityValues: (row: DataRow, col: DataColumn) => any; - private onDestroy$ = new Subject(); - protected abstract isLoading$: Observable; protected isLoadingPreferences$ = new BehaviorSubject(true); + protected readonly destroyRef = inject(DestroyRef); + constructor( appConfigService: AppConfigService, private taskCloudService: TaskCloudService, @@ -165,7 +178,7 @@ export abstract class BaseTaskListCloudComponent ngOnInit() { this.userPreferences .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((pageSize) => (this.size = pageSize)); } @@ -179,11 +192,6 @@ export abstract class BaseTaskListCloudComponent this.reload(); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - private retrieveTasksPreferences(): void { this.isLoadingPreferences$.next(true); this.cloudPreferenceService diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.ts index 685985e0c06..1317a74d3b0 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.ts @@ -15,15 +15,16 @@ * limitations under the License. */ -import { Component, ViewEncapsulation, Input, Inject, OnDestroy } from '@angular/core'; +import { Component, Inject, Input, ViewEncapsulation } from '@angular/core'; import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; import { ServiceTaskQueryCloudRequestModel } from '../models/service-task-cloud.model'; import { BaseTaskListCloudComponent } from './base-task-list-cloud.component'; import { ServiceTaskListCloudService } from '../services/service-task-list-cloud.service'; import { TaskCloudService } from '../../services/task-cloud.service'; -import { Subject, combineLatest, BehaviorSubject } from 'rxjs'; +import { BehaviorSubject, combineLatest } from 'rxjs'; import { PreferenceCloudServiceInterface, TASK_LIST_PREFERENCES_SERVICE_TOKEN } from '../../../services/public-api'; -import { map, takeUntil } from 'rxjs/operators'; +import { map } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const PRESET_KEY = 'adf-cloud-service-task-list.presets'; @@ -33,12 +34,10 @@ const PRESET_KEY = 'adf-cloud-service-task-list.presets'; styleUrls: ['./base-task-list-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent implements OnDestroy { +export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent { @Input() queryParams: { [key: string]: any } = {}; - private onDestroyServiceTaskList$ = new Subject(); - private isReloadingSubject$ = new BehaviorSubject(false); isLoading$ = combineLatest([this.isLoadingPreferences$, this.isReloadingSubject$]).pipe( map(([isLoadingPreferences, isReloading]) => isLoadingPreferences || isReloading) @@ -54,11 +53,6 @@ export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent im super(appConfigService, taskCloudService, userPreferences, PRESET_KEY, cloudPreferenceService); } - ngOnDestroy() { - this.onDestroyServiceTaskList$.next(true); - this.onDestroyServiceTaskList$.complete(); - } - reload() { this.isReloadingSubject$.next(true); @@ -66,7 +60,7 @@ export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent im if (this.requestNode.appName || this.requestNode.appName === '') { combineLatest([this.serviceTaskListCloudService.getServiceTaskByRequest(this.requestNode), this.isColumnSchemaCreated$]) - .pipe(takeUntil(this.onDestroyServiceTaskList$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe( ([tasks]) => { this.rows = tasks.list.entries; diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts index 81e7f6a6a6f..363376bb8d2 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts @@ -15,22 +15,27 @@ * limitations under the License. */ -import { Component, ViewEncapsulation, Input, Inject, OnDestroy, Optional } from '@angular/core'; +import { Component, Inject, Input, Optional, ViewEncapsulation } from '@angular/core'; import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; import { TaskListRequestModel, TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model'; import { BaseTaskListCloudComponent } from './base-task-list-cloud.component'; import { TaskCloudService } from '../../services/task-cloud.service'; -import { TASK_LIST_CLOUD_TOKEN, TASK_LIST_PREFERENCES_SERVICE_TOKEN, TASK_SEARCH_API_METHOD_TOKEN } from '../../../services/cloud-token.service'; +import { + TASK_LIST_CLOUD_TOKEN, + TASK_LIST_PREFERENCES_SERVICE_TOKEN, + TASK_SEARCH_API_METHOD_TOKEN +} from '../../../services/cloud-token.service'; import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { TaskListCloudServiceInterface } from '../../../services/task-list-cloud.service.interface'; -import { Subject, BehaviorSubject, combineLatest } from 'rxjs'; -import { filter, map, switchMap, take, takeUntil } from 'rxjs/operators'; +import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; +import { filter, map, switchMap, take } from 'rxjs/operators'; import { VariableMapperService } from '../../../services/variable-mapper.sevice'; import { ProcessListDataColumnCustomData } from '../../../models/data-column-custom-data'; import { TaskCloudModel } from '../../../models/task-cloud.model'; import { PaginatedEntries } from '@alfresco/js-api'; import { TaskInstanceCloudListViewModel } from '../models/task-cloud-view.model'; import { TasksListDatatableAdapter } from '../datatable/task-list-datatable-adapter'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const PRESET_KEY = 'adf-cloud-task-list.presets'; @@ -40,7 +45,7 @@ const PRESET_KEY = 'adf-cloud-task-list.presets'; styleUrls: ['./base-task-list-cloud.component.scss'], encapsulation: ViewEncapsulation.None }) -export class TaskListCloudComponent extends BaseTaskListCloudComponent implements OnDestroy { +export class TaskListCloudComponent extends BaseTaskListCloudComponent { /** * The assignee of the process. Possible values are: "assignee" (the current user is the assignee), * "candidate" (the current user is a task candidate", "group_x" (the task is assigned to a group @@ -187,8 +192,6 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent(); - rows: TaskInstanceCloudListViewModel[] = []; dataAdapter: TasksListDatatableAdapter | undefined; @@ -223,7 +226,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent }) => { @@ -247,11 +250,6 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent(); - constructor(private appsProcessService: AppsProcessService) {} ngOnInit() { @@ -101,11 +107,6 @@ export class AppsListComponent implements OnInit, AfterContentInit, OnDestroy { this.load(); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - ngAfterContentInit() { if (this.emptyCustomContent) { this.hasEmptyCustomContentTemplate = true; diff --git a/lib/process-services/src/lib/form/form.component.ts b/lib/process-services/src/lib/form/form.component.ts index 23414b2ed00..f1e1d48cf51 100644 --- a/lib/process-services/src/lib/form/form.component.ts +++ b/lib/process-services/src/lib/form/form.component.ts @@ -16,36 +16,36 @@ */ import { + ChangeDetectorRef, Component, + DestroyRef, EventEmitter, + inject, Input, + OnChanges, + OnInit, Output, - ViewEncapsulation, SimpleChanges, - OnInit, - OnDestroy, - OnChanges, - inject, - ChangeDetectorRef + ViewEncapsulation } from '@angular/core'; import { - WidgetVisibilityService, - FormService, + ContentLinkModel, + FormatSpacePipe, FormBaseComponent, - FormOutcomeModel, - FormEvent, FormErrorEvent, + FormEvent, FormFieldModel, FormModel, FormOutcomeEvent, + FormOutcomeModel, + FormRendererComponent, + FormService, FormValues, - ContentLinkModel, TaskProcessVariableModel, - FormRendererComponent, - FormatSpacePipe + WidgetVisibilityService } from '@alfresco/adf-core'; -import { from, Observable, of, Subject } from 'rxjs'; -import { switchMap, takeUntil } from 'rxjs/operators'; +import { from, Observable, of } from 'rxjs'; +import { switchMap } from 'rxjs/operators'; import { EcmModelService } from './services/ecm-model.service'; import { ModelService } from './services/model.service'; import { EditorService } from './services/editor.service'; @@ -58,6 +58,7 @@ import { MatCardModule } from '@angular/material/card'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-form', @@ -67,7 +68,7 @@ import { TranslateModule } from '@ngx-translate/core'; styleUrls: ['./form.component.scss'], encapsulation: ViewEncapsulation.None }) -export class FormComponent extends FormBaseComponent implements OnInit, OnDestroy, OnChanges { +export class FormComponent extends FormBaseComponent implements OnInit, OnChanges { protected formService = inject(FormService); protected taskFormService = inject(TaskFormService); protected taskService = inject(TaskService); @@ -132,16 +133,16 @@ export class FormComponent extends FormBaseComponent implements OnInit, OnDestro debugMode: boolean = false; - protected onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor() { super(); } ngOnInit() { - this.formService.formContentClicked.pipe(takeUntil(this.onDestroy$)).subscribe((content) => this.formContentClicked.emit(content)); + this.formService.formContentClicked.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((content) => this.formContentClicked.emit(content)); - this.formService.validateForm.pipe(takeUntil(this.onDestroy$)).subscribe((validateFormEvent) => { + this.formService.validateForm.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((validateFormEvent) => { if (validateFormEvent.errorsField.length > 0) { this.formError.next(validateFormEvent.errorsField); this.cdRef.detectChanges(); @@ -149,11 +150,6 @@ export class FormComponent extends FormBaseComponent implements OnInit, OnDestro }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - ngOnChanges(changes: SimpleChanges) { const taskId = changes['taskId']; if (taskId?.currentValue) { diff --git a/lib/process-services/src/lib/form/start-form/start-form.component.ts b/lib/process-services/src/lib/form/start-form/start-form.component.ts index 0acb308d013..79b0ec3e584 100644 --- a/lib/process-services/src/lib/form/start-form/start-form.component.ts +++ b/lib/process-services/src/lib/form/start-form/start-form.component.ts @@ -19,15 +19,14 @@ import { Component, ElementRef, EventEmitter, + inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, - ViewEncapsulation, - OnDestroy, - inject + ViewEncapsulation } from '@angular/core'; import { FormComponent } from '../form.component'; import { ContentLinkModel, FormOutcomeModel, FormRendererComponent } from '@alfresco/adf-core'; @@ -46,7 +45,7 @@ import { MatIconModule } from '@angular/material/icon'; styleUrls: ['./start-form.component.scss'], encapsulation: ViewEncapsulation.None }) -export class StartFormComponent extends FormComponent implements OnChanges, OnInit, OnDestroy { +export class StartFormComponent extends FormComponent implements OnChanges, OnInit { public processService = inject(ProcessService); /** Definition ID of the process to start, this parameter can not be use in combination with processId */ diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts index ac23c61967b..a475c8e69a8 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts @@ -15,24 +15,23 @@ * limitations under the License. */ -import { Component, Inject, ViewEncapsulation, ViewChild, OnDestroy, OnInit } from '@angular/core'; +import { Component, DestroyRef, inject, Inject, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; -import { LoginDialogPanelComponent, TranslationService, AuthenticationService } from '@alfresco/adf-core'; +import { AuthenticationService, LoginDialogPanelComponent, TranslationService } from '@alfresco/adf-core'; import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface'; import { + AlfrescoApiService, + ContentNodeSelectorPanelComponent, DocumentListService, - SitesService, SearchService, - ContentNodeSelectorPanelComponent, - AlfrescoApiService + SitesService } from '@alfresco/adf-content-services'; import { ExternalAlfrescoApiService } from '../../services/external-alfresco-api.service'; import { Node } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { TranslateModule } from '@ngx-translate/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-attach-file-widget-dialog', @@ -49,7 +48,7 @@ import { takeUntil } from 'rxjs/operators'; { provide: AlfrescoApiService, useClass: ExternalAlfrescoApiService } ] }) -export class AttachFileWidgetDialogComponent implements OnInit, OnDestroy { +export class AttachFileWidgetDialogComponent implements OnInit { @ViewChild('adfLoginPanel') loginPanel: LoginDialogPanelComponent; @@ -58,7 +57,7 @@ export class AttachFileWidgetDialogComponent implements OnInit, OnDestroy { buttonActionName: string; chosenNode: Node[]; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private translation: TranslationService, @@ -74,18 +73,12 @@ export class AttachFileWidgetDialogComponent implements OnInit, OnDestroy { } ngOnInit() { - this.authenticationService.onLogin.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.registerAndClose()); + this.authenticationService.onLogin.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.registerAndClose()); if (this.isLoggedIn()) { this.registerAndClose(); } } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - isLoggedIn(): boolean { return !!this.externalApiService.getInstance()?.isLoggedIn(); } diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts index 8fd2f046f32..b48bbe77a33 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget.component.ts @@ -17,12 +17,24 @@ /* eslint-disable @angular-eslint/component-selector */ -import { Component, isDevMode, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { AppConfigService, AppConfigValues, DownloadService, ErrorWidgetComponent, FormService, ThumbnailService } from '@alfresco/adf-core'; +import { Component, DestroyRef, inject, isDevMode, OnInit, ViewEncapsulation } from '@angular/core'; +import { + AppConfigService, + AppConfigValues, + DownloadService, + ErrorWidgetComponent, + FormService, + ThumbnailService +} from '@alfresco/adf-core'; import { AlfrescoIconComponent, ContentNodeDialogService, ContentService } from '@alfresco/adf-content-services'; -import { AlfrescoEndpointRepresentation, Node, NodeChildAssociation, RelatedContentRepresentation } from '@alfresco/js-api'; -import { from, of, Subject, zip } from 'rxjs'; -import { mergeMap, takeUntil } from 'rxjs/operators'; +import { + AlfrescoEndpointRepresentation, + Node, + NodeChildAssociation, + RelatedContentRepresentation +} from '@alfresco/js-api'; +import { from, of, zip } from 'rxjs'; +import { mergeMap } from 'rxjs/operators'; import { AttachFileWidgetDialogService } from './attach-file-widget-dialog.service'; import { UploadWidgetComponent } from '../upload/upload.widget'; import { ProcessContentService } from '../../services/process-content.service'; @@ -34,6 +46,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatMenuModule } from '@angular/material/menu'; import { MatListModule } from '@angular/material/list'; import { ActivatedRoute, Router } from '@angular/router'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'attach-widget', @@ -63,11 +76,12 @@ import { ActivatedRoute, Router } from '@angular/router'; }, encapsulation: ViewEncapsulation.None }) -export class AttachFileWidgetComponent extends UploadWidgetComponent implements OnInit, OnDestroy { +export class AttachFileWidgetComponent extends UploadWidgetComponent implements OnInit { typeId = 'AttachFileWidgetComponent'; repositoryList: AlfrescoEndpointRepresentation[] = []; private tempFilesList = []; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor( public formService: FormService, @@ -96,18 +110,13 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements this.repositoryList = repoList; }); - this.formService.taskSaved.pipe(takeUntil(this.onDestroy$)).subscribe((formSaved) => { + this.formService.taskSaved.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((formSaved) => { if (formSaved.form.id === this.field.form.id) { this.tempFilesList = []; } }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - isFileSourceConfigured(): boolean { return !!this.field.params?.fileSource; } diff --git a/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts b/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts index 717028268f7..02326416bd9 100644 --- a/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts +++ b/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts @@ -17,17 +17,24 @@ /* eslint-disable @angular-eslint/component-selector */ -import { Component, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { FormService, FormFieldOption, WidgetComponent, ErrorWidgetComponent, ErrorMessageModel, FormFieldModel } from '@alfresco/adf-core'; +import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { + ErrorMessageModel, + ErrorWidgetComponent, + FormFieldModel, + FormFieldOption, + FormService, + WidgetComponent +} from '@alfresco/adf-core'; import { ProcessDefinitionService } from '../../services/process-definition.service'; import { TaskFormService } from '../../services/task-form.service'; import { CommonModule } from '@angular/common'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; import { AbstractControl, FormControl, ReactiveFormsModule, ValidationErrors, ValidatorFn } from '@angular/forms'; -import { filter, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; +import { filter } from 'rxjs/operators'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'dropdown-widget', @@ -48,14 +55,14 @@ import { TranslateModule } from '@ngx-translate/core'; }, encapsulation: ViewEncapsulation.None }) -export class DropdownWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { +export class DropdownWidgetComponent extends WidgetComponent implements OnInit { public formsService = inject(FormService); public taskFormService = inject(TaskFormService); public processDefinitionService = inject(ProcessDefinitionService); dropdownControl = new FormControl(undefined); - private readonly onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); get isReadOnlyType(): boolean { return this.field.type === 'readonly'; @@ -89,11 +96,6 @@ export class DropdownWidgetComponent extends WidgetComponent implements OnInit, this.initFormControl(); } - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - getValuesByTaskId() { this.taskFormService.getRestFieldValues(this.field.form.taskId, this.field.id).subscribe((formFieldOption) => { const options = []; @@ -134,7 +136,7 @@ export class DropdownWidgetComponent extends WidgetComponent implements OnInit, this.dropdownControl.valueChanges .pipe( filter(() => !!this.field), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((value) => { this.setOptionValue(value, this.field); diff --git a/lib/process-services/src/lib/process-list/components/process-filters/process-filters.component.ts b/lib/process-services/src/lib/process-list/components/process-filters/process-filters.component.ts index a158df351c2..ca70ed9f29a 100644 --- a/lib/process-services/src/lib/process-list/components/process-filters/process-filters.component.ts +++ b/lib/process-services/src/lib/process-list/components/process-filters/process-filters.component.ts @@ -15,18 +15,18 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { ProcessInstanceFilterRepresentation, UserProcessInstanceFilterRepresentation } from '@alfresco/js-api'; -import { Subject } from 'rxjs'; import { ProcessFilterService } from '../../services/process-filter.service'; import { AppsProcessService } from '../../../services/apps-process.service'; import { IconModel } from '../../../app-list/icon.model'; import { NavigationStart, Router } from '@angular/router'; -import { filter, takeUntil } from 'rxjs/operators'; +import { filter } from 'rxjs/operators'; import { CommonModule, Location } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; import { IconComponent } from '@alfresco/adf-core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-process-instance-filters', @@ -36,7 +36,7 @@ import { IconComponent } from '@alfresco/adf-core'; styleUrls: ['./process-filters.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ProcessFiltersComponent implements OnInit, OnChanges, OnDestroy { +export class ProcessFiltersComponent implements OnInit, OnChanges { /** * The parameters to filter the task filter. If there is no match then the default one * (ie, the first filter in the list) is selected. @@ -78,10 +78,11 @@ export class ProcessFiltersComponent implements OnInit, OnChanges, OnDestroy { active = false; isProcessRoute: boolean; isProcessActive: boolean; - private onDestroy$ = new Subject(); private iconsMDL: IconModel; + private readonly destroyRef = inject(DestroyRef); + constructor( private processFilterService: ProcessFilterService, private appsProcessService: AppsProcessService, @@ -94,7 +95,7 @@ export class ProcessFiltersComponent implements OnInit, OnChanges, OnDestroy { this.router.events .pipe( filter((event) => event instanceof NavigationStart), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((navigationStart: NavigationStart) => { const activeRoute = navigationStart.url; @@ -248,9 +249,4 @@ export class ProcessFiltersComponent implements OnInit, OnChanges, OnDestroy { this.filters = []; this.currentFilter = undefined; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services/src/lib/process-list/components/process-instance-tasks/process-instance-tasks.component.ts b/lib/process-services/src/lib/process-list/components/process-instance-tasks/process-instance-tasks.component.ts index 8dbdae2e994..6dcea875cb7 100644 --- a/lib/process-services/src/lib/process-list/components/process-instance-tasks/process-instance-tasks.component.ts +++ b/lib/process-services/src/lib/process-list/components/process-instance-tasks/process-instance-tasks.component.ts @@ -16,12 +16,12 @@ */ import { CommonModule, DatePipe } from '@angular/common'; -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, OnDestroy } from '@angular/core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; -import { Observable, Observer, Subject } from 'rxjs'; +import { Observable, Observer } from 'rxjs'; import { TaskDetailsEvent } from '../../../task-list'; import { ProcessService } from '../../services/process.service'; -import { share, takeUntil } from 'rxjs/operators'; +import { share } from 'rxjs/operators'; import { ProcessInstanceRepresentation, TaskRepresentation } from '@alfresco/js-api'; import { MatButtonModule } from '@angular/material/button'; import { TranslateModule } from '@ngx-translate/core'; @@ -29,6 +29,7 @@ import { MatChipsModule } from '@angular/material/chips'; import { MatListModule } from '@angular/material/list'; import { MatIconModule } from '@angular/material/icon'; import { StartFormComponent } from '../../../form'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-process-instance-tasks', @@ -37,7 +38,7 @@ import { StartFormComponent } from '../../../form'; templateUrl: './process-instance-tasks.component.html', styleUrls: ['./process-instance-tasks.component.css'] }) -export class ProcessInstanceTasksComponent implements OnInit, OnChanges, OnDestroy { +export class ProcessInstanceTasksComponent implements OnInit, OnChanges { /** The ID of the process instance to display tasks for. */ @Input() processInstanceDetails: ProcessInstanceRepresentation; @@ -72,7 +73,8 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges, OnDestr private taskObserver: Observer; private completedTaskObserver: Observer; - private onDestroy$ = new Subject(); + + private readonly destroyRef = inject(DestroyRef); constructor(private processService: ProcessService, private dialog: MatDialog) { this.task$ = new Observable((observer) => (this.taskObserver = observer)).pipe(share()); @@ -80,14 +82,9 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges, OnDestr } ngOnInit() { - this.task$.pipe(takeUntil(this.onDestroy$)).subscribe((task) => this.activeTasks.push(task)); - - this.completedTask$.pipe(takeUntil(this.onDestroy$)).subscribe((task) => this.completedTasks.push(task)); - } + this.task$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((task) => this.activeTasks.push(task)); - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); + this.completedTask$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((task) => this.completedTasks.push(task)); } ngOnChanges(changes: SimpleChanges) { diff --git a/lib/process-services/src/lib/process-list/components/start-process/start-process.component.ts b/lib/process-services/src/lib/process-list/components/start-process/start-process.component.ts index 8d8e4bfbf2d..056489efe66 100644 --- a/lib/process-services/src/lib/process-list/components/start-process/start-process.component.ts +++ b/lib/process-services/src/lib/process-list/components/start-process/start-process.component.ts @@ -15,22 +15,40 @@ * limitations under the License. */ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation, OnDestroy } from '@angular/core'; -import { AppConfigService, AppConfigValues, EmptyContentComponent, FormValues, LocalizedDatePipe } from '@alfresco/adf-core'; +import { + Component, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + SimpleChanges, + ViewChild, + ViewEncapsulation +} from '@angular/core'; +import { + AppConfigService, + AppConfigValues, + EmptyContentComponent, + FormValues, + LocalizedDatePipe +} from '@alfresco/adf-core'; import { AppsProcessService } from '../../../services/apps-process.service'; import { ProcessService } from '../../services/process.service'; -import { UntypedFormControl, Validators, AbstractControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { Observable, Subject, forkJoin } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { AbstractControl, FormsModule, ReactiveFormsModule, UntypedFormControl, Validators } from '@angular/forms'; +import { forkJoin, Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; import { MatAutocompleteModule, MatAutocompleteTrigger } from '@angular/material/autocomplete'; import { MatSelectChange, MatSelectModule } from '@angular/material/select'; import { StartFormComponent } from '../../../form'; import { AppDefinitionRepresentation, Node, + ProcessDefinitionRepresentation, ProcessInstanceRepresentation, RelatedContentRepresentation, - ProcessDefinitionRepresentation, RestVariable } from '@alfresco/js-api'; import { ActivitiContentService } from '../../../form/services/activiti-alfresco.service'; @@ -42,6 +60,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const MAX_LENGTH = 255; const DATE_TIME_IDENTIFIER_REG_EXP = new RegExp('%{datetime}', 'i'); @@ -69,7 +88,7 @@ const PROCESS_DEFINITION_IDENTIFIER_REG_EXP = new RegExp('%{processdefinition}', styleUrls: ['./start-process.component.scss'], encapsulation: ViewEncapsulation.None }) -export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestroy { +export class StartProcessInstanceComponent implements OnChanges, OnInit { /** * Limit the list of processes that can be started to those * contained in the specified app. @@ -152,7 +171,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr isAppsLoading = true; movedNodeToPS: FormValues; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor( private processService: ProcessService, @@ -174,7 +193,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr this.filteredProcessesDefinitions$ = this.processDefinitionInput.valueChanges.pipe( map((value) => this._filter(value)), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ); this.contentService.getAlfrescoRepositories().subscribe((repoList) => { @@ -185,11 +204,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr }); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - ngOnChanges(changes: SimpleChanges) { if (changes['values']?.currentValue) { this.moveNodeFromCStoPS(); diff --git a/lib/process-services/src/lib/task-list/components/no-task-details/no-task-detail-template.directive.spec.ts b/lib/process-services/src/lib/task-list/components/no-task-details/no-task-detail-template.directive.spec.ts index dc57825b543..2903324e7d3 100644 --- a/lib/process-services/src/lib/task-list/components/no-task-details/no-task-detail-template.directive.spec.ts +++ b/lib/process-services/src/lib/task-list/components/no-task-details/no-task-detail-template.directive.spec.ts @@ -23,7 +23,7 @@ describe('NoTaskDetailsTemplateDirective', () => { let detailsComponent: TaskDetailsComponent; beforeEach(() => { - detailsComponent = new TaskDetailsComponent(null, null, null, null); + detailsComponent = new TaskDetailsComponent(null, null, null, null, null); component = new NoTaskDetailsTemplateDirective(detailsComponent); }); diff --git a/lib/process-services/src/lib/task-list/components/start-task/start-task.component.ts b/lib/process-services/src/lib/task-list/components/start-task/start-task.component.ts index 0cd9c56cc1c..bce075898ea 100644 --- a/lib/process-services/src/lib/task-list/components/start-task/start-task.component.ts +++ b/lib/process-services/src/lib/task-list/components/start-task/start-task.component.ts @@ -15,14 +15,21 @@ * limitations under the License. */ -import { FormFieldModel, FormModel, DateFnsUtils, AdfDateFnsAdapter, ADF_DATE_FORMATS } from '@alfresco/adf-core'; -import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, OnDestroy } from '@angular/core'; +import { ADF_DATE_FORMATS, AdfDateFnsAdapter, DateFnsUtils, FormFieldModel, FormModel } from '@alfresco/adf-core'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; -import { EMPTY, Observable, Subject } from 'rxjs'; +import { EMPTY, Observable } from 'rxjs'; import { Form } from '../../models/form.model'; import { TaskListService } from '../../services/tasklist.service'; -import { switchMap, defaultIfEmpty, takeUntil } from 'rxjs/operators'; -import { UntypedFormBuilder, AbstractControl, Validators, UntypedFormGroup, UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; +import { defaultIfEmpty, switchMap } from 'rxjs/operators'; +import { + AbstractControl, + ReactiveFormsModule, + UntypedFormBuilder, + UntypedFormControl, + UntypedFormGroup, + Validators +} from '@angular/forms'; import { isValid } from 'date-fns'; import { TaskRepresentation } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; @@ -35,6 +42,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatSelectModule } from '@angular/material/select'; import { MatButtonModule } from '@angular/material/button'; import { PeopleWidgetComponent } from '../../../form'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const FORMAT_DATE = 'DD/MM/YYYY'; const MAX_LENGTH = 255; @@ -63,7 +71,7 @@ const MAX_LENGTH = 255; ], encapsulation: ViewEncapsulation.None }) -export class StartTaskComponent implements OnInit, OnDestroy { +export class StartTaskComponent implements OnInit { /** (required) The id of the app. */ @Input() appId: number; @@ -93,7 +101,7 @@ export class StartTaskComponent implements OnInit, OnDestroy { maxTaskNameLength: number = MAX_LENGTH; loading = false; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private taskService: TaskListService, private formBuilder: UntypedFormBuilder) {} @@ -110,11 +118,6 @@ export class StartTaskComponent implements OnInit, OnDestroy { this.buildForm(); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - buildForm(): void { this.taskForm = this.formBuilder.group({ name: new UntypedFormControl(this.taskDetailsModel.name, [ @@ -126,7 +129,7 @@ export class StartTaskComponent implements OnInit, OnDestroy { formKey: new UntypedFormControl('') }); - this.taskForm.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((taskFormValues) => this.setTaskDetails(taskFormValues)); + this.taskForm.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((taskFormValues) => this.setTaskDetails(taskFormValues)); } private whitespaceValidator(control: UntypedFormControl): any { diff --git a/lib/process-services/src/lib/task-list/components/task-details/task-details.component.ts b/lib/process-services/src/lib/task-list/components/task-details/task-details.component.ts index f546ec3acdf..3b1fa89fc89 100644 --- a/lib/process-services/src/lib/task-list/components/task-details/task-details.component.ts +++ b/lib/process-services/src/lib/task-list/components/task-details/task-details.component.ts @@ -29,10 +29,10 @@ import { } from '@alfresco/adf-core'; import { Component, + DestroyRef, EventEmitter, Input, OnChanges, - OnDestroy, OnInit, Output, SimpleChanges, @@ -41,9 +41,9 @@ import { ViewEncapsulation } from '@angular/core'; import { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; -import { Observable, Observer, of, Subject } from 'rxjs'; +import { Observable, Observer, of } from 'rxjs'; import { TaskListService } from '../../services/tasklist.service'; -import { catchError, share, takeUntil } from 'rxjs/operators'; +import { catchError, share } from 'rxjs/operators'; import { TaskFormComponent } from '../task-form/task-form.component'; import { PeopleProcessService } from '../../../services/people-process.service'; import { LightUserRepresentation, TaskQueryRepresentation, TaskRepresentation } from '@alfresco/js-api'; @@ -56,6 +56,7 @@ import { TaskCommentsComponent, TaskCommentsService } from '../../../task-commen import { ChecklistComponent } from '../checklist/checklist.component'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-task-details', @@ -86,7 +87,7 @@ import { MatCardModule } from '@angular/material/card'; styleUrls: ['./task-details.component.scss'], encapsulation: ViewEncapsulation.None }) -export class TaskDetailsComponent implements OnInit, OnChanges, OnDestroy { +export class TaskDetailsComponent implements OnInit, OnChanges { @ViewChild('errorDialog') errorDialog: TemplateRef; @@ -207,13 +208,13 @@ export class TaskDetailsComponent implements OnInit, OnChanges, OnDestroy { data: any; private peopleSearchObserver: Observer; - private onDestroy$ = new Subject(); constructor( - private taskListService: TaskListService, - private peopleProcessService: PeopleProcessService, - private cardViewUpdateService: CardViewUpdateService, - private dialog: MatDialog + private readonly taskListService: TaskListService, + private readonly peopleProcessService: PeopleProcessService, + private readonly cardViewUpdateService: CardViewUpdateService, + private readonly dialog: MatDialog, + private readonly destroyRef: DestroyRef ) {} ngOnInit() { @@ -223,14 +224,9 @@ export class TaskDetailsComponent implements OnInit, OnChanges, OnDestroy { this.loadDetails(this.taskId); } - this.cardViewUpdateService.itemUpdated$.pipe(takeUntil(this.onDestroy$)).subscribe(this.updateTaskDetails.bind(this)); + this.cardViewUpdateService.itemUpdated$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.updateTaskDetails.bind(this)); - this.cardViewUpdateService.itemClicked$.pipe(takeUntil(this.onDestroy$)).subscribe(this.clickTaskDetails.bind(this)); - } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); + this.cardViewUpdateService.itemClicked$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.clickTaskDetails.bind(this)); } ngOnChanges(changes: SimpleChanges): void { diff --git a/lib/process-services/src/lib/task-list/components/task-filters/task-filters.component.ts b/lib/process-services/src/lib/task-list/components/task-filters/task-filters.component.ts index 4a76cb62913..e7e4c1f6cbe 100644 --- a/lib/process-services/src/lib/task-list/components/task-filters/task-filters.component.ts +++ b/lib/process-services/src/lib/task-list/components/task-filters/task-filters.component.ts @@ -16,18 +16,18 @@ */ import { AppsProcessService } from '../../../services/apps-process.service'; -import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; +import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { TaskFilterService } from '../../services/task-filter.service'; import { TaskListService } from '../../services/tasklist.service'; import { IconModel } from '../../../app-list/icon.model'; import { ActivatedRoute, NavigationStart, Router } from '@angular/router'; -import { filter, takeUntil } from 'rxjs/operators'; +import { filter } from 'rxjs/operators'; import { UserTaskFilterRepresentation } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; import { IconComponent } from '@alfresco/adf-core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'adf-task-filters', @@ -37,7 +37,7 @@ import { IconComponent } from '@alfresco/adf-core'; styleUrls: ['./task-filters.component.scss'], encapsulation: ViewEncapsulation.None }) -export class TaskFiltersComponent implements OnInit, OnChanges, OnDestroy { +export class TaskFiltersComponent implements OnInit, OnChanges { /** * Parameters to use for the task filter. If there is no match then * the default filter (the first one the list) is selected. @@ -76,12 +76,13 @@ export class TaskFiltersComponent implements OnInit, OnChanges, OnDestroy { currentFilter: UserTaskFilterRepresentation; filters: UserTaskFilterRepresentation[] = []; - private onDestroy$ = new Subject(); isTaskRoute: boolean; isTaskActive: boolean; private iconsMDL: IconModel; + private readonly destroyRef = inject(DestroyRef); + constructor( private taskFilterService: TaskFilterService, private taskListService: TaskListService, @@ -95,7 +96,7 @@ export class TaskFiltersComponent implements OnInit, OnChanges, OnDestroy { this.router.events .pipe( filter((event) => event instanceof NavigationStart), - takeUntil(this.onDestroy$) + takeUntilDestroyed(this.destroyRef) ) .subscribe((navigationStart: NavigationStart) => { const activeRoute = navigationStart.url; @@ -271,9 +272,4 @@ export class TaskFiltersComponent implements OnInit, OnChanges, OnDestroy { this.filters = []; this.currentFilter = undefined; } - - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } } diff --git a/lib/process-services/src/lib/task-list/components/task-header/task-header.component.ts b/lib/process-services/src/lib/task-list/components/task-header/task-header.component.ts index 89395bb9f7a..b021f4c1f28 100644 --- a/lib/process-services/src/lib/task-list/components/task-header/task-header.component.ts +++ b/lib/process-services/src/lib/task-list/components/task-header/task-header.component.ts @@ -90,10 +90,11 @@ export class TaskHeaderComponent implements OnChanges, OnInit { dateLocale: string; private currentUserId: number; - private readonly destroyRef = inject(DestroyRef); private readonly usersSubject$ = new BehaviorSubject[]>([]); users$ = this.usersSubject$.asObservable(); + private readonly destroyRef = inject(DestroyRef); + constructor( private peopleProcessService: PeopleProcessService, private translationService: TranslationService, diff --git a/lib/process-services/src/lib/task-list/components/task-list/task-list.component.ts b/lib/process-services/src/lib/task-list/components/task-list/task-list.component.ts index 690e40b605f..dc4c80c329b 100644 --- a/lib/process-services/src/lib/task-list/components/task-list/task-list.component.ts +++ b/lib/process-services/src/lib/task-list/components/task-list/task-list.component.ts @@ -16,32 +16,45 @@ */ import { - DataRowEvent, - DataTableAdapter, - DataTableSchema, + AppConfigService, CustomEmptyContentTemplateDirective, CustomLoadingContentTemplateDirective, - AppConfigService, - PaginatedComponent, - UserPreferencesService, - UserPreferenceValues, - PaginationModel, DataCellEvent, + DataRowEvent, + DataTableAdapter, + DataTableComponent, + DataTableSchema, DEFAULT_PAGINATION, EmptyContentComponent, - DataTableComponent, LoadingContentTemplateDirective, - NoContentTemplateDirective + NoContentTemplateDirective, + PaginatedComponent, + PaginationModel, + UserPreferencesService, + UserPreferenceValues } from '@alfresco/adf-core'; -import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, Output, SimpleChanges, OnDestroy, OnInit } from '@angular/core'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { + AfterContentInit, + Component, + ContentChild, + DestroyRef, + EventEmitter, + inject, + Input, + OnChanges, + OnInit, + Output, + SimpleChanges +} from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; import { taskPresetsDefaultModel } from '../../models/task-preset.model'; import { TaskListService } from '../../services/tasklist.service'; -import { takeUntil, finalize } from 'rxjs/operators'; +import { finalize } from 'rxjs/operators'; import { TaskQueryRepresentation, TaskRepresentation } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { TranslateModule } from '@ngx-translate/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; export const PRESET_KEY = 'adf-task-list.presets'; @@ -60,7 +73,7 @@ export const PRESET_KEY = 'adf-task-list.presets'; templateUrl: './task-list.component.html', styleUrls: ['./task-list.component.css'] }) -export class TaskListComponent extends DataTableSchema implements OnChanges, AfterContentInit, PaginatedComponent, OnDestroy, OnInit { +export class TaskListComponent extends DataTableSchema implements OnChanges, AfterContentInit, PaginatedComponent, OnInit { @ContentChild(CustomEmptyContentTemplateDirective) customEmptyContent: CustomEmptyContentTemplateDirective; @@ -212,7 +225,7 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft */ hasCustomDataSource: boolean = false; - private onDestroy$ = new Subject(); + private readonly destroyRef = inject(DestroyRef); constructor(private taskListService: TaskListService, appConfigService: AppConfigService, private userPreferences: UserPreferencesService) { super(appConfigService, PRESET_KEY, taskPresetsDefaultModel); @@ -238,15 +251,10 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft ngOnInit() { this.userPreferences .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) + .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((pageSize) => (this.size = pageSize)); } - ngOnDestroy() { - this.onDestroy$.next(true); - this.onDestroy$.complete(); - } - setCustomDataSource(rows: any[]): void { if (rows) { this.rows = rows; From b575d16e6141aba400226ea3d2724e900860797a Mon Sep 17 00:00:00 2001 From: Robert Duda Date: Tue, 19 Nov 2024 13:09:43 +0100 Subject: [PATCH 12/35] AAE-28529 Fix process list loading (#10407) --- .../process-list/components/process-list-cloud.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts index 96f852d2458..3f1fcb361fb 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts @@ -49,7 +49,7 @@ import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; import { processCloudPresetsDefaultModel } from '../models/process-cloud-preset.model'; import { ProcessListRequestModel, ProcessQueryCloudRequestModel } from '../models/process-cloud-query-request.model'; import { ProcessListCloudSortingModel } from '../models/process-list-sorting.model'; -import { filter, map, switchMap, take } from 'rxjs/operators'; +import { filter, map, switchMap, take, tap } from 'rxjs/operators'; import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN, @@ -299,12 +299,11 @@ export class ProcessListCloudComponent totalItems: 0 }); - this.isLoading = true; - combineLatest([ this.isColumnSchemaCreated$, this.fetchProcessesTrigger$ ]).pipe( + tap(() => this.isLoading = true), filter(([isColumnSchemaCreated]) => isColumnSchemaCreated), switchMap(() => { if (this.searchMethod === 'POST') { From ab1b54531c96bfcdf6363c3031a926bc1fe839af Mon Sep 17 00:00:00 2001 From: Robert Duda Date: Wed, 20 Nov 2024 11:26:15 +0100 Subject: [PATCH 13/35] AAE-28584 Fix process tasks not showing after clicking in the list (#10410) --- .../src/lib/models/filter-cloud-model.ts | 2 ++ .../process-task-list-cloud.service.ts | 26 ++++++++++++++++++- .../components/task-list-cloud.component.ts | 7 ++--- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts b/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts index 88dfa19461a..38988ee82e5 100644 --- a/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts +++ b/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts @@ -114,6 +114,7 @@ export class TaskListRequestModel { status?: string[]; completedBy?: string[]; assignee?: string[]; + processInstanceId?: string; createdFrom?: string; createdTo?: string; lastModifiedFrom?: string; @@ -148,6 +149,7 @@ export class TaskListRequestModel { this.status = obj.status; this.completedBy = obj.completedBy; this.assignee = obj.assignee; + this.processInstanceId = obj.processInstanceId; this.createdFrom = obj.createdFrom; this.createdTo = obj.createdTo; this.lastModifiedFrom = obj.lastModifiedFrom; diff --git a/lib/process-services-cloud/src/lib/process/process-list/services/process-task-list-cloud.service.ts b/lib/process-services-cloud/src/lib/process/process-list/services/process-task-list-cloud.service.ts index 9ee85544736..c02842c9605 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/services/process-task-list-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/services/process-task-list-cloud.service.ts @@ -19,7 +19,7 @@ import { Injectable } from '@angular/core'; import { Observable, throwError } from 'rxjs'; import { BaseCloudService } from '../../../services/base-cloud.service'; import { map } from 'rxjs/operators'; -import { TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model'; +import { TaskListRequestModel, TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model'; import { TaskCloudNodePaging } from '../../../models/task-cloud.model'; import { TaskListCloudSortingModel } from '../../../models/task-list-sorting.model'; @@ -55,6 +55,30 @@ export class ProcessTaskListCloudService extends BaseCloudService { } } + /** + * Retrieves a list of tasks using an object with optional query properties. + * + * @param requestNode Query object + * @param queryUrl Query url + * @returns List of tasks + */ + fetchTaskList(requestNode: TaskListRequestModel, queryUrl?: string): Observable { + return this.getTaskByRequest( + new TaskQueryCloudRequestModel({ + appName: requestNode.appName, + processInstanceId: requestNode.processInstanceId + }), + queryUrl + ); + } + + getTaskListCounter(requestNode: TaskListRequestModel): Observable { + if (!requestNode.appName) { + return throwError(() => new Error('Appname not configured')); + } + return this.fetchTaskList(requestNode).pipe(map((tasks) => tasks.list.pagination.totalItems)); + } + protected buildQueryParams(requestNode: TaskQueryCloudRequestModel): any { const queryParam: any = {}; for (const property in requestNode) { diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts index 363376bb8d2..86df75cc284 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts @@ -20,11 +20,7 @@ import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; import { TaskListRequestModel, TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model'; import { BaseTaskListCloudComponent } from './base-task-list-cloud.component'; import { TaskCloudService } from '../../services/task-cloud.service'; -import { - TASK_LIST_CLOUD_TOKEN, - TASK_LIST_PREFERENCES_SERVICE_TOKEN, - TASK_SEARCH_API_METHOD_TOKEN -} from '../../../services/cloud-token.service'; +import { TASK_LIST_CLOUD_TOKEN, TASK_LIST_PREFERENCES_SERVICE_TOKEN, TASK_SEARCH_API_METHOD_TOKEN } from '../../../services/cloud-token.service'; import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { TaskListCloudServiceInterface } from '../../../services/task-list-cloud.service.interface'; import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; @@ -266,6 +262,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent Date: Wed, 20 Nov 2024 16:58:57 +0530 Subject: [PATCH 14/35] Release 7.0.0-alpha.5 (#10411) --- docs/license-info/README.md | 1 + .../license-info-7.0.0-alpha.5.md | 520 ++++++++++++++++++ docs/release-notes/README.md | 1 + docs/release-notes/RelNote-7.0.0-alpha.5.md | 35 ++ docs/vulnerability/README.md | 1 + .../vulnerability/audit-info-7.0.0-alpha.5.md | 24 + lib/cli/package.json | 2 +- lib/content-services/package.json | 4 +- lib/core/package.json | 4 +- lib/extensions/package.json | 2 +- lib/insights/package.json | 4 +- lib/process-services-cloud/package.json | 6 +- lib/process-services/package.json | 6 +- lib/testing/package.json | 2 +- 14 files changed, 597 insertions(+), 15 deletions(-) create mode 100644 docs/license-info/license-info-7.0.0-alpha.5.md create mode 100644 docs/release-notes/RelNote-7.0.0-alpha.5.md create mode 100644 docs/vulnerability/audit-info-7.0.0-alpha.5.md diff --git a/docs/license-info/README.md b/docs/license-info/README.md index 546a1748e88..e28def082dd 100644 --- a/docs/license-info/README.md +++ b/docs/license-info/README.md @@ -52,3 +52,4 @@ The pages linked below contain the licenses for all third party dependencies of - [ADF 7.0.0-alpha.2](license-info-7.0.0-alpha.2.md) - [ADF 7.0.0-alpha.3](license-info-7.0.0-alpha.3.md) - [ADF 7.0.0-alpha.4](license-info-7.0.0-alpha.4.md) +- [ADF 7.0.0-alpha.5](license-info-7.0.0-alpha.5.md) diff --git a/docs/license-info/license-info-7.0.0-alpha.5.md b/docs/license-info/license-info-7.0.0-alpha.5.md new file mode 100644 index 00000000000..717b3cb441d --- /dev/null +++ b/docs/license-info/license-info-7.0.0-alpha.5.md @@ -0,0 +1,520 @@ +--- +Title: License info, alfresco-ng2-components 7.0.0-alpha.5 +--- + +# License information for alfresco-ng2-components 7.0.0-alpha.5 + +This page lists all third party libraries the project depends on. + +## Libraries + +| Name | Version | License | +| --- | --- | --- | +| [@adobe/css-tools](https://github.com/adobe/css-tools) | 4.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/animations](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/cdk](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/common](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/compiler](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/core](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/forms](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/material-date-fns-adapter](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/material](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/platform-browser](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/router](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@apollo/client](https://github.com/apollographql/apollo-client) | 3.11.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/code-frame](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/helper-validator-identifier](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/highlight](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/runtime](https://github.com/babel/babel) | 7.22.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-bundled-dicts](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-pipe](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-resolver](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-service-bus](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-types](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-ada](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-aws](https://github.com/streetsidesoftware/cspell-dict) | 4.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-bash](https://github.com/streetsidesoftware/cspell-dict) | 4.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-companies](https://github.com/streetsidesoftware/cspell-dict) | 3.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-cpp](https://github.com/streetsidesoftware/cspell-dict) | 5.1.16 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-cryptocurrencies](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-csharp](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-css](https://github.com/streetsidesoftware/cspell-dict) | 4.0.13 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-dart](https://github.com/streetsidesoftware/cspell-dict) | 2.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-data-science](https://github.com/streetsidesoftware/cspell-dict) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-django](https://github.com/streetsidesoftware/cspell-dicts) | 4.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-docker](https://github.com/streetsidesoftware/cspell-dicts) | 1.1.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-dotnet](https://github.com/streetsidesoftware/cspell-dict) | 5.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-elixir](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-en-common-misspellings](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-en-gb](https://github.com/streetsidesoftware/cspell-dicts) | 1.1.33 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-en_us](https://github.com/streetsidesoftware/cspell-dict) | 4.3.23 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-filetypes](https://github.com/streetsidesoftware/cspell-dict) | 3.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-fonts](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-fsharp](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-fullstack](https://github.com/streetsidesoftware/cspell-dict) | 3.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-gaming-terms](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-git](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-golang](https://github.com/streetsidesoftware/cspell-dict) | 6.0.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-haskell](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-html-symbol-entities](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-html](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-java](https://github.com/streetsidesoftware/cspell-dict) | 5.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-k8s](https://github.com/streetsidesoftware/cspell-dict) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-latex](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-lorem-ipsum](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-lua](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-makefile](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-node](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-npm](https://github.com/streetsidesoftware/cspell-dict) | 5.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-php](https://github.com/streetsidesoftware/cspell-dict) | 4.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-powershell](https://github.com/streetsidesoftware/cspell-dict) | 5.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-public-licenses](https://github.com/streetsidesoftware/cspell-dict) | 2.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-python](https://github.com/streetsidesoftware/cspell-dict) | 4.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-r](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-ruby](https://github.com/streetsidesoftware/cspell-dict) | 5.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-rust](https://github.com/streetsidesoftware/cspell-dict) | 4.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-scala](https://github.com/streetsidesoftware/cspell-dict) | 5.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-software-terms](https://github.com/streetsidesoftware/cspell-dict) | 3.4.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-sql](https://github.com/streetsidesoftware/cspell-dict) | 2.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-svelte](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-swift](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-typescript](https://github.com/streetsidesoftware/cspell-dict) | 3.1.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-vue](https://github.com/streetsidesoftware/cspell-dicts) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dynamic-import](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/eslint-plugin](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/strong-weak-map](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@esbuild/linux-x64](https://github.com/evanw/esbuild) | 0.19.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@graphql-typed-document-node/core](https://github.com/dotansimha/graphql-typed-document-node) | 3.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@kurkle/color](https://github.com/kurkle/color) | 0.3.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@mapbox/node-pre-gyp](https://github.com/mapbox/node-pre-gyp) | 1.0.11 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [@mat-datetimepicker/core](https://github.com/kuhnroyal/mat-datetimepicker) | 12.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/animation](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/auto-init](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/banner](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/base](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/card](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/checkbox](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/chips](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/circular-progress](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/data-table](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/density](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/dialog](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/dom](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/drawer](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/elevation](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/fab](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/feature-targeting](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/floating-label](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/focus-ring](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/form-field](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/icon-button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/image-list](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/layout-grid](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/line-ripple](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/linear-progress](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/list](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/menu-surface](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/menu](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/notched-outline](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/progress-indicator](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/radio](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/ripple](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/rtl](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/segmented-button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/select](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/shape](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/slider](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/snackbar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/switch](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab-bar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab-indicator](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab-scroller](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/textfield](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/theme](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tokens](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tooltip](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/top-app-bar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/touch-target](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/typography](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@ngx-translate/core](https://github.com/ngx-translate/core) | 14.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@nodelib/fs.scandir](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir) | 2.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@nodelib/fs.stat](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@nodelib/fs.walk](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk) | 1.2.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@pkgr/core](https://github.com/un-ts/pkgr) | 0.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/addon-interactions](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/core-server](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/core](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/csf](https://github.com/ComponentDriven/csf) | 0.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/global](https://github.com/storybookjs/global) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/instrumenter](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/test](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/theming](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@testing-library/dom](https://github.com/testing-library/dom-testing-library) | 10.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | 6.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@testing-library/user-event](https://github.com/testing-library/user-event) | 14.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@ts-morph/common](https://github.com/dsherret/ts-morph) | 0.21.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/aria-query](https://github.com/DefinitelyTyped/DefinitelyTyped) | 5.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/body-parser](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.19.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/connect](https://github.com/DefinitelyTyped/DefinitelyTyped) | 3.4.38 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/estree](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/express-serve-static-core](https://github.com/DefinitelyTyped/DefinitelyTyped) | 4.19.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/http-errors](https://github.com/DefinitelyTyped/DefinitelyTyped) | 2.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/mime](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped) | 20.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/prop-types](https://github.com/DefinitelyTyped/DefinitelyTyped) | 15.7.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/qs](https://github.com/DefinitelyTyped/DefinitelyTyped) | 6.9.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/range-parser](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.2.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped) | 18.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/send](https://github.com/DefinitelyTyped/DefinitelyTyped) | 0.17.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/serve-static](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.15.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/expect](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/pretty-format](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/spy](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/utils](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/caches](https://github.com/benjamn/wryware) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/context](https://github.com/benjamn/wryware) | 0.7.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/equality](https://github.com/benjamn/wryware) | 0.5.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/trie](https://github.com/benjamn/wryware) | 0.4.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/trie](https://github.com/benjamn/wryware) | 0.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [abbrev](https://github.com/isaacs/abbrev-js) | 1.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [accepts](https://github.com/jshttp/accepts) | 1.3.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [agent-base](https://github.com/TooTallNate/node-agent-base) | 6.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [alfresco-ng2-components](https://github.com/Alfresco/alfresco-ng2-components) | 7.0.0-alpha.5 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [angular-oauth2-oidc-jwks](https://github.com/manfredsteyer/angular-oauth2-oidc) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc) | 16.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-regex](https://github.com/chalk/ansi-regex) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 3.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 4.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 5.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [apollo-angular](https://github.com/kamilkisiela/apollo-angular) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [aproba](https://github.com/iarna/aproba) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [are-we-there-yet](https://github.com/npm/are-we-there-yet) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [argparse](https://github.com/nodeca/argparse) | 2.0.1 | [Python-2.0](http://www.opensource.org/licenses/Python-2.0) | +| [aria-query](https://github.com/A11yance/aria-query) | 5.3.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [array-flatten](https://github.com/blakeembrey/array-flatten) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [array-timsort](https://github.com/kaelzhang/node-array-timsort) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [asap](https://github.com/kriskowal/asap) | 2.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [assertion-error](https://github.com/chaijs/assertion-error) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ast-types](https://github.com/benjamn/ast-types) | 0.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [available-typed-arrays](https://github.com/inspect-js/available-typed-arrays) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [backo2](https://github.com/mokesmokes/backo) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [body-parser](https://github.com/expressjs/body-parser) | 1.20.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [braces](https://github.com/micromatch/braces) | 3.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [browser-assert](https://github.com/socialally/browser-assert) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [bytes](https://github.com/visionmedia/bytes.js) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [call-bind](https://github.com/ljharb/call-bind) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [callsites](https://github.com/sindresorhus/callsites) | 3.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [canvas](https://github.com/Automattic/node-canvas) | 2.11.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chai](https://github.com/chaijs/chai) | 5.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 2.4.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 4.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chart.js](https://github.com/chartjs/Chart.js) | 4.4.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [check-error](https://github.com/chaijs/check-error) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chownr](https://github.com/isaacs/chownr) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [clear-module](https://github.com/sindresorhus/clear-module) | 4.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [code-block-writer](https://github.com/dsherret/code-block-writer) | 12.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-convert](https://github.com/Qix-/color-convert) | 1.9.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-convert](https://github.com/Qix-/color-convert) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-name](https://github.com/dfcreative/color-name) | 1.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-name](https://github.com/colorjs/color-name) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-support](https://github.com/isaacs/color-support) | 1.1.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [comment-json](https://github.com/kaelzhang/node-comment-json) | 4.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [component-emitter](https://github.com/sindresorhus/component-emitter) | 1.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [configstore](https://github.com/yeoman/configstore) | 6.0.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [console-control-strings](https://github.com/iarna/console-control-strings) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [content-disposition](https://github.com/jshttp/content-disposition) | 0.5.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [content-type](https://github.com/jshttp/content-type) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookie-signature](https://github.com/visionmedia/node-cookie-signature) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookie](https://github.com/jshttp/cookie) | 0.7.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [core-util-is](https://github.com/isaacs/core-util-is) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) | 8.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cropperjs](https://github.com/fengyuanchen/cropperjs) | 1.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [crypto-random-string](https://github.com/sindresorhus/crypto-random-string) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-dictionary](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-glob](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-grammar](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-io](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-lib](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-trie-lib](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [css.escape](https://github.com/mathiasbynens/CSS.escape) | 1.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [csstype](https://github.com/frenic/csstype) | 3.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [d](https://github.com/medikoo/d) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [date-fns](https://github.com/date-fns/date-fns) | 2.30.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [debug](https://github.com/visionmedia/debug) | 2.6.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [debug](https://github.com/debug-js/debug) | 4.3.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [decompress-response](https://github.com/sindresorhus/decompress-response) | 4.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [deep-eql](https://github.com/chaijs/deep-eql) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [define-data-property](https://github.com/ljharb/define-data-property) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [delegates](https://github.com/visionmedia/node-delegates) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [depd](https://github.com/dougwilson/nodejs-depd) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [dequal](https://github.com/lukeed/dequal) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [destroy](https://github.com/stream-utils/destroy) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [detect-libc](https://github.com/lovell/detect-libc) | 2.0.3 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [dezalgo](https://github.com/npm/dezalgo) | 1.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) | 0.5.16 | [MIT](http://www.opensource.org/licenses/MIT) | +| [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [dot-prop](https://github.com/sindresorhus/dot-prop) | 6.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| dotenv-expand | 5.1.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [ee-first](https://github.com/jonathanong/ee-first) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [emoji-regex](https://github.com/mathiasbynens/emoji-regex) | 8.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [encodeurl](https://github.com/pillarjs/encodeurl) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [encodeurl](https://github.com/pillarjs/encodeurl) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [encoding](https://github.com/andris9/encoding) | 0.1.13 | [MIT](http://www.opensource.org/licenses/MIT) | +| [entities](https://github.com/fb55/entities) | 4.5.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [error-ex](https://github.com/qix-/node-error-ex) | 1.3.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es-define-property](https://github.com/ljharb/es-define-property) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es-errors](https://github.com/ljharb/es-errors) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.64 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| esbuild-register | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [esbuild](https://github.com/evanw/esbuild) | 0.19.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [escape-html](https://github.com/component/escape-html) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [escape-string-regexp](https://github.com/sindresorhus/escape-string-regexp) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [esniff](https://github.com/medikoo/esniff) | 2.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [esprima](https://github.com/jquery/esprima) | 4.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [estree-walker](https://github.com/Rich-Harris/estree-walker) | 3.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [etag](https://github.com/jshttp/etag) | 1.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [eve-raphael](https://github.com/tomasAlabes/eve) | 0.5.0 | [Apache](http://www.apache.org/licenses/LICENSE-2.0) | +| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [eventemitter3](https://github.com/primus/eventemitter3) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [express](https://github.com/expressjs/express) | 4.21.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ext](https://github.com/medikoo/es5-ext.git#ext) | 1.7.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [fast-equals](https://github.com/planttheidea/fast-equals) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-equals](https://github.com/planttheidea/fast-equals) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-glob](https://github.com/mrmlnc/fast-glob) | 3.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fastq](https://github.com/mcollina/fastq) | 1.17.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [fill-range](https://github.com/jonschlinkert/fill-range) | 7.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [finalhandler](https://github.com/pillarjs/finalhandler) | 1.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [find-up](https://github.com/sindresorhus/find-up) | 6.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [for-each](https://github.com/Raynos/for-each) | 0.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [form-data](https://github.com/form-data/form-data) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [formidable](https://github.com/node-formidable/formidable) | 3.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [forwarded](https://github.com/jshttp/forwarded) | 0.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fresh](https://github.com/jshttp/fresh) | 0.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fs-minipass](https://github.com/npm/fs-minipass) | 2.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [fs.realpath](https://github.com/isaacs/fs.realpath) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [function-bind](https://github.com/Raynos/function-bind) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [gauge](https://github.com/iarna/gauge) | 3.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [gensequence](https://github.com/streetsidesoftware/GenSequence) | 6.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [get-func-name](https://github.com/chaijs/get-func-name) | 2.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [glob-parent](https://github.com/gulpjs/glob-parent) | 5.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [glob](https://github.com/isaacs/node-glob) | 7.2.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [global-dirs](https://github.com/sindresorhus/global-dirs) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [gopd](https://github.com/ljharb/gopd) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [graceful-fs](https://github.com/isaacs/node-graceful-fs) | 4.2.11 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [graphql-tag](https://github.com/apollographql/graphql-tag) | 2.12.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [graphql](https://github.com/graphql/graphql-js) | 16.9.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-flag](https://github.com/sindresorhus/has-flag) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-flag](https://github.com/sindresorhus/has-flag) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-own-prop](https://github.com/sindresorhus/has-own-prop) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-property-descriptors](https://github.com/inspect-js/has-property-descriptors) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-proto](https://github.com/inspect-js/has-proto) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-tostringtag](https://github.com/inspect-js/has-tostringtag) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-unicode](https://github.com/iarna/has-unicode) | 2.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [hasown](https://github.com/inspect-js/hasOwn) | 2.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [hexoid](https://github.com/lukeed/hexoid) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [hoist-non-react-statics](https://github.com/mridgway/hoist-non-react-statics) | 3.3.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [http-errors](https://github.com/jshttp/http-errors) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.4.24 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [import-fresh](https://github.com/sindresorhus/import-fresh) | 3.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [import-meta-resolve](https://github.com/wooorm/import-meta-resolve) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [imurmurhash](https://github.com/jensyt/imurmurhash-js) | 0.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [indent-string](https://github.com/sindresorhus/indent-string) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [inflight](https://github.com/npm/inflight) | 1.0.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [inherits](https://github.com/isaacs/inherits) | 2.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ini](https://github.com/isaacs/ini) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ipaddr.js](https://github.com/whitequark/ipaddr.js) | 1.9.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-arguments](https://github.com/inspect-js/is-arguments) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-arrayish](https://github.com/qix-/node-is-arrayish) | 0.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-callable](https://github.com/inspect-js/is-callable) | 1.2.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-extglob](https://github.com/jonschlinkert/is-extglob) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-fullwidth-code-point](https://github.com/sindresorhus/is-fullwidth-code-point) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-generator-function](https://github.com/inspect-js/is-generator-function) | 1.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-glob](https://github.com/micromatch/is-glob) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-number](https://github.com/jonschlinkert/is-number) | 7.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-obj](https://github.com/sindresorhus/is-obj) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-typed-array](https://github.com/inspect-js/is-typed-array) | 1.1.13 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-typedarray](https://github.com/hughsk/is-typedarray) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iterall](https://github.com/leebyron/iterall) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [js-tokens](https://github.com/lydell/js-tokens) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [js-yaml](https://github.com/nodeca/js-yaml) | 4.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [json-parse-even-better-errors](https://github.com/npm/json-parse-even-better-errors) | 2.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [jsrsasign](https://github.com/kjur/jsrsasign) | 11.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lines-and-columns](https://github.com/eventualbuddha/lines-and-columns) | 1.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [locate-path](https://github.com/sindresorhus/locate-path) | 7.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lodash-es](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lodash](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [loose-envify](https://github.com/zertosh/loose-envify) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [loupe](https://github.com/chaijs/loupe) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [lz-string](https://github.com/pieroxy/lz-string) | 1.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [make-dir](https://github.com/sindresorhus/make-dir) | 3.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [material-icons](https://github.com/marella/material-icons) | 1.13.12 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [media-typer](https://github.com/jshttp/media-typer) | 0.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [merge-descriptors](https://github.com/sindresorhus/merge-descriptors) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [merge2](https://github.com/teambition/merge2) | 1.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [micromatch](https://github.com/micromatch/micromatch) | 4.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime-db](https://github.com/jshttp/mime-db) | 1.52.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime-types](https://github.com/jshttp/mime-types) | 2.1.35 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime](https://github.com/broofa/node-mime) | 1.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mimic-response](https://github.com/sindresorhus/mimic-response) | 2.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [min-indent](https://github.com/thejameskyle/min-indent) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [minimatch-browser](https://github.com/isaacs/minimatch) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimatch](https://github.com/isaacs/minimatch) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimatch](https://github.com/isaacs/minimatch) | 7.4.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minipass](https://github.com/isaacs/minipass) | 3.3.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minipass](https://github.com/isaacs/minipass) | 5.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minizlib](https://github.com/isaacs/minizlib) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mkdirp](https://github.com/isaacs/node-mkdirp) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mkdirp](https://github.com/isaacs/node-mkdirp) | 2.1.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ms](https://github.com/zeit/ms) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ms](https://github.com/vercel/ms) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [nan](https://github.com/nodejs/nan) | 2.20.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [negotiator](https://github.com/jshttp/negotiator) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [next-tick](https://github.com/medikoo/next-tick) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ng2-charts](https://github.com/valor-software/ng2-charts) | 4.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [node-fetch](https://github.com/bitinn/node-fetch) | 2.7.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [nopt](https://github.com/npm/nopt) | 5.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [npmlog](https://github.com/npm/npmlog) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [object-assign](https://github.com/sindresorhus/object-assign) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.13.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [on-finished](https://github.com/jshttp/on-finished) | 2.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [optimism](https://github.com/benjamn/optimism) | 0.18.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [p-limit](https://github.com/sindresorhus/p-limit) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [p-locate](https://github.com/sindresorhus/p-locate) | 6.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parent-module](https://github.com/sindresorhus/parent-module) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parent-module](https://github.com/sindresorhus/parent-module) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parse-json](https://github.com/sindresorhus/parse-json) | 5.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parse5](https://github.com/inikulin/parse5) | 7.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parseurl](https://github.com/pillarjs/parseurl) | 1.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-browserify](https://github.com/browserify/path-browserify) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-exists](https://github.com/sindresorhus/path-exists) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-is-absolute](https://github.com/sindresorhus/path-is-absolute) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-to-regexp](https://github.com/pillarjs/path-to-regexp) | 0.1.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-type](https://github.com/sindresorhus/path-type) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path2d-polyfill](https://github.com/nilzona/path2d-polyfill) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pathval](https://github.com/chaijs/pathval) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) | 3.3.122 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [picocolors](https://github.com/alexeyraspopov/picocolors) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [picomatch](https://github.com/micromatch/picomatch) | 2.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [polished](https://github.com/styled-components/polished) | 4.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [possible-typed-array-names](https://github.com/ljharb/possible-typed-array-names) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pretty-format](https://github.com/facebook/jest) | 27.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [process](https://github.com/shtylman/node-process) | 0.11.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [prop-types](https://github.com/facebook/prop-types) | 15.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [proxy-addr](https://github.com/jshttp/proxy-addr) | 2.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [qs](https://github.com/ljharb/qs) | 6.13.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [queue-microtask](https://github.com/feross/queue-microtask) | 1.2.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [range-parser](https://github.com/jshttp/range-parser) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [raphael](https://github.com/DmitryBaranovskiy/raphael) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [raw-body](https://github.com/stream-utils/raw-body) | 2.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-dom](https://github.com/facebook/react) | 18.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-is](https://github.com/facebook/react) | 16.13.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-is](https://github.com/facebook/react) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react](https://github.com/facebook/react) | 18.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [recast](https://github.com/benjamn/recast) | 0.23.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [redent](https://github.com/sindresorhus/redent) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [regenerator-runtime](https://github.com/facebook/regenerator/tree/main/packages/runtime) | 0.13.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rehackt](https://github.com/phryneas/rehackt) | 0.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [repeat-string](https://github.com/jonschlinkert/repeat-string) | 1.6.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [resolve-from](https://github.com/sindresorhus/resolve-from) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [resolve-from](https://github.com/sindresorhus/resolve-from) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [response-iterator](https://github.com/kmalakoff/response-iterator) | 0.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [reusify](https://github.com/mcollina/reusify) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rimraf](https://github.com/isaacs/rimraf) | 3.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [run-parallel](https://github.com/feross/run-parallel) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rxjs](https://github.com/reactivex/rxjs) | 7.8.1 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [safer-buffer](https://github.com/ChALkeR/safer-buffer) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [safevalues](https://github.com/google/safevalues) | 0.3.4 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [scheduler](https://github.com/facebook/react) | 0.23.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [semver](https://github.com/npm/node-semver) | 6.3.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [semver](https://github.com/npm/node-semver) | 7.5.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [semver](https://github.com/npm/node-semver) | 7.6.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [send](https://github.com/pillarjs/send) | 0.19.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [serve-static](https://github.com/expressjs/serve-static) | 1.16.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [set-blocking](https://github.com/yargs/set-blocking) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [set-function-length](https://github.com/ljharb/set-function-length) | 1.2.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [setprototypeof](https://github.com/wesleytodd/setprototypeof) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [side-channel](https://github.com/ljharb/side-channel) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [signal-exit](https://github.com/tapjs/signal-exit) | 3.0.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [simple-concat](https://github.com/feross/simple-concat) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [simple-get](https://github.com/feross/simple-get) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [source-map](https://github.com/mozilla/source-map) | 0.6.1 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [statuses](https://github.com/jshttp/statuses) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [storybook](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [string-width](https://github.com/sindresorhus/string-width) | 4.2.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [strip-ansi](https://github.com/chalk/strip-ansi) | 6.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [strip-indent](https://github.com/sindresorhus/strip-indent) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [subscriptions-transport-ws](https://github.com/apollostack/subscriptions-transport-ws) | 0.11.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [superagent](https://github.com/ladjs/superagent) | 9.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [supports-color](https://github.com/chalk/supports-color) | 5.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [supports-color](https://github.com/chalk/supports-color) | 7.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [symbol-observable](https://github.com/blesh/symbol-observable) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [symbol-observable](https://github.com/blesh/symbol-observable) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [synckit](https://github.com/un-ts/synckit) | 0.8.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tar](https://github.com/isaacs/node-tar) | 6.2.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [tiny-invariant](https://github.com/alexreardon/tiny-invariant) | 1.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tinyrainbow](https://github.com/tinylibs/tinyrainbow) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tinyspy](https://github.com/tinylibs/tinyspy) | 3.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [to-regex-range](https://github.com/micromatch/to-regex-range) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [toidentifier](https://github.com/component/toidentifier) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tr46](https://github.com/Sebmaster/tr46.js) | 0.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-dedent](https://github.com/tamino-martinius/node-ts-dedent) | 2.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-invariant](https://github.com/apollographql/invariant-packages) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-morph](https://github.com/dsherret/ts-morph) | 20.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tslib](https://github.com/Microsoft/tslib) | 2.7.0 | [0BSD](http://landley.net/toybox/license.html) | +| [type-fest](https://github.com/sindresorhus/type-fest) | 1.4.0 | ([MIT](http://www.opensource.org/licenses/MIT) OR [CC0-1.0](http://creativecommons.org/publicdomain/zero/1.0/legalcode)) | +| [type-fest](https://github.com/sindresorhus/type-fest) | 2.19.0 | ([MIT](http://www.opensource.org/licenses/MIT) OR [CC0-1.0](http://creativecommons.org/publicdomain/zero/1.0/legalcode)) | +| [type-is](https://github.com/jshttp/type-is) | 1.6.18 | [MIT](http://www.opensource.org/licenses/MIT) | +| [type](https://github.com/medikoo/type) | 2.7.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [typedarray-to-buffer](https://github.com/feross/typedarray-to-buffer) | 3.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [undici-types](https://github.com/nodejs/undici) | 6.19.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [unique-string](https://github.com/sindresorhus/unique-string) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [unpipe](https://github.com/stream-utils/unpipe) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [util](https://github.com/browserify/node-util) | 0.12.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [utils-merge](https://github.com/jaredhanson/utils-merge) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [vary](https://github.com/jshttp/vary) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [vscode-languageserver-textdocument](https://github.com/Microsoft/vscode-languageserver-node) | 1.0.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [vscode-uri](https://github.com/microsoft/vscode-uri) | 3.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [web-streams-polyfill](https://github.com/MattiasBuelens/web-streams-polyfill) | 3.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [webidl-conversions](https://github.com/jsdom/webidl-conversions) | 3.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [whatwg-url](https://github.com/jsdom/whatwg-url) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [which-typed-array](https://github.com/inspect-js/which-typed-array) | 1.1.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [wide-align](https://github.com/iarna/wide-align) | 1.1.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [write-file-atomic](https://github.com/npm/write-file-atomic) | 3.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ws](https://github.com/websockets/ws) | 7.5.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ws](https://github.com/websockets/ws) | 8.18.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [xdg-basedir](https://github.com/sindresorhus/xdg-basedir) | 5.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [yocto-queue](https://github.com/sindresorhus/yocto-queue) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zen-observable-ts](https://github.com/apollographql/zen-observable-ts) | 1.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zen-observable](https://github.com/zenparsing/zen-observable) | 0.8.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zone.js](https://github.com/angular/angular) | 0.13.3 | [MIT](http://www.opensource.org/licenses/MIT) | + diff --git a/docs/release-notes/README.md b/docs/release-notes/README.md index 1f87b85b286..0f7875a9985 100644 --- a/docs/release-notes/README.md +++ b/docs/release-notes/README.md @@ -9,6 +9,7 @@ The first **General Availability** release was v2.0.0. ## General Availability +- [7.0.0-alpha.5](RelNote-7.0.0-alpha.5.md) - [7.0.0-alpha.4](RelNote-7.0.0-alpha.4.md) - [7.0.0-alpha.3](RelNote-7.0.0-alpha.3.md) - [7.0.0-alpha.2](RelNote-7.0.0-alpha.2.md) diff --git a/docs/release-notes/RelNote-7.0.0-alpha.5.md b/docs/release-notes/RelNote-7.0.0-alpha.5.md new file mode 100644 index 00000000000..109cfb614dc --- /dev/null +++ b/docs/release-notes/RelNote-7.0.0-alpha.5.md @@ -0,0 +1,35 @@ +--- +Title: Changelog for alfresco-ng2-components v7.0.0-alpha.5 +--- + +# Changelog + +- [b575d16e61](git@github.com:Alfresco/alfresco-ng2-components/commit/b575d16e61) AAE-28529 Fix process list loading (#10407) +- [3078387325](git@github.com:Alfresco/alfresco-ng2-components/commit/3078387325) [ACS-8959] Introduce new `takeUntilDestroyed` operator where possible (#10388) +- [3f6b60760f](git@github.com:Alfresco/alfresco-ng2-components/commit/3f6b60760f) AAE-28286 Clean redundant log (#10406) +- [cbb5f14473](git@github.com:Alfresco/alfresco-ng2-components/commit/cbb5f14473) [ACS-8994] the upload new version button is not disabled when clicked and the uploading starts (#10391) +- [3adccc132e](git@github.com:Alfresco/alfresco-ng2-components/commit/3adccc132e) [ACS-8991] Saved searches potential file conflict fix (#10393) +- [472671bd50](git@github.com:Alfresco/alfresco-ng2-components/commit/472671bd50) [ACS-8921][ACA] Data Table / The input field in "Filter by Name" dialog is enormous in comparison with the UI design (#10375) +- [412295306c](git@github.com:Alfresco/alfresco-ng2-components/commit/412295306c) [ACS-8955] [ACA] Data Table / Column Pills Drag button is not centered horizontally (#10384) +- [0063d83044](git@github.com:Alfresco/alfresco-ng2-components/commit/0063d83044) AAE-28333 Fix search process variabels payload for new API (#10387) +- [9520b2a4e5](git@github.com:Alfresco/alfresco-ng2-components/commit/9520b2a4e5) [MNT-24698] Concatenate aspect name to the title when there are duplicated aspect titles (#10374) +- [3111008044](git@github.com:Alfresco/alfresco-ng2-components/commit/3111008044) AAE-28286 Show process variables columns in datatable fix (#10383) +- [278a5ee143](git@github.com:Alfresco/alfresco-ng2-components/commit/278a5ee143) [ACS-8919] [ACA] Search / Advanced Search Facets / The borders of search facets thickens very slowly when clicked (#10376) +- [c48022daf4](git@github.com:Alfresco/alfresco-ng2-components/commit/c48022daf4) [MNT-24689] the add user or group icon is displayed within the folder permissions for a user with the collaborator role (#10373) +- [35c8093706](git@github.com:Alfresco/alfresco-ng2-components/commit/35c8093706) [MNT-24614] Fixed APS basic auth login issue with ADF (#10364) +- [3ec3e732c0](git@github.com:Alfresco/alfresco-ng2-components/commit/3ec3e732c0) [ACS-8634] Change saved searches config file name (#10370) +- [3aabb9420d](git@github.com:Alfresco/alfresco-ng2-components/commit/3aabb9420d) AAE-27309 Update class (#10372) +- [d06c829dac](git@github.com:Alfresco/alfresco-ng2-components/commit/d06c829dac) [ACS-8916] [ACA] The calendar button in advanced search filters is placed too low in the date dialog (#10369) +- [db22c6aac9](git@github.com:Alfresco/alfresco-ng2-components/commit/db22c6aac9) AAE-27309 Add selectable property to datatable row (#10368) +- [258f01803c](git@github.com:Alfresco/alfresco-ng2-components/commit/258f01803c) [MNT-24496] ADW Integration with APS Improvements - Re-assign Tasks (#10350) +- [558ff71878](git@github.com:Alfresco/alfresco-ng2-components/commit/558ff71878) Revert mistakenly deleted file (#10367) +- [3bcaeef682](git@github.com:Alfresco/alfresco-ng2-components/commit/3bcaeef682) AAE-27327 New process search API (#10365) +- [f07636e297](git@github.com:Alfresco/alfresco-ng2-components/commit/f07636e297) [ACS-8956] Introduce new ESLint rule for self-closing tags (#10354) +- [f4cd4dc40a](git@github.com:Alfresco/alfresco-ng2-components/commit/f4cd4dc40a) [ACS-8634] Additional fixes (#10351) +- [c93823a16b](git@github.com:Alfresco/alfresco-ng2-components/commit/c93823a16b) AAE-25417 Update status to Deployed (#10353) +- [a8dd5fc5d7](git@github.com:Alfresco/alfresco-ng2-components/commit/a8dd5fc5d7) AAE-25417 Align app status to follow state machine (#10348) +- [de7ca76225](git@github.com:Alfresco/alfresco-ng2-components/commit/de7ca76225) AAE-27234 Skip nx check for build command to fix Invalid Cache Directory for Task js-api:build (#10349) +- [a7911338c3](git@github.com:Alfresco/alfresco-ng2-components/commit/a7911338c3) [ACS-8634] "Manage Searches" - a full page list of saved searches (#10307) +- [ba52074bb5](git@github.com:Alfresco/alfresco-ng2-components/commit/ba52074bb5) [MNT-24682] Kerberos: do not add authorization header (#10320) +- [ea71e4cdd1](git@github.com:Alfresco/alfresco-ng2-components/commit/ea71e4cdd1) AAE-26475 Move error process to simpleapp (#10321) +- [872dae6f2d](git@github.com:Alfresco/alfresco-ng2-components/commit/872dae6f2d) Post-release version bump (#10336) diff --git a/docs/vulnerability/README.md b/docs/vulnerability/README.md index 8c3f50c9c7a..6111407fea9 100644 --- a/docs/vulnerability/README.md +++ b/docs/vulnerability/README.md @@ -49,3 +49,4 @@ The pages linked below contain the audit for all third party dependencies of ADF - [ADF 7.0.0-alpha.2](audit-info-7.0.0-alpha.2.md) - [ADF 7.0.0-alpha.3](audit-info-7.0.0-alpha.3.md) - [ADF 7.0.0-alpha.4](audit-info-7.0.0-alpha.4.md) +- [ADF 7.0.0-alpha.5](audit-info-7.0.0-alpha.5.md) diff --git a/docs/vulnerability/audit-info-7.0.0-alpha.5.md b/docs/vulnerability/audit-info-7.0.0-alpha.5.md new file mode 100644 index 00000000000..d165cec08fd --- /dev/null +++ b/docs/vulnerability/audit-info-7.0.0-alpha.5.md @@ -0,0 +1,24 @@ +--- +Title: Audit info, alfresco-ng2-components 7.0.0-alpha.5 +--- + +# Audit information for alfresco-ng2-components 7.0.0-alpha.5 + +This page lists the security audit of the dependencies this project depends on. + +## Risks + +- Critical risk: 0 +- High risk: 1 +- Moderate risk: 0 +- Low risk: 0 + +Dependencies analyzed: + +## Libraries + +| Severity | Module | Vulnerable versions | +| --- | --- | --- | +|high | pdfjs-dist | "<=4.1.392" | + + diff --git a/lib/cli/package.json b/lib/cli/package.json index 09b3e6b57dd..3817febb068 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -20,7 +20,7 @@ "dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli" }, "dependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.4-0", + "@alfresco/js-api": ">=8.0.0-alpha.5", "commander": "^6.2.1", "ejs": "^3.1.9", "license-checker": "^25.0.1", diff --git a/lib/content-services/package.json b/lib/content-services/package.json index 2af973beeff..0ba09b9dcaa 100644 --- a/lib/content-services/package.json +++ b/lib/content-services/package.json @@ -21,9 +21,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5-0", + "@alfresco/js-api": ">=8.0.0-alpha.5", "@ngx-translate/core": ">=14.0.0", - "@alfresco/adf-core": ">=7.0.0-alpha.5-0" + "@alfresco/adf-core": ">=7.0.0-alpha.5" }, "keywords": [ "content-services", diff --git a/lib/core/package.json b/lib/core/package.json index a85b9bb98e6..cd686441e18 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -33,8 +33,8 @@ "@angular/material": ">=14.1.2", "@angular/router": ">=14.1.3", "@mat-datetimepicker/core": ">=10.1.1", - "@alfresco/js-api": ">=8.0.0-alpha.5-0", - "@alfresco/adf-extensions": ">=7.0.0-alpha.5-0", + "@alfresco/js-api": ">=8.0.0-alpha.5", + "@alfresco/adf-extensions": ">=7.0.0-alpha.5", "@ngx-translate/core": ">=14.0.0", "minimatch-browser": ">=1.0.0", "pdfjs-dist": ">=3.3.122", diff --git a/lib/extensions/package.json b/lib/extensions/package.json index d2f86deaa82..e1d91dc3807 100644 --- a/lib/extensions/package.json +++ b/lib/extensions/package.json @@ -14,7 +14,7 @@ "peerDependencies": { "@angular/common": ">=14.1.3", "@angular/core": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5-0" + "@alfresco/js-api": ">=8.0.0-alpha.5" }, "keywords": [ "extensions", diff --git a/lib/insights/package.json b/lib/insights/package.json index 601542b6cc5..25e2e74e6bf 100644 --- a/lib/insights/package.json +++ b/lib/insights/package.json @@ -11,8 +11,8 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@alfresco/adf-core": ">=7.0.0-alpha.5-0", - "@alfresco/adf-content-services": ">=7.0.0-alpha.5-0", + "@alfresco/adf-core": ">=7.0.0-alpha.5", + "@alfresco/adf-content-services": ">=7.0.0-alpha.5", "@ngx-translate/core": ">=14.0.0", "chart.js": "^4.3.0", "ng2-charts": "^4.1.1", diff --git a/lib/process-services-cloud/package.json b/lib/process-services-cloud/package.json index 9f1926cb252..369c8482745 100644 --- a/lib/process-services-cloud/package.json +++ b/lib/process-services-cloud/package.json @@ -36,9 +36,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5-0", - "@alfresco/adf-core": ">=7.0.0-alpha.5-0", - "@alfresco/adf-content-services": ">=7.0.0-alpha.5-0", + "@alfresco/js-api": ">=8.0.0-alpha.5", + "@alfresco/adf-core": ">=7.0.0-alpha.5", + "@alfresco/adf-content-services": ">=7.0.0-alpha.5", "@apollo/client": ">=3.7.2", "@ngx-translate/core": ">=14.0.0", "apollo-angular": ">=4.0.1", diff --git a/lib/process-services/package.json b/lib/process-services/package.json index 83b72101176..6c8824b4c48 100644 --- a/lib/process-services/package.json +++ b/lib/process-services/package.json @@ -21,9 +21,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5-0", - "@alfresco/adf-core": ">=7.0.0-alpha.5-0", - "@alfresco/adf-content-services": ">=7.0.0-alpha.5-0", + "@alfresco/js-api": ">=8.0.0-alpha.5", + "@alfresco/adf-core": ">=7.0.0-alpha.5", + "@alfresco/adf-content-services": ">=7.0.0-alpha.5", "@ngx-translate/core": ">=14.0.0" }, "keywords": [ diff --git a/lib/testing/package.json b/lib/testing/package.json index cf5502b3dfd..7eeef7e8de8 100644 --- a/lib/testing/package.json +++ b/lib/testing/package.json @@ -11,7 +11,7 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "peerDependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.5-0" + "@alfresco/js-api": ">=8.0.0-alpha.5" }, "keywords": [ "testing", From b4516bc9981508bb1582bc39836b804538c087c9 Mon Sep 17 00:00:00 2001 From: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:22:37 +0530 Subject: [PATCH 15/35] Release 7.0.0-alpha.5 package-lock.json (#10413) * Release 7.0.0-alpha.5 package-lock.json * Revert package-lock.json for adf-cli * Revert common package-lock.json * Fix @alfresco/js-api version in adf-cli --- lib/cli/package.json | 2 +- lib/process-services-cloud/package-lock.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cli/package.json b/lib/cli/package.json index 3817febb068..f79712cce34 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -20,7 +20,7 @@ "dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli" }, "dependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.5", + "@alfresco/js-api": ">=8.0.0-alpha.4", "commander": "^6.2.1", "ejs": "^3.1.9", "license-checker": "^25.0.1", diff --git a/lib/process-services-cloud/package-lock.json b/lib/process-services-cloud/package-lock.json index 6ecf4196ff1..5a4f81a6886 100644 --- a/lib/process-services-cloud/package-lock.json +++ b/lib/process-services-cloud/package-lock.json @@ -24,9 +24,9 @@ "editorjs-text-color-plugin": "1.13.1" }, "peerDependencies": { - "@alfresco/adf-content-services": ">=7.0.0-alpha.4-0", - "@alfresco/adf-core": ">=7.0.0-alpha.4-0", - "@alfresco/js-api": ">=8.0.0-alpha.4-0", + "@alfresco/adf-content-services": ">=7.0.0-alpha.5", + "@alfresco/adf-core": ">=7.0.0-alpha.5", + "@alfresco/js-api": ">=8.0.0-alpha.5", "@angular/animations": ">=14.1.3", "@angular/cdk": ">=14.1.2", "@angular/common": ">=14.1.3", From beaf86d9876e65c20b58cd32c9a4af94c0024d4c Mon Sep 17 00:00:00 2001 From: Wiktor Danielewski <63188869+wiktord2000@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:50:52 +0100 Subject: [PATCH 16/35] AAE-28106 Make the header ( label + style ) optional with a checkbox [Preview/Runtime display] (#10408) * AAE-28106 Update ContainerModel * AAE-28106 Update HeaderWidgetComponent * AAE-28106 Reorganize span element * AAE-28106 Update tests --- .../widgets/core/container.model.spec.ts | 151 +++++++++++++++++- .../widgets/core/container.model.ts | 37 ++--- .../widgets/header/header.widget.html | 47 ++++-- .../widgets/header/header.widget.spec.ts | 77 +++++++-- .../widgets/header/header.widget.ts | 6 +- 5 files changed, 263 insertions(+), 55 deletions(-) diff --git a/lib/core/src/lib/form/components/widgets/core/container.model.spec.ts b/lib/core/src/lib/form/components/widgets/core/container.model.spec.ts index 47a0d7be6a0..0394b05d739 100644 --- a/lib/core/src/lib/form/components/widgets/core/container.model.spec.ts +++ b/lib/core/src/lib/form/components/widgets/core/container.model.spec.ts @@ -17,13 +17,154 @@ import { ContainerModel } from './container.model'; import { FormFieldModel } from './form-field.model'; -import { FormModel } from './form.model'; +import { FormFieldTypes } from './form-field-types'; describe('ContainerModel', () => { + let field: FormFieldModel; - it('should store the form reference', () => { - const form = new FormModel(); - const model = new ContainerModel(new FormFieldModel(form)); - expect(model.form).toBe(form); + beforeEach(() => { + field = new FormFieldModel(null, { + id: 'group-id', + name: 'group-name', + type: FormFieldTypes.GROUP, + params: { + allowCollapse: false, + collapseByDefault: false, + hideHeader: false + }, + numberOfColumns: 1, + tab: null + }); + }); + + it('should initialize with default values', () => { + const container = new ContainerModel(field); + + expect(container.field).toBe(field); + expect(container.columns).toEqual([]); + expect(container.isExpanded).toBe(true); + expect(container.rowspan).toBe(1); + expect(container.colspan).toBe(1); + }); + + describe('isVisible getter', () => { + it('should return true when field is visible', () => { + const container = new ContainerModel(field); + + expect(container.isVisible).toBe(true); + }); + + it('should return false when field is NOT visible', () => { + field.isVisible = false; + const container = new ContainerModel(field); + + expect(container.isVisible).toBe(false); + }); + }); + + describe('isTypeFieldGroup getter', () => { + it('should return true when field is a group', () => { + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + }); + + it('should return false when field is NOT a group', () => { + const container = new ContainerModel(new FormFieldModel(null, { type: FormFieldTypes.CONTAINER })); + + expect(container.isTypeFieldGroup).toBe(false); + }); + }); + + describe('isCollapsible getter', () => { + it('should return false when field is NOT a group', () => { + const container = new ContainerModel(new FormFieldModel(null, { type: FormFieldTypes.CONTAINER })); + + expect(container.isTypeFieldGroup).toBe(false); + expect(container.isCollapsible).toBe(false); + }); + + it('should return false when field is group and allowCollapse is false', () => { + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + expect(container.isCollapsible).toBe(false); + }); + + it('should return true when field is a group and allowCollapse is true', () => { + field.params.allowCollapse = true; + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + expect(container.isCollapsible).toBe(true); + }); + + it('should return false when field is a group and allowCollapse is NOT set', () => { + field.params.allowCollapse = undefined; + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + expect(container.isCollapsible).toBe(false); + }); + }); + + describe('isCollapsedByDefault getter', () => { + it('should return false when field is NOT a group', () => { + const container = new ContainerModel(new FormFieldModel(null, { type: FormFieldTypes.CONTAINER })); + + expect(container.isTypeFieldGroup).toBe(false); + expect(container.isCollapsedByDefault).toBe(false); + }); + + it('should return false when field is group and collapseByDefault is false', () => { + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + expect(container.isCollapsedByDefault).toBe(false); + }); + + it('should return true when field is a group and collapseByDefault is true', () => { + field.params.collapseByDefault = true; + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + expect(container.isCollapsedByDefault).toBe(true); + }); + + it('should return false when field is a group and collapseByDefault is NOT set', () => { + field.params.collapseByDefault = undefined; + const container = new ContainerModel(field); + + expect(container.isTypeFieldGroup).toBe(true); + expect(container.isCollapsedByDefault).toBe(false); + }); + }); + + describe('hideHeader getter', () => { + it('should return false when field is NOT a group', () => { + const container = new ContainerModel(new FormFieldModel(null, { type: FormFieldTypes.CONTAINER })); + + expect(container.hideHeader).toBe(false); + }); + + it('should return false when field is a group and hideHeader is false', () => { + const container = new ContainerModel(field); + + expect(container.hideHeader).toBe(false); + }); + + it('should return true when field is a group and hideHeader is true', () => { + field.params.hideHeader = true; + const container = new ContainerModel(field); + + expect(container.hideHeader).toBe(true); + }); + + it('should return false when field is a group and hideHeader is NOT set', () => { + field.params.hideHeader = undefined; + const container = new ContainerModel(field); + + expect(container.hideHeader).toBe(false); + }); }); }); diff --git a/lib/core/src/lib/form/components/widgets/core/container.model.ts b/lib/core/src/lib/form/components/widgets/core/container.model.ts index 093f28ac7a3..6a166ce6205 100644 --- a/lib/core/src/lib/form/components/widgets/core/container.model.ts +++ b/lib/core/src/lib/form/components/widgets/core/container.model.ts @@ -15,7 +15,7 @@ * limitations under the License. */ - /* eslint-disable @angular-eslint/component-selector */ +/* eslint-disable @angular-eslint/component-selector */ import { FormFieldModel } from './form-field.model'; import { FormWidgetModel } from './form-widget.model'; @@ -23,7 +23,6 @@ import { ContainerColumnModel } from './container-column.model'; import { FormFieldTypes } from './form-field-types'; export class ContainerModel extends FormWidgetModel { - field: FormFieldModel; readonly columns: ContainerColumnModel[] = []; @@ -31,43 +30,35 @@ export class ContainerModel extends FormWidgetModel { readonly rowspan: number = 1; readonly colspan: number = 1; - get isVisible(): boolean { - return this.field.isVisible; - } - constructor(field: FormFieldModel) { super(field.form, field.json); if (field) { this.field = field; this.columns = field.columns || []; - this.isExpanded = !this.isCollapsedByDefault(); + this.isExpanded = !this.isCollapsedByDefault; this.colspan = field.colspan; this.rowspan = field.rowspan; } } - isGroup(): boolean { - return this.type === FormFieldTypes.GROUP; + get isVisible(): boolean { + return this.field.isVisible; } - isCollapsible(): boolean { - let allowCollapse = false; - - if (this.isGroup() && this.field.params['allowCollapse']) { - allowCollapse = this.field.params['allowCollapse']; - } - - return allowCollapse; + get isTypeFieldGroup(): boolean { + return this.type === FormFieldTypes.GROUP; } - isCollapsedByDefault(): boolean { - let collapseByDefault = false; + get isCollapsible(): boolean { + return this.isTypeFieldGroup && (this.field.params?.allowCollapse ?? false); + } - if (this.isCollapsible() && this.field.params['collapseByDefault']) { - collapseByDefault = this.field.params['collapseByDefault']; - } + get isCollapsedByDefault(): boolean { + return this.isTypeFieldGroup && (this.field.params?.collapseByDefault ?? false); + } - return collapseByDefault; + get hideHeader(): boolean { + return this.isTypeFieldGroup && (this.field.params?.hideHeader ?? false); } } diff --git a/lib/core/src/lib/form/components/widgets/header/header.widget.html b/lib/core/src/lib/form/components/widgets/header/header.widget.html index 7afef5293fb..ea2ae9acc75 100644 --- a/lib/core/src/lib/form/components/widgets/header/header.widget.html +++ b/lib/core/src/lib/form/components/widgets/header/header.widget.html @@ -1,18 +1,37 @@ -
-

- - +
+
+ +
+

+ + {{ element.name | translate }}

+ + + +
diff --git a/lib/core/src/lib/form/components/widgets/header/header.widget.spec.ts b/lib/core/src/lib/form/components/widgets/header/header.widget.spec.ts index e5cebb9506a..fa9bf0b33d2 100644 --- a/lib/core/src/lib/form/components/widgets/header/header.widget.spec.ts +++ b/lib/core/src/lib/form/components/widgets/header/header.widget.spec.ts @@ -16,11 +16,12 @@ */ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { TranslateModule } from '@ngx-translate/core'; import { ContainerModel } from '../core/container.model'; import { FormFieldTypes } from '../core/form-field-types'; import { FormFieldModel } from '../core/form-field.model'; import { HeaderWidgetComponent } from './header.widget'; +import { NoopTranslateModule } from '../../../../testing'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; describe('HeaderWidgetComponent', () => { let component: HeaderWidgetComponent; @@ -28,8 +29,8 @@ describe('HeaderWidgetComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [HeaderWidgetComponent, TranslateModule.forRoot()] - }).compileComponents(); + imports: [HeaderWidgetComponent, NoopTranslateModule, NoopAnimationsModule] + }); }); beforeEach(() => { @@ -46,24 +47,80 @@ describe('HeaderWidgetComponent', () => { type: FormFieldTypes.GROUP, name: 'test-name', id: 'test-id', - params: { allowCollapse: true } + params: { + hideHeader: false, + allowCollapse: false, + collapseByDefault: false + } } ) ) ); + }); + + it('should render header widget template when type is group', () => { + fixture.detectChanges(); + + expect(fixture.nativeElement.querySelector('.adf-container-widget-header')).not.toBe(null); + expect(fixture.nativeElement.querySelector('#container-header-label-test-id').textContent.trim()).toEqual('test-name'); + }); + + it('should NOT render header widget template when type is different then group', () => { + spyOnProperty(component.element, 'isTypeFieldGroup').and.returnValue(false); + + fixture.detectChanges(); + + expect(fixture.nativeElement.querySelector('.adf-container-widget-header')).toBe(null); + }); + + it('should display header text when hideHeader is set to false', () => { fixture.detectChanges(); + + expect(fixture.nativeElement.querySelector('.adf-container-widget-header__text')).not.toBe(null); }); - it('should render the header widget template', () => { - const nativeElement = fixture.nativeElement; - expect(nativeElement.querySelector('.adf-container-widget-header')).toBeTruthy(); - expect(nativeElement.querySelector('#container-header-label-test-id').textContent.trim()).toEqual('test-name'); + it('should NOT display header text when hideHeader is set to true', () => { + component.element.json.params.hideHeader = true; + + fixture.detectChanges(); + + expect(fixture.nativeElement.querySelector('.adf-container-widget-header__text')).toBe(null); + }); + + it('should display expander when allowCollapse is set to true', () => { + component.element.json.params.allowCollapse = true; + + fixture.detectChanges(); + + expect(fixture.nativeElement.querySelector('.mdl-button--icon')).not.toBe(null); + }); + + it('should NOT display expander when allowCollapse is set to false', () => { + fixture.detectChanges(); + + expect(fixture.nativeElement.querySelector('.mdl-button--icon')).toBe(null); }); it('should call onExpanderClicked method when expander is clicked', () => { + component.element.json.params.allowCollapse = true; + fixture.detectChanges(); + spyOn(component, 'onExpanderClicked'); - const expander = fixture.nativeElement.querySelector('#container-header-label-test-id'); + + const expander = fixture.nativeElement.querySelector('.mdl-button--icon'); expander.click(); - expect(component.onExpanderClicked).toHaveBeenCalled(); + + expect(component.onExpanderClicked).toHaveBeenCalledWith(component.element); + }); + + it('should call onExpanderClicked method when header text is clicked', () => { + fixture.detectChanges(); + + spyOn(component, 'onExpanderClicked'); + + const headerText = fixture.nativeElement.querySelector('#container-header-label-test-id'); + headerText.click(); + + expect(component.onExpanderClicked).toHaveBeenCalledWith(component.element); }); }); diff --git a/lib/core/src/lib/form/components/widgets/header/header.widget.ts b/lib/core/src/lib/form/components/widgets/header/header.widget.ts index 49d94b9cb46..05d6daa09ac 100644 --- a/lib/core/src/lib/form/components/widgets/header/header.widget.ts +++ b/lib/core/src/lib/form/components/widgets/header/header.widget.ts @@ -19,7 +19,7 @@ import { Component, Input, ViewEncapsulation } from '@angular/core'; import { ContainerModel } from '../core/container.model'; import { FieldStylePipe } from './../../../pipes/field-style.pipe'; import { MatIconModule } from '@angular/material/icon'; -import { NgIf } from '@angular/common'; +import { NgIf, NgTemplateOutlet } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatButtonModule } from '@angular/material/button'; @@ -29,13 +29,13 @@ import { MatButtonModule } from '@angular/material/button'; styleUrls: ['./header.widget.scss'], standalone: true, encapsulation: ViewEncapsulation.None, - imports: [FieldStylePipe, MatIconModule, MatButtonModule, TranslateModule, NgIf] + imports: [FieldStylePipe, MatIconModule, MatButtonModule, TranslateModule, NgIf, NgTemplateOutlet] }) export class HeaderWidgetComponent { @Input() element: ContainerModel; onExpanderClicked(content: ContainerModel) { - if (content?.isCollapsible()) { + if (content?.isCollapsible) { content.isExpanded = !content.isExpanded; } } From ac07a827fd86bd9ef1533272bf3569824b4d7f05 Mon Sep 17 00:00:00 2001 From: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:58:53 +0530 Subject: [PATCH 17/35] Release 7.0.0-alpha.6 (#10415) * Release 7.0.0-alpha.6 * Revert package.json for adf-cli --- docs/license-info/README.md | 1 + .../license-info-7.0.0-alpha.6.md | 520 ++++++++++++++++++ docs/vulnerability/README.md | 1 + .../vulnerability/audit-info-7.0.0-alpha.6.md | 24 + lib/cli/package-lock.json | 4 +- lib/cli/package.json | 2 +- lib/content-services/package.json | 6 +- lib/core/package.json | 6 +- lib/eslint-angular/package.json | 2 +- lib/extensions/package.json | 4 +- lib/insights/package.json | 6 +- lib/js-api/package.json | 2 +- lib/process-services-cloud/package-lock.json | 4 +- lib/process-services-cloud/package.json | 8 +- lib/process-services/package.json | 8 +- lib/testing/package.json | 4 +- package-lock.json | 6 +- package.json | 2 +- 18 files changed, 578 insertions(+), 32 deletions(-) create mode 100644 docs/license-info/license-info-7.0.0-alpha.6.md create mode 100644 docs/vulnerability/audit-info-7.0.0-alpha.6.md diff --git a/docs/license-info/README.md b/docs/license-info/README.md index e28def082dd..8b3c6b5fce5 100644 --- a/docs/license-info/README.md +++ b/docs/license-info/README.md @@ -53,3 +53,4 @@ The pages linked below contain the licenses for all third party dependencies of - [ADF 7.0.0-alpha.3](license-info-7.0.0-alpha.3.md) - [ADF 7.0.0-alpha.4](license-info-7.0.0-alpha.4.md) - [ADF 7.0.0-alpha.5](license-info-7.0.0-alpha.5.md) +- [ADF 7.0.0-alpha.6](license-info-7.0.0-alpha.6.md) diff --git a/docs/license-info/license-info-7.0.0-alpha.6.md b/docs/license-info/license-info-7.0.0-alpha.6.md new file mode 100644 index 00000000000..00406a99160 --- /dev/null +++ b/docs/license-info/license-info-7.0.0-alpha.6.md @@ -0,0 +1,520 @@ +--- +Title: License info, alfresco-ng2-components 7.0.0-alpha.6 +--- + +# License information for alfresco-ng2-components 7.0.0-alpha.6 + +This page lists all third party libraries the project depends on. + +## Libraries + +| Name | Version | License | +| --- | --- | --- | +| [@adobe/css-tools](https://github.com/adobe/css-tools) | 4.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/animations](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/cdk](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/common](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/compiler](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/core](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/forms](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/material-date-fns-adapter](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/material](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/platform-browser](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/router](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@apollo/client](https://github.com/apollographql/apollo-client) | 3.11.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/code-frame](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/helper-validator-identifier](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/highlight](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/runtime](https://github.com/babel/babel) | 7.22.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-bundled-dicts](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-pipe](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-resolver](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-service-bus](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/cspell-types](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-ada](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-aws](https://github.com/streetsidesoftware/cspell-dict) | 4.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-bash](https://github.com/streetsidesoftware/cspell-dict) | 4.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-companies](https://github.com/streetsidesoftware/cspell-dict) | 3.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-cpp](https://github.com/streetsidesoftware/cspell-dict) | 5.1.16 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-cryptocurrencies](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-csharp](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-css](https://github.com/streetsidesoftware/cspell-dict) | 4.0.13 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-dart](https://github.com/streetsidesoftware/cspell-dict) | 2.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-data-science](https://github.com/streetsidesoftware/cspell-dict) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-django](https://github.com/streetsidesoftware/cspell-dicts) | 4.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-docker](https://github.com/streetsidesoftware/cspell-dicts) | 1.1.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-dotnet](https://github.com/streetsidesoftware/cspell-dict) | 5.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-elixir](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-en-common-misspellings](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-en-gb](https://github.com/streetsidesoftware/cspell-dicts) | 1.1.33 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-en_us](https://github.com/streetsidesoftware/cspell-dict) | 4.3.23 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-filetypes](https://github.com/streetsidesoftware/cspell-dict) | 3.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-fonts](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-fsharp](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-fullstack](https://github.com/streetsidesoftware/cspell-dict) | 3.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-gaming-terms](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-git](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-golang](https://github.com/streetsidesoftware/cspell-dict) | 6.0.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-haskell](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-html-symbol-entities](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-html](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-java](https://github.com/streetsidesoftware/cspell-dict) | 5.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-k8s](https://github.com/streetsidesoftware/cspell-dict) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-latex](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-lorem-ipsum](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-lua](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-makefile](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-node](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-npm](https://github.com/streetsidesoftware/cspell-dict) | 5.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-php](https://github.com/streetsidesoftware/cspell-dict) | 4.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-powershell](https://github.com/streetsidesoftware/cspell-dict) | 5.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-public-licenses](https://github.com/streetsidesoftware/cspell-dict) | 2.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-python](https://github.com/streetsidesoftware/cspell-dict) | 4.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-r](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-ruby](https://github.com/streetsidesoftware/cspell-dict) | 5.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-rust](https://github.com/streetsidesoftware/cspell-dict) | 4.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-scala](https://github.com/streetsidesoftware/cspell-dict) | 5.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-software-terms](https://github.com/streetsidesoftware/cspell-dict) | 3.4.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-sql](https://github.com/streetsidesoftware/cspell-dict) | 2.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-svelte](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-swift](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-typescript](https://github.com/streetsidesoftware/cspell-dict) | 3.1.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dict-vue](https://github.com/streetsidesoftware/cspell-dicts) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/dynamic-import](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/eslint-plugin](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@cspell/strong-weak-map](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@esbuild/linux-x64](https://github.com/evanw/esbuild) | 0.19.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@graphql-typed-document-node/core](https://github.com/dotansimha/graphql-typed-document-node) | 3.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@kurkle/color](https://github.com/kurkle/color) | 0.3.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@mapbox/node-pre-gyp](https://github.com/mapbox/node-pre-gyp) | 1.0.11 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [@mat-datetimepicker/core](https://github.com/kuhnroyal/mat-datetimepicker) | 12.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/animation](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/auto-init](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/banner](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/base](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/card](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/checkbox](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/chips](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/circular-progress](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/data-table](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/density](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/dialog](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/dom](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/drawer](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/elevation](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/fab](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/feature-targeting](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/floating-label](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/focus-ring](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/form-field](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/icon-button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/image-list](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/layout-grid](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/line-ripple](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/linear-progress](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/list](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/menu-surface](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/menu](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/notched-outline](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/progress-indicator](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/radio](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/ripple](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/rtl](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/segmented-button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/select](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/shape](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/slider](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/snackbar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/switch](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab-bar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab-indicator](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab-scroller](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tab](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/textfield](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/theme](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tokens](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/tooltip](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/top-app-bar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/touch-target](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@material/typography](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@ngx-translate/core](https://github.com/ngx-translate/core) | 14.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@nodelib/fs.scandir](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir) | 2.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@nodelib/fs.stat](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@nodelib/fs.walk](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk) | 1.2.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@pkgr/core](https://github.com/un-ts/pkgr) | 0.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/addon-interactions](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/core-server](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/core](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/csf](https://github.com/ComponentDriven/csf) | 0.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/global](https://github.com/storybookjs/global) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/instrumenter](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/test](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@storybook/theming](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@testing-library/dom](https://github.com/testing-library/dom-testing-library) | 10.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | 6.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@testing-library/user-event](https://github.com/testing-library/user-event) | 14.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@ts-morph/common](https://github.com/dsherret/ts-morph) | 0.21.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/aria-query](https://github.com/DefinitelyTyped/DefinitelyTyped) | 5.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/body-parser](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.19.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/connect](https://github.com/DefinitelyTyped/DefinitelyTyped) | 3.4.38 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/estree](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/express-serve-static-core](https://github.com/DefinitelyTyped/DefinitelyTyped) | 4.19.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/http-errors](https://github.com/DefinitelyTyped/DefinitelyTyped) | 2.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/mime](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped) | 20.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/prop-types](https://github.com/DefinitelyTyped/DefinitelyTyped) | 15.7.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/qs](https://github.com/DefinitelyTyped/DefinitelyTyped) | 6.9.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/range-parser](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.2.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped) | 18.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/send](https://github.com/DefinitelyTyped/DefinitelyTyped) | 0.17.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/serve-static](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.15.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/expect](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/pretty-format](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/spy](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@vitest/utils](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/caches](https://github.com/benjamn/wryware) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/context](https://github.com/benjamn/wryware) | 0.7.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/equality](https://github.com/benjamn/wryware) | 0.5.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/trie](https://github.com/benjamn/wryware) | 0.4.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/trie](https://github.com/benjamn/wryware) | 0.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [abbrev](https://github.com/isaacs/abbrev-js) | 1.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [accepts](https://github.com/jshttp/accepts) | 1.3.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [agent-base](https://github.com/TooTallNate/node-agent-base) | 6.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [alfresco-ng2-components](https://github.com/Alfresco/alfresco-ng2-components) | 7.0.0-alpha.6 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [angular-oauth2-oidc-jwks](https://github.com/manfredsteyer/angular-oauth2-oidc) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc) | 16.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-regex](https://github.com/chalk/ansi-regex) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 3.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 4.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 5.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [apollo-angular](https://github.com/kamilkisiela/apollo-angular) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [aproba](https://github.com/iarna/aproba) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [are-we-there-yet](https://github.com/npm/are-we-there-yet) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [argparse](https://github.com/nodeca/argparse) | 2.0.1 | [Python-2.0](http://www.opensource.org/licenses/Python-2.0) | +| [aria-query](https://github.com/A11yance/aria-query) | 5.3.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [array-flatten](https://github.com/blakeembrey/array-flatten) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [array-timsort](https://github.com/kaelzhang/node-array-timsort) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [asap](https://github.com/kriskowal/asap) | 2.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [assertion-error](https://github.com/chaijs/assertion-error) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ast-types](https://github.com/benjamn/ast-types) | 0.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [available-typed-arrays](https://github.com/inspect-js/available-typed-arrays) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [backo2](https://github.com/mokesmokes/backo) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [body-parser](https://github.com/expressjs/body-parser) | 1.20.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [braces](https://github.com/micromatch/braces) | 3.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [browser-assert](https://github.com/socialally/browser-assert) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [bytes](https://github.com/visionmedia/bytes.js) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [call-bind](https://github.com/ljharb/call-bind) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [callsites](https://github.com/sindresorhus/callsites) | 3.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [canvas](https://github.com/Automattic/node-canvas) | 2.11.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chai](https://github.com/chaijs/chai) | 5.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 2.4.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 4.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chart.js](https://github.com/chartjs/Chart.js) | 4.4.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [check-error](https://github.com/chaijs/check-error) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chownr](https://github.com/isaacs/chownr) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [clear-module](https://github.com/sindresorhus/clear-module) | 4.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [code-block-writer](https://github.com/dsherret/code-block-writer) | 12.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-convert](https://github.com/Qix-/color-convert) | 1.9.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-convert](https://github.com/Qix-/color-convert) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-name](https://github.com/dfcreative/color-name) | 1.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-name](https://github.com/colorjs/color-name) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-support](https://github.com/isaacs/color-support) | 1.1.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [comment-json](https://github.com/kaelzhang/node-comment-json) | 4.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [component-emitter](https://github.com/sindresorhus/component-emitter) | 1.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [configstore](https://github.com/yeoman/configstore) | 6.0.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [console-control-strings](https://github.com/iarna/console-control-strings) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [content-disposition](https://github.com/jshttp/content-disposition) | 0.5.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [content-type](https://github.com/jshttp/content-type) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookie-signature](https://github.com/visionmedia/node-cookie-signature) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookie](https://github.com/jshttp/cookie) | 0.7.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [core-util-is](https://github.com/isaacs/core-util-is) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) | 8.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cropperjs](https://github.com/fengyuanchen/cropperjs) | 1.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [crypto-random-string](https://github.com/sindresorhus/crypto-random-string) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-dictionary](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-glob](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-grammar](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-io](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-lib](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cspell-trie-lib](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [css.escape](https://github.com/mathiasbynens/CSS.escape) | 1.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [csstype](https://github.com/frenic/csstype) | 3.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [d](https://github.com/medikoo/d) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [date-fns](https://github.com/date-fns/date-fns) | 2.30.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [debug](https://github.com/visionmedia/debug) | 2.6.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [debug](https://github.com/debug-js/debug) | 4.3.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [decompress-response](https://github.com/sindresorhus/decompress-response) | 4.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [deep-eql](https://github.com/chaijs/deep-eql) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [define-data-property](https://github.com/ljharb/define-data-property) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [delegates](https://github.com/visionmedia/node-delegates) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [depd](https://github.com/dougwilson/nodejs-depd) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [dequal](https://github.com/lukeed/dequal) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [destroy](https://github.com/stream-utils/destroy) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [detect-libc](https://github.com/lovell/detect-libc) | 2.0.3 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [dezalgo](https://github.com/npm/dezalgo) | 1.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) | 0.5.16 | [MIT](http://www.opensource.org/licenses/MIT) | +| [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [dot-prop](https://github.com/sindresorhus/dot-prop) | 6.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| dotenv-expand | 5.1.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [ee-first](https://github.com/jonathanong/ee-first) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [emoji-regex](https://github.com/mathiasbynens/emoji-regex) | 8.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [encodeurl](https://github.com/pillarjs/encodeurl) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [encodeurl](https://github.com/pillarjs/encodeurl) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [encoding](https://github.com/andris9/encoding) | 0.1.13 | [MIT](http://www.opensource.org/licenses/MIT) | +| [entities](https://github.com/fb55/entities) | 4.5.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [error-ex](https://github.com/qix-/node-error-ex) | 1.3.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es-define-property](https://github.com/ljharb/es-define-property) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es-errors](https://github.com/ljharb/es-errors) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.64 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| esbuild-register | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [esbuild](https://github.com/evanw/esbuild) | 0.19.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [escape-html](https://github.com/component/escape-html) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [escape-string-regexp](https://github.com/sindresorhus/escape-string-regexp) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [esniff](https://github.com/medikoo/esniff) | 2.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [esprima](https://github.com/jquery/esprima) | 4.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [estree-walker](https://github.com/Rich-Harris/estree-walker) | 3.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [etag](https://github.com/jshttp/etag) | 1.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [eve-raphael](https://github.com/tomasAlabes/eve) | 0.5.0 | [Apache](http://www.apache.org/licenses/LICENSE-2.0) | +| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [eventemitter3](https://github.com/primus/eventemitter3) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [express](https://github.com/expressjs/express) | 4.21.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ext](https://github.com/medikoo/es5-ext.git#ext) | 1.7.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [fast-equals](https://github.com/planttheidea/fast-equals) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-equals](https://github.com/planttheidea/fast-equals) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-glob](https://github.com/mrmlnc/fast-glob) | 3.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fastq](https://github.com/mcollina/fastq) | 1.17.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [fill-range](https://github.com/jonschlinkert/fill-range) | 7.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [finalhandler](https://github.com/pillarjs/finalhandler) | 1.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [find-up](https://github.com/sindresorhus/find-up) | 6.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [for-each](https://github.com/Raynos/for-each) | 0.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [form-data](https://github.com/form-data/form-data) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [formidable](https://github.com/node-formidable/formidable) | 3.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [forwarded](https://github.com/jshttp/forwarded) | 0.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fresh](https://github.com/jshttp/fresh) | 0.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fs-minipass](https://github.com/npm/fs-minipass) | 2.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [fs.realpath](https://github.com/isaacs/fs.realpath) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [function-bind](https://github.com/Raynos/function-bind) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [gauge](https://github.com/iarna/gauge) | 3.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [gensequence](https://github.com/streetsidesoftware/GenSequence) | 6.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [get-func-name](https://github.com/chaijs/get-func-name) | 2.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [glob-parent](https://github.com/gulpjs/glob-parent) | 5.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [glob](https://github.com/isaacs/node-glob) | 7.2.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [global-dirs](https://github.com/sindresorhus/global-dirs) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [gopd](https://github.com/ljharb/gopd) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [graceful-fs](https://github.com/isaacs/node-graceful-fs) | 4.2.11 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [graphql-tag](https://github.com/apollographql/graphql-tag) | 2.12.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [graphql](https://github.com/graphql/graphql-js) | 16.9.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-flag](https://github.com/sindresorhus/has-flag) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-flag](https://github.com/sindresorhus/has-flag) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-own-prop](https://github.com/sindresorhus/has-own-prop) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-property-descriptors](https://github.com/inspect-js/has-property-descriptors) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-proto](https://github.com/inspect-js/has-proto) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-tostringtag](https://github.com/inspect-js/has-tostringtag) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-unicode](https://github.com/iarna/has-unicode) | 2.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [hasown](https://github.com/inspect-js/hasOwn) | 2.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [hexoid](https://github.com/lukeed/hexoid) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [hoist-non-react-statics](https://github.com/mridgway/hoist-non-react-statics) | 3.3.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [http-errors](https://github.com/jshttp/http-errors) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.4.24 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [import-fresh](https://github.com/sindresorhus/import-fresh) | 3.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [import-meta-resolve](https://github.com/wooorm/import-meta-resolve) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [imurmurhash](https://github.com/jensyt/imurmurhash-js) | 0.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [indent-string](https://github.com/sindresorhus/indent-string) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [inflight](https://github.com/npm/inflight) | 1.0.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [inherits](https://github.com/isaacs/inherits) | 2.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ini](https://github.com/isaacs/ini) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ipaddr.js](https://github.com/whitequark/ipaddr.js) | 1.9.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-arguments](https://github.com/inspect-js/is-arguments) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-arrayish](https://github.com/qix-/node-is-arrayish) | 0.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-callable](https://github.com/inspect-js/is-callable) | 1.2.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-extglob](https://github.com/jonschlinkert/is-extglob) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-fullwidth-code-point](https://github.com/sindresorhus/is-fullwidth-code-point) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-generator-function](https://github.com/inspect-js/is-generator-function) | 1.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-glob](https://github.com/micromatch/is-glob) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-number](https://github.com/jonschlinkert/is-number) | 7.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-obj](https://github.com/sindresorhus/is-obj) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-typed-array](https://github.com/inspect-js/is-typed-array) | 1.1.13 | [MIT](http://www.opensource.org/licenses/MIT) | +| [is-typedarray](https://github.com/hughsk/is-typedarray) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iterall](https://github.com/leebyron/iterall) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [js-tokens](https://github.com/lydell/js-tokens) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [js-yaml](https://github.com/nodeca/js-yaml) | 4.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [json-parse-even-better-errors](https://github.com/npm/json-parse-even-better-errors) | 2.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [jsrsasign](https://github.com/kjur/jsrsasign) | 11.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lines-and-columns](https://github.com/eventualbuddha/lines-and-columns) | 1.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [locate-path](https://github.com/sindresorhus/locate-path) | 7.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lodash-es](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lodash](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [loose-envify](https://github.com/zertosh/loose-envify) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [loupe](https://github.com/chaijs/loupe) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [lz-string](https://github.com/pieroxy/lz-string) | 1.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [make-dir](https://github.com/sindresorhus/make-dir) | 3.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [material-icons](https://github.com/marella/material-icons) | 1.13.12 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [media-typer](https://github.com/jshttp/media-typer) | 0.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [merge-descriptors](https://github.com/sindresorhus/merge-descriptors) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [merge2](https://github.com/teambition/merge2) | 1.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [micromatch](https://github.com/micromatch/micromatch) | 4.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime-db](https://github.com/jshttp/mime-db) | 1.52.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime-types](https://github.com/jshttp/mime-types) | 2.1.35 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime](https://github.com/broofa/node-mime) | 1.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mimic-response](https://github.com/sindresorhus/mimic-response) | 2.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [min-indent](https://github.com/thejameskyle/min-indent) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [minimatch-browser](https://github.com/isaacs/minimatch) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimatch](https://github.com/isaacs/minimatch) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimatch](https://github.com/isaacs/minimatch) | 7.4.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minipass](https://github.com/isaacs/minipass) | 3.3.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minipass](https://github.com/isaacs/minipass) | 5.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minizlib](https://github.com/isaacs/minizlib) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mkdirp](https://github.com/isaacs/node-mkdirp) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mkdirp](https://github.com/isaacs/node-mkdirp) | 2.1.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ms](https://github.com/zeit/ms) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ms](https://github.com/vercel/ms) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [nan](https://github.com/nodejs/nan) | 2.20.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [negotiator](https://github.com/jshttp/negotiator) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [next-tick](https://github.com/medikoo/next-tick) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ng2-charts](https://github.com/valor-software/ng2-charts) | 4.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [node-fetch](https://github.com/bitinn/node-fetch) | 2.7.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [nopt](https://github.com/npm/nopt) | 5.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [npmlog](https://github.com/npm/npmlog) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [object-assign](https://github.com/sindresorhus/object-assign) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.13.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [on-finished](https://github.com/jshttp/on-finished) | 2.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [optimism](https://github.com/benjamn/optimism) | 0.18.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [p-limit](https://github.com/sindresorhus/p-limit) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [p-locate](https://github.com/sindresorhus/p-locate) | 6.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parent-module](https://github.com/sindresorhus/parent-module) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parent-module](https://github.com/sindresorhus/parent-module) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parse-json](https://github.com/sindresorhus/parse-json) | 5.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parse5](https://github.com/inikulin/parse5) | 7.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parseurl](https://github.com/pillarjs/parseurl) | 1.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-browserify](https://github.com/browserify/path-browserify) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-exists](https://github.com/sindresorhus/path-exists) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-is-absolute](https://github.com/sindresorhus/path-is-absolute) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-to-regexp](https://github.com/pillarjs/path-to-regexp) | 0.1.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-type](https://github.com/sindresorhus/path-type) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path2d-polyfill](https://github.com/nilzona/path2d-polyfill) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pathval](https://github.com/chaijs/pathval) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) | 3.3.122 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [picocolors](https://github.com/alexeyraspopov/picocolors) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [picomatch](https://github.com/micromatch/picomatch) | 2.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [polished](https://github.com/styled-components/polished) | 4.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [possible-typed-array-names](https://github.com/ljharb/possible-typed-array-names) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pretty-format](https://github.com/facebook/jest) | 27.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [process](https://github.com/shtylman/node-process) | 0.11.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [prop-types](https://github.com/facebook/prop-types) | 15.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [proxy-addr](https://github.com/jshttp/proxy-addr) | 2.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [qs](https://github.com/ljharb/qs) | 6.13.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [queue-microtask](https://github.com/feross/queue-microtask) | 1.2.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [range-parser](https://github.com/jshttp/range-parser) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [raphael](https://github.com/DmitryBaranovskiy/raphael) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [raw-body](https://github.com/stream-utils/raw-body) | 2.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-dom](https://github.com/facebook/react) | 18.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-is](https://github.com/facebook/react) | 16.13.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-is](https://github.com/facebook/react) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react](https://github.com/facebook/react) | 18.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [recast](https://github.com/benjamn/recast) | 0.23.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [redent](https://github.com/sindresorhus/redent) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [regenerator-runtime](https://github.com/facebook/regenerator/tree/main/packages/runtime) | 0.13.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rehackt](https://github.com/phryneas/rehackt) | 0.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [repeat-string](https://github.com/jonschlinkert/repeat-string) | 1.6.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [resolve-from](https://github.com/sindresorhus/resolve-from) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [resolve-from](https://github.com/sindresorhus/resolve-from) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [response-iterator](https://github.com/kmalakoff/response-iterator) | 0.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [reusify](https://github.com/mcollina/reusify) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rimraf](https://github.com/isaacs/rimraf) | 3.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [run-parallel](https://github.com/feross/run-parallel) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rxjs](https://github.com/reactivex/rxjs) | 7.8.1 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [safer-buffer](https://github.com/ChALkeR/safer-buffer) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [safevalues](https://github.com/google/safevalues) | 0.3.4 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [scheduler](https://github.com/facebook/react) | 0.23.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [semver](https://github.com/npm/node-semver) | 6.3.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [semver](https://github.com/npm/node-semver) | 7.5.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [semver](https://github.com/npm/node-semver) | 7.6.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [send](https://github.com/pillarjs/send) | 0.19.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [serve-static](https://github.com/expressjs/serve-static) | 1.16.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [set-blocking](https://github.com/yargs/set-blocking) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [set-function-length](https://github.com/ljharb/set-function-length) | 1.2.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [setprototypeof](https://github.com/wesleytodd/setprototypeof) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [side-channel](https://github.com/ljharb/side-channel) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [signal-exit](https://github.com/tapjs/signal-exit) | 3.0.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [simple-concat](https://github.com/feross/simple-concat) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [simple-get](https://github.com/feross/simple-get) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [source-map](https://github.com/mozilla/source-map) | 0.6.1 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [statuses](https://github.com/jshttp/statuses) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [storybook](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [string-width](https://github.com/sindresorhus/string-width) | 4.2.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [strip-ansi](https://github.com/chalk/strip-ansi) | 6.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [strip-indent](https://github.com/sindresorhus/strip-indent) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [subscriptions-transport-ws](https://github.com/apollostack/subscriptions-transport-ws) | 0.11.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [superagent](https://github.com/ladjs/superagent) | 9.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [supports-color](https://github.com/chalk/supports-color) | 5.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [supports-color](https://github.com/chalk/supports-color) | 7.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [symbol-observable](https://github.com/blesh/symbol-observable) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [symbol-observable](https://github.com/blesh/symbol-observable) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [synckit](https://github.com/un-ts/synckit) | 0.8.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tar](https://github.com/isaacs/node-tar) | 6.2.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [tiny-invariant](https://github.com/alexreardon/tiny-invariant) | 1.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tinyrainbow](https://github.com/tinylibs/tinyrainbow) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tinyspy](https://github.com/tinylibs/tinyspy) | 3.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [to-regex-range](https://github.com/micromatch/to-regex-range) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [toidentifier](https://github.com/component/toidentifier) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tr46](https://github.com/Sebmaster/tr46.js) | 0.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-dedent](https://github.com/tamino-martinius/node-ts-dedent) | 2.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-invariant](https://github.com/apollographql/invariant-packages) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-morph](https://github.com/dsherret/ts-morph) | 20.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tslib](https://github.com/Microsoft/tslib) | 2.7.0 | [0BSD](http://landley.net/toybox/license.html) | +| [type-fest](https://github.com/sindresorhus/type-fest) | 1.4.0 | ([MIT](http://www.opensource.org/licenses/MIT) OR [CC0-1.0](http://creativecommons.org/publicdomain/zero/1.0/legalcode)) | +| [type-fest](https://github.com/sindresorhus/type-fest) | 2.19.0 | ([MIT](http://www.opensource.org/licenses/MIT) OR [CC0-1.0](http://creativecommons.org/publicdomain/zero/1.0/legalcode)) | +| [type-is](https://github.com/jshttp/type-is) | 1.6.18 | [MIT](http://www.opensource.org/licenses/MIT) | +| [type](https://github.com/medikoo/type) | 2.7.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [typedarray-to-buffer](https://github.com/feross/typedarray-to-buffer) | 3.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [undici-types](https://github.com/nodejs/undici) | 6.19.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [unique-string](https://github.com/sindresorhus/unique-string) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [unpipe](https://github.com/stream-utils/unpipe) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [util](https://github.com/browserify/node-util) | 0.12.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [utils-merge](https://github.com/jaredhanson/utils-merge) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [vary](https://github.com/jshttp/vary) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [vscode-languageserver-textdocument](https://github.com/Microsoft/vscode-languageserver-node) | 1.0.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [vscode-uri](https://github.com/microsoft/vscode-uri) | 3.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [web-streams-polyfill](https://github.com/MattiasBuelens/web-streams-polyfill) | 3.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [webidl-conversions](https://github.com/jsdom/webidl-conversions) | 3.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [whatwg-url](https://github.com/jsdom/whatwg-url) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [which-typed-array](https://github.com/inspect-js/which-typed-array) | 1.1.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [wide-align](https://github.com/iarna/wide-align) | 1.1.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [write-file-atomic](https://github.com/npm/write-file-atomic) | 3.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ws](https://github.com/websockets/ws) | 7.5.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ws](https://github.com/websockets/ws) | 8.18.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [xdg-basedir](https://github.com/sindresorhus/xdg-basedir) | 5.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [yocto-queue](https://github.com/sindresorhus/yocto-queue) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zen-observable-ts](https://github.com/apollographql/zen-observable-ts) | 1.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zen-observable](https://github.com/zenparsing/zen-observable) | 0.8.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zone.js](https://github.com/angular/angular) | 0.13.3 | [MIT](http://www.opensource.org/licenses/MIT) | + diff --git a/docs/vulnerability/README.md b/docs/vulnerability/README.md index 6111407fea9..8f24e374385 100644 --- a/docs/vulnerability/README.md +++ b/docs/vulnerability/README.md @@ -50,3 +50,4 @@ The pages linked below contain the audit for all third party dependencies of ADF - [ADF 7.0.0-alpha.3](audit-info-7.0.0-alpha.3.md) - [ADF 7.0.0-alpha.4](audit-info-7.0.0-alpha.4.md) - [ADF 7.0.0-alpha.5](audit-info-7.0.0-alpha.5.md) +- [ADF 7.0.0-alpha.6](audit-info-7.0.0-alpha.6.md) diff --git a/docs/vulnerability/audit-info-7.0.0-alpha.6.md b/docs/vulnerability/audit-info-7.0.0-alpha.6.md new file mode 100644 index 00000000000..a1a82577056 --- /dev/null +++ b/docs/vulnerability/audit-info-7.0.0-alpha.6.md @@ -0,0 +1,24 @@ +--- +Title: Audit info, alfresco-ng2-components 7.0.0-alpha.6 +--- + +# Audit information for alfresco-ng2-components 7.0.0-alpha.6 + +This page lists the security audit of the dependencies this project depends on. + +## Risks + +- Critical risk: 0 +- High risk: 1 +- Moderate risk: 0 +- Low risk: 0 + +Dependencies analyzed: + +## Libraries + +| Severity | Module | Vulnerable versions | +| --- | --- | --- | +|high | pdfjs-dist | "<=4.1.392" | + + diff --git a/lib/cli/package-lock.json b/lib/cli/package-lock.json index d82f07e82bd..02b81267d33 100644 --- a/lib/cli/package-lock.json +++ b/lib/cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "@alfresco/adf-cli", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@alfresco/adf-cli", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "license": "Apache-2.0", "dependencies": { "@alfresco/js-api": ">=7.8.0", diff --git a/lib/cli/package.json b/lib/cli/package.json index f79712cce34..b170d8aca69 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-cli", "description": "Alfresco ADF cli and utils", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "bin": { "adf-cli": "bin/adf-cli", diff --git a/lib/content-services/package.json b/lib/content-services/package.json index 0ba09b9dcaa..14dff8531e6 100644 --- a/lib/content-services/package.json +++ b/lib/content-services/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-content-services", "description": "Alfresco ADF content services", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -21,9 +21,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5", + "@alfresco/js-api": ">=8.0.0-alpha.6", "@ngx-translate/core": ">=14.0.0", - "@alfresco/adf-core": ">=7.0.0-alpha.5" + "@alfresco/adf-core": ">=7.0.0-alpha.6" }, "keywords": [ "content-services", diff --git a/lib/core/package.json b/lib/core/package.json index cd686441e18..45408230a09 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-core", "description": "Alfresco ADF core", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -33,8 +33,8 @@ "@angular/material": ">=14.1.2", "@angular/router": ">=14.1.3", "@mat-datetimepicker/core": ">=10.1.1", - "@alfresco/js-api": ">=8.0.0-alpha.5", - "@alfresco/adf-extensions": ">=7.0.0-alpha.5", + "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/adf-extensions": ">=7.0.0-alpha.6", "@ngx-translate/core": ">=14.0.0", "minimatch-browser": ">=1.0.0", "pdfjs-dist": ">=3.3.122", diff --git a/lib/eslint-angular/package.json b/lib/eslint-angular/package.json index 7a30e128c12..124f5739052 100644 --- a/lib/eslint-angular/package.json +++ b/lib/eslint-angular/package.json @@ -1,6 +1,6 @@ { "name": "@alfresco/eslint-plugin-eslint-angular", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "description": "Alfresco ADF eslint angular custom rules", "main": "main.js", "author": "Hyland Software, Inc. and its affiliates", diff --git a/lib/extensions/package.json b/lib/extensions/package.json index e1d91dc3807..2fb462f0100 100644 --- a/lib/extensions/package.json +++ b/lib/extensions/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-extensions", "description": "Provides extensibility support for ADF applications.", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "license": "Apache-2.0", "author": "Hyland Software, Inc. and its affiliates", "repository": { @@ -14,7 +14,7 @@ "peerDependencies": { "@angular/common": ">=14.1.3", "@angular/core": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5" + "@alfresco/js-api": ">=8.0.0-alpha.6" }, "keywords": [ "extensions", diff --git a/lib/insights/package.json b/lib/insights/package.json index 25e2e74e6bf..6d2d7b11ba3 100644 --- a/lib/insights/package.json +++ b/lib/insights/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-insights", "description": "Alfresco ADF insights", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -11,8 +11,8 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@alfresco/adf-core": ">=7.0.0-alpha.5", - "@alfresco/adf-content-services": ">=7.0.0-alpha.5", + "@alfresco/adf-core": ">=7.0.0-alpha.6", + "@alfresco/adf-content-services": ">=7.0.0-alpha.6", "@ngx-translate/core": ">=14.0.0", "chart.js": "^4.3.0", "ng2-charts": "^4.1.1", diff --git a/lib/js-api/package.json b/lib/js-api/package.json index 153cedecd81..648a966962f 100644 --- a/lib/js-api/package.json +++ b/lib/js-api/package.json @@ -1,6 +1,6 @@ { "name": "@alfresco/js-api", - "version": "8.0.0-alpha.5", + "version": "8.0.0-alpha.6", "license": "Apache-2.0", "description": "JavaScript client library for the Alfresco REST API", "author": "Hyland Software, Inc. and its affiliates", diff --git a/lib/process-services-cloud/package-lock.json b/lib/process-services-cloud/package-lock.json index 5a4f81a6886..2d4f14e547e 100644 --- a/lib/process-services-cloud/package-lock.json +++ b/lib/process-services-cloud/package-lock.json @@ -1,12 +1,12 @@ { "name": "@alfresco/adf-process-services-cloud", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@alfresco/adf-process-services-cloud", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "license": "Apache-2.0", "dependencies": { "@editorjs/code": "2.9.0", diff --git a/lib/process-services-cloud/package.json b/lib/process-services-cloud/package.json index 369c8482745..e45987dfc68 100644 --- a/lib/process-services-cloud/package.json +++ b/lib/process-services-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-process-services-cloud", "description": "Alfresco ADF process services cloud", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -36,9 +36,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5", - "@alfresco/adf-core": ">=7.0.0-alpha.5", - "@alfresco/adf-content-services": ">=7.0.0-alpha.5", + "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/adf-core": ">=7.0.0-alpha.6", + "@alfresco/adf-content-services": ">=7.0.0-alpha.6", "@apollo/client": ">=3.7.2", "@ngx-translate/core": ">=14.0.0", "apollo-angular": ">=4.0.1", diff --git a/lib/process-services/package.json b/lib/process-services/package.json index 6c8824b4c48..1eb8e2fea94 100644 --- a/lib/process-services/package.json +++ b/lib/process-services/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-process-services", "description": "Alfresco ADF process services", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -21,9 +21,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.5", - "@alfresco/adf-core": ">=7.0.0-alpha.5", - "@alfresco/adf-content-services": ">=7.0.0-alpha.5", + "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/adf-core": ">=7.0.0-alpha.6", + "@alfresco/adf-content-services": ">=7.0.0-alpha.6", "@ngx-translate/core": ">=14.0.0" }, "keywords": [ diff --git a/lib/testing/package.json b/lib/testing/package.json index 7eeef7e8de8..31bea72195d 100644 --- a/lib/testing/package.json +++ b/lib/testing/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-testing", "description": "Alfresco ADF testing page and utils", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -11,7 +11,7 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "peerDependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.5" + "@alfresco/js-api": ">=8.0.0-alpha.6" }, "keywords": [ "testing", diff --git a/package-lock.json b/package-lock.json index 5f8772014a5..ae882eb70c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alfresco-ng2-components", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "alfresco-ng2-components", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "license": "Apache-2.0", "dependencies": { "@angular/animations": "16.2.9", @@ -164,7 +164,7 @@ }, "lib/eslint-angular": { "name": "@alfresco/eslint-plugin-eslint-angular", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "dev": true, "license": "Apache-2.0" }, diff --git a/package.json b/package.json index 323c4c77083..5582e9024b2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "alfresco-ng2-components", "description": "Alfresco Angular components", - "version": "7.0.0-alpha.5", + "version": "7.0.0-alpha.6", "author": "Hyland Software, Inc. and its affiliates", "scripts": { "prepare": "husky install", From 38ccfa13778a65a1f9962bf2b56da48304c787e1 Mon Sep 17 00:00:00 2001 From: Ehsan Rezaei Date: Thu, 21 Nov 2024 11:37:05 +0100 Subject: [PATCH 18/35] AAE-20808 Switch to new graphql library (#10390) * AAE-20808 Switch to new graphql library * AAE-20808 Code refactoring * AAE-20808 Fixed storybook build --- .../.storybook/tsconfig.json | 2 +- .../process-filter-cloud.service.spec.ts | 11 +- .../notification-cloud.service.spec.ts | 51 ++--- .../services/notification-cloud.service.ts | 101 ++------- .../src/lib/services/public-api.ts | 1 + .../lib/services/web-socket.service.spec.ts | 135 ++++++++++++ .../src/lib/services/web-socket.service.ts | 204 ++++++++++++++++++ ...ervice-task-filter-cloud.component.spec.ts | 14 +- .../edit-task-filter-cloud.component.spec.ts | 14 +- .../task-filters-cloud.component.spec.ts | 15 +- .../task-filter-cloud.service.spec.ts | 11 +- package-lock.json | 20 +- package.json | 3 +- 13 files changed, 434 insertions(+), 148 deletions(-) create mode 100644 lib/process-services-cloud/src/lib/services/web-socket.service.spec.ts create mode 100644 lib/process-services-cloud/src/lib/services/web-socket.service.ts diff --git a/lib/process-services-cloud/.storybook/tsconfig.json b/lib/process-services-cloud/.storybook/tsconfig.json index 83c6a0ca455..30f9f5e443a 100644 --- a/lib/process-services-cloud/.storybook/tsconfig.json +++ b/lib/process-services-cloud/.storybook/tsconfig.json @@ -6,5 +6,5 @@ }, "exclude": ["../**/*.spec.ts" ], - "include": ["../src/**/*", "*.js"] + "include": ["../src/**/*", "*.js", "../../core/feature-flags"] } diff --git a/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts index df1abc04513..2d76b472ddb 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts @@ -32,6 +32,7 @@ import { import { ProcessFilterCloudModel } from '../models/process-filter-cloud.model'; import { IdentityUserService } from '../../../people/services/identity-user.service'; import { NotificationCloudService } from '../../../services/notification-cloud.service'; +import { provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; describe('ProcessFilterCloudService', () => { let service: ProcessFilterCloudService; @@ -52,7 +53,10 @@ describe('ProcessFilterCloudService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ProcessServiceCloudTestingModule], - providers: [{ provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] + providers: [ + { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false }) + ] }); service = TestBed.inject(ProcessFilterCloudService); @@ -68,7 +72,7 @@ describe('ProcessFilterCloudService', () => { }); it('should create processfilter key by using appName and the username', (done) => { - service.getProcessFilters('mock-appName').subscribe((res: any) => { + service.getProcessFilters('mock-appName').subscribe((res: ProcessFilterCloudModel[]) => { expect(res).toBeDefined(); expect(getCurrentUserInfoSpy).toHaveBeenCalled(); done(); @@ -137,7 +141,7 @@ describe('ProcessFilterCloudService', () => { it('should create the process filters in case the filters are not exist in the user preferences', (done) => { getPreferencesSpy.and.returnValue(of(fakeProcessCloudFilterWithDifferentEntries)); - service.getProcessFilters('mock-appName').subscribe((res: any) => { + service.getProcessFilters('mock-appName').subscribe((res: ProcessFilterCloudModel[]) => { expect(res).toBeDefined(); expect(res).not.toBeNull(); expect(res.length).toBe(3); @@ -243,6 +247,7 @@ describe('ProcessFilterCloudService', () => { it('should reset filters to default values', async () => { const changedFilter = new ProcessFilterCloudModel(fakeProcessCloudFilters[0]); changedFilter.processDefinitionKey = 'modifiedProcessDefinitionKey'; + // eslint-disable-next-line @typescript-eslint/no-explicit-any spyOn(service, 'defaultProcessFilters').and.returnValue(fakeProcessCloudFilters); await service.resetProcessFilterToDefaults('mock-appName', changedFilter).toPromise(); diff --git a/lib/process-services-cloud/src/lib/services/notification-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/services/notification-cloud.service.spec.ts index 9374153402f..3139b393730 100644 --- a/lib/process-services-cloud/src/lib/services/notification-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/services/notification-cloud.service.spec.ts @@ -18,17 +18,12 @@ import { TestBed } from '@angular/core/testing'; import { ProcessServiceCloudTestingModule } from '../testing/process-service-cloud.testing.module'; import { NotificationCloudService } from './notification-cloud.service'; -import { Apollo } from 'apollo-angular'; +import { WebSocketService } from './web-socket.service'; +import { provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; describe('NotificationCloudService', () => { let service: NotificationCloudService; - let apollo: Apollo; - let apolloCreateSpy: jasmine.Spy; - let apolloSubscribeSpy: jasmine.Spy; - - const useMock: any = { - subscribe: () => {} - }; + let wsService: WebSocketService; const queryMock = ` subscription { @@ -43,39 +38,25 @@ describe('NotificationCloudService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ProcessServiceCloudTestingModule] + imports: [ProcessServiceCloudTestingModule], + providers: [WebSocketService, provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false })] }); service = TestBed.inject(NotificationCloudService); - apollo = TestBed.inject(Apollo); - - service.appsListening = []; - apolloCreateSpy = spyOn(apollo, 'createNamed'); - apolloSubscribeSpy = spyOn(apollo, 'use').and.returnValue(useMock); + wsService = TestBed.inject(WebSocketService); }); - it('should not create more than one websocket per app if it was already created', () => { - service.makeGQLQuery('myAppName', queryMock); - expect(service.appsListening.length).toBe(1); - expect(service.appsListening[0]).toBe('myAppName'); - - service.makeGQLQuery('myAppName', queryMock); - expect(service.appsListening.length).toBe(1); - expect(service.appsListening[0]).toBe('myAppName'); - - expect(apolloCreateSpy).toHaveBeenCalledTimes(1); - expect(apolloSubscribeSpy).toHaveBeenCalledTimes(2); - }); + it('should call getSubscription with the correct parameters', () => { + const getSubscriptionSpy = spyOn(wsService, 'getSubscription').and.callThrough(); - it('should create new websocket if it is subscribing to new app', () => { service.makeGQLQuery('myAppName', queryMock); - expect(service.appsListening.length).toBe(1); - expect(service.appsListening[0]).toBe('myAppName'); - - service.makeGQLQuery('myOtherAppName', queryMock); - expect(service.appsListening.length).toBe(2); - expect(service.appsListening[1]).toBe('myOtherAppName'); - expect(apolloCreateSpy).toHaveBeenCalledTimes(2); - expect(apolloSubscribeSpy).toHaveBeenCalledTimes(2); + expect(getSubscriptionSpy).toHaveBeenCalledWith({ + apolloClientName: 'myAppName', + wsUrl: 'myAppName/notifications', + httpUrl: 'myAppName/notifications/graphql', + subscriptionOptions: { + query: jasmine.any(Object) + } + }); }); }); diff --git a/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts b/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts index afb1cd3bbef..1646b3c97d9 100644 --- a/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts @@ -15,101 +15,24 @@ * limitations under the License. */ -import { Apollo } from 'apollo-angular'; -import { HttpLink } from 'apollo-angular/http'; -import { split, gql, InMemoryCache, ApolloLink, InMemoryCacheConfig } from '@apollo/client/core'; -import { WebSocketLink } from '@apollo/client/link/ws'; -import { onError } from '@apollo/client/link/error'; -import { getMainDefinition } from '@apollo/client/utilities'; +import { gql } from '@apollo/client/core'; import { Injectable } from '@angular/core'; -import { AuthenticationService } from '@alfresco/adf-core'; -import { BaseCloudService } from './base-cloud.service'; -import { AdfHttpClient } from '@alfresco/adf-core/api'; +import { WebSocketService } from './web-socket.service'; @Injectable({ providedIn: 'root' }) -export class NotificationCloudService extends BaseCloudService { - appsListening = []; - - constructor(public apollo: Apollo, private http: HttpLink, private authService: AuthenticationService, protected adfHttpClient: AdfHttpClient) { - super(adfHttpClient); - } - - private get webSocketHost() { - return this.contextRoot.split('://')[1]; - } - - private get protocol() { - return this.contextRoot.split('://')[0] === 'https' ? 'wss' : 'ws'; - } - - initNotificationsForApp(appName: string) { - if (!this.appsListening.includes(appName)) { - this.appsListening.push(appName); - const httpLink = this.http.create({ - uri: `${this.getBasePath(appName)}/notifications/graphql` - }); - - const webSocketLink = new WebSocketLink({ - uri: `${this.protocol}://${this.webSocketHost}/${appName}/notifications/ws/graphql`, - options: { - reconnect: true, - lazy: true, - connectionParams: { - kaInterval: 2000, - // eslint-disable-next-line @typescript-eslint/naming-convention - 'X-Authorization': 'Bearer ' + this.authService.getToken() - } - } - }); - - const link = split( - ({ query }) => { - const definition = getMainDefinition(query); - return definition.kind === 'OperationDefinition' && definition.operation === 'subscription'; - }, - webSocketLink, - httpLink - ); - - const errorLink = onError(({ graphQLErrors, operation, forward }) => { - if (graphQLErrors) { - for (const err of graphQLErrors) { - switch (err.extensions.code) { - case 'UNAUTHENTICATED': { - const oldHeaders = operation.getContext().headers; - operation.setContext({ - headers: { - ...oldHeaders, - // eslint-disable-next-line @typescript-eslint/naming-convention - 'X-Authorization': 'Bearer ' + this.authService.getToken() - } - }); - forward(operation); - break; - } - default: - break; - } - } - } - }); - - this.apollo.createNamed(appName, { - link: ApolloLink.from([errorLink, link]), - cache: new InMemoryCache({ merge: true } as InMemoryCacheConfig), - defaultOptions: { - watchQuery: { - errorPolicy: 'all' - } - } - }); - } - } +export class NotificationCloudService { + constructor(private readonly webSocketService: WebSocketService) {} makeGQLQuery(appName: string, gqlQuery: string) { - this.initNotificationsForApp(appName); - return this.apollo.use(appName).subscribe({ query: gql(gqlQuery) }); + return this.webSocketService.getSubscription({ + apolloClientName: appName, + wsUrl: `${appName}/notifications`, + httpUrl: `${appName}/notifications/graphql`, + subscriptionOptions: { + query: gql(gqlQuery) + } + }); } } diff --git a/lib/process-services-cloud/src/lib/services/public-api.ts b/lib/process-services-cloud/src/lib/services/public-api.ts index 5da40b1da78..40684e03a66 100644 --- a/lib/process-services-cloud/src/lib/services/public-api.ts +++ b/lib/process-services-cloud/src/lib/services/public-api.ts @@ -24,3 +24,4 @@ export * from './form-fields.interfaces'; export * from './base-cloud.service'; export * from './task-list-cloud.service.interface'; export * from './variable-mapper.sevice'; +export * from './web-socket.service'; diff --git a/lib/process-services-cloud/src/lib/services/web-socket.service.spec.ts b/lib/process-services-cloud/src/lib/services/web-socket.service.spec.ts new file mode 100644 index 00000000000..4ca6d691e32 --- /dev/null +++ b/lib/process-services-cloud/src/lib/services/web-socket.service.spec.ts @@ -0,0 +1,135 @@ +/*! + * @license + * Copyright Š 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AppConfigService, AuthenticationService } from '@alfresco/adf-core'; +import { TestBed } from '@angular/core/testing'; +import { Apollo, gql } from 'apollo-angular'; +import { of, Subject } from 'rxjs'; +import { WebSocketService } from './web-socket.service'; +import { SubscriptionOptions } from '@apollo/client/core'; +import { FeaturesServiceToken, IFeaturesService, provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; + +describe('WebSocketService', () => { + let service: WebSocketService; + let featureService: IFeaturesService; + const onLogoutSubject: Subject = new Subject(); + + const apolloMock = jasmine.createSpyObj('Apollo', ['use', 'createNamed']); + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { + provide: Apollo, + useValue: apolloMock + }, + { + provide: AppConfigService, + useValue: { + get: () => 'wss://testHost' + } + }, + { + provide: AuthenticationService, + useValue: { + getToken: () => 'testToken', + onLogout: onLogoutSubject.asObservable() + } + }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: true }) + ] + }); + service = TestBed.inject(WebSocketService); + featureService = TestBed.inject(FeaturesServiceToken); + spyOn(featureService, 'isOn$').and.returnValue(of(true)); + apolloMock.use.and.returnValues(undefined, { subscribe: () => of({}) }); + }); + + afterEach(() => { + apolloMock.use.calls.reset(); + apolloMock.createNamed.calls.reset(); + }); + + it('should not create a new Apollo client if it is already in use', (done) => { + const apolloClientName = 'testClient'; + const subscriptionOptions: SubscriptionOptions = { query: gql(`subscription {testQuery}`) }; + const wsOptions = { apolloClientName, wsUrl: 'testUrl', subscriptionOptions }; + + apolloMock.use.and.returnValues(true, { subscribe: () => of({}) }); + + service.getSubscription(wsOptions).subscribe(() => { + expect(apolloMock.use).toHaveBeenCalledTimes(2); + expect(apolloMock.use).toHaveBeenCalledWith(apolloClientName); + expect(apolloMock.createNamed).not.toHaveBeenCalled(); + done(); + }); + }); + + it('should subscribe to Apollo client if not already in use', (done) => { + const apolloClientName = 'testClient'; + const expectedApolloClientName = 'testClient'; + const subscriptionOptions: SubscriptionOptions = { query: gql(`subscription {testQuery}`) }; + const wsOptions = { apolloClientName, wsUrl: 'testUrl', subscriptionOptions }; + + service.getSubscription(wsOptions).subscribe(() => { + expect(apolloMock.use).toHaveBeenCalledWith(expectedApolloClientName); + expect(apolloMock.use).toHaveBeenCalledTimes(2); + expect(apolloMock.createNamed).toHaveBeenCalledTimes(1); + expect(apolloMock.createNamed).toHaveBeenCalledWith(expectedApolloClientName, jasmine.any(Object)); + done(); + }); + }); + + it('should create named client with the right authentication token when FF is on', (done) => { + let headers = {}; + const expectedHeaders = { Authorization: 'Bearer testToken' }; + const apolloClientName = 'testClient'; + const subscriptionOptions: SubscriptionOptions = { query: gql(`subscription {testQuery}`) }; + const wsOptions = { apolloClientName, wsUrl: 'testUrl', subscriptionOptions }; + apolloMock.createNamed.and.callFake((_, options) => { + headers = options.headers; + }); + + service.getSubscription(wsOptions).subscribe(() => { + expect(apolloMock.use).toHaveBeenCalledTimes(2); + expect(apolloMock.createNamed).toHaveBeenCalled(); + expect(headers).toEqual(expectedHeaders); + done(); + }); + }); + + it('should create named client with the right authentication token when FF is off', (done) => { + featureService.isOn$ = jasmine.createSpy().and.returnValue(of(false)); + let headers = {}; + const expectedHeaders = { 'X-Authorization': 'Bearer testToken' }; + const apolloClientName = 'testClient'; + const subscriptionOptions: SubscriptionOptions = { query: gql(`subscription {testQuery}`) }; + const wsOptions = { apolloClientName, wsUrl: 'testUrl', subscriptionOptions }; + apolloMock.createNamed.and.callFake((_, options) => { + headers = options.headers; + }); + + service.getSubscription(wsOptions).subscribe(() => { + expect(apolloMock.use).toHaveBeenCalledTimes(2); + expect(apolloMock.createNamed).toHaveBeenCalled(); + expect(headers).toEqual(expectedHeaders); + done(); + }); + }); +}); diff --git a/lib/process-services-cloud/src/lib/services/web-socket.service.ts b/lib/process-services-cloud/src/lib/services/web-socket.service.ts new file mode 100644 index 00000000000..e19a162b793 --- /dev/null +++ b/lib/process-services-cloud/src/lib/services/web-socket.service.ts @@ -0,0 +1,204 @@ +/*! + * @license + * Copyright Š 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createClient } from 'graphql-ws'; +import { Inject, Injectable } from '@angular/core'; +import { AppConfigService, AuthenticationService } from '@alfresco/adf-core'; +import { GraphQLWsLink } from '@apollo/client/link/subscriptions'; +import { WebSocketLink } from '@apollo/client/link/ws'; +import { + DefaultContext, + FetchResult, + from, + HttpLink, + InMemoryCache, + InMemoryCacheConfig, + NextLink, + Operation, + split, + SubscriptionOptions +} from '@apollo/client/core'; +import { getMainDefinition } from '@apollo/client/utilities'; +import { Kind, OperationTypeNode } from 'graphql'; +import { Apollo } from 'apollo-angular'; +import { onError } from '@apollo/client/link/error'; +import { RetryLink } from '@apollo/client/link/retry'; +import { Observable } from 'rxjs/internal/Observable'; +import { switchMap, take, tap } from 'rxjs/operators'; +import { FeaturesServiceToken, IFeaturesService } from '@alfresco/adf-core/feature-flags'; + +interface serviceOptions { + apolloClientName: string; + wsUrl: string; + httpUrl?: string; + subscriptionOptions: SubscriptionOptions; +} + +@Injectable({ + providedIn: 'root' +}) +export class WebSocketService { + private host = ''; + private subscriptionProtocol: 'graphql-ws' | 'transport-ws' = 'transport-ws'; + private wsLink: GraphQLWsLink | WebSocketLink; + private httpLink: HttpLink; + + constructor( + private readonly apollo: Apollo, + private readonly appConfigService: AppConfigService, + private readonly authService: AuthenticationService, + @Inject(FeaturesServiceToken) private featuresService: IFeaturesService + ) { + this.host = this.appConfigService.get('bpmHost', ''); + } + + public getSubscription(options: serviceOptions): Observable> { + const { apolloClientName, subscriptionOptions } = options; + this.authService.onLogout.pipe(take(1)).subscribe(() => { + if (this.apollo.use(apolloClientName)) { + this.apollo.removeClient(apolloClientName); + } + }); + + return this.featuresService.isOn$('studio-ws-graphql-subprotocol').pipe( + tap((isOn) => { + if (isOn) { + this.subscriptionProtocol = 'graphql-ws'; + } + }), + switchMap(() => { + if (this.apollo.use(apolloClientName) === undefined) { + this.initSubscriptions(options); + } + return this.apollo.use(apolloClientName).subscribe({ errorPolicy: 'all', ...subscriptionOptions }); + }) + ); + } + + private createUrl(serviceUrl: string, protocol: 'https' | 'wss' = 'wss'): string { + const url = new URL(serviceUrl, this.host); + url.protocol = protocol; + + return url.href; + } + + private initSubscriptions(options: serviceOptions): void { + switch (this.subscriptionProtocol) { + case 'graphql-ws': + this.createGraphQLWsLink(options); + break; + case 'transport-ws': + this.createTransportWsLink(options); + break; + default: + throw new Error('Unknown subscription protocol'); + } + + this.httpLink = options.httpUrl + ? new HttpLink({ + uri: this.createUrl(options.httpUrl, 'https') + }) + : undefined; + + const link = split( + ({ query }) => { + const definition = getMainDefinition(query); + return definition.kind === Kind.OPERATION_DEFINITION && definition.operation === OperationTypeNode.SUBSCRIPTION; + }, + this.wsLink, + this.httpLink + ); + + const authLink = (operation: Operation, forward: NextLink) => { + operation.setContext(({ headers }: DefaultContext) => ({ + headers: { + ...headers, + ...(this.subscriptionProtocol === 'graphql-ws' && { Authorization: `Bearer ${this.authService.getToken()}` }), + ...(this.subscriptionProtocol === 'transport-ws' && { 'X-Authorization': `Bearer ${this.authService.getToken()}` }) + } + })); + return forward(operation); + }; + + const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => { + if (graphQLErrors) { + for (const error of graphQLErrors) { + if (error.extensions && error.extensions['code'] === 'UNAUTHENTICATED') { + authLink(operation, forward); + } + } + } + + if (networkError) { + console.error(`[Network error]: ${networkError}`); + } + }); + + const retryLink = new RetryLink({ + delay: { + initial: 300, + max: Number.POSITIVE_INFINITY, + jitter: true + }, + attempts: { + max: 5, + retryIf: (error) => !!error + } + }); + + this.apollo.createNamed(options.apolloClientName, { + headers: { + ...(this.subscriptionProtocol === 'graphql-ws' && { Authorization: `Bearer ${this.authService.getToken()}` }), + ...(this.subscriptionProtocol === 'transport-ws' && { 'X-Authorization': `Bearer ${this.authService.getToken()}` }) + }, + link: from([authLink, retryLink, errorLink, link]), + cache: new InMemoryCache({ merge: true } as InMemoryCacheConfig) + }); + } + + private createTransportWsLink(options: serviceOptions) { + this.wsLink = new WebSocketLink({ + uri: this.createUrl(options.wsUrl, 'wss') + '/ws/graphql', + options: { + reconnect: true, + lazy: true, + connectionParams: { + kaInterval: 2000, + 'X-Authorization': 'Bearer ' + this.authService.getToken() + } + } + }); + } + + private createGraphQLWsLink(options: serviceOptions) { + this.wsLink = new GraphQLWsLink( + createClient({ + url: this.createUrl(options.wsUrl, 'wss') + '/v2/ws/graphql', + connectionParams: { + Authorization: 'Bearer ' + this.authService.getToken() + }, + on: { + error: () => { + this.apollo.removeClient(options.apolloClientName); + this.initSubscriptions(options); + } + }, + lazy: true + }) + ); + } +} diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.spec.ts index 9905455fc93..b97686b4ee6 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter-cloud.component.spec.ts @@ -39,6 +39,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatExpansionPanelHarness } from '@angular/material/expansion/testing'; import { MatSelectHarness } from '@angular/material/select/testing'; import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing'; +import { provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; describe('EditServiceTaskFilterCloudComponent', () => { let loader: HarnessLoader; @@ -50,12 +51,16 @@ describe('EditServiceTaskFilterCloudComponent', () => { let getTaskFilterSpy: jasmine.Spy; let getDeployedApplicationsSpy: jasmine.Spy; let taskService: TaskCloudService; - const afterClosedSubject = new Subject(); + const afterClosedSubject = new Subject(); beforeEach(() => { TestBed.configureTestingModule({ imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule, MatIconTestingModule], - providers: [MatDialog, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] + providers: [ + MatDialog, + { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false }) + ] }); fixture = TestBed.createComponent(EditServiceTaskFilterCloudComponent); component = fixture.componentInstance; @@ -63,9 +68,8 @@ describe('EditServiceTaskFilterCloudComponent', () => { appsService = TestBed.inject(AppsProcessCloudService); taskService = TestBed.inject(TaskCloudService); dialog = TestBed.inject(MatDialog); - const dialogRefMock: any = { - afterClosed: () => afterClosedSubject - }; + const dialogRefMock = jasmine.createSpyObj('MatDialogRef', ['afterClosed']); + dialogRefMock.afterClosed.and.returnValue(afterClosedSubject); spyOn(dialog, 'open').and.returnValue(dialogRefMock); getTaskFilterSpy = spyOn(service, 'getTaskFilterById').and.returnValue(of(fakeServiceFilter)); getDeployedApplicationsSpy = spyOn(appsService, 'getDeployedApplicationsByStatus').and.returnValue(of(fakeApplicationInstance)); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts index 8e0481f505e..a5093faa82d 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts @@ -57,6 +57,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatSelectHarness } from '@angular/material/select/testing'; import { MatExpansionPanelHarness } from '@angular/material/expansion/testing'; import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing'; +import { provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; describe('EditTaskFilterCloudComponent', () => { let loader: HarnessLoader; @@ -70,12 +71,16 @@ describe('EditTaskFilterCloudComponent', () => { let getTaskFilterSpy: jasmine.Spy; let getDeployedApplicationsSpy: jasmine.Spy; let taskService: TaskCloudService; - const afterClosedSubject = new Subject(); + const afterClosedSubject = new Subject(); beforeEach(() => { TestBed.configureTestingModule({ imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule, PeopleCloudModule, MatIconTestingModule], - providers: [MatDialog, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] + providers: [ + MatDialog, + { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false }) + ] }); fixture = TestBed.createComponent(EditTaskFilterCloudComponent); component = fixture.componentInstance; @@ -85,9 +90,8 @@ describe('EditTaskFilterCloudComponent', () => { taskService = TestBed.inject(TaskCloudService); alfrescoApiService = TestBed.inject(AlfrescoApiService); dialog = TestBed.inject(MatDialog); - const dialogRefMock: any = { - afterClosed: () => afterClosedSubject - }; + const dialogRefMock = jasmine.createSpyObj('MatDialogRef', ['afterClosed']); + dialogRefMock.afterClosed.and.returnValue(afterClosedSubject); spyOn(dialog, 'open').and.returnValue(dialogRefMock); spyOn(alfrescoApiService, 'getInstance').and.returnValue(mockAlfrescoApi); getTaskFilterSpy = spyOn(service, 'getTaskFilterById').and.returnValue(of(fakeFilter)); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts index 9a158551f7e..37973cdaf79 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts @@ -16,7 +16,7 @@ */ import { AppConfigService } from '@alfresco/adf-core'; -import { SimpleChange } from '@angular/core'; +import { DebugElement, SimpleChange } from '@angular/core'; import { ComponentFixture, TestBed, fakeAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { first, of, throwError } from 'rxjs'; @@ -32,6 +32,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { MatActionListItemHarness } from '@angular/material/list/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { TaskFilterCloudAdapter } from '../../../models/filter-cloud-model'; +import { provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; describe('TaskFiltersCloudComponent', () => { let loader: HarnessLoader; @@ -45,10 +46,14 @@ describe('TaskFiltersCloudComponent', () => { let getTaskListFiltersSpy: jasmine.Spy; let getTaskListCounterSpy: jasmine.Spy; - const configureTestingModule = (providers: any[]) => { + const configureTestingModule = (providers: unknown[]) => { TestBed.configureTestingModule({ imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule], - providers: [{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, ...providers] + providers: [ + { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false }), + ...providers + ] }); taskFilterService = TestBed.inject(TaskFilterCloudService); taskListService = TestBed.inject(TaskListCloudService); @@ -102,7 +107,7 @@ describe('TaskFiltersCloudComponent', () => { fixture.detectChanges(); await fixture.whenStable(); - const filters: any = fixture.debugElement.queryAll(By.css('.adf-icon')); + const filters: DebugElement[] = fixture.debugElement.queryAll(By.css('.adf-icon')); expect(filters.length).toBe(0); }); @@ -265,7 +270,7 @@ describe('TaskFiltersCloudComponent', () => { component.showIcons = false; fixture.detectChanges(); - const filters: any = fixture.debugElement.queryAll(By.css('.adf-icon')); + const filters: DebugElement[] = fixture.debugElement.queryAll(By.css('.adf-icon')); expect(filters.length).toBe(0); }); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts index 09e48f0e087..e69dc1764d3 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts @@ -37,6 +37,7 @@ import { IdentityUserService } from '../../../people/services/identity-user.serv import { ApolloModule } from 'apollo-angular'; import { StorageService } from '@alfresco/adf-core'; import { TaskStatusFilter } from '../public-api'; +import { provideMockFeatureFlags } from '@alfresco/adf-core/feature-flags'; describe('TaskFilterCloudService', () => { let service: TaskFilterCloudService; @@ -57,7 +58,10 @@ describe('TaskFilterCloudService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule, ProcessServiceCloudTestingModule, ApolloModule], - providers: [{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService }] + providers: [ + { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false }) + ] }); service = TestBed.inject(TaskFilterCloudService); notificationCloudService = TestBed.inject(NotificationCloudService); @@ -266,7 +270,10 @@ describe('Inject [LocalPreferenceCloudService] into the TaskFilterCloudService', beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule, ProcessServiceCloudTestingModule, ApolloModule], - providers: [{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] + providers: [ + { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, + provideMockFeatureFlags({ ['studio-ws-graphql-subprotocol']: false }) + ] }); service = TestBed.inject(TaskFilterCloudService); preferenceCloudService = service.preferenceService; diff --git a/package-lock.json b/package-lock.json index ae882eb70c3..b1e5e999b47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "date-fns": "^2.30.0", "dotenv-expand": "^5.1.0", "event-emitter": "^0.3.5", + "graphql-ws": "^5.16.0", "material-icons": "^1.13.12", "minimatch-browser": "1.0.0", "ng2-charts": "^4.1.1", @@ -115,7 +116,7 @@ "eslint-plugin-rxjs": "^5.0.3", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-unicorn": "^49.0.0", - "graphql": "^16.8.1", + "graphql": "^16.9.0", "husky": "^7.0.4", "jasmine-ajax": "4.0.0", "jasmine-core": "4.6.0", @@ -19030,7 +19031,8 @@ }, "node_modules/graphql": { "version": "16.9.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -19048,6 +19050,20 @@ "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, + "node_modules/graphql-ws": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.0.tgz", + "integrity": "sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A==", + "workspaces": [ + "website" + ], + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": ">=0.11 <=16" + } + }, "node_modules/guess-parser": { "version": "0.4.22", "dev": true, diff --git a/package.json b/package.json index 5582e9024b2..5e73539162d 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "date-fns": "^2.30.0", "dotenv-expand": "^5.1.0", "event-emitter": "^0.3.5", + "graphql-ws": "^5.16.0", "material-icons": "^1.13.12", "minimatch-browser": "1.0.0", "ng2-charts": "^4.1.1", @@ -135,7 +136,7 @@ "eslint-plugin-rxjs": "^5.0.3", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-unicorn": "^49.0.0", - "graphql": "^16.8.1", + "graphql": "^16.9.0", "husky": "^7.0.4", "jasmine-ajax": "4.0.0", "jasmine-core": "4.6.0", From 356260b5d13fa6f57fccd7894e5a845815407b79 Mon Sep 17 00:00:00 2001 From: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:30:58 +0530 Subject: [PATCH 19/35] Post release version bump (#10417) * Post release version bump * Post release version bump * Release notes and docs cleanup for v7.0.0-alpha.6 * Fixed js-api version in cli package.json --- docs/license-info/README.md | 1 - .../license-info-7.0.0-alpha.5.md | 520 ------------------ docs/release-notes/README.md | 2 +- ....0-alpha.5.md => RelNote-7.0.0-alpha.6.md} | 2 +- docs/vulnerability/README.md | 1 - .../vulnerability/audit-info-7.0.0-alpha.5.md | 24 - lib/cli/package-lock.json | 12 +- lib/cli/package.json | 4 +- lib/content-services/package.json | 6 +- lib/core/package.json | 6 +- lib/eslint-angular/package.json | 2 +- lib/extensions/package.json | 4 +- lib/insights/package.json | 6 +- lib/js-api/package.json | 2 +- lib/process-services-cloud/package-lock.json | 4 +- lib/process-services-cloud/package.json | 8 +- lib/process-services/package.json | 8 +- lib/testing/package.json | 4 +- package-lock.json | 4 +- package.json | 2 +- 20 files changed, 38 insertions(+), 584 deletions(-) delete mode 100644 docs/license-info/license-info-7.0.0-alpha.5.md rename docs/release-notes/{RelNote-7.0.0-alpha.5.md => RelNote-7.0.0-alpha.6.md} (98%) delete mode 100644 docs/vulnerability/audit-info-7.0.0-alpha.5.md diff --git a/docs/license-info/README.md b/docs/license-info/README.md index 8b3c6b5fce5..03df47add15 100644 --- a/docs/license-info/README.md +++ b/docs/license-info/README.md @@ -52,5 +52,4 @@ The pages linked below contain the licenses for all third party dependencies of - [ADF 7.0.0-alpha.2](license-info-7.0.0-alpha.2.md) - [ADF 7.0.0-alpha.3](license-info-7.0.0-alpha.3.md) - [ADF 7.0.0-alpha.4](license-info-7.0.0-alpha.4.md) -- [ADF 7.0.0-alpha.5](license-info-7.0.0-alpha.5.md) - [ADF 7.0.0-alpha.6](license-info-7.0.0-alpha.6.md) diff --git a/docs/license-info/license-info-7.0.0-alpha.5.md b/docs/license-info/license-info-7.0.0-alpha.5.md deleted file mode 100644 index 717b3cb441d..00000000000 --- a/docs/license-info/license-info-7.0.0-alpha.5.md +++ /dev/null @@ -1,520 +0,0 @@ ---- -Title: License info, alfresco-ng2-components 7.0.0-alpha.5 ---- - -# License information for alfresco-ng2-components 7.0.0-alpha.5 - -This page lists all third party libraries the project depends on. - -## Libraries - -| Name | Version | License | -| --- | --- | --- | -| [@adobe/css-tools](https://github.com/adobe/css-tools) | 4.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/animations](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/cdk](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/common](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/compiler](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/core](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/forms](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/material-date-fns-adapter](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/material](https://github.com/angular/components) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/platform-browser](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@angular/router](https://github.com/angular/angular) | 16.2.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@apollo/client](https://github.com/apollographql/apollo-client) | 3.11.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@babel/code-frame](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@babel/helper-validator-identifier](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@babel/highlight](https://github.com/babel/babel) | 7.24.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@babel/runtime](https://github.com/babel/babel) | 7.22.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/cspell-bundled-dicts](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/cspell-pipe](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/cspell-resolver](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/cspell-service-bus](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/cspell-types](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-ada](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-aws](https://github.com/streetsidesoftware/cspell-dict) | 4.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-bash](https://github.com/streetsidesoftware/cspell-dict) | 4.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-companies](https://github.com/streetsidesoftware/cspell-dict) | 3.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-cpp](https://github.com/streetsidesoftware/cspell-dict) | 5.1.16 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-cryptocurrencies](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-csharp](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-css](https://github.com/streetsidesoftware/cspell-dict) | 4.0.13 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-dart](https://github.com/streetsidesoftware/cspell-dict) | 2.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-data-science](https://github.com/streetsidesoftware/cspell-dict) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-django](https://github.com/streetsidesoftware/cspell-dicts) | 4.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-docker](https://github.com/streetsidesoftware/cspell-dicts) | 1.1.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-dotnet](https://github.com/streetsidesoftware/cspell-dict) | 5.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-elixir](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-en-common-misspellings](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-en-gb](https://github.com/streetsidesoftware/cspell-dicts) | 1.1.33 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-en_us](https://github.com/streetsidesoftware/cspell-dict) | 4.3.23 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-filetypes](https://github.com/streetsidesoftware/cspell-dict) | 3.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-fonts](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-fsharp](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-fullstack](https://github.com/streetsidesoftware/cspell-dict) | 3.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-gaming-terms](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-git](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-golang](https://github.com/streetsidesoftware/cspell-dict) | 6.0.12 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-haskell](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-html-symbol-entities](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-html](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-java](https://github.com/streetsidesoftware/cspell-dict) | 5.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-k8s](https://github.com/streetsidesoftware/cspell-dict) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-latex](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-lorem-ipsum](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-lua](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-makefile](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-node](https://github.com/streetsidesoftware/cspell-dicts) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-npm](https://github.com/streetsidesoftware/cspell-dict) | 5.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-php](https://github.com/streetsidesoftware/cspell-dict) | 4.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-powershell](https://github.com/streetsidesoftware/cspell-dict) | 5.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-public-licenses](https://github.com/streetsidesoftware/cspell-dict) | 2.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-python](https://github.com/streetsidesoftware/cspell-dict) | 4.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-r](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-ruby](https://github.com/streetsidesoftware/cspell-dict) | 5.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-rust](https://github.com/streetsidesoftware/cspell-dict) | 4.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-scala](https://github.com/streetsidesoftware/cspell-dict) | 5.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-software-terms](https://github.com/streetsidesoftware/cspell-dict) | 3.4.10 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-sql](https://github.com/streetsidesoftware/cspell-dict) | 2.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-svelte](https://github.com/streetsidesoftware/cspell-dicts) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-swift](https://github.com/streetsidesoftware/cspell-dicts) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-typescript](https://github.com/streetsidesoftware/cspell-dict) | 3.1.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dict-vue](https://github.com/streetsidesoftware/cspell-dicts) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/dynamic-import](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/eslint-plugin](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@cspell/strong-weak-map](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@esbuild/linux-x64](https://github.com/evanw/esbuild) | 0.19.12 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@graphql-typed-document-node/core](https://github.com/dotansimha/graphql-typed-document-node) | 3.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@kurkle/color](https://github.com/kurkle/color) | 0.3.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@mapbox/node-pre-gyp](https://github.com/mapbox/node-pre-gyp) | 1.0.11 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | -| [@mat-datetimepicker/core](https://github.com/kuhnroyal/mat-datetimepicker) | 12.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/animation](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/auto-init](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/banner](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/base](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/card](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/checkbox](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/chips](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/circular-progress](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/data-table](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/density](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/dialog](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/dom](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/drawer](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/elevation](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/fab](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/feature-targeting](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/floating-label](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/focus-ring](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/form-field](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/icon-button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/image-list](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/layout-grid](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/line-ripple](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/linear-progress](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/list](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/menu-surface](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/menu](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/notched-outline](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/progress-indicator](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/radio](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/ripple](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/rtl](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/segmented-button](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/select](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/shape](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/slider](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/snackbar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/switch](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/tab-bar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/tab-indicator](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/tab-scroller](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/tab](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/textfield](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/theme](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/tokens](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/tooltip](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/top-app-bar](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/touch-target](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@material/typography](https://github.com/material-components/material-components-web) | 15.0.0-canary.bc9ae6c9c.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@ngx-translate/core](https://github.com/ngx-translate/core) | 14.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@nodelib/fs.scandir](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir) | 2.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@nodelib/fs.stat](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@nodelib/fs.walk](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk) | 1.2.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@pkgr/core](https://github.com/un-ts/pkgr) | 0.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/addon-interactions](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/core-server](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/core](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/csf](https://github.com/ComponentDriven/csf) | 0.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/global](https://github.com/storybookjs/global) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/instrumenter](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/test](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@storybook/theming](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@testing-library/dom](https://github.com/testing-library/dom-testing-library) | 10.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | 6.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@testing-library/user-event](https://github.com/testing-library/user-event) | 14.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@ts-morph/common](https://github.com/dsherret/ts-morph) | 0.21.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/aria-query](https://github.com/DefinitelyTyped/DefinitelyTyped) | 5.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/body-parser](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.19.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/connect](https://github.com/DefinitelyTyped/DefinitelyTyped) | 3.4.38 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/estree](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/express-serve-static-core](https://github.com/DefinitelyTyped/DefinitelyTyped) | 4.19.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/http-errors](https://github.com/DefinitelyTyped/DefinitelyTyped) | 2.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/mime](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped) | 20.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/prop-types](https://github.com/DefinitelyTyped/DefinitelyTyped) | 15.7.12 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/qs](https://github.com/DefinitelyTyped/DefinitelyTyped) | 6.9.15 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/range-parser](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.2.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped) | 18.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/send](https://github.com/DefinitelyTyped/DefinitelyTyped) | 0.17.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@types/serve-static](https://github.com/DefinitelyTyped/DefinitelyTyped) | 1.15.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@vitest/expect](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@vitest/pretty-format](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@vitest/spy](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@vitest/utils](https://github.com/vitest-dev/vitest) | 2.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@wry/caches](https://github.com/benjamn/wryware) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@wry/context](https://github.com/benjamn/wryware) | 0.7.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@wry/equality](https://github.com/benjamn/wryware) | 0.5.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@wry/trie](https://github.com/benjamn/wryware) | 0.4.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [@wry/trie](https://github.com/benjamn/wryware) | 0.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [abbrev](https://github.com/isaacs/abbrev-js) | 1.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [accepts](https://github.com/jshttp/accepts) | 1.3.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [agent-base](https://github.com/TooTallNate/node-agent-base) | 6.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [alfresco-ng2-components](https://github.com/Alfresco/alfresco-ng2-components) | 7.0.0-alpha.5 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [angular-oauth2-oidc-jwks](https://github.com/manfredsteyer/angular-oauth2-oidc) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc) | 16.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ansi-regex](https://github.com/chalk/ansi-regex) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ansi-styles](https://github.com/chalk/ansi-styles) | 3.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ansi-styles](https://github.com/chalk/ansi-styles) | 4.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ansi-styles](https://github.com/chalk/ansi-styles) | 5.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [apollo-angular](https://github.com/kamilkisiela/apollo-angular) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [aproba](https://github.com/iarna/aproba) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [are-we-there-yet](https://github.com/npm/are-we-there-yet) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [argparse](https://github.com/nodeca/argparse) | 2.0.1 | [Python-2.0](http://www.opensource.org/licenses/Python-2.0) | -| [aria-query](https://github.com/A11yance/aria-query) | 5.3.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [array-flatten](https://github.com/blakeembrey/array-flatten) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [array-timsort](https://github.com/kaelzhang/node-array-timsort) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [asap](https://github.com/kriskowal/asap) | 2.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [assertion-error](https://github.com/chaijs/assertion-error) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ast-types](https://github.com/benjamn/ast-types) | 0.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [available-typed-arrays](https://github.com/inspect-js/available-typed-arrays) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [backo2](https://github.com/mokesmokes/backo) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [body-parser](https://github.com/expressjs/body-parser) | 1.20.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | -| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [braces](https://github.com/micromatch/braces) | 3.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [browser-assert](https://github.com/socialally/browser-assert) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [bytes](https://github.com/visionmedia/bytes.js) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [call-bind](https://github.com/ljharb/call-bind) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [callsites](https://github.com/sindresorhus/callsites) | 3.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [canvas](https://github.com/Automattic/node-canvas) | 2.11.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [chai](https://github.com/chaijs/chai) | 5.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [chalk](https://github.com/chalk/chalk) | 2.4.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [chalk](https://github.com/chalk/chalk) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [chalk](https://github.com/chalk/chalk) | 4.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [chart.js](https://github.com/chartjs/Chart.js) | 4.4.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [check-error](https://github.com/chaijs/check-error) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [chownr](https://github.com/isaacs/chownr) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [clear-module](https://github.com/sindresorhus/clear-module) | 4.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [code-block-writer](https://github.com/dsherret/code-block-writer) | 12.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [color-convert](https://github.com/Qix-/color-convert) | 1.9.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [color-convert](https://github.com/Qix-/color-convert) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [color-name](https://github.com/dfcreative/color-name) | 1.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [color-name](https://github.com/colorjs/color-name) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [color-support](https://github.com/isaacs/color-support) | 1.1.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [comment-json](https://github.com/kaelzhang/node-comment-json) | 4.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [component-emitter](https://github.com/sindresorhus/component-emitter) | 1.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [configstore](https://github.com/yeoman/configstore) | 6.0.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | -| [console-control-strings](https://github.com/iarna/console-control-strings) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [content-disposition](https://github.com/jshttp/content-disposition) | 0.5.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [content-type](https://github.com/jshttp/content-type) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cookie-signature](https://github.com/visionmedia/node-cookie-signature) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cookie](https://github.com/jshttp/cookie) | 0.7.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [core-util-is](https://github.com/isaacs/core-util-is) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) | 8.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cropperjs](https://github.com/fengyuanchen/cropperjs) | 1.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [crypto-random-string](https://github.com/sindresorhus/crypto-random-string) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cspell-dictionary](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cspell-glob](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cspell-grammar](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cspell-io](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cspell-lib](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [cspell-trie-lib](https://github.com/streetsidesoftware/cspell) | 7.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [css.escape](https://github.com/mathiasbynens/CSS.escape) | 1.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [csstype](https://github.com/frenic/csstype) | 3.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [d](https://github.com/medikoo/d) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [date-fns](https://github.com/date-fns/date-fns) | 2.30.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [debug](https://github.com/visionmedia/debug) | 2.6.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [debug](https://github.com/debug-js/debug) | 4.3.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [decompress-response](https://github.com/sindresorhus/decompress-response) | 4.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [deep-eql](https://github.com/chaijs/deep-eql) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [define-data-property](https://github.com/ljharb/define-data-property) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [delegates](https://github.com/visionmedia/node-delegates) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [depd](https://github.com/dougwilson/nodejs-depd) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [dequal](https://github.com/lukeed/dequal) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [destroy](https://github.com/stream-utils/destroy) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [detect-libc](https://github.com/lovell/detect-libc) | 2.0.3 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [dezalgo](https://github.com/npm/dezalgo) | 1.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) | 0.5.16 | [MIT](http://www.opensource.org/licenses/MIT) | -| [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [dot-prop](https://github.com/sindresorhus/dot-prop) | 6.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| dotenv-expand | 5.1.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | -| [ee-first](https://github.com/jonathanong/ee-first) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [emoji-regex](https://github.com/mathiasbynens/emoji-regex) | 8.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [encodeurl](https://github.com/pillarjs/encodeurl) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [encodeurl](https://github.com/pillarjs/encodeurl) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [encoding](https://github.com/andris9/encoding) | 0.1.13 | [MIT](http://www.opensource.org/licenses/MIT) | -| [entities](https://github.com/fb55/entities) | 4.5.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | -| [error-ex](https://github.com/qix-/node-error-ex) | 1.3.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [es-define-property](https://github.com/ljharb/es-define-property) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [es-errors](https://github.com/ljharb/es-errors) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.64 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| esbuild-register | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [esbuild](https://github.com/evanw/esbuild) | 0.19.12 | [MIT](http://www.opensource.org/licenses/MIT) | -| [escape-html](https://github.com/component/escape-html) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [escape-string-regexp](https://github.com/sindresorhus/escape-string-regexp) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [esniff](https://github.com/medikoo/esniff) | 2.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [esprima](https://github.com/jquery/esprima) | 4.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | -| [estree-walker](https://github.com/Rich-Harris/estree-walker) | 3.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [etag](https://github.com/jshttp/etag) | 1.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [eve-raphael](https://github.com/tomasAlabes/eve) | 0.5.0 | [Apache](http://www.apache.org/licenses/LICENSE-2.0) | -| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [eventemitter3](https://github.com/primus/eventemitter3) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [express](https://github.com/expressjs/express) | 4.21.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ext](https://github.com/medikoo/es5-ext.git#ext) | 1.7.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [fast-equals](https://github.com/planttheidea/fast-equals) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [fast-equals](https://github.com/planttheidea/fast-equals) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [fast-glob](https://github.com/mrmlnc/fast-glob) | 3.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [fastq](https://github.com/mcollina/fastq) | 1.17.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [fill-range](https://github.com/jonschlinkert/fill-range) | 7.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [finalhandler](https://github.com/pillarjs/finalhandler) | 1.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [find-up](https://github.com/sindresorhus/find-up) | 6.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [for-each](https://github.com/Raynos/for-each) | 0.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [form-data](https://github.com/form-data/form-data) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [formidable](https://github.com/node-formidable/formidable) | 3.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [forwarded](https://github.com/jshttp/forwarded) | 0.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [fresh](https://github.com/jshttp/fresh) | 0.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [fs-minipass](https://github.com/npm/fs-minipass) | 2.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [fs.realpath](https://github.com/isaacs/fs.realpath) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [function-bind](https://github.com/Raynos/function-bind) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [gauge](https://github.com/iarna/gauge) | 3.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [gensequence](https://github.com/streetsidesoftware/GenSequence) | 6.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [get-func-name](https://github.com/chaijs/get-func-name) | 2.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [glob-parent](https://github.com/gulpjs/glob-parent) | 5.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [glob](https://github.com/isaacs/node-glob) | 7.2.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [global-dirs](https://github.com/sindresorhus/global-dirs) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [gopd](https://github.com/ljharb/gopd) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [graceful-fs](https://github.com/isaacs/node-graceful-fs) | 4.2.11 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [graphql-tag](https://github.com/apollographql/graphql-tag) | 2.12.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [graphql](https://github.com/graphql/graphql-js) | 16.9.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-flag](https://github.com/sindresorhus/has-flag) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-flag](https://github.com/sindresorhus/has-flag) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-own-prop](https://github.com/sindresorhus/has-own-prop) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-property-descriptors](https://github.com/inspect-js/has-property-descriptors) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-proto](https://github.com/inspect-js/has-proto) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-tostringtag](https://github.com/inspect-js/has-tostringtag) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [has-unicode](https://github.com/iarna/has-unicode) | 2.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [hasown](https://github.com/inspect-js/hasOwn) | 2.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [hexoid](https://github.com/lukeed/hexoid) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [hoist-non-react-statics](https://github.com/mridgway/hoist-non-react-statics) | 3.3.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | -| [http-errors](https://github.com/jshttp/http-errors) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.4.24 | [MIT](http://www.opensource.org/licenses/MIT) | -| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [import-fresh](https://github.com/sindresorhus/import-fresh) | 3.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [import-meta-resolve](https://github.com/wooorm/import-meta-resolve) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [imurmurhash](https://github.com/jensyt/imurmurhash-js) | 0.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [indent-string](https://github.com/sindresorhus/indent-string) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [inflight](https://github.com/npm/inflight) | 1.0.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [inherits](https://github.com/isaacs/inherits) | 2.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [ini](https://github.com/isaacs/ini) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [ipaddr.js](https://github.com/whitequark/ipaddr.js) | 1.9.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-arguments](https://github.com/inspect-js/is-arguments) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-arrayish](https://github.com/qix-/node-is-arrayish) | 0.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-callable](https://github.com/inspect-js/is-callable) | 1.2.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-extglob](https://github.com/jonschlinkert/is-extglob) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-fullwidth-code-point](https://github.com/sindresorhus/is-fullwidth-code-point) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-generator-function](https://github.com/inspect-js/is-generator-function) | 1.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-glob](https://github.com/micromatch/is-glob) | 4.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-number](https://github.com/jonschlinkert/is-number) | 7.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-obj](https://github.com/sindresorhus/is-obj) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-typed-array](https://github.com/inspect-js/is-typed-array) | 1.1.13 | [MIT](http://www.opensource.org/licenses/MIT) | -| [is-typedarray](https://github.com/hughsk/is-typedarray) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [iterall](https://github.com/leebyron/iterall) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [js-tokens](https://github.com/lydell/js-tokens) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [js-yaml](https://github.com/nodeca/js-yaml) | 4.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [json-parse-even-better-errors](https://github.com/npm/json-parse-even-better-errors) | 2.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [jsrsasign](https://github.com/kjur/jsrsasign) | 11.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [lines-and-columns](https://github.com/eventualbuddha/lines-and-columns) | 1.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [locate-path](https://github.com/sindresorhus/locate-path) | 7.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [lodash-es](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | -| [lodash](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | -| [loose-envify](https://github.com/zertosh/loose-envify) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [loupe](https://github.com/chaijs/loupe) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [lz-string](https://github.com/pieroxy/lz-string) | 1.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [make-dir](https://github.com/sindresorhus/make-dir) | 3.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [material-icons](https://github.com/marella/material-icons) | 1.13.12 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [media-typer](https://github.com/jshttp/media-typer) | 0.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [merge-descriptors](https://github.com/sindresorhus/merge-descriptors) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [merge2](https://github.com/teambition/merge2) | 1.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [micromatch](https://github.com/micromatch/micromatch) | 4.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mime-db](https://github.com/jshttp/mime-db) | 1.52.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mime-types](https://github.com/jshttp/mime-types) | 2.1.35 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mime](https://github.com/broofa/node-mime) | 1.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mimic-response](https://github.com/sindresorhus/mimic-response) | 2.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [min-indent](https://github.com/thejameskyle/min-indent) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [minimatch-browser](https://github.com/isaacs/minimatch) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [minimatch](https://github.com/isaacs/minimatch) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [minimatch](https://github.com/isaacs/minimatch) | 7.4.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [minipass](https://github.com/isaacs/minipass) | 3.3.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [minipass](https://github.com/isaacs/minipass) | 5.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [minizlib](https://github.com/isaacs/minizlib) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mkdirp](https://github.com/isaacs/node-mkdirp) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [mkdirp](https://github.com/isaacs/node-mkdirp) | 2.1.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ms](https://github.com/zeit/ms) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ms](https://github.com/vercel/ms) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [nan](https://github.com/nodejs/nan) | 2.20.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [negotiator](https://github.com/jshttp/negotiator) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [next-tick](https://github.com/medikoo/next-tick) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [ng2-charts](https://github.com/valor-software/ng2-charts) | 4.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [node-fetch](https://github.com/bitinn/node-fetch) | 2.7.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [nopt](https://github.com/npm/nopt) | 5.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [npmlog](https://github.com/npm/npmlog) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [object-assign](https://github.com/sindresorhus/object-assign) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.13.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [on-finished](https://github.com/jshttp/on-finished) | 2.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [optimism](https://github.com/benjamn/optimism) | 0.18.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [p-limit](https://github.com/sindresorhus/p-limit) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [p-locate](https://github.com/sindresorhus/p-locate) | 6.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [parent-module](https://github.com/sindresorhus/parent-module) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [parent-module](https://github.com/sindresorhus/parent-module) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [parse-json](https://github.com/sindresorhus/parse-json) | 5.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [parse5](https://github.com/inikulin/parse5) | 7.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [parseurl](https://github.com/pillarjs/parseurl) | 1.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [path-browserify](https://github.com/browserify/path-browserify) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [path-exists](https://github.com/sindresorhus/path-exists) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [path-is-absolute](https://github.com/sindresorhus/path-is-absolute) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [path-to-regexp](https://github.com/pillarjs/path-to-regexp) | 0.1.10 | [MIT](http://www.opensource.org/licenses/MIT) | -| [path-type](https://github.com/sindresorhus/path-type) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [path2d-polyfill](https://github.com/nilzona/path2d-polyfill) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [pathval](https://github.com/chaijs/pathval) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) | 3.3.122 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [picocolors](https://github.com/alexeyraspopov/picocolors) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [picomatch](https://github.com/micromatch/picomatch) | 2.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [polished](https://github.com/styled-components/polished) | 4.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [possible-typed-array-names](https://github.com/ljharb/possible-typed-array-names) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [pretty-format](https://github.com/facebook/jest) | 27.5.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [process](https://github.com/shtylman/node-process) | 0.11.10 | [MIT](http://www.opensource.org/licenses/MIT) | -| [prop-types](https://github.com/facebook/prop-types) | 15.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [proxy-addr](https://github.com/jshttp/proxy-addr) | 2.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | -| [qs](https://github.com/ljharb/qs) | 6.13.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | -| [queue-microtask](https://github.com/feross/queue-microtask) | 1.2.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [range-parser](https://github.com/jshttp/range-parser) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [raphael](https://github.com/DmitryBaranovskiy/raphael) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [raw-body](https://github.com/stream-utils/raw-body) | 2.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [react-dom](https://github.com/facebook/react) | 18.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [react-is](https://github.com/facebook/react) | 16.13.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [react-is](https://github.com/facebook/react) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [react](https://github.com/facebook/react) | 18.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [recast](https://github.com/benjamn/recast) | 0.23.9 | [MIT](http://www.opensource.org/licenses/MIT) | -| [redent](https://github.com/sindresorhus/redent) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [regenerator-runtime](https://github.com/facebook/regenerator/tree/main/packages/runtime) | 0.13.11 | [MIT](http://www.opensource.org/licenses/MIT) | -| [rehackt](https://github.com/phryneas/rehackt) | 0.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [repeat-string](https://github.com/jonschlinkert/repeat-string) | 1.6.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [resolve-from](https://github.com/sindresorhus/resolve-from) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [resolve-from](https://github.com/sindresorhus/resolve-from) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [response-iterator](https://github.com/kmalakoff/response-iterator) | 0.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [reusify](https://github.com/mcollina/reusify) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | -| [rimraf](https://github.com/isaacs/rimraf) | 3.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [run-parallel](https://github.com/feross/run-parallel) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [rxjs](https://github.com/reactivex/rxjs) | 7.8.1 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [safer-buffer](https://github.com/ChALkeR/safer-buffer) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [safevalues](https://github.com/google/safevalues) | 0.3.4 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | -| [scheduler](https://github.com/facebook/react) | 0.23.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [semver](https://github.com/npm/node-semver) | 6.3.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [semver](https://github.com/npm/node-semver) | 7.5.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [semver](https://github.com/npm/node-semver) | 7.6.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [send](https://github.com/pillarjs/send) | 0.19.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [serve-static](https://github.com/expressjs/serve-static) | 1.16.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [set-blocking](https://github.com/yargs/set-blocking) | 2.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [set-function-length](https://github.com/ljharb/set-function-length) | 1.2.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [setprototypeof](https://github.com/wesleytodd/setprototypeof) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [side-channel](https://github.com/ljharb/side-channel) | 1.0.6 | [MIT](http://www.opensource.org/licenses/MIT) | -| [signal-exit](https://github.com/tapjs/signal-exit) | 3.0.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [simple-concat](https://github.com/feross/simple-concat) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [simple-get](https://github.com/feross/simple-get) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [source-map](https://github.com/mozilla/source-map) | 0.6.1 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | -| [statuses](https://github.com/jshttp/statuses) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [storybook](https://github.com/storybookjs/storybook) | 8.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [string-width](https://github.com/sindresorhus/string-width) | 4.2.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [strip-ansi](https://github.com/chalk/strip-ansi) | 6.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [strip-indent](https://github.com/sindresorhus/strip-indent) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [subscriptions-transport-ws](https://github.com/apollostack/subscriptions-transport-ws) | 0.11.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [superagent](https://github.com/ladjs/superagent) | 9.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [supports-color](https://github.com/chalk/supports-color) | 5.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [supports-color](https://github.com/chalk/supports-color) | 7.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [symbol-observable](https://github.com/blesh/symbol-observable) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [symbol-observable](https://github.com/blesh/symbol-observable) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [synckit](https://github.com/un-ts/synckit) | 0.8.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [tar](https://github.com/isaacs/node-tar) | 6.2.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [tiny-invariant](https://github.com/alexreardon/tiny-invariant) | 1.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [tinyrainbow](https://github.com/tinylibs/tinyrainbow) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [tinyspy](https://github.com/tinylibs/tinyspy) | 3.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [to-regex-range](https://github.com/micromatch/to-regex-range) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [toidentifier](https://github.com/component/toidentifier) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [tr46](https://github.com/Sebmaster/tr46.js) | 0.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ts-dedent](https://github.com/tamino-martinius/node-ts-dedent) | 2.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ts-invariant](https://github.com/apollographql/invariant-packages) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ts-morph](https://github.com/dsherret/ts-morph) | 20.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [tslib](https://github.com/Microsoft/tslib) | 2.7.0 | [0BSD](http://landley.net/toybox/license.html) | -| [type-fest](https://github.com/sindresorhus/type-fest) | 1.4.0 | ([MIT](http://www.opensource.org/licenses/MIT) OR [CC0-1.0](http://creativecommons.org/publicdomain/zero/1.0/legalcode)) | -| [type-fest](https://github.com/sindresorhus/type-fest) | 2.19.0 | ([MIT](http://www.opensource.org/licenses/MIT) OR [CC0-1.0](http://creativecommons.org/publicdomain/zero/1.0/legalcode)) | -| [type-is](https://github.com/jshttp/type-is) | 1.6.18 | [MIT](http://www.opensource.org/licenses/MIT) | -| [type](https://github.com/medikoo/type) | 2.7.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [typedarray-to-buffer](https://github.com/feross/typedarray-to-buffer) | 3.1.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [undici-types](https://github.com/nodejs/undici) | 6.19.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [unique-string](https://github.com/sindresorhus/unique-string) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [unpipe](https://github.com/stream-utils/unpipe) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [util](https://github.com/browserify/node-util) | 0.12.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [utils-merge](https://github.com/jaredhanson/utils-merge) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [vary](https://github.com/jshttp/vary) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | -| [vscode-languageserver-textdocument](https://github.com/Microsoft/vscode-languageserver-node) | 1.0.12 | [MIT](http://www.opensource.org/licenses/MIT) | -| [vscode-uri](https://github.com/microsoft/vscode-uri) | 3.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | -| [web-streams-polyfill](https://github.com/MattiasBuelens/web-streams-polyfill) | 3.3.3 | [MIT](http://www.opensource.org/licenses/MIT) | -| [webidl-conversions](https://github.com/jsdom/webidl-conversions) | 3.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | -| [whatwg-url](https://github.com/jsdom/whatwg-url) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [which-typed-array](https://github.com/inspect-js/which-typed-array) | 1.1.15 | [MIT](http://www.opensource.org/licenses/MIT) | -| [wide-align](https://github.com/iarna/wide-align) | 1.1.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [write-file-atomic](https://github.com/npm/write-file-atomic) | 3.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [ws](https://github.com/websockets/ws) | 7.5.10 | [MIT](http://www.opensource.org/licenses/MIT) | -| [ws](https://github.com/websockets/ws) | 8.18.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [xdg-basedir](https://github.com/sindresorhus/xdg-basedir) | 5.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | -| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | -| [yocto-queue](https://github.com/sindresorhus/yocto-queue) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | -| [zen-observable-ts](https://github.com/apollographql/zen-observable-ts) | 1.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | -| [zen-observable](https://github.com/zenparsing/zen-observable) | 0.8.15 | [MIT](http://www.opensource.org/licenses/MIT) | -| [zone.js](https://github.com/angular/angular) | 0.13.3 | [MIT](http://www.opensource.org/licenses/MIT) | - diff --git a/docs/release-notes/README.md b/docs/release-notes/README.md index 0f7875a9985..f3020718a24 100644 --- a/docs/release-notes/README.md +++ b/docs/release-notes/README.md @@ -9,7 +9,7 @@ The first **General Availability** release was v2.0.0. ## General Availability -- [7.0.0-alpha.5](RelNote-7.0.0-alpha.5.md) +- [7.0.0-alpha.6](RelNote-7.0.0-alpha.6.md) - [7.0.0-alpha.4](RelNote-7.0.0-alpha.4.md) - [7.0.0-alpha.3](RelNote-7.0.0-alpha.3.md) - [7.0.0-alpha.2](RelNote-7.0.0-alpha.2.md) diff --git a/docs/release-notes/RelNote-7.0.0-alpha.5.md b/docs/release-notes/RelNote-7.0.0-alpha.6.md similarity index 98% rename from docs/release-notes/RelNote-7.0.0-alpha.5.md rename to docs/release-notes/RelNote-7.0.0-alpha.6.md index 109cfb614dc..99b95d1d0e4 100644 --- a/docs/release-notes/RelNote-7.0.0-alpha.5.md +++ b/docs/release-notes/RelNote-7.0.0-alpha.6.md @@ -1,5 +1,5 @@ --- -Title: Changelog for alfresco-ng2-components v7.0.0-alpha.5 +Title: Changelog for alfresco-ng2-components v7.0.0-alpha.6 --- # Changelog diff --git a/docs/vulnerability/README.md b/docs/vulnerability/README.md index 8f24e374385..e91f883d367 100644 --- a/docs/vulnerability/README.md +++ b/docs/vulnerability/README.md @@ -49,5 +49,4 @@ The pages linked below contain the audit for all third party dependencies of ADF - [ADF 7.0.0-alpha.2](audit-info-7.0.0-alpha.2.md) - [ADF 7.0.0-alpha.3](audit-info-7.0.0-alpha.3.md) - [ADF 7.0.0-alpha.4](audit-info-7.0.0-alpha.4.md) -- [ADF 7.0.0-alpha.5](audit-info-7.0.0-alpha.5.md) - [ADF 7.0.0-alpha.6](audit-info-7.0.0-alpha.6.md) diff --git a/docs/vulnerability/audit-info-7.0.0-alpha.5.md b/docs/vulnerability/audit-info-7.0.0-alpha.5.md deleted file mode 100644 index d165cec08fd..00000000000 --- a/docs/vulnerability/audit-info-7.0.0-alpha.5.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -Title: Audit info, alfresco-ng2-components 7.0.0-alpha.5 ---- - -# Audit information for alfresco-ng2-components 7.0.0-alpha.5 - -This page lists the security audit of the dependencies this project depends on. - -## Risks - -- Critical risk: 0 -- High risk: 1 -- Moderate risk: 0 -- Low risk: 0 - -Dependencies analyzed: - -## Libraries - -| Severity | Module | Vulnerable versions | -| --- | --- | --- | -|high | pdfjs-dist | "<=4.1.392" | - - diff --git a/lib/cli/package-lock.json b/lib/cli/package-lock.json index 02b81267d33..096dd566173 100644 --- a/lib/cli/package-lock.json +++ b/lib/cli/package-lock.json @@ -1,15 +1,15 @@ { "name": "@alfresco/adf-cli", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@alfresco/adf-cli", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "license": "Apache-2.0", "dependencies": { - "@alfresco/js-api": ">=7.8.0", + "@alfresco/js-api": ">=8.0.0-alpha.6-0", "commander": "^6.2.1", "ejs": "^3.1.9", "license-checker": "^25.0.1", @@ -30,9 +30,9 @@ } }, "node_modules/@alfresco/js-api": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.8.0.tgz", - "integrity": "sha512-3y5WwtvsEkwAB3WaFC9Ec+QMzvPmZccJ7Em06lVBDwxtFgZ1F2CisVNepWgZLoCSkCH8Lgm6e4Tr0L93S3AmoQ==", + "version": "8.0.0-alpha.6-11937616463", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.6-11937616463.tgz", + "integrity": "sha512-D+VvhGpZXBc/hfeimTf8SMdMANboDiCroJunnm1eiqiSt4nLxeU3NnQOpfCY4dLU1fDIcsl0YRFW25rMvKH+Eg==", "dependencies": { "event-emitter": "^0.3.5", "superagent": "^9.0.1", diff --git a/lib/cli/package.json b/lib/cli/package.json index b170d8aca69..9c5646a8030 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-cli", "description": "Alfresco ADF cli and utils", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "bin": { "adf-cli": "bin/adf-cli", @@ -20,7 +20,7 @@ "dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli" }, "dependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.4", + "@alfresco/js-api": ">=8.0.0-alpha.6-0", "commander": "^6.2.1", "ejs": "^3.1.9", "license-checker": "^25.0.1", diff --git a/lib/content-services/package.json b/lib/content-services/package.json index 14dff8531e6..0cd7032ee6e 100644 --- a/lib/content-services/package.json +++ b/lib/content-services/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-content-services", "description": "Alfresco ADF content services", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -21,9 +21,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.6", + "@alfresco/js-api": ">=8.0.0-alpha.7-0", "@ngx-translate/core": ">=14.0.0", - "@alfresco/adf-core": ">=7.0.0-alpha.6" + "@alfresco/adf-core": ">=7.0.0-alpha.7-0" }, "keywords": [ "content-services", diff --git a/lib/core/package.json b/lib/core/package.json index 45408230a09..b0b10f9a1cf 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-core", "description": "Alfresco ADF core", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -33,8 +33,8 @@ "@angular/material": ">=14.1.2", "@angular/router": ">=14.1.3", "@mat-datetimepicker/core": ">=10.1.1", - "@alfresco/js-api": ">=8.0.0-alpha.6", - "@alfresco/adf-extensions": ">=7.0.0-alpha.6", + "@alfresco/js-api": ">=8.0.0-alpha.7-0", + "@alfresco/adf-extensions": ">=7.0.0-alpha.7-0", "@ngx-translate/core": ">=14.0.0", "minimatch-browser": ">=1.0.0", "pdfjs-dist": ">=3.3.122", diff --git a/lib/eslint-angular/package.json b/lib/eslint-angular/package.json index 124f5739052..313b4acb37c 100644 --- a/lib/eslint-angular/package.json +++ b/lib/eslint-angular/package.json @@ -1,6 +1,6 @@ { "name": "@alfresco/eslint-plugin-eslint-angular", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "description": "Alfresco ADF eslint angular custom rules", "main": "main.js", "author": "Hyland Software, Inc. and its affiliates", diff --git a/lib/extensions/package.json b/lib/extensions/package.json index 2fb462f0100..47e9ed90b8e 100644 --- a/lib/extensions/package.json +++ b/lib/extensions/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-extensions", "description": "Provides extensibility support for ADF applications.", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "license": "Apache-2.0", "author": "Hyland Software, Inc. and its affiliates", "repository": { @@ -14,7 +14,7 @@ "peerDependencies": { "@angular/common": ">=14.1.3", "@angular/core": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.6" + "@alfresco/js-api": ">=8.0.0-alpha.7-0" }, "keywords": [ "extensions", diff --git a/lib/insights/package.json b/lib/insights/package.json index 6d2d7b11ba3..5509d170704 100644 --- a/lib/insights/package.json +++ b/lib/insights/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-insights", "description": "Alfresco ADF insights", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -11,8 +11,8 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@alfresco/adf-core": ">=7.0.0-alpha.6", - "@alfresco/adf-content-services": ">=7.0.0-alpha.6", + "@alfresco/adf-core": ">=7.0.0-alpha.7-0", + "@alfresco/adf-content-services": ">=7.0.0-alpha.7-0", "@ngx-translate/core": ">=14.0.0", "chart.js": "^4.3.0", "ng2-charts": "^4.1.1", diff --git a/lib/js-api/package.json b/lib/js-api/package.json index 648a966962f..2dff09c46c7 100644 --- a/lib/js-api/package.json +++ b/lib/js-api/package.json @@ -1,6 +1,6 @@ { "name": "@alfresco/js-api", - "version": "8.0.0-alpha.6", + "version": "8.0.0-alpha.7", "license": "Apache-2.0", "description": "JavaScript client library for the Alfresco REST API", "author": "Hyland Software, Inc. and its affiliates", diff --git a/lib/process-services-cloud/package-lock.json b/lib/process-services-cloud/package-lock.json index 2d4f14e547e..6cffc246b16 100644 --- a/lib/process-services-cloud/package-lock.json +++ b/lib/process-services-cloud/package-lock.json @@ -1,12 +1,12 @@ { "name": "@alfresco/adf-process-services-cloud", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@alfresco/adf-process-services-cloud", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "license": "Apache-2.0", "dependencies": { "@editorjs/code": "2.9.0", diff --git a/lib/process-services-cloud/package.json b/lib/process-services-cloud/package.json index e45987dfc68..eb56907c8a6 100644 --- a/lib/process-services-cloud/package.json +++ b/lib/process-services-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-process-services-cloud", "description": "Alfresco ADF process services cloud", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -36,9 +36,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.6", - "@alfresco/adf-core": ">=7.0.0-alpha.6", - "@alfresco/adf-content-services": ">=7.0.0-alpha.6", + "@alfresco/js-api": ">=8.0.0-alpha.7-0", + "@alfresco/adf-core": ">=7.0.0-alpha.7-0", + "@alfresco/adf-content-services": ">=7.0.0-alpha.7-0", "@apollo/client": ">=3.7.2", "@ngx-translate/core": ">=14.0.0", "apollo-angular": ">=4.0.1", diff --git a/lib/process-services/package.json b/lib/process-services/package.json index 1eb8e2fea94..9c80bd28539 100644 --- a/lib/process-services/package.json +++ b/lib/process-services/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-process-services", "description": "Alfresco ADF process services", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -21,9 +21,9 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": ">=8.0.0-alpha.6", - "@alfresco/adf-core": ">=7.0.0-alpha.6", - "@alfresco/adf-content-services": ">=7.0.0-alpha.6", + "@alfresco/js-api": ">=8.0.0-alpha.7-0", + "@alfresco/adf-core": ">=7.0.0-alpha.7-0", + "@alfresco/adf-content-services": ">=7.0.0-alpha.7-0", "@ngx-translate/core": ">=14.0.0" }, "keywords": [ diff --git a/lib/testing/package.json b/lib/testing/package.json index 31bea72195d..25e4015d240 100644 --- a/lib/testing/package.json +++ b/lib/testing/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-testing", "description": "Alfresco ADF testing page and utils", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "repository": { "type": "git", @@ -11,7 +11,7 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "peerDependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.6" + "@alfresco/js-api": ">=8.0.0-alpha.7-0" }, "keywords": [ "testing", diff --git a/package-lock.json b/package-lock.json index b1e5e999b47..0cc3f0042fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alfresco-ng2-components", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "alfresco-ng2-components", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "license": "Apache-2.0", "dependencies": { "@angular/animations": "16.2.9", diff --git a/package.json b/package.json index 5e73539162d..55c14ec0a94 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "alfresco-ng2-components", "description": "Alfresco Angular components", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "author": "Hyland Software, Inc. and its affiliates", "scripts": { "prepare": "husky install", From fc9c82733c3f21eca53b34af57df49b21e39cb6f Mon Sep 17 00:00:00 2001 From: Robert Duda Date: Thu, 21 Nov 2024 12:24:33 +0100 Subject: [PATCH 20/35] AAE-25145 Sort process and task lists by process variables (#10412) --- .../src/lib/models/filter-cloud-model.ts | 10 +++-- .../src/lib/models/task-list-sorting.model.ts | 26 ++++++++++++ .../process-list-cloud.component.ts | 38 +++++++++++++++++- .../process-cloud-query-request.model.ts | 10 +++-- .../models/process-list-sorting.model.ts | 25 ++++++++++++ .../process-list-cloud.service.spec.ts | 6 +-- .../services/process-list-cloud.service.ts | 15 ++++++- .../base-task-list-cloud.component.ts | 4 +- .../components/task-list-cloud.component.ts | 40 ++++++++++++++++++- .../services/task-list-cloud.service.spec.ts | 6 +-- .../services/task-list-cloud.service.ts | 15 ++++++- 11 files changed, 169 insertions(+), 26 deletions(-) diff --git a/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts b/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts index 38988ee82e5..e98f4986c1f 100644 --- a/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts +++ b/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts @@ -16,7 +16,7 @@ */ import { Pagination } from '@alfresco/js-api'; -import { TaskListCloudSortingModel } from './task-list-sorting.model'; +import { TaskListCloudSortingModel, TaskListRequestSortingModel } from './task-list-sorting.model'; import { TaskFilterCloudModel } from '../task/task-filters/models/filter-cloud.model'; export class TaskQueryCloudRequestModel { @@ -103,7 +103,7 @@ export interface TaskListRequestTaskVariableFilter { export class TaskListRequestModel { appName: string; pagination?: Pagination; - sorting?: TaskListCloudSortingModel[]; + sorting?: TaskListRequestSortingModel; onlyStandalone?: boolean; onlyRoot?: boolean; @@ -172,7 +172,11 @@ export class TaskFilterCloudAdapter extends TaskListRequestModel { super({ appName: filter.appName, pagination: { maxItems: 25, skipCount: 0 }, - sorting: [{ orderBy: filter.sort, direction: filter.order }], + sorting: new TaskListRequestSortingModel({ + orderBy: filter.sort, + direction: filter.order, + isFieldProcessVariable: false + }), onlyStandalone: filter.standalone, name: filter.taskNames, diff --git a/lib/process-services-cloud/src/lib/models/task-list-sorting.model.ts b/lib/process-services-cloud/src/lib/models/task-list-sorting.model.ts index 6a6a5a363f3..1b05ee419ce 100644 --- a/lib/process-services-cloud/src/lib/models/task-list-sorting.model.ts +++ b/lib/process-services-cloud/src/lib/models/task-list-sorting.model.ts @@ -26,3 +26,29 @@ export class TaskListCloudSortingModel { } } } + +export class TaskListRequestSortingModel extends TaskListCloudSortingModel { + orderBy: string; + direction: string; + + isFieldProcessVariable: boolean; + processVariableData?: { + processDefinitionKeys: string[]; + type: string; + } + + constructor(obj: TaskListRequestSortingModel) { + super(obj); + if (obj.isFieldProcessVariable) { + this.isFieldProcessVariable = true; + this.processVariableData = obj.processVariableData; + if (!this.processVariableData.processDefinitionKeys?.length || + !this.processVariableData.type + ) { + throw new Error('missing required property when sorting by process variable'); + } + } else { + this.isFieldProcessVariable = false; + } + } +} diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts index 3f1fcb361fb..9b9e6634d6f 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts @@ -48,7 +48,7 @@ import { ProcessListCloudService } from '../services/process-list-cloud.service' import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; import { processCloudPresetsDefaultModel } from '../models/process-cloud-preset.model'; import { ProcessListRequestModel, ProcessQueryCloudRequestModel } from '../models/process-cloud-query-request.model'; -import { ProcessListCloudSortingModel } from '../models/process-list-sorting.model'; +import { ProcessListCloudSortingModel, ProcessListRequestSortingModel } from '../models/process-list-sorting.model'; import { filter, map, switchMap, take, tap } from 'rxjs/operators'; import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { @@ -328,6 +328,7 @@ export class ProcessListCloudComponent this.pagination.next(processes.list.pagination); }, error: (error) => { + console.error(error); this.error.emit(error); this.isLoading = false; } @@ -526,7 +527,7 @@ export class ProcessListCloudComponent maxItems: this.size, skipCount: this.skipCount }, - sorting: this.sorting, + sorting: this.getProcessListRequestSorting(), name: this.names, initiator: this.initiators, appVersion: this.appVersions, @@ -545,6 +546,39 @@ export class ProcessListCloudComponent return new ProcessListRequestModel(requestNode); } + private getProcessListRequestSorting(): ProcessListRequestSortingModel { + if (!this.sorting?.length) { + return new ProcessListRequestSortingModel({ + orderBy: this.defaultSorting.key, + direction: this.defaultSorting.direction, + isFieldProcessVariable: false + }); + } + + const orderBy = this.sorting[0]?.orderBy; + const direction = this.sorting[0]?.direction; + const orderByColumn = this.columnList?.columns.find((column) => column.key === orderBy); + const isFieldProcessVariable = orderByColumn?.customData?.columnType === 'process-variable-column'; + + if (isFieldProcessVariable) { + const processDefinitionKeys = orderByColumn.customData.variableDefinitionsPayload.map( + (variableDefinition) => variableDefinition.split('/')[0] + ); + const variableName = orderByColumn.customData.variableDefinitionsPayload[0].split('/')[1]; + return new ProcessListRequestSortingModel({ + orderBy: variableName, + direction, + isFieldProcessVariable: true, + processVariableData: { + processDefinitionKeys, + type: orderByColumn.customData.variableType + } + }); + } else { + return new ProcessListRequestSortingModel({orderBy, direction, isFieldProcessVariable: false}); + } + } + private createRequestNode(): ProcessQueryCloudRequestModel { const requestNode = { appName: this.appName, diff --git a/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts b/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts index 5e1aece1ed0..ab9b42841ad 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts @@ -16,7 +16,7 @@ */ import { Pagination } from '@alfresco/js-api'; -import { ProcessListCloudSortingModel } from './process-list-sorting.model'; +import { ProcessListCloudSortingModel, ProcessListRequestSortingModel } from './process-list-sorting.model'; import { ProcessFilterCloudModel } from '../../process-filters/models/process-filter-cloud.model'; export class ProcessQueryCloudRequestModel { @@ -90,7 +90,7 @@ export interface ProcessListRequestProcessVariableFilter { export class ProcessListRequestModel { appName: string; pagination?: Pagination; - sorting?: ProcessListCloudSortingModel[]; + sorting?: ProcessListRequestSortingModel; name?: string[]; initiator?: string[]; @@ -138,7 +138,11 @@ export class ProcessFilterCloudAdapter extends ProcessListRequestModel { super({ appName: filter.appName, pagination: { maxItems: 25, skipCount: 0 }, - sorting: [{ orderBy: filter.sort, direction: filter.order }], + sorting: new ProcessListRequestSortingModel({ + orderBy: filter.sort, + direction: filter.order, + isFieldProcessVariable: false + }), name: filter.processDefinitionNames, initiator: filter.initiators, diff --git a/lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts b/lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts index b43753d8212..507cc1ee680 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts @@ -25,3 +25,28 @@ export class ProcessListCloudSortingModel { } } } +export class ProcessListRequestSortingModel extends ProcessListCloudSortingModel { + orderBy: string; + direction: string; + + isFieldProcessVariable: boolean; + processVariableData?: { + processDefinitionKeys: string[]; + type: string; + } + + constructor(obj: ProcessListRequestSortingModel) { + super(obj); + if (obj.isFieldProcessVariable) { + this.isFieldProcessVariable = true; + this.processVariableData = obj.processVariableData; + if (!this.processVariableData.processDefinitionKeys?.length || + !this.processVariableData.type + ) { + throw new Error('missing required property when sorting by process variable'); + } + } else { + this.isFieldProcessVariable = false; + } + } +} diff --git a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.spec.ts index 220121d5337..426375d498e 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.spec.ts @@ -148,10 +148,7 @@ describe('ProcessListCloudService', () => { const processRequest = { appName: 'fakeName', pagination: { skipCount: 0, maxItems: 20 }, - sorting: [ - { orderBy: 'NAME', direction: 'DESC' }, - { orderBy: 'TITLE', direction: 'ASC' } - ] + sorting: { orderBy: 'NAME', direction: 'DESC', isFieldProcessVariable: false } } as ProcessListRequestModel; requestSpy.and.callFake(returnCallQueryParameters); @@ -159,7 +156,6 @@ describe('ProcessListCloudService', () => { expect(res).toBeDefined(); expect(res).not.toBeNull(); - expect(res.sort).toBe('NAME,DESC&TITLE,ASC'); }); it('should return an error when app name is not specified', async () => { diff --git a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts index 93c74196afd..ed09422b0bb 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts @@ -85,8 +85,7 @@ export class ProcessListCloudService extends BaseCloudService { const queryParams = { maxItems: requestNode.pagination?.maxItems || 25, - skipCount: requestNode.pagination?.skipCount || 0, - sort: this.buildSortingParam(requestNode.sorting || []) + skipCount: requestNode.pagination?.skipCount || 0 }; const queryData = this.buildQueryData(requestNode); @@ -118,6 +117,18 @@ export class ProcessListCloudService extends BaseCloudService { processVariableKeys: requestNode.processVariableKeys }; + if (requestNode.sorting) { + queryData['sort'] = { + field: requestNode.sorting.orderBy, + direction: requestNode.sorting.direction.toLowerCase(), + isProcessVariable: requestNode.sorting.isFieldProcessVariable + }; + if (queryData['sort'].isProcessVariable) { + queryData['sort'].processDefinitionKeys = requestNode.sorting.processVariableData?.processDefinitionKeys; + queryData['sort'].type = requestNode.sorting.processVariableData?.type; + } + } + Object.keys(queryData).forEach((key) => { const value = queryData[key]; const isValueEmpty = !value; diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts index fc091d4a6d1..6ee48c287cf 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/base-task-list-cloud.component.ts @@ -59,7 +59,7 @@ export abstract class BaseTaskListCloudComponent extends DataTableSchema // eslint-disable-next-line @typescript-eslint/brace-style implements OnChanges, AfterContentInit, PaginatedComponent, OnInit { - + @ContentChild(CustomEmptyContentTemplateDirective) emptyCustomContent: CustomEmptyContentTemplateDirective; @@ -148,7 +148,7 @@ export abstract class BaseTaskListCloudComponent formattedSorting: any[]; dataAdapter: ObjectDataTableAdapter | undefined; - private defaultSorting = { key: 'startDate', direction: 'desc' }; + protected defaultSorting = { key: 'startDate', direction: 'desc' }; boundReplacePriorityValues: (row: DataRow, col: DataColumn) => any; protected abstract isLoading$: Observable; diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts index 86df75cc284..25801bf0b43 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts @@ -24,7 +24,7 @@ import { TASK_LIST_CLOUD_TOKEN, TASK_LIST_PREFERENCES_SERVICE_TOKEN, TASK_SEARCH import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { TaskListCloudServiceInterface } from '../../../services/task-list-cloud.service.interface'; import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; -import { filter, map, switchMap, take } from 'rxjs/operators'; +import { filter, map, switchMap, take, tap } from 'rxjs/operators'; import { VariableMapperService } from '../../../services/variable-mapper.sevice'; import { ProcessListDataColumnCustomData } from '../../../models/data-column-custom-data'; import { TaskCloudModel } from '../../../models/task-cloud.model'; @@ -32,6 +32,7 @@ import { PaginatedEntries } from '@alfresco/js-api'; import { TaskInstanceCloudListViewModel } from '../models/task-cloud-view.model'; import { TasksListDatatableAdapter } from '../datatable/task-list-datatable-adapter'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { TaskListRequestSortingModel } from '../../../models/task-list-sorting.model'; const PRESET_KEY = 'adf-cloud-task-list.presets'; @@ -211,6 +212,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent this.isReloadingSubject$.next(true)), filter((isColumnSchemaCreated) => !!isColumnSchemaCreated), switchMap(() => { if (this.searchMethod === 'POST') { @@ -240,6 +242,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent { + console.error(error); this.error.emit(error); this.isReloadingSubject$.next(false); } @@ -258,7 +261,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent column.key === orderBy); + const isFieldProcessVariable = orderByColumn?.customData?.columnType === 'process-variable-column'; + + if (isFieldProcessVariable) { + const processDefinitionKeys = orderByColumn.customData.variableDefinitionsPayload.map( + (variableDefinition) => variableDefinition.split('/')[0] + ); + const variableName = orderByColumn.customData.variableDefinitionsPayload[0].split('/')[1]; + return new TaskListRequestSortingModel({ + orderBy: variableName, + direction, + isFieldProcessVariable: true, + processVariableData: { + processDefinitionKeys, + type: orderByColumn.customData.variableType + } + }); + } else { + return new TaskListRequestSortingModel({orderBy, direction, isFieldProcessVariable: false}); + } + } } diff --git a/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.spec.ts index bd208b6d996..132e243d1dc 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.spec.ts @@ -139,10 +139,7 @@ describe('TaskListCloudService', () => { const taskRequest = { appName: 'fakeName', pagination: { skipCount: 0, maxItems: 20 }, - sorting: [ - { orderBy: 'NAME', direction: 'DESC' }, - { orderBy: 'TITLE', direction: 'ASC' } - ] + sorting: { orderBy: 'NAME', direction: 'DESC', isFieldProcessVariable: false } } as TaskListRequestModel; requestSpy.and.callFake(returnCallQueryParameters); @@ -150,7 +147,6 @@ describe('TaskListCloudService', () => { expect(res).toBeDefined(); expect(res).not.toBeNull(); - expect(res.sort).toBe('NAME,DESC&TITLE,ASC'); }); it('should return an error when app name is not specified', async () => { diff --git a/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.ts b/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.ts index 6a724f7ffdd..74affa2b721 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.ts @@ -74,8 +74,7 @@ export class TaskListCloudService extends BaseCloudService implements TaskListCl const queryParams = { maxItems: requestNode.pagination?.maxItems || 25, - skipCount: requestNode.pagination?.skipCount || 0, - sort: this.buildSortingParam(requestNode.sorting || []) + skipCount: requestNode.pagination?.skipCount || 0 }; const queryData = this.buildQueryData(requestNode); @@ -115,6 +114,18 @@ export class TaskListCloudService extends BaseCloudService implements TaskListCl processVariableKeys: requestNode.processVariableKeys }; + if (requestNode.sorting) { + queryData['sort'] = { + field: requestNode.sorting.orderBy, + direction: requestNode.sorting.direction.toLowerCase(), + isProcessVariable: requestNode.sorting.isFieldProcessVariable + }; + if (queryData['sort'].isProcessVariable) { + queryData['sort'].processDefinitionKeys = requestNode.sorting.processVariableData?.processDefinitionKeys; + queryData['sort'].type = requestNode.sorting.processVariableData?.type; + } + } + Object.keys(queryData).forEach((key) => { const value = queryData[key]; const isValueEmpty = !value; From 86b892c472975d3baddccda290535ddb6a1cebfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:45:56 +0000 Subject: [PATCH 21/35] build(deps-dev): bump eslint-plugin-storybook from 0.8.0 to 0.11.1 (#10421) Bumps [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) from 0.8.0 to 0.11.1. - [Release notes](https://github.com/storybookjs/eslint-plugin-storybook/releases) - [Changelog](https://github.com/storybookjs/eslint-plugin-storybook/blob/main/CHANGELOG.md) - [Commits](https://github.com/storybookjs/eslint-plugin-storybook/compare/v0.8.0...v0.11.1) --- updated-dependencies: - dependency-name: eslint-plugin-storybook dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 178 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 169 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0cc3f0042fe..9822f869f6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,7 +114,7 @@ "eslint-plugin-prefer-arrow": "1.2.3", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-rxjs": "^5.0.3", - "eslint-plugin-storybook": "^0.8.0", + "eslint-plugin-storybook": "^0.11.1", "eslint-plugin-unicorn": "^49.0.0", "graphql": "^16.9.0", "husky": "^7.0.4", @@ -17551,13 +17551,13 @@ } }, "node_modules/eslint-plugin-storybook": { - "version": "0.8.0", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.11.1.tgz", + "integrity": "sha512-yGKpAYkBm/Q2hZg476vRUAvd9lAccjjSvzU5nYy3BSQbKTPy7uopx7JEpwk2vSuw4weTMZzWF64z9/gp/K5RCg==", "dev": true, - "license": "MIT", "dependencies": { - "@storybook/csf": "^0.0.1", - "@typescript-eslint/utils": "^5.62.0", - "requireindex": "^1.2.0", + "@storybook/csf": "^0.1.11", + "@typescript-eslint/utils": "^8.8.1", "ts-dedent": "^2.2.0" }, "engines": { @@ -17567,12 +17567,170 @@ "eslint": ">=6" } }, - "node_modules/eslint-plugin-storybook/node_modules/@storybook/csf": { - "version": "0.0.1", + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/scope-manager": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/types": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/utils": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.15.0.tgz", + "integrity": "sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", "dev": true, - "license": "MIT", "dependencies": { - "lodash": "^4.17.15" + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/eslint-plugin-unicorn": { diff --git a/package.json b/package.json index 55c14ec0a94..bb7acc35f8b 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "eslint-plugin-prefer-arrow": "1.2.3", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-rxjs": "^5.0.3", - "eslint-plugin-storybook": "^0.8.0", + "eslint-plugin-storybook": "^0.11.1", "eslint-plugin-unicorn": "^49.0.0", "graphql": "^16.9.0", "husky": "^7.0.4", From c8b81d455f7e2e29a51e9bede44b470f612262a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:46:59 +0000 Subject: [PATCH 22/35] build(deps): bump angular-oauth2-oidc from 15.0.1 to 17.0.2 (#10219) Bumps [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc) from 15.0.1 to 17.0.2. - [Release notes](https://github.com/manfredsteyer/angular-oauth2-oidc/releases) - [Changelog](https://github.com/manfredsteyer/angular-oauth2-oidc/blob/master/docs/changelog.html) - [Commits](https://github.com/manfredsteyer/angular-oauth2-oidc/commits/17.0.2) --- updated-dependencies: - dependency-name: angular-oauth2-oidc dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9822f869f6d..153d2d8a5b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@storybook/addon-interactions": "^8.2.9", "@storybook/core-server": "^8.2.9", "@storybook/theming": "^8.2.9", - "angular-oauth2-oidc": "16.0.0", + "angular-oauth2-oidc": "17.0.2", "angular-oauth2-oidc-jwks": "^17.0.2", "apollo-angular": "^5.0.2", "chart.js": "4.4.4", @@ -13264,9 +13264,9 @@ } }, "node_modules/angular-oauth2-oidc": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/angular-oauth2-oidc/-/angular-oauth2-oidc-16.0.0.tgz", - "integrity": "sha512-gDjx+fN2wW5ZzqlUQgI0sRme5T8zSCHEf5RTba0jcEvwqcsRZpgsroefu29sthBgTAIB7SU+E5zM1NQ3ZKPQZg==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/angular-oauth2-oidc/-/angular-oauth2-oidc-17.0.2.tgz", + "integrity": "sha512-zYgeLmAnu1g8XAYZK+csAsCQBDhgp9ffBv/eArEnujGxNPTeK00bREHWObtehflpQdSn+k9rY2D15ChCSydyVw==", "dependencies": { "tslib": "^2.5.2" }, diff --git a/package.json b/package.json index bb7acc35f8b..abc522c0e8b 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@storybook/addon-interactions": "^8.2.9", "@storybook/core-server": "^8.2.9", "@storybook/theming": "^8.2.9", - "angular-oauth2-oidc": "16.0.0", + "angular-oauth2-oidc": "17.0.2", "angular-oauth2-oidc-jwks": "^17.0.2", "apollo-angular": "^5.0.2", "chart.js": "4.4.4", From 06ca9bf1da0ff34e5d4e617762bc5b943f359d47 Mon Sep 17 00:00:00 2001 From: Bartosz Sekula Date: Thu, 21 Nov 2024 06:55:22 -0500 Subject: [PATCH 23/35] AAE-25144 Process variables filters (#10405) * AAE-25144 Implements process variables filters * update * fix lint --- .../src/lib/common/public-api.ts | 1 + .../process-filters-cloud.component.ts | 4 +- .../models/process-filter-cloud.model.ts | 13 ++ .../process-list-cloud.component.ts | 11 +- .../process-cloud-query-request.model.ts | 124 +++++++++--------- .../services/process-list-cloud.service.ts | 3 +- 6 files changed, 87 insertions(+), 69 deletions(-) diff --git a/lib/process-services-cloud/src/lib/common/public-api.ts b/lib/process-services-cloud/src/lib/common/public-api.ts index 5f488151b26..1bed203bfc5 100644 --- a/lib/process-services-cloud/src/lib/common/public-api.ts +++ b/lib/process-services-cloud/src/lib/common/public-api.ts @@ -16,3 +16,4 @@ */ export * from './interface/index'; +export * from './date-range-filter/date-range-filter.service'; diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts index 8bf7cc2b06f..63497d882cf 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts @@ -323,7 +323,7 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges { private fetchProcessFilterCounter(filter: ProcessFilterCloudModel): Observable { return this.searchMethod === 'POST' - ? this.processListCloudService.getProcessListCounter(new ProcessFilterCloudAdapter(filter)) - : this.processListCloudService.getProcessCounter(filter.appName, filter.status) + ? this.processListCloudService.getProcessListCounter(new ProcessFilterCloudAdapter(filter)) + : this.processListCloudService.getProcessCounter(filter.appName, filter.status) } } diff --git a/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts b/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts index 53eec0cfe53..92a55804bb5 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts @@ -21,6 +21,16 @@ import { DateCloudFilterType } from '../../../models/date-cloud-filter.model'; import { DateRangeFilterService } from '../../../common/date-range-filter/date-range-filter.service'; import { ComponentSelectionMode } from '../../../types'; +export type ProcessFilterOperators = 'eq' | 'like' | 'gt' | 'gte' | 'lt' | 'lte'; + +export interface ProcessVariableFilterModel { + processDefinitionKey: string; + name: string; + type: string; + value: string | number; + operator: ProcessFilterOperators; + } + export class ProcessFilterCloudModel { id: string; name: string; @@ -53,6 +63,8 @@ export class ProcessFilterCloudModel { appVersions: string[] | null; statuses: string[] | null; + processVariableFilters?: ProcessVariableFilterModel[] + private dateRangeFilterService = new DateRangeFilterService(); private _completedFrom: string; private _completedTo: string; @@ -104,6 +116,7 @@ export class ProcessFilterCloudModel { this.initiators = obj.initiators || null; this.appVersions = obj.appVersions || null; this.statuses = obj.statuses || null; + this.processVariableFilters = obj.processVariableFilters ?? []; } } diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts index 9b9e6634d6f..144941352ad 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts @@ -63,6 +63,7 @@ import { } from '../../../models/data-column-custom-data'; import { VariableMapperService } from '../../../services/variable-mapper.sevice'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { ProcessVariableFilterModel } from '../../process-filters/models/process-filter-cloud.model'; const PRESET_KEY = 'adf-cloud-process-list.presets'; @@ -235,6 +236,13 @@ export class ProcessListCloudComponent @Input() statuses: string[] = []; + /** + * Filter the processes. Display only processes with specific process variables. + * This input will be used only if PROCESS_SEARCH_API_METHOD_TOKEN is provided with 'POST' value. + */ + @Input() + processVariables: ProcessVariableFilterModel[] + /** Emitted when a row in the process list is clicked. */ @Output() rowClick: EventEmitter = new EventEmitter(); @@ -540,7 +548,8 @@ export class ProcessListCloudComponent completedTo: this.completedTo, suspendedFrom: this.suspendedFrom, suspendedTo: this.suspendedTo, - processVariableKeys: this.getVariableDefinitionsRequestModel() + processVariableKeys: this.getVariableDefinitionsRequestModel(), + processVariableFilters: this.processVariables }; return new ProcessListRequestModel(requestNode); diff --git a/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts b/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts index ab9b42841ad..e2454d11337 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts @@ -17,74 +17,66 @@ import { Pagination } from '@alfresco/js-api'; import { ProcessListCloudSortingModel, ProcessListRequestSortingModel } from './process-list-sorting.model'; -import { ProcessFilterCloudModel } from '../../process-filters/models/process-filter-cloud.model'; +import { ProcessFilterCloudModel, ProcessVariableFilterModel } from '../../process-filters/models/process-filter-cloud.model'; export class ProcessQueryCloudRequestModel { - appName: string; - appVersion?: number | string; - initiator?: null; - id?: string; - environmentId?: string; - name?: string; - processDefinitionId?: string; - processDefinitionName?: string; - processDefinitionKey?: string; - status?: string; - startDate?: string; - businessKey?: string; - lastModified?: string; - lastModifiedTo?: string; - lastModifiedFrom?: string; - startFrom?: string; - startTo?: string; - completedFrom?: string; - completedTo?: string; - suspendedFrom?: string; - suspendedTo?: string; - completedDate?: string; - maxItems: number; - skipCount: number; - sorting?: ProcessListCloudSortingModel[]; - variableKeys?: string[]; + appName: string; + appVersion?: number | string; + initiator?: null; + id?: string; + environmentId?: string; + name?: string; + processDefinitionId?: string; + processDefinitionName?: string; + processDefinitionKey?: string; + status?: string; + startDate?: string; + businessKey?: string; + lastModified?: string; + lastModifiedTo?: string; + lastModifiedFrom?: string; + startFrom?: string; + startTo?: string; + completedFrom?: string; + completedTo?: string; + suspendedFrom?: string; + suspendedTo?: string; + completedDate?: string; + maxItems: number; + skipCount: number; + sorting?: ProcessListCloudSortingModel[]; + variableKeys?: string[]; constructor(obj?: any) { - if (obj) { - this.appName = obj.appName; - this.appVersion = obj.appVersion; - this.initiator = obj.initiator; - this.id = obj.id; - this.environmentId = obj.environmentId; - this.name = obj.name; - this.processDefinitionId = obj.processDefinitionId; - this.processDefinitionName = obj.processDefinitionName; - this.processDefinitionKey = obj.processDefinitionKey; - this.status = obj.status; - this.startDate = obj.startDate; - this.businessKey = obj.businessKey; - this.lastModified = obj.lastModified; - this.lastModifiedTo = obj.lastModifiedTo; - this.lastModifiedFrom = obj.lastModifiedFrom; - this.startFrom = obj.startFrom; - this.startTo = obj.startTo; - this.completedFrom = obj.completedFrom; - this.completedTo = obj.completedTo; - this.suspendedFrom = obj.suspendedFrom; - this.suspendedTo = obj.suspendedTo; - this.completedDate = obj.completedDate; - this.maxItems = obj.maxItems; - this.skipCount = obj.skipCount; - this.sorting = obj.sorting; - this.variableKeys = obj.variableKeys; - } - } -} - -export interface ProcessListRequestProcessVariableFilter { - processDefinitionKey?: string; - name?: string; - type?: string; - value?: string; - operator?: string; + if (obj) { + this.appName = obj.appName; + this.appVersion = obj.appVersion; + this.initiator = obj.initiator; + this.id = obj.id; + this.environmentId = obj.environmentId; + this.name = obj.name; + this.processDefinitionId = obj.processDefinitionId; + this.processDefinitionName = obj.processDefinitionName; + this.processDefinitionKey = obj.processDefinitionKey; + this.status = obj.status; + this.startDate = obj.startDate; + this.businessKey = obj.businessKey; + this.lastModified = obj.lastModified; + this.lastModifiedTo = obj.lastModifiedTo; + this.lastModifiedFrom = obj.lastModifiedFrom; + this.startFrom = obj.startFrom; + this.startTo = obj.startTo; + this.completedFrom = obj.completedFrom; + this.completedTo = obj.completedTo; + this.suspendedFrom = obj.suspendedFrom; + this.suspendedTo = obj.suspendedTo; + this.completedDate = obj.completedDate; + this.maxItems = obj.maxItems; + this.skipCount = obj.skipCount; + this.sorting = obj.sorting; + this.variableKeys = obj.variableKeys; + } + } } export class ProcessListRequestModel { @@ -105,7 +97,7 @@ export class ProcessListRequestModel { suspendedFrom?: string; suspendedTo?: string; - processVariableFilters?: ProcessListRequestProcessVariableFilter[]; + processVariableFilters?: ProcessVariableFilterModel[]; processVariableKeys?: string[]; constructor(obj: Partial) { @@ -130,6 +122,7 @@ export class ProcessListRequestModel { this.suspendedFrom = obj.suspendedFrom; this.suspendedTo = obj.suspendedTo; this.processVariableKeys = obj.processVariableKeys; + this.processVariableFilters = obj.processVariableFilters; } } @@ -148,6 +141,7 @@ export class ProcessFilterCloudAdapter extends ProcessListRequestModel { initiator: filter.initiators, appVersion: filter.appVersions, status: filter.statuses, + processVariableFilters: filter.processVariableFilters, lastModifiedFrom: filter.lastModifiedFrom?.toISOString(), lasModifiedTo: filter.lastModifiedTo?.toISOString(), startFrom: filter.startFrom, diff --git a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts index ed09422b0bb..79ccce3dae5 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts @@ -114,7 +114,8 @@ export class ProcessListCloudService extends BaseCloudService { completedTo: requestNode.completedTo, suspendedFrom: requestNode.suspendedFrom, suspendedTo: requestNode.suspendedTo, - processVariableKeys: requestNode.processVariableKeys + processVariableKeys: requestNode.processVariableKeys, + processVariableFilters: requestNode.processVariableFilters }; if (requestNode.sorting) { From 5327181055635aaa2788d45f9d30f0fcf29dfe55 Mon Sep 17 00:00:00 2001 From: Bartosz Sekula Date: Thu, 21 Nov 2024 07:20:16 -0500 Subject: [PATCH 24/35] AAE-27328 Add process variables to the search for searching Tasks (#10414) * AAE-27328 Add process variables to the search for searching Tasks * fix after rebase --- .../src/lib/models/filter-cloud-model.ts | 12 +++------ .../models/process-variable-filter.model.ts | 26 +++++++++++++++++++ .../models/process-filter-cloud.model.ts | 11 +------- .../process-list-cloud.component.ts | 4 +-- .../process-cloud-query-request.model.ts | 3 ++- .../task-filters/models/filter-cloud.model.ts | 5 +++- .../components/task-list-cloud.component.ts | 13 ++++++++-- .../services/task-list-cloud.service.ts | 3 ++- lib/process-services-cloud/src/public-api.ts | 1 + 9 files changed, 52 insertions(+), 26 deletions(-) create mode 100644 lib/process-services-cloud/src/lib/models/process-variable-filter.model.ts diff --git a/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts b/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts index e98f4986c1f..5fa08899ee6 100644 --- a/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts +++ b/lib/process-services-cloud/src/lib/models/filter-cloud-model.ts @@ -18,6 +18,7 @@ import { Pagination } from '@alfresco/js-api'; import { TaskListCloudSortingModel, TaskListRequestSortingModel } from './task-list-sorting.model'; import { TaskFilterCloudModel } from '../task/task-filters/models/filter-cloud.model'; +import { ProcessVariableFilterModel } from './process-variable-filter.model'; export class TaskQueryCloudRequestModel { appName: string; @@ -93,13 +94,6 @@ export class TaskQueryCloudRequestModel { } } -export interface TaskListRequestTaskVariableFilter { - name?: string; - type?: string; - value?: string; - operator?: string; -} - export class TaskListRequestModel { appName: string; pagination?: Pagination; @@ -128,8 +122,8 @@ export class TaskListRequestModel { candidateUserId?: string[]; candidateGroupId?: string[]; - taskVariableFilters?: TaskListRequestTaskVariableFilter[]; processVariableKeys?: string[]; + processVariableFilters?: ProcessVariableFilterModel[]; constructor(obj: Partial) { if (!obj.appName) { @@ -162,7 +156,7 @@ export class TaskListRequestModel { this.completedTo = obj.completedTo; this.candidateUserId = obj.candidateUserId; this.candidateGroupId = obj.candidateGroupId; - this.taskVariableFilters = obj.taskVariableFilters; + this.processVariableFilters = obj.processVariableFilters ?? []; this.processVariableKeys = obj.processVariableKeys; } } diff --git a/lib/process-services-cloud/src/lib/models/process-variable-filter.model.ts b/lib/process-services-cloud/src/lib/models/process-variable-filter.model.ts new file mode 100644 index 00000000000..7a62a7abdd7 --- /dev/null +++ b/lib/process-services-cloud/src/lib/models/process-variable-filter.model.ts @@ -0,0 +1,26 @@ +/*! + * @license + * Copyright Š 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export type ProcessFilterOperators = 'eq' | 'like' | 'gt' | 'gte' | 'lt' | 'lte'; + +export interface ProcessVariableFilterModel { + processDefinitionKey: string; + name: string; + type: string; + value: string | number; + operator: ProcessFilterOperators; +} diff --git a/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts b/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts index 92a55804bb5..7a5bee22c20 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts @@ -20,16 +20,7 @@ import { DateCloudFilterType } from '../../../models/date-cloud-filter.model'; import { DateRangeFilterService } from '../../../common/date-range-filter/date-range-filter.service'; import { ComponentSelectionMode } from '../../../types'; - -export type ProcessFilterOperators = 'eq' | 'like' | 'gt' | 'gte' | 'lt' | 'lte'; - -export interface ProcessVariableFilterModel { - processDefinitionKey: string; - name: string; - type: string; - value: string | number; - operator: ProcessFilterOperators; - } +import { ProcessVariableFilterModel } from '../../../models/process-variable-filter.model'; export class ProcessFilterCloudModel { id: string; diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts index 144941352ad..672f3d20504 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts @@ -63,7 +63,7 @@ import { } from '../../../models/data-column-custom-data'; import { VariableMapperService } from '../../../services/variable-mapper.sevice'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; -import { ProcessVariableFilterModel } from '../../process-filters/models/process-filter-cloud.model'; +import { ProcessVariableFilterModel } from '../../../models/process-variable-filter.model'; const PRESET_KEY = 'adf-cloud-process-list.presets'; @@ -241,7 +241,7 @@ export class ProcessListCloudComponent * This input will be used only if PROCESS_SEARCH_API_METHOD_TOKEN is provided with 'POST' value. */ @Input() - processVariables: ProcessVariableFilterModel[] + processVariables: ProcessVariableFilterModel[]; /** Emitted when a row in the process list is clicked. */ @Output() diff --git a/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts b/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts index e2454d11337..42060fa7ac0 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/models/process-cloud-query-request.model.ts @@ -17,7 +17,8 @@ import { Pagination } from '@alfresco/js-api'; import { ProcessListCloudSortingModel, ProcessListRequestSortingModel } from './process-list-sorting.model'; -import { ProcessFilterCloudModel, ProcessVariableFilterModel } from '../../process-filters/models/process-filter-cloud.model'; +import { ProcessFilterCloudModel } from '../../process-filters/models/process-filter-cloud.model'; +import { ProcessVariableFilterModel } from '../../../models/process-variable-filter.model'; export class ProcessQueryCloudRequestModel { appName: string; diff --git a/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts b/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts index 8ae648ab0bf..28062ec3a8f 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts @@ -24,6 +24,7 @@ import { DateRangeFilterService } from '../../../common/date-range-filter/date-r import { ComponentSelectionMode } from '../../../types'; import { IdentityGroupModel } from '../../../group/models/identity-group.model'; import { IdentityUserModel } from '../../../people/models/identity-user.model'; +import { ProcessVariableFilterModel } from '../../../models/process-variable-filter.model'; export class TaskFilterCloudModel { id: string; @@ -75,6 +76,8 @@ export class TaskFilterCloudModel { private _createdTo: string; private dateRangeFilterService = new DateRangeFilterService(); + processVariableFilters?: ProcessVariableFilterModel[]; + constructor(obj?: any) { if (obj) { this.id = obj.id || Math.random().toString(36).substr(2, 9); @@ -115,13 +118,13 @@ export class TaskFilterCloudModel { this.createdTo = obj._createdTo || null; this.candidateGroups = obj.candidateGroups || null; this.showCounter = obj.showCounter || false; - this.taskNames = obj.taskNames || null; this.statuses = obj.statuses || null; this.assignees = obj.assignees || null; this.processDefinitionNames = obj.processDefinitionNames || null; this.priorities = obj.priorities || null; this.completedByUsers = obj.completedByUsers || null; + this.processVariableFilters = obj.processVariableFilters ?? []; } } diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts index 25801bf0b43..26f3ecf0ee6 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts @@ -33,6 +33,7 @@ import { TaskInstanceCloudListViewModel } from '../models/task-cloud-view.model' import { TasksListDatatableAdapter } from '../datatable/task-list-datatable-adapter'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { TaskListRequestSortingModel } from '../../../models/task-list-sorting.model'; +import { ProcessVariableFilterModel } from '../../../models/process-variable-filter.model'; const PRESET_KEY = 'adf-cloud-task-list.presets'; @@ -189,6 +190,13 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent Date: Thu, 21 Nov 2024 14:06:10 +0100 Subject: [PATCH 25/35] [AAE-27113] Align edit assignee button correctly in process admin user task property editor (#10371) * [AAE-27113] Align edit assignee button correctly in process admin user task property editor * [AAE-27113] Adjusted text-overflow behavior to avoid overlap --- .../card-view-textitem.component.html | 3 ++- .../card-view-textitem.component.scss | 11 ++++++++++- .../components/card-view/card-view.component.scss | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html index a5eef86c624..d1851233a5a 100644 --- a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html +++ b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html @@ -129,7 +129,8 @@ 'adf-property-value-editable': editable, 'adf-textitem-clickable-value': isClickable, 'adf-property-readonly-value': isReadonlyProperty, - 'adf-property-value-has-error': isEditable && hasErrors + 'adf-property-value-has-error': isEditable && hasErrors, + 'adf-property-value-has-icon-suffix': showClickableIcon }" [placeholder]="property.default" [attr.aria-label]="property.label | translate" diff --git a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.scss b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.scss index 44de6d4e366..718117b6107 100644 --- a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.scss +++ b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.scss @@ -36,7 +36,9 @@ } #{$mat-form-field-icon-suffix} { - align-self: baseline; + position: absolute; + right: 1px; + bottom: 7px; } .adf-textitem-chip-list-container { @@ -77,6 +79,13 @@ color: var(--adf-metadata-property-panel-title-color); } + .adf-property-value-has-icon-suffix { + padding-right: 34px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + #{$mat-line-ripple} { &::before, &::after { diff --git a/lib/core/src/lib/card-view/components/card-view/card-view.component.scss b/lib/core/src/lib/card-view/components/card-view/card-view.component.scss index 44059499fa6..cb5bac29f90 100644 --- a/lib/core/src/lib/card-view/components/card-view/card-view.component.scss +++ b/lib/core/src/lib/card-view/components/card-view/card-view.component.scss @@ -87,6 +87,7 @@ &.adf-property-value-editable { color: var(--adf-metadata-property-panel-title-color); background-color: var(--adf-metadata-buttons-background-color); + box-sizing: border-box; border-radius: 6px; height: 32px; padding-left: 10px; @@ -112,6 +113,7 @@ &-input { background-color: var(--adf-metadata-buttons-background-color); + box-sizing: border-box; border-radius: 6px; padding: 6px 0; margin: 0; From 7f41675d1c3dfa4567072761b608275f0b6dd6f7 Mon Sep 17 00:00:00 2001 From: Fabian Kindgen <39992669+fkindgen@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:06:54 +0100 Subject: [PATCH 26/35] AAE-10529 Find a better way to fix clipped icons (#10366) * AAE-10529 Removed unused styling * AAE-10529 Apply styling fixes related to ACA --- .../lib/document-list/components/document-list.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.scss b/lib/content-services/src/lib/document-list/components/document-list.component.scss index 7581ce55a2e..a648d378765 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.scss +++ b/lib/content-services/src/lib/document-list/components/document-list.component.scss @@ -23,7 +23,7 @@ .adf-datatable-list { .adf-datatable-selected { - overflow: unset; + display: inline-table; & > svg { fill: var(--theme-accent-color); From afc5830c31a6a180037ee887d6ba5d3341135237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michaela=20Kr=C3=B6ber?= <85624192+mkrbr@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:32:25 +0100 Subject: [PATCH 27/35] AAE-10239 showRowContextMenu-datatable-action-called-multiple-times (#10386) * [AAE-10239] use an action when the datatable component is loaded * [AAE-10239] add test for disabled context menu * [AAE-10239] fixed context menu for tree component * [AAE-10239] added new test for disabled context menu * [AAE-10239] fixed context menu for recent changes for tree component * [AAE-10239] backward compatible approach * [AAE-10239] no need to format the file * [AAE-10239] reverted rename of method * [AAE-10239] renamed file so you can find it better --- .../context-menu.directive.spec.ts | 231 ++++++++++++++++++ .../context-menu/context-menu.directive.ts | 15 +- .../src/lib/context-menu/context-menu.spec.ts | 200 --------------- .../datatable/datatable.component.spec.ts | 14 ++ .../datatable/datatable.component.ts | 10 +- 5 files changed, 260 insertions(+), 210 deletions(-) create mode 100644 lib/core/src/lib/context-menu/context-menu.directive.spec.ts delete mode 100644 lib/core/src/lib/context-menu/context-menu.spec.ts diff --git a/lib/core/src/lib/context-menu/context-menu.directive.spec.ts b/lib/core/src/lib/context-menu/context-menu.directive.spec.ts new file mode 100644 index 00000000000..e8237c43fa1 --- /dev/null +++ b/lib/core/src/lib/context-menu/context-menu.directive.spec.ts @@ -0,0 +1,231 @@ +/*! + * @license + * Copyright Š 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component } from '@angular/core'; +import { TestBed, ComponentFixture } from '@angular/core/testing'; +import { CONTEXT_MENU_DIRECTIVES } from './context-menu.module'; +import { CoreTestingModule } from '../testing/core.testing.module'; +import { HarnessLoader } from '@angular/cdk/testing'; +import { MatIconHarness } from '@angular/material/icon/testing'; +import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; + +@Component({ + selector: 'adf-test-component', + template: `
` +}) +class TestComponent { + actions: any[] | (() => any[]); + isEnabled: boolean; +} + +const actions = [ + { + model: { + visible: false, + title: 'Action 1' + }, + subject: { + next: jasmine.createSpy('next') + } + }, + { + model: { + visible: true, + disabled: true, + title: 'Action 2', + icon: null + }, + subject: { + next: jasmine.createSpy('next') + } + }, + { + model: { + visible: true, + disabled: false, + title: 'Action 3', + icon: 'action-icon-3' + }, + subject: { + next: jasmine.createSpy('next') + } + }, + { + model: { + visible: true, + disabled: false, + title: 'Action 4', + icon: 'action-icon-4' + }, + subject: { + next: jasmine.createSpy('next') + } + }, + { + model: { + visible: true, + disabled: false, + title: 'action-5', + icon: 'action-icon-5', + tooltip: 'Action 5 tooltip' + }, + subject: { + next: jasmine.createSpy('next') + } + }, + { + model: { + visible: true, + disabled: false, + title: 'action-6', + icon: 'action-icon-6' + }, + subject: { + next: jasmine.createSpy('next') + } + } +]; + +const testCases = [ + { + description: 'with actions as an array', + actions + }, + { + description: 'with actions as a function', + actions: () => actions + } +]; + +testCases.forEach((testCase) => { + describe(`ContextMenuDirective ${testCase.description}`, () => { + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [CoreTestingModule, CONTEXT_MENU_DIRECTIVES], + declarations: [TestComponent] + }); + fixture = TestBed.createComponent(TestComponent); + fixture.componentInstance.isEnabled = false; + fixture.componentInstance.actions = testCase.actions; + fixture.detectChanges(); + }); + + it('should not show menu on mouse contextmenu event when context menu is disabled', () => { + const targetElement = fixture.debugElement.nativeElement.querySelector('#target'); + targetElement.dispatchEvent(new CustomEvent('contextmenu')); + fixture.detectChanges(); + + const contextMenu = document.querySelector('.adf-context-menu'); + expect(contextMenu).toBe(null); + }); + + describe('Events', () => { + let targetElement: HTMLElement; + let contextMenu: HTMLElement | null; + + beforeEach(() => { + fixture.componentInstance.isEnabled = true; + fixture.detectChanges(); + + targetElement = fixture.debugElement.nativeElement.querySelector('#target'); + targetElement.dispatchEvent(new CustomEvent('contextmenu')); + fixture.detectChanges(); + contextMenu = document.querySelector('.adf-context-menu'); + }); + + it('should show menu on mouse contextmenu event', () => { + expect(contextMenu).not.toBe(null); + }); + + it('should set DOM element reference on menu open event', () => { + expect(contextMenu?.className).toContain('adf-context-menu'); + }); + + it('should reset DOM element reference on Escape event', () => { + const event = new KeyboardEvent('keydown', { + bubbles: true, + cancelable: true, + key: 'Escape' + }); + + document.querySelector('.cdk-overlay-backdrop')?.dispatchEvent(event); + fixture.detectChanges(); + expect(document.querySelector('.adf-context-menu')).toBe(null); + }); + }); + + describe('Contextmenu list', () => { + let targetElement: HTMLElement; + let contextMenu: HTMLElement | null; + let loader: HarnessLoader; + + beforeEach(() => { + fixture.componentInstance.isEnabled = true; + fixture.detectChanges(); + + targetElement = fixture.debugElement.nativeElement.querySelector('#target'); + targetElement.dispatchEvent(new CustomEvent('contextmenu')); + fixture.detectChanges(); + contextMenu = document.querySelector('.adf-context-menu'); + loader = TestbedHarnessEnvironment.documentRootLoader(fixture); + }); + + it('should not render item with visibility property set to false', () => { + expect(contextMenu?.querySelectorAll('button').length).toBe(5); + }); + + it('should render item as disabled when `disabled` property is set to true', async () => { + expect(contextMenu?.querySelectorAll('button')[0].disabled).toBe(true); + }); + + it('should set first not disabled item as active', async () => { + const icon = await loader.getHarness(MatIconHarness.with({ ancestor: 'adf-context-menu' })); + + expect(await icon.getName()).toEqual('action-icon-3'); + }); + + it('should not allow action event when item is disabled', () => { + contextMenu?.querySelectorAll('button')[0].click(); + fixture.detectChanges(); + + expect(actions[1].subject.next).not.toHaveBeenCalled(); + }); + + it('should perform action when item is not disabled', () => { + contextMenu?.querySelectorAll('button')[1].click(); + fixture.detectChanges(); + + expect(actions[2].subject.next).toHaveBeenCalled(); + }); + + it('should not render item icon if not set', async () => { + expect( + ( + await loader.getAllHarnesses( + MatIconHarness.with({ + ancestor: 'adf-context-menu', + name: 'Action 1' + }) + ) + ).length + ).toBe(0); + }); + }); + }); +}); diff --git a/lib/core/src/lib/context-menu/context-menu.directive.ts b/lib/core/src/lib/context-menu/context-menu.directive.ts index d5a7e1cb9c8..41ba9249283 100644 --- a/lib/core/src/lib/context-menu/context-menu.directive.ts +++ b/lib/core/src/lib/context-menu/context-menu.directive.ts @@ -27,7 +27,7 @@ import { ContextMenuOverlayService } from './context-menu-overlay.service'; export class ContextMenuDirective { /** Items for the menu. */ @Input('adf-context-menu') - links: any[]; + links: any[] | (() => any[]); /** Is the menu enabled? */ @Input('adf-context-menu-enabled') @@ -42,11 +42,14 @@ export class ContextMenuDirective { event.preventDefault(); } - if (this.links && this.links.length > 0) { - this.contextMenuService.open({ - source: event, - data: this.links - }); + if (this.links) { + const actions = typeof this.links === 'function' ? this.links() : this.links; + if (actions.length > 0) { + this.contextMenuService.open({ + source: event, + data: actions + }); + } } } } diff --git a/lib/core/src/lib/context-menu/context-menu.spec.ts b/lib/core/src/lib/context-menu/context-menu.spec.ts deleted file mode 100644 index 1bee7feaa88..00000000000 --- a/lib/core/src/lib/context-menu/context-menu.spec.ts +++ /dev/null @@ -1,200 +0,0 @@ -/*! - * @license - * Copyright Š 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Component } from '@angular/core'; -import { TestBed, ComponentFixture } from '@angular/core/testing'; -import { CONTEXT_MENU_DIRECTIVES } from './context-menu.module'; -import { CoreTestingModule } from '../testing/core.testing.module'; -import { HarnessLoader } from '@angular/cdk/testing'; -import { MatIconHarness } from '@angular/material/icon/testing'; -import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; - -@Component({ - selector: 'adf-test-component', - template: `
` -}) -class TestComponent { - actions; -} - -describe('ContextMenuDirective', () => { - let fixture: ComponentFixture; - const actions = [ - { - model: { - visible: false, - title: 'Action 1' - }, - subject: { - next: jasmine.createSpy('next') - } - }, - { - model: { - visible: true, - disabled: true, - title: 'Action 2', - icon: null - }, - subject: { - next: jasmine.createSpy('next') - } - }, - { - model: { - visible: true, - disabled: false, - title: 'Action 3', - icon: 'action-icon-3' - }, - subject: { - next: jasmine.createSpy('next') - } - }, - { - model: { - visible: true, - disabled: false, - title: 'Action 4', - icon: 'action-icon-4' - }, - subject: { - next: jasmine.createSpy('next') - } - }, - { - model: { - visible: true, - disabled: false, - title: 'action-5', - icon: 'action-icon-5', - tooltip: 'Action 5 tooltip' - }, - subject: { - next: jasmine.createSpy('next') - } - }, - { - model: { - visible: true, - disabled: false, - title: 'action-6', - icon: 'action-icon-6' - }, - subject: { - next: jasmine.createSpy('next') - } - } - ]; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [CoreTestingModule, CONTEXT_MENU_DIRECTIVES], - declarations: [TestComponent] - }); - fixture = TestBed.createComponent(TestComponent); - fixture.componentInstance.actions = actions; - fixture.detectChanges(); - }); - - describe('Events', () => { - let targetElement: HTMLElement; - let contextMenu: HTMLElement | null; - - beforeEach(() => { - targetElement = fixture.debugElement.nativeElement.querySelector('#target'); - targetElement.dispatchEvent(new CustomEvent('contextmenu')); - fixture.detectChanges(); - contextMenu = document.querySelector('.adf-context-menu'); - }); - - it('should show menu on mouse contextmenu event', () => { - expect(contextMenu).not.toBe(null); - }); - - it('should set DOM element reference on menu open event', () => { - expect(contextMenu?.className).toContain('adf-context-menu'); - }); - - it('should reset DOM element reference on Escape event', () => { - const event = new KeyboardEvent('keydown', { - bubbles: true, - cancelable: true, - key: 'Escape' - }); - - document.querySelector('.cdk-overlay-backdrop')?.dispatchEvent(event); - fixture.detectChanges(); - expect(document.querySelector('.adf-context-menu')).toBe(null); - }); - }); - - describe('Contextmenu list', () => { - let targetElement: HTMLElement; - let contextMenu: HTMLElement | null; - let loader: HarnessLoader; - - beforeEach(() => { - targetElement = fixture.debugElement.nativeElement.querySelector('#target'); - targetElement.dispatchEvent(new CustomEvent('contextmenu')); - fixture.detectChanges(); - contextMenu = document.querySelector('.adf-context-menu'); - loader = TestbedHarnessEnvironment.documentRootLoader(fixture); - }); - - it('should not render item with visibility property set to false', () => { - expect(contextMenu?.querySelectorAll('button').length).toBe(5); - }); - - it('should render item as disabled when `disabled` property is set to true', async () => { - expect(contextMenu?.querySelectorAll('button')[0].disabled).toBe(true); - }); - - it('should set first not disabled item as active', async () => { - const icon = await loader.getHarness(MatIconHarness.with({ ancestor: 'adf-context-menu' })); - - expect(await icon.getName()).toEqual('action-icon-3'); - }); - - it('should not allow action event when item is disabled', () => { - contextMenu?.querySelectorAll('button')[0].click(); - fixture.detectChanges(); - - expect(fixture.componentInstance.actions[1].subject.next).not.toHaveBeenCalled(); - }); - - it('should perform action when item is not disabled', () => { - contextMenu?.querySelectorAll('button')[1].click(); - fixture.detectChanges(); - - expect(fixture.componentInstance.actions[2].subject.next).toHaveBeenCalled(); - }); - - it('should not render item icon if not set', async () => { - expect( - ( - await loader.getAllHarnesses( - MatIconHarness.with({ - ancestor: 'adf-context-menu', - name: 'Action 1' - }) - ) - ).length - ).toBe(0); - }); - }); -}); diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts b/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts index 3c78929b609..1f60f6c6dcf 100644 --- a/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts +++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts @@ -156,6 +156,20 @@ describe('DataTable', () => { fixture.destroy(); }); + it('should not emit showRowContextMenu when the component is loaded with rows', () => { + spyOn(dataTable.showRowContextMenu, 'emit'); + const newData = new ObjectDataTableAdapter([{ name: 'TEST' }, { name: 'FAKE' }], [new ObjectDataColumn({ key: 'name' })]); + dataTable.data = new ObjectDataTableAdapter([{ name: '1' }, { name: '2' }], [new ObjectDataColumn({ key: 'name' })]); + + dataTable.ngOnChanges({ + data: new SimpleChange(null, newData, false) + }); + + fixture.detectChanges(); + + expect(dataTable.showRowContextMenu.emit).not.toHaveBeenCalled(); + }); + it('should return only visible columns', () => { const columns = [ { key: 'col1', isHidden: false }, diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts index 7967780f8c2..fd99a890ad0 100644 --- a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts +++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts @@ -803,10 +803,12 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges, return false; } - getContextMenuActions(row: DataRow, col: DataColumn): any[] { - const event = new DataCellEvent(row, col, []); - this.showRowContextMenu.emit(event); - return event.value.actions; + getContextMenuActions(row: DataRow, col: DataColumn): () => any[] { + return () => { + const event = new DataCellEvent(row, col, []); + this.showRowContextMenu.emit(event); + return event.value.actions; + }; } getRowActions(row: DataRow, col?: DataColumn): any[] { From 60da8634f21f77e0eb7f746be95628fdb09fa6c4 Mon Sep 17 00:00:00 2001 From: Jonas Wollweber <87132834+JWollweber@users.noreply.github.com> Date: Mon, 25 Nov 2024 09:51:24 +0100 Subject: [PATCH 28/35] AAE-20506 Rich Text Editor Visual Improvements (#10385) * [AAE-20506] replace icon with material design icon * [AAE-20506] fix size and position of 'change color' plugin's icon * [AAE-20506] make sure material design's container does not define text color --- .../src/lib/rich-text-editor/editorjs-config.ts | 3 ++- .../rich-text-editor.component.scss | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/process-services-cloud/src/lib/rich-text-editor/editorjs-config.ts b/lib/process-services-cloud/src/lib/rich-text-editor/editorjs-config.ts index cefecc76634..db073179c76 100644 --- a/lib/process-services-cloud/src/lib/rich-text-editor/editorjs-config.ts +++ b/lib/process-services-cloud/src/lib/rich-text-editor/editorjs-config.ts @@ -86,7 +86,8 @@ export const editorJsConfig = { 'Increase/Decrease font size': { class: ChangeFontSize, config: { - cssClass: 'plus20pc' + cssClass: 'plus20pc', + buttonIcon: 'format_size' } }, inlineCode: { diff --git a/lib/process-services-cloud/src/lib/rich-text-editor/rich-text-editor.component.scss b/lib/process-services-cloud/src/lib/rich-text-editor/rich-text-editor.component.scss index 08d72dfc366..fc020bf034f 100644 --- a/lib/process-services-cloud/src/lib/rich-text-editor/rich-text-editor.component.scss +++ b/lib/process-services-cloud/src/lib/rich-text-editor/rich-text-editor.component.scss @@ -1,5 +1,7 @@ /* stylelint-disable selector-class-pattern */ .adf-rich-text-editor-container { + color: var(--theme-text-fg-color, rgba(0, 0, 0, 0.87)); + .editorjs { &.readonly { .codex-editor__redactor { @@ -11,11 +13,20 @@ .ce-inline-toolbar { transform: scale(1); + + .ce-popover__items { + overflow: hidden; + } + + .ce-inline-tool .material-icons { + font-size: 20px; + } } } xy-color-picker { position: relative; background-color: transparent; - width: 22px; + margin: 0; + overflow: hidden; } From 697f7d226707ae56cfd4414a2b3e17a465defb87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:08:07 +0000 Subject: [PATCH 29/35] build(deps): bump github/codeql-action from 3.27.4 to 3.27.5 (#10430) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.4 to 3.27.5. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/ea9e4e37992a54ee68a9622e985e60c8e8f12d9f...f09c1c0a94de965c15400f5634aa42fac8fb8f88) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 792f23c66b9..3f830c15f83 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,7 +30,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 + uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 # Override language selection by uncommenting this and choosing your languages with: languages: javascript @@ -39,7 +39,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 + uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -53,4 +53,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 + uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 From f942e5456c1ed51a628e235f4f065aa8d169dc5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:08:37 +0000 Subject: [PATCH 30/35] build(deps-dev): bump @storybook/manager-api from 8.3.0 to 8.4.5 (#10426) Bumps [@storybook/manager-api](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/manager-api) from 8.3.0 to 8.4.5. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Commits](https://github.com/storybookjs/storybook/commits/v8.4.5/code/lib/manager-api) --- updated-dependencies: - dependency-name: "@storybook/manager-api" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 11 ++++++----- package.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 153d2d8a5b5..6995a3eab5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,7 +81,7 @@ "@storybook/addon-essentials": "^8.2.9", "@storybook/angular": "^8.2.9", "@storybook/core-server": "^8.2.9", - "@storybook/manager-api": "^8.2.9", + "@storybook/manager-api": "^8.4.5", "@types/ejs": "^3.1.5", "@types/event-emitter": "^0.3.3", "@types/jasmine": "4.0.3", @@ -165,7 +165,7 @@ }, "lib/eslint-angular": { "name": "@alfresco/eslint-plugin-eslint-angular", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "dev": true, "license": "Apache-2.0" }, @@ -11052,15 +11052,16 @@ } }, "node_modules/@storybook/manager-api": { - "version": "8.3.0", + "version": "8.4.5", + "resolved": "https://registry.npmjs.org/@storybook/manager-api/-/manager-api-8.4.5.tgz", + "integrity": "sha512-t39JaMy3UX4StbUH/tIDcaflBDxTcyIq853wQtBMhVL3e1+Dw3MIiiG/5bw79HU4R7kSmPVLXIIbV3FmXkq7KQ==", "dev": true, - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.3.0" + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, "node_modules/@storybook/preview-api": { diff --git a/package.json b/package.json index abc522c0e8b..b246c3823c2 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@storybook/addon-essentials": "^8.2.9", "@storybook/angular": "^8.2.9", "@storybook/core-server": "^8.2.9", - "@storybook/manager-api": "^8.2.9", + "@storybook/manager-api": "^8.4.5", "@types/ejs": "^3.1.5", "@types/event-emitter": "^0.3.3", "@types/jasmine": "4.0.3", From b63a68dd37310e5bc10c7c67f5ec91e3ce060145 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:09:21 +0000 Subject: [PATCH 31/35] build(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions (#10429) Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions) from 3.0.16 to 3.0.17. - [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases) - [Commits](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/compare/38608ef4fb69adae7f1eac6eeb88e67b7d083bfd...5d6ac37a4cef8b8df67f482a8e384987766f0213) --- updated-dependencies: - dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b165ece00f4..3c769e1fa99 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -64,7 +64,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Ensure SHA pinned actions - uses: zgosalvez/github-actions-ensure-sha-pinned-actions@38608ef4fb69adae7f1eac6eeb88e67b7d083bfd # v3.0.16 + uses: zgosalvez/github-actions-ensure-sha-pinned-actions@5d6ac37a4cef8b8df67f482a8e384987766f0213 # v3.0.17 - name: Check package-lock.json version run: | From 6723cd1802183489b7ce38925e4d3fed83edc374 Mon Sep 17 00:00:00 2001 From: Ehsan Rezaei Date: Tue, 26 Nov 2024 15:20:33 +0100 Subject: [PATCH 32/35] AAE-20808 Adding support for ws protocol in websocket service (#10432) * AAE-20808 Adding support for ws protocol in websocket service * AAE-20808 Fixed import --- .../src/lib/services/web-socket.service.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/process-services-cloud/src/lib/services/web-socket.service.ts b/lib/process-services-cloud/src/lib/services/web-socket.service.ts index e19a162b793..42993285529 100644 --- a/lib/process-services-cloud/src/lib/services/web-socket.service.ts +++ b/lib/process-services-cloud/src/lib/services/web-socket.service.ts @@ -37,7 +37,7 @@ import { Kind, OperationTypeNode } from 'graphql'; import { Apollo } from 'apollo-angular'; import { onError } from '@apollo/client/link/error'; import { RetryLink } from '@apollo/client/link/retry'; -import { Observable } from 'rxjs/internal/Observable'; +import { Observable } from 'rxjs'; import { switchMap, take, tap } from 'rxjs/operators'; import { FeaturesServiceToken, IFeaturesService } from '@alfresco/adf-core/feature-flags'; @@ -89,9 +89,15 @@ export class WebSocketService { ); } - private createUrl(serviceUrl: string, protocol: 'https' | 'wss' = 'wss'): string { + private createWsUrl(serviceUrl: string): string { + const url = new URL(serviceUrl, this.host); + url.protocol = url.protocol === 'https' ? 'wss' : 'ws'; + + return url.href; + } + + private createHttpUrl(serviceUrl: string): string { const url = new URL(serviceUrl, this.host); - url.protocol = protocol; return url.href; } @@ -110,7 +116,7 @@ export class WebSocketService { this.httpLink = options.httpUrl ? new HttpLink({ - uri: this.createUrl(options.httpUrl, 'https') + uri: this.createHttpUrl(options.httpUrl) }) : undefined; @@ -172,7 +178,7 @@ export class WebSocketService { private createTransportWsLink(options: serviceOptions) { this.wsLink = new WebSocketLink({ - uri: this.createUrl(options.wsUrl, 'wss') + '/ws/graphql', + uri: this.createWsUrl(options.wsUrl) + '/ws/graphql', options: { reconnect: true, lazy: true, @@ -187,7 +193,7 @@ export class WebSocketService { private createGraphQLWsLink(options: serviceOptions) { this.wsLink = new GraphQLWsLink( createClient({ - url: this.createUrl(options.wsUrl, 'wss') + '/v2/ws/graphql', + url: this.createWsUrl(options.wsUrl) + '/v2/ws/graphql', connectionParams: { Authorization: 'Bearer ' + this.authService.getToken() }, From 134097fd2cdb428ba14597fd6fb40144280cac63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:50:49 +0000 Subject: [PATCH 33/35] build(deps-dev): bump jasmine-core from 4.6.0 to 5.4.0 (#10428) Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 4.6.0 to 5.4.0. - [Release notes](https://github.com/jasmine/jasmine/releases) - [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md) - [Commits](https://github.com/jasmine/jasmine/compare/v4.6.0...v5.4.0) --- updated-dependencies: - dependency-name: jasmine-core dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 15 +++++++++++---- package.json | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6995a3eab5c..18245f2950e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -119,7 +119,7 @@ "graphql": "^16.9.0", "husky": "^7.0.4", "jasmine-ajax": "4.0.0", - "jasmine-core": "4.6.0", + "jasmine-core": "5.4.0", "jasmine-marbles": "^0.9.2", "jasmine-reporters": "^2.5.2", "jasmine-spec-reporter": "7.0.0", @@ -20958,9 +20958,10 @@ "license": "MIT" }, "node_modules/jasmine-core": { - "version": "4.6.0", - "dev": true, - "license": "MIT" + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.4.0.tgz", + "integrity": "sha512-T4fio3W++llLd7LGSGsioriDHgWyhoL6YTu4k37uwJLF7DzOzspz7mNxRoM3cQdLWtL/ebazQpIf/yZGJx/gzg==", + "dev": true }, "node_modules/jasmine-marbles": { "version": "0.9.2", @@ -22805,6 +22806,12 @@ "karma-jasmine": "^5.0.0" } }, + "node_modules/karma-jasmine/node_modules/jasmine-core": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.1.tgz", + "integrity": "sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ==", + "dev": true + }, "node_modules/karma-mocha-reporter": { "version": "2.2.5", "dev": true, diff --git a/package.json b/package.json index b246c3823c2..fcf4ad7a981 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "graphql": "^16.9.0", "husky": "^7.0.4", "jasmine-ajax": "4.0.0", - "jasmine-core": "4.6.0", + "jasmine-core": "5.4.0", "jasmine-marbles": "^0.9.2", "jasmine-reporters": "^2.5.2", "jasmine-spec-reporter": "7.0.0", From 2d3c6841f0b9c56dc32e429c65bac241240c21d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:51:20 +0000 Subject: [PATCH 34/35] build(deps): bump @cspell/eslint-plugin from 7.3.9 to 8.16.0 (#10427) Bumps [@cspell/eslint-plugin](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell-eslint-plugin) from 7.3.9 to 8.16.0. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/commits/v8.16.0/packages/cspell-eslint-plugin) --- updated-dependencies: - dependency-name: "@cspell/eslint-plugin" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 935 +++++++++++++++++++++------------------------- package.json | 2 +- 2 files changed, 432 insertions(+), 505 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18245f2950e..55bb4554632 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "@angular/platform-browser-dynamic": "16.2.9", "@angular/router": "16.2.9", "@apollo/client": "3.11.4", - "@cspell/eslint-plugin": "^7.3.6", + "@cspell/eslint-plugin": "^8.16.0", "@mat-datetimepicker/core": "12.0.1", "@ngx-translate/core": "^14.0.0", "@storybook/addon-interactions": "^8.2.9", @@ -3448,320 +3448,444 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "7.3.9", - "license": "MIT", - "dependencies": { - "@cspell/dict-ada": "^4.0.2", - "@cspell/dict-aws": "^4.0.0", - "@cspell/dict-bash": "^4.1.2", - "@cspell/dict-companies": "^3.0.27", - "@cspell/dict-cpp": "^5.0.9", - "@cspell/dict-cryptocurrencies": "^4.0.0", - "@cspell/dict-csharp": "^4.0.2", - "@cspell/dict-css": "^4.0.12", - "@cspell/dict-dart": "^2.0.3", - "@cspell/dict-django": "^4.1.0", - "@cspell/dict-docker": "^1.1.7", - "@cspell/dict-dotnet": "^5.0.0", - "@cspell/dict-elixir": "^4.0.3", - "@cspell/dict-en_us": "^4.3.11", - "@cspell/dict-en-common-misspellings": "^1.0.2", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.16.0.tgz", + "integrity": "sha512-R0Eqq5kTZnmZ0elih5uY3TWjMqqAeMl7ciU7maUs+m1FNjCEdJXtJ9wrQxNgjmXi0tX8cvahZRO3O558tEz/KA==", + "dependencies": { + "@cspell/dict-ada": "^4.0.5", + "@cspell/dict-al": "^1.0.3", + "@cspell/dict-aws": "^4.0.7", + "@cspell/dict-bash": "^4.1.8", + "@cspell/dict-companies": "^3.1.7", + "@cspell/dict-cpp": "^6.0.1", + "@cspell/dict-cryptocurrencies": "^5.0.3", + "@cspell/dict-csharp": "^4.0.5", + "@cspell/dict-css": "^4.0.16", + "@cspell/dict-dart": "^2.2.4", + "@cspell/dict-django": "^4.1.3", + "@cspell/dict-docker": "^1.1.11", + "@cspell/dict-dotnet": "^5.0.8", + "@cspell/dict-elixir": "^4.0.6", + "@cspell/dict-en_us": "^4.3.26", + "@cspell/dict-en-common-misspellings": "^2.0.7", "@cspell/dict-en-gb": "1.1.33", - "@cspell/dict-filetypes": "^3.0.2", - "@cspell/dict-fonts": "^4.0.0", - "@cspell/dict-fsharp": "^1.0.1", - "@cspell/dict-fullstack": "^3.1.5", - "@cspell/dict-gaming-terms": "^1.0.4", - "@cspell/dict-git": "^2.0.0", - "@cspell/dict-golang": "^6.0.4", - "@cspell/dict-haskell": "^4.0.1", - "@cspell/dict-html": "^4.0.5", - "@cspell/dict-html-symbol-entities": "^4.0.0", - "@cspell/dict-java": "^5.0.6", - "@cspell/dict-k8s": "^1.0.2", - "@cspell/dict-latex": "^4.0.0", - "@cspell/dict-lorem-ipsum": "^4.0.0", - "@cspell/dict-lua": "^4.0.2", - "@cspell/dict-makefile": "^1.0.0", - "@cspell/dict-node": "^4.0.3", - "@cspell/dict-npm": "^5.0.12", - "@cspell/dict-php": "^4.0.4", - "@cspell/dict-powershell": "^5.0.2", - "@cspell/dict-public-licenses": "^2.0.5", - "@cspell/dict-python": "^4.1.10", - "@cspell/dict-r": "^2.0.1", - "@cspell/dict-ruby": "^5.0.1", - "@cspell/dict-rust": "^4.0.1", - "@cspell/dict-scala": "^5.0.0", - "@cspell/dict-software-terms": "^3.3.9", - "@cspell/dict-sql": "^2.1.2", - "@cspell/dict-svelte": "^1.0.2", - "@cspell/dict-swift": "^2.0.1", - "@cspell/dict-typescript": "^3.1.2", - "@cspell/dict-vue": "^3.0.0" + "@cspell/dict-filetypes": "^3.0.8", + "@cspell/dict-flutter": "^1.0.3", + "@cspell/dict-fonts": "^4.0.3", + "@cspell/dict-fsharp": "^1.0.4", + "@cspell/dict-fullstack": "^3.2.3", + "@cspell/dict-gaming-terms": "^1.0.8", + "@cspell/dict-git": "^3.0.3", + "@cspell/dict-golang": "^6.0.16", + "@cspell/dict-google": "^1.0.4", + "@cspell/dict-haskell": "^4.0.4", + "@cspell/dict-html": "^4.0.10", + "@cspell/dict-html-symbol-entities": "^4.0.3", + "@cspell/dict-java": "^5.0.10", + "@cspell/dict-julia": "^1.0.4", + "@cspell/dict-k8s": "^1.0.9", + "@cspell/dict-latex": "^4.0.3", + "@cspell/dict-lorem-ipsum": "^4.0.3", + "@cspell/dict-lua": "^4.0.6", + "@cspell/dict-makefile": "^1.0.3", + "@cspell/dict-markdown": "^2.0.7", + "@cspell/dict-monkeyc": "^1.0.9", + "@cspell/dict-node": "^5.0.5", + "@cspell/dict-npm": "^5.1.11", + "@cspell/dict-php": "^4.0.13", + "@cspell/dict-powershell": "^5.0.13", + "@cspell/dict-public-licenses": "^2.0.11", + "@cspell/dict-python": "^4.2.12", + "@cspell/dict-r": "^2.0.4", + "@cspell/dict-ruby": "^5.0.7", + "@cspell/dict-rust": "^4.0.9", + "@cspell/dict-scala": "^5.0.6", + "@cspell/dict-software-terms": "^4.1.13", + "@cspell/dict-sql": "^2.1.8", + "@cspell/dict-svelte": "^1.0.5", + "@cspell/dict-swift": "^2.0.4", + "@cspell/dict-terraform": "^1.0.6", + "@cspell/dict-typescript": "^3.1.11", + "@cspell/dict-vue": "^3.0.3" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-pipe": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.16.0.tgz", + "integrity": "sha512-WoCgrv/mrtwCY4lhc6vEcqN3AQ7lT6K0NW5ShoSo116U2tRaW0unApIYH4Va8u7T9g3wyspFEceQRR1xD9qb9w==", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-resolver": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.16.0.tgz", + "integrity": "sha512-b+99bph43ptkXlQHgPXSkN/jK6LQHy2zL1Fm9up7+x6Yr64bxAzWzoeqJAPtnrPvFuOrFN0jZasZzKBw8CvrrQ==", "dependencies": { - "global-dirs": "^3.0.1" + "global-directory": "^4.0.1" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-service-bus": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.16.0.tgz", + "integrity": "sha512-+fn763JKA4EYCOv+1VShFq015UMEBAFRDr+rlCnesgLE0fv9TSFVLsjOfh9/g6GuGQLCRLUqKztwwuueeErstQ==", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-types": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.16.0.tgz", + "integrity": "sha512-bGrIK7p4NVsK+QX/CYWmjax+FkzfSIZaIaoiBESGV5gmwgXDVRMJ3IP6tQVAmTtckOYHCmtT5CZgI8zXWr8dHQ==", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/dict-ada": { - "version": "4.0.2", - "license": "MIT" + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-ada/-/dict-ada-4.0.5.tgz", + "integrity": "sha512-6/RtZ/a+lhFVmrx/B7bfP7rzC4yjEYe8o74EybXcvu4Oue6J4Ey2WSYj96iuodloj1LWrkNCQyX5h4Pmcj0Iag==" + }, + "node_modules/@cspell/dict-al": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-al/-/dict-al-1.0.3.tgz", + "integrity": "sha512-V1HClwlfU/qwSq2Kt+MkqRAsonNu3mxjSCDyGRecdLGIHmh7yeEeaxqRiO/VZ4KP+eVSiSIlbwrb5YNFfxYZbw==" }, "node_modules/@cspell/dict-aws": { - "version": "4.0.4", - "license": "MIT" + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.7.tgz", + "integrity": "sha512-PoaPpa2NXtSkhGIMIKhsJUXB6UbtTt6Ao3x9JdU9kn7fRZkwD4RjHDGqulucIOz7KeEX/dNRafap6oK9xHe4RA==" }, "node_modules/@cspell/dict-bash": { - "version": "4.1.4", - "license": "MIT" + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.1.8.tgz", + "integrity": "sha512-I2CM2pTNthQwW069lKcrVxchJGMVQBzru2ygsHCwgidXRnJL/NTjAPOFTxN58Jc1bf7THWghfEDyKX/oyfc0yg==" }, "node_modules/@cspell/dict-companies": { - "version": "3.1.4", - "license": "MIT" + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.1.7.tgz", + "integrity": "sha512-ncVs/efuAkP1/tLDhWbXukBjgZ5xOUfe03neHMWsE8zvXXc5+Lw6TX5jaJXZLOoES/f4j4AhRE20jsPCF5pm+A==" }, "node_modules/@cspell/dict-cpp": { - "version": "5.1.16", - "license": "MIT" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.2.tgz", + "integrity": "sha512-yw5eejWvY4bAnc6LUA44m4WsFwlmgPt2uMSnO7QViGMBDuoeopMma4z9XYvs4lSjTi8fIJs/A1YDfM9AVzb8eg==" }, "node_modules/@cspell/dict-cryptocurrencies": { - "version": "4.0.0", - "license": "MIT" + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-5.0.3.tgz", + "integrity": "sha512-bl5q+Mk+T3xOZ12+FG37dB30GDxStza49Rmoax95n37MTLksk9wBo1ICOlPJ6PnDUSyeuv4SIVKgRKMKkJJglA==" }, "node_modules/@cspell/dict-csharp": { - "version": "4.0.2", - "license": "MIT" + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.5.tgz", + "integrity": "sha512-c/sFnNgtRwRJxtC3JHKkyOm+U3/sUrltFeNwml9VsxKBHVmvlg4tk4ar58PdpW9/zTlGUkWi2i85//DN1EsUCA==" }, "node_modules/@cspell/dict-css": { - "version": "4.0.13", - "license": "MIT" + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.16.tgz", + "integrity": "sha512-70qu7L9z/JR6QLyJPk38fNTKitlIHnfunx0wjpWQUQ8/jGADIhMCrz6hInBjqPNdtGpYm8d1dNFyF8taEkOgrQ==" }, "node_modules/@cspell/dict-dart": { - "version": "2.2.1", - "license": "MIT" + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.2.4.tgz", + "integrity": "sha512-of/cVuUIZZK/+iqefGln8G3bVpfyN6ZtH+LyLkHMoR5tEj+2vtilGNk9ngwyR8L4lEqbKuzSkOxgfVjsXf5PsQ==" }, "node_modules/@cspell/dict-data-science": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.5.tgz", + "integrity": "sha512-nNSILXmhSJox9/QoXICPQgm8q5PbiSQP4afpbkBqPi/u/b3K9MbNH5HvOOa6230gxcGdbZ9Argl2hY/U8siBlg==" }, "node_modules/@cspell/dict-django": { - "version": "4.1.0", - "license": "MIT" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.3.tgz", + "integrity": "sha512-yBspeL3roJlO0a1vKKNaWABURuHdHZ9b1L8d3AukX0AsBy9snSggc8xCavPmSzNfeMDXbH+1lgQiYBd3IW03fg==" }, "node_modules/@cspell/dict-docker": { - "version": "1.1.7", - "license": "MIT" + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.11.tgz", + "integrity": "sha512-s0Yhb16/R+UT1y727ekbR/itWQF3Qz275DR1ahOa66wYtPjHUXmhM3B/LT3aPaX+hD6AWmK23v57SuyfYHUjsw==" }, "node_modules/@cspell/dict-dotnet": { - "version": "5.0.5", - "license": "MIT" + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.8.tgz", + "integrity": "sha512-MD8CmMgMEdJAIPl2Py3iqrx3B708MbCIXAuOeZ0Mzzb8YmLmiisY7QEYSZPg08D7xuwARycP0Ki+bb0GAkFSqg==" }, "node_modules/@cspell/dict-elixir": { - "version": "4.0.3", - "license": "MIT" + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.6.tgz", + "integrity": "sha512-TfqSTxMHZ2jhiqnXlVKM0bUADtCvwKQv2XZL/DI0rx3doG8mEMS8SGPOmiyyGkHpR/pGOq18AFH3BEm4lViHIw==" }, "node_modules/@cspell/dict-en_us": { - "version": "4.3.23", - "license": "MIT" + "version": "4.3.27", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.27.tgz", + "integrity": "sha512-7JYHahRWpi0VykWFTSM03KL/0fs6YtYfpOaTAg4N/d0wB2GfwVG/FJ/SBCjD4LBc6Rx9dzdo95Hs4BB8GPQbOA==" }, "node_modules/@cspell/dict-en-common-misspellings": { - "version": "1.0.2", - "license": "MIT" + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.7.tgz", + "integrity": "sha512-qNFo3G4wyabcwnM+hDrMYKN9vNVg/k9QkhqSlSst6pULjdvPyPs1mqz1689xO/v9t8e6sR4IKc3CgUXDMTYOpA==" }, "node_modules/@cspell/dict-en-gb": { "version": "1.1.33", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz", + "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==" }, "node_modules/@cspell/dict-filetypes": { - "version": "3.0.4", - "license": "MIT" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.8.tgz", + "integrity": "sha512-D3N8sm/iptzfVwsib/jvpX+K/++rM8SRpLDFUaM4jxm8EyGmSIYRbKZvdIv5BkAWmMlTWoRqlLn7Yb1b11jKJg==" + }, + "node_modules/@cspell/dict-flutter": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-flutter/-/dict-flutter-1.0.3.tgz", + "integrity": "sha512-52C9aUEU22ptpgYh6gQyIdA4MP6NPwzbEqndfgPh3Sra191/kgs7CVqXiO1qbtZa9gnYHUoVApkoxRE7mrXHfg==" }, "node_modules/@cspell/dict-fonts": { - "version": "4.0.0", - "license": "MIT" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-4.0.3.tgz", + "integrity": "sha512-sPd17kV5qgYXLteuHFPn5mbp/oCHKgitNfsZLFC3W2fWEgZlhg4hK+UGig3KzrYhhvQ8wBnmZrAQm0TFKCKzsA==" }, "node_modules/@cspell/dict-fsharp": { - "version": "1.0.1", - "license": "MIT" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-fsharp/-/dict-fsharp-1.0.4.tgz", + "integrity": "sha512-G5wk0o1qyHUNi9nVgdE1h5wl5ylq7pcBjX8vhjHcO4XBq20D5eMoXjwqMo/+szKAqzJ+WV3BgAL50akLKrT9Rw==" }, "node_modules/@cspell/dict-fullstack": { - "version": "3.2.0", - "license": "MIT" + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.2.3.tgz", + "integrity": "sha512-62PbndIyQPH11mAv0PyiyT0vbwD0AXEocPpHlCHzfb5v9SspzCCbzQ/LIBiFmyRa+q5LMW35CnSVu6OXdT+LKg==" }, "node_modules/@cspell/dict-gaming-terms": { - "version": "1.0.5", - "license": "MIT" + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.0.8.tgz", + "integrity": "sha512-7OL0zTl93WFWhhtpXFrtm9uZXItC3ncAs8d0iQDMMFVNU1rBr6raBNxJskxE5wx2Ant12fgI66ZGVagXfN+yfA==" }, "node_modules/@cspell/dict-git": { - "version": "2.0.0", - "license": "MIT" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.0.3.tgz", + "integrity": "sha512-LSxB+psZ0qoj83GkyjeEH/ZViyVsGEF/A6BAo8Nqc0w0HjD2qX/QR4sfA6JHUgQ3Yi/ccxdK7xNIo67L2ScW5A==" }, "node_modules/@cspell/dict-golang": { - "version": "6.0.12", - "license": "MIT" + "version": "6.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.17.tgz", + "integrity": "sha512-uDDLEJ/cHdLiqPw4+5BnmIo2i/TSR+uDvYd6JlBjTmjBKpOCyvUgYRztH7nv5e7virsN5WDiUWah4/ATQGz4Pw==" + }, + "node_modules/@cspell/dict-google": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-google/-/dict-google-1.0.4.tgz", + "integrity": "sha512-JThUT9eiguCja1mHHLwYESgxkhk17Gv7P3b1S7ZJzXw86QyVHPrbpVoMpozHk0C9o+Ym764B7gZGKmw9uMGduQ==" }, "node_modules/@cspell/dict-haskell": { - "version": "4.0.1", - "license": "MIT" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-4.0.4.tgz", + "integrity": "sha512-EwQsedEEnND/vY6tqRfg9y7tsnZdxNqOxLXSXTsFA6JRhUlr8Qs88iUUAfsUzWc4nNmmzQH2UbtT25ooG9x4nA==" }, "node_modules/@cspell/dict-html": { - "version": "4.0.5", - "license": "MIT" + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.10.tgz", + "integrity": "sha512-I9uRAcdtHbh0wEtYZlgF0TTcgH0xaw1B54G2CW+tx4vHUwlde/+JBOfIzird4+WcMv4smZOfw+qHf7puFUbI5g==" }, "node_modules/@cspell/dict-html-symbol-entities": { - "version": "4.0.0", - "license": "MIT" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.3.tgz", + "integrity": "sha512-aABXX7dMLNFdSE8aY844X4+hvfK7977sOWgZXo4MTGAmOzR8524fjbJPswIBK7GaD3+SgFZ2yP2o0CFvXDGF+A==" }, "node_modules/@cspell/dict-java": { - "version": "5.0.7", - "license": "MIT" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.10.tgz", + "integrity": "sha512-pVNcOnmoGiNL8GSVq4WbX/Vs2FGS0Nej+1aEeGuUY9CU14X8yAVCG+oih5ZoLt1jaR8YfR8byUF8wdp4qG4XIw==" + }, + "node_modules/@cspell/dict-julia": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-julia/-/dict-julia-1.0.4.tgz", + "integrity": "sha512-bFVgNX35MD3kZRbXbJVzdnN7OuEqmQXGpdOi9jzB40TSgBTlJWA4nxeAKV4CPCZxNRUGnLH0p05T/AD7Aom9/w==" }, "node_modules/@cspell/dict-k8s": { - "version": "1.0.6", - "license": "MIT" + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.9.tgz", + "integrity": "sha512-Q7GELSQIzo+BERl2ya/nBEnZeQC+zJP19SN1pI6gqDYraM51uYJacbbcWLYYO2Y+5joDjNt/sd/lJtLaQwoSlA==" }, "node_modules/@cspell/dict-latex": { - "version": "4.0.0", - "license": "MIT" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-4.0.3.tgz", + "integrity": "sha512-2KXBt9fSpymYHxHfvhUpjUFyzrmN4c4P8mwIzweLyvqntBT3k0YGZJSriOdjfUjwSygrfEwiuPI1EMrvgrOMJw==" }, "node_modules/@cspell/dict-lorem-ipsum": { - "version": "4.0.0", - "license": "MIT" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-4.0.3.tgz", + "integrity": "sha512-WFpDi/PDYHXft6p0eCXuYnn7mzMEQLVeqpO+wHSUd+kz5ADusZ4cpslAA4wUZJstF1/1kMCQCZM6HLZic9bT8A==" }, "node_modules/@cspell/dict-lua": { - "version": "4.0.3", - "license": "MIT" + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.6.tgz", + "integrity": "sha512-Jwvh1jmAd9b+SP9e1GkS2ACbqKKRo9E1f9GdjF/ijmooZuHU0hPyqvnhZzUAxO1egbnNjxS/J2T6iUtjAUK2KQ==" }, "node_modules/@cspell/dict-makefile": { - "version": "1.0.0", - "license": "MIT" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-makefile/-/dict-makefile-1.0.3.tgz", + "integrity": "sha512-R3U0DSpvTs6qdqfyBATnePj9Q/pypkje0Nj26mQJ8TOBQutCRAJbr2ZFAeDjgRx5EAJU/+8txiyVF97fbVRViw==" + }, + "node_modules/@cspell/dict-markdown": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.7.tgz", + "integrity": "sha512-F9SGsSOokFn976DV4u/1eL4FtKQDSgJHSZ3+haPRU5ki6OEqojxKa8hhj4AUrtNFpmBaJx/WJ4YaEzWqG7hgqg==", + "peerDependencies": { + "@cspell/dict-css": "^4.0.16", + "@cspell/dict-html": "^4.0.10", + "@cspell/dict-html-symbol-entities": "^4.0.3", + "@cspell/dict-typescript": "^3.1.11" + } + }, + "node_modules/@cspell/dict-monkeyc": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.9.tgz", + "integrity": "sha512-Jvf6g5xlB4+za3ThvenYKREXTEgzx5gMUSzrAxIiPleVG4hmRb/GBSoSjtkGaibN3XxGx5x809gSTYCA/IHCpA==" }, "node_modules/@cspell/dict-node": { - "version": "4.0.3", - "license": "MIT" + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.5.tgz", + "integrity": "sha512-7NbCS2E8ZZRZwlLrh2sA0vAk9n1kcTUiRp/Nia8YvKaItGXLfxYqD2rMQ3HpB1kEutal6hQLVic3N2Yi1X7AaA==" }, "node_modules/@cspell/dict-npm": { - "version": "5.1.4", - "license": "MIT" + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.13.tgz", + "integrity": "sha512-7S1Pwq16M4sqvv/op7iHErc6Diz+DXsBYRMS0dDj6HUS44VXMvgejXa3RMd5jwBmcHzkInFm3DW1eb2exBs0cg==" }, "node_modules/@cspell/dict-php": { - "version": "4.0.10", - "license": "MIT" + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.13.tgz", + "integrity": "sha512-P6sREMZkhElzz/HhXAjahnICYIqB/HSGp1EhZh+Y6IhvC15AzgtDP8B8VYCIsQof6rPF1SQrFwunxOv8H1e2eg==" }, "node_modules/@cspell/dict-powershell": { - "version": "5.0.8", - "license": "MIT" + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.13.tgz", + "integrity": "sha512-0qdj0XZIPmb77nRTynKidRJKTU0Fl+10jyLbAhFTuBWKMypVY06EaYFnwhsgsws/7nNX8MTEQuewbl9bWFAbsg==" }, "node_modules/@cspell/dict-public-licenses": { - "version": "2.0.8", - "license": "MIT" + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.11.tgz", + "integrity": "sha512-rR5KjRUSnVKdfs5G+gJ4oIvQvm8+NJ6cHWY2N+GE69/FSGWDOPHxulCzeGnQU/c6WWZMSimG9o49i9r//lUQyA==" }, "node_modules/@cspell/dict-python": { - "version": "4.2.6", - "license": "MIT", + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.12.tgz", + "integrity": "sha512-U25eOFu+RE0aEcF2AsxZmq3Lic7y9zspJ9SzjrC0mfJz+yr3YmSCw4E0blMD3mZoNcf7H/vMshuKIY5AY36U+Q==", "dependencies": { - "@cspell/dict-data-science": "^2.0.1" + "@cspell/dict-data-science": "^2.0.5" } }, "node_modules/@cspell/dict-r": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.0.4.tgz", + "integrity": "sha512-cBpRsE/U0d9BRhiNRMLMH1PpWgw+N+1A2jumgt1if9nBGmQw4MUpg2u9I0xlFVhstTIdzXiLXMxP45cABuiUeQ==" }, "node_modules/@cspell/dict-ruby": { - "version": "5.0.3", - "license": "MIT" + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.7.tgz", + "integrity": "sha512-4/d0hcoPzi5Alk0FmcyqlzFW9lQnZh9j07MJzPcyVO62nYJJAGKaPZL2o4qHeCS/od/ctJC5AHRdoUm0ktsw6Q==" }, "node_modules/@cspell/dict-rust": { - "version": "4.0.5", - "license": "MIT" + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.10.tgz", + "integrity": "sha512-6o5C8566VGTTctgcwfF3Iy7314W0oMlFFSQOadQ0OEdJ9Z9ERX/PDimrzP3LGuOrvhtEFoK8pj+BLnunNwRNrw==" }, "node_modules/@cspell/dict-scala": { - "version": "5.0.3", - "license": "MIT" + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.6.tgz", + "integrity": "sha512-tl0YWAfjUVb4LyyE4JIMVE8DlLzb1ecHRmIWc4eT6nkyDqQgHKzdHsnusxFEFMVLIQomgSg0Zz6hJ5S1E4W4ww==" }, "node_modules/@cspell/dict-software-terms": { - "version": "3.4.10", - "license": "MIT" + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-4.1.17.tgz", + "integrity": "sha512-QORIk1R5DV8oOQ+oAlUWE7UomaJwUucqu2srrc2+PmkoI6R1fJwwg2uHCPBWlIb4PGDNEdXLv9BAD13H+0wytQ==" }, "node_modules/@cspell/dict-sql": { - "version": "2.1.5", - "license": "MIT" + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.8.tgz", + "integrity": "sha512-dJRE4JV1qmXTbbGm6WIcg1knmR6K5RXnQxF4XHs5HA3LAjc/zf77F95i5LC+guOGppVF6Hdl66S2UyxT+SAF3A==" }, "node_modules/@cspell/dict-svelte": { - "version": "1.0.2", - "license": "MIT" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-svelte/-/dict-svelte-1.0.5.tgz", + "integrity": "sha512-sseHlcXOqWE4Ner9sg8KsjxwSJ2yssoJNqFHR9liWVbDV+m7kBiUtn2EB690TihzVsEmDr/0Yxrbb5Bniz70mA==" }, "node_modules/@cspell/dict-swift": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.4.tgz", + "integrity": "sha512-CsFF0IFAbRtYNg0yZcdaYbADF5F3DsM8C4wHnZefQy8YcHP/qjAF/GdGfBFBLx+XSthYuBlo2b2XQVdz3cJZBw==" + }, + "node_modules/@cspell/dict-terraform": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.0.6.tgz", + "integrity": "sha512-Sqm5vGbXuI9hCFcr4w6xWf4Y25J9SdleE/IqfM6RySPnk8lISEmVdax4k6+Kinv9qaxyvnIbUUN4WFLWcBPQAg==" }, "node_modules/@cspell/dict-typescript": { - "version": "3.1.6", - "license": "MIT" + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.11.tgz", + "integrity": "sha512-FwvK5sKbwrVpdw0e9+1lVTl8FPoHYvfHRuQRQz2Ql5XkC0gwPPkpoyD1zYImjIyZRoYXk3yp9j8ss4iz7A7zoQ==" }, "node_modules/@cspell/dict-vue": { - "version": "3.0.0", - "license": "MIT" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.3.tgz", + "integrity": "sha512-akmYbrgAGumqk1xXALtDJcEcOMYBYMnkjpmGzH13Ozhq1mkPF4VgllFQlm1xYde+BUKNnzMgPEzxrL2qZllgYA==" }, "node_modules/@cspell/dynamic-import": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.16.0.tgz", + "integrity": "sha512-FH+B5y71qfunagXiLSJhXP9h/Vwb1Z8Cc/hLmliGekw/Y8BuYknL86tMg9grXBYNmM0kifIv6ZesQl8Km/p/rA==", "dependencies": { - "import-meta-resolve": "^3.1.1" + "import-meta-resolve": "^4.1.0" }, "engines": { - "node": ">=16" + "node": ">=18.0" } }, "node_modules/@cspell/eslint-plugin": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/eslint-plugin/-/eslint-plugin-8.16.0.tgz", + "integrity": "sha512-j4vmbq30cq2kRR5xMAjfLraFW6ZrSxlAbEk06vC1T3Zxl9fOclOQVsxZ2afLd7TB0NKsrSjS2mFBHBlNkDmSFA==", "dependencies": { - "@cspell/cspell-types": "7.3.9", - "cspell-lib": "7.3.9", - "estree-walker": "^3.0.3", - "synckit": "^0.8.5" + "@cspell/cspell-types": "8.16.0", + "@cspell/url": "8.16.0", + "cspell-lib": "8.16.0", + "synckit": "^0.9.2" }, "engines": { - "node": ">=16" + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^7 || ^8 || ^9" + } + }, + "node_modules/@cspell/filetypes": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.16.0.tgz", + "integrity": "sha512-u2Ub0uSwXFPJFvXhAO/0FZBj3sMr4CeYCiQwTUsdFRkRMFpbTc7Vf+a+aC2vIj6WcaWrYXrJy3NZF/yjqF6SGw==", + "engines": { + "node": ">=18" } }, "node_modules/@cspell/strong-weak-map": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.16.0.tgz", + "integrity": "sha512-R6N12wEIQpBk2uyni/FU1SFSIjP0uql7ynXVcF1ob8/JJeRoikssydi9Xq5J6ghMw+X50u35mFvg9BgWKz0d+g==", "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/@cspell/url": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.16.0.tgz", + "integrity": "sha512-zW+6hAieD/FjysfjY4mVv7iHWWasBP3ldj6L+xy2p4Kuax1nug7uuJqMHlAVude/OywNwENG0rYaP/P9Pg4O+w==", + "engines": { + "node": ">=18.0" } }, "node_modules/@cspotcode/source-map-support": { @@ -4331,7 +4455,6 @@ }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", - "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.3.0" @@ -4345,7 +4468,6 @@ }, "node_modules/@eslint-community/regexpp": { "version": "4.11.0", - "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -4353,7 +4475,6 @@ }, "node_modules/@eslint/eslintrc": { "version": "2.1.4", - "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -4375,7 +4496,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/ajv": { "version": "6.12.6", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -4390,7 +4510,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.24.0", - "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -4404,12 +4523,10 @@ }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, "license": "MIT" }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -4420,7 +4537,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", - "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -4431,7 +4547,6 @@ }, "node_modules/@eslint/js": { "version": "8.57.0", - "dev": true, "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4451,7 +4566,6 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", - "dev": true, "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", @@ -4464,7 +4578,6 @@ }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", - "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.22" @@ -4476,7 +4589,6 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "2.0.3", - "dev": true, "license": "BSD-3-Clause" }, "node_modules/@isaacs/cliui": { @@ -9947,7 +10059,8 @@ }, "node_modules/@pkgr/core": { "version": "0.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -12423,7 +12536,6 @@ }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", - "dev": true, "license": "ISC" }, "node_modules/@vitejs/plugin-basic-ssl": { @@ -13083,7 +13195,6 @@ }, "node_modules/acorn": { "version": "8.12.1", - "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -13130,7 +13241,6 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "dev": true, "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -13466,7 +13576,8 @@ }, "node_modules/array-timsort": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==" }, "node_modules/array-union": { "version": "2.1.0", @@ -14778,7 +14889,8 @@ }, "node_modules/clear-module": { "version": "4.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", + "integrity": "sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==", "dependencies": { "parent-module": "^2.0.0", "resolve-from": "^5.0.0" @@ -15023,7 +15135,8 @@ }, "node_modules/comment-json": { "version": "4.2.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.5.tgz", + "integrity": "sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==", "dependencies": { "array-timsort": "^1.0.3", "core-util-is": "^1.0.3", @@ -15126,37 +15239,6 @@ "version": "0.0.1", "license": "MIT" }, - "node_modules/configstore": { - "version": "6.0.0", - "license": "BSD-2-Clause", - "dependencies": { - "dot-prop": "^6.0.1", - "graceful-fs": "^4.2.6", - "unique-string": "^3.0.0", - "write-file-atomic": "^3.0.3", - "xdg-basedir": "^5.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/yeoman/configstore?sponsor=1" - } - }, - "node_modules/configstore/node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "node_modules/configstore/node_modules/write-file-atomic": { - "version": "3.0.3", - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/confusing-browser-globals": { "version": "1.0.11", "dev": true, @@ -15482,7 +15564,6 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -15492,172 +15573,121 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "4.0.0", - "license": "MIT", + "node_modules/cspell-config-lib": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.16.0.tgz", + "integrity": "sha512-PGT6ohLtIYXYLIm+R5hTcTrF0dzj8e7WAUJSJe5WlV/7lrwVdwgWaliLcXtSSPmfxgczr6sndX9TMJ2IEmPrmg==", "dependencies": { - "type-fest": "^1.0.1" + "@cspell/cspell-types": "8.16.0", + "comment-json": "^4.2.5", + "yaml": "^2.6.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/crypto-random-string/node_modules/type-fest": { - "version": "1.4.0", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" + "node_modules/cspell-config-lib/node_modules/yaml": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "bin": { + "yaml": "bin.mjs" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 14" } }, "node_modules/cspell-dictionary": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.16.0.tgz", + "integrity": "sha512-Y3sN6ttLBKbu0dOLcduY641n5QP1srUvZkW4bOTnG455DbIZfilrP1El/2Hl0RS6hC8LN9PM4bsIm/2xgdbApA==", "dependencies": { - "@cspell/cspell-pipe": "7.3.9", - "@cspell/cspell-types": "7.3.9", - "cspell-trie-lib": "7.3.9", - "fast-equals": "^4.0.3", - "gensequence": "^6.0.0" + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-types": "8.16.0", + "cspell-trie-lib": "8.16.0", + "fast-equals": "^5.0.1" }, "engines": { - "node": ">=16" + "node": ">=18" } }, - "node_modules/cspell-dictionary/node_modules/fast-equals": { - "version": "4.0.3", - "license": "MIT" - }, "node_modules/cspell-glob": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.16.0.tgz", + "integrity": "sha512-xJSXRHwfENCNFmjpVSEucXY8E3BrpSCA+TukmOYtLyaMKtn6EAwoCpEU7Oj2tZOjdivprPmQ74k4Dqb1RHjIVQ==", "dependencies": { - "micromatch": "^4.0.5" + "@cspell/url": "8.16.0", + "micromatch": "^4.0.8" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-grammar": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.16.0.tgz", + "integrity": "sha512-vvbJEkBqXocGH/H975RtkfMzVpNxNGMd0JCDd+NjbpeRyZceuChFw5Tie7kHteFY29SwZovub+Am3F4H1kmf9A==", "dependencies": { - "@cspell/cspell-pipe": "7.3.9", - "@cspell/cspell-types": "7.3.9" + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-types": "8.16.0" }, "bin": { "cspell-grammar": "bin.mjs" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-io": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.16.0.tgz", + "integrity": "sha512-WIK5uhPMjGsTAzm2/fGRbIdr7zWsMVG1fn8wNJYUiYELuyvzvLelfI1VG6szaFCGYqd6Uvgb/fS0uNbwGqCLAQ==", "dependencies": { - "@cspell/cspell-service-bus": "7.3.9", - "node-fetch": "^2.7.0" + "@cspell/cspell-service-bus": "8.16.0", + "@cspell/url": "8.16.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-lib": { - "version": "7.3.9", - "license": "MIT", - "dependencies": { - "@cspell/cspell-bundled-dicts": "7.3.9", - "@cspell/cspell-pipe": "7.3.9", - "@cspell/cspell-resolver": "7.3.9", - "@cspell/cspell-types": "7.3.9", - "@cspell/dynamic-import": "7.3.9", - "@cspell/strong-weak-map": "7.3.9", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.16.0.tgz", + "integrity": "sha512-fU8CfECyuhT12COIi4ViQu2bTkdqaa+05YSd2ZV8k8NA7lapPaMFnlooxdfcwwgZJfHeMhRVMzvQF1OhWmwGfA==", + "dependencies": { + "@cspell/cspell-bundled-dicts": "8.16.0", + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-resolver": "8.16.0", + "@cspell/cspell-types": "8.16.0", + "@cspell/dynamic-import": "8.16.0", + "@cspell/filetypes": "8.16.0", + "@cspell/strong-weak-map": "8.16.0", + "@cspell/url": "8.16.0", "clear-module": "^4.1.2", - "comment-json": "^4.2.3", - "configstore": "^6.0.0", - "cosmiconfig": "8.0.0", - "cspell-dictionary": "7.3.9", - "cspell-glob": "7.3.9", - "cspell-grammar": "7.3.9", - "cspell-io": "7.3.9", - "cspell-trie-lib": "7.3.9", + "comment-json": "^4.2.5", + "cspell-config-lib": "8.16.0", + "cspell-dictionary": "8.16.0", + "cspell-glob": "8.16.0", + "cspell-grammar": "8.16.0", + "cspell-io": "8.16.0", + "cspell-trie-lib": "8.16.0", + "env-paths": "^3.0.0", "fast-equals": "^5.0.1", - "find-up": "^6.3.0", - "gensequence": "^6.0.0", + "gensequence": "^7.0.0", "import-fresh": "^3.3.0", "resolve-from": "^5.0.0", - "vscode-languageserver-textdocument": "^1.0.11", - "vscode-uri": "^3.0.8" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/cspell-lib/node_modules/cosmiconfig": { - "version": "8.0.0", - "license": "MIT", - "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/cspell-lib/node_modules/find-up": { - "version": "6.3.0", - "license": "MIT", - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cspell-lib/node_modules/locate-path": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cspell-lib/node_modules/p-limit": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" + "vscode-languageserver-textdocument": "^1.0.12", + "vscode-uri": "^3.0.8", + "xdg-basedir": "^5.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/cspell-lib/node_modules/p-locate": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^4.0.0" - }, + "node_modules/cspell-lib/node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -15665,33 +15695,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cspell-lib/node_modules/path-exists": { - "version": "5.0.0", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/cspell-lib/node_modules/yocto-queue": { - "version": "1.1.1", - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cspell-trie-lib": { - "version": "7.3.9", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.16.0.tgz", + "integrity": "sha512-Io1qqI0r4U9ewAWBLClFBBlxLeAoIi15PUGJi4Za1xrlgQJwRE8PMNIJNHKmPEIp78Iute3o/JyC2OfWlxl4Sw==", "dependencies": { - "@cspell/cspell-pipe": "7.3.9", - "@cspell/cspell-types": "7.3.9", - "gensequence": "^6.0.0" + "@cspell/cspell-pipe": "8.16.0", + "@cspell/cspell-types": "8.16.0", + "gensequence": "^7.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/css-declaration-sorter": { @@ -16140,7 +16154,6 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "dev": true, "license": "MIT" }, "node_modules/deepmerge": { @@ -16486,7 +16499,6 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" @@ -16597,19 +16609,6 @@ "tslib": "^2.0.3" } }, - "node_modules/dot-prop": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/dotenv": { "version": "16.4.5", "dev": true, @@ -16726,6 +16725,7 @@ }, "node_modules/encoding": { "version": "0.1.13", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -16734,6 +16734,7 @@ }, "node_modules/encoding/node_modules/iconv-lite": { "version": "0.6.3", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -16917,6 +16918,7 @@ }, "node_modules/error-ex": { "version": "1.3.2", + "dev": true, "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" @@ -17220,7 +17222,6 @@ }, "node_modules/eslint": { "version": "8.57.0", - "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -17777,7 +17778,6 @@ }, "node_modules/eslint-scope": { "version": "7.2.2", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -17792,7 +17792,6 @@ }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", - "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -17803,7 +17802,6 @@ }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -17818,7 +17816,6 @@ }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -17832,7 +17829,6 @@ }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -17847,7 +17843,6 @@ }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -17858,7 +17853,6 @@ }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", - "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -17869,7 +17863,6 @@ }, "node_modules/eslint/node_modules/globals": { "version": "13.24.0", - "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -17883,7 +17876,6 @@ }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -17891,12 +17883,10 @@ }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, "license": "MIT" }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -17907,7 +17897,6 @@ }, "node_modules/eslint/node_modules/strip-ansi": { "version": "6.0.1", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -17918,7 +17907,6 @@ }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -17929,7 +17917,6 @@ }, "node_modules/eslint/node_modules/type-fest": { "version": "0.20.2", - "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -17953,7 +17940,6 @@ }, "node_modules/espree": { "version": "9.6.1", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", @@ -17980,7 +17966,6 @@ }, "node_modules/esquery": { "version": "1.6.0", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -17991,7 +17976,6 @@ }, "node_modules/esrecurse": { "version": "4.3.0", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -18002,7 +17986,6 @@ }, "node_modules/estraverse": { "version": "5.3.0", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -18017,7 +18000,6 @@ }, "node_modules/esutils": { "version": "2.0.3", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" @@ -18231,7 +18213,6 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "dev": true, "license": "MIT" }, "node_modules/fast-diff": { @@ -18241,7 +18222,8 @@ }, "node_modules/fast-equals": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", "engines": { "node": ">=6.0.0" } @@ -18262,12 +18244,10 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "dev": true, "license": "MIT" }, "node_modules/fast-safe-stringify": { @@ -18337,7 +18317,6 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", - "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" @@ -18436,7 +18415,6 @@ }, "node_modules/find-up": { "version": "5.0.0", - "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", @@ -18459,7 +18437,6 @@ }, "node_modules/flat-cache": { "version": "3.2.0", - "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", @@ -18472,7 +18449,6 @@ }, "node_modules/flat-cache/node_modules/rimraf": { "version": "3.0.2", - "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -18486,7 +18462,6 @@ }, "node_modules/flatted": { "version": "3.3.1", - "dev": true, "license": "ISC" }, "node_modules/follow-redirects": { @@ -18811,7 +18786,6 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "devOptional": true, "license": "ISC" }, "node_modules/fsevents": { @@ -18893,10 +18867,11 @@ } }, "node_modules/gensequence": { - "version": "6.0.0", - "license": "MIT", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", + "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/gensync": { @@ -19000,7 +18975,6 @@ }, "node_modules/glob": { "version": "7.2.3", - "devOptional": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -19034,7 +19008,6 @@ }, "node_modules/glob/node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -19043,26 +19016,20 @@ "node": "*" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "license": "MIT", + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", "dependencies": { - "ini": "2.0.0" + "ini": "4.1.1" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, "node_modules/global-modules": { "version": "2.0.0", "dev": true, @@ -19176,6 +19143,7 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", + "dev": true, "license": "ISC" }, "node_modules/grapheme-splitter": { @@ -19185,7 +19153,6 @@ }, "node_modules/graphemer": { "version": "1.4.0", - "dev": true, "license": "MIT" }, "node_modules/graphql": { @@ -19320,7 +19287,8 @@ }, "node_modules/has-own-prop": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", + "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", "engines": { "node": ">=8" } @@ -19834,7 +19802,6 @@ }, "node_modules/ignore": { "version": "5.3.2", - "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -19945,8 +19912,9 @@ } }, "node_modules/import-meta-resolve": { - "version": "3.1.1", - "license": "MIT", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -19973,7 +19941,6 @@ }, "node_modules/inflight": { "version": "1.0.6", - "devOptional": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -19986,7 +19953,6 @@ }, "node_modules/ini": { "version": "4.1.1", - "dev": true, "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -20190,6 +20156,7 @@ }, "node_modules/is-arrayish": { "version": "0.2.1", + "dev": true, "license": "MIT" }, "node_modules/is-bigint": { @@ -20428,13 +20395,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-path-cwd": { "version": "1.0.0", "dev": true, @@ -20467,7 +20427,6 @@ }, "node_modules/is-path-inside": { "version": "3.0.3", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -20580,6 +20539,7 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "node_modules/is-unicode-supported": { @@ -20658,7 +20618,6 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, "license": "ISC" }, "node_modules/isobject": { @@ -22523,7 +22482,6 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "dev": true, "license": "MIT" }, "node_modules/json-parse-better-errors": { @@ -22533,6 +22491,7 @@ }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", + "dev": true, "license": "MIT" }, "node_modules/json-schema": { @@ -22547,7 +22506,6 @@ }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "dev": true, "license": "MIT" }, "node_modules/json-stringify-safe": { @@ -22933,7 +22891,6 @@ }, "node_modules/keyv": { "version": "4.5.4", - "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -23083,7 +23040,6 @@ }, "node_modules/levn": { "version": "0.4.1", - "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -23368,7 +23324,6 @@ }, "node_modules/locate-path": { "version": "6.0.0", - "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" @@ -23400,7 +23355,6 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "dev": true, "license": "MIT" }, "node_modules/lodash.truncate": { @@ -24143,7 +24097,6 @@ }, "node_modules/minimatch": { "version": "3.0.5", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -24632,7 +24585,6 @@ }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, "license": "MIT" }, "node_modules/natural-compare-lite": { @@ -24828,6 +24780,7 @@ "node_modules/node-fetch": { "version": "2.7.0", "license": "MIT", + "optional": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -24845,15 +24798,18 @@ }, "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "optional": true }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "license": "MIT", + "optional": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -25787,7 +25743,6 @@ }, "node_modules/optionator": { "version": "0.9.4", - "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -25924,7 +25879,6 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" @@ -25938,7 +25892,6 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" @@ -26166,7 +26119,8 @@ }, "node_modules/parent-module": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", + "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", "dependencies": { "callsites": "^3.1.0" }, @@ -26190,6 +26144,7 @@ }, "node_modules/parse-json": { "version": "5.2.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", @@ -26206,6 +26161,7 @@ }, "node_modules/parse-json/node_modules/lines-and-columns": { "version": "1.2.4", + "dev": true, "license": "MIT" }, "node_modules/parse-node-version": { @@ -26273,7 +26229,6 @@ }, "node_modules/path-exists": { "version": "4.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -26281,7 +26236,6 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -26294,7 +26248,6 @@ }, "node_modules/path-key": { "version": "3.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -26331,6 +26284,7 @@ }, "node_modules/path-type": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -27206,7 +27160,6 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -29489,7 +29442,6 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -29500,7 +29452,6 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -30462,7 +30413,6 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -30979,8 +30929,9 @@ "license": "MIT" }, "node_modules/synckit": { - "version": "0.8.8", - "license": "MIT", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dependencies": { "@pkgr/core": "^0.1.0", "tslib": "^2.6.2" @@ -31310,7 +31261,6 @@ }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, "license": "MIT" }, "node_modules/through": { @@ -31934,7 +31884,6 @@ }, "node_modules/type-check": { "version": "0.4.0", - "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -32046,13 +31995,6 @@ "dev": true, "license": "MIT" }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.1.6", "dev": true, @@ -32180,19 +32122,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/unique-string": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "crypto-random-string": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unist-util-is": { "version": "3.0.0", "dev": true, @@ -32296,7 +32225,6 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -32304,7 +32232,6 @@ }, "node_modules/uri-js/node_modules/punycode": { "version": "2.3.1", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -32908,11 +32835,13 @@ }, "node_modules/vscode-languageserver-textdocument": { "version": "1.0.12", - "license": "MIT" + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" }, "node_modules/vscode-uri": { "version": "3.0.8", - "license": "MIT" + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==" }, "node_modules/w3c-hr-time": { "version": "1.0.2", @@ -33549,7 +33478,6 @@ }, "node_modules/which": { "version": "2.0.2", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -33613,7 +33541,6 @@ }, "node_modules/word-wrap": { "version": "1.2.5", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -33749,7 +33676,8 @@ }, "node_modules/xdg-basedir": { "version": "5.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", "engines": { "node": ">=12" }, @@ -33907,7 +33835,6 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", - "dev": true, "license": "MIT", "engines": { "node": ">=10" diff --git a/package.json b/package.json index fcf4ad7a981..173d9586182 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@angular/platform-browser-dynamic": "16.2.9", "@angular/router": "16.2.9", "@apollo/client": "3.11.4", - "@cspell/eslint-plugin": "^7.3.6", + "@cspell/eslint-plugin": "^8.16.0", "@mat-datetimepicker/core": "12.0.1", "@ngx-translate/core": "^14.0.0", "@storybook/addon-interactions": "^8.2.9", From 48e9d56453b2908ab7dd1737b128aaf8b53b564c Mon Sep 17 00:00:00 2001 From: Ehsan Rezaei Date: Tue, 26 Nov 2024 21:47:17 +0100 Subject: [PATCH 35/35] AAE-20808 Fixed websocket protocol (#10433) * AAE-20808 Fixed websocket protocol * AAE-20808 Removed comments --- .../src/lib/services/web-socket.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/process-services-cloud/src/lib/services/web-socket.service.ts b/lib/process-services-cloud/src/lib/services/web-socket.service.ts index 42993285529..0b10f549255 100644 --- a/lib/process-services-cloud/src/lib/services/web-socket.service.ts +++ b/lib/process-services-cloud/src/lib/services/web-socket.service.ts @@ -91,7 +91,8 @@ export class WebSocketService { private createWsUrl(serviceUrl: string): string { const url = new URL(serviceUrl, this.host); - url.protocol = url.protocol === 'https' ? 'wss' : 'ws'; + const protocol = url.protocol === 'https:' ? 'wss:' : 'ws:'; + url.protocol = protocol; return url.href; }