@quadrel-enterprise-ui/framework 20.27.5 → 20.27.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11547,6 +11547,7 @@ class QdInputComponent {
11547
11547
  controlContainer = inject(ControlContainer, { optional: true, host: true, skipSelf: true });
11548
11548
  eventBrokerService = inject(QdEventBrokerService, { optional: true });
11549
11549
  numberInputService = inject(QdNumberInputService);
11550
+ translateService = inject(TranslateService);
11550
11551
  /**
11551
11552
  * The form control name can be assigned here if you want to use Reactive Forms.
11552
11553
  */
@@ -11703,7 +11704,7 @@ class QdInputComponent {
11703
11704
  const displayValue = this.inputType === 'number'
11704
11705
  ? this.numberInputService.formatNumberForViewonly(this._value.value)
11705
11706
  : this._value.value;
11706
- return [`${displayValue}${this._value.unit ? ' ' + this._value.unit : ''}`];
11707
+ return [`${displayValue}${this._value.unit ? ' ' + this.getUnitLabel(this._value.unit) : ''}`];
11707
11708
  }
11708
11709
  ngOnInit() {
11709
11710
  this.subscribeToOptions();
@@ -11903,6 +11904,10 @@ class QdInputComponent {
11903
11904
  this.popover?.close();
11904
11905
  }
11905
11906
  }
11907
+ getUnitLabel(unit) {
11908
+ const unitOption = this.config?.units?.find(option => option.value === unit);
11909
+ return unitOption ? this.translateService.instant(unitOption.i18n) : unit;
11910
+ }
11906
11911
  emitValue() {
11907
11912
  const emittable = this.inputType === 'number' ? this.numberInputService.parseValue(this._value.value) : this._value.value;
11908
11913
  if (this.hasUnits) {