@credithub/harlan-components 1.82.4 → 1.83.0
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/dist/components/protestos/protestos.js +16 -4
- package/lib/cjs/index.js +50 -34
- package/lib/esm/index.js +50 -34
- package/package.json +1 -1
|
@@ -13,6 +13,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
};
|
|
14
14
|
return __assign.apply(this, arguments);
|
|
15
15
|
};
|
|
16
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
+
if (ar || !(i in from)) {
|
|
19
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
+
ar[i] = from[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
+
};
|
|
16
25
|
import ProtestosIcon from '../../assets/icones/protestos';
|
|
17
26
|
import ProtestosCreditoIcon from '../../assets/icones/protestosCredito';
|
|
18
27
|
import ProtestosGeraisIcon from '../../assets/icones/protestosGerais';
|
|
@@ -70,9 +79,8 @@ var Protestos = function () {
|
|
|
70
79
|
}, [ctx.type]);
|
|
71
80
|
// Atualiza o contexto global com os protestos classificados
|
|
72
81
|
useEffect(function () {
|
|
73
|
-
if (dataUpdated || !ctx.document)
|
|
82
|
+
if (dataUpdated || !ctx.document)
|
|
74
83
|
return;
|
|
75
|
-
}
|
|
76
84
|
var registrosText = XPathUtils.select('string(//registros)', ctx.document);
|
|
77
85
|
var haveException = /Falha na integra/gi.test(XPathUtils.select('string(//raw)', ctx.document));
|
|
78
86
|
var registros = haveException
|
|
@@ -83,6 +91,7 @@ var Protestos = function () {
|
|
|
83
91
|
setDataUpdated(true);
|
|
84
92
|
return;
|
|
85
93
|
}
|
|
94
|
+
var nmChave = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], getChaves(protestosDeCredito), true), getChaves(protestosDeImposto), true), getChaves(protestosGerais), true)));
|
|
86
95
|
setData(function (prevState) {
|
|
87
96
|
var _a;
|
|
88
97
|
return (__assign(__assign({}, prevState), { protestos: registros, protestosData: {
|
|
@@ -91,7 +100,8 @@ var Protestos = function () {
|
|
|
91
100
|
protestosGerais: protestosGerais,
|
|
92
101
|
totalProtestos: registros,
|
|
93
102
|
isLoaded: true,
|
|
94
|
-
iaOverrides: (_a = prevState.protestosData) === null || _a === void 0 ? void 0 : _a.iaOverrides
|
|
103
|
+
iaOverrides: (_a = prevState.protestosData) === null || _a === void 0 ? void 0 : _a.iaOverrides,
|
|
104
|
+
nmChaves: nmChave
|
|
95
105
|
} }));
|
|
96
106
|
});
|
|
97
107
|
setDataUpdated(true);
|
|
@@ -159,7 +169,9 @@ var Protestos = function () {
|
|
|
159
169
|
? "".concat(cleanDoc.slice(0, 2), ".").concat(cleanDoc.slice(2, 5), ".").concat(cleanDoc.slice(5, 8), "/").concat(cleanDoc.slice(8, 12), "-").concat(cleanDoc.slice(12))
|
|
160
170
|
: "".concat(cleanDoc.slice(0, 3), ".").concat(cleanDoc.slice(3, 6), ".").concat(cleanDoc.slice(6, 9), "-").concat(cleanDoc.slice(9));
|
|
161
171
|
})();
|
|
162
|
-
harlan === null || harlan === void 0 ? void 0 : harlan.call('creditHub::addLiminar', {
|
|
172
|
+
harlan === null || harlan === void 0 ? void 0 : harlan.call('creditHub::addLiminar', {
|
|
173
|
+
document: formattedDoc
|
|
174
|
+
});
|
|
163
175
|
} }, "Apontar Protesto"))) : null }));
|
|
164
176
|
};
|
|
165
177
|
export default React.memo(Protestos);
|