@praxisui/table 0.0.1

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/index.d.ts ADDED
@@ -0,0 +1,1771 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, OnChanges, AfterViewInit, OnDestroy, DoCheck, TemplateRef, EventEmitter, ElementRef, DestroyRef, ChangeDetectorRef, SimpleChanges, AfterContentInit, InjectionToken, Provider } from '@angular/core';
3
+ import { MatTableDataSource } from '@angular/material/table';
4
+ import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
+ import { MatSort, Sort } from '@angular/material/sort';
6
+ import { MatSnackBar } from '@angular/material/snack-bar';
7
+ import { SelectionModel } from '@angular/cdk/collections';
8
+ import { SettingsPanelService, SettingsValueProvider, SettingsPanelRef } from '@praxisui/settings-panel';
9
+ import * as _praxisui_core from '@praxisui/core';
10
+ import { GlobalConfigService, TableConfig, ConfigStorage, SchemaIdParams, FieldMetadata, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ColumnDefinition, ConnectionStorage, IconPickerService, TableConfigService, ComponentDocMeta } from '@praxisui/core';
11
+ import { DatePipe, DecimalPipe, CurrencyPipe, PercentPipe, UpperCasePipe, LowerCasePipe, TitleCasePipe } from '@angular/common';
12
+ import { FormControl, FormGroup, AbstractControl, FormBuilder } from '@angular/forms';
13
+ import { MatDialog } from '@angular/material/dialog';
14
+ import { CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';
15
+ import { SpecificationBridgeService, RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
16
+ import { PraxisDialog } from '@praxisui/dialog';
17
+ import { BehaviorSubject, Observable } from 'rxjs';
18
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
19
+ import * as _angular_material_paginator_d_Zo1cMMo4 from '@angular/material/paginator.d-Zo1cMMo4';
20
+ import { MatCheckboxChange } from '@angular/material/checkbox';
21
+
22
+ type ColumnDataType = 'date' | 'number' | 'currency' | 'percentage' | 'string' | 'boolean' | 'custom';
23
+ interface FormatterConfig {
24
+ type: ColumnDataType;
25
+ options: any;
26
+ }
27
+ interface DateFormatterOptions {
28
+ preset?: string;
29
+ customFormat?: string;
30
+ }
31
+ interface NumberFormatterOptions {
32
+ decimalPlaces?: 'fixed' | 'variable';
33
+ fixedDecimals?: number;
34
+ minDecimals?: number;
35
+ maxDecimals?: number;
36
+ thousandsSeparator?: boolean;
37
+ signDisplay?: 'auto' | 'always' | 'never' | 'exceptZero';
38
+ }
39
+ interface CurrencyFormatterOptions {
40
+ currencyCode?: string;
41
+ currencySymbol?: string;
42
+ symbolPosition?: 'before' | 'after';
43
+ symbolSpacing?: boolean;
44
+ decimalPlaces?: number;
45
+ thousandsSeparator?: boolean;
46
+ }
47
+ interface PercentageFormatterOptions {
48
+ decimalPlaces?: number;
49
+ showSymbol?: boolean;
50
+ multiplier?: boolean;
51
+ }
52
+ interface StringFormatterOptions {
53
+ transform?: 'none' | 'uppercase' | 'lowercase' | 'titlecase' | 'capitalize';
54
+ truncate?: boolean;
55
+ maxLength?: number;
56
+ truncateSuffix?: string;
57
+ }
58
+ interface BooleanFormatterOptions {
59
+ display?: 'true-false' | 'yes-no' | 'active-inactive' | 'on-off' | 'enabled-disabled' | 'custom';
60
+ trueValue?: string;
61
+ falseValue?: string;
62
+ }
63
+ interface FormatPreset {
64
+ label: string;
65
+ description: string;
66
+ value: string;
67
+ example: string;
68
+ }
69
+ declare const DATE_PRESETS: FormatPreset[];
70
+ declare const NUMBER_PRESETS: FormatPreset[];
71
+ declare const CURRENCY_PRESETS: FormatPreset[];
72
+ declare const PERCENTAGE_PRESETS: FormatPreset[];
73
+ declare const STRING_PRESETS: FormatPreset[];
74
+ declare const BOOLEAN_PRESETS: FormatPreset[];
75
+
76
+ declare class DataFormattingService {
77
+ private datePipe;
78
+ private decimalPipe;
79
+ private currencyPipe;
80
+ private percentPipe;
81
+ private upperCasePipe;
82
+ private lowerCasePipe;
83
+ private titleCasePipe;
84
+ private locale;
85
+ private groupSeparator;
86
+ private decimalSeparator;
87
+ constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, currencyPipe: CurrencyPipe, percentPipe: PercentPipe, upperCasePipe: UpperCasePipe, lowerCasePipe: LowerCasePipe, titleCasePipe: TitleCasePipe, locale: string);
88
+ /**
89
+ * Apply formatting to a value based on column type and format string
90
+ */
91
+ formatValue(value: any, columnType: ColumnDataType, formatString: string): any;
92
+ /**
93
+ * Coerce value to the expected type for formatting
94
+ */
95
+ private coerceValueToType;
96
+ /**
97
+ * Format date values
98
+ */
99
+ private formatDate;
100
+ /**
101
+ * Format number values
102
+ */
103
+ private formatNumber;
104
+ /**
105
+ * Format currency values
106
+ */
107
+ private formatCurrency;
108
+ /**
109
+ * Format percentage values
110
+ */
111
+ private formatPercentage;
112
+ private removeGrouping;
113
+ /**
114
+ * Format string values
115
+ */
116
+ private formatString;
117
+ /**
118
+ * Apply string transformations
119
+ */
120
+ private applyStringTransform;
121
+ /**
122
+ * Format boolean values
123
+ */
124
+ private formatBoolean;
125
+ /**
126
+ * Check if formatting is needed for a column
127
+ */
128
+ needsFormatting(columnType: ColumnDataType, formatString: string): boolean;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataFormattingService, never>;
130
+ static ɵprov: i0.ɵɵInjectableDeclaration<DataFormattingService>;
131
+ }
132
+
133
+ /**
134
+ * Provides default table configurations.
135
+ * Applications may override this service to supply product or tenant-specific defaults.
136
+ */
137
+ declare class TableDefaultsProvider {
138
+ private readonly global;
139
+ constructor(global: GlobalConfigService);
140
+ /**
141
+ * Returns default configuration for a given table identifier.
142
+ * @param tableId Table identifier
143
+ */
144
+ getDefaults(tableId: string): TableConfig;
145
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableDefaultsProvider, never>;
146
+ static ɵprov: i0.ɵɵInjectableDeclaration<TableDefaultsProvider>;
147
+ }
148
+
149
+ type FilterConfig = {
150
+ quickField?: string;
151
+ alwaysVisibleFields?: string[];
152
+ placeholder?: string;
153
+ showAdvanced?: boolean;
154
+ mode?: 'auto' | 'filter' | 'card';
155
+ changeDebounceMs?: number;
156
+ allowSaveTags?: boolean;
157
+ placeBooleansInActions?: boolean;
158
+ showToggleLabels?: boolean;
159
+ alwaysMinWidth?: number;
160
+ alwaysColsMd?: number;
161
+ alwaysColsLg?: number;
162
+ autoSummary?: boolean;
163
+ confirmTagDelete?: boolean;
164
+ debugLayout?: boolean;
165
+ tagColor?: 'primary' | 'accent' | 'warn' | 'basic';
166
+ tagVariant?: 'filled' | 'outlined';
167
+ tagButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
168
+ actionsButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
169
+ actionsVariant?: 'standard' | 'outlined';
170
+ overlayVariant?: 'card' | 'frosted';
171
+ overlayBackdrop?: boolean;
172
+ advancedOpenMode?: 'overlay' | 'modal' | 'drawer';
173
+ };
174
+ declare class FilterConfigService {
175
+ private storage;
176
+ private readonly PREFIX;
177
+ constructor(storage: ConfigStorage);
178
+ /**
179
+ * Load a persisted filter configuration for the given key.
180
+ */
181
+ load(key: string): FilterConfig | undefined;
182
+ /**
183
+ * Persist a filter configuration for the given key.
184
+ */
185
+ save(key: string, config: FilterConfig): void;
186
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterConfigService, never>;
187
+ static ɵprov: i0.ɵɵInjectableDeclaration<FilterConfigService>;
188
+ }
189
+
190
+ type FilterTag = {
191
+ id: string;
192
+ label: string;
193
+ patch: Record<string, any>;
194
+ };
195
+ type I18n = {
196
+ searchPlaceholder: string;
197
+ advanced: string;
198
+ clear: string;
199
+ apply: string;
200
+ edit: string;
201
+ noData: string;
202
+ quickFieldNotFound: string;
203
+ saveAsShortcut: string;
204
+ removeShortcut: string;
205
+ renameShortcut: string;
206
+ deleteShortcutConfirm: string;
207
+ retry: string;
208
+ errorLoadingFilters: string;
209
+ settings: string;
210
+ save: string;
211
+ cancel: string;
212
+ };
213
+ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestroy, DoCheck {
214
+ private crud;
215
+ private configStorage;
216
+ private destroyRef;
217
+ private filterConfig;
218
+ private settingsPanel;
219
+ private snackBar;
220
+ private dialog;
221
+ private cdr;
222
+ private dynamicForm;
223
+ private schemaNormalizer;
224
+ resourcePath: string;
225
+ formId: string;
226
+ mode: 'auto' | 'filter' | 'card';
227
+ /** Controls outdated schema notifications visibility and channel (only effective in edit mode) */
228
+ notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
229
+ /** Snooze duration for schema outdated notifications (ms), only in edit mode */
230
+ snoozeMs: number;
231
+ /** Auto open settings when schema is detected as outdated (only in edit mode) */
232
+ autoOpenSettingsOnOutdated: boolean;
233
+ /** Enable edit mode (gates notifications) */
234
+ editModeEnabled: boolean;
235
+ value?: Record<string, any>;
236
+ quickField?: string;
237
+ alwaysVisibleFields?: string[];
238
+ tags?: FilterTag[];
239
+ allowSaveTags?: boolean;
240
+ persistenceKey?: string;
241
+ i18n?: Partial<I18n>;
242
+ changeDebounceMs: number;
243
+ /** Controla a exibição do botão de configurações dentro do filtro */
244
+ showFilterSettings: boolean;
245
+ /** Data used to render the summary card when mode resolves to 'card'. */
246
+ summary?: any;
247
+ /** Custom template to render the summary card; receives the summary as $implicit. */
248
+ summaryTemplate?: TemplateRef<any>;
249
+ /** Mapping functions to build the native summary card. */
250
+ summaryMap?: {
251
+ avatar?: (s: any) => string;
252
+ title: (s: any) => string;
253
+ subtitle?: (s: any) => string;
254
+ badges?: Array<(s: any) => string>;
255
+ };
256
+ /** When true and mode='auto', generates a summary from active filters if no summary is provided. */
257
+ autoSummary: boolean;
258
+ /** Exibir confirmação ao excluir atalho (tag) */
259
+ confirmTagDelete: boolean;
260
+ /** Debug visual de layout/alinhamento */
261
+ debugLayout: boolean;
262
+ /** Move toggles/booleans simples para a área de ações */
263
+ placeBooleansInActions: boolean;
264
+ /** Mostrar rótulos dos toggles na área de ações */
265
+ showToggleLabels: boolean;
266
+ /** Config da grade dos alwaysVisible */
267
+ alwaysMinWidth: number;
268
+ alwaysColsMd: number;
269
+ alwaysColsLg: number;
270
+ /** Tag theming */
271
+ tagColor: 'primary' | 'accent' | 'warn' | 'basic';
272
+ tagVariant: 'filled' | 'outlined';
273
+ tagButtonColor: 'primary' | 'accent' | 'warn' | 'basic';
274
+ /** Action buttons theming */
275
+ actionsButtonColor: 'primary' | 'accent' | 'warn' | 'basic';
276
+ actionsVariant: 'standard' | 'outlined';
277
+ /** Overlay appearance */
278
+ overlayVariant: 'card' | 'frosted';
279
+ overlayBackdrop: boolean;
280
+ /** Advanced panel open mode */
281
+ advancedOpenMode: 'overlay' | 'modal' | 'drawer';
282
+ submit: EventEmitter<Record<string, any>>;
283
+ change: EventEmitter<Record<string, any>>;
284
+ clear: EventEmitter<void>;
285
+ modeChange: EventEmitter<"filter" | "card">;
286
+ requestSearch: EventEmitter<Record<string, any>>;
287
+ tagsChange: EventEmitter<FilterTag[]>;
288
+ metaChanged: EventEmitter<{
289
+ schemaId: string;
290
+ serverHash?: string;
291
+ context: SchemaIdParams;
292
+ }>;
293
+ /** Emits whenever schema outdated state changes (can be used by host) */
294
+ schemaStatusChange: EventEmitter<{
295
+ outdated: boolean;
296
+ serverHash?: string;
297
+ lastVerifiedAt?: string;
298
+ formId?: string;
299
+ }>;
300
+ quickControl: FormControl<any>;
301
+ quickForm: FormGroup<Record<string, AbstractControl<any, any, any>>>;
302
+ alwaysForm: FormGroup<Record<string, FormControl<unknown>>>;
303
+ quickFieldMeta?: FieldMetadata;
304
+ quickFieldMetaArray: FieldMetadata[];
305
+ alwaysVisibleMetas: FieldMetadata[];
306
+ toggleMetas: FieldMetadata[];
307
+ advancedConfig?: FormConfig;
308
+ displayedTags: FilterTag[];
309
+ private savedTags;
310
+ editingTagId?: string;
311
+ editingTagLabel: FormControl<string>;
312
+ schemaLoading: boolean;
313
+ schemaError: boolean;
314
+ private schemaMetas?;
315
+ private advancedChange$;
316
+ private alwaysFormReset$;
317
+ private dto;
318
+ modeState: 'filter' | 'card';
319
+ advancedOpen: boolean;
320
+ advancedValid: boolean;
321
+ activeFiltersCount: number;
322
+ saving: boolean;
323
+ i18nLabels: I18n;
324
+ placeholder?: string;
325
+ private configKey;
326
+ private pendingQuickValue?;
327
+ private autoSummaryData?;
328
+ private lastSchemaMeta?;
329
+ schemaOutdated: boolean;
330
+ anchorRef?: CdkOverlayOrigin;
331
+ quickHostRef?: ElementRef<HTMLElement>;
332
+ overlayOrigin?: CdkOverlayOrigin;
333
+ overlayWidth: number | string;
334
+ isMobile: boolean;
335
+ advancedTitleId: string;
336
+ advancedPanelId: string;
337
+ quickFieldMode: 'dynamic' | 'fallback';
338
+ private isViewInitialized;
339
+ private pendingQuickFieldSetup;
340
+ private isQuickFieldSetupInProgress;
341
+ private _dbgPrevQuickArrayRef;
342
+ private _dbgPrevAlwaysArrayRef;
343
+ private _dbgPrevToggleArrayRef;
344
+ private _dbgPrevQuickFormRef;
345
+ private _dbgPrevAlwaysFormRef;
346
+ private _dbgDoCheckCount;
347
+ private _dbgLastApplyMetasAt;
348
+ private _dbgLastQuickComponentsAt;
349
+ private _dbgLastAlwaysComponentsAt;
350
+ private _dbgLastToggleComponentsAt;
351
+ overlayPositions: ConnectedPosition[];
352
+ private quickSub?;
353
+ private advancedDebouncedSub?;
354
+ private lastSubmitAt;
355
+ private resizeObs?;
356
+ private mutationObs?;
357
+ private ignoreOutsideUntil;
358
+ private _resolvedPrefs;
359
+ private resolveSchemaPrefs;
360
+ constructor(crud: GenericCrudService<any>, configStorage: ConfigStorage, destroyRef: DestroyRef, filterConfig: FilterConfigService, settingsPanel: SettingsPanelService, snackBar: MatSnackBar, dialog: MatDialog, cdr: ChangeDetectorRef, dynamicForm: DynamicFormService, schemaNormalizer: SchemaNormalizerService);
361
+ private readonly global;
362
+ private readonly filterDrawerAdapter;
363
+ private loadSavedTagsFromStorage;
364
+ ngOnInit(): void;
365
+ ngAfterViewInit(): void;
366
+ onWindowResize(): void;
367
+ private initDynamicObservers;
368
+ onDocumentEscClose(event: KeyboardEvent): void;
369
+ private updateOverlayWidth;
370
+ private computeIsMobile;
371
+ ngOnChanges(changes: SimpleChanges): void;
372
+ openSettings(): void;
373
+ switchToFilter(): void;
374
+ createTag(label?: string): void;
375
+ renameTag(tag: FilterTag, label?: string): void;
376
+ deleteTag(tag: FilterTag): void;
377
+ startEditTag(tag: FilterTag, $event?: Event): void;
378
+ commitEditTag(tag: FilterTag, $event?: Event): void;
379
+ cancelEditTag($event?: Event): void;
380
+ advancedForm?: FormGroup<Record<string, any>>;
381
+ private buildFilteredSchemaContext;
382
+ private loadSchemaViaClient;
383
+ loadSchema(): void;
384
+ private applySchemaMetas;
385
+ ngDoCheck(): void;
386
+ onQuickComponents(map: Map<string, any>): void;
387
+ onQuickFieldCreated(ev: any): void;
388
+ onAlwaysComponents(map: Map<string, any>): void;
389
+ onToggleComponents(map: Map<string, any>): void;
390
+ onAdvancedReady(event: {
391
+ formGroup: FormGroup<Record<string, any>>;
392
+ }): void;
393
+ onAdvancedChange(event: {
394
+ formData: Record<string, any>;
395
+ }): void;
396
+ onAdvancedValidityChange(valid: boolean): void;
397
+ onAdvancedSubmit(event: {
398
+ formData: Record<string, any>;
399
+ }): void;
400
+ private closeAdvanced;
401
+ get currentSummary(): any;
402
+ get currentSummaryMap(): {
403
+ avatar?: (s: any) => string;
404
+ title: (s: any) => string;
405
+ subtitle?: (s: any) => string;
406
+ badges?: Array<(s: any) => string>;
407
+ } | undefined;
408
+ private updateAutoSummary;
409
+ private defaultSummaryMap;
410
+ private formatValueForBadge;
411
+ getAdvancedAriaLabel(): string;
412
+ private getSchemaMetaKey;
413
+ private getOutdatedIgnoreKey;
414
+ private getOutdatedSnoozeKey;
415
+ private getOutdatedNotifiedKey;
416
+ private isOutdatedIgnored;
417
+ private getOutdatedSnoozeUntil;
418
+ private setOutdatedSnooze;
419
+ private setOutdatedIgnore;
420
+ private setOutdatedNotified;
421
+ private wasOutdatedNotified;
422
+ private verifyServerSchemaVersion;
423
+ private maybeShowOutdatedSnack;
424
+ /**
425
+ * Sets up Quick Field creating a control from metadata and wiring it to quickForm.
426
+ * Falls back to generic input if creation fails.
427
+ */
428
+ private setupQuickField;
429
+ /**
430
+ * Ensures fallback setup happens only once, preventing multiple executions.
431
+ */
432
+ private ensureFallbackSetup;
433
+ /**
434
+ * Fallback method - maintains current behavior with generic string input.
435
+ * This ensures the system continues working even if dynamic creation fails.
436
+ */
437
+ private setupQuickFieldFallback;
438
+ /**
439
+ * Applies pending quick value to typed control with proper conversion.
440
+ */
441
+ private applyPendingQuickValue;
442
+ getQuickFieldIcon(): string;
443
+ getQuickInputType(): string;
444
+ getQuickInputMode(): string | null;
445
+ ngOnDestroy(): void;
446
+ isUserTag(tag: FilterTag): boolean;
447
+ applyTag(tag: FilterTag): void;
448
+ onQuickNumericKeypress(event: KeyboardEvent): void;
449
+ onQuickBlurFormat(): void;
450
+ private bindQuickControlChanges;
451
+ private bindAdvancedDebounce;
452
+ onSubmit(): void;
453
+ onClear(): void;
454
+ quickHasValue(): boolean;
455
+ private isEventFromNestedOverlay;
456
+ onOverlayDetach(): void;
457
+ onOverlayOutsideClick(_event: MouseEvent): void;
458
+ private openAdvancedModal;
459
+ private openAdvancedDrawer;
460
+ toggleAdvanced(): void;
461
+ private saveConfig;
462
+ private mergeI18n;
463
+ private persist;
464
+ private clearPersisted;
465
+ private persistTags;
466
+ private syncFormsToDto;
467
+ onQuickClear(): void;
468
+ private updateDisplayedTags;
469
+ private evaluateMode;
470
+ onGlobalKeydown(event: KeyboardEvent): void;
471
+ private isEditableElement;
472
+ private focusQuick;
473
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilter, never>;
474
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilter, "praxis-filter", never, { "resourcePath": { "alias": "resourcePath"; "required": true; }; "formId": { "alias": "formId"; "required": true; }; "mode": { "alias": "mode"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "quickField": { "alias": "quickField"; "required": false; }; "alwaysVisibleFields": { "alias": "alwaysVisibleFields"; "required": false; }; "tags": { "alias": "tags"; "required": false; }; "allowSaveTags": { "alias": "allowSaveTags"; "required": false; }; "persistenceKey": { "alias": "persistenceKey"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; "changeDebounceMs": { "alias": "changeDebounceMs"; "required": false; }; "showFilterSettings": { "alias": "showFilterSettings"; "required": false; }; "summary": { "alias": "summary"; "required": false; }; "summaryTemplate": { "alias": "summaryTemplate"; "required": false; }; "summaryMap": { "alias": "summaryMap"; "required": false; }; "autoSummary": { "alias": "autoSummary"; "required": false; }; "confirmTagDelete": { "alias": "confirmTagDelete"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; "placeBooleansInActions": { "alias": "placeBooleansInActions"; "required": false; }; "showToggleLabels": { "alias": "showToggleLabels"; "required": false; }; "alwaysMinWidth": { "alias": "alwaysMinWidth"; "required": false; }; "alwaysColsMd": { "alias": "alwaysColsMd"; "required": false; }; "alwaysColsLg": { "alias": "alwaysColsLg"; "required": false; }; "tagColor": { "alias": "tagColor"; "required": false; }; "tagVariant": { "alias": "tagVariant"; "required": false; }; "tagButtonColor": { "alias": "tagButtonColor"; "required": false; }; "actionsButtonColor": { "alias": "actionsButtonColor"; "required": false; }; "actionsVariant": { "alias": "actionsVariant"; "required": false; }; "overlayVariant": { "alias": "overlayVariant"; "required": false; }; "overlayBackdrop": { "alias": "overlayBackdrop"; "required": false; }; "advancedOpenMode": { "alias": "advancedOpenMode"; "required": false; }; }, { "submit": "submit"; "change": "change"; "clear": "clear"; "modeChange": "modeChange"; "requestSearch": "requestSearch"; "tagsChange": "tagsChange"; "metaChanged": "metaChanged"; "schemaStatusChange": "schemaStatusChange"; }, never, never, true, never>;
475
+ }
476
+
477
+ interface ActionLike {
478
+ action?: string;
479
+ id?: string;
480
+ code?: string;
481
+ key?: string;
482
+ name?: string;
483
+ type?: string;
484
+ icon?: string;
485
+ label?: string;
486
+ }
487
+ declare function getActionId(action: ActionLike): string;
488
+
489
+ interface RowActionConfig extends ActionLike {
490
+ /**
491
+ * Identifier of the action. Historically this property was named `id`
492
+ * in some configurations, so both `action` and `id` are supported.
493
+ */
494
+ icon: string;
495
+ label?: string;
496
+ priority?: number;
497
+ alwaysInline?: boolean;
498
+ visible?: (row: any) => boolean;
499
+ disabled?: (row: any) => boolean;
500
+ autoDelete?: boolean;
501
+ requiresConfirmation?: boolean;
502
+ }
503
+ interface RowActionsBehavior {
504
+ enabled: boolean;
505
+ maxInline: number | {
506
+ xs: number;
507
+ sm: number;
508
+ md: number;
509
+ lg: number;
510
+ } | 'auto';
511
+ autoStrategy?: 'measure' | 'breakpoint';
512
+ }
513
+ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterContentInit, OnDestroy {
514
+ private crudService;
515
+ private cdr;
516
+ private settingsPanel;
517
+ private formattingService;
518
+ private specBridge;
519
+ private configStorage;
520
+ private connectionStorage;
521
+ private tableDefaultsProvider;
522
+ private snackBar;
523
+ private filterConfig;
524
+ private pxDialog;
525
+ private hostRef;
526
+ private global;
527
+ config: TableConfig;
528
+ resourcePath?: string;
529
+ filterCriteria: any;
530
+ /** Controls outdated schema notifications visibility and channel (only effective in edit mode) */
531
+ notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
532
+ /** Snooze duration for schema outdated notifications (ms), only in edit mode */
533
+ snoozeMs: number;
534
+ /** Auto open settings when schema is detected as outdated (only in edit mode) */
535
+ autoOpenSettingsOnOutdated: boolean;
536
+ /** Controls toolbar visibility */
537
+ showToolbar: boolean;
538
+ /** Enables new toolbar layout */
539
+ toolbarV2: boolean;
540
+ /** Habilita exclusão automática */
541
+ autoDelete: boolean;
542
+ /** Enable edit mode */
543
+ editModeEnabled: boolean;
544
+ /** Dense mode reduces cell padding */
545
+ dense: boolean;
546
+ /** Identifier used for settings storage */
547
+ tableId: string;
548
+ /** Habilita visual de debug para alinhamento/layouot */
549
+ debugLayout: boolean;
550
+ /** Contexto opcional quando tabela está dentro do componente CRUD */
551
+ crudContext?: {
552
+ tableId: string;
553
+ resourcePath?: string;
554
+ defaults?: {
555
+ openMode?: 'modal' | 'route';
556
+ modal?: Record<string, any>;
557
+ back?: Record<string, any>;
558
+ };
559
+ actions?: Array<{
560
+ action: string;
561
+ label?: string;
562
+ formId?: string;
563
+ route?: string;
564
+ openMode?: 'modal' | 'route';
565
+ }>;
566
+ /** Nome do campo usado como identificador primário (default: 'id') */
567
+ idField?: string;
568
+ };
569
+ /** Nome do campo usado como identificador primário (default: 'id'). Tem precedência sobre crudContext.idField. */
570
+ idField?: string;
571
+ rowClick: EventEmitter<{
572
+ row: any;
573
+ index: number;
574
+ }>;
575
+ rowAction: EventEmitter<{
576
+ action: string;
577
+ row: any;
578
+ }>;
579
+ toolbarAction: EventEmitter<{
580
+ action: string;
581
+ }>;
582
+ bulkAction: EventEmitter<{
583
+ action: string;
584
+ rows: any[];
585
+ }>;
586
+ /** Emits on row double click according to behavior config */
587
+ rowDoubleClick: EventEmitter<{
588
+ action: string;
589
+ row: any;
590
+ }>;
591
+ /** Emits whenever schema outdated state changes (can be used by host) */
592
+ schemaStatusChange: EventEmitter<{
593
+ outdated: boolean;
594
+ serverHash?: string;
595
+ lastVerifiedAt?: string;
596
+ resourcePath?: string;
597
+ }>;
598
+ beforeDelete: EventEmitter<any>;
599
+ afterDelete: EventEmitter<any>;
600
+ deleteError: EventEmitter<{
601
+ row: any;
602
+ error: unknown;
603
+ }>;
604
+ beforeBulkDelete: EventEmitter<any[]>;
605
+ afterBulkDelete: EventEmitter<any[]>;
606
+ bulkDeleteError: EventEmitter<{
607
+ rows: any[];
608
+ error: unknown;
609
+ }>;
610
+ paginator?: MatPaginator;
611
+ sort?: MatSort;
612
+ actionsHeaderCell?: ElementRef<HTMLElement>;
613
+ projectedFilter?: PraxisFilter;
614
+ dataSource: MatTableDataSource<any, MatPaginator>;
615
+ displayedColumns: string[];
616
+ visibleColumns: ColumnDefinition[];
617
+ private dataSubject;
618
+ selection: SelectionModel<any>;
619
+ private pageIndex;
620
+ private pageSize;
621
+ private sortState;
622
+ private hasInitialized;
623
+ private breakpoints;
624
+ private measuredInline;
625
+ private resizeObserver?;
626
+ readonly getActionId: typeof getActionId;
627
+ getRowMenuIcon(): string;
628
+ getRowMenuButtonColor(): string | undefined;
629
+ getActionsHeaderAlign(): 'start' | 'center' | 'end';
630
+ getActionsHeaderLabel(): string | undefined;
631
+ getActionsHeaderIcon(): string | undefined;
632
+ getActionsHeaderTooltip(): string | undefined;
633
+ private styleSpecCache;
634
+ schemaError: boolean;
635
+ dataError: boolean;
636
+ errorMessage: string | null;
637
+ schemaOutdated: boolean;
638
+ private _resolvedPrefs;
639
+ private resolveSchemaPrefs;
640
+ private getOutdatedIgnoreKey;
641
+ private getOutdatedSnoozeKey;
642
+ private getOutdatedNotifiedKey;
643
+ private isOutdatedIgnored;
644
+ private getOutdatedSnoozeUntil;
645
+ private setOutdatedSnooze;
646
+ private setOutdatedIgnore;
647
+ private setOutdatedNotified;
648
+ private wasOutdatedNotified;
649
+ shouldShowOutdatedInline(): boolean;
650
+ private maybeShowOutdatedSnack;
651
+ onReconcileRequested(): void;
652
+ onIgnoreOutdated(): void;
653
+ onSnoozeOutdated(): void;
654
+ toggleRow(row: any): void;
655
+ masterToggle(): void;
656
+ isAllSelected(): boolean;
657
+ private isOverflowEnabled;
658
+ private getMaxInline;
659
+ private getBreakpointMaxInline;
660
+ private sortByPriority;
661
+ isActionVisible(a: any, row: any): boolean;
662
+ isActionDisabled(a: any, row: any): boolean;
663
+ trackAction: (_: number, a: RowActionConfig) => string;
664
+ getInlineRowActions(row: any): any[];
665
+ getOverflowRowActions(row: any): any[];
666
+ hasOverflowRowActions(row: any): boolean;
667
+ private updateMeasuredInline;
668
+ private setupResizeObserver;
669
+ private subscriptions;
670
+ private getIdField;
671
+ isVirtualized(): boolean;
672
+ getVirtItemHeight(): number;
673
+ getVirtBufferSize(): number;
674
+ getVirtMinHeight(): number | string | undefined;
675
+ getVirtMinHeightStyle(): string | null;
676
+ trackByRow: (index: number, row: any) => string | number;
677
+ private getRowId;
678
+ constructor(crudService: GenericCrudService<any>, cdr: ChangeDetectorRef, settingsPanel: SettingsPanelService, formattingService: DataFormattingService, specBridge: SpecificationBridgeService, configStorage: ConfigStorage, connectionStorage: ConnectionStorage, tableDefaultsProvider: TableDefaultsProvider, snackBar: MatSnackBar, filterConfig: FilterConfigService, pxDialog: PraxisDialog, hostRef: ElementRef<HTMLElement>, global: GlobalConfigService);
679
+ openQuickConnect(): void;
680
+ ngOnInit(): void;
681
+ ngAfterContentInit(): void;
682
+ ngOnChanges(changes: SimpleChanges): void;
683
+ private isDebug;
684
+ private connectionKey;
685
+ private saveConnection;
686
+ disconnect(): void;
687
+ ngAfterViewInit(): void;
688
+ onPageChange(event: PageEvent): void;
689
+ onSortChange(event: Sort): void;
690
+ onRowClicked(row: any, index: number): void;
691
+ onRowDoubleClicked(row: any, index: number): void;
692
+ onRowAction(action: string, row: any, event: Event): void;
693
+ private showConfirmDialog;
694
+ private executeDeleteAction;
695
+ onToolbarAction(event: {
696
+ action: string;
697
+ }): void;
698
+ onAdvancedFilterSubmit(criteria: Record<string, any>): void;
699
+ onAdvancedFilterClear(): void;
700
+ openTableSettings(): void;
701
+ private applyTableConfig;
702
+ onResetPreferences(): void;
703
+ private applyDataSourceSettings;
704
+ private setupColumns;
705
+ private applyDefaultSortIfNone;
706
+ /**
707
+ * Performs a lightweight server schema verification using ETag/If-None-Match without
708
+ * downloading or storing the schema body. Updates config.meta (serverHash/lastVerifiedAt)
709
+ * and toggles schemaOutdated when a new hash is detected.
710
+ */
711
+ private verifyServerSchemaVersion;
712
+ private loadSchema;
713
+ private convertFieldToColumn;
714
+ /**
715
+ * Check if a value is a valid ColumnDataType
716
+ */
717
+ private isValidColumnDataType;
718
+ /**
719
+ * Infer column data type from field name patterns when API type is not available
720
+ * Refined logic to reduce false positives
721
+ */
722
+ private inferFieldTypeFromFieldName;
723
+ private fetchData;
724
+ retryData(): void;
725
+ reloadSchema(): void;
726
+ refetch(): void;
727
+ /**
728
+ * Get the cell value for a given row and column
729
+ * Handles the complete transformation pipeline:
730
+ * 1. _generatedValueGetter (calculated columns) or regular field access
731
+ * 2. valueMapping (convert values to display text)
732
+ * 3. format (data formatting like dates, numbers, currency)
733
+ */
734
+ getCellValue(rowData: any, column: ColumnDefinition): any;
735
+ getCellClasses(rowData: any, column: ColumnDefinition): string[] | undefined;
736
+ getCellNgStyle(rowData: any, column: ColumnDefinition): Record<string, string> | undefined;
737
+ private evaluateStyleRule;
738
+ getRowClasses(rowData: any): string[] | undefined;
739
+ getRowNgStyle(rowData: any): Record<string, string> | undefined;
740
+ /**
741
+ * Apply value mapping to transform raw values into display-friendly text
742
+ */
743
+ private applyValueMapping;
744
+ /**
745
+ * Safely access nested properties using dot notation
746
+ */
747
+ private getNestedPropertyValue;
748
+ /**
749
+ * Verifica se a ordenação está habilitada
750
+ */
751
+ getSortingEnabled(): boolean;
752
+ /**
753
+ * Verifica se a paginação está habilitada
754
+ */
755
+ getPaginationEnabled(): boolean;
756
+ /**
757
+ * Obtém o comprimento total da paginação
758
+ */
759
+ getPaginationLength(): number;
760
+ /**
761
+ * Obtém o tamanho da página
762
+ */
763
+ getPaginationPageSize(): number;
764
+ /**
765
+ * Obtém as opções de tamanho de página
766
+ */
767
+ getPaginationPageSizeOptions(): number[];
768
+ /**
769
+ * Verifica se deve mostrar botões primeira/última
770
+ */
771
+ getPaginationShowFirstLast(): boolean;
772
+ /**
773
+ * Verifica se uma funcionalidade está disponível
774
+ */
775
+ isFeatureAvailable(feature: string): boolean;
776
+ /**
777
+ * Obtém configurações de i18n para o filtro baseado na configuração da tabela
778
+ */
779
+ getFilterI18n(): Partial<I18n> | undefined;
780
+ getIconName(row: any, column: ColumnDefinition): string | null;
781
+ getIconColor(_row: any, column: ColumnDefinition): string | null;
782
+ getIconStyle(_row: any, column: ColumnDefinition): Record<string, string> | null;
783
+ getIconAriaLabel(_row: any, column: ColumnDefinition): string | null;
784
+ /**
785
+ * Lightweight, controlled evaluator for string/number expressions using row context.
786
+ * Accepts values like '= row.status === "OK" ? "primary" : "warn"'.
787
+ * Falls back safely on error.
788
+ */
789
+ private evaluateValueExpr;
790
+ private coerceExpected;
791
+ getImageSrc(row: any, column: ColumnDefinition): string | null;
792
+ getImageAlt(row: any, column: ColumnDefinition): string | null;
793
+ getImageWidth(column: ColumnDefinition): number | null;
794
+ getImageHeight(column: ColumnDefinition): number | null;
795
+ getImageShape(column: ColumnDefinition): 'square' | 'rounded' | 'circle' | undefined;
796
+ getImageFit(column: ColumnDefinition): 'cover' | 'contain' | undefined;
797
+ getImageLazy(_row: any, column: ColumnDefinition): boolean;
798
+ getBadgeText(row: any, column: ColumnDefinition): string | null;
799
+ getBadgeIcon(row: any, column: ColumnDefinition): string | null;
800
+ getBadgeClasses(row: any, column: ColumnDefinition): string[];
801
+ getEffectiveRendererType(row: any, column: ColumnDefinition): 'icon' | 'image' | 'badge' | null;
802
+ private applyAppearanceVariables;
803
+ ngOnDestroy(): void;
804
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable, never>;
805
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarV2": { "alias": "toolbarV2"; "required": false; }; "autoDelete": { "alias": "autoDelete"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "tableId": { "alias": "tableId"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; "crudContext": { "alias": "crudContext"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; }, { "rowClick": "rowClick"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "rowDoubleClick": "rowDoubleClick"; "schemaStatusChange": "schemaStatusChange"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; }, ["projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
806
+ }
807
+
808
+ declare class PraxisTableToolbar {
809
+ config?: TableConfig;
810
+ debugLayout: boolean;
811
+ toolbarAction: EventEmitter<{
812
+ action: string;
813
+ }>;
814
+ reset: EventEmitter<void>;
815
+ readonly getActionId: typeof getActionId;
816
+ emitToolbarAction(event: Event, action: string): void;
817
+ getStartActions(): _praxisui_core.ToolbarAction[];
818
+ getOverflowActions(): (_praxisui_core.ToolbarAction | _praxisui_core.BulkAction)[];
819
+ getExportIcon(format: string): string;
820
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTableToolbar, never>;
821
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTableToolbar, "praxis-table-toolbar", never, { "config": { "alias": "config"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; }, { "toolbarAction": "toolbarAction"; "reset": "reset"; }, never, ["[advancedFilter]", "[toolbar]", "[end-actions]"], true, never>;
822
+ }
823
+
824
+ interface JsonValidationResult {
825
+ isValid: boolean;
826
+ error?: string;
827
+ config?: TableConfig;
828
+ }
829
+ interface JsonEditorEvent {
830
+ type: 'apply' | 'format' | 'validation';
831
+ payload: JsonValidationResult;
832
+ }
833
+ declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
834
+ private cdr;
835
+ config: TableConfig | null;
836
+ configChange: EventEmitter<_praxisui_core.TableConfigModern>;
837
+ validationChange: EventEmitter<JsonValidationResult>;
838
+ editorEvent: EventEmitter<JsonEditorEvent>;
839
+ jsonText: string;
840
+ isValidJson: boolean;
841
+ jsonError: string;
842
+ unknownTopKeys: string[];
843
+ private destroy$;
844
+ private jsonTextChanges$;
845
+ constructor(cdr: ChangeDetectorRef);
846
+ ngOnInit(): void;
847
+ ngOnDestroy(): void;
848
+ onJsonTextChange(text: string): void;
849
+ applyJsonChanges(): void;
850
+ formatJson(): void;
851
+ /**
852
+ * Método público para atualizar o JSON externamente
853
+ */
854
+ updateJsonFromConfig(config: TableConfig): void;
855
+ /**
856
+ * Método público para obter a configuração atual validada
857
+ */
858
+ getCurrentConfig(): TableConfig | null;
859
+ /**
860
+ * Método público para verificar se há alterações
861
+ */
862
+ hasChanges(): boolean;
863
+ private validateJson;
864
+ private updateValidationState;
865
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonConfigEditorComponent, never>;
866
+ static ɵcmp: i0.ɵɵComponentDeclaration<JsonConfigEditorComponent, "json-config-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "validationChange": "validationChange"; "editorEvent": "editorEvent"; }, never, never, true, never>;
867
+ }
868
+
869
+ type FormulaType = 'none' | 'concatenation' | 'arithmetic' | 'nested_property' | 'conditional_mapping' | 'default_value';
870
+ interface FieldSchema {
871
+ name: string;
872
+ label: string;
873
+ type: 'string' | 'number' | 'boolean' | 'date' | 'object' | 'array';
874
+ path?: string;
875
+ }
876
+ interface FormulaDefinition {
877
+ type: FormulaType;
878
+ params: any;
879
+ _generatedExpression?: string;
880
+ }
881
+ interface ConcatenationParams {
882
+ fields: string[];
883
+ separator: string;
884
+ ignoreEmpty: boolean;
885
+ }
886
+ interface ArithmeticParams {
887
+ operator: '+' | '-' | '*' | '/';
888
+ operand1: string | number;
889
+ operand2: string | number;
890
+ }
891
+ interface NestedPropertyParams {
892
+ propertyPath: string;
893
+ fallbackValue?: any;
894
+ }
895
+ interface ConditionalMappingParams {
896
+ conditionField: string;
897
+ comparisonValue: any;
898
+ trueValue: any;
899
+ falseValue: any;
900
+ operator?: '===' | '!=' | '>' | '<' | '>=' | '<=';
901
+ }
902
+ interface DefaultValueParams {
903
+ originalField: string;
904
+ defaultValue: any;
905
+ }
906
+ type FormulaParams = ConcatenationParams | ArithmeticParams | NestedPropertyParams | ConditionalMappingParams | DefaultValueParams;
907
+ interface FormulaTemplate {
908
+ type: FormulaType;
909
+ label: string;
910
+ description: string;
911
+ icon: string;
912
+ parameterSchema: FormulaParameterSchema[];
913
+ }
914
+ interface FormulaParameterSchema {
915
+ key: string;
916
+ label: string;
917
+ type: 'field' | 'text' | 'number' | 'boolean' | 'select' | 'value_input';
918
+ required: boolean;
919
+ options?: {
920
+ value: any;
921
+ label: string;
922
+ }[];
923
+ placeholder?: string;
924
+ hint?: string;
925
+ valueType?: 'string' | 'number' | 'boolean' | 'any';
926
+ }
927
+ declare const FORMULA_TEMPLATES: FormulaTemplate[];
928
+
929
+ interface ColumnChange {
930
+ type: 'add' | 'remove' | 'update' | 'reorder' | 'global';
931
+ columnIndex?: number;
932
+ column?: ColumnDefinition;
933
+ columns?: ColumnDefinition[];
934
+ fullConfig?: TableConfig;
935
+ }
936
+ interface ExtendedColumnDefinition extends ColumnDefinition {
937
+ calculationType?: string;
938
+ calculationParams?: any;
939
+ _generatedValueGetter?: string;
940
+ valueMapping?: {
941
+ [key: string | number]: string;
942
+ };
943
+ format?: string;
944
+ conditionalStyles?: any[];
945
+ cellClassCondition?: any;
946
+ resizable?: boolean;
947
+ filterable?: boolean;
948
+ }
949
+ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
950
+ private cdr;
951
+ config: TableConfig;
952
+ configChange: EventEmitter<_praxisui_core.TableConfigModern>;
953
+ columnChange: EventEmitter<ColumnChange>;
954
+ columns: ExtendedColumnDefinition[];
955
+ selectedColumnIndex: number;
956
+ selectedColumn: ExtendedColumnDefinition | null;
957
+ isV2Config: boolean;
958
+ availableDataSchema: FieldSchema[];
959
+ currentFieldSchemas: FieldSchema[];
960
+ sampleTableData: any[];
961
+ globalSortableEnabled: boolean;
962
+ globalAlignment: 'left' | 'center' | 'right' | null;
963
+ visibilityState: 'all' | 'none' | null;
964
+ globalResizable: boolean;
965
+ globalStickyEnabled: boolean;
966
+ private operationInProgress;
967
+ private columnOperationSubject;
968
+ private readonly destroyRef;
969
+ private destroy$;
970
+ onlyVisibleRendererFields: boolean;
971
+ uiRendererType: 'icon' | 'image' | 'badge' | null;
972
+ private _rendererApplyTimer;
973
+ rendererFieldOptions: Array<{
974
+ name: string;
975
+ label: string;
976
+ type?: string;
977
+ isVisible: boolean;
978
+ }>;
979
+ uiRendererConditional: boolean;
980
+ private refreshRendererFieldOptions;
981
+ getRendererFieldOptions(): Array<{
982
+ name: string;
983
+ label: string;
984
+ type?: string;
985
+ isVisible: boolean;
986
+ }>;
987
+ onRendererFieldToggleChange(): void;
988
+ constructor(cdr: ChangeDetectorRef);
989
+ ngOnInit(): void;
990
+ ngOnDestroy(): void;
991
+ private updateGlobalSettings;
992
+ private updateVisibilityState;
993
+ getVisibleColumnsCount(): number;
994
+ areAllColumnsVisible(): boolean;
995
+ areAllColumnsHidden(): boolean;
996
+ onVisibilityChange(state: 'all' | 'none'): void;
997
+ showAllColumns(): void;
998
+ hideAllColumns(): void;
999
+ applyGlobalSortable(enabled: boolean): void;
1000
+ applyGlobalAlignment(alignment: 'left' | 'center' | 'right'): void;
1001
+ applyGlobalResizable(enabled: boolean): void;
1002
+ applyGlobalSticky(enabled: boolean): void;
1003
+ private isColumnExplicitlySet;
1004
+ selectColumn(index: number): void;
1005
+ addNewColumn(): void;
1006
+ removeColumn(index: number, event: Event): void;
1007
+ onColumnReorder(event: CdkDragDrop<ExtendedColumnDefinition[]>): void;
1008
+ private updateColumnOrders;
1009
+ onColumnPropertyChange(): void;
1010
+ isExistingColumn(column: ColumnDefinition): boolean;
1011
+ isCalculatedColumn(column: ColumnDefinition): boolean;
1012
+ hasValueGetterError(column: ColumnDefinition): boolean;
1013
+ private generateAvailableDataSchema;
1014
+ /**
1015
+ * Map ColumnDataType to FieldSchema type
1016
+ */
1017
+ private mapColumnTypeToFieldType;
1018
+ getColumnFormula(column: ColumnDefinition | null): FormulaDefinition | undefined;
1019
+ onFormulaChange(formula: FormulaDefinition): void;
1020
+ onGeneratedExpressionChange(expression: string): void;
1021
+ getMappingCount(column: ColumnDefinition): number;
1022
+ getMappingTooltip(column: ColumnDefinition): string;
1023
+ getMappingPanelDescription(column: ColumnDefinition | null): string;
1024
+ getColumnMapping(column: ColumnDefinition | null): {
1025
+ [key: string | number]: string;
1026
+ };
1027
+ getRendererType(col: ColumnDefinition | null): 'icon' | 'image' | 'badge' | null;
1028
+ onRendererTypeChange(type: 'icon' | 'image' | 'badge' | null): void;
1029
+ onRendererModeClosed(): void;
1030
+ onToggleRendererConditional(enabled: boolean): void;
1031
+ getRendererTypeExpr(): string;
1032
+ setRendererTypeExpr(val: string): void;
1033
+ getRendererIconName(): string;
1034
+ setRendererIconName(v: string): void;
1035
+ getRendererIconNameField(): string;
1036
+ setRendererIconNameField(v: string): void;
1037
+ getRendererIconColor(): string;
1038
+ setRendererIconColor(v: string): void;
1039
+ getRendererIconSize(): number | null;
1040
+ setRendererIconSize(v: number): void;
1041
+ getRendererImageSrc(): string;
1042
+ setRendererImageSrc(v: string): void;
1043
+ getRendererImageSrcField(): string;
1044
+ setRendererImageSrcField(v: string): void;
1045
+ getRendererImageAlt(): string;
1046
+ setRendererImageAlt(v: string): void;
1047
+ getRendererImageAltField(): string;
1048
+ setRendererImageAltField(v: string): void;
1049
+ getRendererImageWidth(): number | null;
1050
+ setRendererImageWidth(v: number): void;
1051
+ getRendererImageHeight(): number | null;
1052
+ setRendererImageHeight(v: number): void;
1053
+ getRendererImageShape(): 'square' | 'rounded' | 'circle' | '';
1054
+ setRendererImageShape(v: any): void;
1055
+ getRendererImageFit(): 'cover' | 'contain' | '';
1056
+ setRendererImageFit(v: any): void;
1057
+ getRendererImageLazy(): boolean;
1058
+ setRendererImageLazy(v: boolean): void;
1059
+ getRendererBadgeText(): string;
1060
+ setRendererBadgeText(v: string): void;
1061
+ getRendererBadgeTextField(): string;
1062
+ setRendererBadgeTextField(v: string): void;
1063
+ getRendererBadgeColor(): string;
1064
+ setRendererBadgeColor(v: string): void;
1065
+ getRendererBadgeVariant(): string;
1066
+ setRendererBadgeVariant(v: string): void;
1067
+ getRendererBadgeIcon(): string;
1068
+ setRendererBadgeIcon(v: string): void;
1069
+ private ensureRenderer;
1070
+ private readonly _emptyMappingRef;
1071
+ getColumnKeyInputType(column: ColumnDefinition | null): 'text' | 'number' | 'boolean';
1072
+ onMappingChange(mapping: {
1073
+ [key: string | number]: string;
1074
+ }): void;
1075
+ get selectedColumnDataType(): ColumnDataType;
1076
+ set selectedColumnDataType(value: ColumnDataType);
1077
+ getColumnDataType(column: ColumnDefinition | null): ColumnDataType;
1078
+ /**
1079
+ * Infer column data type from field name patterns (shared logic with PraxisTable)
1080
+ */
1081
+ private inferFieldTypeFromFieldName;
1082
+ onDataTypeChange(dataType: ColumnDataType): void;
1083
+ showDataFormatter(column: ColumnDefinition | null): boolean;
1084
+ getFormatterIcon(column: ColumnDefinition | null): string;
1085
+ getFormatterPanelDescription(column: ColumnDefinition | null): string;
1086
+ getColumnFormat(column: ColumnDefinition | null): string;
1087
+ onFormatChange(format: string): void;
1088
+ private emitConfigChange;
1089
+ /**
1090
+ * Public method to update columns from external source
1091
+ */
1092
+ updateColumnsFromConfig(config: TableConfig): void;
1093
+ /**
1094
+ * Public method to get current columns
1095
+ */
1096
+ getCurrentColumns(): ExtendedColumnDefinition[];
1097
+ private initializeStyleRules;
1098
+ private generateSampleData;
1099
+ getStyleRulesPanelDescription(column: ColumnDefinition | null): string;
1100
+ onConditionalStylesChanged(styles: any[]): void;
1101
+ onRuleValidated(event: {
1102
+ ruleId: string;
1103
+ result: any;
1104
+ }): void;
1105
+ private updateFieldSchemasForStyleRules;
1106
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnsConfigEditorComponent, never>;
1107
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnsConfigEditorComponent, "columns-config-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "columnChange": "columnChange"; }, never, never, true, never>;
1108
+ }
1109
+
1110
+ interface BehaviorConfigChange {
1111
+ type: 'pagination' | 'sorting' | 'filtering' | 'selection' | 'interaction' | 'general';
1112
+ property: string;
1113
+ value: any;
1114
+ fullConfig: TableConfig;
1115
+ }
1116
+ declare class BehaviorConfigEditorComponent implements OnInit, OnDestroy {
1117
+ private fb;
1118
+ config: TableConfig;
1119
+ configChange: EventEmitter<_praxisui_core.TableConfigModern>;
1120
+ behaviorChange: EventEmitter<BehaviorConfigChange>;
1121
+ behaviorForm: FormGroup;
1122
+ isV2: boolean;
1123
+ private destroy$;
1124
+ constructor(fb: FormBuilder);
1125
+ ngOnInit(): void;
1126
+ ngOnDestroy(): void;
1127
+ private initializeForm;
1128
+ private setupFormListeners;
1129
+ /**
1130
+ * Applies current form values to the configuration immediately.
1131
+ * Useful to flush pending changes before external save operations.
1132
+ */
1133
+ applyFormChanges(): void;
1134
+ private updateConfig;
1135
+ private arrayToString;
1136
+ private stringToArray;
1137
+ static ɵfac: i0.ɵɵFactoryDeclaration<BehaviorConfigEditorComponent, never>;
1138
+ static ɵcmp: i0.ɵɵComponentDeclaration<BehaviorConfigEditorComponent, "behavior-config-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "behaviorChange": "behaviorChange"; }, never, never, true, never>;
1139
+ }
1140
+
1141
+ interface ToolbarAction {
1142
+ id: string;
1143
+ label: string;
1144
+ icon?: string;
1145
+ type: 'button' | 'icon' | 'fab' | 'menu';
1146
+ color?: 'primary' | 'accent' | 'warn';
1147
+ /** Aparência do botão Material: filled (flat), outlined (stroked), elevated (raised), text, tonal */
1148
+ appearance?: 'filled' | 'outlined' | 'elevated' | 'text' | 'tonal';
1149
+ action: string;
1150
+ position: 'start' | 'end';
1151
+ order?: number;
1152
+ disabled?: boolean;
1153
+ visible?: boolean;
1154
+ shortcut?: string;
1155
+ tooltip?: string;
1156
+ visibleWhen?: string;
1157
+ children?: ToolbarAction[];
1158
+ }
1159
+ interface RowAction {
1160
+ id: string;
1161
+ label: string;
1162
+ icon: string;
1163
+ action: string;
1164
+ color?: 'primary' | 'accent' | 'warn';
1165
+ tooltip?: string;
1166
+ requiresConfirmation?: boolean;
1167
+ autoDelete?: boolean;
1168
+ separator?: boolean;
1169
+ conditional?: string;
1170
+ }
1171
+ interface BulkAction {
1172
+ id: string;
1173
+ label: string;
1174
+ icon: string;
1175
+ action: string;
1176
+ color?: 'primary' | 'accent' | 'warn';
1177
+ tooltip?: string;
1178
+ requiresConfirmation?: boolean;
1179
+ autoDelete?: boolean;
1180
+ minSelections?: number;
1181
+ maxSelections?: number;
1182
+ }
1183
+ interface ToolbarActionsChange {
1184
+ type: 'toolbar' | 'rowActions' | 'bulkActions' | 'export';
1185
+ property: string;
1186
+ value: any;
1187
+ fullConfig: TableConfig;
1188
+ }
1189
+ declare class ToolbarActionsEditorComponent implements OnInit, OnDestroy, OnChanges {
1190
+ private fb;
1191
+ private iconPicker;
1192
+ config: TableConfig;
1193
+ configChange: EventEmitter<_praxisui_core.TableConfigModern>;
1194
+ toolbarActionsChange: EventEmitter<ToolbarActionsChange>;
1195
+ toolbarForm: FormGroup;
1196
+ isV2: boolean;
1197
+ toolbarActions: ToolbarAction[];
1198
+ rowActions: RowAction[];
1199
+ bulkActions: BulkAction[];
1200
+ editingToolbarActionIndex: number | null;
1201
+ editingRowActionIndex: number | null;
1202
+ editingBulkActionIndex: number | null;
1203
+ private destroy$;
1204
+ constructor(fb: FormBuilder, iconPicker: IconPickerService);
1205
+ ngOnInit(): void;
1206
+ ngOnChanges(changes: SimpleChanges): void;
1207
+ ngOnDestroy(): void;
1208
+ private initializeForm;
1209
+ private setupFormListeners;
1210
+ private loadActionsFromConfig;
1211
+ private isAddLike;
1212
+ private findAddToolbarIndex;
1213
+ private ensureAddToolbarAction;
1214
+ private removeAddToolbarAction;
1215
+ private syncAddFormFromActions;
1216
+ private updateConfig;
1217
+ addToolbarAction(): void;
1218
+ editToolbarAction(index: number): void;
1219
+ removeToolbarAction(index: number): void;
1220
+ dropToolbarAction(event: CdkDragDrop<ToolbarAction[]>): void;
1221
+ updateToolbarActions(): void;
1222
+ addRowAction(): void;
1223
+ editRowAction(index: number): void;
1224
+ removeRowAction(index: number): void;
1225
+ dropRowAction(event: CdkDragDrop<RowAction[]>): void;
1226
+ updateRowActions(): void;
1227
+ addBulkAction(): void;
1228
+ editBulkAction(index: number): void;
1229
+ removeBulkAction(index: number): void;
1230
+ dropBulkAction(event: CdkDragDrop<BulkAction[]>): void;
1231
+ updateBulkActions(): void;
1232
+ applyToolbarTemplate(tpl: 'crudAdd', mode: 'replace' | 'merge'): void;
1233
+ applyRowActionsTemplate(tpl: 'crud' | 'editDelete' | 'viewOnly' | 'crudWithBulk', mode: 'replace' | 'merge'): void;
1234
+ private mergeRowActions;
1235
+ private mergeToolbarActions;
1236
+ private mergeBulkActions;
1237
+ pickAddButtonIcon(): Promise<void>;
1238
+ pickActionIcon(index: number): Promise<void>;
1239
+ pickRowActionIcon(index: number): Promise<void>;
1240
+ pickBulkActionIcon(index: number): Promise<void>;
1241
+ pickRowMenuIcon(): Promise<void>;
1242
+ pickRowHeaderIcon(): Promise<void>;
1243
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarActionsEditorComponent, never>;
1244
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarActionsEditorComponent, "toolbar-actions-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "toolbarActionsChange": "toolbarActionsChange"; }, never, never, true, never>;
1245
+ }
1246
+
1247
+ interface MessagesLocalizationChange {
1248
+ type: 'messages' | 'localization' | 'formatting';
1249
+ property: string;
1250
+ value: any;
1251
+ fullConfig: TableConfig;
1252
+ }
1253
+ declare class MessagesLocalizationEditorComponent implements OnInit, OnDestroy {
1254
+ private fb;
1255
+ config: TableConfig;
1256
+ configChange: EventEmitter<_praxisui_core.TableConfigModern>;
1257
+ messagesLocalizationChange: EventEmitter<MessagesLocalizationChange>;
1258
+ messagesForm: FormGroup;
1259
+ isV2: boolean;
1260
+ private destroy$;
1261
+ constructor(fb: FormBuilder);
1262
+ ngOnInit(): void;
1263
+ ngOnDestroy(): void;
1264
+ private initializeForm;
1265
+ private setupFormListeners;
1266
+ private updateConfig;
1267
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessagesLocalizationEditorComponent, never>;
1268
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessagesLocalizationEditorComponent, "messages-localization-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "messagesLocalizationChange": "messagesLocalizationChange"; }, never, never, true, never>;
1269
+ }
1270
+
1271
+ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValueProvider {
1272
+ private cdr;
1273
+ private configService;
1274
+ private panelData;
1275
+ private panelRef?;
1276
+ behaviorEditor?: BehaviorConfigEditorComponent;
1277
+ crudEditor?: any;
1278
+ sections: {
1279
+ id: string;
1280
+ label: string;
1281
+ icon: string;
1282
+ }[];
1283
+ activeSectionIndex: number;
1284
+ private originalConfig;
1285
+ editedConfig: TableConfig;
1286
+ resourcePath: string;
1287
+ private initialResourcePath;
1288
+ idField: string;
1289
+ private initialIdField;
1290
+ crudContext?: {
1291
+ tableId: string;
1292
+ resourcePath?: string;
1293
+ /** Nome do campo identificador do recurso (ex.: 'id', 'codigo'). */
1294
+ idField?: string;
1295
+ defaults?: {
1296
+ openMode?: 'modal' | 'route';
1297
+ modal?: Record<string, any>;
1298
+ back?: Record<string, any>;
1299
+ };
1300
+ actions?: Array<{
1301
+ action: string;
1302
+ label?: string;
1303
+ formId?: string;
1304
+ route?: string;
1305
+ openMode?: 'modal' | 'route';
1306
+ }>;
1307
+ };
1308
+ serverIdField?: string;
1309
+ private serverSchemaHash?;
1310
+ idFieldDiverges: boolean;
1311
+ schemaHashDiverges: boolean;
1312
+ isV2Config: boolean;
1313
+ canSave: boolean;
1314
+ hasErrors: boolean;
1315
+ hasSuccess: boolean;
1316
+ statusMessage: string;
1317
+ private isValidJson;
1318
+ isDirty$: BehaviorSubject<boolean>;
1319
+ isValid$: BehaviorSubject<boolean>;
1320
+ isBusy$: BehaviorSubject<boolean>;
1321
+ columnMetas: FieldMetadata[];
1322
+ constructor(cdr: ChangeDetectorRef, configService: TableConfigService, panelData: any, panelRef?: SettingsPanelRef | undefined);
1323
+ ngOnInit(): void;
1324
+ onJsonConfigChange(newConfig: TableConfig): void;
1325
+ onJsonValidationChange(result: JsonValidationResult): void;
1326
+ onJsonEditorEvent(event: JsonEditorEvent): void;
1327
+ onColumnsConfigChange(newConfig: TableConfig): void;
1328
+ onColumnChange(change: ColumnChange): void;
1329
+ onFilterSettingsChange(cfg: FilterConfig): void;
1330
+ private updateColumnMetas;
1331
+ private updateCanSaveState;
1332
+ private showSuccess;
1333
+ private showError;
1334
+ private clearMessages;
1335
+ /**
1336
+ * Normaliza uma configuração de tabela para comparação consistente
1337
+ * Remove propriedades undefined, ordena arrays e objetos de forma consistente
1338
+ */
1339
+ private normalizeTableConfig;
1340
+ /**
1341
+ * Realiza comparação profunda de objetos, ignorando ordem de propriedades
1342
+ */
1343
+ private deepEqual;
1344
+ getSettingsValue(): TableConfig;
1345
+ onResourcePathChange(val: string): void;
1346
+ onIdFieldChange(val: string): void;
1347
+ onReconcileIdField(): void;
1348
+ onAcceptServerHash(): void;
1349
+ onVisualRulesConfigChange(newConfig: TableConfig): void;
1350
+ reset(): void;
1351
+ onResetToDefaults(): void;
1352
+ /**
1353
+ * Called by the settings panel when the user chooses to persist changes.
1354
+ *
1355
+ * The returned configuration is sent back to the panel via
1356
+ * `panelRef.save(returnedConfig)` and subsequently emitted on `saved$`.
1357
+ * Returning the current `TableConfig` is therefore required for the table to
1358
+ * apply the new settings.
1359
+ */
1360
+ onSave(): TableConfig | undefined;
1361
+ /**
1362
+ * Atualiza as flags de versão baseado na configuração atual
1363
+ * Esta versão pode modificar a configuração, deve ser usada após mudanças
1364
+ */
1365
+ private updateConfigurationVersion;
1366
+ /**
1367
+ * Apenas detecta a versão da configuração sem modificá-la
1368
+ * Usado durante inicialização para evitar marcar como dirty
1369
+ */
1370
+ private updateConfigurationVersionInfo;
1371
+ /**
1372
+ * Retorna a configuração atual (unified architecture)
1373
+ */
1374
+ getV1Config(): TableConfig;
1375
+ /**
1376
+ * Legacy migration handler. In the unified architecture this is a no-op
1377
+ * and simply refreshes the configuration version information.
1378
+ */
1379
+ onMigrateToV2(): void;
1380
+ /**
1381
+ * Verifica se um recurso está disponível na versão atual
1382
+ */
1383
+ isFeatureAvailable(feature: string): boolean;
1384
+ onBehaviorConfigChange(newConfig: TableConfig): void;
1385
+ onBehaviorChange(change: BehaviorConfigChange): void;
1386
+ onToolbarActionsConfigChange(newConfig: TableConfig): void;
1387
+ onToolbarActionsChange(change: ToolbarActionsChange): void;
1388
+ onMessagesLocalizationConfigChange(newConfig: TableConfig): void;
1389
+ onMessagesLocalizationChange(change: MessagesLocalizationChange): void;
1390
+ ngOnDestroy(): void;
1391
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTableConfigEditor, [null, null, null, { optional: true; }]>;
1392
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTableConfigEditor, "praxis-table-config-editor", never, {}, {}, never, never, true, never>;
1393
+ }
1394
+
1395
+ interface FilterDrawerOpenConfig {
1396
+ resourcePath: string;
1397
+ formId: string;
1398
+ config: any;
1399
+ initialDto?: Record<string, any>;
1400
+ title?: string;
1401
+ onSubmit(dto: Record<string, any>): void;
1402
+ onClose?(): void;
1403
+ }
1404
+ interface FilterDrawerAdapter {
1405
+ open(config: FilterDrawerOpenConfig): Promise<void> | void;
1406
+ }
1407
+ declare const FILTER_DRAWER_ADAPTER: InjectionToken<FilterDrawerAdapter>;
1408
+
1409
+ declare class DataFormatterComponent implements OnInit, OnChanges {
1410
+ private cdr;
1411
+ private formattingService;
1412
+ columnType: ColumnDataType;
1413
+ currentFormat: string;
1414
+ formatChange: EventEmitter<string>;
1415
+ datePresets: FormatPreset[];
1416
+ numberPresets: FormatPreset[];
1417
+ currencyPresets: FormatPreset[];
1418
+ percentagePresets: FormatPreset[];
1419
+ stringPresets: FormatPreset[];
1420
+ booleanPresets: FormatPreset[];
1421
+ selectedPreset: string;
1422
+ customFormat: string;
1423
+ decimalMode: string;
1424
+ variableRange: string;
1425
+ thousandsSeparator: boolean;
1426
+ currencyCode: string;
1427
+ currencyDecimals: string;
1428
+ currencySymbol: boolean;
1429
+ currencyThousands: boolean;
1430
+ percentageDecimals: string;
1431
+ percentageMultiplier: boolean;
1432
+ stringTransform: string;
1433
+ enableTruncate: boolean;
1434
+ truncateLength: number;
1435
+ truncateSuffix: string;
1436
+ booleanDisplay: string;
1437
+ customTrueValue: string;
1438
+ customFalseValue: string;
1439
+ previewValue: string;
1440
+ constructor(cdr: ChangeDetectorRef, formattingService: DataFormattingService);
1441
+ ngOnInit(): void;
1442
+ ngOnChanges(changes: SimpleChanges): void;
1443
+ getTypeIcon(): string;
1444
+ getTypeLabel(): string;
1445
+ getTypeDescription(): string;
1446
+ private parseCurrentFormat;
1447
+ private setDefaultValues;
1448
+ private parseDateFormat;
1449
+ private parseNumberFormat;
1450
+ private parseCurrencyFormat;
1451
+ private parsePercentageFormat;
1452
+ private parseStringFormat;
1453
+ private parseBooleanFormat;
1454
+ onPresetChange(): void;
1455
+ onCustomFormatChange(): void;
1456
+ onDecimalModeChange(): void;
1457
+ onFormatOptionChange(): void;
1458
+ onTruncateToggle(): void;
1459
+ onBooleanDisplayChange(): void;
1460
+ private generateFormatString;
1461
+ private generatePreview;
1462
+ /**
1463
+ * Get appropriate sample value for each data type
1464
+ */
1465
+ private getSampleValue;
1466
+ /**
1467
+ * Get the current format string based on component state
1468
+ */
1469
+ private getCurrentFormatString;
1470
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataFormatterComponent, never>;
1471
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataFormatterComponent, "data-formatter", never, { "columnType": { "alias": "columnType"; "required": false; }; "currentFormat": { "alias": "currentFormat"; "required": false; }; }, { "formatChange": "formatChange"; }, never, never, true, never>;
1472
+ }
1473
+
1474
+ interface ValueMappingPair {
1475
+ key: string | number | boolean;
1476
+ value: string;
1477
+ keyInput: string;
1478
+ hasError?: boolean;
1479
+ errorMessage?: string;
1480
+ }
1481
+ declare class ValueMappingEditorComponent implements OnInit, OnChanges {
1482
+ private cdr;
1483
+ private dialog;
1484
+ private snackBar;
1485
+ currentMapping: {
1486
+ [key: string | number]: string;
1487
+ };
1488
+ keyInputType: 'text' | 'number' | 'boolean';
1489
+ labelKey: string;
1490
+ labelValue: string;
1491
+ mappingChange: EventEmitter<{
1492
+ [key: string]: string;
1493
+ [key: number]: string;
1494
+ }>;
1495
+ mappingPairs: ValueMappingPair[];
1496
+ dataSource: MatTableDataSource<ValueMappingPair, _angular_material_paginator_d_Zo1cMMo4.M>;
1497
+ displayedColumns: string[];
1498
+ showImportDialog: boolean;
1499
+ importJsonText: string;
1500
+ importError: string;
1501
+ constructor(cdr: ChangeDetectorRef, dialog: MatDialog, snackBar: MatSnackBar);
1502
+ ngOnInit(): void;
1503
+ ngOnChanges(changes: SimpleChanges): void;
1504
+ private initializeMappingPairs;
1505
+ private updateDataSource;
1506
+ private parseKeyByType;
1507
+ isKeyTruthy(pair: ValueMappingPair): boolean;
1508
+ getKeyPlaceholder(): string;
1509
+ addNewPair(): void;
1510
+ removePair(index: number): void;
1511
+ onKeyChange(index: number, value: string): void;
1512
+ onBooleanKeyChange(index: number, change: MatCheckboxChange): void;
1513
+ onValueChange(index: number, value: string): void;
1514
+ private validateAndEmitMapping;
1515
+ exportToJson(): void;
1516
+ importFromJson(): void;
1517
+ cancelImport(): void;
1518
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValueMappingEditorComponent, never>;
1519
+ static ɵcmp: i0.ɵɵComponentDeclaration<ValueMappingEditorComponent, "value-mapping-editor", never, { "currentMapping": { "alias": "currentMapping"; "required": false; }; "keyInputType": { "alias": "keyInputType"; "required": false; }; "labelKey": { "alias": "labelKey"; "required": false; }; "labelValue": { "alias": "labelValue"; "required": false; }; }, { "mappingChange": "mappingChange"; }, never, never, true, never>;
1520
+ }
1521
+
1522
+ declare class FilterSettingsComponent implements OnChanges {
1523
+ private fb;
1524
+ metadata: FieldMetadata[];
1525
+ settings: FilterConfig | undefined;
1526
+ configKey?: string;
1527
+ settingsChange: EventEmitter<FilterConfig>;
1528
+ form: FormGroup<{
1529
+ quickField: FormControl<string | null>;
1530
+ alwaysVisibleFields: FormControl<string[]>;
1531
+ placeholder: FormControl<string>;
1532
+ showAdvanced: FormControl<boolean>;
1533
+ mode: FormControl<'auto' | 'filter' | 'card'>;
1534
+ changeDebounceMs: FormControl<number>;
1535
+ allowSaveTags: FormControl<boolean>;
1536
+ tagColor: FormControl<'primary' | 'accent' | 'warn' | 'basic'>;
1537
+ tagVariant: FormControl<'filled' | 'outlined'>;
1538
+ tagButtonColor: FormControl<'primary' | 'accent' | 'warn' | 'basic'>;
1539
+ actionsButtonColor: FormControl<'primary' | 'accent' | 'warn' | 'basic'>;
1540
+ actionsVariant: FormControl<'standard' | 'outlined'>;
1541
+ placeBooleansInActions: FormControl<boolean>;
1542
+ showToggleLabels: FormControl<boolean>;
1543
+ alwaysMinWidth: FormControl<number>;
1544
+ alwaysColsMd: FormControl<number>;
1545
+ alwaysColsLg: FormControl<number>;
1546
+ autoSummary: FormControl<boolean>;
1547
+ confirmTagDelete: FormControl<boolean>;
1548
+ debugLayout: FormControl<boolean>;
1549
+ overlayVariant: FormControl<'card' | 'frosted'>;
1550
+ overlayBackdrop: FormControl<boolean>;
1551
+ advancedOpenMode: FormControl<'overlay' | 'modal' | 'drawer'>;
1552
+ }>;
1553
+ /**
1554
+ * Emits true when form has changes and is valid, enabling the save button
1555
+ */
1556
+ canSave$: Observable<boolean>;
1557
+ isDirty$: Observable<boolean>;
1558
+ isValid$: Observable<boolean>;
1559
+ isBusy$: Observable<boolean>;
1560
+ private initialSettings;
1561
+ private readonly storage;
1562
+ private readonly injectedData;
1563
+ /** Clears persisted preferences for this filter, falling back to globals. */
1564
+ resetPreferences(): void;
1565
+ constructor(fb: FormBuilder);
1566
+ tags: FilterTag[];
1567
+ exportJson: string;
1568
+ newTagLabel: string;
1569
+ newTagPatchText: string;
1570
+ private tagsKey;
1571
+ loadTags(): void;
1572
+ saveTags(): void;
1573
+ clearTags(): void;
1574
+ removeTag(index: number): void;
1575
+ renameTag(index: number, value: string): void;
1576
+ importTags(): void;
1577
+ addTag(): void;
1578
+ addTagFromCurrent(): void;
1579
+ dropAlwaysVisible(event: CdkDragDrop<string[]>): void;
1580
+ presets: {
1581
+ key: string;
1582
+ label: string;
1583
+ values: Partial<FilterConfig>;
1584
+ }[];
1585
+ applyPreset(key: string): void;
1586
+ getFieldLabel(name: string): string;
1587
+ hasCurrentDto(): boolean;
1588
+ renameTagPrompt(index: number): void;
1589
+ ngOnChanges(changes: SimpleChanges): void;
1590
+ getSettingsValue(): FilterConfig;
1591
+ reset(): void;
1592
+ private clampDebounce;
1593
+ private clampMinWidth;
1594
+ private clampColsMd;
1595
+ private clampColsLg;
1596
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterSettingsComponent, never>;
1597
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterSettingsComponent, "filter-settings", never, { "metadata": { "alias": "metadata"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "configKey": { "alias": "configKey"; "required": false; }; }, { "settingsChange": "settingsChange"; }, never, never, true, never>;
1598
+ }
1599
+
1600
+ declare class TableVisualRulesEditorComponent {
1601
+ config: TableConfig;
1602
+ configChange: EventEmitter<_praxisui_core.TableConfigModern>;
1603
+ columns: ColumnDefinition[];
1604
+ selectedField?: string;
1605
+ selectedColumn?: ColumnDefinition | null;
1606
+ scope: 'column' | 'row';
1607
+ builderConfig: RuleBuilderConfig | null;
1608
+ currentRulesState?: RuleBuilderState;
1609
+ compiledRules: Array<{
1610
+ condition: string;
1611
+ cssClass?: string;
1612
+ style?: Record<string, string>;
1613
+ _styleText?: string;
1614
+ display?: string;
1615
+ }>;
1616
+ private rulesUpdateTimer;
1617
+ hasPending: boolean;
1618
+ private effectsPaused;
1619
+ private destroyed;
1620
+ private suppressRulesUntil;
1621
+ private lastCompiledJson;
1622
+ private lastStateJson;
1623
+ private lastColumnsSignature;
1624
+ classPresets: {
1625
+ label: string;
1626
+ value: string;
1627
+ }[];
1628
+ ngOnInit(): void;
1629
+ ngOnChanges(): void;
1630
+ ngOnDestroy(): void;
1631
+ onScopeChange(scope: 'column' | 'row'): void;
1632
+ onSelectColumn(field: string): void;
1633
+ private resolveSelectedTarget;
1634
+ onRulesChanged(state: RuleBuilderState): void;
1635
+ private applyRulesState;
1636
+ onEffectChanged(): void;
1637
+ onStyleTextChanged(r: any): void;
1638
+ private mergeEffects;
1639
+ private materializeCompiledRules;
1640
+ private stringifyStyle;
1641
+ private parseStyleText;
1642
+ onPresetSelected(r: any, value: string): void;
1643
+ private mergePendingIntoCompiled;
1644
+ private prettifyCondition;
1645
+ private createBuilderConfig;
1646
+ private mapType;
1647
+ private maybeRebuildBuilderConfig;
1648
+ applyEffects(): void;
1649
+ discardEffects(): void;
1650
+ pauseEffects(on: boolean): void;
1651
+ trackRule(index: number, r: any): any;
1652
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableVisualRulesEditorComponent, never>;
1653
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableVisualRulesEditorComponent, "table-visual-rules-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
1654
+ }
1655
+
1656
+ interface ConditionalStyleRule {
1657
+ condition: string;
1658
+ cssClass?: string;
1659
+ style?: {
1660
+ [key: string]: string;
1661
+ };
1662
+ description?: string;
1663
+ }
1664
+ declare function ruleBuilderStateToConditionalStyles(state: RuleBuilderState | null | undefined): ConditionalStyleRule[];
1665
+ declare function conditionalStylesToBuilderState(styles: ConditionalStyleRule[] | null | undefined): RuleBuilderState;
1666
+
1667
+ declare class FormulaGeneratorService {
1668
+ /**
1669
+ * Generates a safe JavaScript expression from a formula definition
1670
+ */
1671
+ generateExpression(formula: FormulaDefinition): string;
1672
+ /**
1673
+ * Validates a formula definition
1674
+ */
1675
+ validateFormula(formula: FormulaDefinition): {
1676
+ valid: boolean;
1677
+ errors: string[];
1678
+ };
1679
+ private generateConcatenationExpression;
1680
+ private generateArithmeticExpression;
1681
+ private generateNestedPropertyExpression;
1682
+ private generateConditionalMappingExpression;
1683
+ private generateDefaultValueExpression;
1684
+ private validateConcatenationParams;
1685
+ private validateArithmeticParams;
1686
+ private validateNestedPropertyParams;
1687
+ private validateConditionalMappingParams;
1688
+ private validateDefaultValueParams;
1689
+ private sanitizeFieldName;
1690
+ private sanitizeStringValue;
1691
+ private sanitizeValue;
1692
+ private sanitizeOperator;
1693
+ private parseOperand;
1694
+ private generateSafePropertyPath;
1695
+ private isValidPropertyPath;
1696
+ /**
1697
+ * Get a sample data object for testing formulas
1698
+ */
1699
+ getSampleData(): any;
1700
+ /**
1701
+ * Test a formula with sample data
1702
+ */
1703
+ testFormula(formula: FormulaDefinition, sampleData?: any): {
1704
+ success: boolean;
1705
+ result?: any;
1706
+ error?: string;
1707
+ };
1708
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormulaGeneratorService, never>;
1709
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormulaGeneratorService>;
1710
+ }
1711
+
1712
+ declare class VisualFormulaBuilderComponent implements OnInit, OnChanges {
1713
+ private formulaGenerator;
1714
+ private cdr;
1715
+ availableDataSchema: FieldSchema[];
1716
+ currentFormula?: FormulaDefinition;
1717
+ formulaChange: EventEmitter<FormulaDefinition>;
1718
+ generatedExpressionChange: EventEmitter<string>;
1719
+ formulaTemplates: FormulaTemplate[];
1720
+ selectedFormulaType: FormulaType;
1721
+ selectedTemplate?: FormulaTemplate;
1722
+ currentParams: any;
1723
+ generatedExpressionValue: string;
1724
+ validationErrors: string[];
1725
+ valueInputStates: {
1726
+ [key: string]: {
1727
+ mode: 'field' | 'literal';
1728
+ value: any;
1729
+ };
1730
+ };
1731
+ showSampleData: boolean;
1732
+ testResult?: {
1733
+ success: boolean;
1734
+ result?: any;
1735
+ error?: string;
1736
+ };
1737
+ sampleDataJson: string;
1738
+ constructor(formulaGenerator: FormulaGeneratorService, cdr: ChangeDetectorRef);
1739
+ ngOnInit(): void;
1740
+ ngOnChanges(changes: SimpleChanges): void;
1741
+ private initializeFromCurrentFormula;
1742
+ onFormulaTypeChange(formulaType: FormulaType): void;
1743
+ private updateSelectedTemplate;
1744
+ onParameterChange(): void;
1745
+ private generateAndEmitExpression;
1746
+ get generatedExpression(): string;
1747
+ isMultiSelectField(paramKey: string): boolean;
1748
+ getFieldTypeIcon(fieldType: string): string;
1749
+ testFormula(): void;
1750
+ formatTestResult(result: any): string;
1751
+ getValueInputMode(paramKey: string): 'field' | 'literal';
1752
+ getValueInputValue(paramKey: string): any;
1753
+ onValueInputModeChange(paramKey: string, mode: 'field' | 'literal'): void;
1754
+ onValueInputFieldChange(paramKey: string, fieldName: string): void;
1755
+ onValueInputLiteralChange(paramKey: string, value: string): void;
1756
+ onValueInputBooleanChange(paramKey: string, change: MatCheckboxChange): void;
1757
+ private updateParameterFromValueInput;
1758
+ private initializeValueInputStates;
1759
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisualFormulaBuilderComponent, never>;
1760
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisualFormulaBuilderComponent, "visual-formula-builder", never, { "availableDataSchema": { "alias": "availableDataSchema"; "required": false; }; "currentFormula": { "alias": "currentFormula"; "required": false; }; }, { "formulaChange": "formulaChange"; "generatedExpressionChange": "generatedExpressionChange"; }, never, never, true, never>;
1761
+ }
1762
+
1763
+ /** Metadata for PraxisTable component */
1764
+ declare const PRAXIS_TABLE_COMPONENT_METADATA: ComponentDocMeta;
1765
+ /**
1766
+ * Provider que registra o metadata no ComponentMetadataRegistry durante o bootstrap.
1767
+ */
1768
+ declare function providePraxisTableMetadata(): Provider;
1769
+
1770
+ export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FILTER_DRAWER_ADAPTER, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TableDefaultsProvider, TableVisualRulesEditorComponent, ToolbarActionsEditorComponent, ValueMappingEditorComponent, VisualFormulaBuilderComponent, conditionalStylesToBuilderState, getActionId, providePraxisTableMetadata, ruleBuilderStateToConditionalStyles };
1771
+ export type { ActionLike, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, ColumnChange, ColumnDataType, ConcatenationParams, ConditionalMappingParams, ConditionalStyleRule, CurrencyFormatterOptions, DateFormatterOptions, DefaultValueParams, FieldSchema, FilterConfig, FilterDrawerAdapter, FilterDrawerOpenConfig, FilterTag, FormatPreset, FormatterConfig, FormulaDefinition, FormulaParameterSchema, FormulaParams, FormulaTemplate, FormulaType, I18n, JsonEditorEvent, JsonValidationResult, MessagesLocalizationChange, NestedPropertyParams, NumberFormatterOptions, PercentageFormatterOptions, RowAction, RowActionConfig, RowActionsBehavior, StringFormatterOptions, ToolbarAction, ToolbarActionsChange, ValueMappingPair };