[ACS-6849][ACA] Upgrade to Angular 17 (#4275)

This commit is contained in:
dominikiwanekhyland 2025-02-12 14:42:09 +01:00 committed by GitHub
parent b013818649
commit a70378bffc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 7686 additions and 6045 deletions

View File

@ -10,7 +10,7 @@
],
"parserOptions": {
"project": [
"e2e/playwright/authentication/tsconfig.e2e.json"
"e2e/playwright/navigation/tsconfig.e2e.json"
],
"createDefaultProgram": true
},

View File

@ -1,11 +1,126 @@
{
"migrations": [
{
"description": "Update alfresco-api imports",
"version": "6.10.0-10366268804",
"factory": "./7_0_0/index#updateAlfrescoApiImports",
"package": "@alfresco/adf-core",
"name": "move-out-alfresco-api"
"cli": "nx",
"version": "17.1.0-beta.5",
"requires": { "@angular/core": ">=17.0.0" },
"description": "Update the @angular/cli package version to ~17.0.0.",
"factory": "./src/migrations/update-17-1-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-0-0"
},
{
"cli": "nx",
"version": "17.1.0-beta.5",
"requires": { "@angular/core": ">=17.0.0" },
"description": "Rename 'browserTarget' to 'buildTarget'.",
"factory": "./src/migrations/update-17-1-0/browser-target-to-build-target",
"package": "@nx/angular",
"name": "rename-browser-target-to-build-target"
},
{
"cli": "nx",
"version": "17.1.0-beta.5",
"requires": { "@angular/core": ">=17.0.0" },
"description": "Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'.",
"factory": "./src/migrations/update-17-1-0/replace-nguniversal-builders",
"package": "@nx/angular",
"name": "replace-nguniversal-builders"
},
{
"cli": "nx",
"version": "17.1.0-beta.5",
"requires": { "@angular/core": ">=17.0.0" },
"description": "Replace usages of '@nguniversal/' packages with '@angular/ssr'.",
"factory": "./src/migrations/update-17-1-0/replace-nguniversal-engines",
"package": "@nx/angular",
"name": "replace-nguniversal-engines"
},
{
"cli": "nx",
"version": "17.1.0-beta.5",
"requires": { "@angular/core": ">=17.0.0" },
"description": "Replace the deep imports from 'zone.js/dist/zone' and 'zone.js/dist/zone-testing' with 'zone.js' and 'zone.js/testing'.",
"factory": "./src/migrations/update-17-1-0/update-zone-js-deep-import",
"package": "@nx/angular",
"name": "update-zone-js-deep-import"
},
{
"cli": "nx",
"version": "17.2.0-beta.2",
"description": "Rename '@nx/angular:webpack-dev-server' executor to '@nx/angular:dev-server'",
"factory": "./src/migrations/update-17-2-0/rename-webpack-dev-server",
"package": "@nx/angular",
"name": "rename-webpack-dev-server-executor"
},
{
"cli": "nx",
"version": "17.3.0-beta.10",
"requires": { "@angular/core": ">=17.1.0" },
"description": "Update the @angular/cli package version to ~17.1.0.",
"factory": "./src/migrations/update-17-3-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-1-0"
},
{
"cli": "nx",
"version": "17.3.0-beta.10",
"requires": { "@angular/core": ">=17.1.0" },
"description": "Add 'browser-sync' as dev dependency when '@angular-devkit/build-angular:ssr-dev-server' or '@nx/angular:module-federation-dev-ssr' is used.",
"factory": "./src/migrations/update-17-3-0/add-browser-sync-dependency",
"package": "@nx/angular",
"name": "add-browser-sync-dependency"
},
{
"cli": "nx",
"version": "17.3.0-beta.10",
"requires": { "@angular/core": ">=17.1.0" },
"description": "Add 'autoprefixer' as dev dependency when '@nx/angular:ng-packagr-lite' or '@nx/angular:package` is used.",
"factory": "./src/migrations/update-17-3-0/add-autoprefixer-dependency",
"package": "@nx/angular",
"name": "add-autoprefixer-dependency"
},
{
"version": "17.0.0",
"description": "Angular v17 introduces a new control flow syntax that uses the @ and } characters. This migration replaces the existing usages with their corresponding HTML entities.",
"factory": "./migrations/block-template-entities/bundle",
"package": "@angular/core",
"name": "block-template-entities"
},
{
"version": "17.0.0",
"description": "CompilerOption.useJit and CompilerOption.missingTranslation are unused under Ivy. This migration removes their usage",
"factory": "./migrations/compiler-options/bundle",
"package": "@angular/core",
"name": "migration-v17-compiler-options"
},
{
"version": "17.0.0",
"description": "Updates `TransferState`, `makeStateKey`, `StateKey` imports from `@angular/platform-browser` to `@angular/core`.",
"factory": "./migrations/transfer-state/bundle",
"package": "@angular/core",
"name": "migration-transfer-state"
},
{
"version": "17.0.0-0",
"description": "Updates Angular Material to v17",
"factory": "./ng-update/index_bundled#updateToV17",
"package": "@angular/material",
"name": "migration-v17"
},
{
"version": "17.0.0-0",
"description": "Updates the Angular CDK to v17",
"factory": "./ng-update/index#updateToV17",
"package": "@angular/cdk",
"name": "migration-v17"
},
{
"description": "The road to v17-beta.1",
"version": "17.0.0-beta",
"factory": "./17_0_0-beta/index",
"package": "@ngrx/store-devtools",
"name": "ngrx-store-devtools-migration-17-0-0-beta"
}
]
}

