Review Documentation and tools doc (#5600)

* add exclude files property

* remove Unknown

* fix reviewer

* Update reviewChecker.js

* Update docs/README.md

Co-Authored-By: Mark Hulbert <39801222+m-hulbert@users.noreply.github.com>

Co-authored-by: Mark Hulbert <39801222+m-hulbert@users.noreply.github.com>
This commit is contained in:
Eugenio Romano
2020-04-09 11:55:33 +01:00
committed by GitHub
co-authored by Mark Hulbert
parent 8962ce0419
commit ecca9220f1
42 changed files with 265 additions and 195 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ for more information about installing and using the source code.
| [JWT helper service](core/services/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/services/jwt-helper.service.ts) | | [JWT helper service](core/services/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/services/jwt-helper.service.ts) |
| [Log Service](core/services/log.service.md) | Provides log functionality. | [Source](../lib/core/services/log.service.ts) | | [Log Service](core/services/log.service.md) | Provides log functionality. | [Source](../lib/core/services/log.service.ts) |
| [Login Dialog service](core/services/login-dialog.service.md) | Manages login dialogs. | [Source](../lib/core/services/login-dialog.service.ts) | | [Login Dialog service](core/services/login-dialog.service.md) | Manages login dialogs. | [Source](../lib/core/services/login-dialog.service.ts) |
| [Node Service](core/services/node.service.md) | Gets Alfresco Repository node metadata and creates nodes with metadata. | [Source](../lib/core/form/services/node.service.ts) | | [Node Service](core/services/node.service.md) | *Deprecated.* Use the Nodes Api service instead. | [Source](../lib/core/form/services/node.service.ts) |
| [Nodes Api service](core/services/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/core/services/nodes-api.service.ts) | | [Nodes Api service](core/services/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/core/services/nodes-api.service.ts) |
| [Notification Service](core/services/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/notifications/services/notification.service.ts) | | [Notification Service](core/services/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/notifications/services/notification.service.ts) |
| [Page Title service](core/services/page-title.service.md) | Sets the page title. | [Source](../lib/core/services/page-title.service.ts) | | [Page Title service](core/services/page-title.service.md) | Sets the page title. | [Source](../lib/core/services/page-title.service.ts) |
@@ -18,14 +18,13 @@ Displays and edits metadata related to a node.
- [Properties](#properties) - [Properties](#properties)
- [Details](#details) - [Details](#details)
- [Application config presets](#application-config-presets) - [Application config presets](#application-config-presets)
- [Indifferent config](#indifferent-config)
- [Aspect oriented config](#aspect-oriented-config)
- [Layout oriented config](#layout-oriented-config) - [Layout oriented config](#layout-oriented-config)
- [Displaying all properties](#displaying-all-properties) - [Displaying all properties](#displaying-all-properties)
- [Making aspects and properties read only](#making-aspects-and-properties-read-only) - [Making aspects and properties read only](#making-aspects-and-properties-read-only)
- [What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect](#what-happens-when-there-is-a-whitelisted-aspect-in-the-config-but-the-given-node-doesnt-relate-to-that-aspect) - [What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect](#what-happens-when-there-is-a-whitelisted-aspect-in-the-config-but-the-given-node-doesnt-relate-to-that-aspect)
- [Multi value card properties](#multi-value-card-properties) - [Multi value card properties](#multi-value-card-properties)
- [Use chips for multi value properties](#use-chips-for-multi-value-properties) - [Use chips for multi value properties](#use-chips-for-multi-value-properties)
- [Copy to Clipboard on click](#copy-to-clipboard-on-click)
## Basic Usage ## Basic Usage
@@ -402,15 +401,15 @@ For easier interaction with metadata properties you can enable the Copy to Clipb
Once you have enabled this feature you will be able to double click on your metadata properties and they will get copied to your clipboard for you to use. Once you have enabled this feature you will be able to double click on your metadata properties and they will get copied to your clipboard for you to use.
```json ```json
"content-metadata": { "content-metadata": {
"presets": { "presets": {
"default": { "default": {
"includeAll": true, "includeAll": true,
"exclude": "exif:exif", "exclude": "exif:exif",
"exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"] "exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"]
} }
}, },
"copy-to-clipboard-action": true "copy-to-clipboard-action": true
} }
``` ```
@@ -41,7 +41,7 @@ Opens a [Content Node Selector](content-node-selector.component.md) in its own
| excludeSiteContent | `string[]` | | 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 | [`RowFilter`](../../../lib/content-services/src/lib/document-list/data/row-filter.model.ts) | | Custom row filter function. See the [Row Filter Model](row-filter.model.md) page for more information. | | rowFilter | [`RowFilter`](../../../lib/content-services/src/lib/document-list/data/row-filter.model.ts) | | Custom row filter function. See the [Row Filter Model](row-filter.model.md) page for more information. |
| showDropdownSiteList | `boolean` | | Toggle sites list dropdown rendering | | showDropdownSiteList | `boolean` | | Toggle sites list dropdown rendering |
| showFilesInResult | `boolean` | | Shows the files and folders in the search result | | showFilesInResult | `void` | | Shows the files and folders in the search result |
| showSearch | `boolean` | | Toggle search input rendering | | showSearch | `boolean` | | Toggle search input rendering |
### Events ### Events
@@ -41,34 +41,34 @@ Manages Document List information that is specific to a user.
Is the folder ID a "-my", "-root-", or "-shared-" alias? Is the folder ID a "-my", "-root-", or "-shared-" alias?
- _folderId:_ `string` - Folder ID name to check - _folderId:_ `string` - Folder ID name to check
- **Returns** `boolean` - True if the ID is one of the supported sources, false otherwise - **Returns** `boolean` - True if the ID is one of the supported sources, false otherwise
- **loadFavorites**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`, where? string): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>`<br/> - **loadFavorites**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
Gets favorite files for the current user. Gets favorite files for the current user.
- _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results - _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results - _includeFields:_ `string[]` - List of data field names to include in the results
- _where:_ (Optional) `string` - A string to restrict the returned objects by using a predicate - _where:_ `string` - (Optional) A string to restrict the returned objects by using a predicate
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of favorite files - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of favorite files
- **loadFolderByNodeId**(nodeId: `string`, pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: string): `any`<br/> - **loadFolderByNodeId**(nodeId: `string`, pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: `string`): `any`<br/>
Gets a folder's contents. Gets a folder's contents.
- _nodeId:_ `string` - ID of the target folder node - _nodeId:_ `string` - ID of the target folder node
- _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results - _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results - _includeFields:_ `string[]` - List of data field names to include in the results
- _where:_ (Optional) `string` - A string to restrict the returned objects by using a predicate - _where:_ `string` - (Optional) 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.
- **Returns** `any` - List of items contained in the folder - **Returns** `any` - List of items contained in the folder
- **loadMemberSites**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), where?: string): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SiteMemberPaging.md)`>`<br/> - **loadMemberSites**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), where?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SiteMemberPaging.md)`>`<br/>
Gets sites that the current user is a member of. Gets sites that the current user is a member of.
- _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results - _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _where:_ (Optional) `string` - A string to restrict the returned objects by using a predicate - _where:_ `string` - (Optional) A string to restrict the returned objects by using a predicate
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SiteMemberPaging.md)`>` - List of sites - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SiteMemberPaging.md)`>` - List of sites
- **loadSharedLinks**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: string): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SharedLinkPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SharedLinkPaging.md)`>`<br/> - **loadSharedLinks**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SharedLinkPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SharedLinkPaging.md)`>`<br/>
Gets shared links for the current user. Gets shared links for the current user.
- _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results - _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results - _includeFields:_ `string[]` - List of data field names to include in the results
- _where:_ (Optional)`string` - A string to restrict the returned objects by using a predicate - _where:_ `string` - (Optional) A string to restrict the returned objects by using a predicate
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SharedLinkPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SharedLinkPaging.md)`>` - List of shared links - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SharedLinkPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/SharedLinkPaging.md)`>` - List of shared links
- **loadSites**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), where?: string): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>`<br/> - **loadSites**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), where?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
Gets all sites in the repository. Gets all sites in the repository.
- _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results - _pagination:_ [`PaginationModel`](../../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _where:_ (Optional)`string` - A string to restrict the returned objects by using a predicate - _where:_ `string` - (Optional) A string to restrict the returned objects by using a predicate
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of sites - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of sites
- **loadTrashcan**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`DeletedNodesPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/DeletedNodesPaging.md)`>`<br/> - **loadTrashcan**(pagination: [`PaginationModel`](../../../lib/core/models/pagination.model.ts), includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`DeletedNodesPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/DeletedNodesPaging.md)`>`<br/>
Gets all items currently in the trash. Gets all items currently in the trash.
@@ -95,7 +95,7 @@ export class MyView {
``` ```
You will probably want to set up all your custom actions at the application root level or You will probably want to set up all your custom actions at the application root level or
with a custom application service. with a custom [application service](../../../lib/testing/src/lib/core/actions/APS/applications.service.ts).
## See also ## See also
@@ -95,7 +95,7 @@ export class MyView {
``` ```
You will probably want to set up all your custom actions at the application root level or You will probably want to set up all your custom actions at the application root level or
with a custom application service. with a custom [application service](../../../lib/testing/src/lib/core/actions/APS/applications.service.ts).
## See also ## See also
+3 -3
View File
@@ -108,14 +108,14 @@ Defining properties from Typescript:
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| displayClearAction | `boolean` | true | Toggles whether or not to display clear action. |
| copyToClipboardAction | `boolean` | true | Toggles whether or not to enable copy to clipboard action. | | copyToClipboardAction | `boolean` | true | Toggles whether or not to enable copy to clipboard action. |
| useChipsForMultiValueProperty | `boolean` | true | Toggles whether or not to enable chips for multivalued properties. | | displayClearAction | `boolean` | true | Toggles whether or not to display clear action. |
| multiValueSeparator | `string` | ',' | String separator between multi-value property items. |
| displayEmpty | `boolean` | true | Toggles whether or not to show empty items in non-editable mode. | | displayEmpty | `boolean` | true | Toggles whether or not to show empty items in non-editable mode. |
| displayNoneOption | `boolean` | true | Toggles whether or not to display none option. | | displayNoneOption | `boolean` | true | Toggles whether or not to display none option. |
| editable | `boolean` | | Toggles whether or not the items can be edited. | | editable | `boolean` | | Toggles whether or not the items can be edited. |
| multiValueSeparator | `string` | DEFAULT_SEPARATOR | String separator between multi-value property items. |
| properties | [`CardViewItem`](../../../lib/core/card-view/interfaces/card-view-item.interface.ts)`[]` | | (**required**) Items to show in the card view. | | properties | [`CardViewItem`](../../../lib/core/card-view/interfaces/card-view-item.interface.ts)`[]` | | (**required**) Items to show in the card view. |
| useChipsForMultiValueProperty | `boolean` | true | Toggles whether or not to enable chips for multivalued properties. |
## Details ## Details
+1 -1
View File
@@ -28,7 +28,7 @@ Provides a universal way of rendering registered and named icons.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| color | `ThemePalette` | | Theme color palette for the component. | | color | [`ThemePalette`](https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts) | | Theme color palette for the component. |
| value | `string` | | Icon value, which can be either a ligature name or a custom icon in the format `[namespace]:[name]`. | | value | `string` | | Icon value, which can be either a ligature name or a custom icon in the format `[namespace]:[name]`. |
## Details ## Details
+1 -1
View File
@@ -74,7 +74,7 @@ pushed to the right by a spacer:
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| color | `string` | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. | | color | [`ThemePalette`](https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts) | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. |
| title | `string` | "" | Toolbar title. | | title | `string` | "" | Toolbar title. |
## Details ## Details
+3 -3
View File
@@ -23,8 +23,8 @@ Shows user information.
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| bpmBackgroundImage | `string` | | Custom path for the background banner image for APS users. | | bpmBackgroundImage | `string` | | Custom path for the background banner image for APS users. |
| ecmBackgroundImage | `string` | | Custom path for the background banner image for ACS users. | | ecmBackgroundImage | `string` | | Custom path for the background banner image for ACS users. |
| menuPositionX | `string` | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. | | menuPositionX | [`MenuPositionX`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
| menuPositionY | `string` | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. | | menuPositionY | [`MenuPositionY`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
| namePosition | `string` | "right" | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. | | namePosition | `string` | "right" | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
| showName | `boolean` | true | Shows/hides the username next to the user info button. | | showName | `boolean` | true | Shows/hides the username next to the user info button. |
@@ -33,4 +33,4 @@ Shows user information.
The component shows a round icon for the user and will show extra information about The component shows a round icon for the user and will show extra information about
the user when clicked. the user when clicked.
If user is logged in with both ACS and APS, the ACS image will be shown. If user is logged in with both ACS and APS, the ACS image will be shown.
In case of SSO authentication, the information related to the user like firstname, lastname will be fetched using the Keycloak Api In case of SSO authentication, the information related to the user like firstname, lastname will be fetched using the Keycloak [`Api`](../../../lib/testing/src/lib/core/structure/api.ts)
@@ -66,6 +66,11 @@ Provides authentication to ACS and APS.
- **isLoggedIn**(): `boolean`<br/> - **isLoggedIn**(): `boolean`<br/>
Checks if the user logged in. Checks if the user logged in.
- **Returns** `boolean` - True if logged in, false otherwise - **Returns** `boolean` - True if logged in, false otherwise
- **isLoggedInWith**(provider: `string`): `boolean`<br/>
- _provider:_ `string` -
- **Returns** `boolean` -
- **isOauth**(): `boolean`<br/> - **isOauth**(): `boolean`<br/>
Does the provider support OAuth? Does the provider support OAuth?
- **Returns** `boolean` - True if supported, false otherwise - **Returns** `boolean` - True if supported, false otherwise
+1 -1
View File
@@ -18,7 +18,7 @@ Provides access to various APIs related to file upload features.
- _files:_ [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files to queue - _files:_ [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files to queue
- **Returns** [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - Array of files that were not blocked from upload by the ignore list - **Returns** [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - Array of files that were not blocked from upload by the ignore list
- **cancelUpload**(files: [`FileModel`](../../../lib/core/models/file.model.ts)`[]`)<br/> - **cancelUpload**(files: [`FileModel`](../../../lib/core/models/file.model.ts)`[]`)<br/>
Cancels uploading of files. Cancels uploading of files. If the file is smaller than 1 MB the file will be uploaded and then the node deleted to prevent having files that were aborted but still uploaded.
- _files:_ [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel - _files:_ [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel
- **clearQueue**()<br/> - **clearQueue**()<br/>
Clears the upload queue Clears the upload queue
@@ -103,7 +103,7 @@ The template defined inside `empty-form` will be shown when no form definition i
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when any error occurs. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when any error occurs. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. | | executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. | | formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when form content is clicked. | | formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. |
| formDataRefreshed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when form values are refreshed due to a data property change. | | formDataRefreshed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when form values are refreshed due to a data property change. |
| formError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormFieldModel`](../../core/models/form-field.model.md)`[]>` | Emitted when the supplied form values have a validation error. | | formError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormFieldModel`](../../core/models/form-field.model.md)`[]>` | Emitted when the supplied form values have a validation error. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. | | formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
@@ -38,7 +38,8 @@ Searches Groups.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| appName | `string` | | Name of the application. If specified this shows the groups who have access to the app. | | appName | `string` | | Name of the application. If specified this shows the groups who have access to the app. |
| mode | `string` | | Group selection mode (single/multiple). | | groupChipsCtrl | `FormControl` | | FormControl to list of group |
| mode | [`ComponentSelectionMode`](../../../lib/process-services-cloud/src/lib/types.ts) | "single" | Group selection mode (single/multiple). |
| preSelectGroups | [`IdentityGroupModel`](../../../lib/core/models/identity-group.model.ts)`[]` | \[] | Array of groups to be pre-selected. This pre-selects all groups in multi selection mode and only the first group of the array in single selection mode. | | preSelectGroups | [`IdentityGroupModel`](../../../lib/core/models/identity-group.model.ts)`[]` | \[] | Array of groups to be pre-selected. This pre-selects all groups in multi selection mode and only the first group of the array in single selection mode. |
| readOnly | `boolean` | false | Show the info in readonly mode | | readOnly | `boolean` | false | Show the info in readonly mode |
| roles | `string[]` | \[] | Role names of the groups to be listed. | | roles | `string[]` | \[] | Role names of the groups to be listed. |
@@ -25,13 +25,14 @@ Allows one or more users to be selected (with auto-suggestion) based on the inpu
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| appName | `string` | | Name of the application. If specified, this shows the users who have access to the app. | | appName | `string` | | Name of the application. If specified, this shows the users who have access to the app. |
| mode | `string` | | User selection mode (single/multiple). | | mode | [`ComponentSelectionMode`](../../../lib/process-services-cloud/src/lib/types.ts) | "single" | User selection mode (single/multiple). |
| preSelectUsers | [`IdentityUserModel`](../../../lib/core/models/identity-user.model.ts)`[]` | \[] | Array of users to be pre-selected. All users in the array are pre-selected in multi selection mode, but only the first user is pre-selected in single selection mode. Mandatory properties are: id, email, username | | preSelectUsers | [`IdentityUserModel`](../../../lib/core/models/identity-user.model.ts)`[]` | \[] | Array of users to be pre-selected. All users in the array are pre-selected in multi selection mode, but only the first user is pre-selected in single selection mode. Mandatory properties are: id, email, username |
| readOnly | `boolean` | false | Show the info in readonly mode | | readOnly | `boolean` | false | Show the info in readonly mode |
| roles | `string[]` | | Role names of the users to be listed. | | roles | `string[]` | | Role names of the users to be listed. |
| searchUserCtrl | `FormControl` | | FormControl to search the user | | searchUserCtrl | `FormControl` | | FormControl to search the user |
| title | `string` | | Placeholder translation key | | title | `string` | | Placeholder translation key |
| validate | `Boolean` | false | This flag enables the validation on the preSelectUsers passed as input. In case the flag is true the components call the [identity service](../../../lib/testing/src/lib/core/actions/identity/identity.service.ts) to verify the validity of the information passed as input. Otherwise, no check will be done. | | userChipsCtrl | `FormControl` | | FormControl to list of users |
| validate | `boolean` | false | This flag enables the validation on the preSelectUsers passed as input. In case the flag is true the components call the [identity service](../../../lib/testing/src/lib/core/actions/identity/identity.service.ts) to verify the validity of the information passed as input. Otherwise, no check will be done. |
### Events ### Events
@@ -51,8 +51,8 @@ Starts a process.
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when the starting process is cancelled | | cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when the starting process is cancelled |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when an error occurs. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when an error occurs. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. | | formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. |
| processDefinitionSelection | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-definition-cloud.model.ts)`>` | Emitted when process definition selection changes. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when the process is successfully started. | | success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when the process is successfully started. |
| processDefinitionSelection | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-definition-cloud.model.ts)`>` | Emitted when process definition selection changes. |
## Details ## Details
@@ -15,7 +15,7 @@ Manages Local Storage preferences.
- **createPreference**(\_: `string`, key: `string`, newPreference: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/> - **createPreference**(\_: `string`, key: `string`, newPreference: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Creates local preference. Creates local preference.
- _\_:_ `string` - - _\_:_ `string` - Name of the target app
- _key:_ `string` - Key of the target preference - _key:_ `string` - Key of the target preference
- _newPreference:_ `any` - Details of new local preference - _newPreference:_ `any` - Details of new local preference
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of created local preferences - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of created local preferences
@@ -26,13 +26,13 @@ Manages Local Storage preferences.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of preferences without deleted preference - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of preferences without deleted preference
- **getPreferenceByKey**(\_: `string`, key: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/> - **getPreferenceByKey**(\_: `string`, key: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets local preference. Gets local preference.
- _\_:_ `string` - - _\_:_ `string` - Name of the target app
- _key:_ `string` - Key of the target preference - _key:_ `string` - Key of the target preference
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of local preference - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of local preference
- **getPreferences**(\_: `string`, key: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/> - **getPreferences**(\_: `string`, key: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets local preferences Gets local preferences
- _\_:_ `string` - - _\_:_ `string` - Name of the target app
- _key:_ `string` - (Optional) - _key:_ `string` - Key of the target preference
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - List of local preferences - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - List of local preferences
- **prepareLocalPreferenceResponse**(key: `string`): `any`<br/> - **prepareLocalPreferenceResponse**(key: `string`): `any`<br/>
@@ -41,7 +41,7 @@ Manages Local Storage preferences.
- **updatePreference**(\_: `string`, key: `string`, updatedPreference: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/> - **updatePreference**(\_: `string`, key: `string`, updatedPreference: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Updates local preference. Updates local preference.
- _\_:_ `string` - - _\_:_ `string` - Name of the target app
- _key:_ `string` - Key of the target preference - _key:_ `string` - Key of the target preference
- _updatedPreference:_ `any` - Details of updated preference - _updatedPreference:_ `any` - Details of updated preference
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of updated local preferences - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Observable of updated local preferences
@@ -24,7 +24,7 @@ Gets process definitions and starts processes.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-definition-cloud.model.ts)`[]>` - Array of process definitions - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-definition-cloud.model.ts)`[]>` - Array of process definitions
- **startProcess**(appName: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/> - **startProcess**(appName: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
Starts a process based on a process definition, name, form values or variables. Starts a process based on a process definition, name, form values or variables.
- _appName:_ `string` - name of the Application - _appName:_ `string` - name of the [Application](../../../lib/testing/src/lib/core/structure/application.ts)
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc) - _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
@@ -39,11 +39,11 @@ Starts a process.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| appId | `number` | | (optional) Limit the list of processes that can be started to those contained in the specified app. | | appId | `number` | | (optional) Limit the list of processes that can be started to those contained in the specified app. |
| title | `string` | "" | (optional) Define the header of the component. |
| name | `string` | "" | (optional) Name to assign to the current process. | | name | `string` | "" | (optional) Name to assign to the current process. |
| processDefinitionName | `string` | | (optional) Definition name of the process to start. | | processDefinitionName | `string` | | (optional) Definition name of the process to start. |
| processFilterSelector | `boolean` | true | (optional) Parameter to enable selection of process when filtering. | | processFilterSelector | `boolean` | true | (optional) Parameter to enable selection of process when filtering. |
| showSelectProcessDropdown | `boolean` | true | Hide or show the process selection dropdown. | | showSelectProcessDropdown | `boolean` | true | Hide or show the process selection dropdown. |
| title | `string` | | (optional) Define the header of the component. |
| values | [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts) | | Parameter to pass form field values in the start form if one is associated. | | values | [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts) | | Parameter to pass form field values in the start form if one is associated. |
| variables | [`ProcessInstanceVariable`](../../../lib/process-services/src/lib/process-list/models/process-instance-variable.model.ts)`[]` | | Variables in the input to the process [`RestVariable`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/RestVariable.md). | | variables | [`ProcessInstanceVariable`](../../../lib/process-services/src/lib/process-list/models/process-instance-variable.model.ts)`[]` | | Variables in the input to the process [`RestVariable`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/RestVariable.md). |
@@ -53,8 +53,8 @@ Starts a process.
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` | Emitted when the process is canceled. | | cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` | Emitted when the process is canceled. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` | Emitted when an error occurs. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` | Emitted when an error occurs. |
| processDefinitionSelection | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/ProcessDefinitionRepresentation.md)`>` | Emitted when process definition selection changes. |
| start | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` | Emitted when the process starts. | | start | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` | Emitted when the process starts. |
| processDefinitionSelection | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessDefinitionRepresentation`](../../../lib/process-services/src/lib/process-list/models/process-definition.model.ts)`>` | Emitted when process definition selection changes. |
## Details ## Details
+13 -13
View File
@@ -8,19 +8,19 @@ Below is a list of the high level feature themes planned for the forthcoming ver
Last updated 26 Feb 2019: Last updated 26 Feb 2019:
- Continue with the Activiti features. - Continue with the Activiti features.
- Accessibility (508 compliance and automatic tests). - Accessibility (508 compliance and automatic tests).
- Search highlighting. - Search highlighting.
- Better metadata viewer (whitelisting by default). - Better metadata viewer (whitelisting by default).
- Support for languages that are written right-to-left (such as Arabic). - Support for languages that are written right-to-left (such as Arabic).
- Continue with Governance features into ADF. - Continue with Governance features into ADF.
- Better experience in plugin/extensions. - Better experience in plugin/extensions.
- Application dashboards. - [`Application`](../lib/testing/src/lib/core/structure/application.ts) dashboards.
- Permission driven menus. - Permission driven menus.
- Experimental features: - Experimental features:
- Artificial Intelligence plugins/components. - Artificial Intelligence plugins/components.
- Web components for ADF to be framework agnostic. - Web components for ADF to be framework agnostic.
- Rapid Application Development. - Rapid [`Application`](../lib/testing/src/lib/core/structure/application.ts) Development.
**Disclaimer**: The list above may change in the future and it does not **Disclaimer**: The list above may change in the future and it does not
represent an official promise about features to be implemented. The purpose of this public roadmap is to share infomation openly with our ecosystem of customers, partners and enthusiasts. represent an official promise about features to be implemented. The purpose of this public roadmap is to share infomation openly with our ecosystem of customers, partners and enthusiasts.
+2 -2
View File
@@ -6,14 +6,14 @@ Github only: true
# Tutorials # Tutorials
| Name | Level | Abstract | | Name | Level | Abstract |
| ---- | ----- | -------- | | --- | --- | --- |
| [**Creating your first ADF application**](creating-your-first-adf-application.md) | Basic | This tutorial shows you how to set up your development environment and create an ADF application. | | [**Creating your first ADF application**](creating-your-first-adf-application.md) | Basic | This tutorial shows you how to set up your development environment and create an ADF application. |
| [**Creating your ADF application using Yeoman**](creating-the-app-using-yeoman.md) | Basic | In this tutorial you are going to see how to create an ADF application from scratch, using the [Yeoman scaffolding tool](http://yeoman.io/). | | [**Creating your ADF application using Yeoman**](creating-the-app-using-yeoman.md) | Basic | In this tutorial you are going to see how to create an ADF application from scratch, using the [Yeoman scaffolding tool](http://yeoman.io/). |
| [**Creating your Alfresco JavaScript application**](creating-javascript-app-using-alfresco-js-api.md) | Basic | In this tutorial you will learn how to create an application in JavaScript from scratch to interact with Alfresco. | | [**Creating your Alfresco JavaScript application**](creating-javascript-app-using-alfresco-js-api.md) | Basic | In this tutorial you will learn how to create an application in JavaScript from scratch to interact with Alfresco. |
| [**Adding a new component**](new-component.md) | Basic | In this tutorial, you will learn how to create a component using [Angular CLI](https://cli.angular.io/) within an existing application. | | [**Adding a new component**](new-component.md) | Basic | In this tutorial, you will learn how to create a component using [Angular CLI](https://cli.angular.io/) within an existing application. |
| [**Adding a new view**](new-view.md) | Beginner | In this tutorial you will learn how to create a new view in your application and how to access it using a defined endpoint. | | [**Adding a new view**](new-view.md) | Beginner | In this tutorial you will learn how to create a new view in your application and how to access it using a defined endpoint. |
| [**Using ADF Components**](using-components.md) | Basic | In this tutorial you will learn how to extend, use and configure ADF Components. | | [**Using ADF Components**](using-components.md) | Basic | In this tutorial you will learn how to extend, use and configure ADF Components. |
| [**Basic theming**](basic-theming.md) | Beginner | In this tutorial you will see how to theme an ADF app by modifying the CSS. | | [**Basic theming**](basic-theming.md) | Beginner | In this tutorial you will see how to theme an ADF app by modifying the CSS. |
| [**Customizing the Login component**](customising-login.md) | Intermediate | In this tutorial you will learn how to customize the [Login component](../core/components/login.component.md) following the technical documentation. | | [**Customizing the Login component**](customising-login.md) | Intermediate | In this tutorial you will learn how to customize the [Login component](../core/components/login.component.md) following the technical documentation. |
| [**Working with a Data Table**](working-with-data-table.md) | Intermediate | In this tutorial you will learn how to populate a DataTable component. | | [**Working with a Data Table**](working-with-data-table.md) | Intermediate | In this tutorial you will learn how to populate a DataTable component. |
| [**Working with the Nodes API Service**](working-with-nodes-api-service.md) | Intermediate | In this tutorial you will learn how to use the [`NodesApiService`](../core/services/nodes-api.service.md). | | [**Working with the Nodes API Service**](working-with-nodes-api-service.md) | Intermediate | In this tutorial you will learn how to use the [`NodesApiService`](../core/services/nodes-api.service.md). |
+1 -1
View File
@@ -35,7 +35,7 @@ backend services have been tested with each released version of ADF.
<!--v370 start--> <!--v370 start-->
No new components has been added in this release - [Cancel process directive](process-services-cloud/directives/cancel-process.directive.md)
<!--v370 end--> <!--v370 end-->
@@ -332,6 +332,7 @@ export class CustomResourcesService {
* @param nodeId ID of the target folder node * @param nodeId ID of the target folder node
* @param pagination Specifies how to paginate the results * @param pagination Specifies how to paginate the results
* @param includeFields List of data field names to include in the results * @param includeFields List of data field names to include in the results
* @param where Filters the Node list using the *where* condition of the REST API (for example, isFolder=true). See the REST API documentation for more information.
* @returns List of items contained in the folder * @returns List of items contained in the folder
*/ */
loadFolderByNodeId(nodeId: string, pagination: PaginationModel, includeFields: string[] = [], where?: string): any { loadFolderByNodeId(nodeId: string, pagination: PaginationModel, includeFields: string[] = [], where?: string): any {
@@ -27,7 +27,8 @@ export class LocalPreferenceCloudService implements PreferenceCloudServiceInterf
/** /**
* Gets local preferences * Gets local preferences
* @param appName Name of the target app * @param _ Name of the target app
* @param key Key of the target preference
* @returns List of local preferences * @returns List of local preferences
*/ */
getPreferences(_: string, key: string): Observable<any> { getPreferences(_: string, key: string): Observable<any> {
@@ -45,7 +46,7 @@ export class LocalPreferenceCloudService implements PreferenceCloudServiceInterf
/** /**
* Gets local preference. * Gets local preference.
* @param appName Name of the target app * @param _ Name of the target app
* @param key Key of the target preference * @param key Key of the target preference
* @returns Observable of local preference * @returns Observable of local preference
*/ */
@@ -55,9 +56,9 @@ export class LocalPreferenceCloudService implements PreferenceCloudServiceInterf
/** /**
* Creates local preference. * Creates local preference.
* @param appName Name of the target app * @param _ Name of the target app
* @param key Key of the target preference * @param key Key of the target preference
* @newPreference Details of new local preference * @param newPreference Details of new local preference
* @returns Observable of created local preferences * @returns Observable of created local preferences
*/ */
createPreference(_: string, key: string, newPreference: any): Observable<any> { createPreference(_: string, key: string, newPreference: any): Observable<any> {
@@ -69,7 +70,7 @@ export class LocalPreferenceCloudService implements PreferenceCloudServiceInterf
/** /**
* Updates local preference. * Updates local preference.
* @param appName Name of the target app * @param _ Name of the target app
* @param key Key of the target preference * @param key Key of the target preference
* @param updatedPreference Details of updated preference * @param updatedPreference Details of updated preference
* @returns Observable of updated local preferences * @returns Observable of updated local preferences
@@ -83,7 +84,6 @@ export class LocalPreferenceCloudService implements PreferenceCloudServiceInterf
/** /**
* Deletes local preference by given preference key. * Deletes local preference by given preference key.
* @param appName Name of the target app
* @param key Key of the target preference * @param key Key of the target preference
* @param preferences Details of updated preferences * @param preferences Details of updated preferences
* @returns Observable of preferences without deleted preference * @returns Observable of preferences without deleted preference
@@ -49,6 +49,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr
@Input() @Input()
appId: number; appId: number;
/** (optional) Define the header of the component. */
@Input() @Input()
title: string; title: string;
+27
View File
@@ -4658,6 +4658,15 @@
"sha.js": "^2.4.8" "sha.js": "^2.4.8"
} }
}, },
"cross-fetch": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.2.tgz",
"integrity": "sha1-pH/09/xxLauo9qaVoRyUhEDUVyM=",
"requires": {
"node-fetch": "2.1.2",
"whatwg-fetch": "2.0.4"
}
},
"cross-spawn": { "cross-spawn": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
@@ -7880,6 +7889,14 @@
"iterall": "^1.2.2" "iterall": "^1.2.2"
} }
}, },
"graphql-request": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-1.8.2.tgz",
"integrity": "sha512-dDX2M+VMsxXFCmUX0Vo0TopIZIX4ggzOtiCsThgtrKR4niiaagsGTDIHj3fsOMFETpa064vzovI+4YV4QnMbcg==",
"requires": {
"cross-fetch": "2.2.2"
}
},
"graphviz": { "graphviz": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://registry.npmjs.org/graphviz/-/graphviz-0.0.8.tgz", "resolved": "https://registry.npmjs.org/graphviz/-/graphviz-0.0.8.tgz",
@@ -11748,6 +11765,11 @@
"resolved": "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz", "resolved": "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz",
"integrity": "sha1-7K52QVDemYYexcgQ/V0Jaxg5Mqc=" "integrity": "sha1-7K52QVDemYYexcgQ/V0Jaxg5Mqc="
}, },
"node-fetch": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz",
"integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U="
},
"node-fetch-npm": { "node-fetch-npm": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz",
@@ -20379,6 +20401,11 @@
"integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
"dev": true "dev": true
}, },
"whatwg-fetch": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
},
"when": { "when": {
"version": "3.7.8", "version": "3.7.8",
"resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
+2
View File
@@ -16,6 +16,7 @@
"markdownlint": "markdownlint ./docs", "markdownlint": "markdownlint ./docs",
"docbuild": "node node_modules/typedoc/bin/typedoc --tsconfig lib/tsconfig.doc.json && node tools/doc/buildYamlSourceInfo.js docs/docs.json && node ./tools/doc/docProcessor.js", "docbuild": "node node_modules/typedoc/bin/typedoc --tsconfig lib/tsconfig.doc.json && node tools/doc/buildYamlSourceInfo.js docs/docs.json && node ./tools/doc/docProcessor.js",
"license-checker": "license-checker --production --failOn 'GPL' > licenses.txt", "license-checker": "license-checker --production --failOn 'GPL' > licenses.txt",
"review-checker": "node ./tools/doc/reviewChecker.js",
"01": "echo -------------------------------------------- Build Lib -----------------------------------------------", "01": "echo -------------------------------------------- Build Lib -----------------------------------------------",
"01s": "", "01s": "",
"unit-test": "concurrently \"ng test content-services --watch=false\" \"ng test process-services --watch=false\" \"ng test core --watch=false\" \"ng test extensions --watch=false\" \"ng test insights --watch=false\" \"ng test process-services-cloud --watch=false\" ", "unit-test": "concurrently \"ng test content-services --watch=false\" \"ng test process-services --watch=false\" \"ng test core --watch=false\" \"ng test extensions --watch=false\" \"ng test insights --watch=false\" \"ng test process-services-cloud --watch=false\" ",
@@ -152,6 +153,7 @@
"ejs": "^2.6.1", "ejs": "^2.6.1",
"fs-extra": "^4.0.2", "fs-extra": "^4.0.2",
"graphql": "^14.1.1", "graphql": "^14.1.1",
"graphql-request": "^1.8.2",
"husky": "^1.2.0", "husky": "^1.2.0",
"jasmine-ajax": "3.2.0", "jasmine-ajax": "3.2.0",
"jasmine-core": "~2.8.0", "jasmine-core": "~2.8.0",
+6
View File
@@ -25,3 +25,9 @@ changes in functionality (and therefore don't need documenting).
The script sends comma-separated text to the command line. You can copy/paste The script sends comma-separated text to the command line. You can copy/paste
this into a spreadsheet or redirect the output to a text file with a ".csv" this into a spreadsheet or redirect the output to a text file with a ".csv"
suffix. suffix.
To use this tool you need before to set graphAuthToken variable with you github access token:
export graphAuthToken=GITHUB_TOKEN
npm run review-checker
+33 -28
View File
@@ -8,6 +8,7 @@ var jsyaml = require("js-yaml");
var remark = require("remark"); var remark = require("remark");
var frontMatter = require("remark-frontmatter"); var frontMatter = require("remark-frontmatter");
var mdCompact = require("mdast-util-compact"); var mdCompact = require("mdast-util-compact");
var minimatch = require("Minimatch");
var si = require("./sourceInfoClasses"); var si = require("./sourceInfoClasses");
@@ -20,13 +21,28 @@ var defaultFolder = path.resolve("docs");
var sourceInfoFolder = path.resolve("docs", "sourceinfo"); var sourceInfoFolder = path.resolve("docs", "sourceinfo");
function filterFiles(filePath) {
let isAllowed = true;
this.excludedFileList = aggData['config'].exclude;
if (this.excludedFileList) {
isAllowed = this.excludedFileList.filter((pattern) => {
return minimatch(filePath, pattern.toString(), {
nocase: true
});
}).length === 0;
}
return isAllowed;
}
function updatePhase(mdCache, aggData) { function updatePhase(mdCache, aggData) {
var errorMessages;
toolList.forEach(toolName => { toolList.forEach(toolName => {
errorMessages = [];
console.log(`Tool: ${toolName}`); console.log(`Tool: ${toolName}`);
toolModules[toolName].processDocs(mdCache, aggData, errorMessages); toolModules[toolName].processDocs(mdCache, aggData);
}); });
var filenames = Object.keys(mdCache); var filenames = Object.keys(mdCache);
@@ -51,27 +67,20 @@ function updatePhase(mdCache, aggData) {
console.log(`Modified: ${pathname}`); console.log(`Modified: ${pathname}`);
} }
fs.writeFileSync(filenames[i], remark().use(frontMatter, {type: 'yaml', fence: '---'}).data("settings", {paddedTable: false, gfm: false}).stringify(tree)); fs.writeFileSync(filenames[i], remark().use(frontMatter, {
type: 'yaml',
fence: '---'
}).data("settings", {paddedTable: false, gfm: false}).stringify(tree));
} }
} }
} }
function deepCopy(obj) {
// Despite how it looks, this technique is apparently quite efficient
// because the JSON routines are implemented in C code and faster
// than the equivalent JavaScript loops ;-)
return JSON.parse(JSON.stringify(obj));
}
function minimiseTree(tree) { function minimiseTree(tree) {
let minPropsTree = JSON.parse(JSON.stringify(tree, (key, value) => key === "position" ? undefined : value)); let minPropsTree = JSON.parse(JSON.stringify(tree, (key, value) => key === "position" ? undefined : value));
mdCompact(minPropsTree); mdCompact(minPropsTree);
return minPropsTree; return minPropsTree;
} }
function loadToolModules() { function loadToolModules() {
var mods = {}; var mods = {};
var toolsFolderPath = path.resolve(__dirname, toolsFolderName); var toolsFolderPath = path.resolve(__dirname, toolsFolderName);
@@ -103,7 +112,7 @@ function getAllDocFilePaths(docFolder, files) {
var itemPath = path.resolve(docFolder, items[i]); var itemPath = path.resolve(docFolder, items[i]);
var itemInfo = fs.statSync(itemPath); var itemInfo = fs.statSync(itemPath);
if (itemInfo.isFile()){ if (itemInfo.isFile()) {
files.push(itemPath); files.push(itemPath);
} else if (itemInfo.isDirectory()) { } else if (itemInfo.isDirectory()) {
getAllDocFilePaths(itemPath, files); getAllDocFilePaths(itemPath, files);
@@ -145,16 +154,13 @@ function initClassInfo(aggData) {
}); });
} }
program program
.usage("[options] <source>") .usage("[options] <source>")
.option("-p, --profile [profileName]", "Select named config profile", "default") .option("-p, --profile [profileName]", "Select named config profile", "default")
.option("-j, --json", "Output JSON data for Markdown syntax tree") .option("-j, --json", "Output JSON data for Markdown syntax tree")
.option("-v, --verbose", "Log doc files as they are processed") .option("-v, --verbose", "Log doc files as they are processed")
.option("-t, --timing", "Output time taken for run") .option("-t, --timing", "Output time taken for run")
.parse(process.argv); .parse(process.argv);
var startTime; var startTime;
@@ -179,7 +185,7 @@ aggData['config'] = config;
var toolList; var toolList;
if (config.profiles[program.profile]){ if (config.profiles[program.profile]) {
toolList = config.profiles[program.profile]; toolList = config.profiles[program.profile];
var toolListText = toolList.join(", "); var toolListText = toolList.join(", ");
console.log(`Using '${program.profile}' profile: ${toolListText}`); console.log(`Using '${program.profile}' profile: ${toolListText}`);
@@ -194,16 +200,15 @@ if (sourceInfo.isDirectory()) {
getAllDocFilePaths(sourcePath, files); getAllDocFilePaths(sourcePath, files);
aggData['rootFolder'] = path.dirname(sourcePath); aggData['rootFolder'] = path.dirname(sourcePath);
} else if (sourceInfo.isFile()) { } else if (sourceInfo.isFile()) {
files = [ sourcePath ]; files = [sourcePath];
} }
files = files.filter(filename => files = files.filter(filename =>
(filename !== undefined) && (filename !== undefined) &&
(path.extname(filename) === ".md") && (path.extname(filename) === ".md") &&
(filename !== "README.md") (filename !== "README.md") && filterFiles(filename)
); );
var mdCache = initMdCache(files); var mdCache = initMdCache(files);
console.log("Loading source data..."); console.log("Loading source data...");
+10 -1
View File
@@ -90,7 +90,10 @@
"UserInfo": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/UserInfo.md", "UserInfo": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/UserInfo.md",
"UserProcessInstanceFilterRepresentation": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/UserProcessInstanceFilterRepresentation.md", "UserProcessInstanceFilterRepresentation": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/UserProcessInstanceFilterRepresentation.md",
"UserRepresentation": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/UserRepresentation.md", "UserRepresentation": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/activiti-rest-api/docs/UserRepresentation.md",
"VersionsApi": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/api/versions.api.ts" "VersionsApi": "https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/api/versions.api.ts",
"MenuPositionX": "https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts",
"MenuPositionY": "https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts",
"ThemePalette": "https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts"
}, },
"linkOverrides": [ "linkOverrides": [
"activiti", "auth", "authentication", "comment", "company", "core", "download", "activiti", "auth", "authentication", "comment", "company", "core", "download",
@@ -199,6 +202,12 @@
"app-details-cloud", "app-details-cloud",
"dynamic-tab" "dynamic-tab"
], ],
"exclude": [
"**/vulnerability/**",
"**/release-notes/**",
"**/tutorials/**",
"**/user-guide/**"
],
"fileCheckerFilter": [ "fileCheckerFilter": [
"README", "README",
"compatibility", "compatibility",
+20 -15
View File
@@ -24,6 +24,7 @@ var docsFolderPath = path.resolve('docs');
var libFolders = ['core', 'content-services', 'extensions', 'insights', 'process-services', 'process-services-cloud']; var libFolders = ['core', 'content-services', 'extensions', 'insights', 'process-services', 'process-services-cloud'];
libsearch(srcData, path.resolve(libFolder)); libsearch(srcData, path.resolve(libFolder));
var authToken = process.env.graphAuthToken; var authToken = process.env.graphAuthToken;
var client = new graphql_request_1.GraphQLClient('https://api.github.com/graphql', { var client = new graphql_request_1.GraphQLClient('https://api.github.com/graphql', {
headers: { headers: {
Authorization: 'Bearer ' + authToken Authorization: 'Bearer ' + authToken
@@ -33,21 +34,25 @@ var query = "query commitHistory($path: String) {\n repository(name: \"alfresco
var docFiles = getDocFilePaths(docsFolderPath); var docFiles = getDocFilePaths(docsFolderPath);
var docNames = rxjs_1.of(docFiles); var docNames = rxjs_1.of(docFiles);
console.log("'Name','Review date','Commits since review','Score'"); console.log("'Name','Review date','Commits since review','Score'");
docNames.subscribe(function (x) { docNames.subscribe(function (docs) {
var key = path.basename(x, '.md'); docs.forEach(function (x) {
if (!srcData[key]) { var key = path.basename(x, '.md');
return; if (!srcData[key]) {
} return;
var vars = { }
'path': 'lib/' + srcData[key].path var vars = {
}; 'path': 'lib/' + srcData[key].path
client.request(query, vars).then(function (data) { };
var nodes = data['repository'].ref.target.history.nodes; client.request(query, vars).then(function (data) {
var lastReviewDate = getDocReviewDate(x); // (key + ".md"); var nodes = data['repository'].ref.target.history.nodes;
var numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist); var lastReviewDate = getDocReviewDate(x); // (key + ".md");
var dateString = lastReviewDate.format('YYYY-MM-DD'); var numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist);
var score = priorityScore(lastReviewDate, numUsefulCommits).toPrecision(3); if (numUsefulCommits > 0) {
console.log("'" + key + "','" + dateString + "','" + numUsefulCommits + "','" + score + "'"); var dateString = lastReviewDate.format('YYYY-MM-DD');
var score = priorityScore(lastReviewDate, numUsefulCommits).toPrecision(3);
console.log("'" + key + "','" + dateString + "','" + numUsefulCommits + "','" + score + "'");
}
});
}); });
}); });
function priorityScore(reviewDate, numCommits) { function priorityScore(reviewDate, numCommits) {
+74 -69
View File
@@ -29,16 +29,16 @@ const stoplist = new Stoplist(stoplistFilePath);
const docsFolderPath = path.resolve('docs'); const docsFolderPath = path.resolve('docs');
const libFolders = ['core', 'content-services', 'extensions', 'insights', 'process-services', 'process-services-cloud']; const libFolders = ['core', 'content-services', 'extensions', 'insights', 'process-services', 'process-services-cloud'];
libsearch(srcData, path.resolve(libFolder)); libsearch(srcData, path.resolve(libFolder));
const authToken = process.env.graphAuthToken; const authToken = process.env.graphAuthToken;
const client = new GraphQLClient('https://api.github.com/graphql', { const client = new GraphQLClient('https://api.github.com/graphql', {
headers: { headers: {
Authorization: 'Bearer ' + authToken Authorization: 'Bearer ' + authToken
} }
}); });
const query = `query commitHistory($path: String) { const query = `query commitHistory($path: String) {
@@ -64,99 +64,104 @@ const docNames = of(docFiles);
console.log("'Name','Review date','Commits since review','Score'"); console.log("'Name','Review date','Commits since review','Score'");
docNames.subscribe(x => { docNames.subscribe(docs => {
const key = path.basename(x, '.md');
if (!srcData[key]) { docs.forEach(x => {
return; const key = path.basename(x, '.md');
}
const vars = { if (!srcData[key]) {
'path': 'lib/' + srcData[key].path return;
}; }
client.request(query, vars).then(data => { const vars = {
const nodes = data['repository'].ref.target.history.nodes; 'path': 'lib/' + srcData[key].path
};
const lastReviewDate = getDocReviewDate(x); // (key + ".md"); client.request(query, vars).then(data => {
const nodes = data['repository'].ref.target.history.nodes;
const numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist); const lastReviewDate = getDocReviewDate(x); // (key + ".md");
const dateString = lastReviewDate.format('YYYY-MM-DD');
const score = priorityScore(lastReviewDate, numUsefulCommits).toPrecision(3);
console.log(`'${key}','${dateString}','${numUsefulCommits}','${score}'`); const numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist);
}); if (numUsefulCommits > 0) {
const dateString = lastReviewDate.format('YYYY-MM-DD');
const score = priorityScore(lastReviewDate, numUsefulCommits).toPrecision(3);
console.log(`'${key}','${dateString}','${numUsefulCommits}','${score}'`);
}
});
});
}); });
function priorityScore(reviewDate, numCommits) { function priorityScore(reviewDate, numCommits) {
const daysSinceReview = moment().diff(reviewDate, 'days'); const daysSinceReview = moment().diff(reviewDate, 'days');
const commitScore = 2 + numCommits * commitWeight; const commitScore = 2 + numCommits * commitWeight;
return Math.pow(commitScore, daysSinceReview / scoreTimeBase); return Math.pow(commitScore, daysSinceReview / scoreTimeBase);
} }
function getDocReviewDate(docFileName) { function getDocReviewDate(docFileName) {
const mdFilePath = path.resolve(docsFolderPath, docFileName); const mdFilePath = path.resolve(docsFolderPath, docFileName);
const mdText = fs.readFileSync(mdFilePath); const mdText = fs.readFileSync(mdFilePath);
const tree = remark().use(frontMatter, ['yaml']).parse(mdText); const tree = remark().use(frontMatter, ['yaml']).parse(mdText);
let lastReviewDate = moment(adf20StartDate); let lastReviewDate = moment(adf20StartDate);
if (tree.children[0].type === 'yaml') { if (tree.children[0].type === 'yaml') {
const metadata = yaml.load(tree.children[0].value); const metadata = yaml.load(tree.children[0].value);
if (metadata['Last reviewed']) { if (metadata['Last reviewed']) {
lastReviewDate = moment(metadata['Last reviewed']); lastReviewDate = moment(metadata['Last reviewed']);
}
} }
}
return lastReviewDate; return lastReviewDate;
} }
function extractCommitInfo(commitNodes, cutOffDate, stoplist) { function extractCommitInfo(commitNodes, cutOffDate, stoplist) {
let numUsefulCommits = 0; let numUsefulCommits = 0;
commitNodes.forEach(element => { commitNodes.forEach(element => {
if (!stoplist.isRejected(element.message)) { if (!stoplist.isRejected(element.message)) {
// const abbr = element.message.substr(0, 15); // const abbr = element.message.substr(0, 15);
const commitDate = moment(element.pushedDate); const commitDate = moment(element.pushedDate);
if (commitDate.isAfter(cutOffDate)) { if (commitDate.isAfter(cutOffDate)) {
numUsefulCommits++; numUsefulCommits++;
} }
} }
}); });
return numUsefulCommits; return numUsefulCommits;
} }
function getDocFilePaths(folderPath) { function getDocFilePaths(folderPath) {
const result = []; const result = [];
libFolders.forEach(element => { libFolders.forEach(element => {
const libPath = path.resolve(folderPath, element); const libPath = path.resolve(folderPath, element);
addItemsRecursively(libPath, result); addItemsRecursively(libPath, result);
});
return result;
function addItemsRecursively(elementPath: string, resultList: string[]) {
const items = fs.readdirSync(elementPath);
items.forEach(item => {
const fullItemPath = path.resolve(elementPath, item);
const itemInfo = fs.statSync(fullItemPath);
if (itemInfo.isDirectory()) {
addItemsRecursively(fullItemPath, resultList);
} else if (
(path.extname(fullItemPath) === '.md') &&
(item !== 'README.md') &&
(item.match(angFilePattern))
) {
resultList.push(fullItemPath);
}
}); });
}
return result;
function addItemsRecursively(elementPath: string, resultList: string[]) {
const items = fs.readdirSync(elementPath);
items.forEach(item => {
const fullItemPath = path.resolve(elementPath, item);
const itemInfo = fs.statSync(fullItemPath);
if (itemInfo.isDirectory()) {
addItemsRecursively(fullItemPath, resultList);
} else if (
(path.extname(fullItemPath) === '.md') &&
(item !== 'README.md') &&
(item.match(angFilePattern))
) {
resultList.push(fullItemPath);
}
});
}
} }
+1 -1
View File
@@ -16,7 +16,7 @@ var PropInfo = /** @class */ (function () {
this.defaultValue = tempDefaultVal ? tempDefaultVal.toString() : ''; this.defaultValue = tempDefaultVal ? tempDefaultVal.toString() : '';
this.defaultValue = this.defaultValue.replace(/\|/, '\\|'); this.defaultValue = this.defaultValue.replace(/\|/, '\\|');
this.type = sourceData.syntax['return'].type || ''; this.type = sourceData.syntax['return'].type || '';
this.type = this.type.toString().replace(/\|/, '\\|'); this.type = this.type.toString().replace(/\|/, '\\|').replace('unknown', '');
if (sourceData.tags) { if (sourceData.tags) {
var depTag = sourceData.tags.find(function (tag) { return tag.name === 'deprecated'; }); var depTag = sourceData.tags.find(function (tag) { return tag.name === 'deprecated'; });
if (depTag) { if (depTag) {
+1 -1
View File
@@ -27,7 +27,7 @@ export class PropInfo {
this.defaultValue = tempDefaultVal ? tempDefaultVal.toString() : ''; this.defaultValue = tempDefaultVal ? tempDefaultVal.toString() : '';
this.defaultValue = this.defaultValue.replace(/\|/, '\\|'); this.defaultValue = this.defaultValue.replace(/\|/, '\\|');
this.type = sourceData.syntax['return'].type || ''; this.type = sourceData.syntax['return'].type || '';
this.type = this.type.toString().replace(/\|/, '\\|'); this.type = this.type.toString().replace(/\|/, '\\|').replace('unknown', '');
if (sourceData.tags) { if (sourceData.tags) {
const depTag = sourceData.tags.find(tag => tag.name === 'deprecated'); const depTag = sourceData.tags.find(tag => tag.name === 'deprecated');
+1 -1
View File
@@ -11,7 +11,7 @@ var imageFolderPath = path.resolve('docs', 'docassets', 'images');
// and filenames is enough to trap errors like missing out the 'images' // and filenames is enough to trap errors like missing out the 'images'
// folder in the path. Keeping it low avoids crazy suggestions. // folder in the path. Keeping it low avoids crazy suggestions.
var maxImagePathLevDistance = 7; var maxImagePathLevDistance = 7;
function processDocs(mdCache, aggData, errorMessages) { function processDocs(mdCache, aggData) {
var pathnames = Object.keys(mdCache); var pathnames = Object.keys(mdCache);
var classlessDocs = []; var classlessDocs = [];
var linkRefs = {}; var linkRefs = {};
+1 -1
View File
@@ -13,7 +13,7 @@ const imageFolderPath = path.resolve('docs', 'docassets', 'images');
// folder in the path. Keeping it low avoids crazy suggestions. // folder in the path. Keeping it low avoids crazy suggestions.
const maxImagePathLevDistance = 7; const maxImagePathLevDistance = 7;
export function processDocs(mdCache, aggData, errorMessages) { export function processDocs(mdCache, aggData) {
const pathnames = Object.keys(mdCache); const pathnames = Object.keys(mdCache);
const classlessDocs = []; const classlessDocs = [];
+1 -1
View File
@@ -5,7 +5,7 @@ var path = require("path");
var fs = require("fs"); var fs = require("fs");
var unist_util_select_1 = require("unist-util-select"); var unist_util_select_1 = require("unist-util-select");
var suffixesNotToCheck = /\.ts/; var suffixesNotToCheck = /\.ts/;
function processDocs(mdCache, aggData, errorMessages) { function processDocs(mdCache, aggData) {
var pathnames = Object.keys(mdCache); var pathnames = Object.keys(mdCache);
var linkSet = new LinkSet(pathnames); var linkSet = new LinkSet(pathnames);
var imageFolderPath = path.resolve(aggData['rootFolder'], 'docs', 'docassets', 'images'); var imageFolderPath = path.resolve(aggData['rootFolder'], 'docs', 'docassets', 'images');
+1 -1
View File
@@ -7,7 +7,7 @@ import { MDAST } from 'mdast';
const suffixesNotToCheck = /\.ts/; const suffixesNotToCheck = /\.ts/;
export function processDocs(mdCache, aggData, errorMessages) { export function processDocs(mdCache, aggData) {
const pathnames = Object.keys(mdCache); const pathnames = Object.keys(mdCache);
const linkSet = new LinkSet(pathnames); const linkSet = new LinkSet(pathnames);
+1 -1
View File
@@ -10,7 +10,7 @@ var mdNav_1 = require("../mdNav");
var ngHelpers_1 = require("../ngHelpers"); var ngHelpers_1 = require("../ngHelpers");
var templateFolder = path.resolve('tools', 'doc', 'templates'); var templateFolder = path.resolve('tools', 'doc', 'templates');
var nameExceptions; var nameExceptions;
function processDocs(mdCache, aggData, _errorMessages) { function processDocs(mdCache, aggData) {
nameExceptions = aggData.config.typeNameExceptions; nameExceptions = aggData.config.typeNameExceptions;
var pathnames = Object.keys(mdCache); var pathnames = Object.keys(mdCache);
var internalErrors; var internalErrors;
+4 -1
View File
@@ -13,7 +13,7 @@ const templateFolder = path.resolve('tools', 'doc', 'templates');
let nameExceptions; let nameExceptions;
export function processDocs(mdCache, aggData, _errorMessages) { export function processDocs(mdCache, aggData) {
nameExceptions = aggData.config.typeNameExceptions; nameExceptions = aggData.config.typeNameExceptions;
const pathnames = Object.keys(mdCache); const pathnames = Object.keys(mdCache);
@@ -51,6 +51,9 @@ function updateFile(tree, pathname, aggData, errorMessages) {
// Copy docs back from the .md file when the JSDocs are empty. // Copy docs back from the .md file when the JSDocs are empty.
const inputMD = getPropDocsFromMD(tree, 'Properties', 3); const inputMD = getPropDocsFromMD(tree, 'Properties', 3);
const outputMD = getPropDocsFromMD(tree, 'Events', 2); const outputMD = getPropDocsFromMD(tree, 'Events', 2);
updatePropDocsFromMD(compData, inputMD, outputMD, errorMessages); updatePropDocsFromMD(compData, inputMD, outputMD, errorMessages);
if (classType === 'service') { if (classType === 'service') {
+1 -1
View File
@@ -26,7 +26,7 @@ var initialVersion = "v2.0.0";
var templateFolder = path.resolve("tools", "doc", "templates"); var templateFolder = path.resolve("tools", "doc", "templates");
function processDocs(mdCache, aggData, errorMessages) { function processDocs(mdCache, aggData) {
initPhase(aggData); initPhase(aggData);
readPhase(mdCache, aggData); readPhase(mdCache, aggData);
aggPhase(aggData); aggPhase(aggData);
+2 -2
View File
@@ -18,7 +18,7 @@
"tools/sourceLinker.ts", "tools/sourceLinker.ts",
"tools/tsInfo.ts", "tools/tsInfo.ts",
"tools/tutorialIndex.ts", "tools/tutorialIndex.ts",
"tools/typeLinker.ts" "tools/typeLinker.ts",
// "reviewChecker.ts" "reviewChecker.ts"
] ]
} }