@gipisistemas/ng-core 1.1.9 → 1.1.11
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/gipisistemas-ng-core.umd.js +41 -31
- package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
- package/core/gipi-components/components/abstract-crud.component.d.ts +2 -2
- package/core/gipi-components/components/abstract-find.component.d.ts +4 -4
- package/core/services/authentication.service.d.ts +3 -1
- package/esm2015/core/components/abstract-find.component.js +4 -1
- package/esm2015/core/gipi-components/components/abstract-crud.component.js +5 -5
- package/esm2015/core/gipi-components/components/abstract-find.component.js +27 -24
- package/esm2015/core/services/authentication.service.js +11 -5
- package/esm5/core/components/abstract-find.component.js +4 -1
- package/esm5/core/gipi-components/components/abstract-crud.component.js +5 -5
- package/esm5/core/gipi-components/components/abstract-find.component.js +27 -24
- package/esm5/core/services/authentication.service.js +11 -5
- package/fesm2015/gipisistemas-ng-core.js +41 -31
- package/fesm2015/gipisistemas-ng-core.js.map +1 -1
- package/fesm5/gipisistemas-ng-core.js +41 -31
- package/fesm5/gipisistemas-ng-core.js.map +1 -1
- package/gipisistemas-ng-core.metadata.json +1 -1
- package/package.json +1 -1
@@ -26236,6 +26236,9 @@
|
|
26236
26236
|
}
|
26237
26237
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
26238
26238
|
pageEvent = this.tablePageEventDTO;
|
26239
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
26240
|
+
pageEvent.pageIndex = 0;
|
26241
|
+
}
|
26239
26242
|
}
|
26240
26243
|
if (pageEvent) {
|
26241
26244
|
this.tablePageEventDTO = pageEvent;
|
@@ -26374,10 +26377,11 @@
|
|
26374
26377
|
var moment$6 = moment_;
|
26375
26378
|
var AuthenticationService = /** @class */ (function (_super) {
|
26376
26379
|
__extends(AuthenticationService, _super);
|
26377
|
-
function AuthenticationService(router, http) {
|
26380
|
+
function AuthenticationService(router, http, _matDialog) {
|
26378
26381
|
var _this = _super.call(this) || this;
|
26379
26382
|
_this.router = router;
|
26380
26383
|
_this.http = http;
|
26384
|
+
_this._matDialog = _matDialog;
|
26381
26385
|
_this._tokenSubject$ = new rxjs.BehaviorSubject(JSON.parse(localStorage.getItem('token')));
|
26382
26386
|
_this.token$ = _this._tokenSubject$.asObservable();
|
26383
26387
|
return _this;
|
@@ -26399,6 +26403,7 @@
|
|
26399
26403
|
var _this = this;
|
26400
26404
|
this.revokeToken().subscribe(function (_) {
|
26401
26405
|
_this.removeSession();
|
26406
|
+
_this._matDialog.closeAll();
|
26402
26407
|
_this.router.navigate(['/oauth/login'], { queryParams: { returnUrl: _this.router.routerState.snapshot.url } });
|
26403
26408
|
}, function (error) {
|
26404
26409
|
throw new Error(error);
|
@@ -26461,13 +26466,15 @@
|
|
26461
26466
|
};
|
26462
26467
|
AuthenticationService.ctorParameters = function () { return [
|
26463
26468
|
{ type: router.Router },
|
26464
|
-
{ type: http.HttpClient }
|
26469
|
+
{ type: http.HttpClient },
|
26470
|
+
{ type: material.MatDialog }
|
26465
26471
|
]; };
|
26466
|
-
AuthenticationService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthenticationService_Factory() { return new AuthenticationService(core.ɵɵinject(router.Router), core.ɵɵinject(http.HttpClient)); }, token: AuthenticationService, providedIn: "root" });
|
26472
|
+
AuthenticationService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthenticationService_Factory() { return new AuthenticationService(core.ɵɵinject(router.Router), core.ɵɵinject(http.HttpClient), core.ɵɵinject(dialog.MatDialog)); }, token: AuthenticationService, providedIn: "root" });
|
26467
26473
|
AuthenticationService = __decorate([
|
26468
26474
|
core.Injectable({ providedIn: 'root' }),
|
26469
26475
|
__metadata("design:paramtypes", [router.Router,
|
26470
|
-
http.HttpClient
|
26476
|
+
http.HttpClient,
|
26477
|
+
material.MatDialog])
|
26471
26478
|
], AuthenticationService);
|
26472
26479
|
return AuthenticationService;
|
26473
26480
|
}(AbstractService));
|
@@ -27380,13 +27387,13 @@
|
|
27380
27387
|
GIPIAbstractCrudComponent.prototype.ngOnDestroy = function () {
|
27381
27388
|
_super.prototype.ngOnDestroy.call(this);
|
27382
27389
|
};
|
27383
|
-
GIPIAbstractCrudComponent.prototype.onInitForm = function () {
|
27390
|
+
GIPIAbstractCrudComponent.prototype.onInitForm = function (version) {
|
27384
27391
|
var _this = this;
|
27385
27392
|
try {
|
27386
27393
|
this.loading = true;
|
27387
27394
|
var id = this.activatedRoute.snapshot.params.id;
|
27388
27395
|
if (this.UUIDIsValid(id)) {
|
27389
|
-
this.abstractCrudService.getOne(id).toPromise().then(function (entity) {
|
27396
|
+
this.abstractCrudService.getOne(id, version).toPromise().then(function (entity) {
|
27390
27397
|
_this.entity = entity;
|
27391
27398
|
_this.onAfterGetOne();
|
27392
27399
|
_this.loading = false;
|
@@ -27407,7 +27414,7 @@
|
|
27407
27414
|
};
|
27408
27415
|
GIPIAbstractCrudComponent.prototype.onAfterGetOne = function () { };
|
27409
27416
|
GIPIAbstractCrudComponent.prototype.preSave = function (entity) { };
|
27410
|
-
GIPIAbstractCrudComponent.prototype.save = function (entity, toGoBack) {
|
27417
|
+
GIPIAbstractCrudComponent.prototype.save = function (entity, toGoBack, version) {
|
27411
27418
|
var _this = this;
|
27412
27419
|
if (toGoBack === void 0) { toGoBack = true; }
|
27413
27420
|
try {
|
@@ -27417,7 +27424,7 @@
|
|
27417
27424
|
}
|
27418
27425
|
if (this.isValid(entity)) {
|
27419
27426
|
this.preSave(entity);
|
27420
|
-
this.abstractCrudService.save(entity).toPromise().then(function (resp) {
|
27427
|
+
this.abstractCrudService.save(entity, version).toPromise().then(function (resp) {
|
27421
27428
|
_this.addSuccessMessage(exports.INJECTOR.get(APP_MESSAGES).SUCCESS);
|
27422
27429
|
if (toGoBack) {
|
27423
27430
|
_this.navigateByUrl(_this.getPath(), [_this.getPath()], true);
|
@@ -27584,9 +27591,12 @@
|
|
27584
27591
|
if (ObjectUtil.isNull(this.filter)) {
|
27585
27592
|
this.filter = this.newFilter();
|
27586
27593
|
}
|
27587
|
-
|
27588
|
-
|
27589
|
-
|
27594
|
+
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
27595
|
+
pageEvent = this.tablePageEventDTO;
|
27596
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
27597
|
+
pageEvent.pageIndex = 0;
|
27598
|
+
}
|
27599
|
+
}
|
27590
27600
|
if (pageEvent) {
|
27591
27601
|
this.tablePageEventDTO = pageEvent;
|
27592
27602
|
this.filter.pageNumber = pageEvent.pageIndex;
|
@@ -27655,7 +27665,7 @@
|
|
27655
27665
|
this.navigateByUrl(this.getPath(), [this.getPath(), 'edit', id], true);
|
27656
27666
|
}
|
27657
27667
|
};
|
27658
|
-
GIPIAbstractFindComponent.prototype.deleteRegister = function (id, permission, fetchAgain) {
|
27668
|
+
GIPIAbstractFindComponent.prototype.deleteRegister = function (id, permission, fetchAgain, version) {
|
27659
27669
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27660
27670
|
try {
|
27661
27671
|
id = this.handleEntityId(id);
|
@@ -27663,7 +27673,7 @@
|
|
27663
27673
|
return;
|
27664
27674
|
}
|
27665
27675
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27666
|
-
this._deleteRegister(id, fetchAgain);
|
27676
|
+
this._deleteRegister(id, fetchAgain, version);
|
27667
27677
|
}
|
27668
27678
|
else {
|
27669
27679
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27673,7 +27683,7 @@
|
|
27673
27683
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27674
27684
|
return;
|
27675
27685
|
}
|
27676
|
-
this._deleteRegister(id, fetchAgain);
|
27686
|
+
this._deleteRegister(id, fetchAgain, version);
|
27677
27687
|
}
|
27678
27688
|
}
|
27679
27689
|
catch (e) {
|
@@ -27685,7 +27695,7 @@
|
|
27685
27695
|
}
|
27686
27696
|
};
|
27687
27697
|
/** @Internal */
|
27688
|
-
GIPIAbstractFindComponent.prototype._deleteRegister = function (id, fetchAgain) {
|
27698
|
+
GIPIAbstractFindComponent.prototype._deleteRegister = function (id, fetchAgain, version) {
|
27689
27699
|
var _this = this;
|
27690
27700
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27691
27701
|
try {
|
@@ -27697,7 +27707,7 @@
|
|
27697
27707
|
_this.loading = true;
|
27698
27708
|
_this.page = _this.newPage();
|
27699
27709
|
_this.preDelete(id);
|
27700
|
-
_this.abstractCrudService.delete(id).toPromise().then(function () {
|
27710
|
+
_this.abstractCrudService.delete(id, version).toPromise().then(function () {
|
27701
27711
|
if (fetchAgain) {
|
27702
27712
|
_this.findAll();
|
27703
27713
|
}
|
@@ -27714,7 +27724,7 @@
|
|
27714
27724
|
throw new Error(e);
|
27715
27725
|
}
|
27716
27726
|
};
|
27717
|
-
GIPIAbstractFindComponent.prototype.deleteAllRegister = function (idList, permission, fetchAgain) {
|
27727
|
+
GIPIAbstractFindComponent.prototype.deleteAllRegister = function (idList, permission, fetchAgain, version) {
|
27718
27728
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27719
27729
|
try {
|
27720
27730
|
idList = this.handleEntityIdList(idList);
|
@@ -27722,7 +27732,7 @@
|
|
27722
27732
|
return;
|
27723
27733
|
}
|
27724
27734
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27725
|
-
this._deleteAllRegister(idList, fetchAgain);
|
27735
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
27726
27736
|
}
|
27727
27737
|
else {
|
27728
27738
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27732,7 +27742,7 @@
|
|
27732
27742
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27733
27743
|
return;
|
27734
27744
|
}
|
27735
|
-
this._deleteAllRegister(idList, fetchAgain);
|
27745
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
27736
27746
|
}
|
27737
27747
|
}
|
27738
27748
|
catch (e) {
|
@@ -27744,7 +27754,7 @@
|
|
27744
27754
|
}
|
27745
27755
|
};
|
27746
27756
|
/** @Internal */
|
27747
|
-
GIPIAbstractFindComponent.prototype._deleteAllRegister = function (idList, fetchAgain) {
|
27757
|
+
GIPIAbstractFindComponent.prototype._deleteAllRegister = function (idList, fetchAgain, version) {
|
27748
27758
|
var _this = this;
|
27749
27759
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27750
27760
|
try {
|
@@ -27756,7 +27766,7 @@
|
|
27756
27766
|
_this.loading = true;
|
27757
27767
|
_this.page = _this.newPage();
|
27758
27768
|
_this.preDelete();
|
27759
|
-
_this.abstractCrudService.deleteAll(idList).toPromise().then(function () {
|
27769
|
+
_this.abstractCrudService.deleteAll(idList, version).toPromise().then(function () {
|
27760
27770
|
if (fetchAgain) {
|
27761
27771
|
_this.findAll();
|
27762
27772
|
}
|
@@ -27802,7 +27812,7 @@
|
|
27802
27812
|
this.viewRegister(id, permission);
|
27803
27813
|
}
|
27804
27814
|
};
|
27805
|
-
GIPIAbstractFindComponent.prototype.enableOrDisableRegister = function (action, id, permission, fetchAgain) {
|
27815
|
+
GIPIAbstractFindComponent.prototype.enableOrDisableRegister = function (action, id, permission, fetchAgain, version) {
|
27806
27816
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27807
27817
|
try {
|
27808
27818
|
id = this.handleEntityId(id);
|
@@ -27810,7 +27820,7 @@
|
|
27810
27820
|
return;
|
27811
27821
|
}
|
27812
27822
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27813
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
27823
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
27814
27824
|
}
|
27815
27825
|
else {
|
27816
27826
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27820,7 +27830,7 @@
|
|
27820
27830
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27821
27831
|
return;
|
27822
27832
|
}
|
27823
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
27833
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
27824
27834
|
}
|
27825
27835
|
}
|
27826
27836
|
catch (e) {
|
@@ -27832,7 +27842,7 @@
|
|
27832
27842
|
}
|
27833
27843
|
};
|
27834
27844
|
/** @Internal */
|
27835
|
-
GIPIAbstractFindComponent.prototype._enableOrDisableRegister = function (action, id, fetchAgain) {
|
27845
|
+
GIPIAbstractFindComponent.prototype._enableOrDisableRegister = function (action, id, fetchAgain, version) {
|
27836
27846
|
var _this = this;
|
27837
27847
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27838
27848
|
try {
|
@@ -27843,7 +27853,7 @@
|
|
27843
27853
|
_this.setFilterSessionStorage();
|
27844
27854
|
_this.loading = true;
|
27845
27855
|
_this.page = _this.newPage();
|
27846
|
-
_this.abstractCrudService.enableOrDisable(id, action).toPromise().then(function () {
|
27856
|
+
_this.abstractCrudService.enableOrDisable(id, action, version).toPromise().then(function () {
|
27847
27857
|
if (fetchAgain) {
|
27848
27858
|
_this.findAll();
|
27849
27859
|
}
|
@@ -27860,7 +27870,7 @@
|
|
27860
27870
|
throw new Error(e);
|
27861
27871
|
}
|
27862
27872
|
};
|
27863
|
-
GIPIAbstractFindComponent.prototype.enableAndDisableAllRegister = function (action, idList, permission, fetchAgain) {
|
27873
|
+
GIPIAbstractFindComponent.prototype.enableAndDisableAllRegister = function (action, idList, permission, fetchAgain, version) {
|
27864
27874
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27865
27875
|
try {
|
27866
27876
|
idList = this.handleEntityIdList(idList);
|
@@ -27868,7 +27878,7 @@
|
|
27868
27878
|
return;
|
27869
27879
|
}
|
27870
27880
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27871
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
27881
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
27872
27882
|
}
|
27873
27883
|
else {
|
27874
27884
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27878,7 +27888,7 @@
|
|
27878
27888
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27879
27889
|
return;
|
27880
27890
|
}
|
27881
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
27891
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
27882
27892
|
}
|
27883
27893
|
}
|
27884
27894
|
catch (e) {
|
@@ -27890,7 +27900,7 @@
|
|
27890
27900
|
}
|
27891
27901
|
};
|
27892
27902
|
/** @Internal */
|
27893
|
-
GIPIAbstractFindComponent.prototype._enableAndDisableAllRegister = function (action, idList, fetchAgain) {
|
27903
|
+
GIPIAbstractFindComponent.prototype._enableAndDisableAllRegister = function (action, idList, fetchAgain, version) {
|
27894
27904
|
var _this = this;
|
27895
27905
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27896
27906
|
try {
|
@@ -27901,7 +27911,7 @@
|
|
27901
27911
|
_this.setFilterSessionStorage();
|
27902
27912
|
_this.loading = true;
|
27903
27913
|
_this.page = _this.newPage();
|
27904
|
-
_this.abstractCrudService.enableOrDisableAll(idList, action).toPromise().then(function () {
|
27914
|
+
_this.abstractCrudService.enableOrDisableAll(idList, action, version).toPromise().then(function () {
|
27905
27915
|
if (fetchAgain) {
|
27906
27916
|
_this.findAll();
|
27907
27917
|
}
|