ps-toolkit-ui 0.0.38 → 0.0.42

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) {
@@ -5088,6 +5086,10 @@
5088
5086
  PermissionClass.prototype.getOptions = function () {
5089
5087
  return this.Accesses.filter(function (x) { return x.Type !== exports.PermissionTypeEnum.Access; });
5090
5088
  };
5089
+ PermissionClass.prototype.getOption = function (a) {
5090
+ var c = this.Accesses.filter(function (x) { return x.Action === a && x.Type !== exports.PermissionTypeEnum.Access; });
5091
+ return c.length > 0 ? c[0] : null;
5092
+ };
5091
5093
  PermissionClass.prototype.getUrl = function () {
5092
5094
  return (this.Area ? '/' + this.Area : '') + '/' + this.Controller + '/' +
5093
5095
  (this.RelatedId ? this.RelatedId + "/" : '') +
@@ -6903,7 +6905,7 @@
6903
6905
  return p.length > 0 ? this.getPermissionClass(p[0]) : null;
6904
6906
  };
6905
6907
  BaseComponent.prototype.getPermissionClass = function (p) {
6906
- return new PermissionClass(p.Name, p.Icon, p.Type, p.Area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
6908
+ return new PermissionClass(p.Name, p.Icon, p.Type, this.app.area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
6907
6909
  };
6908
6910
  BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
6909
6911
  var _this = this;
@@ -7139,7 +7141,6 @@
7139
7141
  return "continue";
7140
7142
  }
7141
7143
  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');
7142
- console.log(option.Condition, 'option.Condition option.Condition');
7143
7144
  opt.condition = option.Condition;
7144
7145
  if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {
7145
7146
  var p = new PermissionClass();