@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,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SheetState - Reactive state management for sheet operations
|
|
3
|
-
* Wraps TableState and adds sheet-level state tracking
|
|
4
|
-
*/
|
|
5
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
6
|
-
import { TableState } from './table-state.class';
|
|
7
|
-
import { SheetStateConfig, SheetMetadata, SheetStateSnapshot } from './sheet-state.interface';
|
|
8
|
-
import { ColumnConfig } from '../../models/column-config.interface';
|
|
9
|
-
import { TableStateConfig } from './table-state.interface';
|
|
10
|
-
/**
|
|
11
|
-
* SheetState class - Manages sheet-level state and delegates table operations
|
|
12
|
-
*/
|
|
13
|
-
export declare class SheetState {
|
|
14
|
-
/**
|
|
15
|
-
* Sheet identity
|
|
16
|
-
*/
|
|
17
|
-
readonly id: string;
|
|
18
|
-
/**
|
|
19
|
-
* Observable sheet name
|
|
20
|
-
*/
|
|
21
|
-
readonly name$: BehaviorSubject<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Table state instance (delegates table operations)
|
|
24
|
-
*/
|
|
25
|
-
readonly tableState: TableState;
|
|
26
|
-
/**
|
|
27
|
-
* Sheet metadata
|
|
28
|
-
*/
|
|
29
|
-
private _metadata$;
|
|
30
|
-
readonly metadata$: Observable<SheetMetadata>;
|
|
31
|
-
/**
|
|
32
|
-
* Constructor
|
|
33
|
-
* @param config Sheet state configuration
|
|
34
|
-
* @param columns Reference to columns array for table state
|
|
35
|
-
* @param tableStateConfig Optional table state configuration
|
|
36
|
-
*/
|
|
37
|
-
constructor(config: SheetStateConfig, columns: ColumnConfig<any>[], tableStateConfig?: TableStateConfig);
|
|
38
|
-
/**
|
|
39
|
-
* Update sheet name
|
|
40
|
-
* @param name New sheet name
|
|
41
|
-
*/
|
|
42
|
-
updateName(name: string): void;
|
|
43
|
-
/**
|
|
44
|
-
* Get current sheet name
|
|
45
|
-
*/
|
|
46
|
-
getName(): string;
|
|
47
|
-
/**
|
|
48
|
-
* Get complete state snapshot
|
|
49
|
-
*/
|
|
50
|
-
getSnapshot(): SheetStateSnapshot;
|
|
51
|
-
/**
|
|
52
|
-
* Reset sheet state
|
|
53
|
-
*/
|
|
54
|
-
reset(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Update last accessed timestamp
|
|
57
|
-
*/
|
|
58
|
-
updateLastAccessed(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Update last modified timestamp
|
|
61
|
-
*/
|
|
62
|
-
private updateLastModified;
|
|
63
|
-
/**
|
|
64
|
-
* Get current metadata
|
|
65
|
-
*/
|
|
66
|
-
getMetadata(): SheetMetadata;
|
|
67
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sheet state interfaces for state management
|
|
3
|
-
*/
|
|
4
|
-
import { TableStateSnapshot } from './table-types';
|
|
5
|
-
/**
|
|
6
|
-
* Configuration options for initializing SheetState
|
|
7
|
-
*/
|
|
8
|
-
export interface SheetStateConfig {
|
|
9
|
-
/**
|
|
10
|
-
* Sheet ID
|
|
11
|
-
*/
|
|
12
|
-
id: string;
|
|
13
|
-
/**
|
|
14
|
-
* Initial sheet name
|
|
15
|
-
*/
|
|
16
|
-
name: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Sheet metadata tracking
|
|
20
|
-
*/
|
|
21
|
-
export interface SheetMetadata {
|
|
22
|
-
/**
|
|
23
|
-
* When the sheet was created
|
|
24
|
-
*/
|
|
25
|
-
createdAt: Date;
|
|
26
|
-
/**
|
|
27
|
-
* When the sheet was last modified
|
|
28
|
-
*/
|
|
29
|
-
lastModified: Date;
|
|
30
|
-
/**
|
|
31
|
-
* When the sheet was last accessed
|
|
32
|
-
*/
|
|
33
|
-
lastAccessed: Date;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Complete snapshot of sheet state
|
|
37
|
-
*/
|
|
38
|
-
export interface SheetStateSnapshot {
|
|
39
|
-
/**
|
|
40
|
-
* Sheet ID
|
|
41
|
-
*/
|
|
42
|
-
id: string;
|
|
43
|
-
/**
|
|
44
|
-
* Sheet name
|
|
45
|
-
*/
|
|
46
|
-
name: string;
|
|
47
|
-
/**
|
|
48
|
-
* Table state snapshot
|
|
49
|
-
*/
|
|
50
|
-
tableStateSnapshot: TableStateSnapshot;
|
|
51
|
-
/**
|
|
52
|
-
* Sheet metadata
|
|
53
|
-
*/
|
|
54
|
-
metadata: SheetMetadata;
|
|
55
|
-
}
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TableState - Reactive state management for table operations
|
|
3
|
-
* Event-driven architecture: tracks state, emits events, consumer handles async data operations
|
|
4
|
-
*/
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import { ColumnConfig } from '../../models/column-config.interface';
|
|
7
|
-
import { PaginationState, SortDirection, FilterOperator, TableStateChangeEvent, TableStateSnapshot, CellFocusPosition } from './table-types';
|
|
8
|
-
import { TableStateConfig } from './table-state.interface';
|
|
9
|
-
import { NavigationDirection } from '../../models/cell-types';
|
|
10
|
-
import { TableValidationState } from './table-validation-state.interface';
|
|
11
|
-
/**
|
|
12
|
-
* TableState class - Column-driven, event-emitting state management
|
|
13
|
-
* NO data manipulation - only state tracking and event emission
|
|
14
|
-
*/
|
|
15
|
-
export declare class TableState {
|
|
16
|
-
private _columns;
|
|
17
|
-
private _pagination$;
|
|
18
|
-
private _stateChange$;
|
|
19
|
-
private _initialConfig;
|
|
20
|
-
private _rowNumberWidth;
|
|
21
|
-
private _settingsColumnWidth;
|
|
22
|
-
private _focusedCellPosition$;
|
|
23
|
-
readonly focusedCellPosition$: Observable<CellFocusPosition | null>;
|
|
24
|
-
private _editingCellPosition$;
|
|
25
|
-
readonly editingCellPosition$: Observable<CellFocusPosition | null>;
|
|
26
|
-
private _tableValidationState$;
|
|
27
|
-
readonly tableValidationState$: Observable<TableValidationState>;
|
|
28
|
-
private _requestAddRow$;
|
|
29
|
-
readonly requestAddRow$: Observable<{
|
|
30
|
-
focusColumn: number;
|
|
31
|
-
}>;
|
|
32
|
-
private _pendingFocusAfterRowAdd;
|
|
33
|
-
private _rowCount;
|
|
34
|
-
private _columnCount;
|
|
35
|
-
/**
|
|
36
|
-
* Observable of complete state snapshot
|
|
37
|
-
*/
|
|
38
|
-
readonly state$: Observable<TableStateSnapshot>;
|
|
39
|
-
/**
|
|
40
|
-
* Observable of state change events
|
|
41
|
-
*/
|
|
42
|
-
readonly stateChange$: Observable<TableStateChangeEvent>;
|
|
43
|
-
/**
|
|
44
|
-
* Observable of pagination state changes
|
|
45
|
-
*/
|
|
46
|
-
readonly paginationChange$: Observable<PaginationState>;
|
|
47
|
-
/**
|
|
48
|
-
* Constructor
|
|
49
|
-
* @param columns Reference to columns array
|
|
50
|
-
* @param config Initial configuration
|
|
51
|
-
*/
|
|
52
|
-
constructor(columns: ColumnConfig<any>[], config?: TableStateConfig);
|
|
53
|
-
/**
|
|
54
|
-
* Get current state snapshot
|
|
55
|
-
*/
|
|
56
|
-
getState(): TableStateSnapshot;
|
|
57
|
-
/**
|
|
58
|
-
* Get current pagination state
|
|
59
|
-
*/
|
|
60
|
-
getPagination(): PaginationState;
|
|
61
|
-
/**
|
|
62
|
-
* Get columns with sorting enabled
|
|
63
|
-
*/
|
|
64
|
-
getSortedColumns(): ColumnConfig<any>[];
|
|
65
|
-
/**
|
|
66
|
-
* Get columns with filtering enabled
|
|
67
|
-
*/
|
|
68
|
-
getFilteredColumns(): ColumnConfig<any>[];
|
|
69
|
-
/**
|
|
70
|
-
* Get current columns reference
|
|
71
|
-
*/
|
|
72
|
-
getColumns(): ColumnConfig<any>[];
|
|
73
|
-
/**
|
|
74
|
-
* Set current page
|
|
75
|
-
* @param page Page number (0-indexed)
|
|
76
|
-
*/
|
|
77
|
-
setPage(page: number): void;
|
|
78
|
-
/**
|
|
79
|
-
* Set page size
|
|
80
|
-
* @param size Number of items per page
|
|
81
|
-
*/
|
|
82
|
-
setPageSize(size: number): void;
|
|
83
|
-
/**
|
|
84
|
-
* Set total items (called after API response)
|
|
85
|
-
* @param total Total number of items
|
|
86
|
-
*/
|
|
87
|
-
setTotalItems(total: number): void;
|
|
88
|
-
/**
|
|
89
|
-
* Go to next page
|
|
90
|
-
*/
|
|
91
|
-
nextPage(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Go to previous page
|
|
94
|
-
*/
|
|
95
|
-
previousPage(): void;
|
|
96
|
-
/**
|
|
97
|
-
* Go to first page
|
|
98
|
-
*/
|
|
99
|
-
firstPage(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Go to last page
|
|
102
|
-
*/
|
|
103
|
-
lastPage(): void;
|
|
104
|
-
/**
|
|
105
|
-
* Check if there is a next page
|
|
106
|
-
*/
|
|
107
|
-
hasNextPage(): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Check if there is a previous page
|
|
110
|
-
*/
|
|
111
|
-
hasPreviousPage(): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Set sort on a column (clears other sorts)
|
|
114
|
-
* @param columnKey Column key
|
|
115
|
-
* @param direction Sort direction
|
|
116
|
-
*/
|
|
117
|
-
setSortOnColumn(columnKey: string, direction: SortDirection): void;
|
|
118
|
-
/**
|
|
119
|
-
* Add sort to a column (for multi-column sorting)
|
|
120
|
-
* @param columnKey Column key
|
|
121
|
-
* @param direction Sort direction
|
|
122
|
-
*/
|
|
123
|
-
addSortToColumn(columnKey: string, direction: SortDirection): void;
|
|
124
|
-
/**
|
|
125
|
-
* Toggle sort on a column (cycles through none -> asc -> desc -> none)
|
|
126
|
-
* @param columnKey Column key
|
|
127
|
-
*/
|
|
128
|
-
toggleSortOnColumn(columnKey: string): void;
|
|
129
|
-
/**
|
|
130
|
-
* Clear all sorting
|
|
131
|
-
*/
|
|
132
|
-
clearAllSorting(): void;
|
|
133
|
-
/**
|
|
134
|
-
* Get sort configuration for a column
|
|
135
|
-
* @param columnKey Column key
|
|
136
|
-
* @returns Sort configuration or null
|
|
137
|
-
*/
|
|
138
|
-
getSortForColumn(columnKey: string): {
|
|
139
|
-
direction: SortDirection;
|
|
140
|
-
enabled: boolean;
|
|
141
|
-
} | null;
|
|
142
|
-
/**
|
|
143
|
-
* Set filter on a column
|
|
144
|
-
* @param columnKey Column key
|
|
145
|
-
* @param operator Filter operator
|
|
146
|
-
* @param value Filter value
|
|
147
|
-
*/
|
|
148
|
-
setFilterOnColumn(columnKey: string, operator: FilterOperator, value: any): void;
|
|
149
|
-
/**
|
|
150
|
-
* Clear filter on a column
|
|
151
|
-
* @param columnKey Column key
|
|
152
|
-
*/
|
|
153
|
-
clearFilterOnColumn(columnKey: string): void;
|
|
154
|
-
/**
|
|
155
|
-
* Clear all filters
|
|
156
|
-
*/
|
|
157
|
-
clearAllFilters(): void;
|
|
158
|
-
/**
|
|
159
|
-
* Set filter enabled state
|
|
160
|
-
* @param columnKey Column key
|
|
161
|
-
* @param enabled Whether filter is enabled
|
|
162
|
-
*/
|
|
163
|
-
setFilterEnabled(columnKey: string, enabled: boolean): void;
|
|
164
|
-
/**
|
|
165
|
-
* Get filter configuration for a column
|
|
166
|
-
* @param columnKey Column key
|
|
167
|
-
* @returns Filter configuration or null
|
|
168
|
-
*/
|
|
169
|
-
getFilterForColumn(columnKey: string): {
|
|
170
|
-
operator: FilterOperator;
|
|
171
|
-
value: any;
|
|
172
|
-
enabled: boolean;
|
|
173
|
-
} | null;
|
|
174
|
-
/**
|
|
175
|
-
* Get sticky columns grouped by position
|
|
176
|
-
* @returns Object with left and right sticky column keys
|
|
177
|
-
*/
|
|
178
|
-
getStickyColumns(): {
|
|
179
|
-
left: string[];
|
|
180
|
-
right: string[];
|
|
181
|
-
};
|
|
182
|
-
/**
|
|
183
|
-
* Set sticky position for a column
|
|
184
|
-
* @param columnKey Column key
|
|
185
|
-
* @param position Sticky position ('left', 'right', or false)
|
|
186
|
-
*/
|
|
187
|
-
setStickyColumn(columnKey: string, position: 'left' | 'right' | false): void;
|
|
188
|
-
/**
|
|
189
|
-
* Calculate sticky offsets for all sticky columns
|
|
190
|
-
* This calculates cumulative widths for positioning
|
|
191
|
-
* @param rowNumberWidth Optional width of row number column to account for in left offset
|
|
192
|
-
* @param settingsColumnWidth Optional width of settings column to account for in right offset
|
|
193
|
-
*/
|
|
194
|
-
calculateStickyOffsets(rowNumberWidth?: number, settingsColumnWidth?: number): void;
|
|
195
|
-
/**
|
|
196
|
-
* Update columns reference
|
|
197
|
-
* @param columns New columns array
|
|
198
|
-
*/
|
|
199
|
-
updateColumns(columns: ColumnConfig<any>[]): void;
|
|
200
|
-
/**
|
|
201
|
-
* Toggle visibility of a column
|
|
202
|
-
* @param columnKey Column key
|
|
203
|
-
*/
|
|
204
|
-
toggleColumnVisibility(columnKey: string): void;
|
|
205
|
-
/**
|
|
206
|
-
* Set visibility of a column
|
|
207
|
-
* @param columnKey Column key
|
|
208
|
-
* @param visible Whether column should be visible
|
|
209
|
-
*/
|
|
210
|
-
setColumnVisibility(columnKey: string, visible: boolean): void;
|
|
211
|
-
/**
|
|
212
|
-
* Get all visible columns
|
|
213
|
-
* @returns Array of visible column configs
|
|
214
|
-
*/
|
|
215
|
-
getVisibleColumns(): ColumnConfig<any>[];
|
|
216
|
-
/**
|
|
217
|
-
* Get visibility state for all columns
|
|
218
|
-
* @returns Array of column visibility info
|
|
219
|
-
*/
|
|
220
|
-
getAllColumnsVisibility(): {
|
|
221
|
-
key: string;
|
|
222
|
-
header: string;
|
|
223
|
-
visible: boolean;
|
|
224
|
-
hideable: boolean;
|
|
225
|
-
}[];
|
|
226
|
-
/**
|
|
227
|
-
* Set table dimensions for navigation boundaries
|
|
228
|
-
*/
|
|
229
|
-
setDimensions(rowCount: number, columnCount: number): void;
|
|
230
|
-
/**
|
|
231
|
-
* Focus a cell by position
|
|
232
|
-
*/
|
|
233
|
-
focusCell(rowIndex: number, columnIndex: number): void;
|
|
234
|
-
/**
|
|
235
|
-
* Get currently focused position
|
|
236
|
-
*/
|
|
237
|
-
getFocusedPosition(): CellFocusPosition | null;
|
|
238
|
-
/**
|
|
239
|
-
* Notify that a cell entered edit mode
|
|
240
|
-
*/
|
|
241
|
-
setEditingCell(rowIndex: number, columnIndex: number): void;
|
|
242
|
-
/**
|
|
243
|
-
* Notify that edit mode ended
|
|
244
|
-
*/
|
|
245
|
-
clearEditingCell(): void;
|
|
246
|
-
/**
|
|
247
|
-
* Check if any cell is currently editing
|
|
248
|
-
*/
|
|
249
|
-
isAnyCellEditing(): boolean;
|
|
250
|
-
/**
|
|
251
|
-
* Get currently editing position
|
|
252
|
-
*/
|
|
253
|
-
getEditingPosition(): CellFocusPosition | null;
|
|
254
|
-
/**
|
|
255
|
-
* Move focus in a direction using NavigationDirection enum
|
|
256
|
-
* @param direction The navigation direction
|
|
257
|
-
* @param addRowOnNavigatePastEnd If true, emits requestAddRow when navigating past last row
|
|
258
|
-
*/
|
|
259
|
-
moveFocus(direction: NavigationDirection, addRowOnNavigatePastEnd?: boolean): boolean;
|
|
260
|
-
/**
|
|
261
|
-
* Clear focus
|
|
262
|
-
*/
|
|
263
|
-
clearFocus(): void;
|
|
264
|
-
/**
|
|
265
|
-
* Check if navigation is active
|
|
266
|
-
*/
|
|
267
|
-
isNavigationActive(): boolean;
|
|
268
|
-
/**
|
|
269
|
-
* Update cell validation and accumulate into row/table validation state
|
|
270
|
-
* Only stores invalid states - valid rows are automatically removed
|
|
271
|
-
*/
|
|
272
|
-
updateCellValidation(rowIndex: number, columnKey: string, isValid: boolean, error?: string): void;
|
|
273
|
-
/**
|
|
274
|
-
* Get current table validation state
|
|
275
|
-
*/
|
|
276
|
-
getTableValidationState(): TableValidationState;
|
|
277
|
-
/**
|
|
278
|
-
* Set total rows for validation state tracking
|
|
279
|
-
*/
|
|
280
|
-
setValidationRowCount(totalRows: number): void;
|
|
281
|
-
/**
|
|
282
|
-
* Reset to initial configuration
|
|
283
|
-
*/
|
|
284
|
-
reset(): void;
|
|
285
|
-
/**
|
|
286
|
-
* Reset pagination only
|
|
287
|
-
*/
|
|
288
|
-
resetPagination(): void;
|
|
289
|
-
/**
|
|
290
|
-
* Reset all column sorts
|
|
291
|
-
*/
|
|
292
|
-
resetAllSorting(): void;
|
|
293
|
-
/**
|
|
294
|
-
* Reset all column filters
|
|
295
|
-
*/
|
|
296
|
-
resetAllFilters(): void;
|
|
297
|
-
/**
|
|
298
|
-
* Find a column by key
|
|
299
|
-
* @param columnKey Column key
|
|
300
|
-
* @returns Column config or undefined
|
|
301
|
-
*/
|
|
302
|
-
private findColumn;
|
|
303
|
-
/**
|
|
304
|
-
* Calculate total pages
|
|
305
|
-
* @param totalItems Total number of items
|
|
306
|
-
* @param pageSize Page size
|
|
307
|
-
* @returns Total number of pages
|
|
308
|
-
*/
|
|
309
|
-
private calculateTotalPages;
|
|
310
|
-
/**
|
|
311
|
-
* Emit state change event
|
|
312
|
-
* @param type Type of change
|
|
313
|
-
*/
|
|
314
|
-
private emitStateChange;
|
|
315
|
-
/**
|
|
316
|
-
* Build state snapshot from current state
|
|
317
|
-
* @returns State snapshot
|
|
318
|
-
*/
|
|
319
|
-
private buildStateSnapshot;
|
|
320
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Table state interfaces for configuration and initialization
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Configuration options for initializing TableState
|
|
6
|
-
*/
|
|
7
|
-
export interface TableStateConfig {
|
|
8
|
-
/**
|
|
9
|
-
* Initial page number (0-indexed)
|
|
10
|
-
* @default 0
|
|
11
|
-
*/
|
|
12
|
-
initialPage?: number;
|
|
13
|
-
/**
|
|
14
|
-
* Number of items per page
|
|
15
|
-
* @default 25
|
|
16
|
-
*/
|
|
17
|
-
pageSize?: number;
|
|
18
|
-
}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Table types and enumerations for state management
|
|
3
|
-
*/
|
|
4
|
-
import type { ColumnConfig } from '../../models/column-config.interface';
|
|
5
|
-
/**
|
|
6
|
-
* Sort direction for columns
|
|
7
|
-
*/
|
|
8
|
-
export declare enum SortDirection {
|
|
9
|
-
NONE = "none",
|
|
10
|
-
ASC = "asc",
|
|
11
|
-
DESC = "desc"
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Filter operators for column filtering
|
|
15
|
-
*/
|
|
16
|
-
export declare enum FilterOperator {
|
|
17
|
-
EQUALS = "equals",
|
|
18
|
-
CONTAINS = "contains",
|
|
19
|
-
STARTS_WITH = "startsWith",
|
|
20
|
-
ENDS_WITH = "endsWith",
|
|
21
|
-
GT = "gt",
|
|
22
|
-
LT = "lt",
|
|
23
|
-
GTE = "gte",
|
|
24
|
-
LTE = "lte",
|
|
25
|
-
BETWEEN = "between",
|
|
26
|
-
IN = "in"
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Pagination state for table
|
|
30
|
-
*/
|
|
31
|
-
export interface PaginationState {
|
|
32
|
-
currentPage: number;
|
|
33
|
-
pageSize: number;
|
|
34
|
-
totalItems: number;
|
|
35
|
-
totalPages: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Sort state for a column
|
|
39
|
-
* Contains full information about an active sort operation
|
|
40
|
-
*/
|
|
41
|
-
export interface ColumnSortState {
|
|
42
|
-
columnKey: string;
|
|
43
|
-
direction: SortDirection;
|
|
44
|
-
priority?: number;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Filter state for a column
|
|
48
|
-
* Contains full information about an active filter operation
|
|
49
|
-
*/
|
|
50
|
-
export interface ColumnFilterState {
|
|
51
|
-
columnKey: string;
|
|
52
|
-
operator: FilterOperator;
|
|
53
|
-
value: any;
|
|
54
|
-
enabled: boolean;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Cell focus position for keyboard navigation
|
|
58
|
-
*/
|
|
59
|
-
export interface CellFocusPosition {
|
|
60
|
-
rowIndex: number;
|
|
61
|
-
columnIndex: number;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Table state change event
|
|
65
|
-
*/
|
|
66
|
-
export interface TableStateChangeEvent {
|
|
67
|
-
type: 'pagination' | 'sorting' | 'filtering' | 'column-config' | 'column-visibility' | 'cell-focus' | 'cell-edit-start' | 'cell-edit-end';
|
|
68
|
-
state: TableStateSnapshot;
|
|
69
|
-
focusPosition?: CellFocusPosition;
|
|
70
|
-
editingPosition?: CellFocusPosition;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Snapshot of current table state
|
|
74
|
-
* Contains complete state information for sorting, filtering, and pagination
|
|
75
|
-
*/
|
|
76
|
-
export interface TableStateSnapshot {
|
|
77
|
-
pagination: PaginationState;
|
|
78
|
-
sortedColumns: ColumnSortState[];
|
|
79
|
-
filteredColumns: ColumnFilterState[];
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Column resize event
|
|
83
|
-
* Emitted when a column is resized by the user
|
|
84
|
-
*/
|
|
85
|
-
export interface ColumnResizeEvent {
|
|
86
|
-
/**
|
|
87
|
-
* Key of the resized column
|
|
88
|
-
*/
|
|
89
|
-
columnKey: string;
|
|
90
|
-
/**
|
|
91
|
-
* Previous width before resize
|
|
92
|
-
*/
|
|
93
|
-
oldWidth: number;
|
|
94
|
-
/**
|
|
95
|
-
* New width after resize
|
|
96
|
-
*/
|
|
97
|
-
newWidth: number;
|
|
98
|
-
/**
|
|
99
|
-
* The column configuration
|
|
100
|
-
*/
|
|
101
|
-
column: ColumnConfig;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Column sort toggle event
|
|
105
|
-
* Emitted when a column's sort direction is changed
|
|
106
|
-
*/
|
|
107
|
-
export interface ColumnSortEvent {
|
|
108
|
-
/**
|
|
109
|
-
* Key of the sorted column
|
|
110
|
-
*/
|
|
111
|
-
columnKey: string;
|
|
112
|
-
/**
|
|
113
|
-
* New sort direction
|
|
114
|
-
*/
|
|
115
|
-
direction: SortDirection;
|
|
116
|
-
/**
|
|
117
|
-
* Previous sort direction
|
|
118
|
-
*/
|
|
119
|
-
previousDirection: SortDirection;
|
|
120
|
-
/**
|
|
121
|
-
* The column configuration
|
|
122
|
-
*/
|
|
123
|
-
column: ColumnConfig;
|
|
124
|
-
/**
|
|
125
|
-
* Current table state snapshot
|
|
126
|
-
*/
|
|
127
|
-
tableState: TableStateSnapshot;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Column filter change event
|
|
131
|
-
* Emitted when a column filter is modified
|
|
132
|
-
*/
|
|
133
|
-
export interface ColumnFilterEvent {
|
|
134
|
-
/**
|
|
135
|
-
* Key of the filtered column
|
|
136
|
-
*/
|
|
137
|
-
columnKey: string;
|
|
138
|
-
/**
|
|
139
|
-
* Filter operator
|
|
140
|
-
*/
|
|
141
|
-
operator: FilterOperator;
|
|
142
|
-
/**
|
|
143
|
-
* Filter value
|
|
144
|
-
*/
|
|
145
|
-
value: any;
|
|
146
|
-
/**
|
|
147
|
-
* Previous filter value
|
|
148
|
-
*/
|
|
149
|
-
previousValue?: any;
|
|
150
|
-
/**
|
|
151
|
-
* Whether filter is enabled
|
|
152
|
-
*/
|
|
153
|
-
enabled: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* The column configuration
|
|
156
|
-
*/
|
|
157
|
-
column: ColumnConfig;
|
|
158
|
-
/**
|
|
159
|
-
* Current table state snapshot
|
|
160
|
-
*/
|
|
161
|
-
tableState: TableStateSnapshot;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Column moved event
|
|
165
|
-
* Emitted when a column is reordered
|
|
166
|
-
*/
|
|
167
|
-
export interface ColumnMoveEvent {
|
|
168
|
-
/**
|
|
169
|
-
* Key of the moved column
|
|
170
|
-
*/
|
|
171
|
-
columnKey: string;
|
|
172
|
-
/**
|
|
173
|
-
* Direction of movement
|
|
174
|
-
*/
|
|
175
|
-
direction: 'left' | 'right';
|
|
176
|
-
/**
|
|
177
|
-
* Original column index
|
|
178
|
-
*/
|
|
179
|
-
oldIndex: number;
|
|
180
|
-
/**
|
|
181
|
-
* New column index after move
|
|
182
|
-
*/
|
|
183
|
-
newIndex: number;
|
|
184
|
-
/**
|
|
185
|
-
* The column configuration
|
|
186
|
-
*/
|
|
187
|
-
column: ColumnConfig;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Column added event
|
|
191
|
-
* Emitted when a new column is added to the table
|
|
192
|
-
*/
|
|
193
|
-
export interface ColumnAddEvent {
|
|
194
|
-
/**
|
|
195
|
-
* The newly added column configuration
|
|
196
|
-
*/
|
|
197
|
-
column: ColumnConfig;
|
|
198
|
-
/**
|
|
199
|
-
* Index where column was added
|
|
200
|
-
*/
|
|
201
|
-
index: number;
|
|
202
|
-
/**
|
|
203
|
-
* Total number of columns after addition
|
|
204
|
-
*/
|
|
205
|
-
totalColumns: number;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Data change event
|
|
209
|
-
* Emitted when table data is updated (via sync or async input)
|
|
210
|
-
*/
|
|
211
|
-
export interface DataChangeEvent {
|
|
212
|
-
/**
|
|
213
|
-
* Previous data array reference
|
|
214
|
-
*/
|
|
215
|
-
previousData: any[];
|
|
216
|
-
/**
|
|
217
|
-
* Current data array reference
|
|
218
|
-
*/
|
|
219
|
-
currentData: any[];
|
|
220
|
-
/**
|
|
221
|
-
* Timestamp when change occurred
|
|
222
|
-
*/
|
|
223
|
-
timestamp: number;
|
|
224
|
-
/**
|
|
225
|
-
* Source of the data change
|
|
226
|
-
*/
|
|
227
|
-
source: 'sync' | 'async';
|
|
228
|
-
}
|