[ADF-3909] Updated references to JS-API in docs (#4176)

* [ADF-3909] Updated references to JSAPI classes in docs

* [ADF-3909] Removed obsolete Document library model doc page

* [ADF-3909] Updated JSAPI import lines in code samples
This commit is contained in:
Andy Stark
2019-01-17 12:55:05 +00:00
committed by Eugenio Romano
parent ae0a9e2a04
commit ad5dcfe7c3
34 changed files with 193 additions and 300 deletions

View File

@@ -65,7 +65,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Content node share directive](content-node-share.directive.md) | Creates and manages public shared links for files. | [Source](../../lib/content-services/content-node-share/content-node-share.directive.ts) |
| [Node lock directive](node-lock.directive.md) | Locks a node. | [Source](../../lib/content-services/directives/node-lock.directive.ts) |
| [Node lock directive](node-lock.directive.md) | Locks or unlocks a node. | [Source](../../lib/content-services/directives/node-lock.directive.ts) |
| [Folder create directive](folder-create.directive.md) | Creates folders. | [Source](../../lib/content-services/folder-directive/folder-create.directive.ts) |
| [Folder edit directive](folder-edit.directive.md) | Allows folders to be edited. | [Source](../../lib/content-services/folder-directive/folder-edit.directive.ts) |
| [Inherited button directive](inherited-button.directive.md) | Update the current node by adding/removing the inherited permissions. | [Source](../../lib/content-services/permission-manager/components/inherited-button.directive.ts) |
@@ -75,9 +75,14 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Document library model](document-library.model.md) | Defines classes for use with the Content Services node API. | [Source](../../lib/content-services/document-list/models/document-library.model.ts) |
| [Permissions style model](permissions-style.model.md) | Sets custom CSS styles for rows of a Document List according to the item's permissions. | [Source](../../lib/content-services/document-list/models/permissions-style.model.ts) |
## Pipes
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| _File upload error pipe_ | _Not currently documented_ | [Source](../../lib/content-services/upload/pipes/file-upload-error.pipe.ts) |
## Services
| Name | Description | Source link |

View File

