@praxisui/table 1.0.0-beta.8 → 3.0.0-beta.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.
- package/README.md +466 -40
- package/fesm2022/praxisui-table-filter-drawer-adapter.mjs +18 -0
- package/fesm2022/praxisui-table-filter-drawer-adapter.mjs.map +1 -0
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-C2rQnHE1.mjs +166 -0
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-C2rQnHE1.mjs.map +1 -0
- package/fesm2022/praxisui-table-table-ai.adapter-C5rjLb8E.mjs +822 -0
- package/fesm2022/praxisui-table-table-ai.adapter-C5rjLb8E.mjs.map +1 -0
- package/fesm2022/praxisui-table.mjs +35475 -11631
- package/fesm2022/praxisui-table.mjs.map +1 -1
- package/filter-drawer-adapter/index.d.ts +34 -0
- package/filter-drawer-adapter/package.json +3 -0
- package/index.d.ts +1929 -500
- package/package.json +16 -9
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs +0 -85
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { FormConfig } from '@praxisui/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuração de abertura do Advanced Filter em gaveta pelo host.
|
|
6
|
+
*
|
|
7
|
+
* Notas para hosts que exibem botão "Salvar como atalho":
|
|
8
|
+
* - Exiba a ação apenas quando `allowSaveTags === true`.
|
|
9
|
+
* - Para habilitar o botão, verifique se há ao menos um filtro efetivo no DTO (campos não vazios).
|
|
10
|
+
* - Monte o DTO para salvar mesclando `initialDto` e o valor atual do formulário (`lastValue`),
|
|
11
|
+
* e limpe chaves com valores vazios ('' | null | undefined) antes de chamar `onSaveShortcut(dto)`.
|
|
12
|
+
*/
|
|
13
|
+
interface FilterDrawerOpenConfig {
|
|
14
|
+
resourcePath: string;
|
|
15
|
+
formId: string;
|
|
16
|
+
config: FormConfig;
|
|
17
|
+
initialDto?: Record<string, any>;
|
|
18
|
+
title?: string;
|
|
19
|
+
onSubmit(dto: Record<string, any>): void;
|
|
20
|
+
onClose?(): void;
|
|
21
|
+
/** Permite que a UI do host exiba ação de salvar atalho (opcional, retrocompatível) */
|
|
22
|
+
allowSaveTags?: boolean;
|
|
23
|
+
/** Rótulo i18n para o botão de salvar atalho (opcional) */
|
|
24
|
+
i18nSaveAsShortcut?: string;
|
|
25
|
+
/** Callback disparado pelo host com o DTO atual quando o usuário optar por salvar um atalho */
|
|
26
|
+
onSaveShortcut?: (dto: Record<string, any>) => void;
|
|
27
|
+
}
|
|
28
|
+
interface FilterDrawerAdapter {
|
|
29
|
+
open(config: FilterDrawerOpenConfig): Promise<void> | void;
|
|
30
|
+
}
|
|
31
|
+
declare const FILTER_DRAWER_ADAPTER: InjectionToken<FilterDrawerAdapter>;
|
|
32
|
+
|
|
33
|
+
export { FILTER_DRAWER_ADAPTER };
|
|
34
|
+
export type { FilterDrawerAdapter, FilterDrawerOpenConfig };
|