@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,251 +0,0 @@
1
- /**
2
- * Table configuration interface - centralizes all table settings
3
- * Provides a single source of truth for pagination, sorting, filtering, and display options
4
- */
5
- import { ColumnConfig } from './column-config.interface';
6
- import { SortDirection, FilterOperator } from '../renderer/models/table-types';
7
- import { RowManagementConfig } from './row-action.interface';
8
- import { Observable } from 'rxjs';
9
- /**
10
- * Comprehensive table configuration interface
11
- */
12
- export interface TableConfig {
13
- /**
14
- * Column definitions (required)
15
- */
16
- columns: ColumnConfig[];
17
- /**
18
- * Pagination configuration
19
- */
20
- pagination?: {
21
- /**
22
- * Enable pagination
23
- * @default true
24
- */
25
- enabled?: boolean;
26
- /**
27
- * Number of items per page
28
- * @default 25
29
- */
30
- pageSize?: number;
31
- /**
32
- * Available page size options for user selection
33
- * @default [10, 25, 50, 100]
34
- */
35
- pageSizeOptions?: number[];
36
- /**
37
- * Show pagination controls at the top of the table
38
- * @default false
39
- */
40
- showTopControls?: boolean;
41
- /**
42
- * Show pagination controls at the bottom of the table
43
- * @default true
44
- */
45
- showBottomControls?: boolean;
46
- /**
47
- * Total number of items available (for server-side pagination)
48
- * When set, the pagination controls will display the correct total pages
49
- * @default undefined (will be calculated from data length)
50
- */
51
- totalItems?: number;
52
- /**
53
- * Variant for nile-pagination component styling
54
- * @default 'fluid'
55
- */
56
- variant?: 'fluid' | 'compact';
57
- };
58
- /**
59
- * Sorting configuration
60
- */
61
- sorting?: {
62
- /**
63
- * Enable sorting
64
- * @default true
65
- */
66
- enabled?: boolean;
67
- /**
68
- * Allow sorting by multiple columns simultaneously
69
- * @default false
70
- */
71
- multiColumn?: boolean;
72
- /**
73
- * Sorting mode - local (client-side) or server (API-based)
74
- * @default 'server'
75
- */
76
- mode?: 'local' | 'server';
77
- };
78
- /**
79
- * Filtering configuration
80
- */
81
- filtering?: {
82
- /**
83
- * Enable filtering
84
- * @default false
85
- */
86
- enabled?: boolean;
87
- /**
88
- * Filtering mode - local (client-side) or server (API-based)
89
- * @default 'server'
90
- */
91
- mode?: 'local' | 'server';
92
- };
93
- /**
94
- * Selection configuration (future feature)
95
- */
96
- selection?: {
97
- /**
98
- * Enable row selection
99
- * @default false
100
- */
101
- enabled?: boolean;
102
- /**
103
- * Selection mode - single row or multiple rows
104
- * @default 'multiple'
105
- */
106
- mode?: 'single' | 'multiple';
107
- };
108
- /**
109
- * Display configuration
110
- */
111
- display?: {
112
- /**
113
- * Make table header sticky on scroll
114
- * @default true
115
- */
116
- stickyHeader?: boolean;
117
- /**
118
- * Highlight row on hover
119
- * @default true
120
- */
121
- hover?: boolean;
122
- /**
123
- * Max height of the table in pixels
124
- * @default 300
125
- */
126
- maxHeight?: number;
127
- /**
128
- * Virtual scroll configuration for large datasets
129
- * Enables efficient rendering by only showing visible rows
130
- */
131
- virtualScroll?: {
132
- /**
133
- * Enable virtual scrolling
134
- * @default false
135
- */
136
- enabled?: boolean;
137
- /**
138
- * Row height in pixels (must be consistent for all rows)
139
- * @default 48
140
- */
141
- itemSize?: number;
142
- /**
143
- * Number of buffer rows to render above/below viewport
144
- * Higher values provide smoother scrolling but use more memory
145
- * @default 5
146
- */
147
- bufferSize?: number;
148
- /**
149
- * Viewport height in pixels
150
- * @default 600
151
- */
152
- viewportHeight?: number;
153
- };
154
- };
155
- /**
156
- * Initial state configuration
157
- */
158
- initialState?: {
159
- /**
160
- * Initial page number (0-indexed)
161
- * @default 0
162
- */
163
- page?: number;
164
- /**
165
- * Initial sort configuration
166
- */
167
- sortBy?: Array<{
168
- key: string;
169
- direction: SortDirection;
170
- }>;
171
- /**
172
- * Initial filter configuration
173
- */
174
- filters?: Array<{
175
- key: string;
176
- operator: FilterOperator;
177
- value: any;
178
- }>;
179
- };
180
- /**
181
- * Features configuration
182
- */
183
- features?: {
184
- /**
185
- * Column management features
186
- */
187
- columnManagement?: {
188
- /**
189
- * Allow users to add new columns dynamically
190
- * @default false
191
- */
192
- allowAdd?: boolean;
193
- };
194
- /**
195
- * Row management features
196
- * Provides a settings column with configurable actions for each row
197
- */
198
- rowManagement?: RowManagementConfig;
199
- /**
200
- * Keyboard navigation features
201
- * Enables Excel-like keyboard navigation with arrow keys
202
- */
203
- keyboardNavigation?: {
204
- /**
205
- * Enable keyboard navigation
206
- * @default false
207
- */
208
- enabled?: boolean;
209
- /**
210
- * Add a new empty row when navigating past the last row (arrow down at bottom)
211
- * When enabled, pressing arrow down at the last row will emit a requestAddRow event
212
- * @default false
213
- */
214
- addRowOnNavigatePastEnd?: boolean;
215
- };
216
- };
217
- /**
218
- * Validation configuration - accumulates cell validation results
219
- */
220
- validation?: {
221
- /**
222
- * Validation trigger mode
223
- * - 'lazy': Validate on cell save/blur
224
- * - 'eager': Validate on every cell change
225
- * @default 'lazy'
226
- */
227
- mode?: 'lazy' | 'eager';
228
- };
229
- /**
230
- * Table skeleton configuration
231
- * Shows a skeleton loader while data is loading
232
- * @default undefined (disabled)
233
- */
234
- tableSkeleton?: {
235
- enabled: Observable<boolean>;
236
- rows: number;
237
- columns: number;
238
- };
239
- /**
240
- * Show row number in the table
241
- */
242
- showRowNumber?: boolean;
243
- }
244
- /**
245
- * Default table configuration with sensible defaults
246
- */
247
- export declare const DEFAULT_TABLE_CONFIG: Partial<TableConfig>;
248
- /**
249
- * Helper function to merge user config with defaults
250
- */
251
- export declare function mergeTableConfig(userConfig: TableConfig): TableConfig;
@@ -1,40 +0,0 @@
1
- import { TableConfig } from './table-config.interface';
2
- import { RowValidationResult } from './row-validator.interface';
3
- /**
4
- * Table-level validation result
5
- */
6
- export interface TableValidationResult {
7
- /** Whether the entire table is valid */
8
- valid: boolean;
9
- /** Row-specific validation results (rowIndex -> result) */
10
- rowResults?: Map<number, RowValidationResult>;
11
- /** Global table-level errors */
12
- globalErrors?: string[];
13
- /** Global warnings */
14
- globalWarnings?: string[];
15
- /** Total number of invalid rows */
16
- invalidRowCount?: number;
17
- /** Total number of valid rows */
18
- validRowCount?: number;
19
- }
20
- /**
21
- * Table validator interface for validating entire table
22
- */
23
- export interface TableValidator {
24
- /**
25
- * Validates the entire table
26
- * @param rows Array of row data
27
- * @param config Table configuration
28
- * @param rowValidationResults Optional pre-computed row validation results
29
- * @returns Table validation result
30
- */
31
- validateTable(rows: any[], config: TableConfig, rowValidationResults?: Map<number, RowValidationResult>): TableValidationResult;
32
- /**
33
- * Optional error message template
34
- */
35
- errorMessage?: string;
36
- /**
37
- * Optional validation ID
38
- */
39
- validatorId?: string;
40
- }
@@ -1,95 +0,0 @@
1
- /**
2
- * Workbook action interfaces for configurable workbook-level features
3
- */
4
- import { WorkbookSheetConfig } from './workbook-config.interface';
5
- /**
6
- * Defines a workbook-level action (export all, print, etc.)
7
- */
8
- export interface WorkbookAction {
9
- /**
10
- * Unique identifier for the action
11
- */
12
- id: string;
13
- /**
14
- * Display label for the action
15
- */
16
- label: string;
17
- /**
18
- * Optional icon to display (nile-icon name)
19
- */
20
- icon?: string;
21
- /**
22
- * Show as a toolbar button instead of in the dropdown menu
23
- * @default false
24
- */
25
- showInToolbar?: boolean;
26
- /**
27
- * Function to determine if action should be disabled
28
- */
29
- disabled?: boolean | (() => boolean);
30
- /**
31
- * Function to determine if action should be hidden
32
- */
33
- hidden?: boolean | (() => boolean);
34
- /**
35
- * Callback function to execute when action is clicked
36
- * @param workbookId The ID of the workbook
37
- */
38
- action?: (workbookId: string) => void;
39
- }
40
- /**
41
- * Defines a sheet tab action (rename, duplicate, delete)
42
- */
43
- export interface SheetTabAction {
44
- /**
45
- * Unique identifier for the action
46
- */
47
- id: string;
48
- /**
49
- * Display label for the action
50
- */
51
- label: string;
52
- /**
53
- * Optional icon to display (nile-icon name)
54
- */
55
- icon?: string;
56
- /**
57
- * Function to determine if action should be disabled
58
- */
59
- disabled?: boolean | ((sheet: WorkbookSheetConfig) => boolean);
60
- /**
61
- * Function to determine if action should be hidden
62
- */
63
- hidden?: boolean | ((sheet: WorkbookSheetConfig) => boolean);
64
- /**
65
- * Callback function to execute when action is clicked
66
- * @param sheetId The ID of the sheet
67
- */
68
- action?: (sheetId: string) => void;
69
- }
70
- /**
71
- * Event emitted when a workbook action is clicked
72
- */
73
- export interface WorkbookActionEvent {
74
- /**
75
- * The action that was clicked
76
- */
77
- action: WorkbookAction;
78
- /**
79
- * The workbook ID
80
- */
81
- workbookId: string;
82
- }
83
- /**
84
- * Event emitted when a sheet tab action is clicked
85
- */
86
- export interface SheetTabActionEvent {
87
- /**
88
- * The action that was clicked
89
- */
90
- action: SheetTabAction;
91
- /**
92
- * The sheet ID
93
- */
94
- sheetId: string;
95
- }
@@ -1,107 +0,0 @@
1
- /**
2
- * Workbook configuration interface - manages multiple sheets
3
- */
4
- import { TableConfig } from './table-config.interface';
5
- import { WorkbookAction, SheetTabAction } from './workbook-action.interface';
6
- import { AutosaveConfig } from './autosave-config.interface';
7
- /**
8
- * Sheet configuration for workbook (simpler than standalone SheetConfig)
9
- */
10
- export interface WorkbookSheetConfig {
11
- /**
12
- * Unique identifier for the sheet
13
- */
14
- id: string;
15
- /**
16
- * Display name of the sheet
17
- */
18
- name: string;
19
- /**
20
- * Table configuration for this sheet
21
- */
22
- tableConfig: TableConfig;
23
- /**
24
- * Optional per-sheet tab actions (overrides workbook defaults)
25
- */
26
- tabActions?: SheetTabAction[];
27
- }
28
- /**
29
- * Comprehensive workbook configuration interface
30
- */
31
- export interface WorkbookConfig {
32
- /**
33
- * Unique identifier for the workbook
34
- */
35
- id: string;
36
- /**
37
- * Display name of the workbook
38
- */
39
- name: string;
40
- /**
41
- * Array of sheets in the workbook
42
- */
43
- sheets: WorkbookSheetConfig[];
44
- /**
45
- * Initial active sheet index (0-based)
46
- * @default 0
47
- */
48
- initialActiveSheetIndex?: number;
49
- /**
50
- * Workbook-level actions (dropdown in toolbar)
51
- */
52
- workbookActions?: WorkbookAction[];
53
- /**
54
- * Default sheet tab actions (applied to all sheets unless overridden)
55
- */
56
- defaultSheetTabActions?: SheetTabAction[];
57
- /**
58
- * Display configuration
59
- */
60
- display?: {
61
- /**
62
- * Allow adding new sheets
63
- * @default true
64
- */
65
- allowAddSheet?: boolean;
66
- /**
67
- * Allow deleting sheets
68
- * @default true
69
- */
70
- allowDeleteSheet?: boolean;
71
- /**
72
- * Allow fullscreen mode
73
- * @default true
74
- */
75
- allowFullscreen?: boolean;
76
- /**
77
- * Maximum number of sheets allowed
78
- * @default undefined (unlimited)
79
- */
80
- maxSheets?: number;
81
- /**
82
- * Minimum number of sheets required
83
- * @default 1
84
- */
85
- minSheets?: number;
86
- };
87
- /**
88
- * Defaults for new sheets created via "Add Sheet" button
89
- */
90
- newSheetDefaults?: {
91
- /**
92
- * Prefix for new sheet names
93
- * @default 'Sheet'
94
- */
95
- namePrefix?: string;
96
- /**
97
- * Default table configuration for new sheets
98
- */
99
- tableConfig?: Partial<TableConfig>;
100
- };
101
- /**
102
- * Autosave configuration
103
- * Enables automatic saving of workbook config, state, and data to memory
104
- * @default { enabled: true, strategy: 'lazy' }
105
- */
106
- autosave?: AutosaveConfig;
107
- }
@@ -1,9 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class StAddColumnButtonComponent {
4
- enabled: boolean;
5
- addColumnClicked: EventEmitter<void>;
6
- onClick(event: Event): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<StAddColumnButtonComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<StAddColumnButtonComponent, "st-add-column-button", never, { "enabled": "enabled"; }, { "addColumnClicked": "addColumnClicked"; }, never, never>;
9
- }
@@ -1,69 +0,0 @@
1
- import { EventEmitter, OnInit, OnDestroy, ElementRef, AfterViewInit, TemplateRef } from '@angular/core';
2
- import { Cell } from '../../models/cell.class';
3
- import { CellEditEvent, CellSaveEvent, CellChangeEvent, CellCancelEvent, EditMode, NavigationDirection } from '../../../models/cell-types';
4
- import { TableState } from '../../models/table-state.class';
5
- import { TableConfig } from '../../../models/table-config.interface';
6
- import * as i0 from "@angular/core";
7
- export declare class StCellComponent implements OnInit, OnDestroy, AfterViewInit {
8
- cell: Cell<any>;
9
- editMode: EditMode;
10
- tableState?: TableState;
11
- tableConfig?: TableConfig;
12
- columnIndex?: number;
13
- cellChange: EventEmitter<CellChangeEvent<any>>;
14
- cellEdit: EventEmitter<CellEditEvent<any>>;
15
- cellSave: EventEmitter<CellSaveEvent<any>>;
16
- cellCancel: EventEmitter<CellCancelEvent<any>>;
17
- cellSaveAndNavigate: EventEmitter<{
18
- event: KeyboardEvent;
19
- direction: NavigationDirection;
20
- }>;
21
- editorContainer?: ElementRef;
22
- private editorCleanup?;
23
- private editingPositionSubscription?;
24
- constructor();
25
- ngOnInit(): void;
26
- ngAfterViewInit(): void;
27
- ngOnDestroy(): void;
28
- get isEditable(): boolean;
29
- get validationError(): string | undefined;
30
- get hasCellTemplate(): boolean;
31
- get cellTemplate(): TemplateRef<any> | null;
32
- get templateContext(): any;
33
- onCellKeyDown(event: KeyboardEvent): void;
34
- /**
35
- * Check if Enter key can trigger editing
36
- * Using EditMode enum values
37
- */
38
- private canEditViaEnter;
39
- /**
40
- * Check if keyboard can trigger editing (for alphanumeric and double-click)
41
- */
42
- private canEditViaKeyboard;
43
- /**
44
- * Check if a key is alphanumeric (single character)
45
- */
46
- private isAlphanumericKey;
47
- /**
48
- * Start editing with a specific key as the initial value
49
- */
50
- private startEditWithKey;
51
- onCellClick(): void;
52
- onCellDoubleClick(): void;
53
- private startEdit;
54
- private renderEditor;
55
- private saveEdit;
56
- /**
57
- * Update validation state in TableState
58
- * Called on save (lazy mode) or on change (eager mode)
59
- */
60
- private updateValidationState;
61
- /**
62
- * Trigger eager validation (on every change)
63
- */
64
- private triggerEagerValidation;
65
- private cancelEdit;
66
- private cleanupEditor;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<StCellComponent, never>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<StCellComponent, "st-cell", never, { "cell": "cell"; "editMode": "editMode"; "tableState": "tableState"; "tableConfig": "tableConfig"; "columnIndex": "columnIndex"; }, { "cellChange": "cellChange"; "cellEdit": "cellEdit"; "cellSave": "cellSave"; "cellCancel": "cellCancel"; "cellSaveAndNavigate": "cellSaveAndNavigate"; }, never, never>;
69
- }
@@ -1,39 +0,0 @@
1
- import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
2
- import { ColumnConfig } from '../../../models/column-config.interface';
3
- import { ColumnEditorComponent } from '../../../builder/components/column-editor/column-editor.component';
4
- import * as i0 from "@angular/core";
5
- export declare class StColumnEditorModalComponent implements OnInit, OnDestroy {
6
- columnCreated: EventEmitter<ColumnConfig<any>>;
7
- cancelled: EventEmitter<void>;
8
- columnEditor: ColumnEditorComponent;
9
- newColumn: ColumnConfig;
10
- columnIndex: number;
11
- ngOnInit(): void;
12
- ngOnDestroy(): void;
13
- /**
14
- * Create a default column configuration
15
- */
16
- private createDefaultColumn;
17
- /**
18
- * Trigger save from external button
19
- */
20
- onSave(): void;
21
- /**
22
- * Handle column updates from the editor
23
- */
24
- onColumnUpdated(updates: Partial<ColumnConfig>): void;
25
- /**
26
- * Handle cancel from the editor
27
- */
28
- onCancel(): void;
29
- /**
30
- * Handle backdrop click to close modal
31
- */
32
- onBackdropClick(event: Event): void;
33
- /**
34
- * Prevent event propagation from modal content
35
- */
36
- onModalContentClick(event: Event): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<StColumnEditorModalComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<StColumnEditorModalComponent, "st-column-editor-modal", never, {}, { "columnCreated": "columnCreated"; "cancelled": "cancelled"; }, never, never>;
39
- }