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

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

* [ADF-2847] Updated all prop/method tables in content services
This commit is contained in:
Andy Stark 2018-04-26 14:54:25 +01:00 committed by Eugenio Romano
parent 616036f9e7
commit 2c0e7aa035
40 changed files with 541 additions and 405 deletions

View File

@ -19,21 +19,23 @@ Indicates the current position within a navigation hierarchy.
</adf-breadcrumb> </adf-breadcrumb>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| folderNode | `MinimalNodeEntryEntity` | `null` | Active node, builds UI based on folderNode.path.elements collection. | | folderNode | `MinimalNodeEntryEntity` | null | Active node, builds UI based on folderNode.path.elements collection. |
| 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. | | 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. | | 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. |
| target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. | | target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. |
| transform | `(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. | | transform | `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. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. | | navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
## Details ## Details

View File

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

View File

@ -24,13 +24,14 @@ Displays and edits metadata related to a node.
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default value | Description |
| --- | --- | --- | --- | | -- | -- | -- | -- |
| node | MinimalNodeEntryEntity | - | (**required**) The node entity to fetch metadata about | | displayEmpty | `boolean` | false | |
| displayEmpty | boolean | false | Toggles whether to display empty values in the card view | | editable | `boolean` | false | |
| readOnly | boolean | true | Toggles whether the edit button should be shown | | expanded | `boolean` | false | |
| multi | boolean | false | The multi parameter of the underlying material expansion panel | | multi | `boolean` | false | |
| preset | string | "*" | Name of the metadata preset, which defines aspects and their properties | | node | `MinimalNodeEntryEntity` | | |
| preset | `string` | | |
## Details ## Details
@ -44,7 +45,7 @@ properties.
### Application config presets ### Application config presets
You can define different presets for the metadata component or override the default presets in You can define different presets for the metadata component or override the default presets in
the `app.config.json` file. The **default** preset is "*" if not set, meaning the component the `app.config.json` file. The **default** preset is "\*" if not set, meaning the component
will display every aspect and property of a node without filtering. will display every aspect and property of a node without filtering.
You can define as many extra presets as you need for your components. You can define as many extra presets as you need for your components.
@ -89,7 +90,7 @@ just the `exif:exif` and `custom:aspect` aspects are whitelisted:
``` ```
You can further restrict the whitelist to specific properties of one or more aspects by using You can further restrict the whitelist to specific properties of one or more aspects by using
an array of property names in place of the "*" filter: an array of property names in place of the "\*" filter:
```json ```json
... ...
@ -190,24 +191,25 @@ A more complex config is shown in the example below:
] ]
} }
``` ```
The result of this config would be two accordion groups with the following properties: The result of this config would be two accordion groups with the following properties:
|GROUP-TITLE1-TRANSLATION-KEY| | GROUP-TITLE1-TRANSLATION-KEY |
|---| | ---------------------------- |
|exif:param1| | exif:param1 |
|exif:param2| | exif:param2 |
|...| | ... |
|exif:paramN| | exif:paramN |
|kitten:custom1| | kitten:custom1 |
|kitten:custom3| | kitten:custom3 |
|owner:name| | owner:name |
|kitten:name| | kitten:name |
|kitten:color| | kitten:color |
|GROUP-TITLE2-TRANSLATION-KEY| | GROUP-TITLE2-TRANSLATION-KEY |
|---| | ---------------------------- |
|kitten:favourite-food| | kitten:favourite-food |
|kitten:recommended-food| | kitten:recommended-food |
## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect ## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect

View File

@ -8,43 +8,57 @@ Last reviewed: 2018-03-13
Displays and manages dialogs for selecting content to open, copy or upload. Displays and manages dialogs for selecting content to open, copy or upload.
## Methods ## Class members
- `openLockNodeDialog(nodeEntry: MinimalNodeEntryEntity): Observable<string>` ### Methods
Opens a dialog to lock or unlock file
- `nodeEntry` - Item to lock or unlock.
- `openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>`
Opens a file browser at a chosen folder location.
- `folderNodeId` - ID of the folder to use
- `openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`
Opens a file browser at a chosen site location.
- `openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>` - `close()`<br/>
Opens a folder browser at a chosen site location. Closes the currently open dialog.
- `openFolderBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>` - `getTitleTranslation(action: string = null, name: string = null): string`<br/>
Opens a folder browser at a chosen folder location.
- `folderNodeId` - ID of the folder to use
- `openCopyMoveDialog(action: string, contentEntry: MinimalNodeEntryEntity, permission?: string): Observable<MinimalNodeEntryEntity[]>`
Opens a dialog to copy or move an item to a new location.
- `action` - Name of the action (eg, "Copy" or "Move") to show in the title
- `contentEntry` - Item to be copied or moved
- `permission` - (Optional) Permission for the operation
- `getTitleTranslation(action: string, name: string): string`
Gets the translation of the dialog title.
- `action` - Name of the action to display in the dialog title
- `name` - Name of the item on which the action is being performed
- `openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]>`
Opens a dialog to choose a folder to upload.
- `action` - Name of the action to show in the title
- `contentEntry` - Item to upload
- `openUploadFileDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]>`
Opens a dialog to choose a file to upload.
- `action` - Name of the action to show in the title
- `contentEntry` - Item to upload
- `close()`
Closes the currently open dialog.
- `action: string = null` -
- `name: string = null` - Name of the item on which the action is being performed
- **Returns** `string` -
- `openCopyMoveDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null, permission?: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `action: string = null` -
- `contentEntry: MinimalNodeEntryEntity = null` -
- `permission?: string = null` - (Optional) Permission for the operation
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- `openFileBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `folderNodeId: string = null` - ID of the folder to use
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- `openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`<br/>
Opens a file browser at a chosen site location.
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- `openFolderBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `folderNodeId: string = null` - ID of the folder to use
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- `openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`<br/>
Opens a folder browser at a chosen site location.
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- `openLockNodeDialog(contentEntry: MinimalNodeEntryEntity = null): Subject<string>`<br/>
Opens a lock node dialog
- `contentEntry: MinimalNodeEntryEntity = null` - Node to lock
- **Returns** `Subject<string>` -
- `openUploadFileDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `action: string = null` -
- `contentEntry: MinimalNodeEntryEntity = null` - Item to upload
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- `openUploadFolderDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `action: string = null` -
- `contentEntry: MinimalNodeEntryEntity = null` - Item to upload
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
## Details ## Details

View File

@ -23,24 +23,26 @@ Opens a Content Node Selector in its own dialog window.
</adf-content-node-selector-panel> </adf-content-node-selector-panel>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| currentFolderId | `string` | `null` | Node ID of the folder currently listed. | | 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. |
| 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. | | currentFolderId | `string` | null | Node ID of the folder currently listed. |
| dropdownSiteList | `SitePaging` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | | 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. |
| rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. | | dropdownSiteList | `SitePaging` | null | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. | | imageResolver | `ImageResolver` | null | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| pageSize | `number` | | Number of items shown per page in the list. | | 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. |
| 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. |
| 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. | | rowFilter | `RowFilter` | null | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| select | `EventEmitter<MinimalNodeEntryEntity[]>` | Emitted when the user has chosen an item. | | select | `EventEmitter<MinimalNodeEntryEntity[]>` | Emitted when the user has chosen an item. |
## Details ## Details

View File

@ -10,19 +10,34 @@ Allows a user to select items from a Content Services repository.
![Content Node Selector screenshot](../docassets/images/ContentNodeSelector.png) ![Content Node Selector screenshot](../docassets/images/ContentNodeSelector.png)
## Contents
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [Showing the dialog](#showing-the-dialog)
- [Usage example](#usage-example)
- [RowFilter and ImageResolver](#rowfilter-and-imageresolver)
- [Using the breadcrumbTransform function](#using-the-breadcrumbtransform-function)
- [See also](#see-also)
## Class members ## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| currentFolderId | `string` | null | Deprecated: in 2.1.0 | | currentFolderId | `string` | null | **Deprecated:** in 2.1.0 |
| dropdownHideMyFiles | `boolean` | false | Deprecated: in 2.1.0 | | dropdownHideMyFiles | `boolean` | false | **Deprecated:** in 2.1.0 |
| dropdownSiteList | `SitePaging` | null | Deprecated: in 2.1.0 | | dropdownSiteList | `SitePaging` | null | **Deprecated:** in 2.1.0 |
| imageResolver | `ImageResolver` | null | Deprecated: in 2.1.0 | | imageResolver | `ImageResolver` | null | **Deprecated:** in 2.1.0 |
| pageSize | `number` | | Deprecated: in 2.1.0 | | pageSize | `number` | | **Deprecated:** in 2.1.0 |
| rowFilter | `RowFilter` | null | Deprecated: in 2.1.0 | | rowFilter | `RowFilter` | null | **Deprecated:** in 2.1.0 |
| title | `string` | null | Deprecated: in 2.1.0 | | title | `string` | null | **Deprecated:** in 2.1.0 |
## Details ## Details
@ -61,17 +76,17 @@ The properties are described in the table below:
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| title | `string`| "" | Dialog title | | title | `string` | "" | Dialog title |
| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) | | 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 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. | | 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` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | | dropdownSiteList | `SitePaging` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. | | rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. | | imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| pageSize | `number` | | Number of items shown per page in the list. | | pageSize | `number` | | Number of items shown per page in the list. |
| 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. | | 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. |
| 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. | | 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[]>` | | Event emitted with the current node selection when the dialog closes | | select | `EventEmitter<MinimalNodeEntryEntity[]>` | | 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 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 [Content Node Selector Panel component](content-node-selector-panel.component.md), or the

View File

@ -12,49 +12,57 @@ Manages Document List information that is specific to a user.
### Methods ### Methods
- `getRecentFiles(personId: string, pagination: PaginationModel): Observable<NodePaging>`<br/> - `getCorrespondingNodeIds(nodeId: string = null, pagination: PaginationModel = null): Observable<string[]>`<br/>
Gets files recently accessed by a user.
- `personId: string` - ID of the user - `nodeId: string = null` -
- `pagination: PaginationModel` - Specifies how to paginate the results - `pagination: PaginationModel = null` -
- **Returns** `Observable<NodePaging>` - List of nodes for the recently used files - **Returns** `Observable<string[]>` -
- `loadFavorites(pagination: PaginationModel, includeFields: string[] = []): Observable<NodePaging>`<br/>
Gets favorite files for the current user. - `getRecentFiles(personId: string = null, pagination: PaginationModel = null): Observable<NodePaging>`<br/>
- `pagination: PaginationModel` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results - `personId: string = null` -
- **Returns** `Observable<NodePaging>` - List of favorite files - `pagination: PaginationModel = null` -
- `loadMemberSites(pagination: PaginationModel): Observable<NodePaging>`<br/> - **Returns** `Observable<NodePaging>` -
Gets sites that the current user is a member of.
- `pagination: PaginationModel` - Specifies how to paginate the results - `isCustomSource(folderId: string = null): boolean`<br/>
- **Returns** `Observable<NodePaging>` - List of sites
- `loadSites(pagination: PaginationModel): Observable<NodePaging>`<br/> - `folderId: string = null` -
Gets all sites in the respository. - **Returns** `boolean` -
- `pagination: PaginationModel` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of sites - `loadFavorites(pagination: PaginationModel = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
- `loadTrashcan(pagination: PaginationModel, includeFields: string[] = []): Observable<DeletedNodesPaging>`<br/>
Gets all items currently in the trash. - `pagination: PaginationModel = null` -
- `pagination: PaginationModel` - Specifies how to paginate the results - `includeFields: string[] = []` -
- `includeFields: string[] = []` - List of data field names to include in the results - **Returns** `Observable<NodePaging>` -
- **Returns** `Observable<DeletedNodesPaging>` - List of deleted items
- `loadSharedLinks(pagination: PaginationModel, includeFields: string[] = []): Observable<NodePaging>`<br/> - `loadFolderByNodeId(nodeId: string = null, pagination: PaginationModel = null, includeFields: string[] = null): Observable<NodePaging>`<br/>
Gets shared links for the current user.
- `pagination: PaginationModel` - Specifies how to paginate the results - `nodeId: string = null` -
- `includeFields: string[] = []` - List of data field names to include in the results - `pagination: PaginationModel = null` -
- **Returns** `Observable<NodePaging>` - List of shared links - `includeFields: string[] = null` -
- `isCustomSource(folderId: string): boolean`<br/> - **Returns** `Observable<NodePaging>` -
Is the folder ID one of the well-known aliases?
- `FolderId` - Folder ID name to check - `loadMemberSites(pagination: PaginationModel = null): Observable<NodePaging>`<br/>
- **Returns** `Observable<NodePaging>` - True if the ID is a well-known name, false otherwise
- `loadFolderByNodeId(nodeId: string, pagination: PaginationModel, includeFields: string[]): Observable<NodePaging>`<br/> - `pagination: PaginationModel = null` -
Gets a folder's contents. - **Returns** `Observable<NodePaging>` -
- `nodeId: string` - ID of the target folder node
- `pagination: PaginationModel` - Specifies how to paginate the results - `loadSharedLinks(pagination: PaginationModel = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of items contained in the folder - `pagination: PaginationModel = null` -
- `getCorrespondingNodeIds(nodeId: string, pagination: PaginationModel): Observable<string[]>`<br/> - `includeFields: string[] = []` -
Gets the contents of one of the well-known aliases in the form of node ID strings. - **Returns** `Observable<NodePaging>` -
- `nodeId: string` - ID of the target folder node
- `pagination: PaginationModel` - Specifies how to paginate the results - `loadSites(pagination: PaginationModel = null): Observable<NodePaging>`<br/>
- **Returns** `Observable<string[]>` - List of node IDs
- `pagination: PaginationModel = null` -
- **Returns** `Observable<NodePaging>` -
- `loadTrashcan(pagination: PaginationModel = null, includeFields: string[] = []): Observable<DeletedNodesPaging>`<br/>
- `pagination: PaginationModel = null` -
- `includeFields: string[] = []` -
- **Returns** `Observable<DeletedNodesPaging>` -
## Details ## Details

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Document Library model # Document Library model
Defines classes for use with the Content Services node API. Defines classes for use with the Content Services node API.
@ -109,9 +110,11 @@ class PathElementEntity {
``` ```
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js --> <!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start --> <!-- seealso start -->
## See also ## See also
- [Document list component](document-list.component.md) - [Document list component](document-list.component.md)
- [Nodes api service](../core/nodes-api.service.md) - [Nodes api service](../core/nodes-api.service.md)
<!-- seealso end --> <!-- seealso end -->

View File

@ -14,12 +14,15 @@ Displays the documents from a repository.
- [Basic Usage](#basic-usage) - [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties) - [Properties](#properties)
- [Events](#events) - [Events](#events)
- [Details](#details) - [Details](#details)
- [DOM Events](#dom-events) - [DOM Events](#dom-events)
- [Conditional visibility](#conditional-visibility)
- [Card view](#card-view) - [Card view](#card-view)
- [Pagination strategy](#pagination-strategy) - [Pagination strategy](#pagination-strategy)
- [Data Sources](#data-sources) - [Data Sources](#data-sources)
@ -52,48 +55,50 @@ Displays the documents from a repository.
</adf-document-list> </adf-document-list>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| display | `string` | `DisplayMode.List` | Change the display mode of the table. Can be "list" or "gallery". | | allowDropFiles | `boolean` | false | Toggle file drop support for rows (see Upload Directive for further details |
| permissionsStyle | `PermissionStyleModel[]` | `[]` | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the Permission Style model page for further details and examples. | | contentActions | `boolean` | false | Toggles content actions for each row |
| locationFormat | `string` | `'/'` | The default route for all the location-based columns (if declared). | | contentActionsPosition | `string` | "right" | Position of the content actions dropdown menu. Can be set to "left" or "right". |
| navigate | `boolean` | `true` | Toggles navigation to folder content or file preview | | contextMenuActions | `boolean` | false | Toggles context menus for each row |
| showHeader | `boolean` | `true` | Toggles the header | | currentFolderId | `string` | null | The ID of the folder node to display or a reserved string alias for special sources |
| navigationMode | `string` | See description | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". Default value: "dblclick" | | display | `string` | DisplayMode.List | Change the display mode of the table. Can be "list" or "gallery". |
| thumbnails | `boolean` | `false` | Show document thumbnails rather than icons | | emptyFolderImageUrl | `string` | "./assets/images/empty_doc_lib.svg" | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
| selectionMode | `string` | `'single'` | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. | | enableInfiniteScrolling | `boolean` | false | Set document list to work in infinite scrolling mode |
| multiselect | `boolean` | `false` | Toggles multiselect mode | | folderNode | `MinimalNodeEntryEntity` | null | Currently displayed folder node |
| contentActions | `boolean` | `false` | Toggles content actions for each row | | imageResolver | `any | null` | null | Custom image resolver |
| contentActionsPosition | `string` | `'right'` | Position of the content actions dropdown menu. Can be set to "left" or "right". | | includeFields | `string[]` | | Include additional information about the node in the server request.for example: association, isLink, isLocked and others. |
| contextMenuActions | `boolean` | `false` | Toggles context menus for each row | | loading | `boolean` | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
| emptyFolderImageUrl | `string` | See description | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' | | locationFormat | `string` | "/" | The default route for all the location-based columns (if declared). |
| allowDropFiles | `boolean` | `false` | Toggle file drop support for rows (see Upload Directive for further details | | maxItems | `number` | | Default value is stored into user preference settings use it only if you are not using the pagination |
| sorting | `string[]` | | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. | | multiselect | `boolean` | false | Toggles multiselect mode |
| navigate | `boolean` | true | Toggles navigation to folder content or file preview |
| navigationMode | `string` | DocumentListComponent.DOUBLE_CLICK_NAVIGATION | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". Default value: "dblclick" |
| node | `NodePaging` | null | The Document list will show all the nodes contained in the NodePaging entity |
| permissionsStyle | `PermissionStyleModel[]` | \[] | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the Permission Style model page for further details and examples. |
| rowFilter | `any | null` | null | Custom row filter |
| rowStyle | `string` | | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. | | rowStyle | `string` | | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. |
| rowStyleClass | `string` | | The CSS class to apply to every row | | rowStyleClass | `string` | | The CSS class to apply to every row |
| loading | `boolean` | `false` | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. | | selectionMode | `string` | "single" | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| rowFilter | `any` | `null` | Custom row filter | | showHeader | `boolean` | true | Toggles the header |
| imageResolver | `any` | `null` | Custom image resolver | | skipCount | `number` | 0 | Number of elements to skip over for pagination purposes |
| currentFolderId | `string` | `null` | The ID of the folder node to display or a reserved string alias for special sources | | sorting | `string[]` | | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. |
| folderNode | `MinimalNodeEntryEntity` | `null` | Currently displayed folder node | | thumbnails | `boolean` | false | Show document thumbnails rather than icons |
| node | `NodePaging` | `null` | The Document list will show all the nodes contained in the NodePaging entity |
| maxItems | `number` | | Default value is stored into user preference settings |
| skipCount | `number` | `0` | Number of elements to skip over for pagination purposes |
| enableInfiniteScrolling | `boolean` | `false` | Set document list to work in infinite scrolling mode |
| includeFields | `string[]` | `[]` | Include additional information about the node in the server request.for example: association, isLink, isLocked and others. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| nodeClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user clicks a list node | | error | `EventEmitter<any>` | Emitted when the API fails to get the Document List data |
| nodeDblClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user double-clicks a list node | | folderChange | `EventEmitter<NodeEntryEvent>` | Emitted when the current display folder changes |
| folderChange | `EventEmitter<NodeEntryEvent>` | Emitted when the current display folder changes | | nodeClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user clicks a list node |
| nodeDblClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user double-clicks a list node |
| preview | `EventEmitter<NodeEntityEvent>` | Emitted when the user acts upon files with either single or double click (depends on `navigation-mode`). Useful for integration with the Viewer component. | | preview | `EventEmitter<NodeEntityEvent>` | Emitted when the user acts upon files with either single or double click (depends on `navigation-mode`). Useful for integration with the Viewer component. |
| ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use | | ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use |
| error | `EventEmitter<any>` | Emitted when the API fails to get the Document List data |
## Details ## Details
@ -104,7 +109,7 @@ best.
### DOM Events ### DOM Events
Below are the DOM events the DocumentList component emits. Below are the DOM events the DocumentList component emits.
All of them are *bubbling*, meaning you can handle them in any component up the parent hierarchy, even if the DocumentList is wrapped by one or more other components. All of them are _bubbling_, meaning you can handle them in any component up the parent hierarchy, even if the DocumentList is wrapped by one or more other components.
| Name | Description | | Name | Description |
| ---- | ----------- | | ---- | ----------- |
@ -169,16 +174,14 @@ Set the `[display]` property to "gallery" to enable card view mode:
</adf-document-list> </adf-document-list>
``` ```
### Pagination strategy ### Pagination strategy
The Document List by default supports 2 types of pagination: **finite** and **infinite**: The Document List by default supports 2 types of pagination: **finite** and **infinite**:
- With **finite** pagination, the Document List needs 2 parameters: `maxItems` and `skipCount`. These set the maximum number of items shown in a single page and the start - With **finite** pagination, the Document List needs 2 parameters: `maxItems` and `skipCount`. These set the maximum number of items shown in a single page and the start
offset of the first item in the page (ie, the number of items you need to skip to get there). offset of the first item in the page (ie, the number of items you need to skip to get there).
- You can enable **infinite** pagination by setting the same parameters plus an extra third - You can enable **infinite** pagination by setting the same parameters plus an extra third
parameter: `enableInfiniteScrolling`. parameter: `enableInfiniteScrolling`.
### Data Sources ### Data Sources
@ -453,7 +456,7 @@ documentation for a full explanation of the component lifecycle.
### Underlying node object ### Underlying node object
The Document List component assigns an instance of The Document List component 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/MinimalNode.md>]
(defined in the [Alfresco JS API](https://github.com/Alfresco/alfresco-js-api)) as the data context (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: for each row. You can make use of the properties of this object when defining custom columns:

View File

@ -12,11 +12,11 @@ Implements node operations used by the Document List component.
### Methods ### Methods
- `copyNode(nodeId: string = null, targetParentId: string = null): any`<br/> - `copyNode(nodeId: string = null, targetParentId: string = null): Observable<any>`<br/>
Copy a node to destination node Copy a node to destination node
- `nodeId: string = null` - The id of the node to be copied - `nodeId: string = null` - The id of the node to be copied
- `targetParentId: string = null` - The id of the folder where the node will be copied - `targetParentId: string = null` - The id of the folder where the node will be copied
- **Returns** `any` - NodeEntry for the copied node - **Returns** `Observable<any>` - NodeEntry for the copied node
- `createFolder(name: string = null, parentId: string = null): Observable<MinimalNodeEntity>`<br/> - `createFolder(name: string = null, parentId: string = null): Observable<MinimalNodeEntity>`<br/>
Create a new folder in the path. Create a new folder in the path.
- `name: string = null` - Folder name - `name: string = null` - Folder name
@ -39,25 +39,32 @@ Implements node operations used by the Document List component.
- `opts?: any = null` - (Optional) Options. - `opts?: any = null` - (Optional) Options.
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association") - `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** `Observable<NodePaging>` - Details of the folder - **Returns** `Observable<NodePaging>` - Details of the folder
- `getFolderNode(nodeId: string = null, includeFields: string[] = []): Promise<MinimalNodeEntryEntity>`<br/> - `getFolderNode(nodeId: string = null, includeFields: string[] = []): Observable<MinimalNodeEntryEntity>`<br/>
Gets a folder node via its node ID.
- `nodeId: string = null` - ID of the folder node - `nodeId: string = null` - ID of the folder node
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association") - `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** `Promise<MinimalNodeEntryEntity>` - Details of the folder - **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the folder
- `getMimeTypeIcon(mimeType: string = null): string`<br/> - `getMimeTypeIcon(mimeType: string = null): string`<br/>
Gets the icon that represents a MIME type. Gets the icon that represents a MIME type.
- `mimeType: string = null` - MIME type to get the icon for - `mimeType: string = null` - MIME type to get the icon for
- **Returns** `string` - Path to the icon file - **Returns** `string` - Path to the icon file
- `getNode(nodeId: string = null, includeFields: string[] = []): Observable<NodeEntry>`<br/>
Gets a node via its node ID.
- `nodeId: string = null` -
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** `Observable<NodeEntry>` - Details of the folder
- `hasPermission(node: any = null, permission: PermissionsEnum | string = null): boolean`<br/> - `hasPermission(node: any = null, permission: PermissionsEnum | string = null): boolean`<br/>
Checks if a node has the specified permission.
- `node: any = null` - Target node - `node: any = null` - Target node
- `permission: PermissionsEnum | string = null` - Permission level to query - `permission: PermissionsEnum | string = null` - Permission level to query
- **Returns** `boolean` - True if the node has the permission, false otherwise - **Returns** `boolean` - True if the node has the permission, false otherwise
- `moveNode(nodeId: string = null, targetParentId: string = null): any`<br/>
- `moveNode(nodeId: string = null, targetParentId: string = null): Observable<any>`<br/>
Move a node to destination node Move a node to destination node
- `nodeId: string = null` - The id of the node to be moved - `nodeId: string = null` - The id of the node to be moved
- `targetParentId: string = null` - The id of the folder where the node will be moved - `targetParentId: string = null` - The id of the folder where the node will be moved
- **Returns** `any` - NodeEntry for the moved node - **Returns** `Observable<any>` - NodeEntry for the moved node
## Details ## Details

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Dropdown Breadcrumb Component # Dropdown Breadcrumb Component
Indicates the current position within a navigation hierarchy using a dropdown menu. Indicates the current position within a navigation hierarchy using a dropdown menu.
@ -17,19 +18,22 @@ Indicates the current position within a navigation hierarchy using a dropdown me
</adf-dropdown-breadcrumb> </adf-dropdown-breadcrumb>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| folderNode | `MinimalNodeEntryEntity` | `null` | Active node, builds UI based on folderNode.path.elements collection. | | folderNode | `MinimalNodeEntryEntity` | null | Active node, builds UI based on folderNode.path.elements collection. |
| 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. | | 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. | | 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. |
| target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. | | target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. |
| transform | `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. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. | | navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
## See also ## See also

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# File Uploading Dialog Component # File Uploading Dialog Component
Shows a dialog listing all the files uploaded with the Upload Button or Drag Area components. Shows a dialog listing all the files uploaded with the Upload Button or Drag Area components.
@ -12,17 +13,19 @@ Shows a dialog listing all the files uploaded with the Upload Button or Drag Are
<adf-file-uploading-dialog></adf-file-uploading-dialog> <adf-file-uploading-dialog></adf-file-uploading-dialog>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| position | `string` | `'right'` | Dialog position. Can be 'left' or 'right'. | | position | `string` | "right" | Dialog position. Can be 'left' or 'right'. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when a file upload goes in error | | error | `EventEmitter<any>` | Emitted when a file in the list has an error. |
## Details ## Details

View File

@ -31,16 +31,16 @@ Creates folders.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| nodeType | `string` | "cm:folder" | |
| adf-create-folder | `string` | DEFAULT_FOLDER_PARENT_ID | Parent folder where the new folder will be located after creation. | | adf-create-folder | `string` | DEFAULT_FOLDER_PARENT_ID | Parent folder where the new folder will be located after creation. |
| title | `string` | null | The title of the opened dialog. | | title | `string` | null | |
| nodeType | `string` | 'cm:folder' | The type of the node to be created. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs (for example a folder with same name already exists) | | error | `EventEmitter<any>` | Emitted when the create folder give error for example a folder with same name already exist |
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the creation successfully happened | | success | `EventEmitter<MinimalNodeEntryEntity>` | |
## Details ## Details

View File

@ -32,14 +32,14 @@ Allows folders to be edited.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| adf-edit-folder | `MinimalNodeEntryEntity` | | Folder node to edit. | | adf-edit-folder | `MinimalNodeEntryEntity` | | Folder node to edit. |
| title | `string` | null | The title of the opened dialog. | | title | `string` | null | |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs (for example a folder with same name already exists) | | error | `EventEmitter<any>` | Emitted when the edit/create folder give error for example a folder with same name already exist |
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the edition successfully happened | | success | `EventEmitter<MinimalNodeEntryEntity>` | |
## Details ## Details

View File

@ -2,6 +2,7 @@
Added: v2.3.0 Added: v2.3.0
Status: Active Status: Active
--- ---
# Inherit Permission directive # Inherit Permission directive
Update the current node by adding/removing the inherited permissions. Update the current node by adding/removing the inherited permissions.
@ -15,11 +16,13 @@ Update the current node by adding/removing the inherited permissions.
(updated)="onUpdatedPermissions($node)">PERMISSION</button> (updated)="onUpdatedPermissions($node)">PERMISSION</button>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | nodeId where to add/remove inherited permissions | | nodeId | `string` | | nodeId where to add/remove inherited permissions |
### Events ### Events
@ -28,5 +31,6 @@ Update the current node by adding/removing the inherited permissions.
| updated | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated. | | updated | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated. |
## Details ## Details
This directive switches on/off the inheritance on the permission based on what is set on the node entity. 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. 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.

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Like component # Like component
Allows a user to add "likes" to an item. Allows a user to add "likes" to an item.
@ -14,17 +15,19 @@ Allows a user to add "likes" to an item.
<adf-like [nodeId]="nodeId"></adf-like> <adf-like [nodeId]="nodeId"></adf-like>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| nodeId | `string` | | Identifier of a node to apply likes to. | | nodeId | `string` | | Identifier of a node to apply likes to. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. | | changeVote | `EventEmitter<Object>` | Emitted when the "vote" gets changed. |
## See also ## See also

View File

@ -8,12 +8,6 @@ Last reviewed: 2018-04-10
Locks a node. Locks a node.
When the directive is clicked a dialog is shown and you can lock or unlock a file (folder cannot be locked)
there are two types of lock: indefinite lock and time lock.
If the time is not selected the user will lock the file it until will not unlock it
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
![adf-lock](../docassets/images/lock-directive.png)
## Basic Usage ## Basic Usage
```html ```html
@ -22,15 +16,23 @@ When a file is locked it can be locked and unlocked by default only by the user
</button> </button>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| adf-node-lock | `MinimalNodeEntryEntity` | | Node to lock. | | adf-node-lock | `MinimalNodeEntryEntity` | | |
## Details ## Details
When the directive is clicked a dialog is shown and you can lock or unlock a file (folder cannot be locked)
there are two types of lock: indefinite lock and time lock.
If the time is not selected the user will lock the file it until will not unlock it
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
![adf-lock](../docassets/images/lock-directive.png)
This calls the `openLockNodeDialog` method from the This calls the `openLockNodeDialog` method from the
[Content Node Dialog service](content-node-dialog.service.md) method when clicked, [Content Node Dialog service](content-node-dialog.service.md) method when clicked,
and disables the target button if the provided node is not a file or the user doesn't and disables the target button if the provided node is not a file or the user doesn't
have permissions. have permissions.

View File

@ -2,25 +2,31 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Node Permission service # Node Permission service
Manages the role permissions for the content nodes Manages the role permissions for the content nodes
## Methods ## Class members
- `getNodeRoles(node: MinimalNodeEntryEntity): Observable<string[]>` ### Methods
Gets a list of roles for the current node.
- `node` - the target node
- `updatePermissionRoles(node: MinimalNodeEntryEntity, updatedPermissionRole: PermissionElement): Observable<MinimalNodeEntryEntity>`
Update the given permission for the related node
- `node` - the target node
- `updatedPermissionRole` the permission role to update/add
- `getGroupMemeberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging>` - `getGroupMemeberByGroupName(groupName: string = null, opts?: any = null): Observable<GroupMemberPaging>`<br/>
Perform a call to the groups api to retrieve all the members related to that group name.
- `groupName` the members group name
- `opts` additional parameters to perform the call
- `groupName: string = null` -
- `opts?: any = null` - (Optional)
- **Returns** `Observable<GroupMemberPaging>` -
- `getNodeRoles(node: MinimalNodeEntryEntity = null): Observable<string[]>`<br/>
- `node: MinimalNodeEntryEntity = null` -
- **Returns** `Observable<string[]>` -
- `updatePermissionRoles(node: MinimalNodeEntryEntity = null, updatedPermissionRole: PermissionElement = null): Observable<MinimalNodeEntryEntity>`<br/>
- `node: MinimalNodeEntryEntity = null` -
- `updatedPermissionRole: PermissionElement = null` -
- **Returns** `Observable<MinimalNodeEntryEntity>` -
## Details ## Details

View File

@ -26,29 +26,26 @@ Creates and manages public shared links for files.
</adf-document-list> </adf-document-list>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| node | `MinimalNodeEntity` | | Nodes to share. | | node | `MinimalNodeEntity` | | Nodes to share. |
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link | | baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
## Details ## Details
This dialog will generate a link with the form "baseShareUrl + sharedId". This dialog will generate a link with the form "baseShareUrl + sharedId".
For example, if you set the input parameter as follows: For example, if you set the input parameter as follows:
``` [baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
```
...then the directive will ask the [Content service](../core/content.service.md) to generate ...then the directive will ask the [Content service](../core/content.service.md) to generate
a `sharedId` for the file. This will create a URL like the following: a `sharedId` for the file. This will create a URL like the following:
``` http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
```
To use this,ou will need to implement some code that gets the `NEW_GENERATED_SHAREID` with the router To use this,ou will need to implement some code that gets the `NEW_GENERATED_SHAREID` with the router
and passes it to a [Viewer component](../core/viewer.component.md): and passes it to a [Viewer component](../core/viewer.component.md):
@ -58,4 +55,4 @@ and passes it to a [Viewer component](../core/viewer.component.md):
[sharedLinkId]="NEW_GENERATED_SHAREID" [sharedLinkId]="NEW_GENERATED_SHAREID"
[allowGoBack]="false"> [allowGoBack]="false">
</adf-viewer> </adf-viewer>
``` ```

View File

@ -28,22 +28,23 @@ or custom template can be added:
</adf-permission-list> </adf-permission-list>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| nodeId | `string` | `null` | ID of the node whose permissions you want to show. | | nodeId | `string` | "" | |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| update | `PermissionElement` | Emitted when the permission is updated. | | update | `EventEmitter<PermissionElement>` | |
## Details ## Details
This component uses a [Datatable component](../core/datatable.component.md) to show the This component uses a [Datatable component](../core/datatable.component.md) to show the
permissions retrieved from the [Node service](../core/node.service.md). permissions retrieved from the [Node service](../core/node.service.md).
For the locallyset permissions a role dropdown will be showed allowing the user to change it. For the locallyset permissions a role dropdown will be showed allowing the user to change it.
When user select a new value, the permission role is automatically updated and the `update` event is thrown. When user select a new value, the permission role is automatically updated and the `update` event is thrown.

View File

@ -2,10 +2,13 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Permission Style model # Permission Style model
Sets custom CSS styles for rows of a Document List according to the item's permissions. Sets custom CSS styles for rows of a Document List according to the item's permissions.
## Class members
## Properties ## Properties
| Property | Type | Description | | Property | Type | Description |

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Rating component # Rating component
Allows a user to add ratings to an item. Allows a user to add ratings to an item.
@ -16,17 +17,19 @@ Allows a user to add ratings to an item.
</adf-rating> </adf-rating>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| nodeId | `string` | | Identifier of the node to apply the rating to. | | nodeId | `string` | | Identifier of the node to apply the rating to. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. | | changeVote | `EventEmitter<Object>` | Emitted when the "vote" gets changed. |
## See also ## See also

View File

@ -2,25 +2,31 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Rating service # Rating service
Manages ratings for items in Content Services. Manages ratings for items in Content Services.
## Methods ## Class members
- `getRating(nodeId: string, ratingType: any): any` ### Methods
Gets the current user's rating for a node.
- `nodeId` - Node to get the rating from - `deleteRating(nodeId: string = null, ratingType: any = null): any`<br/>
- `ratingType` - Type of rating (can be "likes" or "fiveStar") Removes the current user's rating for a node.
- `postRating(nodeId: string, ratingType: any, vote: any): any` - `nodeId: string = null` - Target node
Adds the current user's rating for a node. - `ratingType: any = null` - Type of rating to remove (can be "likes" or "fiveStar")
- `nodeId` - Target node for the rating - **Returns** `any` -
- `ratingType` - Type of rating (can be "likes" or "fiveStar") - `getRating(nodeId: string = null, ratingType: any = null): any`<br/>
- `vote` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar") Gets the current user's rating for a node.
- `deleteRating(nodeId: string, ratingType: any): any` - `nodeId: string = null` - Node to get the rating from
Removes the current user's rating for a node. - `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar")
- `nodeId` - Target node - **Returns** `any` -
- `ratingType` - Type of rating to remove (can be "likes" or "fiveStar") - `postRating(nodeId: string = null, ratingType: any = null, vote: any = null): any`<br/>
Adds the current user's rating for a node.
- `nodeId: string = null` - Target node for the rating
- `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar")
- `vote: any = null` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
- **Returns** `any` -
## Details ## Details

View File

@ -12,4 +12,4 @@ Displays search criteria as a set of "chips".
<adf-search-filter #searchFilter></adf-search-filter> <adf-search-filter #searchFilter></adf-search-filter>
``` ```
![Selected Facets](../docassets/images/selected-facets.png) ![Selected Facets](../docassets/images/selected-facets.png)

View File

@ -25,7 +25,7 @@ Displays a input text which shows find-as-you-type suggestions.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| autocomplete | `boolean` | false | Toggles auto-completion of the search input field. | | autocomplete | `boolean` | false | Toggles auto-completion of the search input field. |
| customQueryBody | `QueryBody` | | **Deprecated:** in 2.1.0 | | customQueryBody | `QueryBody` | | **Deprecated:** in 2.1.0 |
| expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. | | expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. |
@ -37,7 +37,7 @@ Displays a input text which shows find-as-you-type suggestions.
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| optionClicked | `EventEmitter<any>` | Emitted when a file item from the list of "find-as-you-type" results is selected. | | optionClicked | `EventEmitter<any>` | Emitted when a file item from the list of "find-as-you-type" results is selected. |
| searchChange | `EventEmitter<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. | | searchChange | `EventEmitter<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. |
| submit | `EventEmitter<any>` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. | | submit | `EventEmitter<any>` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. |

View File

@ -14,25 +14,10 @@ Represents a main container component for custom search and faceted search setti
<adf-search-filter #settings></adf-search-filter> <adf-search-filter #settings></adf-search-filter>
``` ```
## Class members
### Properties
For the property types please refer to the [Search Category interface](#categories).
| Property | Description |
| --- | --- |
| id | Unique identifier of the category. Also used to access QueryBuilder customizations for a particular widget. |
| name | Public display name for the category. |
| enabled | Toggles category availability. Set to `false` if you want to exclude a category from processing. |
| expanded | Toggles the expanded state of the category |
| component.selector | The id of the Angular component selector to render the Category |
| component.settings | An object containing component specific settings. Put any properties needed for the target component here. |
## Details ## Details
The component is based on dynamically created widgets to modify the resulting query and options, The component is based on dynamically created widgets to modify the resulting query and options,
and the [Search Query Builder service](search-query-builder.service.md)` to build and execute the search queries. and the [Search Query Builder service](search-query-builder.service.md)\` to build and execute the search queries.
### Configuration ### Configuration
@ -132,4 +117,4 @@ export interface SearchWidgetSettings {
## See also ## See also
- [Search Query Builder service](search-query-builder.service.md) - [Search Query Builder service](search-query-builder.service.md)

View File

@ -11,21 +11,27 @@ Stores information from all the custom search and faceted search widgets, compil
### Methods ### Methods
- `addFilterQuery(query: string): void` - `addFilterQuery(query: string = null)`<br/>
Adds a filter query to the search.
- `query` - Query text - `query: string = null` -
- `removeFilterQuery(query: string): void` - `buildQuery(): QueryBody`<br/>
Removes a previously added filter query from the search.
- `query` - Query text - **Returns** `QueryBody` -
- `getFacetQuery(label: string): FacetQuery`
Gets a facet query. - `execute(): Promise<void>`<br/>
- `label` - Identifier of the target query
- `update(): void` - **Returns** `Promise<void>` -
Rebuilds the query and triggers the `updated` event.
- `async execute()` - `getFacetQuery(label: string = null): FacetQuery`<br/>
Executes the query.
- `buildQuery(): QueryBody` - `label: string = null` -
Builds the query. - **Returns** `FacetQuery` -
- `removeFilterQuery(query: string = null)`<br/>
- `query: string = null` -
- `update()`<br/>
## Details ## Details
@ -34,13 +40,13 @@ You can reuse it with multiple component implementations.
You can use custom widgets to populate and edit the following parts of the resulting query: You can use custom widgets to populate and edit the following parts of the resulting query:
- categories - categories
- query fragments that form query expression - query fragments that form query expression
- include fields - include fields
- scope settings - scope settings
- filter queries - filter queries
- facet fields - facet fields
- range queries - range queries
```ts ```ts
constructor(queryBuilder: SearchQueryBuilderService) { constructor(queryBuilder: SearchQueryBuilderService) {
@ -54,4 +60,4 @@ constructor(queryBuilder: SearchQueryBuilderService) {
}); });
} }
``` ```

View File

@ -8,6 +8,23 @@ Last reviewed: 2018-04-13
Searches items for supplied search terms. Searches items for supplied search terms.
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Customise Search Results](#customise-search-results)
- [Attach an input field to the search](#attach-an-input-field-to-the-search)
- [Custom search configuration](#custom-search-configuration)
- [See Also](#see-also)
## Basic usage ## Basic usage
```html ```html

View File

@ -18,6 +18,8 @@ Displays a dropdown menu to show and interact with the sites of the current user
</adf-sites-dropdown> </adf-sites-dropdown>
``` ```
## Class members
### Properties ### Properties
| Attribute | Type | Default | Description | | Attribute | Type | Default | Description |

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Tag Node Actions List component # Tag Node Actions List component
Shows available actions for tags. Shows available actions for tags.
@ -16,16 +17,18 @@ Shows available actions for tags.
</adf-tag-node-actions-list> </adf-tag-node-actions-list>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| nodeId | `string` | | The identifier of a node. | | nodeId | `string` | | The identifier of a node. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| successAdd | `EventEmitter<any>` | Emitted when a tag is added successfully. |
| error | `EventEmitter<any>` | Emitted when an error occurs. | | error | `EventEmitter<any>` | Emitted when an error occurs. |
| result | `EventEmitter<{}>` | Emitted when an action is chosen. | | result | `EventEmitter<Object>` | Emitted when an action is chosen. |
| successAdd | `EventEmitter<any>` | Emitted when a tag is added successfully. |

View File

@ -2,19 +2,20 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Tag List component # Tag List component
Shows tags for an item. Shows tags for an item.
![Custom columns](../docassets/images/tag2.png) ![Custom columns](../docassets/images/tag2.png)
## Basic Usage ## Class members
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| result | `EventEmitter<{}>` | Emitted when a tag is selected. | | result | `EventEmitter<Object>` | Emitted when a tag is selected. |
## See Also ## See Also

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Tag Node List component # Tag Node List component
Shows tags for a node. Shows tags for a node.
@ -16,14 +17,16 @@ Shows tags for a node.
</adf-tag-node-list> </adf-tag-node-list>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| nodeId | `string` | | The identifier of a node. | | nodeId | `string` | | The identifier of a node. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| results | `EventEmitter<{}>` | Emitted when a tag is selected. | | results | `EventEmitter<Object>` | Emitted when a tag is selected. |

View File

@ -17,9 +17,9 @@ Manages tags in Content Services.
- `nodeId: string = null` - ID of the target node - `nodeId: string = null` - ID of the target node
- `tagName: string = null` - Name of the tag to add - `tagName: string = null` - Name of the tag to add
- **Returns** `any` - TagEntry object (defined in JSAPI) with details of the new tag - **Returns** `any` - TagEntry object (defined in JSAPI) with details of the new tag
- `getAllTheTags(): any`<br/> - `getAllTheTags(): Observable<any>`<br/>
Gets a list of all the tags already defined in the repository. Gets a list of all the tags already defined in the repository.
- **Returns** `any` - TagPaging object (defined in JSAPI) containing the tags - **Returns** `Observable<any>` - TagPaging object (defined in JSAPI) containing the tags
- `getTagsByNodeId(nodeId: string = null): any`<br/> - `getTagsByNodeId(nodeId: string = null): any`<br/>
Gets a list of tags added to a node. Gets a list of tags added to a node.
- `nodeId: string = null` - ID of the target node - `nodeId: string = null` - ID of the target node

View File

@ -22,28 +22,30 @@ Activates a file upload.
<adf-file-uploading-dialog></adf-file-uploading-dialog> <adf-file-uploading-dialog></adf-file-uploading-dialog>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). | | acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). | | disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
| versioning | `boolean` | `false` | Toggles versioning. |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. | | maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| staticTitle | `string` | | Defines the text of the upload button. | | multipleFiles | `boolean` | false | Allows/disallows multiple files |
| tooltip | `string` | `null` | Custom tooltip text. | | rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| 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. |
| acceptedFilesType | `string` | `'*'` | Filter for accepted file types. | | tooltip | `string` | null | Custom tooltip text. |
| uploadFolders | `boolean` | false | Allows/disallows upload folders (only for Chrome). |
| versioning | `boolean` | false | Toggles versioning. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. | | createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
| error | `EventEmitter<{}>` | Emitted when an error occurs. | | error | `EventEmitter<Object>` | Emitted when an error occurs. |
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. | | permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. | | success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
## Details ## Details
@ -77,4 +79,4 @@ export class MyComponent {
## See also ## See also
- [Upload Version Button component](upload-version-button.component.md) - [Upload Version Button component](upload-version-button.component.md)

View File

@ -29,29 +29,31 @@ properties and events are the same except for the `node` property that specifies
to be versioned (this is a _required_ input parameter). However, some properties don't make to be versioned (this is a _required_ input parameter). However, some properties don't make
sense when applied to the Upload Version Button component, so they are simply ignored. sense when applied to the Upload Version Button component, so they are simply ignored.
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| node | `MinimalNodeEntryEntity` | | (**Required**) The node to be versioned. | | acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). | | disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
| versioning | `boolean` | `false` | Toggles versioning. |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. | | maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| staticTitle | `string` | | Defines the text of the upload button. | | multipleFiles | `boolean` | false | Allows/disallows multiple files |
| tooltip | `string` | `null` | Custom tooltip text. | | node | `MinimalNodeEntryEntity` | | (**Required**) The node to be versioned. |
| rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. | | rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| acceptedFilesType | `string` | `'*'` | Filter for accepted file types. | | staticTitle | `string` | | Defines the text of the upload button. |
| tooltip | `string` | null | Custom tooltip text. |
| uploadFolders | `boolean` | false | Allows/disallows upload folders (only for Chrome). |
| versioning | `boolean` | false | Toggles versioning. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. | | createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
| error | `EventEmitter<{}>` | Emitted when an error occurs. | | error | `EventEmitter<Object>` | Emitted when an error occurs. |
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. | | permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. | | success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
## Details ## Details
@ -71,4 +73,4 @@ So, to sum up, this component:
## See also ## See also
- [Upload Button component](upload-button.component.md) - [Upload Button component](upload-button.component.md)

View File

@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Experimental Status: Experimental
--- ---
# Version List component # Version List component
Displays the version history of a node in a Version Manager component Displays the version history of a node in a Version Manager component
@ -12,22 +13,16 @@ Displays the version history of a node in a Version Manager component
<adf-version-list [node]="myNode"></adf-version-list> <adf-version-list [node]="myNode"></adf-version-list>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| node | `MinimalNodeEntryEntity` | | Node whose version history you want to display. | | allowDownload | `boolean` | true | Enable/disable possibility to download a version of the current node. |
| showComments | `boolean` | true | Set this to false if version comments should not be displayed. | | id | `string` | | **Deprecated:** in 2.3.0 |
| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. | | node | `MinimalNodeEntryEntity` | | |
| showComments | `boolean` | true | |
### DOM events
All DOM events are bubbling and can be handled in the parent components up to the root application component.
| Name | Description |
| --- | --- |
| version-deleted | Raised after a version is deleted. |
| version-restored | Raised after a version is restored. |
## Details ## Details

View File

@ -22,20 +22,22 @@ Displays the version history of a node with the ability to upload a new version.
</adf-version-manager> </adf-version-manager>
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | --- | ----------- | | -- | -- | -- | -- |
| node | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | |The node you want to manage the version history of. | | allowDownload | `boolean` | true | |
| showComments | `boolean` | true | Set this to false if version comments should not be displayed. | | node | `MinimalNodeEntryEntity` | | |
| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. | | showComments | `boolean` | true | |
### Events ### Events
| Name | Description | | Name | Type | Description |
| --- | --- | | -- | -- | -- |
| uploadSuccess | Raised when the file is uploaded | | uploadError | `EventEmitter<Object>` | |
| uploadError | Emitted when an error occurs.| | uploadSuccess | `EventEmitter<Object>` | |
## Details ## Details

View File

@ -2,10 +2,26 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Webscript component # Webscript component
Provides access to Webscript features. Provides access to Webscript features.
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Webscript View HTML example](#webscript-view-html-example)
- [Webscript View DATATABLE example](#webscript-view-datatable-example)
- [Webscript View JSON example](#webscript-view-json-example)
## Basic usage ## Basic usage
```html ```html
@ -44,22 +60,24 @@ export class AppComponent {
} }
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). | | contentType | `string` | "TEXT" | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" |
| scriptArgs | `any` | | Arguments to pass to the webscript. | | contextRoot | `string` | "alfresco" | Path where the application is deployed |
| showData | `boolean` | `true` | Toggles whether to show or hide the data. | | scriptArgs | `any` | | Arguments to pass to the webscript. |
| contextRoot | `string` | `'alfresco'` | Path where the application is deployed | | scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). |
| servicePath | `string` | `'service'` | Path that the webscript service is mapped to. | | servicePath | `string` | "service" | Path that the webscript service is mapped to. |
| contentType | `string` | `'TEXT'` | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" | | showData | `boolean` | true | Toggles whether to show or hide the data. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| success | `EventEmitter<{}>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. | | success | `EventEmitter<Object>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. |
## Details ## Details

View File

@ -157,6 +157,10 @@ exports.aggPhase = aggPhase;
function updatePhase(tree, pathname, aggData) { function updatePhase(tree, pathname, aggData) {
var compName = angNameToClassName(path.basename(pathname, ".md")); var compName = angNameToClassName(path.basename(pathname, ".md"));
var classRef = aggData.projData.findReflectionByName(compName); var classRef = aggData.projData.findReflectionByName(compName);
if (!classRef) {
// A doc file with no corresponding class (eg, Document Library Model).
return false;
}
var compData = new ComponentInfo(classRef); var compData = new ComponentInfo(classRef);
var classType = compName.match(/component|directive|service/i); var classType = compName.match(/component|directive|service/i);
if (classType) { if (classType) {

View File

@ -242,6 +242,12 @@ export function aggPhase(aggData) {
export function updatePhase(tree, pathname, aggData) { export function updatePhase(tree, pathname, aggData) {
let compName = angNameToClassName(path.basename(pathname, ".md")); let compName = angNameToClassName(path.basename(pathname, ".md"));
let classRef = aggData.projData.findReflectionByName(compName); let classRef = aggData.projData.findReflectionByName(compName);
if (!classRef) {
// A doc file with no corresponding class (eg, Document Library Model).
return false;
}
let compData = new ComponentInfo(classRef); let compData = new ComponentInfo(classRef);
let classType = compName.match(/component|directive|service/i); let classType = compName.match(/component|directive|service/i);