[ADF-3745] Updated properties and doc comments (#4134)

This commit is contained in:
Andy Stark
2019-01-14 19:19:08 +00:00
committed by Eugenio Romano
parent ebde107f41
commit b32654b236
18 changed files with 242 additions and 155 deletions
+13 -9
View File
@@ -4,7 +4,7 @@ Added: v2.0.0
Status: Active
---
# [APS Content Component](../../lib/core/form/components/widgets/content/content.widget.ts "Defined in content.widget.ts")
# [APS Content Component](../../core/form/components/widgets/content/content.widget.ts "Defined in content.widget.ts")
Shows the content preview.
@@ -16,16 +16,20 @@ Shows the content preview.
</adf-content>
```
## Class members
### Properties
The recommended set of properties can be found in the following table:
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| contentId | string | | The content id to show. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| id | `string` | | The content id to show. |
| showDocumentContent | `boolean` | true | Toggles showing document content. |
### Events
| Name | Description |
| ---- | ----------- |
| contentClick | Invoked when the content is clicked. |
| Name | Type | Description |
| ---- | ---- | ----------- |
| contentClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the content is clicked. |
| contentLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the content has loaded. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| thumbnailLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the thumbnail has loaded. |
+19 -15
View File
@@ -1,13 +1,13 @@
# [Icon Component](../../lib/core/icon/icon.component.ts "Defined in icon.component.ts")
---
Title: Icon Component
Added: v3.0.0
Status: Active
Last reviewed: 2019-01-10
---
Provides universal way of rendering registered and named icons.
# [Icon Component](../../core/icon/icon.component.ts "Defined in icon.component.ts")
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Named icons](#named-icons)
Provides a universal way of rendering registered and named icons.
## Basic usage
@@ -28,14 +28,14 @@ Provides universal way of rendering registered and named icons.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| value | `string` | | Icon value, can be either ligature name or custom icon in the format `[namespace]:[name]` |
| value | `string` | | Icon value, which can be either a ligature name or a custom icon in the format `[namespace]:[name]`. |
## Named icons
## Details
You can register custom SVG files as named icons in the format `[namespace]:[name]`.
Example below shows how to register a new icon named `adf:move_file`
that points to an external file within the `assets` folder.
The example below shows how to register a new icon named `adf:move_file`
that points to an external file within the `assets` folder:
```ts
import { Component, OnInit } from '@angular/core';
@@ -62,16 +62,20 @@ export class AppComponent implements OnInit {
}
```
In the HTML you can now use it like in the following snippet:
In the HTML, you can now use the icon as shown below:
```html
<adf-icon value="adf:move_file"></adf-icon>
```
## Thumbnail Service
### Thumbnail Service
You can also use icons registered with the ADF [ThumbnailService](thumbnail.service.md)
You can also use icons registered with the [Thumbnail Service](thumbnail.service.md):
```html
<adf-icon value="image/gif"></adf-icon>
```
## See also
- [Thumbnail service](../core/thumbnail.service.md)
+4 -5
View File
@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-06-07
---
# [Translation service](../../lib/core/services/translation.service.ts "Defined in translation.service.ts")
# [Translation service](../../core/services/translation.service.ts "Defined in translation.service.ts")
Supports localisation.
@@ -28,10 +28,9 @@ Supports localisation.
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- **Returns** `string|any` - Translated text
- **loadTranslation**(lang: `string`, fallback?: `string`)<br/>
- _lang:_ `string` -
- _fallback:_ `string` - (Optional) (Optional)
Loads a translation file.
- _lang:_ `string` - Language code for the language to load
- _fallback:_ `string` - (Optional) Language code to fall back to if the first one was unavailable
- **onTranslationChanged**(lang: `string`)<br/>
Triggers a notification callback when the translation language changes.
- _lang:_ `string` - The new language code