[ADF-4249] Fixed issues with ToC and auto-linking tools (#4492)

* [ADF-4249] Fixed issues with anchors in contents sections

* [ADF-4249] Removed redundant copy of edit proc filter cloud docs

* [ADF-4249] Fixed YAML template generation for accessor props

* [ADF-4249] Fixed ToC link generation

* [ADF-4249] Fixed type alias links in component docs
This commit is contained in:
Andy Stark 2019-03-25 17:56:25 +00:00 committed by Eugenio Romano
parent dac4f1bcef
commit 8a86981da7
11 changed files with 39 additions and 529 deletions

View File

@ -33,13 +33,13 @@ Opens a [Content Node Selector](content-node-selector.component.md) in its own
| breadcrumbTransform | `Function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. | | breadcrumbTransform | `Function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| currentFolderId | `string` | null | [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) ID of the folder currently listed. | | currentFolderId | `string` | null | [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) ID of the folder currently listed. |
| dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | | dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | Custom site for site dropdown. This is the same as the `siteList` property of the Sites Dropdown component (see its doc page for more information). | | dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | Custom site for site dropdown. This is the same as the `siteList`. property of the Sites Dropdown component (see its doc page for more information). |
| imageResolver | `ImageResolver` | null | Custom image resolver function. See the [Image Resolver Model](../models/image-resolver.model.md) page for more information. | | imageResolver | [`ImageResolver`](../../../lib/content-services/document-list/data/image-resolver.model.ts) | null | Custom image resolver function. See the [Image Resolver Model](../models/image-resolver.model.md) page for more information. |
| isSelectionValid | `ValidationFunction` | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. | | isSelectionValid | [`ValidationFunction`](../../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
| pageSize | `number` | | Number of items shown per page in the list. | | pageSize | `number` | | Number of items shown per page in the list. |
| where | `string` | | Custom _where_ filter function. See the [Document List component](../../content-services/components/document-list.component.md) for more information. | | where | `string` | | Custom _where_ filter function. See the [Document List component](../../content-services/components/document-list.component.md) for more information. |
| excludeSiteContent | | | Custom list of site content componentIds. Used to filter out the corresponding items from the displayed nodes | | excludeSiteContent | `string[]` | | Custom list of site content componentIds. Used to filter out the corresponding items from the displayed nodes |
| rowFilter | | | Custom row filter function. See the [Row Filter Model](../models/row-filter.model.md) page for more information. | | rowFilter | [`RowFilter`](../../../lib/content-services/document-list/data/row-filter.model.ts) | | Custom row filter function. See the [Row Filter Model](../models/row-filter.model.md) page for more information. |
### Events ### Events

View File

@ -78,11 +78,11 @@ Displays the documents from a repository.
| showHeader | `boolean` | true | Toggles the header | | showHeader | `boolean` | true | Toggles the header |
| sorting | `string[]` | ['name', 'asc'] | 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. | | sorting | `string[]` | ['name', 'asc'] | 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. |
| sortingMode | `string` | "client" | Defines sorting mode. Can be either `client` (items in the list are sorted client-side) or `server` (the ordering supplied by the server is used without further client-side sorting). Note that the `server` option _does not_ request the server to sort the data before delivering it. | | sortingMode | `string` | "client" | Defines sorting mode. Can be either `client` (items in the list are sorted client-side) or `server` (the ordering supplied by the server is used without further client-side sorting). Note that the `server` option _does not_ request the server to sort the data before delivering it. |
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
| thumbnails | `boolean` | false | Show document thumbnails rather than icons | | thumbnails | `boolean` | false | Show document thumbnails rather than icons |
| where | `string` | | Filters the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) list using the _where_ condition of the REST API (for example, isFolder=true). See the REST API documentation for more information. | | where | `string` | | Filters the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) list using the _where_ condition of the REST API (for example, isFolder=true). See the REST API documentation for more information. |
| currentFolderId | | | The ID of the folder node to display or a reserved string alias for special sources | | currentFolderId | `string` | | The ID of the folder node to display or a reserved string alias for special sources |
| rowFilter | | | Custom function to choose whether to show or hide rows. See the [Row Filter Model](../models/row-filter.model.md) page for more information. | | rowFilter | [`RowFilter`](../../../lib/content-services/document-list/data/row-filter.model.ts) | | Custom function to choose whether to show or hide rows. See the [Row Filter Model](../models/row-filter.model.md) page for more information. |
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
### Events ### Events

View File

@ -1,201 +0,0 @@
---
Title: Edit Process Filter Cloud component
Added: v3.0.0
Status: Experimental
Last reviewed: 2019-01-30
---
# [Edit Process Filter Cloud component](../../lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts "Defined in edit-process-filter-cloud.component.ts")
Shows Process Filter Details.
![edit-process-filter-cloud](../docassets/images/edit-process-filter-cloud.component.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Editing APS2 process filters](#editing-aps2-process-filters)
- [Filter properties](#filter-properties)
- [Sort properties](#sort-properties)
- [Action properties](#action-properties)
- [See also](#see-also)
## Basic Usage
```html
<adf-cloud-edit-process-filter
[id]="processFilterId"
[appName]="appName"
[filterProperties]="filterProperties"s
(filterChange)="onFilterChange($event)"
(action)="onAction($event)">
</adf-cloud-edit-process-filter>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| actions | `string[]` | | List of sort actions. |
| appName | `string` | | The name of the application. |
| filterProperties | `string[]` | | List of process filter properties to display |
| id | `string` | | Id of the process instance filter. |
| showFilterActions | `boolean` | true | Toggles editing of process filter actions. |
| showTitle | `boolean` | true | Toggles editing of the process filter title. |
| sortProperties | `string[]` | | List of sort properties to display. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| action | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessFilterAction`](../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`>` | Emitted when a filter action occurs i.e Save, SaveAs, Delete. |
| filterChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessFilterCloudModel`](../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`>` | Emitted when a process instance filter property changes. |
## Details
### Editing APS2 process filters
Use the `appName` and `id` properties to choose which process filter to edit:
```html
<adf-cloud-edit-process-filter
[id]="processFilterId"
[appName]="appName">
</adf-cloud-edit-process-filter>
```
### Filter properties
You can supply various _filter properties_ to edit that will determine
which processes are found by a filter. The full set of properties is
given below:
| Name | Description |
| ---- | ----------- |
| **_appName_** | Name of the app |
| **_processInstanceId_** | Process instance ID |
| **_processName_** | Process name. |
| **_initiator_** | ID of the user who initiated the process |
| **_status_** | Execution status of the process. |
| **_processDefinitionId_** | Process definition ID |
| **_processDefinitionKey_** | Process definition key |
| **_lastModified_** | Date the process was last modified. If lastModified defined the component will show the range **_lastModifiedTo_**, **_lastModifiedFrom_**|
| **_sort_** | Field on which the filter results will be sorted. Can be "id", "name", "status", "startDate". |
| **_order_** | Sort ordering of the filter results (this doesn't participate in the filtering itself) |
By default, the **_status_**, **_sort_** and **_order_** properties are
displayed in the editor. However, you can also choose which properties
to show using the `filterProperties` array.
For example, the code below initializes the editor with the **_appName_**,
**_processInstanceId_**, **_processName_** and **_lastModified_** properties:
```ts
export class SomeComponent implements OnInit {
filterProperties: string[] = [
"processName"
"processInstanceId",
"lastModified"];
onFilterChange(filter: ProcessFilterCloudModel) {
console.log('On filter change: ', filter);
}
onAction($event: ProcessFilterAction) {
console.log('Clicked action: ', $event);
}
```
```html
<adf-cloud-edit-process-filter
[id]="processFilterId"
[appName]="applicationName"
[filterProperties]="filterProperties">
</adf-cloud-edit-process-filter>
```
With this configuration, only the four listed properties will be shown.
### Sort properties
You can supply various _sort properties_ to sort the processes.
By default, the **_id_**, **_name_**, **_status_** and **_startDate_** properties are
displayed in the editor. However, you can also choose which sort properties
to show using the `sortProperties` array.
For example, the code below initializes the editor with the **_startDate_** and **_lastModified_** properties:
```ts
export class SomeComponent implements OnInit {
sortProperties: string[] = [
"startDate",
"lastModified"];
onFilterChange(filter: ProcessFilterCloudModel) {
console.log('On filter change: ', filter);
}
onAction($event: ProcessFilterAction) {
console.log('Clicked action: ', $event);
}
```
```html
<adf-cloud-edit-process-filter
[id]="processFilterId"
[appName]="applicationName"
[sortProperties]="sortProperties">
</adf-cloud-edit-process-filter>
```
With this configuration, only the two listed sort properties will be shown.
### Action properties
You can supply various _actions_ to apply on process filter.
| Name | Description |
| ---- | ----------- |
| **_save_** | Save process filter. |
| **_saveAs_** | Creates a new process filter. |
| **_delete_** | Delete process filter. |
By default, the **_save_**, **_saveAs_** and **_delete_** actions are
displayed in the editor. However, you can also choose which actions to
show using the `actions` array.
For example, the code below initializes the editor with the **_save_** and **_delete_** actions:
```ts
export class SomeComponent implements OnInit {
actions: string[] = ['save', 'delete'];
onFilterChange(filter: ProcessFilterCloudModel) {
console.log('On filter change: ', filter);
}
onAction($event: ProcessFilterAction) {
console.log('Clicked action: ', $event);
}
```
```html
<adf-cloud-edit-process-filter
[id]="processFilterId"
[appName]="applicationName"
[actions]="actions">
</adf-cloud-edit-process-filter>
```
With this configuration, only the two actions will be shown.
## See also
- [Edit task filter cloud component](edit-task-filter-cloud.component.md)

View File

@ -4,52 +4,6 @@ var undocMethodNames = {
"ngOnChanges": 1 "ngOnChanges": 1
}; };
var PropInfo = /** @class */ (function () { var PropInfo = /** @class */ (function () {
/*
constructor(rawProp: DeclarationReflection) {
this.errorMessages = [];
this.name = rawProp.name;
this.docText = rawProp.comment ? rawProp.comment.shortText : "";
this.docText = this.docText.replace(/[\n\r]+/g, " ").trim();
this.defaultValue = rawProp.defaultValue || "";
this.defaultValue = this.defaultValue.replace(/\|/, "\\|");
this.type = rawProp.type ? rawProp.type.toString().replace(/\s/g, "") : "";
this.type = this.type.replace(/\|/, "\\|");
this.isDeprecated = rawProp.comment && rawProp.comment.hasTag("deprecated");
if (this.isDeprecated) {
this.docText = "(**Deprecated:** " + rawProp.comment.getTag("deprecated").text.replace(/[\n\r]+/g, " ").trim() + ") " + this.docText;
}
if (rawProp.decorators) {
rawProp.decorators.forEach(dec => {
//console.log(dec);
if (dec.name === "Input") {
this.isInput = true;
if (dec.arguments) {
let bindingName = dec.arguments["bindingPropertyName"];
if (bindingName && (bindingName !== ""))
this.name = bindingName.replace(/['"]/g, "");
}
if (!this.docText && !this.isDeprecated) {
this.errorMessages.push(`Warning: Input "${rawProp.name}" has no doc text.`);
}
}
if (dec.name === "Output") {
this.isOutput = true;
if (!this.docText && !this.isDeprecated) {
this.errorMessages.push(`Warning: Output "${rawProp.name}" has no doc text.`);
}
}
});
}
}
*/
function PropInfo(sourceData) { function PropInfo(sourceData) {
var _this = this; var _this = this;
this.errorMessages = []; this.errorMessages = [];
@ -105,26 +59,6 @@ var PropInfo = /** @class */ (function () {
exports.PropInfo = PropInfo; exports.PropInfo = PropInfo;
; ;
var ParamInfo = /** @class */ (function () { var ParamInfo = /** @class */ (function () {
/*
constructor(rawParam: ParameterReflection) {
this.name = rawParam.name;
this.type = rawParam.type.toString().replace(/\s/g, "");
this.defaultValue = rawParam.defaultValue;
this.docText = rawParam.comment ? rawParam.comment.text : "";
this.docText = this.docText.replace(/[\n\r]+/g, " ").trim();
this.isOptional = rawParam.flags.isOptional;
this.combined = this.name;
if (this.isOptional)
this.combined += "?";
this.combined += `: \`${this.type}\``;
if (this.defaultValue !== "")
this.combined += ` = \`${this.defaultValue}\``;
}
*/
function ParamInfo(sourceData) { function ParamInfo(sourceData) {
this.name = sourceData.id; this.name = sourceData.id;
this.type = sourceData.type.toString().replace(/\s/g, ""); this.type = sourceData.type.toString().replace(/\s/g, "");
@ -148,53 +82,6 @@ var ParamInfo = /** @class */ (function () {
}()); }());
exports.ParamInfo = ParamInfo; exports.ParamInfo = ParamInfo;
var MethodSigInfo = /** @class */ (function () { var MethodSigInfo = /** @class */ (function () {
/*
constructor(rawSig: SignatureReflection) {
this.errorMessages = [];
this.name = rawSig.name;
this.returnType = rawSig.type ? rawSig.type.toString().replace(/\s/g, "") : "";
this.returnsSomething = this.returnType != "void";
if (rawSig.hasComment()) {
this.docText = rawSig.comment.shortText + rawSig.comment.text;
this.docText = this.docText.replace(/[\n\r]+/g, " ").trim();
if (!this.docText) {
this.errorMessages.push(`Warning: method "${rawSig.name}" has no doc text.`);
}
this.returnDocText = rawSig.comment.returns;
this.returnDocText = this.returnDocText ? this.returnDocText.replace(/[\n\r]+/g, " ").trim() : "";
if (this.returnDocText.toLowerCase() === "nothing") {
this.returnsSomething = false;
}
if (this.returnsSomething && !this.returnDocText) {
this.errorMessages.push(`Warning: Return value of method "${rawSig.name}" has no doc text.`);
}
this.isDeprecated = rawSig.comment.hasTag("deprecated");
}
this.params = [];
let paramStrings = [];
if (rawSig.parameters) {
rawSig.parameters.forEach(rawParam => {
if (!rawParam.comment || !rawParam.comment.text) {
this.errorMessages.push(`Warning: parameter "${rawParam.name}" of method "${rawSig.name}" has no doc text.`);
}
let param = new ParamInfo(rawParam);
this.params.push(param);
paramStrings.push(param.combined);
});
}
this.signature = "(" + paramStrings.join(", ") + ")";
}
*/
function MethodSigInfo(sourceData) { function MethodSigInfo(sourceData) {
var _this = this; var _this = this;
this.errorMessages = []; this.errorMessages = [];
@ -247,48 +134,18 @@ var MethodSigInfo = /** @class */ (function () {
}()); }());
exports.MethodSigInfo = MethodSigInfo; exports.MethodSigInfo = MethodSigInfo;
var ComponentInfo = /** @class */ (function () { var ComponentInfo = /** @class */ (function () {
/*
constructor(classRef: DeclarationReflection) {
let props = classRef.getChildrenByKind(ReflectionKind.Property);
let accessors = classRef.getChildrenByKind(ReflectionKind.Accessor);
this.properties = [...props, ...accessors].map(item => {
return new PropInfo(item);
});
let methods = classRef.getChildrenByKind(ReflectionKind.Method);
this.methods = [];
methods.forEach(method =>{
if (!(method.flags.isPrivate || method.flags.isProtected || undocMethodNames[method.name])) {
method.signatures.forEach(sig => {
this.methods.push(new MethodSigInfo(sig));
});
}
});
this.hasInputs = false;
this.hasOutputs = false;
this.properties.forEach(prop => {
if (prop.isInput)
this.hasInputs = true;
if (prop.isOutput)
this.hasOutputs = true;
});
this.hasMethods = methods.length > 0;
}
*/
function ComponentInfo(sourceData) { function ComponentInfo(sourceData) {
var _this = this; var _this = this;
this.name = sourceData.items[0].name;
this.itemType = sourceData.items[0].type;
this.hasInputs = false; this.hasInputs = false;
this.hasOutputs = false; this.hasOutputs = false;
this.hasMethods = false; this.hasMethods = false;
this.sourcePath = sourceData.items[0].source.path; this.sourcePath = sourceData.items[0].source.path;
this.sourceLine = sourceData.items[0].source.line; this.sourceLine = sourceData.items[0].source.line;
if (this.itemType === 'type alias') {
return;
}
this.properties = []; this.properties = [];
this.methods = []; this.methods = [];
sourceData.items.forEach(function (item) { sourceData.items.forEach(function (item) {

View File

@ -1,13 +1,3 @@
import {
DeclarationReflection,
SignatureReflection,
ParameterReflection,
ReflectionKind,
} from "typedoc";
import { find } from "shelljs";
import { isUndefined } from "util";
let undocMethodNames = { let undocMethodNames = {
"ngOnChanges": 1 "ngOnChanges": 1
}; };
@ -25,52 +15,6 @@ export class PropInfo {
errorMessages: string[]; errorMessages: string[];
/*
constructor(rawProp: DeclarationReflection) {
this.errorMessages = [];
this.name = rawProp.name;
this.docText = rawProp.comment ? rawProp.comment.shortText : "";
this.docText = this.docText.replace(/[\n\r]+/g, " ").trim();
this.defaultValue = rawProp.defaultValue || "";
this.defaultValue = this.defaultValue.replace(/\|/, "\\|");
this.type = rawProp.type ? rawProp.type.toString().replace(/\s/g, "") : "";
this.type = this.type.replace(/\|/, "\\|");
this.isDeprecated = rawProp.comment && rawProp.comment.hasTag("deprecated");
if (this.isDeprecated) {
this.docText = "(**Deprecated:** " + rawProp.comment.getTag("deprecated").text.replace(/[\n\r]+/g, " ").trim() + ") " + this.docText;
}
if (rawProp.decorators) {
rawProp.decorators.forEach(dec => {
//console.log(dec);
if (dec.name === "Input") {
this.isInput = true;
if (dec.arguments) {
let bindingName = dec.arguments["bindingPropertyName"];
if (bindingName && (bindingName !== ""))
this.name = bindingName.replace(/['"]/g, "");
}
if (!this.docText && !this.isDeprecated) {
this.errorMessages.push(`Warning: Input "${rawProp.name}" has no doc text.`);
}
}
if (dec.name === "Output") {
this.isOutput = true;
if (!this.docText && !this.isDeprecated) {
this.errorMessages.push(`Warning: Output "${rawProp.name}" has no doc text.`);
}
}
});
}
}
*/
constructor(sourceData) { constructor(sourceData) {
this.errorMessages = []; this.errorMessages = [];
@ -140,26 +84,6 @@ export class ParamInfo {
combined: string; combined: string;
isOptional: boolean; isOptional: boolean;
/*
constructor(rawParam: ParameterReflection) {
this.name = rawParam.name;
this.type = rawParam.type.toString().replace(/\s/g, "");
this.defaultValue = rawParam.defaultValue;
this.docText = rawParam.comment ? rawParam.comment.text : "";
this.docText = this.docText.replace(/[\n\r]+/g, " ").trim();
this.isOptional = rawParam.flags.isOptional;
this.combined = this.name;
if (this.isOptional)
this.combined += "?";
this.combined += `: \`${this.type}\``;
if (this.defaultValue !== "")
this.combined += ` = \`${this.defaultValue}\``;
}
*/
constructor(sourceData) { constructor(sourceData) {
this.name = sourceData.id; this.name = sourceData.id;
@ -203,54 +127,6 @@ export class MethodSigInfo {
errorMessages: string[]; errorMessages: string[];
/*
constructor(rawSig: SignatureReflection) {
this.errorMessages = [];
this.name = rawSig.name;
this.returnType = rawSig.type ? rawSig.type.toString().replace(/\s/g, "") : "";
this.returnsSomething = this.returnType != "void";
if (rawSig.hasComment()) {
this.docText = rawSig.comment.shortText + rawSig.comment.text;
this.docText = this.docText.replace(/[\n\r]+/g, " ").trim();
if (!this.docText) {
this.errorMessages.push(`Warning: method "${rawSig.name}" has no doc text.`);
}
this.returnDocText = rawSig.comment.returns;
this.returnDocText = this.returnDocText ? this.returnDocText.replace(/[\n\r]+/g, " ").trim() : "";
if (this.returnDocText.toLowerCase() === "nothing") {
this.returnsSomething = false;
}
if (this.returnsSomething && !this.returnDocText) {
this.errorMessages.push(`Warning: Return value of method "${rawSig.name}" has no doc text.`);
}
this.isDeprecated = rawSig.comment.hasTag("deprecated");
}
this.params = [];
let paramStrings = [];
if (rawSig.parameters) {
rawSig.parameters.forEach(rawParam => {
if (!rawParam.comment || !rawParam.comment.text) {
this.errorMessages.push(`Warning: parameter "${rawParam.name}" of method "${rawSig.name}" has no doc text.`);
}
let param = new ParamInfo(rawParam);
this.params.push(param);
paramStrings.push(param.combined);
});
}
this.signature = "(" + paramStrings.join(", ") + ")";
}
*/
constructor(sourceData) { constructor(sourceData) {
this.errorMessages = []; this.errorMessages = [];
@ -312,6 +188,8 @@ export class MethodSigInfo {
export class ComponentInfo { export class ComponentInfo {
name: string;
itemType: string;
properties: PropInfo[]; properties: PropInfo[];
methods: MethodSigInfo[]; methods: MethodSigInfo[];
hasInputs: boolean; hasInputs: boolean;
@ -320,43 +198,11 @@ export class ComponentInfo {
sourcePath: string; sourcePath: string;
sourceLine: number; sourceLine: number;
/*
constructor(classRef: DeclarationReflection) {
let props = classRef.getChildrenByKind(ReflectionKind.Property);
let accessors = classRef.getChildrenByKind(ReflectionKind.Accessor);
this.properties = [...props, ...accessors].map(item => {
return new PropInfo(item);
});
let methods = classRef.getChildrenByKind(ReflectionKind.Method);
this.methods = [];
methods.forEach(method =>{
if (!(method.flags.isPrivate || method.flags.isProtected || undocMethodNames[method.name])) {
method.signatures.forEach(sig => {
this.methods.push(new MethodSigInfo(sig));
});
}
});
this.hasInputs = false;
this.hasOutputs = false;
this.properties.forEach(prop => {
if (prop.isInput)
this.hasInputs = true;
if (prop.isOutput)
this.hasOutputs = true;
});
this.hasMethods = methods.length > 0;
}
*/
constructor(sourceData) { constructor(sourceData) {
this.name = sourceData.items[0].name;
this.itemType = sourceData.items[0].type;
this.hasInputs = false; this.hasInputs = false;
this.hasOutputs = false; this.hasOutputs = false;
this.hasMethods = false; this.hasMethods = false;
@ -364,6 +210,10 @@ export class ComponentInfo {
this.sourcePath = sourceData.items[0].source.path; this.sourcePath = sourceData.items[0].source.path;
this.sourceLine = sourceData.items[0].source.line; this.sourceLine = sourceData.items[0].source.line;
if (this.itemType === 'type alias') {
return;
}
this.properties = []; this.properties = [];
this.methods = []; this.methods = [];

View File

@ -43,7 +43,7 @@ function searchItemsRecursively(item) {
function interestedIn(itemKind) { function interestedIn(itemKind) {
return (itemKind === 128) || (itemKind === 256); return (itemKind === 128) || (itemKind === 256) || (itemKind === 4194304);
} }

View File

@ -137,9 +137,9 @@ function makeToc(tree) {
"title": linkTitle, "title": linkTitle,
//"anchor": "#" + linkTitle.toLowerCase().replace(/ /g, "-").replace(/[:;@\.,'"`$\(\)\/]/g ,"") //"anchor": "#" + linkTitle.toLowerCase().replace(/ /g, "-").replace(/[:;@\.,'"`$\(\)\/]/g ,"")
"anchor": "#" + linkTitle.toLowerCase() "anchor": "#" + linkTitle.toLowerCase()
.replace(/\W/g ,"-") .replace(/[^a-z0-9\s\-_]/g, '')
.replace(/-+/g, '-') .replace(/\s/g ,"-")
.replace(/-+$/, '') .replace(/\-+$/, '')
}) })
}; };
}); });

View File

@ -7,7 +7,6 @@ var remark = require("remark");
// import * as stringify from "remark-stringify"; // import * as stringify from "remark-stringify";
// import * as frontMatter from "remark-frontmatter"; // import * as frontMatter from "remark-frontmatter";
var ejs = require("ejs"); var ejs = require("ejs");
var typedoc_1 = require("typedoc");
var mdNav_1 = require("../mdNav"); var mdNav_1 = require("../mdNav");
var ngHelpers_1 = require("../ngHelpers"); var ngHelpers_1 = require("../ngHelpers");
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"]; var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
@ -37,19 +36,24 @@ function showErrors(filename, errorMessages) {
}); });
console.log(""); console.log("");
} }
/*
function initPhase(aggData) { function initPhase(aggData) {
nameExceptions = aggData.config.typeNameExceptions; nameExceptions = aggData.config.typeNameExceptions;
var app = new typedoc_1.Application({
let app = new Application({
exclude: excludePatterns, exclude: excludePatterns,
ignoreCompilerErrors: true, ignoreCompilerErrors: true,
experimentalDecorators: true, experimentalDecorators: true,
tsconfig: "tsconfig.json" tsconfig: "tsconfig.json"
}); });
var sources = app.expandInputFiles(libFolders.map(function (folder) {
let sources = app.expandInputFiles(libFolders.map(folder => {
return path.resolve("lib", folder); return path.resolve("lib", folder);
})); }));
aggData.projData = app.convert(sources); aggData.projData = app.convert(sources);
} }
*/
function updateFile(tree, pathname, aggData, errorMessages) { function updateFile(tree, pathname, aggData, errorMessages) {
/* /*
let compName = angNameToClassName(path.basename(pathname, ".md")); let compName = angNameToClassName(path.basename(pathname, ".md"));

View File

@ -61,7 +61,7 @@ function showErrors(filename, errorMessages) {
} }
/*
function initPhase(aggData) { function initPhase(aggData) {
nameExceptions = aggData.config.typeNameExceptions; nameExceptions = aggData.config.typeNameExceptions;
@ -78,7 +78,7 @@ function initPhase(aggData) {
aggData.projData = app.convert(sources); aggData.projData = app.convert(sources);
} }
*/

View File

@ -3,7 +3,7 @@ items:
name: <%= name %> name: <%= name %>
fullName: <%= name %> fullName: <%= name %>
source: source:
path: <%= 'lib/' + sources[0].fileName %> path: <%= sources[0].fileName %>
startLine: <%= sources[0].line %> startLine: <%= sources[0].line %>
children: children:
<%_ if (typeof children !== "undefined") { -%> <%_ if (typeof children !== "undefined") { -%>
@ -36,9 +36,9 @@ items:
<%- include("property", {child: child}); -%> <%- include("property", {child: child}); -%>
<% if (child.kindString === "Accessor") { -%> <% if (child.kindString === "Accessor") { -%>
<% if (typeof child.getSignature !== "undefined") { -%> <% if (typeof child.getSignature !== "undefined") { -%>
<%- include("propSyntaxSection", {child: child.getSignature}); -%> <%- include("propSyntaxSection", {child: child.getSignature[0]}); -%>
<% } else if (typeof child.setSignature !== "undefined") { -%> <% } else if (typeof child.setSignature !== "undefined") { -%>
<%- include("propSyntaxSection", {child: child.setSignature}); -%> <%- include("propSyntaxSection", {child: child.setSignature[0]}); -%>
<% } -%> <% } -%>
<% } else { -%> <% } else { -%>
<%- include("propSyntaxSection", {child: child}); -%> <%- include("propSyntaxSection", {child: child}); -%>

View File

@ -1,4 +1,4 @@
<%_ if ((type.type === "intrinsic") || (type.type === "reference")) { _%> <%_ if ((type.type === "intrinsic") || (type.type === "reference")) { _%>
<%= type.name _%> <%= type.name _%>
<%_ if (typeof type.typeArguments !== "undefined") { _%> <%_ if (typeof type.typeArguments !== "undefined") { _%>
<<%_ type.typeArguments.forEach((arg, index) => { _%> <<%_ type.typeArguments.forEach((arg, index) => { _%>