@credithub/harlan-components 1.69.0 → 1.69.1
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/liminar/liminar.js +20 -15
- package/lib/cjs/index.js +21 -16
- package/lib/esm/index.js +21 -16
- package/package.json +1 -1
|
@@ -105,7 +105,7 @@ var Liminar = function () {
|
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
var
|
|
108
|
+
var _e = useMemo(function () {
|
|
109
109
|
var _a;
|
|
110
110
|
var labels = new Set();
|
|
111
111
|
var indiciosApi = ((_a = ctx.document) === null || _a === void 0 ? void 0 : _a.indiciosDeLiminar) === true;
|
|
@@ -118,21 +118,26 @@ var Liminar = function () {
|
|
|
118
118
|
}
|
|
119
119
|
if (processosComAssuntoValido.length > 0) {
|
|
120
120
|
labels.add('Liminar no Judiciário');
|
|
121
|
-
var foundBusinessEntity = processosComAssuntoValido.some(function (processo) {
|
|
122
|
-
var _a;
|
|
123
|
-
return (_a = processo.envolvidos_ultima_movimentacao) === null || _a === void 0 ? void 0 : _a.some(function (e) {
|
|
124
|
-
if (e.envolvido_tipo !== 'Ativo')
|
|
125
|
-
return false;
|
|
126
|
-
var nomeNorm = normalizeName(e.nome_sem_filtro);
|
|
127
|
-
return businessTypes.some(function (type) { return nomeNorm.includes(type); });
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
if (foundBusinessEntity) {
|
|
131
|
-
setData(function (prev) { return (__assign(__assign({}, prev), { liminar: __assign(__assign({}, prev.liminar), { invertedProcessos: processosComAssuntoValido.map(function (p) { return p.id; }) }) })); });
|
|
132
|
-
}
|
|
133
121
|
}
|
|
134
|
-
|
|
135
|
-
|
|
122
|
+
var foundEntity = processosComAssuntoValido.some(function (processo) {
|
|
123
|
+
var _a;
|
|
124
|
+
return (_a = processo.envolvidos_ultima_movimentacao) === null || _a === void 0 ? void 0 : _a.some(function (e) {
|
|
125
|
+
if (e.envolvido_tipo !== 'Ativo')
|
|
126
|
+
return false;
|
|
127
|
+
var nomeNorm = normalizeName(e.nome_sem_filtro);
|
|
128
|
+
return businessTypes.some(function (type) { return nomeNorm.includes(type); });
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
return {
|
|
132
|
+
origensDetectadas: Array.from(labels),
|
|
133
|
+
foundBusinessEntity: foundEntity
|
|
134
|
+
};
|
|
135
|
+
}, [ctx.document, tiposDocumento, processosComAssuntoValido]), origensDetectadas = _e.origensDetectadas, foundBusinessEntity = _e.foundBusinessEntity;
|
|
136
|
+
useEffect(function () {
|
|
137
|
+
if (!foundBusinessEntity)
|
|
138
|
+
return;
|
|
139
|
+
setData(function (prev) { return (__assign(__assign({}, prev), { liminar: __assign(__assign({}, prev.liminar), { invertedProcessos: processosComAssuntoValido.map(function (p) { return p.id; }) }) })); });
|
|
140
|
+
}, [foundBusinessEntity, processosComAssuntoValido, setData]);
|
|
136
141
|
var isErro404 = useMemo(function () { return ctx.type === RequestStatus.Error && !!ctx.error; }, [ctx.type, ctx.error]);
|
|
137
142
|
var derivedCtx = useMemo(function () { return (__assign(__assign({}, ctx), { type: isErro404 ? RequestStatus.Success : ctx.type, document: isErro404 ? { indiciosDeLiminar: false } : ctx.document })); }, [ctx, isErro404]);
|
|
138
143
|
useEffect(function () {
|