13460
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -30,64 +30,64 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "7.0.0-alpha.8-13199421341",
"@alfresco/adf-core": "7.0.0-alpha.8-13199421341",
"@alfresco/adf-extensions": "7.0.0-alpha.8-13199421341",
"@alfresco/adf-content-services": "7.0.0-alpha.9-13285761796",
"@alfresco/adf-core": "7.0.0-alpha.9-13285761796",
"@alfresco/adf-extensions": "7.0.0-alpha.9-13285761796",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.8-13199421341",
"@alfresco/js-api": "8.0.0-alpha.8-13199421341",
"@angular/animations": "16.2.9",
"@angular/cdk": "16.2.9",
"@angular/common": "16.2.9",
"@angular/compiler": "16.2.9",
"@angular/core": "16.2.9",
"@angular/forms": "16.2.9",
"@angular/material": "16.2.9",
"@angular/material-date-fns-adapter": "16.2.9",
"@angular/platform-browser": "16.2.9",
"@angular/platform-browser-dynamic": "16.2.9",
"@angular/router": "16.2.9",
"@alfresco/js-api": "8.0.0-alpha.9-13285761796",
"@angular/animations": "17.1.3",
"@angular/cdk": "17.1.2",
"@angular/common": "17.1.3",
"@angular/compiler": "17.1.3",
"@angular/core": "17.1.3",
"@angular/forms": "17.1.3",
"@angular/material": "17.1.2",
"@angular/material-date-fns-adapter": "17.1.2",
"@angular/platform-browser": "17.1.3",
"@angular/platform-browser-dynamic": "17.1.3",
"@angular/router": "17.1.3",
"@fontsource/open-sans": "^5.1.0",
"@mat-datetimepicker/core": "12.0.1",
"@ngrx/effects": "16.3.0",
"@ngrx/router-store": "16.3.0",
"@ngrx/store": "16.3.0",
"@ngrx/store-devtools": "16.3.0",
"@mat-datetimepicker/core": "13.0.2",
"@ngrx/effects": "17.0.1",
"@ngrx/router-store": "17.0.1",
"@ngrx/store": "17.0.1",
"@ngrx/store-devtools": "17.0.1",
"@ngx-translate/core": "^14.0.0",
"date-fns": "^2.30.0",
"material-icons": "^1.13.12",
"minimatch-browser": "^1.0.0",
"pdfjs-dist": "3.3.122",
"rxjs": "7.8.1",
"tslib": "^2.7.0",
"zone.js": "0.13.3"
"tslib": "2.8.1",
"zone.js": "0.14.8"
},
"devDependencies": {
"@alfresco/adf-cli": "7.0.0-alpha.8-13199421341",
"@angular-devkit/build-angular": "16.2.16",
"@angular-devkit/core": "16.2.9",
"@angular-devkit/schematics": "16.2.9",
"@alfresco/adf-cli": "7.0.0-alpha.9-13285761796",
"@angular-devkit/build-angular": "17.1.4",
"@angular-devkit/core": "17.1.4",
"@angular-devkit/schematics": "17.1.4",
"@angular-eslint/builder": "17.0.0",
"@angular-eslint/eslint-plugin": "^16.1.2",
"@angular-eslint/eslint-plugin-template": "^16.0.2",
"@angular-eslint/eslint-plugin": "17.0.1",
"@angular-eslint/eslint-plugin-template": "17.0.1",
"@angular-eslint/schematics": "^16.3.0",
"@angular-eslint/template-parser": "^16.3.1",
"@angular-eslint/template-parser": "17.0.1",
"@angular/cli": "16.2.9",
"@angular/compiler-cli": "16.2.9",
"@angular/language-service": "16.2.9",
"@angular/compiler-cli": "17.1.3",
"@angular/language-service": "17.1.3",
"@cspell/eslint-plugin": "^8.14.1",
"@nx/angular": "17.0.2",
"@nx/eslint-plugin": "17.0.2",
"@nx/workspace": "17.0.2",
"@nx/angular": "17.3.2",
"@nx/eslint-plugin": "17.3.2",
"@nx/workspace": "17.3.2",
"@playwright/test": "^1.47.2",
"@reportportal/agent-js-playwright": "^5.1.9",
"@schematics/angular": "15.2.10",
"@schematics/angular": "17.1.4",
"@types/event-emitter": "^0.3.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^15.14.9",
"@types/node": "18.19.9",
"@types/superagent": "^4.1.10",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.48.2",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"dotenv": "16.4.5",
"dotenv-expand": "^5.1.0",
"eslint": "^8.42.0",
@ -110,13 +110,13 @@
"karma-jasmine-html-reporter": "^2.0.0",
"karma-mocha-reporter": "^2.2.5",
"lint-staged": "^15.2.7",
"ng-packagr": "^16.2.1",
"ng-packagr": "17.1.2",
"node-stream-zip": "^1.14.0",
"nx": "17.3.1",
"nx": "17.3.2",
"prettier": "2.8.8",
"stylelint": "^15.11.0",
"stylelint-config-standard-scss": "^7.0.1",
"ts-node": "^10.9.2",
"typescript": "5.0.4"
"typescript": "5.3.3"
}
}

