tsgrid-ui 2.9.0 → 2.11.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +121 -40
  2. package/dist/chunks/{chunk-GJD5NFWQ.js → chunk-6MOFFUV2.js} +5 -5
  3. package/dist/chunks/{chunk-YBY52G2U.js → chunk-6UCGFWIQ.js} +19 -3
  4. package/dist/chunks/chunk-6UCGFWIQ.js.map +1 -0
  5. package/dist/chunks/{chunk-BIB3X2TW.js → chunk-DZSFZLV6.js} +2 -2
  6. package/dist/chunks/chunk-EQK6JAHT.js +33 -0
  7. package/dist/chunks/chunk-EQK6JAHT.js.map +1 -0
  8. package/dist/chunks/{chunk-OFASTA2A.js → chunk-FAIRNXQR.js} +46 -6
  9. package/dist/chunks/chunk-FAIRNXQR.js.map +1 -0
  10. package/dist/chunks/{chunk-OMLGN735.js → chunk-GZFWK4LZ.js} +2 -2
  11. package/dist/chunks/{chunk-26XP2XU3.js → chunk-KLJ35UAH.js} +2 -2
  12. package/dist/chunks/chunk-KXOFRWPD.js +8801 -0
  13. package/dist/chunks/chunk-KXOFRWPD.js.map +1 -0
  14. package/dist/chunks/{chunk-EVZMMVXO.js → chunk-LUSNRF73.js} +2 -2
  15. package/dist/chunks/{chunk-WKSLGUB3.js → chunk-N3GASHTI.js} +3 -3
  16. package/dist/field.es6.js +3 -2
  17. package/dist/form.es6.js +6 -5
  18. package/dist/grid.d.ts +4 -0
  19. package/dist/grid.es6.js +14 -0
  20. package/dist/grid.es6.js.map +1 -0
  21. package/dist/layout.d.ts +1 -1
  22. package/dist/layout.es6.js +5 -4
  23. package/dist/popup.d.ts +7 -2
  24. package/dist/popup.es6.js +6 -3
  25. package/dist/sidebar.es6.js +3 -2
  26. package/dist/tabs.es6.js +3 -2
  27. package/dist/toolbar.es6.js +3 -2
  28. package/dist/tooltip.d.ts +9 -1
  29. package/dist/tooltip.es6.js +6 -3
  30. package/dist/tsgrid-BEnny8OX.d.ts +575 -0
  31. package/dist/tsgrid-ui.d.ts +3 -577
  32. package/dist/tsgrid-ui.es6.js +14 -8789
  33. package/dist/tsgrid-ui.es6.js.map +1 -1
  34. package/dist/tsgrid-ui.es6.min.js +33 -33
  35. package/dist/tsgrid-ui.js +55 -6
  36. package/dist/tsgrid-ui.min.js +32 -32
  37. package/dist/tsutils-message-BC0wOHZs.d.ts +82 -0
  38. package/dist/utils.d.ts +1 -1
  39. package/package.json +3 -3
  40. package/dist/chunks/chunk-OFASTA2A.js.map +0 -1
  41. package/dist/chunks/chunk-YBY52G2U.js.map +0 -1
  42. package/dist/metafile-esm.json +0 -1
  43. /package/dist/chunks/{chunk-GJD5NFWQ.js.map → chunk-6MOFFUV2.js.map} +0 -0
  44. /package/dist/chunks/{chunk-BIB3X2TW.js.map → chunk-DZSFZLV6.js.map} +0 -0
  45. /package/dist/chunks/{chunk-OMLGN735.js.map → chunk-GZFWK4LZ.js.map} +0 -0
  46. /package/dist/chunks/{chunk-26XP2XU3.js.map → chunk-KLJ35UAH.js.map} +0 -0
  47. /package/dist/chunks/{chunk-EVZMMVXO.js.map → chunk-LUSNRF73.js.map} +0 -0
  48. /package/dist/chunks/{chunk-WKSLGUB3.js.map → chunk-N3GASHTI.js.map} +0 -0
