@credithub/harlan-components 1.79.0 → 1.80.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/consultaSimplesSection/consultaSimplesSection.d.ts +1 -0
- package/dist/components/consultaSimplesSection/consultaSimplesSection.js +9 -8
- package/dist/components/dossie/generativeAi/dataUtils.js +13 -17
- package/dist/components/liminar/liminar.js +4 -2
- package/dist/consultaSimples.js +1 -1
- package/lib/cjs/index.js +54 -55
- package/lib/esm/index.js +54 -55
- package/package.json +1 -1
|
@@ -40,7 +40,7 @@ var spin = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObjec
|
|
|
40
40
|
var Spinner = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-left-color: #222;\n border-radius: 50%;\n width: 9px;\n height: 9px;\n animation: ", " 1s linear infinite;\n margin-right: 8px;\n display: inline-block;\n vertical-align: middle;\n"], ["\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-left-color: #222;\n border-radius: 50%;\n width: 9px;\n height: 9px;\n animation: ", " 1s linear infinite;\n margin-right: 8px;\n display: inline-block;\n vertical-align: middle;\n"])), spin);
|
|
41
41
|
var ConsultaSimplesSection = function (_a) {
|
|
42
42
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
43
|
-
var documento = _a.documento, children = _a.children, onClose = _a.onClose, rest = __rest(_a, ["documento", "children", "onClose"]);
|
|
43
|
+
var documento = _a.documento, children = _a.children, onClose = _a.onClose, isFinancial = _a.isFinancial, rest = __rest(_a, ["documento", "children", "onClose", "isFinancial"]);
|
|
44
44
|
var ctx = useContext(Queries.Finder);
|
|
45
45
|
var data = useGlobalData().data;
|
|
46
46
|
// Extraindo valores do globalData
|
|
@@ -94,17 +94,18 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
94
94
|
: '',
|
|
95
95
|
loaded: (_o = (_m = data.liminar) === null || _m === void 0 ? void 0 : _m.isLoaded) !== null && _o !== void 0 ? _o : false
|
|
96
96
|
}
|
|
97
|
-
];
|
|
97
|
+
].filter(function (e) { return e.label === 'Liminar' ? isFinancial : e; });
|
|
98
98
|
var isError = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Error;
|
|
99
99
|
var isLoading = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Loading;
|
|
100
|
+
var hasPendencias = data.ccf ||
|
|
101
|
+
data.protestos ||
|
|
102
|
+
data.dividasPublicas ||
|
|
103
|
+
data.processosJuridicos ||
|
|
104
|
+
receitaStatus ||
|
|
105
|
+
((_p = data.liminar) === null || _p === void 0 ? void 0 : _p.message) === 'Encontrado';
|
|
100
106
|
var statusType = isError
|
|
101
107
|
? 'warning'
|
|
102
|
-
:
|
|
103
|
-
data.protestos ||
|
|
104
|
-
data.dividasPublicas ||
|
|
105
|
-
data.processosJuridicos ||
|
|
106
|
-
receitaStatus ||
|
|
107
|
-
((_p = data.liminar) === null || _p === void 0 ? void 0 : _p.message) === 'Encontrado'
|
|
108
|
+
: hasPendencias
|
|
108
109
|
? 'error'
|
|
109
110
|
: 'success';
|
|
110
111
|
return (React.createElement(Section, __assign({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: React.createElement(React.Fragment, null,
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
13
24
|
import { normalizeName, similarNames } from '../../../utils/similarNames';
|
|
14
25
|
import { safeStringify } from './responseUtils';
|
|
@@ -79,6 +90,7 @@ function deepCleanData(data) {
|
|
|
79
90
|
export var selectRelevantData = function (data) {
|
|
80
91
|
var _a, _b, _c, _d, _e, _f;
|
|
81
92
|
var _g = data || {}, protestosDeCredito = _g.protestos, chequesSemFundo = _g.ccf, dividasPublicas = _g.dividasPublicas, contasBancarias = _g.bankAccounts, dadosDeChequesSemFundo = _g.ccfData, dividas = _g.divida, _h = _g.dossie, dossie = _h === void 0 ? {} : _h, liminar = _g.liminar, socios = _g.partners, dadosPessoasExpostasPoliticamente = _g.pepData, detalhesProcessosJuridicos = _g.processosJuridicosData, dadosReclameAqui = _g.reclameAqui, relatoriosRefinBoaVista = _g.refinBoaVista, relatoriosRefinSerasa = _g.refinSerasa, dadosScore = _g.scoreData, relatoriosSCR = _g.scr, registrosDeVeiculos = _g.veiculos, ResumoDosDados = _g.documentHistory;
|
|
93
|
+
var _j = ResumoDosDados !== null && ResumoDosDados !== void 0 ? ResumoDosDados : {}, _omit = _j.protestoLiminar, ResumoDosDadosSafe = __rest(_j, ["protestoLiminar"]);
|
|
82
94
|
var tipoPessoa = ((_b = (_a = dossie === null || dossie === void 0 ? void 0 : dossie.carousel) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.replace(/\D/g, '').length) === 11
|
|
83
95
|
? 'Pessoa Física'
|
|
84
96
|
: 'Pessoa Jurídica';
|
|
@@ -103,27 +115,11 @@ export var selectRelevantData = function (data) {
|
|
|
103
115
|
diario_sigla: processo.diario_sigla,
|
|
104
116
|
updated_at: processo.updated_at
|
|
105
117
|
}); });
|
|
106
|
-
// const processosAtivo = detalhesProcessosJuridicos?.empresa
|
|
107
|
-
// ?.filter((processo: any) =>
|
|
108
|
-
// processo.envolvidos_ultima_movimentacao?.some((envolvido: any) => {
|
|
109
|
-
// const nomeNormalizado = normalizeName(envolvido.nome_sem_filtro);
|
|
110
|
-
// return (
|
|
111
|
-
// similarNames(nomeNormalizado, empresaNomeNormalizado) &&
|
|
112
|
-
// envolvido.envolvido_tipo === 'Ativo'
|
|
113
|
-
// );
|
|
114
|
-
// })
|
|
115
|
-
// )
|
|
116
|
-
// ?.map((processo: any) => ({
|
|
117
|
-
// assuntos: processo.assuntos,
|
|
118
|
-
// classe_processual: processo.classe_processual,
|
|
119
|
-
// diario_sigla: processo.diario_sigla,
|
|
120
|
-
// updated_at: processo.updated_at
|
|
121
|
-
// }));
|
|
122
118
|
var resumoDaEmpresa = dossie.summary;
|
|
123
119
|
var statusLiminar = (liminar === null || liminar === void 0 ? void 0 : liminar.indiciosDeLiminar)
|
|
124
120
|
? 'Indício de Liminar para Ocultar Protestos'
|
|
125
121
|
: undefined;
|
|
126
|
-
var dadosOrganizados = __assign(__assign({ protestosDeCredito: protestosDeCredito, processosJuridicosPassivos: processosPassivos, chequesSemFundo: chequesSemFundo, dividasPublicas: dividasPublicas, contasBancarias: contasBancarias, dadosDeChequesSemFundo: dadosDeChequesSemFundo, dividas: dividas, resumoDaEmpresa: resumoDaEmpresa }, (statusLiminar && { liminar: statusLiminar })), { socios: sociosAnonimizados, dadosPessoasExpostasPoliticamente: dadosPessoasExpostasPoliticamente, dadosReclameAqui: dadosReclameAqui, relatoriosRefinBoaVista: relatoriosRefinBoaVista, relatoriosRefinSerasa: relatoriosRefinSerasa, dadosScore: dadosScore, relatoriosSCR: relatoriosSCR, registrosDeVeiculos: registrosDeVeiculos, ResumoDosDados:
|
|
122
|
+
var dadosOrganizados = __assign(__assign({ protestosDeCredito: protestosDeCredito, processosJuridicosPassivos: processosPassivos, chequesSemFundo: chequesSemFundo, dividasPublicas: dividasPublicas, contasBancarias: contasBancarias, dadosDeChequesSemFundo: dadosDeChequesSemFundo, dividas: dividas, resumoDaEmpresa: resumoDaEmpresa }, (statusLiminar && { liminar: statusLiminar })), { socios: sociosAnonimizados, dadosPessoasExpostasPoliticamente: dadosPessoasExpostasPoliticamente, dadosReclameAqui: dadosReclameAqui, relatoriosRefinBoaVista: relatoriosRefinBoaVista, relatoriosRefinSerasa: relatoriosRefinSerasa, dadosScore: dadosScore, relatoriosSCR: relatoriosSCR, registrosDeVeiculos: registrosDeVeiculos, ResumoDosDados: ResumoDosDadosSafe, tipoPessoa: tipoPessoa });
|
|
127
123
|
var dadosFiltrados = deepCleanData(dadosOrganizados);
|
|
128
124
|
return {
|
|
129
125
|
dadosFiltrados: dadosFiltrados
|
|
@@ -245,8 +245,10 @@ var Liminar = function (_a) {
|
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
247
|
}); };
|
|
248
|
-
|
|
248
|
+
if (isFinancial)
|
|
249
|
+
fetch();
|
|
249
250
|
}, [
|
|
251
|
+
isFinancial,
|
|
250
252
|
ctx.type,
|
|
251
253
|
ctx.document,
|
|
252
254
|
globalData === null || globalData === void 0 ? void 0 : globalData.dossie,
|
|
@@ -319,7 +321,7 @@ var Liminar = function (_a) {
|
|
|
319
321
|
return [2 /*return*/];
|
|
320
322
|
});
|
|
321
323
|
}); };
|
|
322
|
-
if (!shouldRender)
|
|
324
|
+
if (!isFinancial || !shouldRender)
|
|
323
325
|
return null;
|
|
324
326
|
return (React.createElement(React.Fragment, null,
|
|
325
327
|
React.createElement(Section, { title: React.createElement(TitleWithTooltip, null,
|
package/dist/consultaSimples.js
CHANGED
|
@@ -40,7 +40,7 @@ var ConsultaSimples = function (_a) {
|
|
|
40
40
|
React.createElement(Queries.LiminarCenprot.Request, { data: { documento: documento } },
|
|
41
41
|
React.createElement(Wrapper, null,
|
|
42
42
|
React.createElement(GlobalDataProvider, null,
|
|
43
|
-
React.createElement(ConsultaSimplesSection, { documento: documento, onClose: onClose, onClickPrint: onClickPrint },
|
|
43
|
+
React.createElement(ConsultaSimplesSection, { documento: documento, onClose: onClose, onClickPrint: onClickPrint, isFinancial: isFinancial },
|
|
44
44
|
React.createElement(ConsultaRfbProvider, { documento: documento },
|
|
45
45
|
React.createElement(Dossie, { documento: documento, printMode: printMode }),
|
|
46
46
|
React.createElement(Liminar, { isFinancial: isFinancial, hasCredits: hasCredits, tags: tags }),
|