info-library 2.10.73 → 2.10.75

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,32 @@
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
2038
+ var _this = this;
2039
+ if (this.isLogged()) {
2040
+ this._http.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/Logout', null, { headers: this._dataService.getHeaderToken() })
2041
+ .subscribe(( /**
1787
2042
  * @return {?}
1788
- */ r) { location.reload(); }));
2043
+ */function () {
2044
+ _this.removeSessao();
2045
+ _this._router.navigateByUrl('login').then(( /**
2046
+ * @param {?} r
2047
+ * @return {?}
2048
+ */function (/**
2049
+ * @param {?} r
2050
+ * @return {?}
2051
+ */ r) { location.reload(); }));
2052
+ }));
2053
+ }
2054
+ else {
2055
+ this.removeSessao();
2056
+ this._router.navigateByUrl('login').then(( /**
2057
+ * @param {?} r
2058
+ * @return {?}
2059
+ */function (/**
2060
+ * @param {?} r
2061
+ * @return {?}
2062
+ */ r) { location.reload(); }));
2063
+ }
1789
2064
  };
1790
2065
  /**
1791
2066
  * @param {?} url
@@ -1947,8 +2222,6 @@
1947
2222
  * @param {?} ret
1948
2223
  * @return {?}
1949
2224
  */ ret) {
1950
- /** @type {?} */
1951
- var permissao = true;
1952
2225
  if (ret.success) {
1953
2226
  if (ret.data == null) {
1954
2227
  _this.logout();
@@ -1977,9 +2250,9 @@
1977
2250
  * @param {?} s
1978
2251
  * @return {?}
1979
2252
  */ s) { return s.URL == urlGenerica; }));
1980
- localStorage.setItem(_this._keySessao, JSON.stringify(_this._sessao));
2253
+ _this._utilities.setLocalStorage(_this._plataforma.SessionKey, JSON.stringify(_this._sessao));
1981
2254
  }
1982
- return permissao;
2255
+ return true;
1983
2256
  })), operators.catchError(( /**
1984
2257
  * @param {?} error
1985
2258
  * @return {?}
@@ -2129,21 +2402,12 @@
2129
2402
  { type: InfoPlatformModel },
2130
2403
  { type: InfoDataService },
2131
2404
  { type: i6.MatDialog },
2405
+ { type: Utilities },
2132
2406
  { type: InfoTranslateService },
2133
- { type: i8.Title }
2407
+ { type: i9.Title }
2134
2408
  ]; };
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" });
2409
+ /** @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
2410
  if (false) {
2137
- /**
2138
- * @type {?}
2139
- * @private
2140
- */
2141
- InfoAuthenticationService.prototype._key;
2142
- /**
2143
- * @type {?}
2144
- * @private
2145
- */
2146
- InfoAuthenticationService.prototype._keySessao;
2147
2411
  /**
2148
2412
  * @type {?}
2149
2413
  * @private
@@ -2184,6 +2448,11 @@
2184
2448
  * @private
2185
2449
  */
2186
2450
  InfoAuthenticationService.prototype._modal;
2451
+ /**
2452
+ * @type {?}
2453
+ * @private
2454
+ */
2455
+ InfoAuthenticationService.prototype._utilities;
2187
2456
  /**
2188
2457
  * @type {?}
2189
2458
  * @private
@@ -6507,7 +6776,7 @@
6507
6776
  ];
6508
6777
  /** @nocollapse */
6509
6778
  InfoEditorComponent.ctorParameters = function () { return [
6510
- { type: i8.DomSanitizer }
6779
+ { type: i9.DomSanitizer }
6511
6780
  ]; };
6512
6781
  InfoEditorComponent.propDecorators = {
6513
6782
  editor: [{ type: i0.ViewChild, args: ['editor',] }],
@@ -6911,8 +7180,9 @@
6911
7180
  * @param {?} _themeService
6912
7181
  * @param {?} _renderer
6913
7182
  * @param {?} _element
7183
+ * @param {?} _utilities
6914
7184
  */
6915
- function InfoMainComponent(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element) {
7185
+ function InfoMainComponent(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element, _utilities) {
6916
7186
  this._platform = _platform;
6917
7187
  this._session = _session;
6918
7188
  this._router = _router;
@@ -6920,6 +7190,7 @@
6920
7190
  this._themeService = _themeService;
6921
7191
  this._renderer = _renderer;
6922
7192
  this._element = _element;
7193
+ this._utilities = _utilities;
6923
7194
  this.opened = false;
6924
7195
  this.version = null;
6925
7196
  this.messages = [];
@@ -6967,13 +7238,12 @@
6967
7238
  * @return {?}
6968
7239
  */
6969
7240
  InfoMainComponent.prototype.ngOnInit = function () {
6970
- //console.log('info-library.main.ngOnInit');
6971
7241
  this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
6972
7242
  if (this._platform.Config.topMenu)
6973
7243
  this._renderer.addClass(this._element.nativeElement, 'topmenu');
6974
7244
  this._platform.Themes = this.themes;
6975
7245
  this._platform.ShortcutApi = this.shortcutapi;
6976
- if (localStorage.getItem(this._platform.TokenKey) == null)
7246
+ if (this._utilities.getLocalStorage(this._platform.TokenKey) == null)
6977
7247
  this._router.navigateByUrl(this.loginurl);
6978
7248
  else
6979
7249
  this.getLoggedUser();
@@ -7002,8 +7272,10 @@
7002
7272
  */
7003
7273
  InfoMainComponent.prototype.getLoggedUser = function () {
7004
7274
  var _this = this;
7005
- if (localStorage.getItem(this._platform.SessionKey) != null)
7006
- Object.assign(this._session, JSON.parse(localStorage.getItem(this._platform.SessionKey)));
7275
+ /** @type {?} */
7276
+ var cSession = this._utilities.getLocalStorage(this._platform.SessionKey);
7277
+ if (cSession != null)
7278
+ Object.assign(this._session, JSON.parse(cSession));
7007
7279
  if (this._session.UsuarioId != null || this.loggeduserapi == null)
7008
7280
  return;
7009
7281
  this._dataAccessService.get(this.loggeduserapi, this.loggedusermethod).subscribe(( /**
@@ -7083,7 +7355,8 @@
7083
7355
  { type: InfoDataService },
7084
7356
  { type: InfoThemeService },
7085
7357
  { type: i0.Renderer2 },
7086
- { type: i0.ElementRef }
7358
+ { type: i0.ElementRef },
7359
+ { type: Utilities }
7087
7360
  ]; };
7088
7361
  InfoMainComponent.propDecorators = {
7089
7362
  opened: [{ type: i0.Input }],
@@ -7198,6 +7471,11 @@
7198
7471
  * @private
7199
7472
  */
7200
7473
  InfoMainComponent.prototype._element;
7474
+ /**
7475
+ * @type {?}
7476
+ * @private
7477
+ */
7478
+ InfoMainComponent.prototype._utilities;
7201
7479
  }
7202
7480
 
7203
7481
  /**
@@ -7450,8 +7728,9 @@
7450
7728
  * @param {?} _modal
7451
7729
  * @param {?} _renderer
7452
7730
  * @param {?} _element
7731
+ * @param {?} _utilities
7453
7732
  */
7454
- function InfoTopbarComponent(_translateService, _authenticationService, _dataService, _themeService, _router, _dialog, _session, _platform, _modal, _renderer, _element) {
7733
+ function InfoTopbarComponent(_translateService, _authenticationService, _dataService, _themeService, _router, _dialog, _session, _platform, _modal, _renderer, _element, _utilities) {
7455
7734
  this._translateService = _translateService;
7456
7735
  this._authenticationService = _authenticationService;
7457
7736
  this._dataService = _dataService;
@@ -7463,6 +7742,7 @@
7463
7742
  this._modal = _modal;
7464
7743
  this._renderer = _renderer;
7465
7744
  this._element = _element;
7745
+ this._utilities = _utilities;
7466
7746
  this.opened = false;
7467
7747
  this.languages = [];
7468
7748
  this.themes = [];
@@ -7522,7 +7802,7 @@
7522
7802
  _this._session.TemaId = company.TemaId;
7523
7803
  _this._themeService.setThemeByLoggedCompany();
7524
7804
  localStorage.removeItem("Dashboard");
7525
- localStorage.setItem(_this._platform.SessionKey, JSON.stringify(_this._session));
7805
+ _this._utilities.setLocalStorage(_this._platform.SessionKey, JSON.stringify(_this._session));
7526
7806
  _this._router.navigateByUrl('').then(( /**
7527
7807
  * @param {?} r
7528
7808
  * @return {?}
@@ -7553,7 +7833,6 @@
7553
7833
  * @return {?}
7554
7834
  */
7555
7835
  InfoTopbarComponent.prototype.setTheme = function (theme) {
7556
- //console.log('topbar.setTheme', theme);
7557
7836
  this._themeService.setTheme(theme);
7558
7837
  };
7559
7838
  /**
@@ -7731,7 +8010,8 @@
7731
8010
  { type: InfoPlatformModel },
7732
8011
  { type: i6.MatDialog },
7733
8012
  { type: i0.Renderer2 },
7734
- { type: i0.ElementRef }
8013
+ { type: i0.ElementRef },
8014
+ { type: Utilities }
7735
8015
  ]; };
7736
8016
  InfoTopbarComponent.propDecorators = {
7737
8017
  opened: [{ type: i0.Input }],
@@ -7840,6 +8120,11 @@
7840
8120
  * @private
7841
8121
  */
7842
8122
  InfoTopbarComponent.prototype._element;
8123
+ /**
8124
+ * @type {?}
8125
+ * @private
8126
+ */
8127
+ InfoTopbarComponent.prototype._utilities;
7843
8128
  }
7844
8129
 
7845
8130
  /**
@@ -8920,6 +9205,9 @@
8920
9205
  InfoDialogComponent,
8921
9206
  AtalhoModalComponent,
8922
9207
  RefreshSessionTimeModalComponent
9208
+ ],
9209
+ providers: [
9210
+ Utilities
8923
9211
  ]
8924
9212
  },] }
8925
9213
  ];
@@ -8997,18 +9285,19 @@
8997
9285
  exports.ɵc = AtalhoModalComponent;
8998
9286
  exports.ɵd = InfoDataService;
8999
9287
  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;
9288
+ exports.ɵf = Utilities;
9289
+ exports.ɵg = InfoFormPropModel;
9290
+ exports.ɵh = InfoAuthenticationService;
9291
+ exports.ɵi = RefreshSessionTimeModalComponent;
9292
+ exports.ɵj = InfoSessionModel;
9293
+ exports.ɵk = InfoTranslateService;
9294
+ exports.ɵl = InfoLastSearchModel;
9295
+ exports.ɵm = InfoThemeService;
9296
+ exports.ɵn = InfoDialogModel;
9297
+ exports.ɵo = InfoTranslatePipe;
9298
+ exports.ɵp = InfoMaskPipe;
9299
+ exports.ɵq = InfoMaskDirective;
9300
+ exports.ɵr = InfoUnmaskDirective;
9012
9301
 
9013
9302
  Object.defineProperty(exports, '__esModule', { value: true });
9014
9303