@credithub/harlan-components 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +48484 -66
- package/lib/esm/components/common/button.js +2 -2
- package/lib/esm/components/consultaSimplesSection/consultaSimplesSection.js +10 -12
- package/lib/esm/components/contacts/contacts.d.ts +1 -1
- package/lib/esm/components/dossie/companyLogo/companyLogo.js +0 -1
- package/lib/esm/components/dossie/dossie.js +1 -2
- package/lib/esm/components/dossie/summary/cardsAndProducts.d.ts +0 -8
- package/lib/esm/components/dossie/summary/cardsAndProducts.js +1 -1
- package/lib/esm/components/dossie/summary/summary.d.ts +1 -0
- package/lib/esm/components/dossie/summary/summary.js +64 -7
- package/lib/esm/components/dossie/transactionTable/transactionTable.js +3 -3
- package/lib/esm/components/liminar/liminar.js +7 -1
- package/lib/esm/components/partners/partner-rfb-status.js +1 -1
- package/lib/esm/components/processos-juridicos/processosJuridicos.d.ts +1 -1
- package/lib/esm/components/processos-juridicos/processosJuridicosList.d.ts +1 -1
- package/lib/esm/components/processos-juridicos/processosJuridicosList.js +1 -1
- package/lib/esm/components/reclameAqui/reclameAquiCarousel.js +7 -7
- package/lib/esm/components/resultadoDaPesquisa/resultado-da-pesquisa.js +2 -2
- package/lib/esm/consultaSimples.d.ts +2 -2
- package/lib/esm/consultaSimples.js +3 -3
- package/package.json +5 -2
- package/lib/cjs/assets/btn/btnWrapper.d.ts +0 -2
- package/lib/cjs/assets/btn/btnWrapper.js +0 -14
- package/lib/cjs/assets/btn/chevronDown.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronDown.js +0 -34
- package/lib/cjs/assets/btn/chevronLeft.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronLeft.js +0 -35
- package/lib/cjs/assets/btn/chevronRight.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronRight.js +0 -35
- package/lib/cjs/assets/btn/chevronUp.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronUp.js +0 -35
- package/lib/cjs/assets/btn/closeIcon.d.ts +0 -3
- package/lib/cjs/assets/btn/closeIcon.js +0 -34
- package/lib/cjs/assets/btn/thumbDown.d.ts +0 -7
- package/lib/cjs/assets/btn/thumbDown.js +0 -16
- package/lib/cjs/assets/btn/thumbUp.d.ts +0 -7
- package/lib/cjs/assets/btn/thumbUp.js +0 -16
- package/lib/cjs/assets/icones/chequesSemFundo.d.ts +0 -4
- package/lib/cjs/assets/icones/chequesSemFundo.js +0 -17
- package/lib/cjs/assets/icones/consultaSimples.d.ts +0 -4
- package/lib/cjs/assets/icones/consultaSimples.js +0 -17
- package/lib/cjs/assets/icones/contasBancarias.d.ts +0 -4
- package/lib/cjs/assets/icones/contasBancarias.js +0 -17
- package/lib/cjs/assets/icones/contato.d.ts +0 -4
- package/lib/cjs/assets/icones/contato.js +0 -17
- package/lib/cjs/assets/icones/dividasVencidasSerasa.d.ts +0 -4
- package/lib/cjs/assets/icones/dividasVencidasSerasa.js +0 -14
- package/lib/cjs/assets/icones/dominios.d.ts +0 -4
- package/lib/cjs/assets/icones/dominios.js +0 -14
- package/lib/cjs/assets/icones/endereco.d.ts +0 -4
- package/lib/cjs/assets/icones/endereco.js +0 -17
- package/lib/cjs/assets/icones/iconeEmpresa.d.ts +0 -8
- package/lib/cjs/assets/icones/iconeEmpresa.js +0 -17
- package/lib/cjs/assets/icones/iconePessoa.d.ts +0 -9
- package/lib/cjs/assets/icones/iconePessoa.js +0 -17
- package/lib/cjs/assets/icones/imoveis.d.ts +0 -4
- package/lib/cjs/assets/icones/imoveis.js +0 -14
- package/lib/cjs/assets/icones/pefinRefinBoaVista.d.ts +0 -4
- package/lib/cjs/assets/icones/pefinRefinBoaVista.js +0 -14
- package/lib/cjs/assets/icones/pefinRefinSerasa.d.ts +0 -4
- package/lib/cjs/assets/icones/pefinRefinSerasa.js +0 -16
- package/lib/cjs/assets/icones/processosJuridicos.d.ts +0 -4
- package/lib/cjs/assets/icones/processosJuridicos.js +0 -17
- package/lib/cjs/assets/icones/protestos.d.ts +0 -4
- package/lib/cjs/assets/icones/protestos.js +0 -17
- package/lib/cjs/assets/icones/protestosCredito.d.ts +0 -4
- package/lib/cjs/assets/icones/protestosCredito.js +0 -17
- package/lib/cjs/assets/icones/protestosGerais.d.ts +0 -4
- package/lib/cjs/assets/icones/protestosGerais.js +0 -17
- package/lib/cjs/assets/icones/protestosImpostos.d.ts +0 -4
- package/lib/cjs/assets/icones/protestosImpostos.js +0 -17
- package/lib/cjs/assets/icones/quadroSocietario.d.ts +0 -4
- package/lib/cjs/assets/icones/quadroSocietario.js +0 -17
- package/lib/cjs/assets/icones/resumoNegativacoes.d.ts +0 -4
- package/lib/cjs/assets/icones/resumoNegativacoes.js +0 -16
- package/lib/cjs/assets/icones/scoreBoaVista.d.ts +0 -4
- package/lib/cjs/assets/icones/scoreBoaVista.js +0 -14
- package/lib/cjs/assets/icones/scr.d.ts +0 -4
- package/lib/cjs/assets/icones/scr.js +0 -14
- package/lib/cjs/assets/icones/ultimaMovimentacao.d.ts +0 -4
- package/lib/cjs/assets/icones/ultimaMovimentacao.js +0 -17
- package/lib/cjs/assets/icones/veiculos.d.ts +0 -4
- package/lib/cjs/assets/icones/veiculos.js +0 -14
- package/lib/cjs/components/adresses/addresses.d.ts +0 -19
- package/lib/cjs/components/adresses/addresses.js +0 -74
- package/lib/cjs/components/adresses/getGeocode.d.ts +0 -6
- package/lib/cjs/components/adresses/getGeocode.js +0 -73
- package/lib/cjs/components/adresses/map.d.ts +0 -11
- package/lib/cjs/components/adresses/map.js +0 -50
- package/lib/cjs/components/bank-accounts/bank-accounts.d.ts +0 -3
- package/lib/cjs/components/bank-accounts/bank-accounts.js +0 -33
- package/lib/cjs/components/ccf/ccf.d.ts +0 -3
- package/lib/cjs/components/ccf/ccf.js +0 -65
- package/lib/cjs/components/ccf/ccfList.d.ts +0 -12
- package/lib/cjs/components/ccf/ccfList.js +0 -52
- package/lib/cjs/components/chart/chartContent.d.ts +0 -6
- package/lib/cjs/components/chart/chartContent.js +0 -55
- package/lib/cjs/components/chart/chartSystem.d.ts +0 -6
- package/lib/cjs/components/chart/chartSystem.js +0 -50
- package/lib/cjs/components/chart/components/MixedChart.d.ts +0 -7
- package/lib/cjs/components/chart/components/MixedChart.js +0 -55
- package/lib/cjs/components/chart/components/PieChart.d.ts +0 -7
- package/lib/cjs/components/chart/components/PieChart.js +0 -14
- package/lib/cjs/components/chart/components/categoryProtestos.d.ts +0 -7
- package/lib/cjs/components/chart/components/categoryProtestos.js +0 -22
- package/lib/cjs/components/chart/hooks/useCategoryProtestos.d.ts +0 -6
- package/lib/cjs/components/chart/hooks/useCategoryProtestos.js +0 -75
- package/lib/cjs/components/chart/hooks/useChartData.d.ts +0 -8
- package/lib/cjs/components/chart/hooks/useChartData.js +0 -61
- package/lib/cjs/components/chart/hooks/useMixedChartData.d.ts +0 -10
- package/lib/cjs/components/chart/hooks/useMixedChartData.js +0 -47
- package/lib/cjs/components/chart/hooks/usePieChartData.d.ts +0 -6
- package/lib/cjs/components/chart/hooks/usePieChartData.js +0 -93
- package/lib/cjs/components/chart/quantityResult.d.ts +0 -17
- package/lib/cjs/components/chart/quantityResult.js +0 -46
- package/lib/cjs/components/chart/types/iChart.d.ts +0 -58
- package/lib/cjs/components/chart/types/iChart.js +0 -2
- package/lib/cjs/components/chart/utils/chartCustomization.d.ts +0 -7
- package/lib/cjs/components/chart/utils/chartCustomization.js +0 -159
- package/lib/cjs/components/chart/utils/chartUtils.d.ts +0 -11
- package/lib/cjs/components/chart/utils/chartUtils.js +0 -46
- package/lib/cjs/components/chart/utils/dataManipulation.d.ts +0 -10
- package/lib/cjs/components/chart/utils/dataManipulation.js +0 -106
- package/lib/cjs/components/chart/utils/dataProcessing.d.ts +0 -3
- package/lib/cjs/components/chart/utils/dataProcessing.js +0 -94
- package/lib/cjs/components/common/addItem.d.ts +0 -11
- package/lib/cjs/components/common/addItem.js +0 -49
- package/lib/cjs/components/common/button.d.ts +0 -5
- package/lib/cjs/components/common/button.js +0 -46
- package/lib/cjs/components/common/carousel.d.ts +0 -4
- package/lib/cjs/components/common/carousel.js +0 -24
- package/lib/cjs/components/consultaRfb.d.ts +0 -16
- package/lib/cjs/components/consultaRfb.js +0 -48
- package/lib/cjs/components/consultaSimplesSection/consultaSimplesSection.d.ts +0 -6
- package/lib/cjs/components/consultaSimplesSection/consultaSimplesSection.js +0 -110
- package/lib/cjs/components/consultasComplementares.d.ts +0 -29
- package/lib/cjs/components/consultasComplementares.js +0 -59
- package/lib/cjs/components/contacts/contactLikeDislikeSection.d.ts +0 -8
- package/lib/cjs/components/contacts/contactLikeDislikeSection.js +0 -96
- package/lib/cjs/components/contacts/contacts.d.ts +0 -18
- package/lib/cjs/components/contacts/contacts.js +0 -75
- package/lib/cjs/components/contacts/contactsLikeDislike.d.ts +0 -9
- package/lib/cjs/components/contacts/contactsLikeDislike.js +0 -12
- package/lib/cjs/components/contacts/thumbsButton.d.ts +0 -9
- package/lib/cjs/components/contacts/thumbsButton.js +0 -46
- package/lib/cjs/components/dividasPublicas/dividasPublicas.d.ts +0 -3
- package/lib/cjs/components/dividasPublicas/dividasPublicas.js +0 -89
- package/lib/cjs/components/dominios/dominios.d.ts +0 -3
- package/lib/cjs/components/dominios/dominios.js +0 -53
- package/lib/cjs/components/dossie/carrousel/carrousel.d.ts +0 -8
- package/lib/cjs/components/dossie/carrousel/carrousel.js +0 -22
- package/lib/cjs/components/dossie/companyLogo/companyLogo.d.ts +0 -7
- package/lib/cjs/components/dossie/companyLogo/companyLogo.js +0 -31
- package/lib/cjs/components/dossie/dossie.d.ts +0 -8
- package/lib/cjs/components/dossie/dossie.js +0 -74
- package/lib/cjs/components/dossie/summary/cardsAndProducts.d.ts +0 -29
- package/lib/cjs/components/dossie/summary/cardsAndProducts.js +0 -212
- package/lib/cjs/components/dossie/summary/summary.d.ts +0 -18
- package/lib/cjs/components/dossie/summary/summary.js +0 -35
- package/lib/cjs/components/dossie/summary/utils.d.ts +0 -10
- package/lib/cjs/components/dossie/summary/utils.js +0 -38
- package/lib/cjs/components/dossie/transactionTable/transactionTable.d.ts +0 -6
- package/lib/cjs/components/dossie/transactionTable/transactionTable.js +0 -40
- package/lib/cjs/components/imoveis/imoveisService.d.ts +0 -6
- package/lib/cjs/components/imoveis/imoveisService.js +0 -79
- package/lib/cjs/components/imoveis/types.d.ts +0 -24
- package/lib/cjs/components/imoveis/types.js +0 -2
- package/lib/cjs/components/interface/globalStyle.d.ts +0 -2
- package/lib/cjs/components/interface/globalStyle.js +0 -11
- package/lib/cjs/components/interface/header.d.ts +0 -23
- package/lib/cjs/components/interface/header.js +0 -77
- package/lib/cjs/components/interface/loading.d.ts +0 -2
- package/lib/cjs/components/interface/loading.js +0 -14
- package/lib/cjs/components/interface/loadingBar.d.ts +0 -5
- package/lib/cjs/components/interface/loadingBar.js +0 -46
- package/lib/cjs/components/interface/responsiveGrid.d.ts +0 -8
- package/lib/cjs/components/interface/responsiveGrid.js +0 -13
- package/lib/cjs/components/interface/result.d.ts +0 -9
- package/lib/cjs/components/interface/result.js +0 -22
- package/lib/cjs/components/interface/resultWithoutInformation.d.ts +0 -4
- package/lib/cjs/components/interface/resultWithoutInformation.js +0 -37
- package/lib/cjs/components/interface/section.d.ts +0 -10
- package/lib/cjs/components/interface/section.js +0 -36
- package/lib/cjs/components/interface/statusMessage.d.ts +0 -7
- package/lib/cjs/components/interface/statusMessage.js +0 -30
- package/lib/cjs/components/interface/theme.d.ts +0 -73
- package/lib/cjs/components/interface/theme.js +0 -75
- package/lib/cjs/components/liminar/liminar.d.ts +0 -3
- package/lib/cjs/components/liminar/liminar.js +0 -46
- package/lib/cjs/components/liminar/types.d.ts +0 -3
- package/lib/cjs/components/liminar/types.js +0 -2
- package/lib/cjs/components/partners/partner-dividas-publicas.d.ts +0 -5
- package/lib/cjs/components/partners/partner-dividas-publicas.js +0 -15
- package/lib/cjs/components/partners/partner-protestos.d.ts +0 -5
- package/lib/cjs/components/partners/partner-protestos.js +0 -15
- package/lib/cjs/components/partners/partner-rfb-status.d.ts +0 -5
- package/lib/cjs/components/partners/partner-rfb-status.js +0 -15
- package/lib/cjs/components/partners/partnerField.d.ts +0 -9
- package/lib/cjs/components/partners/partnerField.js +0 -14
- package/lib/cjs/components/partners/partnerList.d.ts +0 -16
- package/lib/cjs/components/partners/partnerList.js +0 -44
- package/lib/cjs/components/partners/partners.d.ts +0 -3
- package/lib/cjs/components/partners/partners.js +0 -77
- package/lib/cjs/components/pep/pep.d.ts +0 -3
- package/lib/cjs/components/pep/pep.js +0 -66
- package/lib/cjs/components/processos-juridicos/envolvidosList.d.ts +0 -10
- package/lib/cjs/components/processos-juridicos/envolvidosList.js +0 -27
- package/lib/cjs/components/processos-juridicos/processosJuridicos.d.ts +0 -5
- package/lib/cjs/components/processos-juridicos/processosJuridicos.js +0 -51
- package/lib/cjs/components/processos-juridicos/processosJuridicosList.d.ts +0 -7
- package/lib/cjs/components/processos-juridicos/processosJuridicosList.js +0 -90
- package/lib/cjs/components/processos-juridicos/types.d.ts +0 -27
- package/lib/cjs/components/processos-juridicos/types.js +0 -2
- package/lib/cjs/components/protestos/getTotalProtestos.d.ts +0 -1
- package/lib/cjs/components/protestos/getTotalProtestos.js +0 -10
- package/lib/cjs/components/protestos/protestos.d.ts +0 -3
- package/lib/cjs/components/protestos/protestos.js +0 -94
- package/lib/cjs/components/protestos/protestosCategory.d.ts +0 -7
- package/lib/cjs/components/protestos/protestosCategory.js +0 -55
- package/lib/cjs/components/protestos/protestosList.d.ts +0 -33
- package/lib/cjs/components/protestos/protestosList.js +0 -73
- package/lib/cjs/components/reclameAqui/reclameAquiCarousel.d.ts +0 -5
- package/lib/cjs/components/reclameAqui/reclameAquiCarousel.js +0 -129
- package/lib/cjs/components/reclameAqui/types.d.ts +0 -31
- package/lib/cjs/components/reclameAqui/types.js +0 -2
- package/lib/cjs/components/refinBoaVista/refinBoaVista.d.ts +0 -22
- package/lib/cjs/components/refinBoaVista/refinBoaVista.js +0 -86
- package/lib/cjs/components/refinBoaVista/types.d.ts +0 -48
- package/lib/cjs/components/refinBoaVista/types.js +0 -7
- package/lib/cjs/components/refinSerasa/refinSerasa.d.ts +0 -22
- package/lib/cjs/components/refinSerasa/refinSerasa.js +0 -129
- package/lib/cjs/components/refinSerasa/types.d.ts +0 -48
- package/lib/cjs/components/refinSerasa/types.js +0 -2
- package/lib/cjs/components/refinSerasa/usePendencias.d.ts +0 -0
- package/lib/cjs/components/refinSerasa/usePendencias.js +0 -0
- package/lib/cjs/components/resultadoDaPesquisa/resultado-da-pesquisa.d.ts +0 -5
- package/lib/cjs/components/resultadoDaPesquisa/resultado-da-pesquisa.js +0 -31
- package/lib/cjs/components/score/scoreService.d.ts +0 -6
- package/lib/cjs/components/score/scoreService.js +0 -71
- package/lib/cjs/components/score/types.d.ts +0 -12
- package/lib/cjs/components/score/types.js +0 -2
- package/lib/cjs/components/scr/getResumoDeCreditos.d.ts +0 -6
- package/lib/cjs/components/scr/getResumoDeCreditos.js +0 -93
- package/lib/cjs/components/scr/getResumoDeModalidades.d.ts +0 -8
- package/lib/cjs/components/scr/getResumoDeModalidades.js +0 -95
- package/lib/cjs/components/scr/scr.d.ts +0 -5
- package/lib/cjs/components/scr/scr.js +0 -140
- package/lib/cjs/components/scr/types.d.ts +0 -86
- package/lib/cjs/components/scr/types.js +0 -2
- package/lib/cjs/components/veiculos/types.d.ts +0 -0
- package/lib/cjs/components/veiculos/types.js +0 -0
- package/lib/cjs/components/veiculos/veiculos.d.ts +0 -22
- package/lib/cjs/components/veiculos/veiculos.js +0 -89
- package/lib/cjs/components/webservice.d.ts +0 -140
- package/lib/cjs/components/webservice.js +0 -262
- package/lib/cjs/constants/regex.d.ts +0 -2
- package/lib/cjs/constants/regex.js +0 -5
- package/lib/cjs/consultaSimples.d.ts +0 -11
- package/lib/cjs/consultaSimples.js +0 -61
- package/lib/cjs/hooks/useConsultaRfb.d.ts +0 -6
- package/lib/cjs/hooks/useConsultaRfb.js +0 -13
- package/lib/cjs/hooks/useConsultasComplementares.d.ts +0 -1
- package/lib/cjs/hooks/useConsultasComplementares.js +0 -13
- package/lib/cjs/hooks/useToggle.d.ts +0 -10
- package/lib/cjs/hooks/useToggle.js +0 -26
- package/lib/cjs/hooks/useWindowSize.d.ts +0 -4
- package/lib/cjs/hooks/useWindowSize.js +0 -23
- package/lib/cjs/index.d.ts +0 -23
- package/lib/cjs/utils/calculation.d.ts +0 -9
- package/lib/cjs/utils/calculation.js +0 -23
- package/lib/cjs/utils/date.d.ts +0 -1
- package/lib/cjs/utils/date.js +0 -10
- package/lib/cjs/utils/fillMissingData.d.ts +0 -6
- package/lib/cjs/utils/fillMissingData.js +0 -16
- package/lib/cjs/utils/formatter.d.ts +0 -2
- package/lib/cjs/utils/formatter.js +0 -7
- package/lib/cjs/utils/getUniqueDates.d.ts +0 -5
- package/lib/cjs/utils/getUniqueDates.js +0 -13
- package/lib/cjs/utils/number.d.ts +0 -4
- package/lib/cjs/utils/number.js +0 -27
- package/lib/cjs/utils/string.d.ts +0 -10
- package/lib/cjs/utils/string.js +0 -73
- package/lib/cjs/utils/xpath.d.ts +0 -6
- package/lib/cjs/utils/xpath.js +0 -23
|
@@ -1,58 +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
|
-
}
|
|
33
|
-
export interface DataSetCommon {
|
|
34
|
-
label: string;
|
|
35
|
-
data: {
|
|
36
|
-
x: string;
|
|
37
|
-
y: number;
|
|
38
|
-
}[];
|
|
39
|
-
borderColor?: string;
|
|
40
|
-
backgroundColor?: string;
|
|
41
|
-
borderWidth?: number;
|
|
42
|
-
yAxisID?: "y" | "y2";
|
|
43
|
-
}
|
|
44
|
-
export interface DataSetLine extends DataSetCommon {
|
|
45
|
-
type: "line";
|
|
46
|
-
tension?: number;
|
|
47
|
-
spanGaps: boolean;
|
|
48
|
-
showLine: boolean;
|
|
49
|
-
pointRadius: number;
|
|
50
|
-
fill?: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface DataSetBar extends DataSetCommon {
|
|
53
|
-
type: "bar";
|
|
54
|
-
borderRadius?: number;
|
|
55
|
-
categoryPercentage?: number;
|
|
56
|
-
barPercentage?: number;
|
|
57
|
-
}
|
|
58
|
-
export type TimeFilter = "1y" | "6m" | "1m" | "all";
|
|
@@ -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;
|
|
6
|
-
})[]>[];
|
|
7
|
-
export declare function getChartOptions(timeFilter: TimeFilter): ChartOptions<"line" | "bar">;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.getChartOptions = exports.createDatasets = void 0;
|
|
15
|
-
var date_fns_1 = require("date-fns");
|
|
16
|
-
var dataManipulation_1 = require("./dataManipulation");
|
|
17
|
-
function createDatasets(data, uniqueDates, timeFilter) {
|
|
18
|
-
var _a = (0, dataManipulation_1.getBarSettings)(timeFilter), categoryPercentage = _a.categoryPercentage, barPercentage = _a.barPercentage;
|
|
19
|
-
var createDataSet = function (entries, label, borderColor, chartType, valueKey, yAxisID) {
|
|
20
|
-
var dateValues = new Map(entries.map(function (entry) {
|
|
21
|
-
var _a;
|
|
22
|
-
return [
|
|
23
|
-
(0, date_fns_1.format)(typeof entry.data === "string" ? (0, date_fns_1.parseISO)(entry.data) : entry.data, "yyyy-MM-dd"),
|
|
24
|
-
(_a = entry[valueKey]) !== null && _a !== void 0 ? _a : 0,
|
|
25
|
-
];
|
|
26
|
-
}));
|
|
27
|
-
var datasetData = uniqueDates.map(function (date) {
|
|
28
|
-
var _a;
|
|
29
|
-
var value = (_a = dateValues.get(date)) !== null && _a !== void 0 ? _a : 0;
|
|
30
|
-
return { x: date, y: value };
|
|
31
|
-
});
|
|
32
|
-
var datasetConfiguration = __assign({ type: chartType, label: label, data: datasetData, borderColor: borderColor, backgroundColor: chartType === "bar" ? borderColor + "60" : undefined, tension: chartType === "line" ? 0.4 : undefined, spanGaps: true, showLine: chartType === "line", pointRadius: 2, yAxisID: yAxisID }, (chartType === "bar" && {
|
|
33
|
-
categoryPercentage: categoryPercentage,
|
|
34
|
-
barPercentage: barPercentage,
|
|
35
|
-
}));
|
|
36
|
-
return datasetConfiguration;
|
|
37
|
-
};
|
|
38
|
-
return [
|
|
39
|
-
createDataSet(data.protestos, "Protestos - Quantidade", "#ff4081", "line", "quantidade", "y"),
|
|
40
|
-
createDataSet(data.protestos, "Protestos - Valor Total", "#ff4081", "bar", "valorTotal", "y2"),
|
|
41
|
-
createDataSet(data.ccfs, "CCFs - Quantidade", "#3f51b5", "line", "quantidade", "y"),
|
|
42
|
-
createDataSet(data.ccfs, "CCFs - Valor Total", "#3f51b5", "bar", "valorTotal", "y2"),
|
|
43
|
-
createDataSet(data.serasa, "Serasa - Quantidade", "#008cf8", "line", "quantidade", "y"),
|
|
44
|
-
createDataSet(data.serasa, "Serasa - Valor Total", "#008cf8", "bar", "valorTotal", "y2"),
|
|
45
|
-
createDataSet(data.boaVista, "Boa Vista - Quantidade", "#ffc107", "line", "quantidade", "y"),
|
|
46
|
-
createDataSet(data.boaVista, "Boa Vista - Valor Total", "#ffc107", "bar", "valorTotal", "y2"),
|
|
47
|
-
createDataSet(data.dividasPublicasGrafico, "Dívidas Públicas - Quantidade", "#4caf50", "line", "quantidade", "y"),
|
|
48
|
-
createDataSet(data.dividasPublicasGrafico, "Dívidas Públicas - Valor Total", "#4caf50", "bar", "valorTotal", "y2"),
|
|
49
|
-
];
|
|
50
|
-
}
|
|
51
|
-
exports.createDatasets = createDatasets;
|
|
52
|
-
function getChartOptions(timeFilter) {
|
|
53
|
-
var unit = "day";
|
|
54
|
-
switch (timeFilter) {
|
|
55
|
-
case "1m":
|
|
56
|
-
unit = "day";
|
|
57
|
-
break;
|
|
58
|
-
case "6m":
|
|
59
|
-
unit = "week";
|
|
60
|
-
break;
|
|
61
|
-
case "1y":
|
|
62
|
-
unit = "month";
|
|
63
|
-
break;
|
|
64
|
-
case "all":
|
|
65
|
-
unit = "quarter";
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
responsive: true,
|
|
70
|
-
maintainAspectRatio: true,
|
|
71
|
-
interaction: {
|
|
72
|
-
mode: "index",
|
|
73
|
-
intersect: false,
|
|
74
|
-
},
|
|
75
|
-
plugins: {
|
|
76
|
-
legend: {
|
|
77
|
-
fullSize: true,
|
|
78
|
-
position: "right",
|
|
79
|
-
labels: {
|
|
80
|
-
boxWidth: 16,
|
|
81
|
-
padding: 16,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
title: {
|
|
85
|
-
display: true,
|
|
86
|
-
text: "Histórico de Consultas",
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
scales: {
|
|
90
|
-
y: {
|
|
91
|
-
type: "linear",
|
|
92
|
-
display: true,
|
|
93
|
-
position: "right",
|
|
94
|
-
beginAtZero: true,
|
|
95
|
-
title: {
|
|
96
|
-
display: true,
|
|
97
|
-
text: "Quantidade de Ocorrências por Consulta",
|
|
98
|
-
font: {
|
|
99
|
-
size: 14,
|
|
100
|
-
family: "open sans",
|
|
101
|
-
weight: "bold",
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
y2: {
|
|
106
|
-
type: "logarithmic",
|
|
107
|
-
display: true,
|
|
108
|
-
position: "left",
|
|
109
|
-
suggestedMin: 1,
|
|
110
|
-
title: {
|
|
111
|
-
display: true,
|
|
112
|
-
text: "Valor Total de Negativações (R$)",
|
|
113
|
-
font: {
|
|
114
|
-
size: 14,
|
|
115
|
-
family: "open sans",
|
|
116
|
-
weight: "bold",
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
grid: {
|
|
120
|
-
drawOnChartArea: false,
|
|
121
|
-
},
|
|
122
|
-
ticks: {
|
|
123
|
-
font: {
|
|
124
|
-
size: 12,
|
|
125
|
-
},
|
|
126
|
-
callback: function (value) {
|
|
127
|
-
return new Intl.NumberFormat("pt-BR", {
|
|
128
|
-
style: "currency",
|
|
129
|
-
currency: "BRL",
|
|
130
|
-
minimumFractionDigits: 2,
|
|
131
|
-
notation: "compact",
|
|
132
|
-
}).format(value);
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
x: {
|
|
137
|
-
type: "time",
|
|
138
|
-
time: {
|
|
139
|
-
unit: unit,
|
|
140
|
-
parser: "yyyy-MM-dd",
|
|
141
|
-
},
|
|
142
|
-
title: {
|
|
143
|
-
display: true,
|
|
144
|
-
text: "Data",
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
elements: {
|
|
149
|
-
line: {
|
|
150
|
-
fill: false,
|
|
151
|
-
tension: 0.4,
|
|
152
|
-
},
|
|
153
|
-
point: {
|
|
154
|
-
radius: 3,
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
exports.getChartOptions = getChartOptions;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ItemCalculo } from "../../../utils/calculation";
|
|
2
|
-
export declare const useCalculation: (itens: ItemCalculo[]) => {
|
|
3
|
-
quantidade: number;
|
|
4
|
-
valorTotal: number;
|
|
5
|
-
dataMaisRecente: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const useUltimaOcorrenciaCCF: () => string | undefined;
|
|
8
|
-
export declare const useDividasPublicas: () => {
|
|
9
|
-
quantidade: number;
|
|
10
|
-
valorTotal: number;
|
|
11
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useDividasPublicas = exports.useUltimaOcorrenciaCCF = exports.useCalculation = void 0;
|
|
7
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
8
|
-
var react_1 = require("react");
|
|
9
|
-
var calculation_1 = require("../../../utils/calculation");
|
|
10
|
-
var webservice_1 = require("../../../components/webservice");
|
|
11
|
-
var xpath_1 = __importDefault(require("../../../utils/xpath"));
|
|
12
|
-
var useCalculation = function (itens) {
|
|
13
|
-
var quantidade = (0, react_1.useMemo)(function () { return (0, calculation_1.somarQuantidades)(itens); }, [itens]);
|
|
14
|
-
var valorTotal = (0, react_1.useMemo)(function () { return (0, calculation_1.somarValoresTotais)(itens); }, [itens]);
|
|
15
|
-
var dataMaisRecente = (0, react_1.useMemo)(function () { return (0, calculation_1.encontrarDataMaisRecente)(itens); }, [itens]);
|
|
16
|
-
return { quantidade: quantidade, valorTotal: valorTotal, dataMaisRecente: dataMaisRecente };
|
|
17
|
-
};
|
|
18
|
-
exports.useCalculation = useCalculation;
|
|
19
|
-
var useUltimaOcorrenciaCCF = function () {
|
|
20
|
-
var ctxCCF = (0, react_1.useContext)(webservice_1.Queries.CCF);
|
|
21
|
-
var ultimaOcorrenciaCCF = (0, react_1.useMemo)(function () {
|
|
22
|
-
if ((ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.type) === webservice_1.RequestStatus.Success) {
|
|
23
|
-
return xpath_1.default.select("string(//ultimaOcorrencia)", ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.document);
|
|
24
|
-
}
|
|
25
|
-
return undefined;
|
|
26
|
-
}, [ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.type]);
|
|
27
|
-
return ultimaOcorrenciaCCF;
|
|
28
|
-
};
|
|
29
|
-
exports.useUltimaOcorrenciaCCF = useUltimaOcorrenciaCCF;
|
|
30
|
-
var useDividasPublicas = function () {
|
|
31
|
-
var ctxFinder = (0, react_1.useContext)(webservice_1.Queries.Finder);
|
|
32
|
-
var dividasPublicasData = (0, react_1.useMemo)(function () {
|
|
33
|
-
if ((ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.type) === webservice_1.RequestStatus.Success) {
|
|
34
|
-
return {
|
|
35
|
-
quantidade: xpath_1.default.select("number(//dividas/resumo/quantidade_dividas)", ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.document) || 0,
|
|
36
|
-
valorTotal: xpath_1.default.select("number(//dividas/resumo/valor_total_dividas)", ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.document) || 0,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
quantidade: 0,
|
|
41
|
-
valorTotal: 0,
|
|
42
|
-
};
|
|
43
|
-
}, [ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.type]);
|
|
44
|
-
return dividasPublicasData;
|
|
45
|
-
};
|
|
46
|
-
exports.useDividasPublicas = useDividasPublicas;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Consulta, DataInput, TimeFilter } from "../types/iChart";
|
|
2
|
-
export declare const addMissingDateEntries: (data: Consulta[], startDate: Date, endDate: Date) => Consulta[];
|
|
3
|
-
export declare const getFilteredStartDate: (timeFilter: TimeFilter, data: DataInput) => Date;
|
|
4
|
-
export declare const getEarliestDate: (data: DataInput) => Date;
|
|
5
|
-
export declare const getEndDate: () => Date;
|
|
6
|
-
export declare function getUniqueDates(data: DataInput): string[];
|
|
7
|
-
export declare const getBarSettings: (timeFilter: TimeFilter) => {
|
|
8
|
-
categoryPercentage: number;
|
|
9
|
-
barPercentage: number;
|
|
10
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.getBarSettings = exports.getUniqueDates = exports.getEndDate = exports.getEarliestDate = exports.getFilteredStartDate = exports.addMissingDateEntries = void 0;
|
|
24
|
-
var underscore_1 = require("underscore");
|
|
25
|
-
var date_fns_1 = require("date-fns");
|
|
26
|
-
var addMissingDateEntries = function (data, startDate, endDate) {
|
|
27
|
-
var datesInRange = (0, date_fns_1.eachDayOfInterval)({
|
|
28
|
-
start: startDate,
|
|
29
|
-
end: endDate,
|
|
30
|
-
}).map(function (date) { return (0, date_fns_1.format)(date, "yyyy-MM-dd"); });
|
|
31
|
-
var lastKnownQuantidade;
|
|
32
|
-
var lastKnownValorTotal;
|
|
33
|
-
var formattedData = data.map(function (entry) { return (__assign(__assign({}, entry), { data: (0, date_fns_1.format)(typeof entry.data === "string" ? (0, date_fns_1.parseISO)(entry.data) : entry.data, "yyyy-MM-dd"), quantidade: entry.quantidade !== null ? entry.quantidade : lastKnownQuantidade, valorTotal: entry.valorTotal !== null ? entry.valorTotal : lastKnownValorTotal })); });
|
|
34
|
-
var dataMap = new Map(formattedData.map(function (entry) { return [entry.data, entry]; }));
|
|
35
|
-
return datesInRange.map(function (dateStr) {
|
|
36
|
-
var existingEntry = dataMap.get(dateStr);
|
|
37
|
-
if (existingEntry) {
|
|
38
|
-
lastKnownQuantidade = existingEntry.quantidade;
|
|
39
|
-
lastKnownValorTotal = existingEntry.valorTotal;
|
|
40
|
-
return existingEntry;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
data: dateStr,
|
|
44
|
-
quantidade: lastKnownQuantidade,
|
|
45
|
-
valorTotal: null,
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
exports.addMissingDateEntries = addMissingDateEntries;
|
|
50
|
-
var getFilteredStartDate = function (timeFilter, data) {
|
|
51
|
-
var now = new Date();
|
|
52
|
-
switch (timeFilter) {
|
|
53
|
-
case "1y":
|
|
54
|
-
return (0, date_fns_1.subYears)(now, 1);
|
|
55
|
-
case "6m":
|
|
56
|
-
return (0, date_fns_1.subMonths)(now, 6);
|
|
57
|
-
case "1m":
|
|
58
|
-
return (0, date_fns_1.subMonths)(now, 1);
|
|
59
|
-
case "all":
|
|
60
|
-
return (0, exports.getEarliestDate)(data);
|
|
61
|
-
default:
|
|
62
|
-
console.warn("TimeFilter not recognized: ".concat(timeFilter, ", defaulting to current date."));
|
|
63
|
-
return now;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
exports.getFilteredStartDate = getFilteredStartDate;
|
|
67
|
-
var getEarliestDate = function (data) {
|
|
68
|
-
var allDates = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], data.protestos, true), data.ccfs, true), data.serasa, true), data.boaVista, true), data.dividasPublicasGrafico, true).map(function (entry) { return entry.data; })
|
|
69
|
-
.filter(function (date) { return date !== undefined; })
|
|
70
|
-
.map(function (date) { return (typeof date === "string" ? (0, date_fns_1.parseISO)(date) : date); })
|
|
71
|
-
.filter(date_fns_1.isValid);
|
|
72
|
-
return allDates.length > 0 ? (0, date_fns_1.min)(allDates) : new Date();
|
|
73
|
-
};
|
|
74
|
-
exports.getEarliestDate = getEarliestDate;
|
|
75
|
-
var getEndDate = function () {
|
|
76
|
-
return new Date();
|
|
77
|
-
};
|
|
78
|
-
exports.getEndDate = getEndDate;
|
|
79
|
-
function getUniqueDates(data) {
|
|
80
|
-
var allEntries = (0, underscore_1.union)(data.protestos, data.ccfs, data.serasa, data.boaVista, data.dividasPublicasGrafico);
|
|
81
|
-
var allDates = allEntries
|
|
82
|
-
.map(function (entry) {
|
|
83
|
-
var dateString = typeof entry.data === "string" ? entry.data : "";
|
|
84
|
-
var date = (0, date_fns_1.parseISO)(dateString);
|
|
85
|
-
return (0, date_fns_1.isValid)(date) ? (0, date_fns_1.format)(date, "yyyy-MM-dd") : "";
|
|
86
|
-
})
|
|
87
|
-
.filter(Boolean);
|
|
88
|
-
var uniqueSortedDates = Array.from(new Set(allDates)).sort();
|
|
89
|
-
return uniqueSortedDates;
|
|
90
|
-
}
|
|
91
|
-
exports.getUniqueDates = getUniqueDates;
|
|
92
|
-
var getBarSettings = function (timeFilter) {
|
|
93
|
-
switch (timeFilter) {
|
|
94
|
-
case "1m":
|
|
95
|
-
return { categoryPercentage: 1.5, barPercentage: 1.5 };
|
|
96
|
-
case "6m":
|
|
97
|
-
return { categoryPercentage: 2.1, barPercentage: 2.1 };
|
|
98
|
-
case "1y":
|
|
99
|
-
return { categoryPercentage: 3.5, barPercentage: 3.5 };
|
|
100
|
-
case "all":
|
|
101
|
-
return { categoryPercentage: 7, barPercentage: 7 };
|
|
102
|
-
default:
|
|
103
|
-
return { categoryPercentage: 1.5, barPercentage: 1.5 };
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
exports.getBarSettings = getBarSettings;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.processProtestData = exports.processData = void 0;
|
|
18
|
-
var string_1 = require("../../../utils/string");
|
|
19
|
-
var underscore_1 = require("underscore");
|
|
20
|
-
var xpath_1 = __importDefault(require("../../../utils/xpath"));
|
|
21
|
-
var regex_1 = require("../../../constants/regex");
|
|
22
|
-
var processData = function (data, quantidadeProcessosJuridicos) {
|
|
23
|
-
var removeZeros = function (current, index, arr) {
|
|
24
|
-
return (index === 0 || index === arr.length - 1 || Number(current.quantidade) > 0);
|
|
25
|
-
};
|
|
26
|
-
var removeSameAsNext = function (current, index, arr) {
|
|
27
|
-
if (index === 0 || index === arr.length - 1)
|
|
28
|
-
return true;
|
|
29
|
-
return current.quantidade !== arr[index + 1].quantidade;
|
|
30
|
-
};
|
|
31
|
-
data.pieChartTotalConfig = {
|
|
32
|
-
processosJuridicos: quantidadeProcessosJuridicos,
|
|
33
|
-
};
|
|
34
|
-
var grouped = (0, underscore_1.groupBy)(data.protestos, function (e) { return e.data; });
|
|
35
|
-
data.protestos = Object.values(grouped)
|
|
36
|
-
.map(function (e) {
|
|
37
|
-
if (e.length === 1)
|
|
38
|
-
return e;
|
|
39
|
-
return e.filter(function (el) { return Number(el.quantidade) > 0; });
|
|
40
|
-
})
|
|
41
|
-
.flat();
|
|
42
|
-
data.protestos = (0, underscore_1.sortBy)((0, underscore_1.unique)(data.protestos, function (x) { return x.data; })
|
|
43
|
-
.filter(removeZeros)
|
|
44
|
-
.filter(removeSameAsNext)
|
|
45
|
-
.map(function (info) { return (__assign(__assign({}, info), { data: (0, string_1.formatDatePtBrToDate)(info.data) })); }), function (info) { return info.data; });
|
|
46
|
-
data.ccfs = (0, underscore_1.sortBy)((0, underscore_1.unique)(data.ccfs, function (x) { return x.data; })
|
|
47
|
-
.filter(removeZeros)
|
|
48
|
-
.filter(removeSameAsNext)
|
|
49
|
-
.map(function (info) { return (__assign(__assign({}, info), { data: (0, string_1.formatDatePtBrToDate)(info.data) })); }), function (info) { return info.data; });
|
|
50
|
-
data.boaVista = data.boaVista
|
|
51
|
-
.map(function (entry) {
|
|
52
|
-
var formattedDate = (0, string_1.formatDatePtBrToDate)(entry.creation);
|
|
53
|
-
return __assign(__assign({}, entry), { data: formattedDate, creation: undefined });
|
|
54
|
-
})
|
|
55
|
-
.filter(function (entry) { return entry.data; });
|
|
56
|
-
data.serasa = data.serasa
|
|
57
|
-
.map(function (entry) {
|
|
58
|
-
var formattedDate = (0, string_1.formatDatePtBrToDate)(entry.creation);
|
|
59
|
-
return __assign(__assign({}, entry), { data: formattedDate, creation: undefined });
|
|
60
|
-
})
|
|
61
|
-
.filter(function (entry) { return entry.data; });
|
|
62
|
-
data.dividasPublicasGrafico = data.dividasPublicasGrafico
|
|
63
|
-
.map(function (info) { return (__assign(__assign({}, info), { data: (0, string_1.formatDatePtBrToDate)(info.data), valorTotal: info.total, total: undefined })); })
|
|
64
|
-
.filter(function (info) { return info.data; });
|
|
65
|
-
return __assign(__assign({}, data), { protestos: data.protestos, ccfs: data.ccfs, boaVista: data.boaVista, serasa: data.serasa, dividasPublicasGrafico: data.dividasPublicasGrafico, pieChartTotalConfig: __assign(__assign({}, data.pieChartTotalConfig), { processosJuridicos: quantidadeProcessosJuridicos }) });
|
|
66
|
-
};
|
|
67
|
-
exports.processData = processData;
|
|
68
|
-
function processProtestData(document) {
|
|
69
|
-
var _a, _b;
|
|
70
|
-
var filterProtestos = function (regex, data) {
|
|
71
|
-
return xpath_1.default.selectArray("//body//protesto", data).filter(function (protesto) {
|
|
72
|
-
return regex.test(xpath_1.default.select("string(./nomeCedente)", protesto));
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
return [
|
|
76
|
-
{
|
|
77
|
-
categoria: "Protestos de Crédito",
|
|
78
|
-
quantidade: (_a = filterProtestos(regex_1.REGEX_PROTESTOS_DE_CREDITO, document)) === null || _a === void 0 ? void 0 : _a.length,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
categoria: "Protestos de Impostos",
|
|
82
|
-
quantidade: (_b = filterProtestos(regex_1.REGEX_PROTESTOS_DE_IMPOSTO, document)) === null || _b === void 0 ? void 0 : _b.length,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
categoria: "Protestos Gerais",
|
|
86
|
-
quantidade: xpath_1.default.selectArray("//body//protesto", document).filter(function (protesto) {
|
|
87
|
-
var nomeCedente = xpath_1.default.select("string(./nomeCedente)", protesto);
|
|
88
|
-
return (!regex_1.REGEX_PROTESTOS_DE_IMPOSTO.test(nomeCedente) &&
|
|
89
|
-
!regex_1.REGEX_PROTESTOS_DE_CREDITO.test(nomeCedente));
|
|
90
|
-
}).length,
|
|
91
|
-
},
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
exports.processProtestData = processProtestData;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, DetailedHTMLProps, HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
export interface AddItemProps extends React.PropsWithChildren<{
|
|
3
|
-
name: ReactNode;
|
|
4
|
-
value: ReactNode;
|
|
5
|
-
valueClassName?: string;
|
|
6
|
-
nameClassName?: string;
|
|
7
|
-
styleName?: CSSProperties;
|
|
8
|
-
} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>> {
|
|
9
|
-
}
|
|
10
|
-
declare function AddItemField({ name, value, children, className, valueClassName, nameClassName, styleName, defaultValue, ...props }: AddItemProps): React.JSX.Element;
|
|
11
|
-
export default AddItemField;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var react_1 = __importDefault(require("react"));
|
|
33
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
34
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
35
|
-
var theme_1 = __importDefault(require("../interface/theme"));
|
|
36
|
-
var FieldName = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n/* Body 12 */\nfont-family: 'Open Sans Condensed';\nfont-style: ", ";\nfont-weight: ", ";\nfont-size: ", ";\nline-height: ", ";\n\n/* Cinza Escuro */\ncolor: ", ";\n"], ["\n/* Body 12 */\nfont-family: 'Open Sans Condensed';\nfont-style: ", ";\nfont-weight: ", ";\nfont-size: ", ";\nline-height: ", ";\n\n/* Cinza Escuro */\ncolor: ", ";\n"])), theme_1.default.typography.body12.fontStyle, theme_1.default.typography.body12.fontWeight, theme_1.default.typography.body12.fontSize, theme_1.default.typography.body12.lineHeight, theme_1.default.colors.cinzaEscuro);
|
|
37
|
-
var FieldValue = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n/* Headline 16 */\nfont-family: 'Open Sans Condensed';\nfont-style: ", ";\nfont-weight: ", ";\nfont-size: ", ";\nline-height: ", ";\n/* or 225% */\n\n/* Cinza Escuro */\ncolor: ", ";\n\n"], ["\n/* Headline 16 */\nfont-family: 'Open Sans Condensed';\nfont-style: ", ";\nfont-weight: ", ";\nfont-size: ", ";\nline-height: ", ";\n/* or 225% */\n\n/* Cinza Escuro */\ncolor: ", ";\n\n"])), theme_1.default.typography.headline16.fontStyle, theme_1.default.typography.headline16.fontWeight, theme_1.default.typography.headline16.fontSize, theme_1.default.typography.headline16.lineHeight, theme_1.default.colors.cinzaEscuro);
|
|
38
|
-
function AddItemField(_a) {
|
|
39
|
-
var name = _a.name, value = _a.value, children = _a.children, className = _a.className, valueClassName = _a.valueClassName, nameClassName = _a.nameClassName, styleName = _a.styleName, _b = _a.defaultValue, defaultValue = _b === void 0 ? '----' : _b, props = __rest(_a, ["name", "value", "children", "className", "valueClassName", "nameClassName", "styleName", "defaultValue"]);
|
|
40
|
-
var fieldClassName = (0, classnames_1.default)(className);
|
|
41
|
-
var valueClass = (0, classnames_1.default)(valueClassName);
|
|
42
|
-
var nameClass = (0, classnames_1.default)(nameClassName);
|
|
43
|
-
return (react_1.default.createElement("div", __assign({}, props, { className: fieldClassName }),
|
|
44
|
-
react_1.default.createElement(FieldName, { className: nameClass, style: styleName }, name),
|
|
45
|
-
react_1.default.createElement(FieldValue, { className: valueClass }, value || defaultValue),
|
|
46
|
-
children));
|
|
47
|
-
}
|
|
48
|
-
exports.default = AddItemField;
|
|
49
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
33
|
-
var react_1 = __importDefault(require("react"));
|
|
34
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
35
|
-
var theme_1 = __importDefault(require("../interface/theme"));
|
|
36
|
-
var StyledButton = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius: 3.75rem;\n cursor: pointer;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n \n transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;\n\n &:hover {\n background-color: #0056b3;\n }\n\n width: 100% !important;\n"], ["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius: 3.75rem;\n cursor: pointer;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n \n transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;\n\n &:hover {\n background-color: #0056b3;\n }\n\n width: 100% !important;\n"])), theme_1.default.typography.headline14.fontStyle, theme_1.default.typography.headline14.fontWeight, theme_1.default.typography.headline14.fontSize, theme_1.default.typography.headline14.lineHeight, theme_1.default.colors.azulCredithub, theme_1.default.colors.white);
|
|
37
|
-
var SmallContent = styled_components_1.default.small(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: #fdeb35;\n display: block;\n margin-top: 0.25rem;\n"], ["\n color: #fdeb35;\n display: block;\n margin-top: 0.25rem;\n"])));
|
|
38
|
-
var Button = function (_a) {
|
|
39
|
-
var children = _a.children, className = _a.className, smallContent = _a.smallContent, props = __rest(_a, ["children", "className", "smallContent"]);
|
|
40
|
-
var buttonClassName = (0, classnames_1.default)(className);
|
|
41
|
-
return (react_1.default.createElement(StyledButton, __assign({ className: buttonClassName }, props),
|
|
42
|
-
react_1.default.createElement("span", null, children),
|
|
43
|
-
smallContent && react_1.default.createElement(SmallContent, null, smallContent)));
|
|
44
|
-
};
|
|
45
|
-
exports.default = Button;
|
|
46
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var react_elastic_carousel_1 = __importDefault(require("@itseasy21/react-elastic-carousel"));
|
|
20
|
-
var CustomCarousel = function (props, ref) {
|
|
21
|
-
return react_1.default.createElement(react_elastic_carousel_1.default, __assign({}, props, { ref: ref }));
|
|
22
|
-
};
|
|
23
|
-
var Carousel = react_1.default.forwardRef(CustomCarousel);
|
|
24
|
-
exports.default = Carousel;
|