[ADF-2764] Added new type linker features and applied them to core docs (#3442)

* [ADF-2764] Added basic support for composite and external types

* [ADF-2764] Added new type linker features and applied to core docs
This commit is contained in:
Andy Stark 2018-06-06 12:21:31 +01:00 committed by Eugenio Romano
parent 47d7e59df4
commit 28ba09897e
56 changed files with 388 additions and 292 deletions

View File

@ -52,7 +52,7 @@ export class MyComponent implements OnInit {
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| headingClick | `EventEmitter<any>` | Emitted when the heading is clicked. | | headingClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the heading is clicked. |
## Details ## Details

View File

@ -17,13 +17,13 @@ Gets a thumbnail URL for a node.
`getContentUrl(nodeId: any, attachment?: boolean, ticket?: string): string`<br/> `getContentUrl(nodeId: any, attachment?: boolean, ticket?: string): string`<br/>
Gets the URL for a node's content. Gets the URL for a node's content.
`getNodeContent(nodeId: string): Observable<any>`<br/> `getNodeContent(nodeId: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets a node's content. Gets a node's content.
[`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts)<br/> [`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts)<br/>
Creates a folder. Creates a folder.
`hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/> `hasPermission(node: any, permission:`[`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string): boolean`<br/>
Checks if the user has the specified permissions for `node`. Checks if the user has the specified permissions for `node`.
`hasAllowableOperations(node: any): boolean`<br/> `hasAllowableOperations(node: any): boolean`<br/>

View File

@ -29,10 +29,10 @@ Supports app configuration settings, stored server side.
- **load**(): `Promise<any>`<br/> - **load**(): `Promise<any>`<br/>
Loads the config file. Loads the config file.
- **Returns** `Promise<any>` - Notification when loading is complete - **Returns** `Promise<any>` - Notification when loading is complete
- **select**(property: `string` = `null`): `Observable<any>`<br/> - **select**(property: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Requests notification of a property value when it is loaded. Requests notification of a property value when it is loaded.
- _property:_ `string` - The desired property value - _property:_ `string` - The desired property value
- **Returns** `Observable<any>` - [Property](../../lib/content-services/content-metadata/interfaces/property.interface.ts) value, when loaded - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Property value, when loaded
## Details ## Details

View File

@ -12,23 +12,23 @@ Gets details of the Process Services apps that are deployed for the user.
### Methods ### Methods
- **getApplicationDetailsById**(appId: `number` = `null`): `Observable<AppDefinitionRepresentation>`<br/> - **getApplicationDetailsById**(appId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>`<br/>
Gets the details for a specific app ID number. Gets the details for a specific app ID number.
- _appId:_ `number` - ID of the target app - _appId:_ `number` - ID of the target app
- **Returns** `Observable<AppDefinitionRepresentation>` - Details of the app - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>` - Details of the app
- **getDeployedApplications**(): `Observable<AppDefinitionRepresentation[]>`<br/> - **getDeployedApplications**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`[]>`<br/>
Gets a list of deployed apps for this user. Gets a list of deployed apps for this user.
- **Returns** `Observable<AppDefinitionRepresentation[]>` - The list of deployed apps - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`[]>` - The list of deployed apps
- **getDeployedApplicationsByName**(name: `string` = `null`): `Observable<AppDefinitionRepresentation>`<br/> - **getDeployedApplicationsByName**(name: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>`<br/>
Gets a list of deployed apps for this user, where the app name is `name`. Gets a list of deployed apps for this user, where the app name is `name`.
- _name:_ `string` - Name of the app - _name:_ `string` - Name of the app
- **Returns** `Observable<AppDefinitionRepresentation>` - The list of deployed apps - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>` - The list of deployed apps
## Details ## Details
This service can be used to access the Process Services apps that are available This service can be used to access the Process Services apps that are available
to the current user. You can find more information about the to the current user. You can find more information about the
returned `AppDefinitionRepresentation` class in the returned [`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md) class in the
[Filter model page](../process-services/filter.model.md) [Filter model page](../process-services/filter.model.md)
and in the and in the
[Process Services Apps API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppsApi.md#getAppDefinitions). [Process Services Apps API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppsApi.md#getAppDefinitions).

View File

@ -31,10 +31,10 @@ Provides authentication to ACS and APS.
- **getTicketEcmBase64**(): `string | null`<br/> - **getTicketEcmBase64**(): `string | null`<br/>
Gets the BPM ticket from the Storage in Base 64 format. Gets the BPM ticket from the Storage in Base 64 format.
- **Returns** `string | null` - The ticket or `null` if none was found - **Returns** `string | null` - The ticket or `null` if none was found
- **handleError**(error: `any` = `null`): `Observable<any>`<br/> - **handleError**(error: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Prints an error message in the console browser Prints an error message in the console browser
- _error:_ `any` - Error message - _error:_ `any` - Error message
- **Returns** `Observable<any>` - Object representing the error message - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Object representing the error message
- **isBpmLoggedIn**(): `boolean`<br/> - **isBpmLoggedIn**(): `boolean`<br/>
Checks if the user is logged in on a BPM provider. Checks if the user is logged in on a BPM provider.
- **Returns** `boolean` - True if logged in, false otherwise - **Returns** `boolean` - True if logged in, false otherwise
@ -47,15 +47,15 @@ Provides authentication to ACS and APS.
- **isRememberMeSet**(): `boolean`<br/> - **isRememberMeSet**(): `boolean`<br/>
Checks whether the "remember me" cookie was set or not. Checks whether the "remember me" cookie was set or not.
- **Returns** `boolean` - True if set, false otherwise - **Returns** `boolean` - True if set, false otherwise
- **login**(username: `string` = `null`, password: `string` = `null`, rememberMe: `boolean` = `false`): `Observable<object>`<br/> - **login**(username: `string` = `null`, password: `string` = `null`, rememberMe: `boolean` = `false`): [`Observable`](http://reactivex.io/documentation/observable.html)`<object>`<br/>
Logs the user in. Logs the user in.
- _username:_ `string` - Username for the login - _username:_ `string` - Username for the login
- _password:_ `string` - Password for the login - _password:_ `string` - Password for the login
- _rememberMe:_ `boolean` - Stores the user's login details if true - _rememberMe:_ `boolean` - Stores the user's login details if true
- **Returns** `Observable<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
- **logout**(): `Observable<any>`<br/> - **logout**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Logs the user out. Logs the user out.
- **Returns** `Observable<any>` - Response event called when logout is complete - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Response event called when logout is complete
- **removeTicket**()<br/> - **removeTicket**()<br/>
Removes the login ticket from Storage. Removes the login ticket from Storage.
- **saveTicketAuth**()<br/> - **saveTicketAuth**()<br/>

View File

@ -12,9 +12,9 @@ Gets information about the current Process Services user.
### Methods ### Methods
- **getCurrentUserInfo**(): [`Observable<BpmUserModel>`](../core/bpm-user.model.md)<br/> - **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../core/bpm-user.model.md)`>`<br/>
Gets information about the current user. Gets information about the current user.
- **Returns** [`Observable<BpmUserModel>`](../core/bpm-user.model.md) - User information object - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../core/bpm-user.model.md)`>` - User information object
- **getCurrentUserProfileImage**(): `string`<br/> - **getCurrentUserProfileImage**(): `string`<br/>
Gets the current user's profile image as a URL. Gets the current user's profile image as a URL.
- **Returns** `string` - URL string - **Returns** `string` - URL string

View File

@ -24,7 +24,7 @@ Displays buttons on a responsive menu.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| buttons | [`MenuButton[]`](../../lib/core/buttons-menu/menu-button.model.ts) | | Array of buttons that defines the menu. | | buttons | [`MenuButton`](../../lib/core/buttons-menu/menu-button.model.ts)`[]` | | Array of buttons that defines the menu. |
## Details ## Details
@ -39,7 +39,7 @@ Mobile view of the menu
![adf-buttons-menu-mobile](../docassets/images/adf-buttons-menu-mobile.png) ![adf-buttons-menu-mobile](../docassets/images/adf-buttons-menu-mobile.png)
The `buttons` property contains an array of [MenuButton](../../lib/core/buttons-menu/menu-button.model.ts) instances that define The `buttons` property contains an array of [`MenuButton`](../../lib/core/buttons-menu/menu-button.model.ts) instances that define
the label and appearance of each button along with a handler function to the label and appearance of each button along with a handler function to
implement its action: implement its action:

View File

@ -12,20 +12,20 @@ Maps type names to field component types for the [Card View component](../core/c
### Methods ### Methods
- **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `DynamicComponentResolveFunction`<br/> - **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
Gets the currently active ComponentTypeResolver function for a field type. Gets the currently active ComponentTypeResolver function for a field type.
- _type:_ `string` - The type whose resolver you want - _type:_ `string` - The type whose resolver you want
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped - _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
- **Returns** `DynamicComponentResolveFunction` - Resolver function - **Returns** [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
- **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/> - **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
Finds the component type that is needed to render a form field. Finds the component type that is needed to render a form field.
- _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - (form-field.model.md) for the field to render - _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../lib/process-services/task-list/models/form.model.ts) field model for the field to render
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped. - _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
- **Returns** `Type<__type>` - Component type - **Returns** `Type<__type>` - Component type
- **setComponentTypeResolver**(type: `string` = `null`, resolver: `DynamicComponentResolveFunction` = `null`, override: `boolean` = `true`)<br/> - **setComponentTypeResolver**(type: `string` = `null`, resolver: [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, override: `boolean` = `true`)<br/>
Sets or optionally replaces a ComponentTypeResolver function for a field type. Sets or optionally replaces a ComponentTypeResolver function for a field type.
- _type:_ `string` - The type whose resolver you want to set - _type:_ `string` - The type whose resolver you want to set
- _resolver:_ `DynamicComponentResolveFunction` - The new resolver function - _resolver:_ [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) - The new resolver function
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true - _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
## Details ## Details

View File

@ -27,7 +27,7 @@ export interface CardViewItem {
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default | Description |
| ------------ | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ---- | ---- | ------- | ----------- |
| label | string | "" | Item label | | label | string | "" | Item label |
| value | any | | The original data value for the item | | value | any | | The original data value for the item |
| key | string | "" | Identifying key (important when editing the item) | | key | string | "" | Identifying key (important when editing the item) |
@ -147,5 +147,5 @@ Picard's birthday (47457.1):
## See also ## See also
* [Card View component](card-view.component.md) - [Card View component](card-view.component.md)
* [Card Item Types service](card-item-types.service.md) - [Card Item Types service](card-item-types.service.md)

View File

@ -86,7 +86,7 @@ Defining properties from Typescript:
| -- | -- | -- | -- | | -- | -- | -- | -- |
| 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. |
| editable | `boolean` | | Toggles whether or not the items can be edited. | | editable | `boolean` | | Toggles whether or not the items can be edited. |
| 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. |
## Details ## Details

View File

@ -12,15 +12,15 @@ Adds and retrieves comments for nodes in Content Services.
### Methods ### Methods
- **addNodeComment**(nodeId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/> - **addNodeComment**(nodeId: `string` = `null`, message: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>`<br/>
Adds a comment to a node. Adds a comment to a node.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- _message:_ `string` - Text for the comment - _message:_ `string` - Text for the comment
- **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details of the comment added - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` - Details of the comment added
- **getNodeComments**(nodeId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/> - **getNodeComments**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>`<br/>
Gets all comments that have been added to a node. Gets all comments that have been added to a node.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>` - Details for each comment
## Details ## Details

View File

@ -63,10 +63,10 @@ In the component template use the [comment list component](../core/comment-list.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| comments | [`CommentModel[]`](../../lib/core/models/comment.model.ts) | | The comments data used to populate the list. | | comments | [`CommentModel`](../../lib/core/models/comment.model.ts)`[]` | | The comments data used to populate the list. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| clickRow | [`EventEmitter<CommentModel>`](../../lib/core/models/comment.model.ts) | Emitted when the user clicks on one of the comment rows. | | clickRow | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` | Emitted when the user clicks on one of the comment rows. |

View File

@ -12,24 +12,24 @@ Adds and retrieves comments for task and process instances in Process Services.
### Methods ### Methods
- **addProcessInstanceComment**(processInstanceId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/> - **addProcessInstanceComment**(processInstanceId: `string` = `null`, message: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>`<br/>
Adds a comment to a process instance. Adds a comment to a process instance.
- _processInstanceId:_ `string` - ID of the target process instance - _processInstanceId:_ `string` - ID of the target process instance
- _message:_ `string` - Text for the comment - _message:_ `string` - Text for the comment
- **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details of the comment added - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` - Details of the comment added
- **addTaskComment**(taskId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/> - **addTaskComment**(taskId: `string` = `null`, message: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>`<br/>
Adds a comment to a task. Adds a comment to a task.
- _taskId:_ `string` - ID of the target task - _taskId:_ `string` - ID of the target task
- _message:_ `string` - Text for the comment - _message:_ `string` - Text for the comment
- **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details about the comment - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` - Details about the comment
- **getProcessInstanceComments**(processInstanceId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/> - **getProcessInstanceComments**(processInstanceId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>`<br/>
Gets all comments that have been added to a process instance. Gets all comments that have been added to a process instance.
- _processInstanceId:_ `string` - ID of the target process instance - _processInstanceId:_ `string` - ID of the target process instance
- **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>` - Details for each comment
- **getTaskComments**(taskId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/> - **getTaskComments**(taskId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>`<br/>
Gets all comments that have been added to a task. Gets all comments that have been added to a task.
- _taskId:_ `string` - ID of the target task - _taskId:_ `string` - ID of the target task
- **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>` - Details for each comment
## Details ## Details

View File

@ -41,4 +41,4 @@ Displays comments from users involved in a specified task or content and allows
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs while displaying/adding a comment. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs while displaying/adding a comment. |

View File

@ -12,19 +12,19 @@ Accesses app-generated data objects via URLs and file downloads.
### Methods ### Methods
- **createFolder**(relativePath: `string` = `null`, name: `string` = `null`, parentId?: `string` = `null`): [`Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts)<br/> - **createFolder**(relativePath: `string` = `null`, name: `string` = `null`, parentId?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FolderCreatedEvent`](../../lib/core/events/folder-created.event.ts)`>`<br/>
Creates a folder. Creates a folder.
- _relativePath:_ `string` - Location to create the folder - _relativePath:_ `string` - Location to create the folder
- _name:_ `string` - Folder name - _name:_ `string` - Folder name
- _parentId:_ `string` - (Optional) Node ID of parent folder - _parentId:_ `string` - (Optional) Node ID of parent folder
- **Returns** [`Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts) - Information about the new folder - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FolderCreatedEvent`](../../lib/core/events/folder-created.event.ts)`>` - Information about the new folder
- **createTrustedUrl**(blob: `Blob` = `null`): `string`<br/> - **createTrustedUrl**(blob: [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) = `null`): `string`<br/>
Creates a trusted object URL from the Blob. WARNING: calling this method with untrusted user data exposes your application to XSS security risks! Creates a trusted object URL from the [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob). WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
- _blob:_ `Blob` - Data to wrap into object URL - _blob:_ [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - Data to wrap into object URL
- **Returns** `string` - URL string - **Returns** `string` - URL string
- **downloadBlob**(blob: `Blob` = `null`, fileName: `string` = `null`)<br/> - **downloadBlob**(blob: [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a Blob with a file name. Invokes content download for a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) with a file name.
- _blob:_ `Blob` - Content to download. - _blob:_ [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - Content to download.
- _fileName:_ `string` - Name of the resulting file. - _fileName:_ `string` - Name of the resulting file.
- **downloadData**(data: `any` = `null`, fileName: `string` = `null`)<br/> - **downloadData**(data: `any` = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a data array with a file name. Invokes content download for a data array with a file name.
@ -46,48 +46,48 @@ Accesses app-generated data objects via URLs and file downloads.
- _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download - _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
- _ticket:_ `string` - (Optional) Custom ticket to use for authentication - _ticket:_ `string` - (Optional) Custom ticket to use for authentication
- **Returns** `string` - URL string - **Returns** `string` - URL string
- **getNode**(nodeId: `string` = `null`, opts?: `any` = `null`): `Observable<NodeEntry>`<br/> - **getNode**(nodeId: `string` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>`<br/>
Gets a Node via its node ID. Gets a Node via its node ID.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- _opts:_ `any` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<NodeEntry>` - Details of the folder - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>` - Details of the folder
- **getNodeContent**(nodeId: `string` = `null`): `Observable<any>`<br/> - **getNodeContent**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets content for the given node. Gets content for the given node.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- **Returns** `Observable<any>` - Content data - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Content data
- **hasAllowableOperations**(node: `any` = `null`): `boolean`<br/> - **hasAllowableOperations**(node: `any` = `null`): `boolean`<br/>
Checks if the node has the properties allowableOperations Checks if the node has the properties allowableOperations
- _node:_ `any` - Node to check allowableOperations - _node:_ `any` - Node to check allowableOperations
- **Returns** `boolean` - True if the node has the property, false otherwise - **Returns** `boolean` - True if the node has the property, false otherwise
- **hasPermission**(node: `Node` = `null`, permission: `PermissionsEnum | string` = `null`): `boolean`<br/> - **hasPermission**(node: `Node` = `null`, permission: [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)` | string` = `null`): `boolean`<br/>
Checks if the user has permissions on that node Checks if the user has permissions on that node
- _node:_ `Node` - Node to check allowableOperations - _node:_ `Node` - Node to check allowableOperations
- _permission:_ `PermissionsEnum | string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions - _permission:_ [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)` | string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- **Returns** `boolean` - True if the user has the required permissions, false otherwise - **Returns** `boolean` - True if the user has the required permissions, false otherwise
## Details ## Details
Use the [Content service](../core/content.service.md) to deliver data to the user from `Blob` objects. Use the [Content service](../core/content.service.md) to deliver data to the user from [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects.
The [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class
(implemented in the browser, not ADF) represents an array of bytes that you can (implemented in the browser, not ADF) represents an array of bytes that you can
use to construct and store data in any binary format you choose. use to construct and store data in any binary format you choose.
The user can access a Blob either by downloading the byte array as a file or in The user can access a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) either by downloading the byte array as a file or in
some cases by viewing it directly in the browser via a special URL that references some cases by viewing it directly in the browser via a special URL that references
the Blob. For example, you could use the Blob interface to construct an image in the the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). For example, you could use the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) interface to construct an image in the
[PNG format](https://en.wikipedia.org/wiki/Portable_Network_Graphics). Since [PNG format](https://en.wikipedia.org/wiki/Portable_Network_Graphics). Since
PNG is a format the browser can display, you could use the Blob's URL in an PNG is a format the browser can display, you could use the [Blob's](https://developer.mozilla.org/en-US/docs/Web/API/Blob) URL in an
&lt;img> element to view the image within the page. Alternatively, you could let &lt;img> element to view the image within the page. Alternatively, you could let
the user download it as a PNG file. the user download it as a PNG file.
The `downloadBlob` method starts a download of the Blob data to the `filename` The `downloadBlob` method starts a download of the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) data to the `filename`
within the user's downloads folder. The other `downloadXXX` methods do the same within the user's downloads folder. The other `downloadXXX` methods do the same
but first convert the supplied data to a Blob before downloading; see the but first convert the supplied data to a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) before downloading; see the
[Blob reference page](https://developer.mozilla.org/en-US/docs/Web/API/Blob) [Blob reference page](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
for details of how a Blob's contents are assembled from the constructor arguments. for details of how a [Blob's](https://developer.mozilla.org/en-US/docs/Web/API/Blob) contents are assembled from the constructor arguments.
Use `createdTrustedUrl` to generate a URL string for a Blob. The URL refers to Use `createdTrustedUrl` to generate a URL string for a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). The URL refers to
the Blob as though it were a file but it is actually an object stored in memory, the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) as though it were a file but it is actually an object stored in memory,
so it does not persist across browser sessions. This URL can be used much like any so it does not persist across browser sessions. This URL can be used much like any
other, so you could use it for the `src` attribute of an &lt;img> element or the other, so you could use it for the `src` attribute of an &lt;img> element or the
`href` of a download link. Note that while the URL is 'trusted', the data it contains `href` of a download link. Note that while the URL is 'trusted', the data it contains

View File

@ -18,7 +18,7 @@ and [Tasklist](../process-services/task-list.component.md) components.
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| rowsChanged | `Subject<Array<DataRow>>` | Raised when data adapter gets new rows. | | rowsChanged | [`Subject<Array<DataRow>>`](../../lib/core/datatable/data/data-row.model.ts) | Raised when data adapter gets new rows. |
## Methods ## Methods
@ -30,10 +30,10 @@ Get/set the values for display in the table using an array of rows.
[`setColumns(columns: Array<DataColumn>): void;`](../../lib/core/datatable/data/data-column.model.ts)<br/> [`setColumns(columns: Array<DataColumn>): void;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
Get/set an array of column specifications. Get/set an array of column specifications.
`getValue(row: DataRow, col: DataColumn): any;`<br/> `getValue(row: `[`DataRow,`](../../lib/core/datatable/data/data-row.model.ts)` col: DataColumn): any;`<br/>
Get the data value from a specific table cell. Get the data value from a specific table cell.
`getSorting(): DataSorting;`<br/> `getSorting(): `[`DataSorting`](../../lib/core/datatable/data/data-sorting.model.ts)`;`<br/>
`setSorting(sorting: DataSorting): void;`<br/> `setSorting(sorting: DataSorting): void;`<br/>
Get/set the sorting key and direction (ascending or descending). Get/set the sorting key and direction (ascending or descending).

View File

@ -16,6 +16,8 @@ See it live: [DataTable Quickstart](https://embed.plnkr.co/80qr4YFBeHjLMdAV0F6l/
- [Basic usage](#basic-usage) - [Basic usage](#basic-usage)
- [Setting the rows and column schema](#setting-the-rows-and-column-schema)
- [Class members](#class-members) - [Class members](#class-members)
- [Properties](#properties) - [Properties](#properties)
@ -82,7 +84,7 @@ export class DataTableDemo {
### Setting the rows and column schema ### Setting the rows and column schema
You can set rows and columns to the ObjectDataTableAdapter like shown below: You can set rows and columns to the [ObjectDataTableAdapter](../../lib/core/datatable/data/object-datatable-adapter.ts) like shown below:
```ts ```ts
import { ObjectDataTableAdapter } from '@alfresco/adf-core'; import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@ -159,7 +161,7 @@ export class DataTableDemo {
</adf-datatable> </adf-datatable>
``` ```
You can also set rows to the ObjectDataTableAdapter and set columns as an input like shown below : You can also set rows to the [ObjectDataTableAdapter](../../lib/core/datatable/data/object-datatable-adapter.ts) and set columns as an input like shown below :
```ts ```ts
import { ObjectDataTableAdapter } from '@alfresco/adf-core'; import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@ -258,7 +260,7 @@ export class DataTableDemo {
| actions | `boolean` | false | Toggles the data actions column. | | actions | `boolean` | false | Toggles the data actions column. |
| actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". | | actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". |
| allowDropFiles | `boolean` | false | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). | | allowDropFiles | `boolean` | false | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). |
| columns | `any[]` | `[]` | The columns that the datatable will show. | | columns | `any[]` | \[] | The columns that the datatable will show. |
| contextMenu | `boolean` | false | Toggles custom context menu for the component. | | contextMenu | `boolean` | false | Toggles custom context menu for the component. |
| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source for the table | | data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source for the table |
| display | `string` | [`DisplayMode`](../../lib/core/datatable/components/datatable/datatable.component.ts).List | Selects the display mode of the table. Can be "list" or "gallery". | | display | `string` | [`DisplayMode`](../../lib/core/datatable/components/datatable/datatable.component.ts).List | Selects the display mode of the table. Can be "list" or "gallery". |
@ -269,19 +271,20 @@ export class DataTableDemo {
| rowStyle | `string` | | The inline style to apply to every row. See [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) docs for more details and usage examples. | | rowStyle | `string` | | The inline style to apply to every row. See [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) docs for more details and usage examples. |
| rowStyleClass | `string` | "" | The CSS class to apply to every row. | | rowStyleClass | `string` | "" | The CSS class to apply to every row. |
| rows | `any[]` | \[] | The rows that the datatable will show. | | rows | `any[]` | \[] | The rows that the datatable will show. |
| selectFirstRow | `boolean` | true | Toggles the first row selection. |
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. | | selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| selectFirstRow | `boolean` | `true` | Toggles the first row selection. |
| showHeader | `boolean` | true | Toggles the header. | | showHeader | `boolean` | true | Toggles the header. |
| sorting | `any[]` | \[] | Define the sort order of the datatable. Possible values are : [`created`, `desc`], [`created`, `asc`], [`due`, `desc`], [`due`, `asc`] |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| executeRowAction | [`EventEmitter<DataRowActionEvent>`](../../lib/core/datatable/components/datatable/data-row-action.event.ts) | Emitted when the user executes a row action. | | executeRowAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowActionEvent`](../../lib/core/datatable/components/datatable/data-row-action.event.ts)`>` | Emitted when the user executes a row action. |
| rowClick | [`EventEmitter<DataRowEvent>`](../../lib/core/datatable/data/data-row-event.model.ts) | Emitted when the user clicks a row. | | rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user clicks a row. |
| rowDblClick | [`EventEmitter<DataRowEvent>`](../../lib/core/datatable/data/data-row-event.model.ts) | Emitted when the user double-clicks a row. | | rowDblClick | `EventEmitter<DataRowEvent>` | Emitted when the user double-clicks a row. |
| showRowActionsMenu | [`EventEmitter<DataCellEvent>`](../../lib/core/datatable/components/datatable/data-cell.event.ts) | Emitted before the actions menu is displayed for a row. | | showRowActionsMenu | `EventEmitter<DataCellEvent>` | Emitted before the actions menu is displayed for a row. |
| showRowContextMenu | [`EventEmitter<DataCellEvent>`](../../lib/core/datatable/components/datatable/data-cell.event.ts) | Emitted before the context menu is displayed for a row. | | showRowContextMenu | `EventEmitter<DataCellEvent>` | Emitted before the context menu is displayed for a row. |
## Details ## Details

View File

@ -12,10 +12,10 @@ Gets a list of Content Services nodes currently in the trash.
### Methods ### Methods
- **getDeletedNodes**(options?: `Object` = `null`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/> - **getDeletedNodes**(options?: `Object` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets a list of nodes in the trash. Gets a list of nodes in the trash.
- _options:_ `Object` - (Optional) Options for JSAPI call - _options:_ `Object` - (Optional) Options for JSAPI call
- **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of nodes in the trash - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of nodes in the trash
## Details ## Details

View File

@ -12,12 +12,12 @@ Gets version and license information for Process Services and Content Services.
### Methods ### Methods
- **getBpmProductInfo**(): `Observable<any>`<br/> - **getBpmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets product information for Process Services. Gets product information for Process Services.
- **Returns** `Observable<any>` - ProductVersionModel containing product details - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - ProductVersionModel containing product details
- **getEcmProductInfo**(): `Observable<any>`<br/> - **getEcmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets product information for Content Services. Gets product information for Content Services.
- **Returns** `Observable<any>` - ProductVersionModel containing product details - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - ProductVersionModel containing product details
## Details ## Details

View File

@ -12,13 +12,13 @@ Gets information about a Content Services user.
### Methods ### Methods
- **getCurrentUserInfo**(): [`Observable<EcmUserModel>`](../core/ecm-user.model.md)<br/> - **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>`<br/>
Gets information about the user who is currently logged-in. Gets information about the user who is currently logged-in.
- **Returns** [`Observable<EcmUserModel>`](../core/ecm-user.model.md) - User information as for getUserInfo - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>` - User information as for getUserInfo
- **getUserInfo**(userName: `string` = `null`): [`Observable<EcmUserModel>`](../core/ecm-user.model.md)<br/> - **getUserInfo**(userName: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>`<br/>
Gets information about a user identified by their username. Gets information about a user identified by their username.
- _userName:_ `string` - Target username - _userName:_ `string` - Target username
- **Returns** [`Observable<EcmUserModel>`](../core/ecm-user.model.md) - User information - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>` - User information
- **getUserProfileImage**(avatarId: `string` = `null`): `string`<br/> - **getUserProfileImage**(avatarId: `string` = `null`): `string`<br/>
Returns a profile image as a URL. Returns a profile image as a URL.
- _avatarId:_ `string` - Target avatar - _avatarId:_ `string` - Target avatar

View File

@ -12,11 +12,11 @@ Gets a list of items a user has marked as their favorites.
### Methods ### Methods
- **getFavorites**(personId: `string` = `null`, options?: `any` = `null`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/> - **getFavorites**(personId: `string` = `null`, options?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets the favorites for a user. Gets the favorites for a user.
- _personId:_ `string` - ID of the user - _personId:_ `string` - ID of the user
- _options:_ `any` - (Optional) Options supported by JSAPI - _options:_ `any` - (Optional) Options supported by JSAPI
- **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of favorites - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of favorites
- **remapFavoriteEntries**(entries: `any[]` = `null`): `any[]`<br/> - **remapFavoriteEntries**(entries: `any[]` = `null`): `any[]`<br/>
- _entries:_ `any[]` - - _entries:_ `any[]` -

View File

@ -12,20 +12,20 @@ Maps an APS form field type string onto the corresponding form [widget component
### Methods ### Methods
- **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `DynamicComponentResolveFunction`<br/> - **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
Gets the currently active ComponentTypeResolver function for a field type. Gets the currently active ComponentTypeResolver function for a field type.
- _type:_ `string` - The type whose resolver you want - _type:_ `string` - The type whose resolver you want
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped - _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
- **Returns** `DynamicComponentResolveFunction` - Resolver function - **Returns** [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
- **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/> - **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
Finds the component type that is needed to render a form field. Finds the component type that is needed to render a form field.
- _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - (form-field.model.md) for the field to render - _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../lib/process-services/task-list/models/form.model.ts) field model for the field to render
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped. - _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
- **Returns** `Type<__type>` - Component type - **Returns** `Type<__type>` - Component type
- **setComponentTypeResolver**(type: `string` = `null`, resolver: `DynamicComponentResolveFunction` = `null`, override: `boolean` = `true`)<br/> - **setComponentTypeResolver**(type: `string` = `null`, resolver: [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, override: `boolean` = `true`)<br/>
Sets or optionally replaces a ComponentTypeResolver function for a field type. Sets or optionally replaces a ComponentTypeResolver function for a field type.
- _type:_ `string` - The type whose resolver you want to set - _type:_ `string` - The type whose resolver you want to set
- _resolver:_ `DynamicComponentResolveFunction` - The new resolver function - _resolver:_ [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) - The new resolver function
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true - _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
## Details ## Details

View File

@ -46,7 +46,7 @@ Shows a [`Form`](../../lib/process-services/task-list/models/form.model.ts) from
| data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. | | data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. | | disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. | | disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| fieldValidators | [`FormFieldValidator[]`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | \[] | Contains a list of form field validator instances. | | fieldValidators | [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Contains a list of form field validator instances. |
| form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. | | form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
| formId | `string` | | The id of the form definition to load and display with custom values. | | formId | `string` | | The id of the form definition to load and display with custom values. |
| formName | `string` | | Name of the form definition to load and display with custom values. | | formName | `string` | | Name of the form definition to load and display with custom values. |
@ -67,12 +67,12 @@ Shows a [`Form`](../../lib/process-services/task-list/models/form.model.ts) from
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| executeOutcome | [`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<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<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. |
| formDataRefreshed | [`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. |
| formLoaded | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is loaded or reloaded. | | formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Save` or custom outcomes. | | formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. | | onError | `EventEmitter<any>` | Emitted when any error occurs. |
## Details ## Details

View File

@ -51,83 +51,83 @@ class MyComponent {
### Methods ### Methods
- `parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel` - `parseForm(json: any, data?: `[`FormValues,`](../../lib/core/form/components/widgets/core/form-values.ts)` readOnly: boolean = false): `[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)
Parses JSON data to create a corresponding [`Form`](../../lib/process-services/task-list/models/form.model.ts) model. Parses JSON data to create a corresponding [`Form`](../../lib/process-services/task-list/models/form.model.ts) model.
- `json` - JSON to create the form - `json` - JSON to create the form
- `data` - (Optional) Values for the form fields - `data` - (Optional) Values for the form fields
- `readOnly` - Should the form fields be read-only? - `readOnly` - Should the form fields be read-only?
- `createFormFromANode(formName: string): Observable<any>` - `createFormFromANode(formName: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts) with a field for each metadata property. Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts) with a field for each metadata property.
- `formName` - Name of the new form - `formName` - Name of the new form
- `createForm(formName: string): Observable<any>` - `createForm(formName: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts). Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts).
- `formName` - Name of the new form - `formName` - Name of the new form
- `saveForm(formId: string, formModel: FormDefinitionModel): Observable<any>` - `saveForm(formId: string, formModel: FormDefinitionModel): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Saves a form. Saves a form.
- `formId` - ID of the form to save - `formId` - ID of the form to save
- `formModel` - Model data for the form - `formModel` - Model data for the form
- `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any>` - `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
- `formId` - ID of the form - `formId` - ID of the form
- `formModel` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) definition - `formModel` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) definition
- `searchFrom(name: string): Observable<any>` - `searchFrom(name: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Search for a form by name. Search for a form by name.
- `name` - The form name to search for - `name` - The form name to search for
- `getForms(): Observable<any>` - `getForms(): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets all the forms. Gets all the forms.
- `getProcessDefinitions(): Observable<any>` - `getProcessDefinitions(): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get Process Definitions Get Process Definitions
- `getProcessVarablesById(processInstanceId: string): Observable<any[]>` - `getProcessVarablesById(processInstanceId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any[]>`
Get instance variables for a process. Get instance variables for a process.
- `processInstanceId` - ID of the target process - `processInstanceId` - ID of the target process
- `getTasks(): Observable<any>` - `getTasks(): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets all the tasks. Gets all the tasks.
- `getTask(taskId: string): Observable<any>` - `getTask(taskId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets a task. Gets a task.
- `taskId` - Task Id - `taskId` - Task Id
- `saveTaskForm(taskId: string, formValues: FormValues): Observable<any>` - `saveTaskForm(taskId: string, formValues: FormValues): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Save Task [`Form`](../../lib/process-services/task-list/models/form.model.ts). Save Task [`Form`](../../lib/process-services/task-list/models/form.model.ts).
- `taskId` - Task Id - `taskId` - Task Id
- `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values - `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
- `completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any>` - `completeTaskForm(taskId: string, formValues: `[`FormValues,`](../../lib/core/form/components/widgets/core/form-values.ts)` outcome?: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Complete Task [`Form`](../../lib/process-services/task-list/models/form.model.ts) Complete Task [`Form`](../../lib/process-services/task-list/models/form.model.ts)
- `taskId` - Task Id - `taskId` - Task Id
- `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values - `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
- `outcome` - (Optional) [`Form`](../../lib/process-services/task-list/models/form.model.ts) Outcome - `outcome` - (Optional) [`Form`](../../lib/process-services/task-list/models/form.model.ts) Outcome
- `getTaskForm(taskId: string): Observable<any>` - `getTaskForm(taskId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) related to a taskId Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) related to a taskId
- `taskId` - Task Id - `taskId` - Task Id
- `getFormDefinitionById(formId: string): Observable<any>` - `getFormDefinitionById(formId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) Definition Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) Definition
- `formId` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Id - `formId` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Id
- `getFormDefinitionByName(name: string): Observable<any>` - `getFormDefinitionByName(name: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Returns form definition with a given name. Returns form definition with a given name.
- `name` - The form name - `name` - The form name
- `getStartFormInstance(processId: string): Observable<any>` - `getStartFormInstance(processId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get start form instance for a given processId Get start form instance for a given processId
- `processId` - Process definition ID - `processId` - Process definition ID
- `getProcessIntance(processId: string): Observable<any>` - `getProcessIntance(processId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets a process instance. Gets a process instance.
- `processId` - ID of the process to get - `processId` - ID of the process to get
- `getStartFormDefinition(processId: string): Observable<any>` - `getStartFormDefinition(processId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get start form definition for a given process Get start form definition for a given process
- `processId` - Process definition ID - `processId` - Process definition ID
- `getRestFieldValues(taskId: string, field: string): Observable<any>` - `getRestFieldValues(taskId: string, field: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets values of fields populated by a REST backend. Gets values of fields populated by a REST backend.
- `taskId` - Task identifier - `taskId` - Task identifier
- `field` - Field identifier - `field` - Field identifier
- `getRestFieldValuesByProcessId(processDefinitionId: string, field: string): Observable<any>` - `getRestFieldValuesByProcessId(processDefinitionId: string, field: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets values of fields populated by a REST backend using a process ID. Gets values of fields populated by a REST backend using a process ID.
- `processDefinitionId` - Process identifier - `processDefinitionId` - Process identifier
- `field` - Field identifier - `field` - Field identifier
- `getRestFieldValuesColumnByProcessId(processDefinitionId: string, field: string, column?: string): Observable<any>` - `getRestFieldValuesColumnByProcessId(processDefinitionId: string, field: string, column?: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets column values of fields populated by a REST backend using a process ID. Gets column values of fields populated by a REST backend using a process ID.
- `processDefinitionId` - Process identifier - `processDefinitionId` - Process identifier
- `field` - Field identifier - `field` - Field identifier
- `column` - (Optional) Column identifier - `column` - (Optional) Column identifier
- `getRestFieldValuesColumn(taskId: string, field: string, column?: string): Observable<any>` - `getRestFieldValuesColumn(taskId: string, field: string, column?: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets column values of fields populated by a REST backend. Gets column values of fields populated by a REST backend.
- `taskId` - Task identifier - `taskId` - Task identifier
- `field` - Field identifier - `field` - Field identifier
@ -152,6 +152,6 @@ class MyComponent {
- `toJsonArray(res: any): any` - `toJsonArray(res: any): any`
Creates a JSON array representation of form data. Creates a JSON array representation of form data.
- `res` - Object representing form data - `res` - Object representing form data
- `handleError(error: any): Observable<any>` - `handleError(error: any): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Reports an error message. Reports an error message.
- `error` - Data object with optional \`message\` and \`status\` fields for the error - `error` - Data object with optional \`message\` and \`status\` fields for the error

View File

@ -28,6 +28,6 @@ Validates the URLs for ACS and APS and saves them in the user's local storage
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| bpmHostChange | `EventEmitter<string>` | Emitted when the bpm host URL is changed. | | bpmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the bpm host URL is changed. |
| ecmHostChange | `EventEmitter<string>` | Emitted when the ecm host URL is changed. | | ecmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the ecm host URL is changed. |
| error | `EventEmitter<string>` | Emitted when the URL is invalid. | | error | `EventEmitter<string>` | Emitted when the URL is invalid. |

View File

@ -46,7 +46,7 @@ Adds "infinite" pagination to the component it is used with.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| loadMore | [`EventEmitter<Pagination>`](../../lib/content-services/document-list/models/document-library.model.ts) | Emitted when the "Load More" button is clicked. | | loadMore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when the "Load More" button is clicked. |
## Details ## Details

View File

@ -42,7 +42,7 @@ Render tab with icon instead of labels:
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | ---- | ---- | ------------- | ----------- |
| label | `string` | '' | Tab label. | | label | `string` | '' | Tab label. |
| icon | `string` | null | The material design icon. | | icon | `string` | null | The material design icon. |

View File

@ -43,7 +43,7 @@ Displays a sidebar-style information panel with tabs.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| currentTab | `EventEmitter<number>` | Emitted when the currently active tab changes. | | currentTab | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<number>` | Emitted when the currently active tab changes. |
## Details ## Details

View File

@ -58,7 +58,7 @@ If you want set for example the log to warning:
### Log message bus ### Log message bus
The logservice provide also an Observable **_onMessage_** where you can subscribe and recive all the logs: The logservice provide also an [`Observable`](http://reactivex.io/documentation/observable.html) **_onMessage_** where you can subscribe and recive all the logs:
The messagge object recived form the bus is composed: The messagge object recived form the bus is composed:

View File

@ -61,9 +61,9 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| error | [`EventEmitter<LoginErrorEvent>`](../../lib/core/login/models/login-error.event.ts) | Emitted when the login fails. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`LoginErrorEvent`](../../lib/core/login/models/login-error.event.ts)`>` | Emitted when the login fails. |
| executeSubmit | [`EventEmitter<LoginSubmitEvent>`](../../lib/core/login/models/login-submit.event.ts) | Emitted when the login form is submitted. | | executeSubmit | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`LoginSubmitEvent`](../../lib/core/login/models/login-submit.event.ts)`>` | Emitted when the login form is submitted. |
| success | [`EventEmitter<LoginSuccessEvent>`](../../lib/core/login/models/login-success.event.ts) | Emitted when the login is successful. | | success | `EventEmitter<LoginSuccessEvent>` | Emitted when the login is successful. |
## Details ## Details

View File

@ -34,7 +34,7 @@ let button = new MenuButton({
## Details ## Details
An array of [`MenuButton`](../../lib/core/buttons-menu/menu-button.model.ts) instances is passed to the Button Menu component via its An array of [`MenuButton`](../../lib/core/buttons-menu/menu-button.model.ts) instances is passed to the Button Menu component via its
`buttons` property. See the Buttons Menu component page for a code sample and `buttons` property. See the [Buttons Menu component](../core/buttons-menu.component.md) page for a code sample and
further details about setting up the menu. further details about setting up the menu.
## See also ## See also

View File

@ -30,13 +30,13 @@ Deletes multiple files and folders.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| permanent | `boolean` | false | If true then the nodes are deleted immediately rather than being put in the trash | | permanent | `boolean` | false | If true then the nodes are deleted immediately rather than being put in the trash |
| adf-delete | `MinimalNodeEntity[] | DeletedNodeEntity[]` | | Array of nodes to delete. | | adf-delete | `MinimalNodeEntity[] \| DeletedNodeEntity[]` | | Array of nodes to delete. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| delete | `EventEmitter<any>` | Emitted when the nodes have been deleted. | | delete | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the nodes have been deleted. |
## Details ## Details

View File

@ -48,8 +48,8 @@ export class MyComponent {
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when the favorite setting has fail. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the favorite setting has fail. |
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. | | toggle | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the favorite setting is complete. |
## Details ## Details

View File

@ -39,7 +39,7 @@ Restores deleted nodes to their original location.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| restore | `EventEmitter<any>` | Emitted when restoration is complete. | | restore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when restoration is complete. |
## Details ## Details

View File

@ -27,47 +27,47 @@ Accesses and manipulates ACS document nodes using their node IDs.
### Methods ### Methods
- **createFolder**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/> - **createFolder**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Creates a new folder node inside a parent folder. Creates a new folder node inside a parent folder.
- _parentNodeId:_ `string` - ID of the parent folder node - _parentNodeId:_ `string` - ID of the parent folder node
- _nodeBody:_ `any` - Data for the new folder - _nodeBody:_ `any` - Data for the new folder
- _options:_ `any` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new folder - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Details of the new folder
- **createNode**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/> - **createNode**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Creates a new document node inside a folder. Creates a new document node inside a folder.
- _parentNodeId:_ `string` - ID of the parent folder node - _parentNodeId:_ `string` - ID of the parent folder node
- _nodeBody:_ `any` - Data for the new node - _nodeBody:_ `any` - Data for the new node
- _options:_ `any` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new node - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Details of the new node
- **deleteNode**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<void>`<br/> - **deleteNode**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<void>`<br/>
Moves a node to the trashcan. Moves a node to the trashcan.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<void>` - Empty result that notifies when the deletion is complete - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<void>` - Empty result that notifies when the deletion is complete
- **getNode**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/> - **getNode**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Gets the stored information about a node. Gets the stored information about a node.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Node information - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Node information
- **getNodeChildren**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/> - **getNodeChildren**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets the items contained in a folder node. Gets the items contained in a folder node.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of child items from the folder - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of child items from the folder
- **handleError**(error: `any` = `null`): `Observable<any>`<br/> - **handleError**(error: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Reports an error. Reports an error.
- _error:_ `any` - Object representing the error - _error:_ `any` - Object representing the error
- **Returns** `Observable<any>` - Error information - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Error information
- **restoreNode**(nodeId: `string` = `null`): `Observable<MinimalNodeEntryEntity>`<br/> - **restoreNode**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Restores a node previously moved to the trashcan. Restores a node previously moved to the trashcan.
- _nodeId:_ `string` - ID of the node to restore - _nodeId:_ `string` - ID of the node to restore
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the restored node - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Details of the restored node
- **updateNode**(nodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/> - **updateNode**(nodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Updates the information about a node. Updates the information about a node.
- _nodeId:_ `string` - ID of the target node - _nodeId:_ `string` - ID of the target node
- _nodeBody:_ `any` - New data for the node - _nodeBody:_ `any` - New data for the node
- _options:_ `any` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Updated node information - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Updated node information
## Details ## Details

View File

@ -13,17 +13,17 @@ Shows a notification message with optional feedback.
### Methods ### Methods
- **openSnackMessage**(message: `string` = `null`, millisecondsDuration?: `number` = `null`): `MatSnackBarRef<any>`<br/> - **openSnackMessage**(message: `string` = `null`, millisecondsDuration?: `number` = `null`): [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>`<br/>
Opens a snackbar notification to show a message. Opens a SnackBar notification to show a message.
- _message:_ `string` - The message (or resource key) to show. - _message:_ `string` - The message (or resource key) to show.
- _millisecondsDuration:_ `number` - (Optional) Time before notification disappears after being shown - _millisecondsDuration:_ `number` - (Optional) Time before notification disappears after being shown
- **Returns** `MatSnackBarRef<any>` - Information/control object for the snackbar - **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
- **openSnackMessageAction**(message: `string` = `null`, action: `string` = `null`, millisecondsDuration?: `number` = `null`): `MatSnackBarRef<any>`<br/> - **openSnackMessageAction**(message: `string` = `null`, action: `string` = `null`, millisecondsDuration?: `number` = `null`): [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>`<br/>
Opens a snackbar notification with a message and a response button. Opens a SnackBar notification with a message and a response button.
- _message:_ `string` - The message (or resource key) to show. - _message:_ `string` - The message (or resource key) to show.
- _action:_ `string` - Caption for the response button - _action:_ `string` - Caption for the response button
- _millisecondsDuration:_ `number` - (Optional) Time before the notification disappears (unless the button is clicked) - _millisecondsDuration:_ `number` - (Optional) Time before the notification disappears (unless the button is clicked)
- **Returns** `MatSnackBarRef<any>` - Information/control object for the snackbar - **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
## Details ## Details

View File

@ -54,11 +54,11 @@ Adds pagination to the component it is used with.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| change | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when pagination changes in any way. | | change | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PaginationModel`](../../lib/core/models/pagination.model.ts)`>` | Emitted when pagination changes in any way. |
| changePageNumber | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the page number changes. | | changePageNumber | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PaginationModel`](../../lib/core/models/pagination.model.ts)`>` | Emitted when the page number changes. |
| changePageSize | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the page size changes. | | changePageSize | `EventEmitter<PaginationModel>` | Emitted when the page size changes. |
| nextPage | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the next page is requested. | | nextPage | `EventEmitter<PaginationModel>` | Emitted when the next page is requested. |
| prevPage | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the previous page is requested. | | prevPage | `EventEmitter<PaginationModel>` | Emitted when the previous page is requested. |
## Details ## Details

View File

@ -12,13 +12,13 @@ Gets information about a Content Services user.
### Methods ### Methods
- **getCurrentPerson**(): `Observable<any>`<br/> - **getCurrentPerson**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets information about the user who is currently logged in. Gets information about the user who is currently logged in.
- **Returns** `Observable<any>` - User information - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
- **getPerson**(personId: `string` = `null`): `Observable<any>`<br/> - **getPerson**(personId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets information about a user identified by their username. Gets information about a user identified by their username.
- _personId:_ `string` - ID of the target user - _personId:_ `string` - ID of the target user
- **Returns** `Observable<any>` - User information - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
## Details ## Details

View File

@ -16,21 +16,21 @@ Gets information about Process Services users.
Gets the profile picture URL for the specified user. Gets the profile picture URL for the specified user.
- _user:_ [`UserProcessModel`](../core/user-process.model.md) - The target user - _user:_ [`UserProcessModel`](../core/user-process.model.md) - The target user
- **Returns** `string` - Profile picture URL - **Returns** `string` - Profile picture URL
- **getWorkflowUsers**(taskId?: `string` = `null`, searchWord?: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/> - **getWorkflowUsers**(taskId?: `string` = `null`, searchWord?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>`<br/>
Gets information about users across all tasks. Gets information about users across all tasks.
- _taskId:_ `string` - (Optional) ID of the task - _taskId:_ `string` - (Optional) ID of the task
- _searchWord:_ `string` - (Optional) Filter text to search for - _searchWord:_ `string` - (Optional) Filter text to search for
- **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Array of user information objects - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` - Array of user information objects
- **involveUserWithTask**(taskId: `string` = `null`, idToInvolve: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/> - **involveUserWithTask**(taskId: `string` = `null`, idToInvolve: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>`<br/>
Sets a user to be involved with a task. Sets a user to be involved with a task.
- _taskId:_ `string` - ID of the target task - _taskId:_ `string` - ID of the target task
- _idToInvolve:_ `string` - ID of the user to involve - _idToInvolve:_ `string` - ID of the user to involve
- **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Empty response when the update completes - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` - Empty response when the update completes
- **removeInvolvedUser**(taskId: `string` = `null`, idToRemove: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/> - **removeInvolvedUser**(taskId: `string` = `null`, idToRemove: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>`<br/>
Removes a user who is currently involved with a task. Removes a user who is currently involved with a task.
- _taskId:_ `string` - ID of the target task - _taskId:_ `string` - ID of the target task
- _idToRemove:_ `string` - ID of the user to remove - _idToRemove:_ `string` - ID of the user to remove
- **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Empty response when the update completes - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` - Empty response when the update completes
## Details ## Details

View File

@ -11,58 +11,58 @@ Manipulates content related to a Process Instance or Task Instance in APS.
### Methods ### Methods
- **createProcessRelatedContent**(processInstanceId: `string` = `null`, content: `any` = `null`, opts?: `any` = `null`): `Observable<any>`<br/> - **createProcessRelatedContent**(processInstanceId: `string` = `null`, content: `any` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Associates an uploaded file with a process instance. Associates an uploaded file with a process instance.
- _processInstanceId:_ `string` - ID of the target process instance - _processInstanceId:_ `string` - ID of the target process instance
- _content:_ `any` - File to associate - _content:_ `any` - File to associate
- _opts:_ `any` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<any>` - Details of created content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Details of created content
- **createTaskRelatedContent**(taskId: `string` = `null`, file: `any` = `null`, opts?: `any` = `null`): `Observable<any>`<br/> - **createTaskRelatedContent**(taskId: `string` = `null`, file: `any` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Associates an uploaded file with a task instance. Associates an uploaded file with a task instance.
- _taskId:_ `string` - ID of the target task - _taskId:_ `string` - ID of the target task
- _file:_ `any` - File to associate - _file:_ `any` - File to associate
- _opts:_ `any` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<any>` - Details of created content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Details of created content
- **createTemporaryRawRelatedContent**(file: `any` = `null`): `Observable<RelatedContentRepresentation>`<br/> - **createTemporaryRawRelatedContent**(file: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>`<br/>
Create temporary related content from an uploaded file. Create temporary related content from an uploaded file.
- _file:_ `any` - File to use for content - _file:_ `any` - File to use for content
- **Returns** `Observable<RelatedContentRepresentation>` - The created content data - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>` - The created content data
- **deleteRelatedContent**(contentId: `number` = `null`): `Observable<any>`<br/> - **deleteRelatedContent**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Deletes related content. Deletes related content.
- _contentId:_ `number` - Identifier of the content to delete - _contentId:_ `number` - Identifier of the content to delete
- **Returns** `Observable<any>` - Null response that notifies when the deletion is complete - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response that notifies when the deletion is complete
- **getContentPreview**(contentId: `number` = `null`): `Observable<Blob>`<br/> - **getContentPreview**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
Gets the preview for a related content file. Gets the preview for a related content file.
- _contentId:_ `number` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the content preview - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the content preview
- **getContentThumbnail**(contentId: `number` = `null`): `Observable<Blob>`<br/> - **getContentThumbnail**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
Gets the thumbnail for a related content file. Gets the thumbnail for a related content file.
- _contentId:_ `number` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the thumbnail image - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the thumbnail image
- **getFileContent**(contentId: `number` = `null`): `Observable<RelatedContentRepresentation>`<br/> - **getFileContent**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>`<br/>
Gets the metadata for a related content item. Gets the metadata for a related content item.
- _contentId:_ `number` - ID of the content item - _contentId:_ `number` - ID of the content item
- **Returns** `Observable<RelatedContentRepresentation>` - Metadata for the content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>` - Metadata for the content
- **getFileRawContent**(contentId: `number` = `null`): `Observable<Blob>`<br/> - **getFileRawContent**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
Gets raw binary content data for a related content file. Gets raw binary content data for a related content file.
- _contentId:_ `number` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the related content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the related content
- **getFileRawContentUrl**(contentId: `number` = `null`): `string`<br/> - **getFileRawContentUrl**(contentId: `number` = `null`): `string`<br/>
Gets a URL for direct access to a related content file. Gets a URL for direct access to a related content file.
- _contentId:_ `number` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `string` - URL to access the content - **Returns** `string` - URL to access the content
- **getProcessRelatedContent**(processId: `string` = `null`): `Observable<any>`<br/> - **getProcessRelatedContent**(processId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets related content items for a process instance. Gets related content items for a process instance.
- _processId:_ `string` - ID of the target process - _processId:_ `string` - ID of the target process
- **Returns** `Observable<any>` - Metadata for the content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Metadata for the content
- **getTaskRelatedContent**(taskId: `string` = `null`): `Observable<any>`<br/> - **getTaskRelatedContent**(taskId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets related content items for a task instance. Gets related content items for a task instance.
- _taskId:_ `string` - ID of the target task - _taskId:_ `string` - ID of the target task
- **Returns** `Observable<any>` - Metadata for the content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Metadata for the content
- **handleError**(error: `any` = `null`): `Observable<any>`<br/> - **handleError**(error: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Reports an error message. Reports an error message.
- _error:_ `any` - Data object with optional `message` and `status` fields for the error - _error:_ `any` - Data object with optional `message` and `status` fields for the error
- **Returns** `Observable<any>` - Callback when an error occurs - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Callback when an error occurs
- **toJson**(res: `any` = `null`): `any`<br/> - **toJson**(res: `any` = `null`): `any`<br/>
Creates a JSON representation of data. Creates a JSON representation of data.
- _res:_ `any` - Object representing data - _res:_ `any` - Object representing data
@ -206,7 +206,7 @@ See `getProcessRelatedContent` and `getTaskRelatedContent` for how to get to the
#### getFileContent(contentId: number): Observable`<RelatedContentRepresentation>` #### getFileContent(contentId: number): Observable`<RelatedContentRepresentation>`
Get the metadata for a related content item in the format of a `RelatedContentRepresentation` object: Get the metadata for a related content item in the format of a [`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md) object:
```ts ```ts
const contentId = 6008; const contentId = 6008;

View File

@ -9,16 +9,16 @@ Manages prearranged conversions of content to different formats.
## Methods ## Methods
`isRenditionAvailable(nodeId: string, encoding: string): Observable<boolean>`<br/> `isRenditionAvailable(nodeId: string, encoding: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
Has the specified rendition been set up for this item? Has the specified rendition been set up for this item?
`isConversionPossible(nodeId: string, encoding: string): Observable<boolean>`<br/> `isConversionPossible(nodeId: string, encoding: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
Is it possible to convert this item to the specified format? Is it possible to convert this item to the specified format?
`getRenditionUrl(nodeId: string, encoding: string): string`<br/> `getRenditionUrl(nodeId: string, encoding: string): string`<br/>
Gets a URL linking to a rendition. Gets a URL linking to a rendition.
`getRenditionsListByNodeId(nodeId: string): Observable<RenditionPaging>`<br/> `getRenditionsListByNodeId(nodeId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<RenditionPaging>`<br/>
Gets all available renditions for an item. Gets all available renditions for an item.
`convert(nodeId: string, encoding: string, pollingInterval: number = 1000)`<br/> `convert(nodeId: string, encoding: string, pollingInterval: number = 1000)`<br/>

View File

@ -11,19 +11,19 @@ Finds shared links to Content Services items.
### Methods ### Methods
- **createSharedLinks**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<SharedLinkEntry>`<br/> - **createSharedLinks**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>`<br/>
Creates a shared link available to the current user. Creates a shared link available to the current user.
- _nodeId:_ `string` - ID of the node to link to - _nodeId:_ `string` - ID of the node to link to
- _options:_ `any` - Options supported by JSAPI - _options:_ `any` - Options supported by JSAPI
- **Returns** `Observable<SharedLinkEntry>` - The shared link just created - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>` - The shared link just created
- **deleteSharedLink**(sharedId: `string` = `null`): `Observable<SharedLinkEntry>`<br/> - **deleteSharedLink**(sharedId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>`<br/>
Deletes a shared link. Deletes a shared link.
- _sharedId:_ `string` - ID of the link to delete - _sharedId:_ `string` - ID of the link to delete
- **Returns** `Observable<SharedLinkEntry>` - Null response notifying when the operation is complete - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>` - Null response notifying when the operation is complete
- **getSharedLinks**(options: `any` = `{}`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/> - **getSharedLinks**(options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets shared links available to the current user. Gets shared links available to the current user.
- _options:_ `any` - Options supported by JSAPI - _options:_ `any` - Options supported by JSAPI
- **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of shared links - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of shared links
## Details ## Details

View File

@ -78,7 +78,7 @@ Displays the standard three-region ADF application layout.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| expanded | `EventEmitter<boolean>` | | | expanded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | |
## Details ## Details
@ -115,8 +115,8 @@ Mobile layout (screen width less than the `stepOver` value):
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | ---- | ---- | ----------- |
| expanded | `EventEmitter<boolean>` | Emmitted when the menu toggle and the collapsed/expanded state of the sideNav changes | expanded | `EventEmitter<boolean>` | Emmitted when the menu toggle and the collapsed/expanded state of the sideNav changes |
### Template context ### Template context

View File

@ -12,36 +12,36 @@ Accesses and manipulates sites from a Content Services repository.
### Methods ### Methods
- **deleteSite**(siteId: `string` = `null`, permanentFlag: `boolean` = `true`): `Observable<any>`<br/> - **deleteSite**(siteId: `string` = `null`, permanentFlag: `boolean` = `true`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Deletes a site. Deletes a site.
- _siteId:_ `string` - Site to delete - _siteId:_ `string` - Site to delete
- _permanentFlag:_ `boolean` - True: deletion is permanent; False: site is moved to the trash - _permanentFlag:_ `boolean` - True: deletion is permanent; False: site is moved to the trash
- **Returns** `Observable<any>` - Null response notifying when the operation is complete - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response notifying when the operation is complete
- **getEcmCurrentLoggedUserName**(): `string`<br/> - **getEcmCurrentLoggedUserName**(): `string`<br/>
Gets the username of the user currently logged into ACS. Gets the username of the user currently logged into ACS.
- **Returns** `string` - Username string - **Returns** `string` - Username string
- **getSite**(siteId: `string` = `null`, opts?: `any` = `null`): `Observable<SiteEntry>`<br/> - **getSite**(siteId: `string` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
Gets the details for a site. Gets the details for a site.
- _siteId:_ `string` - ID of the target site - _siteId:_ `string` - ID of the target site
- _opts:_ `any` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<SiteEntry>` - Information about the site - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - Information about the site
- **getSiteContent**(siteId: `string` = `null`): `Observable<SiteEntry>`<br/> - **getSiteContent**(siteId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
Gets a site's content. Gets a site's content.
- _siteId:_ `string` - ID of the target site - _siteId:_ `string` - ID of the target site
- **Returns** `Observable<SiteEntry>` - Site content - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - Site content
- **getSiteMembers**(siteId: `string` = `null`): `Observable<SiteEntry>`<br/> - **getSiteMembers**(siteId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
Gets a list of all a site's members. Gets a list of all a site's members.
- _siteId:_ `string` - ID of the target site - _siteId:_ `string` - ID of the target site
- **Returns** `Observable<SiteEntry>` - Site members - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - Site members
- **getSites**(opts: `any` = `{}`): `Observable<SitePaging>`<br/> - **getSites**(opts: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md)`>`<br/>
Gets a list of all sites in the repository. Gets a list of all sites in the repository.
- _opts:_ `any` - Options supported by JSAPI - _opts:_ `any` - Options supported by JSAPI
- **Returns** `Observable<SitePaging>` - List of sites - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md)`>` - List of sites
## Details ## Details
You can use `getSites` to get a list of all sites in the repository. You can use `getSites` to get a list of all sites in the repository.
The sites are returned as `Observable<SiteModel[]>` (see The sites are returned as [`Observable`](http://reactivex.io/documentation/observable.html)`<SiteModel[]>` (see
[Site Model](site.model.md) for more information about this class). [Site Model](site.model.md) for more information about this class).
If you are only interested in a single site and you have its ID, you If you are only interested in a single site and you have its ID, you
can use `getSite` to access it. Alternatively, you can use `getSiteContent` can use `getSite` to access it. Alternatively, you can use `getSiteContent`

View File

@ -27,7 +27,7 @@ Displays the Start [`Form`](../../lib/process-services/task-list/models/form.mod
| data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. | | data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. | | disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. | | disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| fieldValidators | [`FormFieldValidator[]`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | \[] | Contains a list of form field validator instances. | | fieldValidators | [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Contains a list of form field validator instances. |
| form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. | | form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
| formId | `string` | | The id of the form definition to load and display with custom values. | | formId | `string` | | The id of the form definition to load and display with custom values. |
| formName | `string` | | Name of the form definition to load and display with custom values. | | formName | `string` | | Name of the form definition to load and display with custom values. |
@ -52,12 +52,12 @@ Displays the Start [`Form`](../../lib/process-services/task-list/models/form.mod
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| executeOutcome | [`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<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<ContentLinkModel>`](../../lib/core/form/components/widgets/core/content-link.model.ts) | Emitted when a field of the form is clicked. | | formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when a field of the form is clicked. |
| formDataRefreshed | [`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. |
| formLoaded | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is loaded or reloaded. | | formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Save` or custom outcomes. | | formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. | | onError | `EventEmitter<any>` | Emitted when any error occurs. |
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. | | outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. |

View File

@ -21,6 +21,7 @@ Simple container for headers, titles, actions and breadcrumbs.
- [Custom title](#custom-title) - [Custom title](#custom-title)
- [Divider](#divider) - [Divider](#divider)
- [Spacer](#spacer)
- [Dropdown menu](#dropdown-menu) - [Dropdown menu](#dropdown-menu)
- [Custom color](#custom-color) - [Custom color](#custom-color)

View File

@ -15,11 +15,11 @@ Supports localisation.
Adds a new folder of translation source files. Adds a new folder of translation source files.
- _name:_ `string` - Name for the translation provider - _name:_ `string` - Name for the translation provider
- _path:_ `string` - Path to the folder - _path:_ `string` - Path to the folder
- **get**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `Observable<string | any>`<br/> - **get**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string | any>`<br/>
Gets the translation for the supplied key. Gets the translation for the supplied key.
- _key:_ `string | Array<string>` - Key to translate - _key:_ `string | Array<string>` - Key to translate
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message - _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- **Returns** `Observable<string | any>` - Translated text - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string | any>` - Translated text
- **instant**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `string | any`<br/> - **instant**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `string | any`<br/>
Directly returns the translation for the supplied key. Directly returns the translation for the supplied key.
- _key:_ `string | Array<string>` - Key to translate - _key:_ `string | Array<string>` - Key to translate
@ -28,10 +28,10 @@ Supports localisation.
- **onTranslationChanged**(lang: `string` = `null`)<br/> - **onTranslationChanged**(lang: `string` = `null`)<br/>
Triggers a notification callback when the translation language changes. Triggers a notification callback when the translation language changes.
- _lang:_ `string` - The new language code - _lang:_ `string` - The new language code
- **use**(lang: `string` = `null`): `Observable<any>`<br/> - **use**(lang: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Sets the target language for translations. Sets the target language for translations.
- _lang:_ `string` - Code name for the language - _lang:_ `string` - Code name for the language
- **Returns** `Observable<any>` - Translations available for the language - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Translations available for the language
## Details ## Details

View File

@ -12,18 +12,18 @@ Provides access to various APIs related to file upload features.
### Methods ### Methods
- **addToQueue**(files: [`FileModel[]`](../../lib/core/models/file.model.ts) = `null`): [`FileModel[]`](../../lib/core/models/file.model.ts)<br/> - **addToQueue**(files: [`FileModel`](../../lib/core/models/file.model.ts)`[]` = `null`): [`FileModel`](../../lib/core/models/file.model.ts)`[]`<br/>
Adds files to the uploading queue to be uploaded Adds files to the uploading queue to be uploaded
- _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) = `null`)<br/> - **cancelUpload**(files: [`FileModel`](../../lib/core/models/file.model.ts)`[]` = `null`)<br/>
Cancels uploading of files. Cancels uploading of files.
- _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
- **getQueue**(): [`FileModel[]`](../../lib/core/models/file.model.ts)<br/> - **getQueue**(): [`FileModel`](../../lib/core/models/file.model.ts)`[]`<br/>
Gets the file Queue Gets the file Queue
- **Returns** [`FileModel[]`](../../lib/core/models/file.model.ts) - Array of files that form the queue - **Returns** [`FileModel`](../../lib/core/models/file.model.ts)`[]` - Array of files that form the queue
- **getUploadPromise**(file: [`FileModel`](../../lib/core/models/file.model.ts) = `null`): `any`<br/> - **getUploadPromise**(file: [`FileModel`](../../lib/core/models/file.model.ts) = `null`): `any`<br/>
Gets an upload promise for a file. Gets an upload promise for a file.
- _file:_ [`FileModel`](../../lib/core/models/file.model.ts) - The target file - _file:_ [`FileModel`](../../lib/core/models/file.model.ts) - The target file
@ -31,9 +31,9 @@ Provides access to various APIs related to file upload features.
- **isUploading**(): `boolean`<br/> - **isUploading**(): `boolean`<br/>
Checks whether the service is uploading a file. Checks whether the service is uploading a file.
- **Returns** `boolean` - True if a file is uploading, false otherwise - **Returns** `boolean` - True if a file is uploading, false otherwise
- **uploadFilesInTheQueue**(emitter: `EventEmitter<any>` = `null`)<br/> - **uploadFilesInTheQueue**(emitter?: [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` = `null`)<br/>
Finds all the files in the queue that are not yet uploaded and uploads them into the directory folder. Finds all the files in the queue that are not yet uploaded and uploads them into the directory folder.
- _emitter:_ `EventEmitter<any>` - (Deprecated) Emitter to invoke on file status change - _emitter:_ [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` - (Optional) (Deprecated) Emitter to invoke on file status change
## Events ## Events

View File

@ -30,10 +30,10 @@ Stores preferences for components.
- **getStoragePrefix**(): `string`<br/> - **getStoragePrefix**(): `string`<br/>
Gets the active storage prefix for preferences. Gets the active storage prefix for preferences.
- **Returns** `string` - Storage prefix - **Returns** `string` - Storage prefix
- **select**(property: `string` = `null`): `Observable<any>`<br/> - **select**(property: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Sets up a callback to notify when a property has changed. Sets up a callback to notify when a property has changed.
- _property:_ `string` - The property to watch - _property:_ `string` - The property to watch
- **Returns** `Observable<any>` - Notification callback - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Notification callback
- **set**(property: `string` = `null`, value: `any` = `null`)<br/> - **set**(property: `string` = `null`, value: `any` = `null`)<br/>
Sets a preference property. Sets a preference property.
- _property:_ `string` - Name of the property - _property:_ `string` - Name of the property

View File

@ -86,7 +86,7 @@ URL with `urlFile`.
| allowShare | `boolean` | false | Toggles sharing. | | allowShare | `boolean` | false | Toggles sharing. |
| allowSidebar | `boolean` | false | Toggles the sidebar. | | allowSidebar | `boolean` | false | Toggles the sidebar. |
| allowThumbnails | `boolean` | true | Toggles PDF thumbnails. | | allowThumbnails | `boolean` | true | Toggles PDF thumbnails. |
| blobFile | `Blob` | | Loads a Blob File | | blobFile | [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) | | Loads a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) File |
| canNavigateBefore | `boolean` | true | Toggles the "before" ("&lt;") button. Requires `allowNavigate` to be enabled. | | canNavigateBefore | `boolean` | true | Toggles the "before" ("&lt;") button. Requires `allowNavigate` to be enabled. |
| canNavigateNext | `boolean` | true | Toggles the next (">") button. Requires `allowNavigate` to be enabled. | | canNavigateNext | `boolean` | true | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
| displayName | `string` | | Specifies the name of the file when it is not available from the URL. | | displayName | `string` | | Specifies the name of the file when it is not available from the URL. |
@ -101,8 +101,8 @@ URL with `urlFile`.
| showToolbar | `boolean` | true | Hide or show the toolbar | | showToolbar | `boolean` | true | Hide or show the toolbar |
| showViewer | `boolean` | true | Hide or show the viewer | | showViewer | `boolean` | true | Hide or show the viewer |
| sidebarPosition | `string` | "right" | The position of the sidebar. Can be `left` or `right`. | | sidebarPosition | `string` | "right" | The position of the sidebar. Can be `left` or `right`. |
| sidebarTemplate | `TemplateRef<any>` | null | The template for the sidebar. The template context contains the loaded node data. | | sidebarTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the sidebar. The template context contains the loaded node data. |
| thumbnailsTemplate | `TemplateRef<any>` | null | The template for the pdf thumbnails. | | thumbnailsTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the pdf thumbnails. |
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. | | urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. | | urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
| fileNodeId | | | Node Id of the file to load. | | fileNodeId | | | Node Id of the file to load. |
@ -111,10 +111,10 @@ URL with `urlFile`.
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| download | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Download' button. | | download | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`BaseEvent`](../../lib/core/events/base.event.ts)`<any>>` | Emitted when user clicks the 'Download' button. |
| extensionChange | `EventEmitter<string>` | Emitted when the filename extension changes. | | extensionChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the filename extension changes. |
| goBack | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Back' button. | | goBack | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`BaseEvent`](../../lib/core/events/base.event.ts)`<any>>` | Emitted when user clicks the 'Back' button. |
| navigateBefore | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Before' ("&lt;") button. | | navigateBefore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when user clicks 'Navigate Before' ("&lt;") button. |
| navigateNext | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Next' (">") button. | | navigateNext | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Next' (">") button. |
| print | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Print' button. | | print | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Print' button. |
| share | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Share' button. | | share | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Share' button. |

View File

@ -69,7 +69,7 @@ export abstract class DynamicComponentMapper {
/** /**
* Finds the component type that is needed to render a form field. * Finds the component type that is needed to render a form field.
* @param model [Form field model](form-field.model.md) for the field to render * @param model Form field model for the field to render
* @param defaultValue Default type returned for field types that are not yet mapped. * @param defaultValue Default type returned for field types that are not yet mapped.
* @returns Component type * @returns Component type
*/ */

View File

@ -66,10 +66,13 @@ function updatePhase(filenames, aggData) {
showErrors(pathname, errorMessages); showErrors(pathname, errorMessages);
} }
if (modified) if (program.json) {
fs.writeFileSync(filenames[i], remark().use(frontMatter, {type: 'yaml', fence: '---'}).data("settings", {paddedTable: false, gfm: false}).stringify(tree)); console.log(JSON.stringify(tree));
}
//console.log(JSON.stringify(tree)); if (modified) {
fs.writeFileSync(filenames[i], remark().use(frontMatter, {type: 'yaml', fence: '---'}).data("settings", {paddedTable: false, gfm: false}).stringify(tree));
}
} }
} }
@ -128,6 +131,7 @@ function getAllDocFilePaths(docFolder, files) {
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")
.parse(process.argv); .parse(process.argv);
var sourcePath; var sourcePath;

View File

@ -19,7 +19,8 @@
"toc" "toc"
], ],
"dev": [ "dev": [
"versionIndex" "tsInfo",
"typeLinker"
] ]
} }
} }

View File

@ -12,6 +12,19 @@ var includedNodeTypes = [
]; ];
var docFolder = path.resolve("docs"); var docFolder = path.resolve("docs");
var adfLibNames = ["core", "content-services", "insights", "process-services"]; var adfLibNames = ["core", "content-services", "insights", "process-services"];
var externalTypes = {
'Blob': 'https://developer.mozilla.org/en-US/docs/Web/API/Blob',
'EventEmitter': 'https://angular.io/api/core/EventEmitter',
'MatSnackBarRef': 'https://material.angular.io/components/snack-bar/overview',
'TemplateRef': 'https://angular.io/api/core/TemplateRef',
'Observable': 'http://reactivex.io/documentation/observable.html',
'Subject': 'http://reactivex.io/documentation/subject.html',
'AppDefinitionRepresentation': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md',
'NodeEntry': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md',
'RelatedContentRepresentation': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md',
'SiteEntry': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md',
'SitePaging': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md'
};
function initPhase(aggData) { function initPhase(aggData) {
aggData.docFiles = {}; aggData.docFiles = {};
aggData.nameLookup = new SplitNameLookup(); aggData.nameLookup = new SplitNameLookup();
@ -62,10 +75,10 @@ function updatePhase(tree, pathname, aggData) {
} }
} }
} }
else if (node.type === "paragraph") { else if ((node.type === "paragraph")) {
node.children.forEach(function (child, index) { node.children.forEach(function (child, index) {
if (child.type === "text") { if ((child.type === "text") || (child.type === "inlineCode")) {
var newNodes = handleLinksInBodyText(aggData, child.value); var newNodes = handleLinksInBodyText(aggData, child.value, child.type === 'inlineCode');
(_a = node.children).splice.apply(_a, [index, 1].concat(newNodes)); (_a = node.children).splice.apply(_a, [index, 1].concat(newNodes));
} }
else { else {
@ -181,7 +194,7 @@ var SplitNameLookup = /** @class */ (function () {
var WordScanner = /** @class */ (function () { var WordScanner = /** @class */ (function () {
function WordScanner(text) { function WordScanner(text) {
this.text = text; this.text = text;
this.separators = " \n\r\t.;:"; this.separators = " \n\r\t.;:<>[]&|";
this.index = 0; this.index = 0;
this.nextSeparator = 0; this.nextSeparator = 0;
this.next(); this.next();
@ -214,7 +227,8 @@ var WordScanner = /** @class */ (function () {
}; };
return WordScanner; return WordScanner;
}()); }());
function handleLinksInBodyText(aggData, text) { function handleLinksInBodyText(aggData, text, wrapInlineCode) {
if (wrapInlineCode === void 0) { wrapInlineCode = false; }
var result = []; var result = [];
var currTextStart = 0; var currTextStart = 0;
var matcher = new SplitNameMatcher(aggData.nameLookup.root); var matcher = new SplitNameMatcher(aggData.nameLookup.root);
@ -237,9 +251,23 @@ function handleLinksInBodyText(aggData, text) {
} }
if (link) { if (link) {
var linkText = text.substring(matchStart, scanner.nextSeparator); var linkText = text.substring(matchStart, scanner.nextSeparator);
var linkNode = unist.makeLink(unist.makeText(linkText), link); var linkTitle = void 0;
if (wrapInlineCode) {
linkTitle = unist.makeInlineCode(linkText);
}
else {
linkTitle = unist.makeText(linkText);
}
var linkNode = unist.makeLink(linkTitle, link);
var prevText = text.substring(currTextStart, matchStart); var prevText = text.substring(currTextStart, matchStart);
if (prevText) {
if (wrapInlineCode) {
result.push(unist.makeInlineCode(prevText));
}
else {
result.push(unist.makeText(prevText)); result.push(unist.makeText(prevText));
}
}
result.push(linkNode); result.push(linkNode);
currTextStart = scanner.nextSeparator; currTextStart = scanner.nextSeparator;
matcher.reset(); matcher.reset();
@ -247,12 +275,20 @@ function handleLinksInBodyText(aggData, text) {
} }
var remainingText = text.substring(currTextStart, text.length); var remainingText = text.substring(currTextStart, text.length);
if (remainingText) { if (remainingText) {
if (wrapInlineCode) {
result.push(unist.makeInlineCode(remainingText));
}
else {
result.push(unist.makeText(remainingText)); result.push(unist.makeText(remainingText));
} }
}
return result; return result;
} }
function resolveTypeLink(aggData, text) { function resolveTypeLink(aggData, text) {
var possTypeName = cleanTypeName(text); var possTypeName = cleanTypeName(text);
if (possTypeName === 'constructor') {
return "";
}
var ref = aggData.projData.findReflectionByName(possTypeName); var ref = aggData.projData.findReflectionByName(possTypeName);
if (ref && isLinkable(ref.kind)) { if (ref && isLinkable(ref.kind)) {
var kebabName = ngHelpers.kebabifyClassName(possTypeName); var kebabName = ngHelpers.kebabifyClassName(possTypeName);
@ -263,6 +299,9 @@ function resolveTypeLink(aggData, text) {
} }
return url; return url;
} }
else if (externalTypes[possTypeName]) {
return externalTypes[possTypeName];
}
else { else {
return ""; return "";
} }
@ -279,7 +318,8 @@ function cleanTypeName(text) {
function isLinkable(kind) { function isLinkable(kind) {
return (kind === typedoc_1.ReflectionKind.Class) || return (kind === typedoc_1.ReflectionKind.Class) ||
(kind === typedoc_1.ReflectionKind.Interface) || (kind === typedoc_1.ReflectionKind.Interface) ||
(kind === typedoc_1.ReflectionKind.Enum); (kind === typedoc_1.ReflectionKind.Enum) ||
(kind === typedoc_1.ReflectionKind.TypeAlias);
} }
function convertNodeToTypeLink(node, text, url) { function convertNodeToTypeLink(node, text, url) {
var linkDisplayText = unist.makeInlineCode(text); var linkDisplayText = unist.makeInlineCode(text);

View File

@ -33,6 +33,21 @@ const docFolder = path.resolve("docs");
const adfLibNames = ["core", "content-services", "insights", "process-services"]; const adfLibNames = ["core", "content-services", "insights", "process-services"];
const externalTypes = {
'Blob': 'https://developer.mozilla.org/en-US/docs/Web/API/Blob',
'EventEmitter': 'https://angular.io/api/core/EventEmitter',
'MatSnackBarRef': 'https://material.angular.io/components/snack-bar/overview',
'TemplateRef': 'https://angular.io/api/core/TemplateRef',
'Observable': 'http://reactivex.io/documentation/observable.html',
'Subject': 'http://reactivex.io/documentation/subject.html',
'AppDefinitionRepresentation': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md',
'NodeEntry': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md',
'RelatedContentRepresentation': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md',
'SiteEntry': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md',
'SitePaging': 'https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md'
};
export function initPhase(aggData) { export function initPhase(aggData) {
aggData.docFiles = {}; aggData.docFiles = {};
aggData.nameLookup = new SplitNameLookup(); aggData.nameLookup = new SplitNameLookup();
@ -98,10 +113,10 @@ export function updatePhase(tree, pathname, aggData) {
convertNodeToTypeLink(node, node.children[0].value, link); convertNodeToTypeLink(node, node.children[0].value, link);
} }
} }
} else if (node.type === "paragraph") { } else if ((node.type === "paragraph")) {
node.children.forEach((child, index) => { node.children.forEach((child, index) => {
if (child.type === "text") { if ((child.type === "text") || (child.type === "inlineCode")) {
let newNodes = handleLinksInBodyText(aggData, child.value); let newNodes = handleLinksInBodyText(aggData, child.value, child.type === 'inlineCode');
node.children.splice(index, 1, ...newNodes); node.children.splice(index, 1, ...newNodes);
} else { } else {
traverseMDTree(child); traverseMDTree(child);
@ -229,7 +244,7 @@ class WordScanner {
current: string; current: string;
constructor(public text: string) { constructor(public text: string) {
this.separators = " \n\r\t.;:"; this.separators = " \n\r\t.;:<>[]&|";
this.index = 0; this.index = 0;
this.nextSeparator = 0; this.nextSeparator = 0;
this.next(); this.next();
@ -269,7 +284,7 @@ class WordScanner {
} }
function handleLinksInBodyText(aggData, text: string): Node[] { function handleLinksInBodyText(aggData, text: string, wrapInlineCode: boolean = false): Node[] {
let result = []; let result = [];
let currTextStart = 0; let currTextStart = 0;
let matcher = new SplitNameMatcher(aggData.nameLookup.root); let matcher = new SplitNameMatcher(aggData.nameLookup.root);
@ -296,9 +311,25 @@ function handleLinksInBodyText(aggData, text: string): Node[] {
if (link) { if (link) {
let linkText = text.substring(matchStart, scanner.nextSeparator); let linkText = text.substring(matchStart, scanner.nextSeparator);
let linkNode = unist.makeLink(unist.makeText(linkText), link); let linkTitle;
if (wrapInlineCode) {
linkTitle = unist.makeInlineCode(linkText);
} else {
linkTitle = unist.makeText(linkText);
}
let linkNode = unist.makeLink(linkTitle, link);
let prevText = text.substring(currTextStart, matchStart); let prevText = text.substring(currTextStart, matchStart);
if (prevText) {
if (wrapInlineCode) {
result.push(unist.makeInlineCode(prevText));
} else {
result.push(unist.makeText(prevText)); result.push(unist.makeText(prevText));
}
}
result.push(linkNode); result.push(linkNode);
currTextStart = scanner.nextSeparator; currTextStart = scanner.nextSeparator;
matcher.reset(); matcher.reset();
@ -308,8 +339,12 @@ function handleLinksInBodyText(aggData, text: string): Node[] {
let remainingText = text.substring(currTextStart, text.length); let remainingText = text.substring(currTextStart, text.length);
if (remainingText) { if (remainingText) {
if (wrapInlineCode) {
result.push(unist.makeInlineCode(remainingText));
} else {
result.push(unist.makeText(remainingText)); result.push(unist.makeText(remainingText));
} }
}
return result; return result;
} }
@ -317,6 +352,11 @@ function handleLinksInBodyText(aggData, text: string): Node[] {
function resolveTypeLink(aggData, text): string { function resolveTypeLink(aggData, text): string {
let possTypeName = cleanTypeName(text); let possTypeName = cleanTypeName(text);
if (possTypeName === 'constructor') {
return "";
}
let ref: Reflection = aggData.projData.findReflectionByName(possTypeName); let ref: Reflection = aggData.projData.findReflectionByName(possTypeName);
if (ref && isLinkable(ref.kind)) { if (ref && isLinkable(ref.kind)) {
@ -329,6 +369,8 @@ function resolveTypeLink(aggData, text): string {
} }
return url; return url;
} else if (externalTypes[possTypeName]) {
return externalTypes[possTypeName];
} else { } else {
return ""; return "";
} }
@ -349,7 +391,8 @@ function cleanTypeName(text) {
function isLinkable(kind: ReflectionKind) { function isLinkable(kind: ReflectionKind) {
return (kind === ReflectionKind.Class) || return (kind === ReflectionKind.Class) ||
(kind === ReflectionKind.Interface) || (kind === ReflectionKind.Interface) ||
(kind === ReflectionKind.Enum); (kind === ReflectionKind.Enum) ||
(kind === ReflectionKind.TypeAlias);
} }
function convertNodeToTypeLink(node, text, url) { function convertNodeToTypeLink(node, text, url) {

View File

@ -132,5 +132,9 @@ module.exports = {
isText: function (node) { isText: function (node) {
return node.type === "text"; return node.type === "text";
},
isLink: function (node) {
return node.type === "inlineCode";
} }
} }