ng-pli-commons 1.0.124 → 1.0.128
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.
|
@@ -2521,22 +2521,41 @@ class TokenService {
|
|
|
2521
2521
|
// : Array.isArray(objectToken)
|
|
2522
2522
|
// ? JSON.stringify(objectToken)
|
|
2523
2523
|
// : "'" + objectToken + "'";
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2524
|
+
const tokenLiteral = tokensArray[i].value;
|
|
2525
|
+
const pos = replacedTokens.indexOf(tokenLiteral);
|
|
2526
|
+
//Mantis 11649
|
|
2527
|
+
const quoteCtx = this.getQuoteContext(replacedTokens, pos);
|
|
2528
|
+
const escapeForJs = (s, ctx) => {
|
|
2529
|
+
let t = String(s ?? '');
|
|
2530
|
+
t = t.replace(/\\/g, '\\\\'); // backslashes
|
|
2531
|
+
if (ctx === 'double')
|
|
2532
|
+
t = t.replace(/"/g, '\\"');
|
|
2533
|
+
if (ctx === 'single')
|
|
2534
|
+
t = t.replace(/'/g, "\\'");
|
|
2535
|
+
return t;
|
|
2536
|
+
};
|
|
2537
|
+
if (quoteCtx) {
|
|
2538
|
+
const raw = escapeForJs(objectToken, quoteCtx);
|
|
2539
|
+
replacedTokens = this.replaceToken(replacedTokens, tokenLiteral, raw);
|
|
2535
2540
|
}
|
|
2536
2541
|
else {
|
|
2537
|
-
value
|
|
2542
|
+
let value;
|
|
2543
|
+
if (Number(objectToken)) {
|
|
2544
|
+
value = Number(objectToken);
|
|
2545
|
+
}
|
|
2546
|
+
else if (Array.isArray(objectToken)) {
|
|
2547
|
+
value = Array.isArray(objectToken);
|
|
2548
|
+
}
|
|
2549
|
+
else if (JSON.stringify(objectToken)) {
|
|
2550
|
+
value = objectToken.original_name
|
|
2551
|
+
? '"' + objectToken.original_name + '"'
|
|
2552
|
+
: JSON.stringify(objectToken);
|
|
2553
|
+
}
|
|
2554
|
+
else {
|
|
2555
|
+
value = '"' + objectToken + '"';
|
|
2556
|
+
}
|
|
2557
|
+
replacedTokens = this.replaceToken(replacedTokens, tokenLiteral, value);
|
|
2538
2558
|
}
|
|
2539
|
-
replacedTokens = this.replaceToken(replacedTokens, tokensArray[i].value, value);
|
|
2540
2559
|
// } else {
|
|
2541
2560
|
// console.error(lObjectTokens, tokensArray);
|
|
2542
2561
|
// throw {
|
|
@@ -2566,6 +2585,25 @@ class TokenService {
|
|
|
2566
2585
|
}
|
|
2567
2586
|
return replacedTokens;
|
|
2568
2587
|
}
|
|
2588
|
+
getQuoteContext(src, idx) {
|
|
2589
|
+
let inDouble = false, inSingle = false, esc = false;
|
|
2590
|
+
for (let k = 0; k < idx; k++) {
|
|
2591
|
+
const ch = src[k];
|
|
2592
|
+
if (esc) {
|
|
2593
|
+
esc = false;
|
|
2594
|
+
continue;
|
|
2595
|
+
}
|
|
2596
|
+
if (ch === '\\') {
|
|
2597
|
+
esc = true;
|
|
2598
|
+
continue;
|
|
2599
|
+
}
|
|
2600
|
+
if (ch === '"' && !inSingle)
|
|
2601
|
+
inDouble = !inDouble;
|
|
2602
|
+
else if (ch === "'" && !inDouble)
|
|
2603
|
+
inSingle = !inSingle;
|
|
2604
|
+
}
|
|
2605
|
+
return inDouble ? 'double' : inSingle ? 'single' : null;
|
|
2606
|
+
}
|
|
2569
2607
|
/**
|
|
2570
2608
|
* MEtodo que teniendo una expresion de la forma ['tag1', 'tag2']==tag3
|
|
2571
2609
|
* evalua si tag3 hace parte del array si tiene el operador ==.
|
|
@@ -7845,7 +7883,6 @@ class TokenComponent {
|
|
|
7845
7883
|
}
|
|
7846
7884
|
let resumeCategoryYearContent = $('#' + idTotalBudget);
|
|
7847
7885
|
resumeCategoryYearContent.empty();
|
|
7848
|
-
let seguroDeudoresTotal = 0;
|
|
7849
7886
|
if (budgetDto && budgetDto.budget && budgetDto.budget.summary) {
|
|
7850
7887
|
const summary = budgetDto.budget.summary;
|
|
7851
7888
|
const table = $('<table></table>');
|
|
@@ -7907,7 +7944,7 @@ class TokenComponent {
|
|
|
7907
7944
|
tdTotal.css('border', '1px solid black');
|
|
7908
7945
|
tdTotal.css('font-weight', 'bold');
|
|
7909
7946
|
if (isSeguro) {
|
|
7910
|
-
|
|
7947
|
+
this.debtorInsurance = category.total;
|
|
7911
7948
|
}
|
|
7912
7949
|
}
|
|
7913
7950
|
const trFinal = $('<tr>').appendTo(tbody);
|
|
@@ -7930,9 +7967,10 @@ class TokenComponent {
|
|
|
7930
7967
|
tdYear.css('background-color', 'grey');
|
|
7931
7968
|
budgetTotal += year.total;
|
|
7932
7969
|
}
|
|
7970
|
+
const tbWithDebtorInsurance = this.debtorInsurance + summary.budgetTotal;
|
|
7933
7971
|
const totalBaseCurrency = budgetTotal == 0
|
|
7934
7972
|
? '-'
|
|
7935
|
-
: this.currencyPipe.transform(
|
|
7973
|
+
: this.currencyPipe.transform(tbWithDebtorInsurance, 'default', '', '1.0-0');
|
|
7936
7974
|
const totalLabelBaseCurrency = ' ' + totalBaseCurrency + ' ';
|
|
7937
7975
|
const tdFinalTotal = $('<td>', { html: totalLabelBaseCurrency }).appendTo(trFinal);
|
|
7938
7976
|
tdFinalTotal.css('text-align', 'right');
|
|
@@ -16627,9 +16665,9 @@ class CustomValidator {
|
|
|
16627
16665
|
/* tslint:disable */
|
|
16628
16666
|
const VERSION = {
|
|
16629
16667
|
"dirty": true,
|
|
16630
|
-
"raw": "v0.0.18-
|
|
16631
|
-
"hash": "
|
|
16632
|
-
"distance":
|
|
16668
|
+
"raw": "v0.0.18-2677-gc97089f5-dirty",
|
|
16669
|
+
"hash": "gc97089f5",
|
|
16670
|
+
"distance": 2677,
|
|
16633
16671
|
"tag": "v0.0.18",
|
|
16634
16672
|
"semver": {
|
|
16635
16673
|
"options": {
|
|
@@ -16645,10 +16683,10 @@ const VERSION = {
|
|
|
16645
16683
|
"build": [],
|
|
16646
16684
|
"version": "0.0.18"
|
|
16647
16685
|
},
|
|
16648
|
-
"suffix": "
|
|
16649
|
-
"semverString": "0.0.18+
|
|
16650
|
-
"version": "1.0.
|
|
16651
|
-
"buildTimestamp": "2025-
|
|
16686
|
+
"suffix": "2677-gc97089f5-dirty",
|
|
16687
|
+
"semverString": "0.0.18+2677.gc97089f5",
|
|
16688
|
+
"version": "1.0.128",
|
|
16689
|
+
"buildTimestamp": "2025-11-05T14:07:08.659Z"
|
|
16652
16690
|
};
|
|
16653
16691
|
/* tslint:enable */
|
|
16654
16692
|
|