ia-table 0.12.9 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,15 +1,3514 @@
1
- import { ComponentType } from "react";
2
- import type { SmartGridTableProps } from "./components/IATable/types/table";
3
-
4
- // Export all types from the types folder
5
- export * from "./components/IATable/types/index";
6
-
7
- // SVG module declarations for library consumers
8
- declare module "*.svg" {
9
- import React from "react";
10
- const SVGComponent: React.FC<React.SVGProps<SVGSVGElement>>;
11
- export default SVGComponent;
12
- }
13
-
14
- declare const IATable: ComponentType<SmartGridTableProps>;
15
- export default IATable;
1
+ import { ChangeEvent } from 'react';
2
+ import { CSSProperties } from 'react';
3
+ import { default as default_2 } from 'react';
4
+ import { Dispatch } from 'react';
5
+ import { FocusEvent as FocusEvent_2 } from 'react';
6
+ import { ForwardRefExoticComponent } from 'react';
7
+ import { Moment } from 'moment';
8
+ import { MouseEvent as MouseEvent_2 } from 'react';
9
+ import { MutableRefObject } from 'react';
10
+ import { ReactNode } from 'react';
11
+ import { Ref } from 'react';
12
+ import { RefAttributes } from 'react';
13
+ import { RefObject } from 'react';
14
+ import { SetStateAction } from 'react';
15
+
16
+ declare const ACTION_TYPES: {
17
+ readonly SET_DATA: "SET_DATA";
18
+ readonly SET_FILTERED_DATA: "SET_FILTERED_DATA";
19
+ readonly SET_COLUMNS: "SET_COLUMNS";
20
+ readonly SET_SORT: "SET_SORT";
21
+ readonly SET_PAGE: "SET_PAGE";
22
+ readonly SET_PAGE_SIZE: "SET_PAGE_SIZE";
23
+ readonly SET_SELECTED_ROWS: "SET_SELECTED_ROWS";
24
+ readonly SET_COLUMN_FILTER: "SET_COLUMN_FILTER";
25
+ readonly REMOVE_COLUMN_FILTER: "REMOVE_COLUMN_FILTER";
26
+ readonly APPLY_FILTERS: "APPLY_FILTERS";
27
+ readonly TOGGLE_GROUP_EXPANSION: "TOGGLE_GROUP_EXPANSION";
28
+ readonly SET_FIELD_KEYS: "SET_FIELD_KEYS";
29
+ readonly UPDATE_ROW_DATA: "UPDATE_ROW_DATA";
30
+ readonly SELECTION_CHANGED_HANDLED: "SELECTION_CHANGED_HANDLED";
31
+ readonly FREEZE_COLUMN: "FREEZE_COLUMN";
32
+ readonly UNFREEZE_COLUMN: "UNFREEZE_COLUMN";
33
+ readonly PIN_COLUMN_RIGHT: "PIN_COLUMN_RIGHT";
34
+ readonly UNPIN_COLUMN_RIGHT: "UNPIN_COLUMN_RIGHT";
35
+ readonly SET_COLUMN_WIDTH: "SET_COLUMN_WIDTH";
36
+ readonly SET_COLUMNS_WIDTH: "SET_COLUMNS_WIDTH";
37
+ readonly SHOW_NOTIFICATION: "SHOW_NOTIFICATION";
38
+ readonly HIDE_NOTIFICATION: "HIDE_NOTIFICATION";
39
+ readonly AUTOSIZE_COLUMNS_REQUESTED: "AUTOSIZE_COLUMNS_REQUESTED";
40
+ readonly TOGGLE_FREEZE_COLUMN: "TOGGLE_FREEZE_COLUMN";
41
+ readonly REORDER_COLUMNS: "REORDER_COLUMNS";
42
+ readonly SET_PREV_ACTION: "SET_PREV_ACTION";
43
+ readonly SET_CHECK_CONFIGURATION: "SET_CHECK_CONFIGURATION";
44
+ readonly SET_IS_SELECT_ALL_RECORDS: "SET_IS_SELECT_ALL_RECORDS";
45
+ readonly BATCH_UPDATE: "BATCH_UPDATE";
46
+ readonly UPDATE_ROW_DATA_OBJECT: "UPDATE_ROW_DATA_OBJECT";
47
+ readonly TOGGLE_COLUMN_VISIBILITY: "TOGGLE_COLUMN_VISIBILITY";
48
+ readonly TOGGLE_MASTER_DETAIL: "TOGGLE_MASTER_DETAIL";
49
+ readonly SET_DETAIL_RENDERER: "SET_DETAIL_RENDERER";
50
+ readonly SET_MASTER_DETAIL_CONFIG: "SET_MASTER_DETAIL_CONFIG";
51
+ readonly ADD_EVENT_LISTENER: "ADD_EVENT_LISTENER";
52
+ readonly REMOVE_EVENT_LISTENER: "REMOVE_EVENT_LISTENER";
53
+ readonly TOGGLE_COLUMN_GROUP: "TOGGLE_COLUMN_GROUP";
54
+ readonly SET_EXPANDED_COLUMN_GROUPS: "SET_EXPANDED_COLUMN_GROUPS";
55
+ readonly ENABLE_ROW_SPAN: "ENABLE_ROW_SPAN";
56
+ readonly SET_ROW_SPAN_COLUMN: "SET_ROW_SPAN_COLUMN";
57
+ readonly MOVE_ROW: "MOVE_ROW";
58
+ readonly PREVIEW_ROW_MOVE: "PREVIEW_ROW_MOVE";
59
+ readonly RESET_ROW_PREVIEW: "RESET_ROW_PREVIEW";
60
+ readonly SET_PINNED_TOP_ROWS: "SET_PINNED_TOP_ROWS";
61
+ readonly SET_PINNED_BOTTOM_ROWS: "SET_PINNED_BOTTOM_ROWS";
62
+ readonly TOGGLE_ROW_GROUP: "TOGGLE_ROW_GROUP";
63
+ readonly LOAD_ROW_GROUP_DATA: "LOAD_ROW_GROUP_DATA";
64
+ readonly SET_ROW_GROUP_DATA: "SET_ROW_GROUP_DATA";
65
+ readonly SET_ROW_GROUP_LOADING: "SET_ROW_GROUP_LOADING";
66
+ readonly SET_ROW_GROUP_PAGINATION: "SET_ROW_GROUP_PAGINATION";
67
+ readonly CLEAR_ROW_GROUP_CACHE: "CLEAR_ROW_GROUP_CACHE";
68
+ readonly REFRESH_ROW_GROUP_DATA: "REFRESH_ROW_GROUP_DATA";
69
+ readonly SET_API: "SET_API";
70
+ readonly SET_COLUMN_MAP: "SET_COLUMN_MAP";
71
+ readonly SET_NUMBER_FORMAT: "SET_NUMBER_FORMAT";
72
+ readonly SET_HEADER_ROW_HEIGHT: "SET_HEADER_ROW_HEIGHT";
73
+ readonly CLEANUP_TABLE_RESOURCES: "CLEANUP_TABLE_RESOURCES";
74
+ readonly ADD_TABLE_INSTANCE: "ADD_TABLE_INSTANCE";
75
+ readonly ROW_DRAG_MANAGED: "ROW_DRAG_MANAGED";
76
+ readonly INFINITE_SCROLL: "INFINITE_SCROLL";
77
+ readonly SET_INITIAL_EXPANDED_COLUMN_GROUPS: "SET_INITIAL_EXPANDED_COLUMN_GROUPS";
78
+ readonly SET_SERVER_SIDE: "SET_SERVER_SIDE";
79
+ readonly SET_TABLE_API: "SET_TABLE_API";
80
+ readonly EXPAND_COLLAPSE_ALL_COLUMNS: "EXPAND_COLLAPSE_ALL_COLUMNS";
81
+ readonly SET_SMART_GRID_MENU_OPTIONS: "SET_SMART_GRID_MENU_OPTIONS";
82
+ readonly ROW_GROUP_CACHE_ENABLE: "ROW_GROUP_CACHE_ENABLE";
83
+ readonly DETAIL_RENDERER_TABLE: "DETAIL_RENDERER_TABLE";
84
+ readonly IS_SAVE_VIEW_ENABLED: "IS_SAVE_VIEW_ENABLED";
85
+ readonly SAVE_VIEW_CALLBACKS: "SAVE_VIEW_CALLBACKS";
86
+ readonly SET_ROW_HEIGHT: "SET_ROW_HEIGHT";
87
+ readonly EXPAND_COLLAPSE_ALL_ROWS: "EXPAND_COLLAPSE_ALL_ROWS";
88
+ readonly SET_LOADING: "SET_LOADING";
89
+ readonly SET_REFS: "SET_REFS";
90
+ readonly SET_TABLE_ID: "SET_TABLE_ID";
91
+ readonly SET_IS_SINGLE_SELECT: "SET_IS_SINGLE_SELECT";
92
+ readonly SET_DEFAULT_COL_DEF: "SET_DEFAULT_COL_DEF";
93
+ readonly SET_SELECTABLE: "SET_SELECTABLE";
94
+ readonly SET_DISABLE_SELECT_ALL_RECORDS_OPTION: "SET_DISABLE_SELECT_ALL_RECORDS_OPTION";
95
+ readonly SET_COLUMN_BUFFER_SIZE: "SET_COLUMN_BUFFER_SIZE";
96
+ readonly SET_LAZY_LOAD_CELL_RENDERER: "SET_LAZY_LOAD_CELL_RENDERER";
97
+ readonly SET_HAS_SPLIT_RENDERER: "SET_HAS_SPLIT_RENDERER";
98
+ readonly SET_HAS_SPLIT_RENDERER_KEYS: "SET_HAS_SPLIT_RENDERER_KEYS";
99
+ readonly SET_REMOVE_SELECTION_ON_OPERATION: "SET_REMOVE_SELECTION_ON_OPERATION";
100
+ };
101
+
102
+ declare interface ChildHeightsResult {
103
+ childrenTotalHeight: number;
104
+ childCount: number;
105
+ }
106
+
107
+ export declare interface DateValidationConstraints {
108
+ startDate: Date | string;
109
+ endDate: Date | string;
110
+ startYear: number;
111
+ endYear: number;
112
+ disableOnlyPast?: boolean;
113
+ disableOnlyFuture?: boolean;
114
+ disablePast?: boolean;
115
+ disableFuture?: boolean;
116
+ minDate?: Date | string;
117
+ maxDate?: Date | string;
118
+ }
119
+
120
+ declare const Index: ForwardRefExoticComponent<Omit<SmartGridTableProps, "ref"> & RefAttributes<SmartGridTableAPIObject | null>>;
121
+ export default Index;
122
+
123
+ declare class InfiniteBlock {
124
+ static STATE_WAITING_TO_LOAD: string;
125
+ static STATE_LOADING: string;
126
+ static STATE_LOADED: string;
127
+ static STATE_FAILED: string;
128
+ static MAX_EMPTY_BLOCKS_TO_KEEP: number;
129
+ id: number;
130
+ parentCache: SmartGridInfiniteCacheInterface;
131
+ parent: SmartGridInfiniteCacheInterface;
132
+ params: SmartGridBlockParams;
133
+ state: string;
134
+ version: number;
135
+ lastAccessed: number;
136
+ rows: Record<number, SmartGridRowData>;
137
+ infiniteCache: SmartGridInfiniteCacheInterface;
138
+ startRow: number;
139
+ endRow: number;
140
+ rowNodes: SmartGridBlockRowNode[];
141
+ loadStartedAt?: number;
142
+ _targetPage?: number;
143
+ _responseMetadata?: SmartGridResponseMetadata;
144
+ _processingInProgress?: boolean;
145
+ _actualRowCount?: number;
146
+ _inactiveForPageTransition?: boolean;
147
+ constructor(id: number, parentCache: SmartGridInfiniteCacheInterface, params: SmartGridBlockParams);
148
+ /**
149
+ * Create empty row nodes
150
+ */
151
+ createRowNodes(): void;
152
+ /**
153
+ * Gets the block ID
154
+ */
155
+ getId(): number;
156
+ /**
157
+ * Gets the current state of the block
158
+ */
159
+ getState(): string;
160
+ /**
161
+ * Gets the start row index of this block
162
+ */
163
+ getStartRow(): number;
164
+ /**
165
+ * Gets the end row index of this block
166
+ */
167
+ getEndRow(): number;
168
+ /**
169
+ * Gets the current version of this block
170
+ * Used to ignore responses from outdated requests
171
+ */
172
+ getVersion(): number;
173
+ /**
174
+ * Gets the last time this block was accessed
175
+ * Used for LRU cache management
176
+ */
177
+ getLastAccessed(): number;
178
+ /**
179
+ * Gets a row node at the specified index
180
+ * Updates the last accessed time for LRU cache management
181
+ */
182
+ getRow(rowIndex: number, dontTouchLastAccessed?: boolean): SmartGridBlockRowNode | null;
183
+ /**
184
+ * Load data from datasource
185
+ */
186
+ loadFromDatasource(): void;
187
+ /**
188
+ * Process the response from the server
189
+ */
190
+ processServerResponse(rows: SmartGridRowData[], lastRow?: number, lastRowIndexKnown?: boolean): void;
191
+ /**
192
+ * Initialize block from server response
193
+ */
194
+ initBlockFromServerResponse(rows: SmartGridRowData[]): void;
195
+ /**
196
+ * Sets data and ID for a row node
197
+ */
198
+ setDataAndId(rowNode: SmartGridBlockRowNode, data: SmartGridRowData, rowIndex: number): void;
199
+ /**
200
+ * Set state to waiting to load
201
+ */
202
+ setStateWaitingToLoad(): void;
203
+ /**
204
+ * Iterates through each row node
205
+ */
206
+ forEachNode(callback: (rowNode: SmartGridBlockRowNode, index: number) => void): void;
207
+ /**
208
+ * Returns block state as JSON for debugging
209
+ */
210
+ getBlockStateJson(): SmartGridBlockStateJson;
211
+ /**
212
+ * Clean up row nodes before the block is destroyed
213
+ */
214
+ destroyRowNodes(): void;
215
+ /**
216
+ * Determines the index of the last row that has data
217
+ */
218
+ getLastRow(): number;
219
+ isBlockBeyondEndOfScope(): boolean;
220
+ getRowNode(rowIndex: number): SmartGridBlockRowNode | null;
221
+ pageLoaded(version: number): void;
222
+ loadFailed(version?: number): void;
223
+ getRowNodes(): SmartGridBlockRowNode[];
224
+ /**
225
+ * Gets the number of rows in this block that have data
226
+ */
227
+ getRowCount(): number;
228
+ }
229
+
230
+ declare class InfiniteCache {
231
+ static PURGE_STRATEGY_LRU: string;
232
+ static PURGE_STRATEGY_FURTHEST_FROM_VIEWPORT: string;
233
+ static PURGE_STRATEGY_MEMORY_OPTIMIZED: string;
234
+ params: SmartGridCacheParams;
235
+ blocks: Record<number, InfiniteBlock>;
236
+ blockCount: number;
237
+ rowCount: number;
238
+ lastRowIndexKnown: boolean;
239
+ eventListeners: Record<string, Array<(event: SmartGridCacheEvent) => void>>;
240
+ lastRequestedPage: number;
241
+ analytics: SmartGridCacheAnalytics_2;
242
+ rowsMaxIndex?: number;
243
+ _currentRequestedPage?: number;
244
+ _blockCreationQueue?: Set<number>;
245
+ constructor(params: Partial<SmartGridCacheParams>);
246
+ /**
247
+ * Gets a row at a specific index, creating blocks as needed
248
+ */
249
+ getRow(rowIndex: number, dontCreateBlock?: boolean): SmartGridBlockRowNode | undefined;
250
+ /**
251
+ * Creates a new block to manage a range of rows
252
+ */
253
+ createBlock(blockId: number): InfiniteBlock;
254
+ /**
255
+ * Get row indexes for a specific block
256
+ */
257
+ getRowIndexesForBlock(blockId: number): number[];
258
+ /**
259
+ * Notify about block state changes
260
+ */
261
+ notifyBlockStateChanged(blockId: number, state: string, rowIndexes: number[]): void;
262
+ /**
263
+ * Gets a block by ID
264
+ */
265
+ getBlock(blockId: number): InfiniteBlock | undefined;
266
+ /**
267
+ * Gets the current row count
268
+ */
269
+ getRowCount(): number;
270
+ /**
271
+ * Checks if total row count is known or virtual
272
+ */
273
+ isLastRowIndexKnown(): boolean;
274
+ /**
275
+ * Sets the row count and updates lastRowIndexKnown flag
276
+ */
277
+ setRowCount(rowCount: number, lastRowIndexKnown?: boolean): void;
278
+ /**
279
+ * Count the total number of rows with data across all blocks in the cache
280
+ */
281
+ getTotalCachedRowCount(): {
282
+ totalRows: number;
283
+ rowsWithData: number;
284
+ blockCount: number;
285
+ blocksWithData: Array<{
286
+ blockId: number;
287
+ rowCount: number;
288
+ }>;
289
+ };
290
+ /**
291
+ * Callback for when a block finishes loading
292
+ */
293
+ pageLoaded(block: InfiniteBlock, lastRow?: number): void;
294
+ /**
295
+ * Print all cached data from all blocks
296
+ * Shows a complete snapshot of what's actually in the cache
297
+ */
298
+ printAllCachedData(): void;
299
+ /**
300
+ * Check and update row count based on loaded block data
301
+ */
302
+ checkRowCount(block: InfiniteBlock, lastRow: number | boolean | null): void;
303
+ /**
304
+ * Gets all blocks in the cache, sorted by ID
305
+ */
306
+ getBlocksInOrder(): InfiniteBlock[];
307
+ /**
308
+ * Removes expired blocks from the cache using configured strategy
309
+ */
310
+ purgeBlocksIfNeeded(blockToExclude: InfiniteBlock): void;
311
+ /**
312
+ * Sorts blocks based on the specified strategy
313
+ */
314
+ sortBlocksByStrategy(blocks: InfiniteBlock[], strategy: string): InfiniteBlock[];
315
+ /**
316
+ * Compares two blocks based on the specified strategy
317
+ * Returns a negative number if a should be removed before b
318
+ */
319
+ compareBlocksByStrategy(a: InfiniteBlock, b: InfiniteBlock, strategy: string): number;
320
+ /**
321
+ * Sort blocks by distance from viewport (for furthest-from-viewport strategy)
322
+ */
323
+ sortBlocksByDistanceFromViewport(blocks: InfiniteBlock[]): void;
324
+ /**
325
+ * Sort blocks using the memory-optimized strategy
326
+ * This uses a combined heuristic considering:
327
+ * 1. Block access recency
328
+ * 2. Distance from viewport
329
+ * 3. Block data size (if available)
330
+ */
331
+ sortBlocksByMemoryOptimized(blocks: InfiniteBlock[]): void;
332
+ /**
333
+ * Checks if a block is currently in the visible viewport
334
+ */
335
+ isBlockCurrentlyDisplayed(block: InfiniteBlock): boolean;
336
+ /**
337
+ * Removes a block from the cache and destroys it
338
+ */
339
+ removeBlockFromCache(blockToRemove: InfiniteBlock): void;
340
+ /**
341
+ * Gets all row nodes in a range (used for selection)
342
+ */
343
+ getRowNodesInRange(firstIndex: number, lastIndex: number): SmartGridBlockRowNode[];
344
+ /**
345
+ * Iterates over all row nodes in the cache
346
+ */
347
+ forEachNodeDeep(callback: (rowNode: SmartGridBlockRowNode, index: number) => void): void;
348
+ /**
349
+ * Purges the entire cache
350
+ */
351
+ purgeCache(options?: Record<string, unknown>): void;
352
+ /**
353
+ * Refreshes the cache without purging it completely
354
+ */
355
+ refreshCache(): void;
356
+ /**
357
+ * Refreshes the cache partially, preserving specified fields
358
+ */
359
+ refreshCachePartial(preserveFields?: string[]): void;
360
+ /**
361
+ * Sets view port range
362
+ */
363
+ setViewportRange(startRow: number, endRow: number): void;
364
+ /**
365
+ * Returns all data from all blocks as a flattened array
366
+ */
367
+ /**
368
+ * Ensures blocks are loaded for the specified range
369
+ */
370
+ ensureBlocksLoadedForRange(startRow: number, endRow: number): void;
371
+ /**
372
+ * Adds an event listener
373
+ */
374
+ addEventListener(type: string, listener: (event: SmartGridCacheEvent) => void): void;
375
+ /**
376
+ * Removes an event listener
377
+ */
378
+ removeEventListener(type: string, listener: (event: SmartGridCacheEvent) => void): void;
379
+ /**
380
+ * Dispatches an event to all listeners
381
+ */
382
+ dispatchEvent(event: SmartGridCacheEvent): void;
383
+ /**
384
+ * Returns cache state for debugging
385
+ */
386
+ getCacheState(): SmartGridCacheState_2;
387
+ /**
388
+ * Returns analytics data
389
+ */
390
+ getAnalytics(): SmartGridCacheAnalytics_2 & {
391
+ uptime: number;
392
+ hitRatio: number;
393
+ avgLoadTime: number;
394
+ hitsPerSecond: number;
395
+ missesPerSecond: number;
396
+ blocksPurgedPerSecond: number;
397
+ bytesPerSecond: number;
398
+ };
399
+ /**
400
+ * Resets analytics data
401
+ */
402
+ resetAnalytics(): void;
403
+ /**
404
+ * Save cache state to persistence if enabled
405
+ */
406
+ persistCacheIfEnabled(): void;
407
+ /**
408
+ * Restore cache from persistence
409
+ */
410
+ restoreFromPersistence(): void;
411
+ /**
412
+ * Clear persisted cache state
413
+ */
414
+ clearPersistence(): void;
415
+ /**
416
+ * Sets the purge strategy
417
+ */
418
+ setPurgeStrategy(strategy: string): void;
419
+ isBlockInCreationQueue(blockId: number): boolean;
420
+ /**
421
+ * Logs a summary of the current cache state
422
+ * Can be called from outside to check the cache status at any time
423
+ */
424
+ logCacheSummary(): {
425
+ totalRows: number;
426
+ rowsWithData: number;
427
+ blockCount: number;
428
+ blocksWithData: Array<{
429
+ blockId: number;
430
+ rowCount: number;
431
+ }>;
432
+ };
433
+ isBlockCached(blockId: number): boolean;
434
+ getBlockData(blockId: number): (SmartGridRowData | null)[] | null;
435
+ getAllCachedData(): SmartGridRowData[];
436
+ updatePageData(pageNo: number, updatedData: SmartGridRowData[], notifyChanges?: boolean, options?: Record<string, unknown>): {
437
+ success: boolean;
438
+ pageNo: number;
439
+ updatedRows: number;
440
+ errors: string[];
441
+ };
442
+ updateBlockData(blockId: number, newData: SmartGridRowData[], notifyChanges?: boolean): {
443
+ success: boolean;
444
+ blockId: number;
445
+ updatedRows: number;
446
+ errors: string[];
447
+ };
448
+ updateWholeData(wholeData: SmartGridRowData[], pageSize: number): SmartGridUpdateDataReturnType;
449
+ }
450
+
451
+ declare interface RowGroupParams {
452
+ page: number;
453
+ pageSize: number;
454
+ groupId?: string;
455
+ noDataUpdate?: boolean;
456
+ }
457
+
458
+ /**
459
+ * A specialized cache for efficiently managing row heights in virtualized tables
460
+ * Optimized for large datasets (9K+ rows) to improve virtualization performance
461
+ */
462
+ declare class RowHeightCache {
463
+ private heightMap;
464
+ private hierarchicalLookup;
465
+ private prefixLookup;
466
+ private accumulatedHeights;
467
+ private totalHeight;
468
+ private isDirty;
469
+ private previousRowHeight;
470
+ private count;
471
+ private previousCount;
472
+ constructor();
473
+ setAllHeight(rowHeightMap: RowHeightMap): void;
474
+ setPreviousCount(newCount: number): void;
475
+ setHeight(rowId: string | number, height: number, rowIndex?: number | string): void;
476
+ getHeight(rowId: string | number, defaultHeight: number, rowIndex?: number | string): number;
477
+ getChildHeights(defaultHeight: number, rowIndex?: number): ChildHeightsResult;
478
+ buildAccumulatedHeights(data: SmartGridRowData[], defaultHeight: number, uniqueIdField: string | undefined, rowHeight: number): void;
479
+ findRowAtScrollPosition(scrollTop: number): number;
480
+ getTotalHeight(): number;
481
+ toObject(): RowHeightMap;
482
+ static fromObject(heightMap: RowHeightMap): RowHeightCache;
483
+ }
484
+
485
+ declare type RowHeightMap = Record<string | number, number>;
486
+
487
+ export declare interface RowSpanParams {
488
+ node: {
489
+ rowIndex: number;
490
+ data: SmartGridRowData;
491
+ api: SmartGridAPI;
492
+ };
493
+ api: SmartGridAPI;
494
+ rowIndex?: number;
495
+ data: SmartGridRowData;
496
+ wholeData: SmartGridRowData[];
497
+ }
498
+
499
+ export declare type SmartGridActionTypes = typeof ACTION_TYPES;
500
+
501
+ export declare interface SmartGridAPI {
502
+ getInfiniteRowModel: () => SmartGridInfiniteRowModel | null;
503
+ getInfiniteCache: () => SmartGridInfiniteCache | null;
504
+ getModel: () => SmartGridTableModel;
505
+ onCellValueChanged: (params: SmartGridCellValueChangedParams) => void;
506
+ getPrevAction: () => string;
507
+ setPrevAction: (value: string) => void;
508
+ getCheckConfiguration: () => SmartGridCheckConfiguration[];
509
+ setCheckConfiguration: (config: SmartGridCheckConfiguration[]) => void;
510
+ addToCheckConfiguration: (item: SmartGridCheckConfiguration) => void;
511
+ getIsSelectAllRecords: () => boolean;
512
+ setIsSelectAllRecords: (value: boolean) => void;
513
+ getSelectedRows: () => SmartGridRowData[];
514
+ setSelectedRows: (rowIds: (string | number)[]) => void;
515
+ clearSelection: () => void;
516
+ selectAll: () => void;
517
+ refreshCells: () => void;
518
+ getCache: () => SmartGridInfiniteCache | null;
519
+ getCacheState: () => SmartGridCacheState | null;
520
+ getInfiniteCacheInstance: () => SmartGridInfiniteCache | null;
521
+ refreshServerSideStore: (options?: SmartGridRefreshOptions) => void;
522
+ getCachedBlockData: () => SmartGridCachedBlockData;
523
+ logCacheSummary: () => void | null;
524
+ getCachedRowById: (id: string | number) => SmartGridRowData | null;
525
+ getRowNode: (key: string | number) => Partial<SmartGridRowNode> | null;
526
+ setVisibleRange: (startRow: number, endRow: number) => void;
527
+ refreshCache: (options?: SmartGridRefreshOptions) => boolean;
528
+ deselectAll: () => void;
529
+ getRenderedNodes: () => SmartGridDisplayedRowNode[];
530
+ gridOptionsWrapper: {
531
+ gridOptions: SmartGridOptions;
532
+ };
533
+ getDisplayedRowAtIndex: (index: number, wholeData?: SmartGridRowData[], api?: Partial<SmartGridAPI>) => SmartGridDisplayedRowAtIndex | null;
534
+ getTableWidth: () => number;
535
+ sizeColumnsToFit: () => void;
536
+ setRowData: (newData: SmartGridRowData[]) => boolean | void;
537
+ forEachNode: (callback: (node: SmartGridRowNode, index: number) => void) => void;
538
+ getColumnDefs: () => SmartGridColumnDefinition[];
539
+ getAllColumns: () => SmartGridColumnDefinition[];
540
+ setColumnDefs: (newColumns: SmartGridColumnDefinition) => void;
541
+ addEventListener: (event: string, listener: Function, once?: boolean) => void;
542
+ removeEventListener: (event: string, listener: Function) => void;
543
+ getPinnedTopRow: () => SmartGridRowData[] | null;
544
+ setPinnedTopRowData: (rows: SmartGridRowData[]) => void;
545
+ getPinnedBottomRow: () => SmartGridRowData[] | null;
546
+ setPinnedBottomRowData: (rows: SmartGridRowData[]) => void;
547
+ getRowData: (params: SmartGridGetRowDataParams, columnName: string) => string | number | boolean;
548
+ tableId: string;
549
+ getFocusedCell: () => SmartGridFocusedCell | null;
550
+ getSelectedCells: () => SmartGridSelectedCell[];
551
+ getAllDisplayedColumns: () => SmartGridDisplayedColumn[];
552
+ getDisplayedRowCount: () => number;
553
+ setFocusedCell: (rowIndex: number, colKey: SmartGridColumnDefinition | string | number) => boolean;
554
+ ensureColumnVisible: (colKey: SmartGridColumnDefinition | string | number) => boolean;
555
+ getColumnByField: (fieldName: string) => SmartGridColumnDefinition | null;
556
+ getTableInstance: () => SmartGridTableInstance | undefined;
557
+ getFilterModel: () => SmartGridFilterModel | Record<string, SmartGridFilterModel[]>;
558
+ setFilterModel: (field: string, rules: SmartGridFilterModel) => void;
559
+ getTableDispatcher: () => (action: SmartGridDisptach) => void;
560
+ getTableStateContext: () => SmartGridStateContext;
561
+ showNotification: (notification: SmartGridNotification) => void;
562
+ hideNotification: () => void;
563
+ applySearch: () => void;
564
+ getCurrentPageData: () => SmartGridRowData[];
565
+ getWholeTableData: () => SmartGridRowData[];
566
+ flashCells: () => void;
567
+ redrawRows: () => void;
568
+ refreshClientSideRowModel: () => void;
569
+ resetRecentSearchChanges: () => void;
570
+ onFilterChanged: () => void;
571
+ onRowDataChanged?: (params: any) => void;
572
+ getRowGroupState?: () => SmartGridRowGroupState;
573
+ setRowGroupLoading?: (groupId: string, isLoading: boolean) => void;
574
+ setRowGroupPagination?: (groupId: string, pagination: SmartGridRowGroupStatePagination) => void;
575
+ setRowGroupData?: (groupId: string, data: SmartGridRowData[], append?: boolean) => void;
576
+ rowRenderer?: {
577
+ firstRenderedRow: number;
578
+ lastRenderedRow: number;
579
+ setRenderedRange: (start: number, end: number) => void;
580
+ };
581
+ columnApi?: SmartGridAPI;
582
+ dispatchEvent?: (eventType: string, eventData: Record<string, unknown>) => void;
583
+ toggleRowGroup?: (groupId: string, rowIndex: number, { fieldName, value }: {
584
+ fieldName: string;
585
+ value: unknown;
586
+ }) => void;
587
+ setServerSideDataSource: (dataSource: SmartGridServerSideDataSource, resetCache?: boolean) => void;
588
+ updateSmartGridTableData: (wholeData: SmartGridRowData[]) => void;
589
+ }
590
+
591
+ export declare type SmartGridBadgeColor = "default" | "success" | "warning" | "error" | "info";
592
+
593
+ export declare interface SmartGridBadgeProps {
594
+ label: string;
595
+ variant?: SmartGridBadgeVariant;
596
+ color?: SmartGridBadgeColor;
597
+ size?: SmartGridBadgeSize;
598
+ className?: string;
599
+ onClick?: (e: MouseEvent_2<HTMLDivElement>) => void;
600
+ }
601
+
602
+ export declare type SmartGridBadgeSize = "default" | "small";
603
+
604
+ export declare type SmartGridBadgeVariant = "filled" | "stroke";
605
+
606
+ export declare interface SmartGridBaseColumnDefinition {
607
+ field?: string;
608
+ groupId?: string;
609
+ headerName?: string;
610
+ column_name?: string;
611
+ label?: string;
612
+ width?: number;
613
+ minWidth?: number;
614
+ maxWidth?: number;
615
+ hide?: boolean;
616
+ hidden?: boolean;
617
+ pinned?: SmartGridFrozenState;
618
+ is_frozen?: boolean;
619
+ children?: SmartGridColumnDefinition[];
620
+ parent_id?: (string | number)[];
621
+ type?: string;
622
+ cellDataType?: string;
623
+ valueFormatter?: ((params: SmartGridValueFormatterParams) => string) | SmartGridValueFormatterConfig | undefined;
624
+ valueGetter?: (params: SmartGridValueGetterParams) => unknown;
625
+ leftTotalWidth?: number;
626
+ originalWidth?: number;
627
+ defaultWidth?: number;
628
+ isAutoWidth?: boolean;
629
+ filterable?: boolean;
630
+ isSortable?: boolean;
631
+ is_sortable?: boolean;
632
+ resizable?: boolean;
633
+ align?: "left" | "center" | "right";
634
+ cellRenderer?: string | ((params: SmartGridCellRenderer) => JSX.Element);
635
+ cellRendererParams?: SmartGridCellRendererParams;
636
+ cellClassName?: string;
637
+ cellStyle?: {
638
+ textAlign?: "left" | "center" | "right";
639
+ [key: string]: unknown;
640
+ };
641
+ autoHeight?: boolean;
642
+ wrapHeaderText?: boolean;
643
+ editable?: boolean;
644
+ is_editable?: boolean;
645
+ is_disabled?: boolean;
646
+ is_searchable?: boolean;
647
+ isSearchable?: boolean;
648
+ advanceSearchEnabled?: boolean;
649
+ sortable?: boolean;
650
+ rowGroup?: boolean;
651
+ enableRowGroup?: boolean;
652
+ rowGroupIndex?: number;
653
+ aggFunc?: string;
654
+ columnGroupShow?: "open" | "closed" | undefined | null;
655
+ originalIndex?: number;
656
+ parentColumns?: string[];
657
+ hasChildren?: boolean;
658
+ hasAnyFrozenChildren?: boolean;
659
+ hasAnyRightPinnedChildren?: boolean;
660
+ isChildWithoutParent?: boolean;
661
+ colorClass?: string;
662
+ isLeaf?: boolean;
663
+ isStandalone?: boolean;
664
+ isWithEmptyHeaderName?: boolean;
665
+ isParentWithChildEmptyHeaderName?: boolean;
666
+ path?: string[];
667
+ parentField?: string | null;
668
+ originalFields?: string[];
669
+ colId?: string;
670
+ colSpan?: number;
671
+ rowSpan?: number;
672
+ comparator?: (valueA: unknown, valueB: unknown, nodeA: SmartGridRowData, nodeB: SmartGridRowData, sortModel: SmartGridSortModel | SmartGridSortModel[]) => number;
673
+ headerTooltip?: string;
674
+ filter?: string | boolean;
675
+ filterParams?: {
676
+ filterOptions?: string[];
677
+ textCustomComparator?: (filter: string, value: unknown, filterText: string) => boolean;
678
+ numberCustomComparator?: (filter: number, value: unknown) => boolean;
679
+ dateCustomComparator?: (filterLocalDateAtMidnight: Date, cellValue: string) => number;
680
+ comparator?: (filterValue: unknown, cellValue: unknown) => boolean;
681
+ [key: string]: unknown;
682
+ };
683
+ order_of_display?: number;
684
+ is_hidden?: boolean;
685
+ formatter?: string | null;
686
+ accessor?: string;
687
+ id?: string;
688
+ required?: boolean;
689
+ sub_headers?: SmartGridColumnDefinition[];
690
+ extra?: {
691
+ width?: number;
692
+ is_grouping_key?: boolean;
693
+ is_disabled?: boolean;
694
+ isDisabled?: boolean;
695
+ columnGroupShow?: "open" | "closed";
696
+ is_multi?: boolean;
697
+ options_column?: string;
698
+ [key: string]: unknown;
699
+ };
700
+ headerComponent?: default_2.FC<SmartGridHeaderStyleParams>;
701
+ headerStyle?: (params: SmartGridHeaderStyleParams) => CSSProperties;
702
+ tooltipValueGetter?: (params: SmartGridTooltipGetterParams) => string;
703
+ cellRendererLazyType?: string;
704
+ originalPath?: string[] | null;
705
+ isReorderedColumn?: boolean | null;
706
+ processCellForClipboard?: (params: SmartGridCellRendererParams) => string;
707
+ [key: string]: unknown;
708
+ }
709
+
710
+ /** Block context */
711
+ declare interface SmartGridBlockContext {
712
+ updateData?: (rows: SmartGridRowData[], blockId: number, metadata?: SmartGridResponseMetadata) => void;
713
+ tableContextRef?: {
714
+ current?: {
715
+ state?: {
716
+ expandedChildRows?: Record<string, {
717
+ childRowsCount: number;
718
+ }>;
719
+ };
720
+ };
721
+ };
722
+ infiniteCache?: SmartGridInfiniteCacheInterface;
723
+ [key: string]: unknown;
724
+ }
725
+
726
+ /** Datasource interface */
727
+ declare interface SmartGridBlockDatasource {
728
+ getRows: (params: SmartGridDatasourceGetRowsParams) => void;
729
+ }
730
+
731
+ /** Block params */
732
+ declare interface SmartGridBlockParams {
733
+ updatedPageSizeRef: SmartGridPageSizeRef_2;
734
+ pageSize?: number;
735
+ lastAccessedSequence: SmartGridLastAccessedSequence_2;
736
+ datasource?: SmartGridBlockDatasource;
737
+ sortModel?: SmartGridSortModel;
738
+ filterModel?: SmartGridFilterModel;
739
+ context?: SmartGridBlockContext;
740
+ loadSequentially?: boolean;
741
+ _directPaginationRequest?: boolean;
742
+ isPaginationMode?: boolean;
743
+ _targetPage?: number;
744
+ tableId: string;
745
+ }
746
+
747
+ /** Row node in a block */
748
+ declare interface SmartGridBlockRowNode {
749
+ id: number;
750
+ data: SmartGridRowData | null;
751
+ rowIndex: number;
752
+ rowHeight?: number;
753
+ rowTop?: number;
754
+ }
755
+
756
+ /** Block state change callback */
757
+ declare type SmartGridBlockStateChangedCallback = (blockId: number, state: string, rowIndexes: number[]) => void;
758
+
759
+ /** Block state JSON */
760
+ declare interface SmartGridBlockStateJson {
761
+ id: number;
762
+ state: string;
763
+ startRow: number;
764
+ endRow: number;
765
+ version: number;
766
+ lastAccessed: number;
767
+ }
768
+
769
+ /** Block state JSON from getBlockStateJson */
770
+ declare interface SmartGridBlockStateJsonExtended {
771
+ id: number;
772
+ state: string;
773
+ startRow: number;
774
+ endRow: number;
775
+ version: number;
776
+ lastAccessed: number;
777
+ }
778
+
779
+ export declare interface SmartGridBodyCellDetailProps {
780
+ cellRef: RefObject<HTMLDivElement>;
781
+ cellClasses: string;
782
+ cellStyle: CSSProperties;
783
+ handleCellClickForSelection: (e: React.MouseEvent<HTMLDivElement>) => void;
784
+ handleDoubleClick: (e: React.MouseEvent<HTMLDivElement>) => void;
785
+ rowIndex: number;
786
+ rowId: string | number;
787
+ colIndex: number;
788
+ field: string;
789
+ isPinnedLeft: boolean;
790
+ isPinnedRight: boolean;
791
+ cellType: string;
792
+ isChildRow?: boolean;
793
+ isGrandTotalRow?: boolean;
794
+ isFirstColumn: boolean;
795
+ isFirstFrozenColumn: boolean;
796
+ isGroupRowExpanded: boolean;
797
+ isGroupingKey: boolean;
798
+ level: number;
799
+ showDragHandle: boolean;
800
+ showToggle: boolean;
801
+ isExpanded: boolean;
802
+ isDetailExpanded?: boolean;
803
+ hideToolTip: boolean;
804
+ contentStyle: CSSProperties;
805
+ shouldHideContent: boolean;
806
+ formattedCellValue: unknown;
807
+ actualValue: string | boolean | null | undefined | number | {};
808
+ toolTipTitle: string;
809
+ shouldRenderRowGroupContent: boolean;
810
+ groupId: string | null;
811
+ serverSide: boolean;
812
+ loadingRef?: RefObject<HTMLDivElement> | null;
813
+ stateRowHeight: {
814
+ height: number;
815
+ type: string;
816
+ };
817
+ virtualized?: boolean;
818
+ allColumnsLastRow?: SmartGridColumnDefinition[];
819
+ isSingleSelect?: boolean;
820
+ leftPinnedOnly?: boolean;
821
+ disableSelectAllRecords?: boolean;
822
+ rowData: SmartGridRowData;
823
+ column: SmartGridColumnDefinition;
824
+ showMasterDetailToggle: boolean;
825
+ isRowGroupEnabled: boolean;
826
+ updatedCellId: string | number;
827
+ cellValue: unknown;
828
+ tableApi: SmartGridAPI | null;
829
+ hasChildren: boolean;
830
+ isAggregationParentRowWithAggregatedData: boolean;
831
+ lazyLoadCellRenderer?: boolean;
832
+ }
833
+
834
+ export declare interface SmartGridBodyCellProps {
835
+ customRowStyle?: CSSProperties;
836
+ loadingRef?: RefObject<HTMLDivElement> | null;
837
+ virtualized?: boolean;
838
+ leftPinnedOnly?: boolean;
839
+ rowData: SmartGridRowData;
840
+ column: SmartGridColumnDefinition;
841
+ rowIndex: number;
842
+ colIndex: number;
843
+ onDoubleClick?: (e: React.MouseEvent<HTMLDivElement>, params: {
844
+ rowData: SmartGridRowData;
845
+ column: SmartGridColumnDefinition;
846
+ rowIndex: number;
847
+ colIndex: number;
848
+ }) => void;
849
+ hideContent?: boolean;
850
+ className?: string;
851
+ isChildRow?: boolean;
852
+ allColumnsLastRow?: SmartGridColumnDefinition[];
853
+ rowSpanInfo?: SmartGridRowSpanInfoDetails;
854
+ selectable?: boolean;
855
+ isFirstGrandTotalColumn?: boolean;
856
+ isGrandTotalRow?: boolean;
857
+ isLeftPinnedRowsAvailable?: boolean;
858
+ style?: CSSProperties | null;
859
+ }
860
+
861
+ export declare interface SmartGridButtonProps {
862
+ onClick: (e: MouseEvent_2<HTMLButtonElement>) => void;
863
+ children: ReactNode;
864
+ variant?: SmartGridButtonVariant;
865
+ size?: SmartGridButtonSize;
866
+ iconButton?: boolean;
867
+ className?: string;
868
+ disabled?: boolean;
869
+ leftIcon?: ReactNode;
870
+ rightIcon?: ReactNode;
871
+ }
872
+
873
+ export declare type SmartGridButtonSize = "small" | "medium" | "large";
874
+
875
+ export declare type SmartGridButtonVariant = "primary" | "secondary" | "tertiary" | "link" | "url" | "text" | "danger";
876
+
877
+ export declare type SmartGridCacheAnalytics = {
878
+ blockEvictions: number;
879
+ blockLoadTimestamps: number[];
880
+ blockLoads: number;
881
+ bytesLoaded: number;
882
+ cachePurges: number;
883
+ cacheRefreshes: number;
884
+ hits: number;
885
+ lastBlockLoadTime: number;
886
+ misses: number;
887
+ startTime: number;
888
+ totalBlockLoadTime: number;
889
+ };
890
+
891
+ /** Cache analytics */
892
+ declare interface SmartGridCacheAnalytics_2 {
893
+ hits: number;
894
+ misses: number;
895
+ blockLoads: number;
896
+ blockEvictions: number;
897
+ totalBlockLoadTime: number;
898
+ lastBlockLoadTime: number;
899
+ bytesLoaded: number;
900
+ startTime: number;
901
+ blockLoadTimestamps: Array<{
902
+ blockId: number;
903
+ timestamp: number;
904
+ loadTime: number;
905
+ }>;
906
+ cachePurges: number;
907
+ cacheRefreshes: number;
908
+ }
909
+
910
+ export declare interface SmartGridCacheAnalyticsData {
911
+ hitRatio: number;
912
+ hits: number;
913
+ misses: number;
914
+ blockLoads: number;
915
+ blockEvictions: number;
916
+ }
917
+
918
+ export declare type SmartGridCacheBlock = {
919
+ endRow: number;
920
+ id: number;
921
+ infiniteCache: SmartGridInfiniteCache;
922
+ lastAccessed: number;
923
+ loadStartedAt: number;
924
+ params: SmartGridCacheBlockParams;
925
+ parent: SmartGridInfiniteCache | null;
926
+ parentCache: SmartGridInfiniteCache | null;
927
+ rowNodes: {
928
+ data: SmartGridRowData;
929
+ id: number;
930
+ rowIndex: number;
931
+ }[];
932
+ rows: unknown;
933
+ startRow: number;
934
+ state: string;
935
+ version: number;
936
+ _inactiveForPageTransition: boolean;
937
+ _processingInProgress: boolean;
938
+ _targetPage: number;
939
+ };
940
+
941
+ export declare type SmartGridCacheBlockParams = Record<string, unknown>;
942
+
943
+ /** Cache context */
944
+ declare interface SmartGridCacheContext {
945
+ tableContextRef?: MutableRefObject<SmartGridTableContextValue | null>;
946
+ infiniteCache?: InfiniteCache;
947
+ updateData?: (rows: SmartGridRowData[], blockId: number, metadata?: Record<string, unknown> | undefined) => void;
948
+ }
949
+
950
+ export declare interface SmartGridCachedBlockData {
951
+ [blockId: string]: SmartGridRowData[];
952
+ }
953
+
954
+ /** Cache event */
955
+ declare interface SmartGridCacheEvent {
956
+ type: string;
957
+ blockId?: number;
958
+ source?: string;
959
+ options?: Record<string, unknown>;
960
+ pageNo?: number;
961
+ }
962
+
963
+ export declare type SmartGridCacheMetadata = {
964
+ lastUpdated: number;
965
+ timestamp?: number;
966
+ };
967
+
968
+ /** Cache params */
969
+ declare interface SmartGridCacheParams {
970
+ overflowSize: number;
971
+ maxBlocksInCache: number;
972
+ initialRowCount: number;
973
+ rowHeight: number;
974
+ lastAccessedSequence: SmartGridLastAccessedSequence;
975
+ uniqueIdField: string;
976
+ onBlockStateChanged: SmartGridBlockStateChangedCallback | null;
977
+ purgeStrategy: string;
978
+ enablePersistence: boolean;
979
+ persistenceStorageKey: string;
980
+ persistenceOptions: SmartGridPersistenceOptions;
981
+ isPaginationMode: boolean;
982
+ datasource?: SmartGridClientSideDatasource | SmartGridServerSideDatasource;
983
+ filterModel?: SmartGridSearchWithSearchKey;
984
+ sortModel?: SmartGridSortModel;
985
+ context?: SmartGridCacheContext;
986
+ updatedPageSizeRef?: SmartGridPageSizeRef;
987
+ viewportRange?: SmartGridViewportRange;
988
+ tableId?: string;
989
+ pageSize?: number;
990
+ loadSequentially?: boolean;
991
+ }
992
+
993
+ export declare interface SmartGridCacheState {
994
+ blockCount: number;
995
+ cache?: SmartGridInfiniteCache;
996
+ lastRowKnown: boolean;
997
+ rowCount: number;
998
+ status: string;
999
+ }
1000
+
1001
+ /** Cache state for debugging */
1002
+ declare interface SmartGridCacheState_2 {
1003
+ blockCount: number;
1004
+ rowCount: number;
1005
+ lastRowIndexKnown: boolean;
1006
+ blocks: SmartGridBlockStateJsonExtended[];
1007
+ analytics: SmartGridCacheAnalytics_2;
1008
+ }
1009
+
1010
+ export declare interface SmartGridCacheStateReturn {
1011
+ cache: unknown;
1012
+ rowCount: number;
1013
+ lastRowKnown: boolean;
1014
+ blockCount: number;
1015
+ status: string;
1016
+ }
1017
+
1018
+ export declare interface SmartGridCalendarDay {
1019
+ day: number;
1020
+ isCurrentMonth: boolean;
1021
+ }
1022
+
1023
+ export declare interface SmartGridCalendarPosition {
1024
+ top: number;
1025
+ left: number;
1026
+ }
1027
+
1028
+ export declare interface SmartGridCallbackRefCurrent {
1029
+ onSelectionChanged?: ((event: SmartGridOnSelectionChangedParams) => void) | undefined;
1030
+ onRowDragStart?: ((event: SmartGridRowDragStartParams) => void) | null;
1031
+ onRowDragEnd?: ((event: SmartGridRowDragEndParams) => void) | null;
1032
+ onRowClicked?: ((event: unknown) => void) | null;
1033
+ onCellValueChanged?: ((event: SmartGridCellValueChangedParams) => void) | null;
1034
+ onRowGroupOpened?: ((event: SmartGridRowGrouOpenParams) => void) | null;
1035
+ customTabFunction?: ((e: KeyboardEvent, column: SmartGridColumnDefinition, context: {
1036
+ api: SmartGridAPI | null;
1037
+ }) => void) | null;
1038
+ onPageChange?: ((page: number) => void) | null;
1039
+ onSortChange?: ((sortModel: SmartGridSortModel) => void) | null;
1040
+ onFilterChange?: ((filterModel: SmartGridFilterModel) => void) | null;
1041
+ onSearch?: ((searchTerm: SmartGridSearchFunctionParams) => void) | null;
1042
+ }
1043
+
1044
+ export declare type SmartGridCellRenderer = {
1045
+ value: unknown;
1046
+ data: SmartGridRowData;
1047
+ rowIndex: number;
1048
+ colIndex: number;
1049
+ column: SmartGridColumnDefinition;
1050
+ colDef: SmartGridColumnDefinition;
1051
+ node: SmartGridCellRendererNode;
1052
+ api: SmartGridAPI;
1053
+ eGridCell: HTMLDivElement | null;
1054
+ wholeData: SmartGridRowData[] | null | undefined;
1055
+ actions: Record<string, unknown>;
1056
+ setDataValue: (colId: string, newValue: unknown) => void;
1057
+ isCellLockable?: boolean;
1058
+ };
1059
+
1060
+ export declare interface SmartGridCellRendererDesignIconProps {
1061
+ cellRenderer: string;
1062
+ }
1063
+
1064
+ export declare interface SmartGridCellRendererMappingType {
1065
+ [key: string]: string;
1066
+ }
1067
+
1068
+ export declare type SmartGridCellRendererNode = {
1069
+ data: SmartGridRowData;
1070
+ rowIndex: number;
1071
+ id: string | number;
1072
+ parent: SmartGridUpdateData & {
1073
+ id: string | number;
1074
+ level: number;
1075
+ setExpanded: () => void;
1076
+ };
1077
+ setDataValue: (colId: string, newValue: unknown) => void;
1078
+ childrenMapped: Record<string, string>;
1079
+ allLeafChildren: Record<string, string>[];
1080
+ group: boolean;
1081
+ level: number;
1082
+ childIndex: number;
1083
+ isSelected: () => boolean;
1084
+ isExpandable: () => boolean;
1085
+ isExpanded: () => boolean;
1086
+ };
1087
+
1088
+ export declare type SmartGridCellRendererParams = {
1089
+ dateFormat?: SmartGridDateFormat;
1090
+ startYear?: number;
1091
+ endYear?: number;
1092
+ minDate?: string;
1093
+ maxDate?: string;
1094
+ options?: Array<{
1095
+ label: string;
1096
+ value: string | number;
1097
+ }>;
1098
+ isMultiSelect?: boolean;
1099
+ type?: SmartGridInputType;
1100
+ disabled?: boolean;
1101
+ disableOnlyPast?: boolean;
1102
+ disableOnlyFuture?: boolean;
1103
+ disablePast?: boolean;
1104
+ disableFuture?: boolean;
1105
+ startDate?: string | Date;
1106
+ endDate?: string | Date;
1107
+ inputType?: SmartGridInputType;
1108
+ leftLabel?: string;
1109
+ rightLabel?: string;
1110
+ splits?: SmartGridColumnDefinition[];
1111
+ } & Record<string, unknown>;
1112
+
1113
+ export declare interface SmartGridCellRendererRendererProps {
1114
+ isGrandTotalRow?: boolean;
1115
+ rowData: SmartGridRowData;
1116
+ isAggregationParentRowWithAggregatedData: boolean;
1117
+ cellValue: unknown;
1118
+ rowIndex: number;
1119
+ colIndex: number;
1120
+ column: SmartGridColumnDefinition;
1121
+ tableApi: SmartGridAPI | null;
1122
+ cellRef: RefObject<HTMLDivElement>;
1123
+ hasChildren: boolean;
1124
+ lazyLoadCellRenderer?: boolean;
1125
+ }
1126
+
1127
+ export declare interface SmartGridCellSelectionParams {
1128
+ tableInstance: SmartGridTableInstance;
1129
+ callBackRef: MutableRefObject<SmartGridCallbackRefCurrent | null>;
1130
+ api: SmartGridAPI | null;
1131
+ }
1132
+
1133
+ export declare interface SmartGridCellValueChangedParams {
1134
+ colDef: SmartGridColumnDefinition;
1135
+ column: SmartGridColumnDefinition;
1136
+ data: SmartGridRowData;
1137
+ newValue: unknown;
1138
+ node: {
1139
+ data: SmartGridRowData;
1140
+ id: string | number;
1141
+ level: number;
1142
+ parent?: SmartGridUpdateData;
1143
+ rowIndex: number;
1144
+ };
1145
+ value: unknown;
1146
+ }
1147
+
1148
+ export declare interface SmartGridCheckboxProps {
1149
+ checked?: boolean;
1150
+ onChange: (checked: boolean) => void;
1151
+ label?: string;
1152
+ disabled?: boolean;
1153
+ className?: string;
1154
+ }
1155
+
1156
+ export declare interface SmartGridCheckConfiguration {
1157
+ checkedRows?: string[];
1158
+ unCheckedRows?: string[];
1159
+ checkAll?: boolean;
1160
+ searchColumns?: SmartGridFilterModel | {
1161
+ [key: string]: SmartGridFilterModel[];
1162
+ };
1163
+ unCheckAll?: boolean;
1164
+ }
1165
+
1166
+ /** Client-side datasource interface */
1167
+ declare interface SmartGridClientSideDatasource {
1168
+ getRows: (params: SmartGridGetRowsRequestParams) => void;
1169
+ destroy?: () => void;
1170
+ _isWrapped?: boolean;
1171
+ _cleanup?: () => void;
1172
+ updateData?: (state: SmartGridStateContext, newData: SmartGridRowData[]) => void;
1173
+ getWholeData?: () => SmartGridRowData[];
1174
+ updateCacheReference?: (newCache: InfiniteCache) => boolean;
1175
+ _cacheInjected?: boolean;
1176
+ infiniteCache?: InfiniteCache;
1177
+ context?: SmartGridDataSourceContext;
1178
+ updateWholeData: (wholeData: SmartGridRowData[]) => void;
1179
+ }
1180
+
1181
+ export declare interface SmartGridColumnAutoSizeReturn {
1182
+ autoSizeColumn: (column: SmartGridColumnDefinition) => void;
1183
+ customSizeColumn: (column: SmartGridColumnDefinition) => void;
1184
+ autoSizeAllColumns: () => void;
1185
+ }
1186
+
1187
+ export declare type SmartGridColumnDefinition = SmartGridColumnWithField | SmartGridColumnWithGroupId | SmartGridColumnWithColId;
1188
+
1189
+ export declare type SmartGridColumnPinnedType = "leftPinnedOnly" | "rightPinnedOnly" | "normal" | "top" | "bottom";
1190
+
1191
+ export declare interface SmartGridColumnState {
1192
+ colId: string;
1193
+ hide: boolean;
1194
+ width: number;
1195
+ sort: SmartGridSortDirection | null;
1196
+ filter: SmartGridFilterModel[] | null;
1197
+ }
1198
+
1199
+ export declare interface SmartGridColumnVirtualizationParams {
1200
+ columns: SmartGridColumnDefinition[];
1201
+ containerWidth: number;
1202
+ columnBuffer: number;
1203
+ headerRows: SmartGridColumnDefinition[][];
1204
+ virtualizationThreshold?: number;
1205
+ globalColumnCounts: SmartGridGlobalColumnCounts;
1206
+ pinnedType: SmartGridPinType;
1207
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
1208
+ }
1209
+
1210
+ export declare interface SmartGridColumnVirtualizationReturn {
1211
+ visibleColumns: SmartGridColumnDefinition[];
1212
+ virtualizedHeaderRows: SmartGridColumnDefinition[][];
1213
+ handleScroll: (e: React.UIEvent<HTMLElement>) => void;
1214
+ }
1215
+
1216
+ export declare interface SmartGridColumnWithColId extends SmartGridBaseColumnDefinition {
1217
+ field?: string;
1218
+ groupId?: string;
1219
+ colId: string;
1220
+ }
1221
+
1222
+ export declare interface SmartGridColumnWithField extends SmartGridBaseColumnDefinition {
1223
+ field: string;
1224
+ groupId?: string;
1225
+ }
1226
+
1227
+ export declare interface SmartGridColumnWithGroupId extends SmartGridBaseColumnDefinition {
1228
+ field?: string;
1229
+ groupId: string;
1230
+ }
1231
+
1232
+ export declare interface SmartGridContainerRect {
1233
+ top: number;
1234
+ left: number;
1235
+ width: number;
1236
+ height: number;
1237
+ }
1238
+
1239
+ export declare type SmartGridContextRef = React.MutableRefObject<SmartGridTableContextValue | null>;
1240
+
1241
+ export declare interface SmartGridCopyCellValueParams {
1242
+ tableInstance: MutableRefObject<HTMLElement | null>;
1243
+ tableApi: SmartGridAPI | null;
1244
+ }
1245
+
1246
+ /** Data source context */
1247
+ export declare interface SmartGridDataSourceContext {
1248
+ infiniteCache?: InfiniteCache;
1249
+ tableContextRef?: MutableRefObject<SmartGridTableContextValue | null>;
1250
+ updateData?: (rows: SmartGridRowData[], blockId: number, metadata?: Record<string, unknown> | undefined) => void;
1251
+ getWholeData?: () => SmartGridRowData[];
1252
+ [key: string]: unknown;
1253
+ }
1254
+
1255
+ /** Datasource getRows params */
1256
+ declare interface SmartGridDatasourceGetRowsParams {
1257
+ startRow: number;
1258
+ endRow: number;
1259
+ sortModel?: SmartGridSortModel;
1260
+ filterModel?: SmartGridFilterModel;
1261
+ pageSize: number;
1262
+ successCallback: (rows: SmartGridRowData[], lastRow?: number, lastRowIndexKnown?: boolean) => void;
1263
+ failCallback: (error?: unknown) => void;
1264
+ context?: SmartGridBlockContext;
1265
+ request?: {
1266
+ startRow: number;
1267
+ endRow: number;
1268
+ sortModel?: SmartGridSortModel;
1269
+ filterModel?: SmartGridFilterModel;
1270
+ pageSize: number;
1271
+ groupKeys: string[];
1272
+ };
1273
+ }
1274
+
1275
+ export declare interface SmartGridDataSourceParams {
1276
+ startRow: number;
1277
+ endRow: number;
1278
+ successCallback: (rows: SmartGridRowData[], lastRow?: number | null) => void;
1279
+ failCallback: (error: Error) => void;
1280
+ request: RowGroupParams & {
1281
+ groupKeys: unknown[];
1282
+ rowGroupCols: SmartGridColumnDefinition[];
1283
+ startRow: number;
1284
+ endRow: number;
1285
+ };
1286
+ [key: string]: unknown;
1287
+ }
1288
+
1289
+ export declare interface SmartGridDataUpdateMetadata {
1290
+ totalCount?: number;
1291
+ [key: string]: unknown;
1292
+ }
1293
+
1294
+ export declare interface SmartGridDateConstraints {
1295
+ startYear?: number;
1296
+ endYear?: number;
1297
+ disableOnlyPast?: boolean;
1298
+ disableOnlyFuture?: boolean;
1299
+ disablePast?: boolean;
1300
+ disableFuture?: boolean;
1301
+ minDate?: Date | string | null;
1302
+ maxDate?: Date | string | null;
1303
+ }
1304
+
1305
+ export declare type SmartGridDateFormat = "YYYY-MM-DD" | "DD-MM-YYYY" | "MM-DD-YYYY";
1306
+
1307
+ export declare type SmartGridDatePickerHandler = React.MouseEvent<HTMLButtonElement> | KeyboardEvent;
1308
+
1309
+ export declare interface SmartGridDatePickerInputProps {
1310
+ dateString: string;
1311
+ placeholder?: string;
1312
+ disabled?: boolean;
1313
+ isError?: boolean;
1314
+ setErrorState: (hasError: boolean) => void;
1315
+ inputContainerRef: RefObject<HTMLDivElement>;
1316
+ selectedDate?: string;
1317
+ isOpen?: boolean;
1318
+ setIsOpen: (isOpen: boolean) => void;
1319
+ displayFormat?: SmartGridDateFormat;
1320
+ onDateStringChange?: (date: string | Moment | null) => void;
1321
+ minDate?: Date | string | null;
1322
+ maxDate?: Date | string | null;
1323
+ onClear?: (e: MouseEvent_2<HTMLButtonElement>) => void;
1324
+ readOnly?: boolean;
1325
+ customIcon?: ReactNode;
1326
+ hasDateError?: boolean;
1327
+ isheadercell?: boolean | null;
1328
+ isCellRenderer?: boolean;
1329
+ }
1330
+
1331
+ export declare interface SmartGridDatePickerProps extends SmartGridDateConstraints {
1332
+ value?: string;
1333
+ onChange?: (date: string) => void;
1334
+ placeholder?: string;
1335
+ disabled?: boolean;
1336
+ label?: string;
1337
+ required?: boolean;
1338
+ withPortal?: boolean;
1339
+ width?: string;
1340
+ dateFormat?: SmartGridDateFormat;
1341
+ isCellRenderer?: boolean;
1342
+ tableApi?: SmartGridAPI | null;
1343
+ isheadercell?: boolean | null;
1344
+ column?: SmartGridColumnDefinition;
1345
+ advancedSearchApplyRef?: MutableRefObject<boolean>;
1346
+ lazyLoadCellRenderer?: boolean;
1347
+ }
1348
+
1349
+ export declare interface SmartGridDateRangePickerCalendarProps extends SmartGridDateConstraints {
1350
+ leftMonth: Date | Moment;
1351
+ setLeftMonth: (month: Date | Moment) => void;
1352
+ rightMonth: Date | Moment;
1353
+ setRightMonth: (month: Date | Moment) => void;
1354
+ selectedStartDate: string;
1355
+ selectedEndDate: string;
1356
+ tempStartDate: string | null;
1357
+ setTempStartDate: (date: string | null) => void;
1358
+ tempEndDate: string | null;
1359
+ setTempEndDate: (date: string | null) => void;
1360
+ showMonthDropdown: boolean;
1361
+ setShowMonthDropdown: (show: boolean) => void;
1362
+ showYearDropdown: boolean;
1363
+ setShowYearDropdown: (show: boolean) => void;
1364
+ activeCalendar: "left" | "right";
1365
+ setActiveCalendar: (calendar: "left" | "right") => void;
1366
+ monthDropdownRef: RefObject<HTMLDivElement>;
1367
+ yearDropdownRef: RefObject<HTMLDivElement>;
1368
+ focusedInput: "start" | "end" | "";
1369
+ setFocusedInput: (input: "start" | "end" | "") => void;
1370
+ isCellRenderer?: boolean;
1371
+ tableApi?: SmartGridAPI | null | undefined;
1372
+ setIsOpen: (isOpen: boolean) => void;
1373
+ onChange?: (dates: SmartGridDateRangeValue) => void;
1374
+ startDate?: string;
1375
+ endDate?: string;
1376
+ onDateChangeApply?: (dates: SmartGridDateRangeValue) => void;
1377
+ hasDateError?: string;
1378
+ setSelectedStartDate?: (date: string) => void;
1379
+ setSelectedEndDate?: (date: string) => void;
1380
+ error?: string;
1381
+ }
1382
+
1383
+ export declare interface SmartGridDateRangePickerInputProps {
1384
+ inputContainerRef: RefObject<HTMLDivElement>;
1385
+ startDateString: string;
1386
+ endDateString: string;
1387
+ isDisabled?: boolean;
1388
+ isError?: boolean | string;
1389
+ onStartDateFocus: (e: FocusEvent_2<HTMLInputElement>) => void;
1390
+ onEndDateFocus: (e: FocusEvent_2<HTMLInputElement>) => void;
1391
+ displayFormat?: SmartGridDateFormat;
1392
+ onStartDateStringChange?: (date: string | Moment | null) => void;
1393
+ onEndDateStringChange?: (date: string | Moment | null) => void;
1394
+ minDate?: Date | string | null;
1395
+ maxDate?: Date | string | null;
1396
+ readOnly?: boolean;
1397
+ isOutsideRange?: (date: Moment) => boolean;
1398
+ onErrorStateChange?: Dispatch<SetStateAction<string>>;
1399
+ clearErrorsTrigger?: number;
1400
+ onClear?: (e: MouseEvent_2<HTMLButtonElement>) => void;
1401
+ onCalendarOpen?: () => void;
1402
+ isCellRenderer?: boolean;
1403
+ }
1404
+
1405
+ export declare interface SmartGridDateRangePickerProps extends SmartGridDateConstraints {
1406
+ startDate?: string;
1407
+ endDate?: string;
1408
+ onChange?: (dates: SmartGridDateRangeValue) => void;
1409
+ disabled?: boolean;
1410
+ label?: string;
1411
+ required?: boolean;
1412
+ error?: string;
1413
+ withPortal?: boolean;
1414
+ width?: string;
1415
+ dateFormat?: SmartGridDateFormat;
1416
+ isCellRenderer?: boolean;
1417
+ tableApi?: SmartGridAPI | null;
1418
+ readOnly?: boolean;
1419
+ isOutsideRange?: (date: Moment) => boolean;
1420
+ lazyLoadCellRenderer?: boolean;
1421
+ }
1422
+
1423
+ export declare interface SmartGridDateRangeValue {
1424
+ startDate: string;
1425
+ endDate: string;
1426
+ }
1427
+
1428
+ export declare type SmartGridDefaultColDef = {
1429
+ minWidth: number;
1430
+ headerComponentParams?: {
1431
+ innerHeaderComponent: ((params: SmartGridHeaderStyleParams) => JSX.Element | string) | null;
1432
+ };
1433
+ headerComponent?: ((params: SmartGridHeaderStyleParams) => JSX.Element | string) | null;
1434
+ };
1435
+
1436
+ export declare type SmartGridDispatch = (action: {
1437
+ type: string;
1438
+ payload: unknown;
1439
+ meta?: {
1440
+ fromAlignedGrid?: boolean;
1441
+ defaultColDef?: SmartGridDefaultColDef;
1442
+ } | Record<string, unknown>;
1443
+ }) => void;
1444
+
1445
+ export declare interface SmartGridDisplayedColumn {
1446
+ colDef: SmartGridColumnDefinition;
1447
+ colId: string;
1448
+ getColId: () => string;
1449
+ isVisible: () => boolean;
1450
+ isPinned: () => SmartGridPinnedType;
1451
+ label: string;
1452
+ }
1453
+
1454
+ export declare interface SmartGridDisplayedRowAtIndex {
1455
+ data: SmartGridRowData;
1456
+ rowIndex: number;
1457
+ node: SmartGridParamsNode;
1458
+ api: SmartGridAPI;
1459
+ }
1460
+
1461
+ export declare interface SmartGridDisplayedRowNode extends SmartGridRowNode {
1462
+ rowIndex: number;
1463
+ absoluteRowIndex: number;
1464
+ originalData: SmartGridRowData;
1465
+ rowHeight?: number;
1466
+ }
1467
+
1468
+ export declare interface SmartGridDisptach {
1469
+ type: string;
1470
+ payload?: unknown;
1471
+ }
1472
+
1473
+ export declare interface SmartGridDragColumnParams {
1474
+ hasChildren: boolean;
1475
+ index: number;
1476
+ column: SmartGridColumnDefinition;
1477
+ dispatch: SmartGridDispatch;
1478
+ columns: SmartGridColumnDefinition[];
1479
+ }
1480
+
1481
+ export declare interface SmartGridDragColumnReturn {
1482
+ handleDragStart: (e: React.DragEvent<HTMLElement>) => void;
1483
+ handleDragOver: (e: React.DragEvent<HTMLElement>) => void;
1484
+ handleDragLeave: () => void;
1485
+ handleDrop: (e: React.DragEvent<HTMLElement>) => void;
1486
+ handleDragEnd: () => void;
1487
+ isDragging: boolean;
1488
+ dragOverColumn: string | null;
1489
+ }
1490
+
1491
+ export declare interface SmartGridDragColumnSettingParams {
1492
+ localColumns: SmartGridColumnDefinition[];
1493
+ dispatch: SmartGridDispatch;
1494
+ }
1495
+
1496
+ export declare interface SmartGridDragColumnSettingReturn {
1497
+ handleDragStart: (e: React.DragEvent<HTMLElement>, column: SmartGridColumnDefinition) => void;
1498
+ handleDragOver: (e: React.DragEvent<HTMLElement>, column: SmartGridColumnDefinition) => void;
1499
+ handleDragLeave: () => void;
1500
+ handleDrop: (e: React.DragEvent<HTMLElement>, targetColumn: SmartGridColumnDefinition) => void;
1501
+ handleDragEnd: () => void;
1502
+ draggedColumn: SmartGridColumnDefinition | null;
1503
+ dragOverColumn: SmartGridColumnDefinition | null;
1504
+ }
1505
+
1506
+ export declare interface SmartGridDragRowParams {
1507
+ rowIndex: number;
1508
+ rowData: SmartGridRowData;
1509
+ bodyContainerRef: MutableRefObject<HTMLElement | null>;
1510
+ }
1511
+
1512
+ export declare interface SmartGridDragRowReturn {
1513
+ handleDragStart: (e: React.DragEvent<HTMLElement>) => void;
1514
+ handleDragEnd: () => void;
1515
+ handleDragOver: (e: React.DragEvent<HTMLElement>) => void;
1516
+ handleDragLeave: () => void;
1517
+ handleDrop: (e: React.DragEvent<HTMLElement>) => void;
1518
+ }
1519
+
1520
+ export declare interface SmartGridDragSourceData {
1521
+ field: string;
1522
+ index: number;
1523
+ order_of_display?: number;
1524
+ path: string[];
1525
+ }
1526
+
1527
+ export declare interface SmartGridEvent {
1528
+ type: string;
1529
+ api?: SmartGridAPI;
1530
+ [key: string]: unknown;
1531
+ }
1532
+
1533
+ export declare type SmartGridEventListener = {
1534
+ fn: SmartGridEventListenerFn;
1535
+ once: boolean;
1536
+ };
1537
+
1538
+ export declare type SmartGridEventListenerFn = (event: SmartGridEvent) => void;
1539
+
1540
+ export declare interface SmartGridExpandableCellProps {
1541
+ rowId: string | number;
1542
+ isExpanded: boolean;
1543
+ rowData: SmartGridRowData;
1544
+ column: SmartGridColumnDefinition;
1545
+ groupId: string | null;
1546
+ rowIndex: number;
1547
+ showMasterDetailToggle: boolean;
1548
+ isRowGroupEnabled: boolean;
1549
+ updatedCellId: string | number;
1550
+ isGroupRowExpanded: boolean;
1551
+ }
1552
+
1553
+ export declare type SmartGridExpandedChildRows = {
1554
+ childRowsCount: number;
1555
+ rowId: string | number;
1556
+ rowIndex: number;
1557
+ children?: SmartGridRowData[];
1558
+ };
1559
+
1560
+ export declare type SmartGridExpandedColumnGroups = {
1561
+ isAllGroupExpanded?: boolean;
1562
+ [key: string]: boolean | undefined;
1563
+ };
1564
+
1565
+ export declare interface SmartGridExportCallbackRefCurrent {
1566
+ downloadExcelHandler?: (() => void) | null;
1567
+ downloadCSVHandler?: (() => void) | null;
1568
+ copyToClipboardHandler?: (() => void) | null;
1569
+ }
1570
+
1571
+ /** Extended filter model with search and column filters */
1572
+ declare interface SmartGridExtendedFilterModel extends SmartGridFilterModel {
1573
+ _search?: SmartGridFilterModel[];
1574
+ _columnFilters?: Record<string, unknown>;
1575
+ }
1576
+
1577
+ export declare type SmartGridFetchDataFunctionBody = {
1578
+ range: SmartGridRangeFilter[];
1579
+ search: SmartGridStringFilter[];
1580
+ sort: SmartGridSortModel[];
1581
+ };
1582
+
1583
+ export declare interface SmartGridFetchDataParams {
1584
+ startRow: number;
1585
+ endRow: number;
1586
+ filterModel?: SmartGridFilterModel | null;
1587
+ sortModel?: SmartGridSortModel | null;
1588
+ }
1589
+
1590
+ export declare interface SmartGridFetchDataResponse {
1591
+ rowData: SmartGridRowData[];
1592
+ lastRow?: number;
1593
+ rowCount?: number;
1594
+ totalCount?: number;
1595
+ }
1596
+
1597
+ /** Fetch function ref type */
1598
+ declare interface SmartGridFetchFunctionRef {
1599
+ current?: SmartGridFetDataParams | null;
1600
+ }
1601
+
1602
+ /** Fetch response */
1603
+ declare interface SmartGridFetchResponse {
1604
+ data?: SmartGridRowData[];
1605
+ rowCount?: number;
1606
+ totalItems?: number;
1607
+ total?: number;
1608
+ lastRow?: number;
1609
+ lastRowIndexKnown?: boolean;
1610
+ }
1611
+
1612
+ export declare type SmartGridFetDataParams = (body: SmartGridFetchDataFunctionBody, page: number, context?: SmartGridDataSourceContext, pageNum?: number, options?: {
1613
+ pageSize: number;
1614
+ }) => Promise<SmartGridFetchResponse & {
1615
+ totalCount?: number | null;
1616
+ }>;
1617
+
1618
+ export declare interface SmartGridFilterModel {
1619
+ pattern: string;
1620
+ search_type: string;
1621
+ column?: string;
1622
+ field?: string;
1623
+ min_val?: number;
1624
+ max_val?: number;
1625
+ type?: string;
1626
+ operator?: string;
1627
+ value?: string;
1628
+ operators?: SmartGridSearchOperatorOption[];
1629
+ [key: string]: unknown;
1630
+ }
1631
+
1632
+ export declare type SmartGridFloatingType = "top" | "bottom" | null;
1633
+
1634
+ export declare interface SmartGridFocusedCell extends SmartGridSelectedCell {
1635
+ floating: SmartGridFloatingType;
1636
+ }
1637
+
1638
+ export declare type SmartGridFrozenColumnsDetails = {
1639
+ indexes: string[];
1640
+ positions: Record<string, number>;
1641
+ totalWidth: number;
1642
+ rightPinned: {
1643
+ indexes: string[];
1644
+ positions: Record<string, number>;
1645
+ totalWidth: number;
1646
+ };
1647
+ };
1648
+
1649
+ export declare type SmartGridFrozenState = "left" | "right" | boolean | null | undefined;
1650
+
1651
+ export declare interface SmartGridGetActualValueParams {
1652
+ column: SmartGridColumnDefinition;
1653
+ rowData: SmartGridRowData;
1654
+ cellValue: string | number | {
1655
+ label?: string;
1656
+ } | {
1657
+ label?: string;
1658
+ }[];
1659
+ }
1660
+
1661
+ export declare interface SmartGridGetDatePickerDataParams {
1662
+ cellRenderer: string;
1663
+ actualValue: {
1664
+ startDate?: string;
1665
+ endDate?: string;
1666
+ } | string | string[];
1667
+ cellValue: {
1668
+ startDate?: string;
1669
+ endDate?: string;
1670
+ } | string | string[];
1671
+ }
1672
+
1673
+ export declare interface SmartGridGetErrorInDateTimeParams {
1674
+ column: SmartGridColumnDefinition;
1675
+ actualValue: string;
1676
+ }
1677
+
1678
+ export declare interface SmartGridGetRowDataParams {
1679
+ data: SmartGridRowData;
1680
+ rowIndex?: number;
1681
+ node: SmartGridParamsNode;
1682
+ api: SmartGridAPI;
1683
+ }
1684
+
1685
+ /** Request params for getRows */
1686
+ declare interface SmartGridGetRowsRequestParams {
1687
+ startRow: number;
1688
+ endRow: number;
1689
+ pageSize: number;
1690
+ sortModel?: SmartGridSortModel;
1691
+ filterModel?: SmartGridExtendedFilterModel;
1692
+ successCallback: (rows: SmartGridRowData[], lastRow?: number, lastRowIndexKnown?: boolean) => void;
1693
+ failCallback: (error?: unknown) => void;
1694
+ context?: SmartGridDataSourceContext;
1695
+ request?: {
1696
+ startRow: number;
1697
+ endRow: number;
1698
+ sortModel?: SmartGridSortModel;
1699
+ filterModel?: SmartGridFilterModel;
1700
+ pageSize: number;
1701
+ groupKeys: string[];
1702
+ };
1703
+ }
1704
+
1705
+ export declare interface SmartGridGlobalColumnCounts {
1706
+ leftPinnedOnly?: number;
1707
+ rightPinnedOnly?: number;
1708
+ normal?: number;
1709
+ left?: number;
1710
+ right?: number;
1711
+ }
1712
+
1713
+ export declare interface SmartGridHeaderCellProps {
1714
+ column: SmartGridColumnDefinition;
1715
+ index: number;
1716
+ onToggle?: (field: string, isExpandable: boolean) => void;
1717
+ isExpandable?: boolean;
1718
+ selectable?: boolean;
1719
+ ShowFullText?: boolean;
1720
+ totalFinalHeight?: number | null;
1721
+ headerHeight?: number;
1722
+ currentRowHeight?: {
1723
+ maxHeight: number;
1724
+ maxLineCount: number;
1725
+ } | null;
1726
+ }
1727
+
1728
+ export declare interface SmartGridHeaderMenuReturn {
1729
+ unfreezeColumn: (column: SmartGridColumnDefinition) => void;
1730
+ freezeColumn: (column: SmartGridColumnDefinition) => void;
1731
+ pinColumnRight: (field: string) => void;
1732
+ unpinColumnRight: (field: string) => void;
1733
+ autoSizeColumn: (column: SmartGridColumnDefinition) => void;
1734
+ customSizeColumn: (column: SmartGridColumnDefinition) => void;
1735
+ }
1736
+
1737
+ export declare type SmartGridHeaderRowHeight = {
1738
+ maxHeight: number;
1739
+ maxLineCount: number;
1740
+ };
1741
+
1742
+ export declare interface SmartGridHeaderRowHeightWithIndex {
1743
+ [key: string]: SmartGridHeaderRowHeight;
1744
+ }
1745
+
1746
+ export declare interface SmartGridHeaderSearchProps {
1747
+ column: SmartGridColumnDefinition;
1748
+ showInplaceSearchInput: boolean;
1749
+ searchValue: string;
1750
+ setSearchValue: (value: string) => void;
1751
+ setShowSearchModal: (value: boolean | ((prev: boolean) => boolean)) => void;
1752
+ advancedSearchApplyRef: MutableRefObject<boolean>;
1753
+ }
1754
+
1755
+ export declare type SmartGridHeaderStyleParams = {
1756
+ column: SmartGridColumnDefinition;
1757
+ displayName: string;
1758
+ enableSorting: boolean;
1759
+ sortState: SmartGridSortModel;
1760
+ onSort: (field: string, direction: string) => void;
1761
+ isSearchable?: boolean;
1762
+ showSortIcon: boolean;
1763
+ toggleSearchModal: (e: default_2.MouseEvent<HTMLElement>) => void;
1764
+ hasFilters: boolean;
1765
+ isExpandable?: boolean;
1766
+ onToggle?: (field: string, isExpandable: boolean) => void;
1767
+ api: SmartGridAPI;
1768
+ availableWidth: number;
1769
+ wrapHeaderText: boolean;
1770
+ menuButtonRef: default_2.RefObject<HTMLDivElement>;
1771
+ menuToggle: (e: default_2.MouseEvent<HTMLElement>) => void;
1772
+ toggleAdvancedSeach: default_2.Dispatch<default_2.SetStateAction<boolean>>;
1773
+ };
1774
+
1775
+ export declare type SmartGridHeightComfortable = {
1776
+ type: "comfortable";
1777
+ height: 52;
1778
+ padding: 32;
1779
+ };
1780
+
1781
+ export declare type SmartGridHeightCompact = {
1782
+ type: "compact";
1783
+ height: 30;
1784
+ padding: 9;
1785
+ };
1786
+
1787
+ export declare type SmartGridHeightDefault = {
1788
+ type: "default";
1789
+ height: 46;
1790
+ padding: 24;
1791
+ };
1792
+
1793
+ export declare interface SmartGridIATableState {
1794
+ selectedCells: Map<string, SmartGridSelectedCellState>;
1795
+ instanceKeyHandlers: Map<string, (e: KeyboardEvent) => void>;
1796
+ activeInstance?: HTMLElement | null;
1797
+ }
1798
+
1799
+ export declare interface SmartGridInfiniteCache {
1800
+ analytics: SmartGridCacheAnalytics;
1801
+ blockCount: number;
1802
+ blocks: Record<number, SmartGridCacheBlock>;
1803
+ eventListeners: Record<"cacheUpdated", Function[]>;
1804
+ lastRequestedPage: number;
1805
+ lastRowIndexKnown: boolean;
1806
+ params: SmartGridInfiniteCacheParams;
1807
+ rowCount: number;
1808
+ _currentRequestedPage: number;
1809
+ getAllCachedData: () => SmartGridRowData[];
1810
+ updatePageData?: (page: number, data: SmartGridRowData[], replace: boolean, options?: {
1811
+ isRefreshData?: boolean;
1812
+ }) => void;
1813
+ purgeCache?: (options?: {
1814
+ isRefreshData?: boolean;
1815
+ }) => void;
1816
+ getTotalCachedRowCount?: () => number;
1817
+ printAllCachedData?: () => void;
1818
+ setViewportRange?: (start: number, end: number) => void;
1819
+ updateWholeData: (wholeData: SmartGridRowData[], pageSize?: number) => void;
1820
+ getBlockData: (blockId: number) => (SmartGridRowData | null)[] | null;
1821
+ }
1822
+
1823
+ export declare type SmartGridInfiniteCacheDataSourceParams = {
1824
+ getWholeData: () => SmartGridRowData[];
1825
+ updateData?: (state: SmartGridStateContext, data: SmartGridRowData[], rowId?: string, rowIndex?: number) => void;
1826
+ _cacheInjected: boolean;
1827
+ _isDestroyed: boolean;
1828
+ _loadingBlocks: Record<string, unknown>;
1829
+ _originalDatasource: {
1830
+ getRows: (params: SmartGridDataSourceParams) => void;
1831
+ };
1832
+ _pendingRAFs: number[];
1833
+ _pendingRequests: Record<string, unknown>;
1834
+ infiniteCache: SmartGridInfiniteCache;
1835
+ destroy: () => void;
1836
+ getRows: (params: SmartGridDataSourceParams) => void;
1837
+ updateCacheReference: (cache: SmartGridInfiniteCache) => void;
1838
+ updateWholeData: (wholeData: SmartGridRowData[], pageSize?: number) => void;
1839
+ };
1840
+
1841
+ /** Infinite cache interface (forward declaration) */
1842
+ declare interface SmartGridInfiniteCacheInterface {
1843
+ rowsMaxIndex?: number;
1844
+ _currentRequestedPage?: number;
1845
+ isLastRowIndexKnown: () => boolean;
1846
+ getRowCount: () => number;
1847
+ pageLoaded: (block: InfiniteBlock, lastRow?: number) => void;
1848
+ getBlock: (blockId: number) => InfiniteBlock | undefined;
1849
+ isBlockInCreationQueue: (blockId: number) => boolean;
1850
+ createBlock: (blockId: number) => InfiniteBlock;
1851
+ setRowCount?: (count: number, lastRowIndexKnown: boolean) => void;
1852
+ }
1853
+
1854
+ export declare interface SmartGridInfiniteCacheOptions {
1855
+ threshold?: number;
1856
+ maxBlocksInCache?: number;
1857
+ cacheOverflowSize?: number;
1858
+ rowHeight?: number;
1859
+ purgeStrategy?: string;
1860
+ enablePersistence?: boolean;
1861
+ persistenceStorageKey?: string;
1862
+ persistenceOptions?: Record<string, unknown>;
1863
+ uniqueIdField?: string;
1864
+ fetchDataMethodRef?: SmartGridFetchFunctionRef;
1865
+ apiUrl?: string | null;
1866
+ initialFilterModel?: SmartGridFilterModel | null;
1867
+ initialSortModel?: SmartGridSortModel | null;
1868
+ tableId?: string;
1869
+ force?: boolean;
1870
+ isServerSideRef?: MutableRefObject<boolean>;
1871
+ pageSize?: number;
1872
+ updatedPageSizeRef?: MutableRefObject<number>;
1873
+ enableIndexedDBCache?: boolean;
1874
+ enableStreamingLoad?: boolean;
1875
+ enableEnhancedWorker?: boolean;
1876
+ binaryFormat?: boolean;
1877
+ extremelyLargeDatasetThreshold?: number;
1878
+ tableContextRef?: MutableRefObject<SmartGridTableContextValue | null>;
1879
+ context?: Record<string, unknown>;
1880
+ onDataUpdate: (rows: SmartGridRowData[], blockId: number, metadata: Record<string, unknown> | undefined) => void;
1881
+ isPaginationMode?: boolean;
1882
+ }
1883
+
1884
+ export declare interface SmartGridInfiniteCacheParams {
1885
+ datasource: SmartGridInfiniteCacheDataSourceParams;
1886
+ updatedPageSizeRef: MutableRefObject<number>;
1887
+ pageSize: number;
1888
+ overflowSize: number;
1889
+ }
1890
+
1891
+ export declare interface SmartGridInfiniteCacheReturn {
1892
+ cacheReady: boolean;
1893
+ shouldUseCacheRef: MutableRefObject<boolean>;
1894
+ getRows: (startRow: number, endRow: number) => SmartGridRowData[];
1895
+ setVisibleRange: (startRow: number, endRow: number) => void;
1896
+ setSortModel: (sortModel: SmartGridSortModel) => void;
1897
+ setFilterModel: (filterModel: SmartGridFilterModel | Record<string, unknown>, options?: Record<string, unknown>) => void;
1898
+ refreshCache: (options?: SmartGridRefreshCacheOptions) => void;
1899
+ setServerSideDataSource: (datasource: SmartGridServerSideDataSource, resetCache?: boolean) => SmartGridWrappedDataSource | null;
1900
+ setPurgeStrategy: (strategy: string) => void;
1901
+ setPersistence: (enabled: boolean, options?: Record<string, unknown>) => void;
1902
+ clearPersistedCache: () => void;
1903
+ getCacheState: () => SmartGridCacheStateReturn | null;
1904
+ modelRef: MutableRefObject<SmartGridInfiniteRowModelRef | null>;
1905
+ dataSourceRef?: MutableRefObject<SmartGridWrappedDataSource | null>;
1906
+ setVisibleData?: (data: SmartGridRowData[]) => void;
1907
+ getAllCachedData?: () => SmartGridRowData[];
1908
+ }
1909
+
1910
+ export declare interface SmartGridInfiniteRowModel {
1911
+ infiniteCache?: SmartGridInfiniteCache;
1912
+ setViewportRange?: (startRow: number, endRow: number) => void;
1913
+ logCacheSummary?: () => void;
1914
+ datasource: {
1915
+ getWholeData: () => SmartGridRowData[];
1916
+ };
1917
+ [key: string]: unknown;
1918
+ }
1919
+
1920
+ export declare interface SmartGridInfiniteRowModelRef {
1921
+ infiniteCache?: SmartGridInfiniteCache;
1922
+ params?: {
1923
+ context?: unknown;
1924
+ filterModel?: SmartGridFilterModel | Record<string, unknown>;
1925
+ sortModel?: SmartGridSortModel | null;
1926
+ [key: string]: unknown;
1927
+ };
1928
+ setViewportRange?: (startRow: number, endRow: number) => void;
1929
+ logCacheSummary?: () => void;
1930
+ setDatasource?: (datasource: unknown, preserveCache?: boolean) => void;
1931
+ setSortModel?: (sortModel: SmartGridSortModel) => void;
1932
+ setFilterModel?: (filterModel: SmartGridFilterModel | {
1933
+ _search: SmartGridSearchFunctionParams;
1934
+ } | Record<string, unknown>, options?: Record<string, unknown>) => void;
1935
+ purgeCache?: () => void;
1936
+ refreshCache?: () => void;
1937
+ refreshCachePartial?: (preserveFields: string[]) => void;
1938
+ resetCache?: () => void;
1939
+ setPurgeStrategy?: (strategy: string) => void;
1940
+ setCachePersistence?: (enabled: boolean, options?: Record<string, unknown>) => void;
1941
+ clearPersistedCache?: () => void;
1942
+ getCacheState?: () => SmartGridCacheStateReturn;
1943
+ getCacheAnalytics?: () => SmartGridCacheAnalyticsData | null;
1944
+ getMemoryUsageEstimate?: () => number;
1945
+ resetCacheAnalytics?: () => void;
1946
+ datasource?: SmartGridDataSourceContext;
1947
+ getRow?: (index: number) => {
1948
+ data: SmartGridRowData;
1949
+ } | null;
1950
+ }
1951
+
1952
+ export declare interface SmartGridInfiniteScrollLoaderProps {
1953
+ isLoading: boolean;
1954
+ colSpan: number;
1955
+ }
1956
+
1957
+ export declare interface SmartGridInitialDataUpdateParams {
1958
+ dispatch: SmartGridDispatch;
1959
+ pinnedTopRows: SmartGridRowData[];
1960
+ pinnedBottomRows: SmartGridRowData[];
1961
+ tableInstance: MutableRefObject<HTMLElement | null>;
1962
+ columnMap: Record<string, SmartGridColumnDefinition>;
1963
+ uniqueIdField: string;
1964
+ childKeyField: string;
1965
+ enableRowSpan?: boolean;
1966
+ rowSpanColumn?: string | string[];
1967
+ pageSize: number;
1968
+ serverSide: boolean;
1969
+ rowDragManaged?: boolean;
1970
+ infiniteScroll?: boolean;
1971
+ initialExpandedColumnGroups?: Record<string, boolean>;
1972
+ tableApi: SmartGridAPI | null;
1973
+ smartGridMenuOptions?: SmartGridMenuOptions;
1974
+ purgeClosedRowNodes?: boolean;
1975
+ detailRendererTable?: boolean;
1976
+ isSaveViewEnabled?: boolean;
1977
+ isSavingViewLoading?: boolean;
1978
+ savedViewsOptions?: unknown[];
1979
+ rowHeight?: string;
1980
+ tableId: string;
1981
+ refObj: MutableRefObject<unknown>;
1982
+ callBackRef: MutableRefObject<SmartGridCallbackRefCurrent | null>;
1983
+ exportCallbackRef: MutableRefObject<SmartGridExportCallbackRefCurrent | null>;
1984
+ saveViewCallbackRef: MutableRefObject<SmartGridSaveViewCallbackRefCurrent | null>;
1985
+ saveViewOptionsRef: MutableRefObject<SmartGridSaveViewOptionsRefCurrent | null>;
1986
+ isSingleSelect?: boolean;
1987
+ defaultColDef?: SmartGridDefaultColDef;
1988
+ disableSelectAllRecords?: boolean;
1989
+ selectable?: boolean;
1990
+ columnBufferSize?: number;
1991
+ lazyLoadCellRenderer?: boolean;
1992
+ hasSplitRenderer?: boolean;
1993
+ splitRendererKeys?: string[];
1994
+ }
1995
+
1996
+ export declare interface SmartGridInputFormatInstance {
1997
+ colDef?: {
1998
+ type?: string;
1999
+ id?: string;
2000
+ extra?: {
2001
+ roundOffTo?: number;
2002
+ showNullAsEmpty?: boolean;
2003
+ };
2004
+ };
2005
+ data?: {
2006
+ roundOffTo?: number;
2007
+ };
2008
+ isCellInFocus?: boolean;
2009
+ isCeil?: boolean;
2010
+ roundOffTo?: number;
2011
+ type?: string;
2012
+ inputType?: string;
2013
+ }
2014
+
2015
+ export declare interface SmartGridInputProps {
2016
+ placeholder?: string;
2017
+ label?: string;
2018
+ value?: string | number;
2019
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
2020
+ type?: SmartGridInputType;
2021
+ disabled?: boolean;
2022
+ error?: string;
2023
+ leftIcon?: ReactNode;
2024
+ rightIcon?: ReactNode;
2025
+ className?: string;
2026
+ width?: string | number;
2027
+ onClick?: (e: MouseEvent_2<HTMLInputElement>) => void;
2028
+ isCellRenderer?: boolean;
2029
+ inputType?: SmartGridInputValueType;
2030
+ iconButton?: ReactNode;
2031
+ iconButtonClassName?: string;
2032
+ height?: string | number;
2033
+ onFocus?: (e: FocusEvent_2<HTMLInputElement>) => void;
2034
+ onBlur?: (e: FocusEvent_2<HTMLInputElement>) => void;
2035
+ }
2036
+
2037
+ export declare type SmartGridInputType = "text" | "password" | "email" | "number" | "tel" | "int" | "url";
2038
+
2039
+ export declare type SmartGridInputValueType = "text" | "str" | "int" | "float" | "decimal" | "percentage" | "dollar";
2040
+
2041
+ export declare interface SmartGridInternalGetRowsParams {
2042
+ startRow: number;
2043
+ endRow: number;
2044
+ filterModel?: SmartGridFilterModel | null;
2045
+ sortModel?: SmartGridSortModel | null;
2046
+ request?: Record<string, unknown>;
2047
+ successCallback?: (rowData: SmartGridRowData[], lastRow?: number) => void;
2048
+ failCallback?: () => void;
2049
+ noDataUpdate?: boolean;
2050
+ }
2051
+
2052
+ /** Last accessed sequence generator */
2053
+ declare interface SmartGridLastAccessedSequence {
2054
+ value: number;
2055
+ next: () => number;
2056
+ }
2057
+
2058
+ /** Last accessed sequence generator */
2059
+ declare interface SmartGridLastAccessedSequence_2 {
2060
+ value: number;
2061
+ next: () => number;
2062
+ }
2063
+
2064
+ export declare interface SmartGridMasterDetailConfig {
2065
+ enabled: boolean;
2066
+ expandedRows: (string | number)[];
2067
+ detailRenderer: React.ComponentType | null;
2068
+ detailRowHeight: number;
2069
+ detailPadding: number;
2070
+ expandedRowData: SmartGridRowData[];
2071
+ currentRowStyles?: {
2072
+ height?: number;
2073
+ top?: number;
2074
+ };
2075
+ rowIndex?: number | null;
2076
+ }
2077
+
2078
+ export declare interface SmartGridMemoryAnalyticsParams {
2079
+ modelRef: MutableRefObject<SmartGridInfiniteRowModelRef | null>;
2080
+ shouldUseCache: boolean;
2081
+ }
2082
+
2083
+ export declare interface SmartGridMemoryAnalyticsReturn {
2084
+ memoryUsage: number;
2085
+ analytics: SmartGridCacheAnalyticsData | null;
2086
+ updateAnalytics: () => void;
2087
+ resetAnalytics: () => void;
2088
+ updateMemoryAndAnalytices: () => void;
2089
+ }
2090
+
2091
+ export declare type SmartGridMenuAlignment = "start" | "end" | "auto";
2092
+
2093
+ export declare interface SmartGridMenuAlignments {
2094
+ START: "start";
2095
+ END: "end";
2096
+ AUTO: "auto";
2097
+ }
2098
+
2099
+ export declare interface SmartGridMenuOption {
2100
+ label: string | number;
2101
+ id: string | number;
2102
+ onClick: (value: string | number) => void;
2103
+ icon?: ReactNode;
2104
+ submenu?: SmartGridMenuOption[];
2105
+ submenuPosition?: SmartGridMenuPosition;
2106
+ submenuWidth?: number;
2107
+ submenuIconPlacement?: "left" | "right";
2108
+ selectedElement?: string | number;
2109
+ useHover?: boolean;
2110
+ noCloseOnSelect?: boolean;
2111
+ isDisabled?: boolean;
2112
+ }
2113
+
2114
+ export declare interface SmartGridMenuOptions {
2115
+ withColumMenu?: boolean;
2116
+ autoWithColumMenu?: boolean;
2117
+ freezeColumnMenu?: boolean;
2118
+ sortColumnMenu?: boolean;
2119
+ collapseColumnAll?: boolean;
2120
+ expandColumnAll?: boolean;
2121
+ wrapText?: boolean;
2122
+ }
2123
+
2124
+ export declare type SmartGridMenuPosition = "top" | "bottom" | "left" | "right";
2125
+
2126
+ export declare interface SmartGridMenuPositionResult {
2127
+ top?: number;
2128
+ left?: number;
2129
+ width?: number;
2130
+ transformOrigin?: string;
2131
+ transform?: string;
2132
+ }
2133
+
2134
+ export declare interface SmartGridMenuPositions {
2135
+ BOTTOM: "bottom";
2136
+ TOP: "top";
2137
+ LEFT: "left";
2138
+ RIGHT: "right";
2139
+ }
2140
+
2141
+ export declare interface SmartGridMenuPositionState {
2142
+ top: number;
2143
+ left: number;
2144
+ width?: number;
2145
+ height?: number;
2146
+ visibility?: "visible" | "hidden";
2147
+ transform?: string;
2148
+ transformOrigin?: string;
2149
+ }
2150
+
2151
+ export declare interface SmartGridMenuProps {
2152
+ options?: SmartGridMenuOption[];
2153
+ selectedElement?: string | number;
2154
+ iconPlacement?: "left" | "right";
2155
+ isOpen: boolean;
2156
+ setIsOpen: (isOpen: boolean) => void;
2157
+ menuButtonRef?: RefObject<HTMLElement>;
2158
+ position?: SmartGridMenuPosition;
2159
+ width?: number;
2160
+ horizontalAlign?: SmartGridMenuAlignment;
2161
+ isSubmenu?: boolean;
2162
+ parentOptionRef?: RefObject<HTMLElement> | null;
2163
+ skipAnimation?: boolean;
2164
+ portalContainer?: HTMLElement;
2165
+ additionalButtons?: ReactNode;
2166
+ forcePosition?: boolean;
2167
+ }
2168
+
2169
+ export declare interface SmartGridModalProps {
2170
+ open?: boolean;
2171
+ onClose: () => void;
2172
+ title?: string;
2173
+ children?: ReactNode;
2174
+ size?: SmartGridModalSize;
2175
+ width?: string | number;
2176
+ height?: string | number;
2177
+ className?: string;
2178
+ onPrimaryButtonClick?: () => void;
2179
+ primaryButtonLabel?: string;
2180
+ onSecondaryButtonClick?: () => void;
2181
+ secondaryButtonLabel?: string;
2182
+ closeOnOutsideClick?: boolean;
2183
+ primaryButtonVariant?: SmartGridButtonVariant;
2184
+ primaryButtonProps?: Record<string, unknown>;
2185
+ showCloseButton?: boolean;
2186
+ showPrimaryButton?: boolean;
2187
+ showSecondaryButton?: boolean;
2188
+ }
2189
+
2190
+ export declare type SmartGridModalSize = "small" | "medium" | "large";
2191
+
2192
+ export declare type SmartGridModelType = "normal" | "serverSide" | "infinite";
2193
+
2194
+ export declare interface SmartGridNewSortModel {
2195
+ column: string | null;
2196
+ order: SmartGridSortDirection | null;
2197
+ }
2198
+
2199
+ export declare interface SmartGridNotification {
2200
+ message: string;
2201
+ type?: "success" | "error" | "warning" | "info";
2202
+ duration?: number;
2203
+ timeout?: number;
2204
+ }
2205
+
2206
+ export declare type SmartGridNumberFormat = "full" | "thousands" | "millions" | "billions";
2207
+
2208
+ export declare interface SmartGridOldSortModel {
2209
+ colId: string;
2210
+ sort: SmartGridSortDirection;
2211
+ }
2212
+
2213
+ export declare type SmartGridOnReadyParams = {
2214
+ api: SmartGridAPI;
2215
+ columnApi: SmartGridAPI;
2216
+ type: "gridReady";
2217
+ };
2218
+
2219
+ export declare type SmartGridOnSelectionChangedParams = {
2220
+ api: SmartGridAPI;
2221
+ type: string;
2222
+ source: string;
2223
+ };
2224
+
2225
+ export declare interface SmartGridOptions {
2226
+ [key: string]: unknown;
2227
+ }
2228
+
2229
+ export declare type SmartGridOutsideClickCallback = () => void;
2230
+
2231
+ /** Page size ref */
2232
+ declare interface SmartGridPageSizeRef {
2233
+ current: number;
2234
+ }
2235
+
2236
+ /** Page size ref */
2237
+ declare interface SmartGridPageSizeRef_2 {
2238
+ current: number;
2239
+ }
2240
+
2241
+ export declare interface SmartGridPagesPerPageSectionProps {
2242
+ label: string;
2243
+ options: Array<{
2244
+ label: string | number;
2245
+ id: string | number;
2246
+ onClick: (value: number) => void;
2247
+ }>;
2248
+ selectedElement: number;
2249
+ }
2250
+
2251
+ export declare interface SmartGridPaginationModel {
2252
+ currentPage: number;
2253
+ pageSize: number;
2254
+ totalPages: number;
2255
+ totalRecords: number;
2256
+ }
2257
+
2258
+ export declare interface SmartGridPaginationProps {
2259
+ pagination?: boolean;
2260
+ hidePaginationPageSizeSelector?: boolean;
2261
+ paginationPageSizeSelector?: number[];
2262
+ }
2263
+
2264
+ export declare interface SmartGridPaginationRelated {
2265
+ totalItems: number;
2266
+ totalPages: number;
2267
+ currentPage: number;
2268
+ isCountUnknown: boolean;
2269
+ }
2270
+
2271
+ export declare interface SmartGridParamsNode {
2272
+ rowIndex: number;
2273
+ data: SmartGridRowData;
2274
+ api: SmartGridAPI;
2275
+ }
2276
+
2277
+ /** Pending request with abort capability */
2278
+ declare interface SmartGridPendingRequest {
2279
+ abort?: () => void;
2280
+ }
2281
+
2282
+ /** Persistence options for cache */
2283
+ declare interface SmartGridPersistenceOptions {
2284
+ maxPersistedBlocks: number;
2285
+ persistBlockData: boolean;
2286
+ compressionEnabled: boolean;
2287
+ }
2288
+
2289
+ export declare interface SmartGridPinnedRowsProps {
2290
+ rowHeight: number;
2291
+ selectable: boolean;
2292
+ expandable: boolean;
2293
+ pinnedRows: SmartGridRowData[];
2294
+ onRowClick?: SmartGridRowClickHandler;
2295
+ pinnedRowsRef: RefObject<HTMLDivElement | null>;
2296
+ leftPinnedOnly: boolean;
2297
+ rightPinnedOnly: boolean;
2298
+ frozenColumnWidth: number;
2299
+ isPinnedGrandTotalRow: boolean;
2300
+ isLeftPinnedRowsAvailable: boolean;
2301
+ handlePinnedScroll: SmartGridScrollHandler;
2302
+ virtualizedAllVisibleColumns: SmartGridColumnDefinition[];
2303
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
2304
+ uniqueIdField: string;
2305
+ pinnedType: "top" | "bottom";
2306
+ allColumnsLastRow: SmartGridColumnDefinition[];
2307
+ }
2308
+
2309
+ export declare type SmartGridPinnedType = "leftPinned" | "rightPinned" | null;
2310
+
2311
+ export declare type SmartGridPinType = "leftPinnedOnly" | "rightPinnedOnly" | "normal";
2312
+
2313
+ export declare interface SmartGridPromptButton {
2314
+ label: string;
2315
+ type: "default" | "primary" | "secondary";
2316
+ onClick?: () => void;
2317
+ }
2318
+
2319
+ export declare interface SmartGridPromptProps {
2320
+ isOpen?: boolean;
2321
+ handleClose: (e?: MouseEvent_2) => void;
2322
+ title: string;
2323
+ children: ReactNode;
2324
+ variant?: SmartGridPromptVariant;
2325
+ onPrimaryButtonClick: (e: MouseEvent_2<HTMLButtonElement>) => void;
2326
+ primaryButtonLabel?: string;
2327
+ onSecondaryButtonClick?: (e: MouseEvent_2<HTMLButtonElement>) => void;
2328
+ secondaryButtonLabel?: string;
2329
+ primaryButtonProps?: Record<string, unknown>;
2330
+ }
2331
+
2332
+ export declare type SmartGridPromptVariant = "info" | "success" | "warning" | "delete" | "error";
2333
+
2334
+ export declare interface SmartGridRadioGroupProps {
2335
+ options: SmartGridRadioOption[];
2336
+ selectedOption: string | number;
2337
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
2338
+ orientation?: SmartGridRadioOrientation;
2339
+ disabled?: boolean;
2340
+ name?: string;
2341
+ }
2342
+
2343
+ export declare interface SmartGridRadioOption {
2344
+ value: string | number;
2345
+ label: string;
2346
+ disabled?: boolean;
2347
+ }
2348
+
2349
+ export declare type SmartGridRadioOrientation = "vertical" | "horizontal";
2350
+
2351
+ export declare type SmartGridRangeFilter = {
2352
+ column: string;
2353
+ min_val: number;
2354
+ max_val: number;
2355
+ search_type: string;
2356
+ operator?: string;
2357
+ };
2358
+
2359
+ export declare interface SmartGridRefreshCacheOptions {
2360
+ purge?: boolean;
2361
+ partialRefresh?: boolean;
2362
+ preserveFields?: string[];
2363
+ userInitiated?: boolean;
2364
+ }
2365
+
2366
+ export declare interface SmartGridRefreshOptions {
2367
+ purge?: boolean;
2368
+ resetPage?: boolean;
2369
+ userInitiated?: boolean;
2370
+ }
2371
+
2372
+ export declare interface SmartGridRemoveLazyLoadParams {
2373
+ cellRef: RefObject<HTMLDivElement>;
2374
+ }
2375
+
2376
+ export declare interface SmartGridRenderHeadersProps {
2377
+ leftPinnedOnly: boolean;
2378
+ rightPinnedOnly: boolean;
2379
+ filteredColumns: SmartGridColumnDefinition[];
2380
+ selectable: boolean;
2381
+ virtualizedHeaderRows: SmartGridColumnDefinition[][];
2382
+ dispatch: SmartGridDispatch;
2383
+ headerRows: SmartGridColumnDefinition[][];
2384
+ virtualizedColumns: SmartGridColumnDefinition[];
2385
+ headerRowHeightwithIndex: SmartGridHeaderRowHeightWithIndex;
2386
+ ShowFullText: boolean;
2387
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
2388
+ }
2389
+
2390
+ /** Response metadata */
2391
+ declare interface SmartGridResponseMetadata {
2392
+ totalCount?: number;
2393
+ lastRowIndexKnown?: boolean;
2394
+ }
2395
+
2396
+ export declare interface SmartGridRowClickHandler {
2397
+ (rowData: SmartGridRowData, rowIndex: number): void;
2398
+ }
2399
+
2400
+ export declare interface SmartGridRowData {
2401
+ [key: string]: unknown;
2402
+ id?: string | number;
2403
+ isChildRow?: boolean;
2404
+ isChildGroup?: boolean;
2405
+ childIndex?: number;
2406
+ groupingLevel?: number;
2407
+ level?: number;
2408
+ parentRowIndex?: number;
2409
+ parentRowData?: SmartGridRowData;
2410
+ __parentPath?: string;
2411
+ _rowHeight?: number;
2412
+ _isPinnedTop?: boolean;
2413
+ _isPinnedBottom?: boolean;
2414
+ __isAggregationRow?: boolean;
2415
+ subTotalAggreRow?: boolean;
2416
+ grandTotalAggreRow?: boolean;
2417
+ isGrandTotalRow?: boolean;
2418
+ __parentId?: string | number | null;
2419
+ __rowSpanInfo?: SmartGridRowSpanInfo;
2420
+ __flattenedRowId?: string;
2421
+ __rowIndex?: number;
2422
+ __split?: {
2423
+ key?: string;
2424
+ };
2425
+ }
2426
+
2427
+ export declare interface SmartGridRowDragEndParams {
2428
+ api: SmartGridAPI;
2429
+ type: "rowDragEnd";
2430
+ fromIndex: number;
2431
+ toIndex: number;
2432
+ rowData: SmartGridRowData;
2433
+ }
2434
+
2435
+ export declare interface SmartGridRowDragStartParams {
2436
+ api: SmartGridAPI;
2437
+ type: "rowDragStart";
2438
+ rowIndex: number;
2439
+ rowData: SmartGridRowData;
2440
+ }
2441
+
2442
+ export declare type SmartGridRowGrouOpenParams = {
2443
+ rowId: string;
2444
+ rowIndex: number;
2445
+ api: SmartGridAPI;
2446
+ isExpanded: boolean;
2447
+ };
2448
+
2449
+ export declare type SmartGridRowGroupPaginationParams = {
2450
+ page: number;
2451
+ pageSize: number;
2452
+ };
2453
+
2454
+ export declare interface SmartGridRowGroupPaginationState extends SmartGridRowGroupStatePagination {
2455
+ page: number;
2456
+ pageSize: number;
2457
+ hasMore: boolean;
2458
+ }
2459
+
2460
+ export declare interface SmartGridRowGroupParams {
2461
+ groupId: string;
2462
+ isRowGroupEnabled: boolean;
2463
+ loadingRef: RefObject<HTMLDivElement | null>;
2464
+ }
2465
+
2466
+ export declare interface SmartGridRowGroupReturn {
2467
+ groupData: SmartGridRowData[];
2468
+ isLoading: boolean;
2469
+ hasMore: boolean;
2470
+ error: string | null;
2471
+ groupLoading: boolean;
2472
+ loadingRef: RefObject<HTMLDivElement | null>;
2473
+ }
2474
+
2475
+ export declare type SmartGridRowGroupState = {
2476
+ expandedGroups: Record<string, SmartGridRowGroupStateExpandedGroups>;
2477
+ loadedData: Record<string, SmartGridRowData[]>;
2478
+ loading: Record<string, boolean>;
2479
+ pagination: Record<string, SmartGridRowGroupStatePagination>;
2480
+ cache: {
2481
+ metadata: Record<string, SmartGridCacheMetadata>;
2482
+ expirationTime: number;
2483
+ };
2484
+ api: SmartGridAPI | null;
2485
+ isLoadingSomething: boolean;
2486
+ isAllRowExpanded: boolean;
2487
+ isManuallyChanged: boolean;
2488
+ };
2489
+
2490
+ export declare type SmartGridRowGroupStateExpandedGroups = {
2491
+ count: number;
2492
+ fieldName: string;
2493
+ rowIndex: number;
2494
+ value: string;
2495
+ [key: string]: boolean | number | string;
2496
+ };
2497
+
2498
+ export declare type SmartGridRowGroupStatePagination = {
2499
+ hasMore: boolean;
2500
+ lastUpdated: number;
2501
+ page: number;
2502
+ pageSize: number;
2503
+ totalItems?: number;
2504
+ totalPages?: number;
2505
+ error?: boolean;
2506
+ };
2507
+
2508
+ export declare type SmartGridRowHeightMap = Record<string | number, number>;
2509
+
2510
+ export declare interface SmartGridRowHoverEffectParams {
2511
+ scrollContainerRef: RefObject<HTMLElement | null>;
2512
+ tableInstance: MutableRefObject<HTMLElement | null>;
2513
+ }
2514
+
2515
+ export declare type SmartGridRowInfo = {
2516
+ isFirst: boolean;
2517
+ span: number;
2518
+ rowIds?: (string | number)[];
2519
+ };
2520
+
2521
+ export declare interface SmartGridRowNode extends SmartGridUpdateData {
2522
+ id: string | number;
2523
+ childIndex?: number;
2524
+ selected: boolean;
2525
+ rowIndex?: number;
2526
+ absoluteRowIndex?: number;
2527
+ originalData?: SmartGridRowData;
2528
+ rowHeight?: number;
2529
+ setSelected: (selected: boolean, clearSelection?: boolean) => void | ((value: string | number | boolean) => void);
2530
+ isGroup?: () => boolean;
2531
+ }
2532
+
2533
+ export declare interface SmartGridRowRenderer {
2534
+ firstRenderedRow: number;
2535
+ lastRenderedRow: number;
2536
+ setRenderedRange: (firstRow: number, lastRow: number) => void;
2537
+ }
2538
+
2539
+ export declare interface SmartGridRowRenderProps {
2540
+ currentPageData: SmartGridRowData[];
2541
+ onRowClick?: SmartGridRowClickHandler;
2542
+ selectable: boolean;
2543
+ expandable: boolean;
2544
+ leftPinnedOnly: boolean;
2545
+ rightPinnedOnly: boolean;
2546
+ virtualizedAllVisibleColumns: SmartGridColumnDefinition[];
2547
+ bodyContainerRef: RefObject<HTMLDivElement>;
2548
+ allColumnsLastRow: SmartGridColumnDefinition[];
2549
+ rowHeight: number;
2550
+ masterDetailEnabled: boolean;
2551
+ showInfiniteLoader: boolean;
2552
+ totalHeight: number;
2553
+ loadedData: Record<string, SmartGridRowData[]>;
2554
+ expandedGroups: Record<string, SmartGridRowGroupStateExpandedGroups>;
2555
+ rowHeightMap: SmartGridRowHeightMap;
2556
+ isLoading?: boolean;
2557
+ shimmerRowCount?: number;
2558
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
2559
+ columnHorizontalScrollContainerRef: RefObject<HTMLDivElement>;
2560
+ tableApi: SmartGridAPI | null;
2561
+ scrollContainerRef: RefObject<HTMLDivElement>;
2562
+ rowHeightCache: RowHeightCache | null;
2563
+ adjustTableHeightServerSide?: boolean;
2564
+ }
2565
+
2566
+ export declare interface SmartGridRowSpanInfo {
2567
+ [key: string]: SmartGridRowInfo | boolean | undefined;
2568
+ isRowSpan?: boolean;
2569
+ Selection?: SmartGridRowInfo;
2570
+ }
2571
+
2572
+ export declare interface SmartGridRowSpanInfoDetails {
2573
+ span?: number;
2574
+ isFirst?: boolean;
2575
+ }
2576
+
2577
+ export declare type SmartGridRowStyleParams = {
2578
+ api: SmartGridAPI;
2579
+ data: SmartGridRowData;
2580
+ pinned: boolean;
2581
+ node: {
2582
+ rowIndex: number;
2583
+ data: SmartGridRowData;
2584
+ api: SmartGridAPI;
2585
+ pinned: boolean;
2586
+ };
2587
+ };
2588
+
2589
+ export declare interface SmartGridSafeCellRendererProps {
2590
+ renderer: React.ComponentType<SmartGridCellRendererParams> | ((params: SmartGridCellRendererParams) => JSX.Element);
2591
+ params: SmartGridCellRendererParams;
2592
+ }
2593
+
2594
+ export declare type SmartGridSavedViewsOptions = {
2595
+ isActive: boolean;
2596
+ isDefaultView: boolean;
2597
+ viewName: string;
2598
+ viewType: "personal" | "global";
2599
+ };
2600
+
2601
+ export declare interface SmartGridSaveViewCallbackRefCurrent {
2602
+ handleSetDefaultView?: ((view: SmartGridSavedViewsOptions) => void) | null;
2603
+ handleSavedViewClick?: ((view: SmartGridSavedViewsOptions) => void) | null;
2604
+ handleEditSaveView?: ((updatedData: SmartGridSavedViewsOptions, view: SmartGridSavedViewsOptions) => void) | null;
2605
+ handleSaveAndApply?: ((view: SmartGridSavedViewsOptions) => void) | null;
2606
+ handleDeleteViewClick?: ((view: SmartGridSavedViewsOptions) => void) | null;
2607
+ }
2608
+
2609
+ export declare interface SmartGridSaveViewOptionsRefCurrent {
2610
+ maxSavedViews?: number | null;
2611
+ deleteViewPromptText?: string | null;
2612
+ }
2613
+
2614
+ export declare interface SmartGridScrollHandler {
2615
+ (event: React.UIEvent<HTMLDivElement>): void;
2616
+ }
2617
+
2618
+ export declare interface SmartGridScrollSyncParams {
2619
+ frozenScrollContainerRef?: RefObject<HTMLDivElement | null>;
2620
+ normalScrollContainerRef?: RefObject<HTMLDivElement | null>;
2621
+ rightPinnedScrollContainerRef?: RefObject<HTMLDivElement | null>;
2622
+ }
2623
+
2624
+ export declare interface SmartGridScrollSyncReturn {
2625
+ headerScrollContainerRef: RefObject<HTMLDivElement | null>;
2626
+ pinnedTopScrollContainerRef: RefObject<HTMLDivElement | null>;
2627
+ pinnedBottomScrollContainerRef: RefObject<HTMLDivElement | null>;
2628
+ createHeaderScrollHandler: (bodyScrollRef: RefObject<HTMLDivElement | null>) => (e: React.UIEvent<HTMLElement>) => void;
2629
+ createPinnedTopScrollHandler: (bodyScrollRef: RefObject<HTMLDivElement | null>) => (e: React.UIEvent<HTMLElement>) => void;
2630
+ createPinnedBottomScrollHandler: (bodyScrollRef: RefObject<HTMLDivElement | null>) => (e: React.UIEvent<HTMLElement>) => void;
2631
+ createBodyScrollHandler: (bodyScrollRef: RefObject<HTMLDivElement | null>, handleColumnScroll: ((e: React.UIEvent<HTMLElement>) => void) | null) => (e: React.UIEvent<HTMLElement>) => void;
2632
+ createNormalScrollHandler: (handleColumnScroll: ((e: React.UIEvent<HTMLElement>) => void) | null) => (e: React.UIEvent<HTMLElement>) => void;
2633
+ handleFrozenScroll: (e: React.UIEvent<HTMLElement>) => void;
2634
+ handleRightPinnedScroll: (e: React.UIEvent<HTMLElement>) => void;
2635
+ syncHorizontalScroll: (scrollLeft: number, sourceElement: HTMLElement, bodyScrollRef?: RefObject<HTMLDivElement | null> | null) => void;
2636
+ }
2637
+
2638
+ export declare type SmartGridSearchFunctionParams = SmartGridFilterModel[] | Record<string, SmartGridFilterModel[]>;
2639
+
2640
+ export declare type SmartGridSearchFunctionParamsWithField = Record<string, SmartGridFilterModel>;
2641
+
2642
+ export declare interface SmartGridSearchInputWithoutBorderProps {
2643
+ inputRef?: RefObject<HTMLInputElement>;
2644
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
2645
+ type?: string;
2646
+ placeholder?: string;
2647
+ value?: string;
2648
+ }
2649
+
2650
+ export declare interface SmartGridSearchOperatorOption {
2651
+ value: string;
2652
+ label: string;
2653
+ type?: string;
2654
+ }
2655
+
2656
+ export declare interface SmartGridSearchWithSearchKey {
2657
+ _search: SmartGridSearchFunctionParamsWithField;
2658
+ }
2659
+
2660
+ export declare interface SmartGridSelectDropdownPosition {
2661
+ top: number;
2662
+ left: number;
2663
+ width: number;
2664
+ }
2665
+
2666
+ export declare interface SmartGridSelectedCell {
2667
+ colIndex: number;
2668
+ column: SmartGridColumnDefinition;
2669
+ data: SmartGridRowData;
2670
+ field: string;
2671
+ rowId: string | number;
2672
+ rowIndex: number;
2673
+ value: unknown;
2674
+ }
2675
+
2676
+ export declare interface SmartGridSelectedCellState {
2677
+ rowIndex: number;
2678
+ colIndex: number;
2679
+ column: SmartGridColumnDefinition;
2680
+ cellValue: unknown;
2681
+ rowData: SmartGridRowData;
2682
+ target: HTMLElement;
2683
+ tableId: string;
2684
+ frozenColumnsLength: number;
2685
+ pinnedType?: SmartGridPinnedType;
2686
+ rowId: string | number;
2687
+ field: string;
2688
+ tableInstanceId?: string | undefined;
2689
+ rowAttr: string | null;
2690
+ }
2691
+
2692
+ export declare interface SmartGridSelectOption {
2693
+ value: string | number;
2694
+ label: string;
2695
+ isDisabled?: boolean;
2696
+ }
2697
+
2698
+ export declare type SmartGridSelectOptions = Dispatch<SetStateAction<SmartGridSelectOptionsCombination>> | SmartGridSelectOptionsCombinationFunc;
2699
+
2700
+ export declare type SmartGridSelectOptionsCombination = SmartGridSelectOption | SmartGridSelectOption[] | null;
2701
+
2702
+ export declare type SmartGridSelectOptionsCombinationFunc = (option: SmartGridSelectOptionsCombination) => void;
2703
+
2704
+ export declare interface SmartGridSelectProps {
2705
+ label?: string;
2706
+ width?: string | number;
2707
+ selectedOptions: SmartGridSelectOptionsCombination;
2708
+ setSelectedOptions: SmartGridSelectOptions;
2709
+ isDisabled?: boolean;
2710
+ isOpen?: boolean;
2711
+ setIsOpen?: (isOpen: boolean) => void;
2712
+ initialOptions?: SmartGridSelectOption[];
2713
+ withPortal?: boolean;
2714
+ className?: string;
2715
+ isMulti?: boolean;
2716
+ currentOptions?: SmartGridSelectOption[];
2717
+ setCurrentOptions?: Dispatch<SetStateAction<SmartGridSelectOption[]>>;
2718
+ onBlur?: () => void;
2719
+ isCellRenderer?: boolean;
2720
+ tableApi?: SmartGridAPI | null;
2721
+ lazyLoadCellRenderer?: boolean;
2722
+ }
2723
+
2724
+ export declare interface SmartGridServerProps {
2725
+ totalItems: number;
2726
+ totalPages: number;
2727
+ currentPage: number;
2728
+ isCountUnknown: boolean;
2729
+ enablePaginationWhenCountUnknown?: boolean;
2730
+ displayNextPageButton?: boolean;
2731
+ pageSize: number;
2732
+ }
2733
+
2734
+ export declare interface SmartGridServerSideDataSource {
2735
+ getRows: (params: SmartGridServerSideGetRowsParams) => {
2736
+ abort?: () => void;
2737
+ } | void;
2738
+ }
2739
+
2740
+ /** Server-side datasource interface */
2741
+ declare interface SmartGridServerSideDatasource {
2742
+ infiniteCache: InfiniteCache | undefined;
2743
+ _originalParams: SmartGridServerSideDataSourceParams;
2744
+ _loadingBlocks: Record<number, boolean>;
2745
+ _pendingRequests: Record<string, SmartGridPendingRequest>;
2746
+ _lastRequestParams: SmartGridGetRowsRequestParams | null;
2747
+ _isDestroyed: boolean;
2748
+ updateCacheReference: (newCache: InfiniteCache) => boolean;
2749
+ updateConfig: (newConfig: Partial<SmartGridServerSideDataSourceParams>) => SmartGridServerSideDatasource;
2750
+ destroy: () => void;
2751
+ resetLoadState: () => void;
2752
+ getRows: (requestParams: SmartGridGetRowsRequestParams) => void;
2753
+ _cacheInjected?: boolean;
2754
+ _isWrapped?: boolean;
2755
+ context?: SmartGridDataSourceContext;
2756
+ }
2757
+
2758
+ /** Server-side datasource params */
2759
+ declare interface SmartGridServerSideDataSourceParams {
2760
+ fetchFunc?: SmartGridFetchFunctionRef;
2761
+ apiUrl?: string;
2762
+ sortModel: SmartGridSortModel;
2763
+ filterModel: SmartGridSearchWithSearchKey | null;
2764
+ infiniteCache: InfiniteCache | null;
2765
+ context: SmartGridDataSourceContext;
2766
+ pageSize: number;
2767
+ resetState?: boolean;
2768
+ updatedPageSizeRef?: SmartGridUpdatedPageSizeRef;
2769
+ }
2770
+
2771
+ export declare interface SmartGridServerSideGetRowsParams {
2772
+ request: {
2773
+ startRow: number;
2774
+ endRow: number;
2775
+ filterModel?: SmartGridFilterModel | SmartGridSearchWithSearchKey | null;
2776
+ sortModel?: SmartGridSortModel | null;
2777
+ };
2778
+ api: SmartGridAPI;
2779
+ success: (response: SmartGridFetchDataResponse) => void;
2780
+ fail: () => void;
2781
+ }
2782
+
2783
+ export declare interface SmartGridShimmerRowProps {
2784
+ columns?: SmartGridColumnDefinition[];
2785
+ selectable?: boolean;
2786
+ expandable?: boolean;
2787
+ rowHeight?: number;
2788
+ isShimmering?: boolean;
2789
+ virtualizedAllVisibleColumns?: SmartGridColumnDefinition[];
2790
+ isSingleSelect?: boolean;
2791
+ leftPinnedOnly?: boolean;
2792
+ disableSelectAllRecords?: boolean;
2793
+ }
2794
+
2795
+ export declare type SmartGridSortDirection = "asc" | "desc" | "none";
2796
+
2797
+ export declare type SmartGridSortModel = SmartGridOldSortModel | SmartGridNewSortModel | null;
2798
+
2799
+ export declare interface SmartGridSortWithHeaderNameProps {
2800
+ isAutoHeightColumn?: boolean;
2801
+ sortState: SmartGridSortModel;
2802
+ onSort: (columnId: string, direction: string) => void;
2803
+ column: SmartGridColumnDefinition;
2804
+ isExpandable?: boolean;
2805
+ availableWidth: number;
2806
+ onToggle?: (field: string, isExpandable: boolean) => void;
2807
+ isExpandedGrouping: boolean;
2808
+ showSortIcon?: boolean;
2809
+ wrapHeaderText?: boolean;
2810
+ ShowFullText?: boolean;
2811
+ totalFinalHeight?: number | null;
2812
+ isIntegerType?: boolean;
2813
+ currentRowHeight?: {
2814
+ maxHeight: number;
2815
+ maxLineCount: number;
2816
+ } | null;
2817
+ innerHeaderComponent?: ((props: SmartGridHeaderStyleParams) => JSX.Element | string) | null;
2818
+ customHeaderProps?: SmartGridHeaderStyleParams;
2819
+ }
2820
+
2821
+ export declare interface SmartGridStateContext {
2822
+ data?: SmartGridRowData[] | null;
2823
+ filteredData: SmartGridRowData[] | null;
2824
+ originalData: SmartGridRowData[] | null;
2825
+ previewMode: boolean;
2826
+ isLoading: boolean;
2827
+ columns: SmartGridColumnDefinition[];
2828
+ columnMap: Record<string, SmartGridColumnDefinition>;
2829
+ sortState: SmartGridSortModel;
2830
+ pagination: {
2831
+ currentPage: number;
2832
+ pageSize: number;
2833
+ totalPages: number | null;
2834
+ isCountUnknown: boolean;
2835
+ totalItems: number;
2836
+ currentLoadedPage: number;
2837
+ allTotalPages: number;
2838
+ page: number;
2839
+ };
2840
+ selectedRows: (string | number)[];
2841
+ selectedRowsObject: Record<string, boolean>;
2842
+ columnFilters: Record<string, SmartGridFilterModel[]>;
2843
+ expandedChildRows: Record<string, SmartGridExpandedChildRows>;
2844
+ expandedColumnGroups: SmartGridExpandedColumnGroups;
2845
+ uniqueIdField: string;
2846
+ childKeyField: string;
2847
+ frozenColumns: SmartGridFrozenColumnsDetails;
2848
+ notification: SmartGridNotification & {
2849
+ show: boolean;
2850
+ };
2851
+ columnsToAutosize: string[] | Record<string, boolean>;
2852
+ prevAction: string;
2853
+ checkConfiguration: SmartGridCheckConfiguration[];
2854
+ isSelectAllRecords: boolean;
2855
+ unCheckedRows: Record<string, boolean>;
2856
+ isSelectionChanged: boolean;
2857
+ masterDetail: {
2858
+ enabled: boolean;
2859
+ expandedRows: (string | number)[];
2860
+ detailRenderer: null | Function;
2861
+ detailRowHeight: number;
2862
+ detailPadding: number;
2863
+ expandedRowData: SmartGridRowData | SmartGridRowData[] | null;
2864
+ currentRowStyles?: {
2865
+ height?: number;
2866
+ top?: number;
2867
+ };
2868
+ rowIndex?: number | null;
2869
+ };
2870
+ eventListeners: Record<string, SmartGridEventListener[]>;
2871
+ defaultColDef: SmartGridDefaultColDef | null;
2872
+ api: SmartGridAPI | null;
2873
+ actions: {};
2874
+ serverSide: boolean;
2875
+ enableRowSpan: boolean;
2876
+ rowSpanColumn: string | string[] | null;
2877
+ rowDragManaged: boolean;
2878
+ format: {
2879
+ fontSize: "medium" | "small" | "large";
2880
+ numberFormat: SmartGridNumberFormat;
2881
+ };
2882
+ pinnedTopRows: SmartGridRowData[];
2883
+ pinnedBottomRows: SmartGridRowData[];
2884
+ rowGroupState: SmartGridRowGroupState;
2885
+ tableInstance: MutableRefObject<HTMLElement | null>;
2886
+ headerRowHeightwithIndex: Record<string, SmartGridHeaderRowHeight>;
2887
+ infiniteScroll: boolean;
2888
+ smartGridMenuOptions: {
2889
+ withColumMenu?: boolean;
2890
+ autoWithColumMenu?: boolean;
2891
+ freezeColumnMenu?: boolean;
2892
+ sortColumnMenu?: boolean;
2893
+ collapseColumnAll?: boolean;
2894
+ expandColumnAll?: boolean;
2895
+ wrapText?: boolean;
2896
+ };
2897
+ purgeClosedRowNodes: boolean;
2898
+ detailRendererTable: boolean;
2899
+ isSaveViewEnabled: boolean;
2900
+ rowHeight: {
2901
+ type: "default" | "compact" | "comfortable";
2902
+ height: number;
2903
+ padding: number;
2904
+ };
2905
+ aggregationTotalRow: SmartGridRowData | null;
2906
+ hasAggregation: boolean;
2907
+ callBackRef: MutableRefObject<SmartGridCallbackRefCurrent | null>;
2908
+ exportCallbackRef: MutableRefObject<{
2909
+ downloadExcelHandler?: null | Function;
2910
+ downloadCSVHandler?: null | Function;
2911
+ copyToClipboardHandler?: null | Function;
2912
+ }>;
2913
+ saveViewOptionsRef: MutableRefObject<{
2914
+ maxSavedViews?: null | number;
2915
+ deleteViewPromptText?: null | string;
2916
+ }>;
2917
+ saveViewCallbackRef: MutableRefObject<SmartGridSaveViewCallbackRefCurrent>;
2918
+ tableId: string;
2919
+ isSingleSelect: boolean;
2920
+ selectable: boolean;
2921
+ disableSelectAllRecords: boolean;
2922
+ columnBufferSize?: number;
2923
+ lazyLoadCellRenderer?: boolean;
2924
+ hasSplitRenderer?: boolean;
2925
+ splitRendererKeys?: string[] | null;
2926
+ originalFromIndex?: number | null;
2927
+ lastToIndex?: number | null;
2928
+ hasExpandedChildren?: boolean;
2929
+ isDraggingDownward?: boolean;
2930
+ saveViewCallbacks?: {
2931
+ isSavingViewLoading?: boolean;
2932
+ savedViewsOptions?: SmartGridSavedViewsOptions[];
2933
+ } & Record<string, unknown>;
2934
+ [key: string]: unknown;
2935
+ }
2936
+
2937
+ export declare type SmartGridStringFilter = {
2938
+ column: string;
2939
+ pattern: string;
2940
+ search_type: string;
2941
+ operator?: string;
2942
+ };
2943
+
2944
+ export declare interface SmartGridSwitchProps {
2945
+ value: boolean;
2946
+ leftLabel?: string;
2947
+ rightLabel?: string;
2948
+ disabled?: boolean;
2949
+ onChange: (value: boolean) => void;
2950
+ }
2951
+
2952
+ export declare interface SmartGridTableAPIObject {
2953
+ api: SmartGridAPI;
2954
+ tableId?: string;
2955
+ }
2956
+
2957
+ export declare interface SmartGridTableBodyContentProps {
2958
+ onRowClick?: SmartGridRowClickHandler;
2959
+ expandable?: boolean;
2960
+ paginateOriginalRowsOnly?: boolean;
2961
+ adjustTableHeightServerSide?: boolean;
2962
+ tableId?: string;
2963
+ alignedGrids?: string[];
2964
+ headerHeight?: number | string;
2965
+ showHeader?: boolean;
2966
+ masterDetail?: boolean;
2967
+ height?: number | string;
2968
+ normalScrollContainerRef: RefObject<HTMLDivElement>;
2969
+ ShowFullText?: boolean;
2970
+ enterPriseTableRef: RefObject<HTMLDivElement>;
2971
+ }
2972
+
2973
+ export declare interface SmartGridTableBodyProps {
2974
+ onRowClick?: SmartGridRowClickHandler;
2975
+ selectable?: boolean;
2976
+ expandable?: boolean;
2977
+ leftPinnedOnly?: boolean;
2978
+ rightPinnedOnly?: boolean;
2979
+ adjustTableHeightServerSide?: boolean;
2980
+ masterDetailEnabled?: boolean;
2981
+ allColumnsLastRow?: SmartGridColumnDefinition[];
2982
+ scrollContainerRef: RefObject<HTMLDivElement>;
2983
+ virtualizedAllVisibleColumns?: SmartGridColumnDefinition[];
2984
+ isInfiniteLoadingMoreRef: MutableRefObject<boolean>;
2985
+ shimmerRowCount?: number;
2986
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
2987
+ columnHorizontalScrollContainerRef: RefObject<HTMLDivElement>;
2988
+ paginateOriginalRowsOnly?: boolean;
2989
+ }
2990
+
2991
+ export declare type SmartGridTableComponentProps = SmartGridTableProps;
2992
+
2993
+ export declare interface SmartGridTableContentDetailsProps {
2994
+ frozenScrollContainerRef: RefObject<HTMLDivElement>;
2995
+ normalScrollContainerRef: RefObject<HTMLDivElement>;
2996
+ rightPinnedScrollContainerRef: RefObject<HTMLDivElement>;
2997
+ columnHorizontalScrollContainerRef: RefObject<HTMLDivElement>;
2998
+ headerRowRef: RefObject<HTMLDivElement>;
2999
+ headerHeight?: number | string;
3000
+ showHeader?: boolean;
3001
+ expandable?: boolean;
3002
+ selectable?: boolean;
3003
+ leftPinnedOnly?: boolean;
3004
+ rightPinnedOnly?: boolean;
3005
+ alignedGrids?: string[];
3006
+ masterDetail?: boolean;
3007
+ onRowClick?: SmartGridRowClickHandler;
3008
+ adjustTableHeightServerSide?: boolean;
3009
+ paginateOriginalRowsOnly?: boolean;
3010
+ tableId?: string;
3011
+ height?: number | string;
3012
+ ShowFullText?: boolean;
3013
+ isLeftPinnedRowsAvailable?: boolean;
3014
+ columnScrollHandlerRef?: MutableRefObject<SmartGridScrollHandler | null>;
3015
+ isScrollingSynced?: MutableRefObject<boolean>;
3016
+ }
3017
+
3018
+ export declare interface SmartGridTableContentProps {
3019
+ showHeader?: boolean;
3020
+ showFooter?: boolean;
3021
+ showToolbar?: boolean;
3022
+ showSaveTableConfig?: boolean;
3023
+ height?: number | string;
3024
+ headerHeight?: number | string;
3025
+ pagination?: boolean;
3026
+ paginateOriginalRowsOnly?: boolean;
3027
+ tableHeader?: string | ReactNode;
3028
+ topRightOptions?: string | ReactNode;
3029
+ topLeftOptions?: string | ReactNode;
3030
+ bottomLeftOptions?: string | ReactNode;
3031
+ bottomCenterOptions?: string | ReactNode;
3032
+ bottomRightOptions?: string | ReactNode;
3033
+ additionalButtons?: string | ReactNode;
3034
+ adjustTableHeightServerSide?: boolean;
3035
+ tableId?: string | null;
3036
+ alignedGrids?: string[];
3037
+ masterDetail?: boolean;
3038
+ detailCellRenderer?: React.ComponentType | null;
3039
+ detailRowHeight?: number;
3040
+ downloadAsExcel?: boolean;
3041
+ downloadAsCSV?: boolean;
3042
+ copyToClipboard?: boolean;
3043
+ hidePaginationPageSizeSelector?: boolean;
3044
+ paginationPageSizeSelector?: number[];
3045
+ aboveTableComponent?: ReactNode;
3046
+ shouldRenderTable?: boolean;
3047
+ nestedTable?: boolean;
3048
+ nestedTableComponent?: ReactNode | null;
3049
+ enableNestedTableCloseButton?: boolean;
3050
+ onCloseNestedTable?: () => void;
3051
+ showTableSettingActionTab?: boolean;
3052
+ showTableSettingFormatTab?: boolean;
3053
+ hideNotification?: boolean;
3054
+ expandable?: boolean;
3055
+ onRowClick?: SmartGridRowClickHandler;
3056
+ ShowFullText?: boolean;
3057
+ detailRendererTable?: boolean;
3058
+ showFilters?: boolean;
3059
+ onCellClick?: () => void;
3060
+ onPageChange?: (page: number) => void;
3061
+ onSortChange?: (sortModel: unknown) => void;
3062
+ onFilterChange?: (filterModel: unknown) => void;
3063
+ totalItems?: number;
3064
+ totalPages?: number;
3065
+ currentPage?: number;
3066
+ isCountUnknown?: boolean;
3067
+ onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
3068
+ defaultColDef?: Record<string, unknown>;
3069
+ copyToClipboardHandler?: () => void;
3070
+ downloadExcelHandler?: () => void;
3071
+ downloadCSVHandler?: () => void;
3072
+ }
3073
+
3074
+ export declare interface SmartGridTableContentRendererProps {
3075
+ headerRows: SmartGridColumnDefinition[][];
3076
+ visibleColumns: SmartGridColumnDefinition[];
3077
+ leftPinnedOnly: boolean;
3078
+ rightPinnedOnly: boolean;
3079
+ columnHorizontalScrollContainerRef: RefObject<HTMLDivElement>;
3080
+ pinnedType: SmartGridPinType;
3081
+ globalColumnCounts: SmartGridGlobalColumnCounts;
3082
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
3083
+ mainContainerClassName: string;
3084
+ mainContainerStyles: CSSProperties;
3085
+ tableId?: string;
3086
+ showHeader?: boolean;
3087
+ headerHeight?: number | string;
3088
+ headerScrollContainerRef: RefObject<HTMLDivElement | null>;
3089
+ handleHeaderScroll: SmartGridScrollHandler;
3090
+ headerRowRef: RefObject<HTMLDivElement | null>;
3091
+ totalNormalColumnWidth: number | string;
3092
+ selectable: boolean;
3093
+ filteredColumns: SmartGridColumnDefinition[];
3094
+ ShowFullText?: boolean;
3095
+ expandable: boolean;
3096
+ onRowClick?: SmartGridRowClickHandler;
3097
+ pinnedTopScrollContainerRef: RefObject<HTMLDivElement | null>;
3098
+ frozenColumnWidth: number;
3099
+ isLeftPinnedRowsAvailable?: boolean;
3100
+ handlePinnedTopScroll: SmartGridScrollHandler;
3101
+ handleRightPinnedScroll: SmartGridScrollHandler;
3102
+ handleFrozenScroll: SmartGridScrollHandler;
3103
+ createBodyScrollHandler: (columnHorizontalScrollContainerRef: RefObject<HTMLDivElement | null>, handleColumnScroll: ((e: React.UIEvent<HTMLElement>) => void) | null) => (e: React.UIEvent<HTMLElement>) => void;
3104
+ containerStyles: CSSProperties;
3105
+ bodyContainerClassName: string;
3106
+ bodyScrollContainer: RefObject<HTMLDivElement | null>;
3107
+ height?: number | string;
3108
+ handleHorizontalNormalScroll: SmartGridScrollHandler;
3109
+ paginateOriginalRowsOnly?: boolean;
3110
+ adjustTableHeightServerSide?: boolean;
3111
+ masterDetail?: boolean;
3112
+ pinnedBottomScrollContainerRef: RefObject<HTMLDivElement | null>;
3113
+ handlePinnedBottomScroll: SmartGridScrollHandler;
3114
+ isInfiniteLoadingMoreRef: MutableRefObject<boolean>;
3115
+ }
3116
+
3117
+ export declare interface SmartGridTableContextRef {
3118
+ state?: SmartGridStateContext;
3119
+ tableApi?: SmartGridAPI;
3120
+ }
3121
+
3122
+ declare interface SmartGridTableContextValue {
3123
+ state: SmartGridStateContext;
3124
+ tableApi: SmartGridAPI | null;
3125
+ dispatch: SmartGridDispatch;
3126
+ ACTION_TYPES: typeof ACTION_TYPES;
3127
+ toggleGroupExpansion: (rowId: string | number, rowIndex: number) => void;
3128
+ dispatchEvent: (eventType: string, eventData: Record<string, unknown>) => void;
3129
+ getRowStyle?: (params: SmartGridRowStyleParams) => CSSProperties;
3130
+ }
3131
+
3132
+ export declare interface SmartGridTableFooterProps {
3133
+ bottomCenterOptions?: ReactNode;
3134
+ bottomLeftOptions?: ReactNode;
3135
+ bottomRightOptions?: ReactNode;
3136
+ pagination?: boolean;
3137
+ hidePaginationPageSizeSelector?: boolean;
3138
+ paginationPageSizeSelector?: number[];
3139
+ }
3140
+
3141
+ export declare interface SmartGridTableHeaderProps {
3142
+ selectable?: boolean;
3143
+ leftPinnedOnly?: boolean;
3144
+ rightPinnedOnly?: boolean;
3145
+ virtualizedHeaderRows?: SmartGridColumnDefinition[][];
3146
+ filteredColumns: SmartGridColumnDefinition[];
3147
+ headerRows: SmartGridColumnDefinition[][];
3148
+ virtualizedColumns: SmartGridColumnDefinition[];
3149
+ virtualizedStartCololumnIndex: MutableRefObject<number>;
3150
+ ShowFullText?: boolean;
3151
+ }
3152
+
3153
+ export declare interface SmartGridTableInstance {
3154
+ current: HTMLElement | null;
3155
+ }
3156
+
3157
+ export declare interface SmartGridTableModel {
3158
+ getData: () => SmartGridRowData[];
3159
+ modelRef?: {
3160
+ current?: SmartGridInfiniteRowModel;
3161
+ };
3162
+ infiniteCache: SmartGridInfiniteCacheReturn | null;
3163
+ getColumnDefs: () => SmartGridColumnDefinition[];
3164
+ getSortModel: () => SmartGridSortModel[];
3165
+ getFilterModel: () => SmartGridFilterModel;
3166
+ getType: () => SmartGridModelType;
3167
+ getRowsToDisplay: () => number;
3168
+ forEachNode: (callback: (node: SmartGridRowNode, index: number) => void) => void;
3169
+ getRowNode: (id: string | number) => SmartGridRowNode | null;
3170
+ getSelectedRows: () => SmartGridRowData[];
3171
+ getPaginationModel: () => SmartGridPaginationModel;
3172
+ getColumnState: () => SmartGridColumnState[];
3173
+ rowsToDisplay: SmartGridRowData[];
3174
+ }
3175
+
3176
+ export declare interface SmartGridTableProps extends SmartGridSaveViewCallbackRefCurrent {
3177
+ ref?: Ref<SmartGridTableRef>;
3178
+ data?: SmartGridRowData[] | null;
3179
+ columns: SmartGridColumnDefinition[];
3180
+ uniqueIdField?: string;
3181
+ height?: number | string;
3182
+ childKeyField?: string;
3183
+ defaultColDef?: SmartGridDefaultColDef;
3184
+ pinnedTopRowData?: SmartGridRowData[] | null;
3185
+ pinnedBottomRowData?: SmartGridRowData[] | null;
3186
+ getRowStyle?: (params: SmartGridRowStyleParams) => CSSProperties;
3187
+ tableHeader?: string | ReactNode;
3188
+ topRightOptions?: string | ReactNode;
3189
+ bottomLeftOptions?: string | ReactNode;
3190
+ bottomCenterOptions?: string | ReactNode;
3191
+ bottomRightOptions?: string | ReactNode;
3192
+ topLeftOptions?: string | ReactNode;
3193
+ headerHeight?: number | string;
3194
+ onSelectionChanged?: (event: SmartGridOnSelectionChangedParams) => void;
3195
+ onRowDragStart?: (event: SmartGridRowDragStartParams) => void;
3196
+ onRowDragEnd?: (event: SmartGridRowDragEndParams) => void;
3197
+ onCellValueChanged?: (params: SmartGridCellValueChangedParams) => void;
3198
+ onGridReady?: (params: SmartGridOnReadyParams) => void;
3199
+ onRowGroupOpened?: (params: SmartGridRowGrouOpenParams) => void;
3200
+ fetchData?: (manualbody: any, page: any, context: any, pageNo: any, other: any) => Promise<any>;
3201
+ apiUrl?: string;
3202
+ autoFetch?: boolean;
3203
+ cacheConfig?: {
3204
+ threshold?: number;
3205
+ maxBlocksInCache?: number;
3206
+ cacheOverflowSize?: number;
3207
+ rowHeight?: number;
3208
+ purgeStrategy?: string;
3209
+ enablePersistence?: boolean;
3210
+ persistenceStorageKey?: string;
3211
+ persistenceOptions?: any;
3212
+ force?: boolean;
3213
+ };
3214
+ onScroll?: (event: any) => void;
3215
+ showSaveTableConfig?: boolean;
3216
+ loadTableInstance?: ({ api }: {
3217
+ api: SmartGridAPI;
3218
+ }) => void;
3219
+ adjustTableHeightServerSide?: boolean;
3220
+ largeDatasetOptions?: {
3221
+ enableIndexedDBCache?: boolean;
3222
+ enableStreamingLoad?: boolean;
3223
+ enableEnhancedWorker?: boolean;
3224
+ binaryFormat?: boolean;
3225
+ extremelyLargeDatasetThreshold?: number;
3226
+ };
3227
+ gridOptions?: any;
3228
+ tableId?: string;
3229
+ alignedGrids?: any[];
3230
+ masterDetail?: boolean;
3231
+ detailCellRenderer?: any;
3232
+ detailRowHeight?: number;
3233
+ infiniteScroll?: boolean;
3234
+ customTabFunction?: any;
3235
+ getRowData?: (params: SmartGridGetRowDataParams, columnName: string) => any;
3236
+ rowDragManaged?: boolean;
3237
+ hidePaginationPageSizeSelector?: boolean;
3238
+ purgeClosedRowNodes?: boolean;
3239
+ detailRendererTable?: boolean;
3240
+ smartGridMenuOptions?: {
3241
+ withColumMenu?: boolean;
3242
+ autoWithColumMenu?: boolean;
3243
+ freezeColumnMenu?: boolean;
3244
+ sortColumnMenu?: boolean;
3245
+ collapseColumnAll?: boolean;
3246
+ expandColumnAll?: boolean;
3247
+ wrapText?: boolean;
3248
+ [key: string]: any;
3249
+ };
3250
+ paginateOriginalRowsOnly?: boolean;
3251
+ isSaveViewEnabled?: boolean;
3252
+ isSavingViewLoading?: boolean;
3253
+ maxSavedViews?: number;
3254
+ deleteViewPromptText?: string;
3255
+ savedViewsOptions?: any[];
3256
+ rowHeight?: string;
3257
+ additionalButtons?: string | ReactNode;
3258
+ aboveTableComponent?: string | ReactNode;
3259
+ shouldRenderTable?: boolean;
3260
+ nestedTable?: boolean;
3261
+ nestedTableComponent?: ReactNode | null;
3262
+ enableNestedTableCloseButton?: boolean;
3263
+ downloadAsExcel?: boolean;
3264
+ downloadAsCSV?: boolean;
3265
+ copyToClipboard?: boolean;
3266
+ onCloseNestedTable?: () => void;
3267
+ downloadExcelHandler?: () => void;
3268
+ downloadCSVHandler?: () => void;
3269
+ copyToClipboardHandler?: () => void;
3270
+ ShowFullText?: boolean;
3271
+ hideNotification?: boolean;
3272
+ isSingleSelect?: boolean;
3273
+ defaultPageSize?: number;
3274
+ paginationPageSize?: number[];
3275
+ enableRowSpan?: boolean;
3276
+ rowSpanColumn?: string | string[];
3277
+ showHeader?: boolean;
3278
+ showFooter?: boolean;
3279
+ showToolbar?: boolean;
3280
+ selectable?: boolean;
3281
+ defaultSort?: SmartGridSortModel;
3282
+ actions?: Record<string, any>;
3283
+ pagination?: boolean;
3284
+ showTableSettingActionTab?: boolean;
3285
+ showTableSettingFormatTab?: boolean;
3286
+ showFilters?: boolean;
3287
+ expandable?: boolean;
3288
+ onCellClicked?: () => void;
3289
+ onCellClick?: () => void;
3290
+ onRowClicked?: () => void;
3291
+ onRowClick?: () => void;
3292
+ disableSelectAllRecords?: boolean;
3293
+ columnBufferSize?: number;
3294
+ lazyLoadCellRenderer?: boolean;
3295
+ hasSplitRenderer?: boolean;
3296
+ splitRendererKeys?: string[];
3297
+ removeSelectionOnOperation?: boolean;
3298
+ }
3299
+
3300
+ export declare interface SmartGridTableRef {
3301
+ api: SmartGridAPI;
3302
+ }
3303
+
3304
+ export declare interface SmartGridToggleRenderProps {
3305
+ render: (state: SmartGridToggleRenderState) => ReactNode;
3306
+ }
3307
+
3308
+ export declare interface SmartGridToggleRenderState {
3309
+ isOpen: boolean;
3310
+ setIsOpen: (isOpen: boolean) => void;
3311
+ toggleMenu: () => void;
3312
+ }
3313
+
3314
+ export declare interface SmartGridTooltipButton {
3315
+ label: string;
3316
+ type: "default" | "primary" | "secondary";
3317
+ onClick?: () => void;
3318
+ }
3319
+
3320
+ export declare interface SmartGridTooltipConfig {
3321
+ title?: string;
3322
+ varient?: SmartGridTooltipVariant;
3323
+ orientation?: SmartGridTooltipOrientation;
3324
+ targetRef?: RefObject<HTMLElement>;
3325
+ illustration?: string;
3326
+ icon?: ReactNode | null;
3327
+ bodyText?: string;
3328
+ btns?: SmartGridTooltipButton[] | null;
3329
+ showPaginationAbove?: boolean | null;
3330
+ pagination?: boolean | null;
3331
+ justifyBodyContent?: string | null;
3332
+ }
3333
+
3334
+ export declare type SmartGridTooltipGetterParams = {
3335
+ api: SmartGridAPI;
3336
+ colDef: SmartGridColumnDefinition;
3337
+ column: SmartGridColumnDefinition;
3338
+ data: SmartGridRowData;
3339
+ location: string;
3340
+ node: {
3341
+ data: SmartGridRowData;
3342
+ id: string;
3343
+ level: number;
3344
+ parent: SmartGridUpdateData;
3345
+ rowIndex: number;
3346
+ };
3347
+ rowIndex: number;
3348
+ value: unknown;
3349
+ };
3350
+
3351
+ export declare interface SmartGridTooltipManagerInstance {
3352
+ tooltipElement: HTMLDivElement | null;
3353
+ currentConfig: SmartGridTooltipConfig | null;
3354
+ hideTimeout: ReturnType<typeof setTimeout> | null;
3355
+ initialize: () => void;
3356
+ show: (config: SmartGridTooltipConfig) => void;
3357
+ hide: () => void;
3358
+ updateContent: (config: SmartGridTooltipConfig) => void;
3359
+ getPaginationHTML: (varient?: SmartGridTooltipVariant) => string;
3360
+ calculatePosition: (config: SmartGridTooltipConfig) => void;
3361
+ cleanup: () => void;
3362
+ }
3363
+
3364
+ export declare type SmartGridTooltipOrientation = "top" | "bottom" | "left" | "right";
3365
+
3366
+ export declare interface SmartGridTooltipProps extends SmartGridTooltipConfig {
3367
+ children: ReactNode;
3368
+ forceShowTooltip?: boolean;
3369
+ className?: string;
3370
+ }
3371
+
3372
+ export declare type SmartGridTooltipVariant = "primary" | "secondary" | "tertiary";
3373
+
3374
+ export declare type SmartGridUpdateData = {
3375
+ data: SmartGridRowData;
3376
+ setData: (data: SmartGridRowData) => void;
3377
+ setDataValue: (field: string, value: unknown, callbackNeeded?: boolean) => void;
3378
+ };
3379
+
3380
+ export declare type SmartGridUpdateDataReturnType = {
3381
+ success: boolean;
3382
+ totalRows: number;
3383
+ blocksUpdated: number;
3384
+ errors: string[];
3385
+ };
3386
+
3387
+ /** Page size ref for server-side */
3388
+ declare interface SmartGridUpdatedPageSizeRef {
3389
+ current: number;
3390
+ }
3391
+
3392
+ export declare interface SmartGridUpdateRefParams extends SmartGridCallbackRefCurrent, SmartGridSaveViewCallbackRefCurrent {
3393
+ downloadExcelHandler?: () => void;
3394
+ downloadCSVHandler?: () => void;
3395
+ copyToClipboardHandler?: () => void;
3396
+ maxSavedViews?: number;
3397
+ deleteViewPromptText?: string;
3398
+ onSelectionChanged?: (event: SmartGridOnSelectionChangedParams) => void;
3399
+ onRowDragStart?: (event: SmartGridRowDragStartParams) => void;
3400
+ onRowDragEnd?: (event: SmartGridRowDragEndParams) => void;
3401
+ onRowClicked?: (event: unknown) => void;
3402
+ onCellValueChanged?: (event: SmartGridCellValueChangedParams) => void;
3403
+ onRowGroupOpened?: (event: SmartGridRowGrouOpenParams) => void;
3404
+ customTabFunction?: (e: KeyboardEvent, column: SmartGridColumnDefinition, context: {
3405
+ api: SmartGridAPI | null;
3406
+ }) => void;
3407
+ handlePageChange?: (page: number) => void;
3408
+ handleSortChange?: (sortModel: SmartGridSortModel) => void;
3409
+ handleFilterChange?: (filterModel: SmartGridFilterModel) => void;
3410
+ handleSearch?: (searchValue: SmartGridSearchFunctionParams) => void;
3411
+ }
3412
+
3413
+ export declare interface SmartGridUpdateRefReturn {
3414
+ callBackRef: MutableRefObject<SmartGridCallbackRefCurrent>;
3415
+ exportCallbackRef: MutableRefObject<SmartGridExportCallbackRefCurrent>;
3416
+ saveViewCallbackRef: MutableRefObject<SmartGridSaveViewCallbackRefCurrent>;
3417
+ saveViewOptionsRef: MutableRefObject<SmartGridSaveViewOptionsRefCurrent>;
3418
+ }
3419
+
3420
+ export declare type SmartGridValueFormatterConfig = {
3421
+ type?: string;
3422
+ symbol?: string;
3423
+ position?: "prefix" | "suffix";
3424
+ decimals?: number;
3425
+ };
3426
+
3427
+ export declare interface SmartGridValueFormatterParams {
3428
+ value: unknown;
3429
+ data: SmartGridRowData;
3430
+ colDef: SmartGridColumnDefinition;
3431
+ }
3432
+
3433
+ export declare interface SmartGridValueGetterParams {
3434
+ data: SmartGridRowData;
3435
+ node: {
3436
+ data: SmartGridRowData;
3437
+ };
3438
+ colDef: SmartGridColumnDefinition;
3439
+ column: SmartGridColumnDefinition;
3440
+ api: SmartGridAPI | null;
3441
+ columnApi?: SmartGridAPI;
3442
+ getValue: (field: string) => unknown;
3443
+ }
3444
+
3445
+ /** Viewport range */
3446
+ declare interface SmartGridViewportRange {
3447
+ startRow: number;
3448
+ endRow: number;
3449
+ }
3450
+
3451
+ export declare interface SmartGridVirtualizationParams {
3452
+ dataLength: number;
3453
+ threshold?: number;
3454
+ rowHeight: number;
3455
+ bufferSize?: number;
3456
+ containerRef: RefObject<HTMLElement | null>;
3457
+ scrollContainerRef?: RefObject<HTMLElement | null> | null;
3458
+ currentPageData: SmartGridRowData[];
3459
+ rowHeightCache?: RowHeightCache | null;
3460
+ uniqueIdField?: string;
3461
+ tableApi?: SmartGridAPI | null;
3462
+ }
3463
+
3464
+ export declare interface SmartGridVirtualizationReturn {
3465
+ updatedData: SmartGridRowData[];
3466
+ useVirtualization: boolean;
3467
+ visibleRange: SmartGridVisibleRangeShort;
3468
+ }
3469
+
3470
+ export declare interface SmartGridVisibleColumnRange {
3471
+ startCol: number;
3472
+ endCol: number;
3473
+ }
3474
+
3475
+ export declare interface SmartGridVisibleRange {
3476
+ startRow: number;
3477
+ endRow: number;
3478
+ }
3479
+
3480
+ export declare interface SmartGridVisibleRangeShort {
3481
+ start: number;
3482
+ end: number;
3483
+ }
3484
+
3485
+ export declare interface SmartGridWindowTableState {
3486
+ _targetPage?: number;
3487
+ _forceReload?: boolean;
3488
+ [key: string]: unknown;
3489
+ }
3490
+
3491
+ export declare interface SmartGridWrappedDataSource {
3492
+ _originalDatasource: SmartGridServerSideDataSource;
3493
+ _loadingBlocks: Record<number, boolean>;
3494
+ _pendingRequests: Record<number, {
3495
+ abort?: () => void;
3496
+ }>;
3497
+ _isDestroyed: boolean;
3498
+ _pendingRAFs?: number[];
3499
+ infiniteCache: unknown;
3500
+ updateCacheReference: (newCache: unknown) => void;
3501
+ destroy: () => void;
3502
+ getRows: (params: SmartGridInternalGetRowsParams) => void;
3503
+ }
3504
+
3505
+ export declare type UpdateParentDataParams = {
3506
+ parentData: SmartGridRowData;
3507
+ newData: Partial<SmartGridRowData>;
3508
+ dispatch: SmartGridDispatch;
3509
+ ACTION_TYPES: Record<string, string>;
3510
+ uniqueIdField: string;
3511
+ api?: SmartGridAPI;
3512
+ };
3513
+
3514
+ export { }