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