@senior-agronegocio/angular-components 0.0.56 → 0.0.58

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.
@@ -1754,6 +1754,14 @@
1754
1754
  * Validação de Placa de Veículo
1755
1755
  */
1756
1756
  isLicensePlate: /^[A-Za-z0-9]{1,7}-?[A-Za-z0-9]{1,7}$/,
1757
+ /**
1758
+ * Validação de Placa de veículo padrão mercosul
1759
+ */
1760
+ isMercosulLicensePlate: /^[A-Z]{3}\d[A-Z]\d{2}$/,
1761
+ /**
1762
+ * Validação de Placa de veículo padrão antigo AAA-1234
1763
+ */
1764
+ isOldLicensePlate: /^[A-Z]{3}-?\d{4}$/,
1757
1765
  /**
1758
1766
  * Validação de Número de Telefone
1759
1767
  */
@@ -2256,10 +2264,11 @@
2256
2264
  */
2257
2265
  AgroPlatformUtils.getCurrentUserName = function () {
2258
2266
  var _a;
2259
- var cookie = AgroCookieUtils.getCookie('com.senior.token');
2267
+ var cookie = AgroCookieUtils.getCookie('com.senior.token', true);
2260
2268
  if (cookie) {
2261
- var str = (_a = AgroCookieUtils.parseCookieToObject(cookie)) === null || _a === void 0 ? void 0 : _a.fullName;
2269
+ var str = (_a = AgroObjectUtils.fromString(cookie)) === null || _a === void 0 ? void 0 : _a.fullName;
2262
2270
  if (str) {
2271
+ str = str.replace(/\+/g, ' ');
2263
2272
  return str;
2264
2273
  }
2265
2274
  }
@@ -2272,9 +2281,9 @@
2272
2281
  */
2273
2282
  AgroPlatformUtils.getCurrentUserEmail = function () {
2274
2283
  var _a;
2275
- var cookie = AgroCookieUtils.getCookie('com.senior.token');
2284
+ var cookie = AgroCookieUtils.getCookie('com.senior.token', true);
2276
2285
  if (cookie) {
2277
- var str = (_a = AgroCookieUtils.parseCookieToObject(cookie)) === null || _a === void 0 ? void 0 : _a.email;
2286
+ var str = (_a = AgroObjectUtils.fromString(cookie)) === null || _a === void 0 ? void 0 : _a.email;
2278
2287
  if (str) {
2279
2288
  return str;
2280
2289
  }