ps-toolkit-ui 1.7.18 → 1.7.21
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 +16 -19
- 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/date/form.date.component.js +2 -1
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +1 -8
- 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 +16 -19
- 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
|
};
|
|
@@ -3747,6 +3753,7 @@
|
|
|
3747
3753
|
return true;
|
|
3748
3754
|
};
|
|
3749
3755
|
this.inp.clear = function () {
|
|
3756
|
+
_this.inp.error = null;
|
|
3750
3757
|
if (_this.inp.default) {
|
|
3751
3758
|
_this.inp.setValue(_this.inp.default, false);
|
|
3752
3759
|
}
|
|
@@ -4392,13 +4399,8 @@
|
|
|
4392
4399
|
};
|
|
4393
4400
|
this.inp.setSearch = function (s) {
|
|
4394
4401
|
var p = s ? s.split('_') : null;
|
|
4395
|
-
console.log(p);
|
|
4396
4402
|
if (p && p.length === 4) {
|
|
4397
4403
|
setTimeout(function () {
|
|
4398
|
-
console.log(p[0]);
|
|
4399
|
-
console.log(p[1]);
|
|
4400
|
-
console.log(p[2]);
|
|
4401
|
-
console.log(p[3]);
|
|
4402
4404
|
_this.part1.setValue(p[0], false);
|
|
4403
4405
|
_this.part2.setValue(p[1], false);
|
|
4404
4406
|
_this.part3.setValue(p[2], false);
|
|
@@ -4658,8 +4660,6 @@
|
|
|
4658
4660
|
if (isEdit === void 0) { isEdit = false; }
|
|
4659
4661
|
this.inp.error = null;
|
|
4660
4662
|
var va = this.getValue(v);
|
|
4661
|
-
console.log(v);
|
|
4662
|
-
console.log(va);
|
|
4663
4663
|
this.inp.setValue(v, false);
|
|
4664
4664
|
this.inp.setSearch(va ? va.search : '');
|
|
4665
4665
|
this.cSearch = this.inp.search;
|
|
@@ -5869,9 +5869,6 @@
|
|
|
5869
5869
|
this.inp.setValue = function (v) {
|
|
5870
5870
|
_this.inp.value = v != null ? v.toString() : '';
|
|
5871
5871
|
_this.cValue = _this.inp.value;
|
|
5872
|
-
console.log(_this.inp.name);
|
|
5873
|
-
console.log(_this.cValue);
|
|
5874
|
-
console.log(_this.inp.value);
|
|
5875
5872
|
};
|
|
5876
5873
|
this.inp.focus = function (changeIndex) {
|
|
5877
5874
|
if (changeIndex === void 0) { changeIndex = false; }
|
|
@@ -6002,9 +5999,6 @@
|
|
|
6002
5999
|
this.inp.onKeyUp(this.inp);
|
|
6003
6000
|
}
|
|
6004
6001
|
if (this.inp.onChange) {
|
|
6005
|
-
console.log(this.cValue);
|
|
6006
|
-
console.log(e.target.value);
|
|
6007
|
-
console.log(this.cValue !== e.target.value);
|
|
6008
6002
|
if (this.cValue !== e.target.value) {
|
|
6009
6003
|
this.inp.onChange(e.target.value);
|
|
6010
6004
|
this.cValue = e.target.value;
|
|
@@ -6863,6 +6857,9 @@
|
|
|
6863
6857
|
FormVehicleSearchComponent.prototype.changeType = function (t) {
|
|
6864
6858
|
var _this = this;
|
|
6865
6859
|
this.type = t;
|
|
6860
|
+
if (this.wsAuth != null) {
|
|
6861
|
+
this.wsAuth.close();
|
|
6862
|
+
}
|
|
6866
6863
|
if (t === exports.VehicleType.Fingerprint) {
|
|
6867
6864
|
this.fingerprint.loading = true;
|
|
6868
6865
|
this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
|