Skip to main content

Results Accordion

This section describes the BfmResultsAccordionComponent component.

Composition

The BfmResultsAccordionComponent is composed of the following components:

Usage

If you need more customization, you need to import it in your module and use it in your template.

results-accordion.component.ts
import { BfmResultsAccordionComponent } from '@celerofinancas/ui-reports';

@Component({
standalone: true,
selector: 'results-accordion',
imports: [BfmResultsAccordionComponent],
templateUrl: './results-accordion.component.html',
})
export class ResultsAccordionComponent {}

Then, in your template, you can use the component like this:

results-accordion.component.html
<bfm-results-accordion 
[displayZeroValues]="false"
[levels]="levels"
[noContentDescription]="'Selecione o período de análise acima para visualizar o resultado mensal.'"
[noContentMessage]="'Sem informações para análise!'"
/>

Inputs

The BfmResultsAccordionComponent component has the following inputs:

displayZeroValues

Whether to display zero values

TypeDefault
booleanfalse

levels

Results level object

TypeDefault
anynull

noContentDescription

No content text description

TypeDefault
string'Selecione o período de análise acima para visualizar o resultado mensal.'

noContentMessage

No content message

TypeDefault
string'Sem informações para análise!'

Events

The BfmResultsAccordionComponent component has no events.

TOKEN RESULTS_ACCORDION_CONFIG

To customize the BfmResultsAccordionComponent, you can inject the RESULTS_ACCORDION_CONFIG token in your module.

This token is used to provide custom values to the component. If is not provided, the default values will be used.

Properties

KeyDescriptionDefault
showAccordionItemFirstLevelWhether to show the first level accordion itemtrue
showAccordionHeaderWhether to show the accordion headerfalse
accordionHeaderTitlesTitles for the accordion header columns['Indicadores', 'Porcentagem sobre as receitas', 'Valor em reais (R$)']
positionResultsTooltipDictionaryPosition of the results tooltip dictionary'content'
resultsTooltipDictResults tooltip dictionarynull
resultsColorDictResults color dictionarynull
resultsNameListList of results namesnull
allowExpandBalanceSectionWhether to allow expanding the balance sectiontrue
balanceStartDescriptionDescription for the balance start'Saldo inicial geral'
balanceEndDescriptionDescription for the balance end'Saldo final geral'

The RESULTS_ACCORDION_CONFIG default values are:

{
showAccordionItemFirstLevel: true,
showAccordionHeader: false,
accordionHeaderTitles: ['Indicadores', 'Porcentagem sobre as receitas', 'Valor em reais (R$)'],
positionResultsTooltipDictionary: 'content',
resultsTooltipDict: null,
resultsColorDict: null,
resultsNameList: null,
allowExpandBalanceSection: true,
balanceStartDescription: 'Saldo inicial geral',
balanceEndDescription: 'Saldo final geral',
}

Example

To customize the BfmResultsAccordionComponent, you can inject the RESULTS_ACCORDION_CONFIG token in your module.

app.config.ts
import { ApplicationConfig } from '@angular/core';

import { RESULTS_ACCORDION_CONFIG } from '@celerofinancas/ui-reports';

export const appConfig: ApplicationConfig = {
providers: [
{
provide: RESULTS_ACCORDION_CONFIG,
useValue: {
showAccordionItemFirstLevel: true,
showAccordionHeader: false,
accordionHeaderTitles: ['Indicadores Customizados', 'Porcentagem', 'Valor (R$)'],
positionResultsTooltipDictionary: 'content',
resultsTooltipDict: null,
resultsColorDict: null,
resultsNameList: null,
allowExpandBalanceSection: true,
balanceStartDescription: 'Saldo inicial geral',
balanceEndDescription: 'Saldo final geral',
},
},
],
};