info-library 2.10.73 → 2.10.74

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.
@@ -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/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';
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('crypto-js'), 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', 'crypto-js', '@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.CryptoJS, 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, CryptoJS, i6, i9, 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
 
@@ -544,8 +544,8 @@
544
544
  */
545
545
  var InfoPlatformModel = /** @class */ (function () {
546
546
  function InfoPlatformModel() {
547
- this.TokenKey = 'token';
548
- this.SessionKey = 'sessao';
547
+ this.TokenKey = 'tk';
548
+ this.SessionKey = 'ss';
549
549
  this.ConfigIsNull = true;
550
550
  this.Themes = [];
551
551
  this.Config = new InfoAppConfigModel();
@@ -1246,6 +1246,262 @@
1246
1246
  return typeof state === "function" ? receiver === state : state.has(receiver);
1247
1247
  }
1248
1248
 
1249
+ /**
1250
+ * @fileoverview added by tsickle
1251
+ * Generated from: utils/utilities.ts
1252
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1253
+ */
1254
+ var Utilities = /** @class */ (function () {
1255
+ function Utilities() {
1256
+ }
1257
+ /**
1258
+ * @return {?}
1259
+ */
1260
+ Utilities.prototype.getGuid = function () {
1261
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, ( /**
1262
+ * @param {?} c
1263
+ * @return {?}
1264
+ */function (c) {
1265
+ /** @type {?} */
1266
+ var r = Math.random() * 16 | 0;
1267
+ /** @type {?} */
1268
+ var v = c === 'x' ? r : (r & 0x3 | 0x8);
1269
+ return v.toString(16);
1270
+ }));
1271
+ };
1272
+ /**
1273
+ * @return {?}
1274
+ */
1275
+ Utilities.prototype.getGuidEmpty = function () {
1276
+ return '00000000-0000-0000-0000-000000000000';
1277
+ };
1278
+ /**
1279
+ * @param {?} value
1280
+ * @return {?}
1281
+ */
1282
+ Utilities.prototype.isGuid = function (value) {
1283
+ 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;
1284
+ };
1285
+ /**
1286
+ * @param {?} base64
1287
+ * @return {?}
1288
+ */
1289
+ Utilities.prototype.base64ToArrayBuffer = function (base64) {
1290
+ /** @type {?} */
1291
+ var binaryString = window.atob(base64);
1292
+ /** @type {?} */
1293
+ var binaryLen = binaryString.length;
1294
+ /** @type {?} */
1295
+ var bytes = new Uint8Array(binaryLen);
1296
+ for (var i = 0; i < binaryLen; i++) {
1297
+ /** @type {?} */
1298
+ var ascii = binaryString.charCodeAt(i);
1299
+ bytes[i] = ascii;
1300
+ }
1301
+ return bytes;
1302
+ };
1303
+ /**
1304
+ * @param {?} title
1305
+ * @param {?} blob
1306
+ * @return {?}
1307
+ */
1308
+ Utilities.prototype.openOrDownload = function (title, blob) {
1309
+ /** @type {?} */
1310
+ var fileURL = URL.createObjectURL(blob);
1311
+ if (title.indexOf("pdf") > -1)
1312
+ window.open(fileURL, title);
1313
+ else {
1314
+ /** @type {?} */
1315
+ var elementA = ( /** @type {?} */(document.createElement('a')));
1316
+ elementA.href = fileURL;
1317
+ elementA.download = title;
1318
+ document.body.appendChild(elementA);
1319
+ elementA.click();
1320
+ document.body.removeChild(elementA);
1321
+ }
1322
+ };
1323
+ /**
1324
+ * @param {?} val
1325
+ * @return {?}
1326
+ */
1327
+ Utilities.prototype.removerAcentos = function (val) {
1328
+ if (val == null)
1329
+ return '';
1330
+ /** @type {?} */
1331
+ var normalizeFunction = String.prototype.normalize ? ( /**
1332
+ * @param {?} str
1333
+ * @return {?}
1334
+ */function (str) { return str.normalize('NFD'); }) : ( /**
1335
+ * @param {?} str
1336
+ * @return {?}
1337
+ */function (str) { return str; });
1338
+ return normalizeFunction(val).replace(/[\u0300-\u036f]/g, "");
1339
+ };
1340
+ /**
1341
+ * @return {?}
1342
+ */
1343
+ Utilities.prototype.getFormatos = function () {
1344
+ return [{ Id: "EXCEL", Nome: "Excel", MimeType: "application/vnd.ms-excel", Extensao: "xls" },
1345
+ { Id: "PDF", Nome: "PDF", MimeType: "application/pdf", Extensao: "pdf" }];
1346
+ };
1347
+ /**
1348
+ * @return {?}
1349
+ */
1350
+ Utilities.prototype.getFormatosExcel = function () {
1351
+ return [{ Id: 'PP', Nome: 'Excel Português com Separador Decimal [.]' },
1352
+ { Id: 'PV', Nome: 'Excel Português com Separador Decimal [,]' },
1353
+ { Id: 'IP', Nome: 'Excel Inglês com Separador Decimal [.]' },
1354
+ { Id: 'IV', Nome: 'Excel Inglês com Separador Decimal [,]' }];
1355
+ };
1356
+ /**
1357
+ * @return {?}
1358
+ */
1359
+ Utilities.prototype.getStatus = function () {
1360
+ return [{ Id: "A", Nome: "Ativo" },
1361
+ { Id: "P", Nome: "Pendente" }];
1362
+ };
1363
+ /**
1364
+ * @return {?}
1365
+ */
1366
+ Utilities.prototype.getStatusCompleto = function () {
1367
+ return [{ Id: "C", Nome: "Cadastrado", Selecionado: true },
1368
+ { Id: "F", Nome: "Feito", Selecionado: false },
1369
+ { Id: "O", Nome: "Conferido", Selecionado: true },
1370
+ { Id: "R", Nome: "Rejeitado", Selecionado: false },
1371
+ { Id: "I", Nome: "Inativo", Selecionado: false }];
1372
+ };
1373
+ /**
1374
+ * @return {?}
1375
+ */
1376
+ Utilities.prototype.getStatusProcessamento = function () {
1377
+ return [{ Id: "A", Nome: "AguardandoProcessamento" },
1378
+ { Id: "E", Nome: "EmProcessamento" },
1379
+ { Id: "P", Nome: "Processado" },
1380
+ { Id: "I", Nome: "Inativo" },
1381
+ { Id: "Z", Nome: "Erro" }];
1382
+ };
1383
+ /**
1384
+ * @return {?}
1385
+ */
1386
+ Utilities.prototype.getFormatoIdiomas = function () {
1387
+ return [{ Id: "en", Nome: "English" },
1388
+ { Id: "pt-BR", Nome: "Português" }];
1389
+ };
1390
+ /**
1391
+ * @return {?}
1392
+ */
1393
+ Utilities.prototype.getGeneros = function () {
1394
+ return [{ Id: 'M', Nome: 'Masculino' },
1395
+ { Id: 'F', Nome: 'Feminino' }];
1396
+ };
1397
+ /**
1398
+ * @return {?}
1399
+ */
1400
+ Utilities.prototype.getTiposEvidencia = function () {
1401
+ return [{ Id: 1, Nome: 'Telefone' },
1402
+ { Id: 2, Nome: 'Email' },
1403
+ { Id: 3, Nome: 'Documento' }];
1404
+ };
1405
+ /**
1406
+ * @return {?}
1407
+ */
1408
+ Utilities.prototype.getOrdens = function () {
1409
+ return [{ Id: "nome-asc", Nome: "NomeCrescente" },
1410
+ { Id: "nome-desc", Nome: "NomeDecrescente" },
1411
+ { Id: "valor-asc", Nome: "ValorCrescente" },
1412
+ { Id: "valor-desc", Nome: "ValorDecrescente" }];
1413
+ };
1414
+ /**
1415
+ * @param {?} form
1416
+ * @param {?} value
1417
+ * @param {?} control
1418
+ * @return {?}
1419
+ */
1420
+ Utilities.prototype.validarEmail = function (form, value, control) {
1421
+ if (!value)
1422
+ return;
1423
+ /** @type {?} */
1424
+ var pattern = /^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/;
1425
+ /** @type {?} */
1426
+ var emails = value.split(';');
1427
+ /** @type {?} */
1428
+ var invalido = emails.some(( /**
1429
+ * @param {?} email
1430
+ * @return {?}
1431
+ */function (/**
1432
+ * @param {?} email
1433
+ * @return {?}
1434
+ */ email) { return email && !pattern.test(email.trim()); }));
1435
+ if (invalido)
1436
+ form.form.controls[control].setErrors({ 'invalid': true });
1437
+ };
1438
+ /**
1439
+ * @param {?} key
1440
+ * @param {?} value
1441
+ * @return {?}
1442
+ */
1443
+ Utilities.prototype.setLocalStorage = function (key, value) {
1444
+ localStorage.setItem(key, this.criptografar(value));
1445
+ };
1446
+ /**
1447
+ * @param {?} key
1448
+ * @return {?}
1449
+ */
1450
+ Utilities.prototype.getLocalStorage = function (key) {
1451
+ /** @type {?} */
1452
+ var data = this.descriptografar(localStorage.getItem(key));
1453
+ if (data == null || data == '')
1454
+ return null;
1455
+ return data;
1456
+ };
1457
+ /**
1458
+ * @return {?}
1459
+ */
1460
+ Utilities.prototype.isIE = function () {
1461
+ /** @type {?} */
1462
+ var userAgent = navigator.userAgent;
1463
+ return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1;
1464
+ };
1465
+ /**
1466
+ * @param {?} texto
1467
+ * @return {?}
1468
+ */
1469
+ Utilities.prototype.retornaTexto = function (texto) {
1470
+ /** @type {?} */
1471
+ var div = document.createElement("div");
1472
+ div.innerHTML = texto;
1473
+ return div.innerText || div.textContent;
1474
+ };
1475
+ /**
1476
+ * @param {?} texto
1477
+ * @return {?}
1478
+ */
1479
+ Utilities.prototype.criptografar = function (texto) {
1480
+ try {
1481
+ return CryptoJS.AES.encrypt(texto, "GKxLtQg2at").toString();
1482
+ }
1483
+ catch (e) {
1484
+ return null;
1485
+ }
1486
+ };
1487
+ /**
1488
+ * @param {?} texto
1489
+ * @return {?}
1490
+ */
1491
+ Utilities.prototype.descriptografar = function (texto) {
1492
+ try {
1493
+ return CryptoJS.AES.decrypt(texto, "GKxLtQg2at").toString(CryptoJS.enc.Utf8);
1494
+ }
1495
+ catch (e) {
1496
+ return null;
1497
+ }
1498
+ };
1499
+ return Utilities;
1500
+ }());
1501
+ Utilities.decorators = [
1502
+ { type: i0.Injectable }
1503
+ ];
1504
+
1249
1505
  /**
1250
1506
  * @fileoverview added by tsickle
1251
1507
  * Generated from: service/data.service.ts
@@ -1257,19 +1513,20 @@
1257
1513
  * @param {?} _http
1258
1514
  * @param {?} _router
1259
1515
  * @param {?} _plataforma
1516
+ * @param {?} _utilities
1260
1517
  */
1261
- function InfoDataService(_apiController, _http, _router, _plataforma) {
1518
+ function InfoDataService(_apiController, _http, _router, _plataforma, _utilities) {
1262
1519
  this._apiController = _apiController;
1263
1520
  this._http = _http;
1264
1521
  this._router = _router;
1265
1522
  this._plataforma = _plataforma;
1266
- this._key = 'token';
1523
+ this._utilities = _utilities;
1267
1524
  }
1268
1525
  /**
1269
1526
  * @return {?}
1270
1527
  */
1271
1528
  InfoDataService.prototype.getToken = function () {
1272
- this.token = localStorage.getItem(this._key);
1529
+ this.token = this._utilities.getLocalStorage(this._plataforma.TokenKey);
1273
1530
  if (this.token == null) {
1274
1531
  this._router.navigateByUrl('');
1275
1532
  return '';
@@ -1503,15 +1760,11 @@
1503
1760
  { type: undefined, decorators: [{ type: i0.Inject, args: [APICONTROLLER_CONFIG,] }] },
1504
1761
  { type: i2.HttpClient },
1505
1762
  { type: i3.Router },
1506
- { type: InfoPlatformModel }
1763
+ { type: InfoPlatformModel },
1764
+ { type: Utilities }
1507
1765
  ]; };
1508
- /** @nocollapse */ InfoDataService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InfoDataService_Factory() { return new InfoDataService(i0.ɵɵinject(APICONTROLLER_CONFIG), i0.ɵɵinject(i2.HttpClient), i0.ɵɵinject(i3.Router), i0.ɵɵinject(InfoPlatformModel)); }, token: InfoDataService, providedIn: "root" });
1766
+ /** @nocollapse */ InfoDataService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InfoDataService_Factory() { return new InfoDataService(i0.ɵɵinject(APICONTROLLER_CONFIG), i0.ɵɵinject(i2.HttpClient), i0.ɵɵinject(i3.Router), i0.ɵɵinject(InfoPlatformModel), i0.ɵɵinject(Utilities)); }, token: InfoDataService, providedIn: "root" });
1509
1767
  if (false) {
1510
- /**
1511
- * @type {?}
1512
- * @private
1513
- */
1514
- InfoDataService.prototype._key;
1515
1768
  /**
1516
1769
  * @type {?}
1517
1770
  * @private
@@ -1537,6 +1790,11 @@
1537
1790
  * @private
1538
1791
  */
1539
1792
  InfoDataService.prototype._plataforma;
1793
+ /**
1794
+ * @type {?}
1795
+ * @private
1796
+ */
1797
+ InfoDataService.prototype._utilities;
1540
1798
  }
