@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,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 };
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChanges, OnInit, AfterViewInit, DoCheck, DestroyRef, ChangeDetectorRef, NgZone, AfterContentInit,
|
|
2
|
+
import { OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChanges, OnInit, AfterViewInit, DoCheck, DestroyRef, ChangeDetectorRef, NgZone, AfterContentInit, Provider } from '@angular/core';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { MatTable, MatTableDataSource } from '@angular/material/table';
|
|
5
5
|
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
|
@@ -1344,6 +1344,8 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1344
1344
|
getComposeItems(row: any, column: ColumnDefinition): any[];
|
|
1345
1345
|
getComposeClasses(row: any, column: ColumnDefinition): string[];
|
|
1346
1346
|
getComposeGapStyle(row: any, column: ColumnDefinition): any;
|
|
1347
|
+
private getComposeItemField;
|
|
1348
|
+
getComposeItemValue(row: any, base: ColumnDefinition, item: any): any;
|
|
1347
1349
|
asItemColumn(base: ColumnDefinition, item: any): any;
|
|
1348
1350
|
getItemEffectiveType(row: any, column: ColumnDefinition, item: any): any;
|
|
1349
1351
|
private mergeRenderer;
|
|
@@ -1751,6 +1753,7 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1751
1753
|
onExportRendererJson(): Promise<void>;
|
|
1752
1754
|
onImportRendererJson(): void;
|
|
1753
1755
|
private sanitizeRenderer;
|
|
1756
|
+
private sanitizeComposeItem;
|
|
1754
1757
|
private ensurePreviewRows;
|
|
1755
1758
|
private evalValueExpr;
|
|
1756
1759
|
private evalArrayExpr;
|
|
@@ -2500,35 +2503,6 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
2500
2503
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTableConfigEditor, "praxis-table-config-editor", never, {}, {}, never, never, true, never>;
|
|
2501
2504
|
}
|
|
2502
2505
|
|
|
2503
|
-
/**
|
|
2504
|
-
* Configuração de abertura do Advanced Filter em gaveta pelo host.
|
|
2505
|
-
*
|
|
2506
|
-
* Notas para hosts que exibem botão "Salvar como atalho":
|
|
2507
|
-
* - Exiba a ação apenas quando `allowSaveTags === true`.
|
|
2508
|
-
* - Para habilitar o botão, verifique se há ao menos um filtro efetivo no DTO (campos não vazios).
|
|
2509
|
-
* - Monte o DTO para salvar mesclando `initialDto` e o valor atual do formulário (`lastValue`),
|
|
2510
|
-
* e limpe chaves com valores vazios ('' | null | undefined) antes de chamar `onSaveShortcut(dto)`.
|
|
2511
|
-
*/
|
|
2512
|
-
interface FilterDrawerOpenConfig {
|
|
2513
|
-
resourcePath: string;
|
|
2514
|
-
formId: string;
|
|
2515
|
-
config: FormConfig;
|
|
2516
|
-
initialDto?: Record<string, any>;
|
|
2517
|
-
title?: string;
|
|
2518
|
-
onSubmit(dto: Record<string, any>): void;
|
|
2519
|
-
onClose?(): void;
|
|
2520
|
-
/** Permite que a UI do host exiba ação de salvar atalho (opcional, retrocompatível) */
|
|
2521
|
-
allowSaveTags?: boolean;
|
|
2522
|
-
/** Rótulo i18n para o botão de salvar atalho (opcional) */
|
|
2523
|
-
i18nSaveAsShortcut?: string;
|
|
2524
|
-
/** Callback disparado pelo host com o DTO atual quando o usuário optar por salvar um atalho */
|
|
2525
|
-
onSaveShortcut?: (dto: Record<string, any>) => void;
|
|
2526
|
-
}
|
|
2527
|
-
interface FilterDrawerAdapter {
|
|
2528
|
-
open(config: FilterDrawerOpenConfig): Promise<void> | void;
|
|
2529
|
-
}
|
|
2530
|
-
declare const FILTER_DRAWER_ADAPTER: InjectionToken<FilterDrawerAdapter>;
|
|
2531
|
-
|
|
2532
2506
|
declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
2533
2507
|
private cdr;
|
|
2534
2508
|
private formattingService;
|
|
@@ -3109,5 +3083,5 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
3109
3083
|
}
|
|
3110
3084
|
declare const TABLE_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
|
|
3111
3085
|
|
|
3112
|
-
export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService,
|
|
3113
|
-
export type { ActionLike, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, ColumnChange, ColumnDataType$1 as ColumnDataType, ConcatenationParams, ConditionalMappingParams, CurrencyFormatterOptions, DataMode, DateFormatterOptions, DefaultValueParams, FieldSchema, FilterConfig,
|
|
3086
|
+
export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TABLE_AI_CAPABILITIES, TABLE_COMPONENT_AI_CAPABILITIES, TASK_PRESETS, TableDefaultsProvider, TableRulesEditorComponent, ToolbarActionsEditorComponent, ValueMappingEditorComponent, VisualFormulaBuilderComponent, getActionId, getEnum, getTableCapabilities, hasJsonKey, jsonPathGet, jsonPathMatches, providePraxisTableMetadata, registerDateDslFunctions, registerJsonDslFunctions };
|
|
3087
|
+
export type { ActionLike, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, ColumnChange, ColumnDataType$1 as ColumnDataType, ConcatenationParams, ConditionalMappingParams, CurrencyFormatterOptions, DataMode, DateFormatterOptions, DefaultValueParams, FieldSchema, FilterConfig, FilterTag, FormatPreset, FormatterConfig, FormulaDefinition, FormulaParameterSchema, FormulaParams, FormulaTemplate, FormulaType, I18n, JsonEditorEvent, JsonValidationResult, MessagesLocalizationChange, NestedPropertyParams, NumberFormatterOptions, PercentageFormatterOptions, ResourcePathIntent, RowAction, RowExpansionChangeBase, RowExpansionChangeEvent, RowExpansionReasonCode, RowExpansionTrigger, StringFormatterOptions, Capability as TableComponentCapability, CapabilityCatalog as TableComponentCapabilityCatalog, CapabilityCategory as TableComponentCapabilityCategory, ValueKind as TableComponentValueKind, ToolbarAction, ToolbarActionsChange, ValueKind$1 as ValueKind, ValueMappingPair };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/table",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.47",
|
|
4
4
|
"description": "Advanced data table for Angular (Praxis UI) with editing, filtering, sorting, virtualization, and settings panel integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
|
-
"@praxisui/core": "^1.0.0-beta.
|
|
9
|
-
"@praxisui/dynamic-fields": "^1.0.0-beta.
|
|
10
|
-
"@praxisui/dynamic-form": "^1.0.0-beta.
|
|
11
|
-
"@praxisui/metadata-editor": "^1.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^1.0.0-beta.
|
|
13
|
-
"@praxisui/table-rule-builder": "^1.0.0-beta.
|
|
8
|
+
"@praxisui/core": "^1.0.0-beta.47",
|
|
9
|
+
"@praxisui/dynamic-fields": "^1.0.0-beta.47",
|
|
10
|
+
"@praxisui/dynamic-form": "^1.0.0-beta.47",
|
|
11
|
+
"@praxisui/metadata-editor": "^1.0.0-beta.47",
|
|
12
|
+
"@praxisui/settings-panel": "^1.0.0-beta.47",
|
|
13
|
+
"@praxisui/table-rule-builder": "^1.0.0-beta.47"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.3.0"
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
".": {
|
|
46
46
|
"types": "./index.d.ts",
|
|
47
47
|
"default": "./fesm2022/praxisui-table.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./filter-drawer-adapter": {
|
|
50
|
+
"types": "./filter-drawer-adapter/index.d.ts",
|
|
51
|
+
"default": "./fesm2022/praxisui-table-filter-drawer-adapter.mjs"
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
}
|