@quadrel-enterprise-ui/framework 20.27.4 → 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) {
|
|
@@ -21231,16 +21236,16 @@ class QdFilterItemFreeTextComponent {
|
|
|
21231
21236
|
itemIndex = 0;
|
|
21232
21237
|
testId;
|
|
21233
21238
|
enterClick = new EventEmitter();
|
|
21234
|
-
item;
|
|
21235
|
-
i18n;
|
|
21236
21239
|
get dataTestId() {
|
|
21237
21240
|
return this.testId;
|
|
21238
21241
|
}
|
|
21242
|
+
item;
|
|
21243
|
+
i18n;
|
|
21244
|
+
inputValue = '';
|
|
21245
|
+
_destroyed$ = new Subject();
|
|
21239
21246
|
get value() {
|
|
21240
21247
|
return (this.item && this.item.item) || '';
|
|
21241
21248
|
}
|
|
21242
|
-
inputValue = '';
|
|
21243
|
-
_destroyed$ = new Subject();
|
|
21244
21249
|
ngOnInit() {
|
|
21245
21250
|
this.filterService
|
|
21246
21251
|
.getCategoryById$(this.filterId, this.categoryIndex)
|
|
@@ -21252,6 +21257,8 @@ class QdFilterItemFreeTextComponent {
|
|
|
21252
21257
|
.getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
|
|
21253
21258
|
.pipe(takeUntil$1(this._destroyed$))
|
|
21254
21259
|
.subscribe(item => {
|
|
21260
|
+
if ((item?.item ?? '') !== this.inputValue)
|
|
21261
|
+
this.inputValue = '';
|
|
21255
21262
|
this.item = item;
|
|
21256
21263
|
});
|
|
21257
21264
|
}
|