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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/material/dialog'), require('@angular/cdk/overlay'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('text-mask-
|
|
3
|
-
typeof define === 'function' && define.amd ? define('info-library', ['exports', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/material/dialog', '@angular/cdk/overlay', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'text-mask-
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['info-library'] = {}, global.ng.core, global.ng.router, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.material.dialog, global.ng.cdk.overlay, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.
|
|
5
|
-
}(this, (function (exports, i0, i3, i2, rxjs, operators, i6, i1, forms, core, materialMomentAdapter,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('text-mask-core/dist/textMaskCore'), require('@angular/router'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/material/dialog'), require('@angular/cdk/overlay'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('text-mask-addons/dist/createAutoCorrectedDatePipe'), require('@angular/cdk/keycodes'), require('@angular/common'), require('ng2-currency-mask'), require('@angular/material/card'), require('@angular/material/icon'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/list'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/datepicker'), require('@angular/material/progress-bar'), require('@angular/material/tooltip'), require('@angular/material/autocomplete'), require('@kolkov/angular-editor'), require('@angular/material/chips'), require('text-mask-addons/dist/emailMask')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('info-library', ['exports', '@angular/core', 'text-mask-core/dist/textMaskCore', '@angular/router', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/material/dialog', '@angular/cdk/overlay', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'text-mask-addons/dist/createAutoCorrectedDatePipe', '@angular/cdk/keycodes', '@angular/common', 'ng2-currency-mask', '@angular/material/card', '@angular/material/icon', '@angular/material/form-field', '@angular/material/input', '@angular/material/list', '@angular/material/select', '@angular/material/checkbox', '@angular/material/radio', '@angular/material/button', '@angular/material/datepicker', '@angular/material/progress-bar', '@angular/material/tooltip', '@angular/material/autocomplete', '@kolkov/angular-editor', '@angular/material/chips', 'text-mask-addons/dist/emailMask'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['info-library'] = {}, global.ng.core, global.textMaskCore, global.ng.router, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.material.dialog, global.ng.cdk.overlay, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.createAutoCorrectedDatePipe, global.ng.cdk.keycodes, global.ng.common, global.ng2CurrencyMask, global.ng.material.card, global.ng.material.icon, global.ng.material.formField, global.ng.material.input, global.ng.material.list, global.ng.material.select, global.ng.material.checkbox, global.ng.material.radio, global.ng.material.button, global.ng.material.datepicker, global.ng.material.progressBar, global.ng.material.tooltip, global.ng.material.autocomplete, global.angularEditor, global.ng.material.chips, global.emailMask));
|
|
5
|
+
}(this, (function (exports, i0, textMaskCore, i3, i2, rxjs, operators, i6, i1, forms, core, materialMomentAdapter, createAutoCorrectedDatePipe, keycodes, common, ng2CurrencyMask, card, icon, formField, input, list, select, checkbox, radio, button, datepicker, progressBar, tooltip, autocomplete, angularEditor, chips, emailMask) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -828,6 +828,55 @@
|
|
|
828
828
|
InfoTranslatePipe.prototype._translate;
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
+
/**
|
|
832
|
+
* @fileoverview added by tsickle
|
|
833
|
+
* Generated from: pipe/mask.pipe.ts
|
|
834
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
835
|
+
*/
|
|
836
|
+
var InfoMaskPipe = /** @class */ (function () {
|
|
837
|
+
function InfoMaskPipe() {
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* @param {?} value
|
|
841
|
+
* @param {?=} args
|
|
842
|
+
* @return {?}
|
|
843
|
+
*/
|
|
844
|
+
InfoMaskPipe.prototype.transform = function (value, args) {
|
|
845
|
+
if (!value)
|
|
846
|
+
return;
|
|
847
|
+
/** @type {?} */
|
|
848
|
+
var mask = [];
|
|
849
|
+
if (args == 'phone')
|
|
850
|
+
mask = ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/];
|
|
851
|
+
else if (args == 'cel')
|
|
852
|
+
mask = ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/];
|
|
853
|
+
else if (args == 'cep')
|
|
854
|
+
mask = [/\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/];
|
|
855
|
+
else if (args == 'cpf')
|
|
856
|
+
mask = [/\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '-', /\d/, /\d/];
|
|
857
|
+
else if (args == 'cnpj')
|
|
858
|
+
mask = [/\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/];
|
|
859
|
+
else
|
|
860
|
+
mask = Array.from(args).map(( /**
|
|
861
|
+
* @param {?} c
|
|
862
|
+
* @return {?}
|
|
863
|
+
*/function (/**
|
|
864
|
+
* @param {?} c
|
|
865
|
+
* @return {?}
|
|
866
|
+
*/ c) { return c == '0' ? /\d/ : c; }));
|
|
867
|
+
return textMaskCore.conformToMask(value, mask, { guide: false }).conformedValue;
|
|
868
|
+
};
|
|
869
|
+
return InfoMaskPipe;
|
|
870
|
+
}());
|
|
871
|
+
InfoMaskPipe.decorators = [
|
|
872
|
+
{ type: i0.Pipe, args: [{
|
|
873
|
+
name: 'mask',
|
|
874
|
+
pure: false
|
|
875
|
+
},] }
|
|
876
|
+
];
|
|
877
|
+
/** @nocollapse */
|
|
878
|
+
InfoMaskPipe.ctorParameters = function () { return []; };
|
|
879
|
+
|
|
831
880
|
/**
|
|
832
881
|
* @fileoverview added by tsickle
|
|
833
882
|
* Generated from: pipe/index.ts
|
|
@@ -1714,7 +1763,7 @@
|
|
|
1714
1763
|
InfoAuthenticationService.prototype.setResetarSenha = function (model) {
|
|
1715
1764
|
var _this = this;
|
|
1716
1765
|
return this._http
|
|
1717
|
-
.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/ResetarSenha', model
|
|
1766
|
+
.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/ResetarSenha', model)
|
|
1718
1767
|
.pipe(operators.map(( /**
|
|
1719
1768
|
* @param {?} r
|
|
1720
1769
|
* @return {?}
|
|
@@ -3137,6 +3186,13 @@
|
|
|
3137
3186
|
*/
|
|
3138
3187
|
InfoMenuCardComponent.prototype.load = function () {
|
|
3139
3188
|
this.menuRows = new Array();
|
|
3189
|
+
this.menu = this.menu == null ? null : this.menu.filter(( /**
|
|
3190
|
+
* @param {?} i
|
|
3191
|
+
* @return {?}
|
|
3192
|
+
*/function (/**
|
|
3193
|
+
* @param {?} i
|
|
3194
|
+
* @return {?}
|
|
3195
|
+
*/ i) { return i.permission == true; }));
|
|
3140
3196
|
if (this.menu == null || this.menu.length == 0 || this.cols == null || this.cols == 0) {
|
|
3141
3197
|
this.menuRows.push(this.menu);
|
|
3142
3198
|
this.colClass += this.col.toString();
|
|
@@ -3815,6 +3871,7 @@
|
|
|
3815
3871
|
* @param {?} _prop
|
|
3816
3872
|
* @param {?} _dataAccessService
|
|
3817
3873
|
* @param {?} _router
|
|
3874
|
+
* @param {?} _activatedRoute
|
|
3818
3875
|
* @param {?} _authenticationService
|
|
3819
3876
|
* @param {?} _changeDetectorRef
|
|
3820
3877
|
* @param {?} _translate
|
|
@@ -3822,13 +3879,14 @@
|
|
|
3822
3879
|
* @param {?} _renderer
|
|
3823
3880
|
* @param {?} _element
|
|
3824
3881
|
*/
|
|
3825
|
-
function InfoGridComponent(_dialog, _platform, modal, _prop, _dataAccessService, _router, _authenticationService, _changeDetectorRef, _translate, _lastSearch, _renderer, _element) {
|
|
3882
|
+
function InfoGridComponent(_dialog, _platform, modal, _prop, _dataAccessService, _router, _activatedRoute, _authenticationService, _changeDetectorRef, _translate, _lastSearch, _renderer, _element) {
|
|
3826
3883
|
this._dialog = _dialog;
|
|
3827
3884
|
this._platform = _platform;
|
|
3828
3885
|
this.modal = modal;
|
|
3829
3886
|
this._prop = _prop;
|
|
3830
3887
|
this._dataAccessService = _dataAccessService;
|
|
3831
3888
|
this._router = _router;
|
|
3889
|
+
this._activatedRoute = _activatedRoute;
|
|
3832
3890
|
this._authenticationService = _authenticationService;
|
|
3833
3891
|
this._changeDetectorRef = _changeDetectorRef;
|
|
3834
3892
|
this._translate = _translate;
|
|
@@ -3902,6 +3960,7 @@
|
|
|
3902
3960
|
this.colunasType = [];
|
|
3903
3961
|
this.colunasWidth = [];
|
|
3904
3962
|
this.currentUrl = null;
|
|
3963
|
+
this.url = null;
|
|
3905
3964
|
this.parentIdUrlChange = new i0.EventEmitter();
|
|
3906
3965
|
this.parentIdUrlValue = null;
|
|
3907
3966
|
this._cols = '';
|
|
@@ -3946,6 +4005,7 @@
|
|
|
3946
4005
|
* @return {?}
|
|
3947
4006
|
*/
|
|
3948
4007
|
InfoGridComponent.prototype.ngOnInit = function () {
|
|
4008
|
+
this.url = (this._activatedRoute.snapshot.data['URL'] || this._router.url).toLowerCase();
|
|
3949
4009
|
this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
|
|
3950
4010
|
this.setPagebarTitle();
|
|
3951
4011
|
if (this.searchmodel != null) {
|
|
@@ -3955,7 +4015,7 @@
|
|
|
3955
4015
|
}
|
|
3956
4016
|
else if (this.parent != null && (this.method == null || this.method == ''))
|
|
3957
4017
|
this.method = 'GetByParentId';
|
|
3958
|
-
if (!this.disablesearchlast && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.
|
|
4018
|
+
if (!this.disablesearchlast && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.url)) {
|
|
3959
4019
|
this.enabledSearch = this._lastSearch.enabledSearch;
|
|
3960
4020
|
if (this.searchmodel != null && this._lastSearch.model != null)
|
|
3961
4021
|
Object.assign(this.searchmodel, this._lastSearch.model);
|
|
@@ -3983,7 +4043,7 @@
|
|
|
3983
4043
|
* @param {?} model
|
|
3984
4044
|
* @return {?}
|
|
3985
4045
|
*/ model) { return _this.formSearch.addControl(model); }));
|
|
3986
|
-
if (!this.disablesearchlast && this.paged && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.
|
|
4046
|
+
if (!this.disablesearchlast && this.paged && this._authenticationService.getUrlGenerica(this._lastSearch.url) == this._authenticationService.getUrlGenerica(this.url))
|
|
3987
4047
|
this.paginator.index = this._lastSearch.index;
|
|
3988
4048
|
if (this.dynamiccols == null) {
|
|
3989
4049
|
this.setColumns();
|
|
@@ -4225,7 +4285,7 @@
|
|
|
4225
4285
|
var _this = this;
|
|
4226
4286
|
if (refreshPaginator === void 0) { refreshPaginator = false; }
|
|
4227
4287
|
if (!this.disablesearchlast) {
|
|
4228
|
-
this._lastSearch.url = this._authenticationService.getUrlGenerica(this.
|
|
4288
|
+
this._lastSearch.url = this._authenticationService.getUrlGenerica(this.url);
|
|
4229
4289
|
this._lastSearch.enabledSearch = this.enabledSearch;
|
|
4230
4290
|
this._lastSearch.model = Object.assign({}, this.searchmodel);
|
|
4231
4291
|
if (this.paged)
|
|
@@ -4295,7 +4355,7 @@
|
|
|
4295
4355
|
}
|
|
4296
4356
|
else {
|
|
4297
4357
|
if (this.newurl == null || this.newurl == '')
|
|
4298
|
-
this.newurl = this.
|
|
4358
|
+
this.newurl = this.url;
|
|
4299
4359
|
this.newurl += '/novo';
|
|
4300
4360
|
this.newurl = this.newurl.replace('//', '/');
|
|
4301
4361
|
this._router.navigateByUrl(this.newurl);
|
|
@@ -4333,7 +4393,7 @@
|
|
|
4333
4393
|
}
|
|
4334
4394
|
else {
|
|
4335
4395
|
if (this.viewurl == null || this.viewurl == '')
|
|
4336
|
-
this.viewurl = this.
|
|
4396
|
+
this.viewurl = this.url;
|
|
4337
4397
|
this.viewurl += '/' + model.Id + (this.enabledclickaccess ? '' : '/visualizar');
|
|
4338
4398
|
this.viewurl = this.viewurl.replace('//', '/');
|
|
4339
4399
|
this._router.navigateByUrl(this.viewurl);
|
|
@@ -4352,7 +4412,7 @@
|
|
|
4352
4412
|
}
|
|
4353
4413
|
else {
|
|
4354
4414
|
if (this.editurl == null || this.editurl == '')
|
|
4355
|
-
this.editurl = this.
|
|
4415
|
+
this.editurl = this.url;
|
|
4356
4416
|
this.editurl = this.editurl.replace('//', '/');
|
|
4357
4417
|
this._router.navigate([this.editurl, model.Id]);
|
|
4358
4418
|
}
|
|
@@ -4365,7 +4425,7 @@
|
|
|
4365
4425
|
}
|
|
4366
4426
|
else {
|
|
4367
4427
|
if (this.viewurl == null || this.viewurl == '')
|
|
4368
|
-
this.viewurl = this.
|
|
4428
|
+
this.viewurl = this.url;
|
|
4369
4429
|
this.viewurl += '/' + model.Id + (this.enabledclickaccess ? '' : '/visualizar');
|
|
4370
4430
|
this.viewurl = this.viewurl.replace('//', '/');
|
|
4371
4431
|
this._router.navigateByUrl(this.viewurl);
|
|
@@ -4552,11 +4612,9 @@
|
|
|
4552
4612
|
* @return {?}
|
|
4553
4613
|
*/
|
|
4554
4614
|
InfoGridComponent.prototype.getPermission = function () {
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
this.
|
|
4558
|
-
this.hasPermissionEdit = this._authenticationService.hasPermission(url, 'edit');
|
|
4559
|
-
this.hasPermissionDelete = this._authenticationService.hasPermission(url, 'remove');
|
|
4615
|
+
this.hasPermissionNew = this._authenticationService.hasPermission(this.url, 'new');
|
|
4616
|
+
this.hasPermissionEdit = this._authenticationService.hasPermission(this.url, 'edit');
|
|
4617
|
+
this.hasPermissionDelete = this._authenticationService.hasPermission(this.url, 'remove');
|
|
4560
4618
|
this._changeDetectorRef.detectChanges();
|
|
4561
4619
|
};
|
|
4562
4620
|
/**
|
|
@@ -4638,6 +4696,7 @@
|
|
|
4638
4696
|
{ type: InfoFormPropModel },
|
|
4639
4697
|
{ type: InfoDataService },
|
|
4640
4698
|
{ type: i3.Router },
|
|
4699
|
+
{ type: i3.ActivatedRoute },
|
|
4641
4700
|
{ type: InfoAuthenticationService },
|
|
4642
4701
|
{ type: i0.ChangeDetectorRef },
|
|
4643
4702
|
{ type: InfoTranslateService },
|
|
@@ -4846,6 +4905,8 @@
|
|
|
4846
4905
|
/** @type {?} */
|
|
4847
4906
|
InfoGridComponent.prototype.currentUrl;
|
|
4848
4907
|
/** @type {?} */
|
|
4908
|
+
InfoGridComponent.prototype.url;
|
|
4909
|
+
/** @type {?} */
|
|
4849
4910
|
InfoGridComponent.prototype.paginator;
|
|
4850
4911
|
/** @type {?} */
|
|
4851
4912
|
InfoGridComponent.prototype.parentIdUrlChange;
|
|
@@ -4877,6 +4938,11 @@
|
|
|
4877
4938
|
* @private
|
|
4878
4939
|
*/
|
|
4879
4940
|
InfoGridComponent.prototype._router;
|
|
4941
|
+
/**
|
|
4942
|
+
* @type {?}
|
|
4943
|
+
* @private
|
|
4944
|
+
*/
|
|
4945
|
+
InfoGridComponent.prototype._activatedRoute;
|
|
4880
4946
|
/**
|
|
4881
4947
|
* @type {?}
|
|
4882
4948
|
* @private
|
|
@@ -8337,6 +8403,7 @@
|
|
|
8337
8403
|
],
|
|
8338
8404
|
declarations: [
|
|
8339
8405
|
InfoTranslatePipe,
|
|
8406
|
+
InfoMaskPipe,
|
|
8340
8407
|
InfoMaskDirective,
|
|
8341
8408
|
InfoUnmaskDirective,
|
|
8342
8409
|
InfoAlertComponent,
|
|
@@ -8371,6 +8438,7 @@
|
|
|
8371
8438
|
],
|
|
8372
8439
|
exports: [
|
|
8373
8440
|
InfoTranslatePipe,
|
|
8441
|
+
InfoMaskPipe,
|
|
8374
8442
|
InfoAlertComponent,
|
|
8375
8443
|
InfoAutoCompleteComponent,
|
|
8376
8444
|
InfoBigCheckboxComponent,
|
|
@@ -8454,6 +8522,7 @@
|
|
|
8454
8522
|
exports.InfoLoadingComponent = InfoLoadingComponent;
|
|
8455
8523
|
exports.InfoLoginModel = InfoLoginModel;
|
|
8456
8524
|
exports.InfoMainComponent = InfoMainComponent;
|
|
8525
|
+
exports.InfoMaskPipe = InfoMaskPipe;
|
|
8457
8526
|
exports.InfoMenuCardComponent = InfoMenuCardComponent;
|
|
8458
8527
|
exports.InfoMessageComponent = InfoMessageComponent;
|
|
8459
8528
|
exports.InfoMethodGridButtonModel = InfoMethodGridButtonModel;
|
|
@@ -8491,8 +8560,9 @@
|
|
|
8491
8560
|
exports.ɵl = InfoThemeService;
|
|
8492
8561
|
exports.ɵm = InfoDialogModel;
|
|
8493
8562
|
exports.ɵn = InfoTranslatePipe;
|
|
8494
|
-
exports.ɵo =
|
|
8495
|
-
exports.ɵp =
|
|
8563
|
+
exports.ɵo = InfoMaskPipe;
|
|
8564
|
+
exports.ɵp = InfoMaskDirective;
|
|
8565
|
+
exports.ɵq = InfoUnmaskDirective;
|
|
8496
8566
|
|
|
8497
8567
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8498
8568
|
|