mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
GH Auto: Upstream dependencies ADF:8.4.0-22182348850 JS-API:9.4.0-22182348850 using Tag:8.4.0-22182348850 (#5043)
* [ci:force][auto-commit] Update dependencies ADF:8.4.0-22182348850 JS:9.4.0-22182348850 * Refactor components to use Angular's dependency injection with `inject` function. Removed unnecessary constructor parameters in `name-column`, `saved-searches-list`, `node-information`, and `content-url` components. Updated `node-actions` service to use string literals for `BatchOperationType`. Adjusted `showHeader` initialization in `document-base-page` component for consistency. --------- Co-authored-by: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com> Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
co-authored by
AleksanderSklorz
Denys Vuika
parent
4204745227
commit
0008b7c170
+4
-10
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { NameColumnComponent, NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { ChangeDetectorRef, Component, DestroyRef, ElementRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Actions, ofType } from '@ngrx/effects';
|
||||
import { filter } from 'rxjs/operators';
|
||||
import { NodeActionTypes } from '@alfresco/aca-shared/store';
|
||||
@@ -48,15 +48,9 @@ export class CustomNameColumnComponent extends NameColumnComponent implements On
|
||||
isFileWriteLocked: boolean;
|
||||
|
||||
private readonly destroy = inject(DestroyRef);
|
||||
|
||||
constructor(
|
||||
element: ElementRef,
|
||||
private readonly cd: ChangeDetectorRef,
|
||||
private readonly actions$: Actions,
|
||||
private readonly nodesService: NodesApiService
|
||||
) {
|
||||
super(element, nodesService);
|
||||
}
|
||||
private readonly cd = inject(ChangeDetectorRef);
|
||||
private readonly actions$ = inject(Actions);
|
||||
private readonly nodesService = inject(NodesApiService);
|
||||
|
||||
ngOnInit() {
|
||||
this.updateValue();
|
||||
|
||||
+7
-9
@@ -35,7 +35,6 @@ import {
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import {
|
||||
AppConfigService,
|
||||
DataCellEvent,
|
||||
DATATABLE_DIRECTIVES,
|
||||
DataTableComponent,
|
||||
@@ -101,13 +100,12 @@ export class SavedSearchesListUiComponent extends DataTableSchema implements Aft
|
||||
}
|
||||
];
|
||||
|
||||
constructor(
|
||||
protected appConfig: AppConfigService,
|
||||
private readonly clipboard: Clipboard,
|
||||
private readonly router: Router,
|
||||
private readonly hostElement: ElementRef<HTMLElement>
|
||||
) {
|
||||
super(appConfig, '', savedSearchesListSchema);
|
||||
private readonly clipboard = inject(Clipboard);
|
||||
private readonly router = inject(Router);
|
||||
private readonly hostElement: ElementRef<HTMLElement> = inject(ElementRef);
|
||||
|
||||
constructor() {
|
||||
super('', savedSearchesListSchema);
|
||||
}
|
||||
|
||||
ngAfterContentInit() {
|
||||
@@ -115,7 +113,7 @@ export class SavedSearchesListUiComponent extends DataTableSchema implements Aft
|
||||
this.contextMenuAction$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((action) => this.executeMenuOption(action.key, action.data));
|
||||
}
|
||||
|
||||
@HostListener('document:keydown.escape', ['$event'])
|
||||
@HostListener('document:keydown.escape')
|
||||
onEscapeKeydown() {
|
||||
const contextMenu = document.querySelector<HTMLElement>('.adf-context-menu');
|
||||
if (contextMenu) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { CommonModule, NgOptimizedImage } from '@angular/common';
|
||||
import { DIALOG_COMPONENT_DATA, LocalizedDatePipe, TimeAgoPipe, IconComponent, FileSizePipe, TranslationService } from '@alfresco/adf-core';
|
||||
import { DIALOG_COMPONENT_DATA, LocalizedDatePipe, TimeAgoPipe, IconComponent, FileSizePipe } from '@alfresco/adf-core';
|
||||
import { Node, SizeDetails } from '@alfresco/js-api';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
||||
@@ -47,6 +47,7 @@ class NodeDetails {
|
||||
@Component({
|
||||
selector: 'app-node-info',
|
||||
imports: [CommonModule, MatDividerModule, TimeAgoPipe, TranslatePipe, LocalizedDatePipe, IconComponent, NgOptimizedImage],
|
||||
providers: [FileSizePipe],
|
||||
templateUrl: './node-information.component.html',
|
||||
styleUrls: ['./node-information.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
@@ -56,10 +57,9 @@ export class NodeInformationComponent implements OnInit {
|
||||
readonly contentService = inject(ContentService);
|
||||
readonly nodesService = inject(NodesApiService);
|
||||
readonly translateService = inject(TranslateService);
|
||||
readonly translationService = inject(TranslationService);
|
||||
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
private readonly fileSizePipe = new FileSizePipe(this.translationService);
|
||||
private readonly fileSizePipe = inject(FileSizePipe);
|
||||
|
||||
node: Node = inject(DIALOG_COMPONENT_DATA);
|
||||
nodeDetails = new NodeDetails();
|
||||
|
||||
@@ -22,24 +22,19 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { AppStore, getRepositoryStatus } from '@alfresco/aca-shared/store';
|
||||
import { take, map, catchError, mergeMap } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { ContentApiService } from '@alfresco/aca-shared';
|
||||
import { DirectAccessUrlEntry } from '@alfresco/js-api';
|
||||
import { AlfrescoApiService, ContentVersionService } from '@alfresco/adf-content-services';
|
||||
import { ContentVersionService } from '@alfresco/adf-content-services';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ContentUrlService extends ContentVersionService {
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private contentApiService: ContentApiService,
|
||||
alfrescoApiService: AlfrescoApiService
|
||||
) {
|
||||
super(alfrescoApiService);
|
||||
}
|
||||
private readonly store = inject(Store<AppStore>);
|
||||
private readonly contentApiService = inject(ContentApiService);
|
||||
|
||||
getNodeContentUrl(nodeId: string, attachment = true): Observable<string> {
|
||||
return this.isDirectAccessUrlEnabled().pipe(
|
||||
|
||||
@@ -40,7 +40,7 @@ import { NodeEntry, Node, SitePaging, NodeChildAssociationPaging, NodeChildAssoc
|
||||
import { ContentApiService } from '@alfresco/aca-shared';
|
||||
import { catchError, map, mergeMap } from 'rxjs/operators';
|
||||
|
||||
type BatchOperationType = Extract<NodeAction, NodeAction.COPY | NodeAction.MOVE>;
|
||||
type BatchOperationType = Extract<NodeAction, 'COPY' | 'MOVE'>;
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
Reference in New Issue
Block a user