Skip to content

Platform: Object Number Component V1.0 Technical Design

kavya-b edited this page May 20, 2020 · 4 revisions

Object Number

Summary

The object number is a short text that represents the numeric (key) attribute of an object and its unit. The number has a semantic color, and the unit inherits the same color from its number. The number can be emphasized (default setting) when it is used for the key attribute, and non-emphasized when it is used for any other numeric attribute of the item.

The object number is typically used to indicate the key attribute of an object in the dynamic page header, or as an attribute of a line item in a table.

Example

<fdp-object-number    
                      [id]="id of the element'"
                      [unit]="numberUnit"
                      [focused]="true|false"
                      [status]="Error| information| none| 
                       sucess|warning">
                      {{number}}</fdp-object-number>

Design

Property Bindings

[unit]="numberUnit"

number unit ex: $, rs, mm etc.

[focused]="true|false"

Number should appear emphasized or not.

[status]:Status

Defines number and number unit value status colors.

export type Status = 'error| information| none| success| warning';

Eventbinding


i18n

Link to general support for i18n: Supporting internationalization in ngx/platform

Special Usecase: No

  • fdp-object-number can be supported as:
<fdp-object-number    
                      [id]="id of the element'"
                      i18n-unit="@@unit"
                      unit="numberUnit"
                      [focused]="true|false"
                      [status]="Error| information| none| 
                       sucess|warning">
                      {{number}}
</fdp-object-number>
  • The number in content can be supported by using DecimalPipe which can automatically translate numbers depending on the locale. In this case, it has to be done at the application level.

Redesign Required: No


Clone this wiki locally