mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDoc for components (#2823)
* [ADF-1769] Added JSDoc for components * [ADF-1769] Fixed tslint error with trailing whitespace
This commit is contained in:
committed by
Eugenio Romano
parent
f6cf036769
commit
72cfd7894d
@@ -70,94 +70,140 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
|||||||
|
|
||||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||||
|
|
||||||
|
/* Define a set of CSS styles styles to apply depending on the permission
|
||||||
|
* of the user on that node. See the [Permission Style model](permissions-style.model.md)
|
||||||
|
* page for further details and examples.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
permissionsStyle: PermissionStyleModel[] = [];
|
permissionsStyle: PermissionStyleModel[] = [];
|
||||||
|
|
||||||
|
/* The default route for all the location-based columns (if declared). */
|
||||||
@Input()
|
@Input()
|
||||||
locationFormat: string = '/';
|
locationFormat: string = '/';
|
||||||
|
|
||||||
|
/* Toggles navigation to folder content or file preview */
|
||||||
@Input()
|
@Input()
|
||||||
navigate: boolean = true;
|
navigate: boolean = true;
|
||||||
|
|
||||||
|
/* User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". */
|
||||||
@Input()
|
@Input()
|
||||||
navigationMode: string = DocumentListComponent.DOUBLE_CLICK_NAVIGATION; // click|dblclick
|
navigationMode: string = DocumentListComponent.DOUBLE_CLICK_NAVIGATION; // click|dblclick
|
||||||
|
|
||||||
|
/* Show document thumbnails rather than icons */
|
||||||
@Input()
|
@Input()
|
||||||
thumbnails: boolean = false;
|
thumbnails: boolean = false;
|
||||||
|
|
||||||
|
/* Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode,
|
||||||
|
* you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
selectionMode: string = 'single'; // null|single|multiple
|
selectionMode: string = 'single'; // null|single|multiple
|
||||||
|
|
||||||
|
/* Toggles multiselect mode */
|
||||||
@Input()
|
@Input()
|
||||||
multiselect: boolean = false;
|
multiselect: boolean = false;
|
||||||
|
|
||||||
|
/* Toggles content actions for each row */
|
||||||
@Input()
|
@Input()
|
||||||
contentActions: boolean = false;
|
contentActions: boolean = false;
|
||||||
|
|
||||||
|
/* Position of the content actions dropdown menu. Can be set to "left" or "right". */
|
||||||
@Input()
|
@Input()
|
||||||
contentActionsPosition: string = 'right'; // left|right
|
contentActionsPosition: string = 'right'; // left|right
|
||||||
|
|
||||||
|
/* Toggles context menus for each row */
|
||||||
@Input()
|
@Input()
|
||||||
contextMenuActions: boolean = false;
|
contextMenuActions: boolean = false;
|
||||||
|
|
||||||
|
/* Custom image for empty folder */
|
||||||
@Input()
|
@Input()
|
||||||
emptyFolderImageUrl: string = './assets/images/empty_doc_lib.svg';
|
emptyFolderImageUrl: string = './assets/images/empty_doc_lib.svg';
|
||||||
|
|
||||||
|
/* Toggle file drop support for rows (see **UploadDirective** for further details */
|
||||||
@Input()
|
@Input()
|
||||||
allowDropFiles: boolean = false;
|
allowDropFiles: boolean = false;
|
||||||
|
|
||||||
|
/* Defines default sorting. The format is an array of 2 strings `[key, direction]`
|
||||||
|
* i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to
|
||||||
|
* override the default sorting detected by the component based on columns.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
sorting: string[];
|
sorting: string[];
|
||||||
|
|
||||||
|
/* The inline style to apply to every row. See
|
||||||
|
* [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html)
|
||||||
|
* docs for more details and usage examples.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
rowStyle: string;
|
rowStyle: string;
|
||||||
|
|
||||||
|
/* The CSS class to apply to every row */
|
||||||
@Input()
|
@Input()
|
||||||
rowStyleClass: string;
|
rowStyleClass: string;
|
||||||
|
|
||||||
|
/* Toggles the loading state and animated spinners for the component. Used in
|
||||||
|
* combination with `navigate=false` to perform custom navigation and loading
|
||||||
|
* state indication.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
|
|
||||||
|
/* Custom row filter */
|
||||||
@Input()
|
@Input()
|
||||||
rowFilter: any | null = null;
|
rowFilter: any | null = null;
|
||||||
|
|
||||||
|
/* Custom image resolver */
|
||||||
@Input()
|
@Input()
|
||||||
imageResolver: any | null = null;
|
imageResolver: any | null = null;
|
||||||
|
|
||||||
// The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
|
/* The ID of the folder node to display or a reserved string alias for special sources */
|
||||||
@Input()
|
@Input()
|
||||||
currentFolderId: string = null;
|
currentFolderId: string = null;
|
||||||
|
|
||||||
|
/* Currently displayed folder node */
|
||||||
@Input()
|
@Input()
|
||||||
folderNode: MinimalNodeEntryEntity = null;
|
folderNode: MinimalNodeEntryEntity = null;
|
||||||
|
|
||||||
|
/* Document list will show all the nodes contained in the NodePaging entity */
|
||||||
@Input()
|
@Input()
|
||||||
node: NodePaging = null;
|
node: NodePaging = null;
|
||||||
|
|
||||||
|
/* Default value is stored into user preference settings */
|
||||||
@Input()
|
@Input()
|
||||||
maxItems: number;
|
maxItems: number;
|
||||||
|
|
||||||
|
/* element to skip over for pagination purpose */
|
||||||
@Input()
|
@Input()
|
||||||
skipCount: number = 0;
|
skipCount: number = 0;
|
||||||
|
|
||||||
|
/* Enable documentlist to work into infinite scrolling mode */
|
||||||
@Input()
|
@Input()
|
||||||
enableInfiniteScrolling: boolean = false;
|
enableInfiniteScrolling: boolean = false;
|
||||||
|
|
||||||
|
/* Emitted when the user clicks a list node */
|
||||||
@Output()
|
@Output()
|
||||||
nodeClick: EventEmitter<NodeEntityEvent> = new EventEmitter<NodeEntityEvent>();
|
nodeClick: EventEmitter<NodeEntityEvent> = new EventEmitter<NodeEntityEvent>();
|
||||||
|
|
||||||
|
/* Emitted when the user double-clicks a list node */
|
||||||
@Output()
|
@Output()
|
||||||
nodeDblClick: EventEmitter<NodeEntityEvent> = new EventEmitter<NodeEntityEvent>();
|
nodeDblClick: EventEmitter<NodeEntityEvent> = new EventEmitter<NodeEntityEvent>();
|
||||||
|
|
||||||
|
/* Emitted when the current display folder changes */
|
||||||
@Output()
|
@Output()
|
||||||
folderChange: EventEmitter<NodeEntryEvent> = new EventEmitter<NodeEntryEvent>();
|
folderChange: EventEmitter<NodeEntryEvent> = new EventEmitter<NodeEntryEvent>();
|
||||||
|
|
||||||
|
/* Emitted when the user acts upon files with either single or double click
|
||||||
|
* (depends on `navigation-mode`). Useful for integration with the
|
||||||
|
* Viewer component.
|
||||||
|
*/
|
||||||
@Output()
|
@Output()
|
||||||
preview: EventEmitter<NodeEntityEvent> = new EventEmitter<NodeEntityEvent>();
|
preview: EventEmitter<NodeEntityEvent> = new EventEmitter<NodeEntityEvent>();
|
||||||
|
|
||||||
|
/* Emitted when the Document List has loaded all items and is ready for use */
|
||||||
@Output()
|
@Output()
|
||||||
ready: EventEmitter<NodePaging> = new EventEmitter();
|
ready: EventEmitter<NodePaging> = new EventEmitter();
|
||||||
|
|
||||||
|
/* Emitted when the API fails to get the Document List data */
|
||||||
@Output()
|
@Output()
|
||||||
error: EventEmitter<any> = new EventEmitter();
|
error: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
|
@@ -49,57 +49,82 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck
|
|||||||
@ContentChild(DataColumnListComponent)
|
@ContentChild(DataColumnListComponent)
|
||||||
columnList: DataColumnListComponent;
|
columnList: DataColumnListComponent;
|
||||||
|
|
||||||
|
/* Data source for the table */
|
||||||
@Input()
|
@Input()
|
||||||
data: DataTableAdapter;
|
data: DataTableAdapter;
|
||||||
|
|
||||||
|
/* The rows that the datatable will show */
|
||||||
@Input()
|
@Input()
|
||||||
rows: any[] = [];
|
rows: any[] = [];
|
||||||
|
|
||||||
|
/* Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode,
|
||||||
|
* you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
selectionMode: string = 'single'; // none|single|multiple
|
selectionMode: string = 'single'; // none|single|multiple
|
||||||
|
|
||||||
|
/* Toggles multiple row selection, which renders checkboxes at the beginning of each row */
|
||||||
@Input()
|
@Input()
|
||||||
multiselect: boolean = false;
|
multiselect: boolean = false;
|
||||||
|
|
||||||
|
/* Toggles data actions column */
|
||||||
@Input()
|
@Input()
|
||||||
actions: boolean = false;
|
actions: boolean = false;
|
||||||
|
|
||||||
|
/* Position of the actions dropdown menu. Can be "left" or "right". */
|
||||||
@Input()
|
@Input()
|
||||||
actionsPosition: string = 'right'; // left|right
|
actionsPosition: string = 'right'; // left|right
|
||||||
|
|
||||||
|
/* Fallback image for row where thumbnail is missing */
|
||||||
@Input()
|
@Input()
|
||||||
fallbackThumbnail: string;
|
fallbackThumbnail: string;
|
||||||
|
|
||||||
|
/* Toggles custom context menu for the component */
|
||||||
@Input()
|
@Input()
|
||||||
contextMenu: boolean = false;
|
contextMenu: boolean = false;
|
||||||
|
|
||||||
|
/* Toggle file drop support for rows (see Upload Directive for further details) */
|
||||||
@Input()
|
@Input()
|
||||||
allowDropFiles: boolean = false;
|
allowDropFiles: boolean = false;
|
||||||
|
|
||||||
|
/* The inline style to apply to every row. See
|
||||||
|
* [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html)
|
||||||
|
* docs for more details and usage examples.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
rowStyle: string;
|
rowStyle: string;
|
||||||
|
|
||||||
|
/* The CSS class to apply to every row */
|
||||||
@Input()
|
@Input()
|
||||||
rowStyleClass: string = '';
|
rowStyleClass: string = '';
|
||||||
|
|
||||||
|
/* Toggles the header */
|
||||||
@Input()
|
@Input()
|
||||||
showHeader: boolean = true;
|
showHeader: boolean = true;
|
||||||
|
|
||||||
|
/* Emitted when user clicks the row */
|
||||||
@Output()
|
@Output()
|
||||||
rowClick = new EventEmitter<DataRowEvent>();
|
rowClick = new EventEmitter<DataRowEvent>();
|
||||||
|
|
||||||
|
/* Emitted when user double-clicks the row */
|
||||||
@Output()
|
@Output()
|
||||||
rowDblClick = new EventEmitter<DataRowEvent>();
|
rowDblClick = new EventEmitter<DataRowEvent>();
|
||||||
|
|
||||||
|
/* Emitted before context menu is displayed for a row */
|
||||||
@Output()
|
@Output()
|
||||||
showRowContextMenu = new EventEmitter<DataCellEvent>();
|
showRowContextMenu = new EventEmitter<DataCellEvent>();
|
||||||
|
|
||||||
|
/* Emitted before actions menu is displayed for a row */
|
||||||
@Output()
|
@Output()
|
||||||
showRowActionsMenu = new EventEmitter<DataCellEvent>();
|
showRowActionsMenu = new EventEmitter<DataCellEvent>();
|
||||||
|
|
||||||
|
/* Emitted when row action is executed by user */
|
||||||
@Output()
|
@Output()
|
||||||
executeRowAction = new EventEmitter<DataRowActionEvent>();
|
executeRowAction = new EventEmitter<DataRowActionEvent>();
|
||||||
|
|
||||||
|
/* Flag that indicates if the datatable is in loading state and needs to show the
|
||||||
|
* loading template (see the docs to learn how to configure a loading template).
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
|
|
||||||
|
@@ -55,45 +55,61 @@ export class LoginComponent implements OnInit {
|
|||||||
|
|
||||||
isPasswordShow: boolean = false;
|
isPasswordShow: boolean = false;
|
||||||
|
|
||||||
|
/* Should the `Remember me` checkbox be shown? */
|
||||||
@Input()
|
@Input()
|
||||||
showRememberMe: boolean = true;
|
showRememberMe: boolean = true;
|
||||||
|
|
||||||
|
/* Should the extra actions (`Need Help`, `Register`, etc) be shown? */
|
||||||
@Input()
|
@Input()
|
||||||
showLoginActions: boolean = true;
|
showLoginActions: boolean = true;
|
||||||
|
|
||||||
|
/* Sets the URL of the NEED HELP link in the footer */
|
||||||
@Input()
|
@Input()
|
||||||
needHelpLink: string = '';
|
needHelpLink: string = '';
|
||||||
|
|
||||||
|
/* Sets the URL of the REGISTER link in the footer */
|
||||||
@Input()
|
@Input()
|
||||||
registerLink: string = '';
|
registerLink: string = '';
|
||||||
|
|
||||||
|
/* Path to a custom logo image */
|
||||||
@Input()
|
@Input()
|
||||||
logoImageUrl: string = './assets/images/alfresco-logo.svg';
|
logoImageUrl: string = './assets/images/alfresco-logo.svg';
|
||||||
|
|
||||||
|
/* Path to a custom background image */
|
||||||
@Input()
|
@Input()
|
||||||
backgroundImageUrl: string = './assets/images/background.svg';
|
backgroundImageUrl: string = './assets/images/background.svg';
|
||||||
|
|
||||||
|
/* The copyright text below the login box */
|
||||||
@Input()
|
@Input()
|
||||||
copyrightText: string = '\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.';
|
copyrightText: string = '\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.';
|
||||||
|
|
||||||
|
/* Possible valid values are ECM, BPM or ALL. By default, this component
|
||||||
|
* will log in only to ECM. If you want to log in in both systems then use ALL.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
providers: string;
|
providers: string;
|
||||||
|
|
||||||
|
/* Custom validation rules for the login form */
|
||||||
@Input()
|
@Input()
|
||||||
fieldsValidation: any;
|
fieldsValidation: any;
|
||||||
|
|
||||||
|
/* Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. */
|
||||||
@Input()
|
@Input()
|
||||||
disableCsrf: boolean;
|
disableCsrf: boolean;
|
||||||
|
|
||||||
|
/* Route to redirect to on successful login. */
|
||||||
@Input()
|
@Input()
|
||||||
successRoute: string = null;
|
successRoute: string = null;
|
||||||
|
|
||||||
|
/* Emitted when the login is successful */
|
||||||
@Output()
|
@Output()
|
||||||
success = new EventEmitter<LoginSuccessEvent>();
|
success = new EventEmitter<LoginSuccessEvent>();
|
||||||
|
|
||||||
|
/* Emitted when the login fails */
|
||||||
@Output()
|
@Output()
|
||||||
error = new EventEmitter<LoginErrorEvent>();
|
error = new EventEmitter<LoginErrorEvent>();
|
||||||
|
|
||||||
|
/* Emitted when the login form is submitted */
|
||||||
@Output()
|
@Output()
|
||||||
executeSubmit = new EventEmitter<LoginSubmitEvent>();
|
executeSubmit = new EventEmitter<LoginSubmitEvent>();
|
||||||
|
|
||||||
|
@@ -36,48 +36,74 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
|||||||
|
|
||||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||||
|
|
||||||
|
/* The id of the app. */
|
||||||
@Input()
|
@Input()
|
||||||
appId: number;
|
appId: number;
|
||||||
|
|
||||||
|
/* The Instance Id of the process. */
|
||||||
@Input()
|
@Input()
|
||||||
processInstanceId: string;
|
processInstanceId: string;
|
||||||
|
|
||||||
|
/* The Definition Key of the process. */
|
||||||
@Input()
|
@Input()
|
||||||
processDefinitionKey: string;
|
processDefinitionKey: string;
|
||||||
|
|
||||||
|
/* Current state of the process. Possible values are: `completed`, `active`. */
|
||||||
@Input()
|
@Input()
|
||||||
state: string;
|
state: string;
|
||||||
|
|
||||||
|
/* The assignment of the process. Possible values are: "assignee" (the current user
|
||||||
|
* is the assignee), candidate (the current user is a task candidate", "group_x" (the task
|
||||||
|
* is assigned to a group where the current user is a member,
|
||||||
|
* no value(the current user is involved).
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
assignment: string;
|
assignment: string;
|
||||||
|
|
||||||
|
/* Define the sort order of the processes. Possible values are : `created-desc`,
|
||||||
|
* `created-asc`, `due-desc`, `due-asc`
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
sort: string;
|
sort: string;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
/* Define which task id should be selected after reloading. If the task id doesn't
|
||||||
|
* exist or nothing is passed then the first task will be selected.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
landingTaskId: string;
|
landingTaskId: string;
|
||||||
|
|
||||||
|
/* Data source object that represents the number and the type of the columns that
|
||||||
|
* you want to show.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
data: DataTableAdapter;
|
data: DataTableAdapter;
|
||||||
|
|
||||||
|
/* Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode,
|
||||||
|
* you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for
|
||||||
|
* multiple rows.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
selectionMode: string = 'single'; // none|single|multiple
|
selectionMode: string = 'single'; // none|single|multiple
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
presetColumn: string;
|
presetColumn: string;
|
||||||
|
|
||||||
|
/* Toggles multiple row selection, renders checkboxes at the beginning of each row */
|
||||||
@Input()
|
@Input()
|
||||||
multiselect: boolean = false;
|
multiselect: boolean = false;
|
||||||
|
|
||||||
|
/* Emitted when a task in the list is clicked */
|
||||||
@Output()
|
@Output()
|
||||||
rowClick: EventEmitter<string> = new EventEmitter<string>();
|
rowClick: EventEmitter<string> = new EventEmitter<string>();
|
||||||
|
|
||||||
|
/* Emitted when rows are selected/unselected */
|
||||||
@Output()
|
@Output()
|
||||||
rowsSelected: EventEmitter<any[]> = new EventEmitter<any[]>();
|
rowsSelected: EventEmitter<any[]> = new EventEmitter<any[]>();
|
||||||
|
|
||||||
|
/* Emitted when the task list is loaded */
|
||||||
@Output()
|
@Output()
|
||||||
success: EventEmitter<any> = new EventEmitter<any>();
|
success: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
@@ -88,9 +114,11 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
|||||||
selectedInstances: any[];
|
selectedInstances: any[];
|
||||||
layoutPresets = {};
|
layoutPresets = {};
|
||||||
|
|
||||||
|
/* The page number of the tasks to fetch. */
|
||||||
@Input()
|
@Input()
|
||||||
page: number = 0;
|
page: number = 0;
|
||||||
|
|
||||||
|
/* The number of tasks to fetch. */
|
||||||
@Input()
|
@Input()
|
||||||
size: number = DEFAULT_SIZE;
|
size: number = DEFAULT_SIZE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user