ps-toolkit-ui 1.20.67 → 1.20.70

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.
@@ -2603,7 +2603,7 @@
2603
2603
  if (!u.includes('{}')) {
2604
2604
  this.loading = true;
2605
2605
  this.request = new RequestClass(this.environment, this.l).send(u ? u : this.url, exports.Method.Post, null, null, function (result) {
2606
- if (_this.type === exports.InputType.SelectSearch || _this.type === exports.InputType.Select || _this.type === exports.InputType.SelectAutoComplete ||
2606
+ if (_this.type === exports.InputType.SelectSearchRadio || _this.type === exports.InputType.SelectSearch || _this.type === exports.InputType.Select || _this.type === exports.InputType.SelectAutoComplete ||
2607
2607
  _this.type === exports.InputType.SelectAutoCompletePlaque || _this.type === exports.InputType.SelectAutoCompletePlaqueM ||
2608
2608
  _this.type === exports.InputType.SelectAutoCompletePlaqueF || _this.type === exports.InputType.SelectAutoCompletePlaqueG || _this.type === exports.InputType.Radio) {
2609
2609
  var r = _this.getOptions(result, null);
@@ -2635,7 +2635,7 @@
2635
2635
  EnumUtils.getKeysAndValues(u).forEach(function (k) {
2636
2636
  result_1.push({ Name: _this.l(k.key), Id: k.value.toString() });
2637
2637
  });
2638
- if (this.type === exports.InputType.SelectSearch || this.type === exports.InputType.Select || this.type === exports.InputType.SelectAutoComplete ||
2638
+ if (this.type === exports.InputType.SelectSearchRadio || this.type === exports.InputType.SelectSearch || this.type === exports.InputType.Select || this.type === exports.InputType.SelectAutoComplete ||
2639
2639
  this.type === exports.InputType.SelectAutoCompletePlaque || this.type === exports.InputType.SelectAutoCompletePlaqueM ||
2640
2640
  this.type === exports.InputType.SelectAutoCompletePlaqueF || this.type === exports.InputType.SelectAutoCompletePlaqueG ||
2641
2641
  this.type === exports.InputType.Radio || this.type === exports.InputType.Slide) {
@@ -6317,9 +6317,16 @@
6317
6317
  };
6318
6318
  FormSelectComponent.prototype.selectOption = function (v, isEdit) {
6319
6319
  if (isEdit === void 0) { isEdit = false; }
6320
- this.inp.error = null;
6321
6320
  var va = this.getValue(v);
6322
- if (this.inp.multiple) {
6321
+ if (this.inp.type === exports.InputType.SelectSearchRadio && va.options.length !== 0) {
6322
+ return;
6323
+ }
6324
+ this.inp.error = null;
6325
+ if (this.inp.type === exports.InputType.SelectSearchRadio) {
6326
+ this.toggleRadio(va);
6327
+ this.inp.search = '';
6328
+ }
6329
+ else if (this.inp.multiple) {
6323
6330
  this.toggle(va);
6324
6331
  this.inp.search = '';
6325
6332
  }
@@ -6355,6 +6362,17 @@
6355
6362
  this.cI('Tab');
6356
6363
  }
6357
6364
  };
6365
+ FormSelectComponent.prototype.toggleRadio = function (op) {
6366
+ if (op.selected) {
6367
+ this.inp.value = null;
6368
+ op.selected = false;
6369
+ }
6370
+ else {
6371
+ this.inp.value = op.value;
6372
+ this.inp.options.filter(function (x) { return x.parent.value === op.parent.value; }).forEach(function (x) { return x.selected = false; });
6373
+ op.selected = true;
6374
+ }
6375
+ };
6358
6376
  FormSelectComponent.prototype.toggle = function (op) {
6359
6377
  if (op.selected) {
6360
6378
  this.inp.value = null;