@praxisui/table 1.0.0-beta.5 → 1.0.0-beta.52
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 +467 -26
- 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-DAmsfime.mjs +816 -0
- package/fesm2022/praxisui-table-table-ai.adapter-DAmsfime.mjs.map +1 -0
- package/fesm2022/praxisui-table.mjs +31949 -9027
- 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 +1786 -474
- package/package.json +14 -8
- 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
package/index.d.ts
CHANGED
|
@@ -1,27 +1,128 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChanges, OnInit, AfterViewInit, DoCheck, DestroyRef, ChangeDetectorRef, NgZone, AfterContentInit, Provider } from '@angular/core';
|
|
3
|
+
import { ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { MatTable, MatTableDataSource } from '@angular/material/table';
|
|
4
5
|
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
|
5
6
|
import { MatSort, Sort } from '@angular/material/sort';
|
|
6
7
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
7
8
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
8
|
-
import {
|
|
9
|
+
import { CdkDragDrop, CdkDragEnd, CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
|
|
10
|
+
import { BehaviorSubject, Subscription, Observable } from 'rxjs';
|
|
11
|
+
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
9
12
|
import * as _praxisui_core from '@praxisui/core';
|
|
10
|
-
import {
|
|
13
|
+
import { TableConfig, LoggerService, GlobalConfigService, AsyncConfigStorage, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, LoadingState, ColumnDefinition, ConnectionStorage, LoadingOrchestrator, PraxisLoadingRenderer, GlobalActionSpec, IconPickerService, GlobalActionField, TableConfigService, FieldDefinition, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
|
|
14
|
+
import { FunctionRegistry, DslParser } from '@praxisui/specification';
|
|
11
15
|
import { DatePipe, DecimalPipe, CurrencyPipe, PercentPipe, UpperCasePipe, LowerCasePipe, TitleCasePipe } from '@angular/common';
|
|
12
|
-
import {
|
|
16
|
+
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
|
|
13
17
|
import { MatDialog } from '@angular/material/dialog';
|
|
14
18
|
import { CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';
|
|
15
|
-
import { SpecificationBridgeService, RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
|
|
16
19
|
import { PraxisDialog } from '@praxisui/dialog';
|
|
17
|
-
import {
|
|
18
|
-
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
20
|
+
import { MatTabChangeEvent } from '@angular/material/tabs';
|
|
19
21
|
import * as _angular_material_paginator_d_Zo1cMMo4 from '@angular/material/paginator.d-Zo1cMMo4';
|
|
20
22
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
23
|
+
import * as _praxisui_table_rule_builder from '@praxisui/table-rule-builder';
|
|
24
|
+
import { RuleEffectDefinition } from '@praxisui/table-rule-builder';
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
interface ActionLike {
|
|
27
|
+
action?: string;
|
|
28
|
+
id?: string;
|
|
29
|
+
code?: string;
|
|
30
|
+
key?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
type?: string;
|
|
33
|
+
icon?: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
}
|
|
36
|
+
declare function getActionId(action: ActionLike): string;
|
|
37
|
+
|
|
38
|
+
declare class PraxisTableToolbar implements OnChanges, OnDestroy {
|
|
39
|
+
private hostRef;
|
|
40
|
+
private logger?;
|
|
41
|
+
private static dslRuntimeInstanceCounter;
|
|
42
|
+
config?: TableConfig;
|
|
43
|
+
backgroundColor: string | null;
|
|
44
|
+
placement: 'header' | 'footer';
|
|
45
|
+
showMain: boolean;
|
|
46
|
+
showActionsGroup: boolean;
|
|
47
|
+
showEndActions: boolean;
|
|
48
|
+
showMobileActions: boolean;
|
|
49
|
+
showReset: boolean;
|
|
50
|
+
dslContext: Record<string, any> | null;
|
|
51
|
+
dslFunctionRegistry: FunctionRegistry<any> | null;
|
|
52
|
+
toolbarAction: EventEmitter<{
|
|
53
|
+
action: string;
|
|
54
|
+
actionConfig?: any;
|
|
55
|
+
}>;
|
|
56
|
+
reset: EventEmitter<void>;
|
|
57
|
+
readonly getActionId: typeof getActionId;
|
|
58
|
+
private dslParser;
|
|
59
|
+
private dslRuntimeRegistry;
|
|
60
|
+
private readonly dslRuntimeContextKey;
|
|
61
|
+
private readonly visibleWhenSpecCache;
|
|
62
|
+
private readonly validToolbarActionTypes;
|
|
63
|
+
private readonly warnedInvalidToolbarActionTypes;
|
|
64
|
+
private readonly warnedMenuWithoutChildren;
|
|
65
|
+
private readonly warnedVisibleWhenFallback;
|
|
66
|
+
private readonly warnedInvalidShortcuts;
|
|
67
|
+
private readonly warnedInvalidShortcutScopes;
|
|
68
|
+
private readonly warnedShortcutConflicts;
|
|
69
|
+
private fallbackLogger?;
|
|
70
|
+
private fallbackLoggerEnvironment;
|
|
71
|
+
constructor(hostRef?: ElementRef<HTMLElement> | null, logger?: LoggerService | undefined);
|
|
72
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
73
|
+
ngOnDestroy(): void;
|
|
74
|
+
private configureDslRuntime;
|
|
75
|
+
private getNestedPropertyValue;
|
|
76
|
+
private cloneForEmit;
|
|
77
|
+
private getLogger;
|
|
78
|
+
private warnLog;
|
|
79
|
+
emitToolbarAction(event: Event, action: string, actionConfig?: any): void;
|
|
80
|
+
getStartActions(): any[];
|
|
81
|
+
getNonStartActions(): any[];
|
|
82
|
+
getOverflowActions(): any[];
|
|
83
|
+
getActionType(action: any): 'button' | 'icon' | 'fab' | 'menu';
|
|
84
|
+
getActionChildren(action: any): any[];
|
|
85
|
+
getVisibleActionChildren(action: any): any[];
|
|
86
|
+
isMenuWithoutChildren(action: any): boolean;
|
|
87
|
+
getActionColor(action: any): any;
|
|
88
|
+
getActionAriaLabel(action: any): string;
|
|
89
|
+
isActionDisabled(action: any): boolean;
|
|
90
|
+
onDocumentKeydown(event: KeyboardEvent): void;
|
|
91
|
+
getBulkActionsPosition(): 'toolbar' | 'floating' | 'both';
|
|
92
|
+
shouldRenderToolbarBulkActions(): boolean;
|
|
93
|
+
getBulkToolbarActions(): any[];
|
|
94
|
+
private getVisibleToolbarActions;
|
|
95
|
+
private resolveVisibleToolbarAction;
|
|
96
|
+
private isActionVisible;
|
|
97
|
+
private evaluateVisibleWhen;
|
|
98
|
+
private resolveVisibleWhenFallback;
|
|
99
|
+
private resolveVisibleWhenFallbackPolicy;
|
|
100
|
+
private resolveRuntimeEnvironment;
|
|
101
|
+
private isDiagnosticsEnvironment;
|
|
102
|
+
private buildDslContext;
|
|
103
|
+
private getKnownDslFields;
|
|
104
|
+
private warnVisibleWhenFallback;
|
|
105
|
+
private collectShortcutBindings;
|
|
106
|
+
private resolveShortcutScope;
|
|
107
|
+
private normalizeShortcutCombo;
|
|
108
|
+
private getShortcutComboFromEvent;
|
|
109
|
+
private normalizeShortcutKey;
|
|
110
|
+
private isEditableElement;
|
|
111
|
+
private isEventInsideToolbar;
|
|
112
|
+
private wasShortcutAlreadyHandled;
|
|
113
|
+
private markShortcutHandled;
|
|
114
|
+
private warnInvalidShortcut;
|
|
115
|
+
private warnInvalidShortcutScope;
|
|
116
|
+
private warnShortcutConflict;
|
|
117
|
+
private sortActions;
|
|
118
|
+
getExportIcon(format: string): string;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTableToolbar, [null, { optional: true; }]>;
|
|
120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTableToolbar, "praxis-table-toolbar", never, { "config": { "alias": "config"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "showMain": { "alias": "showMain"; "required": false; }; "showActionsGroup": { "alias": "showActionsGroup"; "required": false; }; "showEndActions": { "alias": "showEndActions"; "required": false; }; "showMobileActions": { "alias": "showMobileActions"; "required": false; }; "showReset": { "alias": "showReset"; "required": false; }; "dslContext": { "alias": "dslContext"; "required": false; }; "dslFunctionRegistry": { "alias": "dslFunctionRegistry"; "required": false; }; }, { "toolbarAction": "toolbarAction"; "reset": "reset"; }, never, ["[advancedFilter]", "[toolbar]", "[end-actions]"], true, never>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type ColumnDataType$1 = 'date' | 'number' | 'currency' | 'percentage' | 'string' | 'boolean' | 'custom';
|
|
23
124
|
interface FormatterConfig {
|
|
24
|
-
type: ColumnDataType;
|
|
125
|
+
type: ColumnDataType$1;
|
|
25
126
|
options: any;
|
|
26
127
|
}
|
|
27
128
|
interface DateFormatterOptions {
|
|
@@ -88,7 +189,7 @@ declare class DataFormattingService {
|
|
|
88
189
|
/**
|
|
89
190
|
* Apply formatting to a value based on column type and format string
|
|
90
191
|
*/
|
|
91
|
-
formatValue(value: any, columnType: ColumnDataType, formatString: string): any;
|
|
192
|
+
formatValue(value: any, columnType: ColumnDataType$1, formatString: string): any;
|
|
92
193
|
/**
|
|
93
194
|
* Coerce value to the expected type for formatting
|
|
94
195
|
*/
|
|
@@ -118,6 +219,8 @@ declare class DataFormattingService {
|
|
|
118
219
|
* Apply string transformations
|
|
119
220
|
*/
|
|
120
221
|
private applyStringTransform;
|
|
222
|
+
private isMaskFormat;
|
|
223
|
+
private applyMask;
|
|
121
224
|
/**
|
|
122
225
|
* Format boolean values
|
|
123
226
|
*/
|
|
@@ -125,7 +228,7 @@ declare class DataFormattingService {
|
|
|
125
228
|
/**
|
|
126
229
|
* Check if formatting is needed for a column
|
|
127
230
|
*/
|
|
128
|
-
needsFormatting(columnType: ColumnDataType, formatString: string): boolean;
|
|
231
|
+
needsFormatting(columnType: ColumnDataType$1, formatString: string | null | undefined): boolean;
|
|
129
232
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataFormattingService, never>;
|
|
130
233
|
static ɵprov: i0.ɵɵInjectableDeclaration<DataFormattingService>;
|
|
131
234
|
}
|
|
@@ -141,17 +244,23 @@ declare class TableDefaultsProvider {
|
|
|
141
244
|
* Returns default configuration for a given table identifier.
|
|
142
245
|
* @param tableId Table identifier
|
|
143
246
|
*/
|
|
144
|
-
getDefaults(
|
|
247
|
+
getDefaults(_tableId: string): TableConfig;
|
|
145
248
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableDefaultsProvider, never>;
|
|
146
249
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableDefaultsProvider>;
|
|
147
250
|
}
|
|
148
251
|
|
|
149
252
|
type FilterConfig = {
|
|
150
|
-
quickField?: string;
|
|
151
253
|
alwaysVisibleFields?: string[];
|
|
152
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Deep metadata overrides for always-visible fields.
|
|
256
|
+
* Source of truth remains the filter DTO; this map applies controlled
|
|
257
|
+
* overrides per field after DTO normalization.
|
|
258
|
+
*/
|
|
259
|
+
alwaysVisibleFieldMetadataOverrides?: Record<string, Record<string, any>>;
|
|
260
|
+
/** User-selected extra field ids to show before pinned always-visible */
|
|
261
|
+
selectedFieldIds?: string[];
|
|
153
262
|
showAdvanced?: boolean;
|
|
154
|
-
mode?: '
|
|
263
|
+
mode?: 'filter';
|
|
155
264
|
changeDebounceMs?: number;
|
|
156
265
|
allowSaveTags?: boolean;
|
|
157
266
|
placeBooleansInActions?: boolean;
|
|
@@ -159,26 +268,45 @@ type FilterConfig = {
|
|
|
159
268
|
alwaysMinWidth?: number;
|
|
160
269
|
alwaysColsMd?: number;
|
|
161
270
|
alwaysColsLg?: number;
|
|
162
|
-
autoSummary?: boolean;
|
|
163
271
|
confirmTagDelete?: boolean;
|
|
164
|
-
debugLayout?: boolean;
|
|
165
272
|
tagColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
166
273
|
tagVariant?: 'filled' | 'outlined';
|
|
167
274
|
tagButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
168
275
|
actionsButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
169
276
|
actionsVariant?: 'standard' | 'outlined';
|
|
277
|
+
/**
|
|
278
|
+
* Opt-in para mapear searchable-select na variante compacta inline.
|
|
279
|
+
* Padrão recomendado: false em cenários corporativos com catálogos grandes/remotos.
|
|
280
|
+
*/
|
|
281
|
+
useInlineSearchableSelectVariant?: boolean;
|
|
282
|
+
/** Opt-in para mapear rangeSlider na variante compacta inline (single/range). */
|
|
283
|
+
useInlineRangeVariant?: boolean;
|
|
284
|
+
/** Opt-in para mapear date/dateInput/datepicker na variante compacta inline. */
|
|
285
|
+
useInlineDateVariant?: boolean;
|
|
286
|
+
/** Opt-in para mapear dateRange/daterange na variante compacta inline. */
|
|
287
|
+
useInlineDateRangeVariant?: boolean;
|
|
288
|
+
/** Opt-in para mapear time/timePicker na variante compacta inline. */
|
|
289
|
+
useInlineTimeVariant?: boolean;
|
|
290
|
+
/** Opt-in para mapear timeRange/timerange na variante compacta inline. */
|
|
291
|
+
useInlineTimeRangeVariant?: boolean;
|
|
292
|
+
/** Opt-in para mapear treeSelect/multiSelectTree na variante compacta inline. */
|
|
293
|
+
useInlineTreeSelectVariant?: boolean;
|
|
170
294
|
overlayVariant?: 'card' | 'frosted';
|
|
171
295
|
overlayBackdrop?: boolean;
|
|
172
296
|
advancedOpenMode?: 'overlay' | 'modal' | 'drawer';
|
|
297
|
+
/** Habilita botão de limpar nos campos do formulário avançado. */
|
|
298
|
+
advancedClearButtonsEnabled?: boolean;
|
|
299
|
+
logLevel?: 'none' | 'error' | 'warn' | 'info' | 'debug';
|
|
300
|
+
enablePerformanceMetrics?: boolean;
|
|
173
301
|
};
|
|
174
302
|
declare class FilterConfigService {
|
|
175
303
|
private storage;
|
|
176
304
|
private readonly PREFIX;
|
|
177
|
-
constructor(storage:
|
|
305
|
+
constructor(storage: AsyncConfigStorage);
|
|
178
306
|
/**
|
|
179
307
|
* Load a persisted filter configuration for the given key.
|
|
180
308
|
*/
|
|
181
|
-
load(key: string): FilterConfig | undefined
|
|
309
|
+
load(key: string): Promise<FilterConfig | undefined>;
|
|
182
310
|
/**
|
|
183
311
|
* Persist a filter configuration for the given key.
|
|
184
312
|
*/
|
|
@@ -195,8 +323,17 @@ type FilterTag = {
|
|
|
195
323
|
type I18n = {
|
|
196
324
|
searchPlaceholder: string;
|
|
197
325
|
advanced: string;
|
|
326
|
+
advancedTitle?: string;
|
|
198
327
|
clear: string;
|
|
199
328
|
apply: string;
|
|
329
|
+
add?: string;
|
|
330
|
+
filtersAdd?: string;
|
|
331
|
+
filtersSearch?: string;
|
|
332
|
+
addCount?: string;
|
|
333
|
+
pendingCount?: string;
|
|
334
|
+
activeFiltersCount?: string;
|
|
335
|
+
selectAll?: string;
|
|
336
|
+
selectAllPartial?: string;
|
|
200
337
|
edit: string;
|
|
201
338
|
noData: string;
|
|
202
339
|
quickFieldNotFound: string;
|
|
@@ -207,8 +344,15 @@ type I18n = {
|
|
|
207
344
|
retry: string;
|
|
208
345
|
errorLoadingFilters: string;
|
|
209
346
|
settings: string;
|
|
347
|
+
settingsAriaLabel?: string;
|
|
348
|
+
tagActionsAriaLabel?: string;
|
|
210
349
|
save: string;
|
|
211
350
|
cancel: string;
|
|
351
|
+
shortcutsLabel?: string;
|
|
352
|
+
shortcutSaved: string;
|
|
353
|
+
readonlyShortcut: string;
|
|
354
|
+
shortcutRemoved: string;
|
|
355
|
+
undo: string;
|
|
212
356
|
};
|
|
213
357
|
declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestroy, DoCheck {
|
|
214
358
|
private crud;
|
|
@@ -219,11 +363,22 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
219
363
|
private snackBar;
|
|
220
364
|
private dialog;
|
|
221
365
|
private cdr;
|
|
366
|
+
private ngZone;
|
|
222
367
|
private dynamicForm;
|
|
223
368
|
private schemaNormalizer;
|
|
369
|
+
private componentKeys;
|
|
370
|
+
private route?;
|
|
371
|
+
private logger?;
|
|
224
372
|
resourcePath: string;
|
|
225
|
-
|
|
226
|
-
|
|
373
|
+
/**
|
|
374
|
+
* Optional static metadata for offline/showcase usage.
|
|
375
|
+
* When this input is provided (including an empty array), server schema loading is bypassed.
|
|
376
|
+
*/
|
|
377
|
+
fieldMetadata?: FieldMetadata[] | null;
|
|
378
|
+
filterId?: string;
|
|
379
|
+
formId?: string;
|
|
380
|
+
componentInstanceId?: string;
|
|
381
|
+
mode: 'filter';
|
|
227
382
|
/** Controls outdated schema notifications visibility and channel (only effective in edit mode) */
|
|
228
383
|
notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
|
|
229
384
|
/** Snooze duration for schema outdated notifications (ms), only in edit mode */
|
|
@@ -233,36 +388,49 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
233
388
|
/** Enable edit mode (gates notifications) */
|
|
234
389
|
editModeEnabled: boolean;
|
|
235
390
|
value?: Record<string, any>;
|
|
236
|
-
quickField?: string;
|
|
237
391
|
alwaysVisibleFields?: string[];
|
|
392
|
+
/**
|
|
393
|
+
* Optional metadata overrides for always-visible fields.
|
|
394
|
+
* Keys are field names from the filter DTO schema.
|
|
395
|
+
*/
|
|
396
|
+
alwaysVisibleFieldMetadataOverrides: Record<string, Record<string, any>> | undefined;
|
|
397
|
+
/** Additional selected field ids to render before pinned always-visible */
|
|
398
|
+
selectedFieldIds: string[];
|
|
238
399
|
tags?: FilterTag[];
|
|
239
400
|
allowSaveTags?: boolean;
|
|
240
401
|
persistenceKey?: string;
|
|
241
402
|
i18n?: Partial<I18n>;
|
|
242
403
|
changeDebounceMs: number;
|
|
243
|
-
/** Controla a exibição do botão de
|
|
404
|
+
/** Controla a exibição do botão de preferências dentro do filtro */
|
|
244
405
|
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
406
|
/** Exibir confirmação ao excluir atalho (tag) */
|
|
259
407
|
confirmTagDelete: boolean;
|
|
260
|
-
/** Debug visual de layout/alinhamento */
|
|
261
|
-
debugLayout: boolean;
|
|
262
408
|
/** Move toggles/booleans simples para a área de ações */
|
|
263
409
|
placeBooleansInActions: boolean;
|
|
264
410
|
/** Mostrar rótulos dos toggles na área de ações */
|
|
265
411
|
showToggleLabels: boolean;
|
|
412
|
+
/** Usa variante compacta de select no modo inline para ganhar espaço */
|
|
413
|
+
useInlineSelectVariant: boolean;
|
|
414
|
+
/** Habilita variante inline para searchable-select, async-select e autocomplete. */
|
|
415
|
+
useInlineSearchableSelectVariant: boolean;
|
|
416
|
+
/** Usa variante compacta de multi-select no modo inline para ganhar espaço */
|
|
417
|
+
useInlineMultiSelectVariant: boolean;
|
|
418
|
+
/** Usa variante compacta de input/search no modo inline para ganhar espaço */
|
|
419
|
+
useInlineInputVariant: boolean;
|
|
420
|
+
/** Usa variante compacta de toggle no modo inline para ganhar espaço */
|
|
421
|
+
useInlineToggleVariant: boolean;
|
|
422
|
+
/** Usa variante compacta de range slider (modo simples) para ganhar espaço */
|
|
423
|
+
useInlineRangeVariant: boolean;
|
|
424
|
+
/** Usa variante compacta de date/dateInput/datepicker no modo inline para ganhar espaço */
|
|
425
|
+
useInlineDateVariant: boolean;
|
|
426
|
+
/** Usa variante compacta de dateRange/daterange no modo inline para ganhar espaço */
|
|
427
|
+
useInlineDateRangeVariant: boolean;
|
|
428
|
+
/** Usa variante compacta de time/timePicker no modo inline para ganhar espaço */
|
|
429
|
+
useInlineTimeVariant: boolean;
|
|
430
|
+
/** Usa variante compacta de timeRange/timerange no modo inline para ganhar espaço */
|
|
431
|
+
useInlineTimeRangeVariant: boolean;
|
|
432
|
+
/** Usa variante compacta de treeSelect no modo inline para ganhar espaço */
|
|
433
|
+
useInlineTreeSelectVariant: boolean;
|
|
266
434
|
/** Config da grade dos alwaysVisible */
|
|
267
435
|
alwaysMinWidth: number;
|
|
268
436
|
alwaysColsMd: number;
|
|
@@ -278,13 +446,17 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
278
446
|
overlayVariant: 'card' | 'frosted';
|
|
279
447
|
overlayBackdrop: boolean;
|
|
280
448
|
/** Advanced panel open mode */
|
|
281
|
-
advancedOpenMode: '
|
|
449
|
+
advancedOpenMode: 'modal' | 'drawer';
|
|
450
|
+
/** Habilita botão de limpar nos campos do formulário avançado */
|
|
451
|
+
advancedClearButtonsEnabled?: boolean;
|
|
282
452
|
submit: EventEmitter<Record<string, any>>;
|
|
283
453
|
change: EventEmitter<Record<string, any>>;
|
|
284
454
|
clear: EventEmitter<void>;
|
|
285
|
-
modeChange: EventEmitter<"filter"
|
|
455
|
+
modeChange: EventEmitter<"filter">;
|
|
286
456
|
requestSearch: EventEmitter<Record<string, any>>;
|
|
287
457
|
tagsChange: EventEmitter<FilterTag[]>;
|
|
458
|
+
/** Emits when user-selected field ids change */
|
|
459
|
+
selectedFieldIdsChange: EventEmitter<string[]>;
|
|
288
460
|
metaChanged: EventEmitter<{
|
|
289
461
|
schemaId: string;
|
|
290
462
|
serverHash?: string;
|
|
@@ -297,12 +469,14 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
297
469
|
lastVerifiedAt?: string;
|
|
298
470
|
formId?: string;
|
|
299
471
|
}>;
|
|
300
|
-
quickControl: FormControl<any>;
|
|
301
|
-
quickForm: FormGroup<Record<string, AbstractControl<any, any, any>>>;
|
|
302
472
|
alwaysForm: FormGroup<Record<string, FormControl<unknown>>>;
|
|
303
|
-
quickFieldMeta?: FieldMetadata;
|
|
304
|
-
quickFieldMetaArray: FieldMetadata[];
|
|
305
473
|
alwaysVisibleMetas: FieldMetadata[];
|
|
474
|
+
/** User-selected field metadata rendered before pinned (always) */
|
|
475
|
+
selectedMetas: FieldMetadata[];
|
|
476
|
+
compactSelectedMetas: FieldMetadata[];
|
|
477
|
+
compactAlwaysVisibleMetas: FieldMetadata[];
|
|
478
|
+
gridSelectedMetas: FieldMetadata[];
|
|
479
|
+
gridAlwaysVisibleMetas: FieldMetadata[];
|
|
306
480
|
toggleMetas: FieldMetadata[];
|
|
307
481
|
advancedConfig?: FormConfig;
|
|
308
482
|
displayedTags: FilterTag[];
|
|
@@ -315,33 +489,35 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
315
489
|
private advancedChange$;
|
|
316
490
|
private alwaysFormReset$;
|
|
317
491
|
private dto;
|
|
318
|
-
modeState: 'filter' | 'card';
|
|
319
492
|
advancedOpen: boolean;
|
|
320
493
|
advancedValid: boolean;
|
|
321
494
|
activeFiltersCount: number;
|
|
322
495
|
saving: boolean;
|
|
323
496
|
i18nLabels: I18n;
|
|
324
|
-
placeholder?: string;
|
|
325
497
|
private configKey;
|
|
326
|
-
private pendingQuickValue?;
|
|
327
|
-
private autoSummaryData?;
|
|
328
498
|
private lastSchemaMeta?;
|
|
499
|
+
private schemaLoadVersion;
|
|
329
500
|
schemaOutdated: boolean;
|
|
330
501
|
anchorRef?: CdkOverlayOrigin;
|
|
331
|
-
|
|
502
|
+
addAnchor?: CdkOverlayOrigin;
|
|
503
|
+
advancedButton?: ElementRef<HTMLElement>;
|
|
332
504
|
overlayOrigin?: CdkOverlayOrigin;
|
|
333
505
|
overlayWidth: number | string;
|
|
334
506
|
isMobile: boolean;
|
|
335
507
|
advancedTitleId: string;
|
|
336
508
|
advancedPanelId: string;
|
|
337
|
-
|
|
509
|
+
addQuery: string;
|
|
510
|
+
addItems: Array<{
|
|
511
|
+
id: string;
|
|
512
|
+
label: string;
|
|
513
|
+
}>;
|
|
514
|
+
private addItemsUpdateQueued;
|
|
515
|
+
private applySchemaQueued;
|
|
516
|
+
private fallbackLogger?;
|
|
517
|
+
private fallbackLoggerEnvironment;
|
|
338
518
|
private isViewInitialized;
|
|
339
|
-
private pendingQuickFieldSetup;
|
|
340
|
-
private isQuickFieldSetupInProgress;
|
|
341
|
-
private _dbgPrevQuickArrayRef;
|
|
342
519
|
private _dbgPrevAlwaysArrayRef;
|
|
343
520
|
private _dbgPrevToggleArrayRef;
|
|
344
|
-
private _dbgPrevQuickFormRef;
|
|
345
521
|
private _dbgPrevAlwaysFormRef;
|
|
346
522
|
private _dbgDoCheckCount;
|
|
347
523
|
private _dbgLastApplyMetasAt;
|
|
@@ -349,19 +525,39 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
349
525
|
private _dbgLastAlwaysComponentsAt;
|
|
350
526
|
private _dbgLastToggleComponentsAt;
|
|
351
527
|
overlayPositions: ConnectedPosition[];
|
|
352
|
-
private quickSub?;
|
|
353
528
|
private advancedDebouncedSub?;
|
|
529
|
+
private lastActiveElement?;
|
|
354
530
|
private lastSubmitAt;
|
|
355
531
|
private resizeObs?;
|
|
356
532
|
private mutationObs?;
|
|
357
|
-
private ignoreOutsideUntil;
|
|
358
533
|
private _resolvedPrefs;
|
|
359
534
|
private resolveSchemaPrefs;
|
|
360
|
-
|
|
535
|
+
private domIdSeed;
|
|
536
|
+
private componentKeyId;
|
|
537
|
+
private resolveConfigKey;
|
|
538
|
+
getComponentKeyId(): string | null;
|
|
539
|
+
private filterTagsKey;
|
|
540
|
+
private filterDtoKey;
|
|
541
|
+
private filterSchemaMetaKey;
|
|
542
|
+
private filterSchemaMetaIndexKey;
|
|
543
|
+
private filterSchemaMetaKeyForSchemaId;
|
|
544
|
+
private filterSchemaIgnoreKey;
|
|
545
|
+
private filterSchemaSnoozeKey;
|
|
546
|
+
private filterSchemaNotifiedKey;
|
|
547
|
+
constructor(crud: GenericCrudService<any>, configStorage: AsyncConfigStorage, destroyRef: DestroyRef, filterConfig: FilterConfigService, settingsPanel: SettingsPanelService, snackBar: MatSnackBar, dialog: MatDialog, cdr: ChangeDetectorRef, ngZone: NgZone, dynamicForm: DynamicFormService, schemaNormalizer: SchemaNormalizerService, componentKeys: ComponentKeyService, route?: ActivatedRoute | undefined, logger?: LoggerService | undefined);
|
|
361
548
|
private readonly global;
|
|
549
|
+
private resolveRuntimeEnvironment;
|
|
550
|
+
private getLogger;
|
|
551
|
+
private buildFilterLogOptions;
|
|
552
|
+
private isFilterDebugEnabled;
|
|
553
|
+
private logFilterDebug;
|
|
554
|
+
private logFilterWarn;
|
|
362
555
|
private readonly filterDrawerAdapter;
|
|
556
|
+
private lastSavedConfigJson;
|
|
557
|
+
private setSchemaLoading;
|
|
558
|
+
private setActiveFiltersCount;
|
|
363
559
|
private loadSavedTagsFromStorage;
|
|
364
|
-
ngOnInit(): void
|
|
560
|
+
ngOnInit(): Promise<void>;
|
|
365
561
|
ngAfterViewInit(): void;
|
|
366
562
|
onWindowResize(): void;
|
|
367
563
|
private initDynamicObservers;
|
|
@@ -369,23 +565,55 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
369
565
|
private updateOverlayWidth;
|
|
370
566
|
private computeIsMobile;
|
|
371
567
|
ngOnChanges(changes: SimpleChanges): void;
|
|
568
|
+
private areStringArraysEqual;
|
|
569
|
+
private areMetadataOverrideMapsEqual;
|
|
570
|
+
/** Force-sync settings coming from parent table config updates. */
|
|
571
|
+
applyExternalSettings(cfg?: Partial<FilterConfig>): void;
|
|
372
572
|
openSettings(): void;
|
|
373
|
-
switchToFilter(): void;
|
|
374
573
|
createTag(label?: string): void;
|
|
375
574
|
renameTag(tag: FilterTag, label?: string): void;
|
|
376
575
|
deleteTag(tag: FilterTag): void;
|
|
576
|
+
removeFilter(tag: FilterTag): void;
|
|
377
577
|
startEditTag(tag: FilterTag, $event?: Event): void;
|
|
378
578
|
commitEditTag(tag: FilterTag, $event?: Event): void;
|
|
379
579
|
cancelEditTag($event?: Event): void;
|
|
380
580
|
advancedForm?: FormGroup<Record<string, any>>;
|
|
581
|
+
isActiveTag(tag: FilterTag): boolean;
|
|
582
|
+
private equalsDto;
|
|
583
|
+
private normalizeForCompare;
|
|
381
584
|
private buildFilteredSchemaContext;
|
|
585
|
+
private toSchemaIdContext;
|
|
586
|
+
private resetSchemaStateForContextChange;
|
|
587
|
+
private clearSchemaMetaPersistence;
|
|
588
|
+
private clearConfigStorageKey;
|
|
589
|
+
private loadStoredSchemaMeta;
|
|
590
|
+
private rememberSchemaMetaContext;
|
|
591
|
+
private getSchemaMetaKeyForContext;
|
|
592
|
+
private isStoredSchemaMetaForContext;
|
|
593
|
+
private isSameSchemaContext;
|
|
594
|
+
private resolveLocalSchemaHashForContext;
|
|
595
|
+
private persistSchemaMeta;
|
|
596
|
+
private syncSchemaMeta;
|
|
597
|
+
private resolveFallbackSchemaHash;
|
|
598
|
+
private isExplicitlyFilterable;
|
|
599
|
+
private pickSafeGenericFallbackDefs;
|
|
382
600
|
private loadSchemaViaClient;
|
|
601
|
+
private loadSchemaViaCrudFallback;
|
|
383
602
|
loadSchema(): void;
|
|
603
|
+
retrySchemaLoad(): void;
|
|
384
604
|
private applySchemaMetas;
|
|
605
|
+
private applySchemaMetasNow;
|
|
606
|
+
private pickMetasByOrder;
|
|
607
|
+
private withInferredFilterControlType;
|
|
608
|
+
private isAllowedFilterControlType;
|
|
609
|
+
private inferFilterControlType;
|
|
610
|
+
private cloneAlwaysVisibleMetadataOverrides;
|
|
611
|
+
private sanitizeAlwaysVisibleMetadataOverrides;
|
|
612
|
+
private sanitizeMetadataOverrideValue;
|
|
613
|
+
private mergeAlwaysVisibleMetadata;
|
|
385
614
|
ngDoCheck(): void;
|
|
386
|
-
onQuickComponents(map: Map<string, any>): void;
|
|
387
|
-
onQuickFieldCreated(ev: any): void;
|
|
388
615
|
onAlwaysComponents(map: Map<string, any>): void;
|
|
616
|
+
onSelectedComponents(map: Map<string, any>): void;
|
|
389
617
|
onToggleComponents(map: Map<string, any>): void;
|
|
390
618
|
onAdvancedReady(event: {
|
|
391
619
|
formGroup: FormGroup<Record<string, any>>;
|
|
@@ -394,21 +622,31 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
394
622
|
formData: Record<string, any>;
|
|
395
623
|
}): void;
|
|
396
624
|
onAdvancedValidityChange(valid: boolean): void;
|
|
625
|
+
onAddOpened(opened: boolean): void;
|
|
626
|
+
onAddQuery(q: string): void;
|
|
627
|
+
private updateAddItems;
|
|
628
|
+
trackById(_idx: number, it: {
|
|
629
|
+
id: string;
|
|
630
|
+
}): string;
|
|
631
|
+
onAddSelectionChange(values: string[] | null | undefined): void;
|
|
632
|
+
private formatWithCount;
|
|
633
|
+
getAddAriaLabel(): string;
|
|
634
|
+
getAddTriggerLabel(): string;
|
|
635
|
+
getActiveFiltersLabel(): string;
|
|
636
|
+
isAllSelected(): boolean;
|
|
637
|
+
isSomeSelected(): boolean;
|
|
638
|
+
toggleSelectAll(): void;
|
|
397
639
|
onAdvancedSubmit(event: {
|
|
398
640
|
formData: Record<string, any>;
|
|
399
641
|
}): void;
|
|
400
642
|
private closeAdvanced;
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
subtitle?: (s: any) => string;
|
|
406
|
-
badges?: Array<(s: any) => string>;
|
|
407
|
-
} | undefined;
|
|
408
|
-
private updateAutoSummary;
|
|
409
|
-
private defaultSummaryMap;
|
|
410
|
-
private formatValueForBadge;
|
|
643
|
+
/** Salva o estado atual dos filtros como um atalho (tag) do usuário */
|
|
644
|
+
saveCurrentAsTag(): void;
|
|
645
|
+
/** Persistência centralizada de atalho a partir de um DTO explícito */
|
|
646
|
+
private saveAsShortcutFromDto;
|
|
411
647
|
getAdvancedAriaLabel(): string;
|
|
648
|
+
getSettingsAriaLabel(): string;
|
|
649
|
+
getTagActionsAriaLabel(tag?: FilterTag): string;
|
|
412
650
|
private getSchemaMetaKey;
|
|
413
651
|
private getOutdatedIgnoreKey;
|
|
414
652
|
private getOutdatedSnoozeKey;
|
|
@@ -421,287 +659,525 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
421
659
|
private wasOutdatedNotified;
|
|
422
660
|
private verifyServerSchemaVersion;
|
|
423
661
|
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
662
|
ngOnDestroy(): void;
|
|
446
663
|
isUserTag(tag: FilterTag): boolean;
|
|
447
664
|
applyTag(tag: FilterTag): void;
|
|
448
|
-
onQuickNumericKeypress(event: KeyboardEvent): void;
|
|
449
|
-
onQuickBlurFormat(): void;
|
|
450
|
-
private bindQuickControlChanges;
|
|
451
665
|
private bindAdvancedDebounce;
|
|
452
666
|
onSubmit(): void;
|
|
453
667
|
onClear(): void;
|
|
454
|
-
quickHasValue(): boolean;
|
|
455
668
|
private isEventFromNestedOverlay;
|
|
456
|
-
|
|
457
|
-
|
|
669
|
+
private ensureAdvancedConfigReady;
|
|
670
|
+
private focusSchemaRetryButton;
|
|
671
|
+
private showAdvancedUnavailableFeedback;
|
|
458
672
|
private openAdvancedModal;
|
|
459
673
|
private openAdvancedDrawer;
|
|
460
674
|
toggleAdvanced(): void;
|
|
675
|
+
private usesProvidedFieldMetadata;
|
|
676
|
+
private applyProvidedFieldMetadata;
|
|
461
677
|
private saveConfig;
|
|
678
|
+
private captureLastActiveElement;
|
|
679
|
+
private restoreFocusAfterAdvanced;
|
|
462
680
|
private mergeI18n;
|
|
463
681
|
private persist;
|
|
464
682
|
private clearPersisted;
|
|
465
683
|
private persistTags;
|
|
684
|
+
private cleanFilterPayload;
|
|
685
|
+
private upsertDtoValue;
|
|
686
|
+
private isEffectivelyEmptyFilterValue;
|
|
466
687
|
private syncFormsToDto;
|
|
467
|
-
onQuickClear(): void;
|
|
468
688
|
private updateDisplayedTags;
|
|
469
|
-
private
|
|
689
|
+
private normalizeMode;
|
|
690
|
+
private normalizeAdvancedOpenMode;
|
|
470
691
|
onGlobalKeydown(event: KeyboardEvent): void;
|
|
471
692
|
private isEditableElement;
|
|
472
693
|
private focusQuick;
|
|
473
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilter,
|
|
474
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilter, "praxis-filter", never, { "resourcePath": { "alias": "resourcePath"; "required": true; }; "formId": { "alias": "formId"; "required":
|
|
694
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilter, [null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
695
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilter, "praxis-filter", never, { "resourcePath": { "alias": "resourcePath"; "required": true; }; "fieldMetadata": { "alias": "fieldMetadata"; "required": false; }; "filterId": { "alias": "filterId"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "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; }; "alwaysVisibleFields": { "alias": "alwaysVisibleFields"; "required": false; }; "alwaysVisibleFieldMetadataOverrides": { "alias": "alwaysVisibleFieldMetadataOverrides"; "required": false; }; "selectedFieldIds": { "alias": "selectedFieldIds"; "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; }; "confirmTagDelete": { "alias": "confirmTagDelete"; "required": false; }; "placeBooleansInActions": { "alias": "placeBooleansInActions"; "required": false; }; "showToggleLabels": { "alias": "showToggleLabels"; "required": false; }; "useInlineSelectVariant": { "alias": "useInlineSelectVariant"; "required": false; }; "useInlineSearchableSelectVariant": { "alias": "useInlineSearchableSelectVariant"; "required": false; }; "useInlineMultiSelectVariant": { "alias": "useInlineMultiSelectVariant"; "required": false; }; "useInlineInputVariant": { "alias": "useInlineInputVariant"; "required": false; }; "useInlineToggleVariant": { "alias": "useInlineToggleVariant"; "required": false; }; "useInlineRangeVariant": { "alias": "useInlineRangeVariant"; "required": false; }; "useInlineDateVariant": { "alias": "useInlineDateVariant"; "required": false; }; "useInlineDateRangeVariant": { "alias": "useInlineDateRangeVariant"; "required": false; }; "useInlineTimeVariant": { "alias": "useInlineTimeVariant"; "required": false; }; "useInlineTimeRangeVariant": { "alias": "useInlineTimeRangeVariant"; "required": false; }; "useInlineTreeSelectVariant": { "alias": "useInlineTreeSelectVariant"; "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; }; "advancedClearButtonsEnabled": { "alias": "advancedClearButtonsEnabled"; "required": false; }; }, { "submit": "submit"; "change": "change"; "clear": "clear"; "modeChange": "modeChange"; "requestSearch": "requestSearch"; "tagsChange": "tagsChange"; "selectedFieldIdsChange": "selectedFieldIdsChange"; "metaChanged": "metaChanged"; "schemaStatusChange": "schemaStatusChange"; }, never, never, true, never>;
|
|
475
696
|
}
|
|
476
697
|
|
|
477
|
-
|
|
478
|
-
|
|
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;
|
|
698
|
+
type SchemaFieldHint = {
|
|
699
|
+
name: string;
|
|
495
700
|
label?: string;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
701
|
+
type?: string;
|
|
702
|
+
controlType?: string;
|
|
703
|
+
numericFormat?: string;
|
|
704
|
+
options?: Array<Record<string, unknown> | string | number | boolean>;
|
|
705
|
+
optionLabelKey?: string;
|
|
706
|
+
optionValueKey?: string;
|
|
707
|
+
enumValues?: string[];
|
|
708
|
+
};
|
|
709
|
+
type DataMode = 'remote' | 'local' | 'empty';
|
|
710
|
+
type RowExpansionTrigger = 'icon' | 'row' | 'keyboard' | 'api' | 'restore';
|
|
711
|
+
type RowExpansionReasonCode = 'user' | 'policy' | 'restore' | 'api';
|
|
712
|
+
type RowExpansionChangeBase = {
|
|
713
|
+
tableId: string;
|
|
714
|
+
trigger: RowExpansionTrigger;
|
|
715
|
+
reasonCode: RowExpansionReasonCode;
|
|
716
|
+
expanded: boolean;
|
|
717
|
+
persisted: boolean;
|
|
718
|
+
};
|
|
719
|
+
type RowExpansionChangeEvent = (RowExpansionChangeBase & {
|
|
720
|
+
rowIdExposure: 'redacted';
|
|
721
|
+
rowIdRef: null;
|
|
722
|
+
expandedKeysExposure: 'none';
|
|
723
|
+
previousExpandedKeysRef: null;
|
|
724
|
+
currentExpandedKeysRef: null;
|
|
725
|
+
}) | (RowExpansionChangeBase & {
|
|
726
|
+
rowIdExposure: 'hashed';
|
|
727
|
+
rowIdHash: string;
|
|
728
|
+
expandedKeysExposure: 'none';
|
|
729
|
+
previousExpandedKeysRef: null;
|
|
730
|
+
currentExpandedKeysRef: null;
|
|
731
|
+
}) | (RowExpansionChangeBase & {
|
|
732
|
+
rowIdExposure: 'hashed';
|
|
733
|
+
rowIdHash: string;
|
|
734
|
+
expandedKeysExposure: 'hashed';
|
|
735
|
+
previousExpandedKeysHash: string[] | null;
|
|
736
|
+
currentExpandedKeysHash: string[] | null;
|
|
737
|
+
}) | (RowExpansionChangeBase & {
|
|
738
|
+
rowIdExposure: 'hashed';
|
|
739
|
+
rowIdHash: string;
|
|
740
|
+
expandedKeysExposure: 'raw';
|
|
741
|
+
previousExpandedKeys: string[] | null;
|
|
742
|
+
currentExpandedKeys: string[] | null;
|
|
743
|
+
}) | (RowExpansionChangeBase & {
|
|
744
|
+
rowIdExposure: 'raw';
|
|
745
|
+
rowId: string;
|
|
746
|
+
expandedKeysExposure: 'none';
|
|
747
|
+
previousExpandedKeysRef: null;
|
|
748
|
+
currentExpandedKeysRef: null;
|
|
749
|
+
}) | (RowExpansionChangeBase & {
|
|
750
|
+
rowIdExposure: 'raw';
|
|
751
|
+
rowId: string;
|
|
752
|
+
expandedKeysExposure: 'hashed';
|
|
753
|
+
previousExpandedKeysHash: string[] | null;
|
|
754
|
+
currentExpandedKeysHash: string[] | null;
|
|
755
|
+
}) | (RowExpansionChangeBase & {
|
|
756
|
+
rowIdExposure: 'raw';
|
|
757
|
+
rowId: string;
|
|
758
|
+
expandedKeysExposure: 'raw';
|
|
759
|
+
previousExpandedKeys: string[] | null;
|
|
760
|
+
currentExpandedKeys: string[] | null;
|
|
761
|
+
});
|
|
762
|
+
type RowActionRuntimeOptions = {
|
|
763
|
+
payload?: any;
|
|
764
|
+
actionConfig?: any;
|
|
765
|
+
};
|
|
766
|
+
type ExpansionDetailRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error' | 'blocked';
|
|
767
|
+
type ExpansionDetailResolvedSource = 'inline' | 'resource' | 'resourcePath' | 'fallback';
|
|
768
|
+
type ExpansionDetailViewState = {
|
|
769
|
+
status: ExpansionDetailRuntimeStatus;
|
|
770
|
+
schema: Record<string, unknown> | null;
|
|
771
|
+
message: string | null;
|
|
772
|
+
source: ExpansionDetailResolvedSource | null;
|
|
773
|
+
};
|
|
513
774
|
declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterContentInit, OnDestroy {
|
|
514
|
-
private crudService;
|
|
515
775
|
private cdr;
|
|
516
776
|
private settingsPanel;
|
|
517
|
-
private
|
|
518
|
-
private specBridge;
|
|
519
|
-
private configStorage;
|
|
520
|
-
private connectionStorage;
|
|
777
|
+
private crudService;
|
|
521
778
|
private tableDefaultsProvider;
|
|
522
|
-
|
|
523
|
-
private
|
|
779
|
+
filterConfig: FilterConfigService;
|
|
780
|
+
private formattingService;
|
|
524
781
|
private pxDialog;
|
|
782
|
+
private snackBar;
|
|
783
|
+
private asyncConfigStorage;
|
|
784
|
+
private connectionStorage;
|
|
525
785
|
private hostRef;
|
|
526
786
|
private global;
|
|
787
|
+
private componentKeys;
|
|
788
|
+
private loadingOrchestrator;
|
|
789
|
+
private loadingRenderer?;
|
|
790
|
+
private route?;
|
|
791
|
+
private logger?;
|
|
792
|
+
private static dslRuntimeInstanceCounter;
|
|
793
|
+
private static readonly CELL_ANIMATION_CHANGE_CACHE_LIMIT;
|
|
794
|
+
private static readonly ROW_ANIMATION_PRESETS;
|
|
795
|
+
private static readonly ROW_ANIMATION_PRESET_ALIASES;
|
|
527
796
|
config: TableConfig;
|
|
528
|
-
resourcePath
|
|
529
|
-
|
|
530
|
-
|
|
797
|
+
resourcePath: string;
|
|
798
|
+
data: any[] | null;
|
|
799
|
+
tableId: string;
|
|
800
|
+
componentInstanceId?: string;
|
|
801
|
+
title: string;
|
|
802
|
+
subtitle: string;
|
|
803
|
+
icon: string;
|
|
804
|
+
autoDelete: boolean;
|
|
531
805
|
notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
|
|
532
|
-
/** Snooze duration for schema outdated notifications (ms), only in edit mode */
|
|
533
806
|
snoozeMs: number;
|
|
534
|
-
/** Auto open settings when schema is detected as outdated (only in edit mode) */
|
|
535
807
|
autoOpenSettingsOnOutdated: boolean;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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
|
-
}>;
|
|
808
|
+
crudContext: any;
|
|
809
|
+
dslFunctionRegistry: FunctionRegistry<any> | null;
|
|
810
|
+
rowClick: EventEmitter<any>;
|
|
811
|
+
rowDoubleClick: EventEmitter<any>;
|
|
812
|
+
rowExpansionChange: EventEmitter<RowExpansionChangeEvent>;
|
|
813
|
+
rowAction: EventEmitter<any>;
|
|
814
|
+
toolbarAction: EventEmitter<any>;
|
|
815
|
+
bulkAction: EventEmitter<any>;
|
|
816
|
+
columnReorder: EventEmitter<any>;
|
|
817
|
+
columnReorderAttempt: EventEmitter<any>;
|
|
598
818
|
beforeDelete: EventEmitter<any>;
|
|
599
819
|
afterDelete: EventEmitter<any>;
|
|
600
|
-
deleteError: EventEmitter<
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
820
|
+
deleteError: EventEmitter<any>;
|
|
821
|
+
beforeBulkDelete: EventEmitter<any>;
|
|
822
|
+
afterBulkDelete: EventEmitter<any>;
|
|
823
|
+
bulkDeleteError: EventEmitter<any>;
|
|
824
|
+
schemaStatusChange: EventEmitter<any>;
|
|
825
|
+
metadataChange: EventEmitter<any>;
|
|
826
|
+
loadingStateChange: EventEmitter<LoadingState>;
|
|
827
|
+
paginator: MatPaginator;
|
|
828
|
+
sort: MatSort;
|
|
829
|
+
materialTable?: MatTable<any>;
|
|
830
|
+
internalFilter?: PraxisFilter;
|
|
831
|
+
toolbar: PraxisTableToolbar;
|
|
832
|
+
projectedFilter: any;
|
|
833
|
+
toolbarV2: boolean;
|
|
614
834
|
dataSource: MatTableDataSource<any, MatPaginator>;
|
|
615
|
-
displayedColumns: string[];
|
|
616
|
-
visibleColumns: ColumnDefinition[];
|
|
617
|
-
private dataSubject;
|
|
618
835
|
selection: SelectionModel<any>;
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
836
|
+
dataSubject: BehaviorSubject<any[]>;
|
|
837
|
+
subscriptions: Subscription[];
|
|
838
|
+
showToolbar: boolean;
|
|
839
|
+
hasInitialized: boolean;
|
|
840
|
+
pageIndex: number;
|
|
841
|
+
pageSize: number;
|
|
842
|
+
sortState: Sort;
|
|
843
|
+
filterCriteria: any;
|
|
844
|
+
visibleColumns: ColumnDefinition[];
|
|
845
|
+
visibleDataColumnsForDrag: ColumnDefinition[];
|
|
846
|
+
displayedColumns: string[];
|
|
847
|
+
readonly expansionDetailRowColumns: string[];
|
|
848
|
+
readonly isExpansionDetailRow: (index: number, row: any) => boolean;
|
|
849
|
+
columnReorderStatusMessage: string;
|
|
850
|
+
columnReorderVisualStatusMessage: string;
|
|
851
|
+
private columnReorderStatusTimer;
|
|
852
|
+
private columnReorderVisualStatusTimer;
|
|
853
|
+
private columnReorderUndoSubscription;
|
|
854
|
+
private columnReorderOperationCounter;
|
|
855
|
+
private latestColumnReorderOperationId;
|
|
856
|
+
localSource: any[];
|
|
857
|
+
localView: any[];
|
|
858
|
+
localTotal: number;
|
|
859
|
+
private localPageSizeRuntimeOverride;
|
|
860
|
+
private lastResolvedDataMode;
|
|
861
|
+
private localFilterFieldMetadataCache;
|
|
862
|
+
private localFilterFieldMetadataCacheKey;
|
|
863
|
+
private uncontrolledExpandedRowKeys;
|
|
864
|
+
private readonly expansionOpaqueRefCacheLimit;
|
|
865
|
+
private expansionOpaqueRefByRowKey;
|
|
866
|
+
private expansionDetailSchemaByRowKey;
|
|
867
|
+
private expansionDetailStatusByRowKey;
|
|
868
|
+
private expansionDetailMessageByRowKey;
|
|
869
|
+
private expansionDetailSourceByRowKey;
|
|
870
|
+
private expansionDetailAbortByRowKey;
|
|
871
|
+
private expansionDetailActiveTabByRowKey;
|
|
872
|
+
private schemaFieldsSnapshot;
|
|
634
873
|
schemaError: boolean;
|
|
635
874
|
dataError: boolean;
|
|
636
875
|
errorMessage: string | null;
|
|
876
|
+
idField: string;
|
|
877
|
+
horizontalScroll: 'auto' | 'wrap' | 'none';
|
|
878
|
+
private horizontalScrollOverrideSource;
|
|
879
|
+
getToolbarPosition(): 'top' | 'bottom' | 'both';
|
|
880
|
+
shouldShowToolbarTopPlacement(): boolean;
|
|
881
|
+
shouldShowToolbarBottomPlacement(): boolean;
|
|
882
|
+
shouldRenderFooterToolbar(): boolean;
|
|
883
|
+
shouldShowFooterToolbarMain(): boolean;
|
|
884
|
+
shouldShowFooterToolbarEndActions(): boolean;
|
|
885
|
+
shouldShowFooterToolbarReset(): boolean;
|
|
886
|
+
getToolbarActionsPosition(): 'top' | 'bottom' | 'both';
|
|
887
|
+
getBulkActionsPosition(): 'toolbar' | 'floating' | 'both';
|
|
888
|
+
shouldRenderFloatingBulkActions(): boolean;
|
|
889
|
+
getFloatingBulkActions(): any[];
|
|
890
|
+
shouldHideFloatingBulkActions(): boolean;
|
|
891
|
+
getFloatingBulkPositionClass(): string;
|
|
892
|
+
isFloatingBulkActionDisabled(action: any): boolean;
|
|
893
|
+
shouldShowToolbarActionsTop(): boolean;
|
|
894
|
+
shouldShowToolbarActionsBottom(): boolean;
|
|
895
|
+
getToolbarActionsBackgroundColor(): string | null;
|
|
896
|
+
getToolbarLayoutHeightPx(): number | null;
|
|
897
|
+
getToolbarLayoutHeightCssVar(): string | null;
|
|
898
|
+
getToolbarLayoutHeightHostStyle(): string | null;
|
|
899
|
+
getRowActionsWidthStyle(): string | null;
|
|
900
|
+
getColumnTextAlignStyle(column: ColumnDefinition): string | null;
|
|
901
|
+
getColumnWidthStyle(column: ColumnDefinition): string | null;
|
|
902
|
+
getColumnHeaderAttrStyle(column: ColumnDefinition): string | null;
|
|
903
|
+
getColumnCellAttrStyle(column: ColumnDefinition): string | null;
|
|
904
|
+
getTableElevationClassName(): string;
|
|
905
|
+
private normalizeTableElevationLevel;
|
|
906
|
+
private resolveRuntimeTableElevationLevel;
|
|
907
|
+
private resolveTableShadowColor;
|
|
908
|
+
private buildTableElevationShadow;
|
|
909
|
+
private syncHorizontalScrollFromAppearanceConfig;
|
|
910
|
+
private resolveResponsiveMobileBreakpoint;
|
|
911
|
+
private shouldApplyResponsiveHorizontalScrollGlobally;
|
|
912
|
+
private isWithinResponsiveMobileBreakpoint;
|
|
913
|
+
private refreshResponsiveHorizontalScroll;
|
|
914
|
+
hasBottomPaginator(): boolean;
|
|
915
|
+
hasExplicitResourcePath(): boolean;
|
|
916
|
+
hasLocalDataInput(): boolean;
|
|
917
|
+
getDataMode(): DataMode;
|
|
918
|
+
isRemoteMode(): boolean;
|
|
919
|
+
isLocalMode(): boolean;
|
|
920
|
+
isEmptyMode(): boolean;
|
|
921
|
+
isLocalDataModeFeatureEnabled(): boolean;
|
|
922
|
+
isLocalDataModeActive(): boolean;
|
|
923
|
+
shouldRenderDataSurface(): boolean;
|
|
924
|
+
shouldShowEmptyState(): boolean;
|
|
925
|
+
shouldRenderAdvancedFilter(): boolean;
|
|
926
|
+
getAdvancedFilterResourcePath(): string;
|
|
927
|
+
getAdvancedFilterPersistenceKey(): string;
|
|
928
|
+
getAdvancedFilterFieldMetadata(): FieldMetadata[] | null | undefined;
|
|
929
|
+
private buildLocalFilterMetadata;
|
|
930
|
+
private buildLocalFilterMetadataCacheKey;
|
|
931
|
+
private resolveLocalFilterDataType;
|
|
932
|
+
private resolveLocalFilterControlType;
|
|
933
|
+
private schemaState;
|
|
637
934
|
schemaOutdated: boolean;
|
|
935
|
+
editModeEnabled: boolean;
|
|
638
936
|
private _resolvedPrefs;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
private
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
private
|
|
658
|
-
private
|
|
659
|
-
private
|
|
660
|
-
private
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
private
|
|
668
|
-
private
|
|
669
|
-
private
|
|
670
|
-
private
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
private
|
|
678
|
-
|
|
937
|
+
set resolvedPrefs(val: any);
|
|
938
|
+
get resolvedPrefs(): any;
|
|
939
|
+
dense: boolean;
|
|
940
|
+
private resolveAppearanceDensity;
|
|
941
|
+
get hostDensityCompactClass(): boolean;
|
|
942
|
+
get hostDensityComfortableClass(): boolean;
|
|
943
|
+
get hostDensitySpaciousClass(): boolean;
|
|
944
|
+
get hostRowBordersClass(): boolean;
|
|
945
|
+
get hostColumnBordersClass(): boolean;
|
|
946
|
+
trackByRow(index: number, item: any): any;
|
|
947
|
+
getSchemaFieldsSnapshot(): SchemaFieldHint[];
|
|
948
|
+
aiAdapter: any;
|
|
949
|
+
private aiAdapterLoadStarted;
|
|
950
|
+
styleSpecCache: Map<string, any>;
|
|
951
|
+
actionSpecCache: Map<string, any>;
|
|
952
|
+
private computedContextCache;
|
|
953
|
+
private computedFieldNames;
|
|
954
|
+
dslParser: DslParser<any>;
|
|
955
|
+
private dslRuntimeRegistry;
|
|
956
|
+
private readonly dslRuntimeContextKey;
|
|
957
|
+
private computedExpressionEvaluator;
|
|
958
|
+
private resizeObserver;
|
|
959
|
+
private removeViewportChangeListeners;
|
|
960
|
+
private warnedMissingId;
|
|
961
|
+
private readonly warnedUnsupportedFeatures;
|
|
962
|
+
private warnedStrictCspStyleMode;
|
|
963
|
+
private fallbackLogger?;
|
|
964
|
+
private fallbackLoggerEnvironment;
|
|
965
|
+
private lastColumnDropHandledAt;
|
|
966
|
+
private activeColumnDragField;
|
|
967
|
+
private readonly _effectiveCellRenderCache;
|
|
968
|
+
private readonly cellAnimationPreviousValuesByRowId;
|
|
969
|
+
private readonly cellAnimationPreviousValuesByRowRef;
|
|
970
|
+
private readonly cellAnimationPreviousRowIdOrder;
|
|
971
|
+
private getLogger;
|
|
972
|
+
private buildLogOptions;
|
|
973
|
+
private debugLog;
|
|
974
|
+
private debugLogWithMeta;
|
|
975
|
+
private warnLog;
|
|
976
|
+
private warnOnceLog;
|
|
977
|
+
private errorLog;
|
|
978
|
+
private logResolvedDataMode;
|
|
979
|
+
private clearModeErrors;
|
|
980
|
+
private resetRuntimeStateForModeTransition;
|
|
981
|
+
private clearRenderedRowsForModeTransition;
|
|
982
|
+
private applyDataModeTransition;
|
|
983
|
+
private reconcileDataModeTransition;
|
|
984
|
+
private clearLocalScaffolding;
|
|
985
|
+
private syncPaginationTotal;
|
|
986
|
+
private refreshLocalScaffolding;
|
|
987
|
+
private syncLocalPageSizeFromConfig;
|
|
988
|
+
private recomputeLocalView;
|
|
989
|
+
private resolveLocalSortField;
|
|
990
|
+
private setSchemaFieldsSnapshot;
|
|
991
|
+
private normalizeSchemaOptions;
|
|
992
|
+
private normalizeEnumValues;
|
|
993
|
+
private normalizeSchemaKey;
|
|
994
|
+
private clearSchemaFieldsSnapshot;
|
|
995
|
+
private componentKeyId;
|
|
996
|
+
private storageKey;
|
|
997
|
+
private tableConfigKey;
|
|
998
|
+
private filterConfigKey;
|
|
999
|
+
private warnMissingId;
|
|
1000
|
+
private ensureConfigDefaults;
|
|
1001
|
+
private setShowToolbar;
|
|
1002
|
+
private configureDslRuntime;
|
|
1003
|
+
constructor(cdr: ChangeDetectorRef, settingsPanel: SettingsPanelService, crudService: GenericCrudService<any, any>, tableDefaultsProvider: TableDefaultsProvider, filterConfig: FilterConfigService, formattingService: DataFormattingService, pxDialog: PraxisDialog, snackBar: MatSnackBar, asyncConfigStorage: AsyncConfigStorage, connectionStorage: ConnectionStorage, hostRef: ElementRef<HTMLElement>, global: GlobalConfigService, componentKeys: ComponentKeyService, loadingOrchestrator: LoadingOrchestrator, loadingRenderer?: PraxisLoadingRenderer | undefined, route?: ActivatedRoute | undefined, logger?: LoggerService | undefined);
|
|
1004
|
+
private ensureAiAdapterLoaded;
|
|
1005
|
+
private emitLoadingState;
|
|
1006
|
+
private buildLoadingContext;
|
|
1007
|
+
private beginLoading;
|
|
1008
|
+
private endLoading;
|
|
679
1009
|
openQuickConnect(): void;
|
|
680
|
-
ngOnInit(): void
|
|
1010
|
+
ngOnInit(): Promise<void>;
|
|
681
1011
|
ngAfterContentInit(): void;
|
|
682
1012
|
ngOnChanges(changes: SimpleChanges): void;
|
|
683
1013
|
private isDebug;
|
|
684
1014
|
private connectionKey;
|
|
685
1015
|
private saveConnection;
|
|
1016
|
+
private inputsKey;
|
|
1017
|
+
private normalizeResourcePathIntent;
|
|
1018
|
+
private resolveResourcePathIntentFromEditor;
|
|
1019
|
+
private applyResourcePathIntentFromEditor;
|
|
686
1020
|
disconnect(): void;
|
|
687
1021
|
ngAfterViewInit(): void;
|
|
688
1022
|
onPageChange(event: PageEvent): void;
|
|
689
1023
|
onSortChange(event: Sort): void;
|
|
690
|
-
onRowClicked(row: any, index: number): void;
|
|
1024
|
+
onRowClicked(row: any, index: number, event?: MouseEvent): void;
|
|
1025
|
+
isRowExpansionRuntimeEnabled(): boolean;
|
|
1026
|
+
isExpansionIconTriggerEnabled(): boolean;
|
|
1027
|
+
isRowExpandable(row: any, index?: number): boolean;
|
|
1028
|
+
isRowExpanded(row: any, index?: number): boolean;
|
|
1029
|
+
shouldRenderExpansionDetailRow(row: any, index?: number): boolean;
|
|
1030
|
+
getRowExpansionDetailId(row: any, index?: number): string;
|
|
1031
|
+
getRowExpansionToggleAriaLabel(row: any, index?: number): string;
|
|
1032
|
+
getRowExpansionRegionAriaLabel(row: any, index?: number): string;
|
|
1033
|
+
getExpansionDetailViewState(row: any, index?: number): ExpansionDetailViewState;
|
|
1034
|
+
getExpansionDetailItems(schema: Record<string, unknown> | null): any[];
|
|
1035
|
+
getExpansionDetailLayout(schema: Record<string, unknown> | null): 'stack' | 'tabs';
|
|
1036
|
+
getExpansionDetailTabs(schema: Record<string, unknown> | null): any[];
|
|
1037
|
+
getExpansionDetailNodeType(node: any): string;
|
|
1038
|
+
getExpansionDetailNodeTitle(node: any, fallback?: string): string;
|
|
1039
|
+
getExpansionDetailNodeChildren(node: any): any[];
|
|
1040
|
+
getExpansionDetailValue(row: any, node: any): string;
|
|
1041
|
+
getExpansionDetailListItems(row: any, node: any): string[];
|
|
1042
|
+
private formatExpansionDetailListEntry;
|
|
1043
|
+
private getExpansionDetailObjectListLabel;
|
|
1044
|
+
getExpansionDetailRichText(node: any): string;
|
|
1045
|
+
getExpansionDetailTabId(row: any, index: number, tab: any, tabIndex: number): string;
|
|
1046
|
+
getExpansionDetailPanelId(row: any, index: number, tab: any, tabIndex: number): string;
|
|
1047
|
+
getExpansionDetailTabToken(tab: any, tabIndex: number): string;
|
|
1048
|
+
isExpansionDetailTabActive(row: any, index: number, tab: any, tabIndex: number, tabs: any[]): boolean;
|
|
1049
|
+
onExpansionDetailTabSelect(row: any, index: number, tab: any, tabIndex: number, event?: Event): void;
|
|
1050
|
+
onExpansionDetailTabKeydown(event: KeyboardEvent, row: any, index: number, tabIndex: number, tabs: any[]): void;
|
|
1051
|
+
onExpansionToggleFromIcon(row: any, index: number, event: MouseEvent): void;
|
|
1052
|
+
onExpansionToggleKeydown(event: KeyboardEvent, row: any, index: number): void;
|
|
1053
|
+
private getExpansionConfig;
|
|
1054
|
+
private ensureExpansionDetailPrepared;
|
|
1055
|
+
private resolveExpansionDetailSchemaForRow;
|
|
1056
|
+
private resolveExpansionDetailByMode;
|
|
1057
|
+
private resolveExpansionDetailInlineSchema;
|
|
1058
|
+
private resolveExpansionDetailFromResource;
|
|
1059
|
+
private resolveExpansionDetailFromResourcePath;
|
|
1060
|
+
private normalizeExpansionDetailSchemaCandidate;
|
|
1061
|
+
private sanitizeExpansionDetailSchema;
|
|
1062
|
+
private sanitizeExpansionDetailNodes;
|
|
1063
|
+
private sanitizeExpansionDetailNode;
|
|
1064
|
+
private buildExpansionBlockedPlaceholderNode;
|
|
1065
|
+
private interpolateExpansionResourcePath;
|
|
1066
|
+
private isExpansionResourcePathAllowed;
|
|
1067
|
+
private normalizeResolvedExpansionResourcePath;
|
|
1068
|
+
private isAbsoluteExpansionResourcePath;
|
|
1069
|
+
private normalizeExpansionResourceAllowListPattern;
|
|
1070
|
+
private wildcardToRegExp;
|
|
1071
|
+
private resolveExpansionContextValue;
|
|
1072
|
+
private buildExpansionContextRecord;
|
|
1073
|
+
private getExpansionFallbackMode;
|
|
1074
|
+
private getExpansionFallbackNodePolicy;
|
|
1075
|
+
private getExpansionAllowedNodesSet;
|
|
1076
|
+
private validateExpansionDetailRendererContract;
|
|
1077
|
+
private setExpansionDetailRuntimeState;
|
|
1078
|
+
private clearExpansionDetailRuntimeForRowKey;
|
|
1079
|
+
private clearExpansionDetailRuntime;
|
|
1080
|
+
private cancelExpansionDetailLoad;
|
|
1081
|
+
private syncExpansionDetailRuntimeAfterStateChange;
|
|
1082
|
+
private shouldKeepExpansionDetailCacheOnCollapse;
|
|
1083
|
+
private shouldCancelExpansionDetailLoadOnCollapse;
|
|
1084
|
+
private renderExpansionRows;
|
|
1085
|
+
private logExpansionDiagnostic;
|
|
1086
|
+
private isExpansionControlledMode;
|
|
1087
|
+
private getCurrentExpandedRowKeys;
|
|
1088
|
+
private toggleRowExpansion;
|
|
1089
|
+
private resolveRowExpansionKey;
|
|
1090
|
+
private computeNextExpansionState;
|
|
1091
|
+
private getExpansionAllowMultiple;
|
|
1092
|
+
private getExpansionMaxExpandedRows;
|
|
1093
|
+
private getExpansionOverflowPolicy;
|
|
1094
|
+
private emitRowExpansionStateDiffEvents;
|
|
1095
|
+
private shouldEmitExpansionChangeEvents;
|
|
1096
|
+
private createRowExpansionEvent;
|
|
1097
|
+
private hashExpansionKey;
|
|
1098
|
+
private enforceExpansionOpaqueRefCacheLimit;
|
|
1099
|
+
private generateExpansionOpaqueRefToken;
|
|
1100
|
+
private getRuntimeCrypto;
|
|
1101
|
+
private escapeRegExp;
|
|
1102
|
+
private sanitizeDomIdToken;
|
|
1103
|
+
private areStringSetsEqual;
|
|
1104
|
+
private shouldToggleExpansionOnRowClick;
|
|
1105
|
+
private isInteractiveRowTarget;
|
|
1106
|
+
private restoreFocusToToggle;
|
|
1107
|
+
private collapseExpandedRowsByPolicy;
|
|
1108
|
+
private applyExpansionCollapsePolicy;
|
|
691
1109
|
onRowDoubleClicked(row: any, index: number): void;
|
|
692
|
-
onRowAction(action: string, row: any, event: Event): void;
|
|
1110
|
+
onRowAction(action: string, row: any, event: Event, runtimeOptions?: RowActionRuntimeOptions): void;
|
|
1111
|
+
private resolveRowActionRuntimeOptions;
|
|
1112
|
+
private emitRowActionEvent;
|
|
693
1113
|
private showConfirmDialog;
|
|
694
1114
|
private executeDeleteAction;
|
|
1115
|
+
private cloneForEmit;
|
|
1116
|
+
private interpolateActionMessageTemplate;
|
|
1117
|
+
private buildActionFeedbackContext;
|
|
1118
|
+
private resolveActionFeedbackMessage;
|
|
1119
|
+
private showActionFeedbackMessage;
|
|
1120
|
+
private emitEventWithActionFeedback;
|
|
1121
|
+
private resolveBulkValidationMessage;
|
|
1122
|
+
private hasValidBulkSelectionCount;
|
|
1123
|
+
private showBulkConfirmDialog;
|
|
695
1124
|
onToolbarAction(event: {
|
|
696
1125
|
action: string;
|
|
1126
|
+
actionConfig?: any;
|
|
697
1127
|
}): void;
|
|
698
1128
|
onAdvancedFilterSubmit(criteria: Record<string, any>): void;
|
|
699
1129
|
onAdvancedFilterClear(): void;
|
|
1130
|
+
private saveConfigWithAck;
|
|
1131
|
+
private clearConfigWithAck;
|
|
1132
|
+
private persistHorizontalScrollInput;
|
|
1133
|
+
private showPersistenceFailureFeedback;
|
|
1134
|
+
private showResetSuccessFeedback;
|
|
700
1135
|
openTableSettings(): void;
|
|
701
1136
|
private applyTableConfig;
|
|
1137
|
+
private withFallbackAdvancedFilterSettings;
|
|
1138
|
+
private syncInternalFilterSettings;
|
|
1139
|
+
private resetPreferencesToDefaults;
|
|
702
1140
|
onResetPreferences(): void;
|
|
1141
|
+
private resolvePagingStrategy;
|
|
1142
|
+
private resolveSortingStrategy;
|
|
703
1143
|
private applyDataSourceSettings;
|
|
1144
|
+
private sanitizeColumns;
|
|
704
1145
|
private setupColumns;
|
|
1146
|
+
private isDataColumnField;
|
|
1147
|
+
private computeVisibleDataColumnsForDrag;
|
|
1148
|
+
getVisibleDataColumnsForDrag(): ColumnDefinition[];
|
|
1149
|
+
isColumnDraggingEnabled(): boolean;
|
|
1150
|
+
isColumnDragIndicatorEnabled(): boolean;
|
|
1151
|
+
isColumnDraggable(column: ColumnDefinition | null | undefined): boolean;
|
|
1152
|
+
private resolveColumnReorderHeader;
|
|
1153
|
+
private isEnglishLocale;
|
|
1154
|
+
private isColumnDragDebugEnabled;
|
|
1155
|
+
private logColumnDragDebug;
|
|
1156
|
+
private resolveTableMessageTemplate;
|
|
1157
|
+
private resolveTableMessage;
|
|
1158
|
+
getColumnDragHandleAriaLabel(column: ColumnDefinition): string;
|
|
1159
|
+
getColumnDragHandleTooltip(column: ColumnDefinition): string;
|
|
1160
|
+
private publishColumnReorderStatus;
|
|
1161
|
+
private publishColumnReorderVisualStatus;
|
|
1162
|
+
private clearColumnReorderVisualStatus;
|
|
1163
|
+
private clearColumnReorderUndoSubscription;
|
|
1164
|
+
private emitColumnReorderAttempt;
|
|
1165
|
+
private createColumnReorderOperationId;
|
|
1166
|
+
private isLatestColumnReorderOperation;
|
|
1167
|
+
private offerColumnReorderUndo;
|
|
1168
|
+
private restoreColumnOrderFromUndo;
|
|
1169
|
+
onColumnDragHandleKeydown(event: KeyboardEvent, column: ColumnDefinition): void;
|
|
1170
|
+
onColumnDrop(event: CdkDragDrop<ColumnDefinition[]>): void;
|
|
1171
|
+
onColumnDragStarted(column: ColumnDefinition): void;
|
|
1172
|
+
onColumnDragEnded(event: CdkDragEnd<ColumnDefinition>, column: ColumnDefinition): void;
|
|
1173
|
+
private applyColumnReorder;
|
|
1174
|
+
private reorderConfigColumnsByVisibleOrder;
|
|
1175
|
+
private haveSameFieldMultiset;
|
|
1176
|
+
private resolveColumnDropZone;
|
|
1177
|
+
private normalizeDropZoneToken;
|
|
1178
|
+
private parseColumnDropZoneRules;
|
|
1179
|
+
private canDropAcrossColumnZones;
|
|
1180
|
+
private persistTableConfigAfterRuntimeMutation;
|
|
705
1181
|
private applyDefaultSortIfNone;
|
|
706
1182
|
/**
|
|
707
1183
|
* Performs a lightweight server schema verification using ETag/If-None-Match without
|
|
@@ -711,6 +1187,11 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
711
1187
|
private verifyServerSchemaVersion;
|
|
712
1188
|
private loadSchema;
|
|
713
1189
|
private convertFieldToColumn;
|
|
1190
|
+
/**
|
|
1191
|
+
* Apply automatic renderer hints based on schema field metadata.
|
|
1192
|
+
* Runs only on initial bootstrap (when columns are derived from schema).
|
|
1193
|
+
*/
|
|
1194
|
+
private applyAutoRenderer;
|
|
714
1195
|
/**
|
|
715
1196
|
* Check if a value is a valid ColumnDataType
|
|
716
1197
|
*/
|
|
@@ -734,9 +1215,45 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
734
1215
|
getCellValue(rowData: any, column: ColumnDefinition): any;
|
|
735
1216
|
getCellClasses(rowData: any, column: ColumnDefinition): string[] | undefined;
|
|
736
1217
|
getCellNgStyle(rowData: any, column: ColumnDefinition): Record<string, string> | undefined;
|
|
1218
|
+
private resetComputedContextCache;
|
|
1219
|
+
private ensureEffectiveCellRenderCache;
|
|
1220
|
+
private ensureCellAnimationPreviousValuesByRowId;
|
|
1221
|
+
private ensureCellAnimationPreviousValuesByRowRef;
|
|
1222
|
+
private ensureCellAnimationPreviousRowIdOrder;
|
|
1223
|
+
private clearEffectiveCellRendererCache;
|
|
1224
|
+
private clearCellAnimationChangeState;
|
|
1225
|
+
private collectComputedFieldNames;
|
|
1226
|
+
private buildComputedSignature;
|
|
1227
|
+
private stringifyDependencyValue;
|
|
1228
|
+
private buildComputedValueMap;
|
|
1229
|
+
private buildEvaluationContext;
|
|
1230
|
+
private isUnsafeComputedField;
|
|
737
1231
|
private evaluateStyleRule;
|
|
1232
|
+
private evaluateActionVisibilityCondition;
|
|
1233
|
+
private evaluateActionDisabledCondition;
|
|
1234
|
+
/** Evaluate row action conditions using the same DSL runtime with explicit failure policy. */
|
|
1235
|
+
private evaluateActionCondition;
|
|
1236
|
+
private resolveRowVisibleWhenFailurePolicy;
|
|
1237
|
+
private resolveRuntimeEnvironment;
|
|
1238
|
+
private isDiagnosticsRuntimeEnvironment;
|
|
1239
|
+
private logActionConditionFallback;
|
|
738
1240
|
getRowClasses(rowData: any): string[] | undefined;
|
|
739
1241
|
getRowNgStyle(rowData: any): Record<string, string> | undefined;
|
|
1242
|
+
private getRowRenderer;
|
|
1243
|
+
private isMotionReductionRequested;
|
|
1244
|
+
private isRowAnimationRuntimeEnabled;
|
|
1245
|
+
private isCellAnimationRuntimeEnabled;
|
|
1246
|
+
private resolveRuntimeConditionalAnimationConfig;
|
|
1247
|
+
private getCellAnimationValueSignature;
|
|
1248
|
+
private shouldActivateCellAnimationOnChange;
|
|
1249
|
+
private getRowAnimationConfig;
|
|
1250
|
+
private getRowAnimationClasses;
|
|
1251
|
+
private getRowAnimationNgStyle;
|
|
1252
|
+
getCellContentClasses(rowData: any, column: ColumnDefinition): string[] | undefined;
|
|
1253
|
+
getCellContentNgStyle(rowData: any, column: ColumnDefinition): Record<string, string> | undefined;
|
|
1254
|
+
getRowTooltip(rowData: any): any;
|
|
1255
|
+
getRowTooltipPosition(rowData: any): 'above' | 'below' | 'left' | 'right';
|
|
1256
|
+
getRowTooltipShowDelay(rowData: any): number;
|
|
740
1257
|
/**
|
|
741
1258
|
* Apply value mapping to transform raw values into display-friendly text
|
|
742
1259
|
*/
|
|
@@ -777,6 +1294,14 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
777
1294
|
* Obtém configurações de i18n para o filtro baseado na configuração da tabela
|
|
778
1295
|
*/
|
|
779
1296
|
getFilterI18n(): Partial<I18n> | undefined;
|
|
1297
|
+
private warnUnsupportedFeature;
|
|
1298
|
+
private isMultiSortSupported;
|
|
1299
|
+
private isColumnFiltersSupported;
|
|
1300
|
+
private isRowDraggingSupported;
|
|
1301
|
+
private isRowExpansionSupported;
|
|
1302
|
+
private enforceAppearanceSchemaGuards;
|
|
1303
|
+
private enforceUnsupportedFeatureGuards;
|
|
1304
|
+
getToolbarDslContext(): Record<string, any>;
|
|
780
1305
|
getIconName(row: any, column: ColumnDefinition): string | null;
|
|
781
1306
|
getIconColor(_row: any, column: ColumnDefinition): string | null;
|
|
782
1307
|
getIconStyle(_row: any, column: ColumnDefinition): Record<string, string> | null;
|
|
@@ -787,38 +1312,170 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
787
1312
|
* Falls back safely on error.
|
|
788
1313
|
*/
|
|
789
1314
|
private evaluateValueExpr;
|
|
1315
|
+
private evaluateComputedValue;
|
|
1316
|
+
private evaluateLegacyExpression;
|
|
1317
|
+
private tryEvaluateLegacyConcat;
|
|
1318
|
+
private tryEvaluateLegacyTernary;
|
|
1319
|
+
private tryEvaluateLegacyCoalesce;
|
|
1320
|
+
private normalizeLegacyExpression;
|
|
1321
|
+
private extractLegacyArrayItems;
|
|
1322
|
+
private splitTopLevelTernary;
|
|
1323
|
+
private findTopLevelOperator;
|
|
1324
|
+
private splitTopLevel;
|
|
1325
|
+
private findMatchingBracket;
|
|
1326
|
+
private normalizeExpression;
|
|
1327
|
+
private normalizeOptionalChaining;
|
|
1328
|
+
private stripRowPrefixes;
|
|
1329
|
+
private stripOuterParens;
|
|
1330
|
+
private findMatchingParen;
|
|
1331
|
+
private extractExpression;
|
|
790
1332
|
private coerceExpected;
|
|
791
1333
|
getImageSrc(row: any, column: ColumnDefinition): string | null;
|
|
792
1334
|
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;
|
|
1335
|
+
getImageWidth(row: any, column: ColumnDefinition): number | null;
|
|
1336
|
+
getImageHeight(row: any, column: ColumnDefinition): number | null;
|
|
1337
|
+
getImageShape(row: any, column: ColumnDefinition): 'square' | 'rounded' | 'circle' | undefined;
|
|
1338
|
+
getImageFit(row: any, column: ColumnDefinition): 'cover' | 'contain' | undefined;
|
|
797
1339
|
getImageLazy(_row: any, column: ColumnDefinition): boolean;
|
|
798
1340
|
getBadgeText(row: any, column: ColumnDefinition): string | null;
|
|
799
1341
|
getBadgeIcon(row: any, column: ColumnDefinition): string | null;
|
|
800
1342
|
getBadgeClasses(row: any, column: ColumnDefinition): string[];
|
|
801
|
-
getEffectiveRendererType(row: any, column: ColumnDefinition): 'icon' | 'image' | 'badge' | null;
|
|
1343
|
+
getEffectiveRendererType(row: any, column: ColumnDefinition): 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'html' | 'compose' | 'rating' | null;
|
|
1344
|
+
getComposeItems(row: any, column: ColumnDefinition): any[];
|
|
1345
|
+
getComposeClasses(row: any, column: ColumnDefinition): string[];
|
|
1346
|
+
getComposeGapStyle(row: any, column: ColumnDefinition): any;
|
|
1347
|
+
private getComposeItemField;
|
|
1348
|
+
getComposeItemValue(row: any, base: ColumnDefinition, item: any): any;
|
|
1349
|
+
asItemColumn(base: ColumnDefinition, item: any): any;
|
|
1350
|
+
getItemEffectiveType(row: any, column: ColumnDefinition, item: any): any;
|
|
1351
|
+
private mergeRenderer;
|
|
1352
|
+
private hasRenderableColumnOverride;
|
|
1353
|
+
private resolveColumnRuleAnimationCandidate;
|
|
1354
|
+
private buildEffectiveCellRenderCacheKey;
|
|
1355
|
+
private getEffectiveCellRenderResult;
|
|
1356
|
+
private getEffectiveRenderer;
|
|
1357
|
+
getLinkHref(row: any, column: ColumnDefinition): string | null;
|
|
1358
|
+
getLinkText(row: any, column: ColumnDefinition): string;
|
|
1359
|
+
getLinkTarget(row: any, column: ColumnDefinition): string | null;
|
|
1360
|
+
getLinkRel(row: any, column: ColumnDefinition): string | null;
|
|
1361
|
+
getButtonLabel(row: any, column: ColumnDefinition): string;
|
|
1362
|
+
getButtonIcon(row: any, column: ColumnDefinition): string | null;
|
|
1363
|
+
getButtonVariant(row: any, column: ColumnDefinition): 'filled' | 'outlined' | 'text';
|
|
1364
|
+
getButtonColor(row: any, column: ColumnDefinition): string | null;
|
|
1365
|
+
isButtonDisabled(row: any, column: ColumnDefinition): boolean;
|
|
1366
|
+
getButtonAriaLabel(row: any, column: ColumnDefinition): string | null;
|
|
1367
|
+
private evaluateActionPayloadExpr;
|
|
1368
|
+
private buildRendererActionRuntimeOptions;
|
|
1369
|
+
onButtonClick(row: any, column: ColumnDefinition, event: Event): void;
|
|
1370
|
+
getChipText(row: any, column: ColumnDefinition): string | null;
|
|
1371
|
+
getChipIcon(row: any, column: ColumnDefinition): string | null;
|
|
1372
|
+
getChipClasses(row: any, column: ColumnDefinition): string[];
|
|
1373
|
+
getProgressValue(row: any, column: ColumnDefinition): number;
|
|
1374
|
+
getProgressColor(row: any, column: ColumnDefinition): string | null;
|
|
1375
|
+
getProgressWidthPercentStyle(row: any, column: ColumnDefinition): number | null;
|
|
1376
|
+
getProgressBackgroundStyle(row: any, column: ColumnDefinition): string | null;
|
|
1377
|
+
getProgressShowLabel(row: any, column: ColumnDefinition): boolean;
|
|
1378
|
+
getRatingValue(row: any, column: ColumnDefinition): number;
|
|
1379
|
+
getRatingMax(_row: any, column: ColumnDefinition): number;
|
|
1380
|
+
getRatingColor(_row: any, column: ColumnDefinition): string | undefined;
|
|
1381
|
+
getRatingOutlineColor(_row: any, column: ColumnDefinition): string | undefined;
|
|
1382
|
+
getRatingSize(_row: any, column: ColumnDefinition): 'small' | 'medium' | 'large';
|
|
1383
|
+
getRatingAriaLabel(row: any, column: ColumnDefinition): string | undefined;
|
|
1384
|
+
getRatingReadonly(_row: any, column: ColumnDefinition): boolean;
|
|
1385
|
+
getAvatarSrc(row: any, column: ColumnDefinition): string | null;
|
|
1386
|
+
getAvatarAlt(row: any, column: ColumnDefinition): string | null;
|
|
1387
|
+
getAvatarInitials(row: any, column: ColumnDefinition): string;
|
|
1388
|
+
getAvatarShape(row: any, column: ColumnDefinition): 'square' | 'rounded' | 'circle' | undefined;
|
|
1389
|
+
getAvatarStyle(row: any, column: ColumnDefinition): Record<string, string> | null;
|
|
1390
|
+
getToggleState(row: any, column: ColumnDefinition): boolean;
|
|
1391
|
+
isToggleDisabled(row: any, column: ColumnDefinition): boolean;
|
|
1392
|
+
getToggleAriaLabel(row: any, column: ColumnDefinition): string | null;
|
|
1393
|
+
onToggleChange(row: any, column: ColumnDefinition, event: any): void;
|
|
1394
|
+
getMenuAriaLabel(row: any, column: ColumnDefinition): string | null;
|
|
1395
|
+
private evaluateArrayExpr;
|
|
1396
|
+
getMenuItems(row: any, column: ColumnDefinition): Array<{
|
|
1397
|
+
label: string;
|
|
1398
|
+
icon?: string;
|
|
1399
|
+
id: string;
|
|
1400
|
+
__visible: boolean;
|
|
1401
|
+
payload?: any;
|
|
1402
|
+
actionConfig?: any;
|
|
1403
|
+
}>;
|
|
1404
|
+
onMenuItemClick(actionOrItem: string | {
|
|
1405
|
+
id?: string;
|
|
1406
|
+
payload?: any;
|
|
1407
|
+
actionConfig?: any;
|
|
1408
|
+
}, row: any, event: Event): void;
|
|
1409
|
+
getSafeHtml(row: any, column: ColumnDefinition): any;
|
|
1410
|
+
private escapeHtml;
|
|
1411
|
+
private sanitizeStrictHtml;
|
|
1412
|
+
private isSafeStrictInlineStyle;
|
|
1413
|
+
private isSafeStrictHtmlUrl;
|
|
1414
|
+
private escapeHtmlAttribute;
|
|
1415
|
+
private isStrictCspStyleModeEnabled;
|
|
1416
|
+
private warnStrictCspStyleModeOnce;
|
|
1417
|
+
private clearAppearanceCssVariables;
|
|
802
1418
|
private applyAppearanceVariables;
|
|
1419
|
+
private getPrefsKey;
|
|
1420
|
+
private getOutdatedIgnoreKey;
|
|
1421
|
+
private getOutdatedSnoozeKey;
|
|
1422
|
+
private getOutdatedNotifiedKey;
|
|
1423
|
+
private isOutdatedIgnored;
|
|
1424
|
+
private getOutdatedSnoozeUntil;
|
|
1425
|
+
private setOutdatedSnooze;
|
|
1426
|
+
private setOutdatedIgnore;
|
|
1427
|
+
private setOutdatedNotified;
|
|
1428
|
+
private wasOutdatedNotified;
|
|
1429
|
+
private resolveSchemaPrefs;
|
|
1430
|
+
private maybeShowOutdatedSnack;
|
|
1431
|
+
shouldShowOutdatedInline(): boolean;
|
|
1432
|
+
onReconcileRequested(): void;
|
|
1433
|
+
onSnoozeOutdated(): void;
|
|
1434
|
+
onIgnoreOutdated(): void;
|
|
1435
|
+
private updateTableMetaFromServerInfo;
|
|
1436
|
+
private emitMetadataChange;
|
|
1437
|
+
private emitSchemaStatus;
|
|
1438
|
+
getRowId(row: any): any;
|
|
1439
|
+
getIdField(): string;
|
|
1440
|
+
getActionId(action: any): string;
|
|
1441
|
+
private setupResizeObserver;
|
|
1442
|
+
private setupViewportChangeListeners;
|
|
1443
|
+
private getVirtualizationSources;
|
|
1444
|
+
isVirtualized(): boolean;
|
|
1445
|
+
getVirtItemHeight(): number;
|
|
1446
|
+
getVirtBufferSize(): number;
|
|
1447
|
+
getVirtMinHeightStyle(): string;
|
|
1448
|
+
getVirtMinHeightHostStyle(): string | null;
|
|
1449
|
+
getVirtualTableWidthStyle(): string | null;
|
|
1450
|
+
canSelectAll(): boolean;
|
|
1451
|
+
masterToggle(): void;
|
|
1452
|
+
isAllSelected(): boolean;
|
|
1453
|
+
toggleRow(row: any): void;
|
|
1454
|
+
private getRowActionsConfig;
|
|
1455
|
+
getActionsHeaderAlign(): string;
|
|
1456
|
+
getActionsHeaderTooltip(): string | undefined;
|
|
1457
|
+
getActionsHeaderIcon(): string | undefined;
|
|
1458
|
+
getActionsHeaderLabel(): string | undefined;
|
|
1459
|
+
private getRowActionsDisplay;
|
|
1460
|
+
private getRowActionsInlineLimit;
|
|
1461
|
+
private getRowActionsBehaviorInlineLimit;
|
|
1462
|
+
private getBreakpointInlineLimit;
|
|
1463
|
+
private estimateInlineActionsLimit;
|
|
1464
|
+
private parsePixelWidth;
|
|
1465
|
+
private getViewportWidth;
|
|
1466
|
+
private splitVisibleRowActions;
|
|
1467
|
+
getInlineRowActions(row: any): any[];
|
|
1468
|
+
getOverflowRowActions(row: any): any[];
|
|
1469
|
+
hasOverflowRowActions(row: any): boolean;
|
|
1470
|
+
private getVisibleRowActions;
|
|
1471
|
+
private isActionVisible;
|
|
1472
|
+
trackAction(index: number, item: any): any;
|
|
1473
|
+
isActionDisabled(action: any, row: any): boolean;
|
|
1474
|
+
getRowMenuButtonColor(): any;
|
|
1475
|
+
getRowMenuIcon(): string;
|
|
803
1476
|
ngOnDestroy(): void;
|
|
804
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable,
|
|
805
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "
|
|
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>;
|
|
1477
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
1478
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "data": { "alias": "data"; "required": false; }; "tableId": { "alias": "tableId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "autoDelete": { "alias": "autoDelete"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "crudContext": { "alias": "crudContext"; "required": false; }; "dslFunctionRegistry": { "alias": "dslFunctionRegistry"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; "rowExpansionChange": "rowExpansionChange"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "columnReorder": "columnReorder"; "columnReorderAttempt": "columnReorderAttempt"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; "schemaStatusChange": "schemaStatusChange"; "metadataChange": "metadataChange"; "loadingStateChange": "loadingStateChange"; }, ["toolbar", "projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
|
|
822
1479
|
}
|
|
823
1480
|
|
|
824
1481
|
interface JsonValidationResult {
|
|
@@ -955,6 +1612,7 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
955
1612
|
selectedColumnIndex: number;
|
|
956
1613
|
selectedColumn: ExtendedColumnDefinition | null;
|
|
957
1614
|
isV2Config: boolean;
|
|
1615
|
+
private expressionEvaluator;
|
|
958
1616
|
availableDataSchema: FieldSchema[];
|
|
959
1617
|
currentFieldSchemas: FieldSchema[];
|
|
960
1618
|
sampleTableData: any[];
|
|
@@ -968,7 +1626,7 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
968
1626
|
private readonly destroyRef;
|
|
969
1627
|
private destroy$;
|
|
970
1628
|
onlyVisibleRendererFields: boolean;
|
|
971
|
-
uiRendererType: 'icon' | 'image' | 'badge' | null;
|
|
1629
|
+
uiRendererType: 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'rating' | 'html' | 'compose' | null;
|
|
972
1630
|
private _rendererApplyTimer;
|
|
973
1631
|
rendererFieldOptions: Array<{
|
|
974
1632
|
name: string;
|
|
@@ -977,6 +1635,24 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
977
1635
|
isVisible: boolean;
|
|
978
1636
|
}>;
|
|
979
1637
|
uiRendererConditional: boolean;
|
|
1638
|
+
condOverridesSelectedIndex: number;
|
|
1639
|
+
getConditionalOverrides(): any[];
|
|
1640
|
+
ensureConditionalOverrides(): any[];
|
|
1641
|
+
addConditionalOverride(): void;
|
|
1642
|
+
removeConditionalOverride(index: number): void;
|
|
1643
|
+
duplicateConditionalOverride(index: number): void;
|
|
1644
|
+
onConditionalOverrideReorder(event: any): void;
|
|
1645
|
+
selectConditionalOverride(index: number): void;
|
|
1646
|
+
getOverrideField(path: string): any;
|
|
1647
|
+
setOverrideField(path: string, value: any): void;
|
|
1648
|
+
onOverrideTypeChange(ov: any, val: string): void;
|
|
1649
|
+
exportOverrideJson(index: number): void;
|
|
1650
|
+
importOverrideJson(index: number): void;
|
|
1651
|
+
rendererValidationErrors: string[];
|
|
1652
|
+
rendererIsValid: boolean;
|
|
1653
|
+
rendererPreviewEnabled: boolean;
|
|
1654
|
+
private rendererAppliedSnapshot;
|
|
1655
|
+
previewRows: any[];
|
|
980
1656
|
private refreshRendererFieldOptions;
|
|
981
1657
|
getRendererFieldOptions(): Array<{
|
|
982
1658
|
name: string;
|
|
@@ -1024,7 +1700,7 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1024
1700
|
getColumnMapping(column: ColumnDefinition | null): {
|
|
1025
1701
|
[key: string | number]: string;
|
|
1026
1702
|
};
|
|
1027
|
-
getRendererType(col: ColumnDefinition | null): 'icon' | 'image' | 'badge' | null;
|
|
1703
|
+
getRendererType(col: ColumnDefinition | null): 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'rating' | 'html' | null;
|
|
1028
1704
|
onRendererTypeChange(type: 'icon' | 'image' | 'badge' | null): void;
|
|
1029
1705
|
onRendererModeClosed(): void;
|
|
1030
1706
|
onToggleRendererConditional(enabled: boolean): void;
|
|
@@ -1067,19 +1743,84 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1067
1743
|
getRendererBadgeIcon(): string;
|
|
1068
1744
|
setRendererBadgeIcon(v: string): void;
|
|
1069
1745
|
private ensureRenderer;
|
|
1746
|
+
private _ensureKind;
|
|
1747
|
+
getRendererProp(kind: string, path: string): any;
|
|
1748
|
+
setRendererProp(kind: string, path: string, value: any): void;
|
|
1749
|
+
private _deepClone;
|
|
1750
|
+
hasSelectedRenderer(): boolean;
|
|
1751
|
+
onApplyRenderer(): void;
|
|
1752
|
+
onDiscardRenderer(): void;
|
|
1753
|
+
onExportRendererJson(): Promise<void>;
|
|
1754
|
+
onImportRendererJson(): void;
|
|
1755
|
+
private sanitizeRenderer;
|
|
1756
|
+
private sanitizeComposeItem;
|
|
1757
|
+
private ensurePreviewRows;
|
|
1758
|
+
private evalValueExpr;
|
|
1759
|
+
private evalArrayExpr;
|
|
1760
|
+
private normalizeExpression;
|
|
1761
|
+
private normalizeOptionalChaining;
|
|
1762
|
+
private extractExpression;
|
|
1763
|
+
private stripRowPrefixes;
|
|
1764
|
+
private _coerceExpected;
|
|
1765
|
+
private getNested;
|
|
1766
|
+
getPreviewRendererType(row: any): 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'html' | 'compose' | null;
|
|
1767
|
+
getPreviewIconName(row: any): string | null;
|
|
1768
|
+
getPreviewIconColor(row: any): string | null;
|
|
1769
|
+
getPreviewIconStyle(row: any): Record<string, string> | null;
|
|
1770
|
+
getPreviewImageSrc(row: any): string | null;
|
|
1771
|
+
getPreviewImageAlt(row: any): string | null;
|
|
1772
|
+
getPreviewImageWidth(): number | null;
|
|
1773
|
+
getPreviewImageHeight(): number | null;
|
|
1774
|
+
getPreviewImageShape(): 'square' | 'rounded' | 'circle' | undefined;
|
|
1775
|
+
getPreviewImageFit(): 'cover' | 'contain' | undefined;
|
|
1776
|
+
getPreviewBadgeText(row: any): string | null;
|
|
1777
|
+
getPreviewBadgeIcon(_row: any): string | null;
|
|
1778
|
+
getPreviewBadgeClasses(_row: any): string[];
|
|
1779
|
+
getPreviewLinkText(row: any): string;
|
|
1780
|
+
getPreviewLinkHref(row: any): string | null;
|
|
1781
|
+
getPreviewButtonLabel(row: any): string;
|
|
1782
|
+
getPreviewButtonIcon(): string | null;
|
|
1783
|
+
getPreviewChipText(row: any): string | null;
|
|
1784
|
+
getPreviewChipClasses(): string[];
|
|
1785
|
+
getPreviewProgressValue(row: any): number;
|
|
1786
|
+
getPreviewAvatarSrc(row: any): string | null;
|
|
1787
|
+
getPreviewAvatarInitials(row: any): string;
|
|
1788
|
+
getPreviewAvatarStyle(): Record<string, string>;
|
|
1789
|
+
getPreviewAvatarShape(): 'square' | 'rounded' | 'circle' | undefined;
|
|
1790
|
+
getPreviewToggleState(row: any): boolean;
|
|
1791
|
+
getPreviewMenuCount(row: any): number;
|
|
1792
|
+
getPreviewHtml(row: any): string;
|
|
1793
|
+
trackByIdx: (_: number, item: any) => number;
|
|
1794
|
+
private validateRenderer;
|
|
1070
1795
|
private readonly _emptyMappingRef;
|
|
1796
|
+
composeSelectedIndex: number;
|
|
1797
|
+
private ensureCompose;
|
|
1798
|
+
getComposeItemsUI(): Array<{
|
|
1799
|
+
type: string;
|
|
1800
|
+
summary: string;
|
|
1801
|
+
raw: any;
|
|
1802
|
+
}>;
|
|
1803
|
+
private getComposeItemSummary;
|
|
1804
|
+
addComposeItem(kind: string): void;
|
|
1805
|
+
removeComposeItem(index: number): void;
|
|
1806
|
+
duplicateComposeItem(index: number): void;
|
|
1807
|
+
onComposeReorder(event: any): void;
|
|
1808
|
+
selectComposeItem(index: number): void;
|
|
1809
|
+
getComposeLayoutProp(key: string): any;
|
|
1810
|
+
setComposeLayoutProp(key: string, value: any): void;
|
|
1811
|
+
private getSelectedComposeItem;
|
|
1071
1812
|
getColumnKeyInputType(column: ColumnDefinition | null): 'text' | 'number' | 'boolean';
|
|
1072
1813
|
onMappingChange(mapping: {
|
|
1073
1814
|
[key: string | number]: string;
|
|
1074
1815
|
}): void;
|
|
1075
|
-
get selectedColumnDataType(): ColumnDataType;
|
|
1076
|
-
set selectedColumnDataType(value: ColumnDataType);
|
|
1077
|
-
getColumnDataType(column: ColumnDefinition | null): ColumnDataType;
|
|
1816
|
+
get selectedColumnDataType(): ColumnDataType$1;
|
|
1817
|
+
set selectedColumnDataType(value: ColumnDataType$1);
|
|
1818
|
+
getColumnDataType(column: ColumnDefinition | null): ColumnDataType$1;
|
|
1078
1819
|
/**
|
|
1079
1820
|
* Infer column data type from field name patterns (shared logic with PraxisTable)
|
|
1080
1821
|
*/
|
|
1081
1822
|
private inferFieldTypeFromFieldName;
|
|
1082
|
-
onDataTypeChange(dataType: ColumnDataType): void;
|
|
1823
|
+
onDataTypeChange(dataType: ColumnDataType$1): void;
|
|
1083
1824
|
showDataFormatter(column: ColumnDefinition | null): boolean;
|
|
1084
1825
|
getFormatterIcon(column: ColumnDefinition | null): string;
|
|
1085
1826
|
getFormatterPanelDescription(column: ColumnDefinition | null): string;
|
|
@@ -1108,21 +1849,30 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1108
1849
|
}
|
|
1109
1850
|
|
|
1110
1851
|
interface BehaviorConfigChange {
|
|
1111
|
-
type: 'pagination' | 'sorting' | 'filtering' | 'selection' | 'interaction' | 'general';
|
|
1852
|
+
type: 'pagination' | 'sorting' | 'filtering' | 'selection' | 'dragging' | 'interaction' | 'expansion' | 'general';
|
|
1112
1853
|
property: string;
|
|
1113
1854
|
value: any;
|
|
1114
1855
|
fullConfig: TableConfig;
|
|
1115
1856
|
}
|
|
1116
|
-
declare class BehaviorConfigEditorComponent implements OnInit, OnDestroy {
|
|
1857
|
+
declare class BehaviorConfigEditorComponent implements OnInit, OnDestroy, OnChanges {
|
|
1117
1858
|
private fb;
|
|
1859
|
+
readonly schemaOnlyLimitationsDocPath = "praxis-table.json-api.md#known-limitations-and-mismatches";
|
|
1860
|
+
readonly multiSortSchemaOnlyTooltip = "behavior.sorting.multiSort \u00E9 schema-only no runtime atual. Consulte a documenta\u00E7\u00E3o de limita\u00E7\u00F5es.";
|
|
1861
|
+
readonly columnFiltersSchemaOnlyTooltip = "behavior.filtering.columnFilters.enabled \u00E9 schema-only no runtime atual. Consulte a documenta\u00E7\u00E3o de limita\u00E7\u00F5es.";
|
|
1862
|
+
readonly draggingRowsSchemaOnlyTooltip = "behavior.dragging.rows \u00E9 schema-only no runtime atual. Consulte a documenta\u00E7\u00E3o de limita\u00E7\u00F5es.";
|
|
1863
|
+
readonly expansionSchemaOnlyTooltip = "behavior.expansion.* possui runtime P0A ativo para detail row schema-driven (sem virtualiza\u00E7\u00E3o).";
|
|
1118
1864
|
config: TableConfig;
|
|
1865
|
+
resourcePath?: string;
|
|
1866
|
+
forceClientStrategies: boolean;
|
|
1119
1867
|
configChange: EventEmitter<_praxisui_core.TableConfigModern>;
|
|
1120
1868
|
behaviorChange: EventEmitter<BehaviorConfigChange>;
|
|
1121
1869
|
behaviorForm: FormGroup;
|
|
1122
1870
|
isV2: boolean;
|
|
1123
1871
|
private destroy$;
|
|
1872
|
+
private previousBehaviorFormValue;
|
|
1124
1873
|
constructor(fb: FormBuilder);
|
|
1125
1874
|
ngOnInit(): void;
|
|
1875
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1126
1876
|
ngOnDestroy(): void;
|
|
1127
1877
|
private initializeForm;
|
|
1128
1878
|
private setupFormListeners;
|
|
@@ -1132,10 +1882,34 @@ declare class BehaviorConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1132
1882
|
*/
|
|
1133
1883
|
applyFormChanges(): void;
|
|
1134
1884
|
private updateConfig;
|
|
1885
|
+
private resolveStrategy;
|
|
1886
|
+
private enforceStrategyConstraints;
|
|
1887
|
+
private coerceSchemaOnlyControls;
|
|
1888
|
+
private coerceExpansionControls;
|
|
1889
|
+
private buildFormSnapshotFromConfig;
|
|
1890
|
+
private areSnapshotsEqual;
|
|
1891
|
+
private getChangedProperties;
|
|
1892
|
+
private areFieldValuesEqual;
|
|
1893
|
+
private emitBehaviorChanges;
|
|
1894
|
+
private resolveBehaviorChangeType;
|
|
1135
1895
|
private arrayToString;
|
|
1136
1896
|
private stringToArray;
|
|
1897
|
+
private stringToStringArray;
|
|
1898
|
+
private resolvePositiveNumber;
|
|
1899
|
+
private resolveExpansionMaxExpandedRows;
|
|
1900
|
+
private asRecord;
|
|
1901
|
+
private cloneRecord;
|
|
1902
|
+
private cloneTableConfig;
|
|
1903
|
+
private resolveAllowedNodes;
|
|
1904
|
+
private objectToPrettyJson;
|
|
1905
|
+
private parseJsonRecordOrFallback;
|
|
1906
|
+
private setInlineSchemaParseError;
|
|
1907
|
+
private setResourcePathParamsMapParseError;
|
|
1908
|
+
private isInlineSchemaValidationErrorActive;
|
|
1909
|
+
private isResourcePathParamsMapValidationErrorActive;
|
|
1910
|
+
private setControlErrorFlag;
|
|
1137
1911
|
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>;
|
|
1912
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BehaviorConfigEditorComponent, "behavior-config-editor", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "forceClientStrategies": { "alias": "forceClientStrategies"; "required": false; }; }, { "configChange": "configChange"; "behaviorChange": "behaviorChange"; }, never, never, true, never>;
|
|
1139
1913
|
}
|
|
1140
1914
|
|
|
1141
1915
|
interface ToolbarAction {
|
|
@@ -1152,6 +1926,7 @@ interface ToolbarAction {
|
|
|
1152
1926
|
disabled?: boolean;
|
|
1153
1927
|
visible?: boolean;
|
|
1154
1928
|
shortcut?: string;
|
|
1929
|
+
shortcutScope?: 'toolbar' | 'global';
|
|
1155
1930
|
tooltip?: string;
|
|
1156
1931
|
visibleWhen?: string;
|
|
1157
1932
|
children?: ToolbarAction[];
|
|
@@ -1186,6 +1961,12 @@ interface ToolbarActionsChange {
|
|
|
1186
1961
|
value: any;
|
|
1187
1962
|
fullConfig: TableConfig;
|
|
1188
1963
|
}
|
|
1964
|
+
type ToolbarShortcutScope = 'toolbar' | 'global';
|
|
1965
|
+
interface InternalActionSpec {
|
|
1966
|
+
id: string;
|
|
1967
|
+
label: string;
|
|
1968
|
+
description: string;
|
|
1969
|
+
}
|
|
1189
1970
|
declare class ToolbarActionsEditorComponent implements OnInit, OnDestroy, OnChanges {
|
|
1190
1971
|
private fb;
|
|
1191
1972
|
private iconPicker;
|
|
@@ -1200,6 +1981,13 @@ declare class ToolbarActionsEditorComponent implements OnInit, OnDestroy, OnChan
|
|
|
1200
1981
|
editingToolbarActionIndex: number | null;
|
|
1201
1982
|
editingRowActionIndex: number | null;
|
|
1202
1983
|
editingBulkActionIndex: number | null;
|
|
1984
|
+
readonly globalActionCatalog: GlobalActionSpec[];
|
|
1985
|
+
readonly internalActionCatalog: InternalActionSpec[];
|
|
1986
|
+
readonly customActionValue = "__custom__";
|
|
1987
|
+
readonly validShortcutScopes: ToolbarShortcutScope[];
|
|
1988
|
+
private readonly actionFieldDrafts;
|
|
1989
|
+
private readonly actionFieldErrors;
|
|
1990
|
+
private readonly warnedInvalidShortcutScopes;
|
|
1203
1991
|
private destroy$;
|
|
1204
1992
|
constructor(fb: FormBuilder, iconPicker: IconPickerService);
|
|
1205
1993
|
ngOnInit(): void;
|
|
@@ -1208,12 +1996,60 @@ declare class ToolbarActionsEditorComponent implements OnInit, OnDestroy, OnChan
|
|
|
1208
1996
|
private initializeForm;
|
|
1209
1997
|
private setupFormListeners;
|
|
1210
1998
|
private loadActionsFromConfig;
|
|
1999
|
+
private syncActionsFromConfig;
|
|
2000
|
+
private areActionsEqual;
|
|
1211
2001
|
private isAddLike;
|
|
1212
2002
|
private findAddToolbarIndex;
|
|
1213
2003
|
private ensureAddToolbarAction;
|
|
1214
2004
|
private removeAddToolbarAction;
|
|
1215
2005
|
private syncAddFormFromActions;
|
|
1216
2006
|
private updateConfig;
|
|
2007
|
+
getActionSelectValue(value?: string): string;
|
|
2008
|
+
getActionParam(value?: string): string;
|
|
2009
|
+
getActionCustomValue(value?: string): string;
|
|
2010
|
+
isInternalAction(value?: string): boolean;
|
|
2011
|
+
getActionSpecById(id: string): GlobalActionSpec | undefined;
|
|
2012
|
+
onActionSelectChange(action: {
|
|
2013
|
+
action?: string;
|
|
2014
|
+
}, value: string, kind: 'toolbar' | 'row' | 'bulk'): void;
|
|
2015
|
+
onActionParamChange(action: {
|
|
2016
|
+
action?: string;
|
|
2017
|
+
}, value: string, kind: 'toolbar' | 'row' | 'bulk'): void;
|
|
2018
|
+
onActionCustomChange(action: {
|
|
2019
|
+
action?: string;
|
|
2020
|
+
}, value: string, kind: 'toolbar' | 'row' | 'bulk'): void;
|
|
2021
|
+
private touchActionList;
|
|
2022
|
+
private parseActionValue;
|
|
2023
|
+
isGlobalActionId(id?: string): boolean;
|
|
2024
|
+
getGlobalActionSchema(action: {
|
|
2025
|
+
action?: string;
|
|
2026
|
+
}): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
2027
|
+
shouldShowGlobalActionField(action: {
|
|
2028
|
+
action?: string;
|
|
2029
|
+
}, field: GlobalActionField): boolean;
|
|
2030
|
+
hasActionFieldError(action: {
|
|
2031
|
+
action?: string;
|
|
2032
|
+
}, key: string): boolean;
|
|
2033
|
+
getActionFieldError(action: {
|
|
2034
|
+
action?: string;
|
|
2035
|
+
}, key: string): string;
|
|
2036
|
+
getGlobalActionFieldValue(action: {
|
|
2037
|
+
action?: string;
|
|
2038
|
+
}, field: GlobalActionField): any;
|
|
2039
|
+
onGlobalActionFieldChange(action: {
|
|
2040
|
+
action?: string;
|
|
2041
|
+
}, field: GlobalActionField, value: any, kind: 'toolbar' | 'row' | 'bulk'): void;
|
|
2042
|
+
private getActionParamInfo;
|
|
2043
|
+
private parseMethodAndUrl;
|
|
2044
|
+
private stringifyJson;
|
|
2045
|
+
private setActionFieldError;
|
|
2046
|
+
private clearActionFieldError;
|
|
2047
|
+
private collectGlobalActionFieldValues;
|
|
2048
|
+
private serializeGlobalActionParam;
|
|
2049
|
+
private buildPrimaryParam;
|
|
2050
|
+
private buildGlobalActionPayload;
|
|
2051
|
+
getToolbarActionShortcutScope(action: ToolbarAction): ToolbarShortcutScope;
|
|
2052
|
+
onToolbarActionShortcutScopeChange(action: ToolbarAction, value: ToolbarShortcutScope | string): void;
|
|
1217
2053
|
addToolbarAction(): void;
|
|
1218
2054
|
editToolbarAction(index: number): void;
|
|
1219
2055
|
removeToolbarAction(index: number): void;
|
|
@@ -1234,6 +2070,11 @@ declare class ToolbarActionsEditorComponent implements OnInit, OnDestroy, OnChan
|
|
|
1234
2070
|
private mergeRowActions;
|
|
1235
2071
|
private mergeToolbarActions;
|
|
1236
2072
|
private mergeBulkActions;
|
|
2073
|
+
private sanitizeToolbarActions;
|
|
2074
|
+
private sanitizeShortcutScope;
|
|
2075
|
+
private warnInvalidShortcutScope;
|
|
2076
|
+
private getActionDraftKey;
|
|
2077
|
+
private getActionDedupeKey;
|
|
1237
2078
|
pickAddButtonIcon(): Promise<void>;
|
|
1238
2079
|
pickActionIcon(index: number): Promise<void>;
|
|
1239
2080
|
pickRowActionIcon(index: number): Promise<void>;
|
|
@@ -1268,11 +2109,247 @@ declare class MessagesLocalizationEditorComponent implements OnInit, OnDestroy {
|
|
|
1268
2109
|
static ɵcmp: i0.ɵɵComponentDeclaration<MessagesLocalizationEditorComponent, "messages-localization-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "messagesLocalizationChange": "messagesLocalizationChange"; }, never, never, true, never>;
|
|
1269
2110
|
}
|
|
1270
2111
|
|
|
2112
|
+
declare const ALWAYS_VISIBLE_LAYOUT_LANES: readonly ["actions", "inline", "grid"];
|
|
2113
|
+
type AlwaysVisibleLayoutLane = (typeof ALWAYS_VISIBLE_LAYOUT_LANES)[number];
|
|
2114
|
+
type AlwaysVisibleLayoutItem = {
|
|
2115
|
+
name: string;
|
|
2116
|
+
label: string;
|
|
2117
|
+
lane: AlwaysVisibleLayoutLane;
|
|
2118
|
+
controlType: string;
|
|
2119
|
+
controlTypeLabel: string;
|
|
2120
|
+
hasOverride: boolean;
|
|
2121
|
+
widthHint: string;
|
|
2122
|
+
};
|
|
2123
|
+
type AlwaysVisibleLayoutViewport = 'desktop' | 'tablet' | 'mobile';
|
|
2124
|
+
declare const ALWAYS_VISIBLE_SECTION_IDS: readonly ["always-visible-order", "always-visible-metadata", "always-visible-json"];
|
|
2125
|
+
type AlwaysVisibleSectionId = (typeof ALWAYS_VISIBLE_SECTION_IDS)[number];
|
|
2126
|
+
declare class FilterSettingsComponent implements OnChanges, AfterViewInit, OnDestroy {
|
|
2127
|
+
private fb;
|
|
2128
|
+
private readonly hostRef;
|
|
2129
|
+
private readonly cdr;
|
|
2130
|
+
metadata: FieldMetadata[];
|
|
2131
|
+
metadataSource: 'filter-dto' | 'columns';
|
|
2132
|
+
metadataLoading: boolean;
|
|
2133
|
+
metadataErrorMsg: string;
|
|
2134
|
+
settings: FilterConfig | undefined;
|
|
2135
|
+
configKey?: string;
|
|
2136
|
+
settingsChange: EventEmitter<FilterConfig>;
|
|
2137
|
+
form: FormGroup<{
|
|
2138
|
+
alwaysVisibleFields: FormControl<string[]>;
|
|
2139
|
+
showAdvanced: FormControl<boolean>;
|
|
2140
|
+
mode: FormControl<'filter'>;
|
|
2141
|
+
changeDebounceMs: FormControl<number>;
|
|
2142
|
+
allowSaveTags: FormControl<boolean>;
|
|
2143
|
+
tagColor: FormControl<'primary' | 'accent' | 'warn' | 'basic'>;
|
|
2144
|
+
tagVariant: FormControl<'filled' | 'outlined'>;
|
|
2145
|
+
tagButtonColor: FormControl<'primary' | 'accent' | 'warn' | 'basic'>;
|
|
2146
|
+
actionsButtonColor: FormControl<'primary' | 'accent' | 'warn' | 'basic'>;
|
|
2147
|
+
actionsVariant: FormControl<'standard' | 'outlined'>;
|
|
2148
|
+
useInlineSearchableSelectVariant: FormControl<boolean>;
|
|
2149
|
+
useInlineRangeVariant: FormControl<boolean>;
|
|
2150
|
+
useInlineDateVariant: FormControl<boolean>;
|
|
2151
|
+
useInlineDateRangeVariant: FormControl<boolean>;
|
|
2152
|
+
useInlineTimeVariant: FormControl<boolean>;
|
|
2153
|
+
useInlineTimeRangeVariant: FormControl<boolean>;
|
|
2154
|
+
useInlineTreeSelectVariant: FormControl<boolean>;
|
|
2155
|
+
placeBooleansInActions: FormControl<boolean>;
|
|
2156
|
+
showToggleLabels: FormControl<boolean>;
|
|
2157
|
+
alwaysMinWidth: FormControl<number>;
|
|
2158
|
+
alwaysColsMd: FormControl<number>;
|
|
2159
|
+
alwaysColsLg: FormControl<number>;
|
|
2160
|
+
confirmTagDelete: FormControl<boolean>;
|
|
2161
|
+
overlayVariant: FormControl<'card' | 'frosted'>;
|
|
2162
|
+
overlayBackdrop: FormControl<boolean>;
|
|
2163
|
+
advancedOpenMode: FormControl<'modal' | 'drawer'>;
|
|
2164
|
+
advancedClearButtonsEnabled: FormControl<boolean>;
|
|
2165
|
+
logLevel: FormControl<'none' | 'error' | 'warn' | 'info' | 'debug'>;
|
|
2166
|
+
enablePerformanceMetrics: FormControl<boolean>;
|
|
2167
|
+
}>;
|
|
2168
|
+
/**
|
|
2169
|
+
* Emits true when form has changes and is valid, enabling the save button
|
|
2170
|
+
*/
|
|
2171
|
+
canSave$: Observable<boolean>;
|
|
2172
|
+
isDirty$: Observable<boolean>;
|
|
2173
|
+
isValid$: Observable<boolean>;
|
|
2174
|
+
isBusy$: Observable<boolean>;
|
|
2175
|
+
private initialSettings;
|
|
2176
|
+
private extraSettings;
|
|
2177
|
+
private suppressSettingsEmit;
|
|
2178
|
+
private readonly droppedLegacySettingKeys;
|
|
2179
|
+
private readonly managedSettingKeys;
|
|
2180
|
+
effectiveJson: string;
|
|
2181
|
+
settingsJsonText: string;
|
|
2182
|
+
jsonErrorMsg: string;
|
|
2183
|
+
alwaysVisibleOverridesJsonText: string;
|
|
2184
|
+
alwaysVisibleOverridesErrorMsg: string;
|
|
2185
|
+
alwaysVisibleFieldSearchText: string;
|
|
2186
|
+
previewDarkMode: boolean;
|
|
2187
|
+
private readonly tagsTabIndex;
|
|
2188
|
+
readonly alwaysVisibleLayoutLanes: readonly ["actions", "inline", "grid"];
|
|
2189
|
+
readonly alwaysVisibleViewports: AlwaysVisibleLayoutViewport[];
|
|
2190
|
+
orderPreviewViewport: AlwaysVisibleLayoutViewport;
|
|
2191
|
+
readonly alwaysVisibleSectionIds: readonly ["always-visible-order", "always-visible-metadata", "always-visible-json"];
|
|
2192
|
+
activeAlwaysVisibleSectionId: AlwaysVisibleSectionId;
|
|
2193
|
+
private scrollTrackingTarget;
|
|
2194
|
+
private cleanupScrollTracking;
|
|
2195
|
+
private scrollTrackingRafId;
|
|
2196
|
+
readonly layoutPreviewFields: string[];
|
|
2197
|
+
private readonly storage;
|
|
2198
|
+
private readonly settingsPanel;
|
|
2199
|
+
private readonly snackBar;
|
|
2200
|
+
private readonly destroyRef;
|
|
2201
|
+
private readonly injectedData;
|
|
2202
|
+
/** Clears persisted preferences for this filter, falling back to globals. */
|
|
2203
|
+
resetPreferences(): void;
|
|
2204
|
+
constructor(fb: FormBuilder);
|
|
2205
|
+
tags: FilterTag[];
|
|
2206
|
+
exportJson: string;
|
|
2207
|
+
newTagLabel: string;
|
|
2208
|
+
newTagPatchText: string;
|
|
2209
|
+
private tagsLoaded;
|
|
2210
|
+
private tagsKey;
|
|
2211
|
+
private schemaMetaScopeKey;
|
|
2212
|
+
private schemaMetaIndexKey;
|
|
2213
|
+
private schemaMetaKeyForSchemaId;
|
|
2214
|
+
private filterSchemaIgnoreKey;
|
|
2215
|
+
private filterSchemaSnoozeKey;
|
|
2216
|
+
private filterSchemaNotifiedKey;
|
|
2217
|
+
private clearPersistedSchemaStateByConfigKey;
|
|
2218
|
+
loadTags(): Promise<void>;
|
|
2219
|
+
saveTags(): void;
|
|
2220
|
+
ngAfterViewInit(): void;
|
|
2221
|
+
ngOnDestroy(): void;
|
|
2222
|
+
onTabChange(_event: MatTabChangeEvent): void;
|
|
2223
|
+
private ensureTagsLoaded;
|
|
2224
|
+
clearTags(): void;
|
|
2225
|
+
removeTag(index: number): void;
|
|
2226
|
+
renameTag(index: number, value: string): void;
|
|
2227
|
+
importTags(): void;
|
|
2228
|
+
addTag(): void;
|
|
2229
|
+
addTagFromCurrent(): void;
|
|
2230
|
+
presets: {
|
|
2231
|
+
key: string;
|
|
2232
|
+
label: string;
|
|
2233
|
+
description: string;
|
|
2234
|
+
previewClass: string;
|
|
2235
|
+
values: Partial<FilterConfig>;
|
|
2236
|
+
}[];
|
|
2237
|
+
getContrastWarning(): string | null;
|
|
2238
|
+
applyPreset(key: string): void;
|
|
2239
|
+
hasBooleanFieldMetadata(): boolean;
|
|
2240
|
+
getFieldLabel(name: string): string;
|
|
2241
|
+
onAlwaysVisibleFieldSearchChange(value: string): void;
|
|
2242
|
+
clearAlwaysVisibleFieldSearch(): void;
|
|
2243
|
+
filteredAlwaysVisibleMetadata(): FieldMetadata[];
|
|
2244
|
+
hasAlwaysVisibleMetadataResults(): boolean;
|
|
2245
|
+
trackFieldMetadataByName(_: number, meta: FieldMetadata): string;
|
|
2246
|
+
alwaysVisibleSelectionCount(): number;
|
|
2247
|
+
activeAlwaysVisibleOverrideCount(): number;
|
|
2248
|
+
alwaysVisibleLayoutItems(): AlwaysVisibleLayoutItem[];
|
|
2249
|
+
alwaysVisibleLaneItems(lane: AlwaysVisibleLayoutLane): AlwaysVisibleLayoutItem[];
|
|
2250
|
+
alwaysVisibleLaneLabel(lane: AlwaysVisibleLayoutLane): string;
|
|
2251
|
+
alwaysVisibleLaneDropListId(lane: AlwaysVisibleLayoutLane): string;
|
|
2252
|
+
alwaysVisibleLaneHint(lane: AlwaysVisibleLayoutLane): string;
|
|
2253
|
+
alwaysVisibleLaneEmptyHint(lane: AlwaysVisibleLayoutLane): string;
|
|
2254
|
+
alwaysVisibleViewportLabel(viewport: AlwaysVisibleLayoutViewport): string;
|
|
2255
|
+
alwaysVisibleViewportHint(viewport: AlwaysVisibleLayoutViewport): string;
|
|
2256
|
+
onAlwaysVisibleViewportChange(value: unknown): void;
|
|
2257
|
+
alwaysVisibleViewportWidth(): number;
|
|
2258
|
+
trackAlwaysVisibleLayoutItemByName(_: number, item: AlwaysVisibleLayoutItem): string;
|
|
2259
|
+
alwaysVisibleLayoutItemAriaLabel(item: AlwaysVisibleLayoutItem, lane: AlwaysVisibleLayoutLane, index: number, total: number): string;
|
|
2260
|
+
dropAlwaysVisibleLane(lane: AlwaysVisibleLayoutLane, event: CdkDragDrop<AlwaysVisibleLayoutItem[]>): void;
|
|
2261
|
+
allowAlwaysVisibleLaneEnter: (drag: CdkDrag<AlwaysVisibleLayoutItem>, drop: CdkDropList<AlwaysVisibleLayoutItem[]>) => boolean;
|
|
2262
|
+
canMoveAlwaysVisibleLane(lane: AlwaysVisibleLayoutLane, fieldName: string, delta: -1 | 1): boolean;
|
|
2263
|
+
moveAlwaysVisibleLane(lane: AlwaysVisibleLayoutLane, fieldName: string, delta: -1 | 1): void;
|
|
2264
|
+
onAlwaysVisibleLaneItemKeydown(event: KeyboardEvent, lane: AlwaysVisibleLayoutLane, fieldName: string): void;
|
|
2265
|
+
private resolveToolbarControlType;
|
|
2266
|
+
private resolveAlwaysVisibleLayoutLane;
|
|
2267
|
+
private getToolbarControlTypeLabel;
|
|
2268
|
+
private resolveAlwaysVisibleWidthHint;
|
|
2269
|
+
private getAlwaysVisibleFieldNamesByLane;
|
|
2270
|
+
private reorderAlwaysVisibleLane;
|
|
2271
|
+
private areFieldNameArraysEqual;
|
|
2272
|
+
private extractLaneFromDropListId;
|
|
2273
|
+
private isAlwaysVisibleViewport;
|
|
2274
|
+
isAlwaysVisibleSectionActive(sectionId: string): boolean;
|
|
2275
|
+
onAlwaysVisibleSectionFocus(sectionId: string): void;
|
|
2276
|
+
sectionEnterDelay(sectionId: string): string;
|
|
2277
|
+
scrollToAlwaysVisibleSection(sectionId: string): void;
|
|
2278
|
+
private setupAlwaysVisibleScrollTracking;
|
|
2279
|
+
private teardownAlwaysVisibleScrollTracking;
|
|
2280
|
+
private scheduleAlwaysVisibleSectionEvaluation;
|
|
2281
|
+
private updateActiveAlwaysVisibleSection;
|
|
2282
|
+
private getAlwaysVisibleSections;
|
|
2283
|
+
private getSectionActivationTop;
|
|
2284
|
+
private findNearestScrollableParent;
|
|
2285
|
+
private isAlwaysVisibleSectionId;
|
|
2286
|
+
private prefersReducedMotion;
|
|
2287
|
+
hasAlwaysVisibleOverride(fieldName: string): boolean;
|
|
2288
|
+
getAlwaysVisibleControlTypeLabel(fieldName: string): string;
|
|
2289
|
+
getAlwaysVisibleOverridePreview(fieldName: string): string;
|
|
2290
|
+
clearAlwaysVisibleOverride(fieldName: string): void;
|
|
2291
|
+
openAlwaysVisibleMetadataEditor(fieldName: string): Promise<void>;
|
|
2292
|
+
private loadMetadataEditorModule;
|
|
2293
|
+
private importOptionalModule;
|
|
2294
|
+
hasCurrentDto(): boolean;
|
|
2295
|
+
private getMetadataByName;
|
|
2296
|
+
private getAlwaysVisibleOverridesMap;
|
|
2297
|
+
private normalizeControlTypeForEditor;
|
|
2298
|
+
private inferControlTypeFromMetadata;
|
|
2299
|
+
private resolveAlwaysVisibleControlType;
|
|
2300
|
+
private buildAlwaysVisibleEditorSeed;
|
|
2301
|
+
private isPlainObject;
|
|
2302
|
+
private applyJsonMergePatch;
|
|
2303
|
+
private applyAlwaysVisibleMetadataPatch;
|
|
2304
|
+
renameTagPrompt(index: number): void;
|
|
2305
|
+
dropTags(event: CdkDragDrop<FilterTag[]>): void;
|
|
2306
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2307
|
+
getSettingsValue(): FilterConfig;
|
|
2308
|
+
private updateEffectiveJson;
|
|
2309
|
+
private buildFullConfigFromForm;
|
|
2310
|
+
onJsonReload(): void;
|
|
2311
|
+
onJsonFormat(): void;
|
|
2312
|
+
onJsonApply(): void;
|
|
2313
|
+
formatAlwaysVisibleOverridesJson(): void;
|
|
2314
|
+
applyAlwaysVisibleOverridesJson(): void;
|
|
2315
|
+
reset(): void;
|
|
2316
|
+
private applyAlwaysVisibleOverridesMap;
|
|
2317
|
+
private syncAlwaysVisibleControlState;
|
|
2318
|
+
private clampDebounce;
|
|
2319
|
+
private cloneFieldNames;
|
|
2320
|
+
private applySettingsToForm;
|
|
2321
|
+
private refreshAlwaysVisibleOverridesEditor;
|
|
2322
|
+
private isAllowedOverrideControlType;
|
|
2323
|
+
private normalizeAlwaysVisibleMetadataOverrides;
|
|
2324
|
+
private extractExtraSettings;
|
|
2325
|
+
private withSuppressedSettingsEmit;
|
|
2326
|
+
private cloneUnknown;
|
|
2327
|
+
private normalizeAdvancedOpenMode;
|
|
2328
|
+
private clampMinWidth;
|
|
2329
|
+
private clampColsMd;
|
|
2330
|
+
private clampColsLg;
|
|
2331
|
+
layoutMinWidth(): number;
|
|
2332
|
+
layoutColsFor(breakpoint: 'sm' | 'md' | 'lg'): number;
|
|
2333
|
+
layoutControlError(controlName: 'alwaysMinWidth' | 'alwaysColsMd' | 'alwaysColsLg'): string | null;
|
|
2334
|
+
normalizeLayoutControl(controlName: 'alwaysMinWidth' | 'alwaysColsMd' | 'alwaysColsLg'): void;
|
|
2335
|
+
private markDirtyAndEmit;
|
|
2336
|
+
dropAlwaysVisible(event: CdkDragDrop<string[]>): void;
|
|
2337
|
+
canMoveAlwaysVisible(index: number, delta: -1 | 1): boolean;
|
|
2338
|
+
moveAlwaysVisible(index: number, delta: -1 | 1): void;
|
|
2339
|
+
onAlwaysVisibleListItemKeydown(event: KeyboardEvent, index: number): void;
|
|
2340
|
+
private normalizeText;
|
|
2341
|
+
clearPersistedFilters(): void;
|
|
2342
|
+
forceSchemaReload(): void;
|
|
2343
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterSettingsComponent, never>;
|
|
2344
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterSettingsComponent, "filter-settings", never, { "metadata": { "alias": "metadata"; "required": false; }; "metadataSource": { "alias": "metadataSource"; "required": false; }; "metadataLoading": { "alias": "metadataLoading"; "required": false; }; "metadataErrorMsg": { "alias": "metadataErrorMsg"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "configKey": { "alias": "configKey"; "required": false; }; }, { "settingsChange": "settingsChange"; }, never, never, true, never>;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
type ResourcePathIntent = 'set' | 'clear' | 'unchanged';
|
|
2348
|
+
type EffectiveDataMode = 'remote' | 'local' | 'empty';
|
|
1271
2349
|
declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValueProvider {
|
|
1272
2350
|
private cdr;
|
|
1273
2351
|
private configService;
|
|
1274
|
-
|
|
1275
|
-
private panelRef?;
|
|
2352
|
+
filterSettingsEditor?: FilterSettingsComponent;
|
|
1276
2353
|
behaviorEditor?: BehaviorConfigEditorComponent;
|
|
1277
2354
|
set crudEditorSetter(ref: any);
|
|
1278
2355
|
private crudEditor?;
|
|
@@ -1289,8 +2366,11 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1289
2366
|
private initialResourcePath;
|
|
1290
2367
|
idField: string;
|
|
1291
2368
|
private initialIdField;
|
|
2369
|
+
horizontalScroll: 'auto' | 'wrap' | 'none';
|
|
2370
|
+
private initialHorizontalScroll;
|
|
1292
2371
|
crudContext?: {
|
|
1293
2372
|
tableId: string;
|
|
2373
|
+
componentKeyId?: string;
|
|
1294
2374
|
resourcePath?: string;
|
|
1295
2375
|
/** Nome do campo identificador do recurso (ex.: 'id', 'codigo'). */
|
|
1296
2376
|
idField?: string;
|
|
@@ -1317,12 +2397,24 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1317
2397
|
hasSuccess: boolean;
|
|
1318
2398
|
statusMessage: string;
|
|
1319
2399
|
private isValidJson;
|
|
2400
|
+
private behaviorFeedbackBurstTypes;
|
|
1320
2401
|
isDirty$: BehaviorSubject<boolean>;
|
|
1321
2402
|
isValid$: BehaviorSubject<boolean>;
|
|
1322
2403
|
isBusy$: BehaviorSubject<boolean>;
|
|
1323
2404
|
columnMetas: FieldMetadata[];
|
|
2405
|
+
filterDtoMetas: FieldMetadata[];
|
|
2406
|
+
filterDtoMetasLoading: boolean;
|
|
2407
|
+
filterDtoMetasErrorMsg: string;
|
|
1324
2408
|
private hasCrudOverridesDirty;
|
|
1325
|
-
|
|
2409
|
+
private hasLocalDataInput;
|
|
2410
|
+
private filterDtoLoadSeq;
|
|
2411
|
+
private lastKnownFilterSettings;
|
|
2412
|
+
private readonly panelData;
|
|
2413
|
+
private readonly crudService;
|
|
2414
|
+
private readonly panelRef;
|
|
2415
|
+
constructor(cdr: ChangeDetectorRef, configService: TableConfigService);
|
|
2416
|
+
private isDebugLoggingEnabled;
|
|
2417
|
+
private debugLog;
|
|
1326
2418
|
ngOnInit(): void;
|
|
1327
2419
|
onJsonConfigChange(newConfig: TableConfig): void;
|
|
1328
2420
|
onJsonValidationChange(result: JsonValidationResult): void;
|
|
@@ -1330,6 +2422,15 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1330
2422
|
onColumnsConfigChange(newConfig: TableConfig): void;
|
|
1331
2423
|
onColumnChange(change: ColumnChange): void;
|
|
1332
2424
|
onFilterSettingsChange(cfg: FilterConfig): void;
|
|
2425
|
+
private cloneFilterSettings;
|
|
2426
|
+
private isEffectivelyEmptyFilterSettings;
|
|
2427
|
+
getFilterSettingsMetas(): FieldMetadata[];
|
|
2428
|
+
isUsingFilterDtoMetas(): boolean;
|
|
2429
|
+
getEffectiveDataMode(): EffectiveDataMode;
|
|
2430
|
+
isEffectiveLocalMode(): boolean;
|
|
2431
|
+
private resolveLocalDataModeFeatureEnabled;
|
|
2432
|
+
private enforceEffectiveModeStrategyConstraints;
|
|
2433
|
+
onRulesConfigChange(newCfg: TableConfig): void;
|
|
1333
2434
|
private updateColumnMetas;
|
|
1334
2435
|
private updateCanSaveState;
|
|
1335
2436
|
private subscribeCrudEditorChanges;
|
|
@@ -1346,11 +2447,16 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1346
2447
|
*/
|
|
1347
2448
|
private deepEqual;
|
|
1348
2449
|
getSettingsValue(): TableConfig;
|
|
2450
|
+
private getResourcePathIntent;
|
|
2451
|
+
private syncFilterSettingsFromEditor;
|
|
2452
|
+
private hasAdvancedSettingsProperty;
|
|
2453
|
+
private syncLastKnownFilterSettingsFromEditedConfig;
|
|
1349
2454
|
onResourcePathChange(val: string): void;
|
|
2455
|
+
private loadFilterDtoMetas;
|
|
1350
2456
|
onIdFieldChange(val: string): void;
|
|
2457
|
+
onHorizontalScrollChange(val: 'auto' | 'wrap' | 'none'): void;
|
|
1351
2458
|
onReconcileIdField(): void;
|
|
1352
2459
|
onAcceptServerHash(): void;
|
|
1353
|
-
onVisualRulesConfigChange(newConfig: TableConfig): void;
|
|
1354
2460
|
reset(): void;
|
|
1355
2461
|
onResetToDefaults(): void;
|
|
1356
2462
|
/**
|
|
@@ -1387,33 +2493,20 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1387
2493
|
isFeatureAvailable(feature: string): boolean;
|
|
1388
2494
|
onBehaviorConfigChange(newConfig: TableConfig): void;
|
|
1389
2495
|
onBehaviorChange(change: BehaviorConfigChange): void;
|
|
2496
|
+
private shouldSuppressBehaviorFeedback;
|
|
1390
2497
|
onToolbarActionsConfigChange(newConfig: TableConfig): void;
|
|
1391
2498
|
onToolbarActionsChange(change: ToolbarActionsChange): void;
|
|
1392
2499
|
onMessagesLocalizationConfigChange(newConfig: TableConfig): void;
|
|
1393
2500
|
onMessagesLocalizationChange(change: MessagesLocalizationChange): void;
|
|
1394
2501
|
ngOnDestroy(): void;
|
|
1395
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTableConfigEditor,
|
|
2502
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTableConfigEditor, never>;
|
|
1396
2503
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTableConfigEditor, "praxis-table-config-editor", never, {}, {}, never, never, true, never>;
|
|
1397
2504
|
}
|
|
1398
2505
|
|
|
1399
|
-
interface FilterDrawerOpenConfig {
|
|
1400
|
-
resourcePath: string;
|
|
1401
|
-
formId: string;
|
|
1402
|
-
config: any;
|
|
1403
|
-
initialDto?: Record<string, any>;
|
|
1404
|
-
title?: string;
|
|
1405
|
-
onSubmit(dto: Record<string, any>): void;
|
|
1406
|
-
onClose?(): void;
|
|
1407
|
-
}
|
|
1408
|
-
interface FilterDrawerAdapter {
|
|
1409
|
-
open(config: FilterDrawerOpenConfig): Promise<void> | void;
|
|
1410
|
-
}
|
|
1411
|
-
declare const FILTER_DRAWER_ADAPTER: InjectionToken<FilterDrawerAdapter>;
|
|
1412
|
-
|
|
1413
2506
|
declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
1414
2507
|
private cdr;
|
|
1415
2508
|
private formattingService;
|
|
1416
|
-
columnType: ColumnDataType;
|
|
2509
|
+
columnType: ColumnDataType$1;
|
|
1417
2510
|
currentFormat: string;
|
|
1418
2511
|
formatChange: EventEmitter<string>;
|
|
1419
2512
|
datePresets: FormatPreset[];
|
|
@@ -1434,6 +2527,7 @@ declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
|
1434
2527
|
percentageDecimals: string;
|
|
1435
2528
|
percentageMultiplier: boolean;
|
|
1436
2529
|
stringTransform: string;
|
|
2530
|
+
maskFormat: string;
|
|
1437
2531
|
enableTruncate: boolean;
|
|
1438
2532
|
truncateLength: number;
|
|
1439
2533
|
truncateSuffix: string;
|
|
@@ -1461,6 +2555,7 @@ declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
|
1461
2555
|
onFormatOptionChange(): void;
|
|
1462
2556
|
onTruncateToggle(): void;
|
|
1463
2557
|
onBooleanDisplayChange(): void;
|
|
2558
|
+
onMaskChange(mask: string): void;
|
|
1464
2559
|
private generateFormatString;
|
|
1465
2560
|
private generatePreview;
|
|
1466
2561
|
/**
|
|
@@ -1471,6 +2566,7 @@ declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
|
1471
2566
|
* Get the current format string based on component state
|
|
1472
2567
|
*/
|
|
1473
2568
|
private getCurrentFormatString;
|
|
2569
|
+
private isMaskFormat;
|
|
1474
2570
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataFormatterComponent, never>;
|
|
1475
2571
|
static ɵcmp: i0.ɵɵComponentDeclaration<DataFormatterComponent, "data-formatter", never, { "columnType": { "alias": "columnType"; "required": false; }; "currentFormat": { "alias": "currentFormat"; "required": false; }; }, { "formatChange": "formatChange"; }, never, never, true, never>;
|
|
1476
2572
|
}
|
|
@@ -1523,150 +2619,275 @@ declare class ValueMappingEditorComponent implements OnInit, OnChanges {
|
|
|
1523
2619
|
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>;
|
|
1524
2620
|
}
|
|
1525
2621
|
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
2622
|
+
type ColumnDataType = 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
2623
|
+
|
|
2624
|
+
type OperatorKey = '==' | '!=' | '<' | '<=' | '>' | '>=' | 'contains' | 'startsWith' | 'endsWith' | 'matches' | 'not matches' | 'in' | 'not in' | 'is empty' | 'is not empty' | 'between' | 'is today' | 'in last' | 'weekday is' | 'is true' | 'is false' | 'contains all' | 'contains any' | 'length ==' | 'length >' | 'length <' | 'jsonPath matches' | 'has key' | 'key ==' | 'id ==' | 'id in' | 'has property';
|
|
2625
|
+
interface OperatorSpec {
|
|
2626
|
+
key: OperatorKey;
|
|
2627
|
+
label: string;
|
|
2628
|
+
icon?: string;
|
|
2629
|
+
description?: string;
|
|
2630
|
+
}
|
|
2631
|
+
declare class OperatorsRegistryService {
|
|
2632
|
+
/** Returns the list of operator specs supported for a given data type. */
|
|
2633
|
+
getForType(type: ColumnDataType | 'enum' | 'array' | 'json' | 'relational'): OperatorSpec[];
|
|
2634
|
+
get keys(): OperatorKey[];
|
|
2635
|
+
private readonly stringOps;
|
|
2636
|
+
private readonly numberOps;
|
|
2637
|
+
private readonly dateOps;
|
|
2638
|
+
private readonly booleanOps;
|
|
2639
|
+
private readonly enumOps;
|
|
2640
|
+
private readonly arrayOps;
|
|
2641
|
+
private readonly jsonOps;
|
|
2642
|
+
private readonly relationalOps;
|
|
2643
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OperatorsRegistryService, never>;
|
|
2644
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OperatorsRegistryService>;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
type GroupOp = 'AND' | 'OR' | 'NOT';
|
|
2648
|
+
interface RuleAtom {
|
|
2649
|
+
field: string;
|
|
2650
|
+
operator: string;
|
|
2651
|
+
value?: any;
|
|
2652
|
+
options?: Record<string, any>;
|
|
2653
|
+
}
|
|
2654
|
+
interface RuleGroup {
|
|
2655
|
+
op: GroupOp;
|
|
2656
|
+
conditions: RuleAtom[];
|
|
2657
|
+
groups?: RuleGroup[];
|
|
2658
|
+
}
|
|
2659
|
+
declare class RuleCompilerService {
|
|
1557
2660
|
/**
|
|
1558
|
-
*
|
|
2661
|
+
* Compiles a rule group into a single DSL expression string, adding
|
|
2662
|
+
* parentheses according to grouping and operator precedence.
|
|
1559
2663
|
*/
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
private readonly injectedData;
|
|
1567
|
-
/** Clears persisted preferences for this filter, falling back to globals. */
|
|
1568
|
-
resetPreferences(): void;
|
|
1569
|
-
constructor(fb: FormBuilder);
|
|
1570
|
-
tags: FilterTag[];
|
|
1571
|
-
exportJson: string;
|
|
1572
|
-
newTagLabel: string;
|
|
1573
|
-
newTagPatchText: string;
|
|
1574
|
-
private tagsKey;
|
|
1575
|
-
loadTags(): void;
|
|
1576
|
-
saveTags(): void;
|
|
1577
|
-
clearTags(): void;
|
|
1578
|
-
removeTag(index: number): void;
|
|
1579
|
-
renameTag(index: number, value: string): void;
|
|
1580
|
-
importTags(): void;
|
|
1581
|
-
addTag(): void;
|
|
1582
|
-
addTagFromCurrent(): void;
|
|
1583
|
-
dropAlwaysVisible(event: CdkDragDrop<string[]>): void;
|
|
1584
|
-
presets: {
|
|
1585
|
-
key: string;
|
|
1586
|
-
label: string;
|
|
1587
|
-
values: Partial<FilterConfig>;
|
|
1588
|
-
}[];
|
|
1589
|
-
applyPreset(key: string): void;
|
|
1590
|
-
getFieldLabel(name: string): string;
|
|
1591
|
-
hasCurrentDto(): boolean;
|
|
1592
|
-
renameTagPrompt(index: number): void;
|
|
1593
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
1594
|
-
getSettingsValue(): FilterConfig;
|
|
1595
|
-
reset(): void;
|
|
1596
|
-
private clampDebounce;
|
|
1597
|
-
private clampMinWidth;
|
|
1598
|
-
private clampColsMd;
|
|
1599
|
-
private clampColsLg;
|
|
1600
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterSettingsComponent, never>;
|
|
1601
|
-
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>;
|
|
2664
|
+
compileGroup(group: RuleGroup): string;
|
|
2665
|
+
/** Compiles a single rule atom to DSL. */
|
|
2666
|
+
compileAtom(atom: RuleAtom): string;
|
|
2667
|
+
private stringify;
|
|
2668
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuleCompilerService, never>;
|
|
2669
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuleCompilerService>;
|
|
1602
2670
|
}
|
|
1603
2671
|
|
|
1604
|
-
|
|
2672
|
+
type RuleItem = {
|
|
2673
|
+
condition: string;
|
|
2674
|
+
cssClass?: string;
|
|
2675
|
+
style?: Record<string, string>;
|
|
2676
|
+
description?: string;
|
|
2677
|
+
effects?: _praxisui_table_rule_builder.RuleEffectDefinition;
|
|
2678
|
+
enabled?: boolean;
|
|
2679
|
+
};
|
|
2680
|
+
declare class TableRulesEditorComponent implements OnChanges, OnInit, OnDestroy {
|
|
2681
|
+
private cdr;
|
|
2682
|
+
private registry;
|
|
2683
|
+
private compiler;
|
|
2684
|
+
private dynamicForm;
|
|
2685
|
+
private crud?;
|
|
2686
|
+
private static runtimeRegistryInstanceCounter;
|
|
1605
2687
|
config: TableConfig;
|
|
2688
|
+
resourcePath?: string;
|
|
2689
|
+
fields?: FieldDefinition[] | null;
|
|
2690
|
+
i18nRules?: Partial<Record<string, string>>;
|
|
2691
|
+
dslFunctionRegistry: FunctionRegistry<any> | null;
|
|
1606
2692
|
configChange: EventEmitter<_praxisui_core.TableConfigModern>;
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
private
|
|
1623
|
-
private
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
2693
|
+
scope: 'row' | 'column';
|
|
2694
|
+
selectedColumnField: string | null;
|
|
2695
|
+
draftCondition: string;
|
|
2696
|
+
draftCssClass: string;
|
|
2697
|
+
draftStyleText: string;
|
|
2698
|
+
sanitizedStyle: Record<string, string>;
|
|
2699
|
+
dslMode: boolean;
|
|
2700
|
+
dslErrors: string[];
|
|
2701
|
+
testSummary: string;
|
|
2702
|
+
editIndex: number;
|
|
2703
|
+
get currentRules(): RuleItem[];
|
|
2704
|
+
set currentRules(v: RuleItem[]);
|
|
2705
|
+
rulesRow: RuleItem[];
|
|
2706
|
+
rulesColumn: RuleItem[];
|
|
2707
|
+
private parser;
|
|
2708
|
+
private runtimeFunctionRegistry;
|
|
2709
|
+
private readonly runtimeRegistryContextKey;
|
|
2710
|
+
objectKeys: {
|
|
2711
|
+
(o: object): string[];
|
|
2712
|
+
(o: {}): string[];
|
|
2713
|
+
};
|
|
2714
|
+
dynamicValueForm: FormGroup;
|
|
2715
|
+
dynamicValueMetas: FieldMetadata[];
|
|
2716
|
+
effectsValue?: RuleEffectDefinition;
|
|
2717
|
+
dynamicValueActive: boolean;
|
|
2718
|
+
private dynamicValueSub?;
|
|
2719
|
+
private testSummaryTimer;
|
|
2720
|
+
private readonly legacyStyleAllowList;
|
|
2721
|
+
basicFieldType: 'enum' | 'array' | 'json' | 'relational' | 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
2722
|
+
noValueOperator: boolean;
|
|
2723
|
+
i18nValuePlaceholder: string;
|
|
2724
|
+
enumOptions: Array<{
|
|
2725
|
+
value: any;
|
|
1629
2726
|
label: string;
|
|
1630
|
-
|
|
1631
|
-
|
|
2727
|
+
}>;
|
|
2728
|
+
private updateDerivedUiProps;
|
|
2729
|
+
/** Enable verbose console logging for debugging value editor behavior */
|
|
2730
|
+
debugLogs: boolean;
|
|
2731
|
+
debugLevel: 'log' | 'info' | 'debug';
|
|
2732
|
+
private dbg;
|
|
2733
|
+
/** Log a summary table of field metadata and column info for diagnostics */
|
|
2734
|
+
private logFieldMetasContext;
|
|
2735
|
+
/** Log a focused view for a single field */
|
|
2736
|
+
private logSingleFieldMeta;
|
|
2737
|
+
private logFieldChoices;
|
|
2738
|
+
i18nDefault: Record<string, string>;
|
|
2739
|
+
t(key: string): string;
|
|
2740
|
+
constructor(cdr: ChangeDetectorRef, registry: OperatorsRegistryService, compiler: RuleCompilerService, dynamicForm: DynamicFormService, crud?: GenericCrudService<any> | undefined);
|
|
2741
|
+
private configureDslRuntime;
|
|
1632
2742
|
ngOnInit(): void;
|
|
1633
|
-
ngOnChanges(): void;
|
|
2743
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1634
2744
|
ngOnDestroy(): void;
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
private
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
private
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
2745
|
+
get columnFields(): string[];
|
|
2746
|
+
getOperatorsForField(fieldName: string | null): string[];
|
|
2747
|
+
onScopeChange(_s: 'row' | 'column'): void;
|
|
2748
|
+
onColumnSelect(_field: string): void;
|
|
2749
|
+
private initFromConfig;
|
|
2750
|
+
private loadColumnRules;
|
|
2751
|
+
rebuildCondition(): void;
|
|
2752
|
+
onDraftChange(): void;
|
|
2753
|
+
applyTextPreset(preset: string): void;
|
|
2754
|
+
generateSampleData(): void;
|
|
2755
|
+
runTest(): void;
|
|
2756
|
+
onRelSearch(ev: any): void;
|
|
2757
|
+
clearRelSelection(): void;
|
|
2758
|
+
onRelSelectSingle(opt: any): void;
|
|
2759
|
+
onRelAddMulti(opt: any): void;
|
|
2760
|
+
removeRelMulti(i: number): void;
|
|
2761
|
+
private fetchRelOptions;
|
|
2762
|
+
private getRelationalConfig;
|
|
2763
|
+
validateDraft(): void;
|
|
2764
|
+
canCommitDraft(): boolean;
|
|
2765
|
+
private toPersistedCellClassAndStyle;
|
|
2766
|
+
addOrUpdateRule(): void;
|
|
2767
|
+
editRule(index: number): void;
|
|
2768
|
+
removeRule(index: number): void;
|
|
2769
|
+
duplicateRule(index: number): void;
|
|
2770
|
+
onRuleToggle(): void;
|
|
2771
|
+
onApply(): void;
|
|
2772
|
+
isValid(): boolean;
|
|
2773
|
+
onExportRules(): void;
|
|
2774
|
+
onImportRules(): void;
|
|
2775
|
+
private sanitizeRule;
|
|
2776
|
+
private getKnownDslFields;
|
|
2777
|
+
getAnimationLabel(r: RuleItem): string | null;
|
|
2778
|
+
private normalizeRendererAnimation;
|
|
2779
|
+
private buildRendererOverrideFromRule;
|
|
2780
|
+
private buildLegacyRendererOverrideFromRule;
|
|
2781
|
+
private buildRowRendererOverrideFromRule;
|
|
2782
|
+
private stringifyValue;
|
|
2783
|
+
private parseLegacyStyle;
|
|
2784
|
+
private normalizeLegacyStyleObject;
|
|
2785
|
+
private extractIdentifiers;
|
|
2786
|
+
resetDraft(): void;
|
|
2787
|
+
basicField: string;
|
|
2788
|
+
basicOperator: string;
|
|
2789
|
+
basicValue: any;
|
|
2790
|
+
basicMin: any;
|
|
2791
|
+
basicMax: any;
|
|
2792
|
+
basicListCsv: string;
|
|
2793
|
+
basicDate: Date | null;
|
|
2794
|
+
basicDateStart: Date | null;
|
|
2795
|
+
basicDateEnd: Date | null;
|
|
2796
|
+
basicEnumValue: string | number | null;
|
|
2797
|
+
basicEnumValues: Array<string | number>;
|
|
2798
|
+
basicLength: number | null;
|
|
2799
|
+
relationalSelected: {
|
|
2800
|
+
id: any;
|
|
2801
|
+
label: string;
|
|
2802
|
+
raw: any;
|
|
2803
|
+
} | null;
|
|
2804
|
+
relationalSelectedMulti: Array<{
|
|
2805
|
+
id: any;
|
|
2806
|
+
label: string;
|
|
2807
|
+
raw: any;
|
|
2808
|
+
}>;
|
|
2809
|
+
relationalOptions: Array<{
|
|
2810
|
+
id: any;
|
|
2811
|
+
label: string;
|
|
2812
|
+
raw: any;
|
|
2813
|
+
}>;
|
|
2814
|
+
basicRelPath: string;
|
|
2815
|
+
private relSearchTerm;
|
|
2816
|
+
private relCache;
|
|
2817
|
+
basicLastN: number | null;
|
|
2818
|
+
basicLastUnit: 'days' | 'weeks' | 'months';
|
|
2819
|
+
basicWeekdays: number[];
|
|
2820
|
+
weekdayOptions: {
|
|
2821
|
+
value: number;
|
|
2822
|
+
label: string;
|
|
2823
|
+
}[];
|
|
2824
|
+
basicJsonPath: string;
|
|
2825
|
+
basicJsonPattern: string;
|
|
2826
|
+
basicJsonKey: string;
|
|
2827
|
+
basicJsonExpected: any;
|
|
2828
|
+
draftGroup: RuleGroup;
|
|
2829
|
+
editAtomIndex: number;
|
|
2830
|
+
activeGroupTarget: 'root' | number;
|
|
2831
|
+
onEffectsChange(v: RuleEffectDefinition): void;
|
|
2832
|
+
private hasRuleEffectsValue;
|
|
2833
|
+
getFieldType(fieldName: string | null): 'enum' | 'array' | 'json' | 'relational' | 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
2834
|
+
getEnumOptions(fieldName: string | null): Array<{
|
|
2835
|
+
value: any;
|
|
2836
|
+
label: string;
|
|
2837
|
+
}>;
|
|
2838
|
+
isNoValueOperator(op: string): boolean;
|
|
2839
|
+
getValuePlaceholder(): string;
|
|
2840
|
+
getI18nValuePlaceholder(): string;
|
|
2841
|
+
private toIsoDateString;
|
|
2842
|
+
setDsl(v: boolean): void;
|
|
2843
|
+
onBasicFieldChange(_val: string): void;
|
|
2844
|
+
onBasicOperatorChange(_val: string): void;
|
|
2845
|
+
private refreshDynamicValueInitialValueOnly;
|
|
2846
|
+
refreshDynamicValueHost(): void;
|
|
2847
|
+
private buildAtomFromBasic;
|
|
2848
|
+
canBuildAtom(): boolean;
|
|
2849
|
+
onAddOrUpdateAtom(): void;
|
|
2850
|
+
editAtom(index: number): void;
|
|
2851
|
+
removeAtom(index: number): void;
|
|
2852
|
+
resetAtomEdit(): void;
|
|
2853
|
+
private focusAddCondition;
|
|
2854
|
+
clearGroup(): void;
|
|
2855
|
+
onDropCondition(evt: CdkDragDrop<RuleAtom[]>): void;
|
|
2856
|
+
updateDraftFromGroup(): void;
|
|
2857
|
+
getAtomPreview(a: RuleAtom): string;
|
|
2858
|
+
addSubgroup(): void;
|
|
2859
|
+
removeSubgroup(index: number): void;
|
|
2860
|
+
getGroupPreview(g: RuleGroup): string;
|
|
2861
|
+
private getActiveGroupRef;
|
|
2862
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableRulesEditorComponent, [null, null, null, null, { optional: true; }]>;
|
|
2863
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableRulesEditorComponent, "table-rules-editor", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "i18nRules": { "alias": "i18nRules"; "required": false; }; "dslFunctionRegistry": { "alias": "dslFunctionRegistry"; "required": false; }; "debugLogs": { "alias": "debugLogs"; "required": false; }; "debugLevel": { "alias": "debugLevel"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
|
|
1658
2864
|
}
|
|
1659
2865
|
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
declare function
|
|
1669
|
-
declare function
|
|
2866
|
+
/**
|
|
2867
|
+
* Lightweight JSON path evaluator for simple cases used in conditional styling.
|
|
2868
|
+
* Supported syntax (subset):
|
|
2869
|
+
* - $.a.b.c
|
|
2870
|
+
* - a.b[0].c
|
|
2871
|
+
* - a["key"] / a['key']
|
|
2872
|
+
* - a[0]
|
|
2873
|
+
*/
|
|
2874
|
+
declare function jsonPathGet(root: any, rawPath: string): any;
|
|
2875
|
+
declare function hasJsonKey(root: any, keyOrPath: string): boolean;
|
|
2876
|
+
declare function jsonPathMatches(root: any, path: string, pattern: string): boolean;
|
|
2877
|
+
/**
|
|
2878
|
+
* Registers JSON helpers in a DslParser instance, if it supports custom functions.
|
|
2879
|
+
* This is optional — call it in your app host bootstrap.
|
|
2880
|
+
*/
|
|
2881
|
+
declare function registerJsonDslFunctions(parser: DslParser | any): void;
|
|
2882
|
+
|
|
2883
|
+
/**
|
|
2884
|
+
* Registers simple date/time helpers in a DslParser instance.
|
|
2885
|
+
* - today(): returns 'YYYY-MM-DD' (UTC)
|
|
2886
|
+
* - now(): returns Unix timestamp in milliseconds
|
|
2887
|
+
* - dateAdd(date, amount, unit): adds amount (days|weeks|months) and returns 'YYYY-MM-DD'
|
|
2888
|
+
* - dateFormat(date, token): supports token 'E' (ISO weekday 1..7)
|
|
2889
|
+
*/
|
|
2890
|
+
declare function registerDateDslFunctions(parser: DslParser | any): void;
|
|
1670
2891
|
|
|
1671
2892
|
declare class FormulaGeneratorService {
|
|
1672
2893
|
/**
|
|
@@ -1709,6 +2930,15 @@ declare class FormulaGeneratorService {
|
|
|
1709
2930
|
result?: any;
|
|
1710
2931
|
error?: string;
|
|
1711
2932
|
};
|
|
2933
|
+
private evaluateFormula;
|
|
2934
|
+
private evaluateConcatenation;
|
|
2935
|
+
private evaluateArithmetic;
|
|
2936
|
+
private evaluateNestedProperty;
|
|
2937
|
+
private evaluateConditionalMapping;
|
|
2938
|
+
private evaluateDefaultValue;
|
|
2939
|
+
private compareValues;
|
|
2940
|
+
private resolveOperand;
|
|
2941
|
+
private resolveFieldValue;
|
|
1712
2942
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormulaGeneratorService, never>;
|
|
1713
2943
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormulaGeneratorService>;
|
|
1714
2944
|
}
|
|
@@ -1771,5 +3001,87 @@ declare const PRAXIS_TABLE_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
1771
3001
|
*/
|
|
1772
3002
|
declare function providePraxisTableMetadata(): Provider;
|
|
1773
3003
|
|
|
1774
|
-
|
|
1775
|
-
|
|
3004
|
+
/**
|
|
3005
|
+
* Catálogo de capacidades do TableConfig v2 para uso da IA.
|
|
3006
|
+
* Focado em paths permitidos, enums e flags críticas para validação de patches.
|
|
3007
|
+
*/
|
|
3008
|
+
|
|
3009
|
+
declare module '@praxisui/core' {
|
|
3010
|
+
interface AiCapabilityCategoryMap {
|
|
3011
|
+
meta: true;
|
|
3012
|
+
columns: true;
|
|
3013
|
+
renderer: true;
|
|
3014
|
+
conditional: true;
|
|
3015
|
+
mapping: true;
|
|
3016
|
+
format: true;
|
|
3017
|
+
filtering: true;
|
|
3018
|
+
sorting: true;
|
|
3019
|
+
selection: true;
|
|
3020
|
+
pagination: true;
|
|
3021
|
+
interaction: true;
|
|
3022
|
+
toolbar: true;
|
|
3023
|
+
actions: true;
|
|
3024
|
+
export: true;
|
|
3025
|
+
performance: true;
|
|
3026
|
+
messages: true;
|
|
3027
|
+
localization: true;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
type CapabilityCategory$1 = AiCapabilityCategory;
|
|
3031
|
+
type ValueKind$1 = AiValueKind;
|
|
3032
|
+
interface Capability$1 extends AiCapability {
|
|
3033
|
+
/** Path com [] para arrays (ex.: columns[].renderer.type) */
|
|
3034
|
+
path: string;
|
|
3035
|
+
category: CapabilityCategory$1;
|
|
3036
|
+
valueKind: ValueKind$1;
|
|
3037
|
+
allowedValues?: Array<string | number>;
|
|
3038
|
+
description?: string;
|
|
3039
|
+
critical?: boolean;
|
|
3040
|
+
intentExamples?: string[];
|
|
3041
|
+
dependsOn?: string;
|
|
3042
|
+
example?: string;
|
|
3043
|
+
safetyNotes?: string;
|
|
3044
|
+
}
|
|
3045
|
+
interface CapabilityCatalog$1 extends AiCapabilityCatalog {
|
|
3046
|
+
capabilities: Capability$1[];
|
|
3047
|
+
}
|
|
3048
|
+
declare const ENUMS: Record<string, string[]>;
|
|
3049
|
+
declare const TABLE_AI_CAPABILITIES: CapabilityCatalog$1;
|
|
3050
|
+
/**
|
|
3051
|
+
* Agrupamentos lógicos de tarefas para facilitar a injeção de contexto no prompt da IA.
|
|
3052
|
+
* A IA pode receber apenas o grupo relevante para a intenção do usuário.
|
|
3053
|
+
*/
|
|
3054
|
+
declare const TASK_PRESETS: {
|
|
3055
|
+
'visual-refresh': string[];
|
|
3056
|
+
'data-analysis': string[];
|
|
3057
|
+
'interaction-setup': string[];
|
|
3058
|
+
'expansion-detail': string[];
|
|
3059
|
+
'export-governance': string[];
|
|
3060
|
+
'layout-structure': string[];
|
|
3061
|
+
};
|
|
3062
|
+
declare function getTableCapabilities(): Capability$1[];
|
|
3063
|
+
declare function getEnum(name: keyof typeof ENUMS): string[];
|
|
3064
|
+
|
|
3065
|
+
/**
|
|
3066
|
+
* Component-level capabilities for PraxisTable.
|
|
3067
|
+
* Paths assume a wrapper shape: { inputs: {...}, outputs: {...} }.
|
|
3068
|
+
*/
|
|
3069
|
+
|
|
3070
|
+
declare module '@praxisui/core' {
|
|
3071
|
+
interface AiCapabilityCategoryMap {
|
|
3072
|
+
inputs: true;
|
|
3073
|
+
outputs: true;
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
type CapabilityCategory = AiCapabilityCategory;
|
|
3077
|
+
type ValueKind = AiValueKind;
|
|
3078
|
+
interface Capability extends AiCapability {
|
|
3079
|
+
category: CapabilityCategory;
|
|
3080
|
+
}
|
|
3081
|
+
interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
3082
|
+
capabilities: Capability[];
|
|
3083
|
+
}
|
|
3084
|
+
declare const TABLE_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
|
|
3085
|
+
|
|
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 };
|