ps-toolkit-ui 1.9.46 → 1.9.48

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.
@@ -2530,18 +2530,18 @@ class ModalClass {
2530
2530
  hide() {
2531
2531
  $$1('body').removeClass('open-modal');
2532
2532
  $$1('#' + this.id + 'Modal').fadeOut(300, () => {
2533
- if (this.form && this.form.name !== 'Confirm' && this.form.name !== 'Alert') {
2534
- this.form.clear();
2535
- if (this.form.onHideModal) {
2536
- this.form.onHideModal();
2537
- }
2538
- }
2539
- if (this.table && this.table.form) {
2540
- this.table.form.clear();
2541
- }
2542
- if (this.onHide) {
2543
- this.onHide();
2544
- }
2533
+ // if (this.form && this.form.name !== 'Confirm' && this.form.name !== 'Alert'){
2534
+ // this.form.clear();
2535
+ // if (this.form.onHideModal){
2536
+ // this.form.onHideModal();
2537
+ // }
2538
+ // }
2539
+ // if (this.table && this.table.form){
2540
+ // this.table.form.clear();
2541
+ // }
2542
+ // if (this.onHide){
2543
+ // this.onHide();
2544
+ // }
2545
2545
  });
2546
2546
  }
2547
2547
  }
@@ -4252,6 +4252,7 @@ class FormPlaqueComponent {
4252
4252
  this.part3.focus(true);
4253
4253
  }
4254
4254
  else if (v.length === 0) {
4255
+ this.part1.focus(true);
4255
4256
  }
4256
4257
  };
4257
4258
  this.part3.onChange = (v) => {
@@ -4266,6 +4267,7 @@ class FormPlaqueComponent {
4266
4267
  this.changeIndex.emit('Tab');
4267
4268
  }
4268
4269
  else if (v.length === 0 && this.inp.type === InputType.PlaqueM) {
4270
+ this.part1.focus(true);
4269
4271
  }
4270
4272
  };
4271
4273
  this.part4.onChange = (v) => {
@@ -4280,6 +4282,13 @@ class FormPlaqueComponent {
4280
4282
  this.inp.setValue = (v) => {
4281
4283
  const parts = v.split('_');
4282
4284
  if (this.inp.type === InputType.Plaque) {
4285
+ setTimeout(() => {
4286
+ this.inp.value = v;
4287
+ this.part1.value = parts[0];
4288
+ this.part2.value = parts[1];
4289
+ this.part3.value = parts[2];
4290
+ this.part4.value = parts[3];
4291
+ }, 100);
4283
4292
  }
4284
4293
  else if (this.inp.type === InputType.PlaqueM || this.inp.type === InputType.PlaqueF) {
4285
4294
  setTimeout(() => {
@@ -4348,6 +4357,7 @@ class FormPlaqueComponent {
4348
4357
  this.part3.focus(true);
4349
4358
  }
4350
4359
  else if (a === 'ShiftTab' || a === 'ShiftEnter') {
4360
+ this.part1.focus(true);
4351
4361
  }
4352
4362
  }
4353
4363
  else if (p === 'Part3') {
@@ -4381,6 +4391,7 @@ class FormPlaqueComponent {
4381
4391
  this.changeIndex.emit('Tab');
4382
4392
  }
4383
4393
  else if (a === 'ShiftTab' || a === 'ShiftEnter') {
4394
+ this.part1.focus(true);
4384
4395
  }
4385
4396
  }
4386
4397
  }
@@ -4397,6 +4408,7 @@ class FormPlaqueComponent {
4397
4408
  }
4398
4409
  onFocusIn(e = null) {
4399
4410
  if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
4411
+ this.part1.focus(true);
4400
4412
  }
4401
4413
  }
4402
4414
  onKeyDown(e) {
@@ -5239,13 +5251,14 @@ class FormTextboxComponent {
5239
5251
  }
5240
5252
  }
5241
5253
  onFocusIn(changeIndex = false) {
5242
- // setTimeout(() => {
5243
- // if (changeIndex){
5244
- // this.inputBase.nativeElement.select();
5245
- // }else{
5246
- // this.inputBase.nativeElement.focus();
5247
- // }
5248
- // });
5254
+ setTimeout(() => {
5255
+ if (changeIndex) {
5256
+ this.inputBase.nativeElement.select();
5257
+ }
5258
+ else {
5259
+ this.inputBase.nativeElement.focus();
5260
+ }
5261
+ });
5249
5262
  }
5250
5263
  onFocusOut(e) {
5251
5264
  if (this.inp.onFocusOut !== null) {
@@ -6106,9 +6119,22 @@ class FormVehicleSearchComponent {
6106
6119
  }
6107
6120
  this.car.url = this.motor.url = this.carF.url = this.carG.url = this.driver.url = this.inp.url.replace('_{}', '_' + this.type);
6108
6121
  if (!isEdit) {
6122
+ this.onFocusIn();
6109
6123
  }
6110
6124
  }
6111
6125
  onFocusIn() {
6126
+ if (this.type === VehicleType.Car || this.type === VehicleType.Motorcycle || this.type === VehicleType.CarF || this.type === VehicleType.CarG) {
6127
+ setTimeout(() => {
6128
+ $('#' + this.inp.id + 'VehicleSearchInput' + ' .plaque-inp').click();
6129
+ $('#' + this.inp.id + 'VehicleSearchInput' + ' #Part1TextInput .control').focus();
6130
+ }, 100);
6131
+ }
6132
+ else if (this.type === VehicleType.Driver) {
6133
+ this.driver.focus();
6134
+ }
6135
+ else if (this.type === VehicleType.Fingerprint) {
6136
+ this.fingerprint.focus();
6137
+ }
6112
6138
  }
6113
6139
  }
6114
6140
  FormVehicleSearchComponent.decorators = [