View File

@ -114,6 +114,7 @@
.aca-rule-details__form__row #{$mat-form-field-flex} #{$mat-form-field-infix} {
padding-bottom: 0.375em;
padding-top: 24px;
}
.aca-rule-details__form__row aca-rule-action #{$mat-form-field-flex} #{$mat-form-field-infix} {

View File

@ -76,9 +76,8 @@ describe('RuleSetPickerSmartComponent', () => {
folderRuleSetsService = TestBed.inject(FolderRuleSetsService);
fixture = TestBed.createComponent(RuleSetPickerSmartComponent);
component = fixture.componentInstance;
component['folderRuleSetsService'] = folderRuleSetsService;
loadRuleSetsSpy = spyOn(folderRuleSetsService, 'loadRuleSets').and.callThrough();
loadRuleSetsSpy = spyOn(component.folderRuleSetsService, 'loadRuleSets').and.callThrough();
callApiSpy = spyOn<any>(folderRuleSetsService, 'callApi');
callApiSpy
.withArgs(`/nodes/${dialogOptions.nodeId}/rule-sets?include=isLinkedTo,owningFolder,linkedToBy&skipCount=0&maxItems=100`, 'GET')

View File

@ -22,7 +22,7 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, DestroyRef, inject, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { FolderRuleSetsService } from '../services/folder-rule-sets.service';
import { Node } from '@alfresco/js-api';
@ -75,19 +75,18 @@ export class RuleSetPickerSmartComponent implements OnInit {
private selectedNodeId = '';
private folderLoading$ = new BehaviorSubject<boolean>(true);
public readonly data: RuleSetPickerOptions = inject(MAT_DIALOG_DATA);
public readonly folderRuleSetsService = inject(FolderRuleSetsService);
private readonly dialogRef = inject(MatDialogRef<RuleSetPickerSmartComponent>);
private readonly notificationService = inject(NotificationService);
private readonly destroyRef = inject(DestroyRef);
mainRuleSet$ = this.folderRuleSetsService.mainRuleSet$;
rulesLoading$ = combineLatest(this.folderRuleSetsService.isLoading$, this.folderLoading$).pipe(
map(([rulesLoading, folderLoading]) => rulesLoading || folderLoading)
);
private readonly destroyRef = inject(DestroyRef);
constructor(
@Inject(MAT_DIALOG_DATA) public data: RuleSetPickerOptions,
private folderRuleSetsService: FolderRuleSetsService,
private dialogRef: MatDialogRef<RuleSetPickerSmartComponent>,
private notificationService: NotificationService
) {
constructor() {
this.nodeId = this.data?.nodeId ?? '-root-';
this.defaultNodeId = this.data?.defaultNodeId ?? '-root-';
this.existingRuleSet = this.data?.existingRuleSet ?? null;

View File

@ -0,0 +1,3 @@
.adf-document-list-loading-margin {
margin: auto;
}

View File

@ -86,6 +86,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
],
templateUrl: './files.component.html',
encapsulation: ViewEncapsulation.None,
styleUrl: './files.component.scss',
selector: 'aca-files'
})
export class FilesComponent extends PageComponent implements OnInit, OnDestroy {

View File

@ -9,6 +9,7 @@ app-library-metadata-form {
.mat-mdc-form-field-infix {
padding-bottom: 3px;
min-height: unset;
}
}

View File

@ -40,7 +40,7 @@
}
}
&__section {
.aca-sidenav__section {
overflow-y: auto;
.aca-expansion-panel {
@ -126,9 +126,10 @@
width: 100%;
}
&__actions {
.aca-sidenav__section__actions {
&__item:has(span) {
padding: 0;
height: 100%;
span {
pointer-events: auto;

View File

@ -44,7 +44,7 @@
}
.mat-mdc-form-field-focus-overlay {
background-color: transparent;
--mat-form-field-state-layer-color: transparent;
}
.mdc-menu-surface.mat-mdc-autocomplete-panel:is(div),

View File

@ -8,6 +8,9 @@
:root {
--mdc-filled-text-field-container-color: transparent;
--mdc-text-button-label-text-color: inherit;
--mat-toolbar-container-text-color: inherit;
--mat-form-field-container-height: unset;
}
mat-toolbar {
@ -285,10 +288,6 @@ mat-snack-bar-container {
display: none;
}
#{$mat-form-field-infix} {
min-height: unset;
}
#{$mat-tab-labels} {
border-bottom: 1px solid var(--adf-theme-foreground-text-color-014);
}
@ -349,3 +348,7 @@ adf-dynamic-component {
background-color: var(--theme-blue-button-color);
}
}
#{$mat-form-field-infix} {
min-height: unset;
}

View File

@ -22,13 +22,13 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, HostBinding } from '@angular/core';
import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';
// @deprecated Use `.aca-page-layout-content` CSS selector instead
@Component({
standalone: true,
selector: 'aca-page-layout-content',
template: `<ng-content></ng-content>`,
template: `<ng-content />`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'aca-page-layout-content' }

View File

@ -22,13 +22,13 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
// @deprecated Use `.aca-page-layout-error` selectors instead
@Component({
standalone: true,
selector: 'aca-page-layout-error',
template: `<ng-content></ng-content>`,
template: `<ng-content />`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'aca-page-layout-error' }

View File

@ -22,13 +22,13 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
// @deprecated Use `.aca-page-layout-header` CSS selector instead
@Component({
standalone: true,
selector: 'aca-page-layout-header',
template: '<ng-content></ng-content>',
template: '<ng-content />',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'aca-page-layout-header' }

View File

@ -6,13 +6,13 @@
title="{{'APP.TOOLTIPS.EXPAND_NAVIGATION' | translate}}">
<mat-icon>keyboard_double_arrow_right</mat-icon>
</button>
<ng-content select=".aca-page-layout-header, aca-page-layout-header"></ng-content>
<ng-content select=".aca-page-layout-header, aca-page-layout-header" />
</div>
<ng-container *ngIf="hasError">
<ng-content select=".aca-page-layout-error, aca-page-layout-error"></ng-content>
<ng-content select=".aca-page-layout-error, aca-page-layout-error" />
</ng-container>
<ng-container *ngIf="!hasError">
<ng-content select=".aca-page-layout-content, aca-page-layout-content"></ng-content>
<ng-content select=".aca-page-layout-content, aca-page-layout-content" />
</ng-container>

View File

@ -0,0 +1,7 @@
@import '@alfresco/adf-core/lib/styles/mat-selectors';
aca-toolbar-action {
#{$mat-mdc-button}#{$mat-button-base}#{$mat-outlined-button}#{$mat-unthemed} {
--mdc-outlined-button-label-text-color: var(--theme-secondary-text);
}
}

View File

@ -34,6 +34,7 @@ import { ToolbarMenuComponent } from '../toolbar-menu/toolbar-menu.component';
imports: [CommonModule, ToolbarButtonComponent, ToolbarMenuComponent, DynamicExtensionComponent],
selector: 'aca-toolbar-action',
templateUrl: './toolbar-action.component.html',
styleUrl: './toolbar-action.component.scss',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'aca-toolbar-action' }