@senior-agronegocio/angular-components 0.0.9864 → 0.0.9865
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.
- package/bundles/senior-agronegocio-angular-components.umd.js +30 -335
- package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js +2 -2
- package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
- package/common/agro-regex.constant.d.ts +0 -3
- package/common/agro-string-utils.class.d.ts +0 -8
- package/components/financial-title-table/financial-title-table.component.d.ts +1 -1
- package/components/financial-title-table/index.d.ts +1 -1
- package/components/financial-title-table/services/financial/index.d.ts +2 -0
- package/esm2015/common/agro-platform-utils.class.js +7 -8
- package/esm2015/common/agro-regex.constant.js +2 -5
- package/esm2015/common/agro-string-utils.class.js +11 -89
- package/esm2015/components/financial-title-table/financial-title-table.component.js +2 -2
- package/esm2015/components/financial-title-table/index.js +2 -2
- package/esm2015/components/financial-title-table/services/financial/index.js +2 -1
- package/esm2015/pipe/index.js +1 -4
- package/esm2015/public-api.js +3 -3
- package/esm2015/senior-agronegocio-angular-components.js +2 -3
- package/esm2015/services/lib-translation.service.js +2 -2
- package/esm5/common/agro-platform-utils.class.js +7 -8
- package/esm5/common/agro-regex.constant.js +2 -5
- package/esm5/common/agro-string-utils.class.js +17 -106
- package/esm5/components/financial-title-table/financial-title-table.component.js +2 -2
- package/esm5/components/financial-title-table/index.js +2 -2
- package/esm5/components/financial-title-table/services/financial/index.js +2 -1
- package/esm5/pipe/index.js +1 -4
- package/esm5/public-api.js +3 -3
- package/esm5/senior-agronegocio-angular-components.js +2 -3
- package/esm5/services/lib-translation.service.js +2 -2
- package/fesm2015/senior-agronegocio-angular-components.js +20 -281
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +26 -324
- package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
- package/package.json +55 -7
- package/pipe/index.d.ts +0 -3
- package/public-api.d.ts +2 -2
- package/senior-agronegocio-angular-components.d.ts +1 -2
- package/senior-agronegocio-angular-components.metadata.json +1 -1
- package/common/agro-object-stringifier.class.d.ts +0 -16
- package/esm2015/common/agro-object-stringifier.class.js +0 -31
- package/esm2015/pipe/cnpj-cpf/cnpj-cpf.pipe.js +0 -28
- package/esm2015/pipe/cnpj-cpf/cnpj-cpf.pipe.module.js +0 -15
- package/esm2015/pipe/cnpj-cpf/index.js +0 -3
- package/esm2015/pipe/stringifier/index.js +0 -3
- package/esm2015/pipe/stringifier/stringifier.pipe.js +0 -13
- package/esm2015/pipe/stringifier/stringifier.pipe.module.js +0 -15
- package/esm2015/pipe/telephone/index.js +0 -3
- package/esm2015/pipe/telephone/telephone.pipe.js +0 -91
- package/esm2015/pipe/telephone/telephone.pipe.module.js +0 -15
- package/esm5/common/agro-object-stringifier.class.js +0 -35
- package/esm5/pipe/cnpj-cpf/cnpj-cpf.pipe.js +0 -35
- package/esm5/pipe/cnpj-cpf/cnpj-cpf.pipe.module.js +0 -18
- package/esm5/pipe/cnpj-cpf/index.js +0 -3
- package/esm5/pipe/stringifier/index.js +0 -3
- package/esm5/pipe/stringifier/stringifier.pipe.js +0 -16
- package/esm5/pipe/stringifier/stringifier.pipe.module.js +0 -18
- package/esm5/pipe/telephone/index.js +0 -3
- package/esm5/pipe/telephone/telephone.pipe.js +0 -95
- package/esm5/pipe/telephone/telephone.pipe.module.js +0 -18
- package/pipe/cnpj-cpf/cnpj-cpf.pipe.d.ts +0 -4
- package/pipe/cnpj-cpf/cnpj-cpf.pipe.module.d.ts +0 -2
- package/pipe/cnpj-cpf/index.d.ts +0 -2
- package/pipe/stringifier/index.d.ts +0 -2
- package/pipe/stringifier/stringifier.pipe.d.ts +0 -9
- package/pipe/stringifier/stringifier.pipe.module.d.ts +0 -2
- package/pipe/telephone/index.d.ts +0 -2
- package/pipe/telephone/telephone.pipe.d.ts +0 -21
- package/pipe/telephone/telephone.pipe.module.d.ts +0 -2
|
@@ -360,10 +360,7 @@
|
|
|
360
360
|
* Validação de Placa de Veículo Antiga
|
|
361
361
|
* Formato: AAA-0000
|
|
362
362
|
*/
|
|
363
|
-
isOldLicensePlate: /^[A-Z]{3}
|
|
364
|
-
isISODate: /^\d{4}-\d{2}-\d{2}$/,
|
|
365
|
-
isISOTime: /^\d{2}:\d{2}:\d{2}$/,
|
|
366
|
-
isISODateTime: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/,
|
|
363
|
+
isOldLicensePlate: /^[A-Z]{3}[0-9]{4}$/
|
|
367
364
|
};
|
|
368
365
|
|
|
369
366
|
|
|
@@ -2293,19 +2290,13 @@
|
|
|
2293
2290
|
*/
|
|
2294
2291
|
AgroStringUtils.isEmpty = function (str) {
|
|
2295
2292
|
var _a;
|
|
2296
|
-
|
|
2297
|
-
return ((_a = str === null || str === void 0 ? void 0 : str.trim()) === null || _a === void 0 ? void 0 : _a.length) === exports.AGRO_NUMBERS.ZERO;
|
|
2298
|
-
}
|
|
2299
|
-
return true;
|
|
2293
|
+
return !str || ((_a = str.trim()) === null || _a === void 0 ? void 0 : _a.length) === exports.AGRO_NUMBERS.ZERO;
|
|
2300
2294
|
};
|
|
2301
2295
|
/**
|
|
2302
2296
|
* Verifica se a string não está vazia.
|
|
2303
2297
|
*/
|
|
2304
2298
|
AgroStringUtils.isNotEmpty = function (str) {
|
|
2305
|
-
|
|
2306
|
-
return !AgroStringUtils.isEmpty(str);
|
|
2307
|
-
}
|
|
2308
|
-
return false;
|
|
2299
|
+
return !AgroStringUtils.isEmpty(str);
|
|
2309
2300
|
};
|
|
2310
2301
|
/** Verifica se a string é nula, indefinida ou contém apenas espaços em branco */
|
|
2311
2302
|
AgroStringUtils.isBlank = function (str) {
|
|
@@ -2360,7 +2351,7 @@
|
|
|
2360
2351
|
return AGRO_REGEX.isUUID.test(str);
|
|
2361
2352
|
};
|
|
2362
2353
|
AgroStringUtils.isNumber = function (str) {
|
|
2363
|
-
return
|
|
2354
|
+
return AGRO_REGEX.isNumber.test(str);
|
|
2364
2355
|
};
|
|
2365
2356
|
AgroStringUtils.validateCPF = function (cpf) {
|
|
2366
2357
|
cpf = cpf.replace(/\D/g, "");
|
|
@@ -2377,7 +2368,7 @@
|
|
|
2377
2368
|
};
|
|
2378
2369
|
var digit1 = calcVerifier(cpf, exports.AGRO_NUMBERS.NINE);
|
|
2379
2370
|
var digit2 = calcVerifier(cpf, exports.AGRO_NUMBERS.TEN);
|
|
2380
|
-
return
|
|
2371
|
+
return digit1 === parseInt(cpf[exports.AGRO_NUMBERS.NINE], exports.AGRO_NUMBERS.TEN) && digit2 === parseInt(cpf[exports.AGRO_NUMBERS.TEN], exports.AGRO_NUMBERS.TEN);
|
|
2381
2372
|
};
|
|
2382
2373
|
/**
|
|
2383
2374
|
* Detecta automaticamente se é CNPJ antigo ou novo formato.
|
|
@@ -2420,8 +2411,7 @@
|
|
|
2420
2411
|
}
|
|
2421
2412
|
resto = soma % exports.AGRO_NUMBERS.ELEVEN;
|
|
2422
2413
|
var digito2 = resto < exports.AGRO_NUMBERS.TWO ? exports.AGRO_NUMBERS.ZERO : exports.AGRO_NUMBERS.ELEVEN - resto;
|
|
2423
|
-
return
|
|
2424
|
-
parseInt(cnpj.charAt(exports.AGRO_NUMBERS.THIRTEEN), exports.AGRO_NUMBERS.TEN) === digito2);
|
|
2414
|
+
return parseInt(cnpj.charAt(exports.AGRO_NUMBERS.TWELVE), exports.AGRO_NUMBERS.TEN) === digito1 && parseInt(cnpj.charAt(exports.AGRO_NUMBERS.THIRTEEN), exports.AGRO_NUMBERS.TEN) === digito2;
|
|
2425
2415
|
};
|
|
2426
2416
|
/**
|
|
2427
2417
|
* Valida o CNPJ em formato alfanumérico (padrão 2026)
|
|
@@ -2517,93 +2507,20 @@
|
|
|
2517
2507
|
var matches = str.match(regex);
|
|
2518
2508
|
return matches ? matches.length : exports.AGRO_NUMBERS.ZERO;
|
|
2519
2509
|
};
|
|
2520
|
-
/**
|
|
2521
|
-
* Remove uma máscara simples da string fornecida.O padrão de máscaras é definido pelo enum AgroStringMasks ou
|
|
2522
|
-
* pode ser uma string personalizada onde '9' representa um dígito a ser mantido da string.
|
|
2523
|
-
*/
|
|
2524
|
-
AgroStringUtils.removeMask = function (value, mask) {
|
|
2525
|
-
var e_1, _a;
|
|
2526
|
-
if (!value || !mask) {
|
|
2527
|
-
return value;
|
|
2528
|
-
}
|
|
2529
|
-
var valueChars = value.toString().split("");
|
|
2530
|
-
var maskChars = mask.split("");
|
|
2531
|
-
var unmaskedValue = "";
|
|
2532
|
-
var j = 0;
|
|
2533
|
-
var isDigit = function (c) { return /\d/.test(c); };
|
|
2534
|
-
var isAlpha = function (c) { return /[A-Za-z]/.test(c); };
|
|
2535
|
-
var isAlnum = function (c) { return /[A-Za-z0-9]/.test(c); };
|
|
2536
|
-
var extractNext = function (testFn) {
|
|
2537
|
-
var k = j;
|
|
2538
|
-
while (k < valueChars.length && !testFn(valueChars[k])) {
|
|
2539
|
-
k++;
|
|
2540
|
-
}
|
|
2541
|
-
if (k < valueChars.length) {
|
|
2542
|
-
var found = valueChars[k];
|
|
2543
|
-
j = k + 1;
|
|
2544
|
-
return found;
|
|
2545
|
-
}
|
|
2546
|
-
var fallback = valueChars[j];
|
|
2547
|
-
j++;
|
|
2548
|
-
return fallback;
|
|
2549
|
-
};
|
|
2550
|
-
var processMaskChar = function (maskChar) {
|
|
2551
|
-
var _a, _b;
|
|
2552
|
-
if (j >= valueChars.length) {
|
|
2553
|
-
return;
|
|
2554
|
-
}
|
|
2555
|
-
var current = valueChars[j];
|
|
2556
|
-
switch (maskChar) {
|
|
2557
|
-
case "9":
|
|
2558
|
-
unmaskedValue += (_a = extractNext(isDigit)) !== null && _a !== void 0 ? _a : "";
|
|
2559
|
-
break;
|
|
2560
|
-
case "A":
|
|
2561
|
-
unmaskedValue += (_b = extractNext(isAlpha)) !== null && _b !== void 0 ? _b : "";
|
|
2562
|
-
break;
|
|
2563
|
-
default:
|
|
2564
|
-
handleSeparator(maskChar, current);
|
|
2565
|
-
break;
|
|
2566
|
-
}
|
|
2567
|
-
};
|
|
2568
|
-
var handleSeparator = function (maskChar, current) {
|
|
2569
|
-
if (current === maskChar) {
|
|
2570
|
-
j++; // separador presente no valor
|
|
2571
|
-
}
|
|
2572
|
-
if (isAlnum(current)) {
|
|
2573
|
-
unmaskedValue += current;
|
|
2574
|
-
j++;
|
|
2575
|
-
}
|
|
2576
|
-
// se for pontuação diferente, apenas ignora (não consome j)
|
|
2577
|
-
};
|
|
2578
|
-
try {
|
|
2579
|
-
for (var maskChars_1 = __values(maskChars), maskChars_1_1 = maskChars_1.next(); !maskChars_1_1.done; maskChars_1_1 = maskChars_1.next()) {
|
|
2580
|
-
var maskChar = maskChars_1_1.value;
|
|
2581
|
-
processMaskChar(maskChar);
|
|
2582
|
-
}
|
|
2583
|
-
}
|
|
2584
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2585
|
-
finally {
|
|
2586
|
-
try {
|
|
2587
|
-
if (maskChars_1_1 && !maskChars_1_1.done && (_a = maskChars_1.return)) _a.call(maskChars_1);
|
|
2588
|
-
}
|
|
2589
|
-
finally { if (e_1) throw e_1.error; }
|
|
2590
|
-
}
|
|
2591
|
-
return unmaskedValue;
|
|
2592
|
-
};
|
|
2593
2510
|
/**
|
|
2594
2511
|
* Aplica uma máscara simples à string fornecida.O padrão de máscaras é definido pelo enum AgroStringMasks ou
|
|
2595
2512
|
* pode ser uma string personalizada onde '9' representa um dígito a ser substituído pelo caractere correspondente
|
|
2596
2513
|
* da string.
|
|
2597
2514
|
*/
|
|
2598
2515
|
AgroStringUtils.applyMask = function (value, mask) {
|
|
2599
|
-
var
|
|
2600
|
-
var valueChars =
|
|
2516
|
+
var e_1, _a;
|
|
2517
|
+
var valueChars = value.toString().split("");
|
|
2601
2518
|
var maskChars = mask.split("");
|
|
2602
2519
|
var maskedValue = "";
|
|
2603
2520
|
var j = exports.AGRO_NUMBERS.ZERO;
|
|
2604
2521
|
try {
|
|
2605
|
-
for (var
|
|
2606
|
-
var maskChar =
|
|
2522
|
+
for (var maskChars_1 = __values(maskChars), maskChars_1_1 = maskChars_1.next(); !maskChars_1_1.done; maskChars_1_1 = maskChars_1.next()) {
|
|
2523
|
+
var maskChar = maskChars_1_1.value;
|
|
2607
2524
|
if (j >= valueChars.length) {
|
|
2608
2525
|
break;
|
|
2609
2526
|
}
|
|
@@ -2616,12 +2533,12 @@
|
|
|
2616
2533
|
}
|
|
2617
2534
|
}
|
|
2618
2535
|
}
|
|
2619
|
-
catch (
|
|
2536
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2620
2537
|
finally {
|
|
2621
2538
|
try {
|
|
2622
|
-
if (
|
|
2539
|
+
if (maskChars_1_1 && !maskChars_1_1.done && (_a = maskChars_1.return)) _a.call(maskChars_1);
|
|
2623
2540
|
}
|
|
2624
|
-
finally { if (
|
|
2541
|
+
finally { if (e_1) throw e_1.error; }
|
|
2625
2542
|
}
|
|
2626
2543
|
return maskedValue;
|
|
2627
2544
|
};
|
|
@@ -2631,15 +2548,6 @@
|
|
|
2631
2548
|
AgroStringUtils.isInvalid = function (str) {
|
|
2632
2549
|
return !AgroStringUtils.isValid(str);
|
|
2633
2550
|
};
|
|
2634
|
-
AgroStringUtils.isISODate = function (value) {
|
|
2635
|
-
return AGRO_REGEX.isISODate.test(value);
|
|
2636
|
-
};
|
|
2637
|
-
AgroStringUtils.isISOTime = function (value) {
|
|
2638
|
-
return AGRO_REGEX.isISOTime.test(value);
|
|
2639
|
-
};
|
|
2640
|
-
AgroStringUtils.isISODatetime = function (value) {
|
|
2641
|
-
return AGRO_REGEX.isISODateTime.test(value);
|
|
2642
|
-
};
|
|
2643
2551
|
AgroStringUtils.CNPJ_TRADICIONAL_PESOS_1 = [
|
|
2644
2552
|
exports.AGRO_NUMBERS.FIVE,
|
|
2645
2553
|
exports.AGRO_NUMBERS.FOUR,
|
|
@@ -2652,7 +2560,7 @@
|
|
|
2652
2560
|
exports.AGRO_NUMBERS.FIVE,
|
|
2653
2561
|
exports.AGRO_NUMBERS.FOUR,
|
|
2654
2562
|
exports.AGRO_NUMBERS.THREE,
|
|
2655
|
-
exports.AGRO_NUMBERS.TWO
|
|
2563
|
+
exports.AGRO_NUMBERS.TWO
|
|
2656
2564
|
];
|
|
2657
2565
|
AgroStringUtils.CNPJ_TRADICIONAL_PESOS_2 = [
|
|
2658
2566
|
exports.AGRO_NUMBERS.SIX,
|
|
@@ -2667,7 +2575,7 @@
|
|
|
2667
2575
|
exports.AGRO_NUMBERS.FIVE,
|
|
2668
2576
|
exports.AGRO_NUMBERS.FOUR,
|
|
2669
2577
|
exports.AGRO_NUMBERS.THREE,
|
|
2670
|
-
exports.AGRO_NUMBERS.TWO
|
|
2578
|
+
exports.AGRO_NUMBERS.TWO
|
|
2671
2579
|
];
|
|
2672
2580
|
// Pesos utilizados para cálculo de dígitos verificadores do CNPJ alfanumérico (2026)
|
|
2673
2581
|
AgroStringUtils.CNPJ_ALFANUMERICO_PESOS_1 = [
|
|
@@ -2682,7 +2590,7 @@
|
|
|
2682
2590
|
exports.AGRO_NUMBERS.FIVE,
|
|
2683
2591
|
exports.AGRO_NUMBERS.FOUR,
|
|
2684
2592
|
exports.AGRO_NUMBERS.THREE,
|
|
2685
|
-
exports.AGRO_NUMBERS.TWO
|
|
2593
|
+
exports.AGRO_NUMBERS.TWO
|
|
2686
2594
|
];
|
|
2687
2595
|
AgroStringUtils.CNPJ_ALFANUMERICO_PESOS_2 = [
|
|
2688
2596
|
exports.AGRO_NUMBERS.SIX,
|
|
@@ -2697,7 +2605,7 @@
|
|
|
2697
2605
|
exports.AGRO_NUMBERS.FIVE,
|
|
2698
2606
|
exports.AGRO_NUMBERS.FOUR,
|
|
2699
2607
|
exports.AGRO_NUMBERS.THREE,
|
|
2700
|
-
exports.AGRO_NUMBERS.TWO
|
|
2608
|
+
exports.AGRO_NUMBERS.TWO
|
|
2701
2609
|
];
|
|
2702
2610
|
return AgroStringUtils;
|
|
2703
2611
|
}());
|
|
@@ -2715,7 +2623,7 @@
|
|
|
2715
2623
|
* @returns
|
|
2716
2624
|
*/
|
|
2717
2625
|
AgroPlatformUtils.getCurrentTenant = function () {
|
|
2718
|
-
var tenant = AgroPlatformUtils.getTokenField(
|
|
2626
|
+
var tenant = AgroPlatformUtils.getTokenField('tenantName');
|
|
2719
2627
|
if (tenant) {
|
|
2720
2628
|
return tenant;
|
|
2721
2629
|
}
|
|
@@ -2727,18 +2635,17 @@
|
|
|
2727
2635
|
* @returns
|
|
2728
2636
|
*/
|
|
2729
2637
|
AgroPlatformUtils.getCurrentTenantLocale = function () {
|
|
2730
|
-
var locale = AgroPlatformUtils.getTokenField(
|
|
2638
|
+
var locale = AgroPlatformUtils.getTokenField('locale');
|
|
2731
2639
|
if (locale) {
|
|
2732
2640
|
return locale;
|
|
2733
2641
|
}
|
|
2734
|
-
throw new Error("
|
|
2642
|
+
throw new Error("Cookie: \"" + COOKIE_TOKEN + "\" n\u00E3o encontrado.");
|
|
2735
2643
|
};
|
|
2736
2644
|
/**
|
|
2737
2645
|
* @deprecated Use getCurrentTenantLocale()
|
|
2738
2646
|
* Mantido por compatibilidade retroativa.
|
|
2739
2647
|
*/
|
|
2740
2648
|
AgroPlatformUtils.getCurrenTenantLocale = function () {
|
|
2741
|
-
// legacy typo retained
|
|
2742
2649
|
return AgroPlatformUtils.getCurrentTenantLocale();
|
|
2743
2650
|
};
|
|
2744
2651
|
/**
|
|
@@ -2747,7 +2654,7 @@
|
|
|
2747
2654
|
* @returns string || null
|
|
2748
2655
|
*/
|
|
2749
2656
|
AgroPlatformUtils.getCurrentUserName = function () {
|
|
2750
|
-
var name = AgroPlatformUtils.getTokenField(
|
|
2657
|
+
var name = AgroPlatformUtils.getTokenField('fullName');
|
|
2751
2658
|
return name || null;
|
|
2752
2659
|
};
|
|
2753
2660
|
/**
|
|
@@ -2756,7 +2663,7 @@
|
|
|
2756
2663
|
* @returns string
|
|
2757
2664
|
*/
|
|
2758
2665
|
AgroPlatformUtils.getCurrentUserEmail = function () {
|
|
2759
|
-
var email = AgroPlatformUtils.getTokenField(
|
|
2666
|
+
var email = AgroPlatformUtils.getTokenField('email');
|
|
2760
2667
|
if (!email) {
|
|
2761
2668
|
console.info("Cookie: \"" + COOKIE_TOKEN + "\" n\u00E3o encontrado.");
|
|
2762
2669
|
}
|
|
@@ -2791,7 +2698,7 @@
|
|
|
2791
2698
|
* Caso contrário, retorna uma instância de Error
|
|
2792
2699
|
*/
|
|
2793
2700
|
AgroPlatformUtils.getCurrentAccessToken = function () {
|
|
2794
|
-
var token = AgroPlatformUtils.getTokenField(
|
|
2701
|
+
var token = AgroPlatformUtils.getTokenField('access_token');
|
|
2795
2702
|
if (!token) {
|
|
2796
2703
|
console.info("Cookie: \"" + COOKIE_TOKEN + "\" n\u00E3o encontrado.");
|
|
2797
2704
|
}
|
|
@@ -4647,7 +4554,7 @@
|
|
|
4647
4554
|
this.setLang(this.getLangOfUser());
|
|
4648
4555
|
}
|
|
4649
4556
|
LibTranslationService.prototype.getLangOfUser = function () {
|
|
4650
|
-
return AgroPlatformUtils.
|
|
4557
|
+
return AgroPlatformUtils.getCurrenTenantLocale() || "pt-BR";
|
|
4651
4558
|
};
|
|
4652
4559
|
LibTranslationService.prototype.setLang = function (lang) {
|
|
4653
4560
|
this.currentTranslation = this.availableTranslations[lang] || {};
|
|
@@ -6999,17 +6906,17 @@
|
|
|
6999
6906
|
return AgroEntityService;
|
|
7000
6907
|
}());
|
|
7001
6908
|
|
|
7002
|
-
|
|
6909
|
+
|
|
7003
6910
|
(function (TypeAccount) {
|
|
7004
6911
|
TypeAccount["PAYABLE"] = "PAYABLE";
|
|
7005
6912
|
TypeAccount["RECEIVABLE"] = "RECEIVABLE";
|
|
7006
|
-
})(TypeAccount || (TypeAccount = {}));
|
|
7007
|
-
|
|
6913
|
+
})(exports.TypeAccount || (exports.TypeAccount = {}));
|
|
6914
|
+
|
|
7008
6915
|
(function (StatusType) {
|
|
7009
6916
|
StatusType["OPEN"] = "OPEN";
|
|
7010
6917
|
StatusType["PAID"] = "PAID";
|
|
7011
6918
|
StatusType["CANCELLED"] = "CANCELLED";
|
|
7012
|
-
})(StatusType || (StatusType = {}));
|
|
6919
|
+
})(exports.StatusType || (exports.StatusType = {}));
|
|
7013
6920
|
var TitleFieldsOrderBy;
|
|
7014
6921
|
(function (TitleFieldsOrderBy) {
|
|
7015
6922
|
TitleFieldsOrderBy["NUMBER_TITLE"] = "NUMBER_TITLE";
|
|
@@ -7113,8 +7020,8 @@
|
|
|
7113
7020
|
this.form = new forms.FormGroup({
|
|
7114
7021
|
titlesForm: new forms.FormArray([], []),
|
|
7115
7022
|
});
|
|
7116
|
-
this.ngUnsubscribe = new core.EventEmitter();
|
|
7117
7023
|
this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
|
|
7024
|
+
this.ngUnsubscribe = new core.EventEmitter();
|
|
7118
7025
|
common.registerLocaleData(localePt);
|
|
7119
7026
|
}
|
|
7120
7027
|
Object.defineProperty(FinancialTitleTableComponent.prototype, "titlesForm", {
|
|
@@ -7430,211 +7337,6 @@
|
|
|
7430
7337
|
return FinancialTitleTableModule;
|
|
7431
7338
|
}());
|
|
7432
7339
|
|
|
7433
|
-
var CnpjCpfPipe = /** @class */ (function () {
|
|
7434
|
-
function CnpjCpfPipe() {
|
|
7435
|
-
}
|
|
7436
|
-
CnpjCpfPipe.prototype.transform = function (value) {
|
|
7437
|
-
var args = [];
|
|
7438
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
7439
|
-
args[_i - 1] = arguments[_i];
|
|
7440
|
-
}
|
|
7441
|
-
if (typeof value !== "string" && typeof value === "number") {
|
|
7442
|
-
value = value === null || value === void 0 ? void 0 : value.toString();
|
|
7443
|
-
}
|
|
7444
|
-
if (typeof value !== "string") {
|
|
7445
|
-
return value;
|
|
7446
|
-
}
|
|
7447
|
-
if (AgroStringUtils.validateCNPJ(value)) {
|
|
7448
|
-
return AgroStringUtils.applyMask(value, exports.AgroStringMasks.CNPJ);
|
|
7449
|
-
}
|
|
7450
|
-
if (AgroStringUtils.validateCPF(value)) {
|
|
7451
|
-
return AgroStringUtils.applyMask(value, exports.AgroStringMasks.CPF);
|
|
7452
|
-
}
|
|
7453
|
-
return value;
|
|
7454
|
-
};
|
|
7455
|
-
CnpjCpfPipe = __decorate([
|
|
7456
|
-
core.Pipe({
|
|
7457
|
-
name: "cnpjCpf",
|
|
7458
|
-
})
|
|
7459
|
-
], CnpjCpfPipe);
|
|
7460
|
-
return CnpjCpfPipe;
|
|
7461
|
-
}());
|
|
7462
|
-
|
|
7463
|
-
var CnpjCpfPipeModule = /** @class */ (function () {
|
|
7464
|
-
function CnpjCpfPipeModule() {
|
|
7465
|
-
}
|
|
7466
|
-
CnpjCpfPipeModule = __decorate([
|
|
7467
|
-
core.NgModule({
|
|
7468
|
-
declarations: [CnpjCpfPipe],
|
|
7469
|
-
imports: [common.CommonModule],
|
|
7470
|
-
exports: [CnpjCpfPipe],
|
|
7471
|
-
})
|
|
7472
|
-
], CnpjCpfPipeModule);
|
|
7473
|
-
return CnpjCpfPipeModule;
|
|
7474
|
-
}());
|
|
7475
|
-
|
|
7476
|
-
var AgroObjectStringifier = /** @class */ (function () {
|
|
7477
|
-
function AgroObjectStringifier() {
|
|
7478
|
-
}
|
|
7479
|
-
/**
|
|
7480
|
-
* Formata um objeto concatenando valores segundo as chaves e pipes informados.
|
|
7481
|
-
*
|
|
7482
|
-
* @param separator Separador entre os valores (ex: "-")
|
|
7483
|
-
* @param fields Campos a extrair. Podem conter subpropriedades ("propriedade.subPropriedade") e pipes ("propriedade|nomeDaPipe:arg1:arg2")
|
|
7484
|
-
* @param obj Objeto origem
|
|
7485
|
-
*/
|
|
7486
|
-
AgroObjectStringifier.formatObject = function (separator, fields, obj, usePipes) {
|
|
7487
|
-
function mapField(field) {
|
|
7488
|
-
var value = AgroObjectStringifier.resolvePath(obj, field);
|
|
7489
|
-
if (usePipes === null || usePipes === void 0 ? void 0 : usePipes.hasOwnProperty(field)) {
|
|
7490
|
-
return usePipes[field].transform(value);
|
|
7491
|
-
}
|
|
7492
|
-
return value !== null && value !== void 0 ? value : "";
|
|
7493
|
-
}
|
|
7494
|
-
function filterValid(v) {
|
|
7495
|
-
return typeof v === "number" || AgroStringUtils.isValid(v);
|
|
7496
|
-
}
|
|
7497
|
-
return fields.map(mapField).filter(filterValid).join(" " + separator + " ");
|
|
7498
|
-
};
|
|
7499
|
-
/** Resolve um caminho tipo "empresa.cargo" dentro de um objeto */
|
|
7500
|
-
AgroObjectStringifier.resolvePath = function (obj, path) {
|
|
7501
|
-
function reducer(acc, key) {
|
|
7502
|
-
return acc === null || acc === void 0 ? void 0 : acc[key];
|
|
7503
|
-
}
|
|
7504
|
-
return path.split(".").reduce(reducer, obj);
|
|
7505
|
-
};
|
|
7506
|
-
return AgroObjectStringifier;
|
|
7507
|
-
}());
|
|
7508
|
-
|
|
7509
|
-
var StringifierPipe = /** @class */ (function () {
|
|
7510
|
-
function StringifierPipe() {
|
|
7511
|
-
}
|
|
7512
|
-
StringifierPipe.prototype.transform = function (value, separator, paths, pipes) {
|
|
7513
|
-
return AgroObjectStringifier.formatObject(separator, paths, value, pipes);
|
|
7514
|
-
};
|
|
7515
|
-
StringifierPipe = __decorate([
|
|
7516
|
-
core.Pipe({ name: "stringifier" })
|
|
7517
|
-
], StringifierPipe);
|
|
7518
|
-
return StringifierPipe;
|
|
7519
|
-
}());
|
|
7520
|
-
|
|
7521
|
-
var StringifierPipeModule = /** @class */ (function () {
|
|
7522
|
-
function StringifierPipeModule() {
|
|
7523
|
-
}
|
|
7524
|
-
StringifierPipeModule = __decorate([
|
|
7525
|
-
core.NgModule({
|
|
7526
|
-
declarations: [StringifierPipe],
|
|
7527
|
-
imports: [common.CommonModule],
|
|
7528
|
-
exports: [StringifierPipe],
|
|
7529
|
-
})
|
|
7530
|
-
], StringifierPipeModule);
|
|
7531
|
-
return StringifierPipeModule;
|
|
7532
|
-
}());
|
|
7533
|
-
|
|
7534
|
-
var TelephonePipe = /** @class */ (function () {
|
|
7535
|
-
function TelephonePipe() {
|
|
7536
|
-
}
|
|
7537
|
-
/**
|
|
7538
|
-
* Transforma um número de telefone aplicando máscara automaticamente.
|
|
7539
|
-
* @param value Valor do telefone.
|
|
7540
|
-
* @param withDDI Define se deve forçar formatação com DDI (mesmo que não exista).
|
|
7541
|
-
*/
|
|
7542
|
-
TelephonePipe.prototype.transform = function (value, withDDI) {
|
|
7543
|
-
if (withDDI === void 0) { withDDI = false; }
|
|
7544
|
-
if (!value) {
|
|
7545
|
-
return "";
|
|
7546
|
-
}
|
|
7547
|
-
var digits = this.cleanDigits(value);
|
|
7548
|
-
if (!digits) {
|
|
7549
|
-
return value.toString();
|
|
7550
|
-
}
|
|
7551
|
-
var _a = this.extractParts(digits, withDDI), ddi = _a.ddi, ddd = _a.ddd, number = _a.number;
|
|
7552
|
-
return this.formatPhone(ddi, ddd, number, value.toString(), withDDI);
|
|
7553
|
-
};
|
|
7554
|
-
/** Remove todos os caracteres não numéricos */
|
|
7555
|
-
TelephonePipe.prototype.cleanDigits = function (value) {
|
|
7556
|
-
return value.toString().replace(/\D+/g, "");
|
|
7557
|
-
};
|
|
7558
|
-
/** Extrai DDI, DDD e número, considerando se deve aplicar DDI forçado */
|
|
7559
|
-
TelephonePipe.prototype.extractParts = function (digits, withDDI) {
|
|
7560
|
-
var len = digits.length;
|
|
7561
|
-
if (withDDI) {
|
|
7562
|
-
return this.extractWithDDI(digits);
|
|
7563
|
-
}
|
|
7564
|
-
if (len <= exports.AGRO_NUMBERS.NINE) {
|
|
7565
|
-
return { ddi: "", ddd: "", number: digits };
|
|
7566
|
-
}
|
|
7567
|
-
if (len <= exports.AGRO_NUMBERS.ELEVEN) {
|
|
7568
|
-
return this.extractWithDDD(digits);
|
|
7569
|
-
}
|
|
7570
|
-
return this.extractWithDDI(digits);
|
|
7571
|
-
};
|
|
7572
|
-
/** Extrai DDD e número (sem DDI) */
|
|
7573
|
-
TelephonePipe.prototype.extractWithDDD = function (digits) {
|
|
7574
|
-
var ddd = digits.slice(0, 2);
|
|
7575
|
-
var number = digits.slice(2);
|
|
7576
|
-
return { ddi: "", ddd: ddd, number: number };
|
|
7577
|
-
};
|
|
7578
|
-
/** Extrai DDI, DDD e número */
|
|
7579
|
-
TelephonePipe.prototype.extractWithDDI = function (digits) {
|
|
7580
|
-
var len = digits.length;
|
|
7581
|
-
var ddiLen = exports.AGRO_NUMBERS.ONE;
|
|
7582
|
-
if (len >= exports.AGRO_NUMBERS.FOURTEEN) {
|
|
7583
|
-
ddiLen = exports.AGRO_NUMBERS.THREE;
|
|
7584
|
-
}
|
|
7585
|
-
if (len >= exports.AGRO_NUMBERS.TWELVE) {
|
|
7586
|
-
ddiLen = exports.AGRO_NUMBERS.TWO;
|
|
7587
|
-
}
|
|
7588
|
-
var ddi = digits.slice(exports.AGRO_NUMBERS.ZERO, ddiLen);
|
|
7589
|
-
var ddd = digits.slice(ddiLen, ddiLen + exports.AGRO_NUMBERS.TWO);
|
|
7590
|
-
var number = digits.slice(ddiLen + exports.AGRO_NUMBERS.TWO);
|
|
7591
|
-
return { ddi: ddi, ddd: ddd, number: number };
|
|
7592
|
-
};
|
|
7593
|
-
/** Monta o número formatado */
|
|
7594
|
-
TelephonePipe.prototype.formatPhone = function (ddi, ddd, number, fallback, withDDI) {
|
|
7595
|
-
if (!number) {
|
|
7596
|
-
return fallback;
|
|
7597
|
-
}
|
|
7598
|
-
var formatted = "";
|
|
7599
|
-
if (withDDI || ddi) {
|
|
7600
|
-
formatted += "+" + (ddi || "55") + " ";
|
|
7601
|
-
}
|
|
7602
|
-
if (ddd) {
|
|
7603
|
-
formatted += "(" + ddd + ") ";
|
|
7604
|
-
}
|
|
7605
|
-
formatted += this.formatNumber(number);
|
|
7606
|
-
return formatted;
|
|
7607
|
-
};
|
|
7608
|
-
/** Aplica máscara de 8 ou 9 dígitos */
|
|
7609
|
-
TelephonePipe.prototype.formatNumber = function (number) {
|
|
7610
|
-
var len = number.length;
|
|
7611
|
-
if (len === exports.AGRO_NUMBERS.NINE) {
|
|
7612
|
-
return number.slice(exports.AGRO_NUMBERS.ZERO, exports.AGRO_NUMBERS.FIVE) + "-" + number.slice(exports.AGRO_NUMBERS.FIVE);
|
|
7613
|
-
}
|
|
7614
|
-
if (len === exports.AGRO_NUMBERS.EIGHT) {
|
|
7615
|
-
return number.slice(exports.AGRO_NUMBERS.ZERO, exports.AGRO_NUMBERS.FOUR) + "-" + number.slice(exports.AGRO_NUMBERS.FOUR);
|
|
7616
|
-
}
|
|
7617
|
-
return number;
|
|
7618
|
-
};
|
|
7619
|
-
TelephonePipe = __decorate([
|
|
7620
|
-
core.Pipe({ name: "telephone" })
|
|
7621
|
-
], TelephonePipe);
|
|
7622
|
-
return TelephonePipe;
|
|
7623
|
-
}());
|
|
7624
|
-
|
|
7625
|
-
var TelephonePipeModule = /** @class */ (function () {
|
|
7626
|
-
function TelephonePipeModule() {
|
|
7627
|
-
}
|
|
7628
|
-
TelephonePipeModule = __decorate([
|
|
7629
|
-
core.NgModule({
|
|
7630
|
-
declarations: [TelephonePipe],
|
|
7631
|
-
imports: [common.CommonModule],
|
|
7632
|
-
exports: [TelephonePipe],
|
|
7633
|
-
})
|
|
7634
|
-
], TelephonePipeModule);
|
|
7635
|
-
return TelephonePipeModule;
|
|
7636
|
-
}());
|
|
7637
|
-
|
|
7638
7340
|
var HostProjectConfigsInjectionToken = new core.InjectionToken("hostProjectConfigs");
|
|
7639
7341
|
var AgroAngularComponentsModule = /** @class */ (function () {
|
|
7640
7342
|
function AgroAngularComponentsModule() {
|
|
@@ -7674,8 +7376,6 @@
|
|
|
7674
7376
|
exports.AsyncLock = AsyncLock;
|
|
7675
7377
|
exports.CancelEventDialogComponent = CancelEventDialogComponent;
|
|
7676
7378
|
exports.CancelEventDialogModule = CancelEventDialogModule;
|
|
7677
|
-
exports.CnpjCpfPipe = CnpjCpfPipe;
|
|
7678
|
-
exports.CnpjCpfPipeModule = CnpjCpfPipeModule;
|
|
7679
7379
|
exports.Colors = Colors;
|
|
7680
7380
|
exports.E001TnsModule = E001TnsModule;
|
|
7681
7381
|
exports.E001pesModule = E001pesModule;
|
|
@@ -7705,17 +7405,12 @@
|
|
|
7705
7405
|
exports.ProducerInvoiceModule = ProducerInvoiceModule;
|
|
7706
7406
|
exports.RuralEstateModule = RuralEstateModule;
|
|
7707
7407
|
exports.SharedModule = SharedModule;
|
|
7708
|
-
exports.StringifierPipe = StringifierPipe;
|
|
7709
|
-
exports.StringifierPipeModule = StringifierPipeModule;
|
|
7710
|
-
exports.TelephonePipe = TelephonePipe;
|
|
7711
|
-
exports.TelephonePipeModule = TelephonePipeModule;
|
|
7712
7408
|
exports.TicketModule = TicketModule;
|
|
7713
7409
|
exports.TransferModule = TransferModule;
|
|
7714
7410
|
exports.UserInformationService = UserInformationService;
|
|
7715
7411
|
exports.WebsocketModule = WebsocketModule;
|
|
7716
7412
|
exports.WebsocketService = WebsocketService;
|
|
7717
|
-
exports.ɵa =
|
|
7718
|
-
exports.ɵb = LibTranslationService;
|
|
7413
|
+
exports.ɵa = LibTranslationService;
|
|
7719
7414
|
|
|
7720
7415
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7721
7416
|
|