ngx-sp-infra 6.7.8 → 6.7.9

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.
@@ -1,6 +1,8 @@
1
1
  import { SelectionModel } from '../models/table/selection-model.model';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class TableSelectionService {
4
+ /** Verifica se um item está selecionado usando múltiplas colunas como chave composta. */
5
+ isSelecionadoPorItem(item: any, idColumnNames?: string[]): boolean;
4
6
  private _selecaoGeral;
5
7
  selecaoMap: Map<string | number, boolean>;
6
8
  get selecaoGeral(): boolean;
@@ -10,9 +12,29 @@ export declare class TableSelectionService {
10
12
  * @param returnObj Informa se o retorno será uma lista de objetos (SelectionModel[]) ou um array de arrays */
11
13
  getOnlySelecionados(returnObj?: boolean): SelectionModel[] | any[];
12
14
  quantidadeSelecionados(): number;
13
- initSelecao(list?: any[], idColumnName?: string): Map<string | number, boolean>;
14
- inverterSelecao(id: string | number): void;
15
- definirSelecaoTotal(list?: any[], selecao?: boolean, idColumnName?: string): void;
15
+ /** Inicializa a seleção usando uma coluna como chave de identificação.
16
+ * @param list lista de objetos
17
+ * @param columns nome da coluna que será usada de identificação
18
+ */
19
+ initSelecao(list: any[], columns: string): Map<string | number, boolean>;
20
+ /** Inicializa a seleção usando múltiplas colunas como chave composta.
21
+ * @param list lista de objetos
22
+ * @param columns array de nomes de colunas (pode usar paths como 'pessoa.id')
23
+ */
24
+ initSelecao(list: any[], columns: string[]): Map<string | number, boolean>;
25
+ /** Inverte a seleção com base em um valor de identificação dos itens rastreados na seleção. */
26
+ inverterSelecao(id?: string | number, item?: any, columns?: string[]): void;
27
+ /** Inverte a seleção com base em um item completo, usando colunas para gerar a chave composta. */
28
+ inverterSelecao(id?: null, item?: any, columns?: string[]): void;
29
+ /** Define seleção total usando uma coluna de identificação. */
30
+ definirSelecaoTotal(list?: any[], selecao?: boolean, columns?: string): void;
31
+ /** Define seleção total usando colunas compostas como chave. */
32
+ definirSelecaoTotal(list?: any[], selecao?: boolean, columns?: string[]): void;
33
+ /**
34
+ * Gera uma chave estável a partir de um objeto e de uma lista de colunas.
35
+ * A chave é criada concatenando os valores das colunas com um separador estável.
36
+ */
37
+ private makeCompositeKeyFromItem;
16
38
  static ɵfac: i0.ɵɵFactoryDeclaration<TableSelectionService, never>;
17
39
  static ɵprov: i0.ɵɵInjectableDeclaration<TableSelectionService>;
18
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-sp-infra",
3
- "version": "6.7.8",
3
+ "version": "6.7.9",
4
4
  "description": "Biblioteca de utilitários da Infra.",
5
5
  "author": "P&D",
6
6
  "keywords": [