@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,86 +0,0 @@
1
- /**
2
- * Column action interface - defines actions that can be performed on table columns
3
- * Similar to RowAction but for column-level operations
4
- */
5
- import { ColumnConfig } from './column-config.interface';
6
- import { TableState } from '../renderer/models/table-state.class';
7
- /**
8
- * Defines a single action that can be performed on a column
9
- */
10
- export interface ColumnAction {
11
- /**
12
- * Unique identifier for the action
13
- */
14
- id: string;
15
- /**
16
- * Display label for the action
17
- */
18
- label: string;
19
- /**
20
- * Optional icon to display with the action
21
- */
22
- icon?: string;
23
- /**
24
- * Callback function executed when the action is clicked
25
- * @param column - The column config
26
- * @param columnIndex - The index of the column
27
- */
28
- action?: (column: ColumnConfig<any>, columnIndex: number) => void;
29
- /**
30
- * Whether the action should be hidden
31
- * Can be a boolean or a function that returns boolean based on column state
32
- */
33
- hidden?: boolean | ((column: ColumnConfig<any>, columnIndex: number) => boolean);
34
- /**
35
- * Whether the action should be disabled
36
- * Can be a boolean or a function that returns boolean based on column state
37
- */
38
- disabled?: boolean | ((column: ColumnConfig<any>, columnIndex: number) => boolean);
39
- }
40
- /**
41
- * Context object passed to the column menu dropdown component
42
- * Contains all information needed to render and handle column actions
43
- */
44
- export interface ColumnActionContext {
45
- /**
46
- * The column configuration
47
- */
48
- column: ColumnConfig<any>;
49
- /**
50
- * The index of the column in the visible columns array
51
- */
52
- columnIndex: number;
53
- /**
54
- * Whether this is the first column
55
- */
56
- isFirstColumn: boolean;
57
- /**
58
- * Whether this is the last column
59
- */
60
- isLastColumn: boolean;
61
- /**
62
- * Table state for accessing sorting, filtering, etc.
63
- */
64
- tableState?: TableState;
65
- /**
66
- * Available actions for this column
67
- */
68
- actions: ColumnAction[];
69
- }
70
- /**
71
- * Event emitted when a column action is clicked
72
- */
73
- export interface ColumnActionEvent {
74
- /**
75
- * The action that was clicked
76
- */
77
- action: ColumnAction;
78
- /**
79
- * The column configuration
80
- */
81
- column: ColumnConfig<any>;
82
- /**
83
- * The index of the column
84
- */
85
- columnIndex: number;
86
- }
@@ -1,272 +0,0 @@
1
- /**
2
- * Column configuration interface - Flyweight pattern
3
- * This configuration is shared across all cells in a column
4
- */
5
- import { CellFormatter, CellValidator, CellEditor, CellParser, CellLifecycleHooks } from './cell-strategies.interface';
6
- import { CellAlignment, CellVerticalAlignment, EditMode, CellDataType } from './cell-types';
7
- import { SortDirection, FilterOperator } from '../renderer/models/table-types';
8
- import { Cell } from '../renderer/models/cell.class';
9
- import { TemplateRef } from '@angular/core';
10
- import { ColumnAction } from './column-action.interface';
11
- /**
12
- * Filter options configuration for custom dropdown filters
13
- */
14
- export interface FilterOptions {
15
- /**
16
- * Array of data items to display in the dropdown
17
- */
18
- data: any[];
19
- /**
20
- * Handler function to transform data items into {label, value} pairs
21
- * @param item The data item to transform
22
- * @returns Object with label (displayed text) and value (stored value)
23
- */
24
- handler: (item: any) => {
25
- label: string;
26
- value: any;
27
- };
28
- /**
29
- * Whether to allow multiple selections
30
- * @default false
31
- */
32
- multiselect?: boolean;
33
- }
34
- /**
35
- * Column configuration - shared immutable config for all cells in a column (Flyweight)
36
- * Contains behavior, metadata, and strategies but NO state
37
- */
38
- export interface ColumnConfig<T = any> {
39
- /**
40
- * Unique key for the column (maps to row data property)
41
- */
42
- readonly key: string;
43
- /**
44
- * Display header text for the column
45
- */
46
- readonly header?: string;
47
- /**
48
- * Data type of the column values
49
- */
50
- readonly dataType?: CellDataType;
51
- /**
52
- * Formatter strategy for displaying cell values
53
- */
54
- readonly formatter?: CellFormatter<T>;
55
- /**
56
- * Validator strategy for validating cell values
57
- */
58
- readonly validator?: CellValidator<T>;
59
- /**
60
- * Editor strategy for inline editing
61
- */
62
- readonly editor?: CellEditor<T>;
63
- /**
64
- * Parser strategy for converting user input to typed values
65
- */
66
- readonly parser?: CellParser<T>;
67
- /**
68
- * Whether cells in this column are editable
69
- */
70
- readonly editable?: boolean;
71
- /**
72
- * Edit mode trigger
73
- */
74
- readonly editMode?: EditMode;
75
- /**
76
- * Whether this column is sortable
77
- */
78
- readonly sortable?: boolean;
79
- /**
80
- * Whether this column is filterable
81
- */
82
- readonly filterable?: boolean;
83
- /**
84
- * Whether this column's visibility can be toggled by users
85
- */
86
- readonly hideable?: boolean;
87
- /**
88
- * Whether this column can be moved left/right by users
89
- * Note: Pinned/sticky columns cannot be moved
90
- * @default true
91
- */
92
- readonly movable?: boolean;
93
- /**
94
- * Whether this column can be pinned/unpinned by users
95
- * @default true
96
- */
97
- readonly pinnable?: boolean;
98
- /**
99
- * Whether to show the column menu dropdown for this column
100
- * @default true
101
- */
102
- readonly enableMenu?: boolean;
103
- /**
104
- * Custom actions for this column (shown in column menu dropdown)
105
- * Similar to row actions but for column-level operations
106
- * @default []
107
- */
108
- readonly columnActions?: ColumnAction[];
109
- /**
110
- * Whether to include built-in actions (sort, filter, pin, move) in the column menu
111
- * Set to false to show only custom actions
112
- * @default true
113
- */
114
- readonly includeBuiltInActions?: boolean;
115
- /**
116
- * Current sort direction for this column
117
- * @default 'none'
118
- */
119
- sortDirection?: SortDirection;
120
- /**
121
- * Whether sorting is currently active/enabled on this column
122
- * @default false
123
- */
124
- sortEnabled?: boolean;
125
- /**
126
- * Filter configuration for this column
127
- * Contains operator, value, enabled state, and custom dropdown options
128
- */
129
- filterConfig?: {
130
- /**
131
- * Filter operator
132
- * @default 'contains'
133
- */
134
- operator?: FilterOperator;
135
- /**
136
- * Current filter value
137
- */
138
- value?: any;
139
- /**
140
- * Whether filtering is currently active/enabled on this column
141
- * @default false
142
- */
143
- enabled?: boolean;
144
- /**
145
- * Custom filter options for dropdown-based filtering
146
- * Both data and handler must be provided together, otherwise falls back to text input
147
- */
148
- options?: FilterOptions;
149
- };
150
- /**
151
- * Whether this column is resizable
152
- */
153
- readonly resizable?: boolean;
154
- /**
155
- * Column width (px, %, or 'auto')
156
- */
157
- readonly width?: number | string;
158
- /**
159
- * Minimum column width (px)
160
- */
161
- readonly minWidth?: number;
162
- /**
163
- * Maximum column width (px)
164
- */
165
- readonly maxWidth?: number;
166
- /**
167
- * Whether this column is sticky (left or right)
168
- */
169
- readonly sticky?: 'left' | 'right' | false;
170
- /**
171
- * Calculated offset for sticky positioning (px)
172
- * Auto-calculated by table component based on column order
173
- */
174
- stickyOffset?: number;
175
- /**
176
- * Whether to show shadow indicator on sticky columns
177
- * @default true
178
- */
179
- readonly showStickyShadow?: boolean;
180
- /**
181
- * Cell content alignment
182
- */
183
- readonly alignment?: CellAlignment;
184
- /**
185
- * Cell vertical alignment
186
- */
187
- readonly verticalAlignment?: CellVerticalAlignment;
188
- /**
189
- * Whether to truncate overflowing text
190
- */
191
- readonly truncate?: boolean;
192
- /**
193
- * Tooltip configuration
194
- */
195
- readonly tooltip?: string | ((value: T, rowData: any) => string);
196
- /**
197
- * CSS class name(s) for cells in this column
198
- */
199
- readonly className?: string | string[] | ((value: T, rowData: any) => string | string[]);
200
- /**
201
- * Inline styles for cells in this column
202
- */
203
- readonly style?: Record<string, any> | ((value: T, rowData: any) => Record<string, any>);
204
- /**
205
- * Custom cell template (Angular TemplateRef)
206
- */
207
- readonly cellTemplate?: TemplateRef<any>;
208
- /**
209
- * Custom header template
210
- */
211
- readonly headerTemplate?: TemplateRef<any>;
212
- /**
213
- * Whether column is visible
214
- */
215
- readonly visible?: boolean;
216
- /**
217
- * Whether column is pinned (left, right, or none)
218
- */
219
- readonly pinned?: 'left' | 'right' | false;
220
- /**
221
- * Sort order priority (for multi-column sort)
222
- */
223
- readonly sortPriority?: number;
224
- /**
225
- * Custom comparator for sorting
226
- */
227
- readonly comparator?: (a: T, b: T) => number;
228
- /**
229
- * Function to extract value from row data (for nested properties)
230
- */
231
- readonly valueGetter?: (rowData: any) => T;
232
- /**
233
- * Function to set value in row data (for nested properties)
234
- */
235
- readonly valueSetter?: (rowData: any, value: T) => void;
236
- /**
237
- * Lifecycle hooks for cells in this column
238
- */
239
- readonly hooks?: CellLifecycleHooks<T>;
240
- /**
241
- * Whether cells should show loading indicator during async operations
242
- */
243
- readonly showLoadingIndicator?: boolean;
244
- /**
245
- * Custom metadata for column
246
- */
247
- readonly metadata?: Record<string, any>;
248
- /**
249
- * Factory method to create a cell instance for this column (Factory Pattern)
250
- * @param rowData The row data object
251
- * @param rowIndex Optional row index
252
- * @returns A new Cell instance
253
- */
254
- createCell(rowData: any, rowIndex?: number): Cell<T>;
255
- }
256
- /**
257
- * Partial column config for extending existing configs
258
- */
259
- export declare type PartialColumnConfig<T = any> = Partial<ColumnConfig<T>>;
260
- /**
261
- * Column config builder options
262
- */
263
- export interface ColumnConfigOptions<T = any> extends Omit<ColumnConfig<T>, 'key' | 'createCell'> {
264
- }
265
- /**
266
- * Helper type for column config with required key
267
- */
268
- export declare type ColumnConfigWithKey<T = any> = Required<Pick<ColumnConfig<T>, 'key'>> & Partial<Omit<ColumnConfig<T>, 'key'>>;
269
- /**
270
- * Default column configuration values
271
- */
272
- export declare const DEFAULT_COLUMN_CONFIG: Partial<ColumnConfig<any>>;
@@ -1,37 +0,0 @@
1
- /**
2
- * Utility functions for column configuration operations
3
- */
4
- import { ColumnConfig, PartialColumnConfig } from './column-config.interface';
5
- /**
6
- * Helper function to check if a value is a plain object
7
- * (not an array, null, Date, RegExp, or class instance)
8
- */
9
- export declare function isPlainObject(value: any): boolean;
10
- /**
11
- * Recursively deep merges multiple column configurations.
12
- * This function properly clones nested objects and arrays to avoid shared references.
13
- *
14
- * @param configs - Variable number of partial column configurations to merge
15
- * @returns A merged configuration with all nested objects properly cloned
16
- *
17
- * @example
18
- * const merged = deepMergeColumnConfig(
19
- * { filterConfig: { operator: 'equals' } },
20
- * { filterConfig: { value: 'test' } }
21
- * );
22
- * // Result: { filterConfig: { operator: 'equals', value: 'test' } }
23
- */
24
- export declare function deepMergeColumnConfig<T>(...configs: Array<Partial<ColumnConfig<T>>>): Partial<ColumnConfig<T>>;
25
- /**
26
- * Helper function to merge column configs with defaults
27
- * @deprecated Use deepMergeColumnConfig instead for proper nested object handling
28
- */
29
- export declare function mergeWithDefaults<T>(config: PartialColumnConfig<T>): ColumnConfig<T>;
30
- /**
31
- * Helper to create a readonly column config
32
- */
33
- export declare function createReadonlyColumn<T>(key: string, options?: PartialColumnConfig<T>): ColumnConfig<T>;
34
- /**
35
- * Helper to create an editable column config
36
- */
37
- export declare function createEditableColumn<T>(key: string, options?: PartialColumnConfig<T>): ColumnConfig<T>;
@@ -1,86 +0,0 @@
1
- /**
2
- * Row action interfaces for configurable row management features
3
- */
4
- /**
5
- * Defines a single row action that can be performed on a table row
6
- */
7
- export interface RowAction {
8
- /**
9
- * Unique identifier for the action
10
- */
11
- id: string;
12
- /**
13
- * Display label for the action
14
- */
15
- label: string;
16
- /**
17
- * Optional icon to display (can be emoji, icon class, or SVG)
18
- */
19
- icon?: string;
20
- /**
21
- * Function to determine if action should be disabled for a specific row
22
- * @param rowData The data for the row
23
- * @param rowIndex The index of the row
24
- */
25
- disabled?: boolean | ((rowData: any, rowIndex: number) => boolean);
26
- /**
27
- * Function to determine if action should be hidden for a specific row
28
- * @param rowData The data for the row
29
- * @param rowIndex The index of the row
30
- */
31
- hidden?: boolean | ((rowData: any, rowIndex: number) => boolean);
32
- /**
33
- * Callback function to execute when action is clicked
34
- * @param rowData The data for the row
35
- * @param rowIndex The index of the row
36
- */
37
- action?: (rowData: any, rowIndex: number) => void;
38
- }
39
- /**
40
- * Configuration for row management features
41
- */
42
- export interface RowManagementConfig {
43
- /**
44
- * Array of actions to display in the dropdown
45
- */
46
- actions: RowAction[];
47
- /**
48
- * Position of the settings column
49
- * @default 'end'
50
- */
51
- position?: 'start' | 'end';
52
- }
53
- /**
54
- * Event emitted when a row action is clicked
55
- */
56
- export interface RowActionEvent {
57
- /**
58
- * The action that was clicked
59
- */
60
- action: RowAction;
61
- /**
62
- * The row data
63
- */
64
- rowData: any;
65
- /**
66
- * The row index
67
- */
68
- rowIndex: number;
69
- }
70
- /**
71
- * Context object passed to the dropdown component
72
- */
73
- export interface RowActionContext {
74
- /**
75
- * The row data
76
- */
77
- rowData: any;
78
- /**
79
- * The row index
80
- */
81
- rowIndex: number;
82
- /**
83
- * Available actions for this row
84
- */
85
- actions: RowAction[];
86
- }
@@ -1,37 +0,0 @@
1
- import { Cell } from '../renderer/models/cell.class';
2
- /**
3
- * Validation result for row-level validation
4
- */
5
- export interface RowValidationResult {
6
- /** Whether the row is valid */
7
- valid: boolean;
8
- /** Primary error message */
9
- error?: string;
10
- /** Array of specific error messages */
11
- errors?: string[];
12
- /** Warning messages (non-blocking) */
13
- warnings?: string[];
14
- /** Field-specific errors */
15
- fieldErrors?: Record<string, string>;
16
- }
17
- /**
18
- * Row validator interface for validating entire rows
19
- */
20
- export interface RowValidator {
21
- /**
22
- * Validates an entire row
23
- * @param rowData The complete row data object
24
- * @param cells Array of Cell instances for the row
25
- * @param rowIndex The index of the row being validated
26
- * @returns Row validation result
27
- */
28
- validateRow(rowData: any, cells: Cell[], rowIndex: number): RowValidationResult;
29
- /**
30
- * Optional error message template
31
- */
32
- errorMessage?: string;
33
- /**
34
- * Optional validation ID for tracking
35
- */
36
- validatorId?: string;
37
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * Schema validation error
3
- */
4
- export interface SchemaValidationError {
5
- /**
6
- * JSON path to the error (e.g., "/columns/0/key")
7
- */
8
- path: string;
9
- /**
10
- * Human-readable error message
11
- */
12
- message: string;
13
- /**
14
- * Error code
15
- */
16
- code: string;
17
- /**
18
- * Invalid value (if available)
19
- */
20
- value?: any;
21
- /**
22
- * Field name (user-friendly)
23
- */
24
- field?: string;
25
- }
26
- /**
27
- * Schema validation result
28
- */
29
- export interface SchemaValidationResult {
30
- /**
31
- * Whether the validation passed
32
- */
33
- valid: boolean;
34
- /**
35
- * Array of validation errors (empty if valid)
36
- */
37
- errors: SchemaValidationError[];
38
- /**
39
- * Whether ajv is available
40
- */
41
- ajvAvailable: boolean;
42
- }
@@ -1,59 +0,0 @@
1
- /**
2
- * Sheet action interfaces for configurable sheet-level features
3
- */
4
- /**
5
- * Defines a single sheet action that can be performed on a sheet
6
- */
7
- export interface SheetAction {
8
- /**
9
- * Unique identifier for the action
10
- */
11
- id: string;
12
- /**
13
- * Display label for the action
14
- */
15
- label: string;
16
- /**
17
- * Optional icon to display (nile-icon name)
18
- */
19
- icon?: string;
20
- /**
21
- * Function to determine if action should be disabled
22
- */
23
- disabled?: boolean | (() => boolean);
24
- /**
25
- * Function to determine if action should be hidden
26
- */
27
- hidden?: boolean | (() => boolean);
28
- /**
29
- * Callback function to execute when action is clicked
30
- * @param sheetId The ID of the sheet
31
- */
32
- action?: (sheetId: string) => void;
33
- }
34
- /**
35
- * Event emitted when a sheet action is clicked
36
- */
37
- export interface SheetActionEvent {
38
- /**
39
- * The action that was clicked
40
- */
41
- action: SheetAction;
42
- /**
43
- * The sheet ID
44
- */
45
- sheetId: string;
46
- }
47
- /**
48
- * Context object passed to the sheet actions component
49
- */
50
- export interface SheetActionContext {
51
- /**
52
- * The sheet ID
53
- */
54
- sheetId: string;
55
- /**
56
- * Available actions for this sheet
57
- */
58
- actions: SheetAction[];
59
- }
@@ -1,41 +0,0 @@
1
- /**
2
- * Sheet configuration interface - wraps table with sheet-level settings
3
- */
4
- import { TableConfig } from './table-config.interface';
5
- import { SheetAction } from './sheet-action.interface';
6
- /**
7
- * Comprehensive sheet configuration interface
8
- */
9
- export interface SheetConfig {
10
- /**
11
- * Unique identifier for the sheet
12
- */
13
- id: string;
14
- /**
15
- * Display name of the sheet
16
- */
17
- name: string;
18
- /**
19
- * Table configuration (existing TableConfig)
20
- */
21
- tableConfig: TableConfig;
22
- /**
23
- * Sheet-level actions (similar to RowAction pattern)
24
- */
25
- actions?: SheetAction[];
26
- /**
27
- * Display configuration
28
- */
29
- display?: {
30
- /**
31
- * Show sheet header bar
32
- * @default true
33
- */
34
- showHeader?: boolean;
35
- /**
36
- * Header variant style
37
- * @default 'default'
38
- */
39
- headerVariant?: 'default' | 'compact';
40
- };
41
- }