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 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á é iqual ao selecionada.
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()
@@ -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 iqual a minValue ou maxValue
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)) {
@@ -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
- pDays = 1;
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
@@ -3,7 +3,7 @@
3
3
  //resolve problema no tratamento de erro no 'fetch'
4
4
  const axios = require('axios');
5
5
  //@ts-ignore
6
- const baseRequest = axios.create();
6
+ const baseRequest = axios.default.create();
7
7
 
8
8
  const https = require('https');
9
9
  const FormData = require('form-data');
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "investira.sdk",
3
- "version": "2.3.13",
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.13",
9
+ "raw": "investira.sdk@2.3.15",
10
10
  "escapedName": "investira.sdk",
11
- "rawSpec": "2.3.13",
11
+ "rawSpec": "2.3.15",
12
12
  "saveSpec": null,
13
- "fetchSpec": "2.3.13",
13
+ "fetchSpec": "2.3.15",
14
14
  "homepage": "https://investira.com.br/",
15
15
  "engines": {
16
16
  "node": ">=11.11.0 <=18.12",