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