@alfresco/adf-content-services
Version:
Alfresco ADF content services
72 lines (71 loc) • 3.93 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, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
import { ContentActionHandler } from '../../models/content-action.model';
import { DocumentActionsService } from '../../services/document-actions.service';
import { FolderActionsService } from '../../services/folder-actions.service';
import { ContentActionModel } from './../../models/content-action.model';
import { ContentActionListComponent } from './content-action-list.component';
import * as i0 from "@angular/core";
export declare class ContentActionComponent implements OnInit, OnChanges, OnDestroy {
private list;
private documentActions;
private folderActions;
/** The title of the action as shown in the menu. */
title: string;
/** The name of the icon to display next to the menu command (can be left blank). */
icon: string;
/** Visibility state (see examples). */
visible: boolean | ((...args: any[]) => boolean);
/** System actions. Can be "delete", "download", "copy" or "move". */
handler: string;
/** Type of item that the action applies to. Can be "document" or "folder" */
target: string;
/** The permission type. */
permission: string;
/** Should this action be disabled in the menu if the user doesn't have permission for it? */
disableWithNoPermission: boolean;
/** Is the menu item disabled? */
disabled: boolean | ((...args: any[]) => boolean);
/** Emitted when the user selects the action from the menu. */
execute: EventEmitter<any>;
/** Emitted when a permission error occurs */
permissionEvent: EventEmitter<any>;
/**
* Emitted when an error occurs during the action.
* Applies to copy and move actions.
*/
error: EventEmitter<any>;
/**
* Emitted when the action succeeds with the success string message.
* Applies to copy, move and delete actions.
*/
success: EventEmitter<any>;
documentActionModel: ContentActionModel;
folderActionModel: ContentActionModel;
private subscriptions;
constructor(list: ContentActionListComponent, documentActions: DocumentActionsService, folderActions: FolderActionsService);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
register(model: ContentActionModel): boolean;
unregister(model: ContentActionModel): boolean;
private generateAction;
getSystemHandler(target: string, name: string): ContentActionHandler;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentActionComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentActionComponent, "content-action", never, { "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "handler": { "alias": "handler"; "required": false; }; "target": { "alias": "target"; "required": false; }; "permission": { "alias": "permission"; "required": false; }; "disableWithNoPermission": { "alias": "disableWithNoPermission"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "execute": "execute"; "permissionEvent": "permissionEvent"; "error": "error"; "success": "success"; }, never, never, true, never>;
}