[ADF-1769] Updates to prop table script (#2829)

* [ADF-1769] Fixed prop table tool formatting

* [ADF-1769] Added code style to event type column
This commit is contained in:
Andy Stark
2018-01-16 00:10:02 +00:00
committed by Eugenio Romano
parent e757378e9b
commit 3bee9a70f5
5 changed files with 135 additions and 97 deletions

View File

@@ -47,49 +47,48 @@ Displays the documents from a repository.
### Properties ### Properties
The properties currentFolderId, folderNode and node are the entry initialization properties of the document list. They cannot be used together, choose the one that suites more your use case. | Name | Type | Description |
| ---- | ---- | ----------- |
| Name | Type | Default | Description | | permissionsStyle | `PermissionStyleModel[]` | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the Permission Style model page for further details and examples.<br/> Default value: `[]` |
| ---- | ---- | ------- | ----------- | | locationFormat | `string` | The default route for all the location-based columns (if declared). <br/> Default value: `'/'` |
| permissionsStyle | [PermissionStyleModel\[\]](permissions-style.model.md) | null | 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. | | navigate | `boolean` | Toggles navigation to folder content or file preview <br/> Default value: `true` |
| locationFormat | string | '/' | The default route for all the location-based columns (if declared). | | navigationMode | `string` | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". <br/> Default value: `DocumentListComponent.DOUBLE_CLICK_NAVIGATION` |
| navigate | boolean | true | Toggles navigation to folder content or file preview | | thumbnails | `boolean` | Show document thumbnails rather than icons <br/> Default value: `false` |
| navigationMode | string (click,dblclick) | dblclick | User interaction for folder navigation or file preview | | selectionMode | `string` | 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.<br/> Default value: `'single'` |
| thumbnails | boolean | false | Show document thumbnails rather than icons | | multiselect | `boolean` | Toggles multiselect mode <br/> Default value: `false` |
| selectionMode | string | 'single' | 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. | | contentActions | `boolean` | Toggles content actions for each row <br/> Default value: `false` |
| multiselect | boolean | false | Toggles multiselect mode | | contentActionsPosition | `string` | Position of the content actions dropdown menu. Can be set to "left" or "right". <br/> Default value: `'right'` |
| contentActions | boolean | false | Toggles content actions for each row | | contextMenuActions | `boolean` | Toggles context menus for each row <br/> Default value: `false` |
| contentActionsPosition | string (left\|right) | right | Position of the content actions dropdown menu. | | emptyFolderImageUrl | `string` | Custom image for empty folder <br/> Default value: `'./assets/images/empty_doc_lib.svg'` |
| contextMenuActions | boolean | false | Toggles context menus for each row | | allowDropFiles | `boolean` | Toggle file drop support for rows (see Upload Directive for further details <br/> Default value: `false` |
| emptyFolderImageUrl | string | assets/images/empty_doc_lib.svg | Custom image for empty folder | | sorting | `string[]` | 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. |
| allowDropFiles | boolean | false | Toggle file drop support for rows (see **ng2-alfresco-core/UploadDirective** for more details) | | rowStyle | `string` | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. |
| sorting | string\[] | | 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 default sorting detected by the component based on columns. | | rowStyleClass | `string` | The CSS class to apply to every row |
| rowStyle | 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 | | loading | `boolean` | Toggles the loading state and animated spinners for the component. Used in combination with \`navigate=false\` to perform custom navigation and loading state indication.<br/> Default value: `false` |
| rowStyleClass | string | | The CSS class to apply to every row | | rowFilter | `any` | Custom row filter <br/> Default value: `null` |
| loading | boolean | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. | | imageResolver | `any` | Custom image resolver <br/> Default value: `null` |
| rowFilter | `RowFilter` | | Custom row filter, [see more](#custom-row-filter). | | currentFolderId | `string` | The ID of the folder node to display or a reserved string alias for special sources <br/> Default value: `null` |
| imageResolver | `ImageResolver` | | Custom image resolver, [see more](#custom-image-resolver). | | folderNode | `MinimalNodeEntryEntity` | Currently displayed folder node <br/> Default value: `null` |
| currentFolderId | string | null | The ID of the folder node to display or a reserved string alias for special sources (see **Data Sources**) | | node | `NodePaging` | The Document list will show all the nodes contained in the NodePaging entity <br/> Default value: `null` |
| folderNode | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | null | Currently displayed folder node | | maxItems | `number` | Default value is stored into user preference settings |
| node | [NodePaging](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodePaging.md) | null | Document list will show all the nodes contained in the NodePaging entity | | skipCount | `number` | Number of elements to skip over for pagination purposes <br/> Default value: `0` |
| maxItems | number | Default value is stored into user preference settings | determine the size of the page for the element into document list | | enableInfiniteScrolling | `boolean` | Set document list to work in infinite scrolling mode <br/> Default value: `false` |
| skipCount | number | 0 | element to skip over for pagination purpose |
| enableInfiniteScrolling | boolean | true | Enable documentlist to work into infinite scrolling mode |
### Events ### Events
| Name | Description | | Name | Type | Description |
| ---- | ----------- | | ---- | ---- | ----------- |
| nodeClick | emitted when user clicks a list node | | nodeClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user clicks a list node |
| nodeDblClick | emitted when user double-clicks list node | | nodeDblClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user double-clicks a list node |
| folderChange | emitted once current display folder has changed | | folderChange | `EventEmitter<NodeEntryEvent>` | Emitted when the current display folder changes |
| preview | emitted when user acts upon files with either single or double click (depends on `navigation-mode`), recommended for Viewer components integration | | preview | `EventEmitter<NodeEntityEvent>` | Emitted when the user acts upon files with either single or double click (depends on \`navigation-mode\`). Useful for integration with the Viewer component. |
| permissionError | emitted when user is attempting to create a folder via action menu without having the permission to do it | | ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use |
| ready | emitted when the documentList is ready and loads all the elements | | error | `EventEmitter<any>` | Emitted when the API fails to get the Document List data |
| error | emitted when API fails to get documentList data |
## Details ## Details
The properties currentFolderId, folderNode and node are the entry initialization properties of the document list. They cannot be used together, so choose the one that suits your use case best.
### DOM Events ### DOM Events
Below are the DOM events the DocumentList component emits. Below are the DOM events the DocumentList component emits.

View File

@@ -2,7 +2,6 @@
exports.__esModule = true; exports.__esModule = true;
var ts = require("typescript"); var ts = require("typescript");
var path = require("path"); var path = require("path");
var program = require("commander");
var heading = require("mdast-util-heading-range"); var heading = require("mdast-util-heading-range");
var unist = require("../unistHelpers"); var unist = require("../unistHelpers");
function initPhase(aggData) { function initPhase(aggData) {
@@ -27,19 +26,18 @@ function updatePhase(tree, pathname, aggData) {
var inTable_1 = buildInputsTable(inputs); var inTable_1 = buildInputsTable(inputs);
var outTable_1 = buildOutputsTable(outputs); var outTable_1 = buildOutputsTable(outputs);
if (inTable_1) { if (inTable_1) {
console.log("Made a props table");
heading(tree, "Properties", function (before, section, after) { heading(tree, "Properties", function (before, section, after) {
return [before, inTable_1, after]; return [before, inTable_1, after];
}); });
} }
if (outTable_1) { if (outTable_1) {
console.log("Made an events table");
heading(tree, "Events", function (before, section, after) { heading(tree, "Events", function (before, section, after) {
return [before, outTable_1, after]; return [before, outTable_1, after];
}); });
} }
} }
} }
return true;
} }
exports.updatePhase = updatePhase; exports.updatePhase = updatePhase;
function initialCap(str) { function initialCap(str) {
@@ -61,7 +59,7 @@ function fixCompodocFilename(rawName) {
return finalName; return finalName;
} }
function getPropDocData(srcPath, docClassName, inputs, outputs) { function getPropDocData(srcPath, docClassName, inputs, outputs) {
var prog = ts.createProgram(program.args, { var prog = ts.createProgram([srcPath], {
target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS
}); });
var sourceFiles = prog.getSourceFiles(); var sourceFiles = prog.getSourceFiles();
@@ -97,7 +95,8 @@ function getPropDataFromClass(checker, classDec, inputs, outputs) {
if (prop.initializer) { if (prop.initializer) {
initializer = prop.initializer.getText(sourceFile); initializer = prop.initializer.getText(sourceFile);
} }
var doc = ts.displayPartsToString(memSymbol.getDocumentationComment()); var doc = ts.displayPartsToString(memSymbol.getDocumentationComment(checker));
doc = doc.replace(/\r\n/g, " ");
var propType = checker.typeToString(checker.getTypeOfSymbolAtLocation(memSymbol, memSymbol.valueDeclaration)); var propType = checker.typeToString(checker.getTypeOfSymbolAtLocation(memSymbol, memSymbol.valueDeclaration));
var dec = prop.decorators[0].getText(sourceFile); var dec = prop.decorators[0].getText(sourceFile);
if (dec.match(/@Input/)) { if (dec.match(/@Input/)) {
@@ -127,23 +126,30 @@ function buildInputsTable(inputs) {
unist.makeTableRow([ unist.makeTableRow([
unist.makeTableCell([unist.makeText("Name")]), unist.makeTableCell([unist.makeText("Name")]),
unist.makeTableCell([unist.makeText("Type")]), unist.makeTableCell([unist.makeText("Type")]),
unist.makeTableCell([unist.makeText("Default value")]), // unist.makeTableCell([unist.makeText("Default value")]),
unist.makeTableCell([unist.makeText("Description")]) unist.makeTableCell([unist.makeText("Description")])
]) ])
]; ];
for (var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
var pName = inputs[i].name; var pName = inputs[i].name;
var pType = inputs[i].type; var pType = inputs[i].type;
var pDefault = inputs[i].defaultValue || ""; var pDefault = inputs[i].init || "";
var pDesc = inputs[i].description || ""; var pDesc = inputs[i].docText || "";
if (pDesc) { if (pDesc) {
pDesc = pDesc.trim().replace(/[\n\r]+/, " "); //pDesc = pDesc.trim().replace(/[\n\r]+/, " ");
pDesc = pDesc.replace(/[\n\r]+/, " ");
}
var descCellContent = [unist.makeText(pDesc)];
if (pDefault) {
descCellContent.push(unist.makeHTML("<br/>"));
descCellContent.push(unist.makeText(" Default value: "));
descCellContent.push(unist.makeInlineCode(pDefault));
} }
var cells = [ var cells = [
unist.makeTableCell([unist.makeText(pName)]), unist.makeTableCell([unist.makeText(pName)]),
unist.makeTableCell([unist.makeText(pType)]), unist.makeTableCell([unist.makeInlineCode(pType)]),
unist.makeTableCell([unist.makeText(pDefault)]), //unist.makeTableCell([unist.makeText(pDefault)]),
unist.makeTableCell([unist.makeText(pDesc)]) unist.makeTableCell(descCellContent)
]; ];
rows.push(unist.makeTableRow(cells)); rows.push(unist.makeTableRow(cells));
} }
@@ -163,13 +169,13 @@ function buildOutputsTable(outputs) {
for (var i = 0; i < outputs.length; i++) { for (var i = 0; i < outputs.length; i++) {
var eName = outputs[i].name; var eName = outputs[i].name;
var eType = outputs[i].type; var eType = outputs[i].type;
var eDesc = outputs[i].description || ""; var eDesc = outputs[i].docText || "";
if (eDesc) { if (eDesc) {
eDesc = eDesc.trim().replace(/[\n\r]+/, ' '); eDesc = eDesc.trim().replace(/[\n\r]+/, ' ');
} }
var cells = [ var cells = [
unist.makeTableCell([unist.makeText(eName)]), unist.makeTableCell([unist.makeText(eName)]),
unist.makeTableCell([unist.makeText(eType)]), unist.makeTableCell([unist.makeInlineCode(eType)]),
unist.makeTableCell([unist.makeText(eDesc)]) unist.makeTableCell([unist.makeText(eDesc)])
]; ];
rows.push(unist.makeTableRow(cells)); rows.push(unist.makeTableRow(cells));

View File

@@ -6,6 +6,7 @@ import * as program from "commander";
import * as heading from "mdast-util-heading-range"; import * as heading from "mdast-util-heading-range";
import * as unist from "../unistHelpers"; import * as unist from "../unistHelpers";
import { JsxEmit } from "typescript";
export function initPhase(aggData) { export function initPhase(aggData) {
} }
@@ -25,7 +26,7 @@ export function updatePhase(tree, pathname, aggData) {
if (srcData) { if (srcData) {
let srcPath = srcData.path; let srcPath = srcData.path;
let className = fixCompodocFilename(fileNameNoSuffix); let className = fixCompodocFilename(fileNameNoSuffix);
let inputs = []; let inputs = [];
let outputs = []; let outputs = [];
getPropDocData(path.resolve(".", srcPath), className, inputs, outputs); getPropDocData(path.resolve(".", srcPath), className, inputs, outputs);
@@ -34,20 +35,20 @@ export function updatePhase(tree, pathname, aggData) {
let outTable = buildOutputsTable(outputs); let outTable = buildOutputsTable(outputs);
if (inTable) { if (inTable) {
console.log("Made a props table");
heading(tree, "Properties", (before, section, after) => { heading(tree, "Properties", (before, section, after) => {
return [before, inTable, after]; return [before, inTable, after];
}); });
} }
if (outTable) { if (outTable) {
console.log("Made an events table");
heading(tree, "Events", (before, section, after) => { heading(tree, "Events", (before, section, after) => {
return [before, outTable, after]; return [before, outTable, after];
}); });
} }
} }
} }
return true;
} }
@@ -81,7 +82,7 @@ function fixCompodocFilename(rawName: string) {
function getPropDocData(srcPath: string, docClassName: string, inputs: any[], outputs: any[]) { function getPropDocData(srcPath: string, docClassName: string, inputs: any[], outputs: any[]) {
let prog = ts.createProgram(program.args, { let prog = ts.createProgram([srcPath], {
target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS
}); });
@@ -135,7 +136,9 @@ function getPropDataFromClass(
initializer = prop.initializer.getText(sourceFile); initializer = prop.initializer.getText(sourceFile);
} }
let doc = ts.displayPartsToString(memSymbol.getDocumentationComment()); let doc = ts.displayPartsToString(memSymbol.getDocumentationComment(checker));
doc = doc.replace(/\r\n/g, " ");
let propType = checker.typeToString(checker.getTypeOfSymbolAtLocation(memSymbol, memSymbol.valueDeclaration!)); let propType = checker.typeToString(checker.getTypeOfSymbolAtLocation(memSymbol, memSymbol.valueDeclaration!));
let dec = prop.decorators[0].getText(sourceFile); let dec = prop.decorators[0].getText(sourceFile);
@@ -169,7 +172,7 @@ function buildInputsTable(inputs: any[]) {
unist.makeTableRow([ unist.makeTableRow([
unist.makeTableCell([unist.makeText("Name")]), unist.makeTableCell([unist.makeText("Name")]),
unist.makeTableCell([unist.makeText("Type")]), unist.makeTableCell([unist.makeText("Type")]),
unist.makeTableCell([unist.makeText("Default value")]), // unist.makeTableCell([unist.makeText("Default value")]),
unist.makeTableCell([unist.makeText("Description")]) unist.makeTableCell([unist.makeText("Description")])
]) ])
]; ];
@@ -177,18 +180,27 @@ function buildInputsTable(inputs: any[]) {
for (var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
var pName = inputs[i].name; var pName = inputs[i].name;
var pType = inputs[i].type; var pType = inputs[i].type;
var pDefault = inputs[i].defaultValue || ""; var pDefault = inputs[i].init || "";
var pDesc = inputs[i].description || ""; var pDesc = inputs[i].docText || "";
if (pDesc) { if (pDesc) {
pDesc = pDesc.trim().replace(/[\n\r]+/, " "); //pDesc = pDesc.trim().replace(/[\n\r]+/, " ");
pDesc = pDesc.replace(/[\n\r]+/, " ");
}
var descCellContent = [unist.makeText(pDesc)];
if (pDefault) {
descCellContent.push(unist.makeHTML("<br/>"));
descCellContent.push(unist.makeText(" Default value: "));
descCellContent.push(unist.makeInlineCode(pDefault));
} }
var cells = [ var cells = [
unist.makeTableCell([unist.makeText(pName)]), unist.makeTableCell([unist.makeText(pName)]),
unist.makeTableCell([unist.makeText(pType)]), unist.makeTableCell([unist.makeInlineCode(pType)]),
unist.makeTableCell([unist.makeText(pDefault)]), //unist.makeTableCell([unist.makeText(pDefault)]),
unist.makeTableCell([unist.makeText(pDesc)]) unist.makeTableCell(descCellContent)
]; ];
rows.push(unist.makeTableRow(cells)); rows.push(unist.makeTableRow(cells));
@@ -214,7 +226,7 @@ function buildOutputsTable(outputs: any[]) {
for (var i = 0; i < outputs.length; i++){ for (var i = 0; i < outputs.length; i++){
var eName = outputs[i].name; var eName = outputs[i].name;
var eType = outputs[i].type; var eType = outputs[i].type;
var eDesc = outputs[i].description || ""; var eDesc = outputs[i].docText || "";
if (eDesc) { if (eDesc) {
eDesc = eDesc.trim().replace(/[\n\r]+/, ' '); eDesc = eDesc.trim().replace(/[\n\r]+/, ' ');
@@ -222,7 +234,7 @@ function buildOutputsTable(outputs: any[]) {
var cells = [ var cells = [
unist.makeTableCell([unist.makeText(eName)]), unist.makeTableCell([unist.makeText(eName)]),
unist.makeTableCell([unist.makeText(eType)]), unist.makeTableCell([unist.makeInlineCode(eType)]),
unist.makeTableCell([unist.makeText(eDesc)]) unist.makeTableCell([unist.makeText(eDesc)])
]; ];

View File

@@ -21,6 +21,13 @@ module.exports = {
}; };
}, },
makeStrong: function (content) {
return {
"type": "strong",
"children": content
};
},
makeHeading: function (caption, depth) { makeHeading: function (caption, depth) {
return { return {
"type": "heading", "type": "heading",
@@ -83,6 +90,20 @@ module.exports = {
}; };
}, },
makeInlineCode: function (codeText) {
return {
"type": "inlineCode",
"value": codeText
}
},
makeHTML: function (htmlText) {
return {
"type": "html",
"value": htmlText
};
},
isHeading: function (node) { isHeading: function (node) {
return node.type === "heading"; return node.type === "heading";
}, },

View File

@@ -70,140 +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 /** 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) * of the user on that node. See the Permission Style model
* page for further details and examples. * page for further details and examples.
*/ */
@Input() @Input()
permissionsStyle: PermissionStyleModel[] = []; permissionsStyle: PermissionStyleModel[] = [];
/* The default route for all the location-based columns (if declared). */ /** 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 */ /** 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". */ /** 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 */ /** 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, /** 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. * 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 */ /** Toggles multiselect mode */
@Input() @Input()
multiselect: boolean = false; multiselect: boolean = false;
/* Toggles content actions for each row */ /** 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". */ /** 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 */ /** Toggles context menus for each row */
@Input() @Input()
contextMenuActions: boolean = false; contextMenuActions: boolean = false;
/* Custom image for empty folder */ /** 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 */ /** Toggle file drop support for rows (see Upload Directive for further details */
@Input() @Input()
allowDropFiles: boolean = false; allowDropFiles: boolean = false;
/* Defines default sorting. The format is an array of 2 strings `[key, direction]` /** 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 * 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. * 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 /** The inline style to apply to every row. See
* [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) * the Angular NgStyle
* docs for more details and usage examples. * docs for more details and usage examples.
*/ */
@Input() @Input()
rowStyle: string; rowStyle: string;
/* The CSS class to apply to every row */ /** 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 /** Toggles the loading state and animated spinners for the component. Used in
* combination with `navigate=false` to perform custom navigation and loading * combination with `navigate=false` to perform custom navigation and loading
* state indication. * state indication.
*/ */
@Input() @Input()
loading: boolean = false; loading: boolean = false;
/* Custom row filter */ /** Custom row filter */
@Input() @Input()
rowFilter: any | null = null; rowFilter: any | null = null;
/* Custom image resolver */ /** Custom image resolver */
@Input() @Input()
imageResolver: any | null = null; imageResolver: any | null = null;
/* The ID of the folder node to display or a reserved string alias for special sources */ /** 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 */ /** Currently displayed folder node */
@Input() @Input()
folderNode: MinimalNodeEntryEntity = null; folderNode: MinimalNodeEntryEntity = null;
/* Document list will show all the nodes contained in the NodePaging entity */ /** The 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 */ /** Default value is stored into user preference settings */
@Input() @Input()
maxItems: number; maxItems: number;
/* element to skip over for pagination purpose */ /** Number of elements to skip over for pagination purposes */
@Input() @Input()
skipCount: number = 0; skipCount: number = 0;
/* Enable documentlist to work into infinite scrolling mode */ /** Set document list to work in infinite scrolling mode */
@Input() @Input()
enableInfiniteScrolling: boolean = false; enableInfiniteScrolling: boolean = false;
/* Emitted when the user clicks a list node */ /** 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 */ /** 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 */ /** 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 /** Emitted when the user acts upon files with either single or double click
* (depends on `navigation-mode`). Useful for integration with the * (depends on `navigation-mode`). Useful for integration with the
* Viewer component. * 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 */ /** 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 */ /** Emitted when the API fails to get the Document List data */
@Output() @Output()
error: EventEmitter<any> = new EventEmitter(); error: EventEmitter<any> = new EventEmitter();