ps-toolkit-ui 1.6.83 → 1.6.84
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 +39 -55
- 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/components/form/plaque/form.plaque.component.js +9 -30
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +32 -27
- package/fesm2015/ps-toolkit-ui.js +39 -55
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -3759,32 +3759,44 @@ class FormPlaqueSelectComponent {
|
|
|
3759
3759
|
this.inp.error = null;
|
|
3760
3760
|
this.inp.value = null;
|
|
3761
3761
|
if (v.length === 2 && this.inp.type === InputType.SelectAutoCompletePlaque) {
|
|
3762
|
-
this.part2.focus();
|
|
3762
|
+
this.part2.focus(true);
|
|
3763
3763
|
this.loadOptions();
|
|
3764
3764
|
}
|
|
3765
3765
|
else if (v.length === 3 && this.inp.type === InputType.SelectAutoCompletePlaqueM) {
|
|
3766
|
-
this.part3.focus();
|
|
3766
|
+
this.part3.focus(true);
|
|
3767
3767
|
this.loadOptions();
|
|
3768
3768
|
}
|
|
3769
3769
|
};
|
|
3770
|
-
this.part2.onChange = () => {
|
|
3770
|
+
this.part2.onChange = (v) => {
|
|
3771
3771
|
this.inp.error = null;
|
|
3772
3772
|
this.inp.value = null;
|
|
3773
|
-
|
|
3774
|
-
this.part3.focus();
|
|
3773
|
+
if (v.length === 1) {
|
|
3774
|
+
this.part3.focus(true);
|
|
3775
3775
|
this.loadOptions();
|
|
3776
|
-
}
|
|
3776
|
+
}
|
|
3777
|
+
else if (v.length === 0) {
|
|
3778
|
+
this.part1.focus(true);
|
|
3779
|
+
this.loadOptions();
|
|
3780
|
+
}
|
|
3777
3781
|
};
|
|
3778
3782
|
this.part3.onChange = (v) => {
|
|
3779
3783
|
this.inp.error = null;
|
|
3780
3784
|
this.inp.value = null;
|
|
3781
3785
|
if (v.length === 3 && this.inp.type === InputType.SelectAutoCompletePlaque) {
|
|
3782
|
-
this.part4.focus();
|
|
3786
|
+
this.part4.focus(true);
|
|
3787
|
+
this.loadOptions();
|
|
3788
|
+
}
|
|
3789
|
+
else if (v.length === 0 && this.inp.type === InputType.SelectAutoCompletePlaque) {
|
|
3790
|
+
this.part2.focus(true);
|
|
3783
3791
|
this.loadOptions();
|
|
3784
3792
|
}
|
|
3785
3793
|
else if (v.length === 5 && this.inp.type === InputType.SelectAutoCompletePlaqueM) {
|
|
3786
3794
|
this.loadOptions();
|
|
3787
3795
|
}
|
|
3796
|
+
else if (v.length === 0 && this.inp.type === InputType.SelectAutoCompletePlaqueM) {
|
|
3797
|
+
this.part1.focus(true);
|
|
3798
|
+
this.loadOptions();
|
|
3799
|
+
}
|
|
3788
3800
|
};
|
|
3789
3801
|
this.part4.onChange = (v) => {
|
|
3790
3802
|
this.inp.error = null;
|
|
@@ -3792,6 +3804,9 @@ class FormPlaqueSelectComponent {
|
|
|
3792
3804
|
if (v.length === 2) {
|
|
3793
3805
|
this.loadOptions();
|
|
3794
3806
|
}
|
|
3807
|
+
else if (v.length === 0) {
|
|
3808
|
+
this.part3.focus(true);
|
|
3809
|
+
}
|
|
3795
3810
|
};
|
|
3796
3811
|
this.part1.onKeyDown = this.part2.onKeyDown = this.part3.onKeyDown = this.part4.onKeyDown = (e) => {
|
|
3797
3812
|
const code = e.keyCode || e.which;
|
|
@@ -3846,7 +3861,7 @@ class FormPlaqueSelectComponent {
|
|
|
3846
3861
|
}
|
|
3847
3862
|
focusInput(f = false) {
|
|
3848
3863
|
if (f) {
|
|
3849
|
-
this.part1.focus();
|
|
3864
|
+
this.part1.focus(true);
|
|
3850
3865
|
}
|
|
3851
3866
|
}
|
|
3852
3867
|
closeOptions() {
|
|
@@ -4014,12 +4029,7 @@ class FormPlaqueSelectComponent {
|
|
|
4014
4029
|
if (this.inp.type === InputType.SelectAutoCompletePlaque) {
|
|
4015
4030
|
if (p === 'Part1') {
|
|
4016
4031
|
if (a === 'Tab' || a === 'Enter') {
|
|
4017
|
-
|
|
4018
|
-
this.part3.focus();
|
|
4019
|
-
}
|
|
4020
|
-
else {
|
|
4021
|
-
this.part2.focus();
|
|
4022
|
-
}
|
|
4032
|
+
this.part2.focus(true);
|
|
4023
4033
|
}
|
|
4024
4034
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4025
4035
|
this.changeIndex.emit('ShiftTab');
|
|
@@ -4027,23 +4037,18 @@ class FormPlaqueSelectComponent {
|
|
|
4027
4037
|
}
|
|
4028
4038
|
else if (p === 'Part2') {
|
|
4029
4039
|
if (a === 'Tab' || a === 'Enter') {
|
|
4030
|
-
this.part3.focus();
|
|
4040
|
+
this.part3.focus(true);
|
|
4031
4041
|
}
|
|
4032
4042
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4033
|
-
this.part1.focus();
|
|
4043
|
+
this.part1.focus(true);
|
|
4034
4044
|
}
|
|
4035
4045
|
}
|
|
4036
4046
|
else if (p === 'Part3') {
|
|
4037
4047
|
if (a === 'Tab' || a === 'Enter') {
|
|
4038
|
-
this.part4.focus();
|
|
4048
|
+
this.part4.focus(true);
|
|
4039
4049
|
}
|
|
4040
4050
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4041
|
-
|
|
4042
|
-
this.part1.focus();
|
|
4043
|
-
}
|
|
4044
|
-
else {
|
|
4045
|
-
this.part2.focus();
|
|
4046
|
-
}
|
|
4051
|
+
this.part2.focus(true);
|
|
4047
4052
|
}
|
|
4048
4053
|
}
|
|
4049
4054
|
else if (p === 'Part4') {
|
|
@@ -4051,14 +4056,14 @@ class FormPlaqueSelectComponent {
|
|
|
4051
4056
|
this.changeIndex.emit('Tab');
|
|
4052
4057
|
}
|
|
4053
4058
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4054
|
-
this.part3.focus();
|
|
4059
|
+
this.part3.focus(true);
|
|
4055
4060
|
}
|
|
4056
4061
|
}
|
|
4057
4062
|
}
|
|
4058
4063
|
else if (this.inp.type === InputType.SelectAutoCompletePlaqueM || this.inp.type === InputType.SelectAutoCompletePlaqueF) {
|
|
4059
4064
|
if (p === 'Part1') {
|
|
4060
4065
|
if (a === 'Tab' || a === 'Enter') {
|
|
4061
|
-
this.part3.focus();
|
|
4066
|
+
this.part3.focus(true);
|
|
4062
4067
|
if (this.inp.type === InputType.SelectAutoCompletePlaqueF) {
|
|
4063
4068
|
this.loadOptions();
|
|
4064
4069
|
}
|
|
@@ -4072,7 +4077,7 @@ class FormPlaqueSelectComponent {
|
|
|
4072
4077
|
this.changeIndex.emit('Tab');
|
|
4073
4078
|
}
|
|
4074
4079
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4075
|
-
this.part1.focus();
|
|
4080
|
+
this.part1.focus(true);
|
|
4076
4081
|
if (this.inp.type === InputType.SelectAutoCompletePlaqueF) {
|
|
4077
4082
|
this.loadOptions();
|
|
4078
4083
|
}
|
|
@@ -4164,12 +4169,7 @@ class FormPlaqueComponent {
|
|
|
4164
4169
|
this.part1.onChange = (v) => {
|
|
4165
4170
|
this.inp.error = null;
|
|
4166
4171
|
if (v.length === 2 && this.inp.type === InputType.Plaque) {
|
|
4167
|
-
|
|
4168
|
-
this.part3.focus(true);
|
|
4169
|
-
}
|
|
4170
|
-
else {
|
|
4171
|
-
this.part2.focus(true);
|
|
4172
|
-
}
|
|
4172
|
+
this.part2.focus(true);
|
|
4173
4173
|
}
|
|
4174
4174
|
else if (v.length === 3 && this.inp.type === InputType.PlaqueM) {
|
|
4175
4175
|
this.part3.focus(true);
|
|
@@ -4178,14 +4178,10 @@ class FormPlaqueComponent {
|
|
|
4178
4178
|
this.part2.onChange = (v) => {
|
|
4179
4179
|
this.inp.error = null;
|
|
4180
4180
|
if (v.length === 1) {
|
|
4181
|
-
|
|
4182
|
-
this.part3.focus(true);
|
|
4183
|
-
}, 100);
|
|
4181
|
+
this.part3.focus(true);
|
|
4184
4182
|
}
|
|
4185
4183
|
else if (v.length === 0) {
|
|
4186
|
-
|
|
4187
|
-
this.part1.focus(true);
|
|
4188
|
-
}, 100);
|
|
4184
|
+
this.part1.focus(true);
|
|
4189
4185
|
}
|
|
4190
4186
|
};
|
|
4191
4187
|
this.part3.onChange = (v) => {
|
|
@@ -4193,7 +4189,7 @@ class FormPlaqueComponent {
|
|
|
4193
4189
|
if (v.length === 3 && this.inp.type === InputType.Plaque) {
|
|
4194
4190
|
this.part4.focus(true);
|
|
4195
4191
|
}
|
|
4196
|
-
if (v.length === 0 && this.inp.type === InputType.Plaque) {
|
|
4192
|
+
else if (v.length === 0 && this.inp.type === InputType.Plaque) {
|
|
4197
4193
|
this.part2.focus(true);
|
|
4198
4194
|
}
|
|
4199
4195
|
else if (v.length === 5 && this.inp.type === InputType.PlaqueM) {
|
|
@@ -4208,10 +4204,8 @@ class FormPlaqueComponent {
|
|
|
4208
4204
|
if (v.length === 2) {
|
|
4209
4205
|
this.changeIndex.emit('Tab');
|
|
4210
4206
|
}
|
|
4211
|
-
else {
|
|
4212
|
-
|
|
4213
|
-
this.part3.focus(true);
|
|
4214
|
-
}
|
|
4207
|
+
else if (v.length === 0) {
|
|
4208
|
+
this.part3.focus(true);
|
|
4215
4209
|
}
|
|
4216
4210
|
};
|
|
4217
4211
|
this.inp.setValue = (v) => {
|
|
@@ -4281,12 +4275,7 @@ class FormPlaqueComponent {
|
|
|
4281
4275
|
if (this.inp.type === InputType.Plaque) {
|
|
4282
4276
|
if (p === 'Part1') {
|
|
4283
4277
|
if (a === 'Tab' || a === 'Enter') {
|
|
4284
|
-
|
|
4285
|
-
this.part3.focus(true);
|
|
4286
|
-
}
|
|
4287
|
-
else {
|
|
4288
|
-
this.part2.focus(true);
|
|
4289
|
-
}
|
|
4278
|
+
this.part2.focus(true);
|
|
4290
4279
|
}
|
|
4291
4280
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4292
4281
|
this.changeIndex.emit('ShiftTab');
|
|
@@ -4305,12 +4294,7 @@ class FormPlaqueComponent {
|
|
|
4305
4294
|
this.part4.focus(true);
|
|
4306
4295
|
}
|
|
4307
4296
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4308
|
-
|
|
4309
|
-
this.part1.focus(true);
|
|
4310
|
-
}
|
|
4311
|
-
else {
|
|
4312
|
-
this.part2.focus(true);
|
|
4313
|
-
}
|
|
4297
|
+
this.part2.focus(true);
|
|
4314
4298
|
}
|
|
4315
4299
|
}
|
|
4316
4300
|
else if (p === 'Part4') {
|