@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.
Files changed (170) hide show
  1. package/{fesm2020 → fesm2022}/aquera-ngx-smart-table.mjs +1579 -2101
  2. package/fesm2022/aquera-ngx-smart-table.mjs.map +1 -0
  3. package/package.json +8 -16
  4. package/types/aquera-ngx-smart-table.d.ts +5909 -0
  5. package/aquera-ngx-smart-table.d.ts +0 -5
  6. package/esm2020/aquera-ngx-smart-table.mjs +0 -5
  7. package/esm2020/lib/builder/components/builder-preview/builder-preview.component.mjs +0 -63
  8. package/esm2020/lib/builder/components/builder-toolbar/builder-toolbar.component.mjs +0 -115
  9. package/esm2020/lib/builder/components/column-editor/column-editor.component.mjs +0 -206
  10. package/esm2020/lib/builder/components/column-list/column-list.component.mjs +0 -125
  11. package/esm2020/lib/builder/components/definition-builder/definition-builder.component.mjs +0 -105
  12. package/esm2020/lib/builder/components/table-config-editor/table-config-editor.component.mjs +0 -132
  13. package/esm2020/lib/builder/definition-builder.module.mjs +0 -70
  14. package/esm2020/lib/builder/models/builder-state.interface.mjs +0 -5
  15. package/esm2020/lib/builder/services/definition-builder.service.mjs +0 -251
  16. package/esm2020/lib/builder/services/definition-export.service.mjs +0 -167
  17. package/esm2020/lib/builder/services/definition-import.service.mjs +0 -193
  18. package/esm2020/lib/builder/services/sample-data-generator.service.mjs +0 -126
  19. package/esm2020/lib/builder/utils/config-validator.util.mjs +0 -165
  20. package/esm2020/lib/builder/utils/typescript-generator.util.mjs +0 -206
  21. package/esm2020/lib/editors/index.mjs +0 -9
  22. package/esm2020/lib/editors/nile-autocomplete-editor.mjs +0 -228
  23. package/esm2020/lib/editors/nile-calendar-editor.mjs +0 -211
  24. package/esm2020/lib/editors/nile-date-picker-editor.mjs +0 -188
  25. package/esm2020/lib/editors/nile-input-editor.mjs +0 -235
  26. package/esm2020/lib/editors/nile-select-editor.mjs +0 -498
  27. package/esm2020/lib/factories/column-config.factory.mjs +0 -231
  28. package/esm2020/lib/models/autosave-config.interface.mjs +0 -8
  29. package/esm2020/lib/models/base-column-config.class.mjs +0 -253
  30. package/esm2020/lib/models/cell-strategies.interface.mjs +0 -6
  31. package/esm2020/lib/models/cell-types.mjs +0 -147
  32. package/esm2020/lib/models/column-action.interface.mjs +0 -6
  33. package/esm2020/lib/models/column-config.interface.mjs +0 -43
  34. package/esm2020/lib/models/column-config.utils.mjs +0 -101
  35. package/esm2020/lib/models/row-action.interface.mjs +0 -5
  36. package/esm2020/lib/models/row-validator.interface.mjs +0 -2
  37. package/esm2020/lib/models/schema-validation.interface.mjs +0 -2
  38. package/esm2020/lib/models/sheet-action.interface.mjs +0 -5
  39. package/esm2020/lib/models/sheet-config.interface.mjs +0 -5
  40. package/esm2020/lib/models/table-config.interface.mjs +0 -107
  41. package/esm2020/lib/models/table-validator.interface.mjs +0 -2
  42. package/esm2020/lib/models/workbook-action.interface.mjs +0 -5
  43. package/esm2020/lib/models/workbook-config.interface.mjs +0 -5
  44. package/esm2020/lib/renderer/components/st-add-column-button/st-add-column-button.component.mjs +0 -24
  45. package/esm2020/lib/renderer/components/st-cell/st-cell.component.mjs +0 -397
  46. package/esm2020/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.mjs +0 -103
  47. package/esm2020/lib/renderer/components/st-column-filter/st-column-filter.component.mjs +0 -383
  48. package/esm2020/lib/renderer/components/st-column-menu/st-column-menu.component.mjs +0 -232
  49. package/esm2020/lib/renderer/components/st-column-visibility/st-column-visibility.component.mjs +0 -97
  50. package/esm2020/lib/renderer/components/st-header/st-header.component.mjs +0 -157
  51. package/esm2020/lib/renderer/components/st-pagination/st-pagination.component.mjs +0 -87
  52. package/esm2020/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.mjs +0 -167
  53. package/esm2020/lib/renderer/components/st-sheet/st-sheet.component.mjs +0 -165
  54. package/esm2020/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.mjs +0 -112
  55. package/esm2020/lib/renderer/components/st-table/st-table.component.mjs +0 -1453
  56. package/esm2020/lib/renderer/components/st-table-actions/st-table-actions.component.mjs +0 -169
  57. package/esm2020/lib/renderer/components/st-workbook/st-workbook.component.mjs +0 -581
  58. package/esm2020/lib/renderer/directives/click-outside.directive.mjs +0 -28
  59. package/esm2020/lib/renderer/directives/st-column-resize.directive.mjs +0 -108
  60. package/esm2020/lib/renderer/directives/st-keyboard-navigation.directive.mjs +0 -83
  61. package/esm2020/lib/renderer/models/cell-state.interface.mjs +0 -66
  62. package/esm2020/lib/renderer/models/cell.class.mjs +0 -389
  63. package/esm2020/lib/renderer/models/row-validation-state.interface.mjs +0 -7
  64. package/esm2020/lib/renderer/models/sheet-state.class.mjs +0 -90
  65. package/esm2020/lib/renderer/models/sheet-state.interface.mjs +0 -5
  66. package/esm2020/lib/renderer/models/table-state.class.mjs +0 -871
  67. package/esm2020/lib/renderer/models/table-state.interface.mjs +0 -5
  68. package/esm2020/lib/renderer/models/table-types.mjs +0 -29
  69. package/esm2020/lib/renderer/models/table-validation-state.interface.mjs +0 -7
  70. package/esm2020/lib/renderer/models/workbook-state.class.mjs +0 -174
  71. package/esm2020/lib/renderer/models/workbook-state.interface.mjs +0 -5
  72. package/esm2020/lib/renderer/models/z-index.enum.mjs +0 -55
  73. package/esm2020/lib/schemas/table-config.schema.mjs +0 -472
  74. package/esm2020/lib/services/autosave.service.mjs +0 -92
  75. package/esm2020/lib/services/custom-validation-rules.util.mjs +0 -124
  76. package/esm2020/lib/services/json-schema-validator.service.mjs +0 -216
  77. package/esm2020/lib/services/row-validation.service.mjs +0 -42
  78. package/esm2020/lib/services/validation-logger.service.mjs +0 -177
  79. package/esm2020/lib/services/virtual-scroll.service.mjs +0 -52
  80. package/esm2020/lib/shared/shared-table-components.module.mjs +0 -35
  81. package/esm2020/lib/smart-table.module.mjs +0 -124
  82. package/esm2020/lib/strategies/default-editors.mjs +0 -433
  83. package/esm2020/lib/strategies/default-formatters.mjs +0 -238
  84. package/esm2020/lib/strategies/default-validators.mjs +0 -327
  85. package/esm2020/public-api.mjs +0 -146
  86. package/fesm2015/aquera-ngx-smart-table.mjs +0 -12347
  87. package/fesm2015/aquera-ngx-smart-table.mjs.map +0 -1
  88. package/fesm2020/aquera-ngx-smart-table.mjs.map +0 -1
  89. package/lib/builder/components/builder-preview/builder-preview.component.d.ts +0 -31
  90. package/lib/builder/components/builder-toolbar/builder-toolbar.component.d.ts +0 -53
  91. package/lib/builder/components/column-editor/column-editor.component.d.ts +0 -69
  92. package/lib/builder/components/column-list/column-list.component.d.ts +0 -65
  93. package/lib/builder/components/definition-builder/definition-builder.component.d.ts +0 -58
  94. package/lib/builder/components/table-config-editor/table-config-editor.component.d.ts +0 -32
  95. package/lib/builder/definition-builder.module.d.ts +0 -15
  96. package/lib/builder/models/builder-state.interface.d.ts +0 -93
  97. package/lib/builder/services/definition-builder.service.d.ts +0 -80
  98. package/lib/builder/services/definition-export.service.d.ts +0 -59
  99. package/lib/builder/services/definition-import.service.d.ts +0 -31
  100. package/lib/builder/services/sample-data-generator.service.d.ts +0 -41
  101. package/lib/builder/utils/config-validator.util.d.ts +0 -32
  102. package/lib/builder/utils/typescript-generator.util.d.ts +0 -29
  103. package/lib/editors/index.d.ts +0 -8
  104. package/lib/editors/nile-autocomplete-editor.d.ts +0 -102
  105. package/lib/editors/nile-calendar-editor.d.ts +0 -88
  106. package/lib/editors/nile-date-picker-editor.d.ts +0 -97
  107. package/lib/editors/nile-input-editor.d.ts +0 -67
  108. package/lib/editors/nile-select-editor.d.ts +0 -113
  109. package/lib/factories/column-config.factory.d.ts +0 -73
  110. package/lib/models/autosave-config.interface.d.ts +0 -23
  111. package/lib/models/base-column-config.class.d.ts +0 -115
  112. package/lib/models/cell-strategies.interface.d.ts +0 -188
  113. package/lib/models/cell-types.d.ts +0 -337
  114. package/lib/models/column-action.interface.d.ts +0 -86
  115. package/lib/models/column-config.interface.d.ts +0 -272
  116. package/lib/models/column-config.utils.d.ts +0 -37
  117. package/lib/models/row-action.interface.d.ts +0 -86
  118. package/lib/models/row-validator.interface.d.ts +0 -37
  119. package/lib/models/schema-validation.interface.d.ts +0 -42
  120. package/lib/models/sheet-action.interface.d.ts +0 -59
  121. package/lib/models/sheet-config.interface.d.ts +0 -41
  122. package/lib/models/table-config.interface.d.ts +0 -251
  123. package/lib/models/table-validator.interface.d.ts +0 -40
  124. package/lib/models/workbook-action.interface.d.ts +0 -95
  125. package/lib/models/workbook-config.interface.d.ts +0 -107
  126. package/lib/renderer/components/st-add-column-button/st-add-column-button.component.d.ts +0 -9
  127. package/lib/renderer/components/st-cell/st-cell.component.d.ts +0 -69
  128. package/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.d.ts +0 -39
  129. package/lib/renderer/components/st-column-filter/st-column-filter.component.d.ts +0 -139
  130. package/lib/renderer/components/st-column-menu/st-column-menu.component.d.ts +0 -81
  131. package/lib/renderer/components/st-column-visibility/st-column-visibility.component.d.ts +0 -44
  132. package/lib/renderer/components/st-header/st-header.component.d.ts +0 -93
  133. package/lib/renderer/components/st-pagination/st-pagination.component.d.ts +0 -42
  134. package/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.d.ts +0 -67
  135. package/lib/renderer/components/st-sheet/st-sheet.component.d.ts +0 -98
  136. package/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.d.ts +0 -58
  137. package/lib/renderer/components/st-table/st-table.component.d.ts +0 -380
  138. package/lib/renderer/components/st-table-actions/st-table-actions.component.d.ts +0 -77
  139. package/lib/renderer/components/st-workbook/st-workbook.component.d.ts +0 -275
  140. package/lib/renderer/directives/click-outside.directive.d.ts +0 -10
  141. package/lib/renderer/directives/st-column-resize.directive.d.ts +0 -44
  142. package/lib/renderer/directives/st-keyboard-navigation.directive.d.ts +0 -19
  143. package/lib/renderer/models/cell-state.interface.d.ts +0 -118
  144. package/lib/renderer/models/cell.class.d.ts +0 -174
  145. package/lib/renderer/models/row-validation-state.interface.d.ts +0 -27
  146. package/lib/renderer/models/sheet-state.class.d.ts +0 -67
  147. package/lib/renderer/models/sheet-state.interface.d.ts +0 -55
  148. package/lib/renderer/models/table-state.class.d.ts +0 -320
  149. package/lib/renderer/models/table-state.interface.d.ts +0 -18
  150. package/lib/renderer/models/table-types.d.ts +0 -228
  151. package/lib/renderer/models/table-validation-state.interface.d.ts +0 -34
  152. package/lib/renderer/models/workbook-state.class.d.ts +0 -117
  153. package/lib/renderer/models/workbook-state.interface.d.ts +0 -71
  154. package/lib/renderer/models/z-index.enum.d.ts +0 -44
  155. package/lib/schemas/table-config.schema.d.ts +0 -455
  156. package/lib/services/autosave.service.d.ts +0 -73
  157. package/lib/services/custom-validation-rules.util.d.ts +0 -12
  158. package/lib/services/json-schema-validator.service.d.ts +0 -49
  159. package/lib/services/row-validation.service.d.ts +0 -17
  160. package/lib/services/validation-logger.service.d.ts +0 -87
  161. package/lib/services/virtual-scroll.service.d.ts +0 -44
  162. package/lib/shared/shared-table-components.module.d.ts +0 -9
  163. package/lib/smart-table.module.d.ts +0 -26
  164. package/lib/strategies/default-editors.d.ts +0 -109
  165. package/lib/strategies/default-formatters.d.ts +0 -116
  166. package/lib/strategies/default-validators.d.ts +0 -113
  167. package/public-api.d.ts +0 -70
  168. package/src/lib/builder/README.md +0 -30
  169. package/src/lib/editors/README.md +0 -303
  170. package/src/lib/renderer/components/st-column-filter/README.md +0 -286
@@ -1,115 +0,0 @@
1
- /**
2
- * Base column configuration class implementing Template Method pattern
3
- */
4
- import { ColumnConfig } from './column-config.interface';
5
- import { Cell } from '../renderer/models/cell.class';
6
- import { CellFormatter, CellValidator, CellEditor, CellParser, CellLifecycleHooks } from './cell-strategies.interface';
7
- import { CellAlignment, CellVerticalAlignment, EditMode, CellDataType, ValidationResult } from './cell-types';
8
- import { TemplateRef } from '@angular/core';
9
- /**
10
- * Abstract base class for column configurations
11
- * Implements Template Method pattern for cell operations
12
- */
13
- export declare abstract class BaseColumnConfig<T = any> implements ColumnConfig<T> {
14
- readonly key: string;
15
- readonly header?: string;
16
- readonly dataType?: CellDataType;
17
- readonly formatter?: CellFormatter<T>;
18
- readonly validator?: CellValidator<T>;
19
- readonly editor?: CellEditor<T>;
20
- readonly parser?: CellParser<T>;
21
- readonly editable?: boolean;
22
- readonly editMode?: EditMode;
23
- readonly sortable?: boolean;
24
- readonly filterable?: boolean;
25
- readonly resizable?: boolean;
26
- readonly width?: number | string;
27
- readonly minWidth?: number;
28
- readonly maxWidth?: number;
29
- readonly alignment?: CellAlignment;
30
- readonly verticalAlignment?: CellVerticalAlignment;
31
- readonly truncate?: boolean;
32
- readonly tooltip?: string | ((value: T, rowData: any) => string);
33
- readonly className?: string | string[] | ((value: T, rowData: any) => string | string[]);
34
- readonly style?: Record<string, any> | ((value: T, rowData: any) => Record<string, any>);
35
- readonly cellTemplate?: TemplateRef<any>;
36
- readonly headerTemplate?: TemplateRef<any>;
37
- readonly visible?: boolean;
38
- readonly pinned?: 'left' | 'right' | false;
39
- readonly sortPriority?: number;
40
- readonly comparator?: (a: T, b: T) => number;
41
- readonly valueGetter?: (rowData: any) => T;
42
- readonly valueSetter?: (rowData: any, value: T) => void;
43
- readonly hooks?: CellLifecycleHooks<T>;
44
- readonly showLoadingIndicator?: boolean;
45
- readonly metadata?: Record<string, any>;
46
- constructor(config: Partial<ColumnConfig<T>> & {
47
- key: string;
48
- });
49
- /**
50
- * Factory method to create a cell (Factory Pattern)
51
- * Can be overridden by subclasses for custom cell creation
52
- */
53
- createCell(rowData: any, rowIndex?: number): Cell<T>;
54
- /**
55
- * Template method for processing cell edit workflow
56
- * Defines the algorithm steps that subclasses can customize
57
- */
58
- processEdit(cell: Cell<T>, newValue: T): boolean;
59
- /**
60
- * Hook: Before edit validation (can be overridden)
61
- */
62
- protected beforeEdit(cell: Cell<T>, newValue: T): boolean;
63
- /**
64
- * Hook: After edit completion (can be overridden)
65
- */
66
- protected afterEdit(cell: Cell<T>, newValue: T): void;
67
- /**
68
- * Hook: After cell is created (can be overridden)
69
- */
70
- protected afterCellCreated(cell: Cell<T>, rowData: any, rowIndex?: number): void;
71
- /**
72
- * Hook: When validation fails (can be overridden)
73
- */
74
- protected onValidationFailed(cell: Cell<T>, validationResult: ValidationResult): void;
75
- /**
76
- * Extract value from row data (can be overridden)
77
- */
78
- protected extractValue(rowData: any): T;
79
- /**
80
- * Parse value using parser if available (can be overridden)
81
- */
82
- protected parseValue(value: any): T | undefined;
83
- /**
84
- * Validate value using validator if available (can be overridden)
85
- */
86
- protected validateValue(value: T, rowData: any): ValidationResult;
87
- /**
88
- * Format value for display (can be overridden)
89
- */
90
- formatValue(value: T, rowData?: any): string;
91
- /**
92
- * Get cell tooltip (can be overridden)
93
- */
94
- getTooltip(value: T, rowData: any): string | undefined;
95
- /**
96
- * Get cell class names (can be overridden)
97
- */
98
- getClassName(value: T, rowData: any): string | string[] | undefined;
99
- /**
100
- * Get cell styles (can be overridden)
101
- */
102
- getStyle(value: T, rowData: any): Record<string, any> | undefined;
103
- /**
104
- * Compare two values for sorting (can be overridden)
105
- */
106
- compare(a: T, b: T): number;
107
- }
108
- /**
109
- * Concrete implementation for simple use cases
110
- */
111
- export declare class SimpleColumnConfig<T = any> extends BaseColumnConfig<T> {
112
- constructor(config: Partial<ColumnConfig<T>> & {
113
- key: string;
114
- });
115
- }
@@ -1,188 +0,0 @@
1
- /**
2
- * Strategy interfaces for cell behavior
3
- * These interfaces define pluggable strategies for formatting, validation, and editing
4
- */
5
- import { ValidationResult, CellEvent } from './cell-types';
6
- /**
7
- * Strategy interface for formatting cell values for display
8
- * Formatters are stateless and can be shared across multiple cells
9
- */
10
- export interface CellFormatter<T = any> {
11
- /**
12
- * Formats a value for display
13
- * @param value The value to format
14
- * @returns Formatted string representation
15
- */
16
- format(value: T): string;
17
- /**
18
- * Optional method to format value with additional context
19
- * @param value The value to format
20
- * @param rowData The entire row data
21
- * @param columnKey The column key
22
- * @returns Formatted string representation
23
- */
24
- formatWithContext?(value: T, rowData: any, columnKey: string): string;
25
- }
26
- /**
27
- * Strategy interface for validating cell values
28
- * Validators are stateless and can be shared across multiple cells
29
- */
30
- export interface CellValidator<T = any> {
31
- /**
32
- * Validates a cell value
33
- * @param value The value to validate
34
- * @returns Validation result with success flag and optional error messages
35
- */
36
- validate(value: T): ValidationResult;
37
- /**
38
- * Optional method to validate with additional context
39
- * @param value The value to validate
40
- * @param rowData The entire row data
41
- * @param columnKey The column key
42
- * @returns Validation result
43
- */
44
- validateWithContext?(value: T, rowData: any, columnKey: string): ValidationResult;
45
- /**
46
- * Optional error message template
47
- */
48
- errorMessage?: string;
49
- }
50
- /**
51
- * Editor context provided to cell editors
52
- */
53
- export interface CellEditorContext<T = any> {
54
- /**
55
- * Current cell value
56
- */
57
- value: T;
58
- /**
59
- * Row data context
60
- */
61
- rowData?: any;
62
- /**
63
- * Column key
64
- */
65
- columnKey: string;
66
- /**
67
- * Row index
68
- */
69
- rowIndex?: number;
70
- /**
71
- * Callback when value changes
72
- */
73
- onChange: (newValue: T) => void;
74
- /**
75
- * Callback to save the edited value
76
- */
77
- onSave: (newValue: T) => void;
78
- /**
79
- * Callback to cancel editing
80
- */
81
- onCancel: () => void;
82
- /**
83
- * Container element for the editor
84
- */
85
- container?: HTMLElement;
86
- }
87
- /**
88
- * Strategy interface for handling inline cell editing
89
- * Editors are stateless and can be shared across multiple cells
90
- */
91
- export interface CellEditor<T = any> {
92
- /**
93
- * Whether this editor should receive the initial keypress character
94
- * when starting edit mode via keyboard.
95
- * - true (default): Initial keypress character becomes the starting value
96
- * - false: Initial keypress just triggers edit mode, character is ignored
97
- */
98
- acceptsInitialKeypress?: boolean;
99
- /**
100
- * Initialize and render the editor
101
- * @param context Editor context with value, callbacks, and container
102
- */
103
- edit(context: CellEditorContext<T>): void;
104
- /**
105
- * Optional cleanup when editor is destroyed
106
- */
107
- destroy?(): void;
108
- /**
109
- * Optional method to focus the editor
110
- */
111
- focus?(): void;
112
- /**
113
- * Optional method to get current editor value without saving
114
- */
115
- getCurrentValue?(): T;
116
- }
117
- /**
118
- * Parser interface for converting user input to typed values
119
- * Used by editors to convert string input to proper data types
120
- */
121
- export interface CellParser<T = any> {
122
- /**
123
- * Parse user input to typed value
124
- * @param input User input (usually string)
125
- * @returns Parsed typed value
126
- */
127
- parse(input: any): T;
128
- /**
129
- * Optional method to check if input can be parsed
130
- * @param input User input
131
- * @returns True if input can be parsed
132
- */
133
- canParse?(input: any): boolean;
134
- }
135
- /**
136
- * Composite validator that chains multiple validators
137
- */
138
- export interface CompositeValidator<T = any> extends CellValidator<T> {
139
- /**
140
- * Add a validator to the chain
141
- */
142
- addValidator(validator: CellValidator<T>): this;
143
- /**
144
- * Get all validators in the chain
145
- */
146
- getValidators(): CellValidator<T>[];
147
- }
148
- /**
149
- * Event handler types for cell lifecycle events
150
- */
151
- export declare type CellEventHandler<T = any> = (event: CellEvent<T>) => void;
152
- /**
153
- * Cell lifecycle hooks
154
- */
155
- export interface CellLifecycleHooks<T = any> {
156
- /**
157
- * Called before editing starts
158
- */
159
- beforeEdit?: CellEventHandler<T>;
160
- /**
161
- * Called when edit mode is entered
162
- */
163
- onEdit?: CellEventHandler<T>;
164
- /**
165
- * Called after edit mode is exited
166
- */
167
- afterEdit?: CellEventHandler<T>;
168
- /**
169
- * Called before value is saved
170
- */
171
- beforeSave?: CellEventHandler<T>;
172
- /**
173
- * Called after value is saved
174
- */
175
- onSave?: CellEventHandler<T>;
176
- /**
177
- * Called when edit is cancelled
178
- */
179
- onCancel?: CellEventHandler<T>;
180
- /**
181
- * Called when validation fails
182
- */
183
- onValidationError?: CellEventHandler<T>;
184
- /**
185
- * Called when cell value changes
186
- */
187
- onChange?: CellEventHandler<T>;
188
- }
@@ -1,337 +0,0 @@
1
- /**
2
- * Base type definitions for cell configuration model
3
- */
4
- import type { Cell } from '../renderer/models/cell.class';
5
- import type { CellState } from '../renderer/models/cell-state.interface';
6
- /**
7
- * Supported cell data types
8
- */
9
- export declare type CellValue = string | number | boolean | Date | null | undefined | any;
10
- /**
11
- * Data type enumeration for type-specific handling
12
- */
13
- export declare enum CellDataType {
14
- STRING = "string",
15
- NUMBER = "number",
16
- BOOLEAN = "boolean",
17
- DATE = "date",
18
- CUSTOM = "custom"
19
- }
20
- /**
21
- * Result of cell validation
22
- */
23
- export interface ValidationResult {
24
- /**
25
- * Whether the value is valid
26
- */
27
- valid: boolean;
28
- /**
29
- * Error message if validation failed
30
- */
31
- error?: string;
32
- /**
33
- * Field-specific error messages for complex validations
34
- */
35
- errors?: Record<string, string>;
36
- /**
37
- * Warning messages (non-blocking)
38
- */
39
- warnings?: string[];
40
- }
41
- /**
42
- * Cell alignment options
43
- */
44
- export declare enum CellAlignment {
45
- LEFT = "left",
46
- CENTER = "center",
47
- RIGHT = "right"
48
- }
49
- /**
50
- * Vertical alignment options
51
- */
52
- export declare enum CellVerticalAlignment {
53
- TOP = "top",
54
- MIDDLE = "middle",
55
- BOTTOM = "bottom"
56
- }
57
- /**
58
- * Edit mode trigger options
59
- */
60
- export declare enum EditMode {
61
- /**
62
- * Single click to edit
63
- */
64
- CLICK = "click",
65
- /**
66
- * Enter key to edit (requires keyboard navigation enabled)
67
- */
68
- ENTER = "enter",
69
- /**
70
- * Manual trigger (via API call)
71
- */
72
- MANUAL = "manual",
73
- /**
74
- * Never editable
75
- */
76
- NONE = "none"
77
- }
78
- /**
79
- * Navigation key identifiers for keyboard navigation
80
- */
81
- export declare enum NavigationKey {
82
- /**
83
- * Arrow up key
84
- */
85
- ARROW_UP = "ArrowUp",
86
- /**
87
- * Arrow down key
88
- */
89
- ARROW_DOWN = "ArrowDown",
90
- /**
91
- * Arrow left key
92
- */
93
- ARROW_LEFT = "ArrowLeft",
94
- /**
95
- * Arrow right key
96
- */
97
- ARROW_RIGHT = "ArrowRight",
98
- /**
99
- * Tab key
100
- */
101
- TAB = "Tab",
102
- /**
103
- * Enter key
104
- */
105
- ENTER = "Enter",
106
- /**
107
- * Escape key
108
- */
109
- ESCAPE = "Escape"
110
- }
111
- /**
112
- * Navigation directions
113
- */
114
- export declare enum NavigationDirection {
115
- UP = "up",
116
- DOWN = "down",
117
- LEFT = "left",
118
- RIGHT = "right"
119
- }
120
- /**
121
- * Cell lifecycle states
122
- */
123
- export declare enum CellLifecycleState {
124
- /**
125
- * Cell is displaying value
126
- */
127
- DISPLAY = "display",
128
- /**
129
- * Cell is in edit mode
130
- */
131
- EDITING = "editing",
132
- /**
133
- * Cell value is being validated
134
- */
135
- VALIDATING = "validating",
136
- /**
137
- * Cell value is being saved
138
- */
139
- SAVING = "saving",
140
- /**
141
- * Cell has error
142
- */
143
- ERROR = "error",
144
- /**
145
- * Cell is disabled
146
- */
147
- DISABLED = "disabled"
148
- }
149
- /**
150
- * Generic cell event data
151
- */
152
- export interface CellEvent<T = any> {
153
- /**
154
- * The cell value
155
- */
156
- value: T;
157
- /**
158
- * Previous value (for change events)
159
- */
160
- previousValue?: T;
161
- /**
162
- * Row data context
163
- */
164
- rowData?: any;
165
- /**
166
- * Column key
167
- */
168
- columnKey: string;
169
- /**
170
- * Row index
171
- */
172
- rowIndex?: number;
173
- /**
174
- * Native event if triggered by user interaction
175
- */
176
- originalEvent?: Event;
177
- }
178
- /**
179
- * Type guard to check if value is null or undefined
180
- */
181
- export declare function isNullOrUndefined(value: any): value is null | undefined;
182
- /**
183
- * Type guard to check if value is a valid date
184
- */
185
- export declare function isValidDate(value: any): value is Date;
186
- /**
187
- * Type guard to check if validation result is valid
188
- */
189
- export declare function isValidationSuccess(result: ValidationResult): boolean;
190
- /**
191
- * Cell edit started event
192
- * Emitted when a cell enters edit mode
193
- */
194
- export interface CellEditEvent<T = any> {
195
- /**
196
- * The cell instance
197
- */
198
- cell: Cell<T>;
199
- /**
200
- * Current cell value
201
- */
202
- value: T;
203
- /**
204
- * Row data context
205
- */
206
- rowData: any;
207
- /**
208
- * Column key
209
- */
210
- columnKey: string;
211
- /**
212
- * Row index
213
- */
214
- rowIndex?: number;
215
- /**
216
- * Current cell state snapshot
217
- */
218
- cellState: CellState<T>;
219
- }
220
- /**
221
- * Cell value saved event
222
- * Emitted when a cell value is successfully saved after editing
223
- */
224
- export interface CellSaveEvent<T = any> {
225
- /**
226
- * The cell instance
227
- */
228
- cell: Cell<T>;
229
- /**
230
- * New value after save
231
- */
232
- newValue: T;
233
- /**
234
- * Previous value before save
235
- */
236
- previousValue?: T;
237
- /**
238
- * Row data context
239
- */
240
- rowData: any;
241
- /**
242
- * Column key
243
- */
244
- columnKey: string;
245
- /**
246
- * Row index
247
- */
248
- rowIndex?: number;
249
- /**
250
- * Whether the saved value is valid
251
- */
252
- isValid: boolean;
253
- /**
254
- * Validation error messages if any
255
- */
256
- validationErrors?: string[];
257
- /**
258
- * Current cell state snapshot after save
259
- */
260
- cellState: CellState<T>;
261
- }
262
- /**
263
- * Cell value changed event
264
- * Emitted after a successful cell value change (after save and validation)
265
- */
266
- export interface CellChangeEvent<T = any> {
267
- /**
268
- * The cell instance
269
- */
270
- cell: Cell<T>;
271
- /**
272
- * Old value before change
273
- */
274
- oldValue: T;
275
- /**
276
- * New value after change
277
- */
278
- newValue: T;
279
- /**
280
- * Row data context
281
- */
282
- rowData: any;
283
- /**
284
- * Column key
285
- */
286
- columnKey: string;
287
- /**
288
- * Row index
289
- */
290
- rowIndex?: number;
291
- /**
292
- * Whether the old value was valid
293
- */
294
- wasValid: boolean;
295
- /**
296
- * Whether the new value is valid
297
- */
298
- isValid: boolean;
299
- /**
300
- * Current cell state snapshot
301
- */
302
- cellState: CellState<T>;
303
- }
304
- /**
305
- * Cell edit cancelled event
306
- * Emitted when cell editing is cancelled without saving
307
- */
308
- export interface CellCancelEvent<T = any> {
309
- /**
310
- * The cell instance
311
- */
312
- cell: Cell<T>;
313
- /**
314
- * Current value (unchanged)
315
- */
316
- value: T;
317
- /**
318
- * Previous value that was being edited
319
- */
320
- previousValue?: T;
321
- /**
322
- * Row data context
323
- */
324
- rowData: any;
325
- /**
326
- * Column key
327
- */
328
- columnKey: string;
329
- /**
330
- * Row index
331
- */
332
- rowIndex?: number;
333
- /**
334
- * Current cell state snapshot
335
- */
336
- cellState: CellState<T>;
337
- }