ps-toolkit-ui 1.22.37 → 1.22.39

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.
@@ -7562,14 +7562,21 @@
7562
7562
  var _a;
7563
7563
  var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
7564
7564
  var data = JSON.parse(text);
7565
+ var maxPriority = Math.max.apply(Math, __spread(data.rows.map(function (x) { return x.Priority; })));
7565
7566
  if (data.table === this.inp.table.name) {
7566
- (_b = this.inp.table.rows).push.apply(_b, __spread(data.rows.map(function (row) {
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
+ }
7567
7571
  row.Id = parseInt(HelperClass.random(5, false, false), 10);
7568
7572
  return {
7569
7573
  Data: row,
7570
7574
  Options: _this.inp.table.permissions.Accesses.filter(function (a) { return a.AccessType === exports.PermissionAccessTypeEnum.Update || a.AccessType === exports.PermissionAccessTypeEnum.Delete; })
7571
7575
  };
7572
7576
  })));
7577
+ if (this.inp.table.onLoad) {
7578
+ this.inp.table.onLoad(this.inp.table.rows);
7579
+ }
7573
7580
  }
7574
7581
  };
7575
7582
  return FormTableComponent;