From 059c3bd8fef678780a927f3597e54640af793536 Mon Sep 17 00:00:00 2001 From: renanarosario Date: Wed, 13 Nov 2024 17:12:03 -0300 Subject: [PATCH] feat(dynamic-table): cria nova propriedade p-visible-filter-disclaimers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foi criado a nova propriedade para visibleFilterDisclaimers opcional do tipo boolean com valor default 'true' que permite exibir ou não o filtro fixo nos disclaimer Fixes dynamic-table/DTHFUI-7112 --- .../po-page-dynamic-search-base.component.ts | 2 ++ .../po-page-dynamic-search.component.html | 1 + .../po-page-dynamic-table.component.html | 1 + .../po-page-dynamic-table.component.ts | 20 +++++++++++++++++++ .../po-page-list-base.component.ts | 20 +++++++++++++++++++ .../po-page-list/po-page-list.component.html | 2 +- 6 files changed, 45 insertions(+), 1 deletion(-) diff --git a/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search-base.component.ts b/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search-base.component.ts index 6c0310911..f8876f6cf 100644 --- a/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search-base.component.ts +++ b/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search-base.component.ts @@ -245,6 +245,8 @@ export abstract class PoPageDynamicSearchBaseComponent { this.setAdvancedFilterLiterals(this.literals); } + @Input('p-visible-filter-disclaimers') visibleFilterDisclaimers: boolean = true; + get literals() { return this._literals || poPageDynamicSearchLiteralsDefault[this.language]; } diff --git a/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search.component.html b/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search.component.html index 708c735d0..221bc779e 100644 --- a/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search.component.html +++ b/projects/templates/src/lib/components/po-page-dynamic-search/po-page-dynamic-search.component.html @@ -6,6 +6,7 @@ [p-filter]="filterSettings" [p-title]="title" [p-quick-search-value]="quickSearchValue" + [p-visible-filter-disclaimers]="visibleFilterDisclaimers" > + * + * ``` + */ + @Input('p-visible-filter-disclaimers') visibleFilterDisclaimers: boolean = true; + get hideCloseDisclaimers(): Array { return this._hideCloseDisclaimers; } diff --git a/projects/ui/src/lib/components/po-page/po-page-list/po-page-list-base.component.ts b/projects/ui/src/lib/components/po-page/po-page-list/po-page-list-base.component.ts index 8a6ca9219..5634d804b 100644 --- a/projects/ui/src/lib/components/po-page/po-page-list/po-page-list-base.component.ts +++ b/projects/ui/src/lib/components/po-page/po-page-list/po-page-list-base.component.ts @@ -182,6 +182,26 @@ export abstract class PoPageListBaseComponent { */ @Input('p-subtitle') subtitle: string; + /** + * @optional + * + * @description + * + * Controla a visibilidade dos disclaimers de filtro na página. + * + * - Quando `true` (defualt), os disclaimers de filtro são exibidos, permitindo que o usuário visualize e remova individualmente os filtros aplicados. + * - Quando `false`, os disclaimers de filtro são ocultados, desativando a opção de visualização e remoção de filtros diretamente na interface. + * + * Esta propriedade é útil para ajustar a experiência do usuário em relação aos filtros aplicados, especialmente em casos onde não se deseja exibir os disclaimers de filtro na interface. + * + * **Exemplo de uso:** + * ```html + * + * + * ``` + */ + @Input('p-visible-filter-disclaimers') visibleFilterDisclaimers: boolean = true; + constructor(languageService: PoLanguageService) { this.language = languageService.getShortLanguage(); } diff --git a/projects/ui/src/lib/components/po-page/po-page-list/po-page-list.component.html b/projects/ui/src/lib/components/po-page/po-page-list/po-page-list.component.html index ab99465e3..19d3c71fb 100644 --- a/projects/ui/src/lib/components/po-page/po-page-list/po-page-list.component.html +++ b/projects/ui/src/lib/components/po-page/po-page-list/po-page-list.component.html @@ -95,7 +95,7 @@