aplicado Filtro
This commit is contained in:
parent
e7357e064a
commit
1e3c4026e8
12 changed files with 1507 additions and 12626 deletions
|
|
@ -7,8 +7,6 @@ import { PropType } from "vue";
|
|||
import type { EliColuna } from "./types-eli-tabela";
|
||||
/** Tipos da configuração/contrato da tabela */
|
||||
import type { EliTabelaConsulta } from "./types-eli-tabela";
|
||||
import type { ComponenteEntrada } from "../EliEntrada/tiposEntradas";
|
||||
import { operadores as Operadores } from "p-comuns";
|
||||
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) */
|
||||
|
|
@ -61,66 +59,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
modalFiltroAberto: import("vue").Ref<boolean, boolean>;
|
||||
filtrosUi: import("vue").Ref<{
|
||||
coluna: string | number | symbol;
|
||||
operador: keyof typeof Operadores;
|
||||
entrada: readonly ["texto", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
limiteCaracteres?: number | undefined;
|
||||
formato?: "texto" | "email" | "url" | "telefone" | "cpfCnpj" | "cep" | undefined;
|
||||
}] | readonly ["dataHora", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
modo?: "data" | "dataHora" | undefined;
|
||||
limpavel?: boolean | undefined;
|
||||
erro?: boolean | undefined;
|
||||
mensagensErro?: string | string[] | undefined;
|
||||
dica?: string | undefined;
|
||||
dicaPersistente?: boolean | undefined;
|
||||
min?: string | undefined;
|
||||
max?: string | undefined;
|
||||
densidade?: import("../../tipos/entrada.js").CampoDensidade | undefined;
|
||||
variante?: import("../../tipos/entrada.js").CampoVariante | undefined;
|
||||
}] | readonly ["numero", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
sufixo?: string | undefined;
|
||||
prefixo?: string | undefined;
|
||||
precisao?: number | undefined;
|
||||
}];
|
||||
valor: any;
|
||||
}[], {
|
||||
coluna: string | number | symbol;
|
||||
operador: keyof typeof Operadores;
|
||||
entrada: ComponenteEntrada;
|
||||
valor: any;
|
||||
}[] | {
|
||||
coluna: string | number | symbol;
|
||||
operador: keyof typeof Operadores;
|
||||
entrada: readonly ["texto", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
limiteCaracteres?: number | undefined;
|
||||
formato?: "texto" | "email" | "url" | "telefone" | "cpfCnpj" | "cep" | undefined;
|
||||
}] | readonly ["dataHora", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
modo?: "data" | "dataHora" | undefined;
|
||||
limpavel?: boolean | undefined;
|
||||
erro?: boolean | undefined;
|
||||
mensagensErro?: string | string[] | undefined;
|
||||
dica?: string | undefined;
|
||||
dicaPersistente?: boolean | undefined;
|
||||
min?: string | undefined;
|
||||
max?: string | undefined;
|
||||
densidade?: import("../../tipos/entrada.js").CampoDensidade | undefined;
|
||||
variante?: import("../../tipos/entrada.js").CampoVariante | undefined;
|
||||
}] | readonly ["numero", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
sufixo?: string | undefined;
|
||||
prefixo?: string | undefined;
|
||||
precisao?: number | undefined;
|
||||
}];
|
||||
valor: any;
|
||||
}[]>;
|
||||
salvarFiltrosAvancados: (novo: any[]) => void;
|
||||
|
|
@ -728,9 +672,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
};
|
||||
filtrosBase: {
|
||||
type: PropType<Array<{
|
||||
rotulo: string;
|
||||
coluna: string | number | symbol;
|
||||
operador: Operadores | keyof typeof Operadores;
|
||||
entrada: ComponenteEntrada;
|
||||
operador: import("p-comuns").operadores | keyof typeof import("p-comuns").operadores;
|
||||
entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada;
|
||||
}>>;
|
||||
required: true;
|
||||
};
|
||||
|
|
@ -741,7 +686,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>, {
|
||||
linhas: import("vue").Ref<{
|
||||
coluna: string | number | symbol;
|
||||
operador: "in" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "like" | "isNull";
|
||||
entrada: readonly ["texto", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
|
|
@ -767,15 +711,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
prefixo?: string | undefined;
|
||||
precisao?: number | undefined;
|
||||
}];
|
||||
operador: string;
|
||||
valor: any;
|
||||
}[], {
|
||||
coluna: string | number | symbol;
|
||||
operador: "in" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "like" | "isNull";
|
||||
entrada: ComponenteEntrada;
|
||||
entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada;
|
||||
operador: string;
|
||||
valor: any;
|
||||
}[] | {
|
||||
coluna: string | number | symbol;
|
||||
operador: "in" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "like" | "isNull";
|
||||
entrada: readonly ["texto", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
|
|
@ -801,11 +745,17 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
prefixo?: string | undefined;
|
||||
precisao?: number | undefined;
|
||||
}];
|
||||
operador: string;
|
||||
valor: any;
|
||||
}[]>;
|
||||
operadoresDisponiveis: ("in" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "like" | "isNull")[];
|
||||
colunasDisponiveis: import("vue").Ref<string[], string[]>;
|
||||
componenteEntrada: (entrada: ComponenteEntrada) => import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
opcoesParaAdicionar: import("vue").ComputedRef<{
|
||||
rotulo: string;
|
||||
coluna: string | number | symbol;
|
||||
operador: import("p-comuns").operadores | keyof typeof import("p-comuns").operadores;
|
||||
entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada;
|
||||
}[]>;
|
||||
colunaParaAdicionar: import("vue").Ref<string, string>;
|
||||
componenteEntrada: (entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada) => import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
value: {
|
||||
type: PropType<string | null | undefined>;
|
||||
default: undefined;
|
||||
|
|
@ -1150,12 +1100,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
modelValue: string | null;
|
||||
desabilitado: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
opcoesEntrada: (entrada: ComponenteEntrada) => any;
|
||||
opcoesEntrada: (entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada) => any;
|
||||
adicionar: () => void;
|
||||
remover: (idx: number) => void;
|
||||
emitFechar: () => void;
|
||||
emitSalvar: () => void;
|
||||
emitLimpar: () => void;
|
||||
rotuloDoFiltro: (f: {
|
||||
rotulo: string;
|
||||
coluna: string | number | symbol;
|
||||
operador: import("p-comuns").operadores | keyof typeof import("p-comuns").operadores;
|
||||
entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada;
|
||||
}) => string;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
fechar: () => true;
|
||||
limpar: () => true;
|
||||
|
|
@ -1167,9 +1123,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
};
|
||||
filtrosBase: {
|
||||
type: PropType<Array<{
|
||||
rotulo: string;
|
||||
coluna: string | number | symbol;
|
||||
operador: Operadores | keyof typeof Operadores;
|
||||
entrada: ComponenteEntrada;
|
||||
operador: import("p-comuns").operadores | keyof typeof import("p-comuns").operadores;
|
||||
entrada: import("../EliEntrada/tiposEntradas.js").ComponenteEntrada;
|
||||
}>>;
|
||||
required: true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
import { PropType } from "vue";
|
||||
import { operadores as Operadores } from "p-comuns";
|
||||
import type { ComponenteEntrada } from "../EliEntrada/tiposEntradas";
|
||||
import type { EliTabelaConsulta } from "./types-eli-tabela";
|
||||
type Operador = keyof typeof Operadores;
|
||||
type FiltroBase<T> = NonNullable<EliTabelaConsulta<T>["filtroAvancado"]>[number];
|
||||
type LinhaFiltro<T> = {
|
||||
coluna: keyof T;
|
||||
operador: Operador;
|
||||
entrada: ComponenteEntrada;
|
||||
operador: string;
|
||||
valor: any;
|
||||
};
|
||||
declare function rotuloDoFiltro(f: FiltroBase<any>): string;
|
||||
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
aberto: {
|
||||
type: BooleanConstructor;
|
||||
|
|
@ -26,7 +25,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
}>, {
|
||||
linhas: import("vue").Ref<{
|
||||
coluna: string | number | symbol;
|
||||
operador: Operador;
|
||||
entrada: readonly ["texto", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
|
|
@ -52,10 +50,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
prefixo?: string | undefined;
|
||||
precisao?: number | undefined;
|
||||
}];
|
||||
operador: string;
|
||||
valor: any;
|
||||
}[], LinhaFiltro<any>[] | {
|
||||
coluna: string | number | symbol;
|
||||
operador: Operador;
|
||||
entrada: readonly ["texto", {
|
||||
rotulo: string;
|
||||
placeholder?: string | undefined;
|
||||
|
|
@ -81,10 +79,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
prefixo?: string | undefined;
|
||||
precisao?: number | undefined;
|
||||
}];
|
||||
operador: string;
|
||||
valor: any;
|
||||
}[]>;
|
||||
operadoresDisponiveis: ("in" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "like" | "isNull")[];
|
||||
colunasDisponiveis: import("vue").Ref<string[], string[]>;
|
||||
opcoesParaAdicionar: import("vue").ComputedRef<{
|
||||
rotulo: string;
|
||||
coluna: string | number | symbol;
|
||||
operador: import("p-comuns").operadores | keyof typeof import("p-comuns").operadores;
|
||||
entrada: ComponenteEntrada;
|
||||
}[]>;
|
||||
colunaParaAdicionar: import("vue").Ref<string, string>;
|
||||
componenteEntrada: (entrada: ComponenteEntrada) => import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
value: {
|
||||
type: PropType<string | null | undefined>;
|
||||
|
|
@ -436,6 +440,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|||
emitFechar: () => void;
|
||||
emitSalvar: () => void;
|
||||
emitLimpar: () => void;
|
||||
rotuloDoFiltro: typeof rotuloDoFiltro;
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
fechar: () => true;
|
||||
limpar: () => true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import type { EliTabelaConsulta } from "./types-eli-tabela";
|
||||
export type EliTabelaFiltroAvancadoSalvo<T> = NonNullable<EliTabelaConsulta<T>["filtroAvancado"]>;
|
||||
export type EliTabelaFiltroAvancadoSalvo<T> = Array<{
|
||||
coluna: keyof T;
|
||||
valor: any;
|
||||
}>;
|
||||
export declare function carregarFiltroAvancado<T>(nomeTabela: string): EliTabelaFiltroAvancadoSalvo<T>;
|
||||
export declare function salvarFiltroAvancado<T>(nomeTabela: string, filtros: EliTabelaFiltroAvancadoSalvo<T>): void;
|
||||
export declare function limparFiltroAvancado(nomeTabela: string): void;
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ export type EliTabelaConsulta<T> = {
|
|||
}[];
|
||||
/** configuração para aplicação dos filtros padrões */
|
||||
filtroAvancado?: {
|
||||
rotulo: string;
|
||||
coluna: keyof T;
|
||||
operador: operadores | keyof typeof operadores;
|
||||
entrada: ComponenteEntrada;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue