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.
@@ -5,14 +5,15 @@ import { Router, ActivatedRoute, NavigationStart, GuardsCheckStart, NavigationEn
5
5
  import { HttpHeaders, HttpClient, HttpClientModule } from '@angular/common/http';
6
6
  import { of, Observable } from 'rxjs';
7
7
  import { map, catchError, switchMap, debounceTime, distinctUntilChanged } from 'rxjs/operators';
8
+ import { AES, enc } from 'crypto-js';
8
9
  import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
10
+ import { Title, DomSanitizer } from '@angular/platform-browser';
9
11
  import { OverlayContainer } from '@angular/cdk/overlay';
10
12
  import { FormControl, NG_VALUE_ACCESSOR, NgModel, NgForm, NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
11
13
  import { MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
12
14
  import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateModule } from '@angular/material-moment-adapter';
13
15
  import createAutoCorrectedDatePipe from 'text-mask-addons/dist/createAutoCorrectedDatePipe';
14
16
  import * as moment from 'moment';
15
- import { DomSanitizer } from '@angular/platform-browser';
16
17
  import { AngularEditorModule } from '@kolkov/angular-editor';
17
18
  import { ENTER } from '@angular/cdk/keycodes';
18
19
  import { CommonModule } from '@angular/common';
@@ -524,8 +525,8 @@ if (false) {
524
525
  */
525
526
  class InfoPlatformModel {
526
527
  constructor() {
527
- this.TokenKey = 'token';
528
- this.SessionKey = 'sessao';
528
+ this.TokenKey = 'tk';
529
+ this.SessionKey = 'ss';
529
530
  this.ConfigIsNull = true;
530
531
  this.Themes = [];
531
532
  this.Config = new InfoAppConfigModel();
@@ -883,6 +884,260 @@ InfoMaskPipe.ctorParameters = () => [];
883
884
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
884
885
  */
885
886
 
887
+ /**
888
+ * @fileoverview added by tsickle
889
+ * Generated from: utils/utilities.ts
890
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
891
+ */
892
+ class Utilities {
893
+ /**
894
+ * @return {?}
895
+ */
896
+ getGuid() {
897
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (/**
898
+ * @param {?} c
899
+ * @return {?}
900
+ */
901
+ function (c) {
902
+ /** @type {?} */
903
+ const r = Math.random() * 16 | 0;
904
+ /** @type {?} */
905
+ const v = c === 'x' ? r : (r & 0x3 | 0x8);
906
+ return v.toString(16);
907
+ }));
908
+ }
909
+ /**
910
+ * @return {?}
911
+ */
912
+ getGuidEmpty() {
913
+ return '00000000-0000-0000-0000-000000000000';
914
+ }
915
+ /**
916
+ * @param {?} value
917
+ * @return {?}
918
+ */
919
+ isGuid(value) {
920
+ 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;
921
+ }
922
+ /**
923
+ * @param {?} base64
924
+ * @return {?}
925
+ */
926
+ base64ToArrayBuffer(base64) {
927
+ /** @type {?} */
928
+ var binaryString = window.atob(base64);
929
+ /** @type {?} */
930
+ var binaryLen = binaryString.length;
931
+ /** @type {?} */
932
+ var bytes = new Uint8Array(binaryLen);
933
+ for (var i = 0; i < binaryLen; i++) {
934
+ /** @type {?} */
935
+ var ascii = binaryString.charCodeAt(i);
936
+ bytes[i] = ascii;
937
+ }
938
+ return bytes;
939
+ }
940
+ /**
941
+ * @param {?} title
942
+ * @param {?} blob
943
+ * @return {?}
944
+ */
945
+ openOrDownload(title, blob) {
946
+ /** @type {?} */
947
+ let fileURL = URL.createObjectURL(blob);
948
+ if (title.indexOf("pdf") > -1)
949
+ window.open(fileURL, title);
950
+ else {
951
+ /** @type {?} */
952
+ let elementA = (/** @type {?} */ (document.createElement('a')));
953
+ elementA.href = fileURL;
954
+ elementA.download = title;
955
+ document.body.appendChild(elementA);
956
+ elementA.click();
957
+ document.body.removeChild(elementA);
958
+ }
959
+ }
960
+ /**
961
+ * @param {?} val
962
+ * @return {?}
963
+ */
964
+ removerAcentos(val) {
965
+ if (val == null)
966
+ return '';
967
+ /** @type {?} */
968
+ var normalizeFunction = String.prototype.normalize ? (/**
969
+ * @param {?} str
970
+ * @return {?}
971
+ */
972
+ (str) => str.normalize('NFD')) : (/**
973
+ * @param {?} str
974
+ * @return {?}
975
+ */
976
+ (str) => str);
977
+ return normalizeFunction(val).replace(/[\u0300-\u036f]/g, "");
978
+ }
979
+ /**
980
+ * @return {?}
981
+ */
982
+ getFormatos() {
983
+ return [{ Id: "EXCEL", Nome: "Excel", MimeType: "application/vnd.ms-excel", Extensao: "xls" },
984
+ { Id: "PDF", Nome: "PDF", MimeType: "application/pdf", Extensao: "pdf" }];
985
+ }
986
+ /**
987
+ * @return {?}
988
+ */
989
+ getFormatosExcel() {
990
+ return [{ Id: 'PP', Nome: 'Excel Português com Separador Decimal [.]' },
991
+ { Id: 'PV', Nome: 'Excel Português com Separador Decimal [,]' },
992
+ { Id: 'IP', Nome: 'Excel Inglês com Separador Decimal [.]' },
993
+ { Id: 'IV', Nome: 'Excel Inglês com Separador Decimal [,]' }];
994
+ }
995
+ /**
996
+ * @return {?}
997
+ */
998
+ getStatus() {
999
+ return [{ Id: "A", Nome: "Ativo" },
1000
+ { Id: "P", Nome: "Pendente" }];
1001
+ }
1002
+ /**
1003
+ * @return {?}
1004
+ */
1005
+ getStatusCompleto() {
1006
+ return [{ Id: "C", Nome: "Cadastrado", Selecionado: true },
1007
+ { Id: "F", Nome: "Feito", Selecionado: false },
1008
+ { Id: "O", Nome: "Conferido", Selecionado: true },
1009
+ { Id: "R", Nome: "Rejeitado", Selecionado: false },
1010
+ { Id: "I", Nome: "Inativo", Selecionado: false }];
1011
+ }
1012
+ /**
1013
+ * @return {?}
1014
+ */
1015
+ getStatusProcessamento() {
1016
+ return [{ Id: "A", Nome: "AguardandoProcessamento" },
1017
+ { Id: "E", Nome: "EmProcessamento" },
1018
+ { Id: "P", Nome: "Processado" },
1019
+ { Id: "I", Nome: "Inativo" },
1020
+ { Id: "Z", Nome: "Erro" }];
1021
+ }
1022
+ /**
1023
+ * @return {?}
1024
+ */
1025
+ getFormatoIdiomas() {
1026
+ return [{ Id: "en", Nome: "English" },
1027
+ { Id: "pt-BR", Nome: "Português" }];
1028
+ }
1029
+ /**
1030
+ * @return {?}
1031
+ */
1032
+ getGeneros() {
1033
+ return [{ Id: 'M', Nome: 'Masculino' },
1034
+ { Id: 'F', Nome: 'Feminino' }];
1035
+ }
1036
+ /**
1037
+ * @return {?}
1038
+ */
1039
+ getTiposEvidencia() {
1040
+ return [{ Id: 1, Nome: 'Telefone' },
1041
+ { Id: 2, Nome: 'Email' },
1042
+ { Id: 3, Nome: 'Documento' }];
1043
+ }
1044
+ /**
1045
+ * @return {?}
1046
+ */
1047
+ getOrdens() {
1048
+ return [{ Id: "nome-asc", Nome: "NomeCrescente" },
1049
+ { Id: "nome-desc", Nome: "NomeDecrescente" },
1050
+ { Id: "valor-asc", Nome: "ValorCrescente" },
1051
+ { Id: "valor-desc", Nome: "ValorDecrescente" }];
1052
+ }
1053
+ /**
1054
+ * @param {?} form
1055
+ * @param {?} value
1056
+ * @param {?} control
1057
+ * @return {?}
1058
+ */
1059
+ validarEmail(form, value, control) {
1060
+ if (!value)
1061
+ return;
1062
+ /** @type {?} */
1063
+ let pattern = /^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/;
1064
+ /** @type {?} */
1065
+ let emails = value.split(';');
1066
+ /** @type {?} */
1067
+ let invalido = emails.some((/**
1068
+ * @param {?} email
1069
+ * @return {?}
1070
+ */
1071
+ email => email && !pattern.test(email.trim())));
1072
+ if (invalido)
1073
+ form.form.controls[control].setErrors({ 'invalid': true });
1074
+ }
1075
+ /**
1076
+ * @param {?} key
1077
+ * @param {?} value
1078
+ * @return {?}
1079
+ */
1080
+ setLocalStorage(key, value) {
1081
+ localStorage.setItem(key, this.criptografar(value));
1082
+ }
1083
+ /**
1084
+ * @param {?} key
1085
+ * @return {?}
1086
+ */
1087
+ getLocalStorage(key) {
1088
+ /** @type {?} */
1089
+ var data = this.descriptografar(localStorage.getItem(key));
1090
+ if (data == null || data == '')
1091
+ return null;
1092
+ return data;
1093
+ }
1094
+ /**
1095
+ * @return {?}
1096
+ */
1097
+ isIE() {
1098
+ /** @type {?} */
1099
+ var userAgent = navigator.userAgent;
1100
+ return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1;
1101
+ }
1102
+ /**
1103
+ * @param {?} texto
1104
+ * @return {?}
1105
+ */
1106
+ retornaTexto(texto) {
1107
+ /** @type {?} */
1108
+ var div = document.createElement("div");
1109
+ div.innerHTML = texto;
1110
+ return div.innerText || div.textContent;
1111
+ }
1112
+ /**
1113
+ * @param {?} texto
1114
+ * @return {?}
1115
+ */
1116
+ criptografar(texto) {
1117
+ try {
1118
+ return AES.encrypt(texto, "GKxLtQg2at").toString();
1119
+ }
1120
+ catch (e) {
1121
+ return null;
1122
+ }
1123
+ }
1124
+ /**
1125
+ * @param {?} texto
1126
+ * @return {?}
1127
+ */
1128
+ descriptografar(texto) {
1129
+ try {
1130
+ return AES.decrypt(texto, "GKxLtQg2at").toString(enc.Utf8);
1131
+ }
1132
+ catch (e) {
1133
+ return null;
1134
+ }
1135
+ }
1136
+ }
1137
+ Utilities.decorators = [
1138
+ { type: Injectable }
1139
+ ];
1140
+
886
1141
  /**
887
1142
  * @fileoverview added by tsickle
888
1143
  * Generated from: service/data.service.ts
@@ -894,19 +1149,20 @@ class InfoDataService {
894
1149
  * @param {?} _http
895
1150
  * @param {?} _router
896
1151
  * @param {?} _plataforma
1152
+ * @param {?} _utilities
897
1153
  */
898
- constructor(_apiController, _http, _router, _plataforma) {
1154
+ constructor(_apiController, _http, _router, _plataforma, _utilities) {
899
1155
  this._apiController = _apiController;
900
1156
  this._http = _http;
901
1157
  this._router = _router;
902
1158
  this._plataforma = _plataforma;
903
- this._key = 'token';
1159
+ this._utilities = _utilities;
904
1160
  }
905
1161
  /**
906
1162
  * @return {?}
907
1163
  */
908
1164
  getToken() {
909
- this.token = localStorage.getItem(this._key);
1165
+ this.token = this._utilities.getLocalStorage(this._plataforma.TokenKey);
910
1166
  if (this.token == null) {
911
1167
  this._router.navigateByUrl('');
912
1168
  return '';
@@ -1122,15 +1378,11 @@ InfoDataService.ctorParameters = () => [
1122
1378
  { type: undefined, decorators: [{ type: Inject, args: [APICONTROLLER_CONFIG,] }] },
1123
1379
  { type: HttpClient },
1124
1380
  { type: Router },
1125
- { type: InfoPlatformModel }
1381
+ { type: InfoPlatformModel },
1382
+ { type: Utilities }
1126
1383
  ];
1127
- /** @nocollapse */ InfoDataService.ɵprov = ɵɵdefineInjectable({ factory: function InfoDataService_Factory() { return new InfoDataService(ɵɵinject(APICONTROLLER_CONFIG), ɵɵinject(HttpClient), ɵɵinject(Router), ɵɵinject(InfoPlatformModel)); }, token: InfoDataService, providedIn: "root" });
1384
+ /** @nocollapse */ InfoDataService.ɵprov = ɵɵdefineInjectable({ factory: function InfoDataService_Factory() { return new InfoDataService(ɵɵinject(APICONTROLLER_CONFIG), ɵɵinject(HttpClient), ɵɵinject(Router), ɵɵinject(InfoPlatformModel), ɵɵinject(Utilities)); }, token: InfoDataService, providedIn: "root" });
1128
1385
  if (false) {
1129
- /**
1130
- * @type {?}
1131
- * @private
1132
- */
1133
- InfoDataService.prototype._key;
1134
1386
  /**
1135
1387
  * @type {?}
1136
1388
  * @private
@@ -1156,6 +1408,11 @@ if (false) {
1156
1408
  * @private
1157
1409
  */
1158
1410
  InfoDataService.prototype._plataforma;
1411
+ /**
1412
+ * @type {?}
1413
+ * @private
1414
+ */
1415
+ InfoDataService.prototype._utilities;
1159
1416
  }
1160
1417
 
1161
1418
  /**
@@ -1171,16 +1428,20 @@ class InfoAuthenticationService {
1171
1428
  * @param {?} _plataforma
1172
1429
  * @param {?} _dataService
1173
1430
  * @param {?} _modal
1431
+ * @param {?} _utilities
1432
+ * @param {?} _translate
1433
+ * @param {?} _title
1174
1434
  */
1175
- constructor(_router, _http, _sessao, _plataforma, _dataService, _modal) {
1435
+ constructor(_router, _http, _sessao, _plataforma, _dataService, _modal, _utilities, _translate, _title) {
1176
1436
  this._router = _router;
1177
1437
  this._http = _http;
1178
1438
  this._sessao = _sessao;
1179
1439
  this._plataforma = _plataforma;
1180
1440
  this._dataService = _dataService;
1181
1441
  this._modal = _modal;
1182
- this._key = 'token';
1183
- this._keySessao = 'sessao';
1442
+ this._utilities = _utilities;
1443
+ this._translate = _translate;
1444
+ this._title = _title;
1184
1445
  this._sessionActive = true;
1185
1446
  }
1186
1447
  /**
@@ -1263,7 +1524,7 @@ class InfoAuthenticationService {
1263
1524
  * @return {?}
1264
1525
  */
1265
1526
  isLogged() {
1266
- return (localStorage.getItem(this._key) != null);
1527
+ return (this._utilities.getLocalStorage(this._plataforma.TokenKey) != null);
1267
1528
  }
1268
1529
  /**
1269
1530
  * @return {?}
@@ -1339,7 +1600,7 @@ class InfoAuthenticationService {
1339
1600
  */
1340
1601
  (r) => {
1341
1602
  if (r.Success && r.Data != null)
1342
- localStorage.setItem(this._key, r.Data.Token);
1603
+ this._utilities.setLocalStorage(this._plataforma.TokenKey, r.Data.Token);
1343
1604
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1344
1605
  })), catchError((/**
1345
1606
  * @param {?} e
@@ -1361,7 +1622,7 @@ class InfoAuthenticationService {
1361
1622
  */
1362
1623
  (r) => {
1363
1624
  if (r.Success && r.Data != null)
1364
- localStorage.setItem(this._key, r.Data);
1625
+ this._utilities.setLocalStorage(this._plataforma.TokenKey, r.Data);
1365
1626
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1366
1627
  })), catchError((/**
1367
1628
  * @param {?} e
@@ -1382,7 +1643,7 @@ class InfoAuthenticationService {
1382
1643
  */
1383
1644
  (r) => {
1384
1645
  if (r.Success && r.Data != null)
1385
- localStorage.setItem(this._key, r.Data);
1646
+ this._utilities.setLocalStorage(this._plataforma.TokenKey, r.Data);
1386
1647
  return new InfoLoginModel(r.Success, r.Messages, r.Data);
1387
1648
  })), catchError((/**
1388
1649
  * @param {?} e
@@ -1394,12 +1655,18 @@ class InfoAuthenticationService {
1394
1655
  * @return {?}
1395
1656
  */
1396
1657
  logout() {
1397
- this.removeSessao();
1398
- this._router.navigateByUrl('login').then((/**
1399
- * @param {?} r
1658
+ this._http.post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/Logout', null, { headers: this._dataService.getHeaderToken() })
1659
+ .subscribe((/**
1400
1660
  * @return {?}
1401
1661
  */
1402
- r => { location.reload(); }));
1662
+ () => {
1663
+ this.removeSessao();
1664
+ this._router.navigateByUrl('login').then((/**
1665
+ * @param {?} r
1666
+ * @return {?}
1667
+ */
1668
+ r => { location.reload(); }));
1669
+ }));
1403
1670
  }
1404
1671
  /**
1405
1672
  * @param {?} url
@@ -1553,8 +1820,6 @@ class InfoAuthenticationService {
1553
1820
  * @return {?}
1554
1821
  */
1555
1822
  ret => {
1556
- /** @type {?} */
1557
- let permissao = true;
1558
1823
  if (ret.success) {
1559
1824
  if (ret.data == null) {
1560
1825
  this.logout();
@@ -1577,9 +1842,9 @@ class InfoAuthenticationService {
1577
1842
  * @return {?}
1578
1843
  */
1579
1844
  s => s.URL == urlGenerica));
1580
- localStorage.setItem(this._keySessao, JSON.stringify(this._sessao));
1845
+ this._utilities.setLocalStorage(this._plataforma.SessionKey, JSON.stringify(this._sessao));
1581
1846
  }
1582
- return permissao;
1847
+ return true;
1583
1848
  })), catchError((/**
1584
1849
  * @param {?} error
1585
1850
  * @return {?}
@@ -1634,6 +1899,8 @@ class InfoAuthenticationService {
1634
1899
  let aux = url.substring(1).replace(/-/g, '').toLowerCase().split('/');
1635
1900
  /** @type {?} */
1636
1901
  let tituloMenu = aux.length > 0 ? aux[0].toString() : url;
1902
+ /** @type {?} */
1903
+ let parametrosUrl = url.split('/').slice(2);
1637
1904
  if (tituloMenu.indexOf('ashboard') > -1)
1638
1905
  this._plataforma.PaginaAtiva = { Icone: 'widgets', Titulo: 'Dashboard' };
1639
1906
  else {
@@ -1643,8 +1910,16 @@ class InfoAuthenticationService {
1643
1910
  * @return {?}
1644
1911
  */
1645
1912
  m => m.Title.toLowerCase().indexOf(tituloMenu) > -1));
1646
- if (item != null && item.length > 0)
1913
+ /** @type {?} */
1914
+ let subTitulo = "";
1915
+ for (var i = 0; i < parametrosUrl.length; i++) {
1916
+ if (!this.isGuid(parametrosUrl[i]) && isNaN(parseFloat(parametrosUrl[i])))
1917
+ subTitulo += " - " + this._translate.translate(this.toPascalCase(parametrosUrl[i]));
1918
+ }
1919
+ if (item != null && item.length > 0) {
1647
1920
  this._plataforma.PaginaAtiva = { Icone: item[0].Icon, Titulo: item[0].Title };
1921
+ this._title.setTitle("Plataforma - " + this._translate.translate(item[0].Title) + subTitulo);
1922
+ }
1648
1923
  else
1649
1924
  this._plataforma.PaginaAtiva = { Icone: 'security', Titulo: 'Plataforma' };
1650
1925
  }
@@ -1689,6 +1964,20 @@ class InfoAuthenticationService {
1689
1964
  isGuid(value) {
1690
1965
  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;
1691
1966
  }
1967
+ /**
1968
+ * @private
1969
+ * @param {?} value
1970
+ * @return {?}
1971
+ */
1972
+ toPascalCase(value) {
1973
+ return value.replace(/(^\w|-\w)/g, (/**
1974
+ * @param {?} w1
1975
+ * @param {?} w2
1976
+ * @param {?} i
1977
+ * @return {?}
1978
+ */
1979
+ (w1, w2, i) => i == 0 ? w1.toUpperCase() : w1[1].toUpperCase()));
1980
+ }
1692
1981
  }
1693
1982
  InfoAuthenticationService.decorators = [
1694
1983
  { type: Injectable, args: [{
@@ -1702,20 +1991,13 @@ InfoAuthenticationService.ctorParameters = () => [
1702
1991
  { type: InfoSessionModel },
1703
1992
  { type: InfoPlatformModel },
1704
1993
  { type: InfoDataService },
1705
- { type: MatDialog }
1994
+ { type: MatDialog },
1995
+ { type: Utilities },
1996
+ { type: InfoTranslateService },
1997
+ { type: Title }
1706
1998
  ];
1707
- /** @nocollapse */ InfoAuthenticationService.ɵprov = ɵɵdefineInjectable({ factory: function InfoAuthenticationService_Factory() { return new InfoAuthenticationService(ɵɵinject(Router), ɵɵinject(HttpClient), ɵɵinject(InfoSessionModel), ɵɵinject(InfoPlatformModel), ɵɵinject(InfoDataService), ɵɵinject(MatDialog)); }, token: InfoAuthenticationService, providedIn: "root" });
1999
+ /** @nocollapse */ InfoAuthenticationService.ɵprov = ɵɵdefineInjectable({ factory: function InfoAuthenticationService_Factory() { return new InfoAuthenticationService(ɵɵinject(Router), ɵɵinject(HttpClient), ɵɵinject(InfoSessionModel), ɵɵinject(InfoPlatformModel), ɵɵinject(InfoDataService), ɵɵinject(MatDialog), ɵɵinject(Utilities), ɵɵinject(InfoTranslateService), ɵɵinject(Title)); }, token: InfoAuthenticationService, providedIn: "root" });
1708
2000
  if (false) {
1709
- /**
1710
- * @type {?}
1711
- * @private
1712
- */
1713
- InfoAuthenticationService.prototype._key;
1714
- /**
1715
- * @type {?}
1716
- * @private
1717
- */
1718
- InfoAuthenticationService.prototype._keySessao;
1719
2001
  /**
1720
2002
  * @type {?}
1721
2003
  * @private
@@ -1756,6 +2038,21 @@ if (false) {
1756
2038
  * @private
1757
2039
  */
1758
2040
  InfoAuthenticationService.prototype._modal;
2041
+ /**
2042
+ * @type {?}
2043
+ * @private
2044
+ */
2045
+ InfoAuthenticationService.prototype._utilities;
2046
+ /**
2047
+ * @type {?}
2048
+ * @private
2049
+ */
2050
+ InfoAuthenticationService.prototype._translate;
2051
+ /**
2052
+ * @type {?}
2053
+ * @private
2054
+ */
2055
+ InfoAuthenticationService.prototype._title;
1759
2056
  }
1760
2057
  class RefreshSessionTimeModalComponent {
1761
2058
  /**
@@ -6238,8 +6535,9 @@ class InfoTopbarComponent {
6238
6535
  * @param {?} _modal
6239
6536
  * @param {?} _renderer
6240
6537
  * @param {?} _element
6538
+ * @param {?} _utilities
6241
6539
  */
6242
- constructor(_translateService, _authenticationService, _dataService, _themeService, _router, _dialog, _session, _platform, _modal, _renderer, _element) {
6540
+ constructor(_translateService, _authenticationService, _dataService, _themeService, _router, _dialog, _session, _platform, _modal, _renderer, _element, _utilities) {
6243
6541
  this._translateService = _translateService;
6244
6542
  this._authenticationService = _authenticationService;
6245
6543
  this._dataService = _dataService;
@@ -6251,6 +6549,7 @@ class InfoTopbarComponent {
6251
6549
  this._modal = _modal;
6252
6550
  this._renderer = _renderer;
6253
6551
  this._element = _element;
6552
+ this._utilities = _utilities;
6254
6553
  this.opened = false;
6255
6554
  this.languages = [];
6256
6555
  this.themes = [];
@@ -6307,7 +6606,7 @@ class InfoTopbarComponent {
6307
6606
  this._session.TemaId = company.TemaId;
6308
6607
  this._themeService.setThemeByLoggedCompany();
6309
6608
  localStorage.removeItem("Dashboard");
6310
- localStorage.setItem(this._platform.SessionKey, JSON.stringify(this._session));
6609
+ this._utilities.setLocalStorage(this._platform.SessionKey, JSON.stringify(this._session));
6311
6610
  this._router.navigateByUrl('').then((/**
6312
6611
  * @param {?} r
6313
6612
  * @return {?}
@@ -6334,7 +6633,6 @@ class InfoTopbarComponent {
6334
6633
  * @return {?}
6335
6634
  */
6336
6635
  setTheme(theme) {
6337
- //console.log('topbar.setTheme', theme);
6338
6636
  this._themeService.setTheme(theme);
6339
6637
  }
6340
6638
  /**
@@ -6495,7 +6793,8 @@ InfoTopbarComponent.ctorParameters = () => [
6495
6793
  { type: InfoPlatformModel },
6496
6794
  { type: MatDialog },
6497
6795
  { type: Renderer2 },
6498
- { type: ElementRef }
6796
+ { type: ElementRef },
6797
+ { type: Utilities }
6499
6798
  ];
6500
6799
  InfoTopbarComponent.propDecorators = {
6501
6800
  opened: [{ type: Input }],
@@ -6604,6 +6903,11 @@ if (false) {
6604
6903
  * @private
6605
6904
  */
6606
6905
  InfoTopbarComponent.prototype._element;
6906
+ /**
6907
+ * @type {?}
6908
+ * @private
6909
+ */
6910
+ InfoTopbarComponent.prototype._utilities;
6607
6911
  }
6608
6912
 
6609
6913
  /**
@@ -6620,8 +6924,9 @@ class InfoMainComponent {
6620
6924
  * @param {?} _themeService
6621
6925
  * @param {?} _renderer
6622
6926
  * @param {?} _element
6927
+ * @param {?} _utilities
6623
6928
  */
6624
- constructor(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element) {
6929
+ constructor(_platform, _session, _router, _dataAccessService, _themeService, _renderer, _element, _utilities) {
6625
6930
  this._platform = _platform;
6626
6931
  this._session = _session;
6627
6932
  this._router = _router;
@@ -6629,6 +6934,7 @@ class InfoMainComponent {
6629
6934
  this._themeService = _themeService;
6630
6935
  this._renderer = _renderer;
6631
6936
  this._element = _element;
6937
+ this._utilities = _utilities;
6632
6938
  this.opened = false;
6633
6939
  this.version = null;
6634
6940
  this.messages = [];
@@ -6672,13 +6978,12 @@ class InfoMainComponent {
6672
6978
  * @return {?}
6673
6979
  */
6674
6980
  ngOnInit() {
6675
- //console.log('info-library.main.ngOnInit');
6676
6981
  this._renderer.addClass(this._element.nativeElement, 'uxc' + this._platform.Config.ux);
6677
6982
  if (this._platform.Config.topMenu)
6678
6983
  this._renderer.addClass(this._element.nativeElement, 'topmenu');
6679
6984
  this._platform.Themes = this.themes;
6680
6985
  this._platform.ShortcutApi = this.shortcutapi;
6681
- if (localStorage.getItem(this._platform.TokenKey) == null)
6986
+ if (this._utilities.getLocalStorage(this._platform.TokenKey) == null)
6682
6987
  this._router.navigateByUrl(this.loginurl);
6683
6988
  else
6684
6989
  this.getLoggedUser();
@@ -6706,8 +7011,10 @@ class InfoMainComponent {
6706
7011
  * @return {?}
6707
7012
  */
6708
7013
  getLoggedUser() {
6709
- if (localStorage.getItem(this._platform.SessionKey) != null)
6710
- Object.assign(this._session, JSON.parse(localStorage.getItem(this._platform.SessionKey)));
7014
+ /** @type {?} */
7015
+ var cSession = this._utilities.getLocalStorage(this._platform.SessionKey);
7016
+ if (cSession != null)
7017
+ Object.assign(this._session, JSON.parse(cSession));
6711
7018
  if (this._session.UsuarioId != null || this.loggeduserapi == null)
6712
7019
  return;
6713
7020
  this._dataAccessService.get(this.loggeduserapi, this.loggedusermethod).subscribe((/**
@@ -6780,7 +7087,8 @@ InfoMainComponent.ctorParameters = () => [
6780
7087
  { type: InfoDataService },
6781
7088
  { type: InfoThemeService },
6782
7089
  { type: Renderer2 },
6783
- { type: ElementRef }
7090
+ { type: ElementRef },
7091
+ { type: Utilities }
6784
7092
  ];
6785
7093
  InfoMainComponent.propDecorators = {
6786
7094
  opened: [{ type: Input }],
@@ -6895,6 +7203,11 @@ if (false) {
6895
7203
  * @private
6896
7204
  */
6897
7205
  InfoMainComponent.prototype._element;
7206
+ /**
7207
+ * @type {?}
7208
+ * @private
7209
+ */
7210
+ InfoMainComponent.prototype._utilities;
6898
7211
  }
6899
7212
 
6900
7213
  /**
@@ -8191,6 +8504,9 @@ InfoLibraryModule.decorators = [
8191
8504
  InfoDialogComponent,
8192
8505
  AtalhoModalComponent,
8193
8506
  RefreshSessionTimeModalComponent
8507
+ ],
8508
+ providers: [
8509
+ Utilities
8194
8510
  ]
8195
8511
  },] }
8196
8512
  ];
@@ -8207,5 +8523,5 @@ InfoLibraryModule.decorators = [
8207
8523
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8208
8524
  */
8209
8525
 
8210
- export { APICONTROLLER_CONFIG, DICTIONARIES_CONFIG, InfoAlertComponent, InfoAppConfigModel, InfoAuthenticationService, InfoAutoCompleteComponent, InfoBigCheckboxComponent, InfoCardComponent, InfoCheckboxComponent, InfoChipsComponent, InfoConfigurationService, InfoDataAccessModel, InfoDataService, InfoDateComponent, InfoDateMonthComponent, InfoDialogButtons, InfoDialogComponent, InfoDialogModal, InfoDialogModel, InfoDialogResult, InfoEditorComponent, InfoFormPropModel, InfoGridButtonModel, InfoGridComponent, InfoInputComponent, InfoInputListComponent, InfoLastSearchModel, InfoLibraryModule, InfoListCheckboxComponent, InfoLoadingComponent, InfoLoginModel, InfoMainComponent, InfoMaskPipe, InfoMenuCardComponent, InfoMessageComponent, InfoMethodGridButtonModel, InfoModalAction, InfoModalComponent, InfoMultiSelectComponent, InfoNotificationItemModel, InfoNotificationModel, InfoPageAction, InfoPagebarButtonModel, InfoPagebarComponent, InfoPaginatorComponent, InfoPermissionModel, InfoPlatformModel, InfoSelectComponent, InfoSessionModel, InfoSidebarComponent, InfoThemeService, InfoTimelineComponent, InfoTopMenuComponent, InfoTopbarComponent, InfoTranslatePipe, InfoTranslateService, PT_BR_DATE_FORMATS as ɵa, PT_BR_DATE_MONTH_FORMATS as ɵb, AtalhoModalComponent as ɵc, InfoDataService as ɵd, InfoPlatformModel as ɵe, InfoFormPropModel as ɵf, InfoAuthenticationService as ɵg, RefreshSessionTimeModalComponent as ɵh, InfoSessionModel as ɵi, InfoTranslateService as ɵj, InfoLastSearchModel as ɵk, InfoThemeService as ɵl, InfoDialogModel as ɵm, InfoTranslatePipe as ɵn, InfoMaskPipe as ɵo, InfoMaskDirective as ɵp, InfoUnmaskDirective as ɵq };
8526
+ export { APICONTROLLER_CONFIG, DICTIONARIES_CONFIG, InfoAlertComponent, InfoAppConfigModel, InfoAuthenticationService, InfoAutoCompleteComponent, InfoBigCheckboxComponent, InfoCardComponent, InfoCheckboxComponent, InfoChipsComponent, InfoConfigurationService, InfoDataAccessModel, InfoDataService, InfoDateComponent, InfoDateMonthComponent, InfoDialogButtons, InfoDialogComponent, InfoDialogModal, InfoDialogModel, InfoDialogResult, InfoEditorComponent, InfoFormPropModel, InfoGridButtonModel, InfoGridComponent, InfoInputComponent, InfoInputListComponent, InfoLastSearchModel, InfoLibraryModule, InfoListCheckboxComponent, InfoLoadingComponent, InfoLoginModel, InfoMainComponent, InfoMaskPipe, InfoMenuCardComponent, InfoMessageComponent, InfoMethodGridButtonModel, InfoModalAction, InfoModalComponent, InfoMultiSelectComponent, InfoNotificationItemModel, InfoNotificationModel, InfoPageAction, InfoPagebarButtonModel, InfoPagebarComponent, InfoPaginatorComponent, InfoPermissionModel, InfoPlatformModel, InfoSelectComponent, InfoSessionModel, InfoSidebarComponent, InfoThemeService, InfoTimelineComponent, InfoTopMenuComponent, InfoTopbarComponent, InfoTranslatePipe, InfoTranslateService, PT_BR_DATE_FORMATS as ɵa, PT_BR_DATE_MONTH_FORMATS as ɵb, AtalhoModalComponent as ɵc, InfoDataService as ɵd, InfoPlatformModel as ɵe, Utilities as ɵf, InfoFormPropModel as ɵg, InfoAuthenticationService as ɵh, RefreshSessionTimeModalComponent as ɵi, InfoSessionModel as ɵj, InfoTranslateService as ɵk, InfoLastSearchModel as ɵl, InfoThemeService as ɵm, InfoDialogModel as ɵn, InfoTranslatePipe as ɵo, InfoMaskPipe as ɵp, InfoMaskDirective as ɵq, InfoUnmaskDirective as ɵr };
8211
8527
  //# sourceMappingURL=info-library.js.map