diff --git a/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.spec.ts b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.spec.ts index 1b6d633ac..adb1b5e47 100644 --- a/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.spec.ts +++ b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.spec.ts @@ -29,6 +29,7 @@ import { first } from 'rxjs/operators'; import { AppTestingModule } from '../../../testing/app-testing.module'; import { SearchResultsRowComponent } from './search-results-row.component'; import { Component, Input } from '@angular/core'; +import { ResultNode } from '@alfresco/js-api/typings'; @Component({ selector: 'aca-datatable-cell-badges', @@ -241,7 +242,7 @@ describe('SearchResultsRowComponent', () => { }); }); - function createMaliciousEntry(overrides: any): ResultSetRowEntry { + function createMaliciousEntry(overrides: Partial): ResultSetRowEntry { return { entry: { id: 'test-entry', diff --git a/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts index 987735298..3ba4edb1a 100644 --- a/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts +++ b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts @@ -47,14 +47,6 @@ import { DomSanitizer } from '@angular/platform-browser'; host: { class: 'aca-search-results-row' } }) export class SearchResultsRowComponent implements OnInit { - private settings = inject(AppSettingsService); - private readonly sanitizer = inject(DomSanitizer); - - private readonly highlightPrefix = ""; - private readonly highlightPostfix = ''; - - private node: NodeEntry; - @Input({ required: true }) context: any; @@ -68,7 +60,13 @@ export class SearchResultsRowComponent implements OnInit { contentStripped = ''; isFile = false; + private settings = inject(AppSettingsService); + private node: NodeEntry; + private readonly destroyRef = inject(DestroyRef); + private readonly sanitizer = inject(DomSanitizer); + private readonly highlightPrefix = ""; + private readonly highlightPostfix = ''; constructor( private store: Store, @@ -135,8 +133,6 @@ export class SearchResultsRowComponent implements OnInit { if (title !== name) { const sanitizedTitle = this.sanitizer.sanitize(SecurityContext.HTML, title); this.title$.next(sanitizedTitle ? ` ( ${sanitizedTitle} )` : ''); - this.title$.next(title ? ` ( ${title} )` : ''); - this.titleStripped = this.stripHighlighting(title); } }