mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added prop tables and fixed script (#2896)
* [ADF-1769] Added prop tables and fixed script * [ADF-1769] Corrected JSDoc formatting errors * [ADF-1769] Restored default column to prop tables
This commit is contained in:
committed by
Eugenio Romano
parent
8a4959d172
commit
900fd70d63
@@ -47,9 +47,13 @@ export function updatePhase(tree, pathname, aggData) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -122,14 +126,14 @@ function getPropDataFromClassChain(
|
||||
getPropDataFromClass(checker, classDec, inputs, outputs);
|
||||
|
||||
// Inherited classes
|
||||
for(const hc of classDec.heritageClauses) {
|
||||
let hcType = checker.getTypeFromTypeNode(hc.types[0]);
|
||||
|
||||
console.log(checker.getFullyQualifiedName(hcType.symbol));
|
||||
|
||||
for (const dec of hcType.symbol.declarations) {
|
||||
if (isClassDeclaration(dec)) {
|
||||
getPropDataFromClassChain(checker, dec, inputs, outputs);
|
||||
if (classDec.heritageClauses) {
|
||||
for(const hc of classDec.heritageClauses) {
|
||||
let hcType = checker.getTypeFromTypeNode(hc.types[0]);
|
||||
|
||||
for (const dec of hcType.symbol.declarations) {
|
||||
if (isClassDeclaration(dec)) {
|
||||
getPropDataFromClassChain(checker, dec, inputs, outputs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,7 +205,7 @@ function buildInputsTable(inputs: any[]) {
|
||||
unist.makeTableRow([
|
||||
unist.makeTableCell([unist.makeText("Name")]),
|
||||
unist.makeTableCell([unist.makeText("Type")]),
|
||||
// unist.makeTableCell([unist.makeText("Default value")]),
|
||||
unist.makeTableCell([unist.makeText("Default value")]),
|
||||
unist.makeTableCell([unist.makeText("Description")])
|
||||
])
|
||||
];
|
||||
@@ -219,16 +223,24 @@ function buildInputsTable(inputs: any[]) {
|
||||
|
||||
var descCellContent = remark().parse(pDesc).children;
|
||||
|
||||
var defaultCellContent;
|
||||
|
||||
if (pDefault) {
|
||||
/*
|
||||
descCellContent.push(unist.makeHTML("<br/>"));
|
||||
descCellContent.push(unist.makeText(" Default value: "));
|
||||
descCellContent.push(unist.makeInlineCode(pDefault));
|
||||
*/
|
||||
defaultCellContent = unist.makeInlineCode(pDefault);
|
||||
} else {
|
||||
defaultCellContent = unist.makeText("");
|
||||
}
|
||||
|
||||
|
||||
var cells = [
|
||||
unist.makeTableCell([unist.makeText(pName)]),
|
||||
unist.makeTableCell([unist.makeInlineCode(pType)]),
|
||||
//unist.makeTableCell([unist.makeText(pDefault)]),
|
||||
//unist.makeTableCell([unist.makeInlineCode(pDefault)]),
|
||||
unist.makeTableCell([defaultCellContent]),
|
||||
unist.makeTableCell(descCellContent)
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user