@praxisui/table 1.0.0-beta.46 → 1.0.0-beta.47
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/fesm2022/praxisui-table-filter-drawer-adapter.mjs +18 -0
- package/fesm2022/praxisui-table-filter-drawer-adapter.mjs.map +1 -0
- package/fesm2022/praxisui-table.mjs +95 -35
- 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 +6 -32
- package/package.json +11 -7
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
function getFilterDrawerAdapterToken() {
|
|
4
|
+
const registryKey = '__PAX_FILTER_DRAWER_ADAPTER_TOKEN__';
|
|
5
|
+
const globalRegistry = globalThis;
|
|
6
|
+
if (!globalRegistry[registryKey]) {
|
|
7
|
+
globalRegistry[registryKey] = new InjectionToken('FILTER_DRAWER_ADAPTER');
|
|
8
|
+
}
|
|
9
|
+
return globalRegistry[registryKey];
|
|
10
|
+
}
|
|
11
|
+
const FILTER_DRAWER_ADAPTER = getFilterDrawerAdapterToken();
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Generated bundle index. Do not edit.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { FILTER_DRAWER_ADAPTER };
|
|
18
|
+
//# sourceMappingURL=praxisui-table-filter-drawer-adapter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"praxisui-table-filter-drawer-adapter.mjs","sources":["../../../projects/praxis-table/filter-drawer-adapter/src/filter-drawer-adapter.ts","../../../projects/praxis-table/filter-drawer-adapter/praxisui-table-filter-drawer-adapter.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { FormConfig } from '@praxisui/core';\n\n/**\n * Configuração de abertura do Advanced Filter em gaveta pelo host.\n *\n * Notas para hosts que exibem botão \"Salvar como atalho\":\n * - Exiba a ação apenas quando `allowSaveTags === true`.\n * - Para habilitar o botão, verifique se há ao menos um filtro efetivo no DTO (campos não vazios).\n * - Monte o DTO para salvar mesclando `initialDto` e o valor atual do formulário (`lastValue`),\n * e limpe chaves com valores vazios ('' | null | undefined) antes de chamar `onSaveShortcut(dto)`.\n */\nexport interface FilterDrawerOpenConfig {\n resourcePath: string;\n formId: string;\n config: FormConfig;\n initialDto?: Record<string, any>;\n title?: string;\n onSubmit(dto: Record<string, any>): void;\n onClose?(): void;\n /** Permite que a UI do host exiba ação de salvar atalho (opcional, retrocompatível) */\n allowSaveTags?: boolean;\n /** Rótulo i18n para o botão de salvar atalho (opcional) */\n i18nSaveAsShortcut?: string;\n /** Callback disparado pelo host com o DTO atual quando o usuário optar por salvar um atalho */\n onSaveShortcut?: (dto: Record<string, any>) => void;\n}\n\nexport interface FilterDrawerAdapter {\n open(config: FilterDrawerOpenConfig): Promise<void> | void;\n}\n\nfunction getFilterDrawerAdapterToken(): InjectionToken<FilterDrawerAdapter> {\n const registryKey = '__PAX_FILTER_DRAWER_ADAPTER_TOKEN__';\n const globalRegistry = globalThis as typeof globalThis & {\n [registryKey]?: InjectionToken<FilterDrawerAdapter>;\n };\n if (!globalRegistry[registryKey]) {\n globalRegistry[registryKey] = new InjectionToken<FilterDrawerAdapter>('FILTER_DRAWER_ADAPTER');\n }\n return globalRegistry[registryKey];\n}\n\nexport const FILTER_DRAWER_ADAPTER = getFilterDrawerAdapterToken();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAgCA,SAAS,2BAA2B,GAAA;IAClC,MAAM,WAAW,GAAG,qCAAqC;IACzD,MAAM,cAAc,GAAG,UAEtB;AACD,IAAA,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;QAChC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,cAAc,CAAsB,uBAAuB,CAAC;IAChG;AACA,IAAA,OAAO,cAAc,CAAC,WAAW,CAAC;AACpC;AAEO,MAAM,qBAAqB,GAAG,2BAA2B;;AC3ChE;;AAEG;;;;"}
|