@aquera/ngx-smart-table 0.0.17-alpha → 0.0.19-alpha
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/{fesm2020 → fesm2022}/aquera-ngx-smart-table.mjs +1579 -2101
- package/fesm2022/aquera-ngx-smart-table.mjs.map +1 -0
- package/package.json +8 -16
- package/types/aquera-ngx-smart-table.d.ts +5909 -0
- package/aquera-ngx-smart-table.d.ts +0 -5
- package/esm2020/aquera-ngx-smart-table.mjs +0 -5
- package/esm2020/lib/builder/components/builder-preview/builder-preview.component.mjs +0 -63
- package/esm2020/lib/builder/components/builder-toolbar/builder-toolbar.component.mjs +0 -115
- package/esm2020/lib/builder/components/column-editor/column-editor.component.mjs +0 -206
- package/esm2020/lib/builder/components/column-list/column-list.component.mjs +0 -125
- package/esm2020/lib/builder/components/definition-builder/definition-builder.component.mjs +0 -105
- package/esm2020/lib/builder/components/table-config-editor/table-config-editor.component.mjs +0 -132
- package/esm2020/lib/builder/definition-builder.module.mjs +0 -70
- package/esm2020/lib/builder/models/builder-state.interface.mjs +0 -5
- package/esm2020/lib/builder/services/definition-builder.service.mjs +0 -251
- package/esm2020/lib/builder/services/definition-export.service.mjs +0 -167
- package/esm2020/lib/builder/services/definition-import.service.mjs +0 -193
- package/esm2020/lib/builder/services/sample-data-generator.service.mjs +0 -126
- package/esm2020/lib/builder/utils/config-validator.util.mjs +0 -165
- package/esm2020/lib/builder/utils/typescript-generator.util.mjs +0 -206
- package/esm2020/lib/editors/index.mjs +0 -9
- package/esm2020/lib/editors/nile-autocomplete-editor.mjs +0 -228
- package/esm2020/lib/editors/nile-calendar-editor.mjs +0 -211
- package/esm2020/lib/editors/nile-date-picker-editor.mjs +0 -188
- package/esm2020/lib/editors/nile-input-editor.mjs +0 -235
- package/esm2020/lib/editors/nile-select-editor.mjs +0 -498
- package/esm2020/lib/factories/column-config.factory.mjs +0 -231
- package/esm2020/lib/models/autosave-config.interface.mjs +0 -8
- package/esm2020/lib/models/base-column-config.class.mjs +0 -253
- package/esm2020/lib/models/cell-strategies.interface.mjs +0 -6
- package/esm2020/lib/models/cell-types.mjs +0 -147
- package/esm2020/lib/models/column-action.interface.mjs +0 -6
- package/esm2020/lib/models/column-config.interface.mjs +0 -43
- package/esm2020/lib/models/column-config.utils.mjs +0 -101
- package/esm2020/lib/models/row-action.interface.mjs +0 -5
- package/esm2020/lib/models/row-validator.interface.mjs +0 -2
- package/esm2020/lib/models/schema-validation.interface.mjs +0 -2
- package/esm2020/lib/models/sheet-action.interface.mjs +0 -5
- package/esm2020/lib/models/sheet-config.interface.mjs +0 -5
- package/esm2020/lib/models/table-config.interface.mjs +0 -107
- package/esm2020/lib/models/table-validator.interface.mjs +0 -2
- package/esm2020/lib/models/workbook-action.interface.mjs +0 -5
- package/esm2020/lib/models/workbook-config.interface.mjs +0 -5
- package/esm2020/lib/renderer/components/st-add-column-button/st-add-column-button.component.mjs +0 -24
- package/esm2020/lib/renderer/components/st-cell/st-cell.component.mjs +0 -397
- package/esm2020/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.mjs +0 -103
- package/esm2020/lib/renderer/components/st-column-filter/st-column-filter.component.mjs +0 -383
- package/esm2020/lib/renderer/components/st-column-menu/st-column-menu.component.mjs +0 -232
- package/esm2020/lib/renderer/components/st-column-visibility/st-column-visibility.component.mjs +0 -97
- package/esm2020/lib/renderer/components/st-header/st-header.component.mjs +0 -157
- package/esm2020/lib/renderer/components/st-pagination/st-pagination.component.mjs +0 -87
- package/esm2020/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.mjs +0 -167
- package/esm2020/lib/renderer/components/st-sheet/st-sheet.component.mjs +0 -165
- package/esm2020/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.mjs +0 -112
- package/esm2020/lib/renderer/components/st-table/st-table.component.mjs +0 -1453
- package/esm2020/lib/renderer/components/st-table-actions/st-table-actions.component.mjs +0 -169
- package/esm2020/lib/renderer/components/st-workbook/st-workbook.component.mjs +0 -581
- package/esm2020/lib/renderer/directives/click-outside.directive.mjs +0 -28
- package/esm2020/lib/renderer/directives/st-column-resize.directive.mjs +0 -108
- package/esm2020/lib/renderer/directives/st-keyboard-navigation.directive.mjs +0 -83
- package/esm2020/lib/renderer/models/cell-state.interface.mjs +0 -66
- package/esm2020/lib/renderer/models/cell.class.mjs +0 -389
- package/esm2020/lib/renderer/models/row-validation-state.interface.mjs +0 -7
- package/esm2020/lib/renderer/models/sheet-state.class.mjs +0 -90
- package/esm2020/lib/renderer/models/sheet-state.interface.mjs +0 -5
- package/esm2020/lib/renderer/models/table-state.class.mjs +0 -871
- package/esm2020/lib/renderer/models/table-state.interface.mjs +0 -5
- package/esm2020/lib/renderer/models/table-types.mjs +0 -29
- package/esm2020/lib/renderer/models/table-validation-state.interface.mjs +0 -7
- package/esm2020/lib/renderer/models/workbook-state.class.mjs +0 -174
- package/esm2020/lib/renderer/models/workbook-state.interface.mjs +0 -5
- package/esm2020/lib/renderer/models/z-index.enum.mjs +0 -55
- package/esm2020/lib/schemas/table-config.schema.mjs +0 -472
- package/esm2020/lib/services/autosave.service.mjs +0 -92
- package/esm2020/lib/services/custom-validation-rules.util.mjs +0 -124
- package/esm2020/lib/services/json-schema-validator.service.mjs +0 -216
- package/esm2020/lib/services/row-validation.service.mjs +0 -42
- package/esm2020/lib/services/validation-logger.service.mjs +0 -177
- package/esm2020/lib/services/virtual-scroll.service.mjs +0 -52
- package/esm2020/lib/shared/shared-table-components.module.mjs +0 -35
- package/esm2020/lib/smart-table.module.mjs +0 -124
- package/esm2020/lib/strategies/default-editors.mjs +0 -433
- package/esm2020/lib/strategies/default-formatters.mjs +0 -238
- package/esm2020/lib/strategies/default-validators.mjs +0 -327
- package/esm2020/public-api.mjs +0 -146
- package/fesm2015/aquera-ngx-smart-table.mjs +0 -12347
- package/fesm2015/aquera-ngx-smart-table.mjs.map +0 -1
- package/fesm2020/aquera-ngx-smart-table.mjs.map +0 -1
- package/lib/builder/components/builder-preview/builder-preview.component.d.ts +0 -31
- package/lib/builder/components/builder-toolbar/builder-toolbar.component.d.ts +0 -53
- package/lib/builder/components/column-editor/column-editor.component.d.ts +0 -69
- package/lib/builder/components/column-list/column-list.component.d.ts +0 -65
- package/lib/builder/components/definition-builder/definition-builder.component.d.ts +0 -58
- package/lib/builder/components/table-config-editor/table-config-editor.component.d.ts +0 -32
- package/lib/builder/definition-builder.module.d.ts +0 -15
- package/lib/builder/models/builder-state.interface.d.ts +0 -93
- package/lib/builder/services/definition-builder.service.d.ts +0 -80
- package/lib/builder/services/definition-export.service.d.ts +0 -59
- package/lib/builder/services/definition-import.service.d.ts +0 -31
- package/lib/builder/services/sample-data-generator.service.d.ts +0 -41
- package/lib/builder/utils/config-validator.util.d.ts +0 -32
- package/lib/builder/utils/typescript-generator.util.d.ts +0 -29
- package/lib/editors/index.d.ts +0 -8
- package/lib/editors/nile-autocomplete-editor.d.ts +0 -102
- package/lib/editors/nile-calendar-editor.d.ts +0 -88
- package/lib/editors/nile-date-picker-editor.d.ts +0 -97
- package/lib/editors/nile-input-editor.d.ts +0 -67
- package/lib/editors/nile-select-editor.d.ts +0 -113
- package/lib/factories/column-config.factory.d.ts +0 -73
- package/lib/models/autosave-config.interface.d.ts +0 -23
- package/lib/models/base-column-config.class.d.ts +0 -115
- package/lib/models/cell-strategies.interface.d.ts +0 -188
- package/lib/models/cell-types.d.ts +0 -337
- package/lib/models/column-action.interface.d.ts +0 -86
- package/lib/models/column-config.interface.d.ts +0 -272
- package/lib/models/column-config.utils.d.ts +0 -37
- package/lib/models/row-action.interface.d.ts +0 -86
- package/lib/models/row-validator.interface.d.ts +0 -37
- package/lib/models/schema-validation.interface.d.ts +0 -42
- package/lib/models/sheet-action.interface.d.ts +0 -59
- package/lib/models/sheet-config.interface.d.ts +0 -41
- package/lib/models/table-config.interface.d.ts +0 -251
- package/lib/models/table-validator.interface.d.ts +0 -40
- package/lib/models/workbook-action.interface.d.ts +0 -95
- package/lib/models/workbook-config.interface.d.ts +0 -107
- package/lib/renderer/components/st-add-column-button/st-add-column-button.component.d.ts +0 -9
- package/lib/renderer/components/st-cell/st-cell.component.d.ts +0 -69
- package/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.d.ts +0 -39
- package/lib/renderer/components/st-column-filter/st-column-filter.component.d.ts +0 -139
- package/lib/renderer/components/st-column-menu/st-column-menu.component.d.ts +0 -81
- package/lib/renderer/components/st-column-visibility/st-column-visibility.component.d.ts +0 -44
- package/lib/renderer/components/st-header/st-header.component.d.ts +0 -93
- package/lib/renderer/components/st-pagination/st-pagination.component.d.ts +0 -42
- package/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.d.ts +0 -67
- package/lib/renderer/components/st-sheet/st-sheet.component.d.ts +0 -98
- package/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.d.ts +0 -58
- package/lib/renderer/components/st-table/st-table.component.d.ts +0 -380
- package/lib/renderer/components/st-table-actions/st-table-actions.component.d.ts +0 -77
- package/lib/renderer/components/st-workbook/st-workbook.component.d.ts +0 -275
- package/lib/renderer/directives/click-outside.directive.d.ts +0 -10
- package/lib/renderer/directives/st-column-resize.directive.d.ts +0 -44
- package/lib/renderer/directives/st-keyboard-navigation.directive.d.ts +0 -19
- package/lib/renderer/models/cell-state.interface.d.ts +0 -118
- package/lib/renderer/models/cell.class.d.ts +0 -174
- package/lib/renderer/models/row-validation-state.interface.d.ts +0 -27
- package/lib/renderer/models/sheet-state.class.d.ts +0 -67
- package/lib/renderer/models/sheet-state.interface.d.ts +0 -55
- package/lib/renderer/models/table-state.class.d.ts +0 -320
- package/lib/renderer/models/table-state.interface.d.ts +0 -18
- package/lib/renderer/models/table-types.d.ts +0 -228
- package/lib/renderer/models/table-validation-state.interface.d.ts +0 -34
- package/lib/renderer/models/workbook-state.class.d.ts +0 -117
- package/lib/renderer/models/workbook-state.interface.d.ts +0 -71
- package/lib/renderer/models/z-index.enum.d.ts +0 -44
- package/lib/schemas/table-config.schema.d.ts +0 -455
- package/lib/services/autosave.service.d.ts +0 -73
- package/lib/services/custom-validation-rules.util.d.ts +0 -12
- package/lib/services/json-schema-validator.service.d.ts +0 -49
- package/lib/services/row-validation.service.d.ts +0 -17
- package/lib/services/validation-logger.service.d.ts +0 -87
- package/lib/services/virtual-scroll.service.d.ts +0 -44
- package/lib/shared/shared-table-components.module.d.ts +0 -9
- package/lib/smart-table.module.d.ts +0 -26
- package/lib/strategies/default-editors.d.ts +0 -109
- package/lib/strategies/default-formatters.d.ts +0 -116
- package/lib/strategies/default-validators.d.ts +0 -113
- package/public-api.d.ts +0 -70
- package/src/lib/builder/README.md +0 -30
- package/src/lib/editors/README.md +0 -303
- package/src/lib/renderer/components/st-column-filter/README.md +0 -286
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
|
-
import { ColumnConfig } from '../../../models/column-config.interface';
|
|
3
|
-
import { Cell } from '../../models/cell.class';
|
|
4
|
-
import { TableState } from '../../models/table-state.class';
|
|
5
|
-
import { TableConfig } from '../../../models/table-config.interface';
|
|
6
|
-
import { TableStateChangeEvent, ColumnResizeEvent, ColumnAddEvent, ColumnMoveEvent, DataChangeEvent } from '../../models/table-types';
|
|
7
|
-
import { CellChangeEvent, CellSaveEvent, CellEditEvent, CellCancelEvent, EditMode, NavigationDirection } from '../../../models/cell-types';
|
|
8
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
9
|
-
import { JsonSchemaValidatorService } from '../../../services/json-schema-validator.service';
|
|
10
|
-
import { SchemaValidationError } from '../../../models/schema-validation.interface';
|
|
11
|
-
import { ValidationLoggerService } from '../../../services/validation-logger.service';
|
|
12
|
-
import { VirtualScrollService } from '../../../services/virtual-scroll.service';
|
|
13
|
-
import { RowAction, RowActionContext, RowActionEvent } from '../../../models/row-action.interface';
|
|
14
|
-
import { ColumnActionContext, ColumnActionEvent } from '../../../models/column-action.interface';
|
|
15
|
-
import { TableZIndex } from '../../models/z-index.enum';
|
|
16
|
-
import { TableValidationState } from '../../models/table-validation-state.interface';
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
export declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
19
|
-
private schemaValidator;
|
|
20
|
-
private logger;
|
|
21
|
-
private virtualScrollService;
|
|
22
|
-
private elementRef;
|
|
23
|
-
readonly ZIndex: typeof TableZIndex;
|
|
24
|
-
tableConfig: TableConfig;
|
|
25
|
-
data?: any[];
|
|
26
|
-
data$?: Observable<any[]> | BehaviorSubject<any[]>;
|
|
27
|
-
tableState?: TableState;
|
|
28
|
-
enableSorting: boolean;
|
|
29
|
-
enableFiltering: boolean;
|
|
30
|
-
stateChange: EventEmitter<TableStateChangeEvent>;
|
|
31
|
-
dataChange: EventEmitter<DataChangeEvent>;
|
|
32
|
-
cellEdit: EventEmitter<CellEditEvent<any>>;
|
|
33
|
-
cellSave: EventEmitter<CellSaveEvent<any>>;
|
|
34
|
-
cellCancel: EventEmitter<CellCancelEvent<any>>;
|
|
35
|
-
cellChange: EventEmitter<CellChangeEvent<any>>;
|
|
36
|
-
columnResized: EventEmitter<ColumnResizeEvent>;
|
|
37
|
-
columnMoved: EventEmitter<ColumnMoveEvent>;
|
|
38
|
-
configValidationErrors: EventEmitter<SchemaValidationError[]>;
|
|
39
|
-
columnAdded: EventEmitter<ColumnAddEvent>;
|
|
40
|
-
rowAction: EventEmitter<RowActionEvent>;
|
|
41
|
-
validationStateChange: EventEmitter<TableValidationState>;
|
|
42
|
-
requestAddRow: EventEmitter<{
|
|
43
|
-
focusColumn?: number | undefined;
|
|
44
|
-
}>;
|
|
45
|
-
validateConfig: boolean;
|
|
46
|
-
private internalTableState?;
|
|
47
|
-
private internalCellGrid?;
|
|
48
|
-
private stateSubscription?;
|
|
49
|
-
private focusSubscription?;
|
|
50
|
-
private validationSubscription?;
|
|
51
|
-
private dataSubscription?;
|
|
52
|
-
private requestAddRowSubscription?;
|
|
53
|
-
private internalData$;
|
|
54
|
-
private previousData;
|
|
55
|
-
mergedConfig: TableConfig;
|
|
56
|
-
showColumnModal: boolean;
|
|
57
|
-
visibleColumns: ColumnConfig<any>[];
|
|
58
|
-
visibleCellGrid: Cell<any>[][];
|
|
59
|
-
dropdownState: {
|
|
60
|
-
isOpen: boolean;
|
|
61
|
-
position: {
|
|
62
|
-
x: number;
|
|
63
|
-
y: number;
|
|
64
|
-
};
|
|
65
|
-
context: RowActionContext | null;
|
|
66
|
-
};
|
|
67
|
-
skeletonColumns?: number[];
|
|
68
|
-
skeletonRows?: number[];
|
|
69
|
-
columnMenuState: {
|
|
70
|
-
isOpen: boolean;
|
|
71
|
-
position: {
|
|
72
|
-
x: number;
|
|
73
|
-
y: number;
|
|
74
|
-
};
|
|
75
|
-
context: ColumnActionContext | null;
|
|
76
|
-
};
|
|
77
|
-
private scrollContainer?;
|
|
78
|
-
private scrollSubscription?;
|
|
79
|
-
private virtualScrollState$;
|
|
80
|
-
virtualScrollTotalHeight$: Observable<number>;
|
|
81
|
-
virtualScrollOffsetY$: Observable<number>;
|
|
82
|
-
virtualScrollOffsetYNeg$: Observable<number>;
|
|
83
|
-
visibleRows$: Observable<Cell<any>[][]>;
|
|
84
|
-
scrollViewport?: ElementRef<HTMLElement>;
|
|
85
|
-
constructor(schemaValidator: JsonSchemaValidatorService, logger: ValidationLoggerService, virtualScrollService: VirtualScrollService, elementRef: ElementRef<HTMLElement>);
|
|
86
|
-
ngOnInit(): void;
|
|
87
|
-
ngAfterViewInit(): void;
|
|
88
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
89
|
-
/**
|
|
90
|
-
* Create internal TableState from config
|
|
91
|
-
*/
|
|
92
|
-
private createInternalTableState;
|
|
93
|
-
private subscribeToValidationState;
|
|
94
|
-
private subscribeToInternalState;
|
|
95
|
-
/**
|
|
96
|
-
* Subscribe to external TableState changes
|
|
97
|
-
*/
|
|
98
|
-
private subscribeToExternalTableState;
|
|
99
|
-
/**
|
|
100
|
-
* Create cell grid from raw data
|
|
101
|
-
*/
|
|
102
|
-
private createCellGridFromData;
|
|
103
|
-
/**
|
|
104
|
-
* Setup data source - either sync array or async Observable
|
|
105
|
-
* Handles initialization and subscription to data changes
|
|
106
|
-
*/
|
|
107
|
-
private setupDataSource;
|
|
108
|
-
/**
|
|
109
|
-
* Subscribe to data changes (either from data$ input or internal BehaviorSubject)
|
|
110
|
-
*/
|
|
111
|
-
private subscribeToDataChanges;
|
|
112
|
-
/**
|
|
113
|
-
* Handle data change from Observable emission
|
|
114
|
-
*/
|
|
115
|
-
private handleDataChange;
|
|
116
|
-
/**
|
|
117
|
-
* Handle sync data change (from @Input() data changes)
|
|
118
|
-
*/
|
|
119
|
-
private handleSyncDataChange;
|
|
120
|
-
/**
|
|
121
|
-
* Get active TableState (provided or internal)
|
|
122
|
-
*/
|
|
123
|
-
getActiveTableState(): TableState;
|
|
124
|
-
/**
|
|
125
|
-
* Get active cell grid (provided or internal)
|
|
126
|
-
*/
|
|
127
|
-
getActiveCellGrid(): Cell<any>[][];
|
|
128
|
-
/**
|
|
129
|
-
* Get visible cell grid (filtered to only include visible columns)
|
|
130
|
-
*/
|
|
131
|
-
getVisibleCellGrid(): Cell<any>[][];
|
|
132
|
-
/**
|
|
133
|
-
* Update the visible cell grid based on current visibility and column order
|
|
134
|
-
* Called when data, visibility, or column order changes
|
|
135
|
-
*
|
|
136
|
-
* This method properly handles column reordering by mapping cells based on
|
|
137
|
-
* column keys rather than indices, ensuring cells follow their columns.
|
|
138
|
-
*/
|
|
139
|
-
private updateVisibleCellGrid;
|
|
140
|
-
/**
|
|
141
|
-
* Update the visible columns based on current visibility
|
|
142
|
-
* Called only when visibility actually changes
|
|
143
|
-
*/
|
|
144
|
-
private updateVisibleColumns;
|
|
145
|
-
/**
|
|
146
|
-
* Update both visible columns and cell grid
|
|
147
|
-
* Call this whenever data or visibility changes
|
|
148
|
-
*/
|
|
149
|
-
private updateVisibleData;
|
|
150
|
-
/**
|
|
151
|
-
* Get active columns (from config or legacy input)
|
|
152
|
-
*/
|
|
153
|
-
getActiveColumns(): ColumnConfig<any>[];
|
|
154
|
-
/**
|
|
155
|
-
* Get visible columns (filtered by visibility property)
|
|
156
|
-
* Also recalculates sticky offsets based on visible columns only
|
|
157
|
-
*/
|
|
158
|
-
getVisibleColumns(): ColumnConfig<any>[];
|
|
159
|
-
/**
|
|
160
|
-
* Recalculate sticky offsets based on visible columns only
|
|
161
|
-
* This ensures correct positioning when columns are hidden
|
|
162
|
-
*/
|
|
163
|
-
private recalculateVisibleStickyOffsets;
|
|
164
|
-
onCellChange(event: CellChangeEvent): void;
|
|
165
|
-
onColumnResized(event: ColumnResizeEvent): void;
|
|
166
|
-
onColumnMoved(event: {
|
|
167
|
-
columnKey: string;
|
|
168
|
-
direction: 'left' | 'right';
|
|
169
|
-
}): void;
|
|
170
|
-
/**
|
|
171
|
-
* Move column to position just before right sticky columns (used when pinning right)
|
|
172
|
-
*/
|
|
173
|
-
private moveColumnToEnd;
|
|
174
|
-
/**
|
|
175
|
-
* Get cumulative left offset for a sticky column on the left side
|
|
176
|
-
*/
|
|
177
|
-
getStickyLeftOffset(columnKey: string): number;
|
|
178
|
-
/**
|
|
179
|
-
* Get cumulative right offset for a sticky column on the right side
|
|
180
|
-
*/
|
|
181
|
-
getStickyRightOffset(columnKey: string): number;
|
|
182
|
-
/**
|
|
183
|
-
* Check if top pagination should be shown
|
|
184
|
-
*/
|
|
185
|
-
showTopPagination(): boolean;
|
|
186
|
-
/**
|
|
187
|
-
* Check if bottom pagination should be shown
|
|
188
|
-
*/
|
|
189
|
-
showBottomPagination(): boolean;
|
|
190
|
-
/**
|
|
191
|
-
* Validate table configuration
|
|
192
|
-
* @param config Table configuration to validate
|
|
193
|
-
*/
|
|
194
|
-
private validateConfiguration;
|
|
195
|
-
/**
|
|
196
|
-
* Handle add column button click
|
|
197
|
-
*/
|
|
198
|
-
onAddColumnClick(): void;
|
|
199
|
-
/**
|
|
200
|
-
* Handle column created from modal
|
|
201
|
-
*/
|
|
202
|
-
onColumnCreated(column: ColumnConfig): void;
|
|
203
|
-
/**
|
|
204
|
-
* Handle modal cancelled
|
|
205
|
-
*/
|
|
206
|
-
onModalCancelled(): void;
|
|
207
|
-
/**
|
|
208
|
-
* Check if virtual scroll is enabled
|
|
209
|
-
*/
|
|
210
|
-
isVirtualScrollEnabled(): boolean;
|
|
211
|
-
/**
|
|
212
|
-
* Check if column is the first sticky-right column (for shadow styling)
|
|
213
|
-
*/
|
|
214
|
-
isFirstStickyRight(columnKey: string): boolean;
|
|
215
|
-
/**
|
|
216
|
-
* Get virtual scroll item size
|
|
217
|
-
*/
|
|
218
|
-
getVirtualScrollItemSize(): number;
|
|
219
|
-
/**
|
|
220
|
-
* Get viewport height
|
|
221
|
-
*/
|
|
222
|
-
getVirtualScrollViewportHeight(): number;
|
|
223
|
-
/**
|
|
224
|
-
* Get buffer size
|
|
225
|
-
*/
|
|
226
|
-
getVirtualScrollBufferSize(): number;
|
|
227
|
-
/**
|
|
228
|
-
* Initialize virtual scroll state
|
|
229
|
-
*/
|
|
230
|
-
private initializeVirtualScroll;
|
|
231
|
-
/**
|
|
232
|
-
* Setup scroll event listener
|
|
233
|
-
*/
|
|
234
|
-
private setupVirtualScrollListener;
|
|
235
|
-
/**
|
|
236
|
-
* Handle virtual scroll event
|
|
237
|
-
*/
|
|
238
|
-
private onVirtualScroll;
|
|
239
|
-
/**
|
|
240
|
-
* Get row index for tracking
|
|
241
|
-
*/
|
|
242
|
-
getAbsoluteRowIndex(relativeIndex: number): number;
|
|
243
|
-
/**
|
|
244
|
-
* TrackBy function for better performance
|
|
245
|
-
*/
|
|
246
|
-
trackByRowIndex: (index: number, row: Cell<any>[]) => number;
|
|
247
|
-
/**
|
|
248
|
-
* Scroll to specific row programmatically
|
|
249
|
-
*/
|
|
250
|
-
scrollToRow(index: number): void;
|
|
251
|
-
/**
|
|
252
|
-
* Check if row actions are enabled
|
|
253
|
-
*/
|
|
254
|
-
hasRowActions(): boolean;
|
|
255
|
-
/**
|
|
256
|
-
* Get row actions from config
|
|
257
|
-
*/
|
|
258
|
-
getRowActions(): RowAction[];
|
|
259
|
-
/**
|
|
260
|
-
* Get row data from cell grid
|
|
261
|
-
*/
|
|
262
|
-
getRowData(rowIndex: number): any;
|
|
263
|
-
/**
|
|
264
|
-
* Open row actions dropdown
|
|
265
|
-
*/
|
|
266
|
-
openRowActionsDropdown(event: MouseEvent, rowData: any, rowIndex: number): void;
|
|
267
|
-
/**
|
|
268
|
-
* Close row actions dropdown
|
|
269
|
-
*/
|
|
270
|
-
closeRowActionsDropdown(): void;
|
|
271
|
-
/**
|
|
272
|
-
* Handle row action clicked
|
|
273
|
-
*/
|
|
274
|
-
onRowActionClicked(event: RowActionEvent): void;
|
|
275
|
-
/**
|
|
276
|
-
* Open column menu dropdown
|
|
277
|
-
*/
|
|
278
|
-
openColumnMenu(event: MouseEvent, column: ColumnConfig<any>, columnIndex: number, isFirst: boolean, isLast: boolean): void;
|
|
279
|
-
/**
|
|
280
|
-
* Close column menu dropdown
|
|
281
|
-
*/
|
|
282
|
-
closeColumnMenu(): void;
|
|
283
|
-
/**
|
|
284
|
-
* Handle column action clicked
|
|
285
|
-
*/
|
|
286
|
-
onColumnActionClicked(event: ColumnActionEvent): void;
|
|
287
|
-
/**
|
|
288
|
-
* Get column actions (built-in + custom)
|
|
289
|
-
*/
|
|
290
|
-
private getColumnActions;
|
|
291
|
-
/**
|
|
292
|
-
* Get built-in column actions (sort, filter, pin, move)
|
|
293
|
-
*/
|
|
294
|
-
private getBuiltInColumnActions;
|
|
295
|
-
/**
|
|
296
|
-
* Get sort label based on column data type
|
|
297
|
-
*/
|
|
298
|
-
private getSortLabel;
|
|
299
|
-
/**
|
|
300
|
-
* Initialize keyboard navigation
|
|
301
|
-
*/
|
|
302
|
-
private initializeKeyboardNavigation;
|
|
303
|
-
/**
|
|
304
|
-
* Update focus state in all cells
|
|
305
|
-
*/
|
|
306
|
-
private updateCellFocusStates;
|
|
307
|
-
/**
|
|
308
|
-
* Focus the TD element in the DOM and scroll it into view,
|
|
309
|
-
* accounting for sticky columns on left and right
|
|
310
|
-
*/
|
|
311
|
-
private focusTdElement;
|
|
312
|
-
/**
|
|
313
|
-
* Scroll a cell into view, accounting for sticky columns
|
|
314
|
-
*/
|
|
315
|
-
private scrollCellIntoView;
|
|
316
|
-
/**
|
|
317
|
-
* Scroll to a specific row by index and optionally focus it
|
|
318
|
-
* @param rowIndex - The index of the row to scroll to
|
|
319
|
-
* @param focusFirstCell - Whether to focus the first editable cell (default: false)
|
|
320
|
-
*/
|
|
321
|
-
scrollToRowAndFocus(rowIndex: number, focusFirstCell?: boolean): void;
|
|
322
|
-
/**
|
|
323
|
-
* Scroll to the last row in the table
|
|
324
|
-
* @param focusFirstCell - Whether to focus the first editable cell (default: true)
|
|
325
|
-
*/
|
|
326
|
-
scrollToLastRow(focusFirstCell?: boolean): void;
|
|
327
|
-
/**
|
|
328
|
-
* Get the scroll container element
|
|
329
|
-
*/
|
|
330
|
-
private getScrollContainerElement;
|
|
331
|
-
/**
|
|
332
|
-
* Calculate total width of sticky columns on left and right
|
|
333
|
-
*/
|
|
334
|
-
private calculateStickyWidths;
|
|
335
|
-
/**
|
|
336
|
-
* Handle cell click
|
|
337
|
-
*/
|
|
338
|
-
onCellClick(rowIndex: number, columnIndex: number): void;
|
|
339
|
-
/**
|
|
340
|
-
* Handle cell entering edit mode
|
|
341
|
-
*/
|
|
342
|
-
onCellEdit(event: CellEditEvent): void;
|
|
343
|
-
/**
|
|
344
|
-
* Handle cell save
|
|
345
|
-
*/
|
|
346
|
-
onCellSave(event: CellSaveEvent): void;
|
|
347
|
-
/**
|
|
348
|
-
* Handle cell cancel
|
|
349
|
-
*/
|
|
350
|
-
onCellCancel(event: CellCancelEvent): void;
|
|
351
|
-
/**
|
|
352
|
-
* Handle cell save with navigation (Excel-like behavior)
|
|
353
|
-
*/
|
|
354
|
-
onCellSaveAndNavigate(event: {
|
|
355
|
-
event: KeyboardEvent;
|
|
356
|
-
direction: NavigationDirection;
|
|
357
|
-
}): void;
|
|
358
|
-
/**
|
|
359
|
-
* Handle focus on table container - focus first cell if no cell is focused
|
|
360
|
-
*/
|
|
361
|
-
onTableContainerFocus(event: FocusEvent): void;
|
|
362
|
-
/**
|
|
363
|
-
* Check if keyboard navigation is enabled
|
|
364
|
-
*/
|
|
365
|
-
isKeyboardNavigationEnabled(): boolean;
|
|
366
|
-
/**
|
|
367
|
-
* Get EditMode enum value for cells
|
|
368
|
-
* For Excel-like tables with keyboard navigation, use ENTER mode
|
|
369
|
-
* which allows arrow key navigation without triggering edit.
|
|
370
|
-
* Double-click will still work to start editing.
|
|
371
|
-
*/
|
|
372
|
-
getEditModeForCells(): EditMode;
|
|
373
|
-
/**
|
|
374
|
-
* Clear focus when clicking outside table
|
|
375
|
-
*/
|
|
376
|
-
onDocumentClick(event: MouseEvent): void;
|
|
377
|
-
ngOnDestroy(): void;
|
|
378
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StTableComponent, never>;
|
|
379
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StTableComponent, "st-table", never, { "tableConfig": "tableConfig"; "data": "data"; "data$": "data$"; "tableState": "tableState"; "enableSorting": "enableSorting"; "enableFiltering": "enableFiltering"; "validateConfig": "validateConfig"; }, { "stateChange": "stateChange"; "dataChange": "dataChange"; "cellEdit": "cellEdit"; "cellSave": "cellSave"; "cellCancel": "cellCancel"; "cellChange": "cellChange"; "columnResized": "columnResized"; "columnMoved": "columnMoved"; "configValidationErrors": "configValidationErrors"; "columnAdded": "columnAdded"; "rowAction": "rowAction"; "validationStateChange": "validationStateChange"; "requestAddRow": "requestAddRow"; }, never, never>;
|
|
380
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { TableState } from '../../models/table-state.class';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
declare type MenuView = 'main' | 'columns';
|
|
5
|
-
export declare class StTableActionsComponent implements OnInit, OnDestroy {
|
|
6
|
-
tableState: TableState;
|
|
7
|
-
allowAddColumn: boolean;
|
|
8
|
-
addColumnClicked: EventEmitter<void>;
|
|
9
|
-
isOpen: boolean;
|
|
10
|
-
currentView: MenuView;
|
|
11
|
-
columnsVisibility: {
|
|
12
|
-
key: string;
|
|
13
|
-
header: string;
|
|
14
|
-
visible: boolean;
|
|
15
|
-
hideable: boolean;
|
|
16
|
-
}[];
|
|
17
|
-
/**
|
|
18
|
-
* Dropdown positioning style
|
|
19
|
-
*/
|
|
20
|
-
dropdownStyle: any;
|
|
21
|
-
private stateSubscription?;
|
|
22
|
-
constructor();
|
|
23
|
-
ngOnInit(): void;
|
|
24
|
-
ngOnDestroy(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Update columns visibility list from current table state
|
|
27
|
-
*/
|
|
28
|
-
private updateColumnsVisibility;
|
|
29
|
-
/**
|
|
30
|
-
* Subscribe to table state changes
|
|
31
|
-
*/
|
|
32
|
-
private subscribeToStateChanges;
|
|
33
|
-
/**
|
|
34
|
-
* Toggle menu open/close
|
|
35
|
-
*/
|
|
36
|
-
toggleMenu(event: Event): void;
|
|
37
|
-
/**
|
|
38
|
-
* Update dropdown position based on trigger button
|
|
39
|
-
*/
|
|
40
|
-
private updateDropdownPosition;
|
|
41
|
-
/**
|
|
42
|
-
* Close menu
|
|
43
|
-
*/
|
|
44
|
-
closeMenu(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Handle add column action
|
|
47
|
-
*/
|
|
48
|
-
onAddColumn(event: Event): void;
|
|
49
|
-
/**
|
|
50
|
-
* Open column visibility submenu
|
|
51
|
-
*/
|
|
52
|
-
openColumnsSubmenu(event: Event): void;
|
|
53
|
-
/**
|
|
54
|
-
* Go back to main menu
|
|
55
|
-
*/
|
|
56
|
-
backToMain(event: Event): void;
|
|
57
|
-
/**
|
|
58
|
-
* Toggle column visibility
|
|
59
|
-
*/
|
|
60
|
-
onToggleColumn(columnKey: string, event: Event): void;
|
|
61
|
-
/**
|
|
62
|
-
* Check if column is visible
|
|
63
|
-
*/
|
|
64
|
-
isColumnVisible(columnKey: string): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Check if column is hideable
|
|
67
|
-
*/
|
|
68
|
-
isColumnHideable(column: {
|
|
69
|
-
key: string;
|
|
70
|
-
header: string;
|
|
71
|
-
visible: boolean;
|
|
72
|
-
hideable: boolean;
|
|
73
|
-
}): boolean;
|
|
74
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StTableActionsComponent, never>;
|
|
75
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StTableActionsComponent, "st-table-actions", never, { "tableState": "tableState"; "allowAddColumn": "allowAddColumn"; }, { "addColumnClicked": "addColumnClicked"; }, never, never>;
|
|
76
|
-
}
|
|
77
|
-
export {};
|