Skip to content

fix(number-fields): align Currency, Decimal, Integer and Percentage with Constellation - #639

Merged
tumms2021389 merged 1 commit into
masterfrom
fix/number_fields
Oct 13, 2026
Merged

tumms2021389 merged 1 commit into
masterfrom
fix/number_fields

Conversation

@tumms2021389

Copy link
Copy Markdown
Collaborator

Currency, Decimal, Integer and Percentage fields now format, parse and save values the same way as the Constellation DX components.

  • Use the operator locale (PCore getLocale) and the configured ISO code directly, instead of the country-map lookup.
  • Currency input: place the symbol before or after the number per locale, honor "Show ISO Code", and use the currency's own decimal places (e.g. JPY = 0). NOK now shows "NOK"/"kr" instead of "$".
  • Percentage input: place the % sign per locale and support storePercentageAsDecimal (show 25 for 0.25, save 25 as 0.25).
  • Integer input: replace type="number" with a masked input that uses locale grouping and 0 decimals.
  • Decimal input: use locale separators and stop adding $/% to read-only inputs.
  • Save a number (or '' when cleared) instead of a formatted string, e.g. -100 rather than "-$100.00". Only save when the value changed; re-validate a field that stays empty.
  • Show a value of 0 instead of treating it as empty.
  • Read-only display follows the "Format" setting (Integer, Decimal, Decimal-Auto, Percentage, Currency) plus currency display, negative number display, notation and decimal places shown, through a shared formatNumberFieldForDisplay helper.
  • format-utils: switch the Currency formatter to Intl, fix type errors, and remove dead/duplicated code.
  • Add lodash.get as a dependency.

Refs: EA-D16359

Screenshot 2026-10-13 at 11 59 59 AM Screenshot 2026-10-13 at 12 01 17 PM Screenshot 2026-10-13 at 12 02 08 PM Screenshot 2026-10-13 at 12 02 47 PM

…ith Constellation

Currency, Decimal, Integer and Percentage fields now format, parse and save
values the same way as the Constellation DX components.

- Use the operator locale (PCore getLocale) and the configured ISO code
  directly, instead of the country-map lookup.
- Currency input: place the symbol before or after the number per locale,
  honor "Show ISO Code", and use the currency's own decimal places
  (e.g. JPY = 0). NOK now shows "NOK"/"kr" instead of "$".
- Percentage input: place the % sign per locale and support
  storePercentageAsDecimal (show 25 for 0.25, save 25 as 0.25).
- Integer input: replace type="number" with a masked input that uses locale
  grouping and 0 decimals.
- Decimal input: use locale separators and stop adding $/% to read-only
  inputs.
- Save a number (or '' when cleared) instead of a formatted string, e.g.
  -100 rather than "-$100.00". Only save when the value changed;
  re-validate a field that stays empty.
- Show a value of 0 instead of treating it as empty.
- Read-only display follows the "Format" setting (Integer, Decimal,
  Decimal-Auto, Percentage, Currency) plus currency display, negative
  number display, notation and decimal places shown, through a shared
  formatNumberFieldForDisplay helper.
- format-utils: switch the Currency formatter to Intl, fix type errors,
  and remove dead/duplicated code.
- Add lodash.get as a dependency.

Refs: EA-D16359
@tumms2021389 tumms2021389 self-assigned this Oct 13, 2026
@tumms2021389
tumms2021389 merged commit a7b4138 into master Oct 13, 2026
6 checks passed
@tumms2021389
tumms2021389 deleted the fix/number_fields branch October 13, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants