ps-toolkit-ui 1.4.74 → 1.4.77
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 +10 -3
- 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/classes/form.class.js +6 -2
- package/esm2015/lib/classes/table.class.js +2 -1
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +2 -2
- package/esm2015/lib/components/table/row/table.row.component.js +4 -2
- package/fesm2015/ps-toolkit-ui.js +10 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +2 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1744,6 +1744,7 @@
|
|
|
1744
1744
|
this.disabled = false;
|
|
1745
1745
|
this.inEditDisabled = false;
|
|
1746
1746
|
this.inEditVisible = true;
|
|
1747
|
+
this.inEditRequired = true;
|
|
1747
1748
|
this.displayLabel = true;
|
|
1748
1749
|
this.withClear = false;
|
|
1749
1750
|
this.minLength = -1;
|
|
@@ -1799,7 +1800,9 @@
|
|
|
1799
1800
|
this.type = type;
|
|
1800
1801
|
this.value = value;
|
|
1801
1802
|
this.default = typeof value === 'number' ? _.cloneDeep(value) : HelperClass.clone(value);
|
|
1803
|
+
this.baseRequired = required;
|
|
1802
1804
|
this.required = required;
|
|
1805
|
+
this.inEditRequired = required;
|
|
1803
1806
|
this.minLength = type === exports.InputType.Mobile || type === exports.InputType.Phone ? 11 :
|
|
1804
1807
|
type === exports.InputType.NationalCode || type === exports.InputType.PostalCode ? 10 :
|
|
1805
1808
|
type === exports.InputType.Sheba ? 24 : minLength;
|
|
@@ -1824,7 +1827,8 @@
|
|
|
1824
1827
|
if (!u.includes('{}')) {
|
|
1825
1828
|
new RequestClass(this.environment, this.l).send(u ? u : this.url, exports.Method.Post, null, this, function (result) {
|
|
1826
1829
|
if (_this.type === exports.InputType.SelectSearch || _this.type === exports.InputType.Select || _this.type === exports.InputType.SelectAutoComplete ||
|
|
1827
|
-
_this.type === exports.InputType.SelectAutoCompletePlaque || _this.type === exports.InputType.SelectAutoCompletePlaqueM ||
|
|
1830
|
+
_this.type === exports.InputType.SelectAutoCompletePlaque || _this.type === exports.InputType.SelectAutoCompletePlaqueM ||
|
|
1831
|
+
_this.type === exports.InputType.SelectAutoCompletePlaqueF || _this.type === exports.InputType.Radio) {
|
|
1828
1832
|
var r = _this.getOptions(result, null);
|
|
1829
1833
|
var s = result.find(function (x) { return x.Selected; });
|
|
1830
1834
|
if (s) {
|
|
@@ -2877,14 +2881,16 @@
|
|
|
2877
2881
|
this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
|
|
2878
2882
|
this.table.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = true; });
|
|
2879
2883
|
this.table.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = false; });
|
|
2884
|
+
this.table.form.inputs.forEach(function (x) { return x.required = x.inEditRequired; });
|
|
2880
2885
|
}
|
|
2881
2886
|
else {
|
|
2882
2887
|
new RequestClass(this.table.environment, this.table.l).send(this.getOptionUrl(option.Url.replace('update', 'get'), this.table.permissions.RelatedId, this.row.Data.Id), exports.Method.Post, null, opt, function (result) {
|
|
2883
2888
|
_this.table.form.name = opt.name;
|
|
2884
|
-
_this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Data.Id);
|
|
2885
2889
|
_this.table.form.setData(result);
|
|
2890
|
+
_this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Data.Id);
|
|
2886
2891
|
_this.table.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = true; });
|
|
2887
2892
|
_this.table.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = false; });
|
|
2893
|
+
_this.table.form.inputs.forEach(function (x) { return x.required = x.inEditRequired; });
|
|
2888
2894
|
if (_this.table.modal) {
|
|
2889
2895
|
_this.table.modal.show();
|
|
2890
2896
|
}
|
|
@@ -5782,7 +5788,7 @@
|
|
|
5782
5788
|
};
|
|
5783
5789
|
this.inp.data = function () {
|
|
5784
5790
|
var v = _this.inp.value;
|
|
5785
|
-
if (v === null) {
|
|
5791
|
+
if (v === null || v === '') {
|
|
5786
5792
|
return null;
|
|
5787
5793
|
}
|
|
5788
5794
|
if (v && _this.inp.type === exports.InputType.Number || _this.inp.type === exports.InputType.Price) {
|
|
@@ -7443,6 +7449,7 @@
|
|
|
7443
7449
|
this.form.method = exports.Method.Post;
|
|
7444
7450
|
this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });
|
|
7445
7451
|
this.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = true; });
|
|
7452
|
+
this.form.inputs.forEach(function (x) { return x.required = x.baseRequired; });
|
|
7446
7453
|
this.modal.show();
|
|
7447
7454
|
};
|
|
7448
7455
|
TableClass.prototype.set = function (changeRows) {
|