ps-toolkit-ui 1.5.4 → 1.5.5
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.
- package/bundles/ps-toolkit-ui.umd.js +8 -8
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/form/plaque/form.plaque.component.js +9 -9
- package/fesm2015/ps-toolkit-ui.js +8 -8
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -4841,10 +4841,14 @@
|
|
|
4841
4841
|
}
|
|
4842
4842
|
};
|
|
4843
4843
|
this.inp.isValid = function () {
|
|
4844
|
-
|
|
4845
|
-
|
|
4844
|
+
_this.inp.value = _this.getValue();
|
|
4845
|
+
if (_this.inp.required && !_this.inp.value) {
|
|
4846
|
+
_this.inp.error = exports.InputError.Required;
|
|
4846
4847
|
return false;
|
|
4847
4848
|
}
|
|
4849
|
+
if (!_this.inp.required && !_this.inp.value) {
|
|
4850
|
+
return true;
|
|
4851
|
+
}
|
|
4848
4852
|
return true;
|
|
4849
4853
|
};
|
|
4850
4854
|
this.inp.clear = function () {
|
|
@@ -4861,11 +4865,11 @@
|
|
|
4861
4865
|
};
|
|
4862
4866
|
};
|
|
4863
4867
|
FormPlaqueComponent.prototype.isValid = function () {
|
|
4864
|
-
if (this.inp.
|
|
4868
|
+
if (this.inp.type === exports.InputType.Plaque &&
|
|
4865
4869
|
(!this.part1.isValid() || !this.part2.isValid() || !this.part3.isValid() || !this.part4.isValid())) {
|
|
4866
4870
|
return false;
|
|
4867
4871
|
}
|
|
4868
|
-
return !(
|
|
4872
|
+
return !((this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF) && (!this.part1.isValid() || !this.part3.isValid()));
|
|
4869
4873
|
};
|
|
4870
4874
|
FormPlaqueComponent.prototype.changeFocus = function (p, a) {
|
|
4871
4875
|
if (this.inp.type === exports.InputType.Plaque) {
|
|
@@ -4946,10 +4950,6 @@
|
|
|
4946
4950
|
}
|
|
4947
4951
|
};
|
|
4948
4952
|
FormPlaqueComponent.prototype.getValue = function () {
|
|
4949
|
-
console.log(this.isValid());
|
|
4950
|
-
console.log(this.inp.type === exports.InputType.Plaque ?
|
|
4951
|
-
(this.part1.value ? this.part1.value : '') + "_" + (this.part2.value ? this.part2.value : '') + "_" + (this.part3.value ? this.part3.value : '') + "_" + (this.part4.value ? this.part4.value : '') :
|
|
4952
|
-
(this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : ''));
|
|
4953
4953
|
return this.isValid() ? (this.inp.type === exports.InputType.Plaque ?
|
|
4954
4954
|
(this.part1.value ? this.part1.value : '') + "_" + (this.part2.value ? this.part2.value : '') + "_" + (this.part3.value ? this.part3.value : '') + "_" + (this.part4.value ? this.part4.value : '') :
|
|
4955
4955
|
(this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '')) : null;
|