[ADF-1769] Added JSDocs and prop tables (#2913)

This commit is contained in:
Andy Stark
2018-02-05 19:05:48 +00:00
committed by Eugenio Romano
parent b232d05c4f
commit 03cca19599
22 changed files with 302 additions and 166 deletions

View File

@@ -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>();

View File

@@ -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;

View File

@@ -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>();