investira.sdk 2.3.13 → 2.3.15
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/CHANGELOG.md +5 -1
- package/lib/utils/arrays.js +1 -1
- package/lib/utils/dates.js +8 -3
- package/lib/utils/httpRequests.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -347,7 +347,7 @@ O contrutor para a criação das mensagem foi alterado.
|
|
|
347
347
|
|
|
348
348
|
# 2.1.7
|
|
349
349
|
|
|
350
|
-
- [dates] Função <code>locale</code> verifica se configuração atual já é
|
|
350
|
+
- [dates] Função <code>locale</code> verifica se configuração atual já é igual ao selecionada.
|
|
351
351
|
|
|
352
352
|
# 2.1.8
|
|
353
353
|
|
|
@@ -509,3 +509,7 @@ O contrutor para a criação das mensagem foi alterado.
|
|
|
509
509
|
# 2.3.13
|
|
510
510
|
|
|
511
511
|
- [axios] Atualizado
|
|
512
|
+
|
|
513
|
+
# 2.3.14
|
|
514
|
+
|
|
515
|
+
- [axios] Utilização do axios.default.create()
|
package/lib/utils/arrays.js
CHANGED
|
@@ -211,7 +211,7 @@ const pvSeek = (
|
|
|
211
211
|
let xMinValue = pConvertFunction(pSourceArray[pControl.minIndex]);
|
|
212
212
|
let xMaxValue = pConvertFunction(pSourceArray[pControl.maxIndex]);
|
|
213
213
|
//IGUAL
|
|
214
|
-
//Retorna se o target for
|
|
214
|
+
//Retorna se o target for igual a minValue ou maxValue
|
|
215
215
|
if (String(xMinValue) === String(pTargetValue)) {
|
|
216
216
|
return pControl.minIndex;
|
|
217
217
|
} else if (String(xMaxValue) === String(pTargetValue)) {
|
package/lib/utils/dates.js
CHANGED
|
@@ -598,15 +598,20 @@ const dates = {
|
|
|
598
598
|
* Retorna data com acréscimo de dias úteis.
|
|
599
599
|
* Se quantidade de dias não for informada ou for zero,
|
|
600
600
|
* retorna a mesma data enviada se ela for dia útil, ou a
|
|
601
|
-
* a próxida data útil.
|
|
601
|
+
* a próxida data útil ou data útil anterior conforme parametro pAnterior.
|
|
602
602
|
* @param {Date} pDate
|
|
603
603
|
* @param {number} pDays
|
|
604
|
+
* @param {boolean} [pAnterior=false] Se retorna data últil anterior ou posterior se quantidade de dias for zeros
|
|
604
605
|
* @returns {Date}
|
|
605
606
|
*/
|
|
606
|
-
addWorkingDays: (pDate, pDays) => {
|
|
607
|
+
addWorkingDays: (pDate, pDays, pAnterior = false) => {
|
|
607
608
|
//Força para procurar o próximo dia útil se dia atual for feriado
|
|
608
609
|
if ((isNull(pDays) || pDays === 0) && !dates.isWorkingDay(pDate)) {
|
|
609
|
-
|
|
610
|
+
if (pAnterior) {
|
|
611
|
+
pDays = -1;
|
|
612
|
+
} else {
|
|
613
|
+
pDays = 1;
|
|
614
|
+
}
|
|
610
615
|
}
|
|
611
616
|
|
|
612
617
|
//Adiciona a quantidade de dias para se aproximar a data alvo
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "investira.sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.15",
|
|
4
4
|
"author": "Investira",
|
|
5
5
|
"description": "Investira SDK",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"registry": true,
|
|
9
|
-
"raw": "investira.sdk@2.3.
|
|
9
|
+
"raw": "investira.sdk@2.3.15",
|
|
10
10
|
"escapedName": "investira.sdk",
|
|
11
|
-
"rawSpec": "2.3.
|
|
11
|
+
"rawSpec": "2.3.15",
|
|
12
12
|
"saveSpec": null,
|
|
13
|
-
"fetchSpec": "2.3.
|
|
13
|
+
"fetchSpec": "2.3.15",
|
|
14
14
|
"homepage": "https://investira.com.br/",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=11.11.0 <=18.12",
|