ps-toolkit-ui 0.0.36 → 0.0.40

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.
@@ -804,12 +804,13 @@
804
804
  PermissionTypeEnum[PermissionTypeEnum["Form"] = -1] = "Form";
805
805
  PermissionTypeEnum[PermissionTypeEnum["Item"] = 0] = "Item";
806
806
  PermissionTypeEnum[PermissionTypeEnum["Access"] = 1] = "Access";
807
- PermissionTypeEnum[PermissionTypeEnum["OptionLink"] = 2] = "OptionLink";
808
- PermissionTypeEnum[PermissionTypeEnum["OptionLinkNewTab"] = 3] = "OptionLinkNewTab";
809
- PermissionTypeEnum[PermissionTypeEnum["OptionReport"] = 4] = "OptionReport";
810
- PermissionTypeEnum[PermissionTypeEnum["OptionFile"] = 5] = "OptionFile";
811
- PermissionTypeEnum[PermissionTypeEnum["OptionModal"] = 6] = "OptionModal";
812
- PermissionTypeEnum[PermissionTypeEnum["OptionConfirm"] = 7] = "OptionConfirm";
807
+ PermissionTypeEnum[PermissionTypeEnum["OptionIcon"] = 2] = "OptionIcon";
808
+ PermissionTypeEnum[PermissionTypeEnum["OptionLink"] = 3] = "OptionLink";
809
+ PermissionTypeEnum[PermissionTypeEnum["OptionLinkNewTab"] = 4] = "OptionLinkNewTab";
810
+ PermissionTypeEnum[PermissionTypeEnum["OptionReport"] = 5] = "OptionReport";
811
+ PermissionTypeEnum[PermissionTypeEnum["OptionFile"] = 6] = "OptionFile";
812
+ PermissionTypeEnum[PermissionTypeEnum["OptionModal"] = 7] = "OptionModal";
813
+ PermissionTypeEnum[PermissionTypeEnum["OptionConfirm"] = 8] = "OptionConfirm";
813
814
  })(exports.PermissionTypeEnum || (exports.PermissionTypeEnum = {}));
814
815
  (function (VehicleType) {
815
816
  VehicleType[VehicleType["Car"] = 1] = "Car";
@@ -2525,9 +2526,6 @@
2525
2526
  };
2526
2527
  TableRowComponent.prototype.getOptions = function () {
2527
2528
  var _this = this;
2528
- console.log(this.table.options);
2529
- console.log(this.table.options.map(function (x) { return x.condition; }));
2530
- console.log(this.table.options.map(function (x) { return _this.row[x.condition]; }));
2531
2529
  return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
2532
2530
  .concat(this.table.options.filter(function (x) { return x.condition == null ||
2533
2531
  (x.condition.startsWith('!') ? !_this.row[x.condition.substring(1)] : _this.row[x.condition]); }).map(function (o) {
@@ -5056,13 +5054,14 @@
5056
5054
  };
5057
5055
 
5058
5056
  var PermissionClass = /** @class */ (function () {
5059
- function PermissionClass(Name, Icon, Type, Area, Controller, Action, Accesses) {
5057
+ function PermissionClass(Name, Icon, Type, Area, Controller, Action, Condition, Accesses) {
5060
5058
  if (Name === void 0) { Name = ''; }
5061
5059
  if (Icon === void 0) { Icon = ''; }
5062
5060
  if (Type === void 0) { Type = null; }
5063
5061
  if (Area === void 0) { Area = ''; }
5064
5062
  if (Controller === void 0) { Controller = ''; }
5065
5063
  if (Action === void 0) { Action = ''; }
5064
+ if (Condition === void 0) { Condition = null; }
5066
5065
  if (Accesses === void 0) { Accesses = []; }
5067
5066
  this.Name = Name;
5068
5067
  this.Icon = Icon;
@@ -5070,9 +5069,9 @@
5070
5069
  this.Area = Area;
5071
5070
  this.Controller = Controller;
5072
5071
  this.Action = Action;
5072
+ this.Condition = Condition;
5073
5073
  this.Accesses = Accesses;
5074
5074
  this.RelatedId = null;
5075
- this.Condition = null;
5076
5075
  }
5077
5076
  PermissionClass.prototype.getAccess = function (a) {
5078
5077
  var c = this.Accesses.filter(function (x) { return x.Action === a && x.Type === exports.PermissionTypeEnum.Access; });
@@ -6902,7 +6901,7 @@
6902
6901
  return p.length > 0 ? this.getPermissionClass(p[0]) : null;
6903
6902
  };
6904
6903
  BaseComponent.prototype.getPermissionClass = function (p) {
6905
- return new PermissionClass(p.Name, p.Icon, p.Type, p.Area, p.Controller, p.Action, this.getPermissionAccessesClass(p.Id));
6904
+ return new PermissionClass(p.Name, p.Icon, p.Type, this.app.area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
6906
6905
  };
6907
6906
  BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
6908
6907
  var _this = this;
@@ -7138,7 +7137,6 @@
7138
7137
  return "continue";
7139
7138
  }
7140
7139
  var opt = new InputClass(this_1.environment, this_1.l, option.Name, option.Icon, exports.InputType.Icon, 'blue h-25 m-h-5 d-ib va-m f-u');
7141
- console.log(option.Condition, 'option.Condition option.Condition');
7142
7140
  opt.condition = option.Condition;
7143
7141
  if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {
7144
7142
  var p = new PermissionClass();