tsgrid-ui 2.10.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.
- package/CHANGELOG.md +37 -0
- package/dist/chunks/chunk-KXOFRWPD.js +8801 -0
- package/dist/chunks/chunk-KXOFRWPD.js.map +1 -0
- package/dist/grid.d.ts +4 -0
- package/dist/grid.es6.js +14 -0
- package/dist/grid.es6.js.map +1 -0
- package/dist/layout.d.ts +1 -1
- package/dist/popup.d.ts +1 -1
- package/dist/tsgrid-BEnny8OX.d.ts +575 -0
- package/dist/tsgrid-ui.d.ts +3 -577
- package/dist/tsgrid-ui.es6.js +5 -8781
- package/dist/tsgrid-ui.es6.js.map +1 -1
- package/dist/tsgrid-ui.js +1 -1
- package/dist/tsgrid-ui.min.js +1 -1
- package/dist/tsutils-message-BC0wOHZs.d.ts +82 -0
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -1
package/dist/grid.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import './tsutils-message-BC0wOHZs.js';
|
|
2
|
+
import './base.js';
|
|
3
|
+
export { 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';
|
|
4
|
+
import './query-CKGg5Ugv.js';
|
package/dist/grid.es6.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TsGrid
|
|
3
|
+
} from "./chunks/chunk-KXOFRWPD.js";
|
|
4
|
+
import "./chunks/chunk-KLJ35UAH.js";
|
|
5
|
+
import "./chunks/chunk-LUSNRF73.js";
|
|
6
|
+
import "./chunks/chunk-FAIRNXQR.js";
|
|
7
|
+
import "./chunks/chunk-EQK6JAHT.js";
|
|
8
|
+
import "./chunks/chunk-3NYH6545.js";
|
|
9
|
+
import "./chunks/chunk-IYF3Q7GX.js";
|
|
10
|
+
import "./chunks/chunk-DXZJHS4M.js";
|
|
11
|
+
export {
|
|
12
|
+
TsGrid
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=grid.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/layout.d.ts
CHANGED
package/dist/popup.d.ts
CHANGED
|
@@ -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 };
|