@wizishop/angular-components 15.1.127 → 15.1.129

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.
@@ -6685,10 +6685,18 @@ class BorderPickerComponent {
6685
6685
  }
6686
6686
  writeValue(value) {
6687
6687
  if (value !== undefined) {
6688
- this.value = value;
6689
- const numericValue = parseInt(this.value.replace('px', ''), 10);
6690
- if (!isNaN(numericValue)) {
6691
- this.sliderValue = numericValue;
6688
+ this.value = value || '0px'; // Default to '0px' if value is null
6689
+ if (this.value) {
6690
+ const numericValue = parseInt(this.value.replace('px', ''), 10);
6691
+ if (!isNaN(numericValue)) {
6692
+ this.sliderValue = numericValue;
6693
+ this.updateSliderPercentage();
6694
+ }
6695
+ }
6696
+ else {
6697
+ // Handle null value case
6698
+ this.sliderValue = 0;
6699
+ this.value = '0px';
6692
6700
  this.updateSliderPercentage();
6693
6701
  }
6694
6702
  }
@@ -6700,11 +6708,16 @@ class BorderPickerComponent {
6700
6708
  this.onTouched = fn;
6701
6709
  }
6702
6710
  setValue(event) {
6703
- this.value = event.target.value;
6704
- const numericValue = parseInt(this.value.replace('px', ''), 10);
6705
- if (!isNaN(numericValue)) {
6706
- this.sliderValue = numericValue;
6707
- this.updateSliderPercentage();
6711
+ this.value = event.target.value || '0px';
6712
+ if (this.value) {
6713
+ const numericValue = parseInt(this.value.replace('px', ''), 10);
6714
+ if (!isNaN(numericValue)) {
6715
+ this.sliderValue = numericValue;
6716
+ this.updateSliderPercentage();
6717
+ }
6718
+ }
6719
+ else {
6720
+ this.sliderValue = 0;
6708
6721
  }
6709
6722
  this.onChange(this.value);
6710
6723
  this.borderRadiusChange.emit(this.value);