mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2824] Doc review and minor changes to review checker tool (#3466)
This commit is contained in:
committed by
Eugenio Romano
parent
3281891dcd
commit
d152c367aa
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-12
|
||||
Last reviewed: 2018-06-08
|
||||
---
|
||||
|
||||
# Breadcrumb Component
|
||||
@@ -36,10 +36,15 @@ Indicates the current position within a navigation hierarchy.
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the user clicks on a breadcrumb. |
|
||||
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PathElementEntity`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when the user clicks on a breadcrumb. |
|
||||
|
||||
## Details
|
||||
|
||||
The `maxItems` property sets the maximum number of "crumbs" in the breadcrumb trail. If
|
||||
the actual path contains more nodes than this then the earliest items in the path will be
|
||||
removed and kept in a menu as with the
|
||||
[Dropdown breadcrumb component](../content-services/dropdown-breadcrumb.component.md).
|
||||
|
||||
### Using the transform function
|
||||
|
||||
The function supplied in the `transform` property lets you modify the Node object that the component
|
||||
|
@@ -1,6 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-06-08
|
||||
---
|
||||
|
||||
# Content Action component
|
||||
@@ -107,7 +108,7 @@ export class MyView {
|
||||
## Details
|
||||
|
||||
The document actions are rendered on a dropdown menu for each items of content. You can use the
|
||||
`target` property to choose whether the action applies to folders , documents or both. (By default the actions arre applied to both)
|
||||
`target` property to choose whether the action applies to folders, documents or both. (By default the actions are applied to both)
|
||||
|
||||
A number of built-in actions are defined to handle common use cases:
|
||||
|
||||
@@ -127,7 +128,7 @@ function in the same action. The `execute` function is passed a [`NodeMinimalEnt
|
||||
parameter (see the [Document Library model](document-library.model.md) page for more
|
||||
information) which contains full details of the item that the action is operating on. For
|
||||
example, with `handler="delete"` you could use `execute` to show a message with the name,
|
||||
type and other details of the item just deleted:
|
||||
type, and other details of the item just deleted:
|
||||
|
||||
```html
|
||||
<content-actions>
|
||||
@@ -184,7 +185,7 @@ This action simply execute one of the built-in actions described above:
|
||||
|
||||
#### Custom handler
|
||||
|
||||
If you specify a custom handler it will be executed at any click of the action:
|
||||
If you specify a custom handler it will be executed whenever the action is selected:
|
||||
|
||||
```html
|
||||
<adf-document-list [contentActions]="true"...>
|
||||
@@ -211,11 +212,11 @@ export class MyComponent {
|
||||
|
||||
#### System handler combined with custom handler
|
||||
|
||||
If you specify both system handler and your own custom handler with
|
||||
`(execute)="myCustomActionAfterDelete($event)"`, your handler will run after a system handler completes
|
||||
successfully. A system operation is considered successful if there are no permission or
|
||||
network-related errors for the system request. You can avoid permission errors simply by disabling
|
||||
an item for users who don't have permission to use it (set `disableWithNoPermission="true"`).
|
||||
If you specify both a system handler and your own custom handler with
|
||||
`(execute)="myCustomActionAfterDelete($event)"`, your handler will run after the system handler
|
||||
completes successfully. A system operation is considered successful if there are no permission
|
||||
or network-related errors for the system request. You can avoid permission errors simply
|
||||
by disablingan item for users who don't have permission to use it (set `disableWithNoPermission="true"`).
|
||||
|
||||
```html
|
||||
<adf-document-list ...>
|
||||
@@ -323,13 +324,14 @@ allow the item being copied/moved to be the destination if it is itself a folder
|
||||
|
||||
### Conditional visibility
|
||||
|
||||
The `<content-action>` component allows you to control visibility with the help of the `visible` property and supports three major scenarios:
|
||||
The Content-action component allows you to control visibility with the help of the `visible`
|
||||
property which can receive its value in three main ways:
|
||||
|
||||
- direct value of `boolean` type
|
||||
- binding to a property of the `boolean` type
|
||||
- binding to a property of the `Function` type that evaluates condition and returns `boolean` value
|
||||
- direct `boolean` value
|
||||
- binding to a `boolean` property
|
||||
- binding to a `Function` property that evaluates the condition and returns a `boolean` value
|
||||
|
||||
#### Using direct value of boolean type
|
||||
#### Using direct boolean value
|
||||
|
||||
```html
|
||||
<content-action
|
||||
@@ -340,7 +342,7 @@ The `<content-action>` component allows you to control visibility with the help
|
||||
</content-action>
|
||||
```
|
||||
|
||||
#### Using a property of the boolean type
|
||||
#### Binding to a boolean property
|
||||
|
||||
```html
|
||||
<content-action
|
||||
@@ -351,7 +353,8 @@ The `<content-action>` component allows you to control visibility with the help
|
||||
</content-action>
|
||||
```
|
||||
|
||||
The markup above relies on the `showCustomDownloadAction` property declared at your component class level:
|
||||
The markup above relies on the `showCustomDownloadAction` property declared in your
|
||||
component class:
|
||||
|
||||
```ts
|
||||
export class MyComponent {
|
||||
@@ -362,7 +365,7 @@ export class MyComponent {
|
||||
}
|
||||
```
|
||||
|
||||
#### Using a property of the Function type
|
||||
#### Binding to a Function property
|
||||
|
||||
```html
|
||||
<content-action
|
||||
@@ -373,7 +376,8 @@ export class MyComponent {
|
||||
</content-action>
|
||||
```
|
||||
|
||||
The code above relies on the `canDownloadNode` property of a `Function` type declared at your component class level:
|
||||
The code above relies on the `canDownloadNode` property (of `Function` type) declared in
|
||||
your component class:
|
||||
|
||||
```ts
|
||||
export class MyComponent {
|
||||
@@ -387,10 +391,11 @@ export class MyComponent {
|
||||
}
|
||||
```
|
||||
|
||||
Code above checks the node name, and evaluates to `true` only if corresponding node is called "For Sale.docx".
|
||||
The code above checks the node name and evaluates to `true` only if the corresponding
|
||||
node is called "For Sale.docx".
|
||||
|
||||
Please note that if you want to preserve `this` context within the evaluator function,
|
||||
its property should be declared as a lambda one:
|
||||
Note that if you want to preserve `this` context within the evaluator function then
|
||||
the property should be declared as a lambda function:
|
||||
|
||||
```ts
|
||||
funcName = (parameters): boolean => {
|
||||
@@ -495,13 +500,8 @@ Defining error, permission and success callbacks are pretty much the same as doi
|
||||
|
||||

|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
## See also
|
||||
|
||||
- [Document list component](document-list.component.md)
|
||||
- [Document actions service](document-actions.service.md)
|
||||
- [Folder actions service](folder-actions.service.md)
|
||||
<!-- seealso end -->
|
||||
|
@@ -1,6 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-06-08
|
||||
---
|
||||
|
||||
# Dropdown Breadcrumb Component
|
||||
@@ -35,7 +36,13 @@ Indicates the current position within a navigation hierarchy using a dropdown me
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the user clicks on a breadcrumb. |
|
||||
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PathElementEntity`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when the user clicks on a breadcrumb. |
|
||||
|
||||
## Details
|
||||
|
||||
Although this component inherits the `maxItems` property from the [Breadcrumb component,](../content-services/breadcrumb.component.md) the
|
||||
"crumbs" are _always_ shown on a menu. By contrast, the Breadcrumb component only falls back
|
||||
to a menu when its maximum number of nodes is exceeded.
|
||||
|
||||
## See also
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-06-08
|
||||
---
|
||||
|
||||
# Inherit Permission directive
|
||||
@@ -22,15 +23,16 @@ Update the current node by adding/removing the inherited permissions.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | | nodeId where to add/remove inherited permissions |
|
||||
| nodeId | `string` | | ID of the node to add/remove inherited permissions |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| updated | [`EventEmitter<MinimalNodeEntryEntity>`](../content-services/document-library.model.md) | Emitted when the node is updated. |
|
||||
| updated | [`EventEmitter<MinimalNodeEntryEntity>`](../content-services/document-library.model.md) | Emitted when the node is updated |
|
||||
|
||||
## Details
|
||||
|
||||
This directive switches on/off the inheritance on the permission based on what is set on the node entity.
|
||||
So if the node has inherited permissions, this will remove them viceversa if the node does not have the inherited permission this will add them.
|
||||
This directive switches inheritance of permissions on or off depending on what is set in
|
||||
the node entity. So if the node has inherited permissions, this will remove them and
|
||||
vice versa. If the node does not have inherited permissions then this will add them.
|
||||
|
Reference in New Issue
Block a user