[ADF-2588] make comment component compatible with content (#3128)

This commit is contained in:
Mario Romano
2018-03-30 11:13:38 +01:00
committed by Eugenio Romano
parent f985dd11d5
commit 653a510a5c
46 changed files with 1186 additions and 462 deletions

View File

@@ -16,8 +16,6 @@ for more information about installing and using the source code.
| [Create task attachment component](create-task-attachment.component.md) | Displays Upload Component (Drag and Click) to upload the attachment to a specified task | [Source](../../lib/process-services/attachment/create-task-attachment.component.ts) |
| [Process attachment list component](process-attachment-list.component.md) | Displays attached documents on a specified process instance | [Source](../../lib/process-services/attachment/process-attachment-list.component.ts) |
| [Task attachment list component](task-attachment-list.component.md) | Displays attached documents on a specified task. | [Source](../../lib/process-services/attachment/task-attachment-list.component.ts) |
| [Comment list component](comment-list.component.md) | Shows a list of comments. | [Source](../../lib/process-services/comments/comment-list.component.ts) |
| [Comments component](comments.component.md) | Displays comments from users involved in a specified task and allows an involved user to add a comment to the task. | [Source](../../lib/process-services/comments/comments.component.ts) |
| [Process comments component](process-comments.component.md) | Displays comments associated with a particular process instance and allows the user to add new comments. | [Source](../../lib/process-services/comments/process-comments.component.ts) |
| [People component](people.component.md) | Displays users involved with a specified task | [Source](../../lib/process-services/people/components/people/people.component.ts) |
| [People list component](people-list.component.md) | Shows a list of users (people). | [Source](../../lib/process-services/people/components/people-list/people-list.component.ts) |

View File

@@ -1,69 +0,0 @@
---
Added: v2.0.0
Status: Active
---
# Comment list component
Shows a list of comments.
![ADF Comment List](../docassets/images/adf-comment-list.png)
## Basic Usage
Populate the comments in the component class:
```ts
import { CommentProcessModel } from '@alfresco/adf-core';
export class SomeComponent implements OnInit {
comments: CommentProcessModel[] = [
{
id: 1,
message: 'Comment number 1',
created: new Date(),
createdBy: {
id: 1,
email: 'john.doe@alfresco.com',
firstName: 'John',
lastName: 'Doe'
},
},
{
id: 2,
message: 'Comment number 2',
created: new Date(),
createdBy: {
id: 2,
email: 'jane.doe@alfresco.com',
firstName: 'Jane',
lastName: 'Doe'
},
}
];
onClickCommentRow(comment: CommentProcessModel) {
console.log('Clicked row: ', comment);
}
```
In the component template use the comment list component:
```html
<adf-comment-list
[comments]="comments"
(clickRow)="onClickCommentRow($event)">
</adf-comment-list>
```
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| comments | `any[]` | | The comments data used to populate the list. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| clickRow | `EventEmitter<any>` | Emitted when the user clicks on one of the comment rows. |

View File

@@ -1,31 +0,0 @@
---
Added: v2.0.0
Status: Active
---
# Comments Component
Displays comments from users involved in a specified task and allows an involved user to add a comment to the task.
![adf-comments](../docassets/images/adf-comments.png)
## Basic Usage
```html
<adf-comments
[taskId]="YOUR_TASK_ID"
[readOnly]="YOUR_READ_ONLY_FLAG">
</adf-comments>
```
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| taskId | `string` | | The numeric ID of the task. |
| readOnly | `boolean` | `false` | Are the comments read only? |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | `EventEmitter<any>` | Emitted when an error occurs while displaying/adding a comment. |