ps-toolkit-ui 1.9.29 → 1.9.30

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.
@@ -5300,6 +5300,7 @@
5300
5300
  });
5301
5301
  FormSelectComponent.prototype.ngOnInit = function () {
5302
5302
  var _this = this;
5303
+ var _a;
5303
5304
  if (this.inp.type !== exports.InputType.SelectAutoComplete) {
5304
5305
  this.inp.load();
5305
5306
  }
@@ -5359,14 +5360,16 @@
5359
5360
  HelperClass.setBarcodeReader(this.inp);
5360
5361
  }
5361
5362
  if (this.inp.addModal) {
5362
- this.addIcon = new InputClass(this.inp.environment, this.inp.l, 'Add' + this.inp.name, 'fa-duotone fa-plus', exports.InputType.Icon, 'blue m-t-25');
5363
- this.addIcon.onClick = function () {
5364
- _this.inp.addModal.show();
5365
- };
5363
+ if ((_a = this.inp.addModal.form) === null || _a === void 0 ? void 0 : _a.permission) {
5364
+ this.addIcon = new InputClass(this.inp.environment, this.inp.l, 'Add' + this.inp.name, 'fa-duotone fa-plus', exports.InputType.Icon, 'blue m-t-25');
5365
+ this.addIcon.onClick = function () {
5366
+ _this.inp.addModal.show();
5367
+ };
5368
+ }
5366
5369
  }
5367
5370
  };
5368
5371
  FormSelectComponent.prototype.setValue = function (ids, rows) {
5369
- var e_1, _a;
5372
+ var e_1, _b;
5370
5373
  if (rows === void 0) { rows = this.inp.options; }
5371
5374
  try {
5372
5375
  for (var rows_1 = __values(rows), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
@@ -5383,7 +5386,7 @@
5383
5386
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
5384
5387
  finally {
5385
5388
  try {
5386
- if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
5389
+ if (rows_1_1 && !rows_1_1.done && (_b = rows_1.return)) _b.call(rows_1);
5387
5390
  }
5388
5391
  finally { if (e_1) throw e_1.error; }
5389
5392
  }
@@ -5613,10 +5616,10 @@
5613
5616
  return this.getTitle(this.inp);
5614
5617
  };
5615
5618
  FormSelectComponent.prototype.getTitle = function (os) {
5616
- var e_2, _a;
5619
+ var e_2, _b;
5617
5620
  try {
5618
- for (var _b = __values(os.options), _c = _b.next(); !_c.done; _c = _b.next()) {
5619
- var s = _c.value;
5621
+ for (var _c = __values(os.options), _d = _c.next(); !_d.done; _d = _c.next()) {
5622
+ var s = _d.value;
5620
5623
  if (s.value === this.inp.value.toString()) {
5621
5624
  return this.inp.l(s.name);
5622
5625
  }
@@ -5629,14 +5632,14 @@
5629
5632
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
5630
5633
  finally {
5631
5634
  try {
5632
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
5635
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
5633
5636
  }
5634
5637
  finally { if (e_2) throw e_2.error; }
5635
5638
  }
5636
5639
  return null;
5637
5640
  };
5638
5641
  FormSelectComponent.prototype.getValue = function (v, o) {
5639
- var e_3, _a;
5642
+ var e_3, _b;
5640
5643
  if (o === void 0) { o = this.inp.options; }
5641
5644
  var h = o.find(function (x) { return x.value === v; });
5642
5645
  if (h) {
@@ -5654,13 +5657,13 @@
5654
5657
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
5655
5658
  finally {
5656
5659
  try {
5657
- if (o_1_1 && !o_1_1.done && (_a = o_1.return)) _a.call(o_1);
5660
+ if (o_1_1 && !o_1_1.done && (_b = o_1.return)) _b.call(o_1);
5658
5661
  }
5659
5662
  finally { if (e_3) throw e_3.error; }
5660
5663
  }
5661
5664
  };
5662
5665
  FormSelectComponent.prototype.getSelected = function (opts) {
5663
- var e_4, _a;
5666
+ var e_4, _b;
5664
5667
  if (opts === void 0) { opts = this.inp.options; }
5665
5668
  var l = [];
5666
5669
  try {
@@ -5676,7 +5679,7 @@
5676
5679
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
5677
5680
  finally {
5678
5681
  try {
5679
- if (opts_1_1 && !opts_1_1.done && (_a = opts_1.return)) _a.call(opts_1);
5682
+ if (opts_1_1 && !opts_1_1.done && (_b = opts_1.return)) _b.call(opts_1);
5680
5683
  }
5681
5684
  finally { if (e_4) throw e_4.error; }
5682
5685
  }