@alfresco/adf-content-services
Version:
Alfresco ADF content services
70 lines (69 loc) • 3.41 kB
TypeScript
/*!
* @license
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EventEmitter, OnInit } from '@angular/core';
import { Node, Version } from '@alfresco/js-api';
import { ContentService } from '../common/services/content.service';
import { UploadService } from '../common/services/upload.service';
import { FileUploadErrorEvent, FileUploadEvent } from '../common/events/file.event';
import * as i0 from "@angular/core";
export declare class VersionUploadComponent implements OnInit {
private contentService;
private uploadService;
semanticVersion: string;
comment: string;
uploadVersion: boolean;
disabled: boolean;
majorVersion: string;
minorVersion: string;
/** The target node. */
node: Node;
/** New file for updating current version. */
newFileVersion: File;
/** Toggles showing/hiding upload button. */
showUploadButton: boolean;
/** Toggles showing/hiding of cancel button. */
showCancelButton: boolean;
/** Current version for a target node */
set currentVersion(version: Version);
/** Emitted when the file is uploaded successfully. */
success: EventEmitter<any>;
/** Emitted when an error occurs. */
error: EventEmitter<FileUploadErrorEvent>;
/** Emitted when an cancelling during upload. */
cancel: EventEmitter<any>;
/** Emitted when the version is changed. */
versionChanged: EventEmitter<boolean>;
/** Emitted when the comment is changed. */
commentChanged: EventEmitter<string>;
/** Emitted when the upload starts */
uploadStarted: EventEmitter<FileUploadEvent>;
private readonly destroyRef;
constructor(contentService: ContentService, uploadService: UploadService);
ngOnInit(): void;
canUpload(): boolean;
isMajorVersion(): boolean;
cancelUpload(): void;
onVersionChange(): void;
onCommentChange(): void;
onSuccess(event: any): void;
onError(event: FileUploadErrorEvent): void;
getNextMinorVersion(version: string): string;
getNextMajorVersion(version: string): string;
private getParsedVersion;
static ɵfac: i0.ɵɵFactoryDeclaration<VersionUploadComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<VersionUploadComponent, "adf-version-upload", never, { "node": { "alias": "node"; "required": true; }; "newFileVersion": { "alias": "newFileVersion"; "required": false; }; "showUploadButton": { "alias": "showUploadButton"; "required": false; }; "showCancelButton": { "alias": "showCancelButton"; "required": false; }; "currentVersion": { "alias": "currentVersion"; "required": false; }; }, { "success": "success"; "error": "error"; "cancel": "cancel"; "versionChanged": "versionChanged"; "commentChanged": "commentChanged"; "uploadStarted": "uploadStarted"; }, never, never, true, never>;
}