UNPKG

@alfresco/adf-content-services

Version:
67 lines (66 loc) 3.4 kB
import { AlfrescoApiService } from '../services/alfresco-api.service'; import { EventEmitter, OnChanges, OnInit } from '@angular/core'; import { ContentApi, ContentPagingQuery, Node, NodeEntry, NodesApi, VersionEntry, VersionsApi } from '@alfresco/js-api'; import { MatDialog } from '@angular/material/dialog'; import { ContentVersionService } from './content-version.service'; import { ContentService } from '../common'; import { InfiniteScrollDatasource } from '../infinite-scroll-datasource'; import { Observable } from 'rxjs'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import * as i0 from "@angular/core"; export declare class VersionListDataSource extends InfiniteScrollDatasource<VersionEntry> { private versionsApi; private node; constructor(versionsApi: VersionsApi, node: Node); getNextBatch(pagingOptions: ContentPagingQuery): Observable<VersionEntry[]>; } export declare class VersionListComponent implements OnChanges, OnInit { private alfrescoApi; private contentService; private contentVersionService; private dialog; private _contentApi; get contentApi(): ContentApi; private _versionsApi; get versionsApi(): VersionsApi; private _nodesApi; get nodesApi(): NodesApi; versionsDataSource: VersionListDataSource; latestVersion: VersionEntry; isLoading: boolean; /** The target node. */ node: Node; /** Toggles showing/hiding of comments */ showComments: boolean; /** Enable/disable downloading a version of the current node. */ allowDownload: boolean; /** Enable/disable viewing a version of the current node. */ allowViewVersions: boolean; /** Toggles showing/hiding of version actions */ showActions: boolean; /** Enable/disable deletion of version */ allowVersionDelete: boolean; /** Emitted when a version is restored */ restored: EventEmitter<Node>; /** Emitted when a version is deleted */ deleted: EventEmitter<Node>; /** Emitted when viewing a version */ viewVersion: EventEmitter<string>; viewport: CdkVirtualScrollViewport; private readonly destroyRef; constructor(alfrescoApi: AlfrescoApiService, contentService: ContentService, contentVersionService: ContentVersionService, dialog: MatDialog); ngOnInit(): void; ngOnChanges(): void; canUpdate(): boolean; canDelete(): boolean; restore(versionId: string): void; onViewVersion(versionId: string): void; loadVersionHistory(): void; downloadVersion(versionId: string): void; deleteVersion(versionId: string): void; onVersionDeleted(node: any): void; onVersionRestored(node: NodeEntry): void; downloadContent(url: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<VersionListComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<VersionListComponent, "adf-version-list", never, { "node": { "alias": "node"; "required": false; }; "showComments": { "alias": "showComments"; "required": false; }; "allowDownload": { "alias": "allowDownload"; "required": false; }; "allowViewVersions": { "alias": "allowViewVersions"; "required": false; }; "showActions": { "alias": "showActions"; "required": false; }; "allowVersionDelete": { "alias": "allowVersionDelete"; "required": false; }; }, { "restored": "restored"; "deleted": "deleted"; "viewVersion": "viewVersion"; }, never, never, true, never>; }