@@ -0,0 +1,575 @@
1
+ import { a as TsMessageProm } from './tsutils-message-BC0wOHZs.js';
2
+ import { TsBase, TsEventPayload } from './base.js';
3
+
4
+ /**
5
+ * Shared branded primitive types for TsUi public API.
6
+ *
7
+ * Branded types prevent accidental cross-assignment of semantically different
8
+ * string/number values (e.g. passing a FieldName where a RecId is expected).
9
+ *
10
+ * Usage:
11
+ * const id: RecId = 'row-1' as RecId
12
+ * const panel: LayoutPanelId = 'left' as LayoutPanelId
13
+ *
14
+ * @module types
15
+ */
16
+ /**
17
+ * A record identifier value — the `recid` field used across TsGrid records.
18
+ * Can be either a string or a number at runtime; branded to prevent mixing
19
+ * generic string/number primitives with record identifiers.
20
+ *
21
+ * @example
22
+ * const recid: RecId = 42 as RecId
23
+ */
24
+ type RecId = Brand<string | number, 'RecId'>;
25
+
26
+ /** A single data record stored in the grid */
27
+ interface TsGridRecord {
28
+ recid: string | number;
29
+ TsUi?: {
30
+ summary?: boolean;
31
+ children?: TsGridRecord[];
32
+ parent_recid?: string | number;
33
+ expanded?: boolean;
34
+ selectable?: boolean;
35
+ styles?: Record<string, string>;
36
+ [key: string]: any;
37
+ };
38
+ [key: string]: any;
39
+ }
40
+ /** Sort descriptor used in grid.sortData */
41
+ interface TsGridSortData {
42
+ field: string;
43
+ direction: 'asc' | 'desc';
44
+ field_?: string;
45
+ [key: string]: any;
46
+ }
47
+ /** Virtual scroll state kept in grid.last.vscroll */
48
+ interface TsGridVScroll {
49
+ scrollTop: number;
50
+ scrollLeft: number;
51
+ recIndStart: number | null;
52
+ recIndEnd: number | null;
53
+ colIndStart: number;
54
+ colIndEnd: number;
55
+ pull_more: boolean;
56
+ pull_refresh: boolean;
57
+ show_extra: number;
58
+ }
59
+ /** Fetch state kept in grid.last.fetch */
60
+ interface TsGridFetch {
61
+ action: string;
62
+ offset?: number | null;
63
+ start: number;
64
+ response: number;
65
+ options: RequestInit | null;
66
+ controller: AbortController | null;
67
+ loaded: boolean;
68
+ hasMore: boolean;
69
+ }
70
+ /** Column definition — T5.2 */
71
+ interface TsGridColumn {
72
+ field: string;
73
+ text: string | ((col: TsGridColumn) => string);
74
+ size?: string | number;
75
+ min?: number;
76
+ max?: number;
77
+ frozen?: boolean;
78
+ hidden?: boolean;
79
+ hideable?: boolean;
80
+ resizable?: boolean;
81
+ sortable?: boolean;
82
+ searchable?: boolean | string;
83
+ sortMode?: string;
84
+ editable?: boolean | {
85
+ type: string;
86
+ [key: string]: any;
87
+ } | ((rec: TsGridRecord, cell: any) => any);
88
+ render?: string | ((record: TsGridRecord, index: number, colIndex: number) => string);
89
+ tooltip?: string;
90
+ style?: string;
91
+ attr?: string;
92
+ clipboardCopy?: boolean | ((record: TsGridRecord, cell: any) => string);
93
+ colspan?: Record<string, number> | ((record: TsGridRecord, index: number) => number);
94
+ sizeCalculated?: string;
95
+ sizeOriginal?: string | number;
96
+ sizeType?: string;
97
+ gridMinWidth?: number;
98
+ [key: string]: any;
99
+ }
100
+ /** Search field definition — T5.2 */
101
+ interface TsGridSearch {
102
+ field: string;
103
+ label?: string;
104
+ caption?: string;
105
+ type: string;
106
+ hidden?: boolean;
107
+ attr?: string;
108
+ text?: string;
109
+ style?: string;
110
+ operator?: string;
111
+ operators?: string[];
112
+ options?: Record<string, any>;
113
+ value?: any;
114
+ svalue?: any;
115
+ [key: string]: any;
116
+ }
117
+ /** Internal last-state object */
118
+ interface TsGridLast {
119
+ field: string;
120
+ label: string;
121
+ logic: 'AND' | 'OR';
122
+ search: string;
123
+ searchIds: number[];
124
+ selection: TsGridSelection;
125
+ saved_sel: any | null;
126
+ multi: boolean;
127
+ fetch: TsGridFetch;
128
+ vscroll: TsGridVScroll;
129
+ sel_ind: number | null;
130
+ sel_col: number | null;
131
+ sel_type: string | null;
132
+ sel_recid: string | number | null;
133
+ idCache: Record<string | number, number>;
134
+ move: any | null;
135
+ cancelClick: boolean | null;
136
+ inEditMode: boolean;
137
+ _edit: {
138
+ value: any;
139
+ index: number;
140
+ column: number;
141
+ recid: string | number;
142
+ [key: string]: any;
143
+ } | null;
144
+ kbd_timer: ReturnType<typeof setTimeout> | null;
145
+ marker_timer: ReturnType<typeof setTimeout> | null;
146
+ click_time: number | null;
147
+ click_recid: string | number | null;
148
+ bubbleEl: HTMLElement | null;
149
+ colResizing: boolean;
150
+ tmp: any | null;
151
+ copy_event: any | null;
152
+ userSelect: string;
153
+ columnDrag: false | {
154
+ remove(): void;
155
+ };
156
+ state: any | null;
157
+ toolbar_height: number;
158
+ groupBy_links: Record<string, TsGridRecord>;
159
+ originalSort?: (string | number)[];
160
+ [key: string]: any;
161
+ }
162
+ /** Cell-level selection descriptor returned by `getSelectionCells()` (and by `getSelection()` when `selectType === 'cell'`). */
163
+ interface TsGridCellSelection {
164
+ recid: string | number;
165
+ index: number;
166
+ column: number;
167
+ }
168
+ /** Selection state — T5.4 */
169
+ interface TsGridSelection {
170
+ indexes: number[];
171
+ columns: Record<string | number, number[]>;
172
+ }
173
+ /** Range endpoint (used in addRange / refreshRanges) */
174
+ interface TsGridRangeEndpoint {
175
+ recid: string | number;
176
+ column: number;
177
+ index?: number;
178
+ }
179
+ /** Range descriptor for addRange / refreshRanges */
180
+ interface TsGridRange {
181
+ name: string;
182
+ range: TsGridRangeEndpoint[];
183
+ style?: string;
184
+ class?: string;
185
+ [key: string]: any;
186
+ }
187
+ /** Active search filter — one entry in grid.searchData — T5.5 */
188
+ interface TsGridSearchFilter {
189
+ field: string;
190
+ type: string;
191
+ operator: string;
192
+ value?: any;
193
+ svalue?: any;
194
+ text?: string;
195
+ [key: string]: any;
196
+ }
197
+ /** GroupBy configuration object */
198
+ interface TsGridGroupBy {
199
+ field: string;
200
+ [key: string]: any;
201
+ }
202
+ declare class TsGrid extends TsBase {
203
+ [key: string]: any;
204
+ name: string;
205
+ box: HTMLElement | null;
206
+ columns: TsGridColumn[];
207
+ columnGroups: any[];
208
+ records: TsGridRecord[];
209
+ summary: TsGridRecord[];
210
+ searches: TsGridSearch[];
211
+ toolbar: any;
212
+ ranges: TsGridRange[];
213
+ contextMenu: any[];
214
+ searchMap: Record<string, string>;
215
+ searchData: TsGridSearchFilter[];
216
+ sortMap: Record<string, string>;
217
+ sortData: TsGridSortData[];
218
+ savedSearches: any[];
219
+ defaultSearches: any[];
220
+ groupBy: TsGridGroupBy | null;
221
+ total: number;
222
+ recid: string | null;
223
+ hierarchyColumn: number;
224
+ last: TsGridLast;
225
+ header: string;
226
+ url: any;
227
+ limit: number;
228
+ offset: number;
229
+ postData: Record<string, any>;
230
+ routeData: Record<string, any>;
231
+ httpHeaders: Record<string, string>;
232
+ show: {
233
+ header: boolean;
234
+ toolbar: boolean;
235
+ footer: boolean;
236
+ columnMenu: boolean;
237
+ columnHeaders: boolean;
238
+ lineNumbers: boolean;
239
+ expandColumn: boolean;
240
+ selectColumn: boolean;
241
+ emptyRecords: boolean;
242
+ toolbarReload: boolean;
243
+ toolbarColumns: boolean;
244
+ toolbarSearch: boolean;
245
+ toolbarAdd: boolean;
246
+ toolbarEdit: boolean;
247
+ toolbarDelete: boolean;
248
+ toolbarSave: boolean;
249
+ searchAll: boolean;
250
+ searchLogic: boolean;
251
+ searchHiddenMsg: boolean;
252
+ searchSave: boolean;
253
+ statusRange: boolean;
254
+ statusBuffered: boolean;
255
+ statusRecordID: boolean;
256
+ statusSelection: boolean;
257
+ statusResponse: boolean;
258
+ statusSort: boolean;
259
+ statusSearch: boolean;
260
+ recordTitles: boolean;
261
+ selectionBorder: boolean;
262
+ selectionResizer: boolean;
263
+ skipRecords: boolean;
264
+ saveRestoreState: boolean;
265
+ columns?: boolean;
266
+ };
267
+ stateId: string | null;
268
+ hasFocus: boolean;
269
+ autoLoad: boolean;
270
+ fixedBody: boolean;
271
+ recordHeight: number;
272
+ lineNumberWidth: number;
273
+ keyboard: boolean;
274
+ selectType: 'row' | 'cell';
275
+ liveSearch: boolean;
276
+ multiSearch: boolean;
277
+ multiSelect: boolean;
278
+ multiSort: boolean;
279
+ reorderColumns: boolean;
280
+ reorderRows: boolean;
281
+ showExtraOnSearch: number;
282
+ markSearch: boolean;
283
+ columnTooltip: string;
284
+ disableCVS: boolean;
285
+ nestedFields: boolean;
286
+ vs_start: number;
287
+ vs_extra: number;
288
+ style: string;
289
+ tabIndex: number | null;
290
+ dataType: string | null;
291
+ parser: ((data: any) => any) | null;
292
+ advanceOnEdit: boolean;
293
+ useLocalStorage: boolean;
294
+ colTemplate: Record<string, any>;
295
+ stateColProps: Record<string, boolean>;
296
+ msgDelete: string;
297
+ msgNotJSON: string;
298
+ msgHTTPError: string;
299
+ msgServerError: string;
300
+ msgRefresh: string;
301
+ msgNeedReload: string;
302
+ msgEmpty: string;
303
+ buttons: Record<string, any>;
304
+ operators: Record<string, any[]>;
305
+ defaultOperator: Record<string, string>;
306
+ operatorsMap: Record<string, string>;
307
+ onAdd: ((event: TsEventPayload) => void) | null;
308
+ onEdit: ((event: TsEventPayload) => void) | null;
309
+ onRequest: ((event: TsEventPayload) => void) | null;
310
+ onLoad: ((event: TsEventPayload) => void) | null;
311
+ onDelete: ((event: TsEventPayload) => void) | null;
312
+ onSave: ((event: TsEventPayload) => void) | null;
313
+ onSelect: ((event: TsEventPayload) => void) | null;
314
+ onClick: ((event: TsEventPayload) => void) | null;
315
+ onDblClick: ((event: TsEventPayload) => void) | null;
316
+ onContextMenu: ((event: TsEventPayload) => void) | null;
317
+ onContextMenuClick: ((event: TsEventPayload) => void) | null;
318
+ onColumnClick: ((event: TsEventPayload) => void) | null;
319
+ onColumnDblClick: ((event: TsEventPayload) => void) | null;
320
+ onColumnContextMenu: ((event: TsEventPayload) => void) | null;
321
+ onColumnResize: ((event: TsEventPayload) => void) | null;
322
+ onColumnAutoResize: ((event: TsEventPayload) => void) | null;
323
+ onSort: ((event: TsEventPayload) => void) | null;
324
+ onSearch: ((event: TsEventPayload) => void) | null;
325
+ onSearchOpen: ((event: TsEventPayload) => void) | null;
326
+ onSearchClose: ((event: TsEventPayload) => void) | null;
327
+ onChange: ((event: TsEventPayload) => void) | null;
328
+ onRestore: ((event: TsEventPayload) => void) | null;
329
+ onExpand: ((event: TsEventPayload) => void) | null;
330
+ onCollapse: ((event: TsEventPayload) => void) | null;
331
+ onError: ((event: TsEventPayload) => void) | null;
332
+ onKeydown: ((event: TsEventPayload) => void) | null;
333
+ onToolbar: ((event: TsEventPayload) => void) | null;
334
+ onColumnOnOff: ((event: TsEventPayload) => void) | null;
335
+ onCopy: ((event: TsEventPayload) => void) | null;
336
+ onPaste: ((event: TsEventPayload) => void) | null;
337
+ onSelectionExtend: ((event: TsEventPayload) => void) | null;
338
+ onEditField: ((event: TsEventPayload) => void) | null;
339
+ onRender: ((event: TsEventPayload) => void) | null;
340
+ onRefresh: ((event: TsEventPayload) => void) | null;
341
+ onReload: ((event: TsEventPayload) => void) | null;
342
+ onResize: ((event: TsEventPayload) => void) | null;
343
+ onDestroy: ((event: TsEventPayload) => void) | null;
344
+ onStateSave: ((event: TsEventPayload) => void) | null;
345
+ onStateRestore: ((event: TsEventPayload) => void) | null;
346
+ onFocus: ((event: TsEventPayload) => void) | null;
347
+ onBlur: ((event: TsEventPayload) => void) | null;
348
+ onReorderRow: ((event: TsEventPayload) => void) | null;
349
+ onSearchSave: ((event: TsEventPayload) => void) | null;
350
+ onSearchRemove: ((event: TsEventPayload) => void) | null;
351
+ onSearchSelect: ((event: TsEventPayload) => void) | null;
352
+ onColumnSelect: ((event: TsEventPayload) => void) | null;
353
+ onColumnDragStart: ((event: TsEventPayload) => void) | null;
354
+ onColumnDragEnd: ((event: TsEventPayload) => void) | null;
355
+ onResizerDblClick: ((event: TsEventPayload) => void) | null;
356
+ onMouseEnter: ((event: TsEventPayload) => void) | null;
357
+ onMouseLeave: ((event: TsEventPayload) => void) | null;
358
+ constructor(options: Record<string, any>);
359
+ add(record: TsGridRecord | TsGridRecord[], first?: boolean): number;
360
+ find(obj?: Record<string, any>, returnIndex?: boolean, displayedOnly?: boolean): (string | number)[];
361
+ set(recid: any, record?: any, noRefresh?: boolean): boolean;
362
+ replace(recid: string | number, record: TsGridRecord, noRefresh?: boolean): boolean;
363
+ get(recid: (string | number)[], returnIndex?: boolean): (TsGridRecord | number)[];
364
+ get(recid: string | number, returnIndex: true): number | null;
365
+ get(recid: string | number, returnIndex?: false): TsGridRecord | null;
366
+ getFirst(offset?: number): TsGridRecord | null;
367
+ remove(...recids: (string | number)[]): number;
368
+ /**
369
+ * If there is a this.groupBy, then process all records with that in mind. It will remember groups in this.last.groupBy_links, that
370
+ * needs to be cleared when record is cleared
371
+ */
372
+ processGroupBy(): void;
373
+ /** Add one or more columns. If `columns` is omitted, `before` is treated as the column(s) to append. */
374
+ addColumn(before: any, columns?: any): number;
375
+ removeColumn(...fields: string[]): number;
376
+ getColumn(): string[];
377
+ getColumn(field: string, returnIndex: true): number | null;
378
+ getColumn(field: string, returnIndex?: false): TsGridColumn | null;
379
+ updateColumn(fields: string | string[], updates: Partial<TsGridColumn> | Record<string, any>): number;
380
+ toggleColumn(...fields: string[]): number;
381
+ showColumn(...fields: string[]): number;
382
+ hideColumn(...fields: string[]): number;
383
+ /** Add one or more search fields. If `search` is omitted, `before` is treated as the search(es) to append. */
384
+ addSearch(before: any, search?: any): number;
385
+ removeSearch(...fields: string[]): any;
386
+ getSearch(): string[];
387
+ getSearch(field: string, returnIndex: true): number | null;
388
+ getSearch(field: string, returnIndex?: false): TsGridSearch | null;
389
+ toggleSearch(...fields: string[]): any;
390
+ showSearch(...fields: string[]): any;
391
+ hideSearch(...fields: string[]): any;
392
+ getSearchData(field: string): Record<string, any> | null;
393
+ localSort(silent?: boolean, noResetRefresh?: boolean): number | undefined;
394
+ localSearch(silent?: boolean): number | undefined;
395
+ getRangeData(range: [{
396
+ recid: string | number;
397
+ column: number;
398
+ }, {
399
+ recid: string | number;
400
+ column: number;
401
+ }], extra?: boolean): any[];
402
+ addRange(rangesInput: TsGridRange | TsGridRange[] | string | Record<string, any>): number;
403
+ removeRange(...names: string[]): number;
404
+ refreshRanges(): number | undefined;
405
+ select(...selectArgs: any[]): any;
406
+ unselect(...unselectArgs: any[]): number;
407
+ compareSelection(newSel: any[]): {
408
+ select: any[];
409
+ unselect: any[];
410
+ };
411
+ selectAll(): number | undefined;
412
+ selectNone(skipEvent?: boolean): number | undefined;
413
+ updateToolbar(sel?: any, _areAllSelected?: boolean): void;
414
+ /**
415
+ * Row-mode selection. Returns the recids of selected records, or their indexes
416
+ * when `returnIndex === true`. Unaffected by `selectType === 'cell'` — callers
417
+ * should branch on `this.selectType` and use `getSelectionCells()` for cell mode.
418
+ */
419
+ getSelectionRows(returnIndex?: boolean): RecId[] | number[];
420
+ /**
421
+ * Cell-mode selection. Returns one descriptor per selected cell. `returnIndex`
422
+ * is intentionally not a parameter — it was ignored in cell mode by the legacy
423
+ * `getSelection()` API.
424
+ */
425
+ getSelectionCells(): TsGridCellSelection[];
426
+ /**
427
+ * Discriminated-union wrapper. The shape depends on `this.selectType`:
428
+ * - `'row'` → `RecId[]` (or `number[]` if `returnIndex === true`)
429
+ * - `'cell'` → `TsGridCellSelection[]` (`returnIndex` is ignored)
430
+ *
431
+ * Prefer the typed split methods (`getSelectionRows` / `getSelectionCells`)
432
+ * when the caller knows the mode statically. This wrapper is kept for back-
433
+ * compat with the v2.0 API and for callers that genuinely handle both modes.
434
+ */
435
+ getSelection(returnIndex?: boolean): RecId[] | number[] | TsGridCellSelection[];
436
+ search(field?: any, value?: any): any;
437
+ searchOpen(options?: any): any;
438
+ searchClose(): void;
439
+ searchFieldTooltip(ind: any, sd_ind: any, el: any): any;
440
+ searchSuggest(imediate?: boolean, forceHide?: boolean, anchor?: HTMLElement | Element): any;
441
+ searchSave(): void;
442
+ cache(type: any): any;
443
+ cacheSave(type: any, value: any): any;
444
+ searchReset(noReload?: boolean): void;
445
+ searchShowFields(forceHide?: boolean): void;
446
+ searchInitInput(field: string, _value?: any): any;
447
+ clear(noRefresh?: boolean): void;
448
+ reset(noRefresh?: boolean): void;
449
+ skip(offset: any, callBack?: any): void;
450
+ load(url: any, callBack?: any): Promise<any>;
451
+ reload(callBack?: (...args: any[]) => void): Promise<any>;
452
+ request(action: string, postData?: Record<string, any>, url?: any, callBack?: (...args: any[]) => void): Promise<any>;
453
+ requestComplete(data: any, action: any, callBack: any, resolve: any, reject: any): Promise<any> | undefined;
454
+ error(msg: any): void;
455
+ getChanges(recordsBase?: TsGridRecord[]): Record<string, any>[];
456
+ mergeChanges(): void;
457
+ save(callBack?: (data: any) => void): void;
458
+ editField(recid: string | number, column: number, value: any, event?: any): any;
459
+ editChange(input?: any, index?: any, column?: any, event?: any): any;
460
+ editDone(index?: any, column?: any, event?: any): any;
461
+ 'delete'(force?: boolean): void;
462
+ click(recid: string | number | {
463
+ recid: string | number;
464
+ column?: number;
465
+ } | any, event?: MouseEvent | any): any;
466
+ columnClick(field: string, event?: MouseEvent | any): void;
467
+ columnDblClick(field: any, event: any): void;
468
+ columnContextMenu(field: any, event: any): void;
469
+ columnAutoSize(colIndex?: number): true | undefined;
470
+ columnAutoSizeAll(): void;
471
+ focus(event?: Event | any): false | undefined;
472
+ blur(event?: Event | any): false | undefined;
473
+ keydown(event: KeyboardEvent | any): void;
474
+ scrollIntoView(ind?: number | null, column?: number, instant?: boolean, recTop?: boolean): void;
475
+ scrollToColumn(field: any): void;
476
+ dblClick(recid: string | number | {
477
+ recid: string | number;
478
+ column?: number;
479
+ } | any, event?: MouseEvent | any): any;
480
+ showContextMenu(event: MouseEvent | any, options: {
481
+ recid?: string | number;
482
+ index?: number;
483
+ column?: number;
484
+ }): void;
485
+ contextMenuClick(recid: string | number, column: number | null, event: any): void;
486
+ toggle(recid: string | number, _event?: Event): boolean | undefined;
487
+ /**
488
+ * When record is expaned, then TsUi.children of the record is copied into this.records and this.total is updated. It will
489
+ * also set TsUi._copeid = true, so it would not copy it again.
490
+ *
491
+ * There is also updateExpaned() that is called in this.refresh()
492
+ */
493
+ expand(recid: any, noRefresh?: any): boolean;
494
+ collapse(recid: any, noRefresh?: any): boolean;
495
+ updateExpanded(): void;
496
+ sort(field?: string, direction?: 'asc' | 'desc' | '' | null, multiField?: boolean): void;
497
+ copy(flag: any, oEvent?: ClipboardEvent | any): any;
498
+ /**
499
+ * Gets value to be copied to the clipboard
500
+ * @param ind index of the record
501
+ * @param col_ind index of the column
502
+ * @returns the displayed value of the field's record associated with the cell
503
+ */
504
+ getCellCopy(ind: any, col_ind: any): unknown;
505
+ paste(text: string, event?: ClipboardEvent | any): void;
506
+ resize(): number | undefined;
507
+ update({ cells, fullCellRefresh, ignoreColumns }?: any): number;
508
+ refreshCell(recid: any, field: any): boolean;
509
+ refreshRow(recid: any, ind?: any): boolean;
510
+ refresh(): number | undefined;
511
+ refreshSearch(): void;
512
+ refreshBody(): void;
513
+ render(box?: HTMLElement | string | null): number | undefined;
514
+ unmount(): void;
515
+ destroy(): void;
516
+ initColumnOnOff(): any[];
517
+ initColumnDrag(_box?: any): {
518
+ remove(): void;
519
+ };
520
+ columnOnOff(event: MouseEvent | any, field: string): void;
521
+ initToolbar(): void;
522
+ initResize(): void;
523
+ resizeBoxes(): void;
524
+ resizeRecords(): void;
525
+ getSearchesHTML(): string;
526
+ getOperators(type: any, opers: any): any;
527
+ initOperator(ind: any): any;
528
+ initSearchLists(changedField?: any): any;
529
+ initSearches(): void;
530
+ getColumnsHTML(): string[];
531
+ getColumnCellHTML(i: any): string;
532
+ columnTooltipShow(ind: any, _event: any): void;
533
+ columnTooltipHide(_ind: any, _event: any): void;
534
+ getRecordsHTML(): string[];
535
+ getSummaryHTML(): string[] | undefined;
536
+ scroll(event?: Event | any): void;
537
+ getRecordHTML(ind: number, lineNum: number, summary?: boolean): string[] | "";
538
+ getLineHTML(lineNum: number): string;
539
+ getCellHTML(ind: number, col_ind: number, summary?: boolean, col_span?: number): any;
540
+ clipboardCopy(ind: any, col_ind: any, summary: any): void;
541
+ showBubble(ind: any, col_ind: any, summary: any): any;
542
+ getCellEditable(ind: number, col_ind: number): any;
543
+ getCellValue(ind: number, col_ind: number, summary?: boolean, extra?: boolean): any;
544
+ getFooterHTML(): string;
545
+ status(msg?: string): void;
546
+ lock(msg?: string, showSpinner?: boolean): void;
547
+ unlock(speed?: number): void;
548
+ stateSave(returnOnly: any): {
549
+ columns: Record<string, any>[];
550
+ show: any;
551
+ last: any;
552
+ sortData: any[];
553
+ searchData: any[];
554
+ } | undefined;
555
+ stateRestore(newState?: any): true | undefined;
556
+ stateReset(): void;
557
+ parseField(obj: TsGridRecord | null | undefined, field: string): any;
558
+ prepareData(): void;
559
+ nextCell(index: number, col_ind: number, editable?: boolean): {
560
+ index: number;
561
+ colIndex: number;
562
+ } | null;
563
+ prevCell(index: number, col_ind: number, editable?: boolean): {
564
+ index: number;
565
+ colIndex: number;
566
+ } | null;
567
+ nextRow(ind: number, col_ind?: number, numRows?: number): number | null;
568
+ prevRow(ind: number, col_ind?: number, numRows?: number): number | null;
569
+ selectionSave(): any;
570
+ selectionRestore(noRefresh?: boolean): number;
571
+ message(options?: any): TsMessageProm | undefined;
572
+ confirm(options: any): TsMessageProm | undefined;
573
+ }
574
+
575
+ export { type RecId as R, TsGrid as T, type TsGridCellSelection as a, type TsGridColumn as b, type TsGridGroupBy as c, type TsGridRange as d, type TsGridRangeEndpoint as e, type TsGridRecord as f, type TsGridSearch as g, type TsGridSelection as h, type TsGridSortData as i };