@wgalleti/primevue-components 1.17.1 → 1.18.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.
@@ -0,0 +1,11 @@
1
+ /** Escopo dos slots `group-header` e `group-meta` do WCrudView. */
2
+ export interface CrudGroupScope {
3
+ groupKey: string;
4
+ /** Rótulo do grupo (`groupLabel` ou a própria chave). */
5
+ label: string;
6
+ /** Linhas do grupo na página atual, na ordem de `crud.items`. */
7
+ items: Record<string, unknown>[];
8
+ /** Quantidade de linhas do grupo na página atual. */
9
+ count: number;
10
+ collapsed: boolean;
11
+ }
@@ -5,6 +5,7 @@ export type { EditableCardRole, EditableColumnDef, EditableColumnEditor, Editabl
5
5
  export type { CheckListItem, CheckListLevel } from './checkList';
6
6
  export type { FlipCardLabels, FlipCardSlotProps } from './flipCard';
7
7
  export type { AttentionItem, AttentionItemClickEvent, AttentionSeverity } from './attentionList';
8
+ export type { CrudGroupScope } from './crudGroup';
8
9
  export type { GroupedSelectGroupScope, GroupedSelectKey } from './groupedSelectList';
9
10
  export type { CalendarEvent, CalendarEventState, CalendarMoveEvent } from './calendar';
10
11
  export type { KanbanColumn, KanbanMoveEvent } from './kanban';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wgalleti/primevue-components",
3
- "version": "1.17.1",
3
+ "version": "1.18.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -28,6 +28,8 @@ Retornos úteis do `crud` (além de alimentar o WCrudView): `selectedItems`, `cl
28
28
 
29
29
  `<WCrudView>` aceita `title`, `subtitle`, `dialog-width`, e **slots** para sobrescrever qualquer seção (toolbar, ações de linha, etc.).
30
30
 
31
+ Para agrupar linhas sob cabeçalhos recolhíveis, use `group-by` (campo ou função), com `group-label`, `v-model:collapsed-groups` e os slots `group-header`/`group-meta`. A lista é paginada: o grupo vale para a página atual.
32
+
31
33
  ### Filtros: sempre na toolbar do grid, ao lado da busca
32
34
 
33
35
  Todo filtro de uma listagem mora **dentro do grid**, na mesma toolbar da busca — nunca numa faixa própria acima da tabela, num painel lateral, no cabeçalho da página ou em `before-table`. Ordem fixa na toolbar: busca → `toolbar-start` → filtros declarativos (`ColumnDef.filter`) → slot `toolbar-filters` → "Limpar filtros". Dois caminhos, nessa ordem de preferência: