From b2452f609777663fe7977bd72ce0c982cbd602ca Mon Sep 17 00:00:00 2001
From: Andy Stark <30621568+therealandeeee@users.noreply.github.com>
Date: Wed, 4 Oct 2017 16:56:32 +0100
Subject: [PATCH] [ADF-1586] Added new doc files for Document List library
(#2427)
---
docIndex.md | 24 +-
docs/breadcrumb.component.md | 20 +-
docs/content-action.component.md | 264 ++++++++++++
docs/docassets/images/DropdownBreadcrumb.png | Bin 0 -> 8898 bytes
docs/document-actions.service.md | 81 ++++
docs/document-list.component.md | 413 ++-----------------
docs/dropdown-breadcrumb.component.md | 37 ++
docs/folder-actions.service.md | 81 ++++
docs/seeAlsoGraph.json | 5 +
docs/undocStoplist.json | 5 +-
10 files changed, 521 insertions(+), 409 deletions(-)
create mode 100644 docs/content-action.component.md
create mode 100644 docs/docassets/images/DropdownBreadcrumb.png
create mode 100644 docs/document-actions.service.md
create mode 100644 docs/dropdown-breadcrumb.component.md
create mode 100644 docs/folder-actions.service.md
diff --git a/docIndex.md b/docIndex.md
index 1d803857a9..9431b75ff9 100644
--- a/docIndex.md
+++ b/docIndex.md
@@ -349,6 +349,7 @@ for more information about installing and using the source code.
- [*Highlight transform service](ng2-components/ng2-alfresco-core/src/services/highlight-transform.service.ts)
- [*Log service](ng2-components/ng2-alfresco-core/src/services/log.service.ts)
- [*Nodes api service](ng2-components/ng2-alfresco-core/src/services/nodes-api.service.ts)
+- [*Page title service](ng2-components/ng2-alfresco-core/src/services/page-title.service.ts)
- [*People api service](ng2-components/ng2-alfresco-core/src/services/people-api.service.ts)
- [*Search api service](ng2-components/ng2-alfresco-core/src/services/search-api.service.ts)
- [*Search service](ng2-components/ng2-alfresco-core/src/services/search.service.ts)
@@ -395,25 +396,18 @@ for more information about installing and using the source code.
### Components
- [Breadcrumb component](docs/breadcrumb.component.md)
+- [Dropdown breadcrumb component](docs/dropdown-breadcrumb.component.md)
+- [Content action component](docs/content-action.component.md)
- [Document list component](docs/document-list.component.md)
- [Sites dropdown component](docs/sites-dropdown.component.md)
-- [*Dropdown breadcrumb component](ng2-components/ng2-alfresco-documentlist/src/components/breadcrumb/dropdown-breadcrumb.component.ts)
-- [*Content action list component](ng2-components/ng2-alfresco-documentlist/src/components/content-action/content-action-list.component.ts)
-- [*Content action component](ng2-components/ng2-alfresco-documentlist/src/components/content-action/content-action.component.ts)
-- [*Content column list component](ng2-components/ng2-alfresco-documentlist/src/components/content-column/content-column-list.component.ts)
-- [*Content column component](ng2-components/ng2-alfresco-documentlist/src/components/content-column/content-column.component.ts)
- [*Content node selector component](ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.ts)
-### Directives
-
-- [*Empty folder content directive](ng2-components/ng2-alfresco-documentlist/src/components/empty-folder/empty-folder-content.directive.ts)
-
### Services
+- [Document actions service](docs/document-actions.service.md)
+- [Folder actions service](docs/folder-actions.service.md)
- [*Content node selector service](ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.service.ts)
-- [*Document actions service](ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.ts)
- [*Document list service](ng2-components/ng2-alfresco-documentlist/src/services/document-list.service.ts)
-- [*Folder actions service](ng2-components/ng2-alfresco-documentlist/src/services/folder-actions.service.ts)
- [*Node actions service](ng2-components/ng2-alfresco-documentlist/src/services/node-actions.service.ts)
@@ -546,19 +540,13 @@ for more information about installing and using the source code.
- [Viewer component](docs/viewer.component.md)
- [*ImgViewer component](ng2-components/ng2-alfresco-viewer/src/components/imgViewer.component.ts)
- [*MediaPlayer component](ng2-components/ng2-alfresco-viewer/src/components/mediaPlayer.component.ts)
-- [*NotSupportedFormat component](ng2-components/ng2-alfresco-viewer/src/components/notSupportedFormat.component.ts)
- [*PdfViewer component](ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.ts)
- [*TxtViewer component](ng2-components/ng2-alfresco-viewer/src/components/txtViewer.component.ts)
-- [*Pdf view component](ng2-components/ng2-alfresco-viewer/src/components/viewer-dialog/pdf-view/pdf-view.component.ts)
-- [*Viewer dialog component](ng2-components/ng2-alfresco-viewer/src/components/viewer-dialog/viewer-dialog.component.ts)
+- [*Unknown format component](ng2-components/ng2-alfresco-viewer/src/components/unknown-format/unknown-format.component.ts)
### Directives
- [*Extension viewer directive](ng2-components/ng2-alfresco-viewer/src/directives/extension-viewer.directive.ts)
-
-### Services
-
-- [*Viewer service](ng2-components/ng2-alfresco-viewer/src/services/viewer.service.ts)
[(Back to Contents)](#contents)
diff --git a/docs/breadcrumb.component.md b/docs/breadcrumb.component.md
index 185fb7c16b..e7a3f548b5 100644
--- a/docs/breadcrumb.component.md
+++ b/docs/breadcrumb.component.md
@@ -4,18 +4,6 @@ Indicates the current position within a navigation hierarchy.

-
-
-
-
-- [Basic Usage](#basic-usage)
- * [Properties](#properties)
- * [Events](#events)
-
-
-
-
-
## Basic Usage
```html
@@ -39,3 +27,11 @@ Indicates the current position within a navigation hierarchy.
| Name | Returned Type | Description |
| --- | --- | --- |
| navigate | [PathElementEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PathElementEntity.md) | emitted when user clicks on a breadcrumb |
+
+
+
+## See also
+
+- [Document list component](document-list.component.md)
+- [Dropdown breadcrumb component](dropdown-breadcrumb.component.md)
+
\ No newline at end of file
diff --git a/docs/content-action.component.md b/docs/content-action.component.md
new file mode 100644
index 0000000000..10576cb19d
--- /dev/null
+++ b/docs/content-action.component.md
@@ -0,0 +1,264 @@
+# Content Action component
+
+Adds options to a Document List actions menu for a particular content type.
+
+
+
+
+
+
+
+- [Basic Usage](#basic-usage)
+ * [Properties](#properties)
+ * [Events](#events)
+- [Details](#details)
+ * [Built-in action examples](#built-in-action-examples)
+ + [Delete - System handler combined with custom handler](#delete---system-handler-combined-with-custom-handler)
+ + [Download](#download)
+ + [Copy and move](#copy-and-move)
+ * [Error, Permission and Success callbacks](#error-permission-and-success-callbacks)
+ * [Customizing built-in actions](#customizing-built-in-actions)
+- [See also](#see-also)
+
+
+
+
+
+## Basic Usage
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ...
+
+```
+
+```ts
+export class MyView {
+ // ...
+
+ myCustomAction1(event) {
+ let entry = event.value.entry;
+ alert(`Custom document action for ${entry.name}`);
+ }
+
+ myCustomActionAfterDelete(event) {
+ let entry = event.value.entry;
+ alert(`Custom callback after delete system action for ${entry.name}`);
+ }
+}
+```
+
+### Properties
+
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| `target` | string | | "document" or "folder" |
+| `title` | string | | The title of the action as shown in the menu |
+| `icon` | string | | The name of the icon to display next to the menu command (can be left blank) |
+| `handler` | string | | System type actions. Can be "delete", "download", "copy" or "move" |
+| `permission` | string | | The name of the permission |
+| `disabled` | boolean | | Is the menu item disabled?
+| `disableWithNoPermission` | boolean | | Should this action be disabled in the menu if the user doesn't have permission for it? |
+
+### Events
+
+| Name | Handler | Description |
+| --- | --- | --- |
+| `execute` | All | Emitted when user clicks on the action. For combined handlers see below |
+| `permissionEvent` | All | Emitted when a permission error happens |
+| `success` | copy, move, delete | Emitted on successful action with the success string message |
+| `error` | copy, move | Emitted on unsuccessful action with the error event |
+
+## 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 or documents.
+
+A number of built-in actions are defined to handle common use cases:
+
+- **Download** (document)
+- **Copy** (document, folder)
+- **Move** (document, folder)
+- **Delete** (document, folder)
+
+You can use one of the built-in handlers by assigning its name to the `handler` property.
+(The names are case-insensitive, so `handler="download"` and `handler="DOWNLOAD"`
+will trigger the same action.) You can also add your own handler by implementing the
+`execute` event. Note that you can use *both* a built-in handler and your own `execute`
+function in the same action.
+
+### Built-in action examples
+
+#### Delete - System handler combined with custom handler
+
+If you specify both `handler="delete"` and your own custom handler with
+`(execute)="myCustomActionAfterDelete($event)"`, your handler will run after a delete completes
+successfully. A delete operation is considered successful if there are no permission or
+network-related errors for the delete request. You can avoid permission errors simply by disabling
+an item for users who don't have permission to use it (set `disableWithNoPermission="true"`).
+
+```html
+
+
+
+
+
+
+
+
+```
+
+
+
+You can also implement the `permissionEvent` to handle permission errors
+(to show the user a notification, for example). Subscribe to this event from your component
+and use the [Notification service](notification.service.md) to show a message.
+
+```html
+
+
+
+
+
+
+
+
+```
+
+```ts
+export class MyComponent {
+
+ onPermissionsFailed(event: any) {
+ this.notificationService.openSnackMessage(`you don't have the ${event.permission} permission to ${event.action} the ${event.type} `, 4000);
+ }
+
+}
+```
+
+
+
+#### Download
+
+This action simply starts a download of the corresponding document file.
+
+```html
+
+
+
+
+
+
+
+
+```
+
+
+
+#### Copy and move
+
+These actions show the destination chooser dialog for copy and move actions. By default,
+the destination chooser lists all the folders of the subject item's parent. However, it won't
+allow the item being copied/moved to be the destination if it is itself a folder.
+
+
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+```
+
+### Error, Permission and Success callbacks
+
+Defining error, permission and success callbacks are pretty much the same as doing it for the delete permission handling.
+
+- The error handler callback gets the error object which was raised
+- The success callback's only parameter is the translatable success message string (could be used for showing in snackbar for example)
+- The permissionEvent callback is the same as described above with the delete action
+
+
+
+### Customizing built-in actions
+
+The built-in actions are defined in the [Document Actions service](document-actions.service.md) and
+[Folder Actions service](folder-actions.service.md) but you can register new actions with these services
+and override the default implementations. See the doc pages for
+[Document Actions service](document-actions.service.md) and [Folder Actions service](folder-actions.service.md)
+for details and examples.
+
+
+
+## See also
+
+- [Document list component](document-list.component.md)
+- [Document actions service](document-actions.service.md)
+- [Folder actions service](folder-actions.service.md)
+
\ No newline at end of file
diff --git a/docs/docassets/images/DropdownBreadcrumb.png b/docs/docassets/images/DropdownBreadcrumb.png
new file mode 100644
index 0000000000000000000000000000000000000000..d543d4202e6bd3675ee5edaecf3737902d393c7f
GIT binary patch
literal 8898
zcmX9^1zeQR)2AEhko+A=NtbjTNaxXU=z&NI(#?S!C8>Z&A4ncZBOQ{`4bmXO!O`9D
z9{=}q&-2{wKF{pz&dkn!cXp%obW}-+7>F=1Fi6$altCC6n0n}R0|6fTSr=9N5&ef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iwAgI#TLqAsl31xR!!F1Kxf6=a*cr
z&!Ln`k=U*uaNYqQ==>d;E?1!4cN8%lwh|VC_
zMXF5KN7RfOStLRjH$n+DixRNC@PGEwfIE`R5;$1V&XK&4=m|q*zv-PjDmaL|UV@
z6G{xJ{HX(8tH?%jT>+>^WPdlh^U477*9c4B84lAiFyJ1hu)q@iIeGt)q29V~H|RYc
zUeITDNK|mVhEm
G@&5o`?oxID
literal 0
HcmV?d00001
diff --git a/docs/document-actions.service.md b/docs/document-actions.service.md
new file mode 100644
index 0000000000..cfc3b3fc0a
--- /dev/null
+++ b/docs/document-actions.service.md
@@ -0,0 +1,81 @@
+# Document Actions service
+
+Implements the document menu actions for the Document List component.
+
+## Details
+
+This service implements the built-in actions that can be applied to a document
+shown in a [Document List component](document-list.component.md): **delete**,
+**download**, **copy** and **move** (see the
+[Content Action component](content-action.component.md) for further details and examples
+of these menu items). However, you can also use the service to add extra actions or
+replace the built-in ones with your own implementation.
+
+### Registering an action
+
+In the example below, a custom handler called `my-handler` is registered with the service.
+This action will invoke the `myDocumentActionHandler` function each time it is selected
+from the Document List menu.
+
+```ts
+import { DocumentActionsService } from 'ng2-alfresco-documentlist';
+
+export class MyView {
+
+ constructor(documentActions: DocumentActionsService) {
+ documentActions.setHandler(
+ 'my-handler',
+ this.myDocumentActionHandler.bind(this)
+ );
+ }
+
+ myDocumentActionHandler(obj: any) {
+ window.alert('my custom action handler');
+ }
+}
+```
+
+The action can then be used from the component in the usual way:
+
+```html
+
+
+
+
+
+
+
+
+```
+
+You can also override a built-in handler (eg, 'download') with your own function:
+
+```ts
+export class MyView {
+
+ constructor(documentActions: DocumentActionsService) {
+ documentActions.setHandler(
+ 'download',
+ this.customDownloadBehavior.bind(this)
+ );
+ }
+
+ customDownloadBehavior(obj: any) {
+ window.alert('my custom download behavior');
+ }
+}
+```
+
+You will probably want to set up all your custom actions at the application root level or
+with a custom application service.
+
+
+
+## See also
+
+- [Content action component](content-action.component.md)
+- [Folder actions service](folder-actions.service.md)
+
\ No newline at end of file
diff --git a/docs/document-list.component.md b/docs/document-list.component.md
index 574aa38c5f..9b959b5dad 100644
--- a/docs/document-list.component.md
+++ b/docs/document-list.component.md
@@ -11,6 +11,7 @@ Displays the documents from a repository.
* [Events](#events)
- [Details](#details)
* [DOM Events](#dom-events)
+ * [Pagination strategy](#pagination-strategy)
* [Data Sources](#data-sources)
+ [Node ID](#node-id)
+ [Repository aliases](#repository-aliases)
@@ -24,16 +25,6 @@ Displays the documents from a repository.
* [Location Column](#location-column)
* [Column Template](#column-template)
* [Actions](#actions)
- * [Menu actions](#menu-actions)
- * [Default action handlers](#default-action-handlers)
- + [Delete - System handler combined with custom handler](#delete---system-handler-combined-with-custom-handler)
- + [Delete - Show notification message with no permission](#delete---show-notification-message-with-no-permission)
- + [Delete - Disable button checking the permission](#delete---disable-button-checking-the-permission)
- + [Download](#download)
- + [Copy and move](#copy-and-move)
- + [Error, Permission and success callback](#error-permission-and-success-callback)
- * [Folder actions](#folder-actions)
- * [Context Menu](#context-menu)
* [Navigation mode](#navigation-mode)
- [Advanced usage and customization](#advanced-usage-and-customization)
* [Custom row filter](#custom-row-filter)
@@ -42,8 +33,6 @@ Displays the documents from a repository.
* [Custom row permissions style](#custom-row-permissions-style)
+ [Examples](#examples)
* [Custom 'empty folder' template](#custom-empty-folder-template)
- * [Customizing default actions](#customizing-default-actions)
-- [See also](#see-also)
@@ -674,289 +663,14 @@ In the Example below we will add the [ng2-alfresco-tag](https://www.npmjs.com/pa
### Actions
-Properties:
-
-| Name | Type | Default | Description |
-| --- | --- | --- | --- |
-| `target` | string | | "document" or "folder" |
-| `title` | string | | The title of the action as shown in the menu |
-| `handler` | string | | System type actions. Can be "delete", "download", "copy" or "move" |
-| `permission` | string | | The name of the permission |
-
-Events:
-
-| Name | Handler | Description |
-| --- | --- | --- |
-| `execute` | All | Emitted when user clicks on the action. For combined handlers see below |
-| `permissionEvent` | All | Emitted when a permission error happens |
-| `success` | copy, move, delete | Emitted on successful action with the success string message |
-| `error` | copy, move | Emitted on unsuccessful action with the error event |
-
-DocumentList supports declarative actions for Documents and Folders.
-Each action can be bound to either default out-of-the-box handler, to a custom behaviour or to both.
-You can define both folder and document actions at the same time.
-
-### Menu actions
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-```ts
-export class MyView {
- // ...
-
- myCustomAction1(event) {
- let entry = event.value.entry;
- alert(`Custom document action for ${entry.name}`);
- }
-
- myCustomActionAfterDelete(event) {
- let entry = event.value.entry;
- alert(`Custom callback after delete system action for ${entry.name}`);
- }
-}
-```
-
-All document actions are rendered as a dropdown menu as on the picture below:
-
-
-
-### Default action handlers
-
-The following action handlers are provided out-of-box:
-
-- **Download** (document)
-- **Copy** (document, folder)
-- **Move** (document, folder)
-- **Delete** (document, folder)
-
-All system handler names are case-insensitive, `handler="download"` and `handler="DOWNLOAD"`
-will trigger the same `download` action.
-
-#### Delete - System handler combined with custom handler
-
-If you specify both **handler="delete"** and your custom **(execute)="myCustomActionAfterDelete($event)"**, your callback will be invoked after a successful delete happened. A successful delete operation happens if there is neither permission error, nor other network related error for the delete operation request. For handling permission errors see the section below.
-
-#### Delete - Show notification message with no permission
-
-You can show a notification error when the user doesn't have the right permission to perform the action.
-The ContentActionComponent provides the event permissionEvent that is raised when the permission specified in the permission property is missing
-You can subscribe to this event from your component and use the NotificationService to show a message.
-
-```html
-
-
-
-
-
-
-
-
-```
-
-```ts
-export class MyComponent {
-
- onPermissionsFailed(event: any) {
- this.notificationService.openSnackMessage(`you don't have the ${event.permission} permission to ${event.action} the ${event.type} `, 4000);
- }
-
-}
-```
-
-
-
-#### Delete - Disable button checking the permission
-
-You can easily disable a button when the user doesn't own the permission to perform the action related to the button.
-The ContentActionComponent provides the property permission that must contain the permission to check and a property disableWithNoPermission that can be true if
- you want to see the button disabled.
-
-```html
-
-
-
-
-
-
-
-
-```
-
-
-
-#### Download
-
-Initiates download of the corresponding document file.
-
-```html
-
-
-
-
-
-
-
-
-```
-
-
-
-#### Copy and move
-
-Shows the destination chooser dialog for copy and move actions. By default the destination chooser lists all the folders of the subject item's parent (except the selected item which is about to be copied/moved if it was a folder itself also).
-
-
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-```
-
-#### Error, Permission and success callback
-
-Defining error, permission and success callbacks are pretty much the same as doing it for the delete permission handling.
-
-- The error handler callback gets the error object which was raised
-- The success callback's only parameter is the translatable success message string (could be used for showing in snackbar for example)
-- The permissionEvent callback is the same as described above with the delete action
-
-
-
-### Folder actions
-
-Folder actions have the same declaration as document actions except ```target="folder"``` attribute value. You can define system, custom or combined handlers as well just as with the document actions.
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-```ts
-export class MyView {
- // ...
-
- myFolderAction1(event) {
- let entry = event.value.entry;
- alert(`Custom folder action for ${entry.name}`);
- }
-
- myCustomActionAfterDelete(event) {
- let entry = event.value.entry;
- alert(`Custom callback after delete system action for ${entry.name}`);
- }
-}
-```
-
-
-
-### Context Menu
-
-DocumentList also provides integration for 'Context Menu Service' from the
-[ng2-alfresco-core](https://www.npmjs.com/package/ng2-alfresco-core) library.
-
-You can automatically turn all menu actions (for the files and folders)
-into context menu items like shown below:
-
-
-
-Enabling context menu is very simple:
+You can add actions to a dropdown menu for each item shown in a Document List. Several
+built-in actions are available (**delete**, **download**, **copy** and **move**) but
+you can also define your own actions. See the [Content Action component](content-action.component.md)
+for more information and examples.
+
+You can also use the [Context Menu directive](context-menu.directive.md) from the
+[ADF Core](https://www.npmjs.com/package/ng2-alfresco-core) library to show the
+actions you have defined in a context menu:
```ts
@Component({
@@ -970,7 +684,9 @@ export class MyView {
}
```
-This enables context menu items for documents and folders.
+
+
+This single extra line in the template enables context menu items for documents and folders.
### Navigation mode
@@ -1066,10 +782,9 @@ _Note that for the sake of simplicity the example code below was reduced to the
-
-
-
-
+
+
+
```
@@ -1129,32 +844,32 @@ Now you can declare columns and assign `desktop-only` class where needed:
```html
-
+
-
-
+
-
+
-
-
-
+
-
-
+
+
```
@@ -1244,74 +959,16 @@ That will give the following output:

-### Customizing default actions
-
-It is possible extending or replacing the list of available system actions for documents and folders.
-Actions for the documents and folders can be accessed via the following services:
-
-- `DocumentActionsService`, document action menu and quick document actions
-- `FolderActionsService`, folder action menu and quick folder actions
-
-Example below demonstrates how a new action handler can be registered with the
-`DocumentActionsService`.
-
-```html
-
-
-
-
-
-
-
-
-```
-
-You register custom handler called `my-handler` that will be executing `myDocumentActionHandler`
-function each time upon being invoked.
-
-```ts
-import { DocumentActionsService } from 'ng2-alfresco-documentlist';
-
-export class MyView {
-
- constructor(documentActions: DocumentActionsService) {
- documentActions.setHandler(
- 'my-handler',
- this.myDocumentActionHandler.bind(this)
- );
- }
-
- myDocumentActionHandler(obj: any) {
- window.alert('my custom action handler');
- }
-}
-```
-
-The same approach allows changing the way out-of-box action handlers behave.
-Registering custom action with the name `download` replaces default one:
-
-```ts
-export class MyView {
-
- constructor(documentActions: DocumentActionsService) {
- documentActions.setHandler(
- 'download',
- this.customDownloadBehavior.bind(this)
- );
- }
-
- customDownloadBehavior(obj: any) {
- window.alert('my custom download behavior');
- }
-}
-```
-
-Typically you may want populating all your custom actions at the application root level or
-by means of custom application service.
-
+
+
## See also
-- [Walkthrough: adding indicators to clearly highlight information about a node](metadata-indicators.md)
+- [Datatable component](datatable.component.md)
+- [Data column component](data-column.component.md)
+- [Pagination component](pagination.component.md)
+- [Sites dropdown component](sites-dropdown.component.md)
+- [Metadata indicators](metadata-indicators.md)
+- [Breadcrumb component](breadcrumb.component.md)
+- [Content action component](content-action.component.md)
+- [Dropdown breadcrumb component](dropdown-breadcrumb.component.md)
+
\ No newline at end of file
diff --git a/docs/dropdown-breadcrumb.component.md b/docs/dropdown-breadcrumb.component.md
new file mode 100644
index 0000000000..0f0aba167b
--- /dev/null
+++ b/docs/dropdown-breadcrumb.component.md
@@ -0,0 +1,37 @@
+# Dropdown Breadcrumb Component
+
+Indicates the current position within a navigation hierarchy using a dropdown menu.
+
+
+
+## Basic Usage
+
+```html
+
+
+```
+
+### Properties
+
+| Name | Type | Description |
+| --- | --- | --- |
+| target | DocumentListComponent | (optional) DocumentList component to operate with. Upon clicks will instruct the given component to update. |
+| folderNode | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | Active node, builds UI based on `folderNode.path.elements` collection. |
+| root | string | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use i18n resource key for the property value. |
+| rootId | string | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
+
+### Events
+
+| Name | Returned Type | Description |
+| --- | --- | --- |
+| navigate | [PathElementEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PathElementEntity.md) | emitted when user clicks on a breadcrumb |
+
+
+
+## See also
+
+- [Document list component](document-list.component.md)
+- [Breadcrumb component](breadcrumb.component.md)
+
\ No newline at end of file
diff --git a/docs/folder-actions.service.md b/docs/folder-actions.service.md
new file mode 100644
index 0000000000..456cb7dade
--- /dev/null
+++ b/docs/folder-actions.service.md
@@ -0,0 +1,81 @@
+# Folder Actions service
+
+Implements the folder menu actions for the Document List component.
+
+## Details
+
+This service implements the built-in actions that can be applied to a folder
+shown in a [Document List component](document-list.component.md): **delete**,
+**download**, **copy** and **move** (see the
+[Content Action component](content-action.component.md) for further details and examples
+of these menu items). However, you can also use the service to add extra actions or
+replace the built-in ones with your own implementation.
+
+### Registering an action
+
+In the example below, a custom handler called `my-handler` is registered with the service.
+This action will invoke the `myFolderActionHandler` function each time it is selected
+from the Document List menu.
+
+```ts
+import { FolderActionsService } from 'ng2-alfresco-documentlist';
+
+export class MyView {
+
+ constructor(folderActions: FolderActionsService) {
+ folderActions.setHandler(
+ 'my-handler',
+ this.myFolderActionHandler.bind(this)
+ );
+ }
+
+ myFolderActionHandler(obj: any) {
+ window.alert('my custom action handler');
+ }
+}
+```
+
+The action can then be used from the component in the usual way:
+
+```html
+
+
+
+
+
+
+
+
+```
+
+You can also override a built-in handler (eg, 'download') with your own function:
+
+```ts
+export class MyView {
+
+ constructor(folderActions: FolderActionsService) {
+ folderActions.setHandler(
+ 'download',
+ this.customDownloadBehavior.bind(this)
+ );
+ }
+
+ customDownloadBehavior(obj: any) {
+ window.alert('my custom download behavior');
+ }
+}
+```
+
+You will probably want to set up all your custom actions at the application root level or
+with a custom application service.
+
+
+
+## See also
+
+- [Document actions service](document-actions.service.md)
+- [Content action component](content-action.component.md)
+
\ No newline at end of file
diff --git a/docs/seeAlsoGraph.json b/docs/seeAlsoGraph.json
index cd4ff87801..d66d001daa 100644
--- a/docs/seeAlsoGraph.json
+++ b/docs/seeAlsoGraph.json
@@ -13,6 +13,7 @@
"card-view-update.service": [],
"checklist.component": [],
"comments.component": [],
+ "content-action.component": ["document-list.component", "document-actions.service", "folder-actions.service"],
"content.widget": [],
"context-menu.directive": [],
"create-process-attachment.component": [],
@@ -23,14 +24,18 @@
"pagination.component"
],
"diagram.component": [],
+ "document-actions.service": [],
"document-list.component": [
"datatable.component",
"data-column.component",
"pagination.component",
+ "sites-dropdown.component",
"metadata-indicators"
],
+ "dropdown-breadcrumb.component": ["document-list.component", "breadcrumb.component"],
"extensibility": [],
"file-uploading-dialog.component": [],
+ "folder-actions.service": ["document-actions.service"],
"form-list.component": [],
"form.component": [],
"form.service": [],
diff --git a/docs/undocStoplist.json b/docs/undocStoplist.json
index a4c41aea10..7fe1c07098 100644
--- a/docs/undocStoplist.json
+++ b/docs/undocStoplist.json
@@ -3,5 +3,8 @@
"context-menu-holder",
"data-column-list",
"card-view-[a-z]+item",
- "card-view-item-dispatcher"
+ "card-view-item-dispatcher",
+ "content-column",
+ "content-action-list",
+ "empty-folder-content"
]
\ No newline at end of file