info-library 2.10.21 → 2.10.22
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/info-library.umd.js +23 -13
- package/bundles/info-library.umd.js.map +1 -1
- package/bundles/info-library.umd.min.js +1 -1
- package/bundles/info-library.umd.min.js.map +1 -1
- package/controls/grid/grid.component.d.ts +4 -2
- package/esm2015/controls/grid/grid.component.js +25 -15
- package/fesm2015/info-library.js +24 -14
- package/fesm2015/info-library.js.map +1 -1
- package/info-library.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3815,6 +3815,7 @@
|
|
|
3815
3815
|
* @param {?} _prop
|
|
3816
3816
|
* @param {?} _dataAccessService
|
|
3817
3817
|
* @param {?} _router
|
|
3818
|
+
* @param {?} _activatedRoute
|
|
3818
3819
|
* @param {?} _authenticationService
|
|
3819
3820
|
* @param {?} _changeDetectorRef
|
|
3820
3821
|
* @param {?} _translate
|
|
@@ -3822,13 +3823,14 @@
|
|
|
3822
3823
|
* @param {?} _renderer
|
|
3823
3824
|
* @param {?} _element
|
|
3824
3825
|
*/
|
|
3825
|
-
function InfoGridComponent(_dialog, _platform, modal, _prop, _dataAccessService, _router, _authenticationService, _changeDetectorRef, _translate, _lastSearch, _renderer, _element) {
|
|
3826
|
+
function InfoGridComponent(_dialog, _platform, modal, _prop, _dataAccessService, _router, _activatedRoute, _authenticationService, _changeDetectorRef, _translate, _lastSearch, _renderer, _element) {
|
|
3826
3827
|
this._dialog = _dialog;
|
|
3827
3828
|
this._platform = _platform;
|
|
3828
3829
|
this.modal = modal;
|
|
3829
3830
|
this._prop = _prop;
|
|
3830
3831
|
this._dataAccessService = _dataAccessService;
|
|
3831
3832
|
this._router = _router;
|
|
3833
|
+
this._activatedRoute = _activatedRoute;
|
|
3832
3834
|
this._authenticationService = _authenticationService;
|
|
3833
3835
|
this._changeDetectorRef = _changeDetectorRef;
|
|
3834
3836
|
this._translate = _translate;
|
|
@@ -3902,6 +3904,7 @@
|
|
|
3902
3904
|
this.colunasType = [];
|
|
3903
3905
|
this.colunasWidth = [];
|
|
3904
3906
|
this.currentUrl = null;
|
|
3907
|
+
this.url = null;
|
|
3905
3908
|
this.parentIdUrlChange = new i0.EventEmitter();
|
|
3906
3909
|
this.parentIdUrlValue = null;
|
|
3907
3910
|
this._cols = '';
|
|
@@ -3946,6 +3949,7 @@
|
|
|
3946
3949
|
* @return {?}
|
|
3947
3950
|
*/
|
|
3948
3951
|
InfoGridComponent.prototype.ngOnInit = function () {
|
|
3952
|
+
this.url = (this._activatedRoute.snapshot.data['URL'] || this._router.url).toLowerCase();
|
|
3949
3953
|
this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
|
|
3950
3954
|
this.setPagebarTitle();
|
|
3951
3955
|
if (this.searchmodel != null) {
|
|
@@ -3955,7 +3959,7 @@
|
|
|
3955
3959
|
}
|
|
3956
3960
|
else if (this.parent != null && (this.method == null || this.method == ''))
|
|
3957
3961
|
this.method = 'GetByParentId';
|
|
3958
|
-
if (!this.disablesearchlast && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.
|
|
3962
|
+
if (!this.disablesearchlast && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.url)) {
|
|
3959
3963
|
this.enabledSearch = this._lastSearch.enabledSearch;
|
|
3960
3964
|
if (this.searchmodel != null && this._lastSearch.model != null)
|
|
3961
3965
|
Object.assign(this.searchmodel, this._lastSearch.model);
|
|
@@ -3983,7 +3987,7 @@
|
|
|
3983
3987
|
* @param {?} model
|
|
3984
3988
|
* @return {?}
|
|
3985
3989
|
*/ model) { return _this.formSearch.addControl(model); }));
|
|
3986
|
-
if (!this.disablesearchlast && this.paged && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.
|
|
3990
|
+
if (!this.disablesearchlast && this.paged && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.url))
|
|
3987
3991
|
this.paginator.index = this._lastSearch.index;
|
|
3988
3992
|
if (this.dynamiccols == null) {
|
|
3989
3993
|
this.setColumns();
|
|
@@ -4225,7 +4229,7 @@
|
|
|
4225
4229
|
var _this = this;
|
|
4226
4230
|
if (refreshPaginator === void 0) { refreshPaginator = false; }
|
|
4227
4231
|
if (!this.disablesearchlast) {
|
|
4228
|
-
this._lastSearch.url = this._authenticationService.getUrlGenerica(this.
|
|
4232
|
+
this._lastSearch.url = this._authenticationService.getUrlGenerica(this.url);
|
|
4229
4233
|
this._lastSearch.enabledSearch = this.enabledSearch;
|
|
4230
4234
|
this._lastSearch.model = Object.assign({}, this.searchmodel);
|
|
4231
4235
|
if (this.paged)
|
|
@@ -4295,7 +4299,7 @@
|
|
|
4295
4299
|
}
|
|
4296
4300
|
else {
|
|
4297
4301
|
if (this.newurl == null || this.newurl == '')
|
|
4298
|
-
this.newurl = this.
|
|
4302
|
+
this.newurl = this.url;
|
|
4299
4303
|
this.newurl += '/novo';
|
|
4300
4304
|
this.newurl = this.newurl.replace('//', '/');
|
|
4301
4305
|
this._router.navigateByUrl(this.newurl);
|
|
@@ -4333,7 +4337,7 @@
|
|
|
4333
4337
|
}
|
|
4334
4338
|
else {
|
|
4335
4339
|
if (this.viewurl == null || this.viewurl == '')
|
|
4336
|
-
this.viewurl = this.
|
|
4340
|
+
this.viewurl = this.url;
|
|
4337
4341
|
this.viewurl += '/' + model.Id + (this.enabledclickaccess ? '' : '/visualizar');
|
|
4338
4342
|
this.viewurl = this.viewurl.replace('//', '/');
|
|
4339
4343
|
this._router.navigateByUrl(this.viewurl);
|
|
@@ -4352,7 +4356,7 @@
|
|
|
4352
4356
|
}
|
|
4353
4357
|
else {
|
|
4354
4358
|
if (this.editurl == null || this.editurl == '')
|
|
4355
|
-
this.editurl = this.
|
|
4359
|
+
this.editurl = this.url;
|
|
4356
4360
|
this.editurl = this.editurl.replace('//', '/');
|
|
4357
4361
|
this._router.navigate([this.editurl, model.Id]);
|
|
4358
4362
|
}
|
|
@@ -4365,7 +4369,7 @@
|
|
|
4365
4369
|
}
|
|
4366
4370
|
else {
|
|
4367
4371
|
if (this.viewurl == null || this.viewurl == '')
|
|
4368
|
-
this.viewurl = this.
|
|
4372
|
+
this.viewurl = this.url;
|
|
4369
4373
|
this.viewurl += '/' + model.Id + (this.enabledclickaccess ? '' : '/visualizar');
|
|
4370
4374
|
this.viewurl = this.viewurl.replace('//', '/');
|
|
4371
4375
|
this._router.navigateByUrl(this.viewurl);
|
|
@@ -4552,11 +4556,9 @@
|
|
|
4552
4556
|
* @return {?}
|
|
4553
4557
|
*/
|
|
4554
4558
|
InfoGridComponent.prototype.getPermission = function () {
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
this.
|
|
4558
|
-
this.hasPermissionEdit = this._authenticationService.hasPermission(url, 'edit');
|
|
4559
|
-
this.hasPermissionDelete = this._authenticationService.hasPermission(url, 'remove');
|
|
4559
|
+
this.hasPermissionNew = this._authenticationService.hasPermission(this.url, 'new');
|
|
4560
|
+
this.hasPermissionEdit = this._authenticationService.hasPermission(this.url, 'edit');
|
|
4561
|
+
this.hasPermissionDelete = this._authenticationService.hasPermission(this.url, 'remove');
|
|
4560
4562
|
this._changeDetectorRef.detectChanges();
|
|
4561
4563
|
};
|
|
4562
4564
|
/**
|
|
@@ -4638,6 +4640,7 @@
|
|
|
4638
4640
|
{ type: InfoFormPropModel },
|
|
4639
4641
|
{ type: InfoDataService },
|
|
4640
4642
|
{ type: i3.Router },
|
|
4643
|
+
{ type: i3.ActivatedRoute },
|
|
4641
4644
|
{ type: InfoAuthenticationService },
|
|
4642
4645
|
{ type: i0.ChangeDetectorRef },
|
|
4643
4646
|
{ type: InfoTranslateService },
|
|
@@ -4846,6 +4849,8 @@
|
|
|
4846
4849
|
/** @type {?} */
|
|
4847
4850
|
InfoGridComponent.prototype.currentUrl;
|
|
4848
4851
|
/** @type {?} */
|
|
4852
|
+
InfoGridComponent.prototype.url;
|
|
4853
|
+
/** @type {?} */
|
|
4849
4854
|
InfoGridComponent.prototype.paginator;
|
|
4850
4855
|
/** @type {?} */
|
|
4851
4856
|
InfoGridComponent.prototype.parentIdUrlChange;
|
|
@@ -4877,6 +4882,11 @@
|
|
|
4877
4882
|
* @private
|
|
4878
4883
|
*/
|
|
4879
4884
|
InfoGridComponent.prototype._router;
|
|
4885
|
+
/**
|
|
4886
|
+
* @type {?}
|
|
4887
|
+
* @private
|
|
4888
|
+
*/
|
|
4889
|
+
InfoGridComponent.prototype._activatedRoute;
|
|
4880
4890
|
/**
|
|
4881
4891
|
* @type {?}
|
|
4882
4892
|
* @private
|