1541
1799
 
1542
1800
  var InfoAuthenticationService = /** @class */ (function () {
@@ -1547,20 +1805,20 @@
1547
1805
  * @param {?} _plataforma
1548
1806
  * @param {?} _dataService
1549
1807
  * @param {?} _modal
1808
+ * @param {?} _utilities
1550
1809
  * @param {?} _translate
1551
1810
  * @param {?} _title
1552
1811
  */
1553
- function InfoAuthenticationService(_router, _http, _sessao, _plataforma, _dataService, _modal, _translate, _title) {
1812
+ function InfoAuthenticationService(_router, _http, _sessao, _plataforma, _dataService, _modal, _utilities, _translate, _title) {
1554
1813
  this._router = _router;
1555
1814
  this._http = _http;
1556
1815
  this._sessao = _sessao;
1557
1816
  this._plataforma = _plataforma;
1558
1817
  this._dataService = _dataService;
1559
1818
  this._modal = _modal;
1819
+ this._utilities = _utilities;
1560
1820
  this._translate = _translate;
1561
1821
  this._title = _title;
1562
- this._key = 'token';
1563
- this._keySessao = 'sessao';
1564
1822
  this._sessionActive = true;
1565
1823
  }
1566
1824
  /**
@@ -1647,7 +1905,7 @@
1647
1905
  * @return {?}
1648
1906
  */
1649
1907
  InfoAuthenticationService.prototype.isLogged = function () {
1650
- return (localStorage.getItem(this._key) != null);
1908
+ return (this._utilities.getLocalStorage(this._plataforma.TokenKey) != null);
1651
1909
  };
1652
1910
  /**
1653
1911
  * @return {?}
@@ -1725,7 +1983,7 @@
1725
1983
  * @return {?}
1726
1984
  */function (r) {
1727
1985
  if (r.Success && r.Data != null)
1728
- localStorage.setItem(_this._key, r.Data.Token);
1986
+ _this._utilities.setLocalStorage(_this._plataforma.TokenKey, r.Data.Token);
1729
1987
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1730
1988
  })), operators.catchError(( /**
1731
1989
  * @param {?} e
@@ -1746,7 +2004,7 @@
1746
2004
  * @return {?}
1747
2005
  */function (r) {
1748
2006
  if (r.Success && r.Data != null)
1749
- localStorage.setItem(_this._key, r.Data);
2007
+ _this._utilities.setLocalStorage(_this._plataforma.TokenKey, r.Data);
1750
2008
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1751
2009
  })), operators.catchError(( /**
1752
2010
  * @param {?} e
@@ -1766,7 +2024,7 @@
1766
2024
  * @return {?}
1767
2025
  */function (r) {
1768
2026
  if (r.Success && r.Data != null)
1769
- localStorage.setItem(_this._key, r.Data);
2027
+ _this._utilities.setLocalStorage(_this._plataforma.TokenKey, r.Data);
1770
2028
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1771
2029
  })), operators.catchError(( /**
1772
2030
  * @param {?} e
@@ -1777,15 +2035,20 @@
1777
2035
  * @return {?}
1778
2036
  */
1779
2037
  InfoAuthenticationService.prototype.logout = function () {
1780
- this._http.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/Logout', null, { headers: this._dataService.getHeaderToken() }).toPromise();
1781
- this.removeSessao();
1782
- this._router.navigateByUrl('login').then(( /**
1783
- * @param {?} r
1784
- * @return {?}
1785
- */function (/**
1786
- * @param {?} r
1787
- * @return {?}
1788
- */ r) { location.reload(); }));
2038
+ var _this = this;
2039
+ this._http.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/Logout', null, { headers: this._dataService.getHeaderToken() })
2040
+ .subscribe(( /**
2041
+ * @return {?}
2042
+ */function () {
2043
+ _this.removeSessao();
2044
+ _this._router.navigateByUrl('login').then(( /**
2045
+ * @param {?} r
2046
+ * @return {?}
2047
+ */function (/**
2048
+ * @param {?} r
2049
+ * @return {?}
2050
+ */ r) { location.reload(); }));
2051
+ }));
1789
2052
  };
1790
2053
  /**
1791
2054
  * @param {?} url
@@ -1947,8 +2210,6 @@
1947
2210
  * @param {?} ret
1948
2211
  * @return {?}
1949
2212
  */ ret) {
1950
- /** @type {?} */
1951
- var permissao = true;
1952
2213
  if (ret.success) {
1953
2214
  if (ret.data == null) {
1954
2215
  _this.logout();
@@ -1977,9 +2238,9 @@
1977
2238
  * @param {?} s
1978
2239
  * @return {?}
1979
2240
  */ s) { return s.URL == urlGenerica; }));
1980
- localStorage.setItem(_this._keySessao, JSON.stringify(_this._sessao));
2241
+ _this._utilities.setLocalStorage(_this._plataforma.SessionKey, JSON.stringify(_this._sessao));
1981
2242
  }
1982
- return permissao;
2243
+ return true;
1983
2244
  })), operators.catchError(( /**
1984
2245
  * @param {?} error
1985
2246
  * @return {?}
@@ -2129,21 +2390,12 @@
2129
2390
  { type: InfoPlatformModel },
2130
2391
  { type: InfoDataService },
2131
2392
  { type: i6.MatDialog },
2393
+ { type: Utilities },
2132
2394
  { type: InfoTranslateService },
2133
- { type: i8.Title }
2395
+ { type: i9.Title }
2134
2396
  ]; };
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" });
2397
+ /** @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(Utilities), i0.ɵɵinject(InfoTranslateService), i0.ɵɵinject(i9.Title)); }, token: InfoAuthenticationService, providedIn: "root" });
2136
2398
  if (false) {
2137
- /**
2138
- * @type {?}
2139
- * @private
2140
- */
2141
- InfoAuthenticationService.prototype._key;
2142
- /**
2143
- * @type {?}
2144
- * @private
2145
- */
2146
- InfoAuthenticationService.prototype._keySessao;
2147
2399
  /**
2148
2400
  * @type {?}
2149
2401
  * @private
@@ -2184,6 +2436,11 @@
2184
2436
  * @private
2185
2437
  */
2186
2438
  InfoAuthenticationService.prototype._modal;
2439
+ /**
2440
+ * @type {?}
2441
+ * @private
2442
+ */
2443
+ InfoAuthenticationService.prototype._utilities;
2187
2444
  /**
2188
2445
  * @type {?}
2189
2446
  * @private
@@ -6507,7 +6764,7 @@
6507
6764
  ];
6508
6765
  /** @nocollapse */
6509
6766
  InfoEditorComponent.ctorParameters = function () { return [
6510
- { type: i8.DomSanitizer }
6767
+ { type: i9.DomSanitizer }
6511
6768
  ]; };
6512
6769
  InfoEditorComponent.propDecorators = {
6513
6770
  editor: [{ type: i0.ViewChild, args: ['editor',] }],
@@ -6911,8 +7168,9 @@
6911
7168
  * @param {?} _themeService
6912
7169
  * @param {?} _renderer
6913
7170
  * @param {?} _element
7171
+ * @param {?} _utilities
6914
7172
  */
6915
- function InfoMainComponent(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element) {
7173
+ function InfoMainComponent(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element, _utilities) {
6916
7174
  this._platform = _platform;
6917
7175
  this._session = _session;
6918
7176
  this._router = _router;
@@ -6920,6 +7178,7 @@
6920
7178
  this._themeService = _themeService;
6921
7179
  this._renderer = _renderer;
6922
7180
  this._element = _element;
7181
+ this._utilities = _utilities;
6923
7182
  this.opened = false;
6924
7183
  this.version = null;
6925
7184
  this.messages = [];
@@ -6967,13 +7226,12 @@
6967
7226
  * @return {?}
6968
7227
  */
6969
7228
  InfoMainComponent.prototype.ngOnInit = function () {
6970
- //console.log('info-library.main.ngOnInit');
6971
7229
  this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
6972
7230
  if (this._platform.Config.topMenu)
6973
7231
  this._renderer.addClass(this._element.nativeElement, 'topmenu');
6974
7232
  this._platform.Themes = this.themes;
6975
7233
  this._platform.ShortcutApi = this.shortcutapi;
6976
- if (localStorage.getItem(this._platform.TokenKey) == null)
7234
+ if (this._utilities.getLocalStorage(this._platform.TokenKey) == null)
6977
7235
  this._router.navigateByUrl(this.loginurl);
6978
7236
  else
6979
7237
  this.getLoggedUser();
@@ -7002,8 +7260,10 @@
7002
7260
  */
7003
7261
  InfoMainComponent.prototype.getLoggedUser = function () {
7004
7262
  var _this = this;
7005
- if (localStorage.getItem(this._platform.SessionKey) != null)
7006
- Object.assign(this._session, JSON.parse(localStorage.getItem(this._platform.SessionKey)));
7263
+ /** @type {?} */
7264
+ var cSession = this._utilities.getLocalStorage(this._platform.SessionKey);
7265
+ if (cSession != null)
7266
+ Object.assign(this._session, JSON.parse(cSession));
7007
7267
  if (this._session.UsuarioId != null || this.loggeduserapi == null)
7008
7268
  return;
7009
7269
  this._dataAccessService.get(this.loggeduserapi, this.loggedusermethod).subscribe(( /**
@@ -7083,7 +7343,8 @@
7083
7343
  { type: InfoDataService },
7084
7344
  { type: InfoThemeService },
7085
7345
  { type: i0.Renderer2 },
7086
- { type: i0.ElementRef }
7346
+ { type: i0.ElementRef },
7347
+ { type: Utilities }
7087
7348
  ]; };
7088
7349
  InfoMainComponent.propDecorators = {
7089
7350
  opened: [{ type: i0.Input }],
@@ -7198,6 +7459,11 @@
7198
7459
  * @private
7199
7460
  */
7200
7461
  InfoMainComponent.prototype._element;
7462
+ /**
7463
+ * @type {?}
7464
+ * @private
7465
+ */
7466
+ InfoMainComponent.prototype._utilities;
7201
7467
  }
7202
7468
 
7203
7469
  /**
@@ -7450,8 +7716,9 @@
7450
7716
  * @param {?} _modal
7451
7717
  * @param {?} _renderer
7452
7718
  * @param {?} _element
7719
+ * @param {?} _utilities
7453
7720
  */
7454
- function InfoTopbarComponent(_translateService, _authenticationService, _dataService, _themeService, _router, _dialog, _session, _platform, _modal, _renderer, _element) {
7721
+ function InfoTopbarComponent(_translateService, _authenticationService, _dataService, _themeService, _router, _dialog, _session, _platform, _modal, _renderer, _element, _utilities) {
7455
7722
  this._translateService = _translateService;
7456
7723
  this._authenticationService = _authenticationService;
7457
7724
  this._dataService = _dataService;
@@ -7463,6 +7730,7 @@
7463
7730
  this._modal = _modal;
7464
7731
  this._renderer = _renderer;
7465
7732
  this._element = _element;
7733
+ this._utilities = _utilities;
7466
7734
  this.opened = false;
7467
7735
  this.languages = [];
7468
7736
  this.themes = [];
@@ -7522,7 +7790,7 @@
7522
7790
  _this._session.TemaId = company.TemaId;
7523
7791
  _this._themeService.setThemeByLoggedCompany();
7524
7792
  localStorage.removeItem("Dashboard");
7525
- localStorage.setItem(_this._platform.SessionKey, JSON.stringify(_this._session));
7793
+ _this._utilities.setLocalStorage(_this._platform.SessionKey, JSON.stringify(_this._session));
7526
7794
  _this._router.navigateByUrl('').then(( /**
7527
7795
  * @param {?} r
7528
7796
  * @return {?}
@@ -7553,7 +7821,6 @@
7553
7821
  * @return {?}
7554
7822
  */
7555
7823
  InfoTopbarComponent.prototype.setTheme = function (theme) {
7556
- //console.log('topbar.setTheme', theme);
7557
7824
  this._themeService.setTheme(theme);
7558
7825
  };
7559
7826
  /**
@@ -7731,7 +7998,8 @@
7731
7998
  { type: InfoPlatformModel },
7732
7999
  { type: i6.MatDialog },
7733
8000
  { type: i0.Renderer2 },
7734
- { type: i0.ElementRef }
8001
+ { type: i0.ElementRef },
8002
+ { type: Utilities }
7735
8003
  ]; };
7736
8004
  InfoTopbarComponent.propDecorators = {
7737
8005
  opened: [{ type: i0.Input }],
@@ -7840,6 +8108,11 @@
7840
8108
  * @private
7841
8109
  */
7842
8110
  InfoTopbarComponent.prototype._element;
8111
+ /**
8112
+ * @type {?}
8113
+ * @private
8114
+ */
8115
+ InfoTopbarComponent.prototype._utilities;
7843
8116
  }
7844
8117
 
7845
8118
  /**
@@ -8920,6 +9193,9 @@
8920
9193
  InfoDialogComponent,
8921
9194
  AtalhoModalComponent,
8922
9195
  RefreshSessionTimeModalComponent
9196
+ ],
9197
+ providers: [
9198
+ Utilities
8923
9199
  ]
8924
9200
  },] }
8925
9201
  ];
@@ -8997,18 +9273,19 @@
8997
9273
  exports.ɵc = AtalhoModalComponent;
8998
9274
  exports.ɵd = InfoDataService;
8999
9275
  exports.ɵe = InfoPlatformModel;
9000
- exports.ɵf = InfoFormPropModel;
9001
- exports.ɵg = InfoAuthenticationService;
9002
- exports.ɵh = RefreshSessionTimeModalComponent;
9003
- exports.ɵi = InfoSessionModel;
9004
- exports.ɵj = InfoTranslateService;
9005
- exports.ɵk = InfoLastSearchModel;
9006
- exports.ɵl = InfoThemeService;
9007
- exports.ɵm = InfoDialogModel;
9008
- exports.ɵn = InfoTranslatePipe;
9009
- exports.ɵo = InfoMaskPipe;
9010
- exports.ɵp = InfoMaskDirective;
9011
- exports.ɵq = InfoUnmaskDirective;
9276
+ exports.ɵf = Utilities;
9277
+ exports.ɵg = InfoFormPropModel;
9278
+ exports.ɵh = InfoAuthenticationService;
9279
+ exports.ɵi = RefreshSessionTimeModalComponent;
9280
+ exports.ɵj = InfoSessionModel;
9281
+ exports.ɵk = InfoTranslateService;
9282
+ exports.ɵl = InfoLastSearchModel;
9283
+ exports.ɵm = InfoThemeService;
9284
+ exports.ɵn = InfoDialogModel;
9285
+ exports.ɵo = InfoTranslatePipe;
9286
+ exports.ɵp = InfoMaskPipe;
9287
+ exports.ɵq = InfoMaskDirective;
9288
+ exports.ɵr = InfoUnmaskDirective;
9012
9289
 
9013
9290
  Object.defineProperty(exports, '__esModule', { value: true });
9014
9291