ps-toolkit-ui 1.4.74 → 1.4.75
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 +7 -1
- 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 +4 -1
- package/esm2015/lib/classes/table.class.js +2 -1
- package/esm2015/lib/components/table/row/table.row.component.js +4 -2
- package/fesm2015/ps-toolkit-ui.js +7 -1
- 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;
|
|
@@ -2877,14 +2880,16 @@
|
|
|
2877
2880
|
this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
|
|
2878
2881
|
this.table.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = true; });
|
|
2879
2882
|
this.table.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = false; });
|
|
2883
|
+
this.table.form.inputs.forEach(function (x) { return x.required = x.inEditRequired; });
|
|
2880
2884
|
}
|
|
2881
2885
|
else {
|
|
2882
2886
|
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
2887
|
_this.table.form.name = opt.name;
|
|
2884
|
-
_this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Data.Id);
|
|
2885
2888
|
_this.table.form.setData(result);
|
|
2889
|
+
_this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Data.Id);
|
|
2886
2890
|
_this.table.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = true; });
|
|
2887
2891
|
_this.table.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = false; });
|
|
2892
|
+
_this.table.form.inputs.forEach(function (x) { return x.required = x.inEditRequired; });
|
|
2888
2893
|
if (_this.table.modal) {
|
|
2889
2894
|
_this.table.modal.show();
|
|
2890
2895
|
}
|
|
@@ -7443,6 +7448,7 @@
|
|
|
7443
7448
|
this.form.method = exports.Method.Post;
|
|
7444
7449
|
this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });
|
|
7445
7450
|
this.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = true; });
|
|
7451
|
+
this.form.inputs.forEach(function (x) { return x.required = x.baseRequired; });
|
|
7446
7452
|
this.modal.show();
|
|
7447
7453
|
};
|
|
7448
7454
|
TableClass.prototype.set = function (changeRows) {
|