mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs and prop tables (#2913)
This commit is contained in:
committed by
Eugenio Romano
parent
b232d05c4f
commit
03cca19599
@@ -53,42 +53,59 @@ import 'rxjs/add/observable/throw';
|
||||
})
|
||||
export class UploadButtonComponent implements OnInit, OnChanges, NodePermissionSubject {
|
||||
|
||||
/** Toggles component disabled state (if there is no node permission checking). */
|
||||
@Input()
|
||||
disabled: boolean = false;
|
||||
|
||||
/** Allows/disallows upload folders (only for Chrome). */
|
||||
@Input()
|
||||
uploadFolders: boolean = false;
|
||||
|
||||
/** Allows/disallows multiple files */
|
||||
@Input()
|
||||
multipleFiles: boolean = false;
|
||||
|
||||
/** Toggles versioning. */
|
||||
@Input()
|
||||
versioning: boolean = false;
|
||||
|
||||
/** List of allowed file extensions, for example: ".jpg,.gif,.png,.svg". */
|
||||
@Input()
|
||||
acceptedFilesType: string = '*';
|
||||
|
||||
/** Sets a limit on the maximum size (in bytes) of a file to be uploaded.
|
||||
* Has no effect if undefined.
|
||||
*/
|
||||
@Input()
|
||||
maxFilesSize: number;
|
||||
|
||||
/** Defines the text of the upload button. */
|
||||
@Input()
|
||||
staticTitle: string;
|
||||
|
||||
/** Custom tooltip text. */
|
||||
@Input()
|
||||
tooltip: string = null;
|
||||
|
||||
/** The ID of the root. Use the nodeId for
|
||||
* Content Services or the taskId/processId for Process Services.
|
||||
*/
|
||||
@Input()
|
||||
rootFolderId: string = '-root-';
|
||||
|
||||
/** Emitted when the file is uploaded successfully. */
|
||||
@Output()
|
||||
success = new EventEmitter();
|
||||
|
||||
/** Emitted when an error occurs. */
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
/** Emitted when a folder is created. */
|
||||
@Output()
|
||||
createFolder = new EventEmitter();
|
||||
|
||||
/** Emitted when delete permission is missing. */
|
||||
@Output()
|
||||
permissionEvent: EventEmitter<PermissionModel> = new EventEmitter<PermissionModel>();
|
||||
|
||||
|
@@ -38,15 +38,21 @@ import { Component, EventEmitter, forwardRef, Input, Output, ViewEncapsulation }
|
||||
})
|
||||
export class UploadDragAreaComponent implements NodePermissionSubject {
|
||||
|
||||
/** Toggle component disabled state. */
|
||||
@Input()
|
||||
disabled: boolean = false;
|
||||
|
||||
/** When false, renames the file using an integer suffix if there is a name clash.
|
||||
* Set to true to indicate that a major version should be created instead.
|
||||
*/
|
||||
@Input()
|
||||
versioning: boolean = false;
|
||||
|
||||
/** ID of parent folder node. */
|
||||
@Input()
|
||||
parentId: string;
|
||||
|
||||
/** Emitted when the file is uploaded. */
|
||||
@Output()
|
||||
success = new EventEmitter();
|
||||
|
||||
|
@@ -34,6 +34,7 @@ export class VersionListComponent implements OnChanges {
|
||||
versions: any = [];
|
||||
isLoading: boolean = true;
|
||||
|
||||
/** ID of the node whose version history you want to display. */
|
||||
@Input()
|
||||
id: string;
|
||||
|
||||
|
@@ -26,6 +26,7 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
})
|
||||
export class VersionManagerComponent {
|
||||
|
||||
/** The node whose version history you want to manage. */
|
||||
@Input()
|
||||
node: MinimalNodeEntryEntity;
|
||||
}
|
||||
|
@@ -46,24 +46,36 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
|
||||
})
|
||||
export class WebscriptComponent implements OnChanges {
|
||||
|
||||
/** (required) Path to the webscript (as defined by webscript). */
|
||||
@Input()
|
||||
scriptPath: string;
|
||||
|
||||
/** Arguments to pass to the webscript. */
|
||||
@Input()
|
||||
scriptArgs: any;
|
||||
|
||||
/** Toggles whether to show or hide the data. */
|
||||
@Input()
|
||||
showData: boolean = true;
|
||||
|
||||
/** Path where the application is deployed */
|
||||
@Input()
|
||||
contextRoot: string = 'alfresco';
|
||||
|
||||
/** Path that the webscript service is mapped to. */
|
||||
@Input()
|
||||
servicePath: string = 'service';
|
||||
|
||||
/** Content type to interpret the data received from the webscript.
|
||||
* Can be "JSON" , "HTML" , "DATATABLE" or "TEXT"
|
||||
*/
|
||||
@Input()
|
||||
contentType: string = 'TEXT';
|
||||
|
||||
/** Emitted when the operation succeeds. You can get the plain data from
|
||||
* the webscript through the **success** event parameter and use it as you
|
||||
* need in your application.
|
||||
*/
|
||||
@Output()
|
||||
success = new EventEmitter();
|
||||
|
||||
|
@@ -47,9 +47,11 @@ export class WidgetComponent implements AfterViewInit {
|
||||
static DEFAULT_HYPERLINK_URL: string = '#';
|
||||
static DEFAULT_HYPERLINK_SCHEME: string = 'http://';
|
||||
|
||||
/** Does the widget show a read-only value? (ie, can't be edited) */
|
||||
@Input()
|
||||
readOnly: boolean = false;
|
||||
|
||||
/** Data to be displayed in the field */
|
||||
@Input()
|
||||
field: FormFieldModel;
|
||||
|
||||
|
@@ -27,9 +27,11 @@ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@a
|
||||
})
|
||||
export class ToolbarComponent {
|
||||
|
||||
/** Toolbar title. */
|
||||
@Input()
|
||||
title: string = '';
|
||||
|
||||
/** Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. */
|
||||
@Input()
|
||||
color: string;
|
||||
|
||||
|
@@ -30,21 +30,29 @@ import { EcmUserService } from './../services/ecm-user.service';
|
||||
})
|
||||
export class UserInfoComponent implements OnInit {
|
||||
|
||||
/** Custom path for the background banner image for ACS users. */
|
||||
@Input()
|
||||
ecmBackgroundImage: string = './assets/images/ecm-background.png';
|
||||
|
||||
/** Custom path for the background banner image for APS users. */
|
||||
@Input()
|
||||
bpmBackgroundImage: string = './assets/images/bpm-background.png';
|
||||
|
||||
/** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
|
||||
@Input()
|
||||
menuPositionX: string = 'after';
|
||||
|
||||
/** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */
|
||||
@Input()
|
||||
menuPositionY: string = 'below';
|
||||
|
||||
/** Shows/hides the username next to the user info button. */
|
||||
@Input()
|
||||
showName: boolean = true;
|
||||
|
||||
/** When the username is shown, this defines its position relative to the user info button.
|
||||
* Can be `right` or `left`.
|
||||
*/
|
||||
@Input()
|
||||
namePosition: string = 'right';
|
||||
|
||||
|
@@ -50,102 +50,145 @@ export class ViewerComponent implements OnChanges {
|
||||
@ContentChild(ViewerMoreActionsComponent)
|
||||
mnuMoreActions: ViewerMoreActionsComponent;
|
||||
|
||||
/** If you want to load an external file that does not come from ACS you
|
||||
* can use this URL to specify where to load the file from.
|
||||
*/
|
||||
@Input()
|
||||
urlFile = '';
|
||||
|
||||
/** Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`).
|
||||
* Used when `urlFile` has no filename and extension.
|
||||
*/
|
||||
@Input()
|
||||
urlFileViewer: string = null;
|
||||
|
||||
/** Loads a Blob File */
|
||||
@Input()
|
||||
blobFile: Blob;
|
||||
|
||||
/** Node Id of the file to load. */
|
||||
@Input()
|
||||
fileNodeId: string = null;
|
||||
|
||||
/** Shared link id (to display shared file). */
|
||||
@Input()
|
||||
sharedLinkId: string = null;
|
||||
|
||||
/** If `true` then show the Viewer as a full page over the current content.
|
||||
* Otherwise fit inside the parent div.
|
||||
*/
|
||||
@Input()
|
||||
overlayMode = false;
|
||||
|
||||
/** Hide or show the viewer */
|
||||
@Input()
|
||||
showViewer = true;
|
||||
|
||||
/** Hide or show the toolbar */
|
||||
@Input()
|
||||
showToolbar = true;
|
||||
|
||||
/** Specifies the name of the file when it is not available from the URL. */
|
||||
@Input()
|
||||
displayName: string;
|
||||
|
||||
/** Allows `back` navigation */
|
||||
@Input()
|
||||
allowGoBack = true;
|
||||
|
||||
/** Toggles downloading. */
|
||||
@Input()
|
||||
allowDownload = true;
|
||||
|
||||
/** Toggles printing. */
|
||||
@Input()
|
||||
allowPrint = false;
|
||||
|
||||
/** Toggles sharing. */
|
||||
@Input()
|
||||
allowShare = false;
|
||||
|
||||
/** Toggles the 'Full Screen' feature. */
|
||||
@Input()
|
||||
allowFullScreen = true;
|
||||
|
||||
/** Toggles before/next navigation. You can use the arrow buttons to navigate
|
||||
* between documents in the collection.
|
||||
*/
|
||||
@Input()
|
||||
allowNavigate = false;
|
||||
|
||||
/** Toggles the "before" ("<") button. Requires `allowNavigate` to be enabled. */
|
||||
@Input()
|
||||
canNavigateBefore = true;
|
||||
|
||||
/** Toggles the next (">") button. Requires `allowNavigate` to be enabled. */
|
||||
@Input()
|
||||
canNavigateNext = true;
|
||||
|
||||
/** Toggles the sidebar. */
|
||||
@Input()
|
||||
allowSidebar = false;
|
||||
|
||||
/** Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. */
|
||||
@Input()
|
||||
showSidebar = false;
|
||||
|
||||
/** The position of the sidebar. Can be `left` or `right`. */
|
||||
@Input()
|
||||
sidebarPosition = 'right';
|
||||
|
||||
/** The template for the sidebar. The template context contains the loaded node data. */
|
||||
@Input()
|
||||
sidebarTemplate: TemplateRef<any> = null;
|
||||
|
||||
/** MIME type of the file content (when not determined by the filename extension). */
|
||||
@Input()
|
||||
mimeType: string;
|
||||
|
||||
/** Content filename. */
|
||||
@Input()
|
||||
fileName: string;
|
||||
|
||||
/** URL to download. */
|
||||
@Input()
|
||||
downloadUrl: string = null;
|
||||
|
||||
/** Number of times the Viewer will retry fetching content Rendition.
|
||||
* There is a delay of at least one second between attempts.
|
||||
*/
|
||||
@Input()
|
||||
maxRetries = 5;
|
||||
|
||||
/** Emitted when user clicks the 'Back' button. */
|
||||
@Output()
|
||||
goBack = new EventEmitter<BaseEvent<any>>();
|
||||
|
||||
/** Emitted when user clicks the 'Download' button. */
|
||||
@Output()
|
||||
download = new EventEmitter<BaseEvent<any>>();
|
||||
|
||||
/** Emitted when user clicks the 'Print' button. */
|
||||
@Output()
|
||||
print = new EventEmitter<BaseEvent<any>>();
|
||||
|
||||
/** Emitted when user clicks the 'Share' button. */
|
||||
@Output()
|
||||
share = new EventEmitter<BaseEvent<any>>();
|
||||
|
||||
/** Emitted when the viewer is shown or hidden. */
|
||||
@Output()
|
||||
showViewerChange = new EventEmitter<boolean>();
|
||||
|
||||
/** Emitted when the filename extension changes. */
|
||||
@Output()
|
||||
extensionChange = new EventEmitter<string>();
|
||||
|
||||
/** Emitted when user clicks 'Navigate Before' ("<") button. */
|
||||
@Output()
|
||||
navigateBefore = new EventEmitter();
|
||||
|
||||
/** Emitted when user clicks 'Navigate Next' (">") button. */
|
||||
@Output()
|
||||
navigateNext = new EventEmitter();
|
||||
|
||||
|
@@ -56,72 +56,99 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
@ViewChild('errorDialog')
|
||||
errorDialog: TemplateRef<any>;
|
||||
|
||||
/** Toggles debug mode. */
|
||||
@Input()
|
||||
debugMode: boolean = false;
|
||||
|
||||
/** (**required**) The id of the task whose details we are asking for. */
|
||||
@Input()
|
||||
taskId: string;
|
||||
|
||||
/** Automatically renders the next task when the current one is completed. */
|
||||
@Input()
|
||||
showNextTask: boolean = true;
|
||||
|
||||
/** Toggles task details Header component. */
|
||||
@Input()
|
||||
showHeader: boolean = true;
|
||||
|
||||
/** Toggles collapsed/expanded state of the Header component. */
|
||||
@Input()
|
||||
showHeaderContent: boolean = true;
|
||||
|
||||
/** Toggles `Involve People` feature for the Header component. */
|
||||
@Input()
|
||||
showInvolvePeople: boolean = true;
|
||||
|
||||
/** Toggles `Comments` feature for the Header component. */
|
||||
@Input()
|
||||
showComments: boolean = true;
|
||||
|
||||
/** Toggles `Checklist` feature for the Header component. */
|
||||
@Input()
|
||||
showChecklist: boolean = true;
|
||||
|
||||
/** Toggles rendering of the form title. */
|
||||
@Input()
|
||||
showFormTitle: boolean = true;
|
||||
|
||||
/** Toggles rendering of the `Complete` outcome button. */
|
||||
@Input()
|
||||
showFormCompleteButton: boolean = true;
|
||||
|
||||
/** Toggles rendering of the `Save` outcome button. */
|
||||
@Input()
|
||||
showFormSaveButton: boolean = true;
|
||||
|
||||
/** Toggles read-only state of the form. All form widgets render as read-only
|
||||
* if enabled.
|
||||
*/
|
||||
@Input()
|
||||
readOnlyForm: boolean = false;
|
||||
|
||||
/** Toggles rendering of the `Refresh` button. */
|
||||
@Input()
|
||||
showFormRefreshButton: boolean = true;
|
||||
|
||||
/** Field validators for use with the form. */
|
||||
@Input()
|
||||
fieldValidators: FormFieldValidator[] = [];
|
||||
|
||||
/** Emitted when the form is submitted with the `Save` or custom outcomes. */
|
||||
@Output()
|
||||
formSaved: EventEmitter<FormModel> = new EventEmitter<FormModel>();
|
||||
|
||||
/** Emitted when the form is submitted with the `Complete` outcome. */
|
||||
@Output()
|
||||
formCompleted: EventEmitter<FormModel> = new EventEmitter<FormModel>();
|
||||
|
||||
/** Emitted when the form field content is clicked. */
|
||||
@Output()
|
||||
formContentClicked: EventEmitter<ContentLinkModel> = new EventEmitter<ContentLinkModel>();
|
||||
|
||||
/** Emitted when the form is loaded or reloaded. */
|
||||
@Output()
|
||||
formLoaded: EventEmitter<FormModel> = new EventEmitter<FormModel>();
|
||||
|
||||
/** Emitted when a checklist task is created. */
|
||||
@Output()
|
||||
taskCreated: EventEmitter<TaskDetailsModel> = new EventEmitter<TaskDetailsModel>();
|
||||
|
||||
/** Emitted when a checklist task is deleted. */
|
||||
@Output()
|
||||
taskDeleted: EventEmitter<string> = new EventEmitter<string>();
|
||||
|
||||
/** Emitted when an error occurs. */
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when any outcome is executed. Default behaviour can be prevented
|
||||
* via `event.preventDefault()`.
|
||||
*/
|
||||
@Output()
|
||||
executeOutcome: EventEmitter<FormOutcomeEvent> = new EventEmitter<FormOutcomeEvent>();
|
||||
|
||||
/** Emitted when a task is assigned. */
|
||||
@Output()
|
||||
assignTask: EventEmitter<void> = new EventEmitter<void>();
|
||||
|
||||
|
@@ -30,24 +30,33 @@ import { TaskListService } from './../services/tasklist.service';
|
||||
})
|
||||
export class TaskFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
/** Parameters to use for the task filter. If there is no match then
|
||||
* the default filter (the first one the list) is selected.
|
||||
*/
|
||||
@Input()
|
||||
filterParam: FilterParamsModel;
|
||||
|
||||
/** Emitted when a filter in the list is clicked. */
|
||||
@Output()
|
||||
filterClick: EventEmitter<FilterRepresentationModel> = new EventEmitter<FilterRepresentationModel>();
|
||||
|
||||
/** Emitted when the list is loaded. */
|
||||
@Output()
|
||||
success: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when an error occurs during loading. */
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Display filters available to the current user for the application with the specified ID. */
|
||||
@Input()
|
||||
appId: number;
|
||||
|
||||
/** Display filters available to the current user for the application with the specified name. */
|
||||
@Input()
|
||||
appName: string;
|
||||
|
||||
/** Toggles display of the filter's icon. */
|
||||
@Input()
|
||||
hasIcon: boolean = true;
|
||||
|
||||
|
@@ -29,15 +29,19 @@ import { TaskListService } from './../services/tasklist.service';
|
||||
})
|
||||
export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
|
||||
/** The name of the form. */
|
||||
@Input()
|
||||
formName: string = null;
|
||||
|
||||
/** (required) Details related to the task. */
|
||||
@Input()
|
||||
taskDetails: TaskDetailsModel;
|
||||
|
||||
/** Emitted when the task is claimed. */
|
||||
@Output()
|
||||
claim: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when the task is unclaimed (ie, requeued). */
|
||||
@Output()
|
||||
unclaim: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
Reference in New Issue
Block a user