Ng19 migration (#4520)

This commit is contained in:
dominikiwanekhyland
2025-07-03 13:33:05 +02:00
committed by GitHub
parent bcbdff9543
commit 5f5c238ccd
127 changed files with 8582 additions and 6369 deletions

View File

@@ -112,7 +112,6 @@
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-host-metadata-property": "off",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",

View File

@@ -8,7 +8,9 @@
"project": ["app/tsconfig.app.json", "app/tsconfig.spec.json"],
"createDefaultProgram": true
},
"rules": {}
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
}
]
}

View File

@@ -201,7 +201,7 @@
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "content-ce:build",
"buildTarget": "content-ce:build",
"port": 4200,
"disableHostCheck": true,
"open": true,
@@ -209,16 +209,16 @@
},
"configurations": {
"production": {
"browserTarget": "content-ce:build:production"
"buildTarget": "content-ce:build:production"
},
"e2e": {
"browserTarget": "content-ce:build:e2e"
"buildTarget": "content-ce:build:e2e"
},
"release": {
"browserTarget": "content-ce:build:release"
"buildTarget": "content-ce:build:release"
},
"adf": {
"browserTarget": "content-ce:build:adf"
"buildTarget": "content-ce:build:adf"
}
}
},

View File

@@ -29,7 +29,8 @@ import { AppService } from '@alfresco/aca-shared';
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None,
standalone: false
})
export class AppComponent {
constructor(private appService: AppService) {

View File

@@ -28,7 +28,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { AppSettingsService } from '@alfresco/aca-shared';
@Component({
standalone: true,
imports: [LoginComponent, TranslateModule],
templateUrl: './app-login.component.html',
styles: [

View File

@@ -2,5 +2,7 @@
"XAT-5523": "https://hyland.atlassian.net/browse/ACA-4697",
"XAT-17239": "https://hyland.atlassian.net/browse/ACS-9795",
"XAT-5516": "https://hyland.atlassian.net/browse/ACS-9795",
"XAT-5520": "https://hyland.atlassian.net/browse/ACS-9795"
"XAT-5520": "https://hyland.atlassian.net/browse/ACS-9795",
"XAT-5544": "https://hyland.atlassian.net/browse/ACS-9767",
"XAT-5539": "https://hyland.atlassian.net/browse/ACS-9767"
}

View File

@@ -126,7 +126,7 @@ test.describe('Search - Filters - Date', () => {
const currentAndPreviousDay = Utils.getCurrentAndPreviousDay();
const searchPhrase = `Project Contract`;
const fileNamePng = `${randomId}-${searchPhrase}.png`;
const dateForSearch = '01-Jan-21';
const dateForSearch = '01-Jan-11';
test.beforeAll(async () => {
try {

View File

@@ -1 +1,3 @@
{}
{
"XAT-17776": "https://hyland.atlassian.net/browse/ACS-9767"
}

View File

@@ -1,8 +1,5 @@
{
"defaultBase": "develop",
"affected": {
"defaultBase": "develop"
},
"namedInputs": {
"sharedGlobals": [],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
@@ -39,5 +36,7 @@
"inputs": ["default", "^production"]
}
},
"cacheDirectory": "nxcache"
"cacheDirectory": "nxcache",
"useInferencePlugins": false,
"useLegacyCache": true
}

14181
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,73 +30,73 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "8.1.0-16024893197",
"@alfresco/adf-core": "8.1.0-16024893197",
"@alfresco/adf-extensions": "8.1.0-16024893197",
"@alfresco/eslint-plugin-eslint-angular": "8.1.0-16024893197",
"@alfresco/js-api": "9.1.0-16024893197",
"@angular/animations": "18.2.9",
"@angular/cdk": "18.2.9",
"@angular/common": "18.2.9",
"@angular/compiler": "18.2.9",
"@angular/core": "18.2.9",
"@angular/forms": "18.2.9",
"@angular/material": "18.2.9",
"@angular/material-date-fns-adapter": "18.2.9",
"@angular/platform-browser": "18.2.9",
"@angular/platform-browser-dynamic": "18.2.9",
"@angular/router": "18.2.9",
"@alfresco/adf-content-services": "8.1.0-16047635687",
"@alfresco/adf-core": "8.1.0-16047635687",
"@alfresco/adf-extensions": "8.1.0-16047635687",
"@alfresco/eslint-plugin-eslint-angular": "8.1.0-16047635687",
"@alfresco/js-api": "9.1.0-16047635687",
"@angular/animations": "19.2.6",
"@angular/cdk": "19.2.9",
"@angular/common": "19.2.6",
"@angular/compiler": "19.2.6",
"@angular/core": "19.2.6",
"@angular/forms": "19.2.6",
"@angular/material": "19.2.9",
"@angular/material-date-fns-adapter": "19.2.9",
"@angular/platform-browser": "19.2.6",
"@angular/platform-browser-dynamic": "19.2.6",
"@angular/router": "19.2.6",
"@fontsource/open-sans": "^5.1.0",
"@mat-datetimepicker/core": "14.0.0",
"@ngrx/effects": "18.1.1",
"@ngrx/operators": "18.1.1",
"@ngrx/router-store": "18.1.1",
"@ngrx/store": "18.1.1",
"@ngrx/store-devtools": "18.1.1",
"@mat-datetimepicker/core": "15.0.2",
"@ngrx/effects": "19.2.1",
"@ngrx/operators": "19.2.1",
"@ngrx/router-store": "19.2.1",
"@ngrx/store": "19.2.1",
"@ngrx/store-devtools": "19.2.1",
"@ngx-translate/core": "^16.0.4",
"date-fns": "^2.30.0",
"katex": "^0.16.21",
"material-icons": "^1.13.12",
"mermaid": "^11.5.0",
"minimatch-browser": "^1.0.0",
"ngx-markdown": "18.1.0",
"pdfjs-dist": "5.1.91",
"ngx-markdown": "19.1.1",
"pdfjs-dist": "^5.1.91",
"prismjs": "^1.30.0",
"rxjs": "7.8.2",
"tslib": "2.8.1",
"zone.js": "0.14.10"
"zone.js": "0.15.0"
},
"devDependencies": {
"@alfresco/adf-cli": "8.1.0-16024893197",
"@angular-devkit/build-angular": "18.2.19",
"@angular-devkit/core": "18.2.9",
"@angular-devkit/schematics": "18.2.9",
"@angular-eslint/builder": "18.4.3",
"@angular-eslint/eslint-plugin": "18.4.3",
"@angular-eslint/eslint-plugin-template": "18.4.3",
"@angular-eslint/schematics": "18.4.3",
"@angular-eslint/template-parser": "18.4.3",
"@angular/cli": "18.2.15",
"@angular/compiler-cli": "18.2.9",
"@angular/language-service": "18.2.9",
"@alfresco/adf-cli": "8.1.0-16047635687",
"@angular-devkit/build-angular": "19.2.7",
"@angular-devkit/core": "19.2.7",
"@angular-devkit/schematics": "19.2.7",
"@angular-eslint/builder": "19.3.0",
"@angular-eslint/eslint-plugin": "19.3.0",
"@angular-eslint/eslint-plugin-template": "19.3.0",
"@angular-eslint/schematics": "19.3.0",
"@angular-eslint/template-parser": "19.3.0",
"@angular/cli": "~19.2.0",
"@angular/compiler-cli": "19.2.6",
"@angular/language-service": "19.2.6",
"@cspell/eslint-plugin": "^9.0.2",
"@nx/angular": "19.8.9",
"@nx/eslint-plugin": "19.8.9",
"@nx/angular": "20.8.0",
"@nx/eslint-plugin": "20.8.0",
"@nx/workspace": "21.2.1",
"@playwright/test": "^1.53.2",
"@reportportal/agent-js-playwright": "^5.1.9",
"@schematics/angular": "18.2.9",
"@schematics/angular": "19.2.7",
"@types/event-emitter": "^0.3.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "18.19.9",
"@types/superagent": "^4.1.10",
"@typescript-eslint/eslint-plugin": "7.0.0",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@typescript-eslint/utils": "^8.33.1",
"dotenv": "16.4.5",
"dotenv-expand": "^5.1.0",
"eslint": "^8.42.0",
"eslint": "^8.57.0",
"eslint-plugin-ban": "^2.0.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsdoc": "50.3.0",
@@ -116,13 +116,13 @@
"karma-jasmine-html-reporter": "^2.0.0",
"karma-mocha-reporter": "^2.2.5",
"lint-staged": "^16.0.0",
"ng-packagr": "18.2.1",
"ng-packagr": "19.2.2",
"node-stream-zip": "^1.14.0",
"nx": "21.2.1",
"prettier": "3.5.3",
"stylelint": "^15.11.0",
"stylelint-config-standard-scss": "^7.0.1",
"ts-node": "^10.9.2",
"typescript": "5.5.4"
"typescript": "5.8.2"
}
}

View File

@@ -35,7 +35,6 @@ import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, AboutModule, RouterModule, MatIconModule, MatButtonModule, PageLayoutComponent],
selector: 'app-about-page',
templateUrl: './about.component.html',

View File

@@ -51,7 +51,6 @@ import { RuleDetailsUiComponent } from '../rule-details/rule-details.ui-componen
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -36,7 +36,6 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatIconModule } from '@angular/material/icon';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, RuleActionUiComponent, ReactiveFormsModule, MatButtonModule, MatMenuModule, MatIconModule],
selector: 'aca-rule-action-list',
templateUrl: './rule-action-list.ui-component.html',

View File

@@ -57,7 +57,6 @@ import { MatSelectModule } from '@angular/material/select';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, ReactiveFormsModule, MatFormFieldModule, MatSelectModule, CardViewModule],
selector: 'aca-rule-action',
templateUrl: './rule-action.ui-component.html',

View File

@@ -36,7 +36,6 @@ import { MatIconModule } from '@angular/material/icon';
import { RuleSimpleConditionUiComponent } from './rule-simple-condition.ui-component';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -27,7 +27,7 @@ import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, NG_VALUE
import { RuleSimpleCondition } from '../../model/rule-simple-condition.model';
import { comparatorHiddenForConditionFieldType, RuleConditionField, ruleConditionFields } from './rule-condition-fields';
import { RuleConditionComparator, ruleConditionComparators } from './rule-condition-comparators';
import { AsyncPipe, CommonModule } from '@angular/common';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
@@ -50,7 +50,6 @@ interface AutoCompleteOption {
const AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME = 500;
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
@@ -59,7 +58,6 @@ const AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME = 500;
MatSelectModule,
MatInputModule,
MatAutocompleteModule,
AsyncPipe,
MatOptionModule,
MatProgressSpinnerModule
],

View File

@@ -42,7 +42,6 @@ export interface EditRuleDialogOptions {
}
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, MatIconModule, RuleDetailsUiComponent],
selector: 'aca-edit-rule-dialog',
templateUrl: './edit-rule-dialog.ui-component.html',

View File

@@ -33,7 +33,6 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, ReactiveFormsModule, MatCheckboxModule, MatFormFieldModule, MatSelectModule],
selector: 'aca-rule-options',
templateUrl: 'rule-options.ui-component.html',

