diff --git a/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts b/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts index 1043f5ca84..5f078168b9 100644 --- a/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts +++ b/projects/aca-content/src/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.ts @@ -25,7 +25,7 @@ import { ContentActionRef } from '@alfresco/adf-extensions'; import { AppStore, getSearchItemsTotalCount } from '@alfresco/aca-shared/store'; import { CommonModule } from '@angular/common'; -import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, inject, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { MatSelectModule } from '@angular/material/select'; import { Store } from '@ngrx/store'; import { TranslateModule } from '@ngx-translate/core'; @@ -50,11 +50,12 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy { tooltip: string; bulkSelectControl = new FormControl(); - private readonly totalItems$: Observable = this.store.select(getSearchItemsTotalCount); - private readonly onDestroy$ = new Subject(); - - constructor(private store: Store, private translationService: TranslationService, private extensions: AppExtensionService) {} + private readonly store = inject>(Store); + private readonly translationService = inject(TranslationService); + private readonly extensions = inject(AppExtensionService); + private readonly onDestroy$ = new Subject(); + private readonly totalItems$: Observable = this.store.select(getSearchItemsTotalCount); ngOnInit() { this.totalItems$ .pipe( diff --git a/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts b/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts index 48ac7da335..788d222d45 100644 --- a/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts +++ b/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts @@ -105,16 +105,16 @@ export class SearchInputComponent implements OnInit, OnDestroy { @ViewChild(MatMenuTrigger, { static: true }) trigger: MatMenuTrigger; - constructor( - private queryBuilder: SearchQueryBuilderService, - private queryLibrariesBuilder: SearchLibrariesQueryBuilderService, - private config: AppConfigService, - private router: Router, - private store: Store, - private appHookService: AppHookService, - private appService: AppService, - public searchInputService: SearchNavigationService - ) { + private queryBuilder = inject(SearchQueryBuilderService); + private queryLibrariesBuilder = inject(SearchLibrariesQueryBuilderService); + private config = inject(AppConfigService); + private router = inject(Router); + private store = inject(Store); + private appHookService = inject(AppHookService); + private appService = inject(AppService); + public searchInputService = inject(SearchNavigationService); + + constructor() { this.searchOnChange = this.config.get('search.aca:triggeredOnChange', true); } @@ -240,7 +240,7 @@ export class SearchInputComponent implements OnInit, OnDestroy { } get onLibrariesSearchResults() { - return this.router.url.indexOf('/search-libraries') === 0; + return this.router?.url.indexOf('/search-libraries') === 0; } get onSearchResults() {