mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Documentation update 3.6.0 (#5257)
* documentation update 3.6.0 * documentation update 3.6.0 * update missing doc
This commit is contained in:
@@ -72,9 +72,6 @@ Provides authentication to ACS and APS.
|
||||
- **isRememberMeSet**(): `boolean`<br/>
|
||||
Checks whether the "remember me" cookie was set or not.
|
||||
- **Returns** `boolean` - True if set, false otherwise
|
||||
- **isSSODiscoveryConfigured**(): `boolean`<br/>
|
||||
Checks if SSO is configured correctly.
|
||||
- **Returns** `boolean` - True if configured correctly, false otherwise
|
||||
- **login**(username: `string`, password: `string`, rememberMe: `boolean` = `false`): [`Observable`](http://reactivex.io/documentation/observable.html)`<Function>`<br/>
|
||||
Logs the user in.
|
||||
- _username:_ `string` - Username for the login
|
||||
|
@@ -15,6 +15,9 @@ Stores key-value data items as browser cookies.
|
||||
|
||||
- **clear**()<br/>
|
||||
Placeholder for testing purposes - do not use.
|
||||
- **deleteCookie**(key: `string`)<br/>
|
||||
Delete a cookie Key.
|
||||
- _key:_ `string` - Key to identify the cookie
|
||||
- **getItem**(key: `string`): `string|null`<br/>
|
||||
Retrieves a cookie by its key.
|
||||
- _key:_ `string` - Key to identify the cookie
|
||||
@@ -22,7 +25,7 @@ Stores key-value data items as browser cookies.
|
||||
- **isEnabled**(): `boolean`<br/>
|
||||
Checks if cookies are enabled.
|
||||
- **Returns** `boolean` - True if enabled, false otherwise
|
||||
- **setItem**(key: `string`, data: `string`, expiration: `Date|null`, path: `string|null`)<br/>
|
||||
- **setItem**(key: `string`, data: `string`, expiration: `Date|null` = `null`, path: `string|null` = `null`)<br/>
|
||||
Sets a cookie.
|
||||
- _key:_ `string` - Key to identify the cookie
|
||||
- _data:_ `string` - Data value to set for the cookie
|
||||
|
@@ -31,13 +31,13 @@ Maps a form field type string onto the corresponding form [widget component](../
|
||||
|
||||
## Details
|
||||
|
||||
The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Field component uses this service to choose which widget to use to render an instance of a
|
||||
The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Field component uses this service to choose which [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) to use to render an instance of a
|
||||
form field. The [`Form`](../../../lib/process-services/src/lib/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/src/lib/task-list/models/form.model.ts) Rendering service maintains a mapping between each type name and
|
||||
a corresponding [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts). The function takes a [`FormFieldModel`](../../core/models/form-field.model.md) object as its argument and
|
||||
uses the data from the object to determine which widget should be used to render the field.
|
||||
uses the data from the object to determine which [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) should be used to render the field.
|
||||
|
||||
In some cases, the field type string alone is enough to determine the widget type and so the function
|
||||
In some cases, the field type string alone is enough to determine the [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) type and so the function
|
||||
just returns the type directly:
|
||||
|
||||
```ts
|
||||
@@ -45,7 +45,7 @@ let customResolver: DynamicComponentResolveFunction = () => CustomWidgetComponen
|
||||
formRenderingService.setComponentTypeResolver('text', customResolver, true);
|
||||
```
|
||||
|
||||
In other cases, the function may need to choose the widget dynamically based on
|
||||
In other cases, the function may need to choose the [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) dynamically based on
|
||||
specific values in the form data:
|
||||
|
||||
```ts
|
||||
@@ -95,7 +95,7 @@ if you set the `override` parameter to 'true':
|
||||
formRenderingService.setComponentTypeResolver('text', newResolver, true);
|
||||
```
|
||||
|
||||
You would typically use this to replace an existing widget with your own custom version that
|
||||
You would typically use this to replace an existing [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) with your own custom version that
|
||||
implements a modified layout or responds differently when the data is entered. See the
|
||||
[Form Extensibility and Customisation](../../user-guide/extensibility.md) guide for further details and examples
|
||||
of this technique.
|
||||
|
@@ -20,13 +20,38 @@ Decodes a JSON Web Token (JWT) to a JavaScript object.
|
||||
- **getAccessToken**(): `string`<br/>
|
||||
Gets access token
|
||||
- **Returns** `string` - access token
|
||||
- **getClientRoles**(clientName: `string`): `string[]`<br/>
|
||||
Gets Client roles.
|
||||
- _clientName:_ `string` -
|
||||
- **Returns** `string[]` - Array of client roles
|
||||
- **getRealmRoles**(): `string[]`<br/>
|
||||
Gets realm roles.
|
||||
- **Returns** `string[]` - Array of realm roles
|
||||
- **getValueFromLocalAccessToken**(key: `string`)<br/>
|
||||
Gets a named value from the user access token.
|
||||
- _key:_ `string` - Key name of the field to retrieve
|
||||
- **getValueFromToken**(accessToken: `string`, key: `string`)<br/>
|
||||
Gets a named value from the user access token.
|
||||
- _accessToken:_ `string` -
|
||||
- _key:_ `string` -
|
||||
- _key:_ `string` -
|
||||
- **hasClientRole**(clientName: `string`, role: `string`): `boolean`<br/>
|
||||
Checks for client role.
|
||||
- _clientName:_ `string` - Targeted client name
|
||||
- _role:_ `string` - Role name to check
|
||||
- **Returns** `boolean` - True if it contains given role, false otherwise
|
||||
- **hasRealmRole**(role: `string`): `boolean`<br/>
|
||||
Checks for single realm role.
|
||||
- _role:_ `string` - Role name to check
|
||||
- **Returns** `boolean` - True if it contains given role, false otherwise
|
||||
- **hasRealmRoles**(rolesToCheck: `string[]`): `boolean`<br/>
|
||||
Checks for realm roles.
|
||||
- _rolesToCheck:_ `string[]` - List of role names to check
|
||||
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
|
||||
- **hasRealmRolesForClientRole**(clientName: `string`, rolesToCheck: `string[]`): `boolean`<br/>
|
||||
Checks for client roles.
|
||||
- _clientName:_ `string` - Targeted client name
|
||||
- _rolesToCheck:_ `string[]` - List of role names to check
|
||||
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Gets Alfresco Repository node metadata and creates nodes with metadata.
|
||||
Create a new Node from form metadata.
|
||||
- _nodeType:_ `string` - [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) type
|
||||
- _nameSpace:_ `any` - Namespace for properties
|
||||
- _data:_ `any` - [Property](../../../lib/content-services/content-metadata/interfaces/property.interface.ts) data to store in the node under namespace
|
||||
- _data:_ `any` - [Property](../../../lib/content-services/src/lib/content-metadata/interfaces/property.interface.ts) data to store in the node under namespace
|
||||
- _path:_ `string` - Path to the node
|
||||
- _name:_ `string` - (Optional) [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) name
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>` - The created node
|
||||
|
@@ -18,16 +18,16 @@ Accesses the Content Services Search API.
|
||||
- _term:_ `string` - Term to search for
|
||||
- _options:_ [`SearchOptions`](../../../lib/core/services/search.service.ts) - (Optional) Options for delivery of the search results
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of nodes resulting from the search
|
||||
- **search**(searchTerm: `string`, maxResults: `number`, skipCount: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
|
||||
- **search**(searchTerm: `string`, maxResults: `number`, skipCount: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ResultSetPaging`](../../../node_modules/@alfresco/js-api/src/api/search-rest-api/model/resultSetPaging.ts)`>`<br/>
|
||||
Performs a search.
|
||||
- _searchTerm:_ `string` - Term to search for
|
||||
- _maxResults:_ `number` - Maximum number of items in the list of results
|
||||
- _skipCount:_ `number` - Number of higher-ranked items to skip over in the list
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of search results
|
||||
- **searchByQueryBody**(queryBody: `QueryBody`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ResultSetPaging`](../../../node_modules/@alfresco/js-api/src/api/search-rest-api/model/resultSetPaging.ts)`>` - List of search results
|
||||
- **searchByQueryBody**(queryBody: `QueryBody`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ResultSetPaging`](../../../node_modules/@alfresco/js-api/src/api/search-rest-api/model/resultSetPaging.ts)`>`<br/>
|
||||
Performs a search with its parameters supplied by a QueryBody object.
|
||||
- _queryBody:_ `QueryBody` - Object containing the search parameters
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` - List of search results
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ResultSetPaging`](../../../node_modules/@alfresco/js-api/src/api/search-rest-api/model/resultSetPaging.ts)`>` - List of search results
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -19,8 +19,8 @@ Retrieves an SVG thumbnail image to represent a document type.
|
||||
- **getDocumentThumbnailUrl**(node: [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`|string`, attachment?: `boolean`, ticket?: `string`): `string`<br/>
|
||||
Gets a thumbnail URL for the given document node.
|
||||
- _node:_ [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`|string` - Node or Node ID to get URL for.
|
||||
- _attachment:_ `boolean` - (Optional)
|
||||
- _ticket:_ `string` - (Optional)
|
||||
- _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
|
||||
- **getMimeTypeIcon**(mimeType: `string`): `string`<br/>
|
||||
Gets a thumbnail URL for a MIME type.
|
||||
|
@@ -24,7 +24,7 @@ Stores preferences for the app and for individual components.
|
||||
- **getPropertyKey**(property: `string`): `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
|
||||
- **Returns** `string` - [Property](../../../lib/content-services/src/lib/content-metadata/interfaces/property.interface.ts) key
|
||||
- **getStoragePrefix**(): `string`<br/>
|
||||
Gets the active storage prefix for preferences.
|
||||
- **Returns** `string` - Storage prefix
|
||||
|
Reference in New Issue
Block a user