@credithub/harlan-components 1.20.8 → 1.20.10
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/lib/cjs/index.js +34591 -41495
- package/lib/esm/index.js +58948 -26
- package/package.json +6 -4
- package/lib/esm/assets/btn/btnWrapper.d.ts +0 -2
- package/lib/esm/assets/btn/btnWrapper.js +0 -9
- package/lib/esm/assets/btn/chevronDown.d.ts +0 -3
- package/lib/esm/assets/btn/chevronDown.js +0 -29
- package/lib/esm/assets/btn/chevronLeft.d.ts +0 -3
- package/lib/esm/assets/btn/chevronLeft.js +0 -30
- package/lib/esm/assets/btn/chevronRight.d.ts +0 -3
- package/lib/esm/assets/btn/chevronRight.js +0 -30
- package/lib/esm/assets/btn/chevronUp.d.ts +0 -3
- package/lib/esm/assets/btn/chevronUp.js +0 -30
- package/lib/esm/assets/btn/closeIcon.d.ts +0 -3
- package/lib/esm/assets/btn/closeIcon.js +0 -29
- package/lib/esm/assets/btn/thumbDown.d.ts +0 -7
- package/lib/esm/assets/btn/thumbDown.js +0 -11
- package/lib/esm/assets/btn/thumbUp.d.ts +0 -7
- package/lib/esm/assets/btn/thumbUp.js +0 -11
- package/lib/esm/assets/icones/chequesSemFundo.d.ts +0 -4
- package/lib/esm/assets/icones/chequesSemFundo.js +0 -12
- package/lib/esm/assets/icones/consultaSimples.d.ts +0 -4
- package/lib/esm/assets/icones/consultaSimples.js +0 -12
- package/lib/esm/assets/icones/contasBancarias.d.ts +0 -4
- package/lib/esm/assets/icones/contasBancarias.js +0 -12
- package/lib/esm/assets/icones/contato.d.ts +0 -4
- package/lib/esm/assets/icones/contato.js +0 -12
- package/lib/esm/assets/icones/dividasVencidasSerasa.d.ts +0 -4
- package/lib/esm/assets/icones/dividasVencidasSerasa.js +0 -9
- package/lib/esm/assets/icones/dominios.d.ts +0 -4
- package/lib/esm/assets/icones/dominios.js +0 -9
- package/lib/esm/assets/icones/endereco.d.ts +0 -4
- package/lib/esm/assets/icones/endereco.js +0 -12
- package/lib/esm/assets/icones/iconeEmpresa.d.ts +0 -8
- package/lib/esm/assets/icones/iconeEmpresa.js +0 -12
- package/lib/esm/assets/icones/iconePessoa.d.ts +0 -9
- package/lib/esm/assets/icones/iconePessoa.js +0 -12
- package/lib/esm/assets/icones/imoveis.d.ts +0 -4
- package/lib/esm/assets/icones/imoveis.js +0 -9
- package/lib/esm/assets/icones/pefinRefinBoaVista.d.ts +0 -4
- package/lib/esm/assets/icones/pefinRefinBoaVista.js +0 -9
- package/lib/esm/assets/icones/pefinRefinSerasa.d.ts +0 -4
- package/lib/esm/assets/icones/pefinRefinSerasa.js +0 -11
- package/lib/esm/assets/icones/processosJuridicos.d.ts +0 -4
- package/lib/esm/assets/icones/processosJuridicos.js +0 -12
- package/lib/esm/assets/icones/protestos.d.ts +0 -4
- package/lib/esm/assets/icones/protestos.js +0 -12
- package/lib/esm/assets/icones/protestosCredito.d.ts +0 -4
- package/lib/esm/assets/icones/protestosCredito.js +0 -12
- package/lib/esm/assets/icones/protestosGerais.d.ts +0 -4
- package/lib/esm/assets/icones/protestosGerais.js +0 -12
- package/lib/esm/assets/icones/protestosImpostos.d.ts +0 -4
- package/lib/esm/assets/icones/protestosImpostos.js +0 -12
- package/lib/esm/assets/icones/quadroSocietario.d.ts +0 -4
- package/lib/esm/assets/icones/quadroSocietario.js +0 -12
- package/lib/esm/assets/icones/resumoNegativacoes.d.ts +0 -4
- package/lib/esm/assets/icones/resumoNegativacoes.js +0 -11
- package/lib/esm/assets/icones/scoreBoaVista.d.ts +0 -4
- package/lib/esm/assets/icones/scoreBoaVista.js +0 -9
- package/lib/esm/assets/icones/scr.d.ts +0 -4
- package/lib/esm/assets/icones/scr.js +0 -9
- package/lib/esm/assets/icones/ultimaMovimentacao.d.ts +0 -4
- package/lib/esm/assets/icones/ultimaMovimentacao.js +0 -12
- package/lib/esm/assets/icones/veiculos.d.ts +0 -4
- package/lib/esm/assets/icones/veiculos.js +0 -9
- package/lib/esm/components/adresses/addresses.d.ts +0 -19
- package/lib/esm/components/adresses/addresses.js +0 -50
- package/lib/esm/components/adresses/getGeocode.d.ts +0 -6
- package/lib/esm/components/adresses/getGeocode.js +0 -69
- package/lib/esm/components/adresses/map.d.ts +0 -11
- package/lib/esm/components/adresses/map.js +0 -25
- package/lib/esm/components/bank-accounts/bank-accounts.d.ts +0 -3
- package/lib/esm/components/bank-accounts/bank-accounts.js +0 -32
- package/lib/esm/components/ccf/ccf.d.ts +0 -3
- package/lib/esm/components/ccf/ccf.js +0 -37
- package/lib/esm/components/ccf/ccfList.d.ts +0 -12
- package/lib/esm/components/ccf/ccfList.js +0 -24
- package/lib/esm/components/chart/chartContent.d.ts +0 -6
- package/lib/esm/components/chart/chartContent.js +0 -50
- package/lib/esm/components/chart/chartSystem.d.ts +0 -6
- package/lib/esm/components/chart/chartSystem.js +0 -61
- package/lib/esm/components/chart/components/MixedChart.d.ts +0 -7
- package/lib/esm/components/chart/components/MixedChart.js +0 -30
- package/lib/esm/components/chart/components/PieChart.d.ts +0 -7
- package/lib/esm/components/chart/components/PieChart.js +0 -9
- package/lib/esm/components/chart/components/categoryProtestos.d.ts +0 -7
- package/lib/esm/components/chart/components/categoryProtestos.js +0 -17
- package/lib/esm/components/chart/hooks/useCategoryProtestos.d.ts +0 -6
- package/lib/esm/components/chart/hooks/useCategoryProtestos.js +0 -71
- package/lib/esm/components/chart/hooks/useChartData.d.ts +0 -8
- package/lib/esm/components/chart/hooks/useChartData.js +0 -64
- package/lib/esm/components/chart/hooks/useMixedChartData.d.ts +0 -10
- package/lib/esm/components/chart/hooks/useMixedChartData.js +0 -43
- package/lib/esm/components/chart/hooks/usePieChartData.d.ts +0 -6
- package/lib/esm/components/chart/hooks/usePieChartData.js +0 -89
- package/lib/esm/components/chart/quantityResult.d.ts +0 -19
- package/lib/esm/components/chart/quantityResult.js +0 -41
- package/lib/esm/components/chart/types/iChart.d.ts +0 -59
- package/lib/esm/components/chart/types/iChart.js +0 -1
- package/lib/esm/components/chart/utils/chartCustomization.d.ts +0 -7
- package/lib/esm/components/chart/utils/chartCustomization.js +0 -154
- package/lib/esm/components/chart/utils/chartUtils.d.ts +0 -11
- package/lib/esm/components/chart/utils/chartUtils.js +0 -38
- package/lib/esm/components/chart/utils/dataManipulation.d.ts +0 -10
- package/lib/esm/components/chart/utils/dataManipulation.js +0 -97
- package/lib/esm/components/chart/utils/dataProcessing.d.ts +0 -3
- package/lib/esm/components/chart/utils/dataProcessing.js +0 -113
- package/lib/esm/components/common/addItem.d.ts +0 -11
- package/lib/esm/components/common/addItem.js +0 -44
- package/lib/esm/components/common/button.d.ts +0 -5
- package/lib/esm/components/common/button.js +0 -41
- package/lib/esm/components/common/carousel.d.ts +0 -4
- package/lib/esm/components/common/carousel.js +0 -19
- package/lib/esm/components/common/content.d.ts +0 -4
- package/lib/esm/components/common/content.js +0 -8
- package/lib/esm/components/consultaRfb.d.ts +0 -16
- package/lib/esm/components/consultaRfb.js +0 -21
- package/lib/esm/components/consultaSimplesSection/consultaSimplesSection.d.ts +0 -6
- package/lib/esm/components/consultaSimplesSection/consultaSimplesSection.js +0 -93
- package/lib/esm/components/consultasComplementares.d.ts +0 -29
- package/lib/esm/components/consultasComplementares.js +0 -32
- package/lib/esm/components/contacts/contactLikeDislikeSection.d.ts +0 -8
- package/lib/esm/components/contacts/contactLikeDislikeSection.js +0 -68
- package/lib/esm/components/contacts/contacts.d.ts +0 -18
- package/lib/esm/components/contacts/contacts.js +0 -60
- package/lib/esm/components/contacts/contactsLikeDislike.d.ts +0 -9
- package/lib/esm/components/contacts/contactsLikeDislike.js +0 -7
- package/lib/esm/components/contacts/thumbsButton.d.ts +0 -9
- package/lib/esm/components/contacts/thumbsButton.js +0 -41
- package/lib/esm/components/dividasPublicas/dividasPublicas.d.ts +0 -3
- package/lib/esm/components/dividasPublicas/dividasPublicas.js +0 -67
- package/lib/esm/components/dominios/dominios.d.ts +0 -3
- package/lib/esm/components/dominios/dominios.js +0 -29
- package/lib/esm/components/dossie/carrousel/carrousel.d.ts +0 -8
- package/lib/esm/components/dossie/carrousel/carrousel.js +0 -15
- package/lib/esm/components/dossie/companyLogo/companyLogo.d.ts +0 -7
- package/lib/esm/components/dossie/companyLogo/companyLogo.js +0 -25
- package/lib/esm/components/dossie/dossie.d.ts +0 -9
- package/lib/esm/components/dossie/dossie.js +0 -44
- package/lib/esm/components/dossie/summary/cardsAndProducts.d.ts +0 -21
- package/lib/esm/components/dossie/summary/cardsAndProducts.js +0 -209
- package/lib/esm/components/dossie/summary/summary.d.ts +0 -20
- package/lib/esm/components/dossie/summary/summary.js +0 -38
- package/lib/esm/components/dossie/summary/utils.d.ts +0 -10
- package/lib/esm/components/dossie/summary/utils.js +0 -29
- package/lib/esm/components/dossie/transactionTable/transactionTable.d.ts +0 -6
- package/lib/esm/components/dossie/transactionTable/transactionTable.js +0 -33
- package/lib/esm/components/imoveis/imoveisService.d.ts +0 -6
- package/lib/esm/components/imoveis/imoveisService.js +0 -51
- package/lib/esm/components/imoveis/types.d.ts +0 -24
- package/lib/esm/components/imoveis/types.js +0 -1
- package/lib/esm/components/interface/globalStyle.d.ts +0 -2
- package/lib/esm/components/interface/globalStyle.js +0 -9
- package/lib/esm/components/interface/header.d.ts +0 -23
- package/lib/esm/components/interface/header.js +0 -72
- package/lib/esm/components/interface/loading.d.ts +0 -2
- package/lib/esm/components/interface/loading.js +0 -8
- package/lib/esm/components/interface/loadingBar.d.ts +0 -5
- package/lib/esm/components/interface/loadingBar.js +0 -41
- package/lib/esm/components/interface/responsiveGrid.d.ts +0 -9
- package/lib/esm/components/interface/responsiveGrid.js +0 -8
- package/lib/esm/components/interface/result.d.ts +0 -10
- package/lib/esm/components/interface/result.js +0 -18
- package/lib/esm/components/interface/resultWithoutInformation.d.ts +0 -4
- package/lib/esm/components/interface/resultWithoutInformation.js +0 -32
- package/lib/esm/components/interface/section.d.ts +0 -10
- package/lib/esm/components/interface/section.js +0 -30
- package/lib/esm/components/interface/statusMessage.d.ts +0 -7
- package/lib/esm/components/interface/statusMessage.js +0 -25
- package/lib/esm/components/interface/theme.d.ts +0 -73
- package/lib/esm/components/interface/theme.js +0 -73
- package/lib/esm/components/liminar/liminar.d.ts +0 -3
- package/lib/esm/components/liminar/liminar.js +0 -24
- package/lib/esm/components/liminar/types.d.ts +0 -3
- package/lib/esm/components/liminar/types.js +0 -1
- package/lib/esm/components/partners/partner-dividas-publicas.d.ts +0 -5
- package/lib/esm/components/partners/partner-dividas-publicas.js +0 -10
- package/lib/esm/components/partners/partner-protestos.d.ts +0 -5
- package/lib/esm/components/partners/partner-protestos.js +0 -10
- package/lib/esm/components/partners/partner-rfb-status.d.ts +0 -5
- package/lib/esm/components/partners/partner-rfb-status.js +0 -10
- package/lib/esm/components/partners/partnerField.d.ts +0 -9
- package/lib/esm/components/partners/partnerField.js +0 -9
- package/lib/esm/components/partners/partnerList.d.ts +0 -17
- package/lib/esm/components/partners/partnerList.js +0 -28
- package/lib/esm/components/partners/partners.d.ts +0 -5
- package/lib/esm/components/partners/partners.js +0 -52
- package/lib/esm/components/pep/pep.d.ts +0 -3
- package/lib/esm/components/pep/pep.js +0 -41
- package/lib/esm/components/processos-juridicos/envolvidosList.d.ts +0 -10
- package/lib/esm/components/processos-juridicos/envolvidosList.js +0 -24
- package/lib/esm/components/processos-juridicos/processosJuridicos.d.ts +0 -5
- package/lib/esm/components/processos-juridicos/processosJuridicos.js +0 -26
- package/lib/esm/components/processos-juridicos/processosJuridicosList.d.ts +0 -7
- package/lib/esm/components/processos-juridicos/processosJuridicosList.js +0 -64
- package/lib/esm/components/processos-juridicos/types.d.ts +0 -27
- package/lib/esm/components/processos-juridicos/types.js +0 -1
- package/lib/esm/components/protestos/getTotalProtestos.d.ts +0 -1
- package/lib/esm/components/protestos/getTotalProtestos.js +0 -4
- package/lib/esm/components/protestos/protestos.d.ts +0 -3
- package/lib/esm/components/protestos/protestos.js +0 -74
- package/lib/esm/components/protestos/protestosCategory.d.ts +0 -7
- package/lib/esm/components/protestos/protestosCategory.js +0 -46
- package/lib/esm/components/protestos/protestosList.d.ts +0 -36
- package/lib/esm/components/protestos/protestosList.js +0 -120
- package/lib/esm/components/reclameAqui/reclameAquiCarousel.d.ts +0 -5
- package/lib/esm/components/reclameAqui/reclameAquiCarousel.js +0 -100
- package/lib/esm/components/reclameAqui/types.d.ts +0 -31
- package/lib/esm/components/reclameAqui/types.js +0 -1
- package/lib/esm/components/refinBoaVista/refinBoaVista.d.ts +0 -22
- package/lib/esm/components/refinBoaVista/refinBoaVista.js +0 -65
- package/lib/esm/components/refinBoaVista/types.d.ts +0 -48
- package/lib/esm/components/refinBoaVista/types.js +0 -4
- package/lib/esm/components/refinSerasa/refinSerasa.d.ts +0 -22
- package/lib/esm/components/refinSerasa/refinSerasa.js +0 -119
- package/lib/esm/components/refinSerasa/types.d.ts +0 -48
- package/lib/esm/components/refinSerasa/types.js +0 -1
- package/lib/esm/components/resultadoDaPesquisa/resultado-da-pesquisa.d.ts +0 -5
- package/lib/esm/components/resultadoDaPesquisa/resultado-da-pesquisa.js +0 -26
- package/lib/esm/components/score/scoreService.d.ts +0 -6
- package/lib/esm/components/score/scoreService.js +0 -43
- package/lib/esm/components/score/types.d.ts +0 -12
- package/lib/esm/components/score/types.js +0 -1
- package/lib/esm/components/scr/getResumoDeCreditos.d.ts +0 -6
- package/lib/esm/components/scr/getResumoDeCreditos.js +0 -79
- package/lib/esm/components/scr/getResumoDeModalidades.d.ts +0 -8
- package/lib/esm/components/scr/getResumoDeModalidades.js +0 -109
- package/lib/esm/components/scr/scr.d.ts +0 -5
- package/lib/esm/components/scr/scr.js +0 -134
- package/lib/esm/components/scr/types.d.ts +0 -87
- package/lib/esm/components/scr/types.js +0 -1
- package/lib/esm/components/veiculos/types.d.ts +0 -0
- package/lib/esm/components/veiculos/types.js +0 -0
- package/lib/esm/components/veiculos/veiculos.d.ts +0 -22
- package/lib/esm/components/veiculos/veiculos.js +0 -70
- package/lib/esm/components/webservice.d.ts +0 -140
- package/lib/esm/components/webservice.js +0 -233
- package/lib/esm/constants/regex.d.ts +0 -2
- package/lib/esm/constants/regex.js +0 -2
- package/lib/esm/consultaSimples.d.ts +0 -13
- package/lib/esm/consultaSimples.js +0 -57
- package/lib/esm/hooks/useConsultaRfb.d.ts +0 -6
- package/lib/esm/hooks/useConsultaRfb.js +0 -9
- package/lib/esm/hooks/useConsultasComplementares.d.ts +0 -1
- package/lib/esm/hooks/useConsultasComplementares.js +0 -9
- package/lib/esm/hooks/useToggle.d.ts +0 -10
- package/lib/esm/hooks/useToggle.js +0 -24
- package/lib/esm/hooks/useWindowSize.d.ts +0 -4
- package/lib/esm/hooks/useWindowSize.js +0 -19
- package/lib/esm/index.d.ts +0 -23
- package/lib/esm/utils/calculation.d.ts +0 -9
- package/lib/esm/utils/calculation.js +0 -17
- package/lib/esm/utils/date.d.ts +0 -1
- package/lib/esm/utils/date.js +0 -6
- package/lib/esm/utils/fillMissingData.d.ts +0 -6
- package/lib/esm/utils/fillMissingData.js +0 -12
- package/lib/esm/utils/formatter.d.ts +0 -2
- package/lib/esm/utils/formatter.js +0 -5
- package/lib/esm/utils/getUniqueDates.d.ts +0 -5
- package/lib/esm/utils/getUniqueDates.js +0 -9
- package/lib/esm/utils/number.d.ts +0 -4
- package/lib/esm/utils/number.js +0 -20
- package/lib/esm/utils/string.d.ts +0 -11
- package/lib/esm/utils/string.js +0 -64
- package/lib/esm/utils/xpath.d.ts +0 -6
- package/lib/esm/utils/xpath.js +0 -21
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import React, { useContext, useEffect } from 'react';
|
|
6
|
-
import { useUltimaOcorrenciaCCF, useCalculation, useDividasPublicas } from './utils/chartUtils';
|
|
7
|
-
import Header from '../interface/header';
|
|
8
|
-
import StatusMessage from '../interface/statusMessage';
|
|
9
|
-
import useToggle from '../../hooks/useToggle';
|
|
10
|
-
import styled from 'styled-components';
|
|
11
|
-
import QuantidadeResultados from './quantityResult';
|
|
12
|
-
import ChartContent from './chartContent';
|
|
13
|
-
import BtnWrapper from '../../assets/btn/btnWrapper';
|
|
14
|
-
import ChevronUp from '../../assets/btn/chevronUp';
|
|
15
|
-
import ChevronDown from '../../assets/btn/chevronDown';
|
|
16
|
-
import useChartData from './hooks/useChartData';
|
|
17
|
-
import ResumoDeNegativacoesIcon from '../../assets/icones/resumoNegativacoes';
|
|
18
|
-
import { ConsultasComplementaresContext } from '../consultasComplementares';
|
|
19
|
-
import { converterParaFormatoValido } from '../../utils/string';
|
|
20
|
-
var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n padding: 0px 30px;\n\n @media print {\n display: block;\n }\n"], ["\n display: ", ";\n padding: 0px 30px;\n\n @media print {\n display: block;\n }\n"])), function (props) { return (props.isOpen ? 'block' : 'none'); });
|
|
21
|
-
var ChartSystem = function (_a) {
|
|
22
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
23
|
-
var documento = _a.documento;
|
|
24
|
-
var _l = useChartData(documento), data = _l.data, isLoading = _l.isLoading, error = _l.error, refetch = _l.refetch;
|
|
25
|
-
var ctxConsultasComplementares = useContext(ConsultasComplementaresContext);
|
|
26
|
-
var errorMessage = typeof error === 'string' ? error : error === null || error === void 0 ? void 0 : error.toString();
|
|
27
|
-
var _m = useToggle(true), isOpen = _m[0], toggleOpen = _m[1];
|
|
28
|
-
var ultimaOcorrenciaCCF = useUltimaOcorrenciaCCF();
|
|
29
|
-
var quantidadeProtestos = ((_c = (_b = data === null || data === void 0 ? void 0 : data.protestos) === null || _b === void 0 ? void 0 : _b[(data === null || data === void 0 ? void 0 : data.protestos.length) - 1]) === null || _c === void 0 ? void 0 : _c.quantidade) || 0;
|
|
30
|
-
var valorTotalProtestos = ((_e = (_d = data === null || data === void 0 ? void 0 : data.protestos) === null || _d === void 0 ? void 0 : _d[(data === null || data === void 0 ? void 0 : data.protestos.length) - 1]) === null || _e === void 0 ? void 0 : _e.valorTotal) || 0;
|
|
31
|
-
var _o = useDividasPublicas(), quantidadeDividas = _o.quantidade, valorTotalDividas = _o.valorTotal;
|
|
32
|
-
var _p = useCalculation((data === null || data === void 0 ? void 0 : data.serasa) || []), quantidadeSerasa = _p.quantidade, valorTotalSerasa = _p.valorTotal;
|
|
33
|
-
var _q = useCalculation((data === null || data === void 0 ? void 0 : data.boaVista) || []), quantidadeBoaVista = _q.quantidade, valorTotalBoaVista = _q.valorTotal;
|
|
34
|
-
var quantidadeCCFs = useCalculation((data === null || data === void 0 ? void 0 : data.ccfs) || []).quantidade;
|
|
35
|
-
var ultimaOcorrenciaProtestos = '';
|
|
36
|
-
if ((data === null || data === void 0 ? void 0 : data.protestosCategory) && data.protestosCategory.length > 0) {
|
|
37
|
-
var datasOcorrencias = data.protestosCategory
|
|
38
|
-
.map(function (categoria) { return categoria.ultimaOcorrencia; })
|
|
39
|
-
.filter(Boolean)
|
|
40
|
-
.map(function (data) {
|
|
41
|
-
return new Date(converterParaFormatoValido(data)).getTime();
|
|
42
|
-
})
|
|
43
|
-
.filter(function (timestamp) { return !isNaN(timestamp); });
|
|
44
|
-
if (datasOcorrencias.length > 0) {
|
|
45
|
-
ultimaOcorrenciaProtestos = new Date(Math.max.apply(Math, datasOcorrencias)).toLocaleDateString();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
var consultaPefinBoaVista = (_g = (_f = ctxConsultasComplementares === null || ctxConsultasComplementares === void 0 ? void 0 : ctxConsultasComplementares.consultasComplementares) === null || _f === void 0 ? void 0 : _f.refinBoaVista) === null || _g === void 0 ? void 0 : _g.data;
|
|
49
|
-
var consultaPefinSerasa = (_j = (_h = ctxConsultasComplementares === null || ctxConsultasComplementares === void 0 ? void 0 : ctxConsultasComplementares.consultasComplementares) === null || _h === void 0 ? void 0 : _h.refinSerasa) === null || _j === void 0 ? void 0 : _j.data;
|
|
50
|
-
useEffect(function () {
|
|
51
|
-
if (consultaPefinBoaVista || consultaPefinSerasa)
|
|
52
|
-
refetch();
|
|
53
|
-
}, [consultaPefinBoaVista, consultaPefinSerasa]);
|
|
54
|
-
return (React.createElement(React.Fragment, null,
|
|
55
|
-
React.createElement(Header, { title: "Resumo de Negativa\u00E7\u00F5es", subtitle: "Veja a quantidade de ocorr\u00EAncias conforme o documento foi consultado ao longo do tempo", description: errorMessage && (React.createElement(StatusMessage, { type: "error" }, errorMessage)), variant: isLoading ? 'loading' : 'default', icon: ResumoDeNegativacoesIcon, actions: React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
56
|
-
React.createElement(Content, { isOpen: isOpen },
|
|
57
|
-
data && React.createElement(ChartContent, { dataInput: data }),
|
|
58
|
-
!isLoading && (React.createElement(QuantidadeResultados, { data: data, quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_k = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _k === void 0 ? void 0 : _k.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos })))));
|
|
59
|
-
};
|
|
60
|
-
export default ChartSystem;
|
|
61
|
-
var templateObject_1;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import React, { useState } from 'react';
|
|
6
|
-
import { Chart } from 'react-chartjs-2';
|
|
7
|
-
import { useMixedChartData } from '../hooks/useMixedChartData';
|
|
8
|
-
import styled, { css } from 'styled-components';
|
|
9
|
-
var TimeFilterButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 8px 16px;\n margin-right: 5px;\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-radius: 8px;\n cursor: pointer;\n width: 100px;\n min-width: 100px;\n text-align: center;\n\n ", "\n\n &:hover {\n background-color: #007af2;\n color: white;\n }\n\n @media print {\n display: none !important;\n }\n"], ["\n padding: 8px 16px;\n margin-right: 5px;\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-radius: 8px;\n cursor: pointer;\n width: 100px;\n min-width: 100px;\n text-align: center;\n\n ", "\n\n &:hover {\n background-color: #007af2;\n color: white;\n }\n\n @media print {\n display: none !important;\n }\n"])), function (props) {
|
|
10
|
-
return props.isActive && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: #007af2;\n color: white;\n border-color: #007af2;\n "], ["\n background-color: #007af2;\n color: white;\n border-color: #007af2;\n "])));
|
|
11
|
-
});
|
|
12
|
-
var MixedChart = function (_a) {
|
|
13
|
-
var dataInput = _a.dataInput;
|
|
14
|
-
var _b = useState('1m'), timeFilter = _b[0], setTimeFilter = _b[1];
|
|
15
|
-
var _c = useMixedChartData(dataInput, timeFilter), data = _c.data, options = _c.options;
|
|
16
|
-
var chartType = data.datasets.some(function (dataset) { return dataset.type === 'bar'; })
|
|
17
|
-
? 'bar'
|
|
18
|
-
: 'line';
|
|
19
|
-
return (React.createElement("div", null,
|
|
20
|
-
React.createElement("div", null, ['all', '1y', '6m', '1m'].map(function (filter) { return (React.createElement(TimeFilterButton, { key: filter, onClick: function () { return setTimeFilter(filter); }, isActive: timeFilter === filter }, filter === 'all'
|
|
21
|
-
? 'All'
|
|
22
|
-
: filter === '1y'
|
|
23
|
-
? '1 Ano'
|
|
24
|
-
: filter === '6m'
|
|
25
|
-
? '6 Meses'
|
|
26
|
-
: '1 Mês')); })),
|
|
27
|
-
React.createElement(Chart, { className: "mixed-chart", type: chartType, data: data, options: options })));
|
|
28
|
-
};
|
|
29
|
-
export default MixedChart;
|
|
30
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Pie } from 'react-chartjs-2';
|
|
3
|
-
import { usePieChartData } from '../hooks/usePieChartData';
|
|
4
|
-
var PieChart = function (_a) {
|
|
5
|
-
var dataInput = _a.dataInput;
|
|
6
|
-
var _b = usePieChartData(dataInput), data = _b.data, options = _b.options;
|
|
7
|
-
return React.createElement(Pie, { className: "pie-chart", data: data, options: options });
|
|
8
|
-
};
|
|
9
|
-
export default PieChart;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { Bar } from 'react-chartjs-2';
|
|
7
|
-
import styled from 'styled-components';
|
|
8
|
-
import { useCategoryProtestos } from '../hooks/useCategoryProtestos';
|
|
9
|
-
var ChartContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 400px;\n width: 100%;\n"], ["\n height: 400px;\n width: 100%;\n"])));
|
|
10
|
-
var CategoriaProtesto = function (_a) {
|
|
11
|
-
var dataInput = _a.dataInput;
|
|
12
|
-
var _b = useCategoryProtestos(dataInput), data = _b.data, options = _b.options;
|
|
13
|
-
return (React.createElement(ChartContainer, null,
|
|
14
|
-
React.createElement(Bar, { className: "categoria-protesto", data: data, options: options })));
|
|
15
|
-
};
|
|
16
|
-
export default CategoriaProtesto;
|
|
17
|
-
var templateObject_1;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ChartData, ChartOptions } from 'chart.js';
|
|
2
|
-
import { DataInput } from '../types/iChart';
|
|
3
|
-
export declare const useCategoryProtestos: (dataInput: DataInput['protestosCategory']) => {
|
|
4
|
-
data: ChartData<'bar', number[], string>;
|
|
5
|
-
options: ChartOptions<'bar'>;
|
|
6
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export var useCategoryProtestos = function (dataInput) {
|
|
3
|
-
var data = useMemo(function () {
|
|
4
|
-
var safeDataInput = dataInput || [];
|
|
5
|
-
var categoryCounts = {
|
|
6
|
-
'Protestos de Crédito': 0,
|
|
7
|
-
'Protestos de Impostos': 0,
|
|
8
|
-
'Protestos Gerais': 0
|
|
9
|
-
};
|
|
10
|
-
safeDataInput.forEach(function (item) {
|
|
11
|
-
categoryCounts[item.categoria] = item.quantidade;
|
|
12
|
-
});
|
|
13
|
-
var labels = Object.keys(categoryCounts);
|
|
14
|
-
var dataValues = Object.values(categoryCounts);
|
|
15
|
-
return {
|
|
16
|
-
labels: labels,
|
|
17
|
-
datasets: [
|
|
18
|
-
{
|
|
19
|
-
data: dataValues,
|
|
20
|
-
backgroundColor: [
|
|
21
|
-
'rgba(255, 99, 132, 0.2)',
|
|
22
|
-
'rgba(255, 159, 64, 0.2)',
|
|
23
|
-
'rgba(54, 162, 235, 0.2)'
|
|
24
|
-
],
|
|
25
|
-
borderColor: [
|
|
26
|
-
'rgba(255, 99, 132, 1)',
|
|
27
|
-
'rgba(255, 159, 64, 1)',
|
|
28
|
-
'rgba(54, 162, 235, 1)'
|
|
29
|
-
],
|
|
30
|
-
borderWidth: 1
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
};
|
|
34
|
-
}, [dataInput]);
|
|
35
|
-
var options = useMemo(function () {
|
|
36
|
-
return {
|
|
37
|
-
scales: {
|
|
38
|
-
y: {
|
|
39
|
-
beginAtZero: true,
|
|
40
|
-
ticks: {
|
|
41
|
-
precision: 0,
|
|
42
|
-
stepSize: 1,
|
|
43
|
-
suggestedMin: 0,
|
|
44
|
-
callback: function (value) {
|
|
45
|
-
return Number.isInteger(value) ? value : null;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
responsive: true,
|
|
51
|
-
maintainAspectRatio: false,
|
|
52
|
-
plugins: {
|
|
53
|
-
legend: {
|
|
54
|
-
display: false
|
|
55
|
-
},
|
|
56
|
-
title: {
|
|
57
|
-
display: true,
|
|
58
|
-
text: 'Quantidade de Protestos por Categoria',
|
|
59
|
-
font: {
|
|
60
|
-
size: 12
|
|
61
|
-
},
|
|
62
|
-
padding: {
|
|
63
|
-
bottom: 10,
|
|
64
|
-
top: 20
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}, []);
|
|
70
|
-
return { data: data, options: options };
|
|
71
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useContext, useEffect, useState, useMemo } from 'react';
|
|
2
|
-
import { useQuery, Queries, RequestStatus } from '../../../components/webservice';
|
|
3
|
-
import { processData, processProtestData } from '../utils/dataProcessing';
|
|
4
|
-
var useChartData = function (documento) {
|
|
5
|
-
var _a = useState(null), data = _a[0], setData = _a[1];
|
|
6
|
-
var _b = useState(null), errorState = _b[0], setErrorState = _b[1];
|
|
7
|
-
var _c = useQuery("SELECT FROM 'DOCUMENTHISTORY'.'BASICHISTORY'", {
|
|
8
|
-
documento: documento
|
|
9
|
-
}), response = _c.response, queryError = _c.error, isLoading = _c.isLoading, refetch = _c.refetch;
|
|
10
|
-
var ctxProtestos = useContext(Queries.Protestos);
|
|
11
|
-
var ctxCCF = useContext(Queries.CCF);
|
|
12
|
-
var ctxProcessosJuridicos = useContext(Queries.ProcessosJuridicos);
|
|
13
|
-
var quantidadeProcessosJuridicos = useMemo(function () {
|
|
14
|
-
var _a;
|
|
15
|
-
if ((ctxProcessosJuridicos === null || ctxProcessosJuridicos === void 0 ? void 0 : ctxProcessosJuridicos.type) === RequestStatus.Success &&
|
|
16
|
-
((_a = ctxProcessosJuridicos.document) === null || _a === void 0 ? void 0 : _a.empresa)) {
|
|
17
|
-
return ctxProcessosJuridicos.document.empresa.length;
|
|
18
|
-
}
|
|
19
|
-
return 0;
|
|
20
|
-
}, [ctxProcessosJuridicos]);
|
|
21
|
-
var liveQueriesIsFinish = useMemo(function () {
|
|
22
|
-
return [
|
|
23
|
-
ctxProtestos === null || ctxProtestos === void 0 ? void 0 : ctxProtestos.type,
|
|
24
|
-
ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.type,
|
|
25
|
-
ctxProcessosJuridicos === null || ctxProcessosJuridicos === void 0 ? void 0 : ctxProcessosJuridicos.type
|
|
26
|
-
].every(function (status) { return status !== RequestStatus.Loading; });
|
|
27
|
-
}, [ctxProtestos, ctxCCF, ctxProcessosJuridicos]);
|
|
28
|
-
var dadosProtestos = useMemo(function () {
|
|
29
|
-
if ((ctxProtestos === null || ctxProtestos === void 0 ? void 0 : ctxProtestos.type) === RequestStatus.Success && ctxProtestos.data) {
|
|
30
|
-
return processProtestData(ctxProtestos.document);
|
|
31
|
-
}
|
|
32
|
-
return [];
|
|
33
|
-
}, [ctxProtestos]);
|
|
34
|
-
useEffect(function () {
|
|
35
|
-
if (liveQueriesIsFinish) {
|
|
36
|
-
refetch();
|
|
37
|
-
}
|
|
38
|
-
}, [liveQueriesIsFinish]);
|
|
39
|
-
useEffect(function () {
|
|
40
|
-
if (!isLoading &&
|
|
41
|
-
!queryError &&
|
|
42
|
-
(response === null || response === void 0 ? void 0 : response.document) &&
|
|
43
|
-
liveQueriesIsFinish) {
|
|
44
|
-
try {
|
|
45
|
-
var parsedData = JSON.parse(response.document);
|
|
46
|
-
parsedData.protestosCategory = dadosProtestos;
|
|
47
|
-
var processedData = processData(parsedData, quantidadeProcessosJuridicos);
|
|
48
|
-
setData(processedData);
|
|
49
|
-
}
|
|
50
|
-
catch (e) {
|
|
51
|
-
console.error('Erro ao processar os dados', e);
|
|
52
|
-
setErrorState('Erro ao processar os dados');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}, [
|
|
56
|
-
isLoading,
|
|
57
|
-
response,
|
|
58
|
-
queryError,
|
|
59
|
-
liveQueriesIsFinish,
|
|
60
|
-
quantidadeProcessosJuridicos
|
|
61
|
-
]);
|
|
62
|
-
return { data: data, isLoading: isLoading, error: errorState || queryError, refetch: refetch };
|
|
63
|
-
};
|
|
64
|
-
export default useChartData;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ChartData, ChartOptions } from 'chart.js';
|
|
2
|
-
import { DataInput, TimeFilter } from '../types/iChart';
|
|
3
|
-
import 'chartjs-adapter-date-fns';
|
|
4
|
-
export declare const useMixedChartData: (dataInput: DataInput, timeFilter?: TimeFilter) => {
|
|
5
|
-
data: ChartData<'line' | 'bar', (number | {
|
|
6
|
-
x: string;
|
|
7
|
-
y: number | null;
|
|
8
|
-
})[], string>;
|
|
9
|
-
options: ChartOptions<'line' | 'bar'>;
|
|
10
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import 'chartjs-adapter-date-fns';
|
|
3
|
-
import { getEndDate, getUniqueDates, addMissingDateEntries, getFilteredStartDate, getEarliestDate } from '../utils/dataManipulation';
|
|
4
|
-
import { createDatasets, getChartOptions } from '../utils/chartCustomization';
|
|
5
|
-
export var useMixedChartData = function (dataInput, timeFilter) {
|
|
6
|
-
if (timeFilter === void 0) { timeFilter = '1m'; }
|
|
7
|
-
return useMemo(function () {
|
|
8
|
-
var filteredStartDate = getFilteredStartDate(timeFilter, dataInput);
|
|
9
|
-
var endDate = getEndDate();
|
|
10
|
-
var fullDataStartDate = getEarliestDate(dataInput);
|
|
11
|
-
var fullProcessedData = {
|
|
12
|
-
protestos: addMissingDateEntries(dataInput.protestos, fullDataStartDate, endDate),
|
|
13
|
-
ccfs: addMissingDateEntries(dataInput.ccfs, fullDataStartDate, endDate),
|
|
14
|
-
serasa: dataInput.serasa,
|
|
15
|
-
boaVista: dataInput.boaVista,
|
|
16
|
-
dividasPublicasGrafico: addMissingDateEntries(dataInput.dividasPublicasGrafico, fullDataStartDate, endDate)
|
|
17
|
-
};
|
|
18
|
-
var processedData = {
|
|
19
|
-
protestos: fullProcessedData.protestos.filter(function (d) { return new Date(d.data) >= filteredStartDate; }),
|
|
20
|
-
ccfs: fullProcessedData.ccfs.filter(function (d) { return new Date(d.data) >= filteredStartDate; }),
|
|
21
|
-
serasa: fullProcessedData.serasa.filter(function (d) { return new Date(d.data) >= filteredStartDate; }),
|
|
22
|
-
boaVista: fullProcessedData.boaVista.filter(function (d) { return new Date(d.data) >= filteredStartDate; }),
|
|
23
|
-
dividasPublicasGrafico: fullProcessedData.dividasPublicasGrafico.filter(function (d) { return new Date(d.data) >= filteredStartDate; })
|
|
24
|
-
};
|
|
25
|
-
var uniqueDates = getUniqueDates(processedData);
|
|
26
|
-
var datasets = createDatasets(processedData, uniqueDates, timeFilter);
|
|
27
|
-
var options = getChartOptions(timeFilter);
|
|
28
|
-
if (!options.plugins) {
|
|
29
|
-
options.plugins = {};
|
|
30
|
-
}
|
|
31
|
-
options.plugins.datalabels = {
|
|
32
|
-
display: false
|
|
33
|
-
};
|
|
34
|
-
var labels = uniqueDates;
|
|
35
|
-
return {
|
|
36
|
-
data: {
|
|
37
|
-
labels: labels,
|
|
38
|
-
datasets: datasets
|
|
39
|
-
},
|
|
40
|
-
options: options
|
|
41
|
-
};
|
|
42
|
-
}, [dataInput, timeFilter]);
|
|
43
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { useWindowSize } from '../../../hooks/useWindowSize';
|
|
3
|
-
export var usePieChartData = function (dataInput) {
|
|
4
|
-
var width = useWindowSize().width;
|
|
5
|
-
return useMemo(function () {
|
|
6
|
-
var _a;
|
|
7
|
-
var getLastValue = function (arr) { var _a; return arr.length > 0 ? (_a = arr[arr.length - 1].quantidade) !== null && _a !== void 0 ? _a : 0 : 0; };
|
|
8
|
-
var totalProtestos = getLastValue(dataInput.protestos);
|
|
9
|
-
var totalCCFs = getLastValue(dataInput.ccfs);
|
|
10
|
-
var totalSerasa = getLastValue(dataInput.serasa);
|
|
11
|
-
var totalBoaVista = getLastValue(dataInput.boaVista);
|
|
12
|
-
var totalDividasPublicas = getLastValue(dataInput.dividasPublicasGrafico);
|
|
13
|
-
var processosJuridicos = (_a = dataInput.pieChartTotalConfig) === null || _a === void 0 ? void 0 : _a.processosJuridicos;
|
|
14
|
-
var chartData = {
|
|
15
|
-
labels: [
|
|
16
|
-
'Protestos',
|
|
17
|
-
'Cheques Devolvidos',
|
|
18
|
-
'Pefin/Refin Serasa',
|
|
19
|
-
'Pefin/Refin Boa Vista',
|
|
20
|
-
'Dívidas Públicas',
|
|
21
|
-
'Processos Jurídicos'
|
|
22
|
-
],
|
|
23
|
-
datasets: [
|
|
24
|
-
{
|
|
25
|
-
data: [
|
|
26
|
-
totalProtestos,
|
|
27
|
-
totalCCFs,
|
|
28
|
-
totalSerasa,
|
|
29
|
-
totalBoaVista,
|
|
30
|
-
totalDividasPublicas,
|
|
31
|
-
processosJuridicos !== null && processosJuridicos !== void 0 ? processosJuridicos : 0
|
|
32
|
-
],
|
|
33
|
-
backgroundColor: [
|
|
34
|
-
'#ff4081',
|
|
35
|
-
'#3f51b5',
|
|
36
|
-
'#008cf8',
|
|
37
|
-
'#ffc107',
|
|
38
|
-
'#4caf50',
|
|
39
|
-
'#58508d'
|
|
40
|
-
],
|
|
41
|
-
hoverOffset: 4
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
};
|
|
45
|
-
var aspectRatio = width < 1000 ? 1.5 : 1;
|
|
46
|
-
var options = {
|
|
47
|
-
responsive: true,
|
|
48
|
-
maintainAspectRatio: true,
|
|
49
|
-
aspectRatio: aspectRatio,
|
|
50
|
-
layout: {
|
|
51
|
-
padding: {
|
|
52
|
-
top: 32
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
plugins: {
|
|
56
|
-
legend: {
|
|
57
|
-
position: 'right',
|
|
58
|
-
align: 'start',
|
|
59
|
-
fullSize: true,
|
|
60
|
-
labels: {
|
|
61
|
-
boxWidth: 16,
|
|
62
|
-
padding: 16
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
title: {
|
|
66
|
-
display: true,
|
|
67
|
-
text: 'Quantidade de Ocorrências',
|
|
68
|
-
font: {
|
|
69
|
-
size: 12
|
|
70
|
-
},
|
|
71
|
-
padding: {
|
|
72
|
-
bottom: 8
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
datalabels: {
|
|
76
|
-
color: '#fff',
|
|
77
|
-
formatter: function (value) {
|
|
78
|
-
return value > 0 ? value.toString() : '';
|
|
79
|
-
},
|
|
80
|
-
font: {
|
|
81
|
-
weight: 'bold'
|
|
82
|
-
},
|
|
83
|
-
textAlign: 'center'
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
return { data: chartData, options: options };
|
|
88
|
-
}, [dataInput]);
|
|
89
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DataInput } from './types/iChart';
|
|
3
|
-
type QuantidadeResultadosProps = Partial<{
|
|
4
|
-
data: DataInput | null;
|
|
5
|
-
quantidadeProtestos: number;
|
|
6
|
-
quantidadeProcessos: number;
|
|
7
|
-
quantidadeDividas: number;
|
|
8
|
-
quantidadeChequesSemFundos: number;
|
|
9
|
-
quantidadeDividasSerasa: number;
|
|
10
|
-
quantidadeDividasBoaVista: number;
|
|
11
|
-
valorTotalProtestos: number;
|
|
12
|
-
valorTotalDividas: number;
|
|
13
|
-
valorTotalDividasSerasa: number;
|
|
14
|
-
valorTotalDividasBoaVista: number;
|
|
15
|
-
ultimaOcorrenciaProtestos: string;
|
|
16
|
-
ultimaOcorrenciaChequesSemFundos: string;
|
|
17
|
-
}>;
|
|
18
|
-
declare const QuantidadeResultados: React.FC<QuantidadeResultadosProps>;
|
|
19
|
-
export default QuantidadeResultados;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
/* eslint-disable no-extra-boolean-cast */
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import AddItemField from '../common/addItem';
|
|
8
|
-
import { formatMoney, formatValue } from '../../utils/number';
|
|
9
|
-
import { Result, ResultContent } from '../interface/result';
|
|
10
|
-
import styled from 'styled-components';
|
|
11
|
-
var QuantityContainer = function (_a) {
|
|
12
|
-
var children = _a.children;
|
|
13
|
-
return (React.createElement("div", { className: "t" }, children));
|
|
14
|
-
};
|
|
15
|
-
var QuantidadeResultadosWrapper = styled(ResultContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 18px 20px;\n row-gap: 20px;\n > * {\n row-gap: 10px;\n }\n"], ["\n padding: 18px 20px;\n row-gap: 20px;\n > * {\n row-gap: 10px;\n }\n"])));
|
|
16
|
-
var QuantidadeResultados = function (_a) {
|
|
17
|
-
var _b, _c, _d, _e;
|
|
18
|
-
var data = _a.data, _f = _a.quantidadeProtestos, quantidadeProtestos = _f === void 0 ? 0 : _f, _g = _a.quantidadeProcessos, quantidadeProcessos = _g === void 0 ? 0 : _g, _h = _a.quantidadeDividas, quantidadeDividas = _h === void 0 ? 0 : _h, _j = _a.quantidadeChequesSemFundos, quantidadeChequesSemFundos = _j === void 0 ? 0 : _j, _k = _a.quantidadeDividasSerasa, quantidadeDividasSerasa = _k === void 0 ? 0 : _k, _l = _a.quantidadeDividasBoaVista, quantidadeDividasBoaVista = _l === void 0 ? 0 : _l, _m = _a.valorTotalProtestos, valorTotalProtestos = _m === void 0 ? 0 : _m, _o = _a.valorTotalDividas, valorTotalDividas = _o === void 0 ? 0 : _o, _p = _a.valorTotalDividasSerasa, valorTotalDividasSerasa = _p === void 0 ? 0 : _p, _q = _a.valorTotalDividasBoaVista, valorTotalDividasBoaVista = _q === void 0 ? 0 : _q, _r = _a.ultimaOcorrenciaProtestos, ultimaOcorrenciaProtestos = _r === void 0 ? null : _r, _s = _a.ultimaOcorrenciaChequesSemFundos, ultimaOcorrenciaChequesSemFundos = _s === void 0 ? null : _s;
|
|
19
|
-
return (React.createElement(Result, { resultContentStriped: false },
|
|
20
|
-
React.createElement(QuantidadeResultadosWrapper, { desktop: "repeat(6, 1fr)", print: "repeat(6, 1fr)", tablet: "repeat(3, 1fr)", mobile: "repeat(2, 1fr)" },
|
|
21
|
-
React.createElement(QuantityContainer, null,
|
|
22
|
-
React.createElement(AddItemField, { name: "Total Protestos", value: formatValue(quantidadeProtestos) }),
|
|
23
|
-
React.createElement(AddItemField, { name: "Valor Total Protestos", value: formatMoney(valorTotalProtestos) }),
|
|
24
|
-
React.createElement(AddItemField, { hidden: quantidadeProtestos == 0, name: "\u00DAltima Ocorr\u00EAncia", value: ultimaOcorrenciaProtestos })),
|
|
25
|
-
React.createElement(QuantityContainer, null,
|
|
26
|
-
React.createElement(AddItemField, { name: "Cheques Sem Fundos", value: formatValue(quantidadeChequesSemFundos) }),
|
|
27
|
-
React.createElement(AddItemField, { hidden: quantidadeChequesSemFundos == 0, name: "\u00DAltima Ocorr\u00EAncia", value: ultimaOcorrenciaChequesSemFundos })),
|
|
28
|
-
React.createElement(QuantityContainer, null,
|
|
29
|
-
React.createElement(AddItemField, { name: "Processos Jur\u00EDdicos", value: formatValue(quantidadeProcessos) })),
|
|
30
|
-
React.createElement(QuantityContainer, null,
|
|
31
|
-
React.createElement(AddItemField, { name: "D\u00EDvidas P\u00FAblicas", value: formatValue(quantidadeDividas) }),
|
|
32
|
-
React.createElement(AddItemField, { name: "Total D\u00EDvidas P\u00FAblicas", value: formatMoney(valorTotalDividas) })),
|
|
33
|
-
React.createElement(QuantityContainer, null,
|
|
34
|
-
React.createElement(AddItemField, { hidden: !((_b = data === null || data === void 0 ? void 0 : data.serasa) === null || _b === void 0 ? void 0 : _b.length), name: "Pefin Refin Serasa", value: formatValue(quantidadeDividasSerasa) }),
|
|
35
|
-
React.createElement(AddItemField, { hidden: !((_c = data === null || data === void 0 ? void 0 : data.serasa) === null || _c === void 0 ? void 0 : _c.length), name: "Total Pefin Refin Serasa", value: formatMoney(valorTotalDividasSerasa) })),
|
|
36
|
-
React.createElement(QuantityContainer, null,
|
|
37
|
-
React.createElement(AddItemField, { hidden: !((_d = data === null || data === void 0 ? void 0 : data.boaVista) === null || _d === void 0 ? void 0 : _d.length), name: "Pefin Refin Boa Vista", value: formatValue(quantidadeDividasBoaVista) }),
|
|
38
|
-
React.createElement(AddItemField, { hidden: !((_e = data === null || data === void 0 ? void 0 : data.boaVista) === null || _e === void 0 ? void 0 : _e.length), name: "Total Pefin Refin Boa Vista", value: formatMoney(valorTotalDividasBoaVista) })))));
|
|
39
|
-
};
|
|
40
|
-
export default QuantidadeResultados;
|
|
41
|
-
var templateObject_1;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export interface Consulta {
|
|
2
|
-
data: string | Date;
|
|
3
|
-
categoria?: string;
|
|
4
|
-
quantidade?: number | null;
|
|
5
|
-
creation?: string | Date;
|
|
6
|
-
valorTotal?: number | null;
|
|
7
|
-
total?: number | null;
|
|
8
|
-
}
|
|
9
|
-
export interface DataInput {
|
|
10
|
-
ccfs: Consulta[];
|
|
11
|
-
protestos: Consulta[];
|
|
12
|
-
serasa: Consulta[];
|
|
13
|
-
boaVista: Consulta[];
|
|
14
|
-
dividasPublicasGrafico: Consulta[];
|
|
15
|
-
pieChartTotalConfig?: {
|
|
16
|
-
protestos?: {
|
|
17
|
-
total: number | null;
|
|
18
|
-
valorTotal: number | null;
|
|
19
|
-
ultimaOcorrencia: string | null;
|
|
20
|
-
};
|
|
21
|
-
processosJuridicos?: number;
|
|
22
|
-
ccf?: {
|
|
23
|
-
total: number | null;
|
|
24
|
-
ultimaOcorrencia: string | null;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
protestosCategory?: ProtestoData[];
|
|
28
|
-
}
|
|
29
|
-
export interface ProtestoData {
|
|
30
|
-
categoria: string;
|
|
31
|
-
quantidade: number;
|
|
32
|
-
ultimaOcorrencia: string | null;
|
|
33
|
-
}
|
|
34
|
-
export interface DataSetCommon {
|
|
35
|
-
label: string;
|
|
36
|
-
data: {
|
|
37
|
-
x: string;
|
|
38
|
-
y: number | null;
|
|
39
|
-
}[];
|
|
40
|
-
borderColor?: string;
|
|
41
|
-
backgroundColor?: string;
|
|
42
|
-
borderWidth?: number;
|
|
43
|
-
yAxisID?: 'y' | 'y2';
|
|
44
|
-
}
|
|
45
|
-
export interface DataSetLine extends DataSetCommon {
|
|
46
|
-
type: 'line';
|
|
47
|
-
tension?: number;
|
|
48
|
-
spanGaps: boolean;
|
|
49
|
-
showLine: boolean;
|
|
50
|
-
pointRadius: number;
|
|
51
|
-
fill?: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface DataSetBar extends DataSetCommon {
|
|
54
|
-
type: 'bar';
|
|
55
|
-
borderRadius?: number;
|
|
56
|
-
categoryPercentage?: number;
|
|
57
|
-
barPercentage?: number;
|
|
58
|
-
}
|
|
59
|
-
export type TimeFilter = '1y' | '6m' | '1m' | 'all';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DataInput, TimeFilter } from '../types/iChart';
|
|
2
|
-
import { ChartDataset, ChartOptions } from 'chart.js';
|
|
3
|
-
export declare function createDatasets(data: DataInput, uniqueDates: string[], timeFilter: TimeFilter): ChartDataset<'line' | 'bar', (number | {
|
|
4
|
-
x: string;
|
|
5
|
-
y: number | null;
|
|
6
|
-
})[]>[];
|
|
7
|
-
export declare function getChartOptions(timeFilter: TimeFilter): ChartOptions<'line' | 'bar'>;
|