mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ADF-2764] Applied new doc tool features to core library (#3383)
This commit is contained in:
parent
5831bc1d77
commit
41777e0540
@ -6,15 +6,15 @@ Last reviewed: 2018-05-16
|
||||
|
||||
# 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:
|
||||
|
||||
- create a version file : npm list --depth=0 --json=true --prod=true > versions.json
|
||||
- provide this version file in the dist folder
|
||||
- create a version file : npm list --depth=0 --json=true --prod=true > versions.json
|
||||
- provide this version file in the dist folder
|
||||
|
||||
### Basic Usage
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-about></adf-about>
|
||||
```
|
||||
|
||||
|
@ -40,18 +40,18 @@ export class MyComponent implements OnInit {
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| heading | `string` | | Title heading for the group. |
|
||||
| headingIcon | `string` | | The material design icon. |
|
||||
| headingIconTooltip | `string` | | Tooltip message to be shown for headingIcon |
|
||||
| hasAccordionIcon | `boolean` | `true` | Should the (expanded) accordion icon be shown? |
|
||||
| isOpen | `boolean` | | Is this group currently open? |
|
||||
| isSelected | `boolean` | | Is this group currently selected? |
|
||||
| -- | -- | -- | -- |
|
||||
| hasAccordionIcon | `boolean` | true | Should the (expanded) accordion icon be shown? |
|
||||
| heading | `string` | | Title heading for the group. |
|
||||
| headingIcon | `string` | | The material design icon. |
|
||||
| headingIconTooltip | `string` | | Tooltip message to be shown for headingIcon |
|
||||
| isOpen | | | Is this group currently open? |
|
||||
| isSelected | | | Is this group currently selected? |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| -- | -- | -- |
|
||||
| headingClick | `EventEmitter<any>` | Emitted when the heading is clicked. |
|
||||
|
||||
## Details
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Activiti Alfresco Content Service
|
||||
|
||||
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
|
||||
|
||||
#### getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]>
|
||||
#### getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]>
|
||||
|
||||
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:
|
||||
|
||||
@ -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:
|
||||
|
||||
```
|
||||
0:
|
||||
folder: false
|
||||
id: "2223d3c2-0709-4dd7-a79b-c45571901889;1.0"
|
||||
simpleType: "pdf"
|
||||
title: "JLAN_Server_Installation_Guide.pdf"
|
||||
1:
|
||||
folder: false
|
||||
id: "900b4dc0-bfdc-4ec1-84dd-5f1f0a420066;1.0"
|
||||
simpleType: "image"
|
||||
title: "Screen Shot 2017-09-21 at 15.44.23.png"
|
||||
|
||||
2:
|
||||
folder: true
|
||||
id: "f7010382-7b4e-4a78-bb94-9de092439230"
|
||||
simpleType: "folder"
|
||||
title: "Event More Stuff"
|
||||
```
|
||||
0:
|
||||
folder: false
|
||||
id: "2223d3c2-0709-4dd7-a79b-c45571901889;1.0"
|
||||
simpleType: "pdf"
|
||||
title: "JLAN_Server_Installation_Guide.pdf"
|
||||
1:
|
||||
folder: false
|
||||
id: "900b4dc0-bfdc-4ec1-84dd-5f1f0a420066;1.0"
|
||||
simpleType: "image"
|
||||
title: "Screen Shot 2017-09-21 at 15.44.23.png"
|
||||
|
||||
2:
|
||||
folder: true
|
||||
id: "f7010382-7b4e-4a78-bb94-9de092439230"
|
||||
simpleType: "folder"
|
||||
title: "Event More Stuff"
|
||||
|
||||
#### 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
|
||||
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:
|
||||
|
||||
```
|
||||
link:
|
||||
contentAvailable: true
|
||||
created: Tue Nov 07 2017 13:18:48 GMT+0000 (GMT) {}
|
||||
createdBy: {id: 1, firstName: null, lastName: "Administrator", email: "admin@app.activiti.com"}
|
||||
id: 6006
|
||||
link:true
|
||||
mimeType: null
|
||||
name: "simple.txt"
|
||||
previewStatus: "queued"
|
||||
relatedContent: false
|
||||
simpleType: "content"
|
||||
source: "alfresco-2"
|
||||
sourceId: "da196918-1324-4e97-9d26-d28f1837a0b6@sample-workspace"
|
||||
thumbnailStatus: "queued"
|
||||
```
|
||||
|
||||
link:
|
||||
contentAvailable: true
|
||||
created: Tue Nov 07 2017 13:18:48 GMT+0000 (GMT) {}
|
||||
createdBy: {id: 1, firstName: null, lastName: "Administrator", email: "admin@app.activiti.com"}
|
||||
id: 6006
|
||||
link:true
|
||||
mimeType: null
|
||||
name: "simple.txt"
|
||||
previewStatus: "queued"
|
||||
relatedContent: false
|
||||
simpleType: "content"
|
||||
source: "alfresco-2"
|
||||
sourceId: "da196918-1324-4e97-9d26-d28f1837a0b6@sample-workspace"
|
||||
thumbnailStatus: "queued"
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
<!-- seealso end -->
|
||||
<!-- seealso end -->
|
||||
|
@ -26,8 +26,6 @@ export class MyComponent implements OnInit {
|
||||
}
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
@ -47,7 +45,7 @@ export class MyComponent implements OnInit {
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| ---- | ---- | ----------- |
|
||||
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Emitted when a node updates. |
|
||||
|
||||
## Details
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Alfresco Content service
|
||||
|
||||
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/>
|
||||
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.
|
||||
|
||||
`hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/>
|
||||
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.
|
||||
|
||||
## Details
|
||||
@ -51,9 +52,7 @@ See the
|
||||
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 -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
<!-- seealso end -->
|
||||
|
||||
|
||||
|
||||
|
@ -37,4 +37,4 @@ You can also chain values with other pipes, for example `translation` one:
|
||||
|
||||
## See also
|
||||
|
||||
- [App Config service](app-config.service.md)
|
||||
- [App Config service](app-config.service.md)
|
||||
|
@ -11,29 +11,32 @@ Supports app configuration settings, stored server side.
|
||||
|
||||
### 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.
|
||||
- `key: string = null` - Name of the property
|
||||
- `defaultValue?: T = null` - (Optional) Value to return if the key is not found
|
||||
- _key:_ `string` - Name of the property
|
||||
- _defaultValue:_ `T` - (Optional) Value to return if the key is not found
|
||||
- **Returns** `T` - Value of the property
|
||||
- `getLocationHostname(): string`<br/>
|
||||
- **getLocationHostname**(): `string`<br/>
|
||||
Gets the location.hostname property.
|
||||
- **Returns** `string` - Value of the property
|
||||
- `getLocationPort(prefix: string = ""): string`<br/>
|
||||
- **getLocationPort**(prefix: `string` = `""`): `string`<br/>
|
||||
Gets the location.port property.
|
||||
- `prefix: string = ""` - Text added before port value
|
||||
- _prefix:_ `string` - Text added before port value
|
||||
- **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.
|
||||
- **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.
|
||||
- `property: string = null` - The desired property value
|
||||
- **Returns** `Observable<any>` - Property value, when loaded
|
||||
- _property:_ `string` - The desired property value
|
||||
- **Returns** `Observable<any>` - [Property](../../lib/content-services/content-metadata/interfaces/property.interface.ts) value, when loaded
|
||||
|
||||
## 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.
|
||||
|
||||
@ -62,7 +65,7 @@ Example of the default settings file content:
|
||||
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 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
|
||||
...
|
||||
@ -78,7 +81,7 @@ You can also change the path or name of the configuration file when importing th
|
||||
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**
|
||||
|
||||
@ -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.
|
||||
|
||||
### 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
|
||||
{
|
||||
|
@ -12,16 +12,16 @@ Gets details of the Process Services apps that are deployed for the user.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getApplicationDetailsById(appId: number = null): Observable<AppDefinitionRepresentation>`<br/>
|
||||
- **getApplicationDetailsById**(appId: `number` = `null`): `Observable<AppDefinitionRepresentation>`<br/>
|
||||
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
|
||||
- `getDeployedApplications(): Observable<AppDefinitionRepresentation[]>`<br/>
|
||||
- **getDeployedApplications**(): `Observable<AppDefinitionRepresentation[]>`<br/>
|
||||
Gets a list of deployed apps for this user.
|
||||
- **Returns** `Observable<AppDefinitionRepresentation[]>` - The list of deployed apps
|
||||
- `getDeployedApplicationsByName(name: string = null): Observable<AppDefinitionRepresentation>`<br/>
|
||||
Gets a list of deployed apps for this user, where the app name is \`name\`.
|
||||
- `name: string = null` - Name of the app
|
||||
- **getDeployedApplicationsByName**(name: `string` = `null`): `Observable<AppDefinitionRepresentation>`<br/>
|
||||
Gets a list of deployed apps for this user, where the app name is `name`.
|
||||
- _name:_ `string` - Name of the app
|
||||
- **Returns** `Observable<AppDefinitionRepresentation>` - The list of deployed apps
|
||||
|
||||
## Details
|
||||
|
@ -12,63 +12,63 @@ Provides authentication to ACS and APS.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getBpmUsername(): string`<br/>
|
||||
- **getBpmUsername**(): `string`<br/>
|
||||
Gets the BPM username
|
||||
- **Returns** `string` - The BPM username
|
||||
- `getEcmUsername(): string`<br/>
|
||||
- **getEcmUsername**(): `string`<br/>
|
||||
Gets 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.
|
||||
- `provider: string = null` - Service provider. Can be "ECM", "BPM" or "ALL".
|
||||
- **Returns** `string` - The redirect URL
|
||||
- `getTicketBpm(): string | null`<br/>
|
||||
- _provider:_ `string` - Service provider. Can be "ECM", "BPM" or "ALL".
|
||||
- **Returns** `any[]` - The redirect URL
|
||||
- **getTicketBpm**(): `string | null`<br/>
|
||||
Gets the BPM ticket stored in the Storage.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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
|
||||
- `error: any = null` - Error message
|
||||
- _error:_ `any` - 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.
|
||||
- **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.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- `isLoggedIn(): boolean`<br/>
|
||||
- **isLoggedIn**(): `boolean`<br/>
|
||||
Checks if the user logged in.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- `isRememberMeSet(): boolean`<br/>
|
||||
- **isRememberMeSet**(): `boolean`<br/>
|
||||
Checks whether the "remember me" cookie was set or not.
|
||||
- **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.
|
||||
- `username: string = null` - Username for the login
|
||||
- `password: string = null` - Password for the login
|
||||
- `rememberMe: boolean = false` - Stores the user's login details if true
|
||||
- _username:_ `string` - Username for the login
|
||||
- _password:_ `string` - Password for the login
|
||||
- _rememberMe:_ `boolean` - Stores the user's login details if true
|
||||
- **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.
|
||||
- **Returns** `any` - Response event called when logout is complete
|
||||
- `removeTicket()`<br/>
|
||||
- **Returns** `Observable<any>` - Response event called when logout is complete
|
||||
- **removeTicket**()<br/>
|
||||
Removes the login ticket from Storage.
|
||||
- `saveTicketAuth()`<br/>
|
||||
- **saveTicketAuth**()<br/>
|
||||
Saves the AUTH ticket in the Storage.
|
||||
- `saveTicketBpm()`<br/>
|
||||
- **saveTicketBpm**()<br/>
|
||||
Saves the BPM ticket in the Storage.
|
||||
- `saveTicketEcm()`<br/>
|
||||
- **saveTicketEcm**()<br/>
|
||||
Saves the ECM ticket in the Storage.
|
||||
- `saveTickets()`<br/>
|
||||
- **saveTickets**()<br/>
|
||||
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.
|
||||
- `url: RedirectionModel = null` - URL to redirect to
|
||||
- _url:_ [`RedirectionModel`](../../lib/core/models/redirection.model.ts) - URL to redirect to
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -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
|
||||
you have added about five subsections in the Details part.
|
||||
-->
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
@ -16,6 +17,7 @@ you have added about five subsections in the Details part.
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Basic Usage
|
||||
|
||||
<!-- Delete any Basic Usage parts that you don't need (eg, some components don't
|
||||
have any properties). -->
|
||||
|
||||
@ -31,14 +33,14 @@ have any properties). -->
|
||||
### Properties
|
||||
|
||||
| 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. |
|
||||
| prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default value blank if appropriate. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| ---- | ----------- |
|
||||
| someEvent | Keep description short for the table. Usually starts with "Emitted when..." |
|
||||
| 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.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
<!-- seealso end -->
|
||||
<!-- seealso end -->
|
||||
|
@ -13,7 +13,7 @@ Shows how to document a method.
|
||||
## Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| ---- | ---- | ------- | ----------- |
|
||||
| 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. |
|
||||
|
||||
@ -27,7 +27,7 @@ as necessary. Usually, the title should be derived from the Angular name with th
|
||||
if it looks wrong to you.
|
||||
|
||||
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 <br> at the end of the
|
||||
the method signature and description with your own text but keep the <br> at the end of the
|
||||
signature line.
|
||||
|
||||
### 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.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
<!-- seealso end -->
|
||||
<!-- seealso end -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Bpm User model
|
||||
|
||||
Contains information about a Process Services user.
|
||||
|
@ -12,10 +12,10 @@ Gets information about the current Process Services user.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getCurrentUserInfo(): Observable<BpmUserModel>`<br/>
|
||||
- **getCurrentUserInfo**(): [`Observable<BpmUserModel>`](../core/bpm-user.model.md)<br/>
|
||||
Gets information about the current user.
|
||||
- **Returns** `Observable<BpmUserModel>` - User information object
|
||||
- `getCurrentUserProfileImage(): string`<br/>
|
||||
- **Returns** [`Observable<BpmUserModel>`](../core/bpm-user.model.md) - User information object
|
||||
- **getCurrentUserProfileImage**(): `string`<br/>
|
||||
Gets the current user's profile image as a URL.
|
||||
- **Returns** `string` - URL string
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Buttons Menu Component
|
||||
|
||||
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">
|
||||
</adf-buttons-action-menu>
|
||||
```
|
||||
|
||||
You will need to declare all the buttons that you want to have inside your menu in the parent component.
|
||||
|
||||
```ts
|
||||
@ -55,13 +57,13 @@ buttons: MenuButton[] = [];
|
||||
### Buttons Menu Component
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | -- |
|
||||
| ---- | ---- | ----------- |
|
||||
| buttons | `MenuButton []` | The array that contains all the buttons for the menu |
|
||||
|
||||
### Button Model
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | -- |
|
||||
| ---- | ---- | ----------- |
|
||||
| label | `string` | Label 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. |
|
||||
@ -69,7 +71,6 @@ buttons: MenuButton[] = [];
|
||||
| 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. |
|
||||
|
||||
|
||||
## Details
|
||||
|
||||
This component uses [Angular Material](https://material.angular.io/) to style the menu.
|
||||
@ -85,6 +86,3 @@ Menu Button Model
|
||||
## See also
|
||||
|
||||
- [Menu Button Model](./menu-button.model.md)
|
||||
|
||||
|
||||
|
||||
|
@ -6,27 +6,27 @@ Last reviewed: 2018-05-08
|
||||
|
||||
# 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
|
||||
|
||||
### 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.
|
||||
- `type: string = null` - The type whose resolver you want
|
||||
- `defaultValue: Type<__type> = this.defaultValue` - Default type returned for types that are not yet mapped
|
||||
- _type:_ `string` - The type whose resolver you want
|
||||
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
|
||||
- **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.
|
||||
- `model: DynamicComponentModel = null` - (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.
|
||||
- _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - (form-field.model.md) for the field to render
|
||||
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
|
||||
- **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.
|
||||
- `type: string = null` - The type whose resolver you want to set
|
||||
- `resolver: DynamicComponentResolveFunction = null` - The new resolver function
|
||||
- `override: boolean = false` - The new resolver will only replace an existing one if this parameter is true
|
||||
- _type:_ `string` - The type whose resolver you want to set
|
||||
- _resolver:_ `DynamicComponentResolveFunction` - The new resolver function
|
||||
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
|
||||
|
||||
## 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
|
||||
[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
|
||||
so that the Card View component can make use of it:
|
||||
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](../core/card-view.component.md) can make use of it:
|
||||
|
||||
```ts
|
||||
@Component({
|
||||
|
@ -6,7 +6,7 @@ Last reviewed: 2018-05-08
|
||||
|
||||
# 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
|
||||
|
||||
@ -34,7 +34,7 @@ export interface CardViewItem {
|
||||
| displayValue | string | "" | The value to display |
|
||||
| editable | boolean | false | Toggles whether the item is editable |
|
||||
| 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
|
||||
|
||||
@ -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
|
||||
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`
|
||||
and `DynamicComponentModel` interfaces. See the
|
||||
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`](../../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)
|
||||
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.
|
||||
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
|
||||
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
|
||||
to enable Angular to load it dynamically:
|
||||
@ -123,7 +123,7 @@ Picard's birthday (47457.1):
|
||||
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.
|
||||
|
||||
```ts
|
||||
@ -146,5 +146,5 @@ Picard's birthday (47457.1):
|
||||
|
||||
## See also
|
||||
|
||||
- [Card View component](card-view.component.md)
|
||||
- [Card Item Types service](card-item-types.service.md)
|
||||
- [Card View component](card-view.component.md)
|
||||
- [Card Item Types service](card-item-types.service.md)
|
||||
|
@ -2,13 +2,14 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# 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
|
||||
|
||||
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
|
||||
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
|
||||
about this). The model objects and the `key` property are used to identify which item has been clicked
|
||||
or updated when an event occurs.
|
||||
@ -74,7 +75,7 @@ called after updates and clicks, respectively.
|
||||
|
||||
### 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
|
||||
export interface UpdateNotification {
|
||||
@ -83,8 +84,8 @@ export interface UpdateNotification {
|
||||
}
|
||||
```
|
||||
|
||||
Here, `target` contains the `CardViewTextItemModel` that was used to initialize
|
||||
the field in question (in practice, this might be a `CardViewDateItemModel` or `CardViewMapItemModel` if
|
||||
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`](../../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:
|
||||
|
||||
```ts
|
||||
@ -112,7 +113,7 @@ on the [Card View component](card-view.component.md) itself.
|
||||
|
||||
### 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:
|
||||
|
||||
```ts
|
||||
|
@ -86,11 +86,11 @@ Defining properties from Typescript:
|
||||
| -- | -- | -- | -- |
|
||||
| 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. |
|
||||
| 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
|
||||
|
||||
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_
|
||||
- [**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 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.
|
||||
|
||||
#### 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
|
||||
const textItemProperty = new CardViewTextItemModel(options);
|
||||
@ -185,7 +185,7 @@ new CardViewTextItemModel({
|
||||
|
||||
#### 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
|
||||
const mapItemProperty = new CardViewMapItemModel(options);
|
||||
@ -202,7 +202,7 @@ const mapItemProperty = new CardViewMapItemModel(options);
|
||||
|
||||
#### 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
|
||||
const dateItemProperty = new CardViewDateItemModel(options);
|
||||
@ -220,7 +220,7 @@ const dateItemProperty = new CardViewDateItemModel(options);
|
||||
|
||||
#### 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
|
||||
const datetimeItemProperty = new CardViewDatetimeItemModel(options);
|
||||
@ -238,7 +238,7 @@ const datetimeItemProperty = new CardViewDatetimeItemModel(options);
|
||||
|
||||
#### 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
|
||||
const boolItemProperty = new CardViewBoolItemModel(options);
|
||||
@ -255,7 +255,7 @@ const boolItemProperty = new CardViewBoolItemModel(options);
|
||||
|
||||
#### 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
|
||||
const intItemProperty = new CardViewIntItemModel(options);
|
||||
@ -272,7 +272,7 @@ const intItemProperty = new CardViewIntItemModel(options);
|
||||
|
||||
#### 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
|
||||
const floatItemProperty = new CardViewFloatItemModel(options);
|
||||
|
@ -12,15 +12,15 @@ Adds and retrieves comments for nodes in Content Services.
|
||||
|
||||
### 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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `message: string = null` - Text for the comment
|
||||
- **Returns** `Observable<CommentModel>` - Details of the comment added
|
||||
- `getNodeComments(nodeId: string = null): Observable<CommentModel[]>`<br/>
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _message:_ `string` - Text for the comment
|
||||
- **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details of the comment added
|
||||
- **getNodeComments**(nodeId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/>
|
||||
Gets all comments that have been added to a node.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- **Returns** `Observable<CommentModel[]>` - Details for each comment
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Comment list component
|
||||
|
||||
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
|
||||
<adf-comment-list
|
||||
@ -61,11 +62,11 @@ In the component template use the comment list component:
|
||||
### Properties
|
||||
|
||||
| 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
|
||||
|
||||
| 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. |
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Comment Process model
|
||||
|
||||
Represents a comment added to a Process Services task or process instance.
|
||||
|
@ -12,24 +12,24 @@ Adds and retrieves comments for task and process instances in Process Services.
|
||||
|
||||
### 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.
|
||||
- `processInstanceId: string = null` - ID of the target process instance
|
||||
- `message: string = null` - Text for the comment
|
||||
- **Returns** `Observable<CommentModel>` - Details of the comment added
|
||||
- `addTaskComment(taskId: string = null, message: string = null): Observable<CommentModel>`<br/>
|
||||
- _processInstanceId:_ `string` - ID of the target process instance
|
||||
- _message:_ `string` - Text for the comment
|
||||
- **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details of the comment added
|
||||
- **addTaskComment**(taskId: `string` = `null`, message: `string` = `null`): [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts)<br/>
|
||||
Adds a comment to a task.
|
||||
- `taskId: string = null` - ID of the target task
|
||||
- `message: string = null` - Text for the comment
|
||||
- **Returns** `Observable<CommentModel>` - Details about the comment
|
||||
- `getProcessInstanceComments(processInstanceId: string = null): Observable<CommentModel[]>`<br/>
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _message:_ `string` - Text for the comment
|
||||
- **Returns** [`Observable<CommentModel>`](../../lib/core/models/comment.model.ts) - Details about the comment
|
||||
- **getProcessInstanceComments**(processInstanceId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/>
|
||||
Gets all comments that have been added to a process instance.
|
||||
- `processInstanceId: string = null` - ID of the target process instance
|
||||
- **Returns** `Observable<CommentModel[]>` - Details for each comment
|
||||
- `getTaskComments(taskId: string = null): Observable<CommentModel[]>`<br/>
|
||||
- _processInstanceId:_ `string` - ID of the target process instance
|
||||
- **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment
|
||||
- **getTaskComments**(taskId: `string` = `null`): [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts)<br/>
|
||||
Gets all comments that have been added to a task.
|
||||
- `taskId: string = null` - ID of the target task
|
||||
- **Returns** `Observable<CommentModel[]>` - Details for each comment
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- **Returns** [`Observable<CommentModel[]>`](../../lib/core/models/comment.model.ts) - Details for each comment
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# 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.
|
||||
@ -31,13 +32,13 @@ Displays comments from users involved in a specified task or content and allows
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| taskId | `string` | | The numeric ID of the task. |
|
||||
| nodeId | `string` | | The ID of the node. |
|
||||
| readOnly | `boolean` | `false` | Are the comments read only? |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | | The numeric ID of the node. |
|
||||
| readOnly | `boolean` | false | Are the comments read only? |
|
||||
| taskId | `string` | | The numeric ID of the task. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs while displaying/adding a comment. |
|
||||
|
@ -12,62 +12,62 @@ Accesses app-generated data objects via URLs and file downloads.
|
||||
|
||||
### 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.
|
||||
- `relativePath: string = null` - Location to create the folder
|
||||
- `name: string = null` - Folder name
|
||||
- `parentId?: string = null` - (Optional) Node ID of parent folder
|
||||
- **Returns** `Observable<FolderCreatedEvent>` - Information about the new folder
|
||||
- `createTrustedUrl(blob: Blob = null): string`<br/>
|
||||
- _relativePath:_ `string` - Location to create the folder
|
||||
- _name:_ `string` - Folder name
|
||||
- _parentId:_ `string` - (Optional) Node ID of parent folder
|
||||
- **Returns** [`Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts) - Information about the new folder
|
||||
- **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!
|
||||
- `blob: Blob = null` - Data to wrap into object URL
|
||||
- _blob:_ `Blob` - Data to wrap into object URL
|
||||
- **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.
|
||||
- `blob: Blob = null` - Content to download.
|
||||
- `fileName: string = null` - Name of the resulting file.
|
||||
- `downloadData(data: any = null, fileName: string = null)`<br/>
|
||||
- _blob:_ `Blob` - Content to download.
|
||||
- _fileName:_ `string` - Name of the resulting file.
|
||||
- **downloadData**(data: `any` = `null`, fileName: `string` = `null`)<br/>
|
||||
Invokes content download for a data array with a file name.
|
||||
- `data: any = null` - Data to download.
|
||||
- `fileName: string = null` - Name of the resulting file.
|
||||
- `downloadJSON(json: any = null, fileName: string = null)`<br/>
|
||||
- _data:_ `any` - Data to download.
|
||||
- _fileName:_ `string` - Name of the resulting file.
|
||||
- **downloadJSON**(json: `any` = `null`, fileName: `string` = `null`)<br/>
|
||||
Invokes content download for a JSON object with a file name.
|
||||
- `json: any = null` - JSON object to download.
|
||||
- `fileName: string = null` - Name of the resulting file.
|
||||
- `getContentUrl(node: any = null, attachment?: boolean = null, ticket?: string = null): string`<br/>
|
||||
- _json:_ `any` - JSON object to download.
|
||||
- _fileName:_ `string` - Name of the resulting file.
|
||||
- **getContentUrl**(node: `any` = `null`, attachment?: `boolean` = `null`, ticket?: `string` = `null`): `string`<br/>
|
||||
Gets a content URL for the given node.
|
||||
- `node: any = null` - Node to get URL for.
|
||||
- `attachment?: boolean = null` - (Optional) Toggles whether to retrieve content as an attachment for download
|
||||
- `ticket?: string = null` - (Optional) Custom ticket to use for authentication
|
||||
- _node:_ `any` - Node to get URL for.
|
||||
- _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
|
||||
- _ticket:_ `string` - (Optional) Custom ticket to use for authentication
|
||||
- **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.
|
||||
- `node: any = null` - Node to get URL for.
|
||||
- `attachment?: boolean = null` - (Optional) Toggles whether to retrieve content as an attachment for download
|
||||
- `ticket?: string = null` - (Optional) Custom ticket to use for authentication
|
||||
- _node:_ `any` - Node to get URL for.
|
||||
- _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
|
||||
- _ticket:_ `string` - (Optional) Custom ticket to use for authentication
|
||||
- **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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `opts?: any = null` - (Optional) Options supported by JSAPI
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _opts:_ `any` - (Optional) Options supported by JSAPI
|
||||
- **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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- **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
|
||||
- `node: any = null` - Node to check allowableOperations
|
||||
- _node:_ `any` - Node to check allowableOperations
|
||||
- **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
|
||||
- `node: Node = null` - Node to check allowableOperations
|
||||
- `permission: PermissionsEnum | string = null` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
|
||||
- _node:_ `Node` - Node to check allowableOperations
|
||||
- _permission:_ `PermissionsEnum | string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
|
||||
- **Returns** `boolean` - True if the user has the required permissions, false otherwise
|
||||
|
||||
## 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
|
||||
(implemented in the browser, not ADF) represents an array of bytes that you can
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# APS Content Component
|
||||
|
||||
Shows the content preview.
|
||||
|
@ -12,19 +12,21 @@ Stores key-value data items as browser cookies.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getItem(key: string = null): string | null`<br/>
|
||||
- **clear**()<br/>
|
||||
|
||||
- **getItem**(key: `string` = `null`): `string | null`<br/>
|
||||
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
|
||||
- `isEnabled(): boolean`<br/>
|
||||
- **isEnabled**(): `boolean`<br/>
|
||||
Checks if cookies are enabled.
|
||||
- **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.
|
||||
- `key: string = null` - Key to identify the cookie
|
||||
- `data: string = null` - Data value to set for the cookie
|
||||
- `expiration: Date | null = null` - Expiration date of the data
|
||||
- `path: string | null = null` - "Pathname" to store the cookie
|
||||
- _key:_ `string` - Key to identify the cookie
|
||||
- _data:_ `string` - Data value to set for the cookie
|
||||
- _expiration:_ `Date | null` - Expiration date of the data
|
||||
- _path:_ `string | null` - "Pathname" to store the cookie
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -17,6 +17,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
- [Conditional visibility](#conditional-visibility)
|
||||
- [Automatic column header translation](#automatic-column-header-translation)
|
||||
- [Custom tooltips](#custom-tooltips)
|
||||
- [Column Template](#column-template)
|
||||
@ -69,7 +70,7 @@ You can use `ngIf` directives to provide conditional visibility support for the
|
||||
|
||||
### 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.
|
||||
|
||||
```html
|
||||
@ -122,9 +123,9 @@ Every cell in the DataTable component is bound to the dynamic data context conta
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| data | [DataTableAdapter](datatable-adapter.interface.md) | Data adapter instance. |
|
||||
| row | [DataRow](datatable-adapter.interface.md) | Current data row instance. |
|
||||
| col | [DataColumn](datatable-adapter.interface.md) | Current data column instance. |
|
||||
| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | Data adapter instance. |
|
||||
| row | [`DataRow`](../../lib/core/datatable/data/data-row.model.ts) | Current data row 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.
|
||||
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.
|
||||
|
||||
Getting a cell value from the underlying DataTableAdapter:
|
||||
Getting a cell value from the underlying [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts):
|
||||
|
||||
```ts
|
||||
context.data.getValue(entry.row, entry.col);
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# DataTableAdapter interface
|
||||
|
||||
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
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| ---- | ---- | ----------- |
|
||||
| selectedRow | DataRow | The data for the currently selected row. |
|
||||
|
||||
## Methods
|
||||
|
||||
`getRows(): Array<DataRow>;`<br/>
|
||||
`setRows(rows: Array<DataRow>): void;`<br/>
|
||||
[`getRows(): Array<DataRow>;`](../../lib/core/datatable/data/data-row.model.ts)<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.
|
||||
|
||||
`getColumns(): Array<DataColumn>;`<br/>
|
||||
`setColumns(columns: Array<DataColumn>): void;`<br/>
|
||||
[`getColumns(): Array<DataColumn>;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
|
||||
[`setColumns(columns: Array<DataColumn>): void;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
|
||||
Get/set an array of column specifications.
|
||||
|
||||
`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 the table with a specified key and direction (ascending or descending).
|
||||
|
||||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
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
|
||||
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 are defined by the DataColumn interface:
|
||||
Columns are defined by the [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) interface:
|
||||
|
||||
```ts
|
||||
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 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
|
||||
interface DataRow {
|
||||
@ -85,8 +85,8 @@ Each row contains a set of values. An item in the set is retrieved by passing it
|
||||
|
||||
### ObjectDataTableAdapter
|
||||
|
||||
The DataTable library provides a implementation of DataTableAdapter, 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:
|
||||
The DataTable library provides a implementation of [DataTableAdapter,](../../lib/core/datatable/data/datatable-adapter.ts) called
|
||||
[`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
|
||||
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 -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
## See also
|
||||
|
||||
- [Datatable component](datatable.component.md)
|
||||
- [Task list component](../process-services/task-list.component.md)
|
||||
<!-- seealso end -->
|
||||
- [Datatable component](datatable.component.md)
|
||||
- [Task list component](../process-services/task-list.component.md)
|
||||
<!-- seealso end -->
|
||||
|
@ -16,6 +16,8 @@ See it live: [DataTable Quickstart](https://embed.plnkr.co/80qr4YFBeHjLMdAV0F6l/
|
||||
|
||||
- [Basic usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
@ -128,42 +130,42 @@ export class DataTableDemo {
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| data | `DataTableAdapter` | | Data source for the table |
|
||||
| display | `string` | `DisplayMode.List` | Selects the display mode of the table. Can be "list" or "gallery". |
|
||||
| rows | `any[]` | `[]` | The rows that the datatable will show. |
|
||||
| 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. |
|
||||
| multiselect | `boolean` | `false` | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
|
||||
| actions | `boolean` | `false` | Toggles the data actions column. |
|
||||
| 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. |
|
||||
| contextMenu | `boolean` | `false` | Toggles custom context menu for the component. |
|
||||
| allowDropFiles | `boolean` | `false` | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | `boolean` | false | Toggles the data actions column. |
|
||||
| actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". |
|
||||
| allowDropFiles | `boolean` | false | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). |
|
||||
| contextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
||||
| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source for the table |
|
||||
| display | `string` | [`DisplayMode`](../../lib/core/datatable/components/datatable/datatable.component.ts).List | Selects the display mode of the table. Can be "list" or "gallery". |
|
||||
| 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). |
|
||||
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
|
||||
| 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. |
|
||||
| rowStyleClass | `string` | `''` | The CSS class to apply to every row. |
|
||||
| showHeader | `boolean` | `true` | Toggles the header. |
|
||||
| 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). |
|
||||
| noPermission | `boolean` | `false` | Flag that indicates if the datatable should show the "no permission" template. |
|
||||
| rowStyleClass | `string` | "" | The CSS class to apply to every row. |
|
||||
| rows | `any[]` | \[] | The rows that the datatable will show. |
|
||||
| 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. |
|
||||
| showHeader | `boolean` | true | Toggles the header. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| rowClick | `EventEmitter<DataRowEvent>` | Emitted when the user clicks a row. |
|
||||
| rowDblClick | `EventEmitter<DataRowEvent>` | Emitted when the user double-clicks a row. |
|
||||
| showRowContextMenu | `EventEmitter<DataCellEvent>` | Emitted before the context menu is displayed for a row. |
|
||||
| showRowActionsMenu | `EventEmitter<DataCellEvent>` | Emitted before the actions menu is displayed for a row. |
|
||||
| executeRowAction | `EventEmitter<DataRowActionEvent>` | Emitted when the user executes a row action. |
|
||||
| -- | -- | -- |
|
||||
| executeRowAction | [`EventEmitter<DataRowActionEvent>`](../../lib/core/datatable/components/datatable/data-row-action.event.ts) | Emitted when the user executes a row action. |
|
||||
| rowClick | [`EventEmitter<DataRowEvent>`](../../lib/core/datatable/data/data-row-event.model.ts) | Emitted when the user clicks 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>`](../../lib/core/datatable/components/datatable/data-cell.event.ts) | Emitted before the actions menu is displayed for a row. |
|
||||
| showRowContextMenu | [`EventEmitter<DataCellEvent>`](../../lib/core/datatable/components/datatable/data-cell.event.ts) | Emitted before the context menu is displayed for a row. |
|
||||
|
||||
## Details
|
||||
|
||||
### Supplying data for the table
|
||||
|
||||
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
|
||||
library includes a standard adapter class called `ObjectDataTableAdapter` that is useful in many
|
||||
common cases. See the [DataTableAdapter](datatable-adapter.interface.md) for full details about the interface and the `ObjectDataTableAdapter` class.
|
||||
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`](../../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
|
||||
|
||||
@ -241,7 +243,7 @@ You can add a template that will be shown when there are no rows in your datatab
|
||||
</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
|
||||
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)
|
||||
- [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)
|
||||
|
@ -12,14 +12,14 @@ Gets a list of Content Services nodes currently in the trash.
|
||||
|
||||
### 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.
|
||||
- `options?: Object = null` - (Optional) Options for JSAPI call
|
||||
- **Returns** `Observable<NodePaging>` - List of nodes in the trash
|
||||
- _options:_ `Object` - (Optional) Options for JSAPI call
|
||||
- **Returns** [`Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts) - List of nodes in the trash
|
||||
|
||||
## 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
|
||||
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)
|
||||
|
@ -12,12 +12,12 @@ Gets version and license information for Process Services and Content Services.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getBpmProductInfo(): any`<br/>
|
||||
- **getBpmProductInfo**(): `Observable<any>`<br/>
|
||||
Gets product information for Process Services.
|
||||
- **Returns** `any` - ProductVersionModel containing product details
|
||||
- `getEcmProductInfo(): any`<br/>
|
||||
- **Returns** `Observable<any>` - ProductVersionModel containing product details
|
||||
- **getEcmProductInfo**(): `Observable<any>`<br/>
|
||||
Gets product information for Content Services.
|
||||
- **Returns** `any` - ProductVersionModel containing product details
|
||||
- **Returns** `Observable<any>` - ProductVersionModel containing product details
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Ecm User model
|
||||
|
||||
Contains information about a Content Services user.
|
||||
|
@ -12,23 +12,23 @@ Gets information about a Content Services user.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getCurrentUserInfo(): any`<br/>
|
||||
- **getCurrentUserInfo**(): [`Observable<EcmUserModel>`](../core/ecm-user.model.md)<br/>
|
||||
Gets information about the user who is currently logged-in.
|
||||
- **Returns** `any` - User information as for getUserInfo
|
||||
- `getUserInfo(userName: string = null): Observable<EcmUserModel>`<br/>
|
||||
- **Returns** [`Observable<EcmUserModel>`](../core/ecm-user.model.md) - User information as for getUserInfo
|
||||
- **getUserInfo**(userName: `string` = `null`): [`Observable<EcmUserModel>`](../core/ecm-user.model.md)<br/>
|
||||
Gets information about a user identified by their username.
|
||||
- `userName: string = null` - Target username
|
||||
- **Returns** `Observable<EcmUserModel>` - User information
|
||||
- `getUserProfileImage(avatarId: string = null): string`<br/>
|
||||
- _userName:_ `string` - Target username
|
||||
- **Returns** [`Observable<EcmUserModel>`](../core/ecm-user.model.md) - User information
|
||||
- **getUserProfileImage**(avatarId: `string` = `null`): `string`<br/>
|
||||
Returns a profile image as a URL.
|
||||
- `avatarId: string = null` - Target avatar
|
||||
- _avatarId:_ `string` - Target avatar
|
||||
- **Returns** `string` - Image URL
|
||||
|
||||
## Details
|
||||
|
||||
The class returned by `getUserInfo` and `getCurrentUserInfo` is detailed
|
||||
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.
|
||||
|
||||
See the
|
||||
|
@ -11,7 +11,7 @@ Provides a generic "Empty Content" UI and can used as a placeholder for componen
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| ---- | ---- | ----------- |
|
||||
| icon | string | Material Icon to use |
|
||||
| title | string | String or Resource Key for the title |
|
||||
| subtitle | string | String or Resource Key for the subtitle |
|
||||
|
@ -4,7 +4,7 @@ Displays info about a specific error.
|
||||
|
||||
## 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
|
||||
this.router.navigate(['/error', errorCode]);
|
||||
@ -27,16 +27,16 @@ this.router.navigate(['/error', errorCode]);
|
||||
### Error Content Component
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | -- |
|
||||
| ---- | ---- | ----------- |
|
||||
| errorCode | string | Error code |
|
||||
| errorTitle | string | Error title |
|
||||
| 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
|
||||
|
||||
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
|
||||
"ERROR_CONTENT": {
|
||||
"HOME_BUTTON": "Back to home",
|
||||
@ -58,6 +58,3 @@ You can customize your errors by adding them to the tranlate files inside ```lib
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
@ -12,11 +12,25 @@ Gets a list of items a user has marked as their favorites.
|
||||
|
||||
### 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.
|
||||
- `personId: string = null` - ID of the user
|
||||
- `options?: any = null` - (Optional) Options supported by JSAPI
|
||||
- **Returns** `Observable<NodePaging>` - List of favorites
|
||||
- _personId:_ `string` - ID of the user
|
||||
- _options:_ `any` - (Optional) Options supported by JSAPI
|
||||
- **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
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# File Size pipe
|
||||
|
||||
Converts a number of bytes to the equivalent in KB, MB, etc.
|
||||
|
@ -2,9 +2,10 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# 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
|
||||
|
||||
@ -52,26 +53,26 @@ Perform validation on `field`.
|
||||
|
||||
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
|
||||
`isSupported` method, passing the field's FormFieldModel as a parameter. If the validator
|
||||
does support the field then its `validate` method will be called on the FormFieldModel
|
||||
`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`](../core/form-field.model.md)
|
||||
during the validation phase.
|
||||
|
||||
Several validator classes are predefined for you to use:
|
||||
|
||||
| Validator name | Checks that: |
|
||||
| -------------- | ------------ |
|
||||
| `RequiredFieldValidator` | Field is not left blank |
|
||||
| `NumberFieldValidator` | Field contains numeric data |
|
||||
| `MinLengthFieldValidator` | Field text has at least a minimum number of characters |
|
||||
| `MaxLengthFieldValidator` | Field text has no more than a maximum number of characters |
|
||||
| `MinValueFieldValidator` | Numeric field's value is greater than a lower limit |
|
||||
| `MaxValueFieldValidator` | Numeric field's vaue is less than an upper limit |
|
||||
| `RegExFieldValidator` | Field text matches a regular expression |
|
||||
| `DateFieldValidator` | Field contains a date in the correct format |
|
||||
| `MinDateFieldValidator` | Date within a field occurs after a certain starting point |
|
||||
| `MaxDateFieldValidator` | Date within a field occurs before a certain end point |
|
||||
| [`RequiredFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field is not left blank |
|
||||
| [`NumberFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field contains numeric data |
|
||||
| [`MinLengthFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text has at least a minimum 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`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Numeric field's value is greater than a lower limit |
|
||||
| [`MaxValueFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Numeric field's vaue is less than an upper limit |
|
||||
| [`RegExFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text matches a regular expression |
|
||||
| [`DateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field contains a date in the correct format |
|
||||
| [`MinDateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs after a certain starting 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
|
||||
|
||||
@ -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
|
||||
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.
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
```html
|
||||
|
@ -10,14 +10,14 @@ A form field in an APS form.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
All form field editors (aka widgets) on a Form are rendered by means of a `FormFieldComponent`
|
||||
that takes an instance of a `FormFieldModel`:
|
||||
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`](../core/form-field.model.md):
|
||||
|
||||
```html
|
||||
<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.
|
||||
|
||||
## Class members
|
||||
@ -25,8 +25,8 @@ based on the field type or the metadata information.
|
||||
### Properties
|
||||
|
||||
| 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
|
||||
|
||||
|
@ -6,7 +6,7 @@ Last reviewed: 2018-03-20
|
||||
|
||||
# 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
|
||||
|
||||
@ -49,16 +49,16 @@ Contains the value and metadata for a field of a Form component.
|
||||
| fields | FormFieldModel\[] | \[] | Fields contained within a container field |
|
||||
| columns | ContainerColumnModel\[] | \[] | Column definitions for a container field |
|
||||
| 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
|
||||
|
||||
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.
|
||||
|
||||
### 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
|
||||
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
|
||||
@ -66,13 +66,13 @@ example, the `currency` property holds the currency symbol to be displayed next
|
||||
|
||||
### 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
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
@ -96,6 +96,6 @@ contains full details about how the REST calls work, along with a worked example
|
||||
## See also
|
||||
|
||||
- [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 component](form.component.md)
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Form List Component
|
||||
|
||||
Shows APS forms as a list.
|
||||
@ -19,5 +20,5 @@ Shows APS forms as a list.
|
||||
### Properties
|
||||
|
||||
| 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. |
|
||||
|
@ -6,34 +6,34 @@ Last reviewed: 2018-05-08
|
||||
|
||||
# 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
|
||||
|
||||
### 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.
|
||||
- `type: string = null` - The type whose resolver you want
|
||||
- `defaultValue: Type<__type> = this.defaultValue` - Default type returned for types that are not yet mapped
|
||||
- _type:_ `string` - The type whose resolver you want
|
||||
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
|
||||
- **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.
|
||||
- `model: DynamicComponentModel = null` - (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.
|
||||
- _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - (form-field.model.md) for the field to render
|
||||
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
|
||||
- **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.
|
||||
- `type: string = null` - The type whose resolver you want to set
|
||||
- `resolver: DynamicComponentResolveFunction = null` - The new resolver function
|
||||
- `override: boolean = false` - The new resolver will only replace an existing one if this parameter is true
|
||||
- _type:_ `string` - The type whose resolver you want to set
|
||||
- _resolver:_ `DynamicComponentResolveFunction` - The new resolver function
|
||||
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
|
||||
|
||||
## Details
|
||||
|
||||
The Form 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).
|
||||
The Form Rendering service maintains a mapping between each type name and
|
||||
a corresponding ComponentTypeResolver function. The function takes a FormFieldModel object as its argument and
|
||||
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`](../../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`](../../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`](../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.
|
||||
|
||||
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
|
||||
|
||||
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 |
|
||||
| ------------ | ----------------- | -------------- |
|
||||
|
@ -6,7 +6,7 @@ Last reviewed: 2018-03-21
|
||||
|
||||
# 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/))
|
||||
|
||||
@ -14,6 +14,8 @@ Shows a Form from APS
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
@ -40,42 +42,42 @@ Shows a Form from APS
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| form | `FormModel` | | Underlying form model instance. |
|
||||
| taskId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||
| formId | `string` | | The id of the form definition to load and display with custom values. |
|
||||
| formName | `string` | | Name of the form definition to load and display with custom values. |
|
||||
| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. |
|
||||
| data | `FormValues` | | Custom form values map to be used with the rendered form. |
|
||||
| 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. |
|
||||
| showTitle | `boolean` | `true` | Toggle rendering of the form title. |
|
||||
| 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. |
|
||||
| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. |
|
||||
| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. |
|
||||
| showDebugButton | `boolean` | `false` | Toggle debug options. |
|
||||
| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
||||
| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. |
|
||||
| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. |
|
||||
| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. |
|
||||
| -- | -- | -- | -- |
|
||||
| data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
|
||||
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
|
||||
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
|
||||
| fieldValidators | [`FormFieldValidator[]`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | \[] | Contains a list of form field validator instances. |
|
||||
| form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
|
||||
| formId | `string` | | The id of the form definition to load and display with custom values. |
|
||||
| formName | `string` | | Name of the form definition to load and display with custom values. |
|
||||
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
|
||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||
| 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. |
|
||||
| saveMetadata | `boolean` | false | Toggle saving of form metadata. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
|
||||
| showDebugButton | `boolean` | false | Toggle debug options. |
|
||||
| showRefreshButton | `boolean` | true | Toggle rendering of the `Refresh` button. |
|
||||
| showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of 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. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
|
||||
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
|
||||
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
|
||||
| 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. |
|
||||
| -- | -- | -- |
|
||||
| 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>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Complete` outcome. |
|
||||
| formContentClicked | [`EventEmitter<ContentLinkModel>`](../../lib/core/form/components/widgets/core/content-link.model.ts) | Emitted when form content is clicked. |
|
||||
| formDataRefreshed | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | 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. |
|
||||
| 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. |
|
||||
|
||||
## 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**
|
||||
|
||||
@ -164,7 +166,7 @@ The `nameNode` parameter is optional.
|
||||
</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.
|
||||
|
||||
### Custom empty form template
|
||||
|
@ -52,15 +52,15 @@ class MyComponent {
|
||||
### Methods
|
||||
|
||||
- `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
|
||||
- `data` - (Optional) Values for the form fields
|
||||
- `readOnly` - Should the form fields be read-only?
|
||||
- `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
|
||||
- `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
|
||||
- `saveForm(formId: string, formModel: FormDefinitionModel): Observable<any>`
|
||||
Saves a form.
|
||||
@ -68,7 +68,7 @@ class MyComponent {
|
||||
- `formModel` - Model data for the form
|
||||
- `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any>`
|
||||
- `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>`
|
||||
Search for a form by name.
|
||||
- `name` - The form name to search for
|
||||
@ -88,20 +88,20 @@ class MyComponent {
|
||||
Gets a task.
|
||||
- `taskId` - Task Id
|
||||
- `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
|
||||
- `formValues` - Form Values
|
||||
- `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
|
||||
- `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
|
||||
- `formValues` - Form Values
|
||||
- `outcome` - (Optional) Form Outcome
|
||||
- `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
|
||||
- `outcome` - (Optional) [`Form`](../../lib/process-services/task-list/models/form.model.ts) Outcome
|
||||
- `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
|
||||
- `getFormDefinitionById(formId: string): Observable<any>`
|
||||
Get Form Definition
|
||||
- `formId` - Form Id
|
||||
Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) Definition
|
||||
- `formId` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Id
|
||||
- `getFormDefinitionByName(name: string): Observable<any>`
|
||||
Returns form definition with a given name.
|
||||
- `name` - The form name
|
||||
@ -135,11 +135,11 @@ class MyComponent {
|
||||
- `getUserProfileImageApi(userId: number): string`
|
||||
Returns a URL for the profile picture of a 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.
|
||||
- `filter` - Filter to select specific users
|
||||
- `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.
|
||||
- `filter` - Filter to select specific groups
|
||||
- `groupId` - (Optional) Group ID for the search
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Highlight Transform service
|
||||
|
||||
Adds HTML to a string to highlight chosen sections.
|
||||
@ -10,11 +11,12 @@ Adds HTML to a string to highlight chosen sections.
|
||||
|
||||
### Methods
|
||||
|
||||
- `highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult`
|
||||
Searches for `search` string(s) within `text` and highlights all occurrences.
|
||||
- `text` - Text to search within
|
||||
- `search` - Text pattern to search for
|
||||
- `wrapperClass` - CSS class used to provide highlighting style
|
||||
- **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.
|
||||
- _text:_ `string` - Text to search within
|
||||
- _search:_ `string` - Text pattern to search for
|
||||
- _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
|
||||
|
||||
@ -29,7 +31,7 @@ highlight any of those words individually. The <span> element includes a
|
||||
`class` attribute which defaults to "highlight" but you can pass any class name
|
||||
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:
|
||||
|
||||
```ts
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Host settings component
|
||||
|
||||
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
|
||||
|
||||
| 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
|
||||
|
||||
| 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. |
|
||||
| ecmHostChange | `EventEmitter<string>` | Emitted when the ECM host url is changed. |
|
||||
| bpmHostChange | `EventEmitter<string>` | Emitted when the BPM host url is changed. |
|
||||
|
@ -36,28 +36,28 @@ Adds "infinite" pagination to the component it is used with.
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| -- | -- | -- | -- |
|
||||
| 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. |
|
||||
| pagination | `Pagination` | | Pagination object. |
|
||||
| pageSize | `number` | [`InfinitePaginationComponent`](../core/infinite-pagination.component.md).DEFAULT_PAGE_SIZE | Number of items that are added with each "load more" event. |
|
||||
| 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. |
|
||||
|
||||
### Events
|
||||
|
||||
| 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
|
||||
|
||||
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
|
||||
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 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
|
||||
[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
|
||||
page within the list to be shown, whether there are more items left to show, etc).
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Info drawer layout component
|
||||
|
||||
Displays a sidebar-style information panel.
|
||||
|
@ -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.
|
||||
|
||||
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
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Language Menu component
|
||||
|
||||
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
|
||||
|
||||
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"
|
||||
|
||||
```json
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Log Service
|
||||
|
||||
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
|
||||
-|-
|
||||
TRACE |5
|
||||
DEBUG |4
|
||||
INFO |3
|
||||
WARN |2
|
||||
ERROR |1
|
||||
SILENT |0
|
||||
| Name | Level |
|
||||
| ---- | ----- |
|
||||
| TRACE | 5 |
|
||||
| DEBUG | 4 |
|
||||
| INFO | 3 |
|
||||
| WARN | 2 |
|
||||
| ERROR | 1 |
|
||||
| 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:
|
||||
|
||||
@ -57,7 +58,7 @@ If you want set for example the log to warning:
|
||||
|
||||
### 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:
|
||||
|
||||
@ -67,7 +68,7 @@ The messagge object recived form the bus is composed:
|
||||
type: "ERROR|DEBUG|INFO|LOG|TRACE|WARN|ASSERT"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
|
@ -14,6 +14,8 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
|
||||
|
||||
- [Basic usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
@ -42,26 +44,26 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| showRememberMe | `boolean` | `true` | Should the `Remember me` checkbox be shown? |
|
||||
| showLoginActions | `boolean` | `true` | Should the extra actions (`Need Help`, `Register`, etc) be shown? |
|
||||
| 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. |
|
||||
| -- | -- | -- | -- |
|
||||
| backgroundImageUrl | `string` | "./assets/images/background.svg" | Path to a custom background image. |
|
||||
| copyrightText | `string` | "© 2016 Alfresco Software, Inc. All Rights Reserved." | The copyright text below the login box. |
|
||||
| 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
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| success | `EventEmitter<LoginSuccessEvent>` | Emitted when the login is successful. |
|
||||
| error | `EventEmitter<LoginErrorEvent>` | Emitted when the login fails. |
|
||||
| executeSubmit | `EventEmitter<LoginSubmitEvent>` | Emitted when the login form is submitted. |
|
||||
| -- | -- | -- |
|
||||
| error | [`EventEmitter<LoginErrorEvent>`](../../lib/core/login/models/login-error.event.ts) | Emitted when the login fails. |
|
||||
| executeSubmit | [`EventEmitter<LoginSubmitEvent>`](../../lib/core/login/models/login-submit.event.ts) | 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
|
||||
|
||||
@ -94,7 +96,7 @@ export class AppComponent {
|
||||
|
||||
### 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:
|
||||
|
||||
```html
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Logout directive
|
||||
|
||||
Logs the user out when the decorated element is clicked.
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Mime Type Icon pipe
|
||||
|
||||
Retrieves an icon to represent a MIME type.
|
||||
|
@ -48,8 +48,8 @@ export class MyComponent {
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. |
|
||||
| error | `EventEmitter<any>` | Emitted when the favorite setting has fail. |
|
||||
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. |
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Node Name Tooltip pipe
|
||||
|
||||
Formats the tooltip for a Node.
|
||||
|
@ -8,6 +8,21 @@ Last reviewed: 2018-04-10
|
||||
|
||||
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
|
||||
|
||||
```html
|
||||
@ -35,7 +50,7 @@ Selectively disables an HTML element or Angular component
|
||||
|
||||
## 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.
|
||||
|
||||
The decorated element will be disabled if:
|
||||
@ -69,7 +84,7 @@ one or more documents that they have permission to delete.
|
||||
|
||||
### 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),
|
||||
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
|
||||
`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.
|
||||
|
||||
### 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:
|
||||
|
||||
```js
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Node Service
|
||||
|
||||
Gets Alfresco Repository node metadata and creates nodes with metadata.
|
||||
|
@ -8,50 +8,65 @@ Last reviewed: 2018-04-06
|
||||
|
||||
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
|
||||
|
||||
### 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.
|
||||
- `parentNodeId: string = null` - ID of the parent folder node
|
||||
- `nodeBody: any = null` - Data for the new folder
|
||||
- `options: any = {}` - Optional parameters supported by JSAPI
|
||||
- _parentNodeId:_ `string` - ID of the parent folder node
|
||||
- _nodeBody:_ `any` - Data for the new folder
|
||||
- _options:_ `any` - Optional parameters supported by JSAPI
|
||||
- **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.
|
||||
- `parentNodeId: string = null` - ID of the parent folder node
|
||||
- `nodeBody: any = null` - Data for the new node
|
||||
- `options: any = {}` - Optional parameters supported by JSAPI
|
||||
- _parentNodeId:_ `string` - ID of the parent folder node
|
||||
- _nodeBody:_ `any` - Data for the new node
|
||||
- _options:_ `any` - Optional parameters supported by JSAPI
|
||||
- **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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `options: any = {}` - Optional parameters supported by JSAPI
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _options:_ `any` - Optional parameters supported by JSAPI
|
||||
- **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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `options: any = {}` - Optional parameters supported by JSAPI
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _options:_ `any` - Optional parameters supported by JSAPI
|
||||
- **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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `options: any = {}` - Optional parameters supported by JSAPI
|
||||
- **Returns** `Observable<NodePaging>` - List of child items from the folder
|
||||
- `handleError(error: any = null): Observable<any>`<br/>
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _options:_ `any` - Optional parameters supported by JSAPI
|
||||
- **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/>
|
||||
Reports an error.
|
||||
- `error: any = null` - Object representing the error
|
||||
- _error:_ `any` - Object representing the error
|
||||
- **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.
|
||||
- `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
|
||||
- `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.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `nodeBody: any = null` - New data for the node
|
||||
- `options: any = {}` - Optional parameters supported by JSAPI
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _nodeBody:_ `any` - New data for the node
|
||||
- _options:_ `any` - Optional parameters supported by JSAPI
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity>` - Updated node information
|
||||
|
||||
## Details
|
||||
@ -65,7 +80,7 @@ by dashes, eg:
|
||||
The string is convenient for storage, for passing as an
|
||||
[Angular route parameter](https://angular.io/guide/router)
|
||||
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).
|
||||
|
||||
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,
|
||||
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
|
||||
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
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
@ -2,29 +2,32 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Notification Service
|
||||
|
||||
Shows a notification message with optional feedback.
|
||||
|
||||

|
||||

|
||||
|
||||
## Class members
|
||||
|
||||
### Methods
|
||||
|
||||
- `openSnackMessage(message: string, millisecondsDuration?: number): MatSnackBarRef<any>`
|
||||
Opens a snackbar notification to show a message.
|
||||
- `message` - The message to show
|
||||
- `millisecondsDuration` - (Optional) Time before notification disappears after being shown
|
||||
- `openSnackMessageAction(message: string, action: string, millisecondsDuration?: number): MatSnackBarRef<any>`
|
||||
Opens a snackbar notification with a message and a response button.
|
||||
- `message` - The message to show
|
||||
- `action` - Caption for the response button
|
||||
- `millisecondsDuration` - (Optional) Time before the notification disappears (unless the button is clicked)
|
||||
- **openSnackMessage**(message: `string` = `null`, millisecondsDuration?: `number` = `null`): `MatSnackBarRef<any>`<br/>
|
||||
Opens a snackbar notification to show a message.
|
||||
- _message:_ `string` - The message to show
|
||||
- _millisecondsDuration:_ `number` - (Optional) Time before notification disappears after being shown
|
||||
- **Returns** `MatSnackBarRef<any>` - Information/control object for the snackbar
|
||||
- **openSnackMessageAction**(message: `string` = `null`, action: `string` = `null`, millisecondsDuration?: `number` = `null`): `MatSnackBarRef<any>`<br/>
|
||||
Opens a snackbar notification with a message and a response button.
|
||||
- _message:_ `string` - The message to show
|
||||
- _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
|
||||
|
||||
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.
|
||||
|
||||
```ts
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Page Title service
|
||||
|
||||
Sets the page title.
|
||||
@ -10,9 +11,9 @@ Sets the page title.
|
||||
|
||||
### Methods
|
||||
|
||||
- `setTitle(value: string = '')`
|
||||
Sets the page title.
|
||||
- `value` - The new title
|
||||
- **setTitle**(value: `string` = `""`)<br/>
|
||||
Sets the page title.
|
||||
- _value:_ `string` - The new title
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -10,6 +10,22 @@ Adds pagination to the component it is used with.
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
|
||||
```html
|
||||
@ -29,27 +45,27 @@ Adds pagination to the component it is used with.
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| target | `PaginatedComponent` | | Component that provides custom pagination support. |
|
||||
| supportedPageSizes | `number[]` | `[5, 25, 50, 100]` | An array of page sizes. |
|
||||
| pagination | `Pagination` | | Pagination object. |
|
||||
| -- | -- | -- | -- |
|
||||
| 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. |
|
||||
| target | `PaginatedComponent` | | Component that provides custom pagination support. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| change | `EventEmitter<PaginationQueryParams>` | Emitted when pagination changes in any way. |
|
||||
| changePageNumber | `EventEmitter<Pagination>` | Emitted when the page number changes. |
|
||||
| changePageSize | `EventEmitter<Pagination>` | Emitted when the page size changes. |
|
||||
| nextPage | `EventEmitter<Pagination>` | Emitted when the next page is requested. |
|
||||
| prevPage | `EventEmitter<Pagination>` | Emitted when the previous page is requested. |
|
||||
| -- | -- | -- |
|
||||
| change | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when pagination changes in any way. |
|
||||
| changePageNumber | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the page number changes. |
|
||||
| changePageSize | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the page size changes. |
|
||||
| nextPage | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the next page is requested. |
|
||||
| prevPage | [`EventEmitter<PaginationModel>`](../../lib/core/models/pagination.model.ts) | Emitted when the previous page is requested. |
|
||||
|
||||
## 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
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
### 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
|
||||
|
||||
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.
|
||||
|
||||
```js
|
||||
@ -84,8 +100,8 @@ export interface PaginatedComponent {
|
||||
}
|
||||
```
|
||||
|
||||
Your component must provide a `pagination` subject to allow the Pagination component to respond to changes.
|
||||
Every time user interacts with the Pagination component, it will call the `updatePagination` method
|
||||
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`](../../lib/content-services/document-list/models/document-library.model.ts) component, it will call the `updatePagination` method
|
||||
and pass the updated parameters.
|
||||
|
||||
## See also
|
||||
|
@ -12,19 +12,19 @@ Gets information about a Content Services user.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getCurrentPerson(): Observable<any>`<br/>
|
||||
- **getCurrentPerson**(): `Observable<any>`<br/>
|
||||
Gets information about the user who is currently logged in.
|
||||
- **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.
|
||||
- `personId: string = null` - ID of the target user
|
||||
- _personId:_ `string` - ID of the target user
|
||||
- **Returns** `Observable<any>` - User information
|
||||
|
||||
## Details
|
||||
|
||||
The class returned by `getPerson` and `getCurrentPerson` is detailed
|
||||
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.
|
||||
|
||||
See the
|
||||
|
@ -12,25 +12,25 @@ Gets information about Process Services users.
|
||||
|
||||
### 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.
|
||||
- `user: UserProcessModel = null` - The target user
|
||||
- _user:_ [`UserProcessModel`](../core/user-process.model.md) - The target user
|
||||
- **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.
|
||||
- `taskId?: string = null` - (Optional) ID of the task
|
||||
- `searchWord?: string = null` - (Optional) Filter text to search for
|
||||
- **Returns** `Observable<UserProcessModel[]>` - Array of user information objects
|
||||
- `involveUserWithTask(taskId: string = null, idToInvolve: string = null): Observable<UserProcessModel[]>`<br/>
|
||||
- _taskId:_ `string` - (Optional) ID of the task
|
||||
- _searchWord:_ `string` - (Optional) Filter text to search for
|
||||
- **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Array of user information objects
|
||||
- **involveUserWithTask**(taskId: `string` = `null`, idToInvolve: `string` = `null`): [`Observable<UserProcessModel[]>`](../core/user-process.model.md)<br/>
|
||||
Sets a user to be involved with a task.
|
||||
- `taskId: string = null` - ID of the target task
|
||||
- `idToInvolve: string = null` - ID of the user to involve
|
||||
- **Returns** `Observable<UserProcessModel[]>` - Empty response when the update completes
|
||||
- `removeInvolvedUser(taskId: string = null, idToRemove: string = null): Observable<UserProcessModel[]>`<br/>
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _idToInvolve:_ `string` - ID of the user to involve
|
||||
- **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Empty response when the update completes
|
||||
- **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.
|
||||
- `taskId: string = null` - ID of the target task
|
||||
- `idToRemove: string = null` - ID of the user to remove
|
||||
- **Returns** `Observable<UserProcessModel[]>` - Empty response when the update completes
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _idToRemove:_ `string` - ID of the user to remove
|
||||
- **Returns** [`Observable<UserProcessModel[]>`](../core/user-process.model.md) - Empty response when the update completes
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -11,65 +11,65 @@ Manipulates content related to a Process Instance or Task Instance in APS.
|
||||
|
||||
### 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.
|
||||
- `processInstanceId: string = null` - ID of the target process instance
|
||||
- `content: any = null` - File to associate
|
||||
- `opts?: any = null` - (Optional) Options supported by JSAPI
|
||||
- _processInstanceId:_ `string` - ID of the target process instance
|
||||
- _content:_ `any` - File to associate
|
||||
- _opts:_ `any` - (Optional) Options supported by JSAPI
|
||||
- **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.
|
||||
- `taskId: string = null` - ID of the target task
|
||||
- `file: any = null` - File to associate
|
||||
- `opts?: any = null` - (Optional) Options supported by JSAPI
|
||||
- **Returns** `any` - Details of created content
|
||||
- `createTemporaryRawRelatedContent(file: any = null): Observable<RelatedContentRepresentation>`<br/>
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _file:_ `any` - File to associate
|
||||
- _opts:_ `any` - (Optional) Options supported by JSAPI
|
||||
- **Returns** `Observable<any>` - Details of created content
|
||||
- **createTemporaryRawRelatedContent**(file: `any` = `null`): `Observable<RelatedContentRepresentation>`<br/>
|
||||
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
|
||||
- `deleteRelatedContent(contentId: number = null): Observable<any>`<br/>
|
||||
- **deleteRelatedContent**(contentId: `number` = `null`): `Observable<any>`<br/>
|
||||
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
|
||||
- `getContentPreview(contentId: number = null): Observable<Blob>`<br/>
|
||||
- **getContentPreview**(contentId: `number` = `null`): `Observable<Blob>`<br/>
|
||||
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
|
||||
- `getContentThumbnail(contentId: number = null): Observable<Blob>`<br/>
|
||||
- **getContentThumbnail**(contentId: `number` = `null`): `Observable<Blob>`<br/>
|
||||
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
|
||||
- `getFileContent(contentId: number = null): Observable<RelatedContentRepresentation>`<br/>
|
||||
- **getFileContent**(contentId: `number` = `null`): `Observable<RelatedContentRepresentation>`<br/>
|
||||
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
|
||||
- `getFileRawContent(contentId: number = null): Observable<Blob>`<br/>
|
||||
- **getFileRawContent**(contentId: `number` = `null`): `Observable<Blob>`<br/>
|
||||
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
|
||||
- `getFileRawContentUrl(contentId: number = null): string`<br/>
|
||||
- **getFileRawContentUrl**(contentId: `number` = `null`): `string`<br/>
|
||||
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
|
||||
- `getProcessRelatedContent(processId: string = null): Observable<any>`<br/>
|
||||
- **getProcessRelatedContent**(processId: `string` = `null`): `Observable<any>`<br/>
|
||||
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
|
||||
- `getTaskRelatedContent(taskId: string = null): Observable<any>`<br/>
|
||||
- **getTaskRelatedContent**(taskId: `string` = `null`): `Observable<any>`<br/>
|
||||
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
|
||||
- `handleError(error: any = null): Observable<any>`<br/>
|
||||
- **handleError**(error: `any` = `null`): `Observable<any>`<br/>
|
||||
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
|
||||
- `toJson(res: any = null): any`<br/>
|
||||
- **toJson**(res: `any` = `null`): `any`<br/>
|
||||
Creates a JSON representation of data.
|
||||
- `res: any = null` - Object representing data
|
||||
- _res:_ `any` - Object representing data
|
||||
- **Returns** `any` - JSON object
|
||||
- `toJsonArray(res: any = null): any`<br/>
|
||||
- **toJsonArray**(res: `any` = `null`): `any`<br/>
|
||||
Creates a JSON array representation of data.
|
||||
- `res: any = null` - Object representing data
|
||||
- _res:_ `any` - Object representing data
|
||||
- **Returns** `any` - JSON array object
|
||||
|
||||
## Methods
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Product Version model
|
||||
|
||||
Contains version and license information classes for Alfresco products.
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Deprecated
|
||||
---
|
||||
|
||||
# Renditions service
|
||||
|
||||
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.
|
||||
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
|
||||
*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
|
||||
[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
|
||||
[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.
|
||||
|
@ -6,7 +6,7 @@ Accesses the Content Services Search API.
|
||||
|
||||
### 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.
|
||||
|
||||
## Details
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Search Configuration interface
|
||||
|
||||
Provides fine control of parameters to a search.
|
||||
@ -26,7 +27,7 @@ described below.
|
||||
|
||||
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
|
||||
[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.
|
||||
@ -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.
|
||||
|
||||
## See also
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Search Configuration service
|
||||
|
||||
Provides fine control of parameters to a search.
|
||||
@ -10,8 +11,12 @@ Provides fine control of parameters to a search.
|
||||
|
||||
### Methods
|
||||
|
||||
`generateQueryBody(searchTerm: string, maxResults: string, skipCount: string): QueryBody`<br/>
|
||||
Generates a QueryBody object with custom search parameters.
|
||||
- **generateQueryBody**(searchTerm: `string` = `null`, maxResults: `number` = `null`, skipCount: `number` = `null`): `QueryBody`<br/>
|
||||
|
||||
- _searchTerm:_ `string` -
|
||||
- _maxResults:_ `number` -
|
||||
- _skipCount:_ `number` -
|
||||
- **Returns** `QueryBody` -
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Shared Links Api service
|
||||
|
||||
Finds shared links to Content Services items.
|
||||
@ -10,9 +11,19 @@ Finds shared links to Content Services items.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getSharedLinks(options: any = {}): Observable<NodePaging>`
|
||||
Gets shared links available to the current user.
|
||||
- `options` - Options supported by JSAPI
|
||||
- **createSharedLinks**(nodeId: `string` = `null`, options: `any` = `{}`): `Observable<SharedLinkEntry>`<br/>
|
||||
Creates a shared link available to the current user.
|
||||
- _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
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Sidebar action menu component
|
||||
|
||||
Displays a sidebar-action menu information panel.
|
||||
@ -31,10 +32,10 @@ Displays a sidebar-action menu information panel.
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| title | `string` | | The title of the sidebar action. |
|
||||
| expanded | `boolean` | | Toggle the sidebar action menu on expand. |
|
||||
| width | `number` | 272 | Width in pixels for sidebar action menu options |
|
||||
| -- | -- | -- | -- |
|
||||
| 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 |
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -10,6 +10,23 @@ Displays the standard three-region ADF application layout.
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
|
||||
```html
|
||||
@ -49,13 +66,19 @@ Displays the standard three-region ADF application layout.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| sidenavMin | `number` | | (**required**) Width in pixels when compacted |
|
||||
| sidenavMax | `number` | | (**required**) Width in pixels when expanded |
|
||||
| stepOver | `number` | | (**required**) "Breakpoint" size (ie, number of pixels for selecting between mobile and desktop layouts) |
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| expandedSidenav | `boolean` | true | Should the navigation region be expanded initially? |
|
||||
| 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
|
||||
|
||||
@ -86,12 +109,13 @@ Mobile layout (screen width less than the `stepOver` value):
|
||||
### Public attributes
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| menuOpenState$ | Observable<boolean> | true | Another way to listen to menu open/closed state |
|
||||
| ---- | ---- | ------- | ----------- |
|
||||
| menuOpenState$ | Observable<boolean> | true | Another way to listen to menu open/closed state |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| expanded | `EventEmitter<boolean>` | Emmitted when the menu toggle and the collapsed/expanded state of the sideNav changes
|
||||
|
||||
### 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:
|
||||
|
||||
- true, if the menu got into opened state
|
||||
- false, if the menu git into closed state
|
||||
- true, if the menu got into opened state
|
||||
- false, if the menu git into closed 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.
|
||||
|
||||
```
|
||||
"sideNav" : {
|
||||
"preserveState" : true
|
||||
}
|
||||
```
|
||||
"sideNav" : {
|
||||
"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.
|
||||
Beside this, it is also possible to set the default value in the appConfig.json file:
|
||||
|
||||
```
|
||||
"sideNav" : {
|
||||
"expandedSidenav" : true
|
||||
}
|
||||
```
|
||||
"sideNav" : {
|
||||
"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.
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Site model
|
||||
|
||||
Provides information about a site in a Content Services repository.
|
||||
|
@ -12,25 +12,31 @@ Accesses and manipulates sites from a Content Services repository.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getSites(opts: any = {}): Observable<SitePaging>`
|
||||
Gets a list of all sites in the repository.
|
||||
- `opts` - Options supported by JSAPI
|
||||
- `getSite(siteId: string, opts?: any): Observable<SiteEntry>`
|
||||
Gets the details for a site.
|
||||
- `siteId` - ID of the target site
|
||||
- `opts` - (Optional) Options supported by JSAPI
|
||||
- `deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any>`
|
||||
Deletes a site.
|
||||
- `siteId` - Site to delete
|
||||
- `permanentFlag` - True: deletion is permanent; False: site is moved to the trash
|
||||
- `getSiteContent(siteId: string): Observable<SiteEntry>`
|
||||
Gets a site's content.
|
||||
- `siteId` - ID of the target site
|
||||
- `getSiteMembers(siteId: string): Observable<SiteEntry>`
|
||||
Gets a list of all a site's members.
|
||||
- `siteId` - ID of the target site
|
||||
- `getEcmCurrentLoggedUserName(): string`
|
||||
Gets the username of the user currently logged into ACS.
|
||||
- **deleteSite**(siteId: `string` = `null`, permanentFlag: `boolean` = `true`): `Observable<any>`<br/>
|
||||
Deletes a site.
|
||||
- _siteId:_ `string` - Site to delete
|
||||
- _permanentFlag:_ `boolean` - True: deletion is permanent; False: site is moved to the trash
|
||||
- **Returns** `Observable<any>` - Null response notifying when the operation is complete
|
||||
- **getEcmCurrentLoggedUserName**(): `string`<br/>
|
||||
Gets the username of the user currently logged into ACS.
|
||||
- **Returns** `string` - Username string
|
||||
- **getSite**(siteId: `string` = `null`, opts?: `any` = `null`): `Observable<SiteEntry>`<br/>
|
||||
Gets the details for a site.
|
||||
- _siteId:_ `string` - ID of the target site
|
||||
- _opts:_ `any` - (Optional) Options supported by JSAPI
|
||||
- **Returns** `Observable<SiteEntry>` - Information about the site
|
||||
- **getSiteContent**(siteId: `string` = `null`): `Observable<SiteEntry>`<br/>
|
||||
Gets a site's content.
|
||||
- _siteId:_ `string` - ID of the target site
|
||||
- **Returns** `Observable<SiteEntry>` - Site content
|
||||
- **getSiteMembers**(siteId: `string` = `null`): `Observable<SiteEntry>`<br/>
|
||||
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
|
||||
|
||||
|
@ -39,5 +39,5 @@ You can bind a collection of any objects that expose the following properties:
|
||||
## Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| ---- | ---- | ----------- |
|
||||
| change | `EventEmitter<{ key: string, ascending: boolean }>` | Raised each time sorting key or direction gets changed. |
|
||||
|
@ -2,9 +2,10 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||

|
||||
|
||||
@ -22,49 +23,47 @@ Displays the Start Form for a process.
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| processDefinitionId | `string` | | Definition ID of the process to start. |
|
||||
| processId | `string` | | Process ID of the process to start. |
|
||||
| showOutcomeButtons | `boolean` | `true` | Should form outcome buttons be shown? |
|
||||
| showRefreshButton | `boolean` | `true` | Should the refresh button be shown? |
|
||||
| readOnlyForm | `boolean` | `false` | Is the form read-only (ie, can't be edited)? |
|
||||
| form | `FormModel` | | Underlying form model instance. |
|
||||
| taskId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||
| formId | `string` | | The id of the form definition to load and display with custom values. |
|
||||
| formName | `string` | | Name of the form definition to load and display with custom values. |
|
||||
| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. |
|
||||
| data | `FormValues` | | Custom form values map to be used with the rendered form. |
|
||||
| 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. |
|
||||
| showTitle | `boolean` | `true` | Toggle rendering of the form title. |
|
||||
| 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. |
|
||||
| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. |
|
||||
| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. |
|
||||
| showDebugButton | `boolean` | `false` | Toggle debug options. |
|
||||
| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
||||
| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. |
|
||||
| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. |
|
||||
| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. |
|
||||
| -- | -- | -- | -- |
|
||||
| data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
|
||||
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
|
||||
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
|
||||
| fieldValidators | [`FormFieldValidator[]`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | \[] | Contains a list of form field validator instances. |
|
||||
| form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
|
||||
| formId | `string` | | The id of the form definition to load and display with custom values. |
|
||||
| formName | `string` | | Name of the form definition to load and display with custom values. |
|
||||
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
|
||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||
| path | `string` | | Path of the folder where the metadata will be stored. |
|
||||
| processDefinitionId | `string` | | Definition ID of the process to start. |
|
||||
| processId | `string` | | Process ID of the process to start. |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
||||
| readOnlyForm | `boolean` | false | Is the form read-only (ie, can't be edited)? |
|
||||
| saveMetadata | `boolean` | false | Toggle saving of form metadata. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
|
||||
| showDebugButton | `boolean` | false | Toggle debug options. |
|
||||
| showOutcomeButtons | `boolean` | true | Should form outcome buttons be shown? |
|
||||
| showRefreshButton | `boolean` | true | Should the refresh button be shown? |
|
||||
| showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of 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. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when a field of the form is clicked. |
|
||||
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
|
||||
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
|
||||
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
|
||||
| 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()`. |
|
||||
| -- | -- | -- |
|
||||
| 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>`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Complete` outcome. |
|
||||
| formContentClicked | [`EventEmitter<ContentLinkModel>`](../../lib/core/form/components/widgets/core/content-link.model.ts) | Emitted when a field of the form is clicked. |
|
||||
| formDataRefreshed | [`EventEmitter<FormModel>`](../../lib/core/form/components/widgets/core/form.model.ts) | 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. |
|
||||
| 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. |
|
||||
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. |
|
||||
|
||||
## 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
|
||||
[start form](http://docs.alfresco.com/process-services1.6/topics/none_start_event.html)
|
||||
for the process.
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Storage service
|
||||
|
||||
Stores items in the form of key-value pairs.
|
||||
@ -10,22 +11,23 @@ Stores items in the form of key-value pairs.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getItem(key: string): string`
|
||||
Gets an item.
|
||||
- `key` - Key to identify the item
|
||||
- `setItem(key: string, data: string)`
|
||||
Stores an item
|
||||
- `key` - Key to identify the item
|
||||
- `data` - Data to store
|
||||
- `clear()`
|
||||
Removes all currently stored items.
|
||||
|
||||
- `removeItem(key: string)`
|
||||
Removes a single item.
|
||||
- `key` - Key to identify the item
|
||||
- `hasItem(key: string): boolean`
|
||||
Is any item currently stored under `key`?
|
||||
- `key` - Key identifying item to check
|
||||
- **clear**()<br/>
|
||||
Removes all currently stored items.
|
||||
- **getItem**(key: `string` = `null`): `string | null`<br/>
|
||||
Gets an item.
|
||||
- _key:_ `string` - Key to identify the item
|
||||
- **Returns** `string | null` - The item (if any) retrieved by the key
|
||||
- **hasItem**(key: `string` = `null`): `boolean`<br/>
|
||||
Is any item currently stored under `key`?
|
||||
- _key:_ `string` - Key identifying item to check
|
||||
- **Returns** `boolean` - True if key retrieves an item, false otherwise
|
||||
- **removeItem**(key: `string` = `null`)<br/>
|
||||
Removes a single item.
|
||||
- _key:_ `string` - Key to identify the item
|
||||
- **setItem**(key: `string` = `null`, data: `string` = `null`)<br/>
|
||||
Stores an item
|
||||
- _key:_ `string` - Key to identify the item
|
||||
- _data:_ `string` - Data to store
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Text Highlight pipe
|
||||
|
||||
Adds highlighting to words or sections of text that match a search string.
|
||||
|
@ -18,9 +18,9 @@ Implements text field input masks.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ---- | ---- | ------- | ----------- |
|
||||
| textMask | any | | Object defining mask and "reversed" status. |
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| textMask | `object` | | Object defining mask and "reversed" status. |
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -12,15 +12,17 @@ Retrieves an SVG thumbnail image to represent a document type.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getDocumentThumbnailUrl(node: any): string`
|
||||
Gets a thumbnail URL for the given document node.
|
||||
- `node` - Node to get URL for.
|
||||
- `getMimeTypeIcon(mimeType: string): string`
|
||||
Gets a thumbnail URL for a MIME type.
|
||||
- `mimeType` - MIME type for the thumbnail
|
||||
- `getDefaultMimeTypeIcon(): string`
|
||||
Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
|
||||
|
||||
- **getDefaultMimeTypeIcon**(): `string`<br/>
|
||||
Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
|
||||
- **Returns** `string` - URL string
|
||||
- **getDocumentThumbnailUrl**(node: `any` = `null`): `string`<br/>
|
||||
Gets a thumbnail URL for the given document node.
|
||||
- _node:_ `any` - Node to get URL for.
|
||||
- **Returns** `string` - URL string
|
||||
- **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
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Time Ago pipe
|
||||
|
||||
Converts a recent past date into a number of days ago.
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Toolbar Divider Component
|
||||
|
||||
Divides groups of elements in a Toolbar with a visual separator.
|
||||
|
@ -2,9 +2,10 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||

|
||||
|
||||
|
@ -2,12 +2,30 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Toolbar Component
|
||||
|
||||
Simple container for headers, titles, actions and breadcrumbs.
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
|
||||
```html
|
||||
@ -26,9 +44,9 @@ Simple container for headers, titles, actions and breadcrumbs.
|
||||
### Properties
|
||||
|
||||
| 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
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Translation service
|
||||
|
||||
Supports localisation.
|
||||
@ -10,21 +11,27 @@ Supports localisation.
|
||||
|
||||
### Methods
|
||||
|
||||
- `addTranslationFolder(name: string = '', path: string = '')`
|
||||
Adds a new folder of translation source files.
|
||||
- `name` - Name for the translation provider
|
||||
- `path` - Path to the folder
|
||||
- `use(lang: string): Observable<any>`
|
||||
Sets the target language for translations.
|
||||
- `lang` - Code name for the language
|
||||
- `get(key: string|Array<string>, interpolateParams?: Object): Observable<any>`
|
||||
Gets the translation for the supplied key.
|
||||
- `key` - Key to translate
|
||||
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message
|
||||
- `instant(key: string | Array<string>, interpolateParams?: Object): any`
|
||||
Directly returns the translation for the supplied key.
|
||||
- `key` - Key to translate
|
||||
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message
|
||||
- **addTranslationFolder**(name: `string` = `""`, path: `string` = `""`)<br/>
|
||||
Adds a new folder of translation source files.
|
||||
- _name:_ `string` - Name for the translation provider
|
||||
- _path:_ `string` - Path to the folder
|
||||
- **get**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `Observable<string | any>`<br/>
|
||||
Gets the translation for the supplied key.
|
||||
- _key:_ `string | Array<string>` - Key to translate
|
||||
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
|
||||
- **Returns** `Observable<string | any>` - Translated text
|
||||
- **instant**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `string | any`<br/>
|
||||
Directly returns the translation for the supplied key.
|
||||
- _key:_ `string | Array<string>` - Key to translate
|
||||
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
|
||||
- **Returns** `string | any` - Translated text
|
||||
- **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
|
||||
|
||||
@ -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.
|
||||
|
||||
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
|
||||
class MyComponent {
|
||||
|
@ -62,7 +62,7 @@ value or expression:
|
||||
|
||||
### 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)
|
||||
- **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
|
||||
|
||||
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
|
||||
future version.
|
||||
|
||||
|
@ -12,28 +12,28 @@ Provides access to various APIs related to file upload features.
|
||||
|
||||
### 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
|
||||
- `files: FileModel[] = null` - 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
|
||||
- `cancelUpload(files: FileModel[] = null)`<br/>
|
||||
- _files:_ [`FileModel[]`](../../lib/core/models/file.model.ts) - One or more separate parameters or an array of files to queue
|
||||
- **Returns** [`FileModel[]`](../../lib/core/models/file.model.ts) - Array of files that were not blocked from upload by the ignore list
|
||||
- **cancelUpload**(files: [`FileModel[]`](../../lib/core/models/file.model.ts) = `null`)<br/>
|
||||
Cancels uploading of files.
|
||||
- `files: FileModel[] = null` - One or more separate parameters or an array of files specifying uploads to cancel
|
||||
- `clearQueue()`<br/>
|
||||
- _files:_ [`FileModel[]`](../../lib/core/models/file.model.ts) - One or more separate parameters or an array of files specifying uploads to cancel
|
||||
- **clearQueue**()<br/>
|
||||
Clears the upload queue
|
||||
- `getQueue(): FileModel[]`<br/>
|
||||
- **getQueue**(): [`FileModel[]`](../../lib/core/models/file.model.ts)<br/>
|
||||
Gets the file Queue
|
||||
- **Returns** `FileModel[]` - Array of files that form the queue
|
||||
- `getUploadPromise(file: FileModel = null): any`<br/>
|
||||
- **Returns** [`FileModel[]`](../../lib/core/models/file.model.ts) - Array of files that form the queue
|
||||
- **getUploadPromise**(file: [`FileModel`](../../lib/core/models/file.model.ts) = `null`): `any`<br/>
|
||||
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
|
||||
- `isUploading(): boolean`<br/>
|
||||
- **isUploading**(): `boolean`<br/>
|
||||
Checks whether the service is uploading a file.
|
||||
- **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.
|
||||
- `emitter: EventEmitter<any> = null` - (Deprecated) Emitter to invoke on file status change
|
||||
- _emitter:_ `EventEmitter<any>` - (Deprecated) Emitter to invoke on file status change
|
||||
|
||||
## Events
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# User Info component
|
||||
|
||||
Shows user information.
|
||||
@ -17,13 +18,13 @@ Shows user information.
|
||||
### Properties
|
||||
|
||||
| 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. |
|
||||
| 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`. |
|
||||
| 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`. |
|
||||
| -- | -- | -- | -- |
|
||||
| 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`. |
|
||||
| menuPositionY | `string` | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
|
||||
| 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
|
||||
|
||||
|
@ -2,9 +2,10 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# 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
|
||||
|
||||
|
@ -12,33 +12,35 @@ Stores preferences for components.
|
||||
|
||||
### Methods
|
||||
|
||||
- `get(property: string, defaultValue?: string): string`
|
||||
Gets a preference property.
|
||||
- `property` - Name of the property
|
||||
- `defaultValue` - (Optional) Default to return if the property is not found
|
||||
- `set(property: string, value: any)`
|
||||
Sets a preference property.
|
||||
- `property` - Name of the property
|
||||
- `value` - New value for the property
|
||||
- `getStoragePrefix(): string`
|
||||
Gets the active storage prefix for preferences.
|
||||
|
||||
- `setStoragePrefix(value: string)`
|
||||
Sets the active storage prefix for preferences.
|
||||
- `value` - Name of the prefix
|
||||
- `getPropertyKey(property: string): string`
|
||||
Gets the full property key with prefix.
|
||||
- `property` - The property name
|
||||
- `getDefaultPageSizes(): number[]`
|
||||
Gets an array containing the available page sizes.
|
||||
|
||||
- `getDefaultLocale(): string`
|
||||
Gets the default locale.
|
||||
|
||||
- `select(property: string) : Observable`
|
||||
Return the value for the user status property changed
|
||||
- `property` - The property name to query
|
||||
|
||||
- **get**(property: `string` = `null`, defaultValue?: `string` = `null`): `string`<br/>
|
||||
Gets a preference property.
|
||||
- _property:_ `string` - Name of the property
|
||||
- _defaultValue:_ `string` - (Optional) Default to return if the property is not found
|
||||
- **Returns** `string` - Preference property
|
||||
- **getDefaultLocale**(): `string`<br/>
|
||||
Gets the default locale.
|
||||
- **Returns** `string` - Default locale language code
|
||||
- **getDefaultPageSizes**(): `number[]`<br/>
|
||||
Gets an array containing the available page sizes.
|
||||
- **Returns** `number[]` - Array of page size values
|
||||
- **getPropertyKey**(property: `string` = `null`): `string`<br/>
|
||||
Gets the full property key with prefix.
|
||||
- _property:_ `string` - The property name
|
||||
- **Returns** `string` - [Property](../../lib/content-services/content-metadata/interfaces/property.interface.ts) key
|
||||
- **getStoragePrefix**(): `string`<br/>
|
||||
Gets the active storage prefix for preferences.
|
||||
- **Returns** `string` - Storage prefix
|
||||
- **select**(property: `string` = `null`): `Observable<any>`<br/>
|
||||
Sets up a callback to notify when a property has changed.
|
||||
- _property:_ `string` - The property to watch
|
||||
- **Returns** `Observable<any>` - Notification callback
|
||||
- **set**(property: `string` = `null`, value: `any` = `null`)<br/>
|
||||
Sets a preference property.
|
||||
- _property:_ `string` - Name of the property
|
||||
- _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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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.
|
||||
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
|
||||
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;
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# User Process model
|
||||
|
||||
Represents a Process Services user.
|
||||
|
@ -105,20 +105,20 @@ URL with `urlFile`.
|
||||
| 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. |
|
||||
| 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
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| download | `any` | Emitted when user clicks the 'Download' button. |
|
||||
| extensionChange | `any` | Emitted when the filename extension changes. |
|
||||
| goBack | `any` | Emitted when user clicks the 'Back' button. |
|
||||
| navigateBefore | `any` | Emitted when user clicks 'Navigate Before' ("<") button. |
|
||||
| navigateNext | `any` | Emitted when user clicks 'Navigate Next' (">") button. |
|
||||
| print | `any` | Emitted when user clicks the 'Print' button. |
|
||||
| share | `any` | Emitted when user clicks the 'Share' button. |
|
||||
| showViewerChange | `any` | Emitted when the viewer is shown or hidden. |
|
||||
| download | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Download' button. |
|
||||
| extensionChange | `EventEmitter<string>` | Emitted when the filename extension changes. |
|
||||
| goBack | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Back' button. |
|
||||
| navigateBefore | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Before' ("<") button. |
|
||||
| navigateNext | `EventEmitter<Object>` | Emitted when user clicks 'Navigate Next' (">") button. |
|
||||
| print | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Print' button. |
|
||||
| share | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Share' button. |
|
||||
| showViewerChange | `EventEmitter<boolean>` | Emitted when the viewer is shown or hidden. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
@ -183,7 +183,7 @@ You can provide custom file parameters, for example a value for the `mimeType` o
|
||||
|
||||
### 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
|
||||
- application/pdf
|
||||
@ -241,7 +241,7 @@ Configure your webpack-enabled application with the PDF.js library as follows.
|
||||
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
|
||||
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
|
||||
|
||||
@ -309,7 +309,7 @@ The result should look like this:
|
||||
|
||||
### 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.
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
```html
|
||||
|
2
tools/doc/templates/component.ejs
vendored
2
tools/doc/templates/component.ejs
vendored
@ -5,7 +5,7 @@
|
||||
| -- | -- | -- | -- |
|
||||
<% properties.forEach(function(prop) { -%>
|
||||
<% if (prop.isInput) { -%>
|
||||
| <%= prop.name %> | `<%- prop.type %>` | <%- prop.defaultValue %> | <%- prop.docText %> |
|
||||
| <%= prop.name %> | <% if (prop.type) { %>`<%- prop.type %>`<% } %> | <%- prop.defaultValue %> | <%- prop.docText %> |
|
||||
<% } -%>
|
||||
<% }) -%>
|
||||
<% } %>
|
||||
|
4
tools/doc/templates/service.ejs
vendored
4
tools/doc/templates/service.ejs
vendored
@ -3,10 +3,10 @@
|
||||
### Methods
|
||||
|
||||
<% 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.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) { -%>
|
||||
- **Returns** `<%- meth.returnType %>` - <%= meth.returnDocText %>
|
||||
|
@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
var typedoc_1 = require("typedoc");
|
||||
@ -226,10 +226,10 @@ function handleLinksInBodyText(aggData, text) {
|
||||
var link = resolveTypeLink(aggData, word);
|
||||
var matchStart = void 0;
|
||||
if (!link) {
|
||||
var match = matcher.nextWord(word.toLowerCase(), scanner.index);
|
||||
if (match && match[0]) {
|
||||
link = resolveTypeLink(aggData, match[0].value);
|
||||
matchStart = match[0].startPos;
|
||||
var match_1 = matcher.nextWord(word.toLowerCase(), scanner.index);
|
||||
if (match_1 && match_1[0]) {
|
||||
link = resolveTypeLink(aggData, match_1[0].value);
|
||||
matchStart = match_1[0].startPos;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -268,12 +268,12 @@ function resolveTypeLink(aggData, 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) {
|
||||
return matches[1];
|
||||
}
|
||||
else {
|
||||
return text;
|
||||
return text.replace(/\[\]$/, "");
|
||||
}
|
||||
}
|
||||
function isLinkable(kind) {
|
||||
|
@ -20,6 +20,7 @@ import { CommentTag } from "typedoc/dist/lib/models";
|
||||
|
||||
import * as unist from "../unistHelpers";
|
||||
import * as ngHelpers from "../ngHelpers";
|
||||
import { match } from "minimatch";
|
||||
|
||||
|
||||
const includedNodeTypes = [
|
||||
@ -335,12 +336,12 @@ function resolveTypeLink(aggData, text): string {
|
||||
|
||||
|
||||
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) {
|
||||
return matches[1];
|
||||
} else {
|
||||
return text;
|
||||
return text.replace(/\[\]$/, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user