ps-toolkit-ui 1.22.43 → 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.
@@ -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,24 +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
- 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)) {
7569
- row.Priority = maxPriority + 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);
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
+ }
7579
7580
  }
7580
7581
  }
7582
+ catch (e) {
7583
+ }
7581
7584
  };
7582
7585
  return FormTableComponent;
7583
7586
  }());