[ADF-2451] Reviewed docs for components (#3061)

* [ADF-2451] Reviewed tasklist docs

* [ADF-2451] Reviewed docs for content node components

* [ADF-2451] Fixed tslint error

* [ADF-2463] Moved core components to subfolder (#3062)

* [ADF-2443] renaming getDifferentPageSize to getDefaultPageSize (#3060)

* [ADF-2443] renaming getDifferentPageSize to getDefaultPageSize

* [ADF-2443] fixed method call for demo shell

* Add data-automation-id to an error message displayed on the Tag Page. (#3064)

* Update upload-drag-area.component.md (#3067)

* [ADF-2443] fixed documentation (#3066)

* [ADF-2451] Reviewed tasklist docs

* [ADF-2451] Reviewed docs for content node components

* [ADF-2451] Fixed tslint error
This commit is contained in:
Andy Stark
2018-03-13 12:11:13 +00:00
committed by Eugenio Romano
parent c3e2588e35
commit d563dbbd77
7 changed files with 181 additions and 119 deletions

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-12
---
# Task List component
Renders a list containing all the tasks matched by the parameters specified.
@@ -16,7 +18,43 @@ Renders a list containing all the tasks matched by the parameters specified.
</adf-tasklist>
```
You can pass schema as data adapter for the tasklist like shown below :
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. |
| processInstanceId | `string` | | The Instance Id of the process. |
| processDefinitionKey | `string` | | The Definition Key of the process. |
| state | `string` | | Current state of the process. Possible values are: `completed`, `active`. |
| assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), candidate (the current user is a task candidate", "group_x" (the task is assigned to a group where the current user is a member, no value(the current user is involved). |
| sort | `string` | | Define the sort order of the processes. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
| name | `string` | | Name of the tasklist. |
| landingTaskId | `string` | | Define which task id should be selected after reloading. If the task id doesn't exist or nothing is passed then the first task will be selected. |
| data | `any` | | Data source object that represents the number and the type of the columns that you want to show. |
| 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. |
| presetColumn | `string` | | Custom preset column schema in JSON format. |
| multiselect | `boolean` | `false` | Toggles multiple row selection, renders checkboxes at the beginning of each row |
| page | `number` | `0` | The page number of the tasks to fetch. |
| size | `number` | See description | The number of tasks to fetch. Default value: 25. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| rowClick | `EventEmitter<string>` | Emitted when a task in the list is clicked |
| rowsSelected | `EventEmitter<any[]>` | Emitted when rows are selected/unselected |
| success | `EventEmitter<any>` | Emitted when the task list is loaded |
| error | `EventEmitter<any>` | Emitted when an error occurs. |
## Details
This component displays lists of process instances both active and completed, using any defined process filter, and
render details of any chosen instance.
### Setting the column schema
You can pass a [DataTableAdapter instance](datatable-adapter.interface.md)
to set a column schema for the tasklist as shown below :
```ts
let data = new ObjectDataTableAdapter(
@@ -49,7 +87,7 @@ let data = new ObjectDataTableAdapter(
</adf-tasklist>
```
You can also use HTML-based schema declaration like shown below:
Alternatively, you can use an HTML-based schema declaration:
```html
<adf-tasklist ...>
@@ -60,9 +98,7 @@ You can also use HTML-based schema declaration like shown below:
</adf-tasklist>
```
You can also use static custom schema declaration as shown below:
define static custom schema in the app.config.json as shown below json format.
You can also set a static custom schema declaration in `app.config.json` as shown below:
```json
"adf-task-list": {
@@ -92,7 +128,7 @@ define static custom schema in the app.config.json as shown below json format.
</adf-tasklist>
```
You can also use both HTML-based and app.config.json custom schema declaration at same time like shown below:
You can use an HTML-based schema and an `app.config.json` custom schema declaration at the same time:
```json
"adf-task-list": {
@@ -131,7 +167,7 @@ You can also use both HTML-based and app.config.json custom schema declaration a
### Pagination strategy
adf-tasklist also supports pagination and the same can be used as shown below.
The Tasklist also supports pagination as shown in the example below:
```html
<adf-tasklist
@@ -148,38 +184,6 @@ adf-tasklist also supports pagination and the same can be used as shown below.
</adf-pagination>
```
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| appId | string | | The id of the app. |
| processDefinitionKey | string | | The processDefinitionKey of the process. |
| processInstanceId | string | | The processInstanceId of the process. |
| presetColumn | string | | The presetColumn of the custom schema to fetch. |
| page | number | 0 | The page of the tasks to fetch. |
| size | number | 25 | The number of tasks to fetch. |
| assignment | string | | The assignment of the process. <ul>Possible values are: <li>assignee : where the current user is the assignee</li> <li>candidate: where the current user is a task candidate </li><li>group_x: where the task is assigned to a group where the current user is a member of.</li> <li>no value: where the current user is involved</li> </ul> |
| 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. |
| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
| state | string | | Define state of the processes. Possible values are: `completed`, `active` |
| hasIcon | boolean | true | Toggle the icon on the left . |
| landingTaskId | string | | Define which task id should be selected after the reloading. If the task id doesn't exist or nothing is passed it will select the first task |
| sort | string | | Define the sort of the processes. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
| data | [DataTableAdapter](datatable-adapter.interface.md) | | JSON object that represent the number and the type of the columns that you want show (see the [example](#datatableadapter-example) section below) |
### Events
| Name | Description |
| ---- | ----------- |
| success | Raised when the task list is loaded |
| rowClick | Raised when the task in the list is clicked |
| rowsSelected | Raised when the a row is selected/unselected |
## Details
This component displays lists of process instances both active and completed, using any defined process filter, and
render details of any chosen instance.
### DataTableAdapter example
See the [DataTableAdapter](datatable-adapter.interface.md) page for full details of the interface and its standard