info-library 2.10.72 → 2.10.73
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 +49 -9
- 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/esm2015/service/authentication.service.js +50 -5
- package/esm2015/service/theme.service.js +1 -1
- package/fesm2015/info-library.js +46 -5
- package/fesm2015/info-library.js.map +1 -1
- package/info-library.metadata.json +1 -1
- package/package.json +1 -1
- package/service/authentication.service.d.ts +6 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
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('moment'), require('@angular/
|
|
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', 'moment', '@angular/
|
|
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.moment, global.ng.
|
|
5
|
-
}(this, (function (exports, i0, textMaskCore, i3, i2, rxjs, operators, i6, i1, forms, core, materialMomentAdapter, createAutoCorrectedDatePipe, moment,
|
|
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/platform-browser'), require('@angular/cdk/overlay'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('text-mask-addons/dist/createAutoCorrectedDatePipe'), require('moment'), 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/platform-browser', '@angular/cdk/overlay', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'text-mask-addons/dist/createAutoCorrectedDatePipe', 'moment', '@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.platformBrowser, global.ng.cdk.overlay, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.createAutoCorrectedDatePipe, global.moment, 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, i8, i1, forms, core, materialMomentAdapter, createAutoCorrectedDatePipe, moment, 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
|
|
|
@@ -1547,14 +1547,18 @@
|
|
|
1547
1547
|
* @param {?} _plataforma
|
|
1548
1548
|
* @param {?} _dataService
|
|
1549
1549
|
* @param {?} _modal
|
|
1550
|
+
* @param {?} _translate
|
|
1551
|
+
* @param {?} _title
|
|
1550
1552
|
*/
|
|
1551
|
-
function InfoAuthenticationService(_router, _http, _sessao, _plataforma, _dataService, _modal) {
|
|
1553
|
+
function InfoAuthenticationService(_router, _http, _sessao, _plataforma, _dataService, _modal, _translate, _title) {
|
|
1552
1554
|
this._router = _router;
|
|
1553
1555
|
this._http = _http;
|
|
1554
1556
|
this._sessao = _sessao;
|
|
1555
1557
|
this._plataforma = _plataforma;
|
|
1556
1558
|
this._dataService = _dataService;
|
|
1557
1559
|
this._modal = _modal;
|
|
1560
|
+
this._translate = _translate;
|
|
1561
|
+
this._title = _title;
|
|
1558
1562
|
this._key = 'token';
|
|
1559
1563
|
this._keySessao = 'sessao';
|
|
1560
1564
|
this._sessionActive = true;
|
|
@@ -1773,6 +1777,7 @@
|
|
|
1773
1777
|
* @return {?}
|
|
1774
1778
|
*/
|
|
1775
1779
|
InfoAuthenticationService.prototype.logout = function () {
|
|
1780
|
+
this._http.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/Logout', null, { headers: this._dataService.getHeaderToken() }).toPromise();
|
|
1776
1781
|
this.removeSessao();
|
|
1777
1782
|
this._router.navigateByUrl('login').then(( /**
|
|
1778
1783
|
* @param {?} r
|
|
@@ -2029,6 +2034,8 @@
|
|
|
2029
2034
|
var aux = url.substring(1).replace(/-/g, '').toLowerCase().split('/');
|
|
2030
2035
|
/** @type {?} */
|
|
2031
2036
|
var tituloMenu = aux.length > 0 ? aux[0].toString() : url;
|
|
2037
|
+
/** @type {?} */
|
|
2038
|
+
var parametrosUrl = url.split('/').slice(2);
|
|
2032
2039
|
if (tituloMenu.indexOf('ashboard') > -1)
|
|
2033
2040
|
this._plataforma.PaginaAtiva = { Icone: 'widgets', Titulo: 'Dashboard' };
|
|
2034
2041
|
else {
|
|
@@ -2040,8 +2047,16 @@
|
|
|
2040
2047
|
* @param {?} m
|
|
2041
2048
|
* @return {?}
|
|
2042
2049
|
*/ m) { return m.Title.toLowerCase().indexOf(tituloMenu) > -1; }));
|
|
2043
|
-
|
|
2050
|
+
/** @type {?} */
|
|
2051
|
+
var subTitulo = "";
|
|
2052
|
+
for (var i = 0; i < parametrosUrl.length; i++) {
|
|
2053
|
+
if (!this.isGuid(parametrosUrl[i]) && isNaN(parseFloat(parametrosUrl[i])))
|
|
2054
|
+
subTitulo += " - " + this._translate.translate(this.toPascalCase(parametrosUrl[i]));
|
|
2055
|
+
}
|
|
2056
|
+
if (item != null && item.length > 0) {
|
|
2044
2057
|
this._plataforma.PaginaAtiva = { Icone: item[0].Icon, Titulo: item[0].Title };
|
|
2058
|
+
this._title.setTitle("Plataforma - " + this._translate.translate(item[0].Title) + subTitulo);
|
|
2059
|
+
}
|
|
2045
2060
|
else
|
|
2046
2061
|
this._plataforma.PaginaAtiva = { Icone: 'security', Titulo: 'Plataforma' };
|
|
2047
2062
|
}
|
|
@@ -2086,6 +2101,19 @@
|
|
|
2086
2101
|
InfoAuthenticationService.prototype.isGuid = function (value) {
|
|
2087
2102
|
return (value || '').match('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$') !== null;
|
|
2088
2103
|
};
|
|
2104
|
+
/**
|
|
2105
|
+
* @private
|
|
2106
|
+
* @param {?} value
|
|
2107
|
+
* @return {?}
|
|
2108
|
+
*/
|
|
2109
|
+
InfoAuthenticationService.prototype.toPascalCase = function (value) {
|
|
2110
|
+
return value.replace(/(^\w|-\w)/g, ( /**
|
|
2111
|
+
* @param {?} w1
|
|
2112
|
+
* @param {?} w2
|
|
2113
|
+
* @param {?} i
|
|
2114
|
+
* @return {?}
|
|
2115
|
+
*/function (w1, w2, i) { return i == 0 ? w1.toUpperCase() : w1[1].toUpperCase(); }));
|
|
2116
|
+
};
|
|
2089
2117
|
return InfoAuthenticationService;
|
|
2090
2118
|
}());
|
|
2091
2119
|
InfoAuthenticationService.decorators = [
|
|
@@ -2100,9 +2128,11 @@
|
|
|
2100
2128
|
{ type: InfoSessionModel },
|
|
2101
2129
|
{ type: InfoPlatformModel },
|
|
2102
2130
|
{ type: InfoDataService },
|
|
2103
|
-
{ type: i6.MatDialog }
|
|
2131
|
+
{ type: i6.MatDialog },
|
|
2132
|
+
{ type: InfoTranslateService },
|
|
2133
|
+
{ type: i8.Title }
|
|
2104
2134
|
]; };
|
|
2105
|
-
/** @nocollapse */ InfoAuthenticationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InfoAuthenticationService_Factory() { return new InfoAuthenticationService(i0.ɵɵinject(i3.Router), i0.ɵɵinject(i2.HttpClient), i0.ɵɵinject(InfoSessionModel), i0.ɵɵinject(InfoPlatformModel), i0.ɵɵinject(InfoDataService), i0.ɵɵinject(i6.MatDialog)); }, token: InfoAuthenticationService, providedIn: "root" });
|
|
2135
|
+
/** @nocollapse */ InfoAuthenticationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InfoAuthenticationService_Factory() { return new InfoAuthenticationService(i0.ɵɵinject(i3.Router), i0.ɵɵinject(i2.HttpClient), i0.ɵɵinject(InfoSessionModel), i0.ɵɵinject(InfoPlatformModel), i0.ɵɵinject(InfoDataService), i0.ɵɵinject(i6.MatDialog), i0.ɵɵinject(InfoTranslateService), i0.ɵɵinject(i8.Title)); }, token: InfoAuthenticationService, providedIn: "root" });
|
|
2106
2136
|
if (false) {
|
|
2107
2137
|
/**
|
|
2108
2138
|
* @type {?}
|
|
@@ -2154,6 +2184,16 @@
|
|
|
2154
2184
|
* @private
|
|
2155
2185
|
*/
|
|
2156
2186
|
InfoAuthenticationService.prototype._modal;
|
|
2187
|
+
/**
|
|
2188
|
+
* @type {?}
|
|
2189
|
+
* @private
|
|
2190
|
+
*/
|
|
2191
|
+
InfoAuthenticationService.prototype._translate;
|
|
2192
|
+
/**
|
|
2193
|
+
* @type {?}
|
|
2194
|
+
* @private
|
|
2195
|
+
*/
|
|
2196
|
+
InfoAuthenticationService.prototype._title;
|
|
2157
2197
|
}
|
|
2158
2198
|
var RefreshSessionTimeModalComponent = /** @class */ (function () {
|
|
2159
2199
|
/**
|
|
@@ -6467,7 +6507,7 @@
|
|
|
6467
6507
|
];
|
|
6468
6508
|
/** @nocollapse */
|
|
6469
6509
|
InfoEditorComponent.ctorParameters = function () { return [
|
|
6470
|
-
{ type:
|
|
6510
|
+
{ type: i8.DomSanitizer }
|
|
6471
6511
|
]; };
|
|
6472
6512
|
InfoEditorComponent.propDecorators = {
|
|
6473
6513
|
editor: [{ type: i0.ViewChild, args: ['editor',] }],
|