@credithub/harlan-components 1.75.0 → 1.75.2
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/assets/btn/btnSend.d.ts +1 -1
- package/dist/assets/btn/btnSend.js +2 -8
- package/dist/assets/btn/buttonAtualizarDadosRfb.d.ts +1 -2
- package/dist/assets/btn/buttonAtualizarDadosRfb.js +3 -3
- package/dist/assets/btn/chevronDown.d.ts +1 -1
- package/dist/assets/btn/chevronDown.js +2 -3
- package/dist/assets/btn/chevronLeft.d.ts +1 -1
- package/dist/assets/btn/chevronLeft.js +2 -3
- package/dist/assets/btn/chevronRight.d.ts +1 -1
- package/dist/assets/btn/chevronRight.js +2 -3
- package/dist/assets/btn/chevronUp.d.ts +1 -1
- package/dist/assets/btn/chevronUp.js +2 -3
- package/dist/assets/btn/closeIcon.d.ts +1 -1
- package/dist/assets/btn/closeIcon.js +2 -3
- package/dist/assets/btn/printIcon.d.ts +1 -1
- package/dist/assets/btn/printIcon.js +2 -3
- package/dist/assets/btn/stopBtn.d.ts +1 -1
- package/dist/assets/btn/stopBtn.js +2 -4
- package/dist/assets/btn/thumbDown.js +2 -6
- package/dist/assets/btn/thumbUp.js +2 -6
- package/dist/assets/icones/chequesSemFundo.js +2 -7
- package/dist/assets/icones/consultaSimples.js +2 -7
- package/dist/assets/icones/contasBancarias.js +2 -7
- package/dist/assets/icones/contato.js +2 -7
- package/dist/assets/icones/credithub.js +2 -10
- package/dist/assets/icones/dividasVencidasSerasa.js +2 -4
- package/dist/assets/icones/dominios.js +2 -4
- package/dist/assets/icones/endereco.d.ts +1 -2
- package/dist/assets/icones/endereco.js +2 -7
- package/dist/assets/icones/iconeEmpresa.js +2 -7
- package/dist/assets/icones/iconePessoa.js +2 -7
- package/dist/assets/icones/imoveis.js +2 -4
- package/dist/assets/icones/pefinRefinBoaVista.js +2 -4
- package/dist/assets/icones/pefinRefinSerasa.js +2 -6
- package/dist/assets/icones/person.js +2 -7
- package/dist/assets/icones/processosJuridicos.js +2 -7
- package/dist/assets/icones/protestos.js +2 -7
- package/dist/assets/icones/protestosCredito.js +2 -7
- package/dist/assets/icones/protestosGerais.js +2 -7
- package/dist/assets/icones/protestosImpostos.js +2 -7
- package/dist/assets/icones/quadroSocietario.js +2 -7
- package/dist/assets/icones/resumoNegativacoes.js +2 -6
- package/dist/assets/icones/scoreBoaVista.js +2 -4
- package/dist/assets/icones/scr.js +2 -4
- package/dist/assets/icones/ultimaMovimentacao.js +2 -7
- package/dist/assets/icones/veiculos.js +2 -4
- package/dist/components/adresses/addresses.js +4 -10
- package/dist/components/bank-accounts/bank-accounts.d.ts +1 -2
- package/dist/components/bank-accounts/bank-accounts.js +5 -7
- package/dist/components/ccf/ccf.d.ts +1 -1
- package/dist/components/ccf/ccf.js +8 -7
- package/dist/components/ccf/ccfList.js +4 -8
- package/dist/components/chart/chartContent.js +2 -10
- package/dist/components/chart/chartSystem.js +27 -32
- package/dist/components/chart/components/MixedChart.js +9 -10
- package/dist/components/chart/components/PieChart.js +2 -2
- package/dist/components/chart/components/categoryProtestos.js +2 -3
- package/dist/components/chart/quantityResult.js +3 -27
- package/dist/components/common/addItem.d.ts +1 -1
- package/dist/components/common/addItem.js +2 -5
- package/dist/components/common/button.js +2 -4
- package/dist/components/common/gauge.js +3 -3
- package/dist/components/common/modal.js +3 -7
- package/dist/components/common/modalMaintenance.js +3 -6
- package/dist/components/common/printSectionWrapper.js +2 -2
- package/dist/components/consultaRfb.js +4 -3
- package/dist/components/consultaSimplesSection/consultaSimplesSection.js +11 -18
- package/dist/components/consultasComplementares.js +4 -3
- package/dist/components/contacts/contactLikeDislikeSection.js +4 -5
- package/dist/components/contacts/contacts.js +11 -13
- package/dist/components/contacts/contactsLikeDislike.js +2 -2
- package/dist/components/contacts/thumbsButton.js +2 -11
- package/dist/components/dividasPublicas/dividasPublicas.js +8 -8
- package/dist/components/dividasPublicas/dividasPublicasList.js +3 -14
- package/dist/components/dominios/dominios.js +9 -9
- package/dist/components/dossie/carrousel/carrousel.js +2 -3
- package/dist/components/dossie/companyLogo/companyLogo.js +2 -7
- package/dist/components/dossie/dossie.js +3 -9
- package/dist/components/dossie/generativeAi/generativeAi.js +7 -40
- package/dist/components/dossie/summary/cardsAndProducts.d.ts +1 -1
- package/dist/components/dossie/summary/cardsAndProducts.js +3 -2
- package/dist/components/dossie/summary/summary.js +5 -14
- package/dist/components/dossie/transactionTable/transactionTable.js +2 -10
- package/dist/components/imoveis/imoveisService.js +11 -24
- package/dist/components/interface/header.js +4 -14
- package/dist/components/interface/loading.d.ts +1 -2
- package/dist/components/interface/loading.js +2 -6
- package/dist/components/interface/loadingBar.js +2 -3
- package/dist/components/interface/resultWithoutInformation.js +2 -4
- package/dist/components/interface/section.js +2 -10
- package/dist/components/liminar/liminar.js +37 -48
- package/dist/components/partners/partner-dividas-publicas.d.ts +1 -2
- package/dist/components/partners/partner-dividas-publicas.js +2 -2
- package/dist/components/partners/partner-protestos.d.ts +1 -2
- package/dist/components/partners/partner-protestos.js +2 -2
- package/dist/components/partners/partner-rfb-status.d.ts +1 -2
- package/dist/components/partners/partner-rfb-status.js +2 -2
- package/dist/components/partners/partnerField.js +2 -2
- package/dist/components/partners/partnerList.d.ts +1 -1
- package/dist/components/partners/partnerList.js +6 -11
- package/dist/components/partners/partners.d.ts +1 -2
- package/dist/components/partners/partners.js +11 -11
- package/dist/components/pep/pep.js +5 -6
- package/dist/components/processos-juridicos/envolvidosList.js +2 -6
- package/dist/components/processos-juridicos/processosJuridicos.js +10 -9
- package/dist/components/processos-juridicos/processosJuridicosList.js +7 -19
- package/dist/components/protestos/protestos.js +14 -13
- package/dist/components/protestos/protestosCategory.js +7 -11
- package/dist/components/protestos/protestosList.d.ts +2 -2
- package/dist/components/protestos/protestosList.js +12 -27
- package/dist/components/protestos/protestosSp.js +12 -14
- package/dist/components/reclameAqui/carousel.d.ts +21 -0
- package/dist/components/reclameAqui/carousel.js +47 -0
- package/dist/components/reclameAqui/reclameAquiCarousel.js +12 -37
- package/dist/components/refinBoaVista/refinBoaVista.d.ts +1 -2
- package/dist/components/refinBoaVista/refinBoaVista.js +8 -19
- package/dist/components/refinSerasa/refinSerasa.js +9 -24
- package/dist/components/resultadoDaPesquisa/resultado-da-pesquisa.js +2 -8
- package/dist/components/score/scoreService.js +6 -15
- package/dist/components/scoreSerasa/scoreSerasa.js +7 -11
- package/dist/components/scr/scr.d.ts +1 -2
- package/dist/components/scr/scr.js +30 -38
- package/dist/components/scr/scrDataBaseModal.js +3 -8
- package/dist/components/section.d.ts +2 -2
- package/dist/components/section.js +38 -31
- package/dist/components/veiculos/veiculos.js +6 -20
- package/dist/components/webservice.js +4 -3
- package/dist/consultaSimples.js +4 -37
- package/dist/contexts/createDataContext.js +3 -2
- package/lib/cjs/index.js +3023 -7815
- package/lib/esm/index.js +42207 -45001
- package/package.json +1 -2
- package/dist/components/common/carousel.d.ts +0 -4
- package/dist/components/common/carousel.js +0 -19
|
@@ -2,14 +2,13 @@ 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
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import Companylogo from '../companyLogo/companyLogo';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
var CarouselContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
|
|
9
9
|
export var Carrousel = function (_a) {
|
|
10
10
|
var name = _a.name, document = _a.document;
|
|
11
|
-
return (
|
|
12
|
-
React.createElement(Companylogo, { name: name, document: document })));
|
|
11
|
+
return (_jsx(CarouselContainer, { children: _jsx(Companylogo, { name: name, document: document }) }));
|
|
13
12
|
};
|
|
14
13
|
export default Carrousel;
|
|
15
14
|
var templateObject_1;
|
|
@@ -2,10 +2,10 @@ 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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
6
|
import IconeEmpresa from '../../../assets/icones/iconeEmpresa';
|
|
6
7
|
import IconePessoa from '../../../assets/icones/iconePessoa';
|
|
7
8
|
import { isDocumentoPF } from '../../../utils/string';
|
|
8
|
-
import React from 'react';
|
|
9
9
|
import styled, { useTheme } from 'styled-components';
|
|
10
10
|
var LogoContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n row-gap: 20px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n row-gap: 20px;\n"])));
|
|
11
11
|
var CompanyName = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n color: ", ";\n text-align: center;\n line-height: ", ";\n font-weight: ", ";\n"], ["\n font-size: ", ";\n color: ", ";\n text-align: center;\n line-height: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
@@ -42,12 +42,7 @@ var Companylogo = function (_a) {
|
|
|
42
42
|
var theme = useTheme();
|
|
43
43
|
var circleFillColor = theme.colors.cinzaClaro;
|
|
44
44
|
var pathFillColor = theme.colors.cinzaEscuro;
|
|
45
|
-
return (
|
|
46
|
-
React.createElement(CompanyName, null, name),
|
|
47
|
-
isDocumentoPF(document) ? (React.createElement(IconePessoa, { size: 60, circleFill: circleFillColor, pathFill: pathFillColor, className: "company-logo-icon" })) : (React.createElement(IconeEmpresa, { size: 60, circleFill: circleFillColor, className: "company-logo-icon" })),
|
|
48
|
-
React.createElement(DocumentContainer, null,
|
|
49
|
-
isDocumentoPF(document) ? 'CPF: ' : 'CNPJ: ',
|
|
50
|
-
document)));
|
|
45
|
+
return (_jsxs(LogoContainer, { children: [_jsx(CompanyName, { children: name }), isDocumentoPF(document) ? (_jsx(IconePessoa, { size: 60, circleFill: circleFillColor, pathFill: pathFillColor, className: "company-logo-icon" })) : (_jsx(IconeEmpresa, { size: 60, circleFill: circleFillColor, className: "company-logo-icon" })), _jsxs(DocumentContainer, { children: [isDocumentoPF(document) ? 'CPF: ' : 'CNPJ: ', document] })] }));
|
|
51
46
|
};
|
|
52
47
|
export default Companylogo;
|
|
53
48
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
};
|
|
14
14
|
return __assign.apply(this, arguments);
|
|
15
15
|
};
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
17
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
17
18
|
import { useConsultaRfb } from '../../hooks/useConsultaRfb';
|
|
18
19
|
import { formatCnpj, formatCpf } from '../../utils/string';
|
|
@@ -120,17 +121,10 @@ var Dossie = function (_a) {
|
|
|
120
121
|
(rfbResponse &&
|
|
121
122
|
XPathUtils.select('string(//RFB/nome)', rfbResponse)));
|
|
122
123
|
var document = isPF ? formatCpf(documento) : formatCnpj(documento);
|
|
123
|
-
return (
|
|
124
|
-
React.createElement(DossieContainer, null,
|
|
125
|
-
React.createElement(DossieContent, null,
|
|
126
|
-
React.createElement(ReclameAquiCarousel, { documento: document, nome: name, companies: reclameAquiCompanies }),
|
|
127
|
-
React.createElement(Summary, { finderResponse: data, document: document })),
|
|
128
|
-
React.createElement(TransactionsTable, { events: XPathUtils.select('//historico/consulta', data) || [] })),
|
|
129
|
-
!printMode && (React.createElement(GenerativeAIContainer, null,
|
|
130
|
-
React.createElement(GenerativeAI, { documento: document, refreshQuery: refreshQuery })))));
|
|
124
|
+
return (_jsxs(_Fragment, { children: [_jsxs(DossieContainer, { children: [_jsxs(DossieContent, { children: [_jsx(ReclameAquiCarousel, { documento: document, nome: name, companies: reclameAquiCompanies }), _jsx(Summary, { finderResponse: data, document: document })] }), _jsx(TransactionsTable, { events: XPathUtils.select('//historico/consulta', data) || [] })] }), !printMode && (_jsx(GenerativeAIContainer, { children: _jsx(GenerativeAI, { documento: document, refreshQuery: refreshQuery }) }))] }));
|
|
131
125
|
};
|
|
132
126
|
}, [documento, rfbResponse, printMode, reclameAquiCompanies, refreshQuery]);
|
|
133
|
-
return (
|
|
127
|
+
return (_jsx(Section, { ctx: ctx, hideHeader: true, minimized: false, isError: function (e) { return response(e); }, onSuccess: response }));
|
|
134
128
|
};
|
|
135
129
|
export default React.memo(Dossie);
|
|
136
130
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -54,6 +54,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
54
54
|
}
|
|
55
55
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
56
|
};
|
|
57
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
57
58
|
import BtnSend from '../../../assets/btn/btnSend';
|
|
58
59
|
import BtnWrapper from '../../../assets/btn/btnWrapper';
|
|
59
60
|
import ChevronDown from '../../../assets/btn/chevronDown';
|
|
@@ -65,7 +66,7 @@ import StatusMessage from '../../../components/interface/statusMessage';
|
|
|
65
66
|
import { useStreamQuery } from '../../../components/streamQuery';
|
|
66
67
|
import { useGlobalData } from '../../../contexts/globalDataContext';
|
|
67
68
|
import useToggle from '../../../hooks/useToggle';
|
|
68
|
-
import
|
|
69
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
69
70
|
import ReactMarkdown from 'react-markdown';
|
|
70
71
|
import remarkGfm from 'remark-gfm';
|
|
71
72
|
import { flattenData, selectRelevantData } from './dataUtils';
|
|
@@ -222,44 +223,10 @@ var GenerativeAI = function (_a) {
|
|
|
222
223
|
setUserInput('');
|
|
223
224
|
}
|
|
224
225
|
};
|
|
225
|
-
return (
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
React.createElement(BetaTag, null, "beta")),
|
|
231
|
-
React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)))),
|
|
232
|
-
isOpen && (React.createElement(React.Fragment, null,
|
|
233
|
-
React.createElement(Container, null,
|
|
234
|
-
(summaryError || chatError) && (React.createElement("div", null,
|
|
235
|
-
React.createElement(StatusMessage, { type: "error" },
|
|
236
|
-
"Erro ao realizar a an\u00E1lise:",
|
|
237
|
-
' ', (_b = (summaryError || chatError)) === null || _b === void 0 ? void 0 :
|
|
238
|
-
_b.message))),
|
|
239
|
-
React.createElement(InitialMessageBox, null,
|
|
240
|
-
React.createElement(InitialMessageContent, null,
|
|
241
|
-
React.createElement("div", { className: "icon-and-text" },
|
|
242
|
-
React.createElement(Credithub, { size: 18, className: "initial-icon" }),
|
|
243
|
-
React.createElement("span", null, streamMode === 'summary' &&
|
|
244
|
-
summaryLoading &&
|
|
245
|
-
!((_c = messageHistory[0]) === null || _c === void 0 ? void 0 : _c.content) ? (React.createElement(LoadingDots, null)) : (React.createElement(ReactMarkdown, { remarkPlugins: [remarkGfm] }, ((_d = messageHistory[0]) === null || _d === void 0 ? void 0 : _d.content) || '')))),
|
|
246
|
-
React.createElement("div", { className: "additional-message" },
|
|
247
|
-
React.createElement("p", null, "Voc\u00EA pode fazer perguntas como:"),
|
|
248
|
-
React.createElement("p", { className: "blue-text" }, "\u00C9 seguro oferecer um cr\u00E9dito de R$ 15.000,00 a uma taxa de 3% em 12x?")),
|
|
249
|
-
React.createElement("div", { className: "final-message" },
|
|
250
|
-
React.createElement(Person, { size: 18 }),
|
|
251
|
-
React.createElement("p", null, "Digite no campo abaixo o que deseja saber sobre esse dossi\u00EA?")))),
|
|
252
|
-
React.createElement(MessageHistory, { ref: messageHistoryRef }, messageHistory.slice(1).map(function (msg, index) { return (React.createElement(Message, { key: index, role: msg.role },
|
|
253
|
-
React.createElement("div", { className: "icon-and-message" },
|
|
254
|
-
msg.role === 'user' ? (React.createElement(Person, { size: 18 })) : (React.createElement(Credithub, { size: 18, className: "initial-icon" })),
|
|
255
|
-
React.createElement("span", null, msg.role === 'assistant' &&
|
|
256
|
-
chatLoading &&
|
|
257
|
-
!msg.content ? (React.createElement(LoadingDots, null)) : (React.createElement(ReactMarkdown, { remarkPlugins: [remarkGfm] }, msg.content)))))); }))),
|
|
258
|
-
React.createElement(ContainerInput, null,
|
|
259
|
-
React.createElement(ChatInputContainer, null,
|
|
260
|
-
React.createElement(ChatInput, { type: "text", placeholder: "Digite o que deseja saber sobre esse dossi\u00EA", value: userInput, onChange: function (e) { return setUserInput(e.target.value); }, onKeyPress: handleKeyPress, disabled: chatLoading }),
|
|
261
|
-
chatLoading ? (React.createElement(SendButton, { onClick: handleStopStream },
|
|
262
|
-
React.createElement(StopButton, null))) : (React.createElement(SendButton, { onClick: handleSendMessage },
|
|
263
|
-
React.createElement(BtnSend, null)))))))));
|
|
226
|
+
return (_jsxs(GenerativeAi, { children: [_jsx(Header, { children: _jsxs(HeaderContent, { children: [_jsxs("div", { className: "title-container", children: [_jsx(Title, { children: "Assistente artificial de an\u00E1lise de cr\u00E9dito" }), _jsx(BetaTag, { children: "beta" })] }), _jsx(BtnWrapper, { onClick: toggleOpen, children: isOpen ? _jsx(ChevronUp, {}) : _jsx(ChevronDown, {}) })] }) }), isOpen && (_jsxs(_Fragment, { children: [_jsxs(Container, { children: [(summaryError || chatError) && (_jsx("div", { children: _jsxs(StatusMessage, { type: "error", children: ["Erro ao realizar a an\u00E1lise:", ' ', (_b = (summaryError || chatError)) === null || _b === void 0 ? void 0 : _b.message] }) })), _jsx(InitialMessageBox, { children: _jsxs(InitialMessageContent, { children: [_jsxs("div", { className: "icon-and-text", children: [_jsx(Credithub, { size: 18, className: "initial-icon" }), _jsx("span", { children: streamMode === 'summary' &&
|
|
227
|
+
summaryLoading &&
|
|
228
|
+
!((_c = messageHistory[0]) === null || _c === void 0 ? void 0 : _c.content) ? (_jsx(LoadingDots, {})) : (_jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: ((_d = messageHistory[0]) === null || _d === void 0 ? void 0 : _d.content) || '' })) })] }), _jsxs("div", { className: "additional-message", children: [_jsx("p", { children: "Voc\u00EA pode fazer perguntas como:" }), _jsx("p", { className: "blue-text", children: "\u00C9 seguro oferecer um cr\u00E9dito de R$ 15.000,00 a uma taxa de 3% em 12x?" })] }), _jsxs("div", { className: "final-message", children: [_jsx(Person, { size: 18 }), _jsx("p", { children: "Digite no campo abaixo o que deseja saber sobre esse dossi\u00EA?" })] })] }) }), _jsx(MessageHistory, { ref: messageHistoryRef, children: messageHistory.slice(1).map(function (msg, index) { return (_jsx(Message, { role: msg.role, children: _jsxs("div", { className: "icon-and-message", children: [msg.role === 'user' ? (_jsx(Person, { size: 18 })) : (_jsx(Credithub, { size: 18, className: "initial-icon" })), _jsx("span", { children: msg.role === 'assistant' &&
|
|
229
|
+
chatLoading &&
|
|
230
|
+
!msg.content ? (_jsx(LoadingDots, {})) : (_jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: msg.content })) })] }) }, index)); }) })] }), _jsx(ContainerInput, { children: _jsxs(ChatInputContainer, { children: [_jsx(ChatInput, { type: "text", placeholder: "Digite o que deseja saber sobre esse dossi\u00EA", value: userInput, onChange: function (e) { return setUserInput(e.target.value); }, onKeyPress: handleKeyPress, disabled: chatLoading }), chatLoading ? (_jsx(SendButton, { onClick: handleStopStream, children: _jsx(StopButton, {}) })) : (_jsx(SendButton, { onClick: handleSendMessage, children: _jsx(BtnSend, {}) }))] }) })] }))] }));
|
|
264
231
|
};
|
|
265
232
|
export default GenerativeAI;
|
|
@@ -45,11 +45,12 @@ 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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
48
49
|
import { useConsultaRfb } from '../../../hooks/useConsultaRfb';
|
|
49
50
|
import { useConsultasComplementares } from '../../../hooks/useConsultasComplementares';
|
|
50
51
|
import { formatMoney } from '../../../utils/number';
|
|
51
52
|
import XPathUtils from '../../../utils/xpath';
|
|
52
|
-
import
|
|
53
|
+
import { useState } from 'react';
|
|
53
54
|
import { LoadingDots } from '../generativeAi/styles';
|
|
54
55
|
import { getAtividadesEconomicasSecundarias, getField, getFieldRfb, getProductsPrices } from './utils';
|
|
55
56
|
var useCardsAndProducts = function (_a) {
|
|
@@ -145,7 +146,7 @@ var useCardsAndProducts = function (_a) {
|
|
|
145
146
|
header: 'UF do RG'
|
|
146
147
|
},
|
|
147
148
|
{
|
|
148
|
-
title: rfbIsLoading ? (
|
|
149
|
+
title: rfbIsLoading ? (_jsx(LoadingDots, {})) : (getFieldRfb('situacao', rfbResponse) ||
|
|
149
150
|
getField('status', finderResponse)),
|
|
150
151
|
header: 'Situação'
|
|
151
152
|
},
|
|
@@ -9,12 +9,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
13
|
import ButtonAtualizarDadosRfb from '../../../assets/btn/buttonAtualizarDadosRfb';
|
|
13
14
|
import AddItemField from '../../../components/common/addItem';
|
|
14
15
|
import Modal from '../../../components/common/modalMaintenance';
|
|
15
16
|
import ScrDataBaseModal from '../../../components/scr/scrDataBaseModal';
|
|
16
17
|
import { formatMoney } from '../../../utils/number';
|
|
17
|
-
import React from 'react';
|
|
18
18
|
import useCardsAndProducts from './cardsAndProducts';
|
|
19
19
|
import { ButtonsSummary, ButtonsWrapper, ContainerSummary, ContentSummary, FieldSummary, Spinner, SummaryButton } from './styles';
|
|
20
20
|
export var Summary = function (_a) {
|
|
@@ -22,18 +22,9 @@ 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 (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
React.createElement(ButtonsWrapper, null,
|
|
30
|
-
React.createElement(ButtonAtualizarDadosRfb, null),
|
|
31
|
-
products.map(function (product, index) { return (React.createElement(ButtonsSummary, { key: index, style: { display: (product === null || product === void 0 ? void 0 : product.hide) ? 'none' : '' } },
|
|
32
|
-
React.createElement(SummaryButton, { onClick: function () { return (product === null || product === void 0 ? void 0 : product.onClick) && (product === null || product === void 0 ? void 0 : product.onClick()); }, disabled: product.isLoading, smallContent: product.price ? formatMoney(product.price) : undefined }, product.isLoading ? React.createElement(Spinner, null) : product.title))); })),
|
|
33
|
-
React.createElement(Modal, { isOpen: isModalOpen, onClose: closeModal, title: "\uD83D\uDEA7 Consulta temporariamente indispon\u00EDvel", message: "A consulta Pefin/Refin Serasa est\u00E1 fora do ar devido a mudan\u00E7as na fonte. Nossa equipe j\u00E1 est\u00E1 trabalhando para resolver, mas ainda n\u00E3o h\u00E1 previs\u00E3o de normaliza\u00E7\u00E3o.", incidentUrl: "https://credithub.statuspage.io/incidents/hnvx1dxby7rk" })),
|
|
34
|
-
isScrModalOpen && (React.createElement(ScrDataBaseModal, { isOpen: isScrModalOpen, onClose: function () { return setScrModalOpen(false); }, onConfirm: function (selected) {
|
|
35
|
-
setScrModalOpen(false);
|
|
36
|
-
setConsultasComplementares === null || setConsultasComplementares === void 0 ? void 0 : setConsultasComplementares(function (prev) { return (__assign(__assign({}, prev), { scr: __assign(__assign({}, prev === null || prev === void 0 ? void 0 : prev.scr), { dataBase: selected, consultaRealizada: true }) })); });
|
|
37
|
-
} }))));
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ContainerSummary, { className: "credithub-container-summary", children: [_jsx(ContentSummary, { className: "credithub-content-summary", children: cards.map(function (card, index) { return (_jsx(FieldSummary, { fullRow: card.header === 'Nome' || card.header === 'Nome Da Mãe', children: _jsx(AddItemField, { name: card.header, value: card.title }) }, index)); }) }), _jsxs(ButtonsWrapper, { children: [_jsx(ButtonAtualizarDadosRfb, {}), products.map(function (product, index) { return (_jsx(ButtonsSummary, { style: { display: (product === null || product === void 0 ? void 0 : product.hide) ? 'none' : '' }, children: _jsx(SummaryButton, { onClick: function () { return (product === null || product === void 0 ? void 0 : product.onClick) && (product === null || product === void 0 ? void 0 : product.onClick()); }, disabled: product.isLoading, smallContent: product.price ? formatMoney(product.price) : undefined, children: product.isLoading ? _jsx(Spinner, {}) : product.title }) }, index)); })] }), _jsx(Modal, { isOpen: isModalOpen, onClose: closeModal, title: "\uD83D\uDEA7 Consulta temporariamente indispon\u00EDvel", message: "A consulta Pefin/Refin Serasa est\u00E1 fora do ar devido a mudan\u00E7as na fonte. Nossa equipe j\u00E1 est\u00E1 trabalhando para resolver, mas ainda n\u00E3o h\u00E1 previs\u00E3o de normaliza\u00E7\u00E3o.", incidentUrl: "https://credithub.statuspage.io/incidents/hnvx1dxby7rk" })] }), isScrModalOpen && (_jsx(ScrDataBaseModal, { isOpen: isScrModalOpen, onClose: function () { return setScrModalOpen(false); }, onConfirm: function (selected) {
|
|
26
|
+
setScrModalOpen(false);
|
|
27
|
+
setConsultasComplementares === null || setConsultasComplementares === void 0 ? void 0 : setConsultasComplementares(function (prev) { return (__assign(__assign({}, prev), { scr: __assign(__assign({}, prev === null || prev === void 0 ? void 0 : prev.scr), { dataBase: selected, consultaRealizada: true }) })); });
|
|
28
|
+
} }))] }));
|
|
38
29
|
};
|
|
39
30
|
export default Summary;
|
|
@@ -2,10 +2,10 @@ 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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
6
|
import IconePessoa from '../../../assets/icones/iconePessoa';
|
|
6
7
|
import XPathUtils from '../../../utils/xpath';
|
|
7
8
|
import { format } from 'date-fns';
|
|
8
|
-
import React from 'react';
|
|
9
9
|
import styled from 'styled-components';
|
|
10
10
|
import AddItemField from '../../common/addItem';
|
|
11
11
|
var StyledContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media screen and (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"], ["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media screen and (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"])), function (_a) {
|
|
@@ -19,15 +19,7 @@ var UserField = styled.span(templateObject_5 || (templateObject_5 = __makeTempla
|
|
|
19
19
|
var DateField = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n flex: 1;\n text-align: right;\n"], ["\n flex: 1;\n text-align: right;\n"])));
|
|
20
20
|
export var TransactionsTable = function (_a) {
|
|
21
21
|
var _b = _a.events, events = _b === void 0 ? [] : _b;
|
|
22
|
-
return (
|
|
23
|
-
React.createElement(Header, null,
|
|
24
|
-
React.createElement(Title, null, "Quem Consultou esse Documento?"),
|
|
25
|
-
React.createElement(IconePessoa, { size: 60 })),
|
|
26
|
-
events.map(function (event, index) { return (React.createElement(TransactionContent, { key: index },
|
|
27
|
-
React.createElement(UserField, null,
|
|
28
|
-
React.createElement(AddItemField, { name: "Usu\u00E1rio", value: XPathUtils.select('string(./usuario)', event), style: { display: 'inline-block', padding: '2px 0px' } })),
|
|
29
|
-
React.createElement(DateField, null,
|
|
30
|
-
React.createElement(AddItemField, { name: "Data", value: format(new Date(XPathUtils.select('string(./ultimaConsulta)', event)), 'dd/MM/yyyy'), style: { display: 'inline-block' } })))); })));
|
|
22
|
+
return (_jsxs(StyledContainer, { children: [_jsxs(Header, { children: [_jsx(Title, { children: "Quem Consultou esse Documento?" }), _jsx(IconePessoa, { size: 60 })] }), events.map(function (event, index) { return (_jsxs(TransactionContent, { children: [_jsx(UserField, { children: _jsx(AddItemField, { name: "Usu\u00E1rio", value: XPathUtils.select('string(./usuario)', event), style: { display: 'inline-block', padding: '2px 0px' } }) }), _jsx(DateField, { children: _jsx(AddItemField, { name: "Data", value: format(new Date(XPathUtils.select('string(./ultimaConsulta)', event)), 'dd/MM/yyyy'), style: { display: 'inline-block' } }) })] }, index)); })] }));
|
|
31
23
|
};
|
|
32
24
|
export default TransactionsTable;
|
|
33
25
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -9,10 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
13
|
import ImoveisIcon from '../../assets/icones/imoveis';
|
|
13
14
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
14
15
|
import { formatMoney } from '../../utils/number';
|
|
15
|
-
import
|
|
16
|
+
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
17
|
import AddItemField from '../common/addItem';
|
|
17
18
|
import { ConsultasComplementaresContext } from '../consultasComplementares';
|
|
18
19
|
import { Result, ResultContent } from '../interface/result';
|
|
@@ -50,7 +51,7 @@ var ConsultaImoveis = function (_a) {
|
|
|
50
51
|
setDataUpdated(true);
|
|
51
52
|
}
|
|
52
53
|
}, [response, dataUpdated, setData, consultaRealizada]);
|
|
53
|
-
return consultaRealizada ? (
|
|
54
|
+
return consultaRealizada ? (_jsx(Section, { ref: consultaImoveisRef, ctx: {
|
|
54
55
|
type: isLoading
|
|
55
56
|
? RequestStatus.Loading
|
|
56
57
|
: error
|
|
@@ -62,28 +63,14 @@ var ConsultaImoveis = function (_a) {
|
|
|
62
63
|
refetch: function () { },
|
|
63
64
|
Section: Section,
|
|
64
65
|
progress: loadingProgress
|
|
65
|
-
}, title: "Consulta de IPTU", subtitle: "Registros de IPTU para o documento informado", icon: ImoveisIcon, description: !error && (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
React.createElement(AddItemField, { name: "Lote", value: (_c = iptu.COMPLEMENTO) === null || _c === void 0 ? void 0 : _c.LOTE }),
|
|
74
|
-
React.createElement(AddItemField, { name: "N\u00FAmero", value: iptu.NUMERO }),
|
|
75
|
-
React.createElement(AddItemField, { name: "Bairro", value: iptu.BAIRRO }),
|
|
76
|
-
React.createElement(AddItemField, { name: "CEP", value: iptu.CEP }),
|
|
77
|
-
React.createElement(AddItemField, { name: "\u00C1rea do Terreno", value: "".concat((_d = iptu.AREA) === null || _d === void 0 ? void 0 : _d.TOTAL, " m\u00B2") }),
|
|
78
|
-
React.createElement(AddItemField, { name: "\u00C1rea Constru\u00EDda", value: "".concat((_e = iptu.AREA) === null || _e === void 0 ? void 0 : _e.CONSTRUIDA, " m\u00B2") }),
|
|
79
|
-
React.createElement(AddItemField, { name: "Ano de Constru\u00E7\u00E3o", value: String(iptu.ANO) }),
|
|
80
|
-
React.createElement(AddItemField, { name: "Valor do IPTU", value: formatMoney((_f = iptu.VALOR) === null || _f === void 0 ? void 0 : _f.IPTU) }),
|
|
81
|
-
React.createElement(AddItemField, { name: "Valor do Im\u00F3vel", value: formatMoney((_g = iptu.VALOR) === null || _g === void 0 ? void 0 : _g.CONSTRUCAO) })));
|
|
82
|
-
}))); }, isError: function (err) { return ({
|
|
83
|
-
children: React.createElement(React.Fragment, null),
|
|
84
|
-
description: (React.createElement(StatusMessage, { type: "error" },
|
|
85
|
-
"Erro ao realizar a consulta: ",
|
|
86
|
-
err.message)),
|
|
66
|
+
}, title: "Consulta de IPTU", subtitle: "Registros de IPTU para o documento informado", icon: ImoveisIcon, description: !error && (_jsx(StatusMessage, { type: iptus.length ? 'success' : 'default', children: iptus.length > 0
|
|
67
|
+
? "Foram encontrados ".concat(iptus.length, " registros de IPTU")
|
|
68
|
+
: 'Nenhum registro de IPTU encontrado para o documento informado.' })), onSuccess: function () { return (_jsx(Result, { children: iptus.map(function (iptu, index) {
|
|
69
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
70
|
+
return (_jsxs(ResultContent, { desktop: "repeat(5, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr", children: [_jsx(AddItemField, { name: "Endere\u00E7o", value: iptu.ENDERECO }), _jsx(AddItemField, { name: "Conjunto", value: (_a = iptu.COMPLEMENTO) === null || _a === void 0 ? void 0 : _a.CONJUNTO }), _jsx(AddItemField, { name: "Quadra", value: (_b = iptu.COMPLEMENTO) === null || _b === void 0 ? void 0 : _b.QUADRA }), _jsx(AddItemField, { name: "Lote", value: (_c = iptu.COMPLEMENTO) === null || _c === void 0 ? void 0 : _c.LOTE }), _jsx(AddItemField, { name: "N\u00FAmero", value: iptu.NUMERO }), _jsx(AddItemField, { name: "Bairro", value: iptu.BAIRRO }), _jsx(AddItemField, { name: "CEP", value: iptu.CEP }), _jsx(AddItemField, { name: "\u00C1rea do Terreno", value: "".concat((_d = iptu.AREA) === null || _d === void 0 ? void 0 : _d.TOTAL, " m\u00B2") }), _jsx(AddItemField, { name: "\u00C1rea Constru\u00EDda", value: "".concat((_e = iptu.AREA) === null || _e === void 0 ? void 0 : _e.CONSTRUIDA, " m\u00B2") }), _jsx(AddItemField, { name: "Ano de Constru\u00E7\u00E3o", value: String(iptu.ANO) }), _jsx(AddItemField, { name: "Valor do IPTU", value: formatMoney((_f = iptu.VALOR) === null || _f === void 0 ? void 0 : _f.IPTU) }), _jsx(AddItemField, { name: "Valor do Im\u00F3vel", value: formatMoney((_g = iptu.VALOR) === null || _g === void 0 ? void 0 : _g.CONSTRUCAO) })] }, index));
|
|
71
|
+
}) })); }, isError: function (err) { return ({
|
|
72
|
+
children: _jsx(_Fragment, {}),
|
|
73
|
+
description: (_jsxs(StatusMessage, { type: "error", children: ["Erro ao realizar a consulta: ", err.message] })),
|
|
87
74
|
variant: 'error'
|
|
88
75
|
}); } })) : null;
|
|
89
76
|
};
|
|
@@ -24,8 +24,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
28
|
import classNames from 'classnames';
|
|
28
|
-
import
|
|
29
|
+
import { useMemo } from 'react';
|
|
29
30
|
import styled, { useTheme } from 'styled-components';
|
|
30
31
|
import LoadingBar from './loadingBar';
|
|
31
32
|
/** -----------------------------
|
|
@@ -75,7 +76,7 @@ var Description = styled.div(templateObject_3 || (templateObject_3 = __makeTempl
|
|
|
75
76
|
});
|
|
76
77
|
var HeaderUI = styled(function (_a) {
|
|
77
78
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
78
|
-
return (
|
|
79
|
+
return (_jsx("header", __assign({}, props, { children: children })));
|
|
79
80
|
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n @media screen {\n background: #ffffff !important;\n box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);\n border-radius: 30px;\n }\n\n @media print {\n page-break-before: avoid;\n page-break-after: avoid;\n page-break-inside: avoid;\n padding: 18px;\n print-color-adjust: exact;\n background: #eae9e9;\n border-radius: 18px;\n }\n\n padding: 30px 20px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n ", " {\n color: ", ";\n }\n"], ["\n @media screen {\n background: #ffffff !important;\n box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);\n border-radius: 30px;\n }\n\n @media print {\n page-break-before: avoid;\n page-break-after: avoid;\n page-break-inside: avoid;\n padding: 18px;\n print-color-adjust: exact;\n background: #eae9e9;\n border-radius: 18px;\n }\n\n padding: 30px 20px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n ", " {\n color: ", ";\n }\n"])), Title, function (props) { return props.color; });
|
|
80
81
|
var HeaderContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n gap: 20px;\n\n @media print {\n width: 100%;\n }\n"], ["\n display: flex;\n gap: 20px;\n\n @media print {\n width: 100%;\n }\n"])));
|
|
81
82
|
var ActionsList = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"], ["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
|
|
@@ -96,18 +97,7 @@ var Header = function (_a) {
|
|
|
96
97
|
var containerClass = classNames(containerClassName);
|
|
97
98
|
var isLoading = variant === 'loading';
|
|
98
99
|
var variantColor = useMemo(function () { return getVariantColor(variant, theme); }, [variant, theme]);
|
|
99
|
-
return (
|
|
100
|
-
React.createElement(HeaderUI, __assign({ className: headerClass, color: variantColor }, rest),
|
|
101
|
-
React.createElement(HeaderContainer, { className: containerClass },
|
|
102
|
-
React.createElement(IconWrapper, null, Icon && React.createElement(Icon, __assign({}, iconProps, { circleFill: variantColor }))),
|
|
103
|
-
React.createElement(TextWrapper, { printBar: printBar },
|
|
104
|
-
title && (React.createElement(Title, { className: classNames(titleClassName) }, title)),
|
|
105
|
-
React.createElement("div", { className: "text-wrapper-subtitle-description" },
|
|
106
|
-
React.createElement(Subtitle, { hidden: isLoading || !subtitle, className: subtitleClassName }, subtitle),
|
|
107
|
-
React.createElement(Description, { hidden: isLoading || !description, className: descriptionClassName }, description)),
|
|
108
|
-
React.createElement(LoadingBarWrapper, { hidden: !isLoading },
|
|
109
|
-
React.createElement(LoadingBar, { percentage: (loadingProps === null || loadingProps === void 0 ? void 0 : loadingProps.percentage) || 0 })))),
|
|
110
|
-
actions && (React.createElement(ActionsList, { className: actionsClass }, actions)))));
|
|
100
|
+
return (_jsx("div", { ref: innerRef, children: _jsxs(HeaderUI, __assign({ className: headerClass, color: variantColor }, rest, { children: [_jsxs(HeaderContainer, { className: containerClass, children: [_jsx(IconWrapper, { children: Icon && _jsx(Icon, __assign({}, iconProps, { circleFill: variantColor })) }), _jsxs(TextWrapper, { printBar: printBar, children: [title && (_jsx(Title, { className: classNames(titleClassName), children: title })), _jsxs("div", { className: "text-wrapper-subtitle-description", children: [_jsx(Subtitle, { hidden: isLoading || !subtitle, className: subtitleClassName, children: subtitle }), _jsx(Description, { hidden: isLoading || !description, className: descriptionClassName, children: description })] }), _jsx(LoadingBarWrapper, { hidden: !isLoading, children: _jsx(LoadingBar, { percentage: (loadingProps === null || loadingProps === void 0 ? void 0 : loadingProps.percentage) || 0 }) })] })] }), actions && (_jsx(ActionsList, { className: actionsClass, children: actions }))] })) }));
|
|
111
101
|
};
|
|
112
102
|
/** -----------------------------
|
|
113
103
|
* Helpers
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function Loading(): React.JSX.Element;
|
|
1
|
+
export default function Loading(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
export default function Loading() {
|
|
3
|
-
return (
|
|
4
|
-
React.createElement("span", { className: "saving" },
|
|
5
|
-
React.createElement("span", null, " ."),
|
|
6
|
-
React.createElement("span", null, "."),
|
|
7
|
-
React.createElement("span", null, "."))));
|
|
3
|
+
return (_jsx(_Fragment, { children: _jsxs("span", { className: "saving", children: [_jsx("span", { children: " ." }), _jsx("span", { children: "." }), _jsx("span", { children: "." })] }) }));
|
|
8
4
|
}
|
|
@@ -24,7 +24,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
import
|
|
27
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
28
|
import styled from 'styled-components';
|
|
29
29
|
var GreyBar = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 18.75rem;\n height: 0.625rem;\n background-color: ", ";\n border-radius: 10px;\n position: relative;\n overflow: hidden;\n visibility: ", ";\n\n @media (max-width: 600px) {\n width: 12.5rem;\n }\n\n @media (max-width: 400px) {\n width: 9.375rem;\n }\n"], ["\n width: 18.75rem;\n height: 0.625rem;\n background-color: ", ";\n border-radius: 10px;\n position: relative;\n overflow: hidden;\n visibility: ", ";\n\n @media (max-width: 600px) {\n width: 12.5rem;\n }\n\n @media (max-width: 400px) {\n width: 9.375rem;\n }\n"])), function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
@@ -42,8 +42,7 @@ var BlueBar = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateO
|
|
|
42
42
|
});
|
|
43
43
|
var LoadingBar = function (_a) {
|
|
44
44
|
var _b = _a.percentage, percentage = _b === void 0 ? 0 : _b, _c = _a.hidden, hidden = _c === void 0 ? false : _c, props = __rest(_a, ["percentage", "hidden"]);
|
|
45
|
-
return (
|
|
46
|
-
React.createElement(BlueBar, { percentage: percentage })));
|
|
45
|
+
return (_jsx(GreyBar, __assign({ hidden: hidden }, props, { children: _jsx(BlueBar, { percentage: percentage }) })));
|
|
47
46
|
};
|
|
48
47
|
export default LoadingBar;
|
|
49
48
|
var templateObject_1, templateObject_2;
|
|
@@ -20,13 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { Result } from '../interface/result';
|
|
25
25
|
import AddItemField from '../common/addItem';
|
|
26
26
|
var ResultWithoutInformation = function (_a) {
|
|
27
27
|
var _b = _a.name, name = _b === void 0 ? 'Informação' : _b, _c = _a.value, value = _c === void 0 ? 'Não foram encontradas informações para o documento pesquisado.' : _c, props = __rest(_a, ["name", "value"]);
|
|
28
|
-
return (
|
|
29
|
-
React.createElement(Result, null,
|
|
30
|
-
React.createElement(AddItemField, __assign({ name: name, value: value }, props)))));
|
|
28
|
+
return (_jsx(Result, { children: _jsx(Result, { children: _jsx(AddItemField, __assign({ name: name, value: value }, props)) }) }));
|
|
31
29
|
};
|
|
32
30
|
export default ResultWithoutInformation;
|
|
@@ -2,6 +2,7 @@ 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 { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
6
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
7
|
import BtnWrapper from '../../assets/btn/btnWrapper';
|
|
7
8
|
import ChevronDown from '../../assets/btn/chevronDown';
|
|
@@ -10,7 +11,6 @@ import CloseIcon from '../../assets/btn/closeIcon';
|
|
|
10
11
|
import PrintIcon from '../../assets/btn/printIcon';
|
|
11
12
|
import useToggle from '../../hooks/useToggle';
|
|
12
13
|
import classNames from 'classnames';
|
|
13
|
-
import React from 'react';
|
|
14
14
|
import styled from 'styled-components';
|
|
15
15
|
import Header from './header';
|
|
16
16
|
var SectionContaner = styled.section(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @media screen {\n background-color: rgb(239, 239, 239);\n }\n page-break-before: avoid;\n page-break-after: avoid;\n page-break-inside: avoid;\n"], ["\n @media screen {\n background-color: rgb(239, 239, 239);\n }\n page-break-before: avoid;\n page-break-after: avoid;\n page-break-inside: avoid;\n"])));
|
|
@@ -20,15 +20,7 @@ var Section = function (_a) {
|
|
|
20
20
|
var _c = useToggle(!minimized), isOpen = _c[0], toggleOpen = _c[1];
|
|
21
21
|
var sectionClass = classNames(className);
|
|
22
22
|
var sectionContentClass = classNames(contentClassName);
|
|
23
|
-
return (
|
|
24
|
-
React.createElement(Header, { title: title, subtitle: subtitle, description: description, loadingProps: loadingProps, icon: icon, variant: variant, actions: React.createElement(React.Fragment, null,
|
|
25
|
-
React.createElement(BtnWrapper, null,
|
|
26
|
-
React.createElement(PrintIcon, { onClick: onClickPrint })),
|
|
27
|
-
children && (React.createElement(BtnWrapper, { hidden: variant === 'loading', onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))),
|
|
28
|
-
onClose && (React.createElement(BtnWrapper, { onClick: onClose },
|
|
29
|
-
React.createElement(CloseIcon, null))),
|
|
30
|
-
actions) }),
|
|
31
|
-
React.createElement(ResultContainer, { className: sectionContentClass, hide: !isOpen }, children)));
|
|
23
|
+
return (_jsxs(SectionContaner, { className: sectionClass, children: [_jsx(Header, { title: title, subtitle: subtitle, description: description, loadingProps: loadingProps, icon: icon, variant: variant, actions: _jsxs(_Fragment, { children: [_jsx(BtnWrapper, { children: _jsx(PrintIcon, { onClick: onClickPrint }) }), children && (_jsx(BtnWrapper, { hidden: variant === 'loading', onClick: toggleOpen, children: isOpen ? _jsx(ChevronUp, {}) : _jsx(ChevronDown, {}) })), onClose && (_jsx(BtnWrapper, { onClick: onClose, children: _jsx(CloseIcon, {}) })), actions] }) }), _jsx(ResultContainer, { className: sectionContentClass, hide: !isOpen, children: children })] }));
|
|
32
24
|
};
|
|
33
25
|
export default Section;
|
|
34
26
|
var templateObject_1, templateObject_2;
|
|
@@ -45,13 +45,14 @@ 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
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
48
49
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
49
50
|
import ProtestosIcon from '../../assets/icones/protestos';
|
|
50
51
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
51
52
|
import theme from '../../styles/theme';
|
|
52
53
|
import { normalizeName, similarNames } from '../../utils/similarNames';
|
|
53
54
|
import { WarningCircle } from 'phosphor-react';
|
|
54
|
-
import
|
|
55
|
+
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
55
56
|
import Button from '../common/button';
|
|
56
57
|
import Modal from '../common/modal';
|
|
57
58
|
import StatusMessage from '../interface/statusMessage';
|
|
@@ -208,10 +209,11 @@ var Liminar = function () {
|
|
|
208
209
|
return [4 /*yield*/, fetchLiminarProtestosDoPassado()];
|
|
209
210
|
case 1:
|
|
210
211
|
_a = _e.sent(), possuiIndiciosDeLiminarProtestosDoPassado = _a.possuiIndiciosDeLiminarProtestosDoPassado, protestosIds = _a.protestosDoPassadoIds;
|
|
211
|
-
console.log(
|
|
212
|
+
console.log('possuiIndiciosDeLiminarProtestosDoPassado', possuiIndiciosDeLiminarProtestosDoPassado);
|
|
212
213
|
if (possuiIndiciosDeLiminarProtestosDoPassado) {
|
|
213
214
|
origensDetectadas.push('Liminar no Cenprot');
|
|
214
|
-
indiciosDeLiminarProtestosDoPassado =
|
|
215
|
+
indiciosDeLiminarProtestosDoPassado =
|
|
216
|
+
possuiIndiciosDeLiminarProtestosDoPassado;
|
|
215
217
|
protestosDoPassadoIds = protestosIds.join(',');
|
|
216
218
|
}
|
|
217
219
|
setIsLoadingLiminarProtestosDoPassado(false);
|
|
@@ -261,7 +263,7 @@ var Liminar = function () {
|
|
|
261
263
|
el.classList.add('highlighted-process');
|
|
262
264
|
setTimeout(function () { return el.classList.remove('highlighted-process'); }, 3000);
|
|
263
265
|
};
|
|
264
|
-
var renderTooltipIcon = function () { return (
|
|
266
|
+
var renderTooltipIcon = function () { return (_jsx(WarningCircle, { weight: "fill", size: 24, color: origensDetectadas.length
|
|
265
267
|
? theme.colors.erroClaro
|
|
266
268
|
: theme.colors.cinzaClaro, style: { marginLeft: 4 } })); };
|
|
267
269
|
var tooltipMessage = foundBusinessEntity
|
|
@@ -289,7 +291,7 @@ var Liminar = function () {
|
|
|
289
291
|
setEmailModalMessage("Falha ao enviar e-mail: ".concat(emailError.message));
|
|
290
292
|
}
|
|
291
293
|
else {
|
|
292
|
-
setEmailModalMessage('
|
|
294
|
+
setEmailModalMessage('Você deve ter recebido um e-mail nosso com os detalhes que encontramos sobre esse indício.');
|
|
293
295
|
}
|
|
294
296
|
setIsEmailModalOpen(true);
|
|
295
297
|
return [2 /*return*/];
|
|
@@ -298,48 +300,35 @@ var Liminar = function () {
|
|
|
298
300
|
}); };
|
|
299
301
|
if (!shouldRender)
|
|
300
302
|
return null;
|
|
301
|
-
return (
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
: undefined }),
|
|
334
|
-
React.createElement(Modal, { isOpen: isEmailModalOpen, onClose: function () {
|
|
335
|
-
setIsEmailModalOpen(false);
|
|
336
|
-
setEmailModalMessage('');
|
|
337
|
-
}, title: "Resultado do Envio de E-mail" },
|
|
338
|
-
React.createElement("p", null, emailModalMessage),
|
|
339
|
-
React.createElement("div", { style: { textAlign: 'center', marginTop: '16px' } },
|
|
340
|
-
React.createElement(Button, { onClick: function () {
|
|
341
|
-
setIsEmailModalOpen(false);
|
|
342
|
-
setEmailModalMessage('');
|
|
343
|
-
} }, "Fechar")))));
|
|
303
|
+
return (_jsxs(_Fragment, { children: [_jsx(Section, { title: _jsxs(TitleWithTooltip, { children: ["Liminares para Remo\u00E7\u00E3o de Protesto", !!processosComAssuntoValido.length && ready && (_jsxs(TooltipContainer, { onMouseEnter: function () {
|
|
304
|
+
clearTimeout(hideTt.current);
|
|
305
|
+
setTooltipVisible(true);
|
|
306
|
+
}, onMouseLeave: function () {
|
|
307
|
+
hideTt.current = setTimeout(function () { return setTooltipVisible(false); }, 300);
|
|
308
|
+
}, children: [renderTooltipIcon(), _jsx(TooltipText, { visible: isTooltipVisible, children: _jsxs(_Fragment, { children: [tooltipMessage, _jsx("ul", { style: { marginTop: 6, paddingLeft: 18 }, children: processosComAssuntoValido.map(function (p) { return (_jsx("li", { onClick: function () { return scrollToProcesso(p.id); }, style: {
|
|
309
|
+
fontSize: 13,
|
|
310
|
+
cursor: 'pointer',
|
|
311
|
+
textDecoration: 'underline',
|
|
312
|
+
color: '#007aff'
|
|
313
|
+
}, children: p.id }, p.id)); }) })] }) })] }))] }), subtitle: "Ind\u00EDcios de liminares para oculta\u00E7\u00E3o de registros.", icon: ProtestosIcon, ctx: ready ? ctx : ctxLoading, onSuccess: ready
|
|
314
|
+
? function (_data, _context) {
|
|
315
|
+
var _a, _b, _c, _d;
|
|
316
|
+
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';
|
|
317
|
+
var variant = msg === 'Encontrado' ? 'error' : 'default';
|
|
318
|
+
return {
|
|
319
|
+
children: _jsx(_Fragment, {}),
|
|
320
|
+
variant: variant,
|
|
321
|
+
description: (_jsxs(_Fragment, { children: [_jsx(StatusMessage, { type: variant, children: msg }), origensDetectadas.map(function (o) { return (_jsx(StatusMessage, { type: variant, children: o }, o)); })] })),
|
|
322
|
+
actions: (_jsx("div", { style: { textAlign: 'center' }, onClick: function (e) { return e.stopPropagation(); }, children: ((_c = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _c === void 0 ? void 0 : _c.indiciosDeLiminarProtestosDoPassado) &&
|
|
323
|
+
((_d = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _d === void 0 ? void 0 : _d.protestosDoPassadoIds) && (_jsx(Button, { onClick: handleSendEmailIndicios, children: "Enviar Ind\u00EDcios por Email" })) }))
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
: undefined }), _jsxs(Modal, { isOpen: isEmailModalOpen, onClose: function () {
|
|
327
|
+
setIsEmailModalOpen(false);
|
|
328
|
+
setEmailModalMessage('');
|
|
329
|
+
}, title: "Detalhes enviados por e-mail", children: [_jsx("p", { children: emailModalMessage }), _jsx("div", { style: { textAlign: 'center', marginTop: '16px' }, children: _jsx(Button, { onClick: function () {
|
|
330
|
+
setIsEmailModalOpen(false);
|
|
331
|
+
setEmailModalMessage('');
|
|
332
|
+
}, children: "Fechar" }) })] })] }));
|
|
344
333
|
};
|
|
345
334
|
export default Liminar;
|