@aquera/ngx-smart-table 0.0.2-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 (169) hide show
  1. package/README.md +152 -0
  2. package/aquera-ngx-smart-table.d.ts +5 -0
  3. package/esm2020/aquera-ngx-smart-table.mjs +5 -0
  4. package/esm2020/lib/builder/components/builder-preview/builder-preview.component.mjs +63 -0
  5. package/esm2020/lib/builder/components/builder-toolbar/builder-toolbar.component.mjs +115 -0
  6. package/esm2020/lib/builder/components/column-editor/column-editor.component.mjs +206 -0
  7. package/esm2020/lib/builder/components/column-list/column-list.component.mjs +125 -0
  8. package/esm2020/lib/builder/components/definition-builder/definition-builder.component.mjs +105 -0
  9. package/esm2020/lib/builder/components/table-config-editor/table-config-editor.component.mjs +132 -0
  10. package/esm2020/lib/builder/definition-builder.module.mjs +70 -0
  11. package/esm2020/lib/builder/models/builder-state.interface.mjs +5 -0
  12. package/esm2020/lib/builder/services/definition-builder.service.mjs +251 -0
  13. package/esm2020/lib/builder/services/definition-export.service.mjs +167 -0
  14. package/esm2020/lib/builder/services/definition-import.service.mjs +193 -0
  15. package/esm2020/lib/builder/services/sample-data-generator.service.mjs +126 -0
  16. package/esm2020/lib/builder/utils/config-validator.util.mjs +165 -0
  17. package/esm2020/lib/builder/utils/typescript-generator.util.mjs +206 -0
  18. package/esm2020/lib/editors/index.mjs +9 -0
  19. package/esm2020/lib/editors/nile-autocomplete-editor.mjs +228 -0
  20. package/esm2020/lib/editors/nile-calendar-editor.mjs +214 -0
  21. package/esm2020/lib/editors/nile-date-picker-editor.mjs +227 -0
  22. package/esm2020/lib/editors/nile-input-editor.mjs +235 -0
  23. package/esm2020/lib/editors/nile-select-editor.mjs +317 -0
  24. package/esm2020/lib/factories/column-config.factory.mjs +231 -0
  25. package/esm2020/lib/models/autosave-config.interface.mjs +8 -0
  26. package/esm2020/lib/models/base-column-config.class.mjs +253 -0
  27. package/esm2020/lib/models/cell-strategies.interface.mjs +6 -0
  28. package/esm2020/lib/models/cell-types.mjs +147 -0
  29. package/esm2020/lib/models/column-action.interface.mjs +6 -0
  30. package/esm2020/lib/models/column-config.interface.mjs +43 -0
  31. package/esm2020/lib/models/column-config.utils.mjs +101 -0
  32. package/esm2020/lib/models/row-action.interface.mjs +5 -0
  33. package/esm2020/lib/models/row-validator.interface.mjs +2 -0
  34. package/esm2020/lib/models/schema-validation.interface.mjs +2 -0
  35. package/esm2020/lib/models/sheet-action.interface.mjs +5 -0
  36. package/esm2020/lib/models/sheet-config.interface.mjs +5 -0
  37. package/esm2020/lib/models/table-config.interface.mjs +106 -0
  38. package/esm2020/lib/models/table-validator.interface.mjs +2 -0
  39. package/esm2020/lib/models/workbook-action.interface.mjs +5 -0
  40. package/esm2020/lib/models/workbook-config.interface.mjs +5 -0
  41. package/esm2020/lib/renderer/components/st-add-column-button/st-add-column-button.component.mjs +24 -0
  42. package/esm2020/lib/renderer/components/st-cell/st-cell.component.mjs +391 -0
  43. package/esm2020/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.mjs +103 -0
  44. package/esm2020/lib/renderer/components/st-column-filter/st-column-filter.component.mjs +383 -0
  45. package/esm2020/lib/renderer/components/st-column-menu/st-column-menu.component.mjs +232 -0
  46. package/esm2020/lib/renderer/components/st-column-visibility/st-column-visibility.component.mjs +97 -0
  47. package/esm2020/lib/renderer/components/st-header/st-header.component.mjs +157 -0
  48. package/esm2020/lib/renderer/components/st-pagination/st-pagination.component.mjs +87 -0
  49. package/esm2020/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.mjs +167 -0
  50. package/esm2020/lib/renderer/components/st-sheet/st-sheet.component.mjs +165 -0
  51. package/esm2020/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.mjs +112 -0
  52. package/esm2020/lib/renderer/components/st-table/st-table.component.mjs +1246 -0
  53. package/esm2020/lib/renderer/components/st-table-actions/st-table-actions.component.mjs +171 -0
  54. package/esm2020/lib/renderer/components/st-workbook/st-workbook.component.mjs +489 -0
  55. package/esm2020/lib/renderer/directives/click-outside.directive.mjs +28 -0
  56. package/esm2020/lib/renderer/directives/st-column-resize.directive.mjs +108 -0
  57. package/esm2020/lib/renderer/directives/st-keyboard-navigation.directive.mjs +73 -0
  58. package/esm2020/lib/renderer/models/cell-state.interface.mjs +66 -0
  59. package/esm2020/lib/renderer/models/cell.class.mjs +389 -0
  60. package/esm2020/lib/renderer/models/row-validation-state.interface.mjs +7 -0
  61. package/esm2020/lib/renderer/models/sheet-state.class.mjs +90 -0
  62. package/esm2020/lib/renderer/models/sheet-state.interface.mjs +5 -0
  63. package/esm2020/lib/renderer/models/table-state.class.mjs +841 -0
  64. package/esm2020/lib/renderer/models/table-state.interface.mjs +5 -0
  65. package/esm2020/lib/renderer/models/table-types.mjs +29 -0
  66. package/esm2020/lib/renderer/models/table-validation-state.interface.mjs +7 -0
  67. package/esm2020/lib/renderer/models/workbook-state.class.mjs +174 -0
  68. package/esm2020/lib/renderer/models/workbook-state.interface.mjs +5 -0
  69. package/esm2020/lib/renderer/models/z-index.enum.mjs +55 -0
  70. package/esm2020/lib/schemas/table-config.schema.mjs +472 -0
  71. package/esm2020/lib/services/autosave.service.mjs +92 -0
  72. package/esm2020/lib/services/custom-validation-rules.util.mjs +124 -0
  73. package/esm2020/lib/services/json-schema-validator.service.mjs +216 -0
  74. package/esm2020/lib/services/row-validation.service.mjs +42 -0
  75. package/esm2020/lib/services/validation-logger.service.mjs +177 -0
  76. package/esm2020/lib/services/virtual-scroll.service.mjs +52 -0
  77. package/esm2020/lib/shared/shared-table-components.module.mjs +35 -0
  78. package/esm2020/lib/smart-table.module.mjs +124 -0
  79. package/esm2020/lib/strategies/default-editors.mjs +433 -0
  80. package/esm2020/lib/strategies/default-formatters.mjs +238 -0
  81. package/esm2020/lib/strategies/default-validators.mjs +327 -0
  82. package/esm2020/public-api.mjs +146 -0
  83. package/fesm2015/aquera-ngx-smart-table.mjs +11860 -0
  84. package/fesm2015/aquera-ngx-smart-table.mjs.map +1 -0
  85. package/fesm2020/aquera-ngx-smart-table.mjs +11897 -0
  86. package/fesm2020/aquera-ngx-smart-table.mjs.map +1 -0
  87. package/lib/builder/components/builder-preview/builder-preview.component.d.ts +31 -0
  88. package/lib/builder/components/builder-toolbar/builder-toolbar.component.d.ts +53 -0
  89. package/lib/builder/components/column-editor/column-editor.component.d.ts +69 -0
  90. package/lib/builder/components/column-list/column-list.component.d.ts +65 -0
  91. package/lib/builder/components/definition-builder/definition-builder.component.d.ts +58 -0
  92. package/lib/builder/components/table-config-editor/table-config-editor.component.d.ts +32 -0
  93. package/lib/builder/definition-builder.module.d.ts +15 -0
  94. package/lib/builder/models/builder-state.interface.d.ts +93 -0
  95. package/lib/builder/services/definition-builder.service.d.ts +80 -0
  96. package/lib/builder/services/definition-export.service.d.ts +59 -0
  97. package/lib/builder/services/definition-import.service.d.ts +31 -0
  98. package/lib/builder/services/sample-data-generator.service.d.ts +41 -0
  99. package/lib/builder/utils/config-validator.util.d.ts +32 -0
  100. package/lib/builder/utils/typescript-generator.util.d.ts +29 -0
  101. package/lib/editors/index.d.ts +8 -0
  102. package/lib/editors/nile-autocomplete-editor.d.ts +102 -0
  103. package/lib/editors/nile-calendar-editor.d.ts +89 -0
  104. package/lib/editors/nile-date-picker-editor.d.ts +95 -0
  105. package/lib/editors/nile-input-editor.d.ts +67 -0
  106. package/lib/editors/nile-select-editor.d.ts +109 -0
  107. package/lib/factories/column-config.factory.d.ts +73 -0
  108. package/lib/models/autosave-config.interface.d.ts +23 -0
  109. package/lib/models/base-column-config.class.d.ts +115 -0
  110. package/lib/models/cell-strategies.interface.d.ts +181 -0
  111. package/lib/models/cell-types.d.ts +337 -0
  112. package/lib/models/column-action.interface.d.ts +86 -0
  113. package/lib/models/column-config.interface.d.ts +272 -0
  114. package/lib/models/column-config.utils.d.ts +37 -0
  115. package/lib/models/row-action.interface.d.ts +86 -0
  116. package/lib/models/row-validator.interface.d.ts +37 -0
  117. package/lib/models/schema-validation.interface.d.ts +42 -0
  118. package/lib/models/sheet-action.interface.d.ts +59 -0
  119. package/lib/models/sheet-config.interface.d.ts +41 -0
  120. package/lib/models/table-config.interface.d.ts +245 -0
  121. package/lib/models/table-validator.interface.d.ts +40 -0
  122. package/lib/models/workbook-action.interface.d.ts +90 -0
  123. package/lib/models/workbook-config.interface.d.ts +107 -0
  124. package/lib/renderer/components/st-add-column-button/st-add-column-button.component.d.ts +9 -0
  125. package/lib/renderer/components/st-cell/st-cell.component.d.ts +69 -0
  126. package/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.d.ts +39 -0
  127. package/lib/renderer/components/st-column-filter/st-column-filter.component.d.ts +139 -0
  128. package/lib/renderer/components/st-column-menu/st-column-menu.component.d.ts +81 -0
  129. package/lib/renderer/components/st-column-visibility/st-column-visibility.component.d.ts +44 -0
  130. package/lib/renderer/components/st-header/st-header.component.d.ts +93 -0
  131. package/lib/renderer/components/st-pagination/st-pagination.component.d.ts +42 -0
  132. package/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.d.ts +67 -0
  133. package/lib/renderer/components/st-sheet/st-sheet.component.d.ts +98 -0
  134. package/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.d.ts +58 -0
  135. package/lib/renderer/components/st-table/st-table.component.d.ts +349 -0
  136. package/lib/renderer/components/st-table-actions/st-table-actions.component.d.ts +77 -0
  137. package/lib/renderer/components/st-workbook/st-workbook.component.d.ts +235 -0
  138. package/lib/renderer/directives/click-outside.directive.d.ts +10 -0
  139. package/lib/renderer/directives/st-column-resize.directive.d.ts +44 -0
  140. package/lib/renderer/directives/st-keyboard-navigation.directive.d.ts +15 -0
  141. package/lib/renderer/models/cell-state.interface.d.ts +118 -0
  142. package/lib/renderer/models/cell.class.d.ts +174 -0
  143. package/lib/renderer/models/row-validation-state.interface.d.ts +27 -0
  144. package/lib/renderer/models/sheet-state.class.d.ts +67 -0
  145. package/lib/renderer/models/sheet-state.interface.d.ts +55 -0
  146. package/lib/renderer/models/table-state.class.d.ts +313 -0
  147. package/lib/renderer/models/table-state.interface.d.ts +18 -0
  148. package/lib/renderer/models/table-types.d.ts +228 -0
  149. package/lib/renderer/models/table-validation-state.interface.d.ts +34 -0
  150. package/lib/renderer/models/workbook-state.class.d.ts +117 -0
  151. package/lib/renderer/models/workbook-state.interface.d.ts +71 -0
  152. package/lib/renderer/models/z-index.enum.d.ts +44 -0
  153. package/lib/schemas/table-config.schema.d.ts +455 -0
  154. package/lib/services/autosave.service.d.ts +73 -0
  155. package/lib/services/custom-validation-rules.util.d.ts +12 -0
  156. package/lib/services/json-schema-validator.service.d.ts +49 -0
  157. package/lib/services/row-validation.service.d.ts +17 -0
  158. package/lib/services/validation-logger.service.d.ts +87 -0
  159. package/lib/services/virtual-scroll.service.d.ts +44 -0
  160. package/lib/shared/shared-table-components.module.d.ts +9 -0
  161. package/lib/smart-table.module.d.ts +26 -0
  162. package/lib/strategies/default-editors.d.ts +109 -0
  163. package/lib/strategies/default-formatters.d.ts +116 -0
  164. package/lib/strategies/default-validators.d.ts +113 -0
  165. package/package.json +42 -0
  166. package/public-api.d.ts +70 -0
  167. package/src/lib/builder/README.md +30 -0
  168. package/src/lib/editors/README.md +303 -0
  169. package/src/lib/renderer/components/st-column-filter/README.md +286 -0
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Workbook state interfaces for state management
3
+ */
4
+ import { TableStateSnapshot } from './table-types';
5
+ /**
6
+ * Configuration options for initializing WorkbookState
7
+ */
8
+ export interface WorkbookStateConfig {
9
+ /**
10
+ * Workbook ID
11
+ */
12
+ id: string;
13
+ /**
14
+ * Initial workbook name
15
+ */
16
+ name: string;
17
+ /**
18
+ * Initial active sheet index
19
+ */
20
+ initialActiveSheetIndex?: number;
21
+ }
22
+ /**
23
+ * Workbook metadata tracking
24
+ */
25
+ export interface WorkbookMetadata {
26
+ /**
27
+ * When the workbook was created
28
+ */
29
+ createdAt: Date;
30
+ /**
31
+ * When the workbook was last modified
32
+ */
33
+ lastModified: Date;
34
+ /**
35
+ * When the workbook was last accessed
36
+ */
37
+ lastAccessed: Date;
38
+ /**
39
+ * Number of sheets in workbook
40
+ */
41
+ sheetCount: number;
42
+ }
43
+ /**
44
+ * Complete snapshot of workbook state
45
+ */
46
+ export interface WorkbookStateSnapshot {
47
+ /**
48
+ * Workbook ID
49
+ */
50
+ id: string;
51
+ /**
52
+ * Workbook name
53
+ */
54
+ name: string;
55
+ /**
56
+ * Active sheet index
57
+ */
58
+ activeSheetIndex: number;
59
+ /**
60
+ * Fullscreen state
61
+ */
62
+ isFullscreen: boolean;
63
+ /**
64
+ * Map of sheet ID to TableStateSnapshot
65
+ */
66
+ sheetTableStates: Map<string, TableStateSnapshot>;
67
+ /**
68
+ * Workbook metadata
69
+ */
70
+ metadata: WorkbookMetadata;
71
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Z-Index values for table layering
3
+ *
4
+ * Range Groups:
5
+ * - Table layers: -1 to 10
6
+ * - Dropdowns/Popups: 100-1001
7
+ * - Overlays/Modals: 2000-9999
8
+ */
9
+ export declare enum TableZIndex {
10
+ /** Hidden scroll spacer element (below everything) */
11
+ SCROLL_SPACER = -1,
12
+ /** Base table body layer */
13
+ BODY = 1,
14
+ /** Sticky columns in body (left/right) */
15
+ STICKY_COLUMN = 2,
16
+ /** Virtual scroll sticky header */
17
+ VIRTUAL_SCROLL_HEADER = 3,
18
+ /** Column resize handles */
19
+ RESIZE_HANDLE = 4,
20
+ /** Sticky body cells (inline styled) */
21
+ STICKY_BODY_CELL = 5,
22
+ /** Sticky header cells (inline styled) */
23
+ STICKY_HEADER_CELL = 7,
24
+ /** Standard table sticky header container */
25
+ STICKY_HEADER_CONTAINER = 8,
26
+ /** Focused cell (keyboard navigation - highest in table) */
27
+ FOCUSED_CELL = 10,
28
+ /** Table actions dropdown menu */
29
+ DROPDOWN = 100,
30
+ /** Add column button and similar UI elements */
31
+ FLOATING_BUTTON = 1000,
32
+ /** Column filter popup */
33
+ POPUP = 1001,
34
+ /** Modal backdrop/overlay */
35
+ MODAL_OVERLAY = 2000,
36
+ /** Table actions dropdown backdrop */
37
+ TABLE_ACTIONS_BACKDROP = 9996,
38
+ /** Table actions dropdown menu */
39
+ TABLE_ACTIONS_DROPDOWN = 9997,
40
+ /** Row actions dropdown backdrop */
41
+ ROW_ACTIONS_BACKDROP = 9998,
42
+ /** Row actions dropdown menu */
43
+ ROW_ACTIONS_DROPDOWN = 9999
44
+ }
@@ -0,0 +1,455 @@
1
+ /**
2
+ * TableConfig JSON Schema
3
+ * Exported as TypeScript constant for use in validation service
4
+ */
5
+ export declare const tableConfigSchema: {
6
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
7
+ readonly $id: "https://ngx-smart-table.schema/table-config.json";
8
+ readonly title: "Smart Table Configuration Schema";
9
+ readonly description: "JSON Schema for Smart Table TableConfig";
10
+ readonly type: "object";
11
+ readonly required: readonly ["columns"];
12
+ readonly properties: {
13
+ readonly columns: {
14
+ readonly type: "array";
15
+ readonly minItems: 1;
16
+ readonly description: "Array of column definitions";
17
+ readonly items: {
18
+ readonly $ref: "#/definitions/ColumnConfig";
19
+ };
20
+ };
21
+ readonly pagination: {
22
+ readonly $ref: "#/definitions/PaginationConfig";
23
+ };
24
+ readonly sorting: {
25
+ readonly $ref: "#/definitions/SortingConfig";
26
+ };
27
+ readonly filtering: {
28
+ readonly $ref: "#/definitions/FilteringConfig";
29
+ };
30
+ readonly selection: {
31
+ readonly $ref: "#/definitions/SelectionConfig";
32
+ };
33
+ readonly display: {
34
+ readonly $ref: "#/definitions/DisplayConfig";
35
+ };
36
+ readonly initialState: {
37
+ readonly $ref: "#/definitions/InitialStateConfig";
38
+ };
39
+ readonly features: {
40
+ readonly $ref: "#/definitions/FeaturesConfig";
41
+ };
42
+ };
43
+ readonly definitions: {
44
+ readonly ColumnConfig: {
45
+ readonly type: "object";
46
+ readonly required: readonly ["key", "header", "dataType"];
47
+ readonly properties: {
48
+ readonly key: {
49
+ readonly type: "string";
50
+ readonly pattern: "^[a-zA-Z_$][a-zA-Z0-9_$]*$";
51
+ readonly description: "Unique identifier for the column (must be a valid identifier)";
52
+ };
53
+ readonly header: {
54
+ readonly type: "string";
55
+ readonly description: "Display header text for the column";
56
+ };
57
+ readonly dataType: {
58
+ readonly type: "string";
59
+ readonly enum: readonly ["string", "number", "boolean", "date", "custom"];
60
+ readonly description: "Data type of the column values";
61
+ };
62
+ readonly editable: {
63
+ readonly type: "boolean";
64
+ readonly description: "Whether cells in this column are editable";
65
+ };
66
+ readonly editMode: {
67
+ readonly type: "string";
68
+ readonly enum: readonly ["click", "manual", "none"];
69
+ readonly description: "Edit mode trigger";
70
+ };
71
+ readonly sortable: {
72
+ readonly type: "boolean";
73
+ readonly description: "Whether this column is sortable";
74
+ };
75
+ readonly filterable: {
76
+ readonly type: "boolean";
77
+ readonly description: "Whether this column is filterable";
78
+ };
79
+ readonly hideable: {
80
+ readonly type: "boolean";
81
+ readonly description: "Whether this column's visibility can be toggled by users";
82
+ };
83
+ readonly movable: {
84
+ readonly type: "boolean";
85
+ readonly description: "Whether this column can be moved left/right by users";
86
+ };
87
+ readonly pinnable: {
88
+ readonly type: "boolean";
89
+ readonly description: "Whether this column can be pinned/unpinned by users";
90
+ };
91
+ readonly enableMenu: {
92
+ readonly type: "boolean";
93
+ readonly description: "Whether to show the column menu dropdown for this column";
94
+ };
95
+ readonly resizable: {
96
+ readonly type: "boolean";
97
+ readonly description: "Whether this column is resizable";
98
+ };
99
+ readonly width: {
100
+ readonly oneOf: readonly [{
101
+ readonly type: "number";
102
+ readonly minimum: 1;
103
+ }, {
104
+ readonly type: "string";
105
+ readonly enum: readonly ["auto"];
106
+ }];
107
+ readonly description: "Column width (px, %, or 'auto')";
108
+ };
109
+ readonly minWidth: {
110
+ readonly type: "number";
111
+ readonly minimum: 1;
112
+ readonly description: "Minimum column width (px)";
113
+ };
114
+ readonly maxWidth: {
115
+ readonly type: "number";
116
+ readonly minimum: 1;
117
+ readonly description: "Maximum column width (px)";
118
+ };
119
+ readonly sticky: {
120
+ readonly oneOf: readonly [{
121
+ readonly type: "string";
122
+ readonly enum: readonly ["left", "right"];
123
+ }, {
124
+ readonly type: "boolean";
125
+ readonly const: false;
126
+ }];
127
+ readonly description: "Whether this column is sticky (left or right)";
128
+ };
129
+ readonly showStickyShadow: {
130
+ readonly type: "boolean";
131
+ readonly description: "Whether to show shadow indicator on sticky columns";
132
+ };
133
+ readonly alignment: {
134
+ readonly type: "string";
135
+ readonly enum: readonly ["left", "center", "right"];
136
+ readonly description: "Cell content horizontal alignment";
137
+ };
138
+ readonly verticalAlignment: {
139
+ readonly type: "string";
140
+ readonly enum: readonly ["top", "middle", "bottom"];
141
+ readonly description: "Cell content vertical alignment";
142
+ };
143
+ readonly truncate: {
144
+ readonly type: "boolean";
145
+ readonly description: "Whether to truncate overflowing text";
146
+ };
147
+ readonly tooltip: {
148
+ readonly oneOf: readonly [{
149
+ readonly type: "string";
150
+ }, {
151
+ readonly type: "null";
152
+ }];
153
+ readonly description: "Tooltip configuration (string or function - functions not serializable)";
154
+ };
155
+ readonly className: {
156
+ readonly oneOf: readonly [{
157
+ readonly type: "string";
158
+ }, {
159
+ readonly type: "array";
160
+ readonly items: {
161
+ readonly type: "string";
162
+ };
163
+ }, {
164
+ readonly type: "null";
165
+ }];
166
+ readonly description: "CSS class name(s) for cells in this column";
167
+ };
168
+ readonly style: {
169
+ readonly type: "object";
170
+ readonly description: "Inline styles for cells in this column (object or function - functions not serializable)";
171
+ };
172
+ readonly visible: {
173
+ readonly type: "boolean";
174
+ readonly description: "Whether column is visible";
175
+ };
176
+ readonly pinned: {
177
+ readonly oneOf: readonly [{
178
+ readonly type: "string";
179
+ readonly enum: readonly ["left", "right"];
180
+ }, {
181
+ readonly type: "boolean";
182
+ readonly const: false;
183
+ }];
184
+ readonly description: "Whether column is pinned (left, right, or none)";
185
+ };
186
+ readonly sortPriority: {
187
+ readonly type: "number";
188
+ readonly description: "Sort order priority (for multi-column sort)";
189
+ };
190
+ readonly metadata: {
191
+ readonly type: "object";
192
+ readonly description: "Custom metadata for column";
193
+ };
194
+ readonly showLoadingIndicator: {
195
+ readonly type: "boolean";
196
+ readonly description: "Whether cells should show loading indicator during async operations";
197
+ };
198
+ readonly sortDirection: {
199
+ readonly type: "string";
200
+ readonly enum: readonly ["none", "asc", "desc"];
201
+ readonly description: "Current sort direction (runtime state)";
202
+ };
203
+ readonly sortEnabled: {
204
+ readonly type: "boolean";
205
+ readonly description: "Whether sorting is currently active/enabled (runtime state)";
206
+ };
207
+ readonly filterConfig: {
208
+ readonly type: "object";
209
+ readonly properties: {
210
+ readonly operator: {
211
+ readonly type: "string";
212
+ readonly enum: readonly ["equals", "contains", "startsWith", "endsWith", "gt", "lt", "gte", "lte", "between", "in"];
213
+ readonly description: "Filter operator";
214
+ };
215
+ readonly value: {
216
+ readonly description: "Current filter value (any type)";
217
+ };
218
+ readonly enabled: {
219
+ readonly type: "boolean";
220
+ readonly description: "Whether filtering is currently active/enabled";
221
+ };
222
+ readonly options: {
223
+ readonly $ref: "#/definitions/FilterOptions";
224
+ readonly description: "Custom filter options for dropdown-based filtering";
225
+ };
226
+ };
227
+ readonly additionalProperties: false;
228
+ readonly description: "Filter configuration for this column";
229
+ };
230
+ readonly stickyOffset: {
231
+ readonly type: "number";
232
+ readonly minimum: 0;
233
+ readonly description: "Calculated offset for sticky positioning (runtime state, auto-calculated)";
234
+ };
235
+ };
236
+ readonly additionalProperties: false;
237
+ };
238
+ readonly PaginationConfig: {
239
+ readonly type: "object";
240
+ readonly properties: {
241
+ readonly enabled: {
242
+ readonly type: "boolean";
243
+ readonly description: "Enable pagination";
244
+ };
245
+ readonly pageSize: {
246
+ readonly type: "number";
247
+ readonly minimum: 1;
248
+ readonly description: "Number of items per page";
249
+ };
250
+ readonly pageSizeOptions: {
251
+ readonly type: "array";
252
+ readonly items: {
253
+ readonly type: "number";
254
+ readonly minimum: 1;
255
+ };
256
+ readonly minItems: 1;
257
+ readonly description: "Available page size options for user selection";
258
+ };
259
+ readonly showPagination: {
260
+ readonly type: "boolean";
261
+ readonly description: "Show pagination UI controls";
262
+ };
263
+ readonly showTopControls: {
264
+ readonly type: "boolean";
265
+ readonly description: "Show pagination controls at the top of the table";
266
+ };
267
+ readonly showBottomControls: {
268
+ readonly type: "boolean";
269
+ readonly description: "Show pagination controls at the bottom of the table";
270
+ };
271
+ readonly totalItems: {
272
+ readonly type: "number";
273
+ readonly minimum: 0;
274
+ readonly description: "Total number of items available (for server-side pagination)";
275
+ };
276
+ };
277
+ readonly additionalProperties: false;
278
+ };
279
+ readonly SortingConfig: {
280
+ readonly type: "object";
281
+ readonly properties: {
282
+ readonly enabled: {
283
+ readonly type: "boolean";
284
+ readonly description: "Enable sorting";
285
+ };
286
+ readonly multiColumn: {
287
+ readonly type: "boolean";
288
+ readonly description: "Allow sorting by multiple columns simultaneously";
289
+ };
290
+ readonly mode: {
291
+ readonly type: "string";
292
+ readonly enum: readonly ["local", "server"];
293
+ readonly description: "Sorting mode - local (client-side) or server (API-based)";
294
+ };
295
+ };
296
+ readonly additionalProperties: false;
297
+ };
298
+ readonly FilteringConfig: {
299
+ readonly type: "object";
300
+ readonly properties: {
301
+ readonly enabled: {
302
+ readonly type: "boolean";
303
+ readonly description: "Enable filtering";
304
+ };
305
+ readonly mode: {
306
+ readonly type: "string";
307
+ readonly enum: readonly ["local", "server"];
308
+ readonly description: "Filtering mode - local (client-side) or server (API-based)";
309
+ };
310
+ };
311
+ readonly additionalProperties: false;
312
+ };
313
+ readonly SelectionConfig: {
314
+ readonly type: "object";
315
+ readonly properties: {
316
+ readonly enabled: {
317
+ readonly type: "boolean";
318
+ readonly description: "Enable row selection";
319
+ };
320
+ readonly mode: {
321
+ readonly type: "string";
322
+ readonly enum: readonly ["single", "multiple"];
323
+ readonly description: "Selection mode - single row or multiple rows";
324
+ };
325
+ };
326
+ readonly additionalProperties: false;
327
+ };
328
+ readonly DisplayConfig: {
329
+ readonly type: "object";
330
+ readonly properties: {
331
+ readonly stickyHeader: {
332
+ readonly type: "boolean";
333
+ readonly description: "Make table header sticky on scroll";
334
+ };
335
+ readonly maxHeight: {
336
+ readonly type: "number";
337
+ readonly description: "Maximum height of the table in pixels";
338
+ };
339
+ readonly virtualScroll: {
340
+ readonly $ref: "#/definitions/VirtualScrollConfig";
341
+ };
342
+ };
343
+ readonly additionalProperties: false;
344
+ };
345
+ readonly InitialStateConfig: {
346
+ readonly type: "object";
347
+ readonly properties: {
348
+ readonly page: {
349
+ readonly type: "number";
350
+ readonly minimum: 0;
351
+ readonly description: "Initial page number (0-indexed)";
352
+ };
353
+ readonly sortBy: {
354
+ readonly type: "array";
355
+ readonly items: {
356
+ readonly type: "object";
357
+ readonly required: readonly ["key"];
358
+ readonly properties: {
359
+ readonly key: {
360
+ readonly type: "string";
361
+ readonly description: "Column key to sort by";
362
+ };
363
+ readonly direction: {
364
+ readonly type: "string";
365
+ readonly enum: readonly ["none", "asc", "desc"];
366
+ readonly description: "Sort direction";
367
+ };
368
+ };
369
+ readonly additionalProperties: false;
370
+ };
371
+ readonly description: "Initial sort configuration";
372
+ };
373
+ readonly filters: {
374
+ readonly type: "array";
375
+ readonly items: {
376
+ readonly type: "object";
377
+ readonly required: readonly ["key", "operator"];
378
+ readonly properties: {
379
+ readonly key: {
380
+ readonly type: "string";
381
+ readonly description: "Column key to filter";
382
+ };
383
+ readonly operator: {
384
+ readonly type: "string";
385
+ readonly enum: readonly ["equals", "contains", "startsWith", "endsWith", "gt", "lt", "gte", "lte", "between", "in"];
386
+ readonly description: "Filter operator";
387
+ };
388
+ readonly value: {
389
+ readonly description: "Filter value (any type)";
390
+ };
391
+ };
392
+ readonly additionalProperties: false;
393
+ };
394
+ readonly description: "Initial filter configuration";
395
+ };
396
+ };
397
+ readonly additionalProperties: false;
398
+ };
399
+ readonly FeaturesConfig: {
400
+ readonly type: "object";
401
+ readonly properties: {
402
+ readonly columnManagement: {
403
+ readonly type: "object";
404
+ readonly properties: {
405
+ readonly allowAdd: {
406
+ readonly type: "boolean";
407
+ readonly description: "Allow users to add new columns dynamically";
408
+ readonly default: false;
409
+ };
410
+ };
411
+ readonly additionalProperties: false;
412
+ readonly description: "Column management features";
413
+ };
414
+ readonly keyboardNavigation: {
415
+ readonly type: "object";
416
+ readonly properties: {
417
+ readonly enabled: {
418
+ readonly type: "boolean";
419
+ readonly description: "Enable Excel-like keyboard navigation with arrow keys";
420
+ readonly default: false;
421
+ };
422
+ };
423
+ readonly additionalProperties: false;
424
+ readonly description: "Keyboard navigation features";
425
+ };
426
+ };
427
+ readonly additionalProperties: false;
428
+ readonly description: "Features configuration for table capabilities";
429
+ };
430
+ readonly FilterOptions: {
431
+ readonly type: "object";
432
+ readonly required: readonly ["data", "handler"];
433
+ readonly properties: {
434
+ readonly data: {
435
+ readonly type: "array";
436
+ readonly description: "Array of data items to display in the dropdown";
437
+ readonly items: {
438
+ readonly description: "Data item of any type";
439
+ };
440
+ };
441
+ readonly handler: {
442
+ readonly description: "Handler function to transform data items into {label, value} pairs. Type: (item: any) => {label: string, value: any}";
443
+ };
444
+ readonly multiselect: {
445
+ readonly type: "boolean";
446
+ readonly description: "Whether to allow multiple selections (default: false)";
447
+ readonly default: false;
448
+ };
449
+ };
450
+ readonly additionalProperties: false;
451
+ readonly description: "Filter options configuration for custom dropdown filters";
452
+ };
453
+ };
454
+ readonly additionalProperties: false;
455
+ };
@@ -0,0 +1,73 @@
1
+ import { WorkbookConfig } from '../models/workbook-config.interface';
2
+ import { WorkbookStateSnapshot } from '../renderer/models/workbook-state.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Autosave data structure
6
+ */
7
+ export interface AutosaveData {
8
+ workbookConfig: WorkbookConfig;
9
+ workbookState: WorkbookStateSnapshot;
10
+ sheetsData: Map<string, any[]>;
11
+ timestamp: Date;
12
+ }
13
+ /**
14
+ * AutosaveService - In-memory autosave storage
15
+ *
16
+ * Stores autosave data in memory for workbooks.
17
+ * Data is automatically cleared when the component is destroyed or tab is closed.
18
+ */
19
+ export declare class AutosaveService {
20
+ /**
21
+ * In-memory storage for autosaved data
22
+ */
23
+ private autosaveStore;
24
+ /**
25
+ * Track dirty state per workbook
26
+ */
27
+ private dirtyState;
28
+ /**
29
+ * Track last save timestamp per workbook
30
+ */
31
+ private lastSaveTime;
32
+ /**
33
+ * Save workbook data to memory
34
+ * @param workbookId Unique workbook identifier
35
+ * @param data Autosave data to store
36
+ */
37
+ save(workbookId: string, data: AutosaveData): void;
38
+ /**
39
+ * Retrieve autosaved data for a workbook
40
+ * @param workbookId Unique workbook identifier
41
+ * @returns Autosaved data or null if not found
42
+ */
43
+ get(workbookId: string): AutosaveData | null;
44
+ /**
45
+ * Check if workbook has unsaved changes
46
+ * @param workbookId Unique workbook identifier
47
+ * @returns True if workbook has unsaved changes
48
+ */
49
+ isDirty(workbookId: string): boolean;
50
+ /**
51
+ * Mark workbook as dirty or clean
52
+ * @param workbookId Unique workbook identifier
53
+ * @param dirty Dirty state
54
+ */
55
+ setDirty(workbookId: string, dirty: boolean): void;
56
+ /**
57
+ * Get last save timestamp for a workbook
58
+ * @param workbookId Unique workbook identifier
59
+ * @returns Last save timestamp or null
60
+ */
61
+ getLastSaveTime(workbookId: string): Date | null;
62
+ /**
63
+ * Clear autosave data for a specific workbook
64
+ * @param workbookId Unique workbook identifier
65
+ */
66
+ clear(workbookId: string): void;
67
+ /**
68
+ * Clear all autosave data
69
+ */
70
+ clearAll(): void;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutosaveService, never>;
72
+ static ɵprov: i0.ɵɵInjectableDeclaration<AutosaveService>;
73
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Custom validation rules utility
3
+ * Implements business logic validations that can't be expressed in JSON Schema
4
+ */
5
+ import { TableConfig } from '../models/table-config.interface';
6
+ import { SchemaValidationError } from '../models/schema-validation.interface';
7
+ /**
8
+ * Validate custom business rules
9
+ * @param config Table configuration
10
+ * @returns Array of validation errors
11
+ */
12
+ export declare function validateCustomRules(config: TableConfig): SchemaValidationError[];