ps-toolkit-ui 1.19.6 → 1.19.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.
@@ -9603,48 +9603,7 @@
9603
9603
  }
9604
9604
  if (this.form) {
9605
9605
  this.form.addButtons('Save', this.permissions.Type === exports.PermissionTypeEnum.Form ? 'green w-10 only-icon f-l' : 'green', this.permissions.Type !== exports.PermissionTypeEnum.Form, this.permissions.getAccesses().some(function (x) { return x.AccessType === exports.PermissionAccessTypeEnum.Insert; }), this.permissions.Type === exports.PermissionTypeEnum.Form ? function (data) {
9606
- if (data.Id) {
9607
- var i = _this.rows.findIndex(function (x) { return x.Data.Id === data.Id; });
9608
- _this.rows[i].Data = data;
9609
- }
9610
- else {
9611
- data.Id = parseInt(HelperClass.random(5, false, false), 10);
9612
- var uAccess = new PermissionClass();
9613
- uAccess.Action = 'Update';
9614
- uAccess.Type = exports.PermissionTypeEnum.Option;
9615
- uAccess.InputAction = exports.PermissionInputActionEnum.None;
9616
- uAccess.InputType = exports.PermissionInputTypeEnum.Icon;
9617
- uAccess.AccessType = exports.PermissionAccessTypeEnum.Update;
9618
- uAccess.Icon = 'fad fa-pen';
9619
- uAccess.Name = 'Update';
9620
- var dAccess = new PermissionClass();
9621
- dAccess.Action = 'Delete';
9622
- dAccess.Type = exports.PermissionTypeEnum.Option;
9623
- dAccess.InputAction = exports.PermissionInputActionEnum.None;
9624
- dAccess.InputType = exports.PermissionInputTypeEnum.Icon;
9625
- dAccess.AccessType = exports.PermissionAccessTypeEnum.Delete;
9626
- dAccess.Icon = 'fad fa-trash';
9627
- dAccess.Name = 'Delete';
9628
- if (_this.sortType === 'DESC') {
9629
- _this.rows.push({
9630
- Data: data,
9631
- Options: [uAccess, dAccess]
9632
- });
9633
- }
9634
- else {
9635
- _this.rows.unshift({
9636
- Data: data,
9637
- Options: [uAccess, dAccess]
9638
- });
9639
- }
9640
- }
9641
- if (changeRows) {
9642
- changeRows.emit(data);
9643
- }
9644
- _this.form.clear(_this.insertAccess != null);
9645
- if (_this.onLoad) {
9646
- _this.onLoad(null);
9647
- }
9606
+ _this.onTopFormSubmit(data, changeRows);
9648
9607
  } : null);
9649
9608
  if (this.hasChildren) {
9650
9609
  var level = new InputClass(this.environment, this.l, 'Level', null, exports.InputType.Hidden);
@@ -9664,6 +9623,51 @@
9664
9623
  }
9665
9624
  }
9666
9625
  };
9626
+ TableClass.prototype.onTopFormSubmit = function (data, changeRows) {
9627
+ if (changeRows === void 0) { changeRows = null; }
9628
+ if (data.Id) {
9629
+ var i = this.rows.findIndex(function (x) { return x.Data.Id === data.Id; });
9630
+ this.rows[i].Data = data;
9631
+ }
9632
+ else {
9633
+ data.Id = parseInt(HelperClass.random(5, false, false), 10);
9634
+ var uAccess = new PermissionClass();
9635
+ uAccess.Action = 'Update';
9636
+ uAccess.Type = exports.PermissionTypeEnum.Option;
9637
+ uAccess.InputAction = exports.PermissionInputActionEnum.None;
9638
+ uAccess.InputType = exports.PermissionInputTypeEnum.Icon;
9639
+ uAccess.AccessType = exports.PermissionAccessTypeEnum.Update;
9640
+ uAccess.Icon = 'fad fa-pen';
9641
+ uAccess.Name = 'Update';
9642
+ var dAccess = new PermissionClass();
9643
+ dAccess.Action = 'Delete';
9644
+ dAccess.Type = exports.PermissionTypeEnum.Option;
9645
+ dAccess.InputAction = exports.PermissionInputActionEnum.None;
9646
+ dAccess.InputType = exports.PermissionInputTypeEnum.Icon;
9647
+ dAccess.AccessType = exports.PermissionAccessTypeEnum.Delete;
9648
+ dAccess.Icon = 'fad fa-trash';
9649
+ dAccess.Name = 'Delete';
9650
+ if (this.sortType === 'DESC') {
9651
+ this.rows.push({
9652
+ Data: data,
9653
+ Options: [uAccess, dAccess]
9654
+ });
9655
+ }
9656
+ else {
9657
+ this.rows.unshift({
9658
+ Data: data,
9659
+ Options: [uAccess, dAccess]
9660
+ });
9661
+ }
9662
+ }
9663
+ if (changeRows) {
9664
+ changeRows.emit(data);
9665
+ }
9666
+ this.form.clear(this.insertAccess != null);
9667
+ if (this.onLoad) {
9668
+ this.onLoad(null);
9669
+ }
9670
+ };
9667
9671
  return TableClass;
9668
9672
  }());
9669
9673
  var TableCollClass = /** @class */ (function () {