ps-toolkit-ui 1.5.3 → 1.5.6

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.
@@ -804,6 +804,7 @@
804
804
  TableCollType[TableCollType["Bool"] = 13] = "Bool";
805
805
  TableCollType[TableCollType["Options"] = 14] = "Options";
806
806
  TableCollType[TableCollType["Color"] = 15] = "Color";
807
+ TableCollType[TableCollType["Number"] = 16] = "Number";
807
808
  })(exports.TableCollType || (exports.TableCollType = {}));
808
809
  (function (UserType) {
809
810
  UserType[UserType["All"] = 0] = "All";
@@ -2861,6 +2862,9 @@
2861
2862
  else if (col.type === exports.TableCollType.Price) {
2862
2863
  return cv.toLocaleString() + ' ' + this.table.l('Rial');
2863
2864
  }
2865
+ else if (col.type === exports.TableCollType.Number) {
2866
+ return cv.toLocaleString();
2867
+ }
2864
2868
  else if (col.type === exports.TableCollType.Plaque) {
2865
2869
  var parts = cv.split('_');
2866
2870
  if (parts.length === 4) {
@@ -4841,10 +4845,14 @@
4841
4845
  }
4842
4846
  };
4843
4847
  this.inp.isValid = function () {
4844
- if (!_this.isValid()) {
4845
- _this.inp.error = exports.InputError.Invalid;
4848
+ _this.inp.value = _this.getValue();
4849
+ if (_this.inp.required && !_this.inp.value) {
4850
+ _this.inp.error = exports.InputError.Required;
4846
4851
  return false;
4847
4852
  }
4853
+ if (!_this.inp.required && !_this.inp.value) {
4854
+ return true;
4855
+ }
4848
4856
  return true;
4849
4857
  };
4850
4858
  this.inp.clear = function () {
@@ -4861,11 +4869,11 @@
4861
4869
  };
4862
4870
  };
4863
4871
  FormPlaqueComponent.prototype.isValid = function () {
4864
- if (this.inp.required && this.inp.type === exports.InputType.Plaque &&
4872
+ if (this.inp.type === exports.InputType.Plaque &&
4865
4873
  (!this.part1.isValid() || !this.part2.isValid() || !this.part3.isValid() || !this.part4.isValid())) {
4866
4874
  return false;
4867
4875
  }
4868
- return !(this.inp.required && (this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF) && (!this.part1.isValid() || !this.part3.isValid()));
4876
+ return !((this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF) && (!this.part1.isValid() || !this.part3.isValid()));
4869
4877
  };
4870
4878
  FormPlaqueComponent.prototype.changeFocus = function (p, a) {
4871
4879
  if (this.inp.type === exports.InputType.Plaque) {