ps-toolkit-ui 0.0.166 → 0.0.171

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.
@@ -2504,13 +2504,12 @@
2504
2504
  if (this.table.permissions.hasAccess(exports.PermissionAccessTypeEnum.Insert)) {
2505
2505
  this.addChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'AddSubsetTitle', 'fad fa-plus fa-rotate-90', exports.InputType.Icon, 'green m-h-5 h-25 d-ib va-m f-u');
2506
2506
  this.addChildren.onClick = function () {
2507
- _this.table.form.inputs.find(function (x) { return x.name === 'ParentId'; }).setValue(_this.row.Data.Id, false);
2508
2507
  _this.table.form.onSuccessBase = function () {
2509
2508
  _this.table.modal.hide();
2510
2509
  _this.showChildren.type = exports.InputType.Icon;
2511
2510
  _this.loadChildren(_this.row.Data.Id);
2512
2511
  };
2513
- _this.table.showInsertModal();
2512
+ _this.table.showInsertModal(_this.row.Data.Id);
2514
2513
  };
2515
2514
  }
2516
2515
  this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fad fa-angle-left f-s-22', this.row.Data.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) ? exports.InputType.Icon : exports.InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
@@ -5054,7 +5053,7 @@
5054
5053
  this.setOptions();
5055
5054
  this.cSearch = this.inp.search;
5056
5055
  if (this.inp.onChange) {
5057
- this.inp.onChange(this.inp);
5056
+ this.inp.onChange(this.inp, isEdit);
5058
5057
  }
5059
5058
  if (this.inp.rel) {
5060
5059
  this.inp.rel.value = null;
@@ -6015,10 +6014,9 @@
6015
6014
  }
6016
6015
  AlertComponent.prototype.show = function (l, accept) {
6017
6016
  this.alertLabel.value = l;
6018
- // this.alert.onHide = () => {
6019
- // this.alert.hide();
6020
- // accept();
6021
- // };
6017
+ this.alert.onHide = function () {
6018
+ accept();
6019
+ };
6022
6020
  this.alert.show();
6023
6021
  };
6024
6022
  return AlertComponent;
@@ -7208,9 +7206,10 @@
7208
7206
  TableClass.prototype.getUrl = function () {
7209
7207
  return this.url + 'List';
7210
7208
  };
7211
- TableClass.prototype.showInsertModal = function () {
7209
+ TableClass.prototype.showInsertModal = function (cId) {
7210
+ if (cId === void 0) { cId = null; }
7212
7211
  var insertAccess = this.permissions.getAccess(exports.PermissionAccessTypeEnum.Insert);
7213
- this.form.url = this.form.baseUrl = this.url + 'Insert';
7212
+ this.form.url = this.form.baseUrl = this.url + 'Insert' + cId ? ('/' + cId) : '';
7214
7213
  this.form.name = insertAccess.Name;
7215
7214
  this.form.method = exports.Method.Post;
7216
7215
  this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });