info-library 2.10.72 → 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/cdk/overlay'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('text-mask-addons/dist/createAutoCorrectedDatePipe'), require('moment'), require('@angular/platform-browser'), 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', 'moment', '@angular/platform-browser', '@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.moment, global.ng.platformBrowser, 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, moment, platformBrowser, 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,16 +1805,20 @@
1547
1805
  * @param {?} _plataforma
1548
1806
  * @param {?} _dataService
1549
1807
  * @param {?} _modal
1808
+ * @param {?} _utilities
1809
+ * @param {?} _translate
1810
+ * @param {?} _title
1550
1811
  */
1551
- function InfoAuthenticationService(_router, _http, _sessao, _plataforma, _dataService, _modal) {
1812
+ function InfoAuthenticationService(_router, _http, _sessao, _plataforma, _dataService, _modal, _utilities, _translate, _title) {
1552
1813
  this._router = _router;
1553
1814
  this._http = _http;
1554
1815
  this._sessao = _sessao;
1555
1816
  this._plataforma = _plataforma;
1556
1817
  this._dataService = _dataService;
1557
1818
  this._modal = _modal;
1558
- this._key = 'token';
1559
- this._keySessao = 'sessao';
1819
+ this._utilities = _utilities;
1820
+ this._translate = _translate;
1821
+ this._title = _title;
1560
1822
  this._sessionActive = true;
1561
1823
  }
1562
1824
  /**
@@ -1643,7 +1905,7 @@
1643
1905
  * @return {?}
1644
1906
  */
1645
1907
  InfoAuthenticationService.prototype.isLogged = function () {
1646
- return (localStorage.getItem(this._key) != null);
1908
+ return (this._utilities.getLocalStorage(this._plataforma.TokenKey) != null);
1647
1909
  };
1648
1910
  /**
1649
1911
  * @return {?}
@@ -1721,7 +1983,7 @@
1721
1983
  * @return {?}
1722
1984
  */function (r) {
1723
1985
  if (r.Success && r.Data != null)
1724
- localStorage.setItem(_this._key, r.Data.Token);
1986
+ _this._utilities.setLocalStorage(_this._plataforma.TokenKey, r.Data.Token);
1725
1987
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1726
1988
  })), operators.catchError(( /**
1727
1989
  * @param {?} e
@@ -1742,7 +2004,7 @@
1742
2004
  * @return {?}
1743
2005
  */function (r) {
1744
2006
  if (r.Success && r.Data != null)
1745
- localStorage.setItem(_this._key, r.Data);
2007
+ _this._utilities.setLocalStorage(_this._plataforma.TokenKey, r.Data);
1746
2008
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1747
2009
  })), operators.catchError(( /**
1748
2010
  * @param {?} e
@@ -1762,7 +2024,7 @@
1762
2024
  * @return {?}
1763
2025
  */function (r) {
1764
2026
  if (r.Success && r.Data != null)
1765
- localStorage.setItem(_this._key, r.Data);
2027
+ _this._utilities.setLocalStorage(_this._plataforma.TokenKey, r.Data);
1766
2028
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1767
2029
  })), operators.catchError(( /**
1768
2030
  * @param {?} e
@@ -1773,14 +2035,20 @@
1773
2035
  * @return {?}
1774
2036
  */
1775
2037
  InfoAuthenticationService.prototype.logout = function () {
1776
- this.removeSessao();
1777
- this._router.navigateByUrl('login').then(( /**
1778
- * @param {?} r
1779
- * @return {?}
1780
- */function (/**
1781
- * @param {?} r
1782
- * @return {?}
1783
- */ 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
+ }));
1784
2052
  };
1785
2053
  /**
1786
2054
  * @param {?} url
@@ -1942,8 +2210,6 @@
1942
2210
  * @param {?} ret
1943
2211
  * @return {?}
1944
2212
  */ ret) {
1945
- /** @type {?} */
1946
- var permissao = true;
1947
2213
  if (ret.success) {
1948
2214
  if (ret.data == null) {
1949
2215
  _this.logout();
@@ -1972,9 +2238,9 @@
1972
2238
  * @param {?} s
1973
2239
  * @return {?}
1974
2240
  */ s) { return s.URL == urlGenerica; }));
1975
- localStorage.setItem(_this._keySessao, JSON.stringify(_this._sessao));
2241
+ _this._utilities.setLocalStorage(_this._plataforma.SessionKey, JSON.stringify(_this._sessao));
1976
2242
  }
1977
- return permissao;
2243
+ return true;
1978
2244
  })), operators.catchError(( /**
1979
2245
  * @param {?} error
1980
2246
  * @return {?}
@@ -2029,6 +2295,8 @@
2029
2295
  var aux = url.substring(1).replace(/-/g, '').toLowerCase().split('/');
2030
2296
  /** @type {?} */
2031
2297
  var tituloMenu = aux.length > 0 ? aux[0].toString() : url;
2298
+ /** @type {?} */
2299
+ var parametrosUrl = url.split('/').slice(2);
2032
2300
  if (tituloMenu.indexOf('ashboard') > -1)
2033
2301
  this._plataforma.PaginaAtiva = { Icone: 'widgets', Titulo: 'Dashboard' };
2034
2302
  else {
@@ -2040,8 +2308,16 @@
2040
2308
  * @param {?} m
2041
2309
  * @return {?}
2042
2310
  */ m) { return m.Title.toLowerCase().indexOf(tituloMenu) > -1; }));
2043
- if (item != null && item.length > 0)
2311
+ /** @type {?} */
2312
+ var subTitulo = "";
2313
+ for (var i = 0; i < parametrosUrl.length; i++) {
2314
+ if (!this.isGuid(parametrosUrl[i]) && isNaN(parseFloat(parametrosUrl[i])))
2315
+ subTitulo += " - " + this._translate.translate(this.toPascalCase(parametrosUrl[i]));
2316
+ }
2317
+ if (item != null && item.length > 0) {
2044
2318
  this._plataforma.PaginaAtiva = { Icone: item[0].Icon, Titulo: item[0].Title };
2319
+ this._title.setTitle("Plataforma - " + this._translate.translate(item[0].Title) + subTitulo);
2320
+ }
2045
2321
  else
2046
2322
  this._plataforma.PaginaAtiva = { Icone: 'security', Titulo: 'Plataforma' };
2047
2323
  }
@@ -2086,6 +2362,19 @@
2086
2362
  InfoAuthenticationService.prototype.isGuid = function (value) {
2087
2363
  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
2364
  };
2365
+ /**
2366
+ * @private
2367
+ * @param {?} value
2368
+ * @return {?}
2369
+ */
2370
+ InfoAuthenticationService.prototype.toPascalCase = function (value) {
2371
+ return value.replace(/(^\w|-\w)/g, ( /**
2372
+ * @param {?} w1
2373
+ * @param {?} w2
2374
+ * @param {?} i
2375
+ * @return {?}
2376
+ */function (w1, w2, i) { return i == 0 ? w1.toUpperCase() : w1[1].toUpperCase(); }));
2377
+ };
2089
2378
  return InfoAuthenticationService;
2090
2379
  }());
2091
2380
  InfoAuthenticationService.decorators = [
@@ -2100,20 +2389,13 @@
2100
2389
  { type: InfoSessionModel },
2101
2390
  { type: InfoPlatformModel },
2102
2391
  { type: InfoDataService },
2103
- { type: i6.MatDialog }
2392
+ { type: i6.MatDialog },
2393
+ { type: Utilities },
2394
+ { type: InfoTranslateService },
2395
+ { type: i9.Title }
2104
2396
  ]; };
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" });
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" });
2106
2398
  if (false) {
2107
- /**
2108
- * @type {?}
2109
- * @private
2110
- */
2111
- InfoAuthenticationService.prototype._key;
2112
- /**
2113
- * @type {?}
2114
- * @private
2115
- */
2116
- InfoAuthenticationService.prototype._keySessao;
2117
2399
  /**
2118
2400
  * @type {?}
2119
2401
  * @private
@@ -2154,6 +2436,21 @@
2154
2436
  * @private
2155
2437
  */
2156
2438
  InfoAuthenticationService.prototype._modal;
2439
+ /**
2440
+ * @type {?}
2441
+ * @private
2442
+ */
2443
+ InfoAuthenticationService.prototype._utilities;
2444
+ /**
2445
+ * @type {?}
2446
+ * @private
2447
+ */
2448
+ InfoAuthenticationService.prototype._translate;
2449
+ /**
2450
+ * @type {?}
2451
+ * @private
2452
+ */
2453
+ InfoAuthenticationService.prototype._title;
2157
2454
  }
