ps-toolkit-ui 1.3.64 → 1.3.67

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.
@@ -4817,9 +4817,7 @@
4817
4817
  FormPlaqueComponent.prototype.onFocusIn = function (e) {
4818
4818
  if (e === void 0) { e = null; }
4819
4819
  if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
4820
- setTimeout(function () {
4821
- $('#Part1Input .control').focus();
4822
- }, 100);
4820
+ this.part1.focus();
4823
4821
  }
4824
4822
  };
4825
4823
  FormPlaqueComponent.prototype.onKeyDown = function (e) {
@@ -6621,12 +6619,18 @@
6621
6619
  this.car.displayLabel = this.carF.displayLabel = this.motor.displayLabel = false;
6622
6620
  this.inp.setValue = function (v) {
6623
6621
  if (v != null) {
6624
- if (v.split('_').length === 2) {
6622
+ if (v.split('_').length === 2 && v.split('_').some(function (x) { return !isNaN(parseInt(x, 10)); })) {
6625
6623
  _this.type = exports.VehicleType.Motorcycle;
6626
6624
  setTimeout(function () {
6627
6625
  _this.motor.setValue(v, false);
6628
6626
  });
6629
6627
  }
6628
+ else if (v.split('_').length === 2) {
6629
+ _this.type = exports.VehicleType.CarF;
6630
+ setTimeout(function () {
6631
+ _this.carF.setValue(v, false);
6632
+ });
6633
+ }
6630
6634
  else if (v.split('_').length === 4) {
6631
6635
  _this.type = exports.VehicleType.Car;
6632
6636
  setTimeout(function () {
@@ -6648,6 +6652,10 @@
6648
6652
  _this.inp.error = exports.InputError.Required;
6649
6653
  return false;
6650
6654
  }
6655
+ if (_this.inp.required && _this.type === exports.VehicleType.CarF && !_this.carF.isValid()) {
6656
+ _this.inp.error = exports.InputError.Required;
6657
+ return false;
6658
+ }
6651
6659
  return true;
6652
6660
  };
6653
6661
  this.inp.clear = function () {
@@ -6656,9 +6664,10 @@
6656
6664
  _this.type = exports.VehicleType.Car;
6657
6665
  _this.car.clear();
6658
6666
  _this.motor.clear();
6667
+ _this.carF.clear();
6659
6668
  };
6660
6669
  this.inp.data = function () {
6661
- return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : null;
6670
+ return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : _this.type === exports.VehicleType.CarF ? _this.carF.data() : null;
6662
6671
  };
6663
6672
  };
6664
6673
  FormCarComponent.prototype.changeType = function (t) {
@@ -6669,19 +6678,9 @@
6669
6678
  this.onFocusIn();
6670
6679
  };
6671
6680
  FormCarComponent.prototype.onFocusIn = function () {
6672
- console.log('onFocusIn');
6673
- if (this.type === exports.VehicleType.Car) {
6674
- this.car.focus();
6675
- console.log('Car');
6676
- }
6677
- else if (this.type === exports.VehicleType.CarF) {
6678
- this.carF.focus();
6679
- console.log('CarF');
6680
- }
6681
- else if (this.type === exports.VehicleType.Motorcycle) {
6682
- this.motor.focus();
6683
- console.log('Motorcycle');
6684
- }
6681
+ setTimeout(function () {
6682
+ $('#Part1Input .control').focus();
6683
+ }, 100);
6685
6684
  };
6686
6685
  return FormCarComponent;
6687
6686
  }());