@credithub/harlan-components 1.98.0 → 1.99.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/common/tooltip.d.ts +14 -0
- package/dist/components/common/tooltip.js +67 -0
- package/dist/components/consultaSimplesSection/consultaSimplesSection.js +60 -13
- package/dist/components/liminar/liminar.js +15 -24
- package/dist/components/liminar/liminarStyles.d.ts +0 -9
- package/dist/components/liminar/liminarStyles.js +2 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/lib/cjs/index.js +359 -284
- package/lib/esm/index.js +359 -285
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
content: ReactNode;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
6
|
+
className?: string;
|
|
7
|
+
defaultVisible?: boolean;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
onVisibleChange?: (v: boolean) => void;
|
|
10
|
+
/** Quando true, o ícone não reserva espaço no layout do texto (não aumenta o label) */
|
|
11
|
+
float?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
14
|
+
export default Tooltip;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import theme from '../../styles/theme';
|
|
6
|
+
import React, { useRef, useState } from 'react';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
var Container = styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: ", ";\n align-items: center;\n /* Quando flutuante, o container n\u00E3o ocupa largura para n\u00E3o deslocar o conte\u00FAdo adjacente */\n width: ", ";\n vertical-align: middle;\n"], ["\n position: relative;\n display: ", ";\n align-items: center;\n /* Quando flutuante, o container n\u00E3o ocupa largura para n\u00E3o deslocar o conte\u00FAdo adjacente */\n width: ", ";\n vertical-align: middle;\n"])), function (_a) {
|
|
9
|
+
var $float = _a.$float;
|
|
10
|
+
return ($float ? 'inline-block' : 'inline-flex');
|
|
11
|
+
}, function (_a) {
|
|
12
|
+
var $float = _a.$float;
|
|
13
|
+
return ($float ? 0 : 'auto');
|
|
14
|
+
});
|
|
15
|
+
var Trigger = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n ", "\n"], ["\n display: inline-flex;\n align-items: center;\n ", "\n"])), function (_a) {
|
|
16
|
+
var $float = _a.$float;
|
|
17
|
+
return $float
|
|
18
|
+
? "\n position: absolute;\n right: 0;\n top: 50%;\n transform: translate(100%, -50%);\n "
|
|
19
|
+
: '';
|
|
20
|
+
});
|
|
21
|
+
var Bubble = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n visibility: ", ";\n pointer-events: ", ";\n opacity: ", ";\n transform: ", ";\n\n width: 380px;\n max-width: 90vw;\n background-color: ", ";\n color: ", ";\n text-align: left;\n border-radius: 10px;\n padding: 10px 16px 16px 16px;\n font-size: 15px;\n font-weight: 500;\n line-height: 1.35;\n position: absolute;\n z-index: 10;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n transition:\n opacity 0.3s ease-in-out,\n transform 0.3s ease-in-out;\n\n ", "\n\n @media screen and (max-width: 768px) {\n font-size: 14px;\n padding: 10px 14px 14px 14px;\n }\n"], ["\n visibility: ", ";\n pointer-events: ", ";\n opacity: ", ";\n transform: ", ";\n\n width: 380px;\n max-width: 90vw;\n background-color: ", ";\n color: ", ";\n text-align: left;\n border-radius: 10px;\n padding: 10px 16px 16px 16px;\n font-size: 15px;\n font-weight: 500;\n line-height: 1.35;\n position: absolute;\n z-index: 10;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n transition:\n opacity 0.3s ease-in-out,\n transform 0.3s ease-in-out;\n\n ", "\n\n @media screen and (max-width: 768px) {\n font-size: 14px;\n padding: 10px 14px 14px 14px;\n }\n"])), function (_a) {
|
|
22
|
+
var $visible = _a.$visible;
|
|
23
|
+
return ($visible ? 'visible' : 'hidden');
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var $visible = _a.$visible;
|
|
26
|
+
return ($visible ? 'auto' : 'none');
|
|
27
|
+
}, function (_a) {
|
|
28
|
+
var $visible = _a.$visible;
|
|
29
|
+
return ($visible ? 1 : 0);
|
|
30
|
+
}, function (_a) {
|
|
31
|
+
var $visible = _a.$visible;
|
|
32
|
+
return $visible ? 'translateY(0)' : 'translateY(-10px)';
|
|
33
|
+
}, theme.colors.cinzaBase, theme.colors.erroApoio, function (_a) {
|
|
34
|
+
var $placement = _a.$placement;
|
|
35
|
+
return $placement === 'bottom'
|
|
36
|
+
? 'top: 130%; left: 0;'
|
|
37
|
+
: $placement === 'top'
|
|
38
|
+
? 'bottom: 130%; left: 0;'
|
|
39
|
+
: $placement === 'left'
|
|
40
|
+
? 'right: 110%; top: 0;'
|
|
41
|
+
: 'left: 110%; top: 0;';
|
|
42
|
+
});
|
|
43
|
+
var Tooltip = function (_a) {
|
|
44
|
+
var content = _a.content, icon = _a.icon, _b = _a.placement, placement = _b === void 0 ? 'bottom' : _b, className = _a.className, defaultVisible = _a.defaultVisible, visible = _a.visible, onVisibleChange = _a.onVisibleChange, _c = _a.float, float = _c === void 0 ? false : _c;
|
|
45
|
+
var _d = useState(!!defaultVisible), internalVisible = _d[0], setInternalVisible = _d[1];
|
|
46
|
+
var isControlled = typeof visible === 'boolean';
|
|
47
|
+
var currentVisible = isControlled ? !!visible : internalVisible;
|
|
48
|
+
var hideTimeout = useRef();
|
|
49
|
+
return (React.createElement(Container, { "$float": float, className: className, onMouseEnter: function () {
|
|
50
|
+
clearTimeout(hideTimeout.current);
|
|
51
|
+
if (isControlled)
|
|
52
|
+
onVisibleChange && onVisibleChange(true);
|
|
53
|
+
else
|
|
54
|
+
setInternalVisible(true);
|
|
55
|
+
}, onMouseLeave: function () {
|
|
56
|
+
hideTimeout.current = setTimeout(function () {
|
|
57
|
+
if (isControlled)
|
|
58
|
+
onVisibleChange && onVisibleChange(false);
|
|
59
|
+
else
|
|
60
|
+
setInternalVisible(false);
|
|
61
|
+
}, 300);
|
|
62
|
+
} },
|
|
63
|
+
React.createElement(Trigger, { "$float": float }, icon),
|
|
64
|
+
React.createElement(Bubble, { "$visible": currentVisible, "$placement": placement }, content)));
|
|
65
|
+
};
|
|
66
|
+
export default Tooltip;
|
|
67
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -25,11 +25,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
27
|
import ConsultaSimplesIcon from '../../assets/icones/consultaSimples';
|
|
28
|
+
import Tooltip from '../../components/common/tooltip';
|
|
28
29
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
29
30
|
import { usePostHog } from '../../contexts/PostHogContext';
|
|
31
|
+
import theme from '../../styles/theme';
|
|
30
32
|
import { formatMoney } from '../../utils/number';
|
|
31
33
|
import { formatDocument } from '../../utils/string';
|
|
32
34
|
import { format } from 'date-fns';
|
|
35
|
+
import { WarningCircle } from 'phosphor-react';
|
|
33
36
|
import React, { useContext, useEffect } from 'react';
|
|
34
37
|
import styled, { keyframes } from 'styled-components';
|
|
35
38
|
import Section from '../interface/section';
|
|
@@ -40,7 +43,7 @@ var spin = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObjec
|
|
|
40
43
|
// Componente Spinner sutil
|
|
41
44
|
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);
|
|
42
45
|
var ConsultaSimplesSection = function (_a) {
|
|
43
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
46
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
44
47
|
var documento = _a.documento, children = _a.children, onClose = _a.onClose, isFinancial = _a.isFinancial, rest = __rest(_a, ["documento", "children", "onClose", "isFinancial"]);
|
|
45
48
|
var ctx = useContext(Queries.Finder);
|
|
46
49
|
var data = useGlobalData().data;
|
|
@@ -50,6 +53,44 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
50
53
|
['ATIVA', 'REGULAR'].indexOf(data.dossie.summary.receitaStatus) === -1
|
|
51
54
|
? data.dossie.summary.receitaStatus
|
|
52
55
|
: null;
|
|
56
|
+
// Leitura case-insensitive do CTIME (pode vir "CTIME" ou "ctime" etc.)
|
|
57
|
+
var getCI = function (obj, key) {
|
|
58
|
+
if (!obj)
|
|
59
|
+
return undefined;
|
|
60
|
+
var found = Object.keys(obj).find(function (k) { return k.toLowerCase() === key.toLowerCase(); });
|
|
61
|
+
return found ? String(obj[found]).trim() : undefined;
|
|
62
|
+
};
|
|
63
|
+
var ctimeStr = getCI(ctx === null || ctx === void 0 ? void 0 : ctx.urlData, 'CTIME');
|
|
64
|
+
// Parser simples para ISO e epoch (s/ms)
|
|
65
|
+
var parseCTIME = function (v) {
|
|
66
|
+
if (!v)
|
|
67
|
+
return null;
|
|
68
|
+
var n = Number(v);
|
|
69
|
+
if (!Number.isNaN(n)) {
|
|
70
|
+
var ms = n < 1e12 ? n * 1000 : n;
|
|
71
|
+
var d_1 = new Date(ms);
|
|
72
|
+
return Number.isNaN(d_1.getTime()) ? null : d_1;
|
|
73
|
+
}
|
|
74
|
+
var d = new Date(v);
|
|
75
|
+
return Number.isNaN(d.getTime()) ? null : d;
|
|
76
|
+
};
|
|
77
|
+
var ctimeDate = parseCTIME(ctimeStr);
|
|
78
|
+
var displayDate = ctimeDate !== null && ctimeDate !== void 0 ? ctimeDate : new Date();
|
|
79
|
+
// Origem dos dados a partir de um único header: x-data-source: realtime|cache
|
|
80
|
+
var dataSource = (((_e = (_d = ctx === null || ctx === void 0 ? void 0 : ctx.response) === null || _d === void 0 ? void 0 : _d.headers) === null || _e === void 0 ? void 0 : _e.get('x-data-source')) || '').toLowerCase();
|
|
81
|
+
var sourceLabel = dataSource === 'realtime'
|
|
82
|
+
? 'tempo real'
|
|
83
|
+
: dataSource === 'cache'
|
|
84
|
+
? 'cache'
|
|
85
|
+
: '';
|
|
86
|
+
// Conteúdos dos tooltips: linguagem clara para usuário final
|
|
87
|
+
var referenceTooltip = (React.createElement(React.Fragment, null,
|
|
88
|
+
React.createElement("strong", null, "Data de refer\u00EAncia"),
|
|
89
|
+
":",
|
|
90
|
+
' ',
|
|
91
|
+
format(displayDate, "dd/MM/yyyy 'às' HH:mm"),
|
|
92
|
+
React.createElement("br", null),
|
|
93
|
+
"Este \u00E9 o retrato da situa\u00E7\u00E3o nesse momento. Para ver a posi\u00E7\u00E3o mais recente, refa\u00E7a a consulta sem data fixa."));
|
|
53
94
|
// Cria um array com cada tag de pendência, seu texto e sua flag de carregamento
|
|
54
95
|
var makeItem = function (label, loaded, text, error) { return ({
|
|
55
96
|
label: label,
|
|
@@ -59,27 +100,27 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
59
100
|
}); };
|
|
60
101
|
var pendencias = [
|
|
61
102
|
makeItem('Situação Receita', true, receitaStatus ? "".concat(receitaStatus) : ''),
|
|
62
|
-
makeItem('Dívidas Públicas', (
|
|
103
|
+
makeItem('Dívidas Públicas', (_f = data.divida) === null || _f === void 0 ? void 0 : _f.isLoaded, data.dividasPublicas
|
|
63
104
|
? "".concat(formatMoney(data.dividasPublicas), " em D\u00EDvidas P\u00FAblicas")
|
|
64
|
-
: '', (
|
|
65
|
-
makeItem('Cheques sem Fundo', (
|
|
105
|
+
: '', (_g = data.divida) === null || _g === void 0 ? void 0 : _g.error),
|
|
106
|
+
makeItem('Cheques sem Fundo', (_h = data.ccfData) === null || _h === void 0 ? void 0 : _h.isLoaded, data.ccf
|
|
66
107
|
? "".concat(data.ccf === 1 ? 'Cheque sem Fundo' : "".concat(data.ccf, " Cheques sem Fundo"), " com \u00DAltima Ocorr\u00EAncia em ").concat(data.ultimoRegistroCCF)
|
|
67
|
-
: '', (
|
|
68
|
-
makeItem('Protestos', (
|
|
108
|
+
: '', (_j = data.ccfData) === null || _j === void 0 ? void 0 : _j.error),
|
|
109
|
+
makeItem('Protestos', (_k = data.protestosData) === null || _k === void 0 ? void 0 : _k.isLoaded, data.protestos
|
|
69
110
|
? data.protestos === 1
|
|
70
111
|
? 'Protesto Encontrado'
|
|
71
112
|
: "".concat(data.protestos, " Protestos")
|
|
72
|
-
: '', (
|
|
73
|
-
makeItem('Processos Jurídicos', (
|
|
113
|
+
: '', (_l = data.protestosData) === null || _l === void 0 ? void 0 : _l.error),
|
|
114
|
+
makeItem('Processos Jurídicos', (_m = data.processosJuridicosData) === null || _m === void 0 ? void 0 : _m.isLoaded, data.processosJuridicos
|
|
74
115
|
? "".concat(data.processosJuridicos, " ").concat(data.processosJuridicos === 1
|
|
75
116
|
? 'Processo Jurídico'
|
|
76
117
|
: 'Processos Jurídicos')
|
|
77
|
-
: '', (
|
|
78
|
-
makeItem('Liminar', (
|
|
118
|
+
: '', (_o = data.processosJuridicosData) === null || _o === void 0 ? void 0 : _o.error),
|
|
119
|
+
makeItem('Liminar', (_p = data.liminar) === null || _p === void 0 ? void 0 : _p.isLoaded, data.liminar &&
|
|
79
120
|
(data.liminar.totalProtestos === 'NADA CONSTA' ||
|
|
80
121
|
data.liminar.message === 'Encontrado')
|
|
81
122
|
? 'Indício de Liminar'
|
|
82
|
-
: '', (
|
|
123
|
+
: '', (_q = data.liminar) === null || _q === void 0 ? void 0 : _q.error)
|
|
83
124
|
].filter(function (e) { return (e.label === 'Liminar' ? isFinancial : e); });
|
|
84
125
|
var isError = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Error;
|
|
85
126
|
var isLoading = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Loading;
|
|
@@ -88,7 +129,7 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
88
129
|
data.dividasPublicas ||
|
|
89
130
|
data.processosJuridicos ||
|
|
90
131
|
receitaStatus ||
|
|
91
|
-
((
|
|
132
|
+
((_r = data.liminar) === null || _r === void 0 ? void 0 : _r.message) === 'Encontrado';
|
|
92
133
|
var statusType = isError ? 'warning' : hasPendencias ? 'error' : 'success';
|
|
93
134
|
useEffect(function () {
|
|
94
135
|
if (posthog && pendencias.every(function (pendencia) { return pendencia.loaded; }))
|
|
@@ -101,7 +142,13 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
101
142
|
});
|
|
102
143
|
}, [posthog, pendencias]);
|
|
103
144
|
return (React.createElement(Section, __assign({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: React.createElement(React.Fragment, null,
|
|
104
|
-
React.createElement(StatusMessage, null,
|
|
145
|
+
React.createElement(StatusMessage, null,
|
|
146
|
+
format(displayDate, "dd/MM/yyyy 'às' HH:mm"),
|
|
147
|
+
ctimeDate ? (React.createElement(React.Fragment, null,
|
|
148
|
+
' ',
|
|
149
|
+
React.createElement(Tooltip, { content: referenceTooltip, placement: "left", float: true, icon: React.createElement(WarningCircle, { weight: "fill", size: 20, color: ctimeDate
|
|
150
|
+
? theme.colors.cinzaEscuro
|
|
151
|
+
: theme.colors.cinzaEscuro, "aria-label": "Data de refer\u00EAncia" }) }))) : null),
|
|
105
152
|
React.createElement(StatusMessage, { type: "found" }, formatDocument(documento)),
|
|
106
153
|
isError && (ctx === null || ctx === void 0 ? void 0 : ctx.error) && (React.createElement(StatusMessage, { type: statusType }, ctx.error.message)),
|
|
107
154
|
pendencias.map(function (item) {
|
|
@@ -56,11 +56,12 @@ import { WarningCircle } from 'phosphor-react';
|
|
|
56
56
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
57
57
|
import Button from '../common/button';
|
|
58
58
|
import Modal from '../common/modal';
|
|
59
|
+
import Tooltip from '../common/tooltip';
|
|
59
60
|
import { SummaryButton } from '../dossie/summary/styles';
|
|
60
61
|
import StatusMessage from '../interface/statusMessage';
|
|
61
62
|
import Section from '../section';
|
|
62
63
|
import { Queries, RequestStatus, useFetch } from '../webservice';
|
|
63
|
-
import { TitleWithTooltip
|
|
64
|
+
import { TitleWithTooltip } from './liminarStyles';
|
|
64
65
|
import { useLiminarHistory } from './useLiminarHistory';
|
|
65
66
|
import useLiminarProtestosDoPassado from './useLiminarProtestosDoPassado';
|
|
66
67
|
/* ----------------------------------
|
|
@@ -95,12 +96,10 @@ var Liminar = function (_a) {
|
|
|
95
96
|
var processedRef = useRef(false);
|
|
96
97
|
var dataHashRef = useRef('');
|
|
97
98
|
var invertedIdsRef = useRef([]);
|
|
98
|
-
var _w = useState(false),
|
|
99
|
-
var _x = useState(
|
|
100
|
-
var _y = useState(''), emailModalMessage = _y[0], setEmailModalMessage = _y[1];
|
|
99
|
+
var _w = useState(false), isEmailModalOpen = _w[0], setIsEmailModalOpen = _w[1];
|
|
100
|
+
var _x = useState(''), emailModalMessage = _x[0], setEmailModalMessage = _x[1];
|
|
101
101
|
var liminarMailPrice = 50000;
|
|
102
|
-
var
|
|
103
|
-
var hideTt = useRef();
|
|
102
|
+
var _y = useFetch("SELECT FROM 'LIMINAR'.'SENDMAIL'"), sendIndiciosEmail = _y.fetch, isEmailSending = _y.isLoading, emailError = _y.error;
|
|
104
103
|
/*
|
|
105
104
|
* Extrai e normaliza os tipos de documento presentes em ctx.document, retornando sempre um array de strings em minúsculo.
|
|
106
105
|
*/
|
|
@@ -142,7 +141,7 @@ var Liminar = function (_a) {
|
|
|
142
141
|
/*
|
|
143
142
|
* Identifica as origens de liminares detectadas e verifica se existe liminar de protesto invertida
|
|
144
143
|
*/
|
|
145
|
-
var
|
|
144
|
+
var _z = useMemo(function () {
|
|
146
145
|
var _a, _b;
|
|
147
146
|
var labels = new Set();
|
|
148
147
|
var indiciosApi = ((_a = ctx.document) === null || _a === void 0 ? void 0 : _a.indiciosDeLiminar) === true;
|
|
@@ -178,7 +177,7 @@ var Liminar = function (_a) {
|
|
|
178
177
|
tiposDocumento,
|
|
179
178
|
processosComAssuntoValido,
|
|
180
179
|
(_f = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _f === void 0 ? void 0 : _f.indiciosDeLiminarProtestosDoPassado
|
|
181
|
-
]), origensDetectadas =
|
|
180
|
+
]), origensDetectadas = _z.origensDetectadas, foundBusinessEntity = _z.foundBusinessEntity;
|
|
182
181
|
var protestosIsReady = useMemo(function () { var _a; return (_a = globalData === null || globalData === void 0 ? void 0 : globalData.protestosData) === null || _a === void 0 ? void 0 : _a.isLoaded; }, [globalData]);
|
|
183
182
|
useEffect(function () {
|
|
184
183
|
if (!protestosIsReady)
|
|
@@ -394,22 +393,14 @@ var Liminar = function (_a) {
|
|
|
394
393
|
return (React.createElement(React.Fragment, null,
|
|
395
394
|
React.createElement(Section, { title: React.createElement(TitleWithTooltip, null,
|
|
396
395
|
"Liminares para Remo\u00E7\u00E3o de Protesto",
|
|
397
|
-
!!processosComAssuntoValido.length && ready && (React.createElement(
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
React.createElement(React.Fragment, null,
|
|
406
|
-
tooltipMessage,
|
|
407
|
-
React.createElement("ul", { style: { marginTop: 6, paddingLeft: 18 } }, processosComAssuntoValido.map(function (p) { return (React.createElement("li", { key: p.id, onClick: function () { return scrollToProcesso(p.id); }, style: {
|
|
408
|
-
fontSize: 13,
|
|
409
|
-
cursor: 'pointer',
|
|
410
|
-
textDecoration: 'underline',
|
|
411
|
-
color: '#007aff'
|
|
412
|
-
} }, p.id)); }))))))), subtitle: "Ind\u00EDcios de liminares para oculta\u00E7\u00E3o de registros.", icon: ProtestosIcon, ctx: ready ? ctx : ctxLoading, onSuccess: ready
|
|
396
|
+
!!processosComAssuntoValido.length && ready && (React.createElement(Tooltip, { icon: renderTooltipIcon(), content: React.createElement(React.Fragment, null,
|
|
397
|
+
tooltipMessage,
|
|
398
|
+
React.createElement("ul", { style: { marginTop: 6, paddingLeft: 18 } }, processosComAssuntoValido.map(function (p) { return (React.createElement("li", { key: p.id, onClick: function () { return scrollToProcesso(p.id); }, style: {
|
|
399
|
+
fontSize: 13,
|
|
400
|
+
cursor: 'pointer',
|
|
401
|
+
textDecoration: 'underline',
|
|
402
|
+
color: '#007aff'
|
|
403
|
+
} }, p.id)); }))), placement: "bottom" }))), subtitle: "Ind\u00EDcios de liminares para oculta\u00E7\u00E3o de registros.", icon: ProtestosIcon, ctx: ready ? ctx : ctxLoading, onSuccess: ready
|
|
413
404
|
? function (_data, _context) {
|
|
414
405
|
var _a, _b, _c, _d, _e, _f;
|
|
415
406
|
var msg = (_b = (_a = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : 'Não encontrado';
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export declare const TooltipContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const TooltipIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("phosphor-react").IconProps & import("react").RefAttributes<SVGSVGElement>>, import("styled-components").DefaultTheme, {
|
|
3
|
-
weight: "fill";
|
|
4
|
-
size: 24;
|
|
5
|
-
}, "size" | "weight">;
|
|
6
|
-
export declare const TooltipText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
7
|
-
visible: boolean;
|
|
8
|
-
}, never>;
|
|
9
1
|
export declare const TitleWithTooltip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
-
export declare const GrayHighlighted: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -2,27 +2,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
2
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
|
-
import theme from '../../styles/theme';
|
|
6
|
-
import { WarningCircle } from 'phosphor-react';
|
|
7
5
|
import styled from 'styled-components';
|
|
8
|
-
export var
|
|
9
|
-
|
|
10
|
-
weight: 'fill',
|
|
11
|
-
size: 24
|
|
12
|
-
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n cursor: pointer;\n transition: transform 0.2s ease;\n\n &:hover {\n transform: scale(1.2);\n }\n"], ["\n color: ", ";\n cursor: pointer;\n transition: transform 0.2s ease;\n\n &:hover {\n transform: scale(1.2);\n }\n"])), theme.colors.laranja);
|
|
13
|
-
export var TooltipText = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n visibility: ", ";\n pointer-events: ", ";\n opacity: ", ";\n transform: ", ";\n\n width: 380px;\n max-width: 90vw;\n background-color: ", ";\n color: ", ";\n text-align: left;\n border-radius: 10px;\n padding: 10px 16px 16px 16px;\n font-size: 15px;\n font-weight: 500;\n line-height: 1.35;\n position: absolute;\n z-index: 10;\n top: 130%;\n left: 0;\n transition:\n opacity 0.3s ease-in-out,\n transform 0.3s ease-in-out;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n\n @media screen and (max-width: 768px) {\n font-size: 14px;\n padding: 10px 14px 14px 14px;\n }\n"], ["\n visibility: ", ";\n pointer-events: ", ";\n opacity: ", ";\n transform: ", ";\n\n width: 380px;\n max-width: 90vw;\n background-color: ", ";\n color: ", ";\n text-align: left;\n border-radius: 10px;\n padding: 10px 16px 16px 16px;\n font-size: 15px;\n font-weight: 500;\n line-height: 1.35;\n position: absolute;\n z-index: 10;\n top: 130%;\n left: 0;\n transition:\n opacity 0.3s ease-in-out,\n transform 0.3s ease-in-out;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n\n @media screen and (max-width: 768px) {\n font-size: 14px;\n padding: 10px 14px 14px 14px;\n }\n"])), function (_a) {
|
|
14
|
-
var visible = _a.visible;
|
|
15
|
-
return (visible ? 'visible' : 'hidden');
|
|
16
|
-
}, function (_a) {
|
|
17
|
-
var visible = _a.visible;
|
|
18
|
-
return (visible ? 'auto' : 'none');
|
|
19
|
-
}, function (_a) {
|
|
20
|
-
var visible = _a.visible;
|
|
21
|
-
return (visible ? 1 : 0);
|
|
22
|
-
}, function (_a) {
|
|
23
|
-
var visible = _a.visible;
|
|
24
|
-
return visible ? 'translateY(0)' : 'translateY(-10px)';
|
|
25
|
-
}, theme.colors.cinzaBase, theme.colors.erroApoio);
|
|
26
|
-
export var TitleWithTooltip = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"], ["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
|
|
27
|
-
export var GrayHighlighted = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n animation: highlight-gray 0.6s ease-out;\n\n @keyframes highlight-gray {\n from {\n background-color: ", ";\n }\n to {\n background-color: transparent;\n }\n }\n"], ["\n animation: highlight-gray 0.6s ease-out;\n\n @keyframes highlight-gray {\n from {\n background-color: ", ";\n }\n to {\n background-color: transparent;\n }\n }\n"])), theme.colors.cinzaClaro);
|
|
28
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
6
|
+
export var TitleWithTooltip = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"], ["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
|
|
7
|
+
var templateObject_1;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as BankAccounts } from './components/bank-accounts/bank-account
|
|
|
3
3
|
export { default as CCF } from './components/ccf/ccf';
|
|
4
4
|
export { default as ChartSystem } from './components/chart/chartSystem';
|
|
5
5
|
export { default as AddItemField } from './components/common/addItem';
|
|
6
|
+
export { default as Tooltip } from './components/common/tooltip';
|
|
6
7
|
export { default as Contacts } from './components/contacts/contacts';
|
|
7
8
|
export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
|
|
8
9
|
export { default as Dossie } from './components/dossie/dossie';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { default as BankAccounts } from './components/bank-accounts/bank-account
|
|
|
3
3
|
export { default as CCF } from './components/ccf/ccf';
|
|
4
4
|
export { default as ChartSystem } from './components/chart/chartSystem';
|
|
5
5
|
export { default as AddItemField } from './components/common/addItem';
|
|
6
|
+
export { default as Tooltip } from './components/common/tooltip';
|
|
6
7
|
export { default as Contacts } from './components/contacts/contacts';
|
|
7
8
|
export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
|
|
8
9
|
export { default as Dossie } from './components/dossie/dossie';
|