2158
2455
  var RefreshSessionTimeModalComponent = /** @class */ (function () {
2159
2456
  /**
@@ -6467,7 +6764,7 @@
6467
6764
  ];
6468
6765
  /** @nocollapse */
6469
6766
  InfoEditorComponent.ctorParameters = function () { return [
6470
- { type: platformBrowser.DomSanitizer }
6767
+ { type: i9.DomSanitizer }
6471
6768
  ]; };
6472
6769
  InfoEditorComponent.propDecorators = {
6473
6770
  editor: [{ type: i0.ViewChild, args: ['editor',] }],
@@ -6871,8 +7168,9 @@
6871
7168
  * @param {?} _themeService
6872
7169
  * @param {?} _renderer
6873
7170
  * @param {?} _element
7171
+ * @param {?} _utilities
6874
7172
  */
6875
- function InfoMainComponent(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element) {
7173
+ function InfoMainComponent(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element, _utilities) {
6876
7174
  this._platform = _platform;
6877
7175
  this._session = _session;
6878
7176
  this._router = _router;
@@ -6880,6 +7178,7 @@
6880
7178
  this._themeService = _themeService;
6881
7179
  this._renderer = _renderer;
6882
7180
  this._element = _element;
7181
+ this._utilities = _utilities;
6883
7182
  this.opened = false;
6884
7183
  this.version = null;
6885
7184
  this.messages = [];
@@ -6927,13 +7226,12 @@
6927
7226
  * @return {?}
6928
7227
  */
6929
7228
  InfoMainComponent.prototype.ngOnInit = function () {
6930
- //console.log('info-library.main.ngOnInit');
6931
7229
  this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
6932
7230
  if (this._platform.Config.topMenu)
6933
7231
  this._renderer.addClass(this._element.nativeElement, 'topmenu');
6934
7232
  this._platform.Themes = this.themes;
6935
7233
  this._platform.ShortcutApi = this.shortcutapi;
6936
- if (localStorage.getItem(this._platform.TokenKey) == null)
7234
+ if (this._utilities.getLocalStorage(this._platform.TokenKey) == null)
6937
7235
  this._router.navigateByUrl(this.loginurl);
6938
7236
  else
6939
7237
  this.getLoggedUser();
@@ -6962,8 +7260,10 @@
6962
7260
  */
6963
7261
  InfoMainComponent.prototype.getLoggedUser = function () {
6964
7262
  var _this = this;
6965
- if (localStorage.getItem(this._platform.SessionKey) != null)
6966
- 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));
6967
7267
  if (this._session.UsuarioId != null || this.loggeduserapi == null)
6968
7268
  return;
6969
7269
  this._dataAccessService.get(this.loggeduserapi, this.loggedusermethod).subscribe(( /**
@@ -7043,7 +7343,8 @@
7043
7343
  { type: InfoDataService },
7044
7344
  { type: InfoThemeService },
7045
7345
  { type: i0.Renderer2 },
7046
- { type: i0.ElementRef }
7346
+ { type: i0.ElementRef },
7347
+ { type: Utilities }
7047
7348
  ]; };
7048
7349
  InfoMainComponent.propDecorators = {
7049
7350
  opened: [{ type: i0.Input }],
@@ -7158,6 +7459,11 @@
7158
7459
  * @private
7159
7460
  */
7160
7461
  InfoMainComponent.prototype._element;
7462
+ /**
7463
+ * @type {?}
7464
+ * @private
7465
+ */
7466
+ InfoMainComponent.prototype._utilities;
7161
7467
  }
7162
7468
 
7163
7469
  /**
@@ -7410,8 +7716,9 @@
7410
7716
  * @param {?} _modal
7411
7717
  * @param {?} _renderer
7412
7718
  * @param {?} _element
7719
+ * @param {?} _utilities
7413
7720
  */
7414
- 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) {
7415
7722
  this._translateService = _translateService;
7416
7723
  this._authenticationService = _authenticationService;
7417
7724
  this._dataService = _dataService;
@@ -7423,6 +7730,7 @@
7423
7730
  this._modal = _modal;
7424
7731
  this._renderer = _renderer;
7425
7732
  this._element = _element;
7733
+ this._utilities = _utilities;
7426
7734
  this.opened = false;
7427
7735
  this.languages = [];
7428
7736
  this.themes = [];
@@ -7482,7 +7790,7 @@
7482
7790
  _this._session.TemaId = company.TemaId;
7483
7791
  _this._themeService.setThemeByLoggedCompany();
7484
7792
  localStorage.removeItem("Dashboard");
7485
- localStorage.setItem(_this._platform.SessionKey, JSON.stringify(_this._session));
7793
+ _this._utilities.setLocalStorage(_this._platform.SessionKey, JSON.stringify(_this._session));
7486
7794
  _this._router.navigateByUrl('').then(( /**
7487
7795
  * @param {?} r
7488
7796
  * @return {?}
@@ -7513,7 +7821,6 @@
7513
7821
  * @return {?}
7514
7822
  */
7515
7823
  InfoTopbarComponent.prototype.setTheme = function (theme) {
7516
- //console.log('topbar.setTheme', theme);
7517
7824
  this._themeService.setTheme(theme);
7518
7825
  };
7519
7826
  /**
@@ -7691,7 +7998,8 @@
7691
7998
  { type: InfoPlatformModel },
7692
7999
  { type: i6.MatDialog },
7693
8000
  { type: i0.Renderer2 },
7694
- { type: i0.ElementRef }
8001
+ { type: i0.ElementRef },
8002
+ { type: Utilities }
7695
8003
  ]; };
7696
8004
  InfoTopbarComponent.propDecorators = {
7697
8005
  opened: [{ type: i0.Input }],
@@ -7800,6 +8108,11 @@
7800
8108
  * @private
7801
8109
  */
7802
8110
  InfoTopbarComponent.prototype._element;
8111
+ /**
8112
+ * @type {?}
8113
+ * @private
8114
+ */
8115
+ InfoTopbarComponent.prototype._utilities;
7803
8116
  }
7804
8117
 
7805
8118
  /**
@@ -8880,6 +9193,9 @@
8880
9193
  InfoDialogComponent,
8881
9194
  AtalhoModalComponent,
8882
9195
  RefreshSessionTimeModalComponent
9196
+ ],
9197
+ providers: [
9198
+ Utilities
8883
9199
  ]
8884
9200
  },] }
8885
9201
  ];
@@ -8957,18 +9273,19 @@
8957
9273
  exports.ɵc = AtalhoModalComponent;
8958
9274
  exports.ɵd = InfoDataService;
8959
9275
  exports.ɵe = InfoPlatformModel;
8960
- exports.ɵf = InfoFormPropModel;
8961
- exports.ɵg = InfoAuthenticationService;
8962
- exports.ɵh = RefreshSessionTimeModalComponent;
8963
- exports.ɵi = InfoSessionModel;
8964
- exports.ɵj = InfoTranslateService;
8965
- exports.ɵk = InfoLastSearchModel;
8966
- exports.ɵl = InfoThemeService;
8967
- exports.ɵm = InfoDialogModel;
8968
- exports.ɵn = InfoTranslatePipe;
8969
- exports.ɵo = InfoMaskPipe;
8970
- exports.ɵp = InfoMaskDirective;
8971
- 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;
8972
9289
 
8973
9290
  Object.defineProperty(exports, '__esModule', { value: true });
8974
9291