mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs and updated prop table script (#2838)
* [ADF-1769] Added JSDocs and updated prop table script * [ADF-1769] Fixed lint error in JSDoc
This commit is contained in:
committed by
Eugenio Romano
parent
3461749dc6
commit
c9a3b048b4
@@ -3,6 +3,7 @@ exports.__esModule = true;
|
||||
var ts = require("typescript");
|
||||
var path = require("path");
|
||||
var heading = require("mdast-util-heading-range");
|
||||
var remark = require("remark");
|
||||
var unist = require("../unistHelpers");
|
||||
function initPhase(aggData) {
|
||||
}
|
||||
@@ -84,7 +85,9 @@ function getPropDataFromClass(checker, classDec, inputs, outputs) {
|
||||
var sourceFile = classDec.getSourceFile();
|
||||
for (var i = 0; i < classDec.members.length; i++) {
|
||||
var member = classDec.members[i];
|
||||
if (ts.isPropertyDeclaration(member)) {
|
||||
if (ts.isPropertyDeclaration(member) ||
|
||||
ts.isGetAccessorDeclaration(member) ||
|
||||
ts.isSetAccessorDeclaration(member)) {
|
||||
var prop = member;
|
||||
var mods = ts.getCombinedModifierFlags(prop);
|
||||
var nonPrivate = (mods & ts.ModifierFlags.Private) === 0;
|
||||
@@ -139,7 +142,7 @@ function buildInputsTable(inputs) {
|
||||
//pDesc = pDesc.trim().replace(/[\n\r]+/, " ");
|
||||
pDesc = pDesc.replace(/[\n\r]+/, " ");
|
||||
}
|
||||
var descCellContent = [unist.makeText(pDesc)];
|
||||
var descCellContent = remark().parse(pDesc).children;
|
||||
if (pDefault) {
|
||||
descCellContent.push(unist.makeHTML("<br/>"));
|
||||
descCellContent.push(unist.makeText(" Default value: "));
|
||||
@@ -176,7 +179,7 @@ function buildOutputsTable(outputs) {
|
||||
var cells = [
|
||||
unist.makeTableCell([unist.makeText(eName)]),
|
||||
unist.makeTableCell([unist.makeInlineCode(eType)]),
|
||||
unist.makeTableCell([unist.makeText(eDesc)])
|
||||
unist.makeTableCell(remark().parse(eDesc).children)
|
||||
];
|
||||
rows.push(unist.makeTableRow(cells));
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ import * as path from "path";
|
||||
import * as program from "commander";
|
||||
|
||||
import * as heading from "mdast-util-heading-range";
|
||||
import * as remark from "remark";
|
||||
|
||||
import * as unist from "../unistHelpers";
|
||||
import { JsxEmit } from "typescript";
|
||||
@@ -121,7 +122,9 @@ function getPropDataFromClass(
|
||||
for (var i = 0; i < classDec.members.length; i++) {
|
||||
let member = classDec.members[i];
|
||||
|
||||
if (ts.isPropertyDeclaration(member)) {
|
||||
if (ts.isPropertyDeclaration(member) ||
|
||||
ts.isGetAccessorDeclaration(member) ||
|
||||
ts.isSetAccessorDeclaration(member)) {
|
||||
let prop: ts.PropertyDeclaration = member;
|
||||
|
||||
let mods = ts.getCombinedModifierFlags(prop);
|
||||
@@ -188,7 +191,7 @@ function buildInputsTable(inputs: any[]) {
|
||||
pDesc = pDesc.replace(/[\n\r]+/, " ");
|
||||
}
|
||||
|
||||
var descCellContent = [unist.makeText(pDesc)];
|
||||
var descCellContent = remark().parse(pDesc).children;
|
||||
|
||||
if (pDefault) {
|
||||
descCellContent.push(unist.makeHTML("<br/>"));
|
||||
@@ -235,7 +238,7 @@ function buildOutputsTable(outputs: any[]) {
|
||||
var cells = [
|
||||
unist.makeTableCell([unist.makeText(eName)]),
|
||||
unist.makeTableCell([unist.makeInlineCode(eType)]),
|
||||
unist.makeTableCell([unist.makeText(eDesc)])
|
||||
unist.makeTableCell(remark().parse(eDesc).children)
|
||||
];
|
||||
|
||||
rows.push(unist.makeTableRow(cells));
|
||||
|
@@ -30,15 +30,26 @@ import { DocumentListComponent } from '../document-list';
|
||||
})
|
||||
export class BreadcrumbComponent implements OnChanges {
|
||||
|
||||
/** Active node, builds UI based on folderNode.path.elements collection. */
|
||||
@Input()
|
||||
folderNode: MinimalNodeEntryEntity = null;
|
||||
|
||||
/** (optional) Name of the root element of the breadcrumb. You can use
|
||||
* this property to rename "Company Home" to "Personal Files" for
|
||||
* example. You can use an i18n resource key for the property value.
|
||||
*/
|
||||
@Input()
|
||||
root: string = null;
|
||||
|
||||
/** (optional) The id of the root element. You can use this property
|
||||
* to set a custom element the breadcrumb should start with.
|
||||
*/
|
||||
@Input()
|
||||
rootId: string = null;
|
||||
|
||||
/** (optional) Document List component to operate with. The list will
|
||||
* update when the breadcrumb is clicked.
|
||||
*/
|
||||
@Input()
|
||||
target: DocumentListComponent;
|
||||
|
||||
@@ -48,6 +59,7 @@ export class BreadcrumbComponent implements OnChanges {
|
||||
return !!this.root;
|
||||
}
|
||||
|
||||
/** Emitted when the user clicks on a breadcrumb. */
|
||||
@Output()
|
||||
navigate: EventEmitter<PathElementEntity> = new EventEmitter<PathElementEntity>();
|
||||
|
||||
|
@@ -35,36 +35,51 @@ import { ContentActionListComponent } from './content-action-list.component';
|
||||
})
|
||||
export class ContentActionComponent implements OnInit, OnChanges {
|
||||
|
||||
/** The title of the action as shown in the menu. */
|
||||
@Input()
|
||||
title: string = 'Action';
|
||||
|
||||
/** The name of the icon to display next to the menu command (can be left blank). */
|
||||
@Input()
|
||||
icon: string;
|
||||
|
||||
/** System actions. Can be "delete", "download", "copy" or "move". */
|
||||
@Input()
|
||||
handler: string;
|
||||
|
||||
/** Type of item that the action appies to. Can be "document" or "folder" */
|
||||
@Input()
|
||||
target: string;
|
||||
|
||||
/** The permission type. */
|
||||
@Input()
|
||||
permission: string;
|
||||
|
||||
/** Should this action be disabled in the menu if the user doesn't have permission for it? */
|
||||
@Input()
|
||||
disableWithNoPermission: boolean;
|
||||
|
||||
/** Is the menu item disabled? */
|
||||
@Input()
|
||||
disabled: boolean = false;
|
||||
|
||||
/** Emitted when the user selects the action from the menu. */
|
||||
@Output()
|
||||
execute = new EventEmitter();
|
||||
|
||||
/** Emitted when a permission error occurs */
|
||||
@Output()
|
||||
permissionEvent = new EventEmitter();
|
||||
|
||||
/** Emitted when an error occurs during the action.
|
||||
* Applies to copy and move actions.
|
||||
*/
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
/** Emitted when the action succeeds with the success string message.
|
||||
* Applies to copy, move and delete actions.
|
||||
*/
|
||||
@Output()
|
||||
success = new EventEmitter();
|
||||
|
||||
|
@@ -31,21 +31,27 @@ export class AccordionGroupComponent implements OnDestroy {
|
||||
@ViewChild('contentWrapper')
|
||||
contentWrapper: any;
|
||||
|
||||
/** Title heading for the group. */
|
||||
@Input()
|
||||
heading: string;
|
||||
|
||||
/** The material design icon. */
|
||||
@Input()
|
||||
headingIcon: string;
|
||||
|
||||
/** Tooltip message to be shown for headingIcon */
|
||||
@Input()
|
||||
headingIconTooltip: string;
|
||||
|
||||
/** Should the (expanded) accordion icon be shown? */
|
||||
@Input()
|
||||
hasAccordionIcon: boolean = true;
|
||||
|
||||
/** Emitted when the heading is clicked. */
|
||||
@Output()
|
||||
headingClick: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Is this group currently open? */
|
||||
@Input()
|
||||
set isOpen(value: boolean) {
|
||||
this._isOpen = value;
|
||||
@@ -58,6 +64,7 @@ export class AccordionGroupComponent implements OnDestroy {
|
||||
return this._isOpen;
|
||||
}
|
||||
|
||||
/** Is this group currently selected? */
|
||||
@Input()
|
||||
set isSelected(value: boolean) {
|
||||
this._isSelected = value;
|
||||
|
@@ -25,33 +25,44 @@ import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/co
|
||||
})
|
||||
export class DataColumnComponent implements OnInit {
|
||||
|
||||
/** Data source key. Can be either a column/property key like `title`
|
||||
* or a property path like `createdBy.name`.
|
||||
*/
|
||||
@Input()
|
||||
key: string;
|
||||
|
||||
/** Value type for the column. Possible settings are 'text', 'image',
|
||||
* 'date', 'fileSize' and 'location'.
|
||||
*/
|
||||
@Input()
|
||||
type: string = 'text';
|
||||
|
||||
/** Value format (if supported by the parent component), for example format of the date. */
|
||||
@Input()
|
||||
format: string;
|
||||
|
||||
/** Toggles ability to sort by this column, for example by clicking the column header. */
|
||||
@Input()
|
||||
sortable: boolean = true;
|
||||
|
||||
/** Display title of the column, typically used for column headers. You can use the
|
||||
* i18n resource key to get it translated automatically.
|
||||
*/
|
||||
@Input()
|
||||
title: string = '';
|
||||
|
||||
@ContentChild(TemplateRef)
|
||||
template: any;
|
||||
|
||||
/** Custom tooltip formatter function. */
|
||||
@Input()
|
||||
formatTooltip: Function;
|
||||
|
||||
/**
|
||||
* Title to be used for screen readers.
|
||||
*/
|
||||
/** Title to be used for screen readers. */
|
||||
@Input('sr-title')
|
||||
srTitle: string;
|
||||
|
||||
/** Additional CSS class to be applied to column (header and cells). */
|
||||
@Input('class')
|
||||
cssClass: string;
|
||||
|
||||
|
@@ -37,15 +37,21 @@ export class AppsListComponent implements OnInit {
|
||||
public static DEFAULT_TASKS_APP_ICON: string = 'glyphicon-asterisk';
|
||||
public static DEFAULT_TASKS_APP_MATERIAL_ICON: string = 'favorite_border';
|
||||
|
||||
/** (**required**) Defines the layout of the apps. There are two possible
|
||||
* values, "GRID" and "LIST".
|
||||
*/
|
||||
@Input()
|
||||
layoutType: string = AppsListComponent.LAYOUT_GRID;
|
||||
|
||||
/** Provides a way to filter the apps to show. */
|
||||
@Input()
|
||||
filtersAppId: any[];
|
||||
|
||||
/** Emitted when an app entry is clicked. */
|
||||
@Output()
|
||||
appClick: EventEmitter<AppDefinitionRepresentationModel> = new EventEmitter<AppDefinitionRepresentationModel>();
|
||||
|
||||
/** Emitted when an error occurs. */
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
@@ -25,12 +25,19 @@ import { ProcessContentService } from '@alfresco/adf-core';
|
||||
})
|
||||
export class CreateProcessAttachmentComponent implements OnChanges {
|
||||
|
||||
/** (required) The ID of the process instance to display. */
|
||||
@Input()
|
||||
processInstanceId: string;
|
||||
|
||||
/** Emitted when an error occurs while creating or uploading an attachment
|
||||
* from the user within the component.
|
||||
*/
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when an attachment is successfully created or uploaded
|
||||
* from within the component.
|
||||
*/
|
||||
@Output()
|
||||
success: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
@@ -25,12 +25,19 @@ import { ProcessContentService } from '@alfresco/adf-core';
|
||||
})
|
||||
export class AttachmentComponent implements OnChanges {
|
||||
|
||||
/** (required) The numeric ID of the task to display. */
|
||||
@Input()
|
||||
taskId: string;
|
||||
|
||||
/** Emitted when an error occurs while creating or uploading an
|
||||
* attachment from the user within the component.
|
||||
*/
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when an attachment is created or uploaded successfully
|
||||
* from within the component.
|
||||
*/
|
||||
@Output()
|
||||
success: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
@@ -27,9 +27,11 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
export class CommentListComponent {
|
||||
|
||||
/** The comments data used to populate the list. */
|
||||
@Input()
|
||||
comments: CommentProcessModel[];
|
||||
|
||||
/** Emitted when the user clicks on one of the comment rows. */
|
||||
@Output()
|
||||
clickRow: EventEmitter<CommentProcessModel> = new EventEmitter<CommentProcessModel>();
|
||||
|
||||
|
@@ -27,12 +27,15 @@ import { Observer } from 'rxjs/Observer';
|
||||
})
|
||||
export class CommentsComponent implements OnChanges {
|
||||
|
||||
/** The numeric ID of the task. */
|
||||
@Input()
|
||||
taskId: string;
|
||||
|
||||
/** Are the comments read only? */
|
||||
@Input()
|
||||
readOnly: boolean = false;
|
||||
|
||||
/** Emitted when an error occurs while displaying/adding a comment. */
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
@@ -30,21 +30,31 @@ import { TaskListService } from './../services/tasklist.service';
|
||||
})
|
||||
export class ChecklistComponent implements OnInit, OnChanges {
|
||||
|
||||
/** (required) The id of the parent task to which subtasks are
|
||||
* attached.
|
||||
*/
|
||||
@Input()
|
||||
taskId: string;
|
||||
|
||||
/** Toggle readonly state of the form. All form widgets
|
||||
* will render as readonly if enabled.
|
||||
*/
|
||||
@Input()
|
||||
readOnly: boolean = false;
|
||||
|
||||
/** (required) The assignee id that the subtasks are assigned to. */
|
||||
@Input()
|
||||
assignee: string;
|
||||
|
||||
/** Emitted when a new checklist task is created. */
|
||||
@Output()
|
||||
checklistTaskCreated: EventEmitter<TaskDetailsModel> = new EventEmitter<TaskDetailsModel>();
|
||||
|
||||
/** Emitted when a checklist task is deleted. */
|
||||
@Output()
|
||||
checklistTaskDeleted: EventEmitter<string> = new EventEmitter<string>();
|
||||
|
||||
/** Emitted when an error occurs. */
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
Reference in New Issue
Block a user