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.
@@ -1948,7 +1948,7 @@ class InputClass {
1948
1948
  if (!u.includes('{}')) {
1949
1949
  this.loading = true;
1950
1950
  this.request = new RequestClass(this.environment, this.l).send(u ? u : this.url, Method.Post, null, null, (result) => {
1951
- if (this.type === InputType.SelectSearch || this.type === InputType.Select || this.type === InputType.SelectAutoComplete ||
1951
+ if (this.type === InputType.SelectSearchRadio || this.type === InputType.SelectSearch || this.type === InputType.Select || this.type === InputType.SelectAutoComplete ||
1952
1952
  this.type === InputType.SelectAutoCompletePlaque || this.type === InputType.SelectAutoCompletePlaqueM ||
1953
1953
  this.type === InputType.SelectAutoCompletePlaqueF || this.type === InputType.SelectAutoCompletePlaqueG || this.type === InputType.Radio) {
1954
1954
  const r = this.getOptions(result, null);
@@ -1980,7 +1980,7 @@ class InputClass {
1980
1980
  EnumUtils.getKeysAndValues(u).forEach((k) => {
1981
1981
  result.push({ Name: this.l(k.key), Id: k.value.toString() });
1982
1982
  });
1983
- if (this.type === InputType.SelectSearch || this.type === InputType.Select || this.type === InputType.SelectAutoComplete ||
1983
+ if (this.type === InputType.SelectSearchRadio || this.type === InputType.SelectSearch || this.type === InputType.Select || this.type === InputType.SelectAutoComplete ||
1984
1984
  this.type === InputType.SelectAutoCompletePlaque || this.type === InputType.SelectAutoCompletePlaqueM ||
1985
1985
  this.type === InputType.SelectAutoCompletePlaqueF || this.type === InputType.SelectAutoCompletePlaqueG ||
1986
1986
  this.type === InputType.Radio || this.type === InputType.Slide) {
@@ -5335,9 +5335,16 @@ class FormSelectComponent {
5335
5335
  }
5336
5336
  }
5337
5337
  selectOption(v, isEdit = false) {
5338
- this.inp.error = null;
5339
5338
  const va = this.getValue(v);
5340
- if (this.inp.multiple) {
5339
+ if (this.inp.type === InputType.SelectSearchRadio && va.options.length !== 0) {
5340
+ return;
5341
+ }
5342
+ this.inp.error = null;
5343
+ if (this.inp.type === InputType.SelectSearchRadio) {
5344
+ this.toggleRadio(va);
5345
+ this.inp.search = '';
5346
+ }
5347
+ else if (this.inp.multiple) {
5341
5348
  this.toggle(va);
5342
5349
  this.inp.search = '';
5343
5350
  }
@@ -5373,6 +5380,17 @@ class FormSelectComponent {
5373
5380
  this.cI('Tab');
5374
5381
  }
5375
5382
  }
5383
+ toggleRadio(op) {
5384
+ if (op.selected) {
5385
+ this.inp.value = null;
5386
+ op.selected = false;
5387
+ }
5388
+ else {
5389
+ this.inp.value = op.value;
5390
+ this.inp.options.filter(x => x.parent.value === op.parent.value).forEach(x => x.selected = false);
5391
+ op.selected = true;
5392
+ }
5393
+ }
5376
5394
  toggle(op) {
5377
5395
  if (op.selected) {
5378
5396
  this.inp.value = null;