feat: suporte para selecionar campos na tabela
This commit is contained in:
parent
7dc071373a
commit
0886fd5c3e
16 changed files with 5867 additions and 4684 deletions
|
|
@ -11,6 +11,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<tipoEliTabelaConsulta<any>>;
|
||||
required: true;
|
||||
};
|
||||
/** Array de itens selecionados (v-model:selecionados) */
|
||||
selecionados: {
|
||||
type: PropType<unknown[]>;
|
||||
default: () => never[];
|
||||
};
|
||||
}>, {
|
||||
isDev: boolean;
|
||||
tabela: import("vue").ComputedRef<tipoEliTabelaConsulta<any>>;
|
||||
|
|
@ -77,6 +82,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
temColunasInvisiveis: import("vue").ComputedRef<boolean>;
|
||||
colunasInvisiveisEfetivas: import("vue").ComputedRef<tipoEliColuna<any>[]>;
|
||||
linhasExpandidas: import("vue").Ref<Record<number, boolean>, Record<number, boolean>>;
|
||||
mostrarSelecao: import("vue").ComputedRef<boolean>;
|
||||
isSelecionado: (linha: unknown) => boolean;
|
||||
alternarSelecao: (linha: unknown) => void;
|
||||
todosSelecionados: import("vue").ComputedRef<boolean>;
|
||||
algunsSelecionados: import("vue").ComputedRef<boolean>;
|
||||
alternarSelecaoTodos: (forcarMarcar?: boolean) => void;
|
||||
abrirModalColunas: () => void;
|
||||
abrirModalFiltro: () => void;
|
||||
fecharModalColunas: () => void;
|
||||
|
|
@ -129,13 +140,22 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
top: number;
|
||||
left: number;
|
||||
}>;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:selecionados"[], "update:selecionados", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
/** Configuração principal da tabela (colunas, consulta e ações) */
|
||||
tabela: {
|
||||
type: PropType<tipoEliTabelaConsulta<any>>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{}>, {}, {}, {
|
||||
/** Array de itens selecionados (v-model:selecionados) */
|
||||
selecionados: {
|
||||
type: PropType<unknown[]>;
|
||||
default: () => never[];
|
||||
};
|
||||
}>> & Readonly<{
|
||||
"onUpdate:selecionados"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
selecionados: unknown[];
|
||||
}, {}, {
|
||||
EliTabelaCabecalho: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
exibirBusca: {
|
||||
type: BooleanConstructor;
|
||||
|
|
@ -366,6 +386,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<"asc" | "desc">;
|
||||
required: true;
|
||||
};
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
todosSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
algunsSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
}>, {
|
||||
ArrowUp: import("@lucide/vue").LucideIcon;
|
||||
ArrowDown: import("@lucide/vue").LucideIcon;
|
||||
|
|
@ -373,6 +405,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
emitAlternarOrdenacao: (chave: string) => void;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
alternarOrdenacao(chave: string): boolean;
|
||||
"alternar-selecao-todos": () => true;
|
||||
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
colunas: {
|
||||
type: PropType<Array<tipoEliColuna<any>>>;
|
||||
|
|
@ -394,10 +427,26 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<"asc" | "desc">;
|
||||
required: true;
|
||||
};
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
todosSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
algunsSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
"onAlternar-selecao-todos"?: (() => any) | undefined;
|
||||
onAlternarOrdenacao?: ((chave: string) => any) | undefined;
|
||||
}>, {
|
||||
mostrarSelecao: boolean;
|
||||
colunaOrdenacao: string | null;
|
||||
todosSelecionados: boolean;
|
||||
algunsSelecionados: boolean;
|
||||
}, {}, {
|
||||
ArrowUp: import("@lucide/vue").LucideIcon;
|
||||
ArrowDown: import("@lucide/vue").LucideIcon;
|
||||
|
|
@ -443,6 +492,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<(indice: number) => void>;
|
||||
required: true;
|
||||
};
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
isSelecionado: {
|
||||
type: PropType<(linha: unknown) => boolean>;
|
||||
required: true;
|
||||
};
|
||||
alternarSelecao: {
|
||||
type: PropType<(linha: unknown) => void>;
|
||||
required: true;
|
||||
};
|
||||
}>, {
|
||||
ChevronRight: import("@lucide/vue").LucideIcon;
|
||||
ChevronDown: import("@lucide/vue").LucideIcon;
|
||||
|
|
@ -487,7 +548,21 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<(indice: number) => void>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{}>, {}, {}, {
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
isSelecionado: {
|
||||
type: PropType<(linha: unknown) => boolean>;
|
||||
required: true;
|
||||
};
|
||||
alternarSelecao: {
|
||||
type: PropType<(linha: unknown) => void>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{}>, {
|
||||
mostrarSelecao: boolean;
|
||||
}, {}, {
|
||||
EliTabelaCelula: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
celula: {
|
||||
type: PropType<import("./types-eli-tabela").tipoComponenteCelula>;
|
||||
|
|
@ -828,11 +903,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>, {
|
||||
visiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
invisiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
itemSendoArrastado: import("vue").Ref<string | null, string | null>;
|
||||
emitFechar: () => void;
|
||||
emitSalvar: () => void;
|
||||
onDragStart: (e: DragEvent, rotulo: string, origem: "visiveis" | "invisiveis", index: number) => void;
|
||||
onDropItem: (e: DragEvent, destino: "visiveis" | "invisiveis", index: number) => void;
|
||||
onDropLista: (e: DragEvent, destino: "visiveis" | "invisiveis", _index: number | null) => void;
|
||||
onDragStart: (e: DragEvent, rotulo: string) => void;
|
||||
onDragEnd: () => void;
|
||||
onDragOverItem: (alvoRotulo: string, destino: "visiveis" | "invisiveis") => void;
|
||||
onDragOverLista: (destino: "visiveis" | "invisiveis") => void;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
fechar(): true;
|
||||
salvar(_config: EliTabelaColunasConfig): true;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<(indice: number) => void>;
|
||||
required: true;
|
||||
};
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
isSelecionado: {
|
||||
type: PropType<(linha: unknown) => boolean>;
|
||||
required: true;
|
||||
};
|
||||
alternarSelecao: {
|
||||
type: PropType<(linha: unknown) => void>;
|
||||
required: true;
|
||||
};
|
||||
}>, {
|
||||
ChevronRight: import("@lucide/vue").LucideIcon;
|
||||
ChevronDown: import("@lucide/vue").LucideIcon;
|
||||
|
|
@ -87,7 +99,21 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<(indice: number) => void>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{}>, {}, {}, {
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
isSelecionado: {
|
||||
type: PropType<(linha: unknown) => boolean>;
|
||||
required: true;
|
||||
};
|
||||
alternarSelecao: {
|
||||
type: PropType<(linha: unknown) => void>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{}>, {
|
||||
mostrarSelecao: boolean;
|
||||
}, {}, {
|
||||
EliTabelaCelula: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
celula: {
|
||||
type: PropType<import("./types-eli-tabela").tipoComponenteCelula>;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<"asc" | "desc">;
|
||||
required: true;
|
||||
};
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
todosSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
algunsSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
}>, {
|
||||
ArrowUp: import("@lucide/vue").LucideIcon;
|
||||
ArrowDown: import("@lucide/vue").LucideIcon;
|
||||
|
|
@ -30,6 +42,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
emitAlternarOrdenacao: (chave: string) => void;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
alternarOrdenacao(chave: string): boolean;
|
||||
"alternar-selecao-todos": () => true;
|
||||
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
colunas: {
|
||||
type: PropType<Array<tipoEliColuna<any>>>;
|
||||
|
|
@ -51,10 +64,26 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: PropType<"asc" | "desc">;
|
||||
required: true;
|
||||
};
|
||||
mostrarSelecao: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
todosSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
algunsSelecionados: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
"onAlternar-selecao-todos"?: (() => any) | undefined;
|
||||
onAlternarOrdenacao?: ((chave: string) => any) | undefined;
|
||||
}>, {
|
||||
mostrarSelecao: boolean;
|
||||
colunaOrdenacao: string | null;
|
||||
todosSelecionados: boolean;
|
||||
algunsSelecionados: boolean;
|
||||
}, {}, {
|
||||
ArrowUp: import("@lucide/vue").LucideIcon;
|
||||
ArrowDown: import("@lucide/vue").LucideIcon;
|
||||
|
|
|
|||
|
|
@ -24,11 +24,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>, {
|
||||
visiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
invisiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
itemSendoArrastado: import("vue").Ref<string | null, string | null>;
|
||||
emitFechar: () => void;
|
||||
emitSalvar: () => void;
|
||||
onDragStart: (e: DragEvent, rotulo: string, origem: OrigemLista, index: number) => void;
|
||||
onDropItem: (e: DragEvent, destino: OrigemLista, index: number) => void;
|
||||
onDropLista: (e: DragEvent, destino: OrigemLista, _index: number | null) => void;
|
||||
onDragStart: (e: DragEvent, rotulo: string) => void;
|
||||
onDragEnd: () => void;
|
||||
onDragOverItem: (alvoRotulo: string, destino: OrigemLista) => void;
|
||||
onDragOverLista: (destino: OrigemLista) => void;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
fechar(): true;
|
||||
salvar(_config: EliTabelaColunasConfig): true;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@ export type tipoEliTabelaConsulta<T> = {
|
|||
nome: string;
|
||||
/** Indica se a caixa de busca deve ser exibida acima da tabela. */
|
||||
mostrarCaixaDeBusca?: boolean;
|
||||
/** Habilita seleção múltipla (checkboxes) nas linhas da tabela. */
|
||||
mostrar_selecao?: boolean;
|
||||
/** Chave (ex: "id") para identificar unicamente a linha nas seleções entre páginas. */
|
||||
chave_selecao?: keyof T;
|
||||
/** Lista de colunas da tabela. */
|
||||
colunas: tipoEliColuna<T>[];
|
||||
/** Quantidade de registros solicitados por consulta (padrão `10`). */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue