ps-toolkit-ui 0.0.4 → 0.0.8

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.
@@ -2412,7 +2412,7 @@
2412
2412
  _this.table.form.onSuccessBase = function () {
2413
2413
  _this.table.modal.hide();
2414
2414
  if (_this.table.childrenAutoLoad) {
2415
- _this.loadParent.emit(_this.row.parent_id);
2415
+ _this.loadParent.emit(_this.row.ParentId);
2416
2416
  }
2417
2417
  else {
2418
2418
  _this.table.load();
@@ -2442,7 +2442,14 @@
2442
2442
  _this.changeRows.emit(_this.row);
2443
2443
  }
2444
2444
  else {
2445
- _this.confirmShow.emit(_this.row.Id);
2445
+ _this.confirmShow.emit({ id: _this.row.Id, accept: function () {
2446
+ if (_this.table.hasChildren && _this.table.childrenAutoLoad && _this.row.ParentId != null) {
2447
+ _this.loadParent.emit(_this.row.ParentId);
2448
+ }
2449
+ else {
2450
+ _this.table.load();
2451
+ }
2452
+ } });
2446
2453
  }
2447
2454
  };
2448
2455
  if (this.table.sortable) {
@@ -2493,7 +2500,8 @@
2493
2500
  TableRowComponent.prototype.getOptions = function () {
2494
2501
  var _this = this;
2495
2502
  return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
2496
- .concat(this.table.options.filter(function (x) { return x.condition == null || x.condition(_this.row); }).map(function (o) {
2503
+ .concat(this.table.options.filter(function (x) { return x.condition == null ||
2504
+ (x.condition.startsWith('!') ? !_this.row[x.condition.substring(1)] : _this.row[x.condition]); }).map(function (o) {
2497
2505
  var i = HelperClass.clone(o);
2498
2506
  if (i.url) {
2499
2507
  i.url = i.url.replace('{}', _this.row.Id);
@@ -2782,11 +2790,8 @@
2782
2790
  TableComponent.prototype.onChangeRows = function (e) {
2783
2791
  return this.changeRows.emit(e);
2784
2792
  };
2785
- TableComponent.prototype.onConfirmShow = function (rowId) {
2786
- var _this = this;
2787
- this.confirm.show(this.table.l('DeleteMessage'), this.table.url + 'Delete/' + rowId, null, function () {
2788
- _this.table.load(null);
2789
- });
2793
+ TableComponent.prototype.onConfirmShow = function (e) {
2794
+ this.confirm.show(this.table.l('DeleteMessage'), this.table.url + 'Delete/' + e.id, null, e.accept);
2790
2795
  };
2791
2796
  TableComponent.prototype.changeSort = function (e, s) {
2792
2797
  if ($__namespace(e.target).closest('.header-search').hasClass('header-search')) {
@@ -6382,7 +6387,7 @@
6382
6387
  if (_this.table.hasChildren && _this.row.ParentId != null) {
6383
6388
  _this.table.form.onSuccessBase = function () {
6384
6389
  _this.table.modal.hide();
6385
- _this.loadParent.emit(_this.row.parent_id);
6390
+ _this.loadParent.emit(_this.row.ParentId);
6386
6391
  };
6387
6392
  }
6388
6393
  else {
@@ -7115,7 +7120,6 @@
7115
7120
  if (this_1.options.filter(function (x) { return x.name === option.Name; }).length > 0) {
7116
7121
  return "continue";
7117
7122
  }
7118
- console.log(option, 'option');
7119
7123
  var opt = new InputClass(this_1.environment, this_1.l, option.Name, option.Icon, exports.InputType.Icon, 'blue h-25 m-h-5 d-ib va-m f-u');
7120
7124
  opt.condition = option.Condition;
7121
7125
  if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {