ps-toolkit-ui 1.6.82 → 1.6.85
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 +48 -62
- 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 +16 -37
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +34 -27
- package/fesm2015/ps-toolkit-ui.js +48 -62
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -4464,32 +4464,44 @@
|
|
|
4464
4464
|
_this.inp.error = null;
|
|
4465
4465
|
_this.inp.value = null;
|
|
4466
4466
|
if (v.length === 2 && _this.inp.type === exports.InputType.SelectAutoCompletePlaque) {
|
|
4467
|
-
_this.part2.focus();
|
|
4467
|
+
_this.part2.focus(true);
|
|
4468
4468
|
_this.loadOptions();
|
|
4469
4469
|
}
|
|
4470
4470
|
else if (v.length === 3 && _this.inp.type === exports.InputType.SelectAutoCompletePlaqueM) {
|
|
4471
|
-
_this.part3.focus();
|
|
4471
|
+
_this.part3.focus(true);
|
|
4472
4472
|
_this.loadOptions();
|
|
4473
4473
|
}
|
|
4474
4474
|
};
|
|
4475
|
-
this.part2.onChange = function () {
|
|
4475
|
+
this.part2.onChange = function (v) {
|
|
4476
4476
|
_this.inp.error = null;
|
|
4477
4477
|
_this.inp.value = null;
|
|
4478
|
-
|
|
4479
|
-
_this.part3.focus();
|
|
4478
|
+
if (v.length === 1) {
|
|
4479
|
+
_this.part3.focus(true);
|
|
4480
4480
|
_this.loadOptions();
|
|
4481
|
-
}
|
|
4481
|
+
}
|
|
4482
|
+
else if (v.length === 0) {
|
|
4483
|
+
_this.part1.focus(true);
|
|
4484
|
+
_this.loadOptions();
|
|
4485
|
+
}
|
|
4482
4486
|
};
|
|
4483
4487
|
this.part3.onChange = function (v) {
|
|
4484
4488
|
_this.inp.error = null;
|
|
4485
4489
|
_this.inp.value = null;
|
|
4486
4490
|
if (v.length === 3 && _this.inp.type === exports.InputType.SelectAutoCompletePlaque) {
|
|
4487
|
-
_this.part4.focus();
|
|
4491
|
+
_this.part4.focus(true);
|
|
4492
|
+
_this.loadOptions();
|
|
4493
|
+
}
|
|
4494
|
+
else if (v.length === 0 && _this.inp.type === exports.InputType.SelectAutoCompletePlaque) {
|
|
4495
|
+
_this.part2.focus(true);
|
|
4488
4496
|
_this.loadOptions();
|
|
4489
4497
|
}
|
|
4490
4498
|
else if (v.length === 5 && _this.inp.type === exports.InputType.SelectAutoCompletePlaqueM) {
|
|
4491
4499
|
_this.loadOptions();
|
|
4492
4500
|
}
|
|
4501
|
+
else if (v.length === 0 && _this.inp.type === exports.InputType.SelectAutoCompletePlaqueM) {
|
|
4502
|
+
_this.part1.focus(true);
|
|
4503
|
+
_this.loadOptions();
|
|
4504
|
+
}
|
|
4493
4505
|
};
|
|
4494
4506
|
this.part4.onChange = function (v) {
|
|
4495
4507
|
_this.inp.error = null;
|
|
@@ -4497,6 +4509,9 @@
|
|
|
4497
4509
|
if (v.length === 2) {
|
|
4498
4510
|
_this.loadOptions();
|
|
4499
4511
|
}
|
|
4512
|
+
else if (v.length === 0) {
|
|
4513
|
+
_this.part3.focus(true);
|
|
4514
|
+
}
|
|
4500
4515
|
};
|
|
4501
4516
|
this.part1.onKeyDown = this.part2.onKeyDown = this.part3.onKeyDown = this.part4.onKeyDown = function (e) {
|
|
4502
4517
|
var code = e.keyCode || e.which;
|
|
@@ -4505,6 +4520,8 @@
|
|
|
4505
4520
|
}
|
|
4506
4521
|
};
|
|
4507
4522
|
this.part1.onFocusOut = function (e) {
|
|
4523
|
+
console.log($__namespace(e.relatedTarget));
|
|
4524
|
+
console.log($__namespace(e.rangeParent));
|
|
4508
4525
|
if (!$__namespace(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$__namespace(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
4509
4526
|
if (_this.open) {
|
|
4510
4527
|
_this.closeOptions();
|
|
@@ -4553,7 +4570,7 @@
|
|
|
4553
4570
|
FormPlaqueSelectComponent.prototype.focusInput = function (f) {
|
|
4554
4571
|
if (f === void 0) { f = false; }
|
|
4555
4572
|
if (f) {
|
|
4556
|
-
this.part1.focus();
|
|
4573
|
+
this.part1.focus(true);
|
|
4557
4574
|
}
|
|
4558
4575
|
};
|
|
4559
4576
|
FormPlaqueSelectComponent.prototype.closeOptions = function () {
|
|
@@ -4764,12 +4781,7 @@
|
|
|
4764
4781
|
if (this.inp.type === exports.InputType.SelectAutoCompletePlaque) {
|
|
4765
4782
|
if (p === 'Part1') {
|
|
4766
4783
|
if (a === 'Tab' || a === 'Enter') {
|
|
4767
|
-
|
|
4768
|
-
this.part3.focus();
|
|
4769
|
-
}
|
|
4770
|
-
else {
|
|
4771
|
-
this.part2.focus();
|
|
4772
|
-
}
|
|
4784
|
+
this.part2.focus(true);
|
|
4773
4785
|
}
|
|
4774
4786
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4775
4787
|
this.changeIndex.emit('ShiftTab');
|
|
@@ -4777,23 +4789,18 @@
|
|
|
4777
4789
|
}
|
|
4778
4790
|
else if (p === 'Part2') {
|
|
4779
4791
|
if (a === 'Tab' || a === 'Enter') {
|
|
4780
|
-
this.part3.focus();
|
|
4792
|
+
this.part3.focus(true);
|
|
4781
4793
|
}
|
|
4782
4794
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4783
|
-
this.part1.focus();
|
|
4795
|
+
this.part1.focus(true);
|
|
4784
4796
|
}
|
|
4785
4797
|
}
|
|
4786
4798
|
else if (p === 'Part3') {
|
|
4787
4799
|
if (a === 'Tab' || a === 'Enter') {
|
|
4788
|
-
this.part4.focus();
|
|
4800
|
+
this.part4.focus(true);
|
|
4789
4801
|
}
|
|
4790
4802
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4791
|
-
|
|
4792
|
-
this.part1.focus();
|
|
4793
|
-
}
|
|
4794
|
-
else {
|
|
4795
|
-
this.part2.focus();
|
|
4796
|
-
}
|
|
4803
|
+
this.part2.focus(true);
|
|
4797
4804
|
}
|
|
4798
4805
|
}
|
|
4799
4806
|
else if (p === 'Part4') {
|
|
@@ -4801,14 +4808,14 @@
|
|
|
4801
4808
|
this.changeIndex.emit('Tab');
|
|
4802
4809
|
}
|
|
4803
4810
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4804
|
-
this.part3.focus();
|
|
4811
|
+
this.part3.focus(true);
|
|
4805
4812
|
}
|
|
4806
4813
|
}
|
|
4807
4814
|
}
|
|
4808
4815
|
else if (this.inp.type === exports.InputType.SelectAutoCompletePlaqueM || this.inp.type === exports.InputType.SelectAutoCompletePlaqueF) {
|
|
4809
4816
|
if (p === 'Part1') {
|
|
4810
4817
|
if (a === 'Tab' || a === 'Enter') {
|
|
4811
|
-
this.part3.focus();
|
|
4818
|
+
this.part3.focus(true);
|
|
4812
4819
|
if (this.inp.type === exports.InputType.SelectAutoCompletePlaqueF) {
|
|
4813
4820
|
this.loadOptions();
|
|
4814
4821
|
}
|
|
@@ -4822,7 +4829,7 @@
|
|
|
4822
4829
|
this.changeIndex.emit('Tab');
|
|
4823
4830
|
}
|
|
4824
4831
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
4825
|
-
this.part1.focus();
|
|
4832
|
+
this.part1.focus(true);
|
|
4826
4833
|
if (this.inp.type === exports.InputType.SelectAutoCompletePlaqueF) {
|
|
4827
4834
|
this.loadOptions();
|
|
4828
4835
|
}
|
|
@@ -4920,12 +4927,7 @@
|
|
|
4920
4927
|
this.part1.onChange = function (v) {
|
|
4921
4928
|
_this.inp.error = null;
|
|
4922
4929
|
if (v.length === 2 && _this.inp.type === exports.InputType.Plaque) {
|
|
4923
|
-
|
|
4924
|
-
_this.part3.focus(true);
|
|
4925
|
-
}
|
|
4926
|
-
else {
|
|
4927
|
-
_this.part2.focus(true);
|
|
4928
|
-
}
|
|
4930
|
+
_this.part2.focus(true);
|
|
4929
4931
|
}
|
|
4930
4932
|
else if (v.length === 3 && _this.inp.type === exports.InputType.PlaqueM) {
|
|
4931
4933
|
_this.part3.focus(true);
|
|
@@ -4934,14 +4936,10 @@
|
|
|
4934
4936
|
this.part2.onChange = function (v) {
|
|
4935
4937
|
_this.inp.error = null;
|
|
4936
4938
|
if (v.length === 1) {
|
|
4937
|
-
|
|
4938
|
-
_this.part3.focus(true);
|
|
4939
|
-
}, 100);
|
|
4939
|
+
_this.part3.focus(true);
|
|
4940
4940
|
}
|
|
4941
4941
|
else if (v.length === 0) {
|
|
4942
|
-
|
|
4943
|
-
_this.part1.focus(true);
|
|
4944
|
-
}, 100);
|
|
4942
|
+
_this.part1.focus(true);
|
|
4945
4943
|
}
|
|
4946
4944
|
};
|
|
4947
4945
|
this.part3.onChange = function (v) {
|
|
@@ -4949,7 +4947,7 @@
|
|
|
4949
4947
|
if (v.length === 3 && _this.inp.type === exports.InputType.Plaque) {
|
|
4950
4948
|
_this.part4.focus(true);
|
|
4951
4949
|
}
|
|
4952
|
-
if (v.length === 0 && _this.inp.type === exports.InputType.Plaque) {
|
|
4950
|
+
else if (v.length === 0 && _this.inp.type === exports.InputType.Plaque) {
|
|
4953
4951
|
_this.part2.focus(true);
|
|
4954
4952
|
}
|
|
4955
4953
|
else if (v.length === 5 && _this.inp.type === exports.InputType.PlaqueM) {
|
|
@@ -4964,10 +4962,8 @@
|
|
|
4964
4962
|
if (v.length === 2) {
|
|
4965
4963
|
_this.changeIndex.emit('Tab');
|
|
4966
4964
|
}
|
|
4967
|
-
else {
|
|
4968
|
-
|
|
4969
|
-
_this.part3.focus(true);
|
|
4970
|
-
}
|
|
4965
|
+
else if (v.length === 0) {
|
|
4966
|
+
_this.part3.focus(true);
|
|
4971
4967
|
}
|
|
4972
4968
|
};
|
|
4973
4969
|
this.inp.setValue = function (v) {
|
|
@@ -5037,12 +5033,7 @@
|
|
|
5037
5033
|
if (this.inp.type === exports.InputType.Plaque) {
|
|
5038
5034
|
if (p === 'Part1') {
|
|
5039
5035
|
if (a === 'Tab' || a === 'Enter') {
|
|
5040
|
-
|
|
5041
|
-
this.part3.focus();
|
|
5042
|
-
}
|
|
5043
|
-
else {
|
|
5044
|
-
this.part2.focus();
|
|
5045
|
-
}
|
|
5036
|
+
this.part2.focus(true);
|
|
5046
5037
|
}
|
|
5047
5038
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
5048
5039
|
this.changeIndex.emit('ShiftTab');
|
|
@@ -5050,23 +5041,18 @@
|
|
|
5050
5041
|
}
|
|
5051
5042
|
else if (p === 'Part2') {
|
|
5052
5043
|
if (a === 'Tab' || a === 'Enter') {
|
|
5053
|
-
this.part3.focus();
|
|
5044
|
+
this.part3.focus(true);
|
|
5054
5045
|
}
|
|
5055
5046
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
5056
|
-
this.part1.focus();
|
|
5047
|
+
this.part1.focus(true);
|
|
5057
5048
|
}
|
|
5058
5049
|
}
|
|
5059
5050
|
else if (p === 'Part3') {
|
|
5060
5051
|
if (a === 'Tab' || a === 'Enter') {
|
|
5061
|
-
this.part4.focus();
|
|
5052
|
+
this.part4.focus(true);
|
|
5062
5053
|
}
|
|
5063
5054
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
5064
|
-
|
|
5065
|
-
this.part1.focus();
|
|
5066
|
-
}
|
|
5067
|
-
else {
|
|
5068
|
-
this.part2.focus();
|
|
5069
|
-
}
|
|
5055
|
+
this.part2.focus(true);
|
|
5070
5056
|
}
|
|
5071
5057
|
}
|
|
5072
5058
|
else if (p === 'Part4') {
|
|
@@ -5074,14 +5060,14 @@
|
|
|
5074
5060
|
this.changeIndex.emit('Tab');
|
|
5075
5061
|
}
|
|
5076
5062
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
5077
|
-
this.part3.focus();
|
|
5063
|
+
this.part3.focus(true);
|
|
5078
5064
|
}
|
|
5079
5065
|
}
|
|
5080
5066
|
}
|
|
5081
5067
|
else if (this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF) {
|
|
5082
5068
|
if (p === 'Part1') {
|
|
5083
5069
|
if (a === 'Tab' || a === 'Enter') {
|
|
5084
|
-
this.part3.focus();
|
|
5070
|
+
this.part3.focus(true);
|
|
5085
5071
|
}
|
|
5086
5072
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
5087
5073
|
this.changeIndex.emit('ShiftTab');
|
|
@@ -5092,7 +5078,7 @@
|
|
|
5092
5078
|
this.changeIndex.emit('Tab');
|
|
5093
5079
|
}
|
|
5094
5080
|
else if (a === 'ShiftTab' || a === 'ShiftEnter') {
|
|
5095
|
-
this.part1.focus();
|
|
5081
|
+
this.part1.focus(true);
|
|
5096
5082
|
}
|
|
5097
5083
|
}
|
|
5098
5084
|
}
|
|
@@ -5110,7 +5096,7 @@
|
|
|
5110
5096
|
FormPlaqueComponent.prototype.onFocusIn = function (e) {
|
|
5111
5097
|
if (e === void 0) { e = null; }
|
|
5112
5098
|
if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
|
|
5113
|
-
this.part1.focus();
|
|
5099
|
+
this.part1.focus(true);
|
|
5114
5100
|
}
|
|
5115
5101
|
};
|
|
5116
5102
|
FormPlaqueComponent.prototype.onKeyDown = function (e) {
|