@credithub/harlan-components 1.100.4 → 1.100.6

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.
Files changed (30) hide show
  1. package/dist/components/ccf/ccfList.js +1 -1
  2. package/dist/components/chart/chartContent.js +1 -1
  3. package/dist/components/chart/chartSystem.js +1 -1
  4. package/dist/components/common/button.js +1 -1
  5. package/dist/components/consultaSimplesSection/consultaSimplesSection.js +2 -8
  6. package/dist/components/dossie/dossie.js +1 -1
  7. package/dist/components/dossie/generativeAi/generativeAi.js +1 -1
  8. package/dist/components/dossie/sliderCompanyName/reclameAqui/carousel.js +1 -1
  9. package/dist/components/dossie/summary/summary.js +1 -1
  10. package/dist/components/imoveis/imoveisService.js +1 -1
  11. package/dist/components/interface/loading.js +1 -1
  12. package/dist/components/interface/section.js +1 -1
  13. package/dist/components/liminar/liminar.js +52 -30
  14. package/dist/components/pep/pep.js +1 -1
  15. package/dist/components/protestos/protestos.js +1 -1
  16. package/dist/components/protestos/protestosCategory.js +1 -1
  17. package/dist/components/protestos/protestosList.js +2 -2
  18. package/dist/components/refinBoaVista/refinBoaVista.js +1 -1
  19. package/dist/components/refinSerasa/refinSerasa.js +1 -1
  20. package/dist/components/score/scoreService.js +2 -2
  21. package/dist/components/scoreSerasa/scoreSerasa.js +1 -1
  22. package/dist/components/scr/scr.js +2 -2
  23. package/dist/components/section.js +5 -5
  24. package/dist/components/veiculos/veiculos.js +1 -1
  25. package/dist/consultaSimples.js +1 -1
  26. package/dist/styles/globalStyle.d.ts +2 -2
  27. package/dist/styles/globalStyle.js +5 -7
  28. package/lib/cjs/index.js +414 -2532
  29. package/lib/esm/index.js +243 -2361
  30. package/package.json +1 -3
