import { CurrencyPipe, DatePipe, DecimalPipe, TitleCasePipe } from '@angular/common'; import { PoTimePipe } from '../../../pipes/po-time/po-time.pipe'; import { PoDynamicViewField } from './po-dynamic-view-field.interface'; import { PoDynamicViewService } from './services/po-dynamic-view.service'; import { PoComboFilterService } from '../../po-field/po-combo/po-combo-filter.service'; import { PoMultiselectFilterService } from '../../po-field/po-multiselect/po-multiselect-filter.service'; import { PoDynamicSharedBase } from '../shared/po-dynamic-shared-base'; /** * * @description * * Componente para listar dados dinamicamente a partir de uma lista de objetos. * * > Por padrão esse componente cria `po-info` para exibição, é possível criar `po-tag` passando a propriedade { tag: true }. * */ export declare class PoDynamicViewBaseComponent extends PoDynamicSharedBase { private readonly currencyPipe; private readonly datePipe; private readonly decimalPipe; private readonly timePipe; private readonly titleCasePipe; protected dynamicViewService: PoDynamicViewService; protected comboFilterService: PoComboFilterService; protected multiselectFilterService: PoMultiselectFilterService; /** * @optional * * @description * * Possibilita executar uma função quando o componente é inicializado. * * A propriedade aceita os seguintes tipos: * - **String**: Endpoint usado pelo componente para requisição via `POST`. * - **Function**: Método que será executado na inicialização do componente. * * Para os dois tipos de utilização da propriedade espera-se o seguinte retorno: * * ``` * { * value: { * cnpj: '**************', // altera valor do campo * updated: (new Date()).toString() // atribui valor ao campo novo * }, * fields: [ * { property: 'updated', tag: true } // inclui campo novo * ] * } * ``` * > **value**: any = atribui novo valor do model. * * > **fields**: `Array` = Lista de campos que deseja alterar as propriedades, * caso enviar um campo a mais será criado um novo campo. * * - Para esconder/remover campos precisa informar no field a propriedade `visible = false`. * */ load: string | Function; service: any; private _componentsSize?; private _initialComponentsSize?; private _fields; private _showAllValue; private _value; /** * @optional * * @description * * Define o tamanho dos componentes no template entre `small` ou `medium`. * * > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido. * Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme). * * @default `medium` */ set componentsSize(value: string); get componentsSize(): string; /** * @optional * * @description * * Lista de objetos que implementam a interface `PoDynamicView`. * * > Ex: `[ { property: 'age' } ]` * * Regras de tipagem e formatação dos valores exibidos: * * - Caso o *type* informado seja *currency* e não seja informado o *format* o mesmo recebe "'BRL', 'symbol', '1.2-2'" * como formato padrão. * - Caso o *type* informado seja *date* e não seja informado o *format* o mesmo recebe 'dd/MM/yyyy' como formato padrão. * - Caso o *type* informado seja *dateTime* e não seja informado o *format* o mesmo recebe 'dd/MM/yyyy HH:mm:ss' como formato padrão. * - Caso o *type* informado seja *number* e não seja informado o *format* o mesmo não será formatado. * - Caso o *type* informado seja *time* e não seja informado o *format* o mesmo recebe 'HH:mm:ss.ffffff' como formato padrão. * * > As propriedades informadas serão exibidas mesmo não contendo valor de referência no objeto da propriedade `p-value`. * * @default `[]` */ set fields(fields: Array); get fields(): Array; /** * @optional * * @description * * Indica se exibirá todas as informações contidas dentro do objeto informado na propriedade `p-value`. * * @default `false` */ set showAllValue(value: boolean); get showAllValue(): boolean; /** * @optional * * @description * * Permite a quebra de linha no texto do `p-value`, aplicando-a onde há `\n`. * * ``` * * ``` * * Saída: * ``` * Primeira linha * Segunda linha * ``` * @default `false` */ textWrap: boolean; /** * @description * * Objeto que será utilizado para exibir as informações dinâmicas, o valor será recuperado através do atributo *property* * dos objetos contidos na propridade `p-fields`. * * > Ex: `{ age: '35' }` */ set value(value: object); get value(): object; constructor(currencyPipe: CurrencyPipe, datePipe: DatePipe, decimalPipe: DecimalPipe, timePipe: PoTimePipe, titleCasePipe: TitleCasePipe, dynamicViewService: PoDynamicViewService, comboFilterService: PoComboFilterService, multiselectFilterService: PoMultiselectFilterService); protected onThemeChange(): void; protected getFieldOrderRetroactive(position: number, index?: number): number; protected getFieldOrder(field: PoDynamicViewField, index: number): number; protected getConfiguredFields(useSearchService?: boolean): any[]; protected getMergedFields(): any[]; protected getValueFields(): { tag?: boolean; color?: string; textColor?: string; concatLabelValue?: boolean; fieldLabel?: string; fieldValue?: string; icon?: string; isArrayOrObject?: boolean; format?: string | Array; order?: number; alt?: string; height?: string; image?: boolean; options?: Array<{ label: string; value: string | number; }>; optionsService?: string | import("../..").PoComboFilter | import("../..").PoMultiselectFilter; optionsMulti?: boolean; searchService?: string | import("..").PoDynamicViewRequest; booleanTrue?: string; booleanFalse?: string; params?: any; key?: boolean; property: string; label: string; gridColumns?: number; gridSmColumns?: number; gridMdColumns?: number; gridLgColumns?: number; gridXlColumns?: number; offsetColumns?: number; offsetSmColumns?: number; offsetMdColumns?: number; offsetLgColumns?: number; offsetXlColumns?: number; gridSmPull?: number; gridMdPull?: number; gridLgPull?: number; gridXlPull?: number; visible?: boolean; divider?: string; type?: string | import("..").PoDynamicFieldType; container?: string; value: any; cssClass: string; }[]; private createField; private createFieldWithService; private returnValues; private searchById; private transformArrayValue; private transformFieldLabel; private transformValue; private formatField; private applySizeBasedOnA11y; }