@credithub/harlan-components 1.79.0 → 1.80.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/consultaSimplesSection/consultaSimplesSection.d.ts +1 -0
- package/dist/components/consultaSimplesSection/consultaSimplesSection.js +9 -8
- package/dist/components/liminar/liminar.js +4 -2
- package/dist/consultaSimples.js +1 -1
- package/lib/cjs/index.js +15 -12
- package/lib/esm/index.js +15 -12
- 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,
|
|
@@ -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 }),
|