@@ -10,7 +10,7 @@ var CCFItem = memo(function (_a) {
10
10
  var distance = formatDistance(startDate, endDate, {
11
11
  locale: ptBR
12
12
  });
13
- return (React.createElement(React.Fragment, null,
13
+ return (React.createElement("virtual-tag", null,
14
14
  React.createElement(AddCffField, { name: "Banco", value: ccf.banco }),
15
15
  React.createElement(AddCffField, { name: "Ag\u00EAncia", value: ccf.agencia }),
16
16
  React.createElement(AddCffField, { name: "Qtde. Ocorr\u00EAncias", value: ccf.quantidadeDeOcorrencias }),
@@ -36,7 +36,7 @@ var ChartContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTe
36
36
  var ChartContentBase = function (_a) {
37
37
  var dataInput = _a.dataInput;
38
38
  var windowWidth = useWindowSize().width;
39
- return (React.createElement(React.Fragment, null,
39
+ return (React.createElement("virtual-tag", null,
40
40
  React.createElement(ResponsiveGrid, { desktop: "1fr 2fr" },
41
41
  React.createElement(ChartContainer, { windowWidth: windowWidth, chartType: "pie" },
42
42
  React.createElement(Title, null, "Resumo de Ocorr\u00EAncias"),
@@ -278,7 +278,7 @@ var ChartSystem = function (_a) {
278
278
  ? (ultimaOcorrenciaSerasa !== null && ultimaOcorrenciaSerasa !== void 0 ? ultimaOcorrenciaSerasa : undefined)
279
279
  : undefined })));
280
280
  }, isError: function (err) { return ({
281
- children: React.createElement(React.Fragment, null),
281
+ children: React.createElement("virtual-tag", null),
282
282
  description: (React.createElement(StatusMessage, { type: "error" },
283
283
  "Erro ao realizar a an\u00E1lise: ",
284
284
  err.message)),
@@ -71,7 +71,7 @@ var Button = function (_a) {
71
71
  var children = _a.children, className = _a.className, smallContent = _a.smallContent, isLoading = _a.isLoading, props = __rest(_a, ["children", "className", "smallContent", "isLoading"]);
72
72
  var buttonClassName = classNames(className);
73
73
  return (React.createElement(StyledButton, __assign({ className: buttonClassName, isLoading: isLoading }, props),
74
- isLoading ? (React.createElement(React.Fragment, null,
74
+ isLoading ? (React.createElement("virtual-tag", null,
75
75
  React.createElement("span", null, children),
76
76
  React.createElement(RotatingSpinner, { size: 20, weight: "bold" }))) : (React.createElement("span", null, children)),
77
77
  !isLoading && smallContent && (React.createElement(SmallContent, null, smallContent))));
@@ -27,11 +27,9 @@ 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';
31
30
  import { formatMoney } from '../../utils/number';
32
31
  import { formatDocument } from '../../utils/string';
33
32
  import { format } from 'date-fns';
34
- import { WarningCircle } from 'phosphor-react';
35
33
  import React, { useContext, useEffect } from 'react';
36
34
  import styled, { keyframes } from 'styled-components';
37
35
  import Section from '../interface/section';
@@ -133,12 +131,8 @@ var ConsultaSimplesSection = function (_a) {
133
131
  }); })
134
132
  });
135
133
  }, [posthog, pendencias]);
136
- return (React.createElement(Section, __assign({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: React.createElement(React.Fragment, null,
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"))),
134
+ return (React.createElement(Section, __assign({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: React.createElement("virtual-tag", null,
135
+ React.createElement(StatusMessage, null, format(new Date(), "dd/MM/yyyy 'às' HH:mm")),
142
136
  React.createElement(StatusMessage, { type: "found" }, formatDocument(documento)),
143
137
  isError && (ctx === null || ctx === void 0 ? void 0 : ctx.error) && (React.createElement(StatusMessage, { type: statusType }, ctx.error.message)),
144
138
  pendencias.map(function (item) {
@@ -132,7 +132,7 @@ var Dossie = function (_a) {
132
132
  var isPF = (documento === null || documento === void 0 ? void 0 : documento.length) === 11;
133
133
  var name = getCompanyName(isPF, data, rfbResponse);
134
134
  var document = isPF ? formatCpf(documento) : formatCnpj(documento);
135
- return (React.createElement(React.Fragment, null,
135
+ return (React.createElement("virtual-tag", null,
136
136
  React.createElement(DossieContainer, null,
137
137
  React.createElement(DossieContent, null,
138
138
  React.createElement(ReclameAquiCarousel, { documento: document, nome: name, companies: reclameAquiCompanies }),
@@ -228,7 +228,7 @@ var GenerativeAI = function (_a) {
228
228
  React.createElement(Title, null, "Assistente artificial de an\u00E1lise de cr\u00E9dito"),
229
229
  React.createElement(BetaTag, null, "beta")),
230
230
  React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)))),
231
- isOpen && (React.createElement(React.Fragment, null,
231
+ isOpen && (React.createElement("virtual-tag", null,
232
232
  React.createElement(Container, null,
233
233
  (summaryError || chatError) && (React.createElement("div", null,
234
234
  React.createElement(StatusMessage, { type: "error" },
@@ -41,7 +41,7 @@ var Carousel = function (_a) {
41
41
  return (React.createElement(DotsContainer, null, slidesArray.map(function (_, idx) { return (React.createElement("button", { key: idx, className: currentIndex === idx ? 'active' : '', onClick: function () { return setCurrentIndex(idx); }, "aria-label": "Ir para o slide ".concat(idx + 1) })); })));
42
42
  }, [pagination, total, currentIndex, slidesArray]);
43
43
  return (React.createElement(CarouselWrapper, null,
44
- showArrows && (React.createElement(React.Fragment, null,
44
+ showArrows && (React.createElement("virtual-tag", null,
45
45
  React.createElement(ArrowWrapper, { position: "left" },
46
46
  React.createElement(ArrowButton, { onClick: isRTL ? goNext : goPrev, "aria-label": "Slide anterior" }, renderArrowIcon ? (renderArrowIcon({ type: 'PREV' })) : (React.createElement(DefaultArrowIcon, { type: "PREV" })))),
47
47
  React.createElement(ArrowWrapper, { position: "right" },
@@ -22,7 +22,7 @@ export var Summary = function (_a) {
22
22
  var _b = useCardsAndProducts({
23
23
  finderResponse: finderResponse
24
24
  }), cards = _b.cards, products = _b.products, isModalOpen = _b.isModalOpen, closeModal = _b.closeModal, isScrModalOpen = _b.isScrModalOpen, setScrModalOpen = _b.setScrModalOpen, setConsultasComplementares = _b.setConsultasComplementares;
25
- return (React.createElement(React.Fragment, null,
25
+ return (React.createElement("virtual-tag", null,
26
26
  React.createElement(ContainerSummary, { className: "credithub-container-summary" },
27
27
  React.createElement(ContentSummary, { className: "credithub-content-summary" }, cards.map(function (card, index) { return (React.createElement(FieldSummary, { key: index, fullRow: card.header === 'Nome' || card.header === 'Nome Da Mãe' },
28
28
  React.createElement(AddItemField, { name: card.header, value: card.title }))); })),
@@ -80,7 +80,7 @@ var ConsultaImoveis = function (_a) {
80
80
  React.createElement(AddItemField, { name: "Valor do IPTU", value: formatMoney((_f = iptu.VALOR) === null || _f === void 0 ? void 0 : _f.IPTU) }),
81
81
  React.createElement(AddItemField, { name: "Valor do Im\u00F3vel", value: formatMoney((_g = iptu.VALOR) === null || _g === void 0 ? void 0 : _g.CONSTRUCAO) })));
82
82
  }))); }, isError: function (err) { return ({
83
- children: React.createElement(React.Fragment, null),
83
+ children: React.createElement("virtual-tag", null),
84
84
  description: (React.createElement(StatusMessage, { type: "error" },
85
85
  "Erro ao realizar a consulta: ",
86
86
  err.message)),
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export default function Loading() {
3
- return (React.createElement(React.Fragment, null,
3
+ return (React.createElement("virtual-tag", null,
4
4
  React.createElement("span", { className: "saving" },
5
5
  React.createElement("span", null, " ."),
6
6
  React.createElement("span", null, "."),
@@ -21,7 +21,7 @@ var Section = function (_a) {
21
21
  var sectionClass = classNames(className);
22
22
  var sectionContentClass = classNames(contentClassName);
23
23
  return (React.createElement(SectionContaner, { className: sectionClass },
24
- React.createElement(Header, { title: title, subtitle: subtitle, description: description, loadingProps: loadingProps, icon: icon, variant: variant, actions: React.createElement(React.Fragment, null,
24
+ React.createElement(Header, { title: title, subtitle: subtitle, description: description, loadingProps: loadingProps, icon: icon, variant: variant, actions: React.createElement("virtual-tag", null,
25
25
  React.createElement(BtnWrapper, null,
26
26
  React.createElement(PrintIcon, { onClick: onClickPrint })),
27
27
  children && (React.createElement(BtnWrapper, { hidden: variant === 'loading', onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))),
@@ -45,6 +45,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
+ if (ar || !(i in from)) {
51
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
+ ar[i] = from[i];
53
+ }
54
+ }
55
+ return to.concat(ar || Array.prototype.slice.call(from));
56
+ };
48
57
  /* eslint-disable react-hooks/exhaustive-deps */
49
58
  import ProtestosIcon from '../../assets/icones/protestos';
50
59
  import { useGlobalData } from '../../contexts/globalDataContext';
@@ -85,21 +94,21 @@ var businessTypes = [
85
94
  'cooperativa'
86
95
  ];
87
96
  var Liminar = function (_a) {
88
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
89
- var _s = _a.isFinancial, isFinancial = _s === void 0 ? false : _s, hasCredits = _a.hasCredits, _t = _a.tags, tags = _t === void 0 ? [] : _t;
97
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
98
+ var _t = _a.isFinancial, isFinancial = _t === void 0 ? false : _t, hasCredits = _a.hasCredits, _u = _a.tags, tags = _u === void 0 ? [] : _u;
90
99
  var ctx = useContext(Queries.LiminarCenprot);
91
- var _u = useGlobalData(), globalData = _u.data, setData = _u.setData;
100
+ var _v = useGlobalData(), globalData = _v.data, setData = _v.setData;
92
101
  var fetchLiminarProtestosDoPassado = useLiminarProtestosDoPassado({
93
102
  documento: ((_c = (_b = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _b === void 0 ? void 0 : _b.carousel) === null || _c === void 0 ? void 0 : _c.document) || ''
94
103
  }).fetchLiminarProtestosDoPassado;
95
- var _v = useState(false), isLoadingLiminarProtestosDoPassado = _v[0], setIsLoadingLiminarProtestosDoPassado = _v[1];
104
+ var _w = useState(false), isLoadingLiminarProtestosDoPassado = _w[0], setIsLoadingLiminarProtestosDoPassado = _w[1];
96
105
  var processedRef = useRef(false);
97
106
  var dataHashRef = useRef('');
98
107
  var invertedIdsRef = useRef([]);
99
- var _w = useState(false), isEmailModalOpen = _w[0], setIsEmailModalOpen = _w[1];
100
- var _x = useState(''), emailModalMessage = _x[0], setEmailModalMessage = _x[1];
108
+ var _x = useState(false), isEmailModalOpen = _x[0], setIsEmailModalOpen = _x[1];
109
+ var _y = useState(''), emailModalMessage = _y[0], setEmailModalMessage = _y[1];
101
110
  var liminarMailPrice = 50000;
102
- var _y = useFetch("SELECT FROM 'LIMINAR'.'SENDMAIL'"), sendIndiciosEmail = _y.fetch, isEmailSending = _y.isLoading, emailError = _y.error;
111
+ var _z = useFetch("SELECT FROM 'LIMINAR'.'SENDMAIL'"), sendIndiciosEmail = _z.fetch, isEmailSending = _z.isLoading, emailError = _z.error;
103
112
  /*
104
113
  * Extrai e normaliza os tipos de documento presentes em ctx.document, retornando sempre um array de strings em minúsculo.
105
114
  */
@@ -141,7 +150,7 @@ var Liminar = function (_a) {
141
150
  /*
142
151
  * Identifica as origens de liminares detectadas e verifica se existe liminar de protesto invertida
143
152
  */
144
- var _z = useMemo(function () {
153
+ var _0 = useMemo(function () {
145
154
  var _a, _b;
146
155
  var labels = new Set();
147
156
  var indiciosApi = ((_a = ctx.document) === null || _a === void 0 ? void 0 : _a.indiciosDeLiminar) === true;
@@ -177,13 +186,13 @@ var Liminar = function (_a) {
177
186
  tiposDocumento,
178
187
  processosComAssuntoValido,
179
188
  (_f = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _f === void 0 ? void 0 : _f.indiciosDeLiminarProtestosDoPassado
180
- ]), origensDetectadas = _z.origensDetectadas, foundBusinessEntity = _z.foundBusinessEntity;
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]);
189
+ ]), origensDetectadas = _0.origensDetectadas, foundBusinessEntity = _0.foundBusinessEntity;
190
+ 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); }, [(_g = globalData === null || globalData === void 0 ? void 0 : globalData.protestosData) === null || _g === void 0 ? void 0 : _g.isLoaded]);
182
191
  useEffect(function () {
183
192
  if (!protestosIsReady)
184
193
  return;
185
194
  var fetch = function () { return __awaiter(void 0, void 0, void 0, function () {
186
- var dossie, processosJuridicos, depsLoaded, newIds, hash, indiciosApi, indiciosDeLiminarProtestosDoPassado, protestosDoPassadoIds, _a, possuiIndiciosDeLiminarProtestosDoPassado, protestosIds, finalStatus, descricaoLiminar;
195
+ var dossie, processosJuridicos, depsLoaded, newIds, hash, indiciosApi, indiciosDeLiminarProtestosDoPassado, protestosDoPassadoIds, _a, possuiIndiciosDeLiminarProtestosDoPassado, protestosIds, origens, finalStatus, descricaoLiminar;
187
196
  var _b, _c;
188
197
  return __generator(this, function (_d) {
189
198
  switch (_d.label) {
@@ -212,8 +221,11 @@ var Liminar = function (_a) {
212
221
  return [4 /*yield*/, fetchLiminarProtestosDoPassado()];
213
222
  case 1:
214
223
  _a = _d.sent(), possuiIndiciosDeLiminarProtestosDoPassado = _a.possuiIndiciosDeLiminarProtestosDoPassado, protestosIds = _a.protestosDoPassadoIds;
224
+ origens = __spreadArray([], origensDetectadas, true);
215
225
  if (possuiIndiciosDeLiminarProtestosDoPassado) {
216
- origensDetectadas.push('Liminar no Cenprot');
226
+ if (!origens.includes('Liminar no Cenprot')) {
227
+ origens.push('Liminar no Cenprot');
228
+ }
217
229
  indiciosDeLiminarProtestosDoPassado =
218
230
  possuiIndiciosDeLiminarProtestosDoPassado;
219
231
  protestosDoPassadoIds = protestosIds.join(',');
@@ -225,11 +237,11 @@ var Liminar = function (_a) {
225
237
  ? 'Encontrado'
226
238
  : 'Não encontrado';
227
239
  invertedIdsRef.current = newIds;
228
- descricaoLiminar = origensDetectadas.length
229
- ? "Liminar encontrada ".concat(origensDetectadas
240
+ descricaoLiminar = (origens.length
241
+ ? "Liminar encontrada ".concat(origens
230
242
  .map(function (o) { return o.replace(/^Liminar (no|na) /, 'no '); })
231
243
  .join(', '))
232
- : 'Não encontrado';
244
+ : 'Não encontrado');
233
245
  setData(function (prev) { return (__assign(__assign({}, prev), { liminar: {
234
246
  /* -------------------------------------------------------------
235
247
  * Há 3 fontes possíveis de indício de liminar:
@@ -246,7 +258,7 @@ var Liminar = function (_a) {
246
258
  indiciosDeLiminarProtestosDoPassado: indiciosDeLiminarProtestosDoPassado,
247
259
  protestosDoPassadoIds: protestosDoPassadoIds,
248
260
  invertedProcessos: newIds,
249
- origensLiminar: origensDetectadas,
261
+ origensLiminar: origens,
250
262
  descricaoLiminar: descricaoLiminar
251
263
  } })); });
252
264
  processedRef.current = true;
@@ -267,8 +279,8 @@ var Liminar = function (_a) {
267
279
  foundBusinessEntity
268
280
  ]);
269
281
  var ready = processedRef.current &&
270
- !!((_g = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _g === void 0 ? void 0 : _g.isLoaded) &&
271
- !!((_h = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _h === void 0 ? void 0 : _h.carousel) &&
282
+ !!((_h = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _h === void 0 ? void 0 : _h.isLoaded) &&
283
+ !!((_j = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _j === void 0 ? void 0 : _j.carousel) &&
272
284
  !isLoadingLiminarProtestosDoPassado &&
273
285
  ctx.type !== RequestStatus.Loading;
274
286
  var ctxLoading = useMemo(function () { return (__assign(__assign({}, ctx), { type: RequestStatus.Loading })); }, [ctx]);
@@ -302,7 +314,7 @@ var Liminar = function (_a) {
302
314
  return Array.from(set);
303
315
  }, [
304
316
  ctx.document,
305
- (_j = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _j === void 0 ? void 0 : _j.indiciosDeLiminarProtestosDoPassado,
317
+ (_k = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _k === void 0 ? void 0 : _k.indiciosDeLiminarProtestosDoPassado,
306
318
  processosComAssuntoValido
307
319
  ]);
308
320
  // Se existem tipos que de fato contribuíram para o indício,
@@ -313,11 +325,11 @@ var Liminar = function (_a) {
313
325
  return (((_a = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _a === void 0 ? void 0 : _a.protestosDoPassadoIds) || '')
314
326
  .split(',')
315
327
  .filter(Boolean);
316
- }, [(_k = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _k === void 0 ? void 0 : _k.protestosDoPassadoIds]);
328
+ }, [(_l = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _l === void 0 ? void 0 : _l.protestosDoPassadoIds]);
317
329
  var processIdsForHistory = useMemo(function () { return processosComAssuntoValido.map(function (p) { return p.id; }); }, [processosComAssuntoValido]);
318
330
  // 🔔 grava o histórico assim que todos os dados necessários existirem
319
331
  useLiminarHistory({
320
- documento: ((_m = (_l = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _l === void 0 ? void 0 : _l.carousel) === null || _m === void 0 ? void 0 : _m.document) || '',
332
+ documento: ((_o = (_m = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _m === void 0 ? void 0 : _m.carousel) === null || _o === void 0 ? void 0 : _o.document) || '',
321
333
  // Garantimos que o histórico só registra "true" quando houve fonte real,
322
334
  // evitando falso-positivos vindos do estado agregado da UI.
323
335
  indicioDeLiminar: indicioDeLiminarForHistory,
@@ -340,10 +352,20 @@ var Liminar = function (_a) {
340
352
  var tooltipMessage = foundBusinessEntity
341
353
  ? 'Atenção: Em alguns casos, o sistema judicial pode registrar os papéis das partes de forma invertida, dificultando a interpretação direta. Por isso, utilizamos algoritmos internos para detectar esse padrão com base em contexto e palavras-chave.'
342
354
  : 'Processos com indícios encontrados:';
343
- var shouldRender = isLoadingLiminarProtestosDoPassado ||
344
- (ready &&
345
- (((_o = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _o === void 0 ? void 0 : _o.indiciosDeLiminar) ||
346
- ((_r = (_q = (_p = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _p === void 0 ? void 0 : _p.processosComLiminarIds) === null || _q === void 0 ? void 0 : _q.length) !== null && _r !== void 0 ? _r : 0) > 0));
355
+ var hasFoundIndicio = useMemo(function () {
356
+ var _a, _b, _c, _d;
357
+ return !!(((_a = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _a === void 0 ? void 0 : _a.indiciosDeLiminar) ||
358
+ ((_d = (_c = (_b = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _b === void 0 ? void 0 : _b.processosComLiminarIds) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);
359
+ }, [
360
+ (_p = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _p === void 0 ? void 0 : _p.indiciosDeLiminar,
361
+ (_q = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _q === void 0 ? void 0 : _q.processosComLiminarIds
362
+ ]);
363
+ var isLoadingPhase = ctx.type === RequestStatus.Loading ||
364
+ !protestosIsReady ||
365
+ !((_r = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _r === void 0 ? void 0 : _r.isLoaded) ||
366
+ !((_s = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _s === void 0 ? void 0 : _s.carousel) ||
367
+ isLoadingLiminarProtestosDoPassado;
368
+ var shouldRender = isLoadingPhase || (processedRef.current && hasFoundIndicio);
347
369
  // Função para disparar o envio do e-mail e configurar a mensagem do modal
348
370
  var handleSendEmailIndicios = function (e) { return __awaiter(void 0, void 0, void 0, function () {
349
371
  var callback;
@@ -370,7 +392,7 @@ var Liminar = function (_a) {
370
392
  setEmailModalMessage("Falha ao enviar e-mail: ".concat(emailError.message));
371
393
  }
372
394
  else {
373
- setEmailModalMessage(React.createElement(React.Fragment, null,
395
+ setEmailModalMessage(React.createElement("virtual-tag", null,
374
396
  "Os detalhes dos protestos ocultados foram enviados para seu e-mail.",
375
397
  ' ',
376
398
  React.createElement("br", null),
@@ -390,10 +412,10 @@ var Liminar = function (_a) {
390
412
  }); };
391
413
  if (!isFinancial || !shouldRender)
392
414
  return null;
393
- return (React.createElement(React.Fragment, null,
415
+ return (React.createElement("virtual-tag", null,
394
416
  React.createElement(Section, { title: React.createElement(TitleWithTooltip, null,
395
417
  "Liminares para Remo\u00E7\u00E3o de Protesto",
396
- !!processosComAssuntoValido.length && ready && (React.createElement(Tooltip, { icon: renderTooltipIcon(), content: React.createElement(React.Fragment, null,
418
+ !!processosComAssuntoValido.length && ready && (React.createElement(Tooltip, { icon: renderTooltipIcon(), content: React.createElement("virtual-tag", null,
397
419
  tooltipMessage,
398
420
  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
421
  fontSize: 13,
@@ -406,9 +428,9 @@ var Liminar = function (_a) {
406
428
  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';
407
429
  var variant = msg === 'Encontrado' ? 'error' : 'default';
408
430
  return {
409
- children: React.createElement(React.Fragment, null),
431
+ children: React.createElement("virtual-tag", null),
410
432
  variant: variant,
411
- description: (React.createElement(React.Fragment, null,
433
+ description: (React.createElement("virtual-tag", null,
412
434
  React.createElement(StatusMessage, { type: variant }, msg),
413
435
  origensDetectadas.map(function (o) { return (React.createElement(StatusMessage, { key: o, type: variant }, o)); }))),
414
436
  actions: (React.createElement("div", { style: { textAlign: 'center' }, onClick: function (e) { return e.stopPropagation(); } }, isFinancial &&
@@ -25,7 +25,7 @@ var PessoaPoliticamenteExposta = function () {
25
25
  if (!(document instanceof Node)) {
26
26
  console.error('O documento não é do tipo Node esperado.');
27
27
  return {
28
- children: React.createElement(React.Fragment, null),
28
+ children: React.createElement("virtual-tag", null),
29
29
  description: 'Erro ao processar o documento.'
30
30
  };
31
31
  }
@@ -132,7 +132,7 @@ var Protestos = function () {
132
132
  }))) : null;
133
133
  var variant = registros ? 'error' : 'default';
134
134
  return {
135
- children: React.createElement(React.Fragment, null, children),
135
+ children: React.createElement("virtual-tag", null, children),
136
136
  variant: variant,
137
137
  description: (React.createElement(StatusMessage, { type: registros ? 'error' : 'default' }, registros
138
138
  ? registros === 1
@@ -32,7 +32,7 @@ import Content from '../common/content';
32
32
  var ProtestosCategory = function (_a) {
33
33
  var registros = _a.registros, title = _a.title, subtitle = _a.subtitle, children = _a.children, rest = __rest(_a, ["registros", "title", "subtitle", "children"]);
34
34
  var _b = useToggle(), isOpen = _b[0], toggleOpen = _b[1];
35
- var defaultHeaderActions = (React.createElement(React.Fragment, null,
35
+ var defaultHeaderActions = (React.createElement("virtual-tag", null,
36
36
  React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))));
37
37
  return (React.createElement("div", null,
38
38
  React.createElement(Header, __assign({ title: title, subtitle: subtitle, description: React.createElement(StatusMessage, { type: registros ? 'error' : 'default' }, !registros
@@ -203,14 +203,14 @@ export var ProtestoItem = memo(function (_a) {
203
203
  var original = protesto.nomeCedente;
204
204
  var override = iaOverrides[nm_chave];
205
205
  if (override && override.trim() !== '') {
206
- return (React.createElement(React.Fragment, null,
206
+ return (React.createElement("virtual-tag", null,
207
207
  override,
208
208
  React.createElement(AIIndicator, null)));
209
209
  }
210
210
  if (original && original.trim() !== '')
211
211
  return original;
212
212
  if (isAIData && quemApresentou)
213
- return (React.createElement(React.Fragment, null,
213
+ return (React.createElement("virtual-tag", null,
214
214
  quemApresentou,
215
215
  React.createElement(AIIndicator, null)));
216
216
  if ((loading || queued) && !quemApresentou)
@@ -106,7 +106,7 @@ function RefinBoaVista(_a) {
106
106
  React.createElement(AddItemField, { name: "Telefone Associado", value: pendencia.TelefoneAssociado }),
107
107
  React.createElement(AddItemField, { name: "Cidade Associado", value: pendencia.CidadeAssociado }),
108
108
  React.createElement(AddItemField, { name: "UF Associado", value: pendencia.UfAssociado }))); }))); }, isError: function (err) { return ({
109
- children: React.createElement(React.Fragment, null),
109
+ children: React.createElement("virtual-tag", null),
110
110
  description: (React.createElement(StatusMessage, { type: "error" },
111
111
  "Erro ao realizar a consulta: ",
112
112
  err.message)),
@@ -123,7 +123,7 @@ var RefinSerasa = function (_a) {
123
123
  React.createElement(AddItemField, { name: "Total de Pend\u00EAncias", value: pendencia.totalpendencias }),
124
124
  React.createElement(AddItemField, { name: "Valor Total", value: formatMoney(pendencia.totalvalor) }),
125
125
  React.createElement(AddItemField, { name: "Categoria", value: pendencia.categoria }))); }))); }, isError: function (err) { return ({
126
- children: React.createElement(React.Fragment, null),
126
+ children: React.createElement("virtual-tag", null),
127
127
  description: (React.createElement(StatusMessage, { type: "error" },
128
128
  "Erro ao realizar a consulta: ",
129
129
  err.message)),
@@ -70,10 +70,10 @@ var ConsultaScore = function (_a) {
70
70
  React.createElement(AddItemField, { name: "Classifica\u00E7\u00E3o", value: scoreData.classificacao }),
71
71
  React.createElement(AddItemField, { name: "An\u00E1lise", value: scoreData.texto }),
72
72
  React.createElement(AddItemField, { name: "Status", value: scoreData.status }),
73
- documento.length > 11 && (React.createElement(React.Fragment, null,
73
+ documento.length > 11 && (React.createElement("virtual-tag", null,
74
74
  React.createElement(AddItemField, { name: "Classifica\u00E7\u00E3o Num\u00E9rica", value: scoreData.classificacao_numerica }),
75
75
  React.createElement(AddItemField, { name: "Classifica\u00E7\u00E3o Alfab\u00E9tica", value: scoreData.classificacao_alfabetica }))))))); }, isError: function (err) { return ({
76
- children: React.createElement(React.Fragment, null),
76
+ children: React.createElement("virtual-tag", null),
77
77
  description: (React.createElement(StatusMessage, { type: "error" },
78
78
  "Erro ao realizar a consulta: ",
79
79
  err.message)),
@@ -73,7 +73,7 @@ var ConsultaScoreSerasa = function (_a) {
73
73
  React.createElement(AddItemField, { name: "Score", value: String(scoreData.pontuacao) }),
74
74
  React.createElement(AddItemField, { name: "Probabilidade de Inadimpl\u00EAncia", value: "".concat(scoreData.probabilidade_inadimplencia, "%") }),
75
75
  React.createElement(AddItemField, { name: "An\u00E1lise", value: "DE CADA 100 ".concat(isDocumentoPF(documento) ? 'PESSOAS' : 'EMPRESAS', " CLASSIFICADAS NESTA CLASSE DE SCORE, \u00C9 PROV\u00C1VEL QUE ").concat(Math.floor(inadProb), " APRESENTEM D\u00C9BITOS NO MERCADO NOS PR\u00D3XIMOS 6 MESES.") }))))); }, isError: function (err) { return ({
76
- children: React.createElement(React.Fragment, null),
76
+ children: React.createElement("virtual-tag", null),
77
77
  description: (React.createElement(StatusMessage, { type: "error" },
78
78
  "Erro ao realizar a consulta: ",
79
79
  err.message)),
@@ -133,7 +133,7 @@ function ConsultaSCR(_a) {
133
133
  refetch: function () { },
134
134
  Section: Section,
135
135
  progress: loadingProgress
136
- }, title: "SCR", subtitle: "Resumo do Cliente", icon: ScrIcon, description: !error && (React.createElement(StatusMessage, { type: scr ? 'success' : 'default' }, description)), onSuccess: function () { return (React.createElement(React.Fragment, null,
136
+ }, title: "SCR", subtitle: "Resumo do Cliente", icon: ScrIcon, description: !error && (React.createElement(StatusMessage, { type: scr ? 'success' : 'default' }, description)), onSuccess: function () { return (React.createElement("virtual-tag", null,
137
137
  React.createElement(Result, null,
138
138
  React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" }, Array.isArray(basicData)
139
139
  ? basicData.map(function (data) { return (React.createElement(AddItemField, { key: data.label, name: data.label, value: data.value })); })
@@ -198,7 +198,7 @@ function ConsultaSCR(_a) {
198
198
  });
199
199
  }); } }, "Baixar relat\u00F3rio detalhado"))),
200
200
  React.createElement(ResumosWrapper, { isOpen: isOpen }))); }, isError: function (err) { return ({
201
- children: React.createElement(React.Fragment, null),
201
+ children: React.createElement("virtual-tag", null),
202
202
  description: (React.createElement(StatusMessage, { type: "error" },
203
203
  "Erro ao realizar a consulta: ",
204
204
  err.message)),
@@ -45,13 +45,13 @@ var Section = forwardRef(function (_a, ref) {
45
45
  ? err.message
46
46
  : 'Problemas de comunicação, tente novamente.';
47
47
  return {
48
- children: React.createElement(React.Fragment, null),
49
- description: (React.createElement(React.Fragment, null,
48
+ children: React.createElement("virtual-tag", null),
49
+ description: (React.createElement("virtual-tag", null,
50
50
  React.createElement(StatusMessage, { type: "error" }, message))),
51
- actions: (React.createElement(React.Fragment, null, (ctx === null || ctx === void 0 ? void 0 : ctx.refetch) && (React.createElement(ButtonWrapper, null,
51
+ actions: (React.createElement("virtual-tag", null, (ctx === null || ctx === void 0 ? void 0 : ctx.refetch) && (React.createElement(ButtonWrapper, null,
52
52
  React.createElement(Button, { onClick: function () { return ctx.refetch(); } }, "Tentar Novamente")))))
53
53
  };
54
- } : _b, _c = _a.onLoading, onLoading = _c === void 0 ? function () { return React.createElement(React.Fragment, null); } : _c, ctx = _a.ctx, className = _a.className, _d = _a.hideHeader, hideHeader = _d === void 0 ? false : _d, _e = _a.minimized, minimized = _e === void 0 ? false : _e, headerProps = __rest(_a, ["onSuccess", "isError", "onLoading", "ctx", "className", "hideHeader", "minimized"]);
54
+ } : _b, _c = _a.onLoading, onLoading = _c === void 0 ? function () { return React.createElement("virtual-tag", null); } : _c, ctx = _a.ctx, className = _a.className, _d = _a.hideHeader, hideHeader = _d === void 0 ? false : _d, _e = _a.minimized, minimized = _e === void 0 ? false : _e, headerProps = __rest(_a, ["onSuccess", "isError", "onLoading", "ctx", "className", "hideHeader", "minimized"]);
55
55
  var _f = useToggle(!minimized), isOpen = _f[0], toggleOpen = _f[1];
56
56
  if (!ctx)
57
57
  return null;
@@ -76,7 +76,7 @@ var Section = forwardRef(function (_a, ref) {
76
76
  percentage: progress !== null && progress !== void 0 ? progress : 0,
77
77
  activeRequests: ctx.activeRequests,
78
78
  hidden: false
79
- }, actions: React.createElement(React.Fragment, null,
79
+ }, actions: React.createElement("virtual-tag", null,
80
80
  props.actions,
81
81
  renderedResponse && defaultHeaderActions) }))); };
82
82
  if (React.isValidElement(renderedResponse)) {
@@ -100,7 +100,7 @@ var Veiculos = function (_a) {
100
100
  React.createElement(AddItemField, { name: "Esp\u00E9cie", value: registro.especie }),
101
101
  React.createElement(AddItemField, { name: "Combust\u00EDvel", value: registro.combustivel }),
102
102
  React.createElement(AddItemField, { name: "Cor", value: registro.cor }))); }))); }, isError: function (err) { return ({
103
- children: React.createElement(React.Fragment, null),
103
+ children: React.createElement("virtual-tag", null),
104
104
  description: (React.createElement(StatusMessage, { type: "error" },
105
105
  "Erro ao realizar a consulta: ",
106
106
  err.message)),
@@ -46,7 +46,7 @@ var HasCreditsVerification = function (_a) {
46
46
  // Se não houver resposta ainda ou se a consulta retornar "tem créditos",
47
47
  // libera os filhos normalmente (não desmonta nada).
48
48
  if (!response || response.document) {
49
- return React.createElement(React.Fragment, null, children);
49
+ return React.createElement("virtual-tag", null, children);
50
50
  }
51
51
  // Caso a resposta indique ausência de créditos, mostra o modal.
52
52
  return (React.createElement(Modal, { isOpen: isOpen, onClose: toggle, title: "Aten\u00E7\u00E3o: Voc\u00EA precisa de cr\u00E9ditos!", footer: null },
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const GlobalStyleWithHelmet: React.FC;
3
- export default GlobalStyleWithHelmet;
2
+ declare const GlobalStyleProvider: React.FC;
3
+ export default GlobalStyleProvider;
@@ -4,13 +4,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  };
5
5
  // src/styles/globalStyle.tsx
6
6
  import { createGlobalStyle } from 'styled-components';
7
- import { Helmet } from 'react-helmet';
8
7
  import React from 'react';
9
- var GlobalStyle = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Google Fonts s\u00E3o carregados via Helmet */\n\n /* Reset + fonte padr\u00E3o para toda a aplica\u00E7\u00E3o (inclui modais e portais) */\n *, *::before, *::after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-family: 'Open Sans Condensed', sans-serif;\n }\n\n body {\n -webkit-font-smoothing: antialiased;\n }\n\n /* Oculta bot\u00F5es na impress\u00E3o */\n @media print {\n button,\n [class*=\"Button\"],\n [class^=\"Button\"],\n [class*=\"btn\"],\n [class^=\"btn\"],\n .button,\n .btn {\n display: none !important;\n }\n }\n\n /* Anima\u00E7\u00F5es utilit\u00E1rias */\n @keyframes highlight {\n from {\n background-color: rgba(255, 215, 0, 0.35);\n }\n to {\n background-color: transparent;\n }\n }\n\n .highlighted-process {\n animation: highlight 3s ease-out forwards !important;\n }\n\n @keyframes blueHighlight {\n from {\n background-color: rgba(0, 122, 255, 0.35);\n }\n to {\n background-color: rgba(0, 122, 255, 0.15);\n }\n }\n\n .blue-highlighted-process {\n animation: blueHighlight 2.5s ease-in-out;\n background-color: rgba(0, 122, 255, 0.15);\n transition: background-color 0.3s ease-in-out;\n }\n"], ["\n /* Google Fonts s\u00E3o carregados via Helmet */\n\n /* Reset + fonte padr\u00E3o para toda a aplica\u00E7\u00E3o (inclui modais e portais) */\n *, *::before, *::after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-family: 'Open Sans Condensed', sans-serif;\n }\n\n body {\n -webkit-font-smoothing: antialiased;\n }\n\n /* Oculta bot\u00F5es na impress\u00E3o */\n @media print {\n button,\n [class*=\"Button\"],\n [class^=\"Button\"],\n [class*=\"btn\"],\n [class^=\"btn\"],\n .button,\n .btn {\n display: none !important;\n }\n }\n\n /* Anima\u00E7\u00F5es utilit\u00E1rias */\n @keyframes highlight {\n from {\n background-color: rgba(255, 215, 0, 0.35);\n }\n to {\n background-color: transparent;\n }\n }\n\n .highlighted-process {\n animation: highlight 3s ease-out forwards !important;\n }\n\n @keyframes blueHighlight {\n from {\n background-color: rgba(0, 122, 255, 0.35);\n }\n to {\n background-color: rgba(0, 122, 255, 0.15);\n }\n }\n\n .blue-highlighted-process {\n animation: blueHighlight 2.5s ease-in-out;\n background-color: rgba(0, 122, 255, 0.15);\n transition: background-color 0.3s ease-in-out;\n }\n"])));
10
- // Componente que combina GlobalStyle com Helmet para fontes
11
- var GlobalStyleWithHelmet = function () { return (React.createElement(React.Fragment, null,
12
- React.createElement(Helmet, null,
13
- React.createElement("link", { href: "https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@300;400;500;600;700&display=swap", rel: "stylesheet" })),
8
+ var GlobalStyle = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Reset + fonte padr\u00E3o para toda a aplica\u00E7\u00E3o (inclui modais e portais) */\n *, *::before, *::after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-family: 'Open Sans Condensed', sans-serif;\n }\n\n body {\n -webkit-font-smoothing: antialiased;\n }\n\n /* Oculta bot\u00F5es na impress\u00E3o */\n @media print {\n button,\n [class*=\"Button\"],\n [class^=\"Button\"],\n [class*=\"btn\"],\n [class^=\"btn\"],\n .button,\n .btn {\n display: none !important;\n }\n }\n\n /* Anima\u00E7\u00F5es utilit\u00E1rias */\n @keyframes highlight {\n from {\n background-color: rgba(255, 215, 0, 0.35);\n }\n to {\n background-color: transparent;\n }\n }\n\n .highlighted-process {\n animation: highlight 3s ease-out forwards !important;\n }\n\n @keyframes blueHighlight {\n from {\n background-color: rgba(0, 122, 255, 0.35);\n }\n to {\n background-color: rgba(0, 122, 255, 0.15);\n }\n }\n\n .blue-highlighted-process {\n animation: blueHighlight 2.5s ease-in-out;\n background-color: rgba(0, 122, 255, 0.15);\n transition: background-color 0.3s ease-in-out;\n }\n\n virtual-tag {\n display: contents;\n }\n"], ["\n /* Reset + fonte padr\u00E3o para toda a aplica\u00E7\u00E3o (inclui modais e portais) */\n *, *::before, *::after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-family: 'Open Sans Condensed', sans-serif;\n }\n\n body {\n -webkit-font-smoothing: antialiased;\n }\n\n /* Oculta bot\u00F5es na impress\u00E3o */\n @media print {\n button,\n [class*=\"Button\"],\n [class^=\"Button\"],\n [class*=\"btn\"],\n [class^=\"btn\"],\n .button,\n .btn {\n display: none !important;\n }\n }\n\n /* Anima\u00E7\u00F5es utilit\u00E1rias */\n @keyframes highlight {\n from {\n background-color: rgba(255, 215, 0, 0.35);\n }\n to {\n background-color: transparent;\n }\n }\n\n .highlighted-process {\n animation: highlight 3s ease-out forwards !important;\n }\n\n @keyframes blueHighlight {\n from {\n background-color: rgba(0, 122, 255, 0.35);\n }\n to {\n background-color: rgba(0, 122, 255, 0.15);\n }\n }\n\n .blue-highlighted-process {\n animation: blueHighlight 2.5s ease-in-out;\n background-color: rgba(0, 122, 255, 0.15);\n transition: background-color 0.3s ease-in-out;\n }\n\n virtual-tag {\n display: contents;\n }\n"])));
9
+ // Componente que aplica os estilos globais da aplicação.
10
+ // A fonte "Open Sans Condensed" é carregada via index.html.
11
+ var GlobalStyleProvider = function () { return (React.createElement("virtual-tag", null,
14
12
  React.createElement(GlobalStyle, null))); };
15
- export default GlobalStyleWithHelmet;
13
+ export default GlobalStyleProvider;
16
14
  var templateObject_1;