ps-toolkit-ui 1.7.17 → 1.7.20
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 +15 -17
- 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 +12 -1
- package/esm2015/lib/classes/modal.class.js +2 -8
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +1 -6
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +1 -7
- package/esm2015/lib/components/form/vehicle/search/form.vehicle.search.component.js +4 -1
- package/fesm2015/ps-toolkit-ui.js +15 -17
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1674,6 +1674,14 @@
|
|
|
1674
1674
|
}, 500);
|
|
1675
1675
|
});
|
|
1676
1676
|
};
|
|
1677
|
+
FormClass.prototype.focus = function () {
|
|
1678
|
+
var i = this.inputs.find(function (x) { return !x.disabled && x.type !== exports.InputType.Label && x.type !== exports.InputType.Hidden &&
|
|
1679
|
+
x.type !== exports.InputType.Constant && x.type !== exports.InputType.Submit && x.type !== exports.InputType.Button && x.type !== exports.InputType.Icon &&
|
|
1680
|
+
x.type !== exports.InputType.Check; });
|
|
1681
|
+
if (i) {
|
|
1682
|
+
i.focus();
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1677
1685
|
FormClass.prototype.submit = function (onSubmit) {
|
|
1678
1686
|
if (onSubmit === void 0) { onSubmit = null; }
|
|
1679
1687
|
new RequestClass(this.environment, this.l).postForm(this, onSubmit);
|
|
@@ -1695,6 +1703,9 @@
|
|
|
1695
1703
|
this.url = this.baseUrl;
|
|
1696
1704
|
this.setButtons(this.onTop, false);
|
|
1697
1705
|
this.clearInputs();
|
|
1706
|
+
if (this.onTop) {
|
|
1707
|
+
this.focus();
|
|
1708
|
+
}
|
|
1698
1709
|
};
|
|
1699
1710
|
FormClass.prototype.clearInputs = function () {
|
|
1700
1711
|
this.inputs.filter(function (x) { return x.type !== exports.InputType.Constant; }).forEach(function (inp) {
|
|
@@ -3110,12 +3121,7 @@
|
|
|
3110
3121
|
$__namespace('body').addClass('open-modal');
|
|
3111
3122
|
$__namespace('#' + this.id + 'Modal').fadeIn(300, function () {
|
|
3112
3123
|
if (_this.form != null) {
|
|
3113
|
-
|
|
3114
|
-
x.type !== exports.InputType.Constant && x.type !== exports.InputType.Submit && x.type !== exports.InputType.Button && x.type !== exports.InputType.Icon &&
|
|
3115
|
-
x.type !== exports.InputType.Check; });
|
|
3116
|
-
if (i) {
|
|
3117
|
-
i.focus();
|
|
3118
|
-
}
|
|
3124
|
+
_this.form.focus();
|
|
3119
3125
|
}
|
|
3120
3126
|
});
|
|
3121
3127
|
};
|
|
@@ -4392,13 +4398,8 @@
|
|
|
4392
4398
|
};
|
|
4393
4399
|
this.inp.setSearch = function (s) {
|
|
4394
4400
|
var p = s ? s.split('_') : null;
|
|
4395
|
-
console.log(p);
|
|
4396
4401
|
if (p && p.length === 4) {
|
|
4397
4402
|
setTimeout(function () {
|
|
4398
|
-
console.log(p[0]);
|
|
4399
|
-
console.log(p[1]);
|
|
4400
|
-
console.log(p[2]);
|
|
4401
|
-
console.log(p[3]);
|
|
4402
4403
|
_this.part1.setValue(p[0], false);
|
|
4403
4404
|
_this.part2.setValue(p[1], false);
|
|
4404
4405
|
_this.part3.setValue(p[2], false);
|
|
@@ -5867,9 +5868,6 @@
|
|
|
5867
5868
|
this.inp.setValue = function (v) {
|
|
5868
5869
|
_this.inp.value = v != null ? v.toString() : '';
|
|
5869
5870
|
_this.cValue = _this.inp.value;
|
|
5870
|
-
console.log(_this.inp.name);
|
|
5871
|
-
console.log(_this.cValue);
|
|
5872
|
-
console.log(_this.inp.value);
|
|
5873
5871
|
};
|
|
5874
5872
|
this.inp.focus = function (changeIndex) {
|
|
5875
5873
|
if (changeIndex === void 0) { changeIndex = false; }
|
|
@@ -6000,9 +5998,6 @@
|
|
|
6000
5998
|
this.inp.onKeyUp(this.inp);
|
|
6001
5999
|
}
|
|
6002
6000
|
if (this.inp.onChange) {
|
|
6003
|
-
console.log(this.cValue);
|
|
6004
|
-
console.log(e.target.value);
|
|
6005
|
-
console.log(this.cValue !== e.target.value);
|
|
6006
6001
|
if (this.cValue !== e.target.value) {
|
|
6007
6002
|
this.inp.onChange(e.target.value);
|
|
6008
6003
|
this.cValue = e.target.value;
|
|
@@ -6861,6 +6856,9 @@
|
|
|
6861
6856
|
FormVehicleSearchComponent.prototype.changeType = function (t) {
|
|
6862
6857
|
var _this = this;
|
|
6863
6858
|
this.type = t;
|
|
6859
|
+
if (this.wsAuth != null) {
|
|
6860
|
+
this.wsAuth.close();
|
|
6861
|
+
}
|
|
6864
6862
|
if (t === exports.VehicleType.Fingerprint) {
|
|
6865
6863
|
this.fingerprint.loading = true;
|
|
6866
6864
|
this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
|