info-library 2.10.21 → 2.10.25
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 +90 -20
- 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/card-menu/card-menu.component.js +6 -1
- package/esm2015/controls/grid/grid.component.js +25 -15
- package/esm2015/info-library.js +5 -4
- package/esm2015/info-library.module.js +4 -1
- package/esm2015/pipe/index.js +2 -1
- package/esm2015/pipe/mask.pipe.js +47 -0
- package/esm2015/public_api.js +2 -2
- package/esm2015/service/authentication.service.js +2 -2
- package/fesm2015/info-library.js +79 -17
- package/fesm2015/info-library.js.map +1 -1
- package/info-library.d.ts +3 -2
- package/info-library.metadata.json +1 -1
- package/package.json +1 -1
- package/pipe/index.d.ts +1 -0
- package/pipe/mask.pipe.d.ts +5 -0
package/fesm2015/info-library.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InjectionToken, Injectable, Inject, ɵɵdefineInjectable, ɵɵinject, Pipe, Component, Input, EventEmitter, forwardRef, Output, ViewChild, ChangeDetectorRef, Renderer2, ElementRef, ContentChildren, HostBinding, Directive, HostListener, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { conformToMask, createTextMaskInputElement } from 'text-mask-core/dist/textMaskCore';
|
|
2
3
|
import { __awaiter } from 'tslib';
|
|
3
|
-
import { Router, NavigationStart, GuardsCheckStart, NavigationEnd, RouterModule } from '@angular/router';
|
|
4
|
+
import { Router, ActivatedRoute, NavigationStart, GuardsCheckStart, NavigationEnd, RouterModule } from '@angular/router';
|
|
4
5
|
import { HttpHeaders, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
5
6
|
import { of, Observable } from 'rxjs';
|
|
6
7
|
import { map, catchError, switchMap, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
@@ -9,7 +10,6 @@ import { OverlayContainer } from '@angular/cdk/overlay';
|
|
|
9
10
|
import { FormControl, NG_VALUE_ACCESSOR, NgModel, NgForm, NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
11
|
import { MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
11
12
|
import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
12
|
-
import { createTextMaskInputElement } from 'text-mask-core/dist/textMaskCore';
|
|
13
13
|
import createAutoCorrectedDatePipe from 'text-mask-addons/dist/createAutoCorrectedDatePipe';
|
|
14
14
|
import { ENTER } from '@angular/cdk/keycodes';
|
|
15
15
|
import { CommonModule } from '@angular/common';
|
|
@@ -816,6 +816,51 @@ if (false) {
|
|
|
816
816
|
InfoTranslatePipe.prototype._translate;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
+
/**
|
|
820
|
+
* @fileoverview added by tsickle
|
|
821
|
+
* Generated from: pipe/mask.pipe.ts
|
|
822
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
823
|
+
*/
|
|
824
|
+
class InfoMaskPipe {
|
|
825
|
+
constructor() { }
|
|
826
|
+
/**
|
|
827
|
+
* @param {?} value
|
|
828
|
+
* @param {?=} args
|
|
829
|
+
* @return {?}
|
|
830
|
+
*/
|
|
831
|
+
transform(value, args) {
|
|
832
|
+
if (!value)
|
|
833
|
+
return;
|
|
834
|
+
/** @type {?} */
|
|
835
|
+
let mask = [];
|
|
836
|
+
if (args == 'phone')
|
|
837
|
+
mask = ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/];
|
|
838
|
+
else if (args == 'cel')
|
|
839
|
+
mask = ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/];
|
|
840
|
+
else if (args == 'cep')
|
|
841
|
+
mask = [/\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/];
|
|
842
|
+
else if (args == 'cpf')
|
|
843
|
+
mask = [/\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '-', /\d/, /\d/];
|
|
844
|
+
else if (args == 'cnpj')
|
|
845
|
+
mask = [/\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/];
|
|
846
|
+
else
|
|
847
|
+
mask = Array.from(args).map((/**
|
|
848
|
+
* @param {?} c
|
|
849
|
+
* @return {?}
|
|
850
|
+
*/
|
|
851
|
+
c => c == '0' ? /\d/ : c));
|
|
852
|
+
return conformToMask(value, mask, { guide: false }).conformedValue;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
InfoMaskPipe.decorators = [
|
|
856
|
+
{ type: Pipe, args: [{
|
|
857
|
+
name: 'mask',
|
|
858
|
+
pure: false
|
|
859
|
+
},] }
|
|
860
|
+
];
|
|
861
|
+
/** @nocollapse */
|
|
862
|
+
InfoMaskPipe.ctorParameters = () => [];
|
|
863
|
+
|
|
819
864
|
/**
|
|
820
865
|
* @fileoverview added by tsickle
|
|
821
866
|
* Generated from: pipe/index.ts
|
|
@@ -1386,7 +1431,7 @@ class InfoAuthenticationService {
|
|
|
1386
1431
|
*/
|
|
1387
1432
|
setResetarSenha(model) {
|
|
1388
1433
|
return this._http
|
|
1389
|
-
.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/ResetarSenha', model
|
|
1434
|
+
.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/ResetarSenha', model)
|
|
1390
1435
|
.pipe(map((/**
|
|
1391
1436
|
* @param {?} r
|
|
1392
1437
|
* @return {?}
|
|
@@ -2728,6 +2773,11 @@ class InfoMenuCardComponent {
|
|
|
2728
2773
|
*/
|
|
2729
2774
|
load() {
|
|
2730
2775
|
this.menuRows = new Array();
|
|
2776
|
+
this.menu = this.menu == null ? null : this.menu.filter((/**
|
|
2777
|
+
* @param {?} i
|
|
2778
|
+
* @return {?}
|
|
2779
|
+
*/
|
|
2780
|
+
i => i.permission == true));
|
|
2731
2781
|
if (this.menu == null || this.menu.length == 0 || this.cols == null || this.cols == 0) {
|
|
2732
2782
|
this.menuRows.push(this.menu);
|
|
2733
2783
|
this.colClass += this.col.toString();
|
|
@@ -3524,6 +3574,7 @@ class InfoGridComponent {
|
|
|
3524
3574
|
* @param {?} _prop
|
|
3525
3575
|
* @param {?} _dataAccessService
|
|
3526
3576
|
* @param {?} _router
|
|
3577
|
+
* @param {?} _activatedRoute
|
|
3527
3578
|
* @param {?} _authenticationService
|
|
3528
3579
|
* @param {?} _changeDetectorRef
|
|
3529
3580
|
* @param {?} _translate
|
|
@@ -3531,13 +3582,14 @@ class InfoGridComponent {
|
|
|
3531
3582
|
* @param {?} _renderer
|
|
3532
3583
|
* @param {?} _element
|
|
3533
3584
|
*/
|
|
3534
|
-
constructor(_dialog, _platform, modal, _prop, _dataAccessService, _router, _authenticationService, _changeDetectorRef, _translate, _lastSearch, _renderer, _element) {
|
|
3585
|
+
constructor(_dialog, _platform, modal, _prop, _dataAccessService, _router, _activatedRoute, _authenticationService, _changeDetectorRef, _translate, _lastSearch, _renderer, _element) {
|
|
3535
3586
|
this._dialog = _dialog;
|
|
3536
3587
|
this._platform = _platform;
|
|
3537
3588
|
this.modal = modal;
|
|
3538
3589
|
this._prop = _prop;
|
|
3539
3590
|
this._dataAccessService = _dataAccessService;
|
|
3540
3591
|
this._router = _router;
|
|
3592
|
+
this._activatedRoute = _activatedRoute;
|
|
3541
3593
|
this._authenticationService = _authenticationService;
|
|
3542
3594
|
this._changeDetectorRef = _changeDetectorRef;
|
|
3543
3595
|
this._translate = _translate;
|
|
@@ -3611,6 +3663,7 @@ class InfoGridComponent {
|
|
|
3611
3663
|
this.colunasType = [];
|
|
3612
3664
|
this.colunasWidth = [];
|
|
3613
3665
|
this.currentUrl = null;
|
|
3666
|
+
this.url = null;
|
|
3614
3667
|
this.parentIdUrlChange = new EventEmitter();
|
|
3615
3668
|
this.parentIdUrlValue = null;
|
|
3616
3669
|
this._cols = '';
|
|
@@ -3647,6 +3700,7 @@ class InfoGridComponent {
|
|
|
3647
3700
|
* @return {?}
|
|
3648
3701
|
*/
|
|
3649
3702
|
ngOnInit() {
|
|
3703
|
+
this.url = (this._activatedRoute.snapshot.data['URL'] || this._router.url).toLowerCase();
|
|
3650
3704
|
this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
|
|
3651
3705
|
this.setPagebarTitle();
|
|
3652
3706
|
if (this.searchmodel != null) {
|
|
@@ -3656,7 +3710,7 @@ class InfoGridComponent {
|
|
|
3656
3710
|
}
|
|
3657
3711
|
else if (this.parent != null && (this.method == null || this.method == ''))
|
|
3658
3712
|
this.method = 'GetByParentId';
|
|
3659
|
-
if (!this.disablesearchlast && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.
|
|
3713
|
+
if (!this.disablesearchlast && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.url)) {
|
|
3660
3714
|
this.enabledSearch = this._lastSearch.enabledSearch;
|
|
3661
3715
|
if (this.searchmodel != null && this._lastSearch.model != null)
|
|
3662
3716
|
Object.assign(this.searchmodel, this._lastSearch.model);
|
|
@@ -3681,7 +3735,7 @@ class InfoGridComponent {
|
|
|
3681
3735
|
* @return {?}
|
|
3682
3736
|
*/
|
|
3683
3737
|
model => this.formSearch.addControl(model)));
|
|
3684
|
-
if (!this.disablesearchlast && this.paged && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.
|
|
3738
|
+
if (!this.disablesearchlast && this.paged && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.url))
|
|
3685
3739
|
this.paginator.index = this._lastSearch.index;
|
|
3686
3740
|
if (this.dynamiccols == null) {
|
|
3687
3741
|
this.setColumns();
|
|
@@ -3901,7 +3955,7 @@ class InfoGridComponent {
|
|
|
3901
3955
|
*/
|
|
3902
3956
|
getDataReturn(result, refreshPaginator = false) {
|
|
3903
3957
|
if (!this.disablesearchlast) {
|
|
3904
|
-
this._lastSearch.url = this._authenticationService.getUrlGenerica(this.
|
|
3958
|
+
this._lastSearch.url = this._authenticationService.getUrlGenerica(this.url);
|
|
3905
3959
|
this._lastSearch.enabledSearch = this.enabledSearch;
|
|
3906
3960
|
this._lastSearch.model = Object.assign({}, this.searchmodel);
|
|
3907
3961
|
if (this.paged)
|
|
@@ -3972,7 +4026,7 @@ class InfoGridComponent {
|
|
|
3972
4026
|
}
|
|
3973
4027
|
else {
|
|
3974
4028
|
if (this.newurl == null || this.newurl == '')
|
|
3975
|
-
this.newurl = this.
|
|
4029
|
+
this.newurl = this.url;
|
|
3976
4030
|
this.newurl += '/novo';
|
|
3977
4031
|
this.newurl = this.newurl.replace('//', '/');
|
|
3978
4032
|
this._router.navigateByUrl(this.newurl);
|
|
@@ -4010,7 +4064,7 @@ class InfoGridComponent {
|
|
|
4010
4064
|
}
|
|
4011
4065
|
else {
|
|
4012
4066
|
if (this.viewurl == null || this.viewurl == '')
|
|
4013
|
-
this.viewurl = this.
|
|
4067
|
+
this.viewurl = this.url;
|
|
4014
4068
|
this.viewurl += '/' + model.Id + (this.enabledclickaccess ? '' : '/visualizar');
|
|
4015
4069
|
this.viewurl = this.viewurl.replace('//', '/');
|
|
4016
4070
|
this._router.navigateByUrl(this.viewurl);
|
|
@@ -4029,7 +4083,7 @@ class InfoGridComponent {
|
|
|
4029
4083
|
}
|
|
4030
4084
|
else {
|
|
4031
4085
|
if (this.editurl == null || this.editurl == '')
|
|
4032
|
-
this.editurl = this.
|
|
4086
|
+
this.editurl = this.url;
|
|
4033
4087
|
this.editurl = this.editurl.replace('//', '/');
|
|
4034
4088
|
this._router.navigate([this.editurl, model.Id]);
|
|
4035
4089
|
}
|
|
@@ -4042,7 +4096,7 @@ class InfoGridComponent {
|
|
|
4042
4096
|
}
|
|
4043
4097
|
else {
|
|
4044
4098
|
if (this.viewurl == null || this.viewurl == '')
|
|
4045
|
-
this.viewurl = this.
|
|
4099
|
+
this.viewurl = this.url;
|
|
4046
4100
|
this.viewurl += '/' + model.Id + (this.enabledclickaccess ? '' : '/visualizar');
|
|
4047
4101
|
this.viewurl = this.viewurl.replace('//', '/');
|
|
4048
4102
|
this._router.navigateByUrl(this.viewurl);
|
|
@@ -4210,11 +4264,9 @@ class InfoGridComponent {
|
|
|
4210
4264
|
* @return {?}
|
|
4211
4265
|
*/
|
|
4212
4266
|
getPermission() {
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
this.
|
|
4216
|
-
this.hasPermissionEdit = this._authenticationService.hasPermission(url, 'edit');
|
|
4217
|
-
this.hasPermissionDelete = this._authenticationService.hasPermission(url, 'remove');
|
|
4267
|
+
this.hasPermissionNew = this._authenticationService.hasPermission(this.url, 'new');
|
|
4268
|
+
this.hasPermissionEdit = this._authenticationService.hasPermission(this.url, 'edit');
|
|
4269
|
+
this.hasPermissionDelete = this._authenticationService.hasPermission(this.url, 'remove');
|
|
4218
4270
|
this._changeDetectorRef.detectChanges();
|
|
4219
4271
|
}
|
|
4220
4272
|
/**
|
|
@@ -4287,6 +4339,7 @@ InfoGridComponent.ctorParameters = () => [
|
|
|
4287
4339
|
{ type: InfoFormPropModel },
|
|
4288
4340
|
{ type: InfoDataService },
|
|
4289
4341
|
{ type: Router },
|
|
4342
|
+
{ type: ActivatedRoute },
|
|
4290
4343
|
{ type: InfoAuthenticationService },
|
|
4291
4344
|
{ type: ChangeDetectorRef },
|
|
4292
4345
|
{ type: InfoTranslateService },
|
|
@@ -4495,6 +4548,8 @@ if (false) {
|
|
|
4495
4548
|
/** @type {?} */
|
|
4496
4549
|
InfoGridComponent.prototype.currentUrl;
|
|
4497
4550
|
/** @type {?} */
|
|
4551
|
+
InfoGridComponent.prototype.url;
|
|
4552
|
+
/** @type {?} */
|
|
4498
4553
|
InfoGridComponent.prototype.paginator;
|
|
4499
4554
|
/** @type {?} */
|
|
4500
4555
|
InfoGridComponent.prototype.parentIdUrlChange;
|
|
@@ -4526,6 +4581,11 @@ if (false) {
|
|
|
4526
4581
|
* @private
|
|
4527
4582
|
*/
|
|
4528
4583
|
InfoGridComponent.prototype._router;
|
|
4584
|
+
/**
|
|
4585
|
+
* @type {?}
|
|
4586
|
+
* @private
|
|
4587
|
+
*/
|
|
4588
|
+
InfoGridComponent.prototype._activatedRoute;
|
|
4529
4589
|
/**
|
|
4530
4590
|
* @type {?}
|
|
4531
4591
|
* @private
|
|
@@ -7729,6 +7789,7 @@ InfoLibraryModule.decorators = [
|
|
|
7729
7789
|
],
|
|
7730
7790
|
declarations: [
|
|
7731
7791
|
InfoTranslatePipe,
|
|
7792
|
+
InfoMaskPipe,
|
|
7732
7793
|
InfoMaskDirective,
|
|
7733
7794
|
InfoUnmaskDirective,
|
|
7734
7795
|
InfoAlertComponent,
|
|
@@ -7763,6 +7824,7 @@ InfoLibraryModule.decorators = [
|
|
|
7763
7824
|
],
|
|
7764
7825
|
exports: [
|
|
7765
7826
|
InfoTranslatePipe,
|
|
7827
|
+
InfoMaskPipe,
|
|
7766
7828
|
InfoAlertComponent,
|
|
7767
7829
|
InfoAutoCompleteComponent,
|
|
7768
7830
|
InfoBigCheckboxComponent,
|
|
@@ -7814,5 +7876,5 @@ InfoLibraryModule.decorators = [
|
|
|
7814
7876
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
7815
7877
|
*/
|
|
7816
7878
|
|
|
7817
|
-
export { APICONTROLLER_CONFIG, DICTIONARIES_CONFIG, InfoAlertComponent, InfoAppConfigModel, InfoAuthenticationService, InfoAutoCompleteComponent, InfoBigCheckboxComponent, InfoCardComponent, InfoCheckboxComponent, InfoChipsComponent, InfoConfigurationService, InfoDataAccessModel, InfoDataService, InfoDateComponent, InfoDateMonthComponent, InfoDialogButtons, InfoDialogComponent, InfoDialogModal, InfoDialogModel, InfoDialogResult, InfoEditorComponent, InfoFormPropModel, InfoGridButtonModel, InfoGridComponent, InfoInputComponent, InfoInputListComponent, InfoLastSearchModel, InfoLibraryModule, InfoListCheckboxComponent, InfoLoadingComponent, InfoLoginModel, InfoMainComponent, InfoMenuCardComponent, InfoMessageComponent, InfoMethodGridButtonModel, InfoModalAction, InfoModalComponent, InfoMultiSelectComponent, InfoNotificationItemModel, InfoNotificationModel, InfoPageAction, InfoPagebarButtonModel, InfoPagebarComponent, InfoPaginatorComponent, InfoPermissionModel, InfoPlatformModel, InfoSelectComponent, InfoSessionModel, InfoSidebarComponent, InfoThemeService, InfoTimelineComponent, InfoTopMenuComponent, InfoTopbarComponent, InfoTranslatePipe, InfoTranslateService, PT_BR_DATE_FORMATS as ɵa, PT_BR_DATE_MONTH_FORMATS as ɵb, AtalhoModalComponent as ɵc, InfoDataService as ɵd, InfoPlatformModel as ɵe, InfoFormPropModel as ɵf, InfoAuthenticationService as ɵg, RefreshSessionTimeModalComponent as ɵh, InfoSessionModel as ɵi, InfoTranslateService as ɵj, InfoLastSearchModel as ɵk, InfoThemeService as ɵl, InfoDialogModel as ɵm, InfoTranslatePipe as ɵn,
|
|
7879
|
+
export { APICONTROLLER_CONFIG, DICTIONARIES_CONFIG, InfoAlertComponent, InfoAppConfigModel, InfoAuthenticationService, InfoAutoCompleteComponent, InfoBigCheckboxComponent, InfoCardComponent, InfoCheckboxComponent, InfoChipsComponent, InfoConfigurationService, InfoDataAccessModel, InfoDataService, InfoDateComponent, InfoDateMonthComponent, InfoDialogButtons, InfoDialogComponent, InfoDialogModal, InfoDialogModel, InfoDialogResult, InfoEditorComponent, InfoFormPropModel, InfoGridButtonModel, InfoGridComponent, InfoInputComponent, InfoInputListComponent, InfoLastSearchModel, InfoLibraryModule, InfoListCheckboxComponent, InfoLoadingComponent, InfoLoginModel, InfoMainComponent, InfoMaskPipe, InfoMenuCardComponent, InfoMessageComponent, InfoMethodGridButtonModel, InfoModalAction, InfoModalComponent, InfoMultiSelectComponent, InfoNotificationItemModel, InfoNotificationModel, InfoPageAction, InfoPagebarButtonModel, InfoPagebarComponent, InfoPaginatorComponent, InfoPermissionModel, InfoPlatformModel, InfoSelectComponent, InfoSessionModel, InfoSidebarComponent, InfoThemeService, InfoTimelineComponent, InfoTopMenuComponent, InfoTopbarComponent, InfoTranslatePipe, InfoTranslateService, PT_BR_DATE_FORMATS as ɵa, PT_BR_DATE_MONTH_FORMATS as ɵb, AtalhoModalComponent as ɵc, InfoDataService as ɵd, InfoPlatformModel as ɵe, InfoFormPropModel as ɵf, InfoAuthenticationService as ɵg, RefreshSessionTimeModalComponent as ɵh, InfoSessionModel as ɵi, InfoTranslateService as ɵj, InfoLastSearchModel as ɵk, InfoThemeService as ɵl, InfoDialogModel as ɵm, InfoTranslatePipe as ɵn, InfoMaskPipe as ɵo, InfoMaskDirective as ɵp, InfoUnmaskDirective as ɵq };
|
|
7818
7880
|
//# sourceMappingURL=info-library.js.map
|