refactor: remove AspectListModule and clean up imports in ContentModule and AspectListDialogComponent

- Deleted AspectListModule and its associated exports.
- Removed unused CommonModule import from AspectListDialogComponent.
- Updated ContentModule to exclude ASPECT_LIST_DIRECTIVES from imports.
This commit is contained in:
Denys Vuika
2026-02-27 13:05:50 +00:00
parent 2db19ebc3c
commit 922684d9bf
5 changed files with 17 additions and 48 deletions
@@ -22,11 +22,10 @@ import { TranslatePipe } from '@ngx-translate/core';
import { MatButtonModule } from '@angular/material/button';
import { AspectListComponent } from './aspect-list.component';
import { AutoFocusDirective } from '../directives/auto-focus.directive';
import { CommonModule } from '@angular/common';
@Component({
selector: 'adf-aspect-list-dialog',
imports: [CommonModule, MatDialogModule, TranslatePipe, MatButtonModule, AspectListComponent, AutoFocusDirective],
imports: [MatDialogModule, TranslatePipe, MatButtonModule, AspectListComponent, AutoFocusDirective],
templateUrl: './aspect-list-dialog.component.html',
styleUrls: ['./aspect-list-dialog.component.scss'],
encapsulation: ViewEncapsulation.None
@@ -1,8 +1,10 @@
<div id="aspect-list-container" class="adf-aspect-list-container" *ngIf="aspects$ | async as aspects; else loading">
@let aspects = aspects$ | async;
@if (aspects) {
<div id="aspect-list-container" class="adf-aspect-list-container">
<mat-accordion class="adf-accordion-aspect-list">
<div class="adf-accordion-aspect-list-item"
*ngFor="let aspect of aspects; let colIndex = index"
[ngClass]="{'adf-hover' : !isPanelOpen[colIndex]}">
@for (aspect of aspects; track aspect.entry.id; let colIndex = $index) {
<div class="adf-accordion-aspect-list-item" [ngClass]="{'adf-hover' : !isPanelOpen[colIndex]}">
<mat-checkbox class="adf-aspect-list-check-button" [id]="'aspect-list-'+colIndex+'-check'"
[checked]="nodeAspects?.includes(aspect?.entry?.id)"
(click)="onCheckBoxClick($event)"
@@ -28,7 +30,8 @@
</mat-expansion-panel-header>
<p class="adf-property-paragraph" [id]="'aspect-list-'+colIndex+'-description'"> {{aspect?.entry?.description}}</p>
<table mat-table [dataSource]="aspect?.entry?.properties" *ngIf="aspect?.entry?.properties?.length > 0" class="adf-aspect-property-table" [id]="'aspect-list-'+colIndex+'-properties-table'">
@if (aspect?.entry?.properties?.length > 0) {
<table mat-table [dataSource]="aspect?.entry?.properties" class="adf-aspect-property-table" [id]="'aspect-list-'+colIndex+'-properties-table'">
<ng-container matColumnDef="name">
<th class="adf-aspect-property-table-column-name" mat-header-cell *matHeaderCellDef> {{'ADF-ASPECT-LIST.PROPERTY_NAME' | translate}} </th>
<td class="adf-aspect-property-table-column-name adf-aspect-property-table-cell" mat-cell *matCellDef="let property"> {{property.id}} </td>
@@ -43,14 +46,15 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="propertyColumns"></tr>
<tr mat-row *matRowDef="let row; columns: propertyColumns;"></tr>
</table>
</table>
}
</mat-expansion-panel>
</div>
}
</mat-accordion>
</div>
<ng-template #loading>
} @else {
<div class="adf-aspect-list-spinner">
<mat-progress-spinner mode="indeterminate" id="adf-aspect-spinner" />
<mat-progress-spinner mode="indeterminate" id="adf-aspect-spinner" />
</div>
</ng-template>
}
@@ -1,29 +0,0 @@
/*!
* @license
* Copyright © 2005-2025 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 { NgModule } from '@angular/core';
import { AspectListComponent } from './aspect-list.component';
import { AspectListDialogComponent } from './aspect-list-dialog.component';
export const ASPECT_LIST_DIRECTIVES = [AspectListComponent, AspectListDialogComponent] as const;
/** @deprecated use `...ASPECT_LIST_DIRECTIVES` or import the individual components */
@NgModule({
imports: [...ASPECT_LIST_DIRECTIVES],
exports: [...ASPECT_LIST_DIRECTIVES]
})
export class AspectListModule {}
@@ -23,5 +23,3 @@ export * from './services/dialog-aspect-list.service';
export * from './aspect-list-dialog-data.interface';
export * from './interfaces/custom-aspect-paging.interface';
export * from './aspect-list.module';
@@ -28,7 +28,6 @@ import { CONTENT_DIRECTIVES } from './directives/content-directive.module';
import { CONTENT_DIALOG_DIRECTIVES } from './dialogs/dialog.module';
import { CONTENT_METADATA_DIRECTIVES } from './content-metadata/content-metadata.module';
import { CONTENT_PERMISSION_MANAGER_DIRECTIVES } from './permission-manager/permission-manager.module';
import { ASPECT_LIST_DIRECTIVES } from './aspect-list/aspect-list.module';
import { versionCompatibilityFactory } from './version-compatibility/version-compatibility-factory';
import { VersionCompatibilityService } from './version-compatibility/version-compatibility.service';
import { contentAuthLoaderFactory } from './auth-loader/content-auth-loader-factory';
@@ -54,8 +53,7 @@ import { AlfrescoApiLoaderService, createAlfrescoApiInstance } from './api-facto
...CONTENT_METADATA_DIRECTIVES,
...CONTENT_DIRECTIVES,
...CONTENT_PERMISSION_MANAGER_DIRECTIVES,
...CONTENT_VERSION_DIRECTIVES,
...ASPECT_LIST_DIRECTIVES
...CONTENT_VERSION_DIRECTIVES
],
providers: [provideTranslations('adf-content-services', 'assets/adf-content-services')],
exports: [
@@ -70,8 +68,7 @@ import { AlfrescoApiLoaderService, createAlfrescoApiInstance } from './api-facto
...CONTENT_DIALOG_DIRECTIVES,
...CONTENT_DIRECTIVES,
...CONTENT_PERMISSION_MANAGER_DIRECTIVES,
...CONTENT_VERSION_DIRECTIVES,
...ASPECT_LIST_DIRECTIVES
...CONTENT_VERSION_DIRECTIVES
]
})
export class ContentModule {