@porscheinformatik/clr-addons 19.0.2 → 19.0.3

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.
@@ -13794,7 +13794,6 @@ class ClrReadonlyDirective {
13794
13794
  this.elementRef = elementRef;
13795
13795
  this.renderer = renderer;
13796
13796
  this.injector = injector;
13797
- this.isMultiSelect = false;
13798
13797
  this.unitPosition = 'right';
13799
13798
  this.property = null;
13800
13799
  this.clrReadOnly = true;
@@ -13869,8 +13868,8 @@ class ClrReadonlyDirective {
13869
13868
  if (controlType === 'numeric') {
13870
13869
  return this.formatNumericValue(controlValue);
13871
13870
  }
13872
- else if (this.isMultiSelect) {
13873
- return this.formatMultiSelectValue(controlValue);
13871
+ else if (this.property) {
13872
+ return this.formatValueForObjectValue(controlValue);
13874
13873
  }
13875
13874
  else if (controlType === 'select') {
13876
13875
  return this.formatListValue(controlValue);
@@ -13881,8 +13880,13 @@ class ClrReadonlyDirective {
13881
13880
  const result = formatNumber(controlValue + '', true, this.decimalSeparator, this.groupingSeparator, this.decimalPlaces, this.autofillDecimals);
13882
13881
  return this.unitPosition === 'left' ? `${this.unit} ${result}` : `${result} ${this.unit}`;
13883
13882
  }
13884
- formatMultiSelectValue(controlValue) {
13885
- return controlValue.map((item) => item[this.property]).join(', ');
13883
+ formatValueForObjectValue(controlValue) {
13884
+ if (Array.isArray(controlValue)) {
13885
+ return controlValue.map((item) => item[this.property]).join(', ');
13886
+ }
13887
+ else {
13888
+ return controlValue[this.property];
13889
+ }
13886
13890
  }
13887
13891
  formatListValue(controlValue) {
13888
13892
  const options = this.elementRef.nativeElement.querySelectorAll('option');
@@ -13895,7 +13899,7 @@ class ClrReadonlyDirective {
13895
13899
  }
13896
13900
  }
13897
13901
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ClrReadonlyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
13898
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: ClrReadonlyDirective, isStandalone: false, selector: "[clrReadonly]", inputs: { isMultiSelect: ["clrMulti", "isMultiSelect"], unitPosition: ["clrUnitPosition", "unitPosition"], property: ["clrReadOnlyProperty", "property"], clrReadOnly: ["clrReadonly", "clrReadOnly"], unit: ["clrUnit", "unit"], decimalPlaces: ["clrDecimalPlaces", "decimalPlaces"], roundValue: ["clrRoundDisplayValue", "roundValue"], autofillDecimals: ["clrAutofillDecimals", "autofillDecimals"], decimalSeparator: ["clrDecimalSep", "decimalSeparator"], groupingSeparator: ["clrGroupingSep", "groupingSeparator"] }, usesOnChanges: true, ngImport: i0 }); }
13902
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: ClrReadonlyDirective, isStandalone: false, selector: "[clrReadonly]", inputs: { unitPosition: ["clrUnitPosition", "unitPosition"], property: ["clrReadOnlyProperty", "property"], clrReadOnly: ["clrReadonly", "clrReadOnly"], unit: ["clrUnit", "unit"], decimalPlaces: ["clrDecimalPlaces", "decimalPlaces"], roundValue: ["clrRoundDisplayValue", "roundValue"], autofillDecimals: ["clrAutofillDecimals", "autofillDecimals"], decimalSeparator: ["clrDecimalSep", "decimalSeparator"], groupingSeparator: ["clrGroupingSep", "groupingSeparator"] }, usesOnChanges: true, ngImport: i0 }); }
13899
13903
  }
13900
13904
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ClrReadonlyDirective, decorators: [{
13901
13905
  type: Directive,
@@ -13903,10 +13907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
13903
13907
  selector: '[clrReadonly]',
13904
13908
  standalone: false,
13905
13909
  }]
13906
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }], propDecorators: { isMultiSelect: [{
13907
- type: Input,
13908
- args: ['clrMulti']
13909
- }], unitPosition: [{
13910
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }], propDecorators: { unitPosition: [{
13910
13911
  type: Input,
13911
13912
  args: ['clrUnitPosition']
13912
13913
  }], property: [{