ps-toolkit-ui 1.16.49 → 1.16.50

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.
@@ -3390,8 +3390,9 @@
3390
3390
  }, 500);
3391
3391
  };
3392
3392
  TableRowComponent.prototype.setOptions = function () {
3393
- var e_1, _b, e_2, _c;
3393
+ var e_1, _e, e_2, _f;
3394
3394
  var _this = this;
3395
+ var _a, _b, _c, _d;
3395
3396
  var opts = [];
3396
3397
  var _loop_1 = function (option) {
3397
3398
  var inp = new InputClass(this_1.table.environment, this_1.table.l, null, null, exports.InputType.Check, 'h-25 without-border m-h-5 p-0 w-u', this_1.row.Data[option.Action] === true);
@@ -3408,15 +3409,15 @@
3408
3409
  };
3409
3410
  var this_1 = this;
3410
3411
  try {
3411
- for (var _d = __values(this.row.Options.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Option && x.InputAction === exports.PermissionInputActionEnum.Input; })), _e = _d.next(); !_e.done; _e = _d.next()) {
3412
- var option = _e.value;
3412
+ for (var _g = __values(((_b = (_a = this.row.Options) === null || _a === void 0 ? void 0 : _a.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Option && x.InputAction === exports.PermissionInputActionEnum.Input; })) !== null && _b !== void 0 ? _b : [])), _h = _g.next(); !_h.done; _h = _g.next()) {
3413
+ var option = _h.value;
3413
3414
  _loop_1(option);
3414
3415
  }
3415
3416
  }
3416
3417
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
3417
3418
  finally {
3418
3419
  try {
3419
- if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
3420
+ if (_h && !_h.done && (_e = _g.return)) _e.call(_g);
3420
3421
  }
3421
3422
  finally { if (e_1) throw e_1.error; }
3422
3423
  }
@@ -3496,14 +3497,15 @@
3496
3497
  else if (option.InputAction === exports.PermissionInputActionEnum.Modal) {
3497
3498
  opt.modal = this_2.table.optionsActions.find(function (x) { return x.name === option.Action; });
3498
3499
  opt.onClick = function () {
3499
- var e_3, _b;
3500
+ var e_3, _e;
3501
+ var _a, _b, _c;
3500
3502
  if (opt.modal.table) {
3501
3503
  var p = new PermissionClass();
3502
3504
  p.RelatedId = _this.row.Data.Id;
3503
3505
  p.Area = _this.table.permissions.Area;
3504
3506
  p.Controller = _this.table.permissions.Controller;
3505
3507
  p.Action = option.Action;
3506
- p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
3508
+ p.Accesses = (_b = (_a = _this.row.Options) === null || _a === void 0 ? void 0 : _a.filter(function (x) { return x.ParentId === option.Id; })) !== null && _b !== void 0 ? _b : [];
3507
3509
  opt.modal.table.permissions = p;
3508
3510
  if (opt.modal.table.form) {
3509
3511
  opt.modal.table.form.url = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
@@ -3522,7 +3524,7 @@
3522
3524
  if (opt.modal.accordion) {
3523
3525
  var _loop_3 = function (r) {
3524
3526
  if (r.table) {
3525
- var options = JSON.parse(JSON.stringify(_this.row.Options));
3527
+ var options = JSON.parse(JSON.stringify((_c = _this.row.Options) !== null && _c !== void 0 ? _c : []));
3526
3528
  var rowOption_1 = options.find(function (x) { return x.ParentId === option.Id && x.Action === r.name; });
3527
3529
  var p = new PermissionClass();
3528
3530
  p.RelatedId = _this.row.Data.Id;
@@ -3539,15 +3541,15 @@
3539
3541
  }
3540
3542
  };
3541
3543
  try {
3542
- for (var _c = (e_3 = void 0, __values(opt.modal.accordion.rows)), _d = _c.next(); !_d.done; _d = _c.next()) {
3543
- var r = _d.value;
3544
+ for (var _f = (e_3 = void 0, __values(opt.modal.accordion.rows)), _g = _f.next(); !_g.done; _g = _f.next()) {
3545
+ var r = _g.value;
3544
3546
  _loop_3(r);
3545
3547
  }
3546
3548
  }
3547
3549
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
3548
3550
  finally {
3549
3551
  try {
3550
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
3552
+ if (_g && !_g.done && (_e = _f.return)) _e.call(_f);
3551
3553
  }
3552
3554
  finally { if (e_3) throw e_3.error; }
3553
3555
  }
@@ -3584,15 +3586,15 @@
3584
3586
  };
3585
3587
  var this_2 = this;
3586
3588
  try {
3587
- for (var _f = __values(this.row.Options.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Option && x.InputAction !== exports.PermissionInputActionEnum.Input; })), _g = _f.next(); !_g.done; _g = _f.next()) {
3588
- var option = _g.value;
3589
+ for (var _j = __values(((_d = (_c = this.row.Options) === null || _c === void 0 ? void 0 : _c.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Option && x.InputAction !== exports.PermissionInputActionEnum.Input; })) !== null && _d !== void 0 ? _d : [])), _k = _j.next(); !_k.done; _k = _j.next()) {
3590
+ var option = _k.value;
3589
3591
  _loop_2(option);
3590
3592
  }
3591
3593
  }
3592
3594
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
3593
3595
  finally {
3594
3596
  try {
3595
- if (_g && !_g.done && (_c = _f.return)) _c.call(_f);
3597
+ if (_k && !_k.done && (_f = _j.return)) _f.call(_j);
3596
3598
  }
3597
3599
  finally { if (e_2) throw e_2.error; }
3598
3600
  }
@@ -3612,7 +3614,7 @@
3612
3614
  // .concat(this.table.permissions.hasAccess('Delete') ? [this.optDelete] : []);
3613
3615
  };
3614
3616
  TableRowComponent.prototype.getCell = function (col) {
3615
- var e_4, _b;
3617
+ var e_4, _e;
3616
3618
  console.log('getCell');
3617
3619
  var cv = _.get(this.row.Data, col.name);
3618
3620
  if (cv === null) {
@@ -3677,7 +3679,7 @@
3677
3679
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
3678
3680
  finally {
3679
3681
  try {
3680
- if (cv_1_1 && !cv_1_1.done && (_b = cv_1.return)) _b.call(cv_1);
3682
+ if (cv_1_1 && !cv_1_1.done && (_e = cv_1.return)) _e.call(cv_1);
3681
3683
  }
3682
3684
  finally { if (e_4) throw e_4.error; }
3683
3685
  }