@@ -2,7 +2,7 @@
Title: Add Permission Component
Added: v2.4.0
Status: Active
Last reviewed: 2018-11-19
Last reviewed: 2019-01-16
---
# [Add Permission Component](../../lib/content-services/permission-manager/components/add-permission/add-permission.component.ts "Defined in add-permission.component.ts")
@@ -34,7 +34,7 @@ Searches for people or groups to add to the current node permissions.
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs during the update. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the node is updated successfully. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` | Emitted when the node is updated successfully. |
## Details

View File

@@ -2,7 +2,7 @@
Title: Breadcrumb Component
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
Last reviewed: 2019-01-16
---
# [Breadcrumb Component](../../lib/content-services/breadcrumb/breadcrumb.component.ts "Defined in breadcrumb.component.ts")
@@ -26,7 +26,7 @@ Indicates the current position within a navigation hierarchy.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| folderNode | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | null | Active node, builds UI based on folderNode.path.elements collection. |
| folderNode | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | null | Active node, builds UI based on folderNode.path.elements collection. |
| maxItems | `number` | | Maximum number of nodes to display before wrapping them with a dropdown element. |
| root | `string` | null | (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 an i18n resource key for the property value. |
| rootId | `string` | null | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
@@ -37,7 +37,7 @@ Indicates the current position within a navigation hierarchy.
| Name | Type | Description |
| ---- | ---- | ----------- |
| 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. |
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the user clicks on a breadcrumb. |
## Details
@@ -48,7 +48,7 @@ removed and kept in a menu as with the
### Using the transform function
The function supplied in the `transform` property lets you modify the Node object that the component
The function supplied in the `transform` property lets you modify the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) object that the component
uses to find the "crumbs" for the list. You can use this, for example, to remove unwanted items from
the list by altering the node's `path.elements` property.
@@ -75,7 +75,7 @@ initialization:
A transform function to remove the "Sites" folder from the path would look something like this:
```ts
private changeBreadcrumbPath(node: MinimalNodeEntryEntity) {
private changeBreadcrumbPath(node: Node) {
if (node && node.path && node.path.elements) {
const elements = node.path.elements;

View File

@@ -2,7 +2,7 @@
Title: Content Action component
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-20
Last reviewed: 2019-01-17
---
# [Content Action component](../../lib/content-services/document-list/components/content-action/content-action.component.ts "Defined in content-action.component.ts")
@@ -122,8 +122,7 @@ will trigger the same action.) You can also add your own handler by implementing
Note that you can use _both_ a built-in handler and your own `execute`
function in the same action. The `execute` function is passed a [`NodeMinimalEntry`](../../lib/content-services/document-list/models/document-library.model.ts) as its
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
parameter. 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:
@@ -354,7 +353,7 @@ your component class:
```ts
export class MyComponent {
canDownloadNode = (node: MinimalNodeEntity): boolean => {
canDownloadNode = (node: Node): boolean => {
if (node && node.entry && node.entry.name === 'For Sale.docx') {
return true;
}
@@ -410,7 +409,7 @@ The code above relies on the `isCustomActionDisabled` property of a `Function` t
```ts
export class MyComponent {
isCustomActionDisabled = (node: MinimalNodeEntity): boolean => {
isCustomActionDisabled = (node: Node): boolean => {
if (node && node.entry && node.entry.name === 'custom') {
return false;
}

View File

@@ -2,7 +2,7 @@
Title: Content Metadata Card component
Added: v2.1.0
Status: Active
Last reviewed: 2018-08-07
Last reviewed: 2019-01-16
---
# [Content Metadata Card component](../../lib/content-services/content-metadata/components/content-metadata-card/content-metadata-card.component.ts "Defined in content-metadata-card.component.ts")
@@ -30,9 +30,10 @@ Displays and edits metadata related to a node.
| ---- | ---- | ------------- | ----------- |
| displayEmpty | `boolean` | false | (optional) This flag displays/hides empty metadata fields. |
| multi | `boolean` | false | (optional) This flag allows the component to display more than one accordion at a time. |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | (required) The node entity to fetch metadata about |
| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | (required) The node entity to fetch metadata about |
| preset | `string` | | (required) Name of the metadata preset, which defines aspects and their properties. |
| readOnly | `boolean` | false | (optional) This flag sets the metadata in read only mode preventing changes. |
| displayDefaultProperties | `boolean` | | (optional) This flag displays/hides the metadata properties. |
## Details

View File

@@ -2,7 +2,7 @@
Title: Content Metadata Card component
Added: v2.1.0
Status: Active
Last reviewed: 2018-08-07
Last reviewed: 2019-01-16
---
# [Content Metadata Card component](../../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts "Defined in content-metadata.component.ts")
@@ -28,12 +28,12 @@ Displays and edits metadata related to a node.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| displayDefaultProperties | `boolean` | true | Toggles whether the metadata properties should be shown |
| displayEmpty | `boolean` | false | Toggles whether to display empty values in the card view |
| displayDefaultProperties | `boolean` | true | Toggles whether to display metadata fields values in the card view |
| editable | `boolean` | false | Toggles whether the edit button should be shown |
| expanded | `boolean` | false | Toggles between expanded (ie, full information) and collapsed (ie, reduced information) in the display |
| multi | `boolean` | false | The multi parameter of the underlying material expansion panel, set to true to allow multi accordion to be expanded at the same time |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | (required) The node entity to fetch metadata about |
| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | (required) The node entity to fetch metadata about |
| preset | `string` | | Name of the metadata preset, which defines aspects and their properties |
## Details

View File

@@ -20,40 +20,41 @@ Displays and manages dialogs for selecting content to open, copy or upload.
- _action:_ `string` - Name of the action to display in the dialog title
- _name:_ `string` - Name of the item on which the action is being performed
- **Returns** `string` - Translated version of the title
- **openCopyMoveDialog**(action: `string`, contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md), permission?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- **openCopyMoveDialog**(action: `string`, contentEntry: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md), permission?: `string`, excludeSiteContent?: `string[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a dialog to copy or move an item to a new location.
- _action:_ `string` - Name of the action (eg, "Copy" or "Move") to show in the title
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Item to be copied or moved
- _contentEntry:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - Item to be copied or moved
- _permission:_ `string` - (Optional) Permission for the operation
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about files that were copied/moved
- **openFileBrowseDialogByFolderId**(folderNodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- _excludeSiteContent:_ `string[]` - (Optional) The site content that should be filtered out
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about files that were copied/moved
- **openFileBrowseDialogByFolderId**(folderNodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a file browser at a chosen folder location.
- _folderNodeId:_ `string` - ID of the folder to use
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected file(s)
- **openFileBrowseDialogBySite**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about the selected file(s)
- **openFileBrowseDialogBySite**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a file browser at a chosen site location.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected file(s)
- **openFolderBrowseDialogByFolderId**(folderNodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about the selected file(s)
- **openFolderBrowseDialogByFolderId**(folderNodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a folder browser at a chosen folder location.
- _folderNodeId:_ `string` - ID of the folder to use
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected folder(s)
- **openFolderBrowseDialogBySite**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about the selected folder(s)
- **openFolderBrowseDialogBySite**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a folder browser at a chosen site location.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected folder(s)
- **openLockNodeDialog**(contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md)): [`Subject`](http://reactivex.io/documentation/subject.html)`<string>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about the selected folder(s)
- **openLockNodeDialog**(contentEntry: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)): [`Subject`](http://reactivex.io/documentation/subject.html)`<string>`<br/>
Opens a lock node dialog.
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Node to lock
- _contentEntry:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) to lock
- **Returns** [`Subject`](http://reactivex.io/documentation/subject.html)`<string>` - Error/status message (if any)
- **openUploadFileDialog**(action: `string`, contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- **openUploadFileDialog**(action: `string`, contentEntry: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a dialog to choose a file to upload.
- _action:_ `string` - Name of the action to show in the title
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Item to upload
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the chosen file(s)
- **openUploadFolderDialog**(action: `string`, contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
- _contentEntry:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - Item to upload
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about the chosen file(s)
- **openUploadFolderDialog**(action: `string`, contentEntry: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>`<br/>
Opens a dialog to choose folders to upload.
- _action:_ `string` - Name of the action to show in the title
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Item to upload
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the chosen folder(s)
- _contentEntry:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - Item to upload
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` - Information about the chosen folder(s)
## Details
@@ -70,7 +71,7 @@ constructor(private contentDialogService: ContentNodeDialogService){}
yourFunctionOnCopyOrMove(){
this.contentDialogService
.openCopyMoveDialog(actionName, targetNode, neededPermissionForAction)
.subscribe((selections: MinimalNodeEntryEntity[]) => {
.subscribe((selections: MinimalNode[]) => {
// place your action here on operation success!
});
}
@@ -78,7 +79,7 @@ yourFunctionOnCopyOrMove(){
The `openXXXByFolderId` methods let you set the initial folder location of the browser
using a folder ID string. This can be obtained from the `id` property of a
[`MinimalNodeEntryEntity`](../content-services/document-library.model.md) object (returned from a previous
[`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) object (returned from a previous
dialog operation, say) or be set to one of the well-known names "-my-" , "-shared-" or
"-root-".

View File

@@ -2,12 +2,12 @@
Title: Content Node Selector Panel component
Added: v2.1.0
Status: Active
Last reviewed: 2018-11-19
Last reviewed: 2019-01-16
---
# [Content Node Selector Panel component](../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts "Defined in content-node-selector-panel.component.ts")
Opens a Content Node Selector in its own dialog window.
Opens a Content [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) Selector in its own dialog window.
![Content Node Selector screenshot](../docassets/images/ContentNodeSelector.png)
@@ -31,20 +31,20 @@ Opens a Content Node Selector in its own dialog window.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| breadcrumbTransform | `Function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| currentFolderId | `string` | null | Node ID of the folder currently listed. |
| currentFolderId | `string` | null | [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) ID of the folder currently listed. |
| dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| excludeSiteContent | `string[]` | \[] | Custom list of site content componentIds. Used to filter out the corresponding items from the displayed nodes |
| imageResolver | `ImageResolver` | null | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| isSelectionValid | `ValidationFunction` | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
| pageSize | `number` | | Number of items shown per page in the list. |
| rowFilter | `RowFilter` | null | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| excludeSiteContent | string[] | [] | Custom list of site content componentIds that is used to filter out their corresponding items from the displayed nodes. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| select | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` | Emitted when the user has chosen an item. |
| select | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`[]>` | Emitted when the user has chosen an item. |
## Details
@@ -57,7 +57,7 @@ finer control over the behavior of the dialog.
### Using the breadcrumbTransform function
The `breadcrumbTransform` property lets you modify the Node object that is used to generate the
The `breadcrumbTransform` property lets you modify the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) object that is used to generate the
list of breadcrumbs. You can use this, for example, to remove path elements that are not
relevant to the use case. See the [Breadcrumb component](breadcrumb.component.md) page for an
example of how to use this function.

View File

@@ -22,7 +22,7 @@ more information).
### Showing the dialog
Unlike most components, the Content Node Selector is typically shown in a dialog box
Unlike most components, the Content [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) Selector is typically shown in a dialog box
rather than the main page and you are responsible for opening the dialog yourself. You can use the
[Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this,
as shown in the usage example. ADF provides the [`ContentNodeSelectorComponentData`](../../lib/content-services/content-node-selector/content-node-selector.component-data.interface.ts) interface
@@ -30,17 +30,18 @@ to work with the Dialog's
[data option](https://material.angular.io/components/dialog/overview#sharing-data-with-the-dialog-component-):
```ts
interface ContentNodeSelectorComponentData {
export interface ContentNodeSelectorComponentData {
title: string;
actionName?: string;
currentFolderId: string;
dropdownHideMyFiles?: boolean;
dropdownSiteList?: SitePaging;
rowFilter?: RowFilter;
imageResolver?: ImageResolver;
isSelectionValid?: (entry: MinimalNodeEntryEntity) => boolean;
rowFilter?: any;
imageResolver?: any;
isSelectionValid?: (entry: Node) => boolean;
breadcrumbTransform?: (node) => any;
select: EventEmitter<MinimalNodeEntryEntity[]>;
excludeSiteContent?: string[];
select: Subject<Node[]>;
}
```
@@ -50,7 +51,7 @@ The properties are described in the table below:
| ---- | ---- | ------------- | ----------- |
| title | `string` | "" | Dialog title |
| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) |
| currentFolderId | `string` | `null` | Node ID of the folder currently listed. |
| currentFolderId | `string` | `null` | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) ID of the folder currently listed. |
| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| rowFilter | [`RowFilter`](../../lib/content-services/document-list/data/row-filter.model.ts) | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
@@ -58,7 +59,7 @@ The properties are described in the table below:
| pageSize | `number` | | Number of items shown per page in the list. |
| isSelectionValid | [`ValidationFunction`](../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| select | [`EventEmitter<MinimalNodeEntryEntity[]>`](../content-services/document-library.model.md) | | Event emitted with the current node selection when the dialog closes |
| select | [`Subject<Node>`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | Event emitted with the current node selection when the dialog closes |
If you don't want to manage the dialog yourself then it is easier to use the
[Content Node Selector Panel component](content-node-selector-panel.component.md), or the
@@ -80,7 +81,7 @@ openSelectorDialog() {
title: "Choose an item",
actionName: "Choose",
currentFolderId: someFolderId,
select: new Subject<MinimalNodeEntryEntity[]>()
select: new Subject<Node[]>()
};
this.dialog.open(
@@ -91,7 +92,7 @@ openSelectorDialog() {
}
);
data.select.subscribe((selections: MinimalNodeEntryEntity[]) => {
data.select.subscribe((selections: Node[]) => {
// Use or store selection...
},
(error)=>{
@@ -109,7 +110,7 @@ When the dialog action is selected by clicking, the `data.select` stream will be
### RowFilter and ImageResolver
The Content Node Selector uses a [Document List](document-list.component.md) to display the
The Content [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) Selector uses a [Document List](document-list.component.md) to display the
items that the user can choose. As with the standard Document List, you can supply a custom
**row filter** function (to hide items that can't be chosen) and a custom **image resolver**
function (to select an image to show in a particular list cell). For example, you could use
@@ -120,7 +121,7 @@ section of the Document List page to learn how these functions are implemented.
### Using the breadcrumbTransform function
The `breadcrumbTransform` property of [`ContentNodeSelectorComponentData`](../../lib/content-services/content-node-selector/content-node-selector.component-data.interface.ts) lets you modify
the Node object that is used to generate the
the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) object that is used to generate the
list of breadcrumbs. You can use this, for example, to remove path elements that are not
relevant to the use case. See the [Breadcrumb component](breadcrumb.component.md) page for an
example of how to use this function.

View File

@@ -1,121 +0,0 @@
---
Title: Document Library model
Added: v2.0.0
Status: Active
---
# [Document Library model](../../lib/content-services/document-list/models/document-library.model.ts "Defined in document-library.model.ts")
Defines classes for use with the Content Services node API.
## Details
ADF provides several services that give higher-level access to
underlying [Alfresco JS Api](../core/alfresco-api.service.md) functionality.
The classes defined below are used in some of these services to access
the Content Services nodes API. You can use these services to access
the nodes (ie, documents and folders) of a repository using their
associated ID strings. See [Nodes Api service](../core/nodes-api.service.md)
for more detail about the usage of these classes.
## Node information
These classes contain basic information about nodes (see
[Item information](#item-information) below for more detail
about some of the properties). For example, this is used by the
[Document List component](document-list.component.md) to supply
a [data context](document-list.component.md#underlying-node-object)
for each row of the list. The [Nodes Api service](../core/nodes-api.service.md)
has methods for getting the full information for a node ID string.
```ts
class NodeMinimalEntry implements MinimalNodeEntity {
entry: NodeMinimal;
}
class NodeMinimal implements MinimalNodeEntryEntity {
id: string;
parentId: string;
name: string;
nodeType: string;
isFolder: boolean;
isFile: boolean;
modifiedAt: Date;
modifiedByUser: UserInfo;
createdAt: Date;
createdByUser: UserInfo;
content: ContentInfo;
path: PathInfoEntity;
properties: NodeProperties = {};
}
interface NodeProperties {
[key: string]: any;
}
```
## Paging
These classes are used to handle a list of nodes, such as the
contents of a folder node. For example, the `node` property of
the [Document List component](document-list.component.md) contains
the node whose contents are currently shown in the document list.
```ts
class NodePaging {
list: NodePagingList;
}
class NodePagingList {
pagination: Pagination;
entries: NodeMinimalEntry[];
}
class Pagination {
count: number;
hasMoreItems: boolean;
totalItems: number;
skipCount: number;
maxItems: number;
}
```
## Item information
These classes hold information about specific items related to
a node.
```ts
class UserInfo {
displayName: string;
id: string;
}
class ContentInfo {
mimeType: string;
mimeTypeName: string;
sizeInBytes: number;
encoding: string;
}
class PathInfoEntity {
elements: PathElementEntity[];
isComplete: boolean;
name: string;
}
class PathElementEntity {
id: string;
name: string;
}
```
<!-- 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)
- [Nodes api service](../core/nodes-api.service.md)
<!-- seealso end -->

View File

@@ -121,7 +121,7 @@ have at least the following properties as part of the `Event.detail` property va
```ts
{
sender: DocumentListComponent,
node: MinimalNodeEntity
node: NodeEntry
}
```
@@ -202,7 +202,7 @@ You can use any of the following options to set the folder that the Document Lis
#### Node ID
The unique identifier of the Node. Gets automatically updated when you perform navigation to other folders.
The unique identifier of the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md). Gets automatically updated when you perform navigation to other folders.
#### Repository aliases
@@ -475,7 +475,7 @@ documentation for a full explanation of the component lifecycle.
### Underlying node object
The [Document List component](../content-services/document-list.component.md) assigns an instance of
[MinimalNode](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md)
[`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md)
(defined in the [Alfresco JS API](https://github.com/Alfresco/alfresco-js-api)) as the data context
for each row. You can make use of the properties of this object when defining custom columns:
@@ -870,7 +870,6 @@ This will give the following output:
- [Infinite pagination component](../core/infinite-pagination.component.md)
- [Sites dropdown component](sites-dropdown.component.md)
- [Metadata indicators](../user-guide/metadata-indicators.md)
- [Document library model](document-library.model.md)
- [Nodes api service](../core/nodes-api.service.md)
- [Breadcrumb component](breadcrumb.component.md)
- [Content action component](content-action.component.md)

View File

@@ -27,7 +27,7 @@ Implements node operations used by the [Document List component](../content-serv
- **Returns** `string` - Path to the icon file
- **getDocumentThumbnailUrl**(node: [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)): `string`<br/>
Get thumbnail URL for the given document node.
- _node:_ [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md) - Node to get URL for.
- _node:_ [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md) - [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) to get URL for.
- **Returns** `string` - Thumbnail URL string
- **getFolder**(folder: `string`, opts?: `any`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets the folder node with the specified relative name path below the root node.
@@ -62,9 +62,6 @@ see the
[Nodes API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodesApi.md#getNodeChildren)
for further details of the types, options and the underlying REST architecture.
Also, the [Document Library model](document-library.model.md) in the ADF docs has
more information about related classes.
### Moving, copying and deleting nodes
Both `moveNode` and `copyNode` create a copy of the existing node under a new

View File

@@ -2,7 +2,7 @@
Title: Dropdown Breadcrumb Component
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
Last reviewed: 2019-01-16
---
# [Dropdown Breadcrumb Component](../../lib/content-services/breadcrumb/dropdown-breadcrumb.component.ts "Defined in dropdown-breadcrumb.component.ts")
@@ -26,7 +26,7 @@ Indicates the current position within a navigation hierarchy using a dropdown me
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| folderNode | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | null | Active node, builds UI based on folderNode.path.elements collection. |
| folderNode | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | null | Active node, builds UI based on folderNode.path.elements collection. |
| maxItems | `number` | | Maximum number of nodes to display before wrapping them with a dropdown element. |
| root | `string` | null | (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 an i18n resource key for the property value. |
| rootId | `string` | null | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
@@ -37,7 +37,7 @@ Indicates the current position within a navigation hierarchy using a dropdown me
| Name | Type | Description |
| ---- | ---- | ----------- |
| 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. |
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the user clicks on a breadcrumb. |
## Details

View File

@@ -2,7 +2,7 @@
Title: Folder Create directive
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-20
Last reviewed: 2019-01-16
---
# [Folder Create directive](../../lib/content-services/folder-directive/folder-create.directive.ts "Defined in folder-create.directive.ts")
@@ -41,7 +41,7 @@ Creates folders.
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the folder is created successfully. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` | Emitted when the folder is created successfully. |
## Details

View File

@@ -2,7 +2,7 @@
Title: Folder Edit directive
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-10
Last reviewed: 2019-01-16
---
# [Folder Edit directive](../../lib/content-services/folder-directive/folder-edit.directive.ts "Defined in folder-edit.directive.ts")
@@ -32,7 +32,7 @@ Allows folders to be edited.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| folder | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Folder node to edit. |
| folder | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | Folder node to edit. |
| title | `string` | null | Title of folder edit dialog. |
### Events
@@ -40,7 +40,7 @@ Allows folders to be edited.
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the folder has been edited successfully. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` | Emitted when the folder has been edited successfully. |
## Details

View File

@@ -2,7 +2,7 @@
Title: Inherit Permission directive
Added: v2.3.0
Status: Active
Last reviewed: 2018-11-20
Last reviewed: 2019-01-16
---
# [Inherit Permission directive](../../lib/content-services/permission-manager/components/inherited-button.directive.ts "Defined in inherited-button.directive.ts")
@@ -31,7 +31,7 @@ Update the current node by adding/removing the inherited permissions.
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| updated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the node is updated. |
| updated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` | Emitted when the node is updated. |
## Details

View File

@@ -2,12 +2,12 @@
Title: Node Lock directive
Added: v2.2.0
Status: Active
Last reviewed: 2018-11-20
Last reviewed: 2019-01-17
---
# [Node Lock directive](../../lib/content-services/directives/node-lock.directive.ts "Defined in node-lock.directive.ts")
Locks a node.
Locks or unlocks a node.
## Basic Usage
@@ -23,7 +23,7 @@ Locks a node.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Node to lock/unlock. |
| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) to lock/unlock. |
## Details

View File

@@ -2,7 +2,7 @@
Title: Node permission dialog service
Added: v2.4.0
Status: Active
Last reviewed: 2018-09-13
Last reviewed: 2019-01-16
---
# [Node permission dialog service](../../lib/content-services/permission-manager/services/node-permission-dialog.service.ts "Defined in node-permission-dialog.service.ts")
@@ -15,16 +15,16 @@ Displays dialogs to let the user set node permissions.
- **close**()<br/>
Closes the currently-open dialog.
- **openAddPermissionDialog**(node: `Node`, title?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntity`](../content-services/document-library.model.md)`[]>`<br/>
- **openAddPermissionDialog**(node: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md), title?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]>`<br/>
Opens a dialog to add permissions to a node.
- _node:_ `Node` - ID of the target node
- _node:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - ID of the target node
- _title:_ `string` - (Optional) Dialog title
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntity`](../content-services/document-library.model.md)`[]>` - Node with updated permissions
- **updateNodePermissionByDialog**(nodeId?: `string`, title?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]>` - Node with updated permissions
- **updateNodePermissionByDialog**(nodeId?: `string`, title?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>`<br/>
Opens a dialog to update permissions for a node.
- _nodeId:_ `string` - (Optional) ID of the target node
- _title:_ `string` - (Optional) Dialog title
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with updated permissions
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` - Node with updated permissions
## Details

View File

@@ -2,7 +2,7 @@
Title: Node Permission service
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-14
Last reviewed: 2019-01-16
---
# [Node Permission service](../../lib/content-services/permission-manager/services/node-permission.service.ts "Defined in node-permission.service.ts")
@@ -13,36 +13,36 @@ Manages role permissions for content nodes.
### Methods
- **getGroupMemberByGroupName**(groupName: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<GroupMemberPaging>`<br/>
- **getGroupMemberByGroupName**(groupName: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`GroupMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/GroupMemberPaging.md)`>`<br/>
Gets all members related to a group name.
- _groupName:_ `string` - Name of group to look for members
- _opts:_ `any` - (Optional) Extra options supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<GroupMemberPaging>` - List of members
- **getNodeRoles**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`GroupMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/GroupMemberPaging.md)`>` - List of members
- **getNodeRoles**(node: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>`<br/>
Gets a list of roles for the current node.
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - The target node
- _node:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - The target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>` - Array of strings representing the roles
- **removePermission**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md), permissionToRemove: `PermissionElement`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- **removePermission**(node: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md), permissionToRemove: `PermissionElement`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>`<br/>
Removes a permission setting from a node.
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - ID of the target node
- _node:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - ID of the target node
- _permissionToRemove:_ `PermissionElement` - Permission setting to remove
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with modified permissions
- **updateLocallySetPermissions**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md), nodes: [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]`, nodeRole: `string[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` - Node with modified permissions
- **updateLocallySetPermissions**(node: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md), nodes: [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]`, nodeRole: `string[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>`<br/>
Updates the locally set permissions for a node.
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - ID of the target node
- _nodes:_ [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` - Permission settings
- _node:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - ID of the target node
- _nodes:_ [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]` - Permission settings
- _nodeRole:_ `string[]` - Permission role
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with updated permissions
- **updateNodePermissions**(nodeId: `string`, permissionList: [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` - Node with updated permissions
- **updateNodePermissions**(nodeId: `string`, permissionList: [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>`<br/>
Update permissions for a node.
- _nodeId:_ `string` - ID of the target node
- _permissionList:_ [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` - New permission settings
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with updated permissions
- **updatePermissionRole**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md), updatedPermissionRole: `PermissionElement`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- _permissionList:_ [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]` - New permission settings
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` - Node with updated permissions
- **updatePermissionRole**(node: [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md), updatedPermissionRole: `PermissionElement`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>`<br/>
Updates the permission role for a node.
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Target node
- _node:_ [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) - Target node
- _updatedPermissionRole:_ `PermissionElement` - Permission role to update or add
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with updated permission
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` - Node with updated permission
## Details

View File

@@ -37,7 +37,7 @@ to enrich the features and decrease the restrictions currently applied to node v
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| multipleFiles | `boolean` | false | Allows/disallows multiple files |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | (**Required**) The node to be versioned. |
| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | (**Required**) The node to be versioned. |
| nodeType | `string` | "cm:content" | Custom node type for uploaded file |
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| staticTitle | `string` | | Defines the text of the upload button. |
@@ -49,8 +49,7 @@ to enrich the features and decrease the restrictions currently applied to node v
| Name | Type | Description |
| ---- | ---- | ----------- |
| beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | |
| createFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a folder is created. |
| beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | Emitted when the upload begins. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs. |
| permissionEvent | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PermissionModel`](../../lib/content-services/document-list/models/permissions.model.ts)`>` | Emitted when create permission is missing. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the file is uploaded successfully. |

View File

@@ -2,7 +2,7 @@
Title: Version Manager Component
Added: v2.0.0
Status: Experimental
Last reviewed: 2018-04-13
Last reviewed: 2019-01-16
---
# [Version Manager Component](../../lib/content-services/version-manager/version-manager.component.ts "Defined in version-manager.component.ts")
@@ -17,7 +17,7 @@ Displays the version history of a node with the ability to upload a new version.
```html
<adf-version-manager
[node]="aMinimalNodeEntryEntity"
[node]="aNode"
(uploadSuccess)="customMethod($event)"
(uploadError)="customMethod2($event)">
</adf-version-manager>
@@ -30,15 +30,15 @@ Displays the version history of a node with the ability to upload a new version.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Target node to manage version history. |
| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | Target node to manage version history. |
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| uploadError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when an error occurs during upload. |
| uploadSuccess | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when a file is uploaded successfully. |
| uploadError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` | Emitted when an error occurs during upload. |
| uploadSuccess | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md)`>` | Emitted when a file is uploaded successfully. |
## Details