ps-toolkit-ui 1.22.42 → 1.22.44

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.
@@ -4152,7 +4152,7 @@
4152
4152
  }
4153
4153
  var result = Object.keys(this.sumRowBase).reduce(function (result, key) {
4154
4154
  result[key] = checks_1.reduce(function (total, item) {
4155
- return total + (item.Data[key] || 0);
4155
+ return total + (item[key] || 0);
4156
4156
  }, 0);
4157
4157
  return result;
4158
4158
  }, {});
@@ -7548,7 +7548,6 @@
7548
7548
  };
7549
7549
  FormTableComponent.prototype.onCopy = function (event) {
7550
7550
  if (this.inp.table.data().length) {
7551
- event.preventDefault();
7552
7551
  var data = JSON.stringify({
7553
7552
  table: this.inp.table.name,
7554
7553
  rows: this.inp.table.data()
@@ -7560,26 +7559,28 @@
7560
7559
  var _b;
7561
7560
  var _this = this;
7562
7561
  var _a;
7563
- var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
7564
- var data = JSON.parse(text);
7565
- var maxPriority = Math.max.apply(Math, __spread(this.inp.table.rows.map(function (x) { return x.Data.Priority; })));
7566
- console.log(maxPriority);
7567
- if (data.table === this.inp.table.name) {
7568
- (_b = this.inp.table.rows).push.apply(_b, __spread(data.rows.map(function (row, idx) {
7569
- if (!isNaN(maxPriority)) {
7570
- row.Priority = maxPriority + idx + 1;
7571
- }
7572
- console.log(row.Priority);
7573
- row.Id = parseInt(HelperClass.random(5, false, false), 10);
7574
- return {
7575
- Data: row,
7576
- Options: _this.inp.table.permissions.Accesses.filter(function (a) { return a.AccessType === exports.PermissionAccessTypeEnum.Update || a.AccessType === exports.PermissionAccessTypeEnum.Delete; })
7577
- };
7578
- })));
7579
- if (this.inp.table.onLoad) {
7580
- this.inp.table.onLoad(this.inp.table.rows);
7562
+ try {
7563
+ var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
7564
+ var data = JSON.parse(text);
7565
+ var maxPriority_1 = Math.max.apply(Math, __spread(this.inp.table.rows.map(function (x) { return x.Data.Priority; })));
7566
+ if (data.table === this.inp.table.name) {
7567
+ (_b = this.inp.table.rows).push.apply(_b, __spread(data.rows.map(function (row, idx) {
7568
+ if (!isNaN(maxPriority_1)) {
7569
+ row.Priority = maxPriority_1 + idx + 1;
7570
+ }
7571
+ row.Id = parseInt(HelperClass.random(5, false, false), 10);
7572
+ return {
7573
+ Data: row,
7574
+ Options: _this.inp.table.permissions.Accesses.filter(function (a) { return a.AccessType === exports.PermissionAccessTypeEnum.Update || a.AccessType === exports.PermissionAccessTypeEnum.Delete; })
7575
+ };
7576
+ })));
7577
+ if (this.inp.table.onLoad) {
7578
+ this.inp.table.onLoad(this.inp.table.rows);
7579
+ }
7581
7580
  }
7582
7581
  }
7582
+ catch (e) {
7583
+ }
7583
7584
  };
7584
7585
  return FormTableComponent;
7585
7586
  }());