mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs for directives (#2964)
This commit is contained in:
committed by
Eugenio Romano
parent
d731cc651c
commit
b45048b5ed
@@ -25,12 +25,15 @@ import { HighlightTransformService, HightlightTransformResult } from '../service
|
||||
})
|
||||
export class HighlightDirective {
|
||||
|
||||
/** Class selector for highlightable elements. */
|
||||
@Input('adf-highlight-selector')
|
||||
selector: string = '';
|
||||
|
||||
/** Text to highlight. */
|
||||
@Input('adf-highlight')
|
||||
search: string = '';
|
||||
|
||||
/** CSS class used to apply highlighting. */
|
||||
@Input('adf-highlight-class')
|
||||
classToApply: string = 'adf-highlight';
|
||||
|
||||
|
@@ -53,12 +53,17 @@ interface ProcessStatus {
|
||||
selector: '[adf-delete]'
|
||||
})
|
||||
export class NodeDeleteDirective implements OnChanges {
|
||||
/** Array of nodes to delete. */
|
||||
@Input('adf-delete')
|
||||
selection: MinimalNodeEntity[];
|
||||
|
||||
/** If true then the nodes are deleted immediately rather than being
|
||||
* put in the trash.
|
||||
*/
|
||||
@Input()
|
||||
permanent: boolean = false;
|
||||
|
||||
/** Emitted when the nodes have been deleted. */
|
||||
@Output()
|
||||
delete: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
|
@@ -31,9 +31,11 @@ import 'rxjs/observable/forkJoin';
|
||||
export class NodeFavoriteDirective implements OnChanges {
|
||||
private favorites: any[] = [];
|
||||
|
||||
/** Array of nodes to toggle as favorites. */
|
||||
@Input('adf-node-favorite')
|
||||
selection: MinimalNodeEntity[] = [];
|
||||
|
||||
/** Emitted when the favorite setting is complete. */
|
||||
@Output() toggle: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@HostListener('click')
|
||||
|
@@ -31,9 +31,13 @@ export interface NodePermissionSubject {
|
||||
})
|
||||
export class NodePermissionDirective implements OnChanges {
|
||||
|
||||
/** Node permission to check (create, delete, update, updatePermissions,
|
||||
* !create, !delete, !update, !updatePermissions).
|
||||
*/
|
||||
@Input('adf-node-permission')
|
||||
permission: string = null;
|
||||
|
||||
/** Nodes to check permission for. */
|
||||
@Input('adf-nodes')
|
||||
nodes: MinimalNodeEntity[] = [];
|
||||
|
||||
|
@@ -34,12 +34,15 @@ import 'rxjs/add/operator/mergeMap';
|
||||
export class NodeRestoreDirective {
|
||||
private restoreProcessStatus;
|
||||
|
||||
/** Array of deleted nodes to restore. */
|
||||
@Input('adf-restore')
|
||||
selection: DeletedNodeEntry[];
|
||||
|
||||
/** Path to restored node. */
|
||||
@Input()
|
||||
location: string = '';
|
||||
|
||||
/** Emitted when restoration is complete. */
|
||||
@Output()
|
||||
restore: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
|
@@ -25,21 +25,29 @@ import { FileInfo, FileUtils } from '../utils/file-utils';
|
||||
})
|
||||
export class UploadDirective implements OnInit, OnDestroy {
|
||||
|
||||
/** Enables/disables uploading. */
|
||||
@Input('adf-upload')
|
||||
enabled: boolean = true;
|
||||
|
||||
/** Data to upload. */
|
||||
@Input('adf-upload-data')
|
||||
data: any;
|
||||
|
||||
/** Upload mode. Can be "drop" (receives dropped files) or "click"
|
||||
* (clicking opens a file dialog). Both modes can be active at once.
|
||||
*/
|
||||
@Input()
|
||||
mode: string[] = ['drop']; // click|drop
|
||||
|
||||
/** Toggles multiple file uploads. */
|
||||
@Input()
|
||||
multiple: boolean;
|
||||
|
||||
/** (Click mode only) MIME type filter for files to accept. */
|
||||
@Input()
|
||||
accept: string;
|
||||
|
||||
/** (Click mode only) Toggles uploading of directories. */
|
||||
@Input()
|
||||
directory: boolean;
|
||||
|
||||
|
Reference in New Issue
Block a user