ps-toolkit-ui 1.5.0 → 1.5.3
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 +17 -21
- 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 +11 -17
- package/esm2015/lib/components/table/table.component.js +8 -6
- package/fesm2015/ps-toolkit-ui.js +17 -21
- 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,11 +3080,13 @@
|
|
|
3080
3080
|
this.table.searchForm.inputs.forEach(function (x) {
|
|
3081
3081
|
x.required = false;
|
|
3082
3082
|
x.displayLabel = false;
|
|
3083
|
-
x.
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3083
|
+
x.class = x.class + ' search-form-inp';
|
|
3084
|
+
if (!_this.table.searchForm.inputs.some(function (s) { return s.type === exports.InputType.Submit; })) {
|
|
3085
|
+
x.onChange = function () {
|
|
3086
|
+
_this.table.load();
|
|
3087
|
+
};
|
|
3088
|
+
x.withClear = true;
|
|
3089
|
+
}
|
|
3088
3090
|
if (x.type === exports.InputType.Submit) {
|
|
3089
3091
|
x.onClick = function () {
|
|
3090
3092
|
_this.table.load(x);
|
|
@@ -4839,20 +4841,7 @@
|
|
|
4839
4841
|
}
|
|
4840
4842
|
};
|
|
4841
4843
|
this.inp.isValid = function () {
|
|
4842
|
-
|
|
4843
|
-
if (_this.inp.required && !_this.inp.value) {
|
|
4844
|
-
_this.inp.error = exports.InputError.Required;
|
|
4845
|
-
return false;
|
|
4846
|
-
}
|
|
4847
|
-
if (!_this.inp.required && !_this.inp.value) {
|
|
4848
|
-
return true;
|
|
4849
|
-
}
|
|
4850
|
-
if (_this.inp.required && _this.inp.type === exports.InputType.Plaque &&
|
|
4851
|
-
(!_this.part1.isValid() || !_this.part2.isValid() || !_this.part3.isValid() || !_this.part4.isValid())) {
|
|
4852
|
-
_this.inp.error = exports.InputError.Invalid;
|
|
4853
|
-
return false;
|
|
4854
|
-
}
|
|
4855
|
-
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()) {
|
|
4856
4845
|
_this.inp.error = exports.InputError.Invalid;
|
|
4857
4846
|
return false;
|
|
4858
4847
|
}
|
|
@@ -4871,6 +4860,13 @@
|
|
|
4871
4860
|
_this.onFocusIn();
|
|
4872
4861
|
};
|
|
4873
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
|
+
};
|
|
4874
4870
|
FormPlaqueComponent.prototype.changeFocus = function (p, a) {
|
|
4875
4871
|
if (this.inp.type === exports.InputType.Plaque) {
|
|
4876
4872
|
if (p === 'Part1') {
|
|
@@ -4950,9 +4946,9 @@
|
|
|
4950
4946
|
}
|
|
4951
4947
|
};
|
|
4952
4948
|
FormPlaqueComponent.prototype.getValue = function () {
|
|
4953
|
-
return this.inp.type === exports.InputType.Plaque ?
|
|
4949
|
+
return this.isValid() ? (this.inp.type === exports.InputType.Plaque ?
|
|
4954
4950
|
(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
|
-
(this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '');
|
|
4951
|
+
(this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '')) : null;
|
|
4956
4952
|
};
|
|
4957
4953
|
return FormPlaqueComponent;
|
|
4958
4954
|
}());
|