adicionado gestão de colunas
This commit is contained in:
parent
2afa99512e
commit
51c3808a7f
14 changed files with 1910 additions and 929 deletions
2
dist/eli-vue.css
vendored
2
dist/eli-vue.css
vendored
File diff suppressed because one or more lines are too long
2096
dist/eli-vue.es.js
vendored
2096
dist/eli-vue.es.js
vendored
File diff suppressed because it is too large
Load diff
28
dist/eli-vue.umd.js
vendored
28
dist/eli-vue.umd.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -6,6 +6,7 @@
|
|||
import { PropType } from "vue";
|
||||
/** Tipos da configuração/contrato da tabela */
|
||||
import type { EliTabelaConsulta } from "./types-eli-tabela";
|
||||
import { type EliTabelaColunasConfig } from "./colunasStorage";
|
||||
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
/** Configuração principal da tabela (colunas, consulta e ações) */
|
||||
tabela: {
|
||||
|
|
@ -34,6 +35,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}[]>;
|
||||
temAcoesCabecalho: import("vue").ComputedRef<boolean>;
|
||||
temAcoes: import("vue").ComputedRef<boolean>;
|
||||
colunasEfetivas: import("vue").ComputedRef<any[]>;
|
||||
rotulosColunas: import("vue").ComputedRef<string[]>;
|
||||
modalColunasAberto: import("vue").Ref<boolean, boolean>;
|
||||
configColunas: import("vue").Ref<{
|
||||
visiveis: string[];
|
||||
invisiveis: string[];
|
||||
}, EliTabelaColunasConfig | {
|
||||
visiveis: string[];
|
||||
invisiveis: string[];
|
||||
}>;
|
||||
abrirModalColunas: () => void;
|
||||
fecharModalColunas: () => void;
|
||||
salvarModalColunas: (cfg: EliTabelaColunasConfig) => void;
|
||||
alternarOrdenacao: (chave?: string) => void;
|
||||
atualizarBusca: (texto: string) => void;
|
||||
irParaPagina: (pagina: number) => void;
|
||||
|
|
@ -79,6 +93,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
exibirBotaoColunas: {
|
||||
type: BooleanConstructor;
|
||||
required: false;
|
||||
default: boolean;
|
||||
};
|
||||
valorBusca: {
|
||||
type: StringConstructor;
|
||||
required: true;
|
||||
|
|
@ -107,13 +126,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>, {
|
||||
temAcoesCabecalho: import("vue").ComputedRef<boolean>;
|
||||
emitBuscar: (texto: string) => void;
|
||||
emitColunas: () => void;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
buscar(valor: string): boolean;
|
||||
colunas(): true;
|
||||
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
exibirBusca: {
|
||||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
exibirBotaoColunas: {
|
||||
type: BooleanConstructor;
|
||||
required: false;
|
||||
default: boolean;
|
||||
};
|
||||
valorBusca: {
|
||||
type: StringConstructor;
|
||||
required: true;
|
||||
|
|
@ -141,7 +167,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
};
|
||||
}>> & Readonly<{
|
||||
onBuscar?: ((valor: string) => any) | undefined;
|
||||
}>, {}, {}, {
|
||||
onColunas?: (() => any) | undefined;
|
||||
}>, {
|
||||
exibirBotaoColunas: boolean;
|
||||
}, {}, {
|
||||
EliTabelaCaixaDeBusca: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
modelo: {
|
||||
type: StringConstructor;
|
||||
|
|
@ -464,6 +493,47 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>> & Readonly<{
|
||||
onAlterar?: ((pagina: number) => any) | undefined;
|
||||
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
EliTabelaModalColunas: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
aberto: {
|
||||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
rotulosColunas: {
|
||||
type: PropType<string[]>;
|
||||
required: true;
|
||||
};
|
||||
configInicial: {
|
||||
type: PropType<EliTabelaColunasConfig>;
|
||||
required: true;
|
||||
};
|
||||
}>, {
|
||||
visiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
invisiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
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;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
fechar(): true;
|
||||
salvar(_config: EliTabelaColunasConfig): true;
|
||||
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
aberto: {
|
||||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
rotulosColunas: {
|
||||
type: PropType<string[]>;
|
||||
required: true;
|
||||
};
|
||||
configInicial: {
|
||||
type: PropType<EliTabelaColunasConfig>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onFechar?: (() => any) | undefined;
|
||||
onSalvar?: ((_config: EliTabelaColunasConfig) => any) | undefined;
|
||||
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
exibirBotaoColunas: {
|
||||
type: BooleanConstructor;
|
||||
required: false;
|
||||
default: boolean;
|
||||
};
|
||||
valorBusca: {
|
||||
type: StringConstructor;
|
||||
required: true;
|
||||
|
|
@ -20,13 +25,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>, {
|
||||
temAcoesCabecalho: import("vue").ComputedRef<boolean>;
|
||||
emitBuscar: (texto: string) => void;
|
||||
emitColunas: () => void;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
buscar(valor: string): boolean;
|
||||
colunas(): true;
|
||||
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
exibirBusca: {
|
||||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
exibirBotaoColunas: {
|
||||
type: BooleanConstructor;
|
||||
required: false;
|
||||
default: boolean;
|
||||
};
|
||||
valorBusca: {
|
||||
type: StringConstructor;
|
||||
required: true;
|
||||
|
|
@ -42,7 +54,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
};
|
||||
}>> & Readonly<{
|
||||
onBuscar?: ((valor: string) => any) | undefined;
|
||||
}>, {}, {}, {
|
||||
onColunas?: (() => any) | undefined;
|
||||
}>, {
|
||||
exibirBotaoColunas: boolean;
|
||||
}, {}, {
|
||||
EliTabelaCaixaDeBusca: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
modelo: {
|
||||
type: StringConstructor;
|
||||
|
|
|
|||
46
dist/types/components/eli/EliTabela/EliTabelaModalColunas.vue.d.ts
vendored
Normal file
46
dist/types/components/eli/EliTabela/EliTabelaModalColunas.vue.d.ts
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import { PropType } from "vue";
|
||||
import type { EliTabelaColunasConfig } from "./colunasStorage";
|
||||
type OrigemLista = "visiveis" | "invisiveis";
|
||||
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
aberto: {
|
||||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
rotulosColunas: {
|
||||
type: PropType<string[]>;
|
||||
required: true;
|
||||
};
|
||||
configInicial: {
|
||||
type: PropType<EliTabelaColunasConfig>;
|
||||
required: true;
|
||||
};
|
||||
}>, {
|
||||
visiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
invisiveisLocal: import("vue").Ref<string[], string[]>;
|
||||
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;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
fechar(): true;
|
||||
salvar(_config: EliTabelaColunasConfig): true;
|
||||
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
aberto: {
|
||||
type: BooleanConstructor;
|
||||
required: true;
|
||||
};
|
||||
rotulosColunas: {
|
||||
type: PropType<string[]>;
|
||||
required: true;
|
||||
};
|
||||
configInicial: {
|
||||
type: PropType<EliTabelaColunasConfig>;
|
||||
required: true;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onFechar?: (() => any) | undefined;
|
||||
onSalvar?: ((_config: EliTabelaColunasConfig) => any) | undefined;
|
||||
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
export default _default;
|
||||
10
dist/types/components/eli/EliTabela/colunasStorage.d.ts
vendored
Normal file
10
dist/types/components/eli/EliTabela/colunasStorage.d.ts
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export type EliTabelaColunasConfig = {
|
||||
/** Rotulos das colunas visiveis (em ordem). */
|
||||
visiveis: string[];
|
||||
/** Rotulos das colunas invisiveis. */
|
||||
invisiveis: string[];
|
||||
};
|
||||
export declare function storageKeyColunas(nomeTabela: string): string;
|
||||
export declare function carregarConfigColunas(nomeTabela: string): EliTabelaColunasConfig;
|
||||
export declare function salvarConfigColunas(nomeTabela: string, config: EliTabelaColunasConfig): void;
|
||||
export declare function limparConfigColunas(nomeTabela: string): void;
|
||||
|
|
@ -63,6 +63,8 @@ export type EliTabelaAcao<T> = {
|
|||
* - `mostrarCaixaDeBusca`: habilita um campo de busca textual no cabeçalho
|
||||
*/
|
||||
export type EliTabelaConsulta<T> = {
|
||||
/** nome da tabela, um identificador unico */
|
||||
nome: string;
|
||||
/** Indica se a caixa de busca deve ser exibida acima da tabela. */
|
||||
mostrarCaixaDeBusca?: boolean;
|
||||
/** Lista de colunas da tabela. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue