[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
19 changed files with 7686 additions and 6045 deletions

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;