@credithub/harlan-components 1.13.9 → 1.15.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 +48432 -65
- package/lib/esm/components/chart/chartContent.d.ts +3 -4
- package/lib/esm/components/chart/chartContent.js +41 -50
- package/lib/esm/components/chart/chartSystem.d.ts +6 -0
- package/lib/esm/components/chart/chartSystem.js +45 -0
- package/lib/esm/components/chart/components/MixedChart.d.ts +7 -0
- package/lib/esm/components/chart/components/MixedChart.js +30 -0
- package/lib/esm/components/chart/components/PieChart.d.ts +7 -0
- package/lib/esm/components/chart/components/PieChart.js +9 -0
- package/lib/esm/components/chart/components/categoryProtestos.d.ts +7 -0
- package/lib/esm/components/chart/components/categoryProtestos.js +17 -0
- package/lib/esm/components/chart/hooks/useCategoryProtestos.d.ts +6 -0
- package/lib/esm/components/chart/hooks/useCategoryProtestos.js +71 -0
- package/lib/esm/components/chart/hooks/useChartData.d.ts +8 -0
- package/lib/esm/components/chart/hooks/useChartData.js +59 -0
- package/lib/esm/components/chart/hooks/useMixedChartData.d.ts +10 -0
- package/lib/esm/components/chart/hooks/useMixedChartData.js +43 -0
- package/lib/esm/components/chart/hooks/usePieChartData.d.ts +6 -0
- package/lib/esm/components/chart/hooks/usePieChartData.js +89 -0
- package/lib/esm/components/chart/quantityResult.js +23 -22
- package/lib/esm/components/chart/types/iChart.d.ts +58 -0
- package/lib/esm/components/chart/utils/chartCustomization.d.ts +7 -0
- package/lib/esm/components/chart/utils/chartCustomization.js +154 -0
- package/lib/esm/components/chart/utils/chartUtils.d.ts +11 -0
- package/lib/esm/components/chart/utils/chartUtils.js +37 -0
- package/lib/esm/components/chart/utils/dataManipulation.d.ts +10 -0
- package/lib/esm/components/chart/utils/dataManipulation.js +97 -0
- package/lib/esm/components/chart/utils/dataProcessing.d.ts +3 -0
- package/lib/esm/components/chart/utils/dataProcessing.js +86 -0
- package/lib/esm/consultaSimples.js +5 -3
- package/lib/esm/hooks/useWindowSize.d.ts +4 -0
- package/lib/esm/hooks/useWindowSize.js +19 -0
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +4 -1
- package/lib/esm/utils/fillMissingData.d.ts +6 -0
- package/lib/esm/utils/fillMissingData.js +12 -0
- package/lib/esm/utils/getUniqueDates.d.ts +5 -0
- package/lib/esm/utils/getUniqueDates.js +9 -0
- package/package.json +12 -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/categoryProtestos.d.ts +0 -4
- package/lib/cjs/components/chart/categoryProtestos.js +0 -97
- package/lib/cjs/components/chart/chartContent.d.ts +0 -7
- package/lib/cjs/components/chart/chartContent.js +0 -87
- package/lib/cjs/components/chart/chartHelper.d.ts +0 -7
- package/lib/cjs/components/chart/chartHelper.js +0 -66
- package/lib/cjs/components/chart/customChart.d.ts +0 -10
- package/lib/cjs/components/chart/customChart.js +0 -142
- package/lib/cjs/components/chart/getUniqueDates.d.ts +0 -2
- package/lib/cjs/components/chart/getUniqueDates.js +0 -8
- package/lib/cjs/components/chart/plotly/barChartDataStrategy.d.ts +0 -14
- package/lib/cjs/components/chart/plotly/barChartDataStrategy.js +0 -152
- package/lib/cjs/components/chart/plotly/baseChartDataStrategy.d.ts +0 -8
- package/lib/cjs/components/chart/plotly/baseChartDataStrategy.js +0 -31
- package/lib/cjs/components/chart/plotly/getSeries.d.ts +0 -3
- package/lib/cjs/components/chart/plotly/getSeries.js +0 -35
- package/lib/cjs/components/chart/plotly/iChartDataStrategy.d.ts +0 -35
- package/lib/cjs/components/chart/plotly/iChartDataStrategy.js +0 -2
- package/lib/cjs/components/chart/plotly/index.d.ts +0 -5
- package/lib/cjs/components/chart/plotly/index.js +0 -20
- package/lib/cjs/components/chart/plotly/layoutLineBarChart.d.ts +0 -39
- package/lib/cjs/components/chart/plotly/layoutLineBarChart.js +0 -67
- package/lib/cjs/components/chart/plotly/lineChartDataStrategy.d.ts +0 -17
- package/lib/cjs/components/chart/plotly/lineChartDataStrategy.js +0 -198
- package/lib/cjs/components/chart/plotly/pieChartDataStrategy.d.ts +0 -5
- package/lib/cjs/components/chart/plotly/pieChartDataStrategy.js +0 -45
- package/lib/cjs/components/chart/plotly/types.d.ts +0 -40
- package/lib/cjs/components/chart/plotly/types.js +0 -2
- package/lib/cjs/components/chart/processChartData.d.ts +0 -5
- package/lib/cjs/components/chart/processChartData.js +0 -41
- package/lib/cjs/components/chart/quantityResult.d.ts +0 -17
- package/lib/cjs/components/chart/quantityResult.js +0 -45
- package/lib/cjs/components/chart/useCalculation.d.ts +0 -6
- package/lib/cjs/components/chart/useCalculation.js +0 -12
- package/lib/cjs/components/chart/useDividasPublicas.d.ts +0 -5
- package/lib/cjs/components/chart/useDividasPublicas.js +0 -26
- package/lib/cjs/components/chart/useUltimaOcorrenciaCCF.d.ts +0 -2
- package/lib/cjs/components/chart/useUltimaOcorrenciaCCF.js +0 -20
- 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 -59
- 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/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/formatter.d.ts +0 -2
- package/lib/cjs/utils/formatter.js +0 -7
- 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
- package/lib/esm/components/chart/categoryProtestos.d.ts +0 -4
- package/lib/esm/components/chart/categoryProtestos.js +0 -69
- package/lib/esm/components/chart/chartHelper.d.ts +0 -7
- package/lib/esm/components/chart/chartHelper.js +0 -60
- package/lib/esm/components/chart/customChart.d.ts +0 -10
- package/lib/esm/components/chart/customChart.js +0 -112
- package/lib/esm/components/chart/getUniqueDates.d.ts +0 -2
- package/lib/esm/components/chart/getUniqueDates.js +0 -4
- package/lib/esm/components/chart/plotly/barChartDataStrategy.d.ts +0 -14
- package/lib/esm/components/chart/plotly/barChartDataStrategy.js +0 -149
- package/lib/esm/components/chart/plotly/baseChartDataStrategy.d.ts +0 -8
- package/lib/esm/components/chart/plotly/baseChartDataStrategy.js +0 -28
- package/lib/esm/components/chart/plotly/getSeries.d.ts +0 -3
- package/lib/esm/components/chart/plotly/getSeries.js +0 -31
- package/lib/esm/components/chart/plotly/iChartDataStrategy.d.ts +0 -35
- package/lib/esm/components/chart/plotly/index.d.ts +0 -5
- package/lib/esm/components/chart/plotly/index.js +0 -5
- package/lib/esm/components/chart/plotly/layoutLineBarChart.d.ts +0 -39
- package/lib/esm/components/chart/plotly/layoutLineBarChart.js +0 -64
- package/lib/esm/components/chart/plotly/lineChartDataStrategy.d.ts +0 -17
- package/lib/esm/components/chart/plotly/lineChartDataStrategy.js +0 -195
- package/lib/esm/components/chart/plotly/pieChartDataStrategy.d.ts +0 -5
- package/lib/esm/components/chart/plotly/pieChartDataStrategy.js +0 -42
- package/lib/esm/components/chart/plotly/types.d.ts +0 -40
- package/lib/esm/components/chart/plotly/types.js +0 -1
- package/lib/esm/components/chart/processChartData.d.ts +0 -5
- package/lib/esm/components/chart/processChartData.js +0 -37
- package/lib/esm/components/chart/useCalculation.d.ts +0 -6
- package/lib/esm/components/chart/useCalculation.js +0 -8
- package/lib/esm/components/chart/useDividasPublicas.d.ts +0 -5
- package/lib/esm/components/chart/useDividasPublicas.js +0 -21
- package/lib/esm/components/chart/useUltimaOcorrenciaCCF.d.ts +0 -2
- package/lib/esm/components/chart/useUltimaOcorrenciaCCF.js +0 -15
- /package/lib/esm/components/chart/{plotly/iChartDataStrategy.js → types/iChart.js} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ChartDataState } from "./iChartDataStrategy";
|
|
2
|
-
import { LayoutConfig } from "./layoutLineBarChart";
|
|
3
|
-
export interface Consulta {
|
|
4
|
-
data: string | Date;
|
|
5
|
-
categoria?: string;
|
|
6
|
-
quantidade: number | null;
|
|
7
|
-
creation?: string | Date;
|
|
8
|
-
valorTotal: number | null;
|
|
9
|
-
}
|
|
10
|
-
export interface DataInput {
|
|
11
|
-
ccfs: Consulta[];
|
|
12
|
-
protestos: Consulta[];
|
|
13
|
-
serasa: Consulta[];
|
|
14
|
-
boaVista: Consulta[];
|
|
15
|
-
dividasPublicas: {
|
|
16
|
-
quantidade: number;
|
|
17
|
-
valorTotal: number;
|
|
18
|
-
};
|
|
19
|
-
dividasPublicasGrafico: Consulta[];
|
|
20
|
-
pieChartTotalConfig?: {
|
|
21
|
-
protestos?: {
|
|
22
|
-
total: number | null;
|
|
23
|
-
valorTotal: number | null;
|
|
24
|
-
ultimaOcorrencia: string | null;
|
|
25
|
-
};
|
|
26
|
-
processosJuridicos?: number;
|
|
27
|
-
ccf?: {
|
|
28
|
-
total: number | null;
|
|
29
|
-
ultimaOcorrencia: string | null;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export interface CategoriaProtestoProps {
|
|
34
|
-
width?: number;
|
|
35
|
-
height?: number;
|
|
36
|
-
}
|
|
37
|
-
export type LineChartMode = "lines" | "markers" | "lines+markers" | "text+markers" | "text+lines" | "text+lines+markers";
|
|
38
|
-
export interface ChartDataAndLayoutState extends ChartDataState {
|
|
39
|
-
layout: LayoutConfig;
|
|
40
|
-
}
|
|
@@ -1,41 +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.processChartData = void 0;
|
|
15
|
-
var plotly_1 = require("./plotly");
|
|
16
|
-
var chartHelper_1 = require("./chartHelper");
|
|
17
|
-
var underscore_1 = require("underscore");
|
|
18
|
-
var processChartData = function (_a) {
|
|
19
|
-
var dataInput = _a.dataInput, dates = _a.dates;
|
|
20
|
-
var chartData = [];
|
|
21
|
-
var adicionarDatasFaltantes = function (dataset) { return dates.map(function (date) { return (0, underscore_1.find)(dataset, function (consulta) { return consulta.x === date; }) || ({ x: date, y: null }); }).flat(); };
|
|
22
|
-
var ordenarDatas = function (consultas) { return (0, underscore_1.sortBy)(consultas, function (consulta) { return consulta.x.getTime(); }); };
|
|
23
|
-
if (dataInput) {
|
|
24
|
-
var processedDataSets = (0, plotly_1.getSeries)(dataInput);
|
|
25
|
-
processedDataSets = processedDataSets.map(function (dataset) { return (__assign(__assign({}, dataset), { x: ordenarDatas(adicionarDatasFaltantes(dataset.data)) })); });
|
|
26
|
-
processedDataSets.forEach(function (dataSet) {
|
|
27
|
-
var chartDataAndLayout = __assign(__assign({}, dataSet), { layout: {} });
|
|
28
|
-
if (dataSet.type === "scatter") {
|
|
29
|
-
chartData.push((0, chartHelper_1.createLineChart)(chartDataAndLayout));
|
|
30
|
-
}
|
|
31
|
-
else if (dataSet.type === "bar") {
|
|
32
|
-
chartData.push((0, chartHelper_1.createBarChart)(chartDataAndLayout));
|
|
33
|
-
}
|
|
34
|
-
else if (dataSet.type === "pie") {
|
|
35
|
-
chartData.push((0, chartHelper_1.createPieChart)(chartDataAndLayout));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return chartData;
|
|
40
|
-
};
|
|
41
|
-
exports.processChartData = processChartData;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type QuantidadeResultadosProps = Partial<{
|
|
3
|
-
quantidadeProtestos: number;
|
|
4
|
-
quantidadeProcessos: number;
|
|
5
|
-
quantidadeDividas: number;
|
|
6
|
-
quantidadeChequesSemFundos: number;
|
|
7
|
-
quantidadeDividasSerasa: number;
|
|
8
|
-
quantidadeDividasBoaVista: number;
|
|
9
|
-
valorTotalProtestos: number;
|
|
10
|
-
valorTotalDividas: number;
|
|
11
|
-
valorTotalDividasSerasa: number;
|
|
12
|
-
valorTotalDividasBoaVista: number;
|
|
13
|
-
ultimaOcorrenciaProtestos: string;
|
|
14
|
-
ultimaOcorrenciaChequesSemFundos: string;
|
|
15
|
-
}>;
|
|
16
|
-
declare const QuantidadeResultados: React.FC<QuantidadeResultadosProps>;
|
|
17
|
-
export default QuantidadeResultados;
|
|
@@ -1,45 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
/* eslint-disable no-extra-boolean-cast */
|
|
11
|
-
var react_1 = __importDefault(require("react"));
|
|
12
|
-
var addItem_1 = __importDefault(require("../common/addItem"));
|
|
13
|
-
var number_1 = require("../../utils/number");
|
|
14
|
-
var result_1 = require("../interface/result");
|
|
15
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
16
|
-
var theme_1 = __importDefault(require("../interface/theme"));
|
|
17
|
-
var QuantityContainer = function (_a) {
|
|
18
|
-
var children = _a.children;
|
|
19
|
-
return react_1.default.createElement("div", { className: "t" }, children);
|
|
20
|
-
};
|
|
21
|
-
var QuantidadeResultadosWrapper = (0, styled_components_1.default)(result_1.ResultContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 18px 0px;\n row-gap: 20px;\n > * {\n row-gap: 10px;\n }\n @media only screen and (max-width: 768px) {\n > * {\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n }\n }\n \n"], ["\n padding: 18px 0px;\n row-gap: 20px;\n > * {\n row-gap: 10px;\n }\n @media only screen and (max-width: 768px) {\n > * {\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n }\n }\n \n"])), theme_1.default.colors.cinzaClaro);
|
|
22
|
-
var QuantidadeResultados = function (_a) {
|
|
23
|
-
var _b = _a.quantidadeProtestos, quantidadeProtestos = _b === void 0 ? 0 : _b, _c = _a.quantidadeProcessos, quantidadeProcessos = _c === void 0 ? 0 : _c, _d = _a.quantidadeDividas, quantidadeDividas = _d === void 0 ? 0 : _d, _e = _a.quantidadeChequesSemFundos, quantidadeChequesSemFundos = _e === void 0 ? 0 : _e, _f = _a.quantidadeDividasSerasa, quantidadeDividasSerasa = _f === void 0 ? 0 : _f, _g = _a.quantidadeDividasBoaVista, quantidadeDividasBoaVista = _g === void 0 ? 0 : _g, _h = _a.valorTotalProtestos, valorTotalProtestos = _h === void 0 ? 0 : _h, _j = _a.valorTotalDividas, valorTotalDividas = _j === void 0 ? 0 : _j, _k = _a.valorTotalDividasSerasa, valorTotalDividasSerasa = _k === void 0 ? 0 : _k, _l = _a.valorTotalDividasBoaVista, valorTotalDividasBoaVista = _l === void 0 ? 0 : _l, _m = _a.ultimaOcorrenciaProtestos, ultimaOcorrenciaProtestos = _m === void 0 ? null : _m, _o = _a.ultimaOcorrenciaChequesSemFundos, ultimaOcorrenciaChequesSemFundos = _o === void 0 ? null : _o;
|
|
24
|
-
return (react_1.default.createElement(QuantidadeResultadosWrapper, { desktop: "repeat(6, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr" },
|
|
25
|
-
react_1.default.createElement(QuantityContainer, null,
|
|
26
|
-
react_1.default.createElement(addItem_1.default, { name: "Total Protestos", value: (0, number_1.formatValue)(quantidadeProtestos) }),
|
|
27
|
-
react_1.default.createElement(addItem_1.default, { name: "Valor Total Protestos", value: (0, number_1.formatMoney)(valorTotalProtestos) }),
|
|
28
|
-
react_1.default.createElement(addItem_1.default, { hidden: quantidadeProtestos == 0, name: "\u00DAltima Ocorr\u00EAncia", value: ultimaOcorrenciaProtestos })),
|
|
29
|
-
react_1.default.createElement(QuantityContainer, null,
|
|
30
|
-
react_1.default.createElement(addItem_1.default, { name: "Cheques Sem Fundos", value: (0, number_1.formatValue)(quantidadeChequesSemFundos) }),
|
|
31
|
-
react_1.default.createElement(addItem_1.default, { hidden: quantidadeChequesSemFundos == 0, name: "\u00DAltima Ocorr\u00EAncia", value: ultimaOcorrenciaChequesSemFundos })),
|
|
32
|
-
react_1.default.createElement(QuantityContainer, null,
|
|
33
|
-
react_1.default.createElement(addItem_1.default, { name: "Processos Jur\u00EDdicos", value: (0, number_1.formatValue)(quantidadeProcessos) })),
|
|
34
|
-
react_1.default.createElement(QuantityContainer, null,
|
|
35
|
-
react_1.default.createElement(addItem_1.default, { name: "D\u00EDvidas P\u00FAblicas", value: (0, number_1.formatValue)(quantidadeDividas) }),
|
|
36
|
-
react_1.default.createElement(addItem_1.default, { name: "Total D\u00EDvidas P\u00FAblicas", value: (0, number_1.formatMoney)(valorTotalDividas) })),
|
|
37
|
-
react_1.default.createElement(QuantityContainer, null,
|
|
38
|
-
react_1.default.createElement(addItem_1.default, { name: "Pefin Refin Serasa", value: (0, number_1.formatValue)(quantidadeDividasSerasa) }),
|
|
39
|
-
react_1.default.createElement(addItem_1.default, { name: "Total Pefin Refin Serasa", value: (0, number_1.formatMoney)(valorTotalDividasSerasa) })),
|
|
40
|
-
react_1.default.createElement(QuantityContainer, null,
|
|
41
|
-
react_1.default.createElement(addItem_1.default, { name: "Pefin Refin Boa Vista", value: (0, number_1.formatValue)(quantidadeDividasBoaVista) }),
|
|
42
|
-
react_1.default.createElement(addItem_1.default, { name: "Total Pefin Refin Boa Vista", value: (0, number_1.formatMoney)(valorTotalDividasBoaVista) }))));
|
|
43
|
-
};
|
|
44
|
-
exports.default = QuantidadeResultados;
|
|
45
|
-
var templateObject_1;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCalculation = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var calculation_1 = require("../../utils/calculation");
|
|
6
|
-
var useCalculation = function (itens) {
|
|
7
|
-
var quantidade = (0, react_1.useMemo)(function () { return (0, calculation_1.somarQuantidades)(itens); }, [itens]);
|
|
8
|
-
var valorTotal = (0, react_1.useMemo)(function () { return (0, calculation_1.somarValoresTotais)(itens); }, [itens]);
|
|
9
|
-
var dataMaisRecente = (0, react_1.useMemo)(function () { return (0, calculation_1.encontrarDataMaisRecente)(itens); }, [itens]);
|
|
10
|
-
return { quantidade: quantidade, valorTotal: valorTotal, dataMaisRecente: dataMaisRecente };
|
|
11
|
-
};
|
|
12
|
-
exports.useCalculation = useCalculation;
|
|
@@ -1,26 +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
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
7
|
-
var react_1 = require("react");
|
|
8
|
-
var webservice_1 = require("../webservice");
|
|
9
|
-
var xpath_1 = __importDefault(require("../../utils/xpath"));
|
|
10
|
-
var useDividasPublicas = function () {
|
|
11
|
-
var ctxFinder = (0, react_1.useContext)(webservice_1.Queries.Finder);
|
|
12
|
-
var dividasPublicasData = (0, react_1.useMemo)(function () {
|
|
13
|
-
if ((ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.type) === webservice_1.RequestStatus.Success) {
|
|
14
|
-
return {
|
|
15
|
-
quantidade: xpath_1.default.select("number(//dividas/resumo/quantidade_dividas)", ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.document) || 0,
|
|
16
|
-
valorTotal: xpath_1.default.select("number(//dividas/resumo/valor_total_dividas)", ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.document) || 0
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
quantidade: 0,
|
|
21
|
-
valorTotal: 0
|
|
22
|
-
};
|
|
23
|
-
}, [ctxFinder === null || ctxFinder === void 0 ? void 0 : ctxFinder.type]);
|
|
24
|
-
return dividasPublicasData;
|
|
25
|
-
};
|
|
26
|
-
exports.default = useDividasPublicas;
|
|
@@ -1,20 +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
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
7
|
-
var react_1 = require("react");
|
|
8
|
-
var webservice_1 = require("../webservice");
|
|
9
|
-
var xpath_1 = __importDefault(require("../../utils/xpath"));
|
|
10
|
-
var useUltimaOcorrenciaCCF = function () {
|
|
11
|
-
var ctxCCF = (0, react_1.useContext)(webservice_1.Queries.CCF);
|
|
12
|
-
var ultimaOcorrenciaCCF = (0, react_1.useMemo)(function () {
|
|
13
|
-
if ((ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.type) === webservice_1.RequestStatus.Success) {
|
|
14
|
-
return xpath_1.default.select('string(//ultimaOcorrencia)', ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.document);
|
|
15
|
-
}
|
|
16
|
-
return undefined;
|
|
17
|
-
}, [ctxCCF === null || ctxCCF === void 0 ? void 0 : ctxCCF.type]);
|
|
18
|
-
return ultimaOcorrenciaCCF;
|
|
19
|
-
};
|
|
20
|
-
exports.default = useUltimaOcorrenciaCCF;
|
|
@@ -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;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
|
-
export type ConsultaRfbContextProps = Partial<{
|
|
3
|
-
rfbResponse: Document;
|
|
4
|
-
refetch: () => void;
|
|
5
|
-
error: Error | null;
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const ConsultaRfbContext: React.Context<Partial<{
|
|
9
|
-
rfbResponse: Document;
|
|
10
|
-
refetch: () => void;
|
|
11
|
-
error: Error | null;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
}> | null>;
|
|
14
|
-
export declare const ConsultaRfbProvider: React.FC<PropsWithChildren<{
|
|
15
|
-
documento: string;
|
|
16
|
-
}>>;
|
|
@@ -1,48 +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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.ConsultaRfbProvider = exports.ConsultaRfbContext = void 0;
|
|
38
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
39
|
-
var react_1 = __importStar(require("react"));
|
|
40
|
-
var webservice_1 = require("./webservice");
|
|
41
|
-
exports.ConsultaRfbContext = (0, react_1.createContext)(null);
|
|
42
|
-
var ConsultaRfbProvider = function (_a) {
|
|
43
|
-
var _b, _c;
|
|
44
|
-
var children = _a.children, documento = _a.documento;
|
|
45
|
-
var query = (0, webservice_1.useQuery)("SELECT FROM 'RFB'.'CERTIDAO'", { documento: documento }, documento.length > 11);
|
|
46
|
-
return (react_1.default.createElement(exports.ConsultaRfbContext.Provider, { value: __assign({ rfbResponse: (_c = (_b = query === null || query === void 0 ? void 0 : query.response) === null || _b === void 0 ? void 0 : _b.document) !== null && _c !== void 0 ? _c : undefined }, query) }, children));
|
|
47
|
-
};
|
|
48
|
-
exports.ConsultaRfbProvider = ConsultaRfbProvider;
|
|
@@ -1,110 +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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
|
-
var t = {};
|
|
42
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
-
t[p] = s[p];
|
|
44
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
-
t[p[i]] = s[p[i]];
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
|
-
};
|
|
54
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
var react_1 = __importStar(require("react"));
|
|
56
|
-
var webservice_1 = require("../webservice");
|
|
57
|
-
var string_1 = require("../../utils/string");
|
|
58
|
-
var statusMessage_1 = __importDefault(require("../interface/statusMessage"));
|
|
59
|
-
var section_1 = __importDefault(require("../interface/section"));
|
|
60
|
-
var consultaSimples_1 = __importDefault(require("../../assets/icones/consultaSimples"));
|
|
61
|
-
var xpath_1 = __importDefault(require("../../utils/xpath"));
|
|
62
|
-
var number_1 = require("../../utils/number");
|
|
63
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
64
|
-
var StatusMessageContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n gap: 10px;\n\n span {\n width: fit-content;\n }\n\n @media only screen and (max-width: 768px) {\n flex-direction: column;\n }\n"], ["\n display: flex;\n gap: 10px;\n\n span {\n width: fit-content;\n }\n\n @media only screen and (max-width: 768px) {\n flex-direction: column;\n }\n"])));
|
|
65
|
-
var getPossuiPendenciaText = function (_a) {
|
|
66
|
-
var ccf = _a.ccf, ultimoRegistroCCF = _a.ultimoRegistroCCF, dividasPublicas = _a.dividasPublicas, protestos = _a.protestos, processosJuridicos = _a.processosJuridicos;
|
|
67
|
-
var data = [
|
|
68
|
-
'Registro encontrado',
|
|
69
|
-
dividasPublicas ? "total de Dividas P\u00FAblicas: ".concat((0, number_1.formatMoney)(dividasPublicas)) : '',
|
|
70
|
-
ccf ? "total de registros CCF: ".concat(ccf, " com \u00FAltima ocorr\u00EAncia em ").concat(ultimoRegistroCCF) : '',
|
|
71
|
-
protestos ? "total de registros de Protestos: ".concat(protestos) : '',
|
|
72
|
-
processosJuridicos ? "total de registros de Processos Jur\u00EDdicos: ".concat(processosJuridicos) : '',
|
|
73
|
-
];
|
|
74
|
-
return (0, string_1.capitalizeFirstLetter)(data
|
|
75
|
-
.filter(function (text) { return text; })
|
|
76
|
-
.join(', ') + '');
|
|
77
|
-
};
|
|
78
|
-
var ConsultaSimplesSection = function (_a) {
|
|
79
|
-
var _b, _c;
|
|
80
|
-
var documento = _a.documento, children = _a.children, onClose = _a.onClose, rest = __rest(_a, ["documento", "children", "onClose"]);
|
|
81
|
-
var ctx = (0, react_1.useContext)(webservice_1.Queries.Finder);
|
|
82
|
-
var ctxProtestos = (0, react_1.useContext)(webservice_1.Queries.Protestos);
|
|
83
|
-
var ctxCCF = (0, react_1.useContext)(webservice_1.Queries.CCF);
|
|
84
|
-
var ctxProcessosJuridicos = (0, react_1.useContext)(webservice_1.Queries.ProcessosJuridicos);
|
|
85
|
-
var protestos = select("number(//registros)", getDataFromRequestContext(ctxProtestos));
|
|
86
|
-
var ccf = select("number(//sumQteOcorrencias)", getDataFromRequestContext(ctxCCF));
|
|
87
|
-
var dividasPublicas = select("number(//dividas/resumo/valor_total_dividas)", getDataFromRequestContext(ctx));
|
|
88
|
-
var ultimoRegistroCCF = select("string(//ultimaOcorrencia)", getDataFromRequestContext(ctxCCF));
|
|
89
|
-
var processosJuridicos = ((_c = (_b = getDataFromRequestContext(ctxProcessosJuridicos)) === null || _b === void 0 ? void 0 : _b.empresa) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
90
|
-
var possuiPendencias = ccf || protestos || dividasPublicas || processosJuridicos;
|
|
91
|
-
var possuiPendenciaText = getPossuiPendenciaText({ dividasPublicas: dividasPublicas, ultimoRegistroCCF: ultimoRegistroCCF, ccf: ccf, protestos: protestos, processosJuridicos: processosJuridicos });
|
|
92
|
-
var isError = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === webservice_1.RequestStatus.Error;
|
|
93
|
-
var isLoading = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === webservice_1.RequestStatus.Loading;
|
|
94
|
-
var statusType = isError ? 'warning' : possuiPendencias ? 'error' : 'success';
|
|
95
|
-
return (react_1.default.createElement(section_1.default, __assign({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: (react_1.default.createElement(StatusMessageContainer, null,
|
|
96
|
-
react_1.default.createElement(statusMessage_1.default, { type: "found" }, (0, string_1.formatDocument)(documento)),
|
|
97
|
-
react_1.default.createElement(statusMessage_1.default, { type: statusType }, isError ? ctx === null || ctx === void 0 ? void 0 : ctx.error.message : possuiPendencias ? possuiPendenciaText : 'Nenhum registro encontrado'))), onClose: onClose, icon: consultaSimples_1.default, variant: isLoading ? 'loading' : 'default' }, rest), children));
|
|
98
|
-
};
|
|
99
|
-
function getDataFromRequestContext(ctx) {
|
|
100
|
-
if (ctx.type != webservice_1.RequestStatus.Success)
|
|
101
|
-
return null;
|
|
102
|
-
return ctx === null || ctx === void 0 ? void 0 : ctx.document;
|
|
103
|
-
}
|
|
104
|
-
function select(expression, document) {
|
|
105
|
-
if (!document)
|
|
106
|
-
return null;
|
|
107
|
-
return xpath_1.default.select(expression, document);
|
|
108
|
-
}
|
|
109
|
-
exports.default = ConsultaSimplesSection;
|
|
110
|
-
var templateObject_1;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import { ParsedResponse } from "./webservice";
|
|
3
|
-
import { RefinBoaVistaResponse } from "./refinBoaVista/types";
|
|
4
|
-
import { PefinRefinSerasaResponse } from "./refinSerasa/types";
|
|
5
|
-
import { ImoveisConsultaResponse } from "./imoveis/types";
|
|
6
|
-
import { ScoreResponse } from "./score/types";
|
|
7
|
-
type QueryType<DataType = any> = {
|
|
8
|
-
consultaRealizada: boolean;
|
|
9
|
-
data?: ParsedResponse<DataType> | null;
|
|
10
|
-
};
|
|
11
|
-
type ConsultasComplementaresProps = {
|
|
12
|
-
scr: QueryType;
|
|
13
|
-
veiculos: QueryType;
|
|
14
|
-
refinSerasa: QueryType<PefinRefinSerasaResponse>;
|
|
15
|
-
refinBoaVista: QueryType<RefinBoaVistaResponse>;
|
|
16
|
-
scoreBoaVista: QueryType<ScoreResponse>;
|
|
17
|
-
imoveis: QueryType<ImoveisConsultaResponse>;
|
|
18
|
-
};
|
|
19
|
-
export type ConsultasComplementaresContextProps = {
|
|
20
|
-
consultasComplementares: ConsultasComplementaresProps;
|
|
21
|
-
setConsultasComplementares: React.Dispatch<React.SetStateAction<ConsultasComplementaresProps>>;
|
|
22
|
-
hasCredits?: HasCreditsType;
|
|
23
|
-
};
|
|
24
|
-
export type HasCreditsType = (credits: number, callback: () => void) => void;
|
|
25
|
-
export declare const ConsultasComplementaresContext: React.Context<ConsultasComplementaresContextProps | null>;
|
|
26
|
-
export declare const ConsultasComplementaresProvider: React.FC<PropsWithChildren<{
|
|
27
|
-
hasCredits?: HasCreditsType;
|
|
28
|
-
}>>;
|
|
29
|
-
export {};
|