ps-toolkit-ui 1.5.1 → 1.5.4
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 +15 -17
- 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 +15 -17
- package/esm2015/lib/components/table/table.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +15 -17
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/plaque/form.plaque.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -3080,7 +3080,7 @@
|
|
|
3080
3080
|
this.table.searchForm.inputs.forEach(function (x) {
|
|
3081
3081
|
x.required = false;
|
|
3082
3082
|
x.displayLabel = false;
|
|
3083
|
-
x.class = x.class + '
|
|
3083
|
+
x.class = x.class + ' search-form-inp';
|
|
3084
3084
|
if (!_this.table.searchForm.inputs.some(function (s) { return s.type === exports.InputType.Submit; })) {
|
|
3085
3085
|
x.onChange = function () {
|
|
3086
3086
|
_this.table.load();
|
|
@@ -4841,20 +4841,7 @@
|
|
|
4841
4841
|
}
|
|
4842
4842
|
};
|
|
4843
4843
|
this.inp.isValid = function () {
|
|
4844
|
-
|
|
4845
|
-
if (_this.inp.required && !_this.inp.value) {
|
|
4846
|
-
_this.inp.error = exports.InputError.Required;
|
|
4847
|
-
return false;
|
|
4848
|
-
}
|
|
4849
|
-
if (!_this.inp.required && !_this.inp.value) {
|
|
4850
|
-
return true;
|
|
4851
|
-
}
|
|
4852
|
-
if (_this.inp.required && _this.inp.type === exports.InputType.Plaque &&
|
|
4853
|
-
(!_this.part1.isValid() || !_this.part2.isValid() || !_this.part3.isValid() || !_this.part4.isValid())) {
|
|
4854
|
-
_this.inp.error = exports.InputError.Invalid;
|
|
4855
|
-
return false;
|
|
4856
|
-
}
|
|
4857
|
-
if (_this.inp.required && (_this.inp.type === exports.InputType.PlaqueM || _this.inp.type === exports.InputType.PlaqueF) && (!_this.part1.isValid() || !_this.part3.isValid())) {
|
|
4844
|
+
if (!_this.isValid()) {
|
|
4858
4845
|
_this.inp.error = exports.InputError.Invalid;
|
|
4859
4846
|
return false;
|
|
4860
4847
|
}
|
|
@@ -4873,6 +4860,13 @@
|
|
|
4873
4860
|
_this.onFocusIn();
|
|
4874
4861
|
};
|
|
4875
4862
|
};
|
|
4863
|
+
FormPlaqueComponent.prototype.isValid = function () {
|
|
4864
|
+
if (this.inp.required && this.inp.type === exports.InputType.Plaque &&
|
|
4865
|
+
(!this.part1.isValid() || !this.part2.isValid() || !this.part3.isValid() || !this.part4.isValid())) {
|
|
4866
|
+
return false;
|
|
4867
|
+
}
|
|
4868
|
+
return !(this.inp.required && (this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF) && (!this.part1.isValid() || !this.part3.isValid()));
|
|
4869
|
+
};
|
|
4876
4870
|
FormPlaqueComponent.prototype.changeFocus = function (p, a) {
|
|
4877
4871
|
if (this.inp.type === exports.InputType.Plaque) {
|
|
4878
4872
|
if (p === 'Part1') {
|
|
@@ -4952,9 +4946,13 @@
|
|
|
4952
4946
|
}
|
|
4953
4947
|
};
|
|
4954
4948
|
FormPlaqueComponent.prototype.getValue = function () {
|
|
4955
|
-
|
|
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
|
+
return this.isValid() ? (this.inp.type === exports.InputType.Plaque ?
|
|
4956
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 : '') :
|
|
4957
|
-
(this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '');
|
|
4955
|
+
(this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '')) : null;
|
|
4958
4956
|
};
|
|
4959
4957
|
return FormPlaqueComponent;
|
|
4960
4958
|
}());
|