ps-toolkit-ui 1.3.66 → 1.3.69
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 +36 -35
- 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/table.class.js +7 -7
- package/esm2015/lib/components/form/car/form.car.component.js +17 -12
- package/esm2015/lib/components/form/plaque/form.plaque.component.js +3 -7
- package/esm2015/lib/components/form/table/form.table.component.js +5 -5
- package/esm2015/lib/components/table/row/table.row.component.js +9 -9
- package/fesm2015/ps-toolkit-ui.js +36 -35
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -2616,7 +2616,7 @@
|
|
|
2616
2616
|
if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
|
|
2617
2617
|
if (this_2.table.form) {
|
|
2618
2618
|
opt.onClick = function () {
|
|
2619
|
-
_this.table.form.url = _this.table.url + '
|
|
2619
|
+
_this.table.form.url = _this.table.url + 'update/' + _this.row.Data.Id;
|
|
2620
2620
|
if (_this.table.hasChildren && _this.row.Data.ParentId != null) {
|
|
2621
2621
|
_this.table.form.onSuccessBase = function () {
|
|
2622
2622
|
_this.table.modal.hide();
|
|
@@ -2641,7 +2641,7 @@
|
|
|
2641
2641
|
};
|
|
2642
2642
|
}
|
|
2643
2643
|
else {
|
|
2644
|
-
opt.url = this_2.table.url + '/
|
|
2644
|
+
opt.url = this_2.table.url + '/update/' + this_2.row.Data.Id;
|
|
2645
2645
|
}
|
|
2646
2646
|
}
|
|
2647
2647
|
else if (option.AccessType === exports.PermissionAccessTypeEnum.Delete) {
|
|
@@ -2696,15 +2696,15 @@
|
|
|
2696
2696
|
p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
|
|
2697
2697
|
opt.modal.table.permissions = p;
|
|
2698
2698
|
if (opt.modal.table.form) {
|
|
2699
|
-
opt.modal.table.form.url = p.getUrl() + '
|
|
2700
|
-
opt.modal.table.form.baseUrl = p.getUrl() + '
|
|
2699
|
+
opt.modal.table.form.url = p.getUrl() + 'insert';
|
|
2700
|
+
opt.modal.table.form.baseUrl = p.getUrl() + 'insert';
|
|
2701
2701
|
}
|
|
2702
2702
|
opt.modal.table.set();
|
|
2703
2703
|
}
|
|
2704
2704
|
if (opt.modal.form) {
|
|
2705
2705
|
opt.modal.form.name = option.Name;
|
|
2706
|
-
opt.modal.form.url = opt.modal.form.baseUrl + '
|
|
2707
|
-
opt.modal.form.loadData(opt.modal.form.baseUrl + '
|
|
2706
|
+
opt.modal.form.url = opt.modal.form.baseUrl + 'update/' + _this.row.Data.Id;
|
|
2707
|
+
opt.modal.form.loadData(opt.modal.form.baseUrl + 'get/' + _this.row.Data.Id);
|
|
2708
2708
|
opt.modal.form.onSuccessBase = function () {
|
|
2709
2709
|
opt.modal.hide();
|
|
2710
2710
|
};
|
|
@@ -2722,8 +2722,8 @@
|
|
|
2722
2722
|
p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
|
|
2723
2723
|
r.table.permissions = p;
|
|
2724
2724
|
if (r.table.form) {
|
|
2725
|
-
r.table.form.url = p.getUrl() + '
|
|
2726
|
-
r.table.form.baseUrl = p.getUrl() + '
|
|
2725
|
+
r.table.form.url = p.getUrl() + 'insert';
|
|
2726
|
+
r.table.form.baseUrl = p.getUrl() + 'insert';
|
|
2727
2727
|
}
|
|
2728
2728
|
r.table.set();
|
|
2729
2729
|
}
|
|
@@ -4761,6 +4761,7 @@
|
|
|
4761
4761
|
};
|
|
4762
4762
|
};
|
|
4763
4763
|
FormPlaqueComponent.prototype.changeFocus = function (p, a) {
|
|
4764
|
+
console.log(this.inp.type, p, a);
|
|
4764
4765
|
if (this.inp.type === exports.InputType.Plaque) {
|
|
4765
4766
|
if (p === 'Part1') {
|
|
4766
4767
|
if (a === 'Tab' || a === 'Enter') {
|
|
@@ -4816,13 +4817,8 @@
|
|
|
4816
4817
|
};
|
|
4817
4818
|
FormPlaqueComponent.prototype.onFocusIn = function (e) {
|
|
4818
4819
|
if (e === void 0) { e = null; }
|
|
4819
|
-
console.log(111);
|
|
4820
4820
|
if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
|
|
4821
|
-
|
|
4822
|
-
setTimeout(function () {
|
|
4823
|
-
console.log($('#Part1Input .control'));
|
|
4824
|
-
$('#Part1Input .control').focus();
|
|
4825
|
-
}, 100);
|
|
4821
|
+
this.part1.focus();
|
|
4826
4822
|
}
|
|
4827
4823
|
};
|
|
4828
4824
|
FormPlaqueComponent.prototype.onKeyDown = function (e) {
|
|
@@ -5445,13 +5441,13 @@
|
|
|
5445
5441
|
var p = new PermissionClass();
|
|
5446
5442
|
p.Type = exports.PermissionTypeEnum.Form;
|
|
5447
5443
|
var lAccess = new PermissionClass();
|
|
5448
|
-
lAccess.Action = '
|
|
5444
|
+
lAccess.Action = 'list';
|
|
5449
5445
|
var iAccess = new PermissionClass();
|
|
5450
|
-
iAccess.Action = '
|
|
5446
|
+
iAccess.Action = 'insert';
|
|
5451
5447
|
var uAccess = new PermissionClass();
|
|
5452
|
-
uAccess.Action = '
|
|
5448
|
+
uAccess.Action = 'update';
|
|
5453
5449
|
var dAccess = new PermissionClass();
|
|
5454
|
-
dAccess.Action = '
|
|
5450
|
+
dAccess.Action = 'delete';
|
|
5455
5451
|
p.Accesses = [
|
|
5456
5452
|
lAccess,
|
|
5457
5453
|
iAccess,
|
|
@@ -6624,12 +6620,18 @@
|
|
|
6624
6620
|
this.car.displayLabel = this.carF.displayLabel = this.motor.displayLabel = false;
|
|
6625
6621
|
this.inp.setValue = function (v) {
|
|
6626
6622
|
if (v != null) {
|
|
6627
|
-
if (v.split('_').length === 2) {
|
|
6623
|
+
if (v.split('_').length === 2 && v.split('_').some(function (x) { return !isNaN(parseInt(x, 10)); })) {
|
|
6628
6624
|
_this.type = exports.VehicleType.Motorcycle;
|
|
6629
6625
|
setTimeout(function () {
|
|
6630
6626
|
_this.motor.setValue(v, false);
|
|
6631
6627
|
});
|
|
6632
6628
|
}
|
|
6629
|
+
else if (v.split('_').length === 2) {
|
|
6630
|
+
_this.type = exports.VehicleType.CarF;
|
|
6631
|
+
setTimeout(function () {
|
|
6632
|
+
_this.carF.setValue(v, false);
|
|
6633
|
+
});
|
|
6634
|
+
}
|
|
6633
6635
|
else if (v.split('_').length === 4) {
|
|
6634
6636
|
_this.type = exports.VehicleType.Car;
|
|
6635
6637
|
setTimeout(function () {
|
|
@@ -6651,6 +6653,10 @@
|
|
|
6651
6653
|
_this.inp.error = exports.InputError.Required;
|
|
6652
6654
|
return false;
|
|
6653
6655
|
}
|
|
6656
|
+
if (_this.inp.required && _this.type === exports.VehicleType.CarF && !_this.carF.isValid()) {
|
|
6657
|
+
_this.inp.error = exports.InputError.Required;
|
|
6658
|
+
return false;
|
|
6659
|
+
}
|
|
6654
6660
|
return true;
|
|
6655
6661
|
};
|
|
6656
6662
|
this.inp.clear = function () {
|
|
@@ -6659,9 +6665,10 @@
|
|
|
6659
6665
|
_this.type = exports.VehicleType.Car;
|
|
6660
6666
|
_this.car.clear();
|
|
6661
6667
|
_this.motor.clear();
|
|
6668
|
+
_this.carF.clear();
|
|
6662
6669
|
};
|
|
6663
6670
|
this.inp.data = function () {
|
|
6664
|
-
return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : null;
|
|
6671
|
+
return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : _this.type === exports.VehicleType.CarF ? _this.carF.data() : null;
|
|
6665
6672
|
};
|
|
6666
6673
|
};
|
|
6667
6674
|
FormCarComponent.prototype.changeType = function (t) {
|
|
@@ -6672,15 +6679,9 @@
|
|
|
6672
6679
|
this.onFocusIn();
|
|
6673
6680
|
};
|
|
6674
6681
|
FormCarComponent.prototype.onFocusIn = function () {
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
}
|
|
6678
|
-
else if (this.type === exports.VehicleType.CarF) {
|
|
6679
|
-
this.carF.focus();
|
|
6680
|
-
}
|
|
6681
|
-
else if (this.type === exports.VehicleType.Motorcycle) {
|
|
6682
|
-
this.motor.focus();
|
|
6683
|
-
}
|
|
6682
|
+
setTimeout(function () {
|
|
6683
|
+
$('#Part1Input .control').focus();
|
|
6684
|
+
}, 100);
|
|
6684
6685
|
};
|
|
6685
6686
|
return FormCarComponent;
|
|
6686
6687
|
}());
|
|
@@ -7355,12 +7356,12 @@
|
|
|
7355
7356
|
return this.searchForm ? this.searchForm.json(d) : d;
|
|
7356
7357
|
};
|
|
7357
7358
|
TableClass.prototype.getUrl = function () {
|
|
7358
|
-
return this.url + '
|
|
7359
|
+
return this.url + 'list';
|
|
7359
7360
|
};
|
|
7360
7361
|
TableClass.prototype.showInsertModal = function (cId) {
|
|
7361
7362
|
if (cId === void 0) { cId = null; }
|
|
7362
7363
|
var insertAccess = this.permissions.getAccess(exports.PermissionAccessTypeEnum.Insert);
|
|
7363
|
-
this.form.url = this.form.baseUrl = this.url + '
|
|
7364
|
+
this.form.url = this.form.baseUrl = this.url + 'insert' + (cId ? '/' + cId : '');
|
|
7364
7365
|
this.form.name = insertAccess.Name;
|
|
7365
7366
|
this.form.method = exports.Method.Post;
|
|
7366
7367
|
this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });
|
|
@@ -7397,7 +7398,7 @@
|
|
|
7397
7398
|
if (access.AccessType === exports.PermissionAccessTypeEnum.Insert) {
|
|
7398
7399
|
accessInp.class = accessInp.class.replace('blue', 'green');
|
|
7399
7400
|
if (this_1.form) {
|
|
7400
|
-
this_1.form.url = this_1.form.baseUrl = this_1.url + '
|
|
7401
|
+
this_1.form.url = this_1.form.baseUrl = this_1.url + 'insert';
|
|
7401
7402
|
if (!this_1.form.onTop) {
|
|
7402
7403
|
accessInp.onClick = function () {
|
|
7403
7404
|
_this.form.onSuccessBase = function () {
|
|
@@ -7419,7 +7420,7 @@
|
|
|
7419
7420
|
};
|
|
7420
7421
|
}
|
|
7421
7422
|
else {
|
|
7422
|
-
accessInp.url = this_1.url + '
|
|
7423
|
+
accessInp.url = this_1.url + 'insert';
|
|
7423
7424
|
}
|
|
7424
7425
|
}
|
|
7425
7426
|
}
|
|
@@ -7427,10 +7428,10 @@
|
|
|
7427
7428
|
accessInp.onClick = function () {
|
|
7428
7429
|
var p = new PermissionClass();
|
|
7429
7430
|
p.Area = _this.permissions.Area;
|
|
7430
|
-
p.Controller = '
|
|
7431
|
+
p.Controller = 'print';
|
|
7431
7432
|
p.Action = _this.permissions.Controller + (_this.permissions.Action ? _this.permissions.Action : '');
|
|
7432
7433
|
var params = $$1.param(_this.searchData(true));
|
|
7433
|
-
window.open('/
|
|
7434
|
+
window.open('/report' + p.getUrl() + (_this.permissions.RelatedId ? '/' + _this.permissions.RelatedId : '') +
|
|
7434
7435
|
(params ? '?' + params : ''), '_blank');
|
|
7435
7436
|
};
|
|
7436
7437
|
}
|