ps-toolkit-ui 0.0.40 → 0.0.44

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.
@@ -5072,6 +5072,7 @@
5072
5072
  this.Condition = Condition;
5073
5073
  this.Accesses = Accesses;
5074
5074
  this.RelatedId = null;
5075
+ this.OnClick = null;
5075
5076
  }
5076
5077
  PermissionClass.prototype.getAccess = function (a) {
5077
5078
  var c = this.Accesses.filter(function (x) { return x.Action === a && x.Type === exports.PermissionTypeEnum.Access; });
@@ -5086,6 +5087,10 @@
5086
5087
  PermissionClass.prototype.getOptions = function () {
5087
5088
  return this.Accesses.filter(function (x) { return x.Type !== exports.PermissionTypeEnum.Access; });
5088
5089
  };
5090
+ PermissionClass.prototype.getOption = function (a) {
5091
+ var c = this.Accesses.filter(function (x) { return x.Action === a && x.Type !== exports.PermissionTypeEnum.Access; });
5092
+ return c.length > 0 ? c[0] : null;
5093
+ };
5089
5094
  PermissionClass.prototype.getUrl = function () {
5090
5095
  return (this.Area ? '/' + this.Area : '') + '/' + this.Controller + '/' +
5091
5096
  (this.RelatedId ? this.RelatedId + "/" : '') +
@@ -7233,6 +7238,14 @@
7233
7238
  });
7234
7239
  };
7235
7240
  }
7241
+ else if (option.Type === exports.PermissionTypeEnum.OptionIcon) {
7242
+ console.log(option.OnClick);
7243
+ if (option.OnClick) {
7244
+ opt.onClick = function (btn) {
7245
+ option.OnClick(btn);
7246
+ };
7247
+ }
7248
+ }
7236
7249
  this_1.options.push(opt);
7237
7250
  };
7238
7251
  var this_1 = this;