[ADF-2847] Added Class members headings and rebuilt prop/method tables for docs (#3240)

* [ADF-2847] Added class members heading to content services docs

* [ADF-2847] Updated all prop/method tables in content services
This commit is contained in:
Andy Stark
2018-04-26 14:54:25 +01:00
committed by Eugenio Romano
parent 616036f9e7
commit 2c0e7aa035
40 changed files with 541 additions and 405 deletions
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Content Action component
Adds options to a Document List actions menu for a particular content type.
@@ -12,6 +13,8 @@ Adds options to a Document List actions menu for a particular content type.
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
@@ -76,26 +79,28 @@ export class MyView {
}
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| title | `string` | `'Action'` | The title of the action as shown in the menu. If the title is a translation key the translation will be automatically showed. |
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
| target | `string` | [ContentActionTarget.All](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/content-services/document-list/models/content-action.model.ts) | Type of item that the action applies to. Can be one of the values provided by the enum : **All**, **Folder**, **Document** |
| permission | `string` | | The permission type. |
| disableWithNoPermission | `boolean` | | Should this action be disabled in the menu if the user doesn't have permission for it? |
| disabled | `boolean` | `false` | Is the menu item disabled? |
| -- | -- | -- | -- |
| disableWithNoPermission | `boolean` | | Should this action be disabled in the menu if the user doesn't have permission for it? |
| disabled | `boolean` | false | Is the menu item disabled? |
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
| permission | `string` | | The permission type. |
| target | `string` | ContentActionTarget.All | Type of item that the action appies to. Can be "document" or "folder" |
| title | `string` | "Action" | The title of the action as shown in the menu. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| execute | `EventEmitter<{}>` | Emitted when the user selects the action from the menu. |
| permissionEvent | `EventEmitter<{}>` | Emitted when a permission error occurs |
| error | `EventEmitter<{}>` | Emitted when an error occurs during the action. Applies to copy and move actions. |
| success | `EventEmitter<{}>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. |
| -- | -- | -- |
| error | `EventEmitter<Object>` | Emitted when an error occurs during the action. Applies to copy and move actions. |
| execute | `EventEmitter<Object>` | Emitted when the user selects the action from the menu. |
| permissionEvent | `EventEmitter<Object>` | Emitted when a permission error occurs |
| success | `EventEmitter<Object>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. |
## Details
@@ -156,22 +161,22 @@ type and other details of the item just deleted:
### Examples
#### System handler
This action simply execute one of the built-in actions described above:
```html
<adf-document-list [contentActions]="true"...>
<content-actions>
<content-action
target="document"
title="Download"
handler="download">
</content-action>
</content-actions>
</adf-document-list>
```
```html
<adf-document-list [contentActions]="true"...>
<content-actions>
<content-action
target="document"
title="Download"
handler="download">
</content-action>
</content-actions>
</adf-document-list>
```
![Download document action](../docassets/images/document-action-download.png)
@@ -179,7 +184,6 @@ This action simply execute one of the built-in actions described above:
If you specify a custom handler it will be executed at any click of the action:
```html
<adf-document-list [contentActions]="true"...>
<content-actions>
@@ -193,7 +197,6 @@ If you specify a custom handler it will be executed at any click of the action:
</adf-document-list>
```
```ts
export class MyComponent {
@@ -276,7 +279,6 @@ export class MyComponent {
![Delete show notification message](../docassets/images/content-action-notification-message.png)
#### Copy and move
These actions show the destination chooser dialog for copy and move actions. By default,