[ADF-2764] Applied new doc tool features to core library (#3383)

This commit is contained in:
Andy Stark
2018-05-23 19:30:48 +01:00
committed by Eugenio Romano
parent 5831bc1d77
commit 41777e0540
97 changed files with 965 additions and 788 deletions
+5 -5
View File
@@ -6,15 +6,15 @@ Last reviewed: 2018-05-16
# About Component # About Component
This component allow you to have a general overview of the version of ADF installed and the status of the Content service and Process service This component allow you to have a general overview of the version of ADF installed and the status of the [Content service](../core/content.service.md) and [Process service](../process-services/process.service.md).
Note at the moment this component is mostly for internal use and it require: Note at the moment this component is mostly for internal use and it require:
- create a version file : npm list --depth=0 --json=true --prod=true > versions.json - create a version file : npm list --depth=0 --json=true --prod=true > versions.json
- provide this version file in the dist folder - provide this version file in the dist folder
### Basic Usage ## Basic Usage
```html ```html
<adf-about></adf-about> <adf-about></adf-about>
``` ```
+8 -8
View File
@@ -40,18 +40,18 @@ export class MyComponent implements OnInit {
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| heading | `string` | | Title heading for the group. | | hasAccordionIcon | `boolean` | true | Should the (expanded) accordion icon be shown? |
| headingIcon | `string` | | The material design icon. | | heading | `string` | | Title heading for the group. |
| headingIconTooltip | `string` | | Tooltip message to be shown for headingIcon | | headingIcon | `string` | | The material design icon. |
| hasAccordionIcon | `boolean` | `true` | Should the (expanded) accordion icon be shown? | | headingIconTooltip | `string` | | Tooltip message to be shown for headingIcon |
| isOpen | `boolean` | | Is this group currently open? | | isOpen | | | Is this group currently open? |
| isSelected | `boolean` | | Is this group currently selected? | | isSelected | | | Is this group currently selected? |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| headingClick | `EventEmitter<any>` | Emitted when the heading is clicked. | | headingClick | `EventEmitter<any>` | Emitted when the heading is clicked. |
## Details ## Details
+36 -37
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Activiti Alfresco Content Service # Activiti Alfresco Content Service
Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS). Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS).
@@ -35,7 +36,8 @@ export class SomePageComponent implements OnInit {
## Methods ## Methods
#### getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]> #### getAlfrescoNodes(accountId: string, folderId: string): Observable&lt;[ExternalContent]>
Get all the nodes under passed in folder node ID (e.g. 3062d73b-fe47-4040-89d2-79efae63869c) for passed in Get all the nodes under passed in folder node ID (e.g. 3062d73b-fe47-4040-89d2-79efae63869c) for passed in
Alfresco Repository account ID as configured in APS: Alfresco Repository account ID as configured in APS:
@@ -58,26 +60,25 @@ The `folderNodeId` needs to identify a folder node ID in the Alfresco Repository
The response contained in `nodes` is an array with properties for each object like in this sample: The response contained in `nodes` is an array with properties for each object like in this sample:
``` 0:
0: folder: false
folder: false id: "2223d3c2-0709-4dd7-a79b-c45571901889;1.0"
id: "2223d3c2-0709-4dd7-a79b-c45571901889;1.0" simpleType: "pdf"
simpleType: "pdf" title: "JLAN_Server_Installation_Guide.pdf"
title: "JLAN_Server_Installation_Guide.pdf" 1:
1: folder: false
folder: false id: "900b4dc0-bfdc-4ec1-84dd-5f1f0a420066;1.0"
id: "900b4dc0-bfdc-4ec1-84dd-5f1f0a420066;1.0" simpleType: "image"
simpleType: "image" title: "Screen Shot 2017-09-21 at 15.44.23.png"
title: "Screen Shot 2017-09-21 at 15.44.23.png"
2:
2: folder: true
folder: true id: "f7010382-7b4e-4a78-bb94-9de092439230"
id: "f7010382-7b4e-4a78-bb94-9de092439230" simpleType: "folder"
simpleType: "folder" title: "Event More Stuff"
title: "Event More Stuff"
```
#### linkAlfrescoNode(accountId: string, node: ExternalContent, siteId: string): Observable<ExternalContentLink> #### linkAlfrescoNode(accountId: string, node: ExternalContent, siteId: string): Observable<ExternalContentLink>
Link Alfresco content as related content in APS by passing in Alfresco node identifying the content, the Share site Link Alfresco content as related content in APS by passing in Alfresco node identifying the content, the Share site
that contains the content, and the Alfresco Repository account ID as configured in APS: that contains the content, and the Alfresco Repository account ID as configured in APS:
@@ -109,23 +110,21 @@ The `externalContentNode` identifies the content that should be set up as tempor
The response contained in `link` looks like in this sample: The response contained in `link` looks like in this sample:
``` link:
link: contentAvailable: true
contentAvailable: true created: Tue Nov 07 2017 13:18:48 GMT+0000 (GMT) {}
created: Tue Nov 07 2017 13:18:48 GMT+0000 (GMT) {} createdBy: {id: 1, firstName: null, lastName: "Administrator", email: "admin@app.activiti.com"}
createdBy: {id: 1, firstName: null, lastName: "Administrator", email: "admin@app.activiti.com"} id: 6006
id: 6006 link:true
link:true mimeType: null
mimeType: null name: "simple.txt"
name: "simple.txt" previewStatus: "queued"
previewStatus: "queued" relatedContent: false
relatedContent: false simpleType: "content"
simpleType: "content" source: "alfresco-2"
source: "alfresco-2" sourceId: "da196918-1324-4e97-9d26-d28f1837a0b6@sample-workspace"
sourceId: "da196918-1324-4e97-9d26-d28f1837a0b6@sample-workspace" thumbnailStatus: "queued"
thumbnailStatus: "queued"
```
<!-- seealso start --> <!-- seealso start -->
<!-- seealso end --> <!-- seealso end -->
+1 -3
View File
@@ -26,8 +26,6 @@ export class MyComponent implements OnInit {
} }
``` ```
## Class members
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
@@ -47,7 +45,7 @@ export class MyComponent implements OnInit {
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| --- | --- | --- | | ---- | ---- | ----------- |
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Emitted when a node updates. | | nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Emitted when a node updates. |
## Details ## Details
+4 -5
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Alfresco Content service # Alfresco Content service
Gets URLs and access info and creates folders in Content Services. Gets URLs and access info and creates folders in Content Services.
@@ -19,13 +20,13 @@ Gets the URL for a node's content.
`getNodeContent(nodeId: string): Observable<any>`<br/> `getNodeContent(nodeId: string): Observable<any>`<br/>
Gets a node's content. Gets a node's content.
`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`<br/> [`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts)<br/>
Creates a folder. Creates a folder.
`hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/> `hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/>
Checks if the user has the specified permissions for `node`. Checks if the user has the specified permissions for `node`.
`hasAllowableOperations(node: any): boolean `<br/> `hasAllowableOperations(node: any): boolean`<br/>
Checks if the the node has the `allowableOperations` property. Checks if the the node has the `allowableOperations` property.
## Details ## Details
@@ -51,9 +52,7 @@ See the
for more information about the low-level REST API that these methods are based on. for more information about the low-level REST API that these methods are based on.
<!-- 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 -->
<!-- seealso end --> <!-- seealso end -->
+1 -1
View File
@@ -37,4 +37,4 @@ You can also chain values with other pipes, for example `translation` one:
## See also ## See also
- [App Config service](app-config.service.md) - [App Config service](app-config.service.md)
+18 -15
View File
@@ -11,29 +11,32 @@ Supports app configuration settings, stored server side.
### Methods ### Methods
- `get(key: string = null, defaultValue?: T = null): T`<br/> - **get**(key: `string` = `null`, defaultValue?: `T` = `null`): `T`<br/>
Gets the value of a named property. Gets the value of a named property.
- `key: string = null` - Name of the property - _key:_ `string` - Name of the property
- `defaultValue?: T = null` - (Optional) Value to return if the key is not found - _defaultValue:_ `T` - (Optional) Value to return if the key is not found
- **Returns** `T` - Value of the property - **Returns** `T` - Value of the property
- `getLocationHostname(): string`<br/> - **getLocationHostname**(): `string`<br/>
Gets the location.hostname property. Gets the location.hostname property.
- **Returns** `string` - Value of the property - **Returns** `string` - Value of the property
- `getLocationPort(prefix: string = ""): string`<br/> - **getLocationPort**(prefix: `string` = `""`): `string`<br/>
Gets the location.port property. Gets the location.port property.
- `prefix: string = ""` - Text added before port value - _prefix:_ `string` - Text added before port value
- **Returns** `string` - Port with prefix - **Returns** `string` - Port with prefix
- `load(): Promise<any>`<br/> - **getLocationProtocol**(): `string`<br/>
Gets the location.protocol value.
- **Returns** `string` -
- **load**(): `Promise<any>`<br/>
Loads the config file. Loads the config file.
- **Returns** `Promise<any>` - Notification when loading is complete - **Returns** `Promise<any>` - Notification when loading is complete
- `select(property: string = null): Observable<any>`<br/> - **select**(property: `string` = `null`): `Observable<any>`<br/>
Requests notification of a property value when it is loaded. Requests notification of a property value when it is loaded.
- `property: string = null` - The desired property value - _property:_ `string` - The desired property value
- **Returns** `Observable<any>` - Property value, when loaded - **Returns** `Observable<any>` - [Property](../../lib/content-services/content-metadata/interfaces/property.interface.ts) value, when loaded
## Details ## Details
The `AppConfigService` service provides support for loading and accessing global application configuration settings that you store on the server side in the form of a JSON file. The [`AppConfigService`](../core/app-config.service.md) service provides support for loading and accessing global application configuration settings that you store on the server side in the form of a JSON file.
You may need this service when deploying your ADF-based application to production servers. You may need this service when deploying your ADF-based application to production servers.
@@ -62,7 +65,7 @@ Example of the default settings file content:
Please note that settings above are default ones coming with the server. Please note that settings above are default ones coming with the server.
You can override the values in your custom `app.config.json` file if needed. You can override the values in your custom `app.config.json` file if needed.
You can also change the path or name of the configuration file when importing the CoreModule in your main application. You can also change the path or name of the configuration file when importing the [`CoreModule`](../../lib/core/core.module.ts) in your main application.
```ts ```ts
... ...
@@ -78,7 +81,7 @@ You can also change the path or name of the configuration file when importing th
export class AppModule { } export class AppModule { }
``` ```
Below is a simple example of using the AppConfigService in practice. Below is a simple example of using the [`AppConfigService`](../core/app-config.service.md) in practice.
**app.component.ts** **app.component.ts**
@@ -100,12 +103,12 @@ export class AppComponent {
} }
``` ```
Your custom components can also benefit from the `AppConfigService`, Your custom components can also benefit from the [`AppConfigService`](../core/app-config.service.md),
you can put an unlimited number of settings and optionally a nested JSON hierarchy. you can put an unlimited number of settings and optionally a nested JSON hierarchy.
### Variable substitution in configuration strings ### Variable substitution in configuration strings
The `AppConfigService` also supports a limited set of variable substitutions to greatly simplify certain scenarios. The [`AppConfigService`](../core/app-config.service.md) also supports a limited set of variable substitutions to greatly simplify certain scenarios.
```json ```json
{ {
+6 -6
View File
@@ -12,16 +12,16 @@ Gets details of the Process Services apps that are deployed for the user.
### Methods ### Methods
- `getApplicationDetailsById(appId: number = null): Observable<AppDefinitionRepresentation>`<br/> - **getApplicationDetailsById**(appId: `number` = `null`): `Observable<AppDefinitionRepresentation>`<br/>
Gets the details for a specific app ID number. Gets the details for a specific app ID number.
- `appId: number = null` - ID of the target app - _appId:_ `number` - ID of the target app
- **Returns** `Observable<AppDefinitionRepresentation>` - Details of the app - **Returns** `Observable<AppDefinitionRepresentation>` - Details of the app
- `getDeployedApplications(): Observable<AppDefinitionRepresentation[]>`<br/> - **getDeployedApplications**(): `Observable<AppDefinitionRepresentation[]>`<br/>
Gets a list of deployed apps for this user. Gets a list of deployed apps for this user.
- **Returns** `Observable<AppDefinitionRepresentation[]>` - The list of deployed apps - **Returns** `Observable<AppDefinitionRepresentation[]>` - The list of deployed apps
- `getDeployedApplicationsByName(name: string = null): Observable<AppDefinitionRepresentation>`<br/> - **getDeployedApplicationsByName**(name: `string` = `null`): `Observable<AppDefinitionRepresentation>`<br/>
Gets a list of deployed apps for this user, where the app name is \`name\`. Gets a list of deployed apps for this user, where the app name is `name`.
- `name: string = null` - Name of the app - _name:_ `string` - Name of the app
- **Returns** `Observable<AppDefinitionRepresentation>` - The list of deployed apps - **Returns** `Observable<AppDefinitionRepresentation>` - The list of deployed apps
## Details ## Details
+27 -27
View File
@@ -12,63 +12,63 @@ Provides authentication to ACS and APS.
### Methods ### Methods
- `getBpmUsername(): string`<br/> - **getBpmUsername**(): `string`<br/>
Gets the BPM username Gets the BPM username
- **Returns** `string` - The BPM username - **Returns** `string` - The BPM username
- `getEcmUsername(): string`<br/> - **getEcmUsername**(): `string`<br/>
Gets the ECM username. Gets the ECM username.
- **Returns** `string` - The ECM username - **Returns** `string` - The ECM username
- `getRedirectUrl(provider: string = null): string`<br/> - **getRedirect**(provider: `string` = `null`): `any[]`<br/>
Gets the URL to redirect to after login. Gets the URL to redirect to after login.
- `provider: string = null` - Service provider. Can be "ECM", "BPM" or "ALL". - _provider:_ `string` - Service provider. Can be "ECM", "BPM" or "ALL".
- **Returns** `string` - The redirect URL - **Returns** `any[]` - The redirect URL
- `getTicketBpm(): string | null`<br/> - **getTicketBpm**(): `string | null`<br/>
Gets the BPM ticket stored in the Storage. Gets the BPM ticket stored in the Storage.
- **Returns** `string | null` - The ticket or `null` if none was found - **Returns** `string | null` - The ticket or `null` if none was found
- `getTicketEcm(): string | null`<br/> - **getTicketEcm**(): `string | null`<br/>
Gets the ECM ticket stored in the Storage. Gets the ECM ticket stored in the Storage.
- **Returns** `string | null` - The ticket or `null` if none was found - **Returns** `string | null` - The ticket or `null` if none was found
- `getTicketEcmBase64(): string | null`<br/> - **getTicketEcmBase64**(): `string | null`<br/>
Gets the BPM ticket from the Storage in Base 64 format. Gets the BPM ticket from the Storage in Base 64 format.
- **Returns** `string | null` - The ticket or `null` if none was found - **Returns** `string | null` - The ticket or `null` if none was found
- `handleError(error: any = null): Observable<any>`<br/> - **handleError**(error: `any` = `null`): `Observable<any>`<br/>
Prints an error message in the console browser Prints an error message in the console browser
- `error: any = null` - Error message - _error:_ `any` - Error message
- **Returns** `Observable<any>` - Object representing the error message - **Returns** `Observable<any>` - Object representing the error message
- `isBpmLoggedIn(): boolean`<br/> - **isBpmLoggedIn**(): `boolean`<br/>
Checks if the user is logged in on a BPM provider. Checks if the user is logged in on a BPM provider.
- **Returns** `boolean` - True if logged in, false otherwise - **Returns** `boolean` - True if logged in, false otherwise
- `isEcmLoggedIn(): boolean`<br/> - **isEcmLoggedIn**(): `boolean`<br/>
Checks if the user is logged in on an ECM provider. Checks if the user is logged in on an ECM provider.
- **Returns** `boolean` - True if logged in, false otherwise - **Returns** `boolean` - True if logged in, false otherwise
- `isLoggedIn(): boolean`<br/> - **isLoggedIn**(): `boolean`<br/>
Checks if the user logged in. Checks if the user logged in.
- **Returns** `boolean` - True if logged in, false otherwise - **Returns** `boolean` - True if logged in, false otherwise
- `isRememberMeSet(): boolean`<br/> - **isRememberMeSet**(): `boolean`<br/>
Checks whether the "remember me" cookie was set or not. Checks whether the "remember me" cookie was set or not.
- **Returns** `boolean` - True if set, false otherwise - **Returns** `boolean` - True if set, false otherwise
- `login(username: string = null, password: string = null, rememberMe: boolean = false): Observable<object>`<br/> - **login**(username: `string` = `null`, password: `string` = `null`, rememberMe: `boolean` = `false`): `Observable<object>`<br/>
Logs the user in. Logs the user in.
- `username: string = null` - Username for the login - _username:_ `string` - Username for the login
- `password: string = null` - Password for the login - _password:_ `string` - Password for the login
- `rememberMe: boolean = false` - Stores the user's login details if true - _rememberMe:_ `boolean` - Stores the user's login details if true
- **Returns** `Observable<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket - **Returns** `Observable<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
- `logout(): any`<br/> - **logout**(): `Observable<any>`<br/>
Logs the user out. Logs the user out.
- **Returns** `any` - Response event called when logout is complete - **Returns** `Observable<any>` - Response event called when logout is complete
- `removeTicket()`<br/> - **removeTicket**()<br/>
Removes the login ticket from Storage. Removes the login ticket from Storage.
- `saveTicketAuth()`<br/> - **saveTicketAuth**()<br/>
Saves the AUTH ticket in the Storage. Saves the AUTH ticket in the Storage.
- `saveTicketBpm()`<br/> - **saveTicketBpm**()<br/>
Saves the BPM ticket in the Storage. Saves the BPM ticket in the Storage.
- `saveTicketEcm()`<br/> - **saveTicketEcm**()<br/>
Saves the ECM ticket in the Storage. Saves the ECM ticket in the Storage.
- `saveTickets()`<br/> - **saveTickets**()<br/>
Saves the ECM and BPM ticket in the Storage. Saves the ECM and BPM ticket in the Storage.
- `setRedirectUrl(url: RedirectionModel = null)`<br/> - **setRedirect**(url: [`RedirectionModel`](../../lib/core/models/redirection.model.ts) = `null`)<br/>
Sets the URL to redirect to after login. Sets the URL to redirect to after login.
- `url: RedirectionModel = null` - URL to redirect to - _url:_ [`RedirectionModel`](../../lib/core/models/redirection.model.ts) - URL to redirect to
## Details ## Details
+6 -3
View File
@@ -7,6 +7,7 @@ Shows how to write a Markdown file for a component.
<!-- Most doc files don't need a table of contents. Delete this part unless <!-- Most doc files don't need a table of contents. Delete this part unless
you have added about five subsections in the Details part. you have added about five subsections in the Details part.
--> -->
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it--> <!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc --> <!-- toc -->
@@ -16,6 +17,7 @@ you have added about five subsections in the Details part.
<!-- markdown-toc end --> <!-- markdown-toc end -->
## Basic Usage ## Basic Usage
<!-- Delete any Basic Usage parts that you don't need (eg, some components don't <!-- Delete any Basic Usage parts that you don't need (eg, some components don't
have any properties). --> have any properties). -->
@@ -31,14 +33,14 @@ have any properties). -->
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default | Description |
| --- | --- | --- | --- | | ---- | ---- | ------- | ----------- |
| prop1 | string | 'hello' | The property description in the table should be no more than a few sentences. Add extra description in the Details section if you need to. | | prop1 | string | 'hello' | The property description in the table should be no more than a few sentences. Add extra description in the Details section if you need to. |
| prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default value blank if appropriate. | | prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default value blank if appropriate. |
### Events ### Events
| Name | Description | | Name | Description |
| --- | --- | | ---- | ----------- |
| someEvent | Keep description short for the table. Usually starts with "Emitted when..." | | someEvent | Keep description short for the table. Usually starts with "Emitted when..." |
| anotherEvent | Emitted when the user double-clicks a list node | | anotherEvent | Emitted when the user double-clicks a list node |
@@ -58,6 +60,7 @@ explanation. Add them as level 3 headings in the Details part only - to keep the
of the docs, you shouldn't normally add any new level 1 or 2 sections to the Markdown. of the docs, you shouldn't normally add any new level 1 or 2 sections to the Markdown.
<!-- 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 -->
<!-- seealso end --> <!-- seealso end -->
+4 -3
View File
@@ -13,7 +13,7 @@ Shows how to document a method.
## Properties ## Properties
| Name | Type | Default | Description | | Name | Type | Default | Description |
| --- | --- | --- | --- | | ---- | ---- | ------- | ----------- |
| prop1 | string | 'hello' | Many services don't need a properties table. Delete this section if you don't need it. | | prop1 | string | 'hello' | Many services don't need a properties table. Delete this section if you don't need it. |
| prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default blank if appropriate. | | prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default blank if appropriate. |
@@ -27,7 +27,7 @@ as necessary. Usually, the title should be derived from the Angular name with th
if it looks wrong to you. if it looks wrong to you.
The main difference between service and component docs is that services usually have methods. Replace The main difference between service and component docs is that services usually have methods. Replace
the method signature and description with your own text but keep the &lt;br&gt; at the end of the the method signature and description with your own text but keep the &lt;br> at the end of the
signature line. signature line.
### Subsection ### Subsection
@@ -37,6 +37,7 @@ explanation. Add them as level 3 headings in the Details part only - to keep the
of the docs, you shouldn't normally add any new level 1 or 2 sections to the Markdown. of the docs, you shouldn't normally add any new level 1 or 2 sections to the Markdown.
<!-- 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 -->
<!-- seealso end --> <!-- seealso end -->
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Bpm User model # Bpm User model
Contains information about a Process Services user. Contains information about a Process Services user.
+3 -3
View File
@@ -12,10 +12,10 @@ Gets information about the current Process Services user.
### Methods ### Methods
- `getCurrentUserInfo(): Observable<BpmUserModel>`<br/> - **getCurrentUserInfo**(): [`Observable<BpmUserModel>`](../core/bpm-user.model.md)<br/>
Gets information about the current user. Gets information about the current user.
- **Returns** `Observable<BpmUserModel>` - User information object - **Returns** [`Observable<BpmUserModel>`](../core/bpm-user.model.md) - User information object
- `getCurrentUserProfileImage(): string`<br/> - **getCurrentUserProfileImage**(): `string`<br/>
Gets the current user's profile image as a URL. Gets the current user's profile image as a URL.
- **Returns** `string` - URL string - **Returns** `string` - URL string
+4 -6
View File
@@ -2,6 +2,7 @@
Added: v2.4.0 Added: v2.4.0
Status: Active Status: Active
--- ---
# Buttons Menu Component # Buttons Menu Component
Displays buttons on a responsive menu. Displays buttons on a responsive menu.
@@ -15,6 +16,7 @@ This component shows buttons on a responsive menu that changes depending on the
[buttons]="buttons"> [buttons]="buttons">
</adf-buttons-action-menu> </adf-buttons-action-menu>
``` ```
You will need to declare all the buttons that you want to have inside your menu in the parent component. You will need to declare all the buttons that you want to have inside your menu in the parent component.
```ts ```ts
@@ -55,13 +57,13 @@ buttons: MenuButton[] = [];
### Buttons Menu Component ### Buttons Menu Component
| Name | Type | Description | | Name | Type | Description |
| --- | --- | -- | | ---- | ---- | ----------- |
| buttons | `MenuButton []` | The array that contains all the buttons for the menu | | buttons | `MenuButton []` | The array that contains all the buttons for the menu |
### Button Model ### Button Model
| Name | Type | Description | | Name | Type | Description |
| --- | --- | -- | | ---- | ---- | ----------- |
| label | `string` | Label to display for the button. | | label | `string` | Label to display for the button. |
| icon | `string` | Icon to display for the button. | | icon | `string` | Icon to display for the button. |
| handler | `function` | Callback for the event handler once the button is clicked. | | handler | `function` | Callback for the event handler once the button is clicked. |
@@ -69,7 +71,6 @@ buttons: MenuButton[] = [];
| id | `string` | Id of the button. | | id | `string` | Id of the button. |
| isVisible | `function` | Variable to define if button is visible or hidden. This function must return a boolean parameter. For instance, if it returns true the button will be visible. If it returns false the button will be hiden. | | isVisible | `function` | Variable to define if button is visible or hidden. This function must return a boolean parameter. For instance, if it returns true the button will be visible. If it returns false the button will be hiden. |
## Details ## Details
This component uses [Angular Material](https://material.angular.io/) to style the menu. This component uses [Angular Material](https://material.angular.io/) to style the menu.
@@ -85,6 +86,3 @@ Menu Button Model
## See also ## See also
- [Menu Button Model](./menu-button.model.md) - [Menu Button Model](./menu-button.model.md)
+13 -13
View File
@@ -6,27 +6,27 @@ Last reviewed: 2018-05-08
# Card Item Type service # Card Item Type service
Maps type names to field component types for the Card View component. Maps type names to field component types for the [Card View component](../core/card-view.component.md).
## Class members ## Class members
### Methods ### Methods
- `getComponentTypeResolver(type: string = null, defaultValue: Type<__type> = this.defaultValue): DynamicComponentResolveFunction`<br/> - **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `DynamicComponentResolveFunction`<br/>
Gets the currently active ComponentTypeResolver function for a field type. Gets the currently active ComponentTypeResolver function for a field type.
- `type: string = null` - The type whose resolver you want - _type:_ `string` - The type whose resolver you want
- `defaultValue: Type<__type> = this.defaultValue` - Default type returned for types that are not yet mapped - _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
- **Returns** `DynamicComponentResolveFunction` - Resolver function - **Returns** `DynamicComponentResolveFunction` - Resolver function
- `resolveComponentType(model: DynamicComponentModel = null, defaultValue: Type<__type> = this.defaultValue): Type<__type>`<br/> - **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
Finds the component type that is needed to render a form field. Finds the component type that is needed to render a form field.
- `model: DynamicComponentModel = null` - (form-field.model.md) for the field to render - _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - (form-field.model.md) for the field to render
- `defaultValue: Type<__type> = this.defaultValue` - Default type returned for field types that are not yet mapped. - _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
- **Returns** `Type<__type>` - Component type - **Returns** `Type<__type>` - Component type
- `setComponentTypeResolver(type: string = null, resolver: DynamicComponentResolveFunction = null, override: boolean = false)`<br/> - **setComponentTypeResolver**(type: `string` = `null`, resolver: `DynamicComponentResolveFunction` = `null`, override: `boolean` = `true`)<br/>
Sets or optionally replaces a ComponentTypeResolver function for a field type. Sets or optionally replaces a ComponentTypeResolver function for a field type.
- `type: string = null` - The type whose resolver you want to set - _type:_ `string` - The type whose resolver you want to set
- `resolver: DynamicComponentResolveFunction = null` - The new resolver function - _resolver:_ `DynamicComponentResolveFunction` - The new resolver function
- `override: boolean = false` - The new resolver will only replace an existing one if this parameter is true - _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
## Details ## Details
@@ -51,8 +51,8 @@ The default mapping is shown below:
You can define your own custom field types for the Card View (see the You can define your own custom field types for the Card View (see the
[Card View Item interface](card-view-item.interface.md) page for full details of how to do this). [Card View Item interface](card-view-item.interface.md) page for full details of how to do this).
When you have defined the field component, you need to register it with the Card Item Type service When you have defined the field component, you need to register it with the [Card Item Type service](../../lib/core/card-view/services/card-item-types.service.ts)
so that the Card View component can make use of it: so that the [Card View component](../core/card-view.component.md) can make use of it:
```ts ```ts
@Component({ @Component({
+10 -10
View File
@@ -6,7 +6,7 @@ Last reviewed: 2018-05-08
# Card View Item interface # Card View Item interface
Defines the implementation of an item in a Card View component. Defines the implementation of an item in a [Card View component](../core/card-view.component.md).
## Definition ## Definition
@@ -34,7 +34,7 @@ export interface CardViewItem {
| displayValue | string | "" | The value to display | | displayValue | string | "" | The value to display |
| editable | boolean | false | Toggles whether the item is editable | | editable | boolean | false | Toggles whether the item is editable |
| clickable | boolean | false | Toggles whether the item is clickable | | clickable | boolean | false | Toggles whether the item is clickable |
| icon | string | | The material icon to show beside clickable items | | icon | string | | The material icon to show beside clickable items |
## Details ## Details
@@ -45,10 +45,10 @@ component for a custom item type.
For example, follow the steps given below to add a **stardate** type to display Captain For example, follow the steps given below to add a **stardate** type to display Captain
Picard's birthday (47457.1): Picard's birthday (47457.1):
1. Define the model for the custom type. 1. Define the model for the custom type.
Your model must extend the `CardViewBaseItemModel` class and implement the `CardViewItem` Your model must extend the [`CardViewBaseItemModel`](../../lib/core/card-view/models/card-view-baseitem.model.ts) class and implement the [`CardViewItem`](../../lib/core/card-view/interfaces/card-view-item.interface.ts)
and `DynamicComponentModel` interfaces. See the and [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) interfaces. See the
[Card View Text Item model source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts) [Card View Text Item model source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts)
for an example of how to do this. for an example of how to do this.
@@ -69,7 +69,7 @@ Picard's birthday (47457.1):
} }
``` ```
2. Define the component for the custom type. 2. Define the component for the custom type.
The selector is not important given that this is a dynamically loaded component. The selector is not important given that this is a dynamically loaded component.
You can choose any name for the selector, but it makes sense to follow the Angular standards. You can choose any name for the selector, but it makes sense to follow the Angular standards.
@@ -104,7 +104,7 @@ Picard's birthday (47457.1):
[Card View Date Item component source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts) for examples of how to make the field [Card View Date Item component source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts) for examples of how to make the field
editable. editable.
3. Add your custom component to your module's `entryComponents` list. 3. Add your custom component to your module's `entryComponents` list.
You must register your component in your module's `entryComponents` array You must register your component in your module's `entryComponents` array
to enable Angular to load it dynamically: to enable Angular to load it dynamically:
@@ -123,7 +123,7 @@ Picard's birthday (47457.1):
export class MyModule {} export class MyModule {}
``` ```
4. Bind your custom component to the custom model type so that Angular's dynamic component 4. Bind your custom component to the custom model type so that Angular's dynamic component
loader can find it. loader can find it.
```ts ```ts
@@ -146,5 +146,5 @@ Picard's birthday (47457.1):
## See also ## See also
- [Card View component](card-view.component.md) - [Card View component](card-view.component.md)
- [Card Item Types service](card-item-types.service.md) - [Card Item Types service](card-item-types.service.md)
+8 -7
View File
@@ -2,13 +2,14 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Card View Update service # Card View Update service
Reports edits and clicks within fields of a Card View component. Reports edits and clicks within fields of a [Card View component](../core/card-view.component.md).
## Details ## Details
You can use the Card View Update service to respond to edits and clicks within items on You can use the [Card View Update service](../core/card-view-update.service.md) to respond to edits and clicks within items on
a card view. This might involve updating application data to reflect the changes made to a card view. This might involve updating application data to reflect the changes made to
the view or could simply be a matter of highlighting a clicked item. the view or could simply be a matter of highlighting a clicked item.
@@ -52,7 +53,7 @@ constructor(private cardViewUpdateService: CardViewUpdateService) {
} }
``` ```
The constructor here also sets the `CardViewTextItemModel` instances that define the layout of the The constructor here also sets the [`CardViewTextItemModel`](../../lib/core/card-view/models/card-view-textitem.model.ts) instances that define the layout of the
card view (see the [Card View component](card-view.component.md) for further information card view (see the [Card View component](card-view.component.md) for further information
about this). The model objects and the `key` property are used to identify which item has been clicked about this). The model objects and the `key` property are used to identify which item has been clicked
or updated when an event occurs. or updated when an event occurs.
@@ -74,7 +75,7 @@ called after updates and clicks, respectively.
### Responding to updates ### Responding to updates
The update function is passed a parameter of type `UpdateNotification`: The update function is passed a parameter of type [`UpdateNotification`](../../lib/core/card-view/services/card-view-update.service.ts):
```ts ```ts
export interface UpdateNotification { export interface UpdateNotification {
@@ -83,8 +84,8 @@ export interface UpdateNotification {
} }
``` ```
Here, `target` contains the `CardViewTextItemModel` that was used to initialize Here, `target` contains the [`CardViewTextItemModel`](../../lib/core/card-view/models/card-view-textitem.model.ts) that was used to initialize
the field in question (in practice, this might be a `CardViewDateItemModel` or `CardViewMapItemModel` if the field in question (in practice, this might be a [`CardViewDateItemModel`](../../lib/core/card-view/models/card-view-dateitem.model.ts) or [`CardViewMapItemModel`](../../lib/core/card-view/models/card-view-mapitem.model.ts) if
the card layout includes these objects). The `changed` property contains an object with a single property: the card layout includes these objects). The `changed` property contains an object with a single property:
```ts ```ts
@@ -112,7 +113,7 @@ on the [Card View component](card-view.component.md) itself.
### Responding to clicks ### Responding to clicks
The click function is passed a `ClickNotification` object, which is similar to `UpdateNotification` described above, The click function is passed a [`ClickNotification`](../../lib/core/card-view/services/card-view-update.service.ts) object, which is similar to [`UpdateNotification`](../../lib/core/card-view/services/card-view-update.service.ts) described above,
but without the `changed` property. Use the `target` property to identify the item that was clicked: but without the `changed` property. Use the `target` property to identify the item that was clicked:
```ts ```ts
+10 -10
View File
@@ -86,11 +86,11 @@ Defining properties from Typescript:
| -- | -- | -- | -- | | -- | -- | -- | -- |
| displayEmpty | `boolean` | true | Toggles whether or not to show empty items in non-editable mode. | | displayEmpty | `boolean` | true | Toggles whether or not to show empty items in non-editable mode. |
| editable | `boolean` | | Toggles whether or not the items can be edited. | | editable | `boolean` | | Toggles whether or not the items can be edited. |
| properties | `CardViewItem[]` | | (**required**) Items to show in the card view. | | properties | [`CardViewItem[]`](../../lib/core/card-view/interfaces/card-view-item.interface.ts) | | (**required**) Items to show in the card view. |
## Details ## Details
You define the property list, the CardViewComponent does the rest. Each property represents a card view item (a row) in the card view component. The following item types are available by default: You define the property list, the [`CardViewComponent`](../core/card-view.component.md) does the rest. Each property represents a card view item (a row) in the [card view component](../core/card-view.component.md). The following item types are available by default:
- [**CardViewTextItemModel**](#card-text-item) - _for text items_ - [**CardViewTextItemModel**](#card-text-item) - _for text items_
- [**CardViewMapItemModel**](#card-map-item) - _for map items_ - [**CardViewMapItemModel**](#card-map-item) - _for map items_
@@ -139,12 +139,12 @@ clicked item.
The `properties` array contains instances of models that represent the layout of the Card View. The `properties` array contains instances of models that represent the layout of the Card View.
The ordering of the models in the array matches the ordering of items in the view. Each of the The ordering of the models in the array matches the ordering of items in the view. Each of the
models extends the abstract `CardViewBaseItemModel` class to add functionality for models extends the abstract [`CardViewBaseItemModel`](../../lib/core/card-view/models/card-view-baseitem.model.ts) class to add functionality for
specific data types, as described below. specific data types, as described below.
#### Card Text Item #### Card Text Item
`CardViewTextItemModel` is a property type for text properties. [`CardViewTextItemModel`](../../lib/core/card-view/models/card-view-textitem.model.ts) is a property type for text properties.
```ts ```ts
const textItemProperty = new CardViewTextItemModel(options); const textItemProperty = new CardViewTextItemModel(options);
@@ -185,7 +185,7 @@ new CardViewTextItemModel({
#### Card Map Item #### Card Map Item
`CardViewMapItemModel` is a property type for map properties. [`CardViewMapItemModel`](../../lib/core/card-view/models/card-view-mapitem.model.ts) is a property type for map properties.
```ts ```ts
const mapItemProperty = new CardViewMapItemModel(options); const mapItemProperty = new CardViewMapItemModel(options);
@@ -202,7 +202,7 @@ const mapItemProperty = new CardViewMapItemModel(options);
#### Card Date Item #### Card Date Item
`CardViewDateItemModel` is a property type for date properties. [`CardViewDateItemModel`](../../lib/core/card-view/models/card-view-dateitem.model.ts) is a property type for date properties.
```ts ```ts
const dateItemProperty = new CardViewDateItemModel(options); const dateItemProperty = new CardViewDateItemModel(options);
@@ -220,7 +220,7 @@ const dateItemProperty = new CardViewDateItemModel(options);
#### Card Datetime Item #### Card Datetime Item
`CardViewDatetimeItemModel` is a property type for datetime properties. [`CardViewDatetimeItemModel`](../../lib/core/card-view/models/card-view-datetimeitem.model.ts) is a property type for datetime properties.
```ts ```ts
const datetimeItemProperty = new CardViewDatetimeItemModel(options); const datetimeItemProperty = new CardViewDatetimeItemModel(options);
@@ -238,7 +238,7 @@ const datetimeItemProperty = new CardViewDatetimeItemModel(options);
#### Card Bool Item #### Card Bool Item
`CardViewBoolItemModel` is a property type for boolean properties. [`CardViewBoolItemModel`](../../lib/core/card-view/models/card-view-boolitem.model.ts) is a property type for boolean properties.
```ts ```ts
const boolItemProperty = new CardViewBoolItemModel(options); const boolItemProperty = new CardViewBoolItemModel(options);
@@ -255,7 +255,7 @@ const boolItemProperty = new CardViewBoolItemModel(options);
#### Card Int Item #### Card Int Item
`CardViewIntItemModel` is a property type for integer properties. [`CardViewIntItemModel`](../../lib/core/card-view/models/card-view-intitem.model.ts) is a property type for integer properties.
```ts ```ts
const intItemProperty = new CardViewIntItemModel(options); const intItemProperty = new CardViewIntItemModel(options);
@@ -272,7 +272,7 @@ const intItemProperty = new CardViewIntItemModel(options);
#### Card Float Item #### Card Float Item
`CardViewFloatItemModel` is a property type for float properties. [`CardViewFloatItemModel`](../../lib/core/card-view/models/card-view-floatitem.model.ts) is a property type for float properties.
```ts ```ts
const floatItemProperty = new CardViewFloatItemModel(options); const floatItemProperty = new CardViewFloatItemModel(options);
+7 -7
View File
@@ -12,15 +12,15 @@ Adds and retrieves comments for nodes in Content Services.
### Methods ### Methods
- `addNodeComment(nodeId: string = null, message: string = null): Observable<CommentModel>`<br/> - **addNodeComment**(nodeId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/>
Adds a comment to a node. Adds a comment to a node.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- `message: string = null` - Text for the comment - _message:_ `string` - Text for the comment
- **Returns** `Observable<CommentModel>` - Details of the comment added - **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details of the comment added
- `getNodeComments(nodeId: string = null): Observable<CommentModel[]>`<br/> - **getNodeComments**(nodeId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/>
Gets all comments that have been added to a node. Gets all comments that have been added to a node.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- **Returns** `Observable<CommentModel[]>` - Details for each comment - **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment
## Details ## Details
+6 -5
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Comment list component # Comment list component
Shows a list of comments. Shows a list of comments.
@@ -47,7 +48,7 @@ export class SomeComponent implements OnInit {
} }
``` ```
In the component template use the comment list component: In the component template use the [comment list component](../core/comment-list.component.md):
```html ```html
<adf-comment-list <adf-comment-list
@@ -61,11 +62,11 @@ In the component template use the comment list component:
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| comments | `any[]` | | The comments data used to populate the list. | | comments | [`CommentModel[]`](../../lib/core/models/comment.model.ts) | | The comments data used to populate the list. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| clickRow | `EventEmitter<any>` | Emitted when the user clicks on one of the comment rows. | | clickRow | [`EventEmitter<CommentModel>`](../../lib/core/models/comment.model.ts) | Emitted when the user clicks on one of the comment rows. |
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Comment Process model # Comment Process model
Represents a comment added to a Process Services task or process instance. Represents a comment added to a Process Services task or process instance.
+14 -14
View File
@@ -12,24 +12,24 @@ Adds and retrieves comments for task and process instances in Process Services.
### Methods ### Methods
- `addProcessInstanceComment(processInstanceId: string = null, message: string = null): Observable<CommentModel>`<br/> - **addProcessInstanceComment**(processInstanceId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/>
Adds a comment to a process instance. Adds a comment to a process instance.
- `processInstanceId: string = null` - ID of the target process instance - _processInstanceId:_ `string` - ID of the target process instance
- `message: string = null` - Text for the comment - _message:_ `string` - Text for the comment
- **Returns** `Observable<CommentModel>` - Details of the comment added - **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details of the comment added
- `addTaskComment(taskId: string = null, message: string = null): Observable<CommentModel>`<br/> - **addTaskComment**(taskId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/>
Adds a comment to a task. Adds a comment to a task.
- `taskId: string = null` - ID of the target task - _taskId:_ `string` - ID of the target task
- `message: string = null` - Text for the comment - _message:_ `string` - Text for the comment
- **Returns** `Observable<CommentModel>` - Details about the comment - **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details about the comment
- `getProcessInstanceComments(processInstanceId: string = null): Observable<CommentModel[]>`<br/> - **getProcessInstanceComments**(processInstanceId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/>
Gets all comments that have been added to a process instance. Gets all comments that have been added to a process instance.
- `processInstanceId: string = null` - ID of the target process instance - _processInstanceId:_ `string` - ID of the target process instance
- **Returns** `Observable<CommentModel[]>` - Details for each comment - **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment
- `getTaskComments(taskId: string = null): Observable<CommentModel[]>`<br/> - **getTaskComments**(taskId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/>
Gets all comments that have been added to a task. Gets all comments that have been added to a task.
- `taskId: string = null` - ID of the target task - _taskId:_ `string` - ID of the target task
- **Returns** `Observable<CommentModel[]>` - Details for each comment - **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment
## Details ## Details
+6 -5
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Comments Component # Comments Component
Displays comments from users involved in a specified task or content and allows an involved user to add a comment to a task or a content. Displays comments from users involved in a specified task or content and allows an involved user to add a comment to a task or a content.
@@ -31,13 +32,13 @@ Displays comments from users involved in a specified task or content and allows
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| taskId | `string` | | The numeric ID of the task. | | nodeId | `string` | | The numeric ID of the node. |
| nodeId | `string` | | The ID of the node. | | readOnly | `boolean` | false | Are the comments read only? |
| readOnly | `boolean` | `false` | Are the comments read only? | | taskId | `string` | | The numeric ID of the task. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs while displaying/adding a comment. | | error | `EventEmitter<any>` | Emitted when an error occurs while displaying/adding a comment. |
+35 -35
View File
@@ -12,62 +12,62 @@ Accesses app-generated data objects via URLs and file downloads.
### Methods ### Methods
- `createFolder(relativePath: string = null, name: string = null, parentId?: string = null): Observable<FolderCreatedEvent>`<br/> - **createFolder**(relativePath: `string` = `null`, name: `string` = `null`, parentId?: `string` = `null`): [`Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts)<br/>
Creates a folder. Creates a folder.
- `relativePath: string = null` - Location to create the folder - _relativePath:_ `string` - Location to create the folder
- `name: string = null` - Folder name - _name:_ `string` - Folder name
- `parentId?: string = null` - (Optional) Node ID of parent folder - _parentId:_ `string` - (Optional) Node ID of parent folder
- **Returns** `Observable<FolderCreatedEvent>` - Information about the new folder - **Returns** [`Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts) - Information about the new folder
- `createTrustedUrl(blob: Blob = null): string`<br/> - **createTrustedUrl**(blob: `Blob` = `null`): `string`<br/>
Creates a trusted object URL from the Blob. WARNING: calling this method with untrusted user data exposes your application to XSS security risks! Creates a trusted object URL from the Blob. WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
- `blob: Blob = null` - Data to wrap into object URL - _blob:_ `Blob` - Data to wrap into object URL
- **Returns** `string` - URL string - **Returns** `string` - URL string
- `downloadBlob(blob: Blob = null, fileName: string = null)`<br/> - **downloadBlob**(blob: `Blob` = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a Blob with a file name. Invokes content download for a Blob with a file name.
- `blob: Blob = null` - Content to download. - _blob:_ `Blob` - Content to download.
- `fileName: string = null` - Name of the resulting file. - _fileName:_ `string` - Name of the resulting file.
- `downloadData(data: any = null, fileName: string = null)`<br/> - **downloadData**(data: `any` = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a data array with a file name. Invokes content download for a data array with a file name.
- `data: any = null` - Data to download. - _data:_ `any` - Data to download.
- `fileName: string = null` - Name of the resulting file. - _fileName:_ `string` - Name of the resulting file.
- `downloadJSON(json: any = null, fileName: string = null)`<br/> - **downloadJSON**(json: `any` = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a JSON object with a file name. Invokes content download for a JSON object with a file name.
- `json: any = null` - JSON object to download. - _json:_ `any` - JSON object to download.
- `fileName: string = null` - Name of the resulting file. - _fileName:_ `string` - Name of the resulting file.
- `getContentUrl(node: any = null, attachment?: boolean = null, ticket?: string = null): string`<br/> - **getContentUrl**(node: `any` = `null`, attachment?: `boolean` = `null`, ticket?: `string` = `null`): `string`<br/>
Gets a content URL for the given node. Gets a content URL for the given node.
- `node: any = null` - Node to get URL for. - _node:_ `any` - Node to get URL for.
- `attachment?: boolean = null` - (Optional) Toggles whether to retrieve content as an attachment for download - _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
- `ticket?: string = null` - (Optional) Custom ticket to use for authentication - _ticket:_ `string` - (Optional) Custom ticket to use for authentication
- **Returns** `string` - URL string - **Returns** `string` - URL string
- `getDocumentThumbnailUrl(node: any = null, attachment?: boolean = null, ticket?: string = null): string`<br/> - **getDocumentThumbnailUrl**(node: `any` = `null`, attachment?: `boolean` = `null`, ticket?: `string` = `null`): `string`<br/>
Gets a thumbnail URL for the given document node. Gets a thumbnail URL for the given document node.
- `node: any = null` - Node to get URL for. - _node:_ `any` - Node to get URL for.
- `attachment?: boolean = null` - (Optional) Toggles whether to retrieve content as an attachment for download - _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
- `ticket?: string = null` - (Optional) Custom ticket to use for authentication - _ticket:_ `string` - (Optional) Custom ticket to use for authentication
- **Returns** `string` - URL string - **Returns** `string` - URL string
- `getNode(nodeId: string = null, opts?: any = null): Observable<NodeEntry>`<br/> - **getNode**(nodeId: `string` = `null`, opts?: `any` = `null`): `Observable<NodeEntry>`<br/>
Gets a Node via its node ID. Gets a Node via its node ID.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- `opts?: any = null` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<NodeEntry>` - Details of the folder - **Returns** `Observable<NodeEntry>` - Details of the folder
- `getNodeContent(nodeId: string = null): Observable<any>`<br/> - **getNodeContent**(nodeId: `string` = `null`): `Observable<any>`<br/>
Gets content for the given node. Gets content for the given node.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- **Returns** `Observable<any>` - Content data - **Returns** `Observable<any>` - Content data
- `hasAllowableOperations(node: any = null): boolean`<br/> - **hasAllowableOperations**(node: `any` = `null`): `boolean`<br/>
Checks if the node has the properties allowableOperations Checks if the node has the properties allowableOperations
- `node: any = null` - Node to check allowableOperations - _node:_ `any` - Node to check allowableOperations
- **Returns** `boolean` - True if the node has the property, false otherwise - **Returns** `boolean` - True if the node has the property, false otherwise
- `hasPermission(node: Node = null, permission: PermissionsEnum | string = null): boolean`<br/> - **hasPermission**(node: `Node` = `null`, permission: `PermissionsEnum | string` = `null`): `boolean`<br/>
Checks if the user has permissions on that node Checks if the user has permissions on that node
- `node: Node = null` - Node to check allowableOperations - _node:_ `Node` - Node to check allowableOperations
- `permission: PermissionsEnum | string = null` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions - _permission:_ `PermissionsEnum | string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- **Returns** `boolean` - True if the user has the required permissions, false otherwise - **Returns** `boolean` - True if the user has the required permissions, false otherwise
## Details ## Details
Use the Content service to deliver data to the user from `Blob` objects. Use the [Content service](../core/content.service.md) to deliver data to the user from `Blob` objects.
The [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class The [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class
(implemented in the browser, not ADF) represents an array of bytes that you can (implemented in the browser, not ADF) represents an array of bytes that you can
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# APS Content Component # APS Content Component
Shows the content preview. Shows the content preview.
+10 -8
View File
@@ -12,19 +12,21 @@ Stores key-value data items as browser cookies.
### Methods ### Methods
- `getItem(key: string = null): string | null`<br/> - **clear**()<br/>
- **getItem**(key: `string` = `null`): `string | null`<br/>
Retrieves a cookie by its key. Retrieves a cookie by its key.
- `key: string = null` - Key to identify the cookie - _key:_ `string` - Key to identify the cookie
- **Returns** `string | null` - The cookie data or null if it is not found - **Returns** `string | null` - The cookie data or null if it is not found
- `isEnabled(): boolean`<br/> - **isEnabled**(): `boolean`<br/>
Checks if cookies are enabled. Checks if cookies are enabled.
- **Returns** `boolean` - True if enabled, false otherwise - **Returns** `boolean` - True if enabled, false otherwise
- `setItem(key: string = null, data: string = null, expiration: Date | null = null, path: string | null = null)`<br/> - **setItem**(key: `string` = `null`, data: `string` = `null`, expiration: `Date | null` = `null`, path: `string | null` = `null`)<br/>
Sets a cookie. Sets a cookie.
- `key: string = null` - Key to identify the cookie - _key:_ `string` - Key to identify the cookie
- `data: string = null` - Data value to set for the cookie - _data:_ `string` - Data value to set for the cookie
- `expiration: Date | null = null` - Expiration date of the data - _expiration:_ `Date | null` - Expiration date of the data
- `path: string | null = null` - "Pathname" to store the cookie - _path:_ `string | null` - "Pathname" to store the cookie
## Details ## Details
+6 -5
View File
@@ -17,6 +17,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
- [Details](#details) - [Details](#details)
- [Conditional visibility](#conditional-visibility)
- [Automatic column header translation](#automatic-column-header-translation) - [Automatic column header translation](#automatic-column-header-translation)
- [Custom tooltips](#custom-tooltips) - [Custom tooltips](#custom-tooltips)
- [Column Template](#column-template) - [Column Template](#column-template)
@@ -69,7 +70,7 @@ You can use `ngIf` directives to provide conditional visibility support for the
### Automatic column header translation ### Automatic column header translation
You can use i18n resource keys with DataColumn `title` property. You can use i18n resource keys with [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) `title` property.
The component will automatically check the corresponding i18n resources and fetch corresponding value. The component will automatically check the corresponding i18n resources and fetch corresponding value.
```html ```html
@@ -122,9 +123,9 @@ Every cell in the DataTable component is bound to the dynamic data context conta
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| data | [DataTableAdapter](datatable-adapter.interface.md) | Data adapter instance. | | data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | Data adapter instance. |
| row | [DataRow](datatable-adapter.interface.md) | Current data row instance. | | row | [`DataRow`](../../lib/core/datatable/data/data-row.model.ts) | Current data row instance. |
| col | [DataColumn](datatable-adapter.interface.md) | Current data column instance. | | col | [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) | Current data column instance. |
You can use all three properties to gain full access to underlying data from within your custom templates. You can use all three properties to gain full access to underlying data from within your custom templates.
In order to wire HTML templates with the data context you will need defining a variable that is bound to `$implicit` like shown below: In order to wire HTML templates with the data context you will need defining a variable that is bound to `$implicit` like shown below:
@@ -137,7 +138,7 @@ In order to wire HTML templates with the data context you will need defining a v
The format of naming is `let-VARIABLE_NAME="$implicit"` where `VARIABLE_NAME` is the name of the variable you want to bind template data context to. The format of naming is `let-VARIABLE_NAME="$implicit"` where `VARIABLE_NAME` is the name of the variable you want to bind template data context to.
Getting a cell value from the underlying DataTableAdapter: Getting a cell value from the underlying [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts):
```ts ```ts
context.data.getValue(entry.row, entry.col); context.data.getValue(entry.row, entry.col);
+19 -18
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# DataTableAdapter interface # DataTableAdapter interface
Defines how table data is supplied to [DataTable](datatable.component.md) Defines how table data is supplied to [DataTable](datatable.component.md)
@@ -10,17 +11,17 @@ and [Tasklist](../process-services/task-list.component.md) components.
## Properties ## Properties
| Name | Type | Description | | Name | Type | Description |
| --- | --- | --- | | ---- | ---- | ----------- |
| selectedRow | DataRow | The data for the currently selected row. | | selectedRow | DataRow | The data for the currently selected row. |
## Methods ## Methods
`getRows(): Array<DataRow>;`<br/> [`getRows(): Array<DataRow>;`](../../lib/core/datatable/data/data-row.model.ts)<br/>
`setRows(rows: Array<DataRow>): void;`<br/> [`setRows(rows: Array<DataRow>): void;`](../../lib/core/datatable/data/data-row.model.ts)<br/>
Get/set the values for display in the table using an array of rows. Get/set the values for display in the table using an array of rows.
`getColumns(): Array<DataColumn>;`<br/> [`getColumns(): Array<DataColumn>;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
`setColumns(columns: Array<DataColumn>): void;`<br/> [`setColumns(columns: Array<DataColumn>): void;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
Get/set an array of column specifications. Get/set an array of column specifications.
`getValue(row: DataRow, col: DataColumn): any;`<br/> `getValue(row: DataRow, col: DataColumn): any;`<br/>
@@ -33,25 +34,24 @@ Get/set the sorting key and direction (ascending or descending).
`sort(key?: string, direction?: string): void;` `sort(key?: string, direction?: string): void;`
Sort the table with a specified key and direction (ascending or descending). Sort the table with a specified key and direction (ascending or descending).
## Details ## Details
You can implement DataTableAdapter in your own class to display your data with the [DataTable](datatable.component.md) You can implement [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) in your own class to display your data with the [DataTable](datatable.component.md)
and [Tasklist](../process-services/task-list.component.md) components. and [Tasklist](../process-services/task-list.component.md) components.
This interface (along with other interfaces for column and row data) hides the details of your class from the caller, so you can store your data internally however you like. The DataTable library implements the interface in the [ObjectDataTableAdapter](#objectdatatableadapter) class which is the standard adapter for the Datatable component. This interface (along with other interfaces for column and row data) hides the details of your class from the caller, so you can store your data internally however you like. The DataTable library implements the interface in the [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts) class which is the standard adapter for the Datatable component.
The basic idea of DataTableAdapter is that the caller can request your class to return an array of column The basic idea of [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) is that the caller can request your class to return an array of column
definition objects. Each of these objects specifies the unique key, name, type and other properties of a single column. definition objects. Each of these objects specifies the unique key, name, type and other properties of a single column.
The caller can also request the data values for the table as an array of row objects. The caller accesses the data from a row using a `getValue` method that returns the data from a specified column. This column is identified by the unique key that was set during the column definition. The caller can also request the data values for the table as an array of row objects. The caller accesses the data from a row using a `getValue` method that returns the data from a specified column. This column is identified by the unique key that was set during the column definition.
The data-hiding works the other way around when the caller needs to set data in the DataTableAdapter class - the internal The data-hiding works the other way around when the caller needs to set data in the [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) class - the internal
details of the caller's storage are hidden by the column and row interfaces. When the `setColumns` and `setRows` methods are details of the caller's storage are hidden by the column and row interfaces. When the `setColumns` and `setRows` methods are
called on the adapter, it can simply query the column/row objects it receives and then store the data in its own format. called on the adapter, it can simply query the column/row objects it receives and then store the data in its own format.
### Columns and rows ### Columns and rows
Columns are defined by the DataColumn interface: Columns are defined by the [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) interface:
```ts ```ts
interface DataColumn { interface DataColumn {
@@ -69,7 +69,7 @@ interface DataColumn {
An array of these objects is passed to your object when the `setColumns` method is called. The `key` property is used to identify columns and so each column's key should be unique. The `type` string can have a value of 'text', 'image' or 'date'. An array of these objects is passed to your object when the `setColumns` method is called. The `key` property is used to identify columns and so each column's key should be unique. The `type` string can have a value of 'text', 'image' or 'date'.
An array of DataRow objects is passed to your object when the `setRows` method is called: An array of [`DataRow`](../../lib/core/datatable/data/data-row.model.ts) objects is passed to your object when the `setRows` method is called:
```ts ```ts
interface DataRow { interface DataRow {
@@ -85,8 +85,8 @@ Each row contains a set of values. An item in the set is retrieved by passing it
### ObjectDataTableAdapter ### ObjectDataTableAdapter
The DataTable library provides a implementation of DataTableAdapter, called The DataTable library provides a implementation of [DataTableAdapter,](../../lib/core/datatable/data/datatable-adapter.ts) called
[ObjectDataTableAdapter](https://github.com/Alfresco/alfresco-ng2-components/blob/master/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts). This is a simple adapter that binds to object arrays and turns object fields into columns: [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts). This is a simple adapter that binds to object arrays and turns object fields into columns:
```ts ```ts
let data = new ObjectDataTableAdapter( let data = new ObjectDataTableAdapter(
@@ -143,13 +143,14 @@ let schema = ObjectDataTableAdapter.generateSchema(data);
} }
] ]
*/ */
``` ```
<!-- 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
- [Datatable component](datatable.component.md) - [Datatable component](datatable.component.md)
- [Task list component](../process-services/task-list.component.md) - [Task list component](../process-services/task-list.component.md)
<!-- seealso end --> <!-- seealso end -->
+28 -26
View File
@@ -16,6 +16,8 @@ See it live: [DataTable Quickstart](https://embed.plnkr.co/80qr4YFBeHjLMdAV0F6l/
- [Basic usage](#basic-usage) - [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties) - [Properties](#properties)
- [Events](#events) - [Events](#events)
@@ -128,42 +130,42 @@ export class DataTableDemo {
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| data | `DataTableAdapter` | | Data source for the table | | actions | `boolean` | false | Toggles the data actions column. |
| display | `string` | `DisplayMode.List` | Selects the display mode of the table. Can be "list" or "gallery". | | actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". |
| rows | `any[]` | `[]` | The rows that the datatable will show. | | allowDropFiles | `boolean` | false | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). |
| selectionMode | `string` | `'single'` | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. | | contextMenu | `boolean` | false | Toggles custom context menu for the component. |
| multiselect | `boolean` | `false` | Toggles multiple row selection, which renders checkboxes at the beginning of each row. | | data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source for the table |
| actions | `boolean` | `false` | Toggles the data actions column. | | display | `string` | [`DisplayMode`](../../lib/core/datatable/components/datatable/datatable.component.ts).List | Selects the display mode of the table. Can be "list" or "gallery". |
| actionsPosition | `string` | `'right'` | Position of the actions dropdown menu. Can be "left" or "right". | | fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. | | loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
| contextMenu | `boolean` | `false` | Toggles custom context menu for the component. | | multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
| allowDropFiles | `boolean` | `false` | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). | | noPermission | `boolean` | false | Flag that indicates if the datatable should show the "no permission" template. |
| rowStyle | `string` | | The inline style to apply to every row. See [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) docs for more details and usage examples. | | rowStyle | `string` | | The inline style to apply to every row. See [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) 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. |
| showHeader | `boolean` | `true` | Toggles the header. | | rows | `any[]` | \[] | The rows that the datatable will show. |
| loading | `boolean` | `false` | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). | | selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| noPermission | `boolean` | `false` | Flag that indicates if the datatable should show the "no permission" template. | | showHeader | `boolean` | true | Toggles the header. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| rowClick | `EventEmitter<DataRowEvent>` | Emitted when the user clicks a row. | | executeRowAction | [`EventEmitter<DataRowActionEvent>`](../../lib/core/datatable/components/datatable/data-row-action.event.ts) | Emitted when the user executes a row action. |
| rowDblClick | `EventEmitter<DataRowEvent>` | Emitted when the user double-clicks a row. | | rowClick | [`EventEmitter<DataRowEvent>`](../../lib/core/datatable/data/data-row-event.model.ts) | Emitted when the user clicks a row. |
| showRowContextMenu | `EventEmitter<DataCellEvent>` | Emitted before the context menu is displayed for a row. | | rowDblClick | [`EventEmitter<DataRowEvent>`](../../lib/core/datatable/data/data-row-event.model.ts) | Emitted when the user double-clicks a row. |
| showRowActionsMenu | `EventEmitter<DataCellEvent>` | Emitted before the actions menu is displayed for a row. | | showRowActionsMenu | [`EventEmitter<DataCellEvent>`](../../lib/core/datatable/components/datatable/data-cell.event.ts) | Emitted before the actions menu is displayed for a row. |
| executeRowAction | `EventEmitter<DataRowActionEvent>` | Emitted when the user executes a row action. | | showRowContextMenu | [`EventEmitter<DataCellEvent>`](../../lib/core/datatable/components/datatable/data-cell.event.ts) | Emitted before the context menu is displayed for a row. |
## Details ## Details
### Supplying data for the table ### Supplying data for the table
The column layout and row data are supplied to the table using an object that implements the The column layout and row data are supplied to the table using an object that implements the
DataTableAdapter interface. This interface hides the internal details of the class that provides [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) interface. This interface hides the internal details of the class that provides
the data, which gives a lot of flexibility in how the data can be stored and accessed. The DataTable the data, which gives a lot of flexibility in how the data can be stored and accessed. The DataTable
library includes a standard adapter class called `ObjectDataTableAdapter` that is useful in many library includes a standard adapter class called [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts) that is useful in many
common cases. See the [DataTableAdapter](datatable-adapter.interface.md) for full details about the interface and the `ObjectDataTableAdapter` class. common cases. See the [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) for full details about the interface and the [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts) class.
### Customizing columns ### Customizing columns
@@ -241,7 +243,7 @@ You can add a template that will be shown when there are no rows in your datatab
</adf-datatable> </adf-datatable>
``` ```
You can use the empty list component to show the default ADF empty template. You can use the [empty list component](../../lib/core/datatable/components/datatable/empty-list.component.ts) to show the default ADF empty template.
You can place any HTML layout or Angular component as content in the empty template section You can place any HTML layout or Angular component as content in the empty template section
by using the `<adf-empty-list-header>`, `<adf-empty-list-body>`, and `<adf-empty-list-footer>` by using the `<adf-empty-list-header>`, `<adf-empty-list-body>`, and `<adf-empty-list-footer>`
@@ -483,5 +485,5 @@ earlier), and perform the corresponding actions.
- [Data column component](data-column.component.md) - [Data column component](data-column.component.md)
- [Pagination component](pagination.component.md) - [Pagination component](pagination.component.md)
- [DataTableAdapter](datatable-adapter.interface.md) - [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts)
- [Document list component](../content-services/document-list.component.md) - [Document list component](../content-services/document-list.component.md)
+4 -4
View File
@@ -12,14 +12,14 @@ Gets a list of Content Services nodes currently in the trash.
### Methods ### Methods
- `getDeletedNodes(options?: Object = null): Observable<NodePaging>`<br/> - **getDeletedNodes**(options?: `Object` = `null`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
Gets a list of nodes in the trash. Gets a list of nodes in the trash.
- `options?: Object = null` - (Optional) Options for JSAPI call - _options:_ `Object` - (Optional) Options for JSAPI call
- **Returns** `Observable<NodePaging>` - List of nodes in the trash - **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of nodes in the trash
## Details ## Details
The `getDeletedNodes` method returns a NodePaging object that lists The `getDeletedNodes` method returns a [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts) object that lists
the items in the trash (see [Document Library model](../content-services/document-library.model.md) for the items in the trash (see [Document Library model](../content-services/document-library.model.md) for
more information about this class). The format of the `options` parameter is more information about this class). The format of the `options` parameter is
described in the [getDeletedNodes](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodesApi.md#getDeletedNodes) described in the [getDeletedNodes](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodesApi.md#getDeletedNodes)
+4 -4
View File
@@ -12,12 +12,12 @@ Gets version and license information for Process Services and Content Services.
### Methods ### Methods
- `getBpmProductInfo(): any`<br/> - **getBpmProductInfo**(): `Observable<any>`<br/>
Gets product information for Process Services. Gets product information for Process Services.
- **Returns** `any` - ProductVersionModel containing product details - **Returns** `Observable<any>` - ProductVersionModel containing product details
- `getEcmProductInfo(): any`<br/> - **getEcmProductInfo**(): `Observable<any>`<br/>
Gets product information for Content Services. Gets product information for Content Services.
- **Returns** `any` - ProductVersionModel containing product details - **Returns** `Observable<any>` - ProductVersionModel containing product details
## Details ## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Ecm User model # Ecm User model
Contains information about a Content Services user. Contains information about a Content Services user.
+8 -8
View File
@@ -12,23 +12,23 @@ Gets information about a Content Services user.
### Methods ### Methods
- `getCurrentUserInfo(): any`<br/> - **getCurrentUserInfo**(): [`Observable<EcmUserModel>`](../core/ecm-user.model.md)<br/>
Gets information about the user who is currently logged-in. Gets information about the user who is currently logged-in.
- **Returns** `any` - User information as for getUserInfo - **Returns** [`Observable<EcmUserModel>`](../core/ecm-user.model.md) - User information as for getUserInfo
- `getUserInfo(userName: string = null): Observable<EcmUserModel>`<br/> - **getUserInfo**(userName: `string` = `null`): [`Observable<EcmUserModel>`](../core/ecm-user.model.md)<br/>
Gets information about a user identified by their username. Gets information about a user identified by their username.
- `userName: string = null` - Target username - _userName:_ `string` - Target username
- **Returns** `Observable<EcmUserModel>` - User information - **Returns** [`Observable<EcmUserModel>`](../core/ecm-user.model.md) - User information
- `getUserProfileImage(avatarId: string = null): string`<br/> - **getUserProfileImage**(avatarId: `string` = `null`): `string`<br/>
Returns a profile image as a URL. Returns a profile image as a URL.
- `avatarId: string = null` - Target avatar - _avatarId:_ `string` - Target avatar
- **Returns** `string` - Image URL - **Returns** `string` - Image URL
## Details ## Details
The class returned by `getUserInfo` and `getCurrentUserInfo` is detailed The class returned by `getUserInfo` and `getCurrentUserInfo` is detailed
in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to
`getUserProfileImage` is available as a field of the `EcmUserModel` instance `getUserProfileImage` is available as a field of the [`EcmUserModel`](../core/ecm-user.model.md) instance
returned for a particular person. returned for a particular person.
See the See the
+1 -1
View File
@@ -11,7 +11,7 @@ Provides a generic "Empty Content" UI and can used as a placeholder for componen
## Properties ## Properties
| Name | Type | Description | | Name | Type | Description |
| --- | --- | --- | | ---- | ---- | ----------- |
| icon | string | Material Icon to use | | icon | string | Material Icon to use |
| title | string | String or Resource Key for the title | | title | string | String or Resource Key for the title |
| subtitle | string | String or Resource Key for the subtitle | | subtitle | string | String or Resource Key for the subtitle |
+5 -8
View File
@@ -4,7 +4,7 @@ Displays info about a specific error.
## Basic Usage ## Basic Usage
Once you have catched the error in your server you will need to redirect to ```/error/errorCode``` to display information about that error. Once you have catched the error in your server you will need to redirect to `/error/errorCode` to display information about that error.
```ts ```ts
this.router.navigate(['/error', errorCode]); this.router.navigate(['/error', errorCode]);
@@ -27,16 +27,16 @@ this.router.navigate(['/error', errorCode]);
### Error Content Component ### Error Content Component
| Name | Type | Description | | Name | Type | Description |
| --- | --- | -- | | ---- | ---- | ----------- |
| errorCode | string | Error code | | errorCode | string | Error code |
| errorTitle | string | Error title | | errorTitle | string | Error title |
| errorDescription | string | Short description about the error | | errorDescription | string | Short description about the error |
| errorLink | string | (Optional) This link will be attached at the end of the error description and itt will be highlighted.| | errorLink | string | (Optional) This link will be attached at the end of the error description and itt will be highlighted. |
## Details ## Details
You can customize your errors by adding them to the tranlate files inside ```lib/core/i18n```. You can customize your errors by adding them to the tranlate files inside `lib/core/i18n`.
```json ```json
"ERROR_CONTENT": { "ERROR_CONTENT": {
"HOME_BUTTON": "Back to home", "HOME_BUTTON": "Back to home",
@@ -58,6 +58,3 @@ You can customize your errors by adding them to the tranlate files inside ```lib
} }
} }
``` ```
+18 -4
View File
@@ -12,11 +12,25 @@ Gets a list of items a user has marked as their favorites.
### Methods ### Methods
- `getFavorites(personId: string = null, options?: any = null): Observable<NodePaging>`<br/> - **getFavorites**(personId: `string` = `null`, options?: `any` = `null`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
Gets the favorites for a user. Gets the favorites for a user.
- `personId: string = null` - ID of the user - _personId:_ `string` - ID of the user
- `options?: any = null` - (Optional) Options supported by JSAPI - _options:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<NodePaging>` - List of favorites - **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of favorites
- **remapFavoriteEntries**(entries: `any[]` = `null`): `any[]`<br/>
- _entries:_ `any[]` -
- **Returns** `any[]` -
- **remapFavoritesData**(data: `any` = `{}`): [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
- _data:_ `any` -
- **Returns** [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts) -
- **remapEntry**(\_\_namedParameters: `object` = `null`): `any`<br/>
- _\_\_namedParameters:_ `object` -
- **Returns** `any` -
## Details ## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# File Size pipe # File Size pipe
Converts a number of bytes to the equivalent in KB, MB, etc. Converts a number of bytes to the equivalent in KB, MB, etc.
+18 -17
View File
@@ -2,9 +2,10 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# FormFieldValidator interface # FormFieldValidator interface
Defines how the input fields of Form and Task Details components are validated. Defines how the input fields of [`Form`](../../lib/process-services/task-list/models/form.model.ts) and Task Details components are validated.
## Basic Usage ## Basic Usage
@@ -52,26 +53,26 @@ Perform validation on `field`.
You can supply a set of validator objects for a form using its `fieldValidators` property. You can supply a set of validator objects for a form using its `fieldValidators` property.
ADF will determine if a validator should be used with a given field by calling its ADF will determine if a validator should be used with a given field by calling its
`isSupported` method, passing the field's FormFieldModel as a parameter. If the validator `isSupported` method, passing the field's [`FormFieldModel`](../core/form-field.model.md) as a parameter. If the validator
does support the field then its `validate` method will be called on the FormFieldModel does support the field then its `validate` method will be called on the [`FormFieldModel`](../core/form-field.model.md)
during the validation phase. during the validation phase.
Several validator classes are predefined for you to use: Several validator classes are predefined for you to use:
| Validator name | Checks that: | | Validator name | Checks that: |
| -------------- | ------------ | | -------------- | ------------ |
| `RequiredFieldValidator` | Field is not left blank | | [`RequiredFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field is not left blank |
| `NumberFieldValidator` | Field contains numeric data | | [`NumberFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field contains numeric data |
| `MinLengthFieldValidator` | Field text has at least a minimum number of characters | | [`MinLengthFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text has at least a minimum number of characters |
| `MaxLengthFieldValidator` | Field text has no more than a maximum number of characters | | [`MaxLengthFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text has no more than a maximum number of characters |
| `MinValueFieldValidator` | Numeric field's value is greater than a lower limit | | [`MinValueFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Numeric field's value is greater than a lower limit |
| `MaxValueFieldValidator` | Numeric field's vaue is less than an upper limit | | [`MaxValueFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Numeric field's vaue is less than an upper limit |
| `RegExFieldValidator` | Field text matches a regular expression | | [`RegExFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text matches a regular expression |
| `DateFieldValidator` | Field contains a date in the correct format | | [`DateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field contains a date in the correct format |
| `MinDateFieldValidator` | Date within a field occurs after a certain starting point | | [`MinDateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs after a certain starting point |
| `MaxDateFieldValidator` | Date within a field occurs before a certain end point | | [`MaxDateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs before a certain end point |
The `FORM_FIELD_VALIDATORS` array contains an instance of each of these classes. You can assign this to the `fieldValidators` property of an Activiti Form or Activiti Task Details component to enable standard validation. The `FORM_FIELD_VALIDATORS` array contains an instance of each of these classes. You can assign this to the `fieldValidators` property of an Activiti [`Form`](../../lib/process-services/task-list/models/form.model.ts) or Activiti [Task Details component](../process-services/task-details.component.md) to enable standard validation.
### Custom validators ### Custom validators
@@ -79,9 +80,9 @@ You can implement your own custom validator classes if the standard set doesn't
features you need. For example, you could check for consistency between separate fields on features you need. For example, you could check for consistency between separate fields on
the form (currency values adding up to a given total, say). the form (currency values adding up to a given total, say).
The `type` property of `FormFieldModel` is often used in the `isSupported` function, since The `type` property of [`FormFieldModel`](../core/form-field.model.md) is often used in the `isSupported` function, since
validation methods typically apply only to specific types of data. validation methods typically apply only to specific types of data.
The [FormFieldTypes](https://github.com/Alfresco/alfresco-ng2-components/blob/master/ng2-components/ng2-activiti-form/src/components/widgets/core/form-field-types.ts) The [`FormFieldTypes`](../../lib/core/form/components/widgets/core/form-field-types.ts)
class defines convenient constants for the type strings. class defines convenient constants for the type strings.
The validator in the example The validator in the example
@@ -126,7 +127,7 @@ export class AppComponent {
} }
``` ```
You can now use the 'fieldValidators' property of the Form or Task Details components to assign your You can now use the 'fieldValidators' property of the [`Form`](../../lib/process-services/task-list/models/form.model.ts) or Task Details components to assign your
custom validator set: custom validator set:
```html ```html
+5 -5
View File
@@ -10,14 +10,14 @@ A form field in an APS form.
## Basic Usage ## Basic Usage
All form field editors (aka widgets) on a Form are rendered by means of a `FormFieldComponent` All form field editors (aka widgets) on a [`Form`](../../lib/process-services/task-list/models/form.model.ts) are rendered by means of a [`FormFieldComponent`](../core/form-field.component.md)
that takes an instance of a `FormFieldModel`: that takes an instance of a [`FormFieldModel`](../core/form-field.model.md):
```html ```html
<adf-form-field [field]="field"></adf-form-field> <adf-form-field [field]="field"></adf-form-field>
``` ```
This component depends on the `FormRenderingService` to map the `FormFieldModel` to a Form Field UI component This component depends on the [`FormRenderingService`](../core/form-rendering.service.md) to map the [`FormFieldModel`](../core/form-field.model.md) to a [`Form`](../../lib/process-services/task-list/models/form.model.ts) Field UI component
based on the field type or the metadata information. based on the field type or the metadata information.
## Class members ## Class members
@@ -25,8 +25,8 @@ based on the field type or the metadata information.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| field | `FormFieldModel` | `null` | Contains all the necessary data needed to determine what UI Widget to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the `FormFieldModel` definitions. | | field | [`FormFieldModel`](../core/form-field.model.md) | null | Contains all the necessary data needed to determine what UI Widget to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the [`FormFieldModel`](../core/form-field.model.md) definitions. |
## Details ## Details
+8 -8
View File
@@ -6,7 +6,7 @@ Last reviewed: 2018-03-20
# Form Field model # Form Field model
Contains the value and metadata for a field of a Form component. Contains the value and metadata for a field of a [`Form`](../../lib/process-services/task-list/models/form.model.ts) component.
## Properties ## Properties
@@ -49,16 +49,16 @@ Contains the value and metadata for a field of a Form component.
| fields | FormFieldModel\[] | \[] | Fields contained within a container field | | fields | FormFieldModel\[] | \[] | Fields contained within a container field |
| columns | ContainerColumnModel\[] | \[] | Column definitions for a container field | | columns | ContainerColumnModel\[] | \[] | Column definitions for a container field |
| emptyOption | FormFieldOption | | Dropdown menu item to use when no option is chosen | | emptyOption | FormFieldOption | | Dropdown menu item to use when no option is chosen |
| validationSummary | string | | Error/information message added during field validation (see [FormFieldValidator](form-field-validator.interface.md) interface) | | validationSummary | string | | Error/information message added during field validation (see [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) interface) |
## Details ## Details
Every field of a form has an associated `FormFieldModel` instance that contains the Every field of a form has an associated [`FormFieldModel`](../core/form-field.model.md) instance that contains the
field's value and metadata. The standard widgets use this information to render fields and you can also make use of it in your own custom widgets and field validators. field's value and metadata. The standard widgets use this information to render fields and you can also make use of it in your own custom widgets and field validators.
### Custom widgets ### Custom widgets
You will need to use the properties of `FormFieldModel` if you want to implement your own You will need to use the properties of [`FormFieldModel`](../core/form-field.model.md) if you want to implement your own
custom widgets. Aside from the `value` property (which contains the data value entered into custom widgets. Aside from the `value` property (which contains the data value entered into
the field), there are also a few other fields that are used for specific types of data. For the field), there are also a few other fields that are used for specific types of data. For
example, the `currency` property holds the currency symbol to be displayed next to the value example, the `currency` property holds the currency symbol to be displayed next to the value
@@ -66,13 +66,13 @@ example, the `currency` property holds the currency symbol to be displayed next
### Validation ### Validation
A [Form](form.component.md) or [Task Details](../process-services/task-details.component.md) component can A [`Form`](../../lib/process-services/task-list/models/form.model.ts) or [Task Details](../process-services/task-details.component.md) component can
be supplied with a set of validator objects. Each validator applies a particular kind of be supplied with a set of validator objects. Each validator applies a particular kind of
check to a field. A number of `FormFieldModel` properties are used by validators. For check to a field. A number of [`FormFieldModel`](../core/form-field.model.md) properties are used by validators. For
example, `minValue` and `maxValue` are used to check that a numeric value falls within an example, `minValue` and `maxValue` are used to check that a numeric value falls within an
allowed range and `regexPattern` defines a regular expression that a text field should allowed range and `regexPattern` defines a regular expression that a text field should
match. Also, the `validationSummary` is used to send a message back from the validator match. Also, the `validationSummary` is used to send a message back from the validator
for the user to read. See the [FormFieldValidator](form-field-validator.interface.md) page for more information about implementing validators. for the user to read. See the [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) page for more information about implementing validators.
### REST properties ### REST properties
@@ -96,6 +96,6 @@ contains full details about how the REST calls work, along with a worked example
## See also ## See also
- [Extensibility](../user-guide/extensibility.md) - [Extensibility](../user-guide/extensibility.md)
- [FormFieldValidator](form-field-validator.interface.md) - [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts)
- [Form rendering service](form-rendering.service.md) - [Form rendering service](form-rendering.service.md)
- [Form component](form.component.md) - [Form component](form.component.md)
+3 -2
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Form List Component # Form List Component
Shows APS forms as a list. Shows APS forms as a list.
@@ -19,5 +20,5 @@ Shows APS forms as a list.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| forms | `any[]` | `[]` | The array that contains the information to show inside the list. | | forms | `any[]` | \[] | The array that contains the information to show inside the list. |
+16 -16
View File
@@ -6,34 +6,34 @@ Last reviewed: 2018-05-08
# Form Rendering service # Form Rendering service
Maps an APS form field type string onto the corresponding form widget component type. Maps an APS form field type string onto the corresponding form [widget component](../insights/widget.component.md) type.
## Class members ## Class members
### Methods ### Methods
- `getComponentTypeResolver(type: string = null, defaultValue: Type<__type> = this.defaultValue): DynamicComponentResolveFunction`<br/> - **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `DynamicComponentResolveFunction`<br/>
Gets the currently active ComponentTypeResolver function for a field type. Gets the currently active ComponentTypeResolver function for a field type.
- `type: string = null` - The type whose resolver you want - _type:_ `string` - The type whose resolver you want
- `defaultValue: Type<__type> = this.defaultValue` - Default type returned for types that are not yet mapped - _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
- **Returns** `DynamicComponentResolveFunction` - Resolver function - **Returns** `DynamicComponentResolveFunction` - Resolver function
- `resolveComponentType(model: DynamicComponentModel = null, defaultValue: Type<__type> = this.defaultValue): Type<__type>`<br/> - **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
Finds the component type that is needed to render a form field. Finds the component type that is needed to render a form field.
- `model: DynamicComponentModel = null` - (form-field.model.md) for the field to render - _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - (form-field.model.md) for the field to render
- `defaultValue: Type<__type> = this.defaultValue` - Default type returned for field types that are not yet mapped. - _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
- **Returns** `Type<__type>` - Component type - **Returns** `Type<__type>` - Component type
- `setComponentTypeResolver(type: string = null, resolver: DynamicComponentResolveFunction = null, override: boolean = false)`<br/> - **setComponentTypeResolver**(type: `string` = `null`, resolver: `DynamicComponentResolveFunction` = `null`, override: `boolean` = `true`)<br/>
Sets or optionally replaces a ComponentTypeResolver function for a field type. Sets or optionally replaces a ComponentTypeResolver function for a field type.
- `type: string = null` - The type whose resolver you want to set - _type:_ `string` - The type whose resolver you want to set
- `resolver: DynamicComponentResolveFunction = null` - The new resolver function - _resolver:_ `DynamicComponentResolveFunction` - The new resolver function
- `override: boolean = false` - The new resolver will only replace an existing one if this parameter is true - _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
## Details ## Details
The Form Field component uses this service to choose which widget to use to render an instance of a The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Field component uses this service to choose which widget to use to render an instance of a
form field. The Form Field model stores the field type name as a string (see the table below). form field. The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Field model stores the field type name as a string (see the table below).
The Form Rendering service maintains a mapping between each type name and The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Rendering service maintains a mapping between each type name and
a corresponding ComponentTypeResolver function. The function takes a FormFieldModel object as its argument and a corresponding ComponentTypeResolver function. The function takes a [`FormFieldModel`](../core/form-field.model.md) object as its argument and
uses the data from the object to determine which widget should be used to render the field. uses the data from the object to determine which widget should be used to render the field.
In some cases, the field type string alone is enough to determine the widget type and so the function In some cases, the field type string alone is enough to determine the widget type and so the function
@@ -59,7 +59,7 @@ formRenderingService.setComponentTypeResolver('text', customResolver, true);
### Default type mapping ### Default type mapping
The Form Rendering service is initialized with the mapping shown in the table below: The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Rendering service is initialized with the mapping shown in the table below:
| Stencil name | Field type string | Component type | | Stencil name | Field type string | Component type |
| ------------ | ----------------- | -------------- | | ------------ | ----------------- | -------------- |
+33 -31
View File
@@ -6,7 +6,7 @@ Last reviewed: 2018-03-21
# Form component # Form component
Shows a Form from APS Shows a [`Form`](../../lib/process-services/task-list/models/form.model.ts) from APS
(See it live: [Form Quickstart](https://embed.plnkr.co/YSLXTqb3DtMhVJSqXKkE/)) (See it live: [Form Quickstart](https://embed.plnkr.co/YSLXTqb3DtMhVJSqXKkE/))
@@ -14,6 +14,8 @@ Shows a Form from APS
- [Basic Usage](#basic-usage) - [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties) - [Properties](#properties)
- [Events](#events) - [Events](#events)
@@ -40,42 +42,42 @@ Shows a Form from APS
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| form | `FormModel` | | Underlying form model instance. | | data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| taskId | `string` | | Task id to fetch corresponding form and values. | | disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| nodeId | `string` | | Content Services node ID for the form metadata. | | disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| formId | `string` | | The id of the form definition to load and display with custom values. | | fieldValidators | [`FormFieldValidator[]`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | \[] | Contains a list of form field validator instances. |
| formName | `string` | | Name of the form definition to load and display with custom values. | | form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. | | formId | `string` | | The id of the form definition to load and display with custom values. |
| data | `FormValues` | | Custom form values map to be used with the rendered form. | | formName | `string` | | Name of the form definition to load and display with custom values. |
| path | `string` | | Path of the folder where the metadata will be stored. | | nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. | | nodeId | `string` | | Content Services node ID for the form metadata. |
| showTitle | `boolean` | `true` | Toggle rendering of the form title. | | path | `string` | | Path of the folder where the metadata will be stored. |
| showCompleteButton | `boolean` | `true` | Toggle rendering of the `Complete` outcome button. | | readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
| disableCompleteButton | `boolean` | `false` | If true then the `Complete` outcome button is shown but it will be disabled. | | saveMetadata | `boolean` | false | Toggle saving of form metadata. |
| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. | | showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. | | showDebugButton | `boolean` | false | Toggle debug options. |
| showDebugButton | `boolean` | `false` | Toggle debug options. | | showRefreshButton | `boolean` | true | Toggle rendering of the `Refresh` button. |
| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. | | showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. | | showTitle | `boolean` | true | Toggle rendering of the form title. |
| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. | | showValidationIcon | `boolean` | true | Toggle rendering of the validation icon next to the form title. |
| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. | | taskId | `string` | | Task id to fetch corresponding form and values. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. | | executeOutcome | [`EventEmitter<FormOutcomeEvent>`](../../lib/core/form/components/widgets/core/form-outcome-event.model.ts) | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. | | formCompleted | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. | | formContentClicked | [`EventEmitter<ContentLinkModel>`](../../lib/core/form/components/widgets/core/content-link.model.ts) | Emitted when form content is clicked. |
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. | | formDataRefreshed | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when form values are refreshed due to a data property change. |
| formDataRefreshed | `EventEmitter<FormModel>` | Emitted when form values are refreshed due to a data property change. | | formLoaded | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is loaded or reloaded. |
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. | | formSaved | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Save` or custom outcomes. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. | | onError | `EventEmitter<any>` | Emitted when any error occurs. |
## Details ## Details
All `formXXX` events receive a `FormModel` instance as their argument: All `formXXX` events receive a [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) instance as their argument:
**MyView.component.html** **MyView.component.html**
@@ -164,7 +166,7 @@ The `nameNode` parameter is optional.
</adf-form> </adf-form>
``` ```
Here, the node metadata is shown in an APS Form, Here, the node metadata is shown in an APS [Form,](../../lib/process-services/task-list/models/form.model.ts)
with the form fields themselves saved as metadata. The `nameNode` parameter is optional. with the form fields themselves saved as metadata. The `nameNode` parameter is optional.
### Custom empty form template ### Custom empty form template
+14 -14
View File
@@ -52,15 +52,15 @@ class MyComponent {
### Methods ### Methods
- `parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel` - `parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel`
Parses JSON data to create a corresponding Form model. Parses JSON data to create a corresponding [`Form`](../../lib/process-services/task-list/models/form.model.ts) model.
- `json` - JSON to create the form - `json` - JSON to create the form
- `data` - (Optional) Values for the form fields - `data` - (Optional) Values for the form fields
- `readOnly` - Should the form fields be read-only? - `readOnly` - Should the form fields be read-only?
- `createFormFromANode(formName: string): Observable<any>` - `createFormFromANode(formName: string): Observable<any>`
Create a Form with a field for each metadata property. Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts) with a field for each metadata property.
- `formName` - Name of the new form - `formName` - Name of the new form
- `createForm(formName: string): Observable<any>` - `createForm(formName: string): Observable<any>`
Create a Form. Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts).
- `formName` - Name of the new form - `formName` - Name of the new form
- `saveForm(formId: string, formModel: FormDefinitionModel): Observable<any>` - `saveForm(formId: string, formModel: FormDefinitionModel): Observable<any>`
Saves a form. Saves a form.
@@ -68,7 +68,7 @@ class MyComponent {
- `formModel` - Model data for the form - `formModel` - Model data for the form
- `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any>` - `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any>`
- `formId` - ID of the form - `formId` - ID of the form
- `formModel` - Form definition - `formModel` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) definition
- `searchFrom(name: string): Observable<any>` - `searchFrom(name: string): Observable<any>`
Search for a form by name. Search for a form by name.
- `name` - The form name to search for - `name` - The form name to search for
@@ -88,20 +88,20 @@ class MyComponent {
Gets a task. Gets a task.
- `taskId` - Task Id - `taskId` - Task Id
- `saveTaskForm(taskId: string, formValues: FormValues): Observable<any>` - `saveTaskForm(taskId: string, formValues: FormValues): Observable<any>`
Save Task Form. Save Task [`Form`](../../lib/process-services/task-list/models/form.model.ts).
- `taskId` - Task Id - `taskId` - Task Id
- `formValues` - Form Values - `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
- `completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any>` - `completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any>`
Complete Task Form Complete Task [`Form`](../../lib/process-services/task-list/models/form.model.ts)
- `taskId` - Task Id - `taskId` - Task Id
- `formValues` - Form Values - `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
- `outcome` - (Optional) Form Outcome - `outcome` - (Optional) [`Form`](../../lib/process-services/task-list/models/form.model.ts) Outcome
- `getTaskForm(taskId: string): Observable<any>` - `getTaskForm(taskId: string): Observable<any>`
Get Form related to a taskId Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) related to a taskId
- `taskId` - Task Id - `taskId` - Task Id
- `getFormDefinitionById(formId: string): Observable<any>` - `getFormDefinitionById(formId: string): Observable<any>`
Get Form Definition Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) Definition
- `formId` - Form Id - `formId` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Id
- `getFormDefinitionByName(name: string): Observable<any>` - `getFormDefinitionByName(name: string): Observable<any>`
Returns form definition with a given name. Returns form definition with a given name.
- `name` - The form name - `name` - The form name
@@ -135,11 +135,11 @@ class MyComponent {
- `getUserProfileImageApi(userId: number): string` - `getUserProfileImageApi(userId: number): string`
Returns a URL for the profile picture of a user. Returns a URL for the profile picture of a user.
- `userId` - ID of the target user - `userId` - ID of the target user
- `getWorkflowUsers(filter: string, groupId?: string): Observable<UserProcessModel[]>` - [`getWorkflowUsers(filter: string, groupId?: string): Observable<UserProcessModel[]>`](../core/user-process.model.md)
Gets a list of workflow users. Gets a list of workflow users.
- `filter` - Filter to select specific users - `filter` - Filter to select specific users
- `groupId` - (Optional) Group ID for the search - `groupId` - (Optional) Group ID for the search
- `getWorkflowGroups(filter: string, groupId?: string): Observable<GroupModel[]>` - [`getWorkflowGroups(filter: string, groupId?: string): Observable<GroupModel[]>`](../../lib/core/form/components/widgets/core/group.model.ts)
Gets a list of groups in a workflow. Gets a list of groups in a workflow.
- `filter` - Filter to select specific groups - `filter` - Filter to select specific groups
- `groupId` - (Optional) Group ID for the search - `groupId` - (Optional) Group ID for the search
+8 -6
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Highlight Transform service # Highlight Transform service
Adds HTML to a string to highlight chosen sections. Adds HTML to a string to highlight chosen sections.
@@ -10,11 +11,12 @@ Adds HTML to a string to highlight chosen sections.
### Methods ### Methods
- `highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult` - **highlight**(text: `string` = `null`, search: `string` = `null`, wrapperClass: `string` = `"highlight"`): [`HightlightTransformResult`](../../lib/core/services/highlight-transform.service.ts)<br/>
Searches for `search` string(s) within `text` and highlights all occurrences. Searches for `search` string(s) within `text` and highlights all occurrences.
- `text` - Text to search within - _text:_ `string` - Text to search within
- `search` - Text pattern to search for - _search:_ `string` - Text pattern to search for
- `wrapperClass` - CSS class used to provide highlighting style - _wrapperClass:_ `string` - CSS class used to provide highlighting style
- **Returns** [`HightlightTransformResult`](../../lib/core/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
## Details ## Details
@@ -29,7 +31,7 @@ highlight any of those words individually. The &lt;span> element includes a
`class` attribute which defaults to "highlight" but you can pass any class name `class` attribute which defaults to "highlight" but you can pass any class name
you like using the `wrapperClass` parameter. you like using the `wrapperClass` parameter.
The resulting text with HTML highlighting is returned within a `HightlightTransformResult` The resulting text with HTML highlighting is returned within a [`HightlightTransformResult`](../../lib/core/services/highlight-transform.service.ts)
object: object:
```ts ```ts
+6 -5
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Host settings component # Host settings component
Validates the URLs for ACS and APS and saves them in the user's local storage Validates the URLs for ACS and APS and saves them in the user's local storage
@@ -20,13 +21,13 @@ Validates the URLs for ACS and APS and saves them in the user's local storage
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| providers | `string` | `'ALL'` | Determines which configurations are shown. Possible valid values are "ECM", "BPM" or "ALL". | | providers | `string` | "ALL" | Determines which configurations are shown. Possible valid values are "ECM", "BPM" or "ALL". |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| bpmHostChange | `EventEmitter<string>` | Emitted when the bpm host URL is changed. |
| ecmHostChange | `EventEmitter<string>` | Emitted when the ecm host URL is changed. |
| error | `EventEmitter<string>` | Emitted when the URL is invalid. | | error | `EventEmitter<string>` | Emitted when the URL is invalid. |
| ecmHostChange | `EventEmitter<string>` | Emitted when the ECM host url is changed. |
| bpmHostChange | `EventEmitter<string>` | Emitted when the BPM host url is changed. |
+7 -7
View File
@@ -36,28 +36,28 @@ Adds "infinite" pagination to the component it is used with.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| loading | `boolean` | false | Is a new page loading? | | loading | `boolean` | false | Is a new page loading? |
| pageSize | `number` | InfinitePaginationComponent.DEFAULT_PAGE_SIZE | Number of items that are added with each "load more" event. | | pageSize | `number` | [`InfinitePaginationComponent`](../core/infinite-pagination.component.md).DEFAULT_PAGE_SIZE | Number of items that are added with each "load more" event. |
| pagination | `Pagination` | | Pagination object. | | pagination | [`PaginationModel`](../../lib/core/models/pagination.model.ts) | | **Deprecated:** 2.3.0 [Pagination](../../lib/content-services/document-list/models/document-library.model.ts) object. |
| target | `PaginatedComponent` | | Component that provides custom pagination support. | | target | `PaginatedComponent` | | Component that provides custom pagination support. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| loadMore | `EventEmitter<Pagination>` | Emitted when the "Load More" button is clicked. | | loadMore | [`EventEmitter<Pagination>`](../../lib/content-services/document-list/models/document-library.model.ts) | Emitted when the "Load More" button is clicked. |
## Details ## Details
Pagination is the process of dividing a list into separate ranges or "pages" with a [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) is the process of dividing a list into separate ranges or "pages" with a
certain number of items each. This allows a long list to be delivered in manageable pieces certain number of items each. This allows a long list to be delivered in manageable pieces
rather than all at once. "Infinite" pagination means that there is no upper limit on rather than all at once. "Infinite" pagination means that there is no upper limit on
the number of items that can be displayed visually; a single page is shown initially but the number of items that can be displayed visually; a single page is shown initially but
the user can extend the list one page at a time by clicking a "Load More" button. the user can extend the list one page at a time by clicking a "Load More" button.
The `loadMore` event is emitted when the button is pressed. It is passed a The `loadMore` event is emitted when the button is pressed. It is passed a
[Pagination](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/Pagination.md) [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts)
parameter which contains the details of the current page (the start offset of the parameter which contains the details of the current page (the start offset of the
page within the list to be shown, whether there are more items left to show, etc). page within the list to be shown, whether there are more items left to show, etc).
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Info drawer layout component # Info drawer layout component
Displays a sidebar-style information panel. Displays a sidebar-style information panel.
+1 -1
View File
@@ -49,7 +49,7 @@ Displays a sidebar-style information panel with tabs.
This is a variant of the [Info Drawer Layout component](info-drawer-layout.component.md) that displays information in tabs. You can use the `adf-info-drawer-tab` subcomponent to add tabs (as shown in the example) and the `currentTab` output property to select the currently active tab. This is a variant of the [Info Drawer Layout component](info-drawer-layout.component.md) that displays information in tabs. You can use the `adf-info-drawer-tab` subcomponent to add tabs (as shown in the example) and the `currentTab` output property to select the currently active tab.
You can also customize the three regions (title, buttons and content) as with the Info Drawer Layout component. You can also customize the three regions (title, buttons and content) as with the [Info Drawer Layout component](../core/info-drawer-layout.component.md).
## See also ## See also
+2 -1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Language Menu component # Language Menu component
Displays all the languages that are present in the "app.config.json" or the default one (EN). Displays all the languages that are present in the "app.config.json" or the default one (EN).
@@ -24,7 +25,7 @@ How to attach an ADF Language Menu as main menu
## Details ## Details
In the previous example we are using the ADF Language Menu as main menu. In the previous example we are using the ADF Language Menu as main menu.
The Language Menu component is able to fetch all the languages from the "app.config.json". The [Language Menu component](../core/language-menu.component.md) is able to fetch all the languages from the "app.config.json".
This is how the configuration looks like in the the "app.config.json" This is how the configuration looks like in the the "app.config.json"
```json ```json
+14 -13
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Log Service # Log Service
Provide a log functionality for your ADF application. Provide a log functionality for your ADF application.
@@ -30,20 +31,20 @@ export class AppComponent {
} }
``` ```
### Log levels ### Log levels
The log service provide 6 level of logs: The [log service](../core/log.service.md) provide 6 level of logs:
Name | Level | Name | Level |
-|- | ---- | ----- |
TRACE |5 | TRACE | 5 |
DEBUG |4 | DEBUG | 4 |
INFO |3 | INFO | 3 |
WARN |2 | WARN | 2 |
ERROR |1 | ERROR | 1 |
SILENT |0 | SILENT | 0 |
You can configure the log level setting the ***logLevel*** properties in the **app.config.json**. By default the level is TRACE. You can configure the log level setting the **_logLevel_** properties in the **app.config.json**. By default the level is TRACE.
If you want set for example the log to warning: If you want set for example the log to warning:
@@ -57,7 +58,7 @@ If you want set for example the log to warning:
### Log message bus ### Log message bus
The logservice provide also an Observable ***onMessage*** where you can subscribe and recive all the logs: The logservice provide also an Observable **_onMessage_** where you can subscribe and recive all the logs:
The messagge object recived form the bus is composed: The messagge object recived form the bus is composed:
@@ -67,7 +68,7 @@ The messagge object recived form the bus is composed:
type: "ERROR|DEBUG|INFO|LOG|TRACE|WARN|ASSERT" type: "ERROR|DEBUG|INFO|LOG|TRACE|WARN|ASSERT"
} }
``` ```
## Usage ## Usage
```ts ```ts
+18 -16
View File
@@ -14,6 +14,8 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
- [Basic usage](#basic-usage) - [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties) - [Properties](#properties)
- [Events](#events) - [Events](#events)
@@ -42,26 +44,26 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| showRememberMe | `boolean` | `true` | Should the `Remember me` checkbox be shown? | | backgroundImageUrl | `string` | "./assets/images/background.svg" | Path to a custom background image. |
| showLoginActions | `boolean` | `true` | Should the extra actions (`Need Help`, `Register`, etc) be shown? | | copyrightText | `string` | "© 2016 Alfresco Software, Inc. All Rights Reserved." | The copyright text below the login box. |
| needHelpLink | `string` | `''` | Sets the URL of the NEED HELP link in the footer. |
| registerLink | `string` | `''` | Sets the URL of the REGISTER link in the footer. |
| logoImageUrl | `string` | `'./assets/images/alfresco-logo.svg'` | Path to a custom logo image. |
| backgroundImageUrl | `string` | `'./assets/images/background.svg'` | Path to a custom background image. |
| copyrightText | `string` | `'\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.'` | The copyright text below the login box. |
| providers | `string` | | Possible valid values are ECM, BPM or ALL. By default, this component will log in only to ECM. If you want to log in in both systems then use ALL. There is also a way to call your Auth token API using the string "OAUTH" (supported only for BPM) |
| fieldsValidation | `any` | | Custom validation rules for the login form. |
| disableCsrf | `boolean` | | Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. | | disableCsrf | `boolean` | | Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. |
| successRoute | `string` | `null` | Route to redirect to on successful login. | | fieldsValidation | `any` | | Custom validation rules for the login form. |
| logoImageUrl | `string` | "./assets/images/alfresco-logo.svg" | Path to a custom logo image. |
| needHelpLink | `string` | "" | Sets the URL of the NEED HELP link in the footer. |
| providers | `string` | | Possible valid values are ECM, BPM or ALL. By default, this component will log in only to ECM. If you want to log in in both systems then use ALL. |
| registerLink | `string` | "" | Sets the URL of the REGISTER link in the footer. |
| showLoginActions | `boolean` | true | Should the extra actions (`Need Help`, `Register`, etc) be shown? |
| showRememberMe | `boolean` | true | Should the `Remember me` checkbox be shown? |
| successRoute | `string` | null | Route to redirect to on successful login. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| success | `EventEmitter<LoginSuccessEvent>` | Emitted when the login is successful. | | error | [`EventEmitter<LoginErrorEvent>`](../../lib/core/login/models/login-error.event.ts) | Emitted when the login fails. |
| error | `EventEmitter<LoginErrorEvent>` | Emitted when the login fails. | | executeSubmit | [`EventEmitter<LoginSubmitEvent>`](../../lib/core/login/models/login-submit.event.ts) | Emitted when the login form is submitted. |
| executeSubmit | `EventEmitter<LoginSubmitEvent>` | Emitted when the login form is submitted. | | success | [`EventEmitter<LoginSuccessEvent>`](../../lib/core/login/models/login-success.event.ts) | Emitted when the login is successful. |
## Details ## Details
@@ -94,7 +96,7 @@ export class AppComponent {
### Changing content ### Changing content
You can replace the content of the header and footer of the Login component with You can replace the content of the header and footer of the [Login component](../core/login.component.md) with
your own custom content, as shown in the examples below: your own custom content, as shown in the examples below:
```html ```html
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Logout directive # Logout directive
Logs the user out when the decorated element is clicked. Logs the user out when the decorated element is clicked.
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Mime Type Icon pipe # Mime Type Icon pipe
Retrieves an icon to represent a MIME type. Retrieves an icon to represent a MIME type.
+1 -1
View File
@@ -48,8 +48,8 @@ export class MyComponent {
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. |
| error | `EventEmitter<any>` | Emitted when the favorite setting has fail. | | error | `EventEmitter<any>` | Emitted when the favorite setting has fail. |
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. |
## Details ## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Node Name Tooltip pipe # Node Name Tooltip pipe
Formats the tooltip for a Node. Formats the tooltip for a Node.
+19 -4
View File
@@ -8,6 +8,21 @@ Last reviewed: 2018-04-10
Selectively disables an HTML element or Angular component Selectively disables an HTML element or Angular component
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [HTML element example](#html-element-example)
- [Angular component example](#angular-component-example)
- [Implementing the NodePermissionSubject interface](#implementing-the-nodepermissionsubject-interface)
- [Defining your component as an EXTENDIBLE_COMPONENT parent component](#defining-your-component-as-an-extendible_component-parent-component)
## Basic Usage ## Basic Usage
```html ```html
@@ -35,7 +50,7 @@ Selectively disables an HTML element or Angular component
## Details ## Details
The Node Permission directive lets you disable an HTML element or Angular component The [Node Permission directive](../core/node-permission.directive.md) lets you disable an HTML element or Angular component
by taking a collection of `MinimalNodeEntity` instances and checking their permissions. by taking a collection of `MinimalNodeEntity` instances and checking their permissions.
The decorated element will be disabled if: The decorated element will be disabled if:
@@ -69,7 +84,7 @@ one or more documents that they have permission to delete.
### Angular component example ### Angular component example
You can add the directive to any Angular component that implements the `NodePermissionSubject` You can add the directive to any Angular component that implements the [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts)
interface (the [Upload Drag Area component](../content-services/upload-drag-area.component.md), interface (the [Upload Drag Area component](../content-services/upload-drag-area.component.md),
for example). You can also use it in much the same way as you would with an HTML element: for example). You can also use it in much the same way as you would with an HTML element:
@@ -84,12 +99,12 @@ for example). You can also use it in much the same way as you would with an HTML
``` ```
To enable your own component to work with this directive, you need to implement the To enable your own component to work with this directive, you need to implement the
`NodePermissionSubject` interface and also define it as an EXTENDIBLE_COMPONENT parent component, [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts) interface and also define it as an EXTENDIBLE_COMPONENT parent component,
as described in the following sections. as described in the following sections.
### Implementing the NodePermissionSubject interface ### Implementing the NodePermissionSubject interface
The component must implement the `NodePermissionSubject` interface which means it must have a The component must implement the [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts) interface which means it must have a
boolean `disabled` property. This is the property that will be set by the directive: boolean `disabled` property. This is the property that will be set by the directive:
```js ```js
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Node Service # Node Service
Gets Alfresco Repository node metadata and creates nodes with metadata. Gets Alfresco Repository node metadata and creates nodes with metadata.
+43 -28
View File
@@ -8,50 +8,65 @@ Last reviewed: 2018-04-06
Accesses and manipulates ACS document nodes using their node IDs. Accesses and manipulates ACS document nodes using their node IDs.
## Contents
- [Class members](#class-members)
- [Methods](#methods)
- [Details](#details)
- [Getting node information](#getting-node-information)
- [Getting folder node contents](#getting-folder-node-contents)
- [Creating and updating nodes](#creating-and-updating-nodes)
- [Deleting and restoring nodes](#deleting-and-restoring-nodes)
- [See also](#see-also)
## Class members ## Class members
### Methods ### Methods
- `createFolder(parentNodeId: string = null, nodeBody: any = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/> - **createFolder**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/>
Creates a new folder node inside a parent folder. Creates a new folder node inside a parent folder.
- `parentNodeId: string = null` - ID of the parent folder node - _parentNodeId:_ `string` - ID of the parent folder node
- `nodeBody: any = null` - Data for the new folder - _nodeBody:_ `any` - Data for the new folder
- `options: any = {}` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new folder - **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new folder
- `createNode(parentNodeId: string = null, nodeBody: any = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/> - **createNode**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/>
Creates a new document node inside a folder. Creates a new document node inside a folder.
- `parentNodeId: string = null` - ID of the parent folder node - _parentNodeId:_ `string` - ID of the parent folder node
- `nodeBody: any = null` - Data for the new node - _nodeBody:_ `any` - Data for the new node
- `options: any = {}` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new node - **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new node
- `deleteNode(nodeId: string = null, options: any = {}): Observable<void>`<br/> - **deleteNode**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<void>`<br/>
Moves a node to the trashcan. Moves a node to the trashcan.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- `options: any = {}` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<void>` - Empty result that notifies when the deletion is complete - **Returns** `Observable<void>` - Empty result that notifies when the deletion is complete
- `getNode(nodeId: string = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/> - **getNode**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/>
Gets the stored information about a node. Gets the stored information about a node.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- `options: any = {}` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Node information - **Returns** `Observable<MinimalNodeEntryEntity>` - Node information
- `getNodeChildren(nodeId: string = null, options: any = {}): Observable<NodePaging>`<br/> - **getNodeChildren**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
Gets the items contained in a folder node. Gets the items contained in a folder node.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- `options: any = {}` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<NodePaging>` - List of child items from the folder - **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of child items from the folder
- `handleError(error: any = null): Observable<any>`<br/> - **handleError**(error: `any` = `null`): `Observable<any>`<br/>
Reports an error. Reports an error.
- `error: any = null` - Object representing the error - _error:_ `any` - Object representing the error
- **Returns** `Observable<any>` - Error information - **Returns** `Observable<any>` - Error information
- `restoreNode(nodeId: string = null): Observable<MinimalNodeEntryEntity>`<br/> - **restoreNode**(nodeId: `string` = `null`): `Observable<MinimalNodeEntryEntity>`<br/>
Restores a node previously moved to the trashcan. Restores a node previously moved to the trashcan.
- `nodeId: string = null` - ID of the node to restore - _nodeId:_ `string` - ID of the node to restore
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the restored node - **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the restored node
- `updateNode(nodeId: string = null, nodeBody: any = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/> - **updateNode**(nodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): `Observable<MinimalNodeEntryEntity>`<br/>
Updates the information about a node. Updates the information about a node.
- `nodeId: string = null` - ID of the target node - _nodeId:_ `string` - ID of the target node
- `nodeBody: any = null` - New data for the node - _nodeBody:_ `any` - New data for the node
- `options: any = {}` - Optional parameters supported by JSAPI - _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Updated node information - **Returns** `Observable<MinimalNodeEntryEntity>` - Updated node information
## Details ## Details
@@ -65,7 +80,7 @@ by dashes, eg:
The string is convenient for storage, for passing as an The string is convenient for storage, for passing as an
[Angular route parameter](https://angular.io/guide/router) [Angular route parameter](https://angular.io/guide/router)
and other purposes but doesn't enable you to do very much with the node itself. and other purposes but doesn't enable you to do very much with the node itself.
The Nodes Api Service has methods for getting information about nodes and The [Nodes Api Service](../core/nodes-api.service.md) has methods for getting information about nodes and
managing them within the repository (creating, deleting, etc). managing them within the repository (creating, deleting, etc).
Other lower level interfaces to the ACS nodes API are also available - see the Other lower level interfaces to the ACS nodes API are also available - see the
@@ -109,7 +124,7 @@ of a [Document List component](../content-services/document-list.component.md) o
[Document List row](../content-services/document-list.component.md#underlying-node-object). In these cases, [Document List row](../content-services/document-list.component.md#underlying-node-object). In these cases,
you might pass the `id` or `parentId` as a [route parameter](https://angular.io/guide/router) you might pass the `id` or `parentId` as a [route parameter](https://angular.io/guide/router)
to a page describing the node in full detail. The component receiving the node ID can to a page describing the node in full detail. The component receiving the node ID can
use the Nodes Api service to "decode" the ID string into a MinimalNodeEntryEntity: use the [Nodes Api service](../core/nodes-api.service.md) to "decode" the ID string into a MinimalNodeEntryEntity:
```ts ```ts
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
+14 -11
View File
@@ -2,29 +2,32 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Notification Service # Notification Service
Shows a notification message with optional feedback. Shows a notification message with optional feedback.
![Notification Service screenshot](docassets/images/NotiService.png) ![Notification Service screenshot](../docassets/images/NotiService.png)
## Class members ## Class members
### Methods ### Methods
- `openSnackMessage(message: string, millisecondsDuration?: number): MatSnackBarRef<any>` - **openSnackMessage**(message: `string` = `null`, millisecondsDuration?: `number` = `null`): `MatSnackBarRef<any>`<br/>
Opens a snackbar notification to show a message. Opens a snackbar notification to show a message.
- `message` - The message to show - _message:_ `string` - The message to show
- `millisecondsDuration` - (Optional) Time before notification disappears after being shown - _millisecondsDuration:_ `number` - (Optional) Time before notification disappears after being shown
- `openSnackMessageAction(message: string, action: string, millisecondsDuration?: number): MatSnackBarRef<any>` - **Returns** `MatSnackBarRef<any>` - Information/control object for the snackbar
Opens a snackbar notification with a message and a response button. - **openSnackMessageAction**(message: `string` = `null`, action: `string` = `null`, millisecondsDuration?: `number` = `null`): `MatSnackBarRef<any>`<br/>
- `message` - The message to show Opens a snackbar notification with a message and a response button.
- `action` - Caption for the response button - _message:_ `string` - The message to show
- `millisecondsDuration` - (Optional) Time before the notification disappears (unless the button is clicked) - _action:_ `string` - Caption for the response button
- _millisecondsDuration:_ `number` - (Optional) Time before the notification disappears (unless the button is clicked)
- **Returns** `MatSnackBarRef<any>` - Information/control object for the snackbar
## Details ## Details
The Notification Service is implemented on top of the Angular Material Design snackbar. The [Notification Service](../core/notification.service.md) is implemented on top of the Angular Material Design snackbar.
Use this service to show a notification message, and optionally get feedback from it. Use this service to show a notification message, and optionally get feedback from it.
```ts ```ts
+4 -3
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Page Title service # Page Title service
Sets the page title. Sets the page title.
@@ -10,9 +11,9 @@ Sets the page title.
### Methods ### Methods
- `setTitle(value: string = '')` - **setTitle**(value: `string` = `""`)<br/>
Sets the page title. Sets the page title.
- `value` - The new title - _value:_ `string` - The new title
## Details ## Details
+32 -16
View File
@@ -10,6 +10,22 @@ Adds pagination to the component it is used with.
![](../docassets/images/basic.png) ![](../docassets/images/basic.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Integrating with the Document List component](#integrating-with-the-document-list-component)
- [Custom pagination](#custom-pagination)
- [See also](#see-also)
## Basic Usage ## Basic Usage
```html ```html
@@ -29,27 +45,27 @@ Adds pagination to the component it is used with.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| target | `PaginatedComponent` | | Component that provides custom pagination support. | | pagination | [`PaginationModel`](../../lib/core/models/pagination.model.ts) | [`PaginationComponent`](../core/pagination.component.md).DEFAULT_PAGINATION | [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) object. |
| supportedPageSizes | `number[]` | `[5, 25, 50, 100]` | An array of page sizes. | | supportedPageSizes | `number[]` | [5, 25, 50, 100] | An array of page sizes. |
| pagination | `Pagination` | | Pagination object. | | target | `PaginatedComponent` | | Component that provides custom pagination support. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| change | `EventEmitter<PaginationQueryParams>` | Emitted when pagination changes in any way. | | change | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when pagination changes in any way. |
| changePageNumber | `EventEmitter<Pagination>` | Emitted when the page number changes. | | changePageNumber | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the page number changes. |
| changePageSize | `EventEmitter<Pagination>` | Emitted when the page size changes. | | changePageSize | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the page size changes. |
| nextPage | `EventEmitter<Pagination>` | Emitted when the next page is requested. | | nextPage | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the next page is requested. |
| prevPage | `EventEmitter<Pagination>` | Emitted when the previous page is requested. | | prevPage | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the previous page is requested. |
## Details ## Details
You can use the Pagination component to add pagination features to other components. The Alfresco You can use the [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) component to add pagination features to other components. The Alfresco
APIs make use of pagination to reduce the amount of data transferred in a single call. The start offset APIs make use of pagination to reduce the amount of data transferred in a single call. The start offset
and number of items in the page are passed during the call. The items of interest will be and number of items in the page are passed during the call. The items of interest will be
returned along with a Pagination object. You can use this object to set up the pagination component returned along with a [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) object. You can use this object to set up the [pagination component](../core/pagination.component.md)
and then subscribe to one of the page change events. This will return updated pagination data that you and then subscribe to one of the page change events. This will return updated pagination data that you
can pass to a subsequent API call. can pass to a subsequent API call.
@@ -57,7 +73,7 @@ Each event corresponds to a particular action from the user. For the `change` ev
[PaginationQueryParams](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-core/src/components/pagination/pagination-query-params.interface.ts) object is returned. This contains the query [PaginationQueryParams](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-core/src/components/pagination/pagination-query-params.interface.ts) object is returned. This contains the query
parameters supported by the REST API, `skipCount` and `maxItems`. parameters supported by the REST API, `skipCount` and `maxItems`.
For all events other than `change`, a new Pagination object is returned as in the following example. The For all events other than `change`, a new [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) object is returned as in the following example. The
new object contains updated properties that you can use to fetch the next page of information. new object contains updated properties that you can use to fetch the next page of information.
### Integrating with the Document List component ### Integrating with the Document List component
@@ -72,7 +88,7 @@ new object contains updated properties that you can use to fetch the next page o
### Custom pagination ### Custom pagination
The component also makes it easy to integrate your own implementation of pagination. The component also makes it easy to integrate your own implementation of pagination.
You can supply any component that implements the `PaginatedComponent` interface as the value of the You can supply any component that implements the [`PaginatedComponent`](../../lib/core/pagination/paginated-component.interface.ts) interface as the value of the
`target` property. `target` property.
```js ```js
@@ -84,8 +100,8 @@ export interface PaginatedComponent {
} }
``` ```
Your component must provide a `pagination` subject to allow the Pagination component to respond to changes. Your component must provide a `pagination` subject to allow the [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) component to respond to changes.
Every time user interacts with the Pagination component, it will call the `updatePagination` method Every time user interacts with the [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) component, it will call the `updatePagination` method
and pass the updated parameters. and pass the updated parameters.
## See also ## See also
+4 -4
View File
@@ -12,19 +12,19 @@ Gets information about a Content Services user.
### Methods ### Methods
- `getCurrentPerson(): Observable<any>`<br/> - **getCurrentPerson**(): `Observable<any>`<br/>
Gets information about the user who is currently logged in. Gets information about the user who is currently logged in.
- **Returns** `Observable<any>` - User information - **Returns** `Observable<any>` - User information
- `getPerson(personId: string = null): Observable<any>`<br/> - **getPerson**(personId: `string` = `null`): `Observable<any>`<br/>
Gets information about a user identified by their username. Gets information about a user identified by their username.
- `personId: string = null` - ID of the target user - _personId:_ `string` - ID of the target user
- **Returns** `Observable<any>` - User information - **Returns** `Observable<any>` - User information
## Details ## Details
The class returned by `getPerson` and `getCurrentPerson` is detailed The class returned by `getPerson` and `getCurrentPerson` is detailed
in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to
`getUserProfileImage` is available as a field of the `EcmUserModel` instance `getUserProfileImage` is available as a field of the [`EcmUserModel`](../core/ecm-user.model.md) instance
returned for a particular person. returned for a particular person.
See the See the
+14 -14
View File
@@ -12,25 +12,25 @@ Gets information about Process Services users.
### Methods ### Methods
- `getUserImage(user: UserProcessModel = null): string`<br/> - **getUserImage**(user: [`UserProcessModel`](../core/user-process.model.md) = `null`): `string`<br/>
Gets the profile picture URL for the specified user. Gets the profile picture URL for the specified user.
- `user: UserProcessModel = null` - The target user - _user:_ [`UserProcessModel`](../core/user-process.model.md) - The target user
- **Returns** `string` - Profile picture URL - **Returns** `string` - Profile picture URL
- `getWorkflowUsers(taskId?: string = null, searchWord?: string = null): Observable<UserProcessModel[]>`<br/> - **getWorkflowUsers**(taskId?: `string` = `null`, searchWord?: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/>
Gets information about users across all tasks. Gets information about users across all tasks.
- `taskId?: string = null` - (Optional) ID of the task - _taskId:_ `string` - (Optional) ID of the task
- `searchWord?: string = null` - (Optional) Filter text to search for - _searchWord:_ `string` - (Optional) Filter text to search for
- **Returns** `Observable<UserProcessModel[]>` - Array of user information objects - **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Array of user information objects
- `involveUserWithTask(taskId: string = null, idToInvolve: string = null): Observable<UserProcessModel[]>`<br/> - **involveUserWithTask**(taskId: `string` = `null`, idToInvolve: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/>
Sets a user to be involved with a task. Sets a user to be involved with a task.
- `taskId: string = null` - ID of the target task - _taskId:_ `string` - ID of the target task
- `idToInvolve: string = null` - ID of the user to involve - _idToInvolve:_ `string` - ID of the user to involve
- **Returns** `Observable<UserProcessModel[]>` - Empty response when the update completes - **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Empty response when the update completes
- `removeInvolvedUser(taskId: string = null, idToRemove: string = null): Observable<UserProcessModel[]>`<br/> - **removeInvolvedUser**(taskId: `string` = `null`, idToRemove: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/>
Removes a user who is currently involved with a task. Removes a user who is currently involved with a task.
- `taskId: string = null` - ID of the target task - _taskId:_ `string` - ID of the target task
- `idToRemove: string = null` - ID of the user to remove - _idToRemove:_ `string` - ID of the user to remove
- **Returns** `Observable<UserProcessModel[]>` - Empty response when the update completes - **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Empty response when the update completes
## Details ## Details
+33 -33
View File
@@ -11,65 +11,65 @@ Manipulates content related to a Process Instance or Task Instance in APS.
### Methods ### Methods
- `createProcessRelatedContent(processInstanceId: string = null, content: any = null, opts?: any = null): Observable<any>`<br/> - **createProcessRelatedContent**(processInstanceId: `string` = `null`, content: `any` = `null`, opts?: `any` = `null`): `Observable<any>`<br/>
Associates an uploaded file with a process instance. Associates an uploaded file with a process instance.
- `processInstanceId: string = null` - ID of the target process instance - _processInstanceId:_ `string` - ID of the target process instance
- `content: any = null` - File to associate - _content:_ `any` - File to associate
- `opts?: any = null` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `Observable<any>` - Details of created content - **Returns** `Observable<any>` - Details of created content
- `createTaskRelatedContent(taskId: string = null, file: any = null, opts?: any = null): any`<br/> - **createTaskRelatedContent**(taskId: `string` = `null`, file: `any` = `null`, opts?: `any` = `null`): `Observable<any>`<br/>
Associates an uploaded file with a task instance. Associates an uploaded file with a task instance.
- `taskId: string = null` - ID of the target task - _taskId:_ `string` - ID of the target task
- `file: any = null` - File to associate - _file:_ `any` - File to associate
- `opts?: any = null` - (Optional) Options supported by JSAPI - _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** `any` - Details of created content - **Returns** `Observable<any>` - Details of created content
- `createTemporaryRawRelatedContent(file: any = null): Observable<RelatedContentRepresentation>`<br/> - **createTemporaryRawRelatedContent**(file: `any` = `null`): `Observable<RelatedContentRepresentation>`<br/>
Create temporary related content from an uploaded file. Create temporary related content from an uploaded file.
- `file: any = null` - File to use for content - _file:_ `any` - File to use for content
- **Returns** `Observable<RelatedContentRepresentation>` - The created content data - **Returns** `Observable<RelatedContentRepresentation>` - The created content data
- `deleteRelatedContent(contentId: number = null): Observable<any>`<br/> - **deleteRelatedContent**(contentId: `number` = `null`): `Observable<any>`<br/>
Deletes related content. Deletes related content.
- `contentId: number = null` - Identifier of the content to delete - _contentId:_ `number` - Identifier of the content to delete
- **Returns** `Observable<any>` - Null response that notifies when the deletion is complete - **Returns** `Observable<any>` - Null response that notifies when the deletion is complete
- `getContentPreview(contentId: number = null): Observable<Blob>`<br/> - **getContentPreview**(contentId: `number` = `null`): `Observable<Blob>`<br/>
Gets the preview for a related content file. Gets the preview for a related content file.
- `contentId: number = null` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the content preview - **Returns** `Observable<Blob>` - Binary data of the content preview
- `getContentThumbnail(contentId: number = null): Observable<Blob>`<br/> - **getContentThumbnail**(contentId: `number` = `null`): `Observable<Blob>`<br/>
Gets the thumbnail for a related content file. Gets the thumbnail for a related content file.
- `contentId: number = null` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the thumbnail image - **Returns** `Observable<Blob>` - Binary data of the thumbnail image
- `getFileContent(contentId: number = null): Observable<RelatedContentRepresentation>`<br/> - **getFileContent**(contentId: `number` = `null`): `Observable<RelatedContentRepresentation>`<br/>
Gets the metadata for a related content item. Gets the metadata for a related content item.
- `contentId: number = null` - ID of the content item - _contentId:_ `number` - ID of the content item
- **Returns** `Observable<RelatedContentRepresentation>` - Metadata for the content - **Returns** `Observable<RelatedContentRepresentation>` - Metadata for the content
- `getFileRawContent(contentId: number = null): Observable<Blob>`<br/> - **getFileRawContent**(contentId: `number` = `null`): `Observable<Blob>`<br/>
Gets raw binary content data for a related content file. Gets raw binary content data for a related content file.
- `contentId: number = null` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the related content - **Returns** `Observable<Blob>` - Binary data of the related content
- `getFileRawContentUrl(contentId: number = null): string`<br/> - **getFileRawContentUrl**(contentId: `number` = `null`): `string`<br/>
Gets a URL for direct access to a related content file. Gets a URL for direct access to a related content file.
- `contentId: number = null` - ID of the related content - _contentId:_ `number` - ID of the related content
- **Returns** `string` - URL to access the content - **Returns** `string` - URL to access the content
- `getProcessRelatedContent(processId: string = null): Observable<any>`<br/> - **getProcessRelatedContent**(processId: `string` = `null`): `Observable<any>`<br/>
Gets related content items for a process instance. Gets related content items for a process instance.
- `processId: string = null` - ID of the target process - _processId:_ `string` - ID of the target process
- **Returns** `Observable<any>` - Metadata for the content - **Returns** `Observable<any>` - Metadata for the content
- `getTaskRelatedContent(taskId: string = null): Observable<any>`<br/> - **getTaskRelatedContent**(taskId: `string` = `null`): `Observable<any>`<br/>
Gets related content items for a task instance. Gets related content items for a task instance.
- `taskId: string = null` - ID of the target task - _taskId:_ `string` - ID of the target task
- **Returns** `Observable<any>` - Metadata for the content - **Returns** `Observable<any>` - Metadata for the content
- `handleError(error: any = null): Observable<any>`<br/> - **handleError**(error: `any` = `null`): `Observable<any>`<br/>
Reports an error message. Reports an error message.
- `error: any = null` - Data object with optional `message` and `status` fields for the error - _error:_ `any` - Data object with optional `message` and `status` fields for the error
- **Returns** `Observable<any>` - Callback when an error occurs - **Returns** `Observable<any>` - Callback when an error occurs
- `toJson(res: any = null): any`<br/> - **toJson**(res: `any` = `null`): `any`<br/>
Creates a JSON representation of data. Creates a JSON representation of data.
- `res: any = null` - Object representing data - _res:_ `any` - Object representing data
- **Returns** `any` - JSON object - **Returns** `any` - JSON object
- `toJsonArray(res: any = null): any`<br/> - **toJsonArray**(res: `any` = `null`): `any`<br/>
Creates a JSON array representation of data. Creates a JSON array representation of data.
- `res: any = null` - Object representing data - _res:_ `any` - Object representing data
- **Returns** `any` - JSON array object - **Returns** `any` - JSON array object
## Methods ## Methods
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Product Version model # Product Version model
Contains version and license information classes for Alfresco products. Contains version and license information classes for Alfresco products.
+3 -2
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Deprecated Status: Deprecated
--- ---
# Renditions service # Renditions service
Manages prearranged conversions of content to different formats. Manages prearranged conversions of content to different formats.
@@ -31,11 +32,11 @@ version of ADF.
ACS allows content items to be converted to other formats for display or delivery. ACS allows content items to be converted to other formats for display or delivery.
For example, a raw text file might be converted to HTML to enable better formatting For example, a raw text file might be converted to HTML to enable better formatting
in a web browser or a PDF might be converted to an equivalent bitmap image. A in a web browser or a PDF might be converted to an equivalent bitmap image. A
*rendition* is a prearranged conversion that is set up for an item for convenient _rendition_ is a prearranged conversion that is set up for an item for convenient
repeated use. More information about renditions is available in the repeated use. More information about renditions is available in the
[Content Services documentation](https://docs.alfresco.com/5.2/references/dev-extension-points-content-transformer.html). [Content Services documentation](https://docs.alfresco.com/5.2/references/dev-extension-points-content-transformer.html).
In the Renditions service methods, the `nodeId` is a string identifying the content In the [Renditions service](../core/renditions.service.md) methods, the `nodeId` is a string identifying the content
node that the rendition applies to. This can be obtained from node that the rendition applies to. This can be obtained from
[Document List component](../content-services/document-list.component.md) events and various other places [Document List component](../content-services/document-list.component.md) events and various other places
in the ADF API. The `encoding` identifies the conversion performed by the rendition. in the ADF API. The `encoding` identifies the conversion performed by the rendition.
+1 -1
View File
@@ -6,7 +6,7 @@ Accesses the Content Services Search API.
### Methods ### Methods
`search(query: any): Observable<NodePaging>`<br/> [`search(query: any): Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
Searches the repository. Searches the repository.
## Details ## Details
+3 -2
View File
@@ -2,6 +2,7 @@
Added: v2.1.0 Added: v2.1.0
Status: Active Status: Active
--- ---
# Search Configuration interface # Search Configuration interface
Provides fine control of parameters to a search. Provides fine control of parameters to a search.
@@ -26,7 +27,7 @@ described below.
1. Implement the service class 1. Implement the service class
Create your own service class to implement the SearchConfigurationInterface. This defines the Create your own service class to implement the [`SearchConfigurationInterface`](../core/search-configuration.interface.md). This defines the
the `generateQueryBody` method that returns the QueryBody object. See the the `generateQueryBody` method that returns the QueryBody object. See the
[QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md) [QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md)
page in the Alfresco JS API for further details about the options this object provides. page in the Alfresco JS API for further details about the options this object provides.
@@ -83,7 +84,7 @@ described below.
}) })
``` ```
You also need to add the SearchService as a provider to avoid overriding the module instance. This component will have his own instance of the SearchService that will use the class you have provided You also need to add the [`SearchService`](../../lib/core/services/search.service.ts) as a provider to avoid overriding the module instance. This component will have his own instance of the [`SearchService`](../../lib/core/services/search.service.ts) that will use the class you have provided
as its configuration. as its configuration.
## See also ## See also
+7 -2
View File
@@ -2,6 +2,7 @@
Added: v2.1.0 Added: v2.1.0
Status: Active Status: Active
--- ---
# Search Configuration service # Search Configuration service
Provides fine control of parameters to a search. Provides fine control of parameters to a search.
@@ -10,8 +11,12 @@ Provides fine control of parameters to a search.
### Methods ### Methods
`generateQueryBody(searchTerm: string, maxResults: string, skipCount: string): QueryBody`<br/> - **generateQueryBody**(searchTerm: `string` = `null`, maxResults: `number` = `null`, skipCount: `number` = `null`): `QueryBody`<br/>
Generates a QueryBody object with custom search parameters.
- _searchTerm:_ `string` -
- _maxResults:_ `number` -
- _skipCount:_ `number` -
- **Returns** `QueryBody` -
## Details ## Details
+14 -3
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Shared Links Api service # Shared Links Api service
Finds shared links to Content Services items. Finds shared links to Content Services items.
@@ -10,9 +11,19 @@ Finds shared links to Content Services items.
### Methods ### Methods
- `getSharedLinks(options: any = {}): Observable<NodePaging>` - **createSharedLinks**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<SharedLinkEntry>`<br/>
Gets shared links available to the current user. Creates a shared link available to the current user.
- `options` - Options supported by JSAPI - _nodeId:_ `string` - ID of the node to link to
- _options:_ `any` - Options supported by JSAPI
- **Returns** `Observable<SharedLinkEntry>` - The shared link just created
- **deleteSharedLink**(sharedId: `string` = `null`): `Observable<SharedLinkEntry>`<br/>
Deletes a shared link.
- _sharedId:_ `string` - ID of the link to delete
- **Returns** `Observable<SharedLinkEntry>` - Null response notifying when the operation is complete
- **getSharedLinks**(options: `any` = `{}`): [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
Gets shared links available to the current user.
- _options:_ `any` - Options supported by JSAPI
- **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of shared links
## Details ## Details
+5 -4
View File
@@ -2,6 +2,7 @@
Added: v2.1.0 Added: v2.1.0
Status: Active Status: Active
--- ---
# Sidebar action menu component # Sidebar action menu component
Displays a sidebar-action menu information panel. Displays a sidebar-action menu information panel.
@@ -31,10 +32,10 @@ Displays a sidebar-action menu information panel.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| title | `string` | | The title of the sidebar action. | | expanded | `boolean` | | Toggle the sidebar action menu on expand. |
| expanded | `boolean` | | Toggle the sidebar action menu on expand. | | title | `string` | | The title of the sidebar action. |
| width | `number` | 272 | Width in pixels for sidebar action menu options | | width | `number` | 272 | Width in pixels for sidebar action menu options |
## Details ## Details
+42 -21
View File
@@ -10,6 +10,23 @@ Displays the standard three-region ADF application layout.
![Sidenav on desktop](../docassets/images/sidenav-layout.png) ![Sidenav on desktop](../docassets/images/sidenav-layout.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Public attributes](#public-attributes)
- [Events](#events-1)
- [Template context](#template-context)
- [menuOpenState$](#menuopenstate)
- [Preserving the menu state](#preserving-the-menu-state)
## Basic Usage ## Basic Usage
```html ```html
@@ -49,13 +66,19 @@ Displays the standard three-region ADF application layout.
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default value | Description |
| --- | --- | --- | --- | | -- | -- | -- | -- |
| sidenavMin | `number` | | (**required**) Width in pixels when compacted | | expandedSidenav | `boolean` | true | Should the navigation region be expanded initially? |
| sidenavMax | `number` | | (**required**) Width in pixels when expanded |
| stepOver | `number` | | (**required**) "Breakpoint" size (ie, number of pixels for selecting between mobile and desktop layouts) |
| hideSidenav | `boolean` | false | Toggles showing/hiding the navigation region | | hideSidenav | `boolean` | false | Toggles showing/hiding the navigation region |
| expandedSidenav | `boolean` | true | Should the navigation region be expanded initially? | | sidenavMax | `number` | | ( |
| sidenavMin | `number` | | ( |
| stepOver | `number` | | ( |
### Events
| Name | Type | Description |
| -- | -- | -- |
| expanded | `EventEmitter<boolean>` | |
## Details ## Details
@@ -86,12 +109,13 @@ Mobile layout (screen width less than the `stepOver` value):
### Public attributes ### Public attributes
| Name | Type | Default | Description | | Name | Type | Default | Description |
| --- | --- | --- | --- | | ---- | ---- | ------- | ----------- |
| menuOpenState$ | Observable&lt;boolean&gt; | true | Another way to listen to menu open/closed state | | menuOpenState$ | Observable&lt;boolean> | true | Another way to listen to menu open/closed state |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- |
| expanded | `EventEmitter<boolean>` | Emmitted when the menu toggle and the collapsed/expanded state of the sideNav changes | expanded | `EventEmitter<boolean>` | Emmitted when the menu toggle and the collapsed/expanded state of the sideNav changes
### Template context ### Template context
@@ -110,25 +134,22 @@ Beside the template context's **isMenuMinimized** variable, another way to liste
Every time the menu state is changed, the following values are emitted: Every time the menu state is changed, the following values are emitted:
- true, if the menu got into opened state - true, if the menu got into opened state
- false, if the menu git into closed state - false, if the menu git into closed state
### Preserving the menu state ### Preserving the menu state
It is possible to preserve the state of the menu between sessions. This require to first set a property in the appConfig.json file. It is possible to preserve the state of the menu between sessions. This require to first set a property in the appConfig.json file.
``` "sideNav" : {
"sideNav" : { "preserveState" : true
"preserveState" : true }
}
```
If this property is set, the collapsed/expanded state will be stored in the local storage, and it will be restored with page reload or the next time the user visits the app. If this property is set, the collapsed/expanded state will be stored in the local storage, and it will be restored with page reload or the next time the user visits the app.
Beside this, it is also possible to set the default value in the appConfig.json file: Beside this, it is also possible to set the default value in the appConfig.json file:
``` "sideNav" : {
"sideNav" : { "expandedSidenav" : true
"expandedSidenav" : true }
}
```
By default the collapsed/exapnded state should be read from the application configuration file, but only if there is no value for the collapsed/expanded state in the local storage. By default the collapsed/exapnded state should be read from the application configuration file, but only if there is no value for the collapsed/expanded state in the local storage.
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Site model # Site model
Provides information about a site in a Content Services repository. Provides information about a site in a Content Services repository.
+25 -19
View File
@@ -12,25 +12,31 @@ Accesses and manipulates sites from a Content Services repository.
### Methods ### Methods
- `getSites(opts: any = {}): Observable<SitePaging>` - **deleteSite**(siteId: `string` = `null`, permanentFlag: `boolean` = `true`): `Observable<any>`<br/>
Gets a list of all sites in the repository. Deletes a site.
- `opts` - Options supported by JSAPI - _siteId:_ `string` - Site to delete
- `getSite(siteId: string, opts?: any): Observable<SiteEntry>` - _permanentFlag:_ `boolean` - True: deletion is permanent; False: site is moved to the trash
Gets the details for a site. - **Returns** `Observable<any>` - Null response notifying when the operation is complete
- `siteId` - ID of the target site - **getEcmCurrentLoggedUserName**(): `string`<br/>
- `opts` - (Optional) Options supported by JSAPI Gets the username of the user currently logged into ACS.
- `deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any>` - **Returns** `string` - Username string
Deletes a site. - **getSite**(siteId: `string` = `null`, opts?: `any` = `null`): `Observable<SiteEntry>`<br/>
- `siteId` - Site to delete Gets the details for a site.
- `permanentFlag` - True: deletion is permanent; False: site is moved to the trash - _siteId:_ `string` - ID of the target site
- `getSiteContent(siteId: string): Observable<SiteEntry>` - _opts:_ `any` - (Optional) Options supported by JSAPI
Gets a site's content. - **Returns** `Observable<SiteEntry>` - Information about the site
- `siteId` - ID of the target site - **getSiteContent**(siteId: `string` = `null`): `Observable<SiteEntry>`<br/>
- `getSiteMembers(siteId: string): Observable<SiteEntry>` Gets a site's content.
Gets a list of all a site's members. - _siteId:_ `string` - ID of the target site
- `siteId` - ID of the target site - **Returns** `Observable<SiteEntry>` - Site content
- `getEcmCurrentLoggedUserName(): string` - **getSiteMembers**(siteId: `string` = `null`): `Observable<SiteEntry>`<br/>
Gets the username of the user currently logged into ACS. Gets a list of all a site's members.
- _siteId:_ `string` - ID of the target site
- **Returns** `Observable<SiteEntry>` - Site members
- **getSites**(opts: `any` = `{}`): `Observable<SitePaging>`<br/>
Gets a list of all sites in the repository.
- _opts:_ `any` - Options supported by JSAPI
- **Returns** `Observable<SitePaging>` - List of sites
## Details ## Details
+1 -1
View File
@@ -39,5 +39,5 @@ You can bind a collection of any objects that expose the following properties:
## Events ## Events
| Name | Type | Description | | Name | Type | Description |
| --- | --- | --- | | ---- | ---- | ----------- |
| change | `EventEmitter<{ key: string, ascending: boolean }>` | Raised each time sorting key or direction gets changed. | | change | `EventEmitter<{ key: string, ascending: boolean }>` | Raised each time sorting key or direction gets changed. |
+35 -36
View File
@@ -2,9 +2,10 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Start Form component # Start Form component
Displays the Start Form for a process. Displays the Start [`Form`](../../lib/process-services/task-list/models/form.model.ts) for a process.
![Start Form screenshot](../docassets/images/ProcessStartForm.png) ![Start Form screenshot](../docassets/images/ProcessStartForm.png)
@@ -22,49 +23,47 @@ Displays the Start Form for a process.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| processDefinitionId | `string` | | Definition ID of the process to start. | | data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| processId | `string` | | Process ID of the process to start. | | disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| showOutcomeButtons | `boolean` | `true` | Should form outcome buttons be shown? | | disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| showRefreshButton | `boolean` | `true` | Should the refresh button be shown? | | fieldValidators | [`FormFieldValidator[]`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | \[] | Contains a list of form field validator instances. |
| readOnlyForm | `boolean` | `false` | Is the form read-only (ie, can't be edited)? | | form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
| form | `FormModel` | | Underlying form model instance. | | formId | `string` | | The id of the form definition to load and display with custom values. |
| taskId | `string` | | Task id to fetch corresponding form and values. | | formName | `string` | | Name of the form definition to load and display with custom values. |
| nodeId | `string` | | Content Services node ID for the form metadata. | | nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
| formId | `string` | | The id of the form definition to load and display with custom values. | | nodeId | `string` | | Content Services node ID for the form metadata. |
| formName | `string` | | Name of the form definition to load and display with custom values. | | path | `string` | | Path of the folder where the metadata will be stored. |
| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. | | processDefinitionId | `string` | | Definition ID of the process to start. |
| data | `FormValues` | | Custom form values map to be used with the rendered form. | | processId | `string` | | Process ID of the process to start. |
| path | `string` | | Path of the folder where the metadata will be stored. | | readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. | | readOnlyForm | `boolean` | false | Is the form read-only (ie, can't be edited)? |
| showTitle | `boolean` | `true` | Toggle rendering of the form title. | | saveMetadata | `boolean` | false | Toggle saving of form metadata. |
| showCompleteButton | `boolean` | `true` | Toggle rendering of the `Complete` outcome button. | | showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
| disableCompleteButton | `boolean` | `false` | If true then the `Complete` outcome button is shown but it will be disabled. | | showDebugButton | `boolean` | false | Toggle debug options. |
| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. | | showOutcomeButtons | `boolean` | true | Should form outcome buttons be shown? |
| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. | | showRefreshButton | `boolean` | true | Should the refresh button be shown? |
| showDebugButton | `boolean` | `false` | Toggle debug options. | | showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. | | showTitle | `boolean` | true | Toggle rendering of the form title. |
| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. | | showValidationIcon | `boolean` | true | Toggle rendering of the validation icon next to the form title. |
| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. | | taskId | `string` | | Task id to fetch corresponding form and values. |
| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | -- | -- | -- |
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. | | executeOutcome | [`EventEmitter<FormOutcomeEvent>`](../../lib/core/form/components/widgets/core/form-outcome-event.model.ts) | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when a field of the form is clicked. | | formCompleted | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Complete` outcome. |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. | | formContentClicked | [`EventEmitter<ContentLinkModel>`](../../lib/core/form/components/widgets/core/content-link.model.ts) | Emitted when a field of the form is clicked. |
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. | | formDataRefreshed | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when form values are refreshed due to a data property change. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. | | formLoaded | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is loaded or reloaded. |
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. | | formSaved | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Save` or custom outcomes. |
| formDataRefreshed | `EventEmitter<FormModel>` | Emitted when form values are refreshed due to a data property change. |
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. | | onError | `EventEmitter<any>` | Emitted when any error occurs. |
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. |
## Details ## Details
The [Start Process component](../process-services/start-process.component.md) uses the Start Form component The [Start Process component](../process-services/start-process.component.md) uses the Start [`Form`](../../lib/process-services/task-list/models/form.model.ts) component
to display the to display the
[start form](http://docs.alfresco.com/process-services1.6/topics/none_start_event.html) [start form](http://docs.alfresco.com/process-services1.6/topics/none_start_event.html)
for the process. for the process.
+18 -16
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Storage service # Storage service
Stores items in the form of key-value pairs. Stores items in the form of key-value pairs.
@@ -10,22 +11,23 @@ Stores items in the form of key-value pairs.
### Methods ### Methods
- `getItem(key: string): string` - **clear**()<br/>
Gets an item. Removes all currently stored items.
- `key` - Key to identify the item - **getItem**(key: `string` = `null`): `string | null`<br/>
- `setItem(key: string, data: string)` Gets an item.
Stores an item - _key:_ `string` - Key to identify the item
- `key` - Key to identify the item - **Returns** `string | null` - The item (if any) retrieved by the key
- `data` - Data to store - **hasItem**(key: `string` = `null`): `boolean`<br/>
- `clear()` Is any item currently stored under `key`?
Removes all currently stored items. - _key:_ `string` - Key identifying item to check
- **Returns** `boolean` - True if key retrieves an item, false otherwise
- `removeItem(key: string)` - **removeItem**(key: `string` = `null`)<br/>
Removes a single item. Removes a single item.
- `key` - Key to identify the item - _key:_ `string` - Key to identify the item
- `hasItem(key: string): boolean` - **setItem**(key: `string` = `null`, data: `string` = `null`)<br/>
Is any item currently stored under `key`? Stores an item
- `key` - Key identifying item to check - _key:_ `string` - Key to identify the item
- _data:_ `string` - Data to store
## Details ## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Text Highlight pipe # Text Highlight pipe
Adds highlighting to words or sections of text that match a search string. Adds highlighting to words or sections of text that match a search string.
+3 -3
View File
@@ -18,9 +18,9 @@ Implements text field input masks.
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------- | ----------- | | -- | -- | -- | -- |
| textMask | any | | Object defining mask and "reversed" status. | | textMask | `object` | | Object defining mask and "reversed" status. |
## Details ## Details
+11 -9
View File
@@ -12,15 +12,17 @@ Retrieves an SVG thumbnail image to represent a document type.
### Methods ### Methods
- `getDocumentThumbnailUrl(node: any): string` - **getDefaultMimeTypeIcon**(): `string`<br/>
Gets a thumbnail URL for the given document node. Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
- `node` - Node to get URL for. - **Returns** `string` - URL string
- `getMimeTypeIcon(mimeType: string): string` - **getDocumentThumbnailUrl**(node: `any` = `null`): `string`<br/>
Gets a thumbnail URL for a MIME type. Gets a thumbnail URL for the given document node.
- `mimeType` - MIME type for the thumbnail - _node:_ `any` - Node to get URL for.
- `getDefaultMimeTypeIcon(): string` - **Returns** `string` - URL string
Gets a "miscellaneous" thumbnail URL for types with no other icon defined. - **getMimeTypeIcon**(mimeType: `string` = `null`): `string`<br/>
Gets a thumbnail URL for a MIME type.
- _mimeType:_ `string` - MIME type for the thumbnail
- **Returns** `string` - URL string
## Details ## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Time Ago pipe # Time Ago pipe
Converts a recent past date into a number of days ago. Converts a recent past date into a number of days ago.
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Toolbar Divider Component # Toolbar Divider Component
Divides groups of elements in a Toolbar with a visual separator. Divides groups of elements in a Toolbar with a visual separator.
+2 -1
View File
@@ -2,9 +2,10 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Toolbar Title Component # Toolbar Title Component
Supplies custom HTML to be included in a Toolbar component title. Supplies custom HTML to be included in a [Toolbar component](../core/toolbar.component.md) title.
![](../docassets/images/adf-toolbar-02.png) ![](../docassets/images/adf-toolbar-02.png)
+21 -3
View File
@@ -2,12 +2,30 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Toolbar Component # Toolbar Component
Simple container for headers, titles, actions and breadcrumbs. Simple container for headers, titles, actions and breadcrumbs.
![](../docassets/images/adf-toolbar-01.png) ![](../docassets/images/adf-toolbar-01.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [Custom title](#custom-title)
- [Divider](#divider)
- [Dropdown menu](#dropdown-menu)
- [Custom color](#custom-color)
- [See also](#see-also)
## Basic Usage ## Basic Usage
```html ```html
@@ -26,9 +44,9 @@ Simple container for headers, titles, actions and breadcrumbs.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| title | `string` | `''` | Toolbar title. | | color | `string` | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. |
| color | `string` | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. | | title | `string` | "" | Toolbar title. |
## Details ## Details
+23 -16
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# Translation service # Translation service
Supports localisation. Supports localisation.
@@ -10,21 +11,27 @@ Supports localisation.
### Methods ### Methods
- `addTranslationFolder(name: string = '', path: string = '')` - **addTranslationFolder**(name: `string` = `""`, path: `string` = `""`)<br/>
Adds a new folder of translation source files. Adds a new folder of translation source files.
- `name` - Name for the translation provider - _name:_ `string` - Name for the translation provider
- `path` - Path to the folder - _path:_ `string` - Path to the folder
- `use(lang: string): Observable<any>` - **get**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `Observable<string | any>`<br/>
Sets the target language for translations. Gets the translation for the supplied key.
- `lang` - Code name for the language - _key:_ `string | Array<string>` - Key to translate
- `get(key: string|Array<string>, interpolateParams?: Object): Observable<any>` - _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
Gets the translation for the supplied key. - **Returns** `Observable<string | any>` - Translated text
- `key` - Key to translate - **instant**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `string | any`<br/>
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message Directly returns the translation for the supplied key.
- `instant(key: string | Array<string>, interpolateParams?: Object): any` - _key:_ `string | Array<string>` - Key to translate
Directly returns the translation for the supplied key. - _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- `key` - Key to translate - **Returns** `string | any` - Translated text
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message - **onTranslationChanged**(lang: `string` = `null`)<br/>
Triggers a notification callback when the translation language changes.
- _lang:_ `string` - The new language code
- **use**(lang: `string` = `null`): `Observable<any>`<br/>
Sets the target language for translations.
- _lang:_ `string` - Code name for the language
- **Returns** `Observable<any>` - Translations available for the language
## Details ## Details
@@ -140,7 +147,7 @@ You can register as many entries as you like.
Depending on your application, you may want to have buttons or dropdown menus to allow language selection for the end users. Depending on your application, you may want to have buttons or dropdown menus to allow language selection for the end users.
You can use `TranslationService` to switch languages from your code based on input events of your choice: You can use [`TranslationService`](../core/translation.service.md) to switch languages from your code based on input events of your choice:
```ts ```ts
class MyComponent { class MyComponent {
+2 -2
View File
@@ -62,7 +62,7 @@ value or expression:
### Modes ### Modes
The Upload directive supports two modes: The [Upload directive](../core/upload.directive.md) supports two modes:
- **drop** mode, where the decorated element acts like a drop zone for files (enabled by default) - **drop** mode, where the decorated element acts like a drop zone for files (enabled by default)
- **click** mode, where the decorated element invokes a file dialog to select files or folders. - **click** mode, where the decorated element invokes a file dialog to select files or folders.
@@ -99,7 +99,7 @@ In click mode you can provide extra attributes for the file dialog:
#### Drop mode #### Drop mode
Currently, the upload directive supports only file drops (single or multiple). Currently, the [upload directive](../core/upload.directive.md) supports only file drops (single or multiple).
Support for folders and `accept` filters will probably be implemented in a Support for folders and `accept` filters will probably be implemented in a
future version. future version.
+13 -13
View File
@@ -12,28 +12,28 @@ Provides access to various APIs related to file upload features.
### Methods ### Methods
- `addToQueue(files: FileModel[] = null): FileModel[]`<br/> - **addToQueue**(files: [`FileModel[]`](../../lib/core/models/file.model.ts) = `null`): [`FileModel[]`](../../lib/core/models/file.model.ts)<br/>
Adds files to the uploading queue to be uploaded Adds files to the uploading queue to be uploaded
- `files: FileModel[] = null` - One or more separate parameters or an array of files to queue - _files:_ [`FileModel[]`](../../lib/core/models/file.model.ts) - One or more separate parameters or an array of files to queue
- **Returns** `FileModel[]` - Array of files that were not blocked from upload by the ignore list - **Returns** [`FileModel[]`](../../lib/core/models/file.model.ts) - Array of files that were not blocked from upload by the ignore list
- `cancelUpload(files: FileModel[] = null)`<br/> - **cancelUpload**(files: [`FileModel[]`](../../lib/core/models/file.model.ts) = `null`)<br/>
Cancels uploading of files. Cancels uploading of files.
- `files: FileModel[] = null` - One or more separate parameters or an array of files specifying uploads to cancel - _files:_ [`FileModel[]`](../../lib/core/models/file.model.ts) - One or more separate parameters or an array of files specifying uploads to cancel
- `clearQueue()`<br/> - **clearQueue**()<br/>
Clears the upload queue Clears the upload queue
- `getQueue(): FileModel[]`<br/> - **getQueue**(): [`FileModel[]`](../../lib/core/models/file.model.ts)<br/>
Gets the file Queue Gets the file Queue
- **Returns** `FileModel[]` - Array of files that form the queue - **Returns** [`FileModel[]`](../../lib/core/models/file.model.ts) - Array of files that form the queue
- `getUploadPromise(file: FileModel = null): any`<br/> - **getUploadPromise**(file: [`FileModel`](../../lib/core/models/file.model.ts) = `null`): `any`<br/>
Gets an upload promise for a file. Gets an upload promise for a file.
- `file: FileModel = null` - The target file - _file:_ [`FileModel`](../../lib/core/models/file.model.ts) - The target file
- **Returns** `any` - Promise that is resolved if the upload is successful or error otherwise - **Returns** `any` - Promise that is resolved if the upload is successful or error otherwise
- `isUploading(): boolean`<br/> - **isUploading**(): `boolean`<br/>
Checks whether the service is uploading a file. Checks whether the service is uploading a file.
- **Returns** `boolean` - True if a file is uploading, false otherwise - **Returns** `boolean` - True if a file is uploading, false otherwise
- `uploadFilesInTheQueue(emitter: EventEmitter<any> = null)`<br/> - **uploadFilesInTheQueue**(emitter: `EventEmitter<any>` = `null`)<br/>
Finds all the files in the queue that are not yet uploaded and uploads them into the directory folder. Finds all the files in the queue that are not yet uploaded and uploads them into the directory folder.
- `emitter: EventEmitter<any> = null` - (Deprecated) Emitter to invoke on file status change - _emitter:_ `EventEmitter<any>` - (Deprecated) Emitter to invoke on file status change
## Events ## Events
+8 -7
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# User Info component # User Info component
Shows user information. Shows user information.
@@ -17,13 +18,13 @@ Shows user information.
### Properties ### Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | -- | -- | -- | -- |
| ecmBackgroundImage | `string` | `'./assets/images/ecm-background.png'` | Custom path for the background banner image for ACS users. | | bpmBackgroundImage | `string` | "./assets/images/bpm-background.png" | Custom path for the background banner image for APS users. |
| bpmBackgroundImage | `string` | `'./assets/images/bpm-background.png'` | Custom path for the background banner image for APS users. | | ecmBackgroundImage | `string` | "./assets/images/ecm-background.png" | Custom path for the background banner image for ACS users. |
| menuPositionX | `string` | `'after'` | Custom choice for opening the menu at the bottom. Can be `before` or `after`. | | menuPositionX | `string` | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
| menuPositionY | `string` | `'below'` | Custom choice for opening the menu at the bottom. Can be `above` or `below`. | | menuPositionY | `string` | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
| showName | `boolean` | `true` | Shows/hides the username next to the user info button. | | namePosition | `string` | "right" | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
| namePosition | `string` | `'right'` | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. | | showName | `boolean` | true | Shows/hides the username next to the user info button. |
## Details ## Details
+2 -1
View File
@@ -2,9 +2,10 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# User Initial pipe # User Initial pipe
Takes the name fields of a UserProcessModel object and extracts and formats the initials. Takes the name fields of a [`UserProcessModel`](../core/user-process.model.md) object and extracts and formats the initials.
## Basic Usage ## Basic Usage
+31 -30
View File
@@ -12,33 +12,35 @@ Stores preferences for components.
### Methods ### Methods
- `get(property: string, defaultValue?: string): string` - **get**(property: `string` = `null`, defaultValue?: `string` = `null`): `string`<br/>
Gets a preference property. Gets a preference property.
- `property` - Name of the property - _property:_ `string` - Name of the property
- `defaultValue` - (Optional) Default to return if the property is not found - _defaultValue:_ `string` - (Optional) Default to return if the property is not found
- `set(property: string, value: any)` - **Returns** `string` - Preference property
Sets a preference property. - **getDefaultLocale**(): `string`<br/>
- `property` - Name of the property Gets the default locale.
- `value` - New value for the property - **Returns** `string` - Default locale language code
- `getStoragePrefix(): string` - **getDefaultPageSizes**(): `number[]`<br/>
Gets the active storage prefix for preferences. Gets an array containing the available page sizes.
- **Returns** `number[]` - Array of page size values
- `setStoragePrefix(value: string)` - **getPropertyKey**(property: `string` = `null`): `string`<br/>
Sets the active storage prefix for preferences. Gets the full property key with prefix.
- `value` - Name of the prefix - _property:_ `string` - The property name
- `getPropertyKey(property: string): string` - **Returns** `string` - [Property](../../lib/content-services/content-metadata/interfaces/property.interface.ts) key
Gets the full property key with prefix. - **getStoragePrefix**(): `string`<br/>
- `property` - The property name Gets the active storage prefix for preferences.
- `getDefaultPageSizes(): number[]` - **Returns** `string` - Storage prefix
Gets an array containing the available page sizes. - **select**(property: `string` = `null`): `Observable<any>`<br/>
Sets up a callback to notify when a property has changed.
- `getDefaultLocale(): string` - _property:_ `string` - The property to watch
Gets the default locale. - **Returns** `Observable<any>` - Notification callback
- **set**(property: `string` = `null`, value: `any` = `null`)<br/>
- `select(property: string) : Observable` Sets a preference property.
Return the value for the user status property changed - _property:_ `string` - Name of the property
- `property` - The property name to query - _value:_ `any` - New value for the property
- **setStoragePrefix**(value: `string` = `null`)<br/>
Sets the active storage prefix for preferences.
- _value:_ `string` - Name of the prefix
## Details ## Details
@@ -63,7 +65,7 @@ class AppComponent {
} }
``` ```
As soon as you assign the storage prefix, all settings that you get or set via the `UserPreferencesService` will be saved to a dedicated profile. As soon as you assign the storage prefix, all settings that you get or set via the [`UserPreferencesService`](../core/user-preferences.service.md) will be saved to a dedicated profile.
You can import the service into your controller and use its APIs as shown below: You can import the service into your controller and use its APIs as shown below:
@@ -104,7 +106,7 @@ whole set of user properties. This is useful when a component needs to react to
``` ```
You can also use the `select` method to get notification when a particular property is changed. You can also use the `select` method to get notification when a particular property is changed.
A set of basic properties is added into the enumeration `UserPreferenceValues` which gives you the key value to access the standard user preference service properties : **PaginationSize**, **DisableCSRF**, **Locale** and **SupportedPageSizes**. A set of basic properties is added into the enumeration [`UserPreferenceValues`](../../lib/core/services/user-preferences.service.ts) which gives you the key value to access the standard user preference service properties : **PaginationSize**, **DisableCSRF**, **Locale** and **SupportedPageSizes**.
```ts ```ts
userPreferences.disableCSRF = true; userPreferences.disableCSRF = true;
@@ -112,4 +114,3 @@ A set of basic properties is added into the enumeration `UserPreferenceValues` w
console.log(CSRFflag); //this will be true; console.log(CSRFflag); //this will be true;
}); });
``` ```
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
--- ---
# User Process model # User Process model
Represents a Process Services user. Represents a Process Services user.
+14 -14
View File
@@ -105,20 +105,20 @@ URL with `urlFile`.
| thumbnailsTemplate | `TemplateRef<any>` | null | The template for the pdf thumbnails. | | thumbnailsTemplate | `TemplateRef<any>` | null | The template for the pdf thumbnails. |
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. | | urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. | | urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
| fileNodeId | `` | | Node Id of the file to load. | | fileNodeId | | | Node Id of the file to load. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| download | `any` | Emitted when user clicks the 'Download' button. | | download | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Download' button. |
| extensionChange | `any` | Emitted when the filename extension changes. | | extensionChange | `EventEmitter<string>` | Emitted when the filename extension changes. |
| goBack | `any` | Emitted when user clicks the 'Back' button. | | goBack | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Back' button. |
| navigateBefore | `any` | Emitted when user clicks 'Navigate Before' ("&lt;") button. | | navigateBefore | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Before' ("&lt;") button. |
| navigateNext | `any` | Emitted when user clicks 'Navigate Next' (">") button. | | navigateNext | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Next' (">") button. |
| print | `any` | Emitted when user clicks the 'Print' button. | | print | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Print' button. |
| share | `any` | Emitted when user clicks the 'Share' button. | | share | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Share' button. |
| showViewerChange | `any` | Emitted when the viewer is shown or hidden. | | showViewerChange | `EventEmitter<boolean>` | Emitted when the viewer is shown or hidden. |
## Keyboard shortcuts ## Keyboard shortcuts
@@ -183,7 +183,7 @@ You can provide custom file parameters, for example a value for the `mimeType` o
### Supported file formats ### Supported file formats
The Viewer component consists of separate Views that handle particular types of type families based on either a file extension or a mime type: The [Viewer component](../core/viewer.component.md) consists of separate Views that handle particular types of type families based on either a file extension or a mime type:
- PDF View - PDF View
- application/pdf - application/pdf
@@ -241,7 +241,7 @@ Configure your webpack-enabled application with the PDF.js library as follows.
npm install pdfjs-dist npm install pdfjs-dist
``` ```
2. Update `vendors.ts` by appending the following code. This will enable the viewer component 2. Update `vendors.ts` by appending the following code. This will enable the [viewer component](../core/viewer.component.md)
and compatibility mode for all browsers. It will also configure the web worker for the PDF.js and compatibility mode for all browsers. It will also configure the web worker for the PDF.js
library to render PDF files in the background: library to render PDF files in the background:
@@ -265,7 +265,7 @@ new CopyWebpackPlugin([
]) ])
``` ```
The Viewer component now should be able to display PDF files. The [Viewer component](../core/viewer.component.md) now should be able to display PDF files.
### Custom toolbar ### Custom toolbar
@@ -309,7 +309,7 @@ The result should look like this:
### Custom sidebar ### Custom sidebar
The Viewer component also supports custom sidebar components and layouts. The [Viewer component](../core/viewer.component.md) also supports custom sidebar components and layouts.
Set the `allowSidebar` property to `true` to enable this feature. Set the `allowSidebar` property to `true` to enable this feature.
The custom sidebar can be injected in two different ways: The custom sidebar can be injected in two different ways:
@@ -428,7 +428,7 @@ You can enable a custom "More actions" menu by providing at least one action ins
### Extending the Viewer ### Extending the Viewer
You can define your own custom handle to handle other file formats that are not yet supported by You can define your own custom handle to handle other file formats that are not yet supported by
the Viewer component. Below is an example that shows how to use the `adf-viewer-extension` the [Viewer component](../core/viewer.component.md). Below is an example that shows how to use the `adf-viewer-extension`
to handle 3D data files: to handle 3D data files:
```html ```html
+1 -1
View File
@@ -5,7 +5,7 @@
| -- | -- | -- | -- | | -- | -- | -- | -- |
<% properties.forEach(function(prop) { -%> <% properties.forEach(function(prop) { -%>
<% if (prop.isInput) { -%> <% if (prop.isInput) { -%>
| <%= prop.name %> | `<%- prop.type %>` | <%- prop.defaultValue %> | <%- prop.docText %> | | <%= prop.name %> | <% if (prop.type) { %>`<%- prop.type %>`<% } %> | <%- prop.defaultValue %> | <%- prop.docText %> |
<% } -%> <% } -%>
<% }) -%> <% }) -%>
<% } %> <% } %>
+2 -2
View File
@@ -3,10 +3,10 @@
### Methods ### Methods
<% methods.forEach(function(meth) { -%> <% methods.forEach(function(meth) { -%>
- **<%= meth.name %>**<%= meth.signature %><% if (meth.returnsSomething) { %>: `<%- meth.returnType %>`<% } %><br/> - **<%= meth.name %>**<%- meth.signature %><% if (meth.returnsSomething) { %>: `<%- meth.returnType %>`<% } %><br/>
<%= meth.docText %> <%= meth.docText %>
<% meth.params.forEach(function(param) { -%> <% meth.params.forEach(function(param) { -%>
- *<%= param.name%>:* `<%- param.type %>` - <% if (param.isOptional) { %>(Optional)<% } %><%= param.docText %> - *<%= param.name%>:* `<%- param.type %>` - <% if (param.isOptional) { %>(Optional) <% } %><%= param.docText %>
<% }) -%> <% }) -%>
<% if (meth.returnsSomething) { -%> <% if (meth.returnsSomething) { -%>
- **Returns** `<%- meth.returnType %>` - <%= meth.returnDocText %> - **Returns** `<%- meth.returnType %>` - <%= meth.returnDocText %>
+7 -7
View File
@@ -1,5 +1,5 @@
"use strict"; "use strict";
exports.__esModule = true; Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path"); var path = require("path");
var fs = require("fs"); var fs = require("fs");
var typedoc_1 = require("typedoc"); var typedoc_1 = require("typedoc");
@@ -226,10 +226,10 @@ function handleLinksInBodyText(aggData, text) {
var link = resolveTypeLink(aggData, word); var link = resolveTypeLink(aggData, word);
var matchStart = void 0; var matchStart = void 0;
if (!link) { if (!link) {
var match = matcher.nextWord(word.toLowerCase(), scanner.index); var match_1 = matcher.nextWord(word.toLowerCase(), scanner.index);
if (match && match[0]) { if (match_1 && match_1[0]) {
link = resolveTypeLink(aggData, match[0].value); link = resolveTypeLink(aggData, match_1[0].value);
matchStart = match[0].startPos; matchStart = match_1[0].startPos;
} }
} }
else { else {
@@ -268,12 +268,12 @@ function resolveTypeLink(aggData, text) {
} }
} }
function cleanTypeName(text) { function cleanTypeName(text) {
var matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)>/); var matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)(\[\])?>/);
if (matches) { if (matches) {
return matches[1]; return matches[1];
} }
else { else {
return text; return text.replace(/\[\]$/, "");
} }
} }
function isLinkable(kind) { function isLinkable(kind) {
+3 -2
View File
@@ -20,6 +20,7 @@ import { CommentTag } from "typedoc/dist/lib/models";
import * as unist from "../unistHelpers"; import * as unist from "../unistHelpers";
import * as ngHelpers from "../ngHelpers"; import * as ngHelpers from "../ngHelpers";
import { match } from "minimatch";
const includedNodeTypes = [ const includedNodeTypes = [
@@ -335,12 +336,12 @@ function resolveTypeLink(aggData, text): string {
function cleanTypeName(text) { function cleanTypeName(text) {
let matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)>/); let matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)(\[\])?>/);
if (matches) { if (matches) {
return matches[1]; return matches[1];
} else { } else {
return text; return text.replace(/\[\]$/, "");
} }
} }