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.
- package/bundles/ps-toolkit-ui.umd.js +22 -4
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/form.class.js +3 -3
- package/esm2015/lib/components/form/select/form.select.component.js +21 -3
- package/fesm2015/ps-toolkit-ui.js +22 -4
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/select/form.select.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -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.
|
|
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;
|