View File

@@ -43,7 +43,6 @@ import { CategoryService } from '@alfresco/adf-content-services';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -30,7 +30,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { MatCheckboxModule } from '@angular/material/checkbox';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatCheckboxModule],
selector: 'aca-rule-triggers',
templateUrl: './rule-triggers.ui-component.html',

View File

@@ -33,7 +33,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, RuleListItemUiComponent, MatRippleModule, MatProgressSpinnerModule],
selector: 'aca-rule-list-grouping',
templateUrl: 'rule-list-grouping.ui-component.html',

View File

@@ -29,7 +29,6 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { TranslateModule } from '@ngx-translate/core';
@Component({
standalone: true,
imports: [CommonModule, MatSlideToggleModule, TranslateModule],
selector: 'aca-rule-list-item',
templateUrl: 'rule-list-item.ui-component.html',

View File

@@ -39,7 +39,6 @@ import { Observable } from 'rxjs';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -46,7 +46,6 @@ export interface RuleSetPickerOptions {
}
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -37,7 +37,6 @@ import { AppExtensionService } from '@alfresco/aca-shared';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
selector: 'aca-bulk-actions-dropdown',
templateUrl: './bulk-actions-dropdown.component.html',
styleUrls: ['./bulk-actions-dropdown.component.scss'],

View File

@@ -29,7 +29,6 @@ import { MatMenuModule } from '@angular/material/menu';
import { TranslateModule } from '@ngx-translate/core';
@Component({
standalone: true,
imports: [TranslateModule, MatIconModule, MatMenuModule, LanguageMenuModule],
selector: 'aca-language-picker',
template: `

View File

@@ -33,7 +33,6 @@ import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule],
selector: 'aca-location-link',
template: `

View File

@@ -55,6 +55,6 @@ describe('LogoutComponent', () => {
it('should reset selected nodes from store', () => {
component.onLogoutEvent();
expect(store.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new SetSelectedNodesAction([]) }));
});
});

View File

@@ -31,7 +31,6 @@ import { MatMenuItem, MatMenuModule } from '@angular/material/menu';
import { LogoutDirective } from '@alfresco/adf-core';
@Component({
standalone: true,
imports: [TranslateModule, MatIconModule, MatMenuModule, LogoutDirective],
selector: 'aca-logout',
template: `

View File

@@ -35,7 +35,6 @@ import { MatButtonModule } from '@angular/material/button';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, MatMenuModule, MatIconModule, TranslateModule, MatButtonModule],
selector: 'app-toggle-shared',
templateUrl: './toggle-shared.component.html',

View File

@@ -22,7 +22,7 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, inject, ViewChild } from '@angular/core';
import { Component, inject, ViewChild, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { MatMenuItem, MatMenuModule } from '@angular/material/menu';
@@ -30,7 +30,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { UserProfileService } from '@alfresco/aca-shared';
@Component({
standalone: true,
imports: [CommonModule, RouterModule, MatMenuModule, TranslateModule],
selector: 'app-user-info',
templateUrl: './user-info.component.html',

View File

@@ -35,7 +35,6 @@ import { By } from '@angular/platform-browser';
@Component({
selector: 'app-test-component',
template: '<div acaContextMenuOutsideEvent (clickOutside)="onClickOutsideEvent()"></div>',
standalone: true,
imports: [OutsideEventDirective]
})
class TestComponent extends BaseContextMenuDirective {}

View File

@@ -32,7 +32,6 @@ import { MatDividerModule } from '@angular/material/divider';
import { IconComponent } from '@alfresco/adf-core';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatMenuModule, MatDividerModule, IconComponent, DynamicExtensionComponent],
selector: 'app-context-menu-item',
templateUrl: './context-menu-item.component.html',

View File

@@ -39,7 +39,6 @@ import { BaseContextMenuDirective } from './base-context-menu.directive';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -55,8 +55,7 @@ import { BaseContextMenuDirective } from './base-context-menu.directive';
host: {
class: 'aca-context-menu-holder'
},
encapsulation: ViewEncapsulation.None,
standalone: true
encapsulation: ViewEncapsulation.None
})
export class CustomContextMenuComponent extends BaseContextMenuDirective implements AfterViewInit {
constructor(

View File

@@ -175,7 +175,7 @@ describe('DetailsComponent', () => {
getBreadcrumb().navigate.emit(pathElement);
fixture.detectChanges();
expect(store.dispatch).toHaveBeenCalledWith(new NavigateToFolder({ entry: pathElement } as NodeEntry));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new NavigateToFolder({ entry: pathElement } as NodeEntry) }));
});
it('should pass different node as folderNode to breadcrumb when nodeUpdated from nodesApiService is triggered', () => {
@@ -194,7 +194,7 @@ describe('DetailsComponent', () => {
it('should dispatch node selection', () => {
fixture.detectChanges();
expect(store.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([node]));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new SetSelectedNodesAction([node]) }));
});
it('should set aspectActions from extensions', async () => {

View File

@@ -38,11 +38,10 @@ import { CommentsTabComponent } from '../info-drawer/comments-tab/comments-tab.c
import { NodeEntry, PathElement } from '@alfresco/js-api';
import { first } from 'rxjs/operators';
import { ContentActionRef } from '@alfresco/adf-extensions';
import { FileSizePipe, InfoDrawerButtonsDirective } from '@alfresco/adf-core';
import { InfoDrawerButtonsDirective } from '@alfresco/adf-core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
@@ -56,8 +55,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
ToolbarComponent,
InfoDrawerButtonsDirective,
PermissionListComponent,
BreadcrumbComponent,
FileSizePipe
BreadcrumbComponent
],
selector: 'app-details-manager',
templateUrl: './details.component.html',

View File

@@ -32,7 +32,7 @@ import { NodeEntry } from '@alfresco/js-api';
import { of } from 'rxjs';
import { By } from '@angular/platform-browser';
import { ContentActionType } from '@alfresco/adf-extensions';
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { StoreModule } from '@ngrx/store';
const mockNode = {
@@ -59,7 +59,6 @@ describe('DatatableCellBadgesComponent', () => {
imports: [
TranslateModule.forRoot(),
AuthModule.forRoot(),
HttpClientModule,
StoreModule.forRoot(
{ app: (state) => state },
{
@@ -76,7 +75,7 @@ describe('DatatableCellBadgesComponent', () => {
}
)
],
providers: [Actions]
providers: [Actions, provideHttpClient(withInterceptorsFromDi())]
});
fixture = TestBed.createComponent(DatatableCellBadgesComponent);

View File

@@ -37,8 +37,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
styleUrls: ['./datatable-cell-badges.component.scss'],
host: { class: 'aca-datatable-cell-badges' },
encapsulation: ViewEncapsulation.None,
imports: [CommonModule, TranslateModule, DynamicExtensionComponent, IconComponent],
standalone: true
imports: [CommonModule, TranslateModule, DynamicExtensionComponent, IconComponent]
})
export class DatatableCellBadgesComponent implements OnInit {
@Input({ required: true }) node: NodeEntry;

View File

@@ -26,7 +26,7 @@ import { CustomNameColumnComponent } from './name-column.component';
import { Actions } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { TranslateModule } from '@ngx-translate/core';
import { By } from '@angular/platform-browser';
import { AuthModule } from '@alfresco/adf-core';
@@ -49,7 +49,6 @@ describe('CustomNameColumnComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
HttpClientModule,
TranslateModule.forRoot(),
CustomNameColumnComponent,
MockDatatableCellBadgesComponent,
@@ -70,7 +69,7 @@ describe('CustomNameColumnComponent', () => {
}
)
],
providers: [Actions]
providers: [Actions, provideHttpClient(withInterceptorsFromDi())]
});
fixture = TestBed.createComponent(CustomNameColumnComponent);

View File

@@ -30,22 +30,11 @@ import { NodeActionTypes } from '@alfresco/aca-shared/store';
import { isLocked, LockedByComponent } from '@alfresco/aca-shared';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { IconComponent } from '@alfresco/adf-core';
import { DynamicExtensionComponent } from '@alfresco/adf-extensions';
import { DatatableCellBadgesComponent } from '../datatable-cell-badges/datatable-cell-badges.component';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
LockedByComponent,
IconComponent,
NodeNameTooltipPipe,
DynamicExtensionComponent,
DatatableCellBadgesComponent
],
imports: [CommonModule, TranslateModule, LockedByComponent, NodeNameTooltipPipe, DatatableCellBadgesComponent],
selector: 'aca-custom-name-column',
templateUrl: './name-column.component.html',
styleUrls: ['./name-column.component.scss'],

View File

@@ -26,7 +26,6 @@ import { ChangeDetectorRef, Component, Input, OnInit, ViewEncapsulation } from '
import { TagNodeListComponent } from '@alfresco/adf-content-services';
@Component({
standalone: true,
imports: [TagNodeListComponent],
selector: 'aca-tags-column',
template: `<adf-tag-node-list [showDelete]="false" [limitTagsDisplayed]="true" [nodeId]="nodeId" (results)="onTagsLoaded()" />`,

View File

@@ -22,13 +22,12 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation, inject } from '@angular/core';
import { Component, inject, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';
import { TranslationService } from '@alfresco/adf-core';
import { NgIf } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
@Component({
standalone: true,
imports: [NgIf, MatIconModule],
selector: 'aca-custom-thumbnail-column',
templateUrl: './thumbnail-column.component.html',

View File

@@ -23,7 +23,7 @@
*/
import { ChangeDetectorRef, Component, OnInit, ViewEncapsulation } from '@angular/core';
import { SiteEntry, FavoritePaging, Pagination } from '@alfresco/js-api';
import { FavoritePaging, Pagination, SiteEntry } from '@alfresco/js-api';
import {
AppHookService,
ContentApiService,
@@ -49,7 +49,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { DocumentListComponent } from '@alfresco/adf-content-services';
@Component({
standalone: true,
imports: [
CommonModule,
DocumentListDirective,

View File

@@ -31,7 +31,7 @@ import {
PaginationDirective,
ToolbarComponent
} from '@alfresco/aca-shared';
import { NodeEntry, Node, PathElement, PathInfo } from '@alfresco/js-api';
import { Node, NodeEntry, PathElement, PathInfo } from '@alfresco/js-api';
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { debounceTime, map } from 'rxjs/operators';
import { DocumentListPresetRef, DynamicColumnComponent } from '@alfresco/adf-extensions';
@@ -49,7 +49,6 @@ import { DocumentListComponent } from '@alfresco/adf-content-services';
import { SearchAiInputContainerComponent } from '../knowledge-retrieval/search-ai/search-ai-input-container/search-ai-input-container.component';
@Component({
standalone: true,
imports: [
CommonModule,
DocumentListDirective,

View File

@@ -63,7 +63,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { HttpErrorResponse } from '@angular/common/http';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -25,7 +25,7 @@
import { HomeComponent } from './home.component';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Router } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { RouterTestingModule } from '@angular/router/testing';
import { AppSettingsService } from '@alfresco/aca-shared';
@@ -36,7 +36,8 @@ describe('HomeComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientModule, RouterTestingModule, HomeComponent]
imports: [RouterTestingModule, HomeComponent],
providers: [provideHttpClient(withInterceptorsFromDi())]
});
appSettings = TestBed.inject(AppSettingsService);
spyOnProperty(appSettings, 'landingPage', 'get').and.returnValue('/my-mock-landing-page');

View File

@@ -30,7 +30,6 @@ import { NodeCommentsModule } from '@alfresco/adf-content-services';
import { ExternalNodePermissionCommentsTabService } from './external-node-permission-comments-tab.service';
@Component({
standalone: true,
imports: [MatCardModule, NodeCommentsModule],
selector: 'app-comments-tab',
template: `<mat-card class="adf-comments-tab-container" appearance="raised"

View File

@@ -152,7 +152,7 @@ describe('LibraryMetadataFormComponent', () => {
component.update();
expect(store.dispatch).toHaveBeenCalledWith(new UpdateLibraryAction(siteEntryModel));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new UpdateLibraryAction(siteEntryModel) }));
});
it('should update library node with trimmed title', () => {
@@ -164,9 +164,11 @@ describe('LibraryMetadataFormComponent', () => {
component.update();
expect(store.dispatch).toHaveBeenCalledWith(
new UpdateLibraryAction({
...siteEntryModel,
title: siteEntryModel.title.trim()
jasmine.objectContaining({
...new UpdateLibraryAction({
...siteEntryModel,
title: siteEntryModel.title.trim()
})
})
);
});
@@ -189,7 +191,7 @@ describe('LibraryMetadataFormComponent', () => {
component.update();
expect(store.dispatch).not.toHaveBeenCalledWith(new UpdateLibraryAction(siteEntryModel));
expect(store.dispatch).not.toHaveBeenCalledWith(jasmine.objectContaining({ ...new UpdateLibraryAction(siteEntryModel) }));
});
it('should update library node when the user is an admin but has consumer rights', () => {
@@ -201,7 +203,7 @@ describe('LibraryMetadataFormComponent', () => {
component.update();
expect(store.dispatch).toHaveBeenCalledWith(new UpdateLibraryAction(siteEntryModel));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new UpdateLibraryAction(siteEntryModel) }));
});
it('should not call markAsPristine on form when updating valid form but has not permission to update', () => {
@@ -224,7 +226,7 @@ describe('LibraryMetadataFormComponent', () => {
component.update();
expect(store.dispatch).not.toHaveBeenCalledWith(new UpdateLibraryAction(siteEntryModel));
expect(store.dispatch).not.toHaveBeenCalledWith(jasmine.objectContaining({ ...new UpdateLibraryAction(siteEntryModel) }));
});
it('should not call markAsPristine on form when updating invalid form and has permission to update', () => {

View File

@@ -60,7 +60,6 @@ export class InstantErrorStateMatcher implements ErrorStateMatcher {
}
@Component({
standalone: true,
imports: [
CommonModule,
MatCardModule,

View File

@@ -27,7 +27,6 @@ import { SiteEntry } from '@alfresco/js-api';
import { LibraryMetadataFormComponent } from './library-metadata-form.component';
@Component({
standalone: true,
imports: [LibraryMetadataFormComponent],
selector: 'app-library-metadata-tab',
template: '<app-library-metadata-form [node]="node" />',

View File

@@ -43,7 +43,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { ExtensionService } from '@alfresco/adf-extensions';
@Component({
standalone: true,
imports: [CommonModule, ContentMetadataComponent],
selector: 'app-metadata-tab',
template: `

View File

@@ -31,7 +31,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { AppSettingsService } from '@alfresco/aca-shared';
@Component({
standalone: true,
imports: [CommonModule, VersionManagerModule, MatIconModule, TranslateModule],
selector: 'app-versions-tab',
template: `

View File

@@ -28,7 +28,7 @@ import { AgentService, ContentTestingModule, SearchAiService } from '@alfresco/a
import { Subject } from 'rxjs';
import { By } from '@angular/platform-browser';
import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { getAppSelection, SearchAiActionTypes, ToggleAISearchInput } from '@alfresco/aca-shared/store';
import { getAppSelection, SearchAiActionTypes } from '@alfresco/aca-shared/store';
import { AvatarComponent, NotificationService } from '@alfresco/adf-core';
import { SelectionState } from '@alfresco/adf-extensions';
import { MatMenu, MatMenuPanel, MatMenuTrigger } from '@angular/material/menu';
@@ -398,10 +398,12 @@ describe('AgentsButtonComponent', () => {
spyOn(store, 'dispatch');
await selectAgent();
expect(store.dispatch<ToggleAISearchInput>).toHaveBeenCalledWith({
type: SearchAiActionTypes.ToggleAiSearchInput,
agentId: '2'
});
expect(store.dispatch).toHaveBeenCalledWith(
jasmine.objectContaining({
type: SearchAiActionTypes.ToggleAiSearchInput,
agentId: '2'
})
);
});
it('should disallow selecting multiple agentsMock', () => {

View File

@@ -39,7 +39,6 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, MatMenuModule, MatListModule, TranslateModule, AvatarComponent, IconComponent, MatTooltipModule],
selector: 'aca-agents-button',
templateUrl: './agents-button.component.html',

View File

@@ -28,14 +28,13 @@ import { MatIconModule } from '@angular/material/icon';
import { SearchAiInputComponent } from '../search-ai-input/search-ai-input.component';
import { MatDividerModule } from '@angular/material/divider';
import { SearchAiNavigationService } from '../../../../services/search-ai-navigation.service';
import { SearchAiService, SearchAiInputState } from '@alfresco/adf-content-services';
import { SearchAiInputState, SearchAiService } from '@alfresco/adf-content-services';
import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { AsyncPipe } from '@angular/common';
import { Router } from '@angular/router';
@Component({
standalone: true,
imports: [SearchAiInputComponent, MatIconModule, MatDividerModule, MatButtonModule, TranslateModule, AsyncPipe],
selector: 'aca-search-ai-input-container',
templateUrl: './search-ai-input-container.component.html',

View File

@@ -425,12 +425,14 @@ describe('SearchAiInputComponent', () => {
submittingTrigger();
expect(store.dispatch).toHaveBeenCalledWith(
new SearchByTermAiAction({
searchTerm: query,
agentId: component.agentId
jasmine.objectContaining({
...new SearchByTermAiAction({
searchTerm: query,
agentId: component.agentId
})
})
);
expect(store.dispatch).toHaveBeenCalledWith(new ToggleAISearchInput('2', 'some query'));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new ToggleAISearchInput('2', 'some query') }));
});
it('should call dispatch on store with correct parameter if selected agent was changed', async () => {
@@ -443,12 +445,14 @@ describe('SearchAiInputComponent', () => {
submittingTrigger();
expect(store.dispatch).toHaveBeenCalledWith(
new SearchByTermAiAction({
searchTerm: query,
agentId: '1'
jasmine.objectContaining({
...new SearchByTermAiAction({
searchTerm: query,
agentId: '1'
})
})
);
expect(store.dispatch).toHaveBeenCalledWith(new ToggleAISearchInput('1', 'some query'));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new ToggleAISearchInput('1', 'some query') }));
});
it('should call open modal if there was a previous search phrase in url', () => {

View File

@@ -54,7 +54,6 @@ const MatTooltipOptions: MatTooltipDefaultOptions = {
};
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -28,7 +28,14 @@ describe('SearchAiMarkedOptions', () => {
let link = '';
beforeEach(() => {
link = searchAiMarkedOptions.renderer.link('https://example.com', 'Example', 'Example Link');
link = searchAiMarkedOptions.renderer.link({
raw: '',
text: 'Example Link',
type: 'link',
href: 'https://example.com',
title: 'Example',
tokens: []
});
});
it('should return a element', () => {
@@ -56,6 +63,15 @@ describe('SearchAiMarkedOptions', () => {
});
it('should returned link contain correct title if title is null', () => {
expect(searchAiMarkedOptions.renderer.link('https://example.com', null, 'Example Link')).toContain('title=""');
expect(
searchAiMarkedOptions.renderer.link({
raw: '',
text: 'Example Link',
type: 'link',
href: 'https://example.com',
title: '',
tokens: []
})
).toContain('title=""');
});
});

View File

@@ -23,9 +23,10 @@
*/
import { MarkedOptions, MarkedRenderer } from 'ngx-markdown';
import { Tokens } from 'marked/lib/marked';
const renderer = new MarkedRenderer();
renderer.link = (href: string, title: string, text: string): string =>
renderer.link = ({ href, title, text }: Tokens.Link): any =>
`<a href="${href}" target="_blank" rel="noopener noreferrer" title="${title || ''}">${text}</a>`;
export const searchAiMarkedOptions: MarkedOptions = {
renderer

View File

@@ -538,8 +538,10 @@ describe('SearchAiResultsComponent', () => {
it('should dispatch ViewNodeAction on store when clicked', () => {
documentElement.click();
expect(store.dispatch).toHaveBeenCalledWith(
new ViewNodeAction(nodeId, {
location: url
jasmine.objectContaining({
...new ViewNodeAction(nodeId, {
location: url
})
})
);
});
@@ -551,8 +553,10 @@ describe('SearchAiResultsComponent', () => {
})
);
expect(store.dispatch).toHaveBeenCalledWith(
new ViewNodeAction(nodeId, {
location: url
jasmine.objectContaining({
...new ViewNodeAction(nodeId, {
location: url
})
})
);
});

View File

@@ -47,7 +47,6 @@ import { MarkdownModule, MARKED_OPTIONS, provideMarkdown } from 'ngx-markdown';
import { searchAiMarkedOptions } from './search-ai-marked-options';
@Component({
standalone: true,
imports: [
CommonModule,
PageLayoutComponent,

View File

@@ -42,7 +42,6 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
import { TranslateModule } from '@ngx-translate/core';
@Component({
standalone: true,
imports: [
CommonModule,
DocumentListModule,

View File

@@ -42,7 +42,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { SearchAiInputContainerComponent } from '../knowledge-retrieval/search-ai/search-ai-input-container/search-ai-input-container.component';
@Component({
standalone: true,
imports: [
CommonModule,
DocumentListModule,

View File

@@ -24,7 +24,7 @@
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
import { SearchSortingDefinition } from '@alfresco/adf-content-services/lib/search/models/search-sorting-definition.interface';
import { Component, OnInit, Output, ViewEncapsulation, EventEmitter } from '@angular/core';
import { Component, EventEmitter, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { MatMenuModule } from '@angular/material/menu';
@@ -32,7 +32,6 @@ import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatMenuModule, MatIconModule, MatButtonModule],
selector: 'aca-search-action-menu',
templateUrl: './search-action-menu.component.html',

View File

@@ -33,7 +33,6 @@ import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule],
selector: 'app-search-input-control',
templateUrl: './search-input-control.component.html',

View File

@@ -1,242 +0,0 @@
/*!
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { SearchInputComponent } from './search-input.component';
import { AppTestingModule } from '../../../testing/app-testing.module';
import { Actions, ofType } from '@ngrx/effects';
import { SearchByTermAction, SearchActionTypes } from '@alfresco/aca-shared/store';
import { AppHookService, AppService } from '@alfresco/aca-shared';
import { map } from 'rxjs/operators';
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
import { SearchNavigationService } from '../search-navigation.service';
import { BehaviorSubject, of, Subject } from 'rxjs';
import { NotificationService } from '@alfresco/adf-core';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { Buffer } from 'buffer';
import { ActivatedRoute } from '@angular/router';
describe('SearchInputComponent', () => {
let fixture: ComponentFixture<SearchInputComponent>;
let component: SearchInputComponent;
let actions$: Actions;
let appHookService: AppHookService;
let route: ActivatedRoute;
let searchInputService: SearchNavigationService;
let showErrorSpy: jasmine.Spy;
const appServiceMock = {
appNavNarMode$: new BehaviorSubject('collapsed'),
setAppNavbarMode: jasmine.createSpy('setAppNavbarMode'),
toggleAppNavBar$: new Subject()
};
const encodeQuery = (query: any): string => {
return Buffer.from(JSON.stringify(query)).toString('base64');
};
beforeEach(() => {
appServiceMock.setAppNavbarMode.calls.reset();
TestBed.configureTestingModule({
imports: [AppTestingModule, SearchInputComponent, MatSnackBarModule],
providers: [
{
provide: AppService,
useValue: appServiceMock
},
SearchQueryBuilderService
],
schemas: [NO_ERRORS_SCHEMA]
});
actions$ = TestBed.inject(Actions);
fixture = TestBed.createComponent(SearchInputComponent);
appHookService = TestBed.inject(AppHookService);
searchInputService = TestBed.inject(SearchNavigationService);
route = TestBed.inject(ActivatedRoute);
component = fixture.componentInstance;
const notificationService = TestBed.inject(NotificationService);
showErrorSpy = spyOn(notificationService, 'showError');
});
afterEach(() => {
fixture.destroy();
});
it('should collapsed sidenav by default', () => {
component.ngOnInit();
expect(appServiceMock.setAppNavbarMode).toHaveBeenCalledWith('collapsed');
});
it('should change flag on library400Error event', async () => {
fixture.detectChanges();
await fixture.whenStable();
expect(component.has400LibraryError).toBe(false);
appHookService.library400Error.next();
expect(component.has400LibraryError).toBe(true);
});
it('should have no library constraint by default', () => {
expect(component.evaluateLibrariesConstraint()).toBe(false);
});
it('should have library constraint on 400 error received', async () => {
fixture.detectChanges();
await fixture.whenStable();
const libItem = component.searchOptions.find((item) => item.key.toLowerCase().indexOf('libraries') > 0);
libItem.value = true;
appHookService.library400Error.next();
expect(component.evaluateLibrariesConstraint()).toBe(true);
});
describe('onSearchSubmit()', () => {
it('should call search action with correct search options', (done) => {
const searchedTerm = 's';
component.searchedWord = 'te';
actions$
.pipe(
ofType<SearchByTermAction>(SearchActionTypes.SearchByTerm),
map((action) => {
expect(action.searchOptions[0].key).toBe('SEARCH.INPUT.FILES');
})
)
.subscribe(() => {
done();
});
component.onSearchSubmit({ target: { value: searchedTerm } });
fixture.detectChanges();
});
it('should call search action with correct searched term', (done) => {
const searchedTerm = 's';
actions$
.pipe(
ofType<SearchByTermAction>(SearchActionTypes.SearchByTerm),
map((action) => {
expect(action.payload).toBe(searchedTerm);
})
)
.subscribe(() => {
done();
});
component.onSearchSubmit({ target: { value: searchedTerm } });
fixture.detectChanges();
});
});
describe('onSearchChange()', () => {
it('should call search action with correct searched term', () => {
const searchedTerm = 's';
component.onSearchChange(searchedTerm);
expect(component.searchedWord).toBe(searchedTerm);
});
it('should show snack for empty search', () => {
component.onSearchSubmit('');
expect(showErrorSpy).toHaveBeenCalled();
});
});
describe('isLibrariesChecked()', () => {
it('should return false by default', () => {
expect(component.isLibrariesChecked()).toBe(false);
});
it('should return true when libraries checked', () => {
const libItem = component.searchOptions.find((item) => item.key.toLowerCase().indexOf('libraries') > 0);
libItem.value = true;
expect(component.isLibrariesChecked()).toBe(true);
});
});
describe('isContentChecked()', () => {
it('should return false by default', () => {
expect(component.isContentChecked()).toBe(false);
});
it('should return true when files checked', () => {
const filesItem = component.searchOptions.find((item) => item.key.toLowerCase().indexOf('files') > 0);
filesItem.value = true;
expect(component.isContentChecked()).toBe(true);
});
it('should return true when folders checked', () => {
const foldersItem = component.searchOptions.find((item) => item.key.toLowerCase().indexOf('folders') > 0);
foldersItem.value = true;
expect(component.isContentChecked()).toBe(true);
});
it('should return true when both files and folders checked', () => {
const filesItem = component.searchOptions.find((item) => item.key.toLowerCase().indexOf('files') > 0);
filesItem.value = true;
const foldersItem = component.searchOptions.find((item) => item.key.toLowerCase().indexOf('folders') > 0);
foldersItem.value = true;
expect(component.isContentChecked()).toBe(true);
});
});
describe('exitSearch()', () => {
it('should exit search on click of close icon', async () => {
spyOn(component, 'exitSearch').and.callThrough();
spyOn(searchInputService, 'navigateBack').and.callThrough();
fixture.detectChanges();
await fixture.whenStable();
const closeIcon = fixture.debugElement.nativeElement.querySelector('.aca-search-input--close-button');
closeIcon.click();
fixture.detectChanges();
await fixture.whenStable();
expect(component.exitSearch).toHaveBeenCalled();
expect(searchInputService.navigateBack).toHaveBeenCalledWith();
});
});
it('should sidenav expanded after the component is destroy', () => {
component.ngOnDestroy();
expect(appServiceMock.setAppNavbarMode).toHaveBeenCalledWith('expanded');
});
it('should extract searched word from query params', (done) => {
route.queryParams = of({ q: encodeQuery({ userQuery: 'cm:name:"test*"' }) });
route.queryParams.subscribe(() => {
fixture.detectChanges();
expect(component.searchedWord).toBe('test');
done();
});
fixture.detectChanges();
});
});

View File

@@ -46,7 +46,6 @@ import { extractSearchedWordFromEncodedQuery } from '../../../utils/aca-search-u
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -49,7 +49,6 @@ import { extractSearchedWordFromEncodedQuery } from '../../../utils/aca-search-u
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -37,7 +37,6 @@ import { DatatableCellBadgesComponent } from '../../dl-custom-components/datatab
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, LocationLinkComponent, MatDialogModule, DatatableCellBadgesComponent],
selector: 'aca-search-results-row',
templateUrl: './search-results-row.component.html',

View File

@@ -190,7 +190,7 @@ describe('SearchComponent', () => {
component.onNodeDoubleClick(node);
expect(store.dispatch).toHaveBeenCalledWith(new NavigateToFolder(node));
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new NavigateToFolder(node) }));
});
it('should preview file node on double click', () => {

View File

@@ -74,9 +74,7 @@ import { MatButtonModule } from '@angular/material/button';
import { DocumentListDirective } from '../../../directives/document-list.directive';
import { ThumbnailColumnComponent } from '../../dl-custom-components/thumbnail-column/thumbnail-column.component';
import { SearchActionMenuComponent } from '../search-action-menu/search-action-menu.component';
import { TagsColumnComponent } from '../../dl-custom-components/tags-column/tags-column.component';
import { MatIconModule } from '@angular/material/icon';
import { SearchResultsRowComponent } from '../search-results-row/search-results-row.component';
import { DocumentListPresetRef, DynamicColumnComponent } from '@alfresco/adf-extensions';
import { BulkActionsDropdownComponent } from '../../bulk-actions-dropdown/bulk-actions-dropdown.component';
import { SearchAiInputContainerComponent } from '../../knowledge-retrieval/search-ai/search-ai-input-container/search-ai-input-container.component';
@@ -92,7 +90,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { MatMenuModule } from '@angular/material/menu';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
@@ -105,11 +102,9 @@ import { MatMenuModule } from '@angular/material/menu';
ContextActionsDirective,
ThumbnailColumnComponent,
SearchActionMenuComponent,
TagsColumnComponent,
PaginationComponent,
MatIconModule,
InfoDrawerComponent,
SearchResultsRowComponent,
PaginationDirective,
PageLayoutComponent,
ToolbarComponent,

View File

@@ -29,7 +29,6 @@ import { take } from 'rxjs/operators';
import { CoreModule, NotificationService } from '@alfresco/adf-core';
@Component({
standalone: true,
imports: [CoreModule],
selector: 'aca-saved-search-delete-dialog',
templateUrl: './saved-search-delete-dialog.component.html',

View File

@@ -32,7 +32,6 @@ import { UniqueSearchNameValidator } from '../unique-search-name-validator';
import { SavedSearchForm } from '../saved-search-form.interface';
@Component({
standalone: true,
imports: [CoreModule, AutoFocusDirective],
selector: 'aca-saved-search-edit-dialog',
templateUrl: './saved-search-edit-dialog.component.html',

View File

@@ -24,7 +24,6 @@
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MatMenuModule } from '@angular/material/menu';
import { SearchInputControlComponent } from '../../search-input-control/search-input-control.component';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { MatButtonModule } from '@angular/material/button';
@@ -42,7 +41,6 @@ import { UniqueSearchNameValidator } from './unique-search-name-validator';
import { SavedSearchForm } from './saved-search-form.interface';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
@@ -54,7 +52,6 @@ import { SavedSearchForm } from './saved-search-form.interface';
A11yModule,
MatCheckboxModule,
FormsModule,
SearchInputControlComponent,
CoreModule,
AutoFocusDirective
],

View File

@@ -33,7 +33,6 @@ import { SaveSearchDialogComponent } from '../dialog/save-search-dialog.componen
@Component({
selector: 'app-test-component',
template: '<div acaSaveSearch="searchQuery" acaSaveSearchQuery="encodedQuery"></div>',
standalone: true,
imports: [SaveSearchDirective]
})
class TestComponent {

View File

@@ -33,7 +33,6 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
@Component({
selector: 'aca-saved-searches-smart-list',
standalone: true,
imports: [CommonModule, TranslateModule, SavedSearchesListUiComponent, PageLayoutComponent, EmptyContentComponent, MatProgressSpinnerModule],
templateUrl: './saved-searches-smart-list.component.html',
styleUrls: ['./saved-searches-smart-list.component.scss'],

View File

@@ -44,7 +44,6 @@ import { Router } from '@angular/router';
@Component({
selector: 'aca-saved-searches-ui-list',
standalone: true,
imports: [CommonModule, DATATABLE_DIRECTIVES, TEMPLATE_DIRECTIVES, DataTableComponent],
templateUrl: './saved-searches-list.ui-component.html',
styleUrls: ['./saved-searches-list.ui-component.scss'],

View File

@@ -33,7 +33,6 @@ import { delay } from 'rxjs/operators';
@Component({
selector: 'aca-save-search-sidenav',
standalone: true,
imports: [CoreModule, ExpandMenuComponent],
templateUrl: './save-search-sidenav.component.html',
encapsulation: ViewEncapsulation.None

View File

@@ -43,7 +43,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { SearchAiInputContainerComponent } from '../knowledge-retrieval/search-ai/search-ai-input-container/search-ai-input-container.component';
@Component({
standalone: true,
imports: [
CommonModule,
DocumentListModule,

View File

@@ -37,7 +37,6 @@ import { AlfrescoApiService, AlfrescoViewerModule } from '@alfresco/adf-content-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, ToolbarComponent],
selector: 'app-shared-link-view',
templateUrl: './shared-link-view.component.html',

View File

@@ -35,7 +35,6 @@ import { ActionDirective } from '../directives/action.directive';
import { MenuPanelDirective } from '../directives/menu-panel.directive';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, IconModule, MatMenuModule, MatButtonModule, ActiveLinkDirective, ActionDirective, MenuPanelDirective],
selector: 'app-button-menu',
templateUrl: './button-menu.component.html',

View File

@@ -31,20 +31,9 @@ import { MatButtonModule } from '@angular/material/button';
import { ActiveLinkDirective } from '../directives/active-link.directive';
import { ActionDirective } from '../directives/action.directive';
import { MatExpansionModule } from '@angular/material/expansion';
import { ExpansionPanelDirective } from '../directives/expansion-panel.directive';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,
IconModule,
MatButtonModule,
ActiveLinkDirective,
ActionDirective,
MatExpansionModule,
ExpansionPanelDirective
],
imports: [CommonModule, TranslateModule, IconModule, MatButtonModule, ActiveLinkDirective, ActionDirective, MatExpansionModule],
selector: 'app-expand-menu',
encapsulation: ViewEncapsulation.None,
templateUrl: './expand-menu.component.html',

View File

@@ -31,7 +31,6 @@ import { RouterModule } from '@angular/router';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, RouterModule, ToolbarComponent],
selector: 'app-sidenav-header',
templateUrl: `./sidenav-header.component.html`,

View File

@@ -23,15 +23,14 @@
*/
import { Component } from '@angular/core';
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AppTestingModule } from '../../../testing/app-testing.module';
import { Router, NavigationEnd } from '@angular/router';
import { NavigationEnd, Router } from '@angular/router';
import { Subject } from 'rxjs';
import { ActiveLinkDirective } from './active-link.directive';
import { ActionDirective } from './action.directive';
@Component({
standalone: true,
imports: [ActiveLinkDirective, ActionDirective],
selector: 'app-test-component',
template: ` <span id="test-element" acaActiveLink="active-link-class" [action]="item"></span> `

View File

@@ -37,7 +37,6 @@ import { NavigationEnd } from '@angular/router';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, SidenavHeaderComponent, MatListModule, ExpandMenuComponent, DynamicExtensionComponent],
selector: 'app-sidenav',
templateUrl: './sidenav.component.html',

View File

@@ -23,7 +23,7 @@
*/
import { AfterViewInit, Component, inject, Input, OnInit, QueryList, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core';
import { ContentActionRef, DynamicExtensionComponent } from '@alfresco/adf-extensions';
import { ContentActionRef } from '@alfresco/adf-extensions';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { TranslateModule } from '@ngx-translate/core';
@@ -31,8 +31,7 @@ import { MatMenu, MatMenuItem, MatMenuModule } from '@angular/material/menu';
import { ToolbarMenuItemComponent, UserProfileService } from '@alfresco/aca-shared';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatButtonModule, MatMenuModule, ToolbarMenuItemComponent, DynamicExtensionComponent],
imports: [CommonModule, TranslateModule, MatButtonModule, MatMenuModule, ToolbarMenuItemComponent],
selector: 'aca-user-menu',
templateUrl: './user-menu.component.html',
styleUrls: ['./user-menu.component.scss'],

View File

@@ -35,7 +35,6 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatIconModule } from '@angular/material/icon';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatMenuModule, MatIconModule],
selector: 'app-toggle-edit-offline',
template: `

View File

@@ -37,7 +37,6 @@ import { MatMenuModule } from '@angular/material/menu';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatIconModule, MatMenuModule, LibraryFavoriteDirective],
selector: 'app-toggle-favorite-library',
template: `

View File

@@ -22,7 +22,7 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, OnInit, Input, inject } from '@angular/core';
import { Component, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs';
import { SelectionState } from '@alfresco/adf-extensions';
@@ -35,7 +35,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { MatMenuModule } from '@angular/material/menu';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatIconModule, MatMenuModule, NodeFavoriteDirective],
selector: 'app-toggle-favorite',
template: `

View File

@@ -25,14 +25,13 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { Observable } from 'rxjs';
import { Store } from '@ngrx/store';
import { ToggleInfoDrawerAction, isInfoDrawerOpened } from '@alfresco/aca-shared/store';
import { isInfoDrawerOpened, ToggleInfoDrawerAction } from '@alfresco/aca-shared/store';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { TranslateModule } from '@ngx-translate/core';
import { MatIconModule } from '@angular/material/icon';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule],
selector: 'app-toggle-info-drawer',
template: `

View File

@@ -36,7 +36,6 @@ import { MatIconModule } from '@angular/material/icon';
import { NotificationService } from '@alfresco/adf-core';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, LibraryMembershipDirective],
selector: 'app-toggle-join-library-button',
template: `

View File

@@ -31,7 +31,6 @@ import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatIconModule, MatMenuModule, LibraryMembershipDirective],
selector: 'app-toggle-join-library-menu',
template: `

View File

@@ -22,13 +22,13 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, Input, inject } from '@angular/core';
import { Component, inject, Input, ViewEncapsulation } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppStore, ViewNodeAction, getAppSelection } from '@alfresco/aca-shared/store';
import { AppStore, getAppSelection, ViewNodeAction } from '@alfresco/aca-shared/store';
import { ActivatedRoute, Router } from '@angular/router';
import { take } from 'rxjs/operators';
import { SharedLinkEntry } from '@alfresco/js-api';
import { AutoDownloadService, AppSettingsService } from '@alfresco/aca-shared';
import { AppSettingsService, AutoDownloadService } from '@alfresco/aca-shared';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { MatButtonModule } from '@angular/material/button';
@@ -37,7 +37,6 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatDialogModule } from '@angular/material/dialog';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatMenuModule, MatDialogModule],
selector: 'app-view-node',
template: `

View File

@@ -39,7 +39,6 @@ import { DataTableModule, EmptyContentComponent, PaginationComponent } from '@al
import { DocumentListDirective } from '../../directives/document-list.directive';
@Component({
standalone: true,
imports: [
CommonModule,
TranslateModule,

View File

@@ -32,7 +32,6 @@ import { UploadModule } from '@alfresco/adf-content-services';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, UploadModule],
selector: 'aca-upload-files-dialog',
templateUrl: './upload-files-dialog.component.html',

View File

@@ -38,7 +38,6 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, ReactiveFormsModule, MatButtonModule, MatIconModule, MatDividerModule, MatFormFieldModule],
selector: 'app-view-profile',
templateUrl: './view-profile.component.html',

View File

@@ -23,7 +23,7 @@
*/
import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
import { CommonModule, NgOptimizedImage } from '@angular/common';
import { CommonModule } from '@angular/common';
import { DIALOG_COMPONENT_DATA, IconComponent, LocalizedDatePipe, TimeAgoPipe } from '@alfresco/adf-core';
import { Node, SizeDetails } from '@alfresco/js-api';
import { MatDividerModule } from '@angular/material/divider';
@@ -47,8 +47,7 @@ class FolderDetails {
@Component({
selector: 'app-folder-info',
standalone: true,
imports: [CommonModule, MatDividerModule, TimeAgoPipe, TranslateModule, LocalizedDatePipe, NgOptimizedImage, IconComponent],
imports: [CommonModule, MatDividerModule, TimeAgoPipe, TranslateModule, LocalizedDatePipe, IconComponent],
templateUrl: './folder-information.component.html',
styleUrls: ['./folder-information.component.scss'],
encapsulation: ViewEncapsulation.None,

View File

@@ -36,7 +36,6 @@ import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, MatDialogModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule],
templateUrl: './create-from-template.dialog.html',
styleUrls: ['./create-from-template.dialog.scss'],

Some files were not shown because too many files have changed in this diff Show More