@credithub/harlan-components 1.98.0 → 1.100.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.
@@ -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;
@@ -3,5 +3,6 @@ import { SectionProps } from '../interface/section';
3
3
  declare const ConsultaSimplesSection: React.FC<SectionProps & {
4
4
  documento: string;
5
5
  isFinancial: boolean;
6
+ ctime?: string;
6
7
  }>;
7
8
  export default ConsultaSimplesSection;
@@ -27,9 +27,11 @@ var __rest = (this && this.__rest) || function (s, e) {
27
27
  import ConsultaSimplesIcon from '../../assets/icones/consultaSimples';
28
28
  import { useGlobalData } from '../../contexts/globalDataContext';
29
29
  import { usePostHog } from '../../contexts/PostHogContext';
30
+ import theme from '../../styles/theme';
30
31
  import { formatMoney } from '../../utils/number';
31
32
  import { formatDocument } from '../../utils/string';
32
33
  import { format } from 'date-fns';
34
+ import { WarningCircle } from 'phosphor-react';
33
35
  import React, { useContext, useEffect } from 'react';
34
36
  import styled, { keyframes } from 'styled-components';
35
37
  import Section from '../interface/section';
@@ -40,8 +42,8 @@ var spin = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObjec
40
42
  // Componente Spinner sutil
41
43
  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
44
  var ConsultaSimplesSection = function (_a) {
43
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
44
- var documento = _a.documento, children = _a.children, onClose = _a.onClose, isFinancial = _a.isFinancial, rest = __rest(_a, ["documento", "children", "onClose", "isFinancial"]);
45
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
46
+ var documento = _a.documento, children = _a.children, onClose = _a.onClose, isFinancial = _a.isFinancial, ctime = _a.ctime, rest = __rest(_a, ["documento", "children", "onClose", "isFinancial", "ctime"]);
45
47
  var ctx = useContext(Queries.Finder);
46
48
  var data = useGlobalData().data;
47
49
  var posthog = usePostHog().posthog;
@@ -50,6 +52,37 @@ var ConsultaSimplesSection = function (_a) {
50
52
  ['ATIVA', 'REGULAR'].indexOf(data.dossie.summary.receitaStatus) === -1
51
53
  ? data.dossie.summary.receitaStatus
52
54
  : null;
55
+ // Leitura case-insensitive do CTIME (pode vir "CTIME" ou "ctime" etc.)
56
+ var getCI = function (obj, key) {
57
+ if (!obj)
58
+ return undefined;
59
+ var found = Object.keys(obj).find(function (k) { return k.toLowerCase() === key.toLowerCase(); });
60
+ return found ? String(obj[found]).trim() : undefined;
61
+ };
62
+ // prioriza CTIME vindo por prop; fallback para o urlData do Finder
63
+ var ctimeStr = ctime !== null && ctime !== void 0 ? ctime : 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
+ : '';
53
86
  // Cria um array com cada tag de pendência, seu texto e sua flag de carregamento
54
87
  var makeItem = function (label, loaded, text, error) { return ({
55
88
  label: label,
@@ -59,27 +92,27 @@ var ConsultaSimplesSection = function (_a) {
59
92
  }); };
60
93
  var pendencias = [
61
94
  makeItem('Situação Receita', true, receitaStatus ? "".concat(receitaStatus) : ''),
62
- makeItem('Dívidas Públicas', (_d = data.divida) === null || _d === void 0 ? void 0 : _d.isLoaded, data.dividasPublicas
95
+ makeItem('Dívidas Públicas', (_f = data.divida) === null || _f === void 0 ? void 0 : _f.isLoaded, data.dividasPublicas
63
96
  ? "".concat(formatMoney(data.dividasPublicas), " em D\u00EDvidas P\u00FAblicas")
64
- : '', (_e = data.divida) === null || _e === void 0 ? void 0 : _e.error),
65
- makeItem('Cheques sem Fundo', (_f = data.ccfData) === null || _f === void 0 ? void 0 : _f.isLoaded, data.ccf
97
+ : '', (_g = data.divida) === null || _g === void 0 ? void 0 : _g.error),
98
+ makeItem('Cheques sem Fundo', (_h = data.ccfData) === null || _h === void 0 ? void 0 : _h.isLoaded, data.ccf
66
99
  ? "".concat(data.ccf === 1 ? 'Cheque sem Fundo' : "".concat(data.ccf, " Cheques sem Fundo"), " com \u00DAltima Ocorr\u00EAncia em ").concat(data.ultimoRegistroCCF)
67
- : '', (_g = data.ccfData) === null || _g === void 0 ? void 0 : _g.error),
68
- makeItem('Protestos', (_h = data.protestosData) === null || _h === void 0 ? void 0 : _h.isLoaded, data.protestos
100
+ : '', (_j = data.ccfData) === null || _j === void 0 ? void 0 : _j.error),
101
+ makeItem('Protestos', (_k = data.protestosData) === null || _k === void 0 ? void 0 : _k.isLoaded, data.protestos
69
102
  ? data.protestos === 1
70
103
  ? 'Protesto Encontrado'
71
104
  : "".concat(data.protestos, " Protestos")
72
- : '', (_j = data.protestosData) === null || _j === void 0 ? void 0 : _j.error),
73
- makeItem('Processos Jurídicos', (_k = data.processosJuridicosData) === null || _k === void 0 ? void 0 : _k.isLoaded, data.processosJuridicos
105
+ : '', (_l = data.protestosData) === null || _l === void 0 ? void 0 : _l.error),
106
+ makeItem('Processos Jurídicos', (_m = data.processosJuridicosData) === null || _m === void 0 ? void 0 : _m.isLoaded, data.processosJuridicos
74
107
  ? "".concat(data.processosJuridicos, " ").concat(data.processosJuridicos === 1
75
108
  ? 'Processo Jurídico'
76
109
  : 'Processos Jurídicos')
77
- : '', (_l = data.processosJuridicosData) === null || _l === void 0 ? void 0 : _l.error),
78
- makeItem('Liminar', (_m = data.liminar) === null || _m === void 0 ? void 0 : _m.isLoaded, data.liminar &&
110
+ : '', (_o = data.processosJuridicosData) === null || _o === void 0 ? void 0 : _o.error),
111
+ makeItem('Liminar', (_p = data.liminar) === null || _p === void 0 ? void 0 : _p.isLoaded, data.liminar &&
79
112
  (data.liminar.totalProtestos === 'NADA CONSTA' ||
80
113
  data.liminar.message === 'Encontrado')
81
114
  ? 'Indício de Liminar'
82
- : '', (_o = data.liminar) === null || _o === void 0 ? void 0 : _o.error)
115
+ : '', (_q = data.liminar) === null || _q === void 0 ? void 0 : _q.error)
83
116
  ].filter(function (e) { return (e.label === 'Liminar' ? isFinancial : e); });
84
117
  var isError = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Error;
85
118
  var isLoading = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Loading;
@@ -88,7 +121,7 @@ var ConsultaSimplesSection = function (_a) {
88
121
  data.dividasPublicas ||
89
122
  data.processosJuridicos ||
90
123
  receitaStatus ||
91
- ((_p = data.liminar) === null || _p === void 0 ? void 0 : _p.message) === 'Encontrado';
124
+ ((_r = data.liminar) === null || _r === void 0 ? void 0 : _r.message) === 'Encontrado';
92
125
  var statusType = isError ? 'warning' : hasPendencias ? 'error' : 'success';
93
126
  useEffect(function () {
94
127
  if (posthog && pendencias.every(function (pendencia) { return pendencia.loaded; }))
@@ -101,7 +134,11 @@ var ConsultaSimplesSection = function (_a) {
101
134
  });
102
135
  }, [posthog, pendencias]);
103
136
  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, format(new Date(), "dd/MM/yyyy 'às' HH:mm")),
137
+ ctimeDate ? (React.createElement(StatusMessage, { type: "warning" },
138
+ React.createElement(WarningCircle, { weight: "fill", size: 18, color: theme.colors.cinzaEscuro, style: { marginRight: 6, verticalAlign: 'text-bottom' } }),
139
+ "Informa\u00E7\u00F5es referem-se a",
140
+ ' ',
141
+ format(displayDate, "dd/MM/yyyy 'às' HH:mm"))) : (React.createElement(StatusMessage, null, format(displayDate, "dd/MM/yyyy 'às' HH:mm"))),
105
142
  React.createElement(StatusMessage, { type: "found" }, formatDocument(documento)),
106
143
  isError && (ctx === null || ctx === void 0 ? void 0 : ctx.error) && (React.createElement(StatusMessage, { type: statusType }, ctx.error.message)),
107
144
  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, TooltipContainer, TooltipText } from './liminarStyles';
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), isTooltipVisible = _w[0], setTooltipVisible = _w[1];
99
- var _x = useState(false), isEmailModalOpen = _x[0], setIsEmailModalOpen = _x[1];
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 _z = useFetch("SELECT FROM 'LIMINAR'.'SENDMAIL'"), sendIndiciosEmail = _z.fetch, isEmailSending = _z.isLoading, emailError = _z.error;
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 _0 = useMemo(function () {
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 = _0.origensDetectadas, foundBusinessEntity = _0.foundBusinessEntity;
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(TooltipContainer, { onMouseEnter: function () {
398
- clearTimeout(hideTt.current);
399
- setTooltipVisible(true);
400
- }, onMouseLeave: function () {
401
- hideTt.current = setTimeout(function () { return setTooltipVisible(false); }, 300);
402
- } },
403
- renderTooltipIcon(),
404
- React.createElement(TooltipText, { visible: isTooltipVisible },
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 TooltipContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n margin-left: 8px;\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n margin-left: 8px;\n"])));
9
- export var TooltipIcon = styled(WarningCircle).attrs({
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;
@@ -59,8 +59,11 @@ var HasCreditsVerification = function (_a) {
59
59
  ".")));
60
60
  };
61
61
  var ConsultaSimples = function (_a) {
62
- var _documento = _a.documento, onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico, onClickQSA = _a.onClickQSA, onClickPrint = _a.onClickPrint, apiKey = _a.apiKey, queryParams = _a.queryParams, onClose = _a.onClose, hasCredits = _a.hasCredits, _b = _a.initRefinBoaVista, initRefinBoaVista = _b === void 0 ? false : _b, _c = _a.initRefinSerasa, initRefinSerasa = _c === void 0 ? false : _c, _d = _a.initVeiculos, initVeiculos = _d === void 0 ? false : _d, _e = _a.printMode, printMode = _e === void 0 ? false : _e, _f = _a.isFinancial, isFinancial = _f === void 0 ? false : _f, _g = _a.tags, tags = _g === void 0 ? [] : _g, posthog = _a.posthog;
62
+ var _b, _c, _d;
63
+ var _documento = _a.documento, onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico, onClickQSA = _a.onClickQSA, onClickPrint = _a.onClickPrint, apiKey = _a.apiKey, queryParams = _a.queryParams, onClose = _a.onClose, hasCredits = _a.hasCredits, _e = _a.initRefinBoaVista, initRefinBoaVista = _e === void 0 ? false : _e, _f = _a.initRefinSerasa, initRefinSerasa = _f === void 0 ? false : _f, _g = _a.initVeiculos, initVeiculos = _g === void 0 ? false : _g, _h = _a.printMode, printMode = _h === void 0 ? false : _h, _j = _a.isFinancial, isFinancial = _j === void 0 ? false : _j, _k = _a.tags, tags = _k === void 0 ? [] : _k, posthog = _a.posthog;
63
64
  var documento = _documento.replace(/\D+/g, '');
65
+ // extrai CTIME (case-insensitive) dos urlData para repassar como prop
66
+ var ctimeProp = (_c = (_b = queryParams === null || queryParams === void 0 ? void 0 : queryParams.urlData) === null || _b === void 0 ? void 0 : _b.CTIME) !== null && _c !== void 0 ? _c : (_d = queryParams === null || queryParams === void 0 ? void 0 : queryParams.urlData) === null || _d === void 0 ? void 0 : _d.ctime;
64
67
  return (React.createElement(ThemeProvider, { theme: theme },
65
68
  React.createElement(ErrorModalProvider, null,
66
69
  React.createElement(PostHogProvider, { posthog: posthog },
@@ -75,7 +78,7 @@ var ConsultaSimples = function (_a) {
75
78
  React.createElement(Queries.LiminarCenprot.Request, { data: { documento: documento } },
76
79
  React.createElement(Wrapper, null,
77
80
  React.createElement(GlobalDataProvider, null,
78
- React.createElement(ConsultaSimplesSection, { documento: documento, onClose: onClose, onClickPrint: onClickPrint, isFinancial: isFinancial },
81
+ React.createElement(ConsultaSimplesSection, { documento: documento, onClose: onClose, onClickPrint: onClickPrint, isFinancial: isFinancial, ctime: ctimeProp },
79
82
  React.createElement(ConsultaRfbProvider, { documento: documento },
80
83
  React.createElement(Dossie, { documento: documento, printMode: printMode, isFinancial: isFinancial }),
81
84
  React.createElement(Liminar, { isFinancial: isFinancial, hasCredits: hasCredits, tags: tags }),
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';