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
|
@@ -1288,6 +1288,7 @@ class InputClass {
|
|
|
1288
1288
|
this.disabled = false;
|
|
1289
1289
|
this.inEditDisabled = false;
|
|
1290
1290
|
this.inEditVisible = true;
|
|
1291
|
+
this.inEditRequired = true;
|
|
1291
1292
|
this.displayLabel = true;
|
|
1292
1293
|
this.withClear = false;
|
|
1293
1294
|
this.minLength = -1;
|
|
@@ -1343,7 +1344,9 @@ class InputClass {
|
|
|
1343
1344
|
this.type = type;
|
|
1344
1345
|
this.value = value;
|
|
1345
1346
|
this.default = typeof value === 'number' ? cloneDeep(value) : HelperClass.clone(value);
|
|
1347
|
+
this.baseRequired = required;
|
|
1346
1348
|
this.required = required;
|
|
1349
|
+
this.inEditRequired = required;
|
|
1347
1350
|
this.minLength = type === InputType.Mobile || type === InputType.Phone ? 11 :
|
|
1348
1351
|
type === InputType.NationalCode || type === InputType.PostalCode ? 10 :
|
|
1349
1352
|
type === InputType.Sheba ? 24 : minLength;
|
|
@@ -2267,14 +2270,16 @@ class TableRowComponent {
|
|
|
2267
2270
|
this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
|
|
2268
2271
|
this.table.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = true);
|
|
2269
2272
|
this.table.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = false);
|
|
2273
|
+
this.table.form.inputs.forEach(x => x.required = x.inEditRequired);
|
|
2270
2274
|
}
|
|
2271
2275
|
else {
|
|
2272
2276
|
new RequestClass(this.table.environment, this.table.l).send(this.getOptionUrl(option.Url.replace('update', 'get'), this.table.permissions.RelatedId, this.row.Data.Id), Method.Post, null, opt, (result) => {
|
|
2273
2277
|
this.table.form.name = opt.name;
|
|
2274
|
-
this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
|
|
2275
2278
|
this.table.form.setData(result);
|
|
2279
|
+
this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
|
|
2276
2280
|
this.table.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = true);
|
|
2277
2281
|
this.table.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = false);
|
|
2282
|
+
this.table.form.inputs.forEach(x => x.required = x.inEditRequired);
|
|
2278
2283
|
if (this.table.modal) {
|
|
2279
2284
|
this.table.modal.show();
|
|
2280
2285
|
}
|
|
@@ -6480,6 +6485,7 @@ class TableClass {
|
|
|
6480
6485
|
this.form.method = Method.Post;
|
|
6481
6486
|
this.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = false);
|
|
6482
6487
|
this.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = true);
|
|
6488
|
+
this.form.inputs.forEach(x => x.required = x.baseRequired);
|
|
6483
6489
|
this.modal.show();
|
|
6484
6490
|
}
|
|
6485
6491
|
set(changeRows = null) {
|