mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-16968] Add boolean type (#8972)
* [AAE-16968] Update variable mapper service * Update DetaColumnComponent * [AAE-16968] Update DataColumnTypes interface * [AAE-16968] Handle boolean column on UI * [AAE-16968] Create BooleanCellComponent * [AAE-16968] Delete comment * [AAE-16968] Update BooleanCellComponent * [AAE-16968] Delete unnecessary css classes * [AAE-16968] Allow for string values * [AAE-16968] Update test for datatable * [AAE-16968] Update tests for boolean cell * [AAE-16968] Update tests for VariableMapperService * [AAE-16968] Add boolean pipe * [AAE-16968] Update pipe * [AAE-16968] Update code formatting * [AAE-16968] Add doc for the boolean pipe * [AAE-16968] Update DataColumnComponent doc * [AAE-16968] Delete unnecessary class * [AAE-16968] Fix title bug * [AAE-16968] Update BooleanCell tests * [AAE-16968] Update Boolean pipe * [AAE-16968] Update tests for variable mapper service * [AAE-16968] Update PipesModule * [AAE-16968] Small fix * [AAE-16968] Fix lint error
This commit is contained in:
committed by
GitHub
parent
cda12730f6
commit
b49c86fda5
@@ -59,9 +59,25 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
| sortingKey | `string` | | When using server side sorting the column used by the api call where the sorting will be performed |
|
||||
| srTitle | `string` | | Title to be used for screen readers. |
|
||||
| title | `string` | "" | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically. |
|
||||
| type | `string` | "text" | Value type for the column. Possible settings are 'text', 'image', 'date', 'fileSize', 'location', and 'json'. |
|
||||
| type | `string` | "text" | Value type for the column. Possible settings are 'text', 'boolean', 'icon', 'image', 'date', 'fileSize', 'location', and 'json'. |
|
||||
| order | `number` | | Sets position of column. |
|
||||
|
||||
## Properties configuration
|
||||
|
||||
### `type` Input
|
||||
|
||||
The `type` input allows us to specify the type of hosted values for a given column. The complete array of possible values is outlined below:
|
||||
|
||||
- `text` - The given values are represented as a strings (default option).
|
||||
- `boolean` - The column expects true / false (boolean values) and in addition accepts two strings - 'false' and 'true'. Other values are not recognized by the column, and the cell remains empty.
|
||||
- `icon` - TODO
|
||||
- `image` - TODO
|
||||
- `date` - TODO
|
||||
- `fileSize` - TODO
|
||||
- `location` - TODO
|
||||
- `json` - TODO
|
||||
- `currency` - This column is responsible for displaying currencies. It expects numerals represented by a string or a number. This type comes with `currencyConfig` (TODO: Add ref). The default setup use **USD** `code` with a **symbol** as a `display` option. Example output: $10.26 (for number 10.26)
|
||||
|
||||
## Details
|
||||
|
||||
### Conditional visibility
|
||||
|
26
docs/core/pipes/boolean.pipe.md
Normal file
26
docs/core/pipes/boolean.pipe.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
Title: Boolean pipe
|
||||
Added: v6.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2023-10-12
|
||||
---
|
||||
|
||||
# [Boolean pipe](../../../lib/core/src/lib/pipes/boolean.pipe.ts "Defined in boolean.pipe.ts")
|
||||
|
||||
Converts the received values to one of the possible strings: 'true', 'false' or ""(empty string).
|
||||
|
||||
## Basic Usage
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
```HTML
|
||||
<div>
|
||||
Is available: {{ isAvailable | adfBoolean }}
|
||||
</div>
|
||||
```
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
## Details
|
||||
|
||||
This pipe is prepared for any input values. The value `'true'` will be returned if true (boolean) or 'true' (exact string) appears on the input. The situation is identical for the value `'false'` - it will be returned in the case of false(boolean) or 'false'. In other cases, we can expect an `empty string('')`.
|
Reference in New Issue
Block a user