@credithub/harlan-components 1.107.0 → 1.107.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.
|
@@ -48,13 +48,13 @@ var ClickableStatusMessage = styled(StatusMessage)(templateObject_3 || (template
|
|
|
48
48
|
// Wrapper para o texto clicável dentro do StatusMessage
|
|
49
49
|
var ClickableText = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n opacity: 0.85;\n }\n"], ["\n cursor: pointer;\n &:hover {\n opacity: 0.85;\n }\n"])));
|
|
50
50
|
var ConsultaSimplesSection = function (_a) {
|
|
51
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w
|
|
52
|
-
var documento = _a.documento, children = _a.children, onClose = _a.onClose, onClickPrint = _a.onClickPrint, isFinancial = _a.isFinancial, ctime = _a.ctime, printMode = _a.printMode,
|
|
51
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
52
|
+
var documento = _a.documento, children = _a.children, onClose = _a.onClose, onClickPrint = _a.onClickPrint, isFinancial = _a.isFinancial, ctime = _a.ctime, printMode = _a.printMode, _x = _a.tags, tags = _x === void 0 ? [] : _x, rest = __rest(_a, ["documento", "children", "onClose", "onClickPrint", "isFinancial", "ctime", "printMode", "tags"]);
|
|
53
53
|
var ctx = useContext(Queries.Finder);
|
|
54
54
|
var data = useGlobalData().data;
|
|
55
55
|
var posthog = usePostHog().posthog;
|
|
56
56
|
// Hook para observar mutações no DOM e chamar callback quando estável
|
|
57
|
-
var
|
|
57
|
+
var _y = usePrintWhenStable({
|
|
58
58
|
debounceTime: 500,
|
|
59
59
|
maxWaitTime: 30000,
|
|
60
60
|
onStart: function () {
|
|
@@ -65,7 +65,7 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
65
65
|
// Chama o callback externo (Harlan decide como imprimir)
|
|
66
66
|
onClickPrint === null || onClickPrint === void 0 ? void 0 : onClickPrint();
|
|
67
67
|
}
|
|
68
|
-
}), printWhenStable =
|
|
68
|
+
}), printWhenStable = _y.printWhenStable, isWaiting = _y.isWaiting;
|
|
69
69
|
// Handler que usa o observer ao invés de imprimir diretamente
|
|
70
70
|
var handlePrint = function () {
|
|
71
71
|
printWhenStable();
|
|
@@ -136,7 +136,7 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
136
136
|
data.liminar.message === 'Encontrado')
|
|
137
137
|
? 'Indício de Liminar'
|
|
138
138
|
: '', (_q = data.liminar) === null || _q === void 0 ? void 0 : _q.error),
|
|
139
|
-
makeItem('Potenciais Protestos Entrantes', (_r = data.editalData) === null || _r === void 0 ? void 0 : _r.
|
|
139
|
+
makeItem('Potenciais Protestos Entrantes', true, ((_r = data.editalData) === null || _r === void 0 ? void 0 : _r.recentesCount)
|
|
140
140
|
? "".concat(data.editalData.recentesCount === 1 ? '1 Potencial Protesto Entrante' : "".concat(data.editalData.recentesCount, " Potenciais Protestos Entrantes"))
|
|
141
141
|
: ''
|
|
142
142
|
// Não exibe erro de edital - deve falhar silenciosamente
|
|
@@ -155,8 +155,8 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
155
155
|
data.dividasPublicas ||
|
|
156
156
|
data.processosJuridicos ||
|
|
157
157
|
receitaStatus ||
|
|
158
|
-
((
|
|
159
|
-
(((
|
|
158
|
+
((_s = data.liminar) === null || _s === void 0 ? void 0 : _s.message) === 'Encontrado' ||
|
|
159
|
+
(((_t = data.editalData) === null || _t === void 0 ? void 0 : _t.recentesCount) &&
|
|
160
160
|
hasOneOfTags(tags, ['diamante', 'diamante-new']));
|
|
161
161
|
var statusType = isError ? 'warning' : hasPendencias ? 'error' : 'success';
|
|
162
162
|
useEffect(function () {
|
|
@@ -283,13 +283,13 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
283
283
|
}
|
|
284
284
|
return item.text ? (item.label === 'Potenciais Protestos Entrantes' ? (React.createElement(ClickableStatusMessage, { key: item.label, type: "error", onClick: scrollToEditais, title: "Clique para ver detalhes" }, item.text)) : (React.createElement(StatusMessage, { key: item.label, type: "error" }, item.text))) : null;
|
|
285
285
|
}),
|
|
286
|
-
((
|
|
287
|
-
!!((
|
|
286
|
+
((_u = data.editalData) === null || _u === void 0 ? void 0 : _u.isLoaded) &&
|
|
287
|
+
!!((_v = data.editalData) === null || _v === void 0 ? void 0 : _v.vencidosCount) &&
|
|
288
288
|
data.editalData.vencidosCount > 0 &&
|
|
289
289
|
hasOneOfTags(tags, ['diamante', 'diamante-new']) && (React.createElement(StatusMessage, { type: "error" },
|
|
290
290
|
React.createElement(ClickableText, { onClick: scrollToEditais, title: "Clique para ver detalhes" },
|
|
291
291
|
"Cart\u00F3rio com dificuldade para intimar",
|
|
292
|
-
((
|
|
292
|
+
((_w = data.editalData) === null || _w === void 0 ? void 0 : _w.dataEditalMaisAntigo) &&
|
|
293
293
|
" desde o: ".concat(data.editalData.dataEditalMaisAntigo))))), onClose: onClose, icon: ConsultaSimplesIcon, variant: isLoading ? 'loading' : 'default', ctx: ctx, loadingProps: {
|
|
294
294
|
percentage: (ctx === null || ctx === void 0 ? void 0 : ctx.progress) || 0,
|
|
295
295
|
hidden: !isLoading
|