ps-toolkit-ui 1.22.20 → 1.22.21

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.
@@ -2758,7 +2758,7 @@
2758
2758
  }
2759
2759
  finally { if (e_8) throw e_8.error; }
2760
2760
  }
2761
- return l;
2761
+ return l.sort(function (a, b) { return a.priority - b.priority; });
2762
2762
  };
2763
2763
  InputClass.prototype.getSelectedRows = function (rows) {
2764
2764
  var e_9, _c;
@@ -2815,6 +2815,7 @@
2815
2815
  if (dis === void 0) { dis = false; }
2816
2816
  this.show = true;
2817
2817
  this.selected = false;
2818
+ this.priority = 0;
2818
2819
  this.parent = null;
2819
2820
  this.loading = false;
2820
2821
  this.disabled = false;
@@ -6906,6 +6907,7 @@
6906
6907
  function FormSelectComponent() {
6907
6908
  this.changeIndex = new core.EventEmitter();
6908
6909
  this.cSearch = '';
6910
+ this.priority = 0;
6909
6911
  }
6910
6912
  Object.defineProperty(FormSelectComponent.prototype, "type", {
6911
6913
  get: function () { return exports.InputType; },
@@ -6978,7 +6980,6 @@
6978
6980
  d[_this.inp.name + 'Name'] = _this.inp.search;
6979
6981
  if (_this.inp.addNew) {
6980
6982
  d[_this.inp.name] = _this.inp.search;
6981
- d[_this.inp.name + 'Name'] = _this.inp.search;
6982
6983
  d[_this.inp.name + 'Id'] = _this.inp.value;
6983
6984
  }
6984
6985
  return d;
@@ -7194,6 +7195,7 @@
7194
7195
  this.inp.value = op.value;
7195
7196
  this.inp.options.find(function (x) { return x.value === op.parent.value; }).options.forEach(function (x) { return x.selected = false; });
7196
7197
  op.selected = true;
7198
+ op.priority = this.priority++;
7197
7199
  }
7198
7200
  };
7199
7201
  FormSelectComponent.prototype.toggle = function (op) {
@@ -7214,6 +7216,7 @@
7214
7216
  };
7215
7217
  FormSelectComponent.prototype.check = function (c) {
7216
7218
  c.selected = true;
7219
+ c.priority = this.priority++;
7217
7220
  if (this.inp.onlyChild) {
7218
7221
  this.checkChildren(c);
7219
7222
  }
@@ -7240,6 +7243,7 @@
7240
7243
  }
7241
7244
  else {
7242
7245
  p.selected = true;
7246
+ p.priority = this.priority++;
7243
7247
  }
7244
7248
  this.checkParent(p.parent);
7245
7249
  }