ps-toolkit-ui 1.8.74 → 1.8.76

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.
@@ -277,7 +277,6 @@
277
277
  DbUpdateException: 'امکان حذف رکورد مورد نظر به دلیل استفاده شدن در سامانه وجود ندارد',
278
278
  UserMaxSessionCount: 'تعداد لاگین انجام شده بیش از سقف مجاز است.',
279
279
  UserInvalidIp: 'آی‌پی شما نامعتبر است.',
280
- UserWithoutStore: 'انباری برای این نام کاربری ثبت نشده است.',
281
280
  // tslint:disable-next-line
282
281
  LoadingDot: '<span class="dot-spinner black"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></span>',
283
282
  LoadingDotWhite: '<span class="dot-spinner white"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></span>',
@@ -5292,18 +5291,20 @@
5292
5291
  _this.selectOption(v == null ? null : v.toString(), isEdit);
5293
5292
  }
5294
5293
  else {
5295
- try {
5296
- for (var v_1 = __values(v), v_1_1 = v_1.next(); !v_1_1.done; v_1_1 = v_1.next()) {
5297
- var t = v_1_1.value;
5298
- _this.selectOption(t.toString(), isEdit);
5299
- }
5300
- }
5301
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
5302
- finally {
5294
+ if (v != null) {
5303
5295
  try {
5304
- if (v_1_1 && !v_1_1.done && (_a = v_1.return)) _a.call(v_1);
5296
+ for (var v_1 = __values(v), v_1_1 = v_1.next(); !v_1_1.done; v_1_1 = v_1.next()) {
5297
+ var t = v_1_1.value;
5298
+ _this.selectOption(t.toString(), isEdit);
5299
+ }
5300
+ }
5301
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
5302
+ finally {
5303
+ try {
5304
+ if (v_1_1 && !v_1_1.done && (_a = v_1.return)) _a.call(v_1);
5305
+ }
5306
+ finally { if (e_1) throw e_1.error; }
5305
5307
  }
5306
- finally { if (e_1) throw e_1.error; }
5307
5308
  }
5308
5309
  }
5309
5310
  };
@@ -5502,26 +5503,33 @@
5502
5503
  }
5503
5504
  };
5504
5505
  FormSelectComponent.prototype.toggle = function (op) {
5505
- var _this = this;
5506
5506
  if (op.selected) {
5507
5507
  this.unCheck(op);
5508
- setTimeout(function () { _this.unCheckParent(op.parent); }, 100);
5508
+ if (this.inp.onlyChild) {
5509
+ this.unCheckParent(op.parent);
5510
+ }
5509
5511
  }
5510
5512
  else {
5511
5513
  this.check(op);
5512
- setTimeout(function () { _this.checkParent(op.parent); }, 100);
5514
+ if (this.inp.onlyChild && this.inp.type === exports.InputType.Tree) {
5515
+ this.checkParent(op.parent);
5516
+ }
5513
5517
  }
5514
5518
  };
5515
5519
  FormSelectComponent.prototype.check = function (c) {
5516
5520
  c.selected = true;
5517
- this.checkChildren(c);
5521
+ if (this.inp.onlyChild) {
5522
+ this.checkChildren(c);
5523
+ }
5518
5524
  };
5519
5525
  FormSelectComponent.prototype.unCheck = function (c) {
5520
5526
  var _this = this;
5521
5527
  c.selected = false;
5522
- c.options.forEach(function (ch) {
5523
- _this.unCheck(ch);
5524
- });
5528
+ if (this.inp.onlyChild) {
5529
+ c.options.forEach(function (ch) {
5530
+ _this.unCheck(ch);
5531
+ });
5532
+ }
5525
5533
  };
5526
5534
  FormSelectComponent.prototype.checkChildren = function (o) {
5527
5535
  var _this = this;
@@ -5623,7 +5631,7 @@
5623
5631
  try {
5624
5632
  for (var opts_1 = __values(opts), opts_1_1 = opts_1.next(); !opts_1_1.done; opts_1_1 = opts_1.next()) {
5625
5633
  var f = opts_1_1.value;
5626
- if (f.selected) {
5634
+ if (f.selected && (!this.inp.onlyChild || f.options.length === 0)) {
5627
5635
  l.push(f.value);
5628
5636
  }
5629
5637
  var rs = this.getSelected(f.options);