mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2557] Updated doc files with new script and fixed script bugs (#3135)
This commit is contained in:
committed by
Eugenio Romano
parent
9401e77e0c
commit
717dbfb388
@@ -1,21 +1,28 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-12
|
||||
Last reviewed: 2018-03-29
|
||||
---
|
||||
|
||||
# Content Node Selector component
|
||||
|
||||
Allows a user to select items from a Content Services repository.
|
||||
|
||||

|
||||
|
||||
## Basic Usage
|
||||
## Class members
|
||||
|
||||
### Events
|
||||
### Properties
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| select | Emitted when the user has selected an item |
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| currentFolderId | `string` | null | Deprecated: in 2.1.0 |
|
||||
| dropdownHideMyFiles | `boolean` | false | Deprecated: in 2.1.0 |
|
||||
| dropdownSiteList | `SitePaging` | null | Deprecated: in 2.1.0 |
|
||||
| imageResolver | `ImageResolver` | null | Deprecated: in 2.1.0 |
|
||||
| pageSize | `number` | | Deprecated: in 2.1.0 |
|
||||
| rowFilter | `RowFilter` | null | Deprecated: in 2.1.0 |
|
||||
| title | `string` | null | Deprecated: in 2.1.0 |
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -1,23 +1,30 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-29
|
||||
---
|
||||
|
||||
# Document Actions service
|
||||
|
||||
Implements the document menu actions for the Document List component.
|
||||
|
||||
## Methods
|
||||
## Class members
|
||||
|
||||
- `getHandler(key: string): ContentActionHandler`
|
||||
Gets the handler for an action.
|
||||
- `key` - Identifier of the action
|
||||
- `setHandler(key: string, handler: ContentActionHandler): boolean`
|
||||
Sets a new handler for an action.
|
||||
- `key` - Identifier of the action
|
||||
- `handler` - Handler for the action
|
||||
- `canExecuteAction(obj: any): boolean`
|
||||
Checks if actions can be executed for an item.
|
||||
- `obj` - Item to receive an action
|
||||
### Methods
|
||||
|
||||
- `canExecuteAction(obj: any = null): boolean`<br/>
|
||||
Checks if actions can be executed for an item.
|
||||
- `obj: any = null` - Item to receive an action
|
||||
- **Returns** `boolean` - True if the action can be executed on this item, false otherwise
|
||||
- `getHandler(key: string = null): ContentActionHandler`<br/>
|
||||
Gets the handler for an action.
|
||||
- `key: string = null` - Identifier of the action
|
||||
- **Returns** `ContentActionHandler` - The handler for the action
|
||||
- `setHandler(key: string = null, handler: ContentActionHandler = null): boolean`<br/>
|
||||
Sets a new handler for an action.
|
||||
- `key: string = null` - Identifier of the action
|
||||
- `handler: ContentActionHandler = null` - Handler for the action
|
||||
- **Returns** `boolean` - False if the key was an empty/null string, true otherwise
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -3,6 +3,7 @@ Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-13
|
||||
---
|
||||
|
||||
# Search control component
|
||||
|
||||
Displays a input text which shows find-as-you-type suggestions.
|
||||
@@ -19,25 +20,27 @@ Displays a input text which shows find-as-you-type suggestions.
|
||||
</adf-search-control>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| expandable | `boolean` | `true` | Toggles whether to use an expanding search control. If false then a regular input is used. |
|
||||
| highlight | `boolean` | `false` | Toggles highlighting of the search term in the results. |
|
||||
| inputType | `string` | `'text'` | Type of the input field to render, e.g. "search" or "text" (default). |
|
||||
| autocomplete | `boolean` | `false` | Toggles auto-completion of the search input field. |
|
||||
| liveSearchEnabled | `boolean` | `true` | Toggles "find-as-you-type" suggestions for possible matches. |
|
||||
| liveSearchMaxResults | `number` | `5` | Maximum number of results to show in the live search. |
|
||||
| customQueryBody | `QueryBody` | | Deprecated in v2.1.0. |
|
||||
| autocomplete | `boolean` | false | Toggles auto-completion of the search input field. |
|
||||
| customQueryBody | `QueryBody` | | **Deprecated:** in 2.1.0 |
|
||||
| expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. |
|
||||
| highlight | `boolean` | false | Toggles highlighting of the search term in the results. |
|
||||
| inputType | `string` | "text" | Type of the input field to render, e.g. "search" or "text" (default). |
|
||||
| liveSearchEnabled | `boolean` | true | Toggles "find-as-you-type" suggestions for possible matches. |
|
||||
| liveSearchMaxResults | `number` | 5 | Maximum number of results to show in the live search. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| submit | `EventEmitter<any>` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. |
|
||||
| searchChange | `EventEmitter<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. |
|
||||
| optionClicked | `EventEmitter<any>` | Emitted when a file item from the list of "find-as-you-type" results is selected. |
|
||||
| searchChange | `EventEmitter<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. |
|
||||
| submit | `EventEmitter<any>` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -67,4 +70,4 @@ You can show your own custom template when no results are found for the search:
|
||||
```
|
||||
|
||||
Place the `adf-empty-search-result` tag inside the `adf-search-control` and then within it, put
|
||||
whatever content you want to show for an "empty" result.
|
||||
whatever content you want to show for an "empty" result.
|
||||
|
@@ -2,6 +2,7 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Search component
|
||||
|
||||
Searches items for supplied search terms.
|
||||
@@ -15,23 +16,24 @@ Searches items for supplied search terms.
|
||||
</adf-search>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| displayWith | `(value: any) => string` | `null` | Function that maps an option's value to its display value in the trigger. |
|
||||
| maxResults | `number` | `20` | Maximum number of results to show in the search. |
|
||||
| skipResults | `number` | `0` | Number of results to skip from the results pagination. |
|
||||
| queryBody | `QueryBody` | | |
|
||||
| searchTerm | `string` | `''` | Search term to use when executing the search. Updating this value will run a new search and update the results. |
|
||||
| classList | `string` | | CSS class for display. |
|
||||
| displayWith | `function | null` | null | Function that maps an option's value to its display value in the trigger. |
|
||||
| maxResults | `number` | 20 | Maximum number of results to show in the search. |
|
||||
| queryBody | `QueryBody` | | **Deprecated:** in 2.1.0 |
|
||||
| searchTerm | `string` | "" | Search term to use when executing the search. Updating this value will run a new search and update the results. |
|
||||
| skipResults | `number` | 0 | Number of results to skip from the results pagination. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| resultLoaded | `EventEmitter<NodePaging>` | Emitted when search results have fully loaded. |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs. |
|
||||
| resultLoaded | `EventEmitter<NodePaging>` | Emitted when search results have fully loaded. |
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -1,74 +1,74 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-13
|
||||
Last reviewed: 2018-03-29
|
||||
---
|
||||
|
||||
# Authentication Service
|
||||
|
||||
Provides authentication to ACS and APS.
|
||||
|
||||
## Methods
|
||||
## Class members
|
||||
|
||||
- `isLoggedIn(): boolean`
|
||||
Checks if the user logged in.
|
||||
### Methods
|
||||
|
||||
- `login(username: string, password: string, rememberMe: boolean = false): Observable<{ type: string; ticket: any; }>`
|
||||
Logs the user in.
|
||||
- `username` - Username for the login
|
||||
- `password` - Password for the login
|
||||
- `rememberMe` - Stores the user's login details if true
|
||||
- `isRememberMeSet(): boolean`
|
||||
Checks whether the "remember me" cookie was set or not.
|
||||
|
||||
- `logout(): any`
|
||||
Logs the user out.
|
||||
|
||||
- `removeTicket()`
|
||||
Removes the login ticket from Storage.
|
||||
|
||||
- `getTicketEcm(): string`
|
||||
Gets the ECM ticket stored in the Storage.
|
||||
|
||||
- `getTicketBpm(): string`
|
||||
Gets the BPM ticket stored in the Storage.
|
||||
|
||||
- `getTicketEcmBase64(): string`
|
||||
Gets the BPM ticket from the Storage in Base 64 format.
|
||||
|
||||
- `saveTickets()`
|
||||
Saves the ECM and BPM ticket in the Storage.
|
||||
|
||||
- `saveTicketEcm()`
|
||||
Saves the ECM ticket in the Storage.
|
||||
|
||||
- `saveTicketBpm()`
|
||||
Saves the BPM ticket in the Storage.
|
||||
|
||||
- `saveTicketAuth()`
|
||||
Saves the AUTH ticket in the Storage.
|
||||
|
||||
- `isEcmLoggedIn(): boolean`
|
||||
Checks if the user is logged in on an ECM provider.
|
||||
|
||||
- `isBpmLoggedIn(): boolean`
|
||||
Checks if the user is logged in on a BPM provider.
|
||||
|
||||
- `getEcmUsername(): string`
|
||||
Gets the ECM username.
|
||||
|
||||
- `getBpmUsername(): string`
|
||||
Gets the BPM username
|
||||
|
||||
- `setRedirectUrl(url: RedirectionModel)`
|
||||
Sets the URL to redirect to after login.
|
||||
- `url` - URL to redirect to
|
||||
- `getRedirectUrl(provider: string): string`
|
||||
Gets the URL to redirect to after login.
|
||||
- `provider` - Service provider. Can be "ECM", "BPM" or "ALL".
|
||||
- `handleError(error: any): Observable<any>`
|
||||
Prints an error message in the console browser
|
||||
- `error` - Error message
|
||||
- `getBpmUsername(): string`<br/>
|
||||
Gets the BPM username
|
||||
- **Returns** `string` - The BPM username
|
||||
- `getEcmUsername(): string`<br/>
|
||||
Gets the ECM username.
|
||||
- **Returns** `string` - The ECM username
|
||||
- `getRedirectUrl(provider: string = null): string`<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/>
|
||||
Gets the BPM ticket stored in the Storage.
|
||||
- **Returns** `string | null` - The ticket or `null` if none was found
|
||||
- `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/>
|
||||
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/>
|
||||
Prints an error message in the console browser
|
||||
- `error: any = null` - Error message
|
||||
- **Returns** `Observable<any>` - Object representing the error message
|
||||
- `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/>
|
||||
Checks if the user is logged in on an ECM provider.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- `isLoggedIn(): boolean`<br/>
|
||||
Checks if the user logged in.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- `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/>
|
||||
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
|
||||
- **Returns** `Observable<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
|
||||
- `logout(): any`<br/>
|
||||
Logs the user out.
|
||||
- **Returns** `any` - Response event called when logout is complete
|
||||
- `removeTicket()`<br/>
|
||||
Removes the login ticket from Storage.
|
||||
- `saveTicketAuth()`<br/>
|
||||
Saves the AUTH ticket in the Storage.
|
||||
- `saveTicketBpm()`<br/>
|
||||
Saves the BPM ticket in the Storage.
|
||||
- `saveTicketEcm()`<br/>
|
||||
Saves the ECM ticket in the Storage.
|
||||
- `saveTickets()`<br/>
|
||||
Saves the ECM and BPM ticket in the Storage.
|
||||
- `setRedirectUrl(url: RedirectionModel = null)`<br/>
|
||||
Sets the URL to redirect to after login.
|
||||
- `url: RedirectionModel = null` - URL to redirect to
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -1,25 +1,30 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-29
|
||||
---
|
||||
|
||||
# Cookie service
|
||||
|
||||
Stores key-value data items as browser cookies.
|
||||
|
||||
## Methods
|
||||
## Class members
|
||||
|
||||
- `isEnabled(): boolean`
|
||||
Checks if cookies are enabled.
|
||||
### Methods
|
||||
|
||||
- `getItem(key: string): string`
|
||||
Retrieves a cookie by its key.
|
||||
- `key` - Key to identify the cookie
|
||||
- `setItem(key: string, data: string, expiration: Date | null, path: string | null)`
|
||||
Set a cookie.
|
||||
- `key` - Key to identify the cookie
|
||||
- `data` - Data value to set for the cookie
|
||||
- `expiration` - Expiration date of the data
|
||||
- `path` - "Pathname" to store the cookie
|
||||
- `getItem(key: string = null): string | null`<br/>
|
||||
Retrieves a cookie by its key.
|
||||
- `key: string = null` - Key to identify the cookie
|
||||
- **Returns** `string | null` - The cookie data or null if it is not found
|
||||
- `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/>
|
||||
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
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -1,7 +1,9 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-29
|
||||
---
|
||||
|
||||
# Widget component
|
||||
|
||||
Base class for standard and custom widget classes.
|
||||
@@ -21,12 +23,20 @@ import { WidgetComponent } from '@alfresco/adf-core';
|
||||
export class CustomEditorComponent extends WidgetComponent {}
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ---- | ---- | ------- | ----------- |
|
||||
| readOnly | boolean | false | Does the widget show a read-only value? (ie, can't be edited) |
|
||||
| field | [FormFieldModel](../core/form-field.model.md) | | Data to be displayed in the field |
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| field | `FormFieldModel` | | Data to be displayed in the field |
|
||||
| readOnly | `boolean` | false | Does the widget show a read-only value? (ie, can't be edited) |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| fieldChanged | `EventEmitter<FormFieldModel>` | **Deprecated:** Used only to trigger visibility engine; components should do that internally if needed |
|
||||
|
||||
## Details
|
||||
|
||||
|
Reference in New Issue
Block a user