[ADF-4152] Updated folder structure of core docs (#4415)

* [ADF-4152] Moved core library docs into subfolders

* [ADF-4152] Moved core library docs into subfolders

* [ADF-4152] Manual fixes to core doc file links

* [ADF-4152] Further automatic + manual link tidying
This commit is contained in:
Andy Stark
2019-03-12 14:20:20 +00:00
committed by Eugenio Romano
parent 285e56e9fb
commit 5fc05da7aa
121 changed files with 1112 additions and 1329 deletions

View File

@@ -0,0 +1,45 @@
---
Title: App Config Pipe
Added: v2.4.0
Status: Active
Last reviewed: 2018-05-24
---
# [App Config Pipe](../../../lib/core/app-config/app-config.pipe.ts "Defined in app-config.pipe.ts")
Retrieves values from the application configuration file directly.
## Basic usage
```html
<adf-login
copyrightText="{{ 'application.copyright' | adfAppConfig }}">
</adf-login>
```
## Details
### Fallback values
You can use the pipe parameter to pass a fallback value which will be
used if the property name is not found:
```html
<adf-login
copyrightText="{{ 'application.copyright' | adfAppConfig:'Fallback Text' }}">
</adf-login>
```
### Chaining with other pipes
You can also chain values with other pipes such as the translation pipe:
```html
<adf-login
copyrightText="{{ 'application.copyright' | adfAppConfig | translate }}">
</adf-login>
```
## See also
- [App Config service](../services/app-config.service.md)

View File

@@ -0,0 +1,29 @@
---
Title: File Size pipe
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-14
---
# [File Size pipe](../../../lib/core/pipes/file-size.pipe.ts "Defined in file-size.pipe.ts")
Converts a number of bytes to the equivalent in KB, MB, etc.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
File Size: {{ sizeInBytes | adfFileSize:"2" }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe chooses the largest unit that is less than the total number of bytes and
divides the total by this number. This ensures that the number of units is greater
than 1 (eg, you will see "512 Bytes" rather than "0.5KB"). The pipe parameter indicates
the number of decimal places to use for the value, defaulting to 2 decimal places.

View File

@@ -0,0 +1,32 @@
---
Title: Format Space pipe
Added: v3.0.0
Status: Active
Last reviewed: 2018-11-27
---
# [Format Space pipe](../../../lib/core/pipes/format-space.pipe.ts "Defined in format-space.pipe.ts")
Replaces all the white space in a string with a supplied character.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div [id]="'CHECK MY ID' | formatSpace">
BATTLESTAR GALACTICA
</div>
```
<!-- {% endraw %} -->
## Details
The pipe replaces each run of whitespace characters in the string with a single character
(which is the underscore by default) and transforms the string to lowercase (eg, `test a pipe`
becomes `test_a_pipe`).
You can specify a different replacement character by passing it as a pipe parameter.
You can also pass `false` to the `lowercase` parameter to skip the conversion to lowercase
and just replace the whitespace.

View File

@@ -0,0 +1,30 @@
---
Title: Full name pipe
Added: v3.0.0
Status: Active
Last reviewed: 2018-11-12
---
# [Full name pipe](../../../lib/core/pipes/full-name.pipe.ts "Defined in full-name.pipe.ts")
Joins the first and last name properties from a [`UserProcessModel`](../../core/models/user-process.model.md) object into a single string.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
Project Leader: {{ user | fullName }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe offers a convenient way to extract the name from a [User process model](../models/user-process.model.md) object.
## See also
- [User initial pipe](user-initial.pipe.md)

View File

@@ -0,0 +1,30 @@
---
Title: Mime Type Icon pipe
Added: v2.0.0
Status: Active
---
# [Mime Type Icon pipe](../../../lib/core/pipes/mime-type-icon.pipe.ts "Defined in mime-type-icon.pipe.ts")
Retrieves an icon to represent a MIME type.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
<img src='{{ "image/jpeg" | adfMimeTypeIcon }}' />
</div>
```
<!-- {% endraw %} -->
## Details
The pipe takes a MIME type as input and returns the URL of an SVG file that
symbolizes that type (see the [Thumbnail service](../services/thumbnail.service.md) for the mapping between types and icons). The pipe will return a "miscellaneous" icon when no specific mapping is defined.
## See also
- [Thumbnail service](../services/thumbnail.service.md)

View File

@@ -0,0 +1,34 @@
---
Title: Node Name Tooltip pipe
Added: v2.0.0
Status: Active
---
# [Node Name Tooltip pipe](../../../lib/core/pipes/node-name-tooltip.pipe.ts "Defined in node-name-tooltip.pipe.ts")
Formats the tooltip for a [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md).
## Basic Usage
<!-- {% raw %} -->
```html
<data-column
key="name"
title="APP.DOCUMENT_LIST.COLUMNS.NAME">
<ng-template let-value="value" let-context>
<span title="{{ context?.row?.obj | adfNodeNameTooltip }}">{{ value }}</span>
</ng-template>
</data-column>
```
<!-- {% endraw %} -->
## Details
The tooltip is formatted according to the following rules:
- if the _title_ and _description_ are missing, then the tooltip shows the _name_;
- if the _title_ is missing, then the tooltip shows the _name_ and _description_;
- if the _description_ is missing, then the tooltip shows the _name_ and _title_;
- if _name_ and _title_, _name_ and _description_, or _title_ and _description_ are the same, then only a single line is displayed.

View File

@@ -0,0 +1,33 @@
---
Title: Text Highlight pipe
Added: v2.0.0
Status: Active
---
# [Text Highlight pipe](../../../lib/core/pipes/text-highlight.pipe.ts "Defined in text-highlight.pipe.ts")
Adds highlighting to words or sections of text that match a search string.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
Some rude words have been detected in your summary: {{ summary | highlight:rudeWordList }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe's parameter is a string to search for in the text. Any occurrences of the string will
be highlighted with added HTML (see the
[Highlight Transform service](../services/highlight-transform.service.md) for more information about how
this is implemented). The parameter can contain spaces, in which case each separate "word" in the string will be highlighted individually.
## See also
- [Highlight directive](../directives/highlight.directive.md)
- [Highlight transform service](../services/highlight-transform.service.md)

View File

@@ -0,0 +1,28 @@
---
Title: Time Ago pipe
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-19
---
# [Time Ago pipe](../../../lib/core/pipes/time-ago.pipe.ts "Defined in time-ago.pipe.ts")
Converts a recent past date into a number of days ago.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
Last modified: {{ date | adfTimeAgo }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe finds the difference between the input date and the current date. If it
is less than seven days then then the date will be formatted as "X days ago".
Otherwise, the usual full date format is used.

View File

@@ -0,0 +1,36 @@
---
Title: User Initial pipe
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-12
---
# [User Initial pipe](../../../lib/core/pipes/user-initial.pipe.ts "Defined in user-initial.pipe.ts")
Takes the name fields of a [`UserProcessModel`](../../core/models/user-process.model.md) object and extracts and formats the initials.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
Project Leader: {{ user | usernameInitials:"initialsClass" }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe gets the initial characters of the user's first and last names and
concatenates them. The results are returned in an HTML &lt;div> element.
The first pipe parameter specifies an optional CSS class to add to the &lt;div>
element (eg, a background color is commonly used to emphasise initials). The
second parameter is an optional delimiter to add between the initials.
Both parameters default to empty strings.
## See also
- [Full name pipe](full-name.pipe.md)