@ardium-ui/ui 5.0.0-alpha.14 → 5.0.0-alpha.15

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.
@@ -688,6 +688,8 @@ class NumberInputModel {
688
688
  v = this._applyNumberConstraint(v);
689
689
  v = this._applyMinMaxConstraints(v);
690
690
  }
691
+ if (v === '')
692
+ v = null;
691
693
  //update view
692
694
  const oldVal = this._value();
693
695
  this.setValue(v);
@@ -8375,7 +8377,7 @@ class ArdiumNumberInputComponent extends _FormFieldComponentBase {
8375
8377
  //! other inputs
8376
8378
  this.inputAttrs = input({});
8377
8379
  //! value two-way binding
8378
- this._valueBeforeInit = '0';
8380
+ this._valueBeforeInit = null;
8379
8381
  this.valueChange = output();
8380
8382
  //! event emitters
8381
8383
  this.inputEvent = output({ alias: 'input' });
@@ -8388,7 +8390,9 @@ class ArdiumNumberInputComponent extends _FormFieldComponentBase {
8388
8390
  this.allowFloat = input(this._DEFAULTS.allowFloat, { transform: v => coerceBooleanProperty(v) });
8389
8391
  //! incerement/decrement buttons
8390
8392
  this.noButtons = input(this._DEFAULTS.noButtons, { transform: v => coerceBooleanProperty(v) });
8391
- this.keepFocusOnQuickChangeButton = input(this._DEFAULTS.keepFocusOnQuickChangeButton, { transform: v => coerceBooleanProperty(v) });
8393
+ this.keepFocusOnQuickChangeButton = input(this._DEFAULTS.keepFocusOnQuickChangeButton, {
8394
+ transform: v => coerceBooleanProperty(v),
8395
+ });
8392
8396
  this.stepSize = input(this._DEFAULTS.stepSize, {
8393
8397
  transform: v => {
8394
8398
  const newValue = coerceNumberProperty(v, 1);
@@ -8399,11 +8403,11 @@ class ArdiumNumberInputComponent extends _FormFieldComponentBase {
8399
8403
  return newValue;
8400
8404
  },
8401
8405
  });
8402
- effect(() => {
8403
- const v = this.inputModel.numberValue();
8404
- this.valueChange.emit(v);
8405
- this._onChangeRegistered?.(v);
8406
- });
8406
+ // effect(() => {
8407
+ // const v = this.inputModel.numberValue();
8408
+ // this.valueChange.emit(v);
8409
+ // this._onChangeRegistered?.(v);
8410
+ // });
8407
8411
  }
8408
8412
  ngAfterViewInit() {
8409
8413
  this._setInputAttributes();
@@ -8497,6 +8501,7 @@ class ArdiumNumberInputComponent extends _FormFieldComponentBase {
8497
8501
  _emitChange() {
8498
8502
  const v = this.inputModel.numberValue();
8499
8503
  this.changeEvent.emit(v);
8504
+ this._onChangeRegistered?.(v);
8500
8505
  }
8501
8506
  //smart focus
8502
8507
  onMouseup() {