@ardium-ui/ui 5.0.0-alpha.30 → 5.0.0-alpha.31

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.
@@ -10277,21 +10277,15 @@ class ArdiumRangeSliderComponent extends _AbstractSlider {
10277
10277
  super(defaults);
10278
10278
  this.componentId = '106';
10279
10279
  this.componentName = 'range-slider';
10280
- this._value = { from: -Infinity, to: Infinity };
10280
+ this._value = { from: -Number.MIN_SAFE_INTEGER, to: Number.MIN_SAFE_INTEGER };
10281
10281
  //! tooltip updater
10282
10282
  this._tooltipValue = this.value;
10283
10283
  //! handle focus monitors
10284
10284
  this.currentHandle = signal(null);
10285
10285
  }
10286
- ngOnInit() {
10287
- super.ngOnInit();
10288
- if (this._value.from !== -Infinity && this._value.to !== Infinity)
10289
- return;
10290
- this.writeValue({ low: this.min(), high: this.max() });
10291
- }
10292
10286
  //! writeValue
10293
10287
  _isValidObject(v) {
10294
- return isObject(v) && isNumber(v['low']) && isNumber(v['high']);
10288
+ return isObject(v) && isNumber(v['from']) && isNumber(v['to']);
10295
10289
  }
10296
10290
  _isValidTuple(v) {
10297
10291
  return Array.isArray(v) && isNumber(v[0]) && isNumber(v[1]) && v.length === 2;
@@ -10309,8 +10303,8 @@ class ArdiumRangeSliderComponent extends _AbstractSlider {
10309
10303
  this.reset();
10310
10304
  return;
10311
10305
  }
10312
- let from = -Infinity;
10313
- let to = Infinity;
10306
+ let from = -Number.MIN_SAFE_INTEGER;
10307
+ let to = Number.MIN_SAFE_INTEGER;
10314
10308
  if (this._isValidObject(v)) {
10315
10309
  from = v.from;
10316
10310
  to = v.to;
@@ -10319,12 +10313,12 @@ class ArdiumRangeSliderComponent extends _AbstractSlider {
10319
10313
  from = v[0];
10320
10314
  to = v[1];
10321
10315
  }
10322
- const lowClamped = this._clampValue(from);
10323
- const highClamped = this._clampValue(to);
10324
- const value = this._arrayValueToObjectValue([lowClamped, highClamped]);
10316
+ const fromClamped = this._clampValue(from);
10317
+ const toClamped = this._clampValue(to);
10318
+ const value = this._arrayValueToObjectValue([fromClamped, toClamped]);
10325
10319
  this._value = value;
10326
- this._positionPercent[0] = this._valueToPercent(lowClamped);
10327
- this._positionPercent[1] = this._valueToPercent(highClamped);
10320
+ this._positionPercent[0] = this._valueToPercent(fromClamped);
10321
+ this._positionPercent[1] = this._valueToPercent(toClamped);
10328
10322
  this._updateTooltipValue();
10329
10323
  }
10330
10324
  get value() {
@@ -10357,7 +10351,7 @@ class ArdiumRangeSliderComponent extends _AbstractSlider {
10357
10351
  }
10358
10352
  //! methods for programmatic manipulation
10359
10353
  reset() {
10360
- this._value = { from: -Infinity, to: Infinity };
10354
+ this._value = { from: -this.min(), to: this.max() };
10361
10355
  this._positionPercent[0] = 0;
10362
10356
  this._positionPercent[1] = 1;
10363
10357
  }