@praxisui/table 1.0.0-beta.3 → 1.0.0-beta.30
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 +286 -1
- package/fesm2022/{praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs → praxisui-table-filter-form-dialog-host.component-Du_IEq0W.mjs} +10 -2
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-Du_IEq0W.mjs.map +1 -0
- package/fesm2022/praxisui-table.mjs +6639 -1313
- package/fesm2022/praxisui-table.mjs.map +1 -1
- package/index.d.ts +444 -85
- package/package.json +9 -8
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -7,21 +7,23 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
|
|
7
7
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
8
8
|
import { SettingsPanelService, SettingsValueProvider, SettingsPanelRef } from '@praxisui/settings-panel';
|
|
9
9
|
import * as _praxisui_core from '@praxisui/core';
|
|
10
|
-
import { GlobalConfigService, TableConfig, ConfigStorage, SchemaIdParams, FieldMetadata, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ColumnDefinition, ConnectionStorage, IconPickerService, TableConfigService, ComponentDocMeta } from '@praxisui/core';
|
|
10
|
+
import { GlobalConfigService, TableConfig, ConfigStorage, SchemaIdParams, FieldMetadata, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ColumnDefinition, ConnectionStorage, IconPickerService, TableConfigService, FieldDefinition, ComponentDocMeta } from '@praxisui/core';
|
|
11
11
|
import { DatePipe, DecimalPipe, CurrencyPipe, PercentPipe, UpperCasePipe, LowerCasePipe, TitleCasePipe } from '@angular/common';
|
|
12
12
|
import { FormControl, FormGroup, AbstractControl, FormBuilder } from '@angular/forms';
|
|
13
13
|
import { MatDialog } from '@angular/material/dialog';
|
|
14
14
|
import { CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';
|
|
15
|
-
import { SpecificationBridgeService, RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
|
|
16
15
|
import { PraxisDialog } from '@praxisui/dialog';
|
|
17
16
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
18
17
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
19
18
|
import * as _angular_material_paginator_d_Zo1cMMo4 from '@angular/material/paginator.d-Zo1cMMo4';
|
|
20
19
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
20
|
+
import * as _praxisui_table_rule_builder from '@praxisui/table-rule-builder';
|
|
21
|
+
import { RuleEffectDefinition } from '@praxisui/table-rule-builder';
|
|
22
|
+
import { DslParser } from '@praxisui/specification';
|
|
21
23
|
|
|
22
|
-
type ColumnDataType = 'date' | 'number' | 'currency' | 'percentage' | 'string' | 'boolean' | 'custom';
|
|
24
|
+
type ColumnDataType$1 = 'date' | 'number' | 'currency' | 'percentage' | 'string' | 'boolean' | 'custom';
|
|
23
25
|
interface FormatterConfig {
|
|
24
|
-
type: ColumnDataType;
|
|
26
|
+
type: ColumnDataType$1;
|
|
25
27
|
options: any;
|
|
26
28
|
}
|
|
27
29
|
interface DateFormatterOptions {
|
|
@@ -88,7 +90,7 @@ declare class DataFormattingService {
|
|
|
88
90
|
/**
|
|
89
91
|
* Apply formatting to a value based on column type and format string
|
|
90
92
|
*/
|
|
91
|
-
formatValue(value: any, columnType: ColumnDataType, formatString: string): any;
|
|
93
|
+
formatValue(value: any, columnType: ColumnDataType$1, formatString: string): any;
|
|
92
94
|
/**
|
|
93
95
|
* Coerce value to the expected type for formatting
|
|
94
96
|
*/
|
|
@@ -125,7 +127,7 @@ declare class DataFormattingService {
|
|
|
125
127
|
/**
|
|
126
128
|
* Check if formatting is needed for a column
|
|
127
129
|
*/
|
|
128
|
-
needsFormatting(columnType: ColumnDataType, formatString: string): boolean;
|
|
130
|
+
needsFormatting(columnType: ColumnDataType$1, formatString: string): boolean;
|
|
129
131
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataFormattingService, never>;
|
|
130
132
|
static ɵprov: i0.ɵɵInjectableDeclaration<DataFormattingService>;
|
|
131
133
|
}
|
|
@@ -162,6 +164,8 @@ type FilterConfig = {
|
|
|
162
164
|
autoSummary?: boolean;
|
|
163
165
|
confirmTagDelete?: boolean;
|
|
164
166
|
debugLayout?: boolean;
|
|
167
|
+
/** Mostrar o campo "Buscar" (fallback) quando não houver Quick definido */
|
|
168
|
+
showQuickFallback?: boolean;
|
|
165
169
|
tagColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
166
170
|
tagVariant?: 'filled' | 'outlined';
|
|
167
171
|
tagButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
@@ -242,6 +246,8 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
242
246
|
changeDebounceMs: number;
|
|
243
247
|
/** Controla a exibição do botão de configurações dentro do filtro */
|
|
244
248
|
showFilterSettings: boolean;
|
|
249
|
+
/** Mostrar campo de busca genérico quando não houver Quick configurado */
|
|
250
|
+
showQuickFallback?: boolean;
|
|
245
251
|
/** Data used to render the summary card when mode resolves to 'card'. */
|
|
246
252
|
summary?: any;
|
|
247
253
|
/** Custom template to render the summary card; receives the summary as $implicit. */
|
|
@@ -360,6 +366,8 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
360
366
|
constructor(crud: GenericCrudService<any>, configStorage: ConfigStorage, destroyRef: DestroyRef, filterConfig: FilterConfigService, settingsPanel: SettingsPanelService, snackBar: MatSnackBar, dialog: MatDialog, cdr: ChangeDetectorRef, dynamicForm: DynamicFormService, schemaNormalizer: SchemaNormalizerService);
|
|
361
367
|
private readonly global;
|
|
362
368
|
private readonly filterDrawerAdapter;
|
|
369
|
+
/** Decide se o bloco Quick deve ser exibido (heurística + preferência) */
|
|
370
|
+
showQuickBar(): boolean;
|
|
363
371
|
private loadSavedTagsFromStorage;
|
|
364
372
|
ngOnInit(): void;
|
|
365
373
|
ngAfterViewInit(): void;
|
|
@@ -407,7 +415,16 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
407
415
|
} | undefined;
|
|
408
416
|
private updateAutoSummary;
|
|
409
417
|
private defaultSummaryMap;
|
|
418
|
+
/** Salva o estado atual dos filtros como um atalho (tag) do usuário */
|
|
419
|
+
saveCurrentAsTag(): void;
|
|
410
420
|
private formatValueForBadge;
|
|
421
|
+
/**
|
|
422
|
+
* Resolve a user-friendly label for a filter key using the loaded FieldMetadata.
|
|
423
|
+
* Falls back to the key itself when metadata is not available.
|
|
424
|
+
*/
|
|
425
|
+
private getFieldLabel;
|
|
426
|
+
/** Resolve option display text from FieldMetadata.options, when present */
|
|
427
|
+
private getOptionText;
|
|
411
428
|
getAdvancedAriaLabel(): string;
|
|
412
429
|
private getSchemaMetaKey;
|
|
413
430
|
private getOutdatedIgnoreKey;
|
|
@@ -471,7 +488,7 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
471
488
|
private isEditableElement;
|
|
472
489
|
private focusQuick;
|
|
473
490
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilter, never>;
|
|
474
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilter, "praxis-filter", never, { "resourcePath": { "alias": "resourcePath"; "required": true; }; "formId": { "alias": "formId"; "required": true; }; "mode": { "alias": "mode"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "quickField": { "alias": "quickField"; "required": false; }; "alwaysVisibleFields": { "alias": "alwaysVisibleFields"; "required": false; }; "tags": { "alias": "tags"; "required": false; }; "allowSaveTags": { "alias": "allowSaveTags"; "required": false; }; "persistenceKey": { "alias": "persistenceKey"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; "changeDebounceMs": { "alias": "changeDebounceMs"; "required": false; }; "showFilterSettings": { "alias": "showFilterSettings"; "required": false; }; "summary": { "alias": "summary"; "required": false; }; "summaryTemplate": { "alias": "summaryTemplate"; "required": false; }; "summaryMap": { "alias": "summaryMap"; "required": false; }; "autoSummary": { "alias": "autoSummary"; "required": false; }; "confirmTagDelete": { "alias": "confirmTagDelete"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; "placeBooleansInActions": { "alias": "placeBooleansInActions"; "required": false; }; "showToggleLabels": { "alias": "showToggleLabels"; "required": false; }; "alwaysMinWidth": { "alias": "alwaysMinWidth"; "required": false; }; "alwaysColsMd": { "alias": "alwaysColsMd"; "required": false; }; "alwaysColsLg": { "alias": "alwaysColsLg"; "required": false; }; "tagColor": { "alias": "tagColor"; "required": false; }; "tagVariant": { "alias": "tagVariant"; "required": false; }; "tagButtonColor": { "alias": "tagButtonColor"; "required": false; }; "actionsButtonColor": { "alias": "actionsButtonColor"; "required": false; }; "actionsVariant": { "alias": "actionsVariant"; "required": false; }; "overlayVariant": { "alias": "overlayVariant"; "required": false; }; "overlayBackdrop": { "alias": "overlayBackdrop"; "required": false; }; "advancedOpenMode": { "alias": "advancedOpenMode"; "required": false; }; }, { "submit": "submit"; "change": "change"; "clear": "clear"; "modeChange": "modeChange"; "requestSearch": "requestSearch"; "tagsChange": "tagsChange"; "metaChanged": "metaChanged"; "schemaStatusChange": "schemaStatusChange"; }, never, never, true, never>;
|
|
491
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilter, "praxis-filter", never, { "resourcePath": { "alias": "resourcePath"; "required": true; }; "formId": { "alias": "formId"; "required": true; }; "mode": { "alias": "mode"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "quickField": { "alias": "quickField"; "required": false; }; "alwaysVisibleFields": { "alias": "alwaysVisibleFields"; "required": false; }; "tags": { "alias": "tags"; "required": false; }; "allowSaveTags": { "alias": "allowSaveTags"; "required": false; }; "persistenceKey": { "alias": "persistenceKey"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; "changeDebounceMs": { "alias": "changeDebounceMs"; "required": false; }; "showFilterSettings": { "alias": "showFilterSettings"; "required": false; }; "showQuickFallback": { "alias": "showQuickFallback"; "required": false; }; "summary": { "alias": "summary"; "required": false; }; "summaryTemplate": { "alias": "summaryTemplate"; "required": false; }; "summaryMap": { "alias": "summaryMap"; "required": false; }; "autoSummary": { "alias": "autoSummary"; "required": false; }; "confirmTagDelete": { "alias": "confirmTagDelete"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; "placeBooleansInActions": { "alias": "placeBooleansInActions"; "required": false; }; "showToggleLabels": { "alias": "showToggleLabels"; "required": false; }; "alwaysMinWidth": { "alias": "alwaysMinWidth"; "required": false; }; "alwaysColsMd": { "alias": "alwaysColsMd"; "required": false; }; "alwaysColsLg": { "alias": "alwaysColsLg"; "required": false; }; "tagColor": { "alias": "tagColor"; "required": false; }; "tagVariant": { "alias": "tagVariant"; "required": false; }; "tagButtonColor": { "alias": "tagButtonColor"; "required": false; }; "actionsButtonColor": { "alias": "actionsButtonColor"; "required": false; }; "actionsVariant": { "alias": "actionsVariant"; "required": false; }; "overlayVariant": { "alias": "overlayVariant"; "required": false; }; "overlayBackdrop": { "alias": "overlayBackdrop"; "required": false; }; "advancedOpenMode": { "alias": "advancedOpenMode"; "required": false; }; }, { "submit": "submit"; "change": "change"; "clear": "clear"; "modeChange": "modeChange"; "requestSearch": "requestSearch"; "tagsChange": "tagsChange"; "metaChanged": "metaChanged"; "schemaStatusChange": "schemaStatusChange"; }, never, never, true, never>;
|
|
475
492
|
}
|
|
476
493
|
|
|
477
494
|
interface ActionLike {
|
|
@@ -515,7 +532,6 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
515
532
|
private cdr;
|
|
516
533
|
private settingsPanel;
|
|
517
534
|
private formattingService;
|
|
518
|
-
private specBridge;
|
|
519
535
|
private configStorage;
|
|
520
536
|
private connectionStorage;
|
|
521
537
|
private tableDefaultsProvider;
|
|
@@ -547,6 +563,13 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
547
563
|
tableId: string;
|
|
548
564
|
/** Habilita visual de debug para alinhamento/layouot */
|
|
549
565
|
debugLayout: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* Controla a estratégia de largura/scroll horizontal.
|
|
568
|
+
* - 'auto': (padrão) cria viewport com overflow-x e deixa a tabela crescer via max-content
|
|
569
|
+
* - 'wrap': permite quebra de linha nas células, reduzindo a largura (menos scroll)
|
|
570
|
+
* - 'none': desabilita comportamento da lib (host cuida do scroll)
|
|
571
|
+
*/
|
|
572
|
+
horizontalScroll: 'auto' | 'wrap' | 'none';
|
|
550
573
|
/** Contexto opcional quando tabela está dentro do componente CRUD */
|
|
551
574
|
crudContext?: {
|
|
552
575
|
tableId: string;
|
|
@@ -595,6 +618,11 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
595
618
|
lastVerifiedAt?: string;
|
|
596
619
|
resourcePath?: string;
|
|
597
620
|
}>;
|
|
621
|
+
/** Emits when metadata (config.meta) changes for hosts interested in schema/config changes */
|
|
622
|
+
metadataChange: EventEmitter<{
|
|
623
|
+
meta: any;
|
|
624
|
+
reason: "bootstrap" | "verification" | "applied";
|
|
625
|
+
}>;
|
|
598
626
|
beforeDelete: EventEmitter<any>;
|
|
599
627
|
afterDelete: EventEmitter<any>;
|
|
600
628
|
deleteError: EventEmitter<{
|
|
@@ -624,6 +652,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
624
652
|
private measuredInline;
|
|
625
653
|
private resizeObserver?;
|
|
626
654
|
readonly getActionId: typeof getActionId;
|
|
655
|
+
private schemaStatusSubject;
|
|
656
|
+
private emitSchemaStatus;
|
|
657
|
+
private emitMetadataChange;
|
|
627
658
|
getRowMenuIcon(): string;
|
|
628
659
|
getRowMenuButtonColor(): string | undefined;
|
|
629
660
|
getActionsHeaderAlign(): 'start' | 'center' | 'end';
|
|
@@ -631,6 +662,8 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
631
662
|
getActionsHeaderIcon(): string | undefined;
|
|
632
663
|
getActionsHeaderTooltip(): string | undefined;
|
|
633
664
|
private styleSpecCache;
|
|
665
|
+
private actionSpecCache;
|
|
666
|
+
private dslParser;
|
|
634
667
|
schemaError: boolean;
|
|
635
668
|
dataError: boolean;
|
|
636
669
|
errorMessage: string | null;
|
|
@@ -667,6 +700,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
667
700
|
private updateMeasuredInline;
|
|
668
701
|
private setupResizeObserver;
|
|
669
702
|
private subscriptions;
|
|
703
|
+
private updateTableMetaFromServerInfo;
|
|
670
704
|
private getIdField;
|
|
671
705
|
isVirtualized(): boolean;
|
|
672
706
|
getVirtItemHeight(): number;
|
|
@@ -675,7 +709,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
675
709
|
getVirtMinHeightStyle(): string | null;
|
|
676
710
|
trackByRow: (index: number, row: any) => string | number;
|
|
677
711
|
private getRowId;
|
|
678
|
-
constructor(crudService: GenericCrudService<any>, cdr: ChangeDetectorRef, settingsPanel: SettingsPanelService, formattingService: DataFormattingService,
|
|
712
|
+
constructor(crudService: GenericCrudService<any>, cdr: ChangeDetectorRef, settingsPanel: SettingsPanelService, formattingService: DataFormattingService, configStorage: ConfigStorage, connectionStorage: ConnectionStorage, tableDefaultsProvider: TableDefaultsProvider, snackBar: MatSnackBar, filterConfig: FilterConfigService, pxDialog: PraxisDialog, hostRef: ElementRef<HTMLElement>, global: GlobalConfigService);
|
|
679
713
|
openQuickConnect(): void;
|
|
680
714
|
ngOnInit(): void;
|
|
681
715
|
ngAfterContentInit(): void;
|
|
@@ -683,6 +717,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
683
717
|
private isDebug;
|
|
684
718
|
private connectionKey;
|
|
685
719
|
private saveConnection;
|
|
720
|
+
private inputsKey;
|
|
686
721
|
disconnect(): void;
|
|
687
722
|
ngAfterViewInit(): void;
|
|
688
723
|
onPageChange(event: PageEvent): void;
|
|
@@ -700,6 +735,8 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
700
735
|
openTableSettings(): void;
|
|
701
736
|
private applyTableConfig;
|
|
702
737
|
onResetPreferences(): void;
|
|
738
|
+
private resolvePagingStrategy;
|
|
739
|
+
private resolveSortingStrategy;
|
|
703
740
|
private applyDataSourceSettings;
|
|
704
741
|
private setupColumns;
|
|
705
742
|
private applyDefaultSortIfNone;
|
|
@@ -711,6 +748,11 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
711
748
|
private verifyServerSchemaVersion;
|
|
712
749
|
private loadSchema;
|
|
713
750
|
private convertFieldToColumn;
|
|
751
|
+
/**
|
|
752
|
+
* Apply automatic renderer hints based on schema field metadata.
|
|
753
|
+
* Runs only on initial bootstrap (when columns are derived from schema).
|
|
754
|
+
*/
|
|
755
|
+
private applyAutoRenderer;
|
|
714
756
|
/**
|
|
715
757
|
* Check if a value is a valid ColumnDataType
|
|
716
758
|
*/
|
|
@@ -735,8 +777,14 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
735
777
|
getCellClasses(rowData: any, column: ColumnDefinition): string[] | undefined;
|
|
736
778
|
getCellNgStyle(rowData: any, column: ColumnDefinition): Record<string, string> | undefined;
|
|
737
779
|
private evaluateStyleRule;
|
|
780
|
+
/** Evaluate row action visibility condition using the same DSL as styles */
|
|
781
|
+
private evaluateActionCondition;
|
|
738
782
|
getRowClasses(rowData: any): string[] | undefined;
|
|
739
783
|
getRowNgStyle(rowData: any): Record<string, string> | undefined;
|
|
784
|
+
private getRowRenderer;
|
|
785
|
+
getRowTooltip(rowData: any): string | null;
|
|
786
|
+
getRowTooltipPosition(rowData: any): 'above' | 'below' | 'left' | 'right';
|
|
787
|
+
getRowTooltipShowDelay(rowData: any): number;
|
|
740
788
|
/**
|
|
741
789
|
* Apply value mapping to transform raw values into display-friendly text
|
|
742
790
|
*/
|
|
@@ -790,19 +838,64 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
790
838
|
private coerceExpected;
|
|
791
839
|
getImageSrc(row: any, column: ColumnDefinition): string | null;
|
|
792
840
|
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;
|
|
841
|
+
getImageWidth(row: any, column: ColumnDefinition): number | null;
|
|
842
|
+
getImageHeight(row: any, column: ColumnDefinition): number | null;
|
|
843
|
+
getImageShape(row: any, column: ColumnDefinition): 'square' | 'rounded' | 'circle' | undefined;
|
|
844
|
+
getImageFit(row: any, column: ColumnDefinition): 'cover' | 'contain' | undefined;
|
|
797
845
|
getImageLazy(_row: any, column: ColumnDefinition): boolean;
|
|
798
846
|
getBadgeText(row: any, column: ColumnDefinition): string | null;
|
|
799
847
|
getBadgeIcon(row: any, column: ColumnDefinition): string | null;
|
|
800
848
|
getBadgeClasses(row: any, column: ColumnDefinition): string[];
|
|
801
|
-
getEffectiveRendererType(row: any, column: ColumnDefinition): 'icon' | 'image' | 'badge' | null;
|
|
849
|
+
getEffectiveRendererType(row: any, column: ColumnDefinition): 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'html' | 'compose' | null;
|
|
850
|
+
getComposeItems(row: any, column: ColumnDefinition): any[];
|
|
851
|
+
getComposeClasses(row: any, column: ColumnDefinition): string[];
|
|
852
|
+
getComposeGapStyle(row: any, column: ColumnDefinition): any;
|
|
853
|
+
asItemColumn(base: ColumnDefinition, item: any): any;
|
|
854
|
+
getItemEffectiveType(row: any, column: ColumnDefinition, item: any): any;
|
|
855
|
+
private _rendererOverrideCache;
|
|
856
|
+
private mergeRenderer;
|
|
857
|
+
private getEffectiveRenderer;
|
|
858
|
+
getLinkHref(row: any, column: ColumnDefinition): string | null;
|
|
859
|
+
getLinkText(row: any, column: ColumnDefinition): string;
|
|
860
|
+
getLinkTarget(row: any, column: ColumnDefinition): string | null;
|
|
861
|
+
getLinkRel(row: any, column: ColumnDefinition): string | null;
|
|
862
|
+
getButtonLabel(row: any, column: ColumnDefinition): string;
|
|
863
|
+
getButtonIcon(row: any, column: ColumnDefinition): string | null;
|
|
864
|
+
getButtonVariant(row: any, column: ColumnDefinition): 'filled' | 'outlined' | 'text';
|
|
865
|
+
getButtonColor(row: any, column: ColumnDefinition): string | null;
|
|
866
|
+
isButtonDisabled(row: any, column: ColumnDefinition): boolean;
|
|
867
|
+
getButtonAriaLabel(row: any, column: ColumnDefinition): string | null;
|
|
868
|
+
onButtonClick(row: any, column: ColumnDefinition, event: Event): void;
|
|
869
|
+
getChipText(row: any, column: ColumnDefinition): string | null;
|
|
870
|
+
getChipIcon(row: any, column: ColumnDefinition): string | null;
|
|
871
|
+
getChipClasses(row: any, column: ColumnDefinition): string[];
|
|
872
|
+
getProgressValue(row: any, column: ColumnDefinition): number;
|
|
873
|
+
getProgressColor(row: any, column: ColumnDefinition): string | null;
|
|
874
|
+
getProgressShowLabel(row: any, column: ColumnDefinition): boolean;
|
|
875
|
+
getAvatarSrc(row: any, column: ColumnDefinition): string | null;
|
|
876
|
+
getAvatarAlt(row: any, column: ColumnDefinition): string | null;
|
|
877
|
+
getAvatarInitials(row: any, column: ColumnDefinition): string;
|
|
878
|
+
getAvatarShape(row: any, column: ColumnDefinition): 'square' | 'rounded' | 'circle' | undefined;
|
|
879
|
+
getAvatarStyle(row: any, column: ColumnDefinition): Record<string, string>;
|
|
880
|
+
getToggleState(row: any, column: ColumnDefinition): boolean;
|
|
881
|
+
isToggleDisabled(row: any, column: ColumnDefinition): boolean;
|
|
882
|
+
getToggleAriaLabel(row: any, column: ColumnDefinition): string | null;
|
|
883
|
+
onToggleChange(row: any, column: ColumnDefinition, event: any): void;
|
|
884
|
+
getMenuAriaLabel(row: any, column: ColumnDefinition): string | null;
|
|
885
|
+
private evaluateArrayExpr;
|
|
886
|
+
getMenuItems(row: any, column: ColumnDefinition): Array<{
|
|
887
|
+
label: string;
|
|
888
|
+
icon?: string;
|
|
889
|
+
id: string;
|
|
890
|
+
__visible: boolean;
|
|
891
|
+
}>;
|
|
892
|
+
onMenuItemClick(actionId: string, row: any, event: Event): void;
|
|
893
|
+
getSafeHtml(row: any, column: ColumnDefinition): any;
|
|
894
|
+
private escapeHtml;
|
|
802
895
|
private applyAppearanceVariables;
|
|
803
896
|
ngOnDestroy(): void;
|
|
804
897
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable, never>;
|
|
805
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarV2": { "alias": "toolbarV2"; "required": false; }; "autoDelete": { "alias": "autoDelete"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "tableId": { "alias": "tableId"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; "crudContext": { "alias": "crudContext"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; }, { "rowClick": "rowClick"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "rowDoubleClick": "rowDoubleClick"; "schemaStatusChange": "schemaStatusChange"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; }, ["projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
|
|
898
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarV2": { "alias": "toolbarV2"; "required": false; }; "autoDelete": { "alias": "autoDelete"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "tableId": { "alias": "tableId"; "required": false; }; "debugLayout": { "alias": "debugLayout"; "required": false; }; "horizontalScroll": { "alias": "horizontalScroll"; "required": false; }; "crudContext": { "alias": "crudContext"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; }, { "rowClick": "rowClick"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "rowDoubleClick": "rowDoubleClick"; "schemaStatusChange": "schemaStatusChange"; "metadataChange": "metadataChange"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; }, ["projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
|
|
806
899
|
}
|
|
807
900
|
|
|
808
901
|
declare class PraxisTableToolbar {
|
|
@@ -968,7 +1061,7 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
968
1061
|
private readonly destroyRef;
|
|
969
1062
|
private destroy$;
|
|
970
1063
|
onlyVisibleRendererFields: boolean;
|
|
971
|
-
uiRendererType: 'icon' | 'image' | 'badge' | null;
|
|
1064
|
+
uiRendererType: 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'html' | 'compose' | null;
|
|
972
1065
|
private _rendererApplyTimer;
|
|
973
1066
|
rendererFieldOptions: Array<{
|
|
974
1067
|
name: string;
|
|
@@ -977,6 +1070,24 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
977
1070
|
isVisible: boolean;
|
|
978
1071
|
}>;
|
|
979
1072
|
uiRendererConditional: boolean;
|
|
1073
|
+
condOverridesSelectedIndex: number;
|
|
1074
|
+
getConditionalOverrides(): any[];
|
|
1075
|
+
ensureConditionalOverrides(): any[];
|
|
1076
|
+
addConditionalOverride(): void;
|
|
1077
|
+
removeConditionalOverride(index: number): void;
|
|
1078
|
+
duplicateConditionalOverride(index: number): void;
|
|
1079
|
+
onConditionalOverrideReorder(event: any): void;
|
|
1080
|
+
selectConditionalOverride(index: number): void;
|
|
1081
|
+
getOverrideField(path: string): any;
|
|
1082
|
+
setOverrideField(path: string, value: any): void;
|
|
1083
|
+
onOverrideTypeChange(ov: any, val: string): void;
|
|
1084
|
+
exportOverrideJson(index: number): void;
|
|
1085
|
+
importOverrideJson(index: number): void;
|
|
1086
|
+
rendererValidationErrors: string[];
|
|
1087
|
+
rendererIsValid: boolean;
|
|
1088
|
+
rendererPreviewEnabled: boolean;
|
|
1089
|
+
private rendererAppliedSnapshot;
|
|
1090
|
+
previewRows: any[];
|
|
980
1091
|
private refreshRendererFieldOptions;
|
|
981
1092
|
getRendererFieldOptions(): Array<{
|
|
982
1093
|
name: string;
|
|
@@ -1024,7 +1135,7 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1024
1135
|
getColumnMapping(column: ColumnDefinition | null): {
|
|
1025
1136
|
[key: string | number]: string;
|
|
1026
1137
|
};
|
|
1027
|
-
getRendererType(col: ColumnDefinition | null): 'icon' | 'image' | 'badge' | null;
|
|
1138
|
+
getRendererType(col: ColumnDefinition | null): 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'html' | null;
|
|
1028
1139
|
onRendererTypeChange(type: 'icon' | 'image' | 'badge' | null): void;
|
|
1029
1140
|
onRendererModeClosed(): void;
|
|
1030
1141
|
onToggleRendererConditional(enabled: boolean): void;
|
|
@@ -1067,19 +1178,79 @@ declare class ColumnsConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1067
1178
|
getRendererBadgeIcon(): string;
|
|
1068
1179
|
setRendererBadgeIcon(v: string): void;
|
|
1069
1180
|
private ensureRenderer;
|
|
1181
|
+
private _ensureKind;
|
|
1182
|
+
getRendererProp(kind: string, path: string): any;
|
|
1183
|
+
setRendererProp(kind: string, path: string, value: any): void;
|
|
1184
|
+
private _deepClone;
|
|
1185
|
+
hasSelectedRenderer(): boolean;
|
|
1186
|
+
onApplyRenderer(): void;
|
|
1187
|
+
onDiscardRenderer(): void;
|
|
1188
|
+
onExportRendererJson(): Promise<void>;
|
|
1189
|
+
onImportRendererJson(): void;
|
|
1190
|
+
private sanitizeRenderer;
|
|
1191
|
+
private ensurePreviewRows;
|
|
1192
|
+
private evalValueExpr;
|
|
1193
|
+
private evalArrayExpr;
|
|
1194
|
+
private _coerceExpected;
|
|
1195
|
+
private getNested;
|
|
1196
|
+
getPreviewRendererType(row: any): 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'html' | 'compose' | null;
|
|
1197
|
+
getPreviewIconName(row: any): string | null;
|
|
1198
|
+
getPreviewIconColor(row: any): string | null;
|
|
1199
|
+
getPreviewIconStyle(row: any): Record<string, string> | null;
|
|
1200
|
+
getPreviewImageSrc(row: any): string | null;
|
|
1201
|
+
getPreviewImageAlt(row: any): string | null;
|
|
1202
|
+
getPreviewImageWidth(): number | null;
|
|
1203
|
+
getPreviewImageHeight(): number | null;
|
|
1204
|
+
getPreviewImageShape(): 'square' | 'rounded' | 'circle' | undefined;
|
|
1205
|
+
getPreviewImageFit(): 'cover' | 'contain' | undefined;
|
|
1206
|
+
getPreviewBadgeText(row: any): string | null;
|
|
1207
|
+
getPreviewBadgeIcon(_row: any): string | null;
|
|
1208
|
+
getPreviewBadgeClasses(_row: any): string[];
|
|
1209
|
+
getPreviewLinkText(row: any): string;
|
|
1210
|
+
getPreviewLinkHref(row: any): string | null;
|
|
1211
|
+
getPreviewButtonLabel(row: any): string;
|
|
1212
|
+
getPreviewButtonIcon(): string | null;
|
|
1213
|
+
getPreviewChipText(row: any): string | null;
|
|
1214
|
+
getPreviewChipClasses(): string[];
|
|
1215
|
+
getPreviewProgressValue(row: any): number;
|
|
1216
|
+
getPreviewAvatarSrc(row: any): string | null;
|
|
1217
|
+
getPreviewAvatarInitials(row: any): string;
|
|
1218
|
+
getPreviewAvatarStyle(): Record<string, string>;
|
|
1219
|
+
getPreviewAvatarShape(): 'square' | 'rounded' | 'circle' | undefined;
|
|
1220
|
+
getPreviewToggleState(row: any): boolean;
|
|
1221
|
+
getPreviewMenuCount(row: any): number;
|
|
1222
|
+
getPreviewHtml(row: any): string;
|
|
1223
|
+
trackByIdx: (_: number, item: any) => number;
|
|
1224
|
+
private validateRenderer;
|
|
1070
1225
|
private readonly _emptyMappingRef;
|
|
1226
|
+
composeSelectedIndex: number;
|
|
1227
|
+
private ensureCompose;
|
|
1228
|
+
getComposeItemsUI(): Array<{
|
|
1229
|
+
type: string;
|
|
1230
|
+
summary: string;
|
|
1231
|
+
raw: any;
|
|
1232
|
+
}>;
|
|
1233
|
+
private getComposeItemSummary;
|
|
1234
|
+
addComposeItem(kind: string): void;
|
|
1235
|
+
removeComposeItem(index: number): void;
|
|
1236
|
+
duplicateComposeItem(index: number): void;
|
|
1237
|
+
onComposeReorder(event: any): void;
|
|
1238
|
+
selectComposeItem(index: number): void;
|
|
1239
|
+
getComposeLayoutProp(key: string): any;
|
|
1240
|
+
setComposeLayoutProp(key: string, value: any): void;
|
|
1241
|
+
private getSelectedComposeItem;
|
|
1071
1242
|
getColumnKeyInputType(column: ColumnDefinition | null): 'text' | 'number' | 'boolean';
|
|
1072
1243
|
onMappingChange(mapping: {
|
|
1073
1244
|
[key: string | number]: string;
|
|
1074
1245
|
}): void;
|
|
1075
|
-
get selectedColumnDataType(): ColumnDataType;
|
|
1076
|
-
set selectedColumnDataType(value: ColumnDataType);
|
|
1077
|
-
getColumnDataType(column: ColumnDefinition | null): ColumnDataType;
|
|
1246
|
+
get selectedColumnDataType(): ColumnDataType$1;
|
|
1247
|
+
set selectedColumnDataType(value: ColumnDataType$1);
|
|
1248
|
+
getColumnDataType(column: ColumnDefinition | null): ColumnDataType$1;
|
|
1078
1249
|
/**
|
|
1079
1250
|
* Infer column data type from field name patterns (shared logic with PraxisTable)
|
|
1080
1251
|
*/
|
|
1081
1252
|
private inferFieldTypeFromFieldName;
|
|
1082
|
-
onDataTypeChange(dataType: ColumnDataType): void;
|
|
1253
|
+
onDataTypeChange(dataType: ColumnDataType$1): void;
|
|
1083
1254
|
showDataFormatter(column: ColumnDefinition | null): boolean;
|
|
1084
1255
|
getFormatterIcon(column: ColumnDefinition | null): string;
|
|
1085
1256
|
getFormatterPanelDescription(column: ColumnDefinition | null): string;
|
|
@@ -1116,6 +1287,7 @@ interface BehaviorConfigChange {
|
|
|
1116
1287
|
declare class BehaviorConfigEditorComponent implements OnInit, OnDestroy {
|
|
1117
1288
|
private fb;
|
|
1118
1289
|
config: TableConfig;
|
|
1290
|
+
resourcePath?: string;
|
|
1119
1291
|
configChange: EventEmitter<_praxisui_core.TableConfigModern>;
|
|
1120
1292
|
behaviorChange: EventEmitter<BehaviorConfigChange>;
|
|
1121
1293
|
behaviorForm: FormGroup;
|
|
@@ -1135,7 +1307,7 @@ declare class BehaviorConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1135
1307
|
private arrayToString;
|
|
1136
1308
|
private stringToArray;
|
|
1137
1309
|
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>;
|
|
1310
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BehaviorConfigEditorComponent, "behavior-config-editor", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; }, { "configChange": "configChange"; "behaviorChange": "behaviorChange"; }, never, never, true, never>;
|
|
1139
1311
|
}
|
|
1140
1312
|
|
|
1141
1313
|
interface ToolbarAction {
|
|
@@ -1289,6 +1461,8 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1289
1461
|
private initialResourcePath;
|
|
1290
1462
|
idField: string;
|
|
1291
1463
|
private initialIdField;
|
|
1464
|
+
horizontalScroll: 'auto' | 'wrap' | 'none';
|
|
1465
|
+
private initialHorizontalScroll;
|
|
1292
1466
|
crudContext?: {
|
|
1293
1467
|
tableId: string;
|
|
1294
1468
|
resourcePath?: string;
|
|
@@ -1330,6 +1504,7 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1330
1504
|
onColumnsConfigChange(newConfig: TableConfig): void;
|
|
1331
1505
|
onColumnChange(change: ColumnChange): void;
|
|
1332
1506
|
onFilterSettingsChange(cfg: FilterConfig): void;
|
|
1507
|
+
onRulesConfigChange(newCfg: TableConfig): void;
|
|
1333
1508
|
private updateColumnMetas;
|
|
1334
1509
|
private updateCanSaveState;
|
|
1335
1510
|
private subscribeCrudEditorChanges;
|
|
@@ -1348,9 +1523,9 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
1348
1523
|
getSettingsValue(): TableConfig;
|
|
1349
1524
|
onResourcePathChange(val: string): void;
|
|
1350
1525
|
onIdFieldChange(val: string): void;
|
|
1526
|
+
onHorizontalScrollChange(val: 'auto' | 'wrap' | 'none'): void;
|
|
1351
1527
|
onReconcileIdField(): void;
|
|
1352
1528
|
onAcceptServerHash(): void;
|
|
1353
|
-
onVisualRulesConfigChange(newConfig: TableConfig): void;
|
|
1354
1529
|
reset(): void;
|
|
1355
1530
|
onResetToDefaults(): void;
|
|
1356
1531
|
/**
|
|
@@ -1413,7 +1588,7 @@ declare const FILTER_DRAWER_ADAPTER: InjectionToken<FilterDrawerAdapter>;
|
|
|
1413
1588
|
declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
1414
1589
|
private cdr;
|
|
1415
1590
|
private formattingService;
|
|
1416
|
-
columnType: ColumnDataType;
|
|
1591
|
+
columnType: ColumnDataType$1;
|
|
1417
1592
|
currentFormat: string;
|
|
1418
1593
|
formatChange: EventEmitter<string>;
|
|
1419
1594
|
datePresets: FormatPreset[];
|
|
@@ -1553,6 +1728,7 @@ declare class FilterSettingsComponent implements OnChanges {
|
|
|
1553
1728
|
overlayVariant: FormControl<'card' | 'frosted'>;
|
|
1554
1729
|
overlayBackdrop: FormControl<boolean>;
|
|
1555
1730
|
advancedOpenMode: FormControl<'overlay' | 'modal' | 'drawer'>;
|
|
1731
|
+
showQuickFallback: FormControl<boolean>;
|
|
1556
1732
|
}>;
|
|
1557
1733
|
/**
|
|
1558
1734
|
* Emits true when form has changes and is valid, enabling the save button
|
|
@@ -1601,72 +1777,255 @@ declare class FilterSettingsComponent implements OnChanges {
|
|
|
1601
1777
|
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>;
|
|
1602
1778
|
}
|
|
1603
1779
|
|
|
1604
|
-
|
|
1780
|
+
type ColumnDataType = 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
1781
|
+
|
|
1782
|
+
type OperatorKey = '==' | '!=' | '<' | '<=' | '>' | '>=' | 'contains' | 'startsWith' | 'endsWith' | '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';
|
|
1783
|
+
interface OperatorSpec {
|
|
1784
|
+
key: OperatorKey;
|
|
1785
|
+
label: string;
|
|
1786
|
+
icon?: string;
|
|
1787
|
+
description?: string;
|
|
1788
|
+
}
|
|
1789
|
+
declare class OperatorsRegistryService {
|
|
1790
|
+
/** Returns the list of operator specs supported for a given data type. */
|
|
1791
|
+
getForType(type: ColumnDataType | 'enum' | 'array' | 'json' | 'relational'): OperatorSpec[];
|
|
1792
|
+
get keys(): OperatorKey[];
|
|
1793
|
+
private readonly stringOps;
|
|
1794
|
+
private readonly numberOps;
|
|
1795
|
+
private readonly dateOps;
|
|
1796
|
+
private readonly booleanOps;
|
|
1797
|
+
private readonly enumOps;
|
|
1798
|
+
private readonly arrayOps;
|
|
1799
|
+
private readonly jsonOps;
|
|
1800
|
+
private readonly relationalOps;
|
|
1801
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OperatorsRegistryService, never>;
|
|
1802
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OperatorsRegistryService>;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
type GroupOp = 'AND' | 'OR' | 'NOT';
|
|
1806
|
+
interface RuleAtom {
|
|
1807
|
+
field: string;
|
|
1808
|
+
operator: string;
|
|
1809
|
+
value?: any;
|
|
1810
|
+
options?: Record<string, any>;
|
|
1811
|
+
}
|
|
1812
|
+
interface RuleGroup {
|
|
1813
|
+
op: GroupOp;
|
|
1814
|
+
conditions: RuleAtom[];
|
|
1815
|
+
groups?: RuleGroup[];
|
|
1816
|
+
}
|
|
1817
|
+
declare class RuleCompilerService {
|
|
1818
|
+
/**
|
|
1819
|
+
* Compiles a rule group into a single DSL expression string, adding
|
|
1820
|
+
* parentheses according to grouping and operator precedence.
|
|
1821
|
+
*/
|
|
1822
|
+
compileGroup(group: RuleGroup): string;
|
|
1823
|
+
/** Compiles a single rule atom to DSL. */
|
|
1824
|
+
compileAtom(atom: RuleAtom): string;
|
|
1825
|
+
private stringify;
|
|
1826
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuleCompilerService, never>;
|
|
1827
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuleCompilerService>;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
type RuleItem = {
|
|
1831
|
+
condition: string;
|
|
1832
|
+
cssClass?: string;
|
|
1833
|
+
style?: Record<string, string>;
|
|
1834
|
+
description?: string;
|
|
1835
|
+
effects?: _praxisui_table_rule_builder.RuleEffectDefinition;
|
|
1836
|
+
enabled?: boolean;
|
|
1837
|
+
};
|
|
1838
|
+
declare class TableRulesEditorComponent implements OnChanges {
|
|
1839
|
+
private cdr;
|
|
1840
|
+
private registry;
|
|
1841
|
+
private compiler;
|
|
1842
|
+
private dynamicForm;
|
|
1843
|
+
private crud?;
|
|
1605
1844
|
config: TableConfig;
|
|
1845
|
+
resourcePath?: string;
|
|
1846
|
+
fields?: FieldDefinition[] | null;
|
|
1847
|
+
i18nRules?: Partial<Record<string, string>>;
|
|
1606
1848
|
configChange: EventEmitter<_praxisui_core.TableConfigModern>;
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1849
|
+
scope: 'row' | 'column';
|
|
1850
|
+
selectedColumnField: string | null;
|
|
1851
|
+
draftCondition: string;
|
|
1852
|
+
draftCssClass: string;
|
|
1853
|
+
draftStyleText: string;
|
|
1854
|
+
dslMode: boolean;
|
|
1855
|
+
dslErrors: string[];
|
|
1856
|
+
editIndex: number;
|
|
1857
|
+
get currentRules(): RuleItem[];
|
|
1858
|
+
set currentRules(v: RuleItem[]);
|
|
1859
|
+
rulesRow: RuleItem[];
|
|
1860
|
+
rulesColumn: RuleItem[];
|
|
1861
|
+
private parser;
|
|
1862
|
+
objectKeys: {
|
|
1863
|
+
(o: object): string[];
|
|
1864
|
+
(o: {}): string[];
|
|
1865
|
+
};
|
|
1866
|
+
dynamicValueForm: FormGroup;
|
|
1867
|
+
dynamicValueMetas: FieldMetadata[];
|
|
1868
|
+
effectsValue?: RuleEffectDefinition;
|
|
1869
|
+
dynamicValueActive: boolean;
|
|
1870
|
+
private dynamicValueSub?;
|
|
1871
|
+
basicFieldType: 'enum' | 'array' | 'json' | 'relational' | 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
1872
|
+
noValueOperator: boolean;
|
|
1873
|
+
i18nValuePlaceholder: string;
|
|
1874
|
+
enumOptions: Array<{
|
|
1875
|
+
value: any;
|
|
1876
|
+
label: string;
|
|
1619
1877
|
}>;
|
|
1620
|
-
private
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
private
|
|
1625
|
-
|
|
1626
|
-
private
|
|
1627
|
-
|
|
1628
|
-
|
|
1878
|
+
private updateDerivedUiProps;
|
|
1879
|
+
/** Enable verbose console logging for debugging value editor behavior */
|
|
1880
|
+
debugLogs: boolean;
|
|
1881
|
+
debugLevel: 'log' | 'info' | 'debug';
|
|
1882
|
+
private dbg;
|
|
1883
|
+
/** Log a summary table of field metadata and column info for diagnostics */
|
|
1884
|
+
private logFieldMetasContext;
|
|
1885
|
+
/** Log a focused view for a single field */
|
|
1886
|
+
private logSingleFieldMeta;
|
|
1887
|
+
private logFieldChoices;
|
|
1888
|
+
i18nDefault: Record<string, string>;
|
|
1889
|
+
t(key: string): string;
|
|
1890
|
+
constructor(cdr: ChangeDetectorRef, registry: OperatorsRegistryService, compiler: RuleCompilerService, dynamicForm: DynamicFormService, crud?: GenericCrudService<any> | undefined);
|
|
1891
|
+
ngOnInit(): void;
|
|
1892
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1893
|
+
get columnFields(): string[];
|
|
1894
|
+
getOperatorsForField(fieldName: string | null): string[];
|
|
1895
|
+
onScopeChange(_s: 'row' | 'column'): void;
|
|
1896
|
+
onColumnSelect(_field: string): void;
|
|
1897
|
+
private initFromConfig;
|
|
1898
|
+
private loadColumnRules;
|
|
1899
|
+
rebuildCondition(): void;
|
|
1900
|
+
onDraftChange(): void;
|
|
1901
|
+
onRelSearch(ev: any): void;
|
|
1902
|
+
clearRelSelection(): void;
|
|
1903
|
+
onRelSelectSingle(opt: any): void;
|
|
1904
|
+
onRelAddMulti(opt: any): void;
|
|
1905
|
+
removeRelMulti(i: number): void;
|
|
1906
|
+
private fetchRelOptions;
|
|
1907
|
+
private getRelationalConfig;
|
|
1908
|
+
validateDraft(): void;
|
|
1909
|
+
canCommitDraft(): boolean;
|
|
1910
|
+
addOrUpdateRule(): void;
|
|
1911
|
+
editRule(index: number): void;
|
|
1912
|
+
removeRule(index: number): void;
|
|
1913
|
+
duplicateRule(index: number): void;
|
|
1914
|
+
onRuleToggle(): void;
|
|
1915
|
+
onApply(): void;
|
|
1916
|
+
isValid(): boolean;
|
|
1917
|
+
onExportRules(): void;
|
|
1918
|
+
onImportRules(): void;
|
|
1919
|
+
private sanitizeRule;
|
|
1920
|
+
private buildRendererOverrideFromRule;
|
|
1921
|
+
private buildRowRendererOverrideFromRule;
|
|
1922
|
+
private stringifyValue;
|
|
1923
|
+
private extractIdentifiers;
|
|
1924
|
+
resetDraft(): void;
|
|
1925
|
+
basicField: string;
|
|
1926
|
+
basicOperator: string;
|
|
1927
|
+
basicValue: any;
|
|
1928
|
+
basicMin: any;
|
|
1929
|
+
basicMax: any;
|
|
1930
|
+
basicListCsv: string;
|
|
1931
|
+
basicDate: Date | null;
|
|
1932
|
+
basicDateStart: Date | null;
|
|
1933
|
+
basicDateEnd: Date | null;
|
|
1934
|
+
basicEnumValue: string | number | null;
|
|
1935
|
+
basicEnumValues: Array<string | number>;
|
|
1936
|
+
basicLength: number | null;
|
|
1937
|
+
relationalSelected: {
|
|
1938
|
+
id: any;
|
|
1939
|
+
label: string;
|
|
1940
|
+
raw: any;
|
|
1941
|
+
} | null;
|
|
1942
|
+
relationalSelectedMulti: Array<{
|
|
1943
|
+
id: any;
|
|
1944
|
+
label: string;
|
|
1945
|
+
raw: any;
|
|
1946
|
+
}>;
|
|
1947
|
+
relationalOptions: Array<{
|
|
1948
|
+
id: any;
|
|
1949
|
+
label: string;
|
|
1950
|
+
raw: any;
|
|
1951
|
+
}>;
|
|
1952
|
+
basicRelPath: string;
|
|
1953
|
+
private relSearchTerm;
|
|
1954
|
+
private relCache;
|
|
1955
|
+
basicLastN: number | null;
|
|
1956
|
+
basicLastUnit: 'days' | 'weeks' | 'months';
|
|
1957
|
+
basicWeekdays: number[];
|
|
1958
|
+
weekdayOptions: {
|
|
1959
|
+
value: number;
|
|
1629
1960
|
label: string;
|
|
1630
|
-
value: string;
|
|
1631
1961
|
}[];
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
private
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1962
|
+
basicJsonPath: string;
|
|
1963
|
+
basicJsonPattern: string;
|
|
1964
|
+
basicJsonKey: string;
|
|
1965
|
+
basicJsonExpected: any;
|
|
1966
|
+
draftGroup: RuleGroup;
|
|
1967
|
+
editAtomIndex: number;
|
|
1968
|
+
activeGroupTarget: 'root' | number;
|
|
1969
|
+
onEffectsChange(v: RuleEffectDefinition): void;
|
|
1970
|
+
private hasRuleEffectsValue;
|
|
1971
|
+
getFieldType(fieldName: string | null): 'enum' | 'array' | 'json' | 'relational' | 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
1972
|
+
getEnumOptions(fieldName: string | null): Array<{
|
|
1973
|
+
value: any;
|
|
1974
|
+
label: string;
|
|
1975
|
+
}>;
|
|
1976
|
+
isNoValueOperator(op: string): boolean;
|
|
1977
|
+
getValuePlaceholder(): string;
|
|
1978
|
+
getI18nValuePlaceholder(): string;
|
|
1979
|
+
private toIsoDateString;
|
|
1980
|
+
setDsl(v: boolean): void;
|
|
1981
|
+
onBasicFieldChange(_val: string): void;
|
|
1982
|
+
onBasicOperatorChange(_val: string): void;
|
|
1983
|
+
private refreshDynamicValueInitialValueOnly;
|
|
1984
|
+
refreshDynamicValueHost(): void;
|
|
1985
|
+
private buildAtomFromBasic;
|
|
1986
|
+
canBuildAtom(): boolean;
|
|
1987
|
+
onAddOrUpdateAtom(): void;
|
|
1988
|
+
editAtom(index: number): void;
|
|
1989
|
+
removeAtom(index: number): void;
|
|
1990
|
+
resetAtomEdit(): void;
|
|
1991
|
+
private focusAddCondition;
|
|
1992
|
+
clearGroup(): void;
|
|
1993
|
+
onDropCondition(evt: CdkDragDrop<RuleAtom[]>): void;
|
|
1994
|
+
updateDraftFromGroup(): void;
|
|
1995
|
+
getAtomPreview(a: RuleAtom): string;
|
|
1996
|
+
addSubgroup(): void;
|
|
1997
|
+
removeSubgroup(index: number): void;
|
|
1998
|
+
getGroupPreview(g: RuleGroup): string;
|
|
1999
|
+
private getActiveGroupRef;
|
|
2000
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableRulesEditorComponent, [null, null, null, null, { optional: true; }]>;
|
|
2001
|
+
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; }; "debugLogs": { "alias": "debugLogs"; "required": false; }; "debugLevel": { "alias": "debugLevel"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
|
|
1658
2002
|
}
|
|
1659
2003
|
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
declare function
|
|
1669
|
-
declare function
|
|
2004
|
+
/**
|
|
2005
|
+
* Lightweight JSON path evaluator for simple cases used in conditional styling.
|
|
2006
|
+
* Supported syntax (subset):
|
|
2007
|
+
* - $.a.b.c
|
|
2008
|
+
* - a.b[0].c
|
|
2009
|
+
* - a["key"] / a['key']
|
|
2010
|
+
* - a[0]
|
|
2011
|
+
*/
|
|
2012
|
+
declare function jsonPathGet(root: any, rawPath: string): any;
|
|
2013
|
+
declare function hasJsonKey(root: any, keyOrPath: string): boolean;
|
|
2014
|
+
declare function jsonPathMatches(root: any, path: string, pattern: string): boolean;
|
|
2015
|
+
/**
|
|
2016
|
+
* Registers JSON helpers in a DslParser instance, if it supports custom functions.
|
|
2017
|
+
* This is optional — call it in your app host bootstrap.
|
|
2018
|
+
*/
|
|
2019
|
+
declare function registerJsonDslFunctions(parser: DslParser | any): void;
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* Registers simple date/time helpers in a DslParser instance.
|
|
2023
|
+
* - today(): returns 'YYYY-MM-DD' (UTC)
|
|
2024
|
+
* - now(): returns Date ISO string (toISOString)
|
|
2025
|
+
* - dateAdd(date, amount, unit): adds amount (days|weeks|months) and returns 'YYYY-MM-DD'
|
|
2026
|
+
* - dateFormat(date, token): supports token 'E' (ISO weekday 1..7)
|
|
2027
|
+
*/
|
|
2028
|
+
declare function registerDateDslFunctions(parser: DslParser | any): void;
|
|
1670
2029
|
|
|
1671
2030
|
declare class FormulaGeneratorService {
|
|
1672
2031
|
/**
|
|
@@ -1771,5 +2130,5 @@ declare const PRAXIS_TABLE_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
1771
2130
|
*/
|
|
1772
2131
|
declare function providePraxisTableMetadata(): Provider;
|
|
1773
2132
|
|
|
1774
|
-
export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FILTER_DRAWER_ADAPTER, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TableDefaultsProvider,
|
|
1775
|
-
export type { ActionLike, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, ColumnChange, ColumnDataType, ConcatenationParams, ConditionalMappingParams,
|
|
2133
|
+
export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FILTER_DRAWER_ADAPTER, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TableDefaultsProvider, TableRulesEditorComponent, ToolbarActionsEditorComponent, ValueMappingEditorComponent, VisualFormulaBuilderComponent, getActionId, hasJsonKey, jsonPathGet, jsonPathMatches, providePraxisTableMetadata, registerDateDslFunctions, registerJsonDslFunctions };
|
|
2134
|
+
export type { ActionLike, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, ColumnChange, ColumnDataType$1 as ColumnDataType, ConcatenationParams, ConditionalMappingParams, CurrencyFormatterOptions, DateFormatterOptions, DefaultValueParams, FieldSchema, FilterConfig, FilterDrawerAdapter, FilterDrawerOpenConfig, FilterTag, FormatPreset, FormatterConfig, FormulaDefinition, FormulaParameterSchema, FormulaParams, FormulaTemplate, FormulaType, I18n, JsonEditorEvent, JsonValidationResult, MessagesLocalizationChange, NestedPropertyParams, NumberFormatterOptions, PercentageFormatterOptions, RowAction, RowActionConfig, RowActionsBehavior, StringFormatterOptions, ToolbarAction, ToolbarActionsChange, ValueMappingPair };
|