@deephaven/jsapi-types 1.0.0-dev0.36.1 → 1.0.0-dev0.37.1
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 +1629 -1463
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,21 +17,6 @@ export interface Iterator<T> {
|
|
|
17
17
|
}
|
|
18
18
|
export namespace dh.storage {
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Storage service metadata about files and folders.
|
|
22
|
-
*/
|
|
23
|
-
export class ItemDetails {
|
|
24
|
-
protected constructor();
|
|
25
|
-
|
|
26
|
-
toString():string;
|
|
27
|
-
get filename():string;
|
|
28
|
-
get basename():string;
|
|
29
|
-
get size():number;
|
|
30
|
-
get etag():string;
|
|
31
|
-
get type():ItemTypeType;
|
|
32
|
-
get dirname():string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
20
|
/**
|
|
36
21
|
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
37
22
|
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
@@ -106,6 +91,21 @@ export namespace dh.storage {
|
|
|
106
91
|
createDirectory(path:string):Promise<void>;
|
|
107
92
|
}
|
|
108
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Storage service metadata about files and folders.
|
|
96
|
+
*/
|
|
97
|
+
export class ItemDetails {
|
|
98
|
+
protected constructor();
|
|
99
|
+
|
|
100
|
+
toString():string;
|
|
101
|
+
get filename():string;
|
|
102
|
+
get basename():string;
|
|
103
|
+
get size():number;
|
|
104
|
+
get etag():string;
|
|
105
|
+
get type():ItemTypeType;
|
|
106
|
+
get dirname():string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -117,140 +117,96 @@ export namespace dh.storage {
|
|
|
117
117
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
|
-
export interface
|
|
121
|
-
get name():string|null;
|
|
122
|
-
get children():string[]|null;
|
|
123
|
-
get color():string|null;
|
|
124
|
-
}
|
|
125
|
-
export interface WorkerHeapInfo {
|
|
120
|
+
export interface HasEventHandling {
|
|
126
121
|
/**
|
|
127
|
-
*
|
|
122
|
+
* Listen for events on this object.
|
|
123
|
+
* @param name - the name of the event to listen for
|
|
124
|
+
* @param callback - a function to call when the event occurs
|
|
125
|
+
* @return Returns a cleanup function.
|
|
126
|
+
* @typeParam T - the type of the data that the event will provide
|
|
128
127
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
get(index:LongWrapper|number):Row;
|
|
141
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
142
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
143
|
-
get columns():Array<Column>;
|
|
144
|
-
get rows():Array<Row>;
|
|
145
|
-
}
|
|
146
|
-
export interface LayoutHints {
|
|
147
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
148
|
-
|
|
149
|
-
get hiddenColumns():string[]|null;
|
|
150
|
-
get frozenColumns():string[]|null;
|
|
151
|
-
get columnGroups():ColumnGroup[]|null;
|
|
152
|
-
get areSavedLayoutsAllowed():boolean;
|
|
153
|
-
get frontColumns():string[]|null;
|
|
154
|
-
get backColumns():string[]|null;
|
|
128
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
129
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
130
|
+
hasListeners(name:string):boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Removes an event listener added to this table.
|
|
133
|
+
* @param name -
|
|
134
|
+
* @param callback -
|
|
135
|
+
* @return
|
|
136
|
+
* @typeParam T -
|
|
137
|
+
*/
|
|
138
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
155
139
|
}
|
|
156
140
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* <p>
|
|
160
|
-
* As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
|
|
161
|
-
* server. The setViewport method can be used to adjust this table instead of creating a new one.
|
|
162
|
-
* <p>
|
|
163
|
-
* Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
|
|
164
|
-
* to the underlying handle and accumulated data.
|
|
165
|
-
* <p>
|
|
166
|
-
* As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
|
|
167
|
-
* the idea then that the caller did not actually use this type. This means that for every exported method (which then
|
|
168
|
-
* will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
|
|
169
|
-
* version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
|
|
170
|
-
* deems it no longer in use.
|
|
171
|
-
* <p>
|
|
172
|
-
* Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
|
|
173
|
-
* true), providing a way to stop the server from streaming updates to the client.
|
|
174
|
-
*
|
|
175
|
-
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
176
|
-
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
177
|
-
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
178
|
-
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
179
|
-
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
141
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
142
|
+
* with additional properties to reflect the tree structure.
|
|
180
143
|
*/
|
|
181
|
-
export interface
|
|
144
|
+
export interface TreeRow extends Row {
|
|
145
|
+
get(column:Column):any;
|
|
146
|
+
getFormat(column:Column):Format;
|
|
182
147
|
/**
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* @
|
|
186
|
-
* @param columns -
|
|
187
|
-
* @param updateIntervalMs -
|
|
148
|
+
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
149
|
+
* rows below this one with a greater depth than this one.
|
|
150
|
+
* @return boolean
|
|
188
151
|
*/
|
|
189
|
-
|
|
152
|
+
get isExpanded():boolean;
|
|
190
153
|
/**
|
|
191
|
-
*
|
|
154
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
|
|
155
|
+
* and its expand/collapse icon.
|
|
156
|
+
* @return int
|
|
192
157
|
*/
|
|
193
|
-
|
|
158
|
+
get depth():number;
|
|
194
159
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
160
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when the
|
|
161
|
+
* table updates, depending on the table's configuration.
|
|
162
|
+
* @return boolean
|
|
197
163
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
164
|
+
get hasChildren():boolean;
|
|
165
|
+
get index():LongWrapper;
|
|
200
166
|
}
|
|
201
167
|
/**
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
211
|
-
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
212
|
-
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
|
|
213
|
-
* read specific rows or cells out of the table.
|
|
168
|
+
* Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
|
|
169
|
+
* ViewportData also contains the offset to this data, so that the actual row number may be determined.
|
|
170
|
+
* <p>
|
|
171
|
+
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
172
|
+
* <p>
|
|
173
|
+
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
174
|
+
* scrolling without going to the server.
|
|
214
175
|
*/
|
|
215
|
-
export interface
|
|
216
|
-
get fullIndex():RangeSet;
|
|
176
|
+
export interface ViewportData extends TableData {
|
|
217
177
|
/**
|
|
218
|
-
*
|
|
219
|
-
* @return dh.RangeSet
|
|
178
|
+
* Reads a row object from the viewport, based on its position in the table.
|
|
220
179
|
*/
|
|
221
|
-
get
|
|
180
|
+
get(index:LongWrapper|number):ViewportRow;
|
|
181
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
182
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
222
183
|
/**
|
|
223
|
-
* The
|
|
224
|
-
* @return dh.RangeSet
|
|
184
|
+
* The position of the first returned row, null if this data is not for a viewport.
|
|
225
185
|
*/
|
|
226
|
-
get
|
|
186
|
+
get offset():number;
|
|
227
187
|
get columns():Array<Column>;
|
|
228
|
-
|
|
229
|
-
* The ordered set of row indexes updated since the last update
|
|
230
|
-
* @return dh.RangeSet
|
|
231
|
-
*/
|
|
232
|
-
get modified():RangeSet;
|
|
233
|
-
get rows():Array<Row>;
|
|
188
|
+
get rows():Array<ViewportRow>;
|
|
234
189
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
190
|
+
/**
|
|
191
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
192
|
+
*/
|
|
193
|
+
export interface LocalTimeWrapper {
|
|
194
|
+
valueOf():string;
|
|
195
|
+
getHour():number;
|
|
196
|
+
getMinute():number;
|
|
197
|
+
getSecond():number;
|
|
198
|
+
getNano():number;
|
|
199
|
+
toString():string;
|
|
200
|
+
}
|
|
201
|
+
export interface LayoutHints {
|
|
202
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
203
|
+
|
|
204
|
+
get hiddenColumns():string[]|null;
|
|
205
|
+
get frozenColumns():string[]|null;
|
|
206
|
+
get columnGroups():ColumnGroup[]|null;
|
|
207
|
+
get areSavedLayoutsAllowed():boolean;
|
|
208
|
+
get frontColumns():string[]|null;
|
|
209
|
+
get backColumns():string[]|null;
|
|
254
210
|
}
|
|
255
211
|
/**
|
|
256
212
|
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
@@ -342,56 +298,97 @@ export namespace dh {
|
|
|
342
298
|
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
343
299
|
}
|
|
344
300
|
/**
|
|
345
|
-
*
|
|
346
|
-
*
|
|
301
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
302
|
+
* request the viewport again.
|
|
303
|
+
*/
|
|
304
|
+
export interface ViewportRow extends Row {
|
|
305
|
+
get(column:Column):any;
|
|
306
|
+
getFormat(column:Column):Format;
|
|
307
|
+
get index():LongWrapper;
|
|
308
|
+
}
|
|
309
|
+
export interface TreeViewportData extends TableData {
|
|
310
|
+
get(index:LongWrapper|number):TreeRow;
|
|
311
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
312
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
313
|
+
get treeSize():number;
|
|
314
|
+
get columns():Array<Column>;
|
|
315
|
+
get rows():Array<TreeRow>;
|
|
316
|
+
}
|
|
317
|
+
export interface RefreshToken {
|
|
318
|
+
get bytes():string;
|
|
319
|
+
get expiry():number;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
|
|
323
|
+
* on tables, data in trees, and snapshots.
|
|
324
|
+
* <p>
|
|
325
|
+
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
326
|
+
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
327
|
+
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
347
328
|
*/
|
|
348
|
-
export interface
|
|
329
|
+
export interface TableData {
|
|
349
330
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* @return
|
|
331
|
+
* Reads a row object from the table, from which any subscribed column can be read.
|
|
332
|
+
* @param index - the position or key to access
|
|
333
|
+
* @return the row at the given location
|
|
353
334
|
*/
|
|
354
|
-
get
|
|
335
|
+
get(index:LongWrapper|number):Row;
|
|
355
336
|
/**
|
|
356
|
-
*
|
|
357
|
-
* row
|
|
358
|
-
* @
|
|
337
|
+
* Reads a specific cell from the table, by row key and column.
|
|
338
|
+
* @param index - the row in the table to get data from
|
|
339
|
+
* @param column - the column to read
|
|
340
|
+
* @return the value in the table
|
|
359
341
|
*/
|
|
360
|
-
|
|
342
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
361
343
|
/**
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* @
|
|
344
|
+
* The server-specified Format to use for the cell at the given position.
|
|
345
|
+
* @param index - the row to read
|
|
346
|
+
* @param column - the column to read
|
|
347
|
+
* @return a Format instance with any server-specified details
|
|
365
348
|
*/
|
|
366
|
-
|
|
367
|
-
get
|
|
349
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
350
|
+
get columns():Array<Column>;
|
|
351
|
+
/**
|
|
352
|
+
* A lazily computed array of all rows available on the client.
|
|
353
|
+
*/
|
|
354
|
+
get rows():Array<Row>;
|
|
355
|
+
}
|
|
356
|
+
export interface ColumnGroup {
|
|
357
|
+
get name():string|null;
|
|
358
|
+
get children():string[]|null;
|
|
359
|
+
get color():string|null;
|
|
368
360
|
}
|
|
369
361
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
362
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
363
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
364
|
+
* are correctly freed.
|
|
373
365
|
*/
|
|
374
|
-
export interface
|
|
366
|
+
export interface WidgetExportedObject {
|
|
375
367
|
/**
|
|
376
|
-
*
|
|
377
|
-
*
|
|
368
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
369
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
370
|
+
* {@link Widget.sendMessage}.
|
|
371
|
+
* @return the string type of this server-side object, or null.
|
|
378
372
|
*/
|
|
379
|
-
|
|
373
|
+
readonly type?:string|null;
|
|
374
|
+
|
|
380
375
|
/**
|
|
381
|
-
*
|
|
382
|
-
*
|
|
376
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
377
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
378
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
383
379
|
*/
|
|
384
|
-
|
|
380
|
+
reexport():Promise<WidgetExportedObject>;
|
|
385
381
|
/**
|
|
386
|
-
*
|
|
387
|
-
*
|
|
382
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
383
|
+
* the same instance.
|
|
384
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
388
385
|
*/
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
386
|
+
fetch():Promise<any>;
|
|
387
|
+
/**
|
|
388
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
389
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
390
|
+
*/
|
|
391
|
+
close():void;
|
|
395
392
|
}
|
|
396
393
|
/**
|
|
397
394
|
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
@@ -421,21 +418,13 @@ export namespace dh {
|
|
|
421
418
|
get exportedObjects():WidgetExportedObject[];
|
|
422
419
|
}
|
|
423
420
|
/**
|
|
424
|
-
*
|
|
425
|
-
* the viewport again.
|
|
426
|
-
*/
|
|
427
|
-
export interface ViewportRow extends Row {
|
|
428
|
-
get index():LongWrapper;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
421
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
432
422
|
*/
|
|
433
|
-
export interface
|
|
423
|
+
export interface LocalDateWrapper {
|
|
434
424
|
valueOf():string;
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
getNano():number;
|
|
425
|
+
getYear():number;
|
|
426
|
+
getMonthValue():number;
|
|
427
|
+
getDayOfMonth():number;
|
|
439
428
|
toString():string;
|
|
440
429
|
}
|
|
441
430
|
/**
|
|
@@ -464,8 +453,7 @@ export namespace dh {
|
|
|
464
453
|
readonly numberFormat?:string|null;
|
|
465
454
|
}
|
|
466
455
|
/**
|
|
467
|
-
*
|
|
468
|
-
* table column.
|
|
456
|
+
* Represents statistics for a given table column.
|
|
469
457
|
*/
|
|
470
458
|
export interface ColumnStatistics {
|
|
471
459
|
/**
|
|
@@ -492,42 +480,6 @@ export namespace dh {
|
|
|
492
480
|
get statisticsMap():Map<string, object>;
|
|
493
481
|
}
|
|
494
482
|
/**
|
|
495
|
-
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
496
|
-
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
497
|
-
* are correctly freed.
|
|
498
|
-
*/
|
|
499
|
-
export interface WidgetExportedObject {
|
|
500
|
-
/**
|
|
501
|
-
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
502
|
-
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
503
|
-
* {@link Widget.sendMessage}.
|
|
504
|
-
* @return the string type of this server-side object, or null.
|
|
505
|
-
*/
|
|
506
|
-
readonly type?:string|null;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
510
|
-
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
511
|
-
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
512
|
-
*/
|
|
513
|
-
reexport():Promise<WidgetExportedObject>;
|
|
514
|
-
/**
|
|
515
|
-
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
516
|
-
* the same instance.
|
|
517
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
518
|
-
*/
|
|
519
|
-
fetch():Promise<any>;
|
|
520
|
-
/**
|
|
521
|
-
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
522
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
523
|
-
*/
|
|
524
|
-
close():void;
|
|
525
|
-
}
|
|
526
|
-
export interface RefreshToken {
|
|
527
|
-
get bytes():string;
|
|
528
|
-
get expiry():number;
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
483
|
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
532
484
|
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
533
485
|
*
|
|
@@ -555,13 +507,13 @@ export namespace dh {
|
|
|
555
507
|
* @param columns -
|
|
556
508
|
* @param updateIntervalMs -
|
|
557
509
|
*/
|
|
558
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
|
|
510
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
|
|
559
511
|
/**
|
|
560
512
|
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
561
513
|
* resolve until that data is ready.
|
|
562
514
|
* @return Promise of {@link dh.TableData}
|
|
563
515
|
*/
|
|
564
|
-
getViewportData():Promise<
|
|
516
|
+
getViewportData():Promise<ViewportData>;
|
|
565
517
|
/**
|
|
566
518
|
* a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
|
|
567
519
|
* returned value.
|
|
@@ -579,9 +531,9 @@ export namespace dh {
|
|
|
579
531
|
* Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
|
|
580
532
|
*/
|
|
581
533
|
close():void;
|
|
582
|
-
addEventListener<T>(name:string, callback:(e:
|
|
583
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
584
|
-
nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<
|
|
534
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
535
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
536
|
+
nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<Event<T>>;
|
|
585
537
|
hasListeners(name:string):boolean;
|
|
586
538
|
/**
|
|
587
539
|
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
@@ -656,20 +608,156 @@ export namespace dh {
|
|
|
656
608
|
*/
|
|
657
609
|
get isRefreshing():boolean;
|
|
658
610
|
}
|
|
659
|
-
|
|
660
|
-
|
|
611
|
+
/**
|
|
612
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
613
|
+
* columns) either by index, or scanning the complete present index.
|
|
614
|
+
* <p>
|
|
615
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
616
|
+
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
617
|
+
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
618
|
+
* options should be considered.
|
|
619
|
+
* <p>
|
|
620
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
621
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
622
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
623
|
+
* specific rows or cells out of the table.
|
|
624
|
+
*/
|
|
625
|
+
export interface SubscriptionTableData extends TableData {
|
|
626
|
+
get fullIndex():RangeSet;
|
|
627
|
+
/**
|
|
628
|
+
* The ordered set of row indexes removed since the last update
|
|
629
|
+
* @return the rangeset of removed rows
|
|
630
|
+
*/
|
|
631
|
+
get removed():RangeSet;
|
|
632
|
+
/**
|
|
633
|
+
* The ordered set of row indexes added since the last update.
|
|
634
|
+
* @return the rangeset of rows added
|
|
635
|
+
*/
|
|
636
|
+
get added():RangeSet;
|
|
661
637
|
get columns():Array<Column>;
|
|
662
|
-
|
|
638
|
+
/**
|
|
639
|
+
* The ordered set of row indexes updated since the last update
|
|
640
|
+
* @return the rnageset of modified rows
|
|
641
|
+
*/
|
|
642
|
+
get modified():RangeSet;
|
|
643
|
+
/**
|
|
644
|
+
* A lazily computed array of all rows available on the client.
|
|
645
|
+
*/
|
|
646
|
+
get rows():Array<Row>;
|
|
647
|
+
}
|
|
648
|
+
export interface WorkerHeapInfo {
|
|
649
|
+
/**
|
|
650
|
+
* Total heap size available for this worker.
|
|
651
|
+
*/
|
|
652
|
+
get totalHeapSize():number;
|
|
653
|
+
get freeMemory():number;
|
|
654
|
+
get maximumHeapSize():number;
|
|
663
655
|
}
|
|
664
656
|
/**
|
|
665
|
-
*
|
|
657
|
+
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
658
|
+
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
659
|
+
* event, or re-request the viewport data.
|
|
666
660
|
*/
|
|
667
|
-
export interface
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
661
|
+
export interface Row {
|
|
662
|
+
get(column:Column):any;
|
|
663
|
+
getFormat(column:Column):Format;
|
|
664
|
+
get index():LongWrapper;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
668
|
+
* details about the event.
|
|
669
|
+
* @typeParam T - the type of the event detail
|
|
670
|
+
*/
|
|
671
|
+
export interface Event<T> {
|
|
672
|
+
readonly detail?:null|@jsinterop.annotations.JsNullable T;
|
|
673
|
+
|
|
674
|
+
get type():string;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export class LoginCredentials {
|
|
678
|
+
type?:string|null;
|
|
679
|
+
username?:string|null;
|
|
680
|
+
token?:string|null;
|
|
681
|
+
|
|
682
|
+
constructor();
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
687
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
688
|
+
*
|
|
689
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
690
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
691
|
+
* forward data to it.
|
|
692
|
+
*
|
|
693
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
694
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
695
|
+
* viewports to make it less expensive to compute for large tables.
|
|
696
|
+
*/
|
|
697
|
+
export class TableSubscription implements HasEventHandling {
|
|
698
|
+
protected constructor();
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Updates the subscription to use the given columns and update interval.
|
|
702
|
+
* @param columns - the new columns to subscribe to
|
|
703
|
+
* @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
|
|
704
|
+
*/
|
|
705
|
+
changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
|
|
706
|
+
get columns():Array<Column>;
|
|
707
|
+
/**
|
|
708
|
+
* Stops the subscription on the server.
|
|
709
|
+
*/
|
|
710
|
+
close():void;
|
|
711
|
+
/**
|
|
712
|
+
* Listen for events on this object.
|
|
713
|
+
* @param name - the name of the event to listen for
|
|
714
|
+
* @param callback - a function to call when the event occurs
|
|
715
|
+
* @return Returns a cleanup function.
|
|
716
|
+
* @typeParam T - the type of the data that the event will provide
|
|
717
|
+
*/
|
|
718
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
719
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
720
|
+
hasListeners(name:string):boolean;
|
|
721
|
+
/**
|
|
722
|
+
* Removes an event listener added to this table.
|
|
723
|
+
* @param name -
|
|
724
|
+
* @param callback -
|
|
725
|
+
* @return
|
|
726
|
+
* @typeParam T -
|
|
727
|
+
*/
|
|
728
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
733
|
+
*/
|
|
734
|
+
export class ConnectOptions {
|
|
735
|
+
/**
|
|
736
|
+
* Optional map of http header names and values to send to the server with each request.
|
|
737
|
+
*/
|
|
738
|
+
headers?:{ [key: string]: string; }|null;
|
|
739
|
+
/**
|
|
740
|
+
* True to enable debug logging. At this time, only enables logging for gRPC calls.
|
|
741
|
+
*/
|
|
742
|
+
debug?:boolean|null;
|
|
743
|
+
/**
|
|
744
|
+
* Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
|
|
745
|
+
* of `fetch`. Ignored if {@link dh.transportFactory} is set.
|
|
746
|
+
* <p>
|
|
747
|
+
* Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
|
|
748
|
+
*/
|
|
749
|
+
useWebsockets?:boolean|null;
|
|
750
|
+
/**
|
|
751
|
+
* The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
|
|
752
|
+
* {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
|
|
753
|
+
* <p>
|
|
754
|
+
* Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
|
|
755
|
+
* `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
|
|
756
|
+
* https, it will use fetch, otherwise it will use websockets.
|
|
757
|
+
*/
|
|
758
|
+
transportFactory?:dh.grpc.GrpcTransportFactory|null;
|
|
759
|
+
|
|
760
|
+
constructor();
|
|
673
761
|
}
|
|
674
762
|
|
|
675
763
|
/**
|
|
@@ -696,7 +784,6 @@ export namespace dh {
|
|
|
696
784
|
|
|
697
785
|
protected constructor();
|
|
698
786
|
|
|
699
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
700
787
|
/**
|
|
701
788
|
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
702
789
|
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
@@ -705,7 +792,7 @@ export namespace dh {
|
|
|
705
792
|
getTable(key:object):Promise<Table|undefined|null>;
|
|
706
793
|
/**
|
|
707
794
|
* Open a new table that is the result of merging all constituent tables. See
|
|
708
|
-
* {@link io.deephaven.engine.table.PartitionedTable
|
|
795
|
+
* {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
|
|
709
796
|
* @return A merged representation of the constituent tables.
|
|
710
797
|
*/
|
|
711
798
|
getMergedTable():Promise<Table>;
|
|
@@ -754,8 +841,8 @@ export namespace dh {
|
|
|
754
841
|
* @return Returns a cleanup function.
|
|
755
842
|
* @typeParam T - the type of the data that the event will provide
|
|
756
843
|
*/
|
|
757
|
-
addEventListener<T>(name:string, callback:(e:
|
|
758
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
844
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
845
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
759
846
|
hasListeners(name:string):boolean;
|
|
760
847
|
/**
|
|
761
848
|
* Removes an event listener added to this table.
|
|
@@ -764,193 +851,98 @@ export namespace dh {
|
|
|
764
851
|
* @return
|
|
765
852
|
* @typeParam T -
|
|
766
853
|
*/
|
|
767
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
772
|
-
*/
|
|
773
|
-
export class BigDecimalWrapper {
|
|
774
|
-
protected constructor();
|
|
775
|
-
|
|
776
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
777
|
-
asNumber():number;
|
|
778
|
-
valueOf():string;
|
|
779
|
-
toString():string;
|
|
854
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
780
855
|
}
|
|
781
856
|
|
|
782
857
|
/**
|
|
783
|
-
*
|
|
784
|
-
*
|
|
858
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
859
|
+
* column.
|
|
785
860
|
*/
|
|
786
|
-
export class
|
|
861
|
+
export class Column {
|
|
787
862
|
/**
|
|
788
|
-
*
|
|
863
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
864
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
865
|
+
* @return String
|
|
789
866
|
*/
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
static readonly EVENT_RECONNECT:string;
|
|
793
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
867
|
+
readonly constituentType?:string|null;
|
|
868
|
+
readonly description?:string|null;
|
|
794
869
|
|
|
795
|
-
|
|
796
|
-
* creates a new instance, from which console sessions can be made. <b>options</b> are optional.
|
|
797
|
-
* @param serverUrl - The url used when connecting to the server. Read-only.
|
|
798
|
-
* @param connectOptions - Optional Object
|
|
799
|
-
* @param fromJava - Optional boolean
|
|
800
|
-
* @deprecated
|
|
801
|
-
*/
|
|
802
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
|
|
870
|
+
protected constructor();
|
|
803
871
|
|
|
804
872
|
/**
|
|
805
|
-
*
|
|
873
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
874
|
+
* @param row -
|
|
875
|
+
* @return Any
|
|
806
876
|
*/
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
810
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
877
|
+
get(row:Row):any;
|
|
878
|
+
getFormat(row:Row):Format;
|
|
811
879
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* log messages as are presently available.
|
|
815
|
-
* @param callback -
|
|
816
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
880
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
881
|
+
* @return {@link dh.Sort}
|
|
817
882
|
*/
|
|
818
|
-
|
|
819
|
-
startSession(type:string):Promise<IdeSession>;
|
|
820
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
821
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
883
|
+
sort():Sort;
|
|
822
884
|
/**
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
* @
|
|
826
|
-
* @return Returns a cleanup function.
|
|
827
|
-
* @typeParam T - the type of the data that the event will provide
|
|
885
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
886
|
+
* operation, or as a builder to create a filter operation.
|
|
887
|
+
* @return {@link dh.FilterValue}
|
|
828
888
|
*/
|
|
829
|
-
|
|
830
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
831
|
-
hasListeners(name:string):boolean;
|
|
889
|
+
filter():FilterValue;
|
|
832
890
|
/**
|
|
833
|
-
*
|
|
834
|
-
* @param
|
|
835
|
-
* @
|
|
836
|
-
* @return
|
|
837
|
-
* @typeParam T -
|
|
891
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
892
|
+
* @param expression -
|
|
893
|
+
* @return {@link dh.CustomColumn}
|
|
838
894
|
*/
|
|
839
|
-
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
export class IdeSession implements HasEventHandling {
|
|
843
|
-
static readonly EVENT_COMMANDSTARTED:string;
|
|
844
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
845
|
-
|
|
846
|
-
protected constructor();
|
|
847
|
-
|
|
895
|
+
formatColor(expression:string):CustomColumn;
|
|
848
896
|
/**
|
|
849
|
-
*
|
|
850
|
-
* @param
|
|
851
|
-
* @
|
|
852
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
897
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
898
|
+
* @param expression -
|
|
899
|
+
* @return {@link dh.CustomColumn}
|
|
853
900
|
*/
|
|
854
|
-
|
|
901
|
+
formatNumber(expression:string):CustomColumn;
|
|
855
902
|
/**
|
|
856
|
-
*
|
|
857
|
-
* @param
|
|
858
|
-
* @return
|
|
903
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
904
|
+
* @param expression -
|
|
905
|
+
* @return {@link dh.CustomColumn}
|
|
859
906
|
*/
|
|
860
|
-
|
|
907
|
+
formatDate(expression:string):CustomColumn;
|
|
908
|
+
toString():string;
|
|
861
909
|
/**
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
* @param name -
|
|
865
|
-
* @return {@link Promise} of {@link dh.TreeTable}
|
|
910
|
+
* Label for this column.
|
|
911
|
+
* @return String
|
|
866
912
|
*/
|
|
867
|
-
|
|
868
|
-
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
869
|
-
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
870
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
871
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
913
|
+
get name():string;
|
|
872
914
|
/**
|
|
873
|
-
*
|
|
874
|
-
* @
|
|
875
|
-
* @return
|
|
915
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
916
|
+
* {@link Table.uncoalesced}.
|
|
917
|
+
* @return true if the column is a partition column
|
|
876
918
|
*/
|
|
877
|
-
|
|
878
|
-
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
879
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
880
|
-
close():void;
|
|
881
|
-
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
882
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
883
|
-
openDocument(params:object):void;
|
|
884
|
-
changeDocument(params:object):void;
|
|
885
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
886
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
887
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
888
|
-
closeDocument(params:object):void;
|
|
889
|
-
/**
|
|
890
|
-
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
891
|
-
* values will be null.
|
|
892
|
-
* @param size -
|
|
893
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
894
|
-
*/
|
|
895
|
-
emptyTable(size:number):Promise<Table>;
|
|
919
|
+
get isPartitionColumn():boolean;
|
|
896
920
|
/**
|
|
897
|
-
*
|
|
898
|
-
*
|
|
899
|
-
* @
|
|
900
|
-
* @param startTime -
|
|
901
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
921
|
+
*
|
|
922
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
923
|
+
* @return int
|
|
902
924
|
*/
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
906
|
-
hasListeners(name:string):boolean;
|
|
907
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
912
|
-
*
|
|
913
|
-
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
914
|
-
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
915
|
-
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
916
|
-
*/
|
|
917
|
-
export class TreeTableConfig {
|
|
925
|
+
get index():number;
|
|
926
|
+
get isSortable():boolean;
|
|
918
927
|
/**
|
|
919
|
-
*
|
|
928
|
+
* Type of the row data that can be found in this column.
|
|
929
|
+
* @return String
|
|
920
930
|
*/
|
|
921
|
-
|
|
931
|
+
get type():string;
|
|
922
932
|
/**
|
|
923
|
-
*
|
|
933
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
934
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
935
|
+
* @param expression -
|
|
936
|
+
* @return {@link dh.CustomColumn}
|
|
924
937
|
*/
|
|
925
|
-
|
|
938
|
+
static formatRowColor(expression:string):CustomColumn;
|
|
926
939
|
/**
|
|
927
|
-
*
|
|
940
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
941
|
+
* @param name -
|
|
942
|
+
* @param expression -
|
|
943
|
+
* @return {@link dh.CustomColumn}
|
|
928
944
|
*/
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
constructor();
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
936
|
-
*/
|
|
937
|
-
export class BigIntegerWrapper {
|
|
938
|
-
protected constructor();
|
|
939
|
-
|
|
940
|
-
static ofString(str:string):BigIntegerWrapper;
|
|
941
|
-
asNumber():number;
|
|
942
|
-
valueOf():string;
|
|
943
|
-
toString():string;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* Presently optional and not used by the server, this allows the client to specify some authentication details. String
|
|
948
|
-
* authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
|
|
949
|
-
*/
|
|
950
|
-
export class ConnectOptions {
|
|
951
|
-
headers:{ [key: string]: string; };
|
|
952
|
-
|
|
953
|
-
constructor();
|
|
945
|
+
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
954
946
|
}
|
|
955
947
|
|
|
956
948
|
/**
|
|
@@ -1126,130 +1118,6 @@ export namespace dh {
|
|
|
1126
1118
|
}
|
|
1127
1119
|
|
|
1128
1120
|
|
|
1129
|
-
/**
|
|
1130
|
-
* Event fired when a command is issued from the client.
|
|
1131
|
-
*/
|
|
1132
|
-
export class CommandInfo {
|
|
1133
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1134
|
-
|
|
1135
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
1136
|
-
get code():string;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1141
|
-
* this type TableMap.
|
|
1142
|
-
* @deprecated
|
|
1143
|
-
*/
|
|
1144
|
-
export class TableMap {
|
|
1145
|
-
static readonly EVENT_KEYADDED:string;
|
|
1146
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1147
|
-
static readonly EVENT_RECONNECT:string;
|
|
1148
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1149
|
-
|
|
1150
|
-
protected constructor();
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
export class QueryInfo {
|
|
1154
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
1155
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1156
|
-
static readonly EVENT_RECONNECT:string;
|
|
1157
|
-
static readonly EVENT_CONNECT:string;
|
|
1158
|
-
|
|
1159
|
-
protected constructor();
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1164
|
-
* interpret these responses to see what to render, or how to respond.
|
|
1165
|
-
* <p>
|
|
1166
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1167
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1168
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1169
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1170
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
1171
|
-
* <p>
|
|
1172
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1173
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1174
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1175
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1176
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1177
|
-
* <p>
|
|
1178
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1179
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1180
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1181
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1182
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1183
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1184
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1185
|
-
* <p>
|
|
1186
|
-
* This can suggest several patterns for how plugins operate:
|
|
1187
|
-
* <ul>
|
|
1188
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1189
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1190
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1191
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1192
|
-
* provided to the JS API consumer.</li>
|
|
1193
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1194
|
-
* which provided them. One concrete example of this could have been
|
|
1195
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1196
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1197
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1198
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1199
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1200
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1201
|
-
* an internal table instance.</li>
|
|
1202
|
-
* </ul>
|
|
1203
|
-
*
|
|
1204
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1205
|
-
* <ul>
|
|
1206
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1207
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1208
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1209
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1210
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
1211
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1212
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1213
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1214
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1215
|
-
* </ul>
|
|
1216
|
-
*/
|
|
1217
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1218
|
-
static readonly EVENT_MESSAGE:string;
|
|
1219
|
-
static readonly EVENT_CLOSE:string;
|
|
1220
|
-
|
|
1221
|
-
protected constructor();
|
|
1222
|
-
|
|
1223
|
-
/**
|
|
1224
|
-
* Ends the client connection to the server.
|
|
1225
|
-
*/
|
|
1226
|
-
close():void;
|
|
1227
|
-
getDataAsBase64():string;
|
|
1228
|
-
getDataAsU8():Uint8Array;
|
|
1229
|
-
getDataAsString():string;
|
|
1230
|
-
/**
|
|
1231
|
-
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1232
|
-
* @param msg - string/buffer/view instance that represents data to send
|
|
1233
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
1234
|
-
*/
|
|
1235
|
-
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1236
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1237
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1238
|
-
hasListeners(name:string):boolean;
|
|
1239
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1240
|
-
/**
|
|
1241
|
-
*
|
|
1242
|
-
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1243
|
-
* them when finished using them.
|
|
1244
|
-
*/
|
|
1245
|
-
get exportedObjects():WidgetExportedObject[];
|
|
1246
|
-
/**
|
|
1247
|
-
*
|
|
1248
|
-
* @return the type of this widget
|
|
1249
|
-
*/
|
|
1250
|
-
get type():string;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
1121
|
/**
|
|
1254
1122
|
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1255
1123
|
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
@@ -1295,516 +1163,254 @@ export namespace dh {
|
|
|
1295
1163
|
get direction():string;
|
|
1296
1164
|
}
|
|
1297
1165
|
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
static readonly TYPE_NEW:string;
|
|
1303
|
-
|
|
1166
|
+
/**
|
|
1167
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1168
|
+
*/
|
|
1169
|
+
export class BigIntegerWrapper {
|
|
1304
1170
|
protected constructor();
|
|
1305
1171
|
|
|
1172
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
1173
|
+
asNumber():number;
|
|
1306
1174
|
valueOf():string;
|
|
1307
1175
|
toString():string;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
1180
|
+
* roll-up table.
|
|
1181
|
+
*/
|
|
1182
|
+
export class RollupConfig {
|
|
1308
1183
|
/**
|
|
1309
|
-
*
|
|
1310
|
-
* @return String
|
|
1184
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
1311
1185
|
*/
|
|
1312
|
-
|
|
1186
|
+
groupingColumns:Array<String>;
|
|
1313
1187
|
/**
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1188
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1189
|
+
* roll-up table.
|
|
1316
1190
|
*/
|
|
1317
|
-
|
|
1191
|
+
aggregations:{ [key: string]: Array<string>; };
|
|
1318
1192
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1321
|
-
*
|
|
1322
|
-
*
|
|
1323
|
-
* <li>FORMAT_NUMBER</li>
|
|
1324
|
-
* <li>FORMAT_DATE</li>
|
|
1325
|
-
* <li>NEW</li>
|
|
1326
|
-
* </ul>
|
|
1327
|
-
* @return String
|
|
1193
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
1194
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
1195
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1196
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1328
1197
|
*/
|
|
1329
|
-
|
|
1198
|
+
includeConstituents:boolean;
|
|
1199
|
+
includeOriginalColumns?:boolean|null;
|
|
1200
|
+
/**
|
|
1201
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
1202
|
+
*/
|
|
1203
|
+
includeDescriptions:boolean;
|
|
1204
|
+
|
|
1205
|
+
constructor();
|
|
1330
1206
|
}
|
|
1331
1207
|
|
|
1332
1208
|
/**
|
|
1333
|
-
*
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1209
|
+
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
1210
|
+
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
1211
|
+
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
1212
|
+
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
1213
|
+
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
1336
1214
|
*/
|
|
1337
|
-
export class
|
|
1338
|
-
readonly description?:string|null;
|
|
1339
|
-
readonly pluginName?:string|null;
|
|
1340
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1341
|
-
static readonly EVENT_SIZECHANGED:string;
|
|
1342
|
-
static readonly EVENT_UPDATED:string;
|
|
1343
|
-
static readonly EVENT_ROWADDED:string;
|
|
1344
|
-
static readonly EVENT_ROWREMOVED:string;
|
|
1345
|
-
static readonly EVENT_ROWUPDATED:string;
|
|
1346
|
-
static readonly EVENT_SORTCHANGED:string;
|
|
1347
|
-
static readonly EVENT_FILTERCHANGED:string;
|
|
1348
|
-
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1349
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1350
|
-
static readonly EVENT_RECONNECT:string;
|
|
1351
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1352
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1353
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1354
|
-
static readonly SIZE_UNCOALESCED:number;
|
|
1355
|
-
|
|
1215
|
+
export class TableViewportSubscription implements HasEventHandling {
|
|
1356
1216
|
protected constructor();
|
|
1357
1217
|
|
|
1358
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1359
1218
|
/**
|
|
1360
|
-
*
|
|
1361
|
-
*
|
|
1362
|
-
* @param
|
|
1363
|
-
* @
|
|
1219
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
1220
|
+
* @param firstRow -
|
|
1221
|
+
* @param lastRow -
|
|
1222
|
+
* @param columns -
|
|
1223
|
+
* @param updateIntervalMs -
|
|
1364
1224
|
*/
|
|
1365
|
-
|
|
1225
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
|
|
1366
1226
|
/**
|
|
1367
|
-
*
|
|
1368
|
-
* @param keys -
|
|
1369
|
-
* @return {@link dh.Column} array
|
|
1227
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
1370
1228
|
*/
|
|
1371
|
-
|
|
1372
|
-
isBlinkTable():boolean;
|
|
1229
|
+
close():void;
|
|
1373
1230
|
/**
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1376
|
-
* @return Promise of dh.InputTable
|
|
1231
|
+
* Gets the data currently visible in this viewport
|
|
1232
|
+
* @return Promise of {@link dh.TableData}.
|
|
1377
1233
|
*/
|
|
1378
|
-
|
|
1234
|
+
getViewportData():Promise<ViewportData>;
|
|
1235
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
1379
1236
|
/**
|
|
1380
|
-
*
|
|
1237
|
+
* Listen for events on this object.
|
|
1238
|
+
* @param name - the name of the event to listen for
|
|
1239
|
+
* @param callback - a function to call when the event occurs
|
|
1240
|
+
* @return Returns a cleanup function.
|
|
1241
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1381
1242
|
*/
|
|
1382
|
-
|
|
1383
|
-
|
|
1243
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1244
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1245
|
+
hasListeners(name:string):boolean;
|
|
1384
1246
|
/**
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1387
|
-
* @param
|
|
1388
|
-
* @return
|
|
1247
|
+
* Removes an event listener added to this table.
|
|
1248
|
+
* @param name -
|
|
1249
|
+
* @param callback -
|
|
1250
|
+
* @return
|
|
1251
|
+
* @typeParam T -
|
|
1389
1252
|
*/
|
|
1390
|
-
|
|
1253
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
1258
|
+
*
|
|
1259
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
1260
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
1261
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
1262
|
+
*/
|
|
1263
|
+
export class TreeTableConfig {
|
|
1391
1264
|
/**
|
|
1392
|
-
*
|
|
1393
|
-
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
1394
|
-
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
1395
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1396
|
-
* not.
|
|
1397
|
-
* @param sort -
|
|
1398
|
-
* @return {@link dh.Sort} array
|
|
1265
|
+
* The column representing the unique ID for each item
|
|
1399
1266
|
*/
|
|
1400
|
-
|
|
1267
|
+
idColumn:string;
|
|
1401
1268
|
/**
|
|
1402
|
-
*
|
|
1403
|
-
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
1404
|
-
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
1405
|
-
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
1406
|
-
* will not.
|
|
1407
|
-
* @param filter -
|
|
1408
|
-
* @return {@link dh.FilterCondition} array
|
|
1269
|
+
* The column representing the parent ID for each item
|
|
1409
1270
|
*/
|
|
1410
|
-
|
|
1271
|
+
parentColumn:string;
|
|
1411
1272
|
/**
|
|
1412
|
-
*
|
|
1413
|
-
* @param customColumns -
|
|
1414
|
-
* @return {@link dh.CustomColumn} array
|
|
1273
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
1415
1274
|
*/
|
|
1416
|
-
|
|
1275
|
+
promoteOrphansToRoot:boolean;
|
|
1276
|
+
|
|
1277
|
+
constructor();
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
1282
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
1283
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
1284
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
1285
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
1286
|
+
*
|
|
1287
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
1288
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
1289
|
+
* expected formats.
|
|
1290
|
+
*/
|
|
1291
|
+
export class TotalsTableConfig {
|
|
1417
1292
|
/**
|
|
1418
|
-
*
|
|
1419
|
-
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
1420
|
-
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
1421
|
-
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
1422
|
-
* needed.
|
|
1423
|
-
* @param firstRow -
|
|
1424
|
-
* @param lastRow -
|
|
1425
|
-
* @param columns -
|
|
1426
|
-
* @param updateIntervalMs -
|
|
1427
|
-
* @return {@link dh.TableViewportSubscription}
|
|
1293
|
+
* @deprecated
|
|
1428
1294
|
*/
|
|
1429
|
-
|
|
1295
|
+
static readonly COUNT:string;
|
|
1430
1296
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
1433
|
-
* separate the lifespan of this promise from the table itself, call
|
|
1434
|
-
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1435
|
-
* @return Promise of {@link dh.TableData}
|
|
1297
|
+
* @deprecated
|
|
1436
1298
|
*/
|
|
1437
|
-
|
|
1299
|
+
static readonly MIN:string;
|
|
1438
1300
|
/**
|
|
1439
|
-
*
|
|
1440
|
-
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
1441
|
-
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
1442
|
-
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1443
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1444
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1445
|
-
* @param columns -
|
|
1446
|
-
* @param updateIntervalMs -
|
|
1447
|
-
* @return {@link dh.TableSubscription}
|
|
1301
|
+
* @deprecated
|
|
1448
1302
|
*/
|
|
1449
|
-
|
|
1303
|
+
static readonly MAX:string;
|
|
1450
1304
|
/**
|
|
1451
|
-
*
|
|
1452
|
-
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
1453
|
-
* order of appearance of values from the original table.
|
|
1454
|
-
* @param columns -
|
|
1455
|
-
* @return Promise of dh.Table
|
|
1305
|
+
* @deprecated
|
|
1456
1306
|
*/
|
|
1457
|
-
|
|
1307
|
+
static readonly SUM:string;
|
|
1458
1308
|
/**
|
|
1459
|
-
*
|
|
1460
|
-
* @return Promise of dh.Table
|
|
1309
|
+
* @deprecated
|
|
1461
1310
|
*/
|
|
1462
|
-
|
|
1311
|
+
static readonly ABS_SUM:string;
|
|
1463
1312
|
/**
|
|
1464
|
-
*
|
|
1465
|
-
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
1466
|
-
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1467
|
-
* called on it when not in use.
|
|
1468
|
-
* @param config -
|
|
1469
|
-
* @return Promise of dh.TotalsTable
|
|
1313
|
+
* @deprecated
|
|
1470
1314
|
*/
|
|
1471
|
-
|
|
1315
|
+
static readonly VAR:string;
|
|
1472
1316
|
/**
|
|
1473
|
-
*
|
|
1474
|
-
* above for more specifics.
|
|
1475
|
-
* @param config -
|
|
1476
|
-
* @return promise of dh.TotalsTable
|
|
1317
|
+
* @deprecated
|
|
1477
1318
|
*/
|
|
1478
|
-
|
|
1319
|
+
static readonly AVG:string;
|
|
1479
1320
|
/**
|
|
1480
|
-
*
|
|
1481
|
-
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
1482
|
-
* @param configObject -
|
|
1483
|
-
* @return Promise of dh.TreeTable
|
|
1321
|
+
* @deprecated
|
|
1484
1322
|
*/
|
|
1485
|
-
|
|
1323
|
+
static readonly STD:string;
|
|
1486
1324
|
/**
|
|
1487
|
-
*
|
|
1488
|
-
* new `TreeTable` which must have close() called on it when not in use.
|
|
1489
|
-
* @param configObject -
|
|
1490
|
-
* @return Promise dh.TreeTable
|
|
1325
|
+
* @deprecated
|
|
1491
1326
|
*/
|
|
1492
|
-
|
|
1327
|
+
static readonly FIRST:string;
|
|
1493
1328
|
/**
|
|
1494
|
-
*
|
|
1495
|
-
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1496
|
-
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1497
|
-
* @return Promise of dh.Table
|
|
1329
|
+
* @deprecated
|
|
1498
1330
|
*/
|
|
1499
|
-
|
|
1500
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1331
|
+
static readonly LAST:string;
|
|
1501
1332
|
/**
|
|
1502
|
-
*
|
|
1503
|
-
* @inheritDoc
|
|
1504
1333
|
* @deprecated
|
|
1505
1334
|
*/
|
|
1506
|
-
|
|
1507
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1508
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1509
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1510
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1511
|
-
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1335
|
+
static readonly SKIP:string;
|
|
1512
1336
|
/**
|
|
1513
|
-
*
|
|
1514
|
-
* keys.
|
|
1515
|
-
* @param keys -
|
|
1516
|
-
* @param dropKeys -
|
|
1517
|
-
* @return Promise dh.PartitionedTable
|
|
1337
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
1518
1338
|
*/
|
|
1519
|
-
|
|
1339
|
+
showTotalsByDefault:boolean;
|
|
1520
1340
|
/**
|
|
1521
|
-
* a
|
|
1522
|
-
* @param column -
|
|
1523
|
-
* @return Promise of dh.ColumnStatistics
|
|
1341
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
1524
1342
|
*/
|
|
1525
|
-
|
|
1343
|
+
showGrandTotalsByDefault:boolean;
|
|
1526
1344
|
/**
|
|
1527
|
-
*
|
|
1528
|
-
* @param startingRow - Row to start the seek from
|
|
1529
|
-
* @param column - Column to seek for value on
|
|
1530
|
-
* @param valueType - Type of value provided
|
|
1531
|
-
* @param seekValue - Value to seek
|
|
1532
|
-
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1533
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1534
|
-
* `false`.
|
|
1535
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1536
|
-
* @return A promise that resolves to the row value found.
|
|
1345
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
1537
1346
|
*/
|
|
1538
|
-
|
|
1539
|
-
toString():string;
|
|
1347
|
+
defaultOperation:AggregationOperationType;
|
|
1540
1348
|
/**
|
|
1541
|
-
*
|
|
1542
|
-
* .
|
|
1543
|
-
* @return boolean
|
|
1349
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
1350
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
1544
1351
|
*/
|
|
1545
|
-
|
|
1352
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
1546
1353
|
/**
|
|
1547
|
-
*
|
|
1548
|
-
*
|
|
1549
|
-
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
1550
|
-
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1551
|
-
* @return {@link dh.Column} array
|
|
1354
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
1355
|
+
* these columns. See also `Table.selectDistinct`.
|
|
1552
1356
|
*/
|
|
1553
|
-
|
|
1554
|
-
/**
|
|
1555
|
-
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
1556
|
-
* @return dh.TotalsTableConfig
|
|
1557
|
-
*/
|
|
1558
|
-
get totalsTableConfig():TotalsTableConfig;
|
|
1559
|
-
/**
|
|
1560
|
-
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
1561
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1562
|
-
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
1563
|
-
* @return {@link dh.Sort} array
|
|
1564
|
-
*/
|
|
1565
|
-
get sort():Array<Sort>;
|
|
1566
|
-
/**
|
|
1567
|
-
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
1568
|
-
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
1569
|
-
* @return {@link dh.CustomColumn} array
|
|
1570
|
-
*/
|
|
1571
|
-
get customColumns():Array<CustomColumn>;
|
|
1572
|
-
/**
|
|
1573
|
-
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1574
|
-
* initial snapshot.
|
|
1575
|
-
* @return boolean
|
|
1576
|
-
*/
|
|
1577
|
-
get isRefreshing():boolean;
|
|
1578
|
-
/**
|
|
1579
|
-
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
1580
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1581
|
-
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
1582
|
-
* @return {@link dh.FilterCondition} array
|
|
1583
|
-
*/
|
|
1584
|
-
get filter():Array<FilterCondition>;
|
|
1585
|
-
/**
|
|
1586
|
-
* The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
|
|
1587
|
-
* not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
|
|
1588
|
-
* applySort(). Note that this getter will return the new value immediately, even though it may take a little time
|
|
1589
|
-
* to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
|
|
1590
|
-
* @return double
|
|
1591
|
-
*/
|
|
1592
|
-
get totalSize():number;
|
|
1593
|
-
/**
|
|
1594
|
-
* The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
|
|
1595
|
-
* Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
|
|
1596
|
-
* property). for details).
|
|
1597
|
-
* @return double
|
|
1598
|
-
*/
|
|
1599
|
-
get size():number;
|
|
1600
|
-
/**
|
|
1601
|
-
* True if this table has been closed.
|
|
1602
|
-
* @return boolean
|
|
1603
|
-
*/
|
|
1604
|
-
get isClosed():boolean;
|
|
1605
|
-
/**
|
|
1606
|
-
* Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
|
|
1607
|
-
* table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
|
|
1608
|
-
* will be unavailable until table is coalesced.
|
|
1609
|
-
* @return boolean
|
|
1610
|
-
*/
|
|
1611
|
-
get isUncoalesced():boolean;
|
|
1612
|
-
/**
|
|
1613
|
-
* Listen for events on this object.
|
|
1614
|
-
* @param name - the name of the event to listen for
|
|
1615
|
-
* @param callback - a function to call when the event occurs
|
|
1616
|
-
* @return Returns a cleanup function.
|
|
1617
|
-
* @typeParam T - the type of the data that the event will provide
|
|
1618
|
-
*/
|
|
1619
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1620
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1621
|
-
hasListeners(name:string):boolean;
|
|
1622
|
-
/**
|
|
1623
|
-
* Removes an event listener added to this table.
|
|
1624
|
-
* @param name -
|
|
1625
|
-
* @param callback -
|
|
1626
|
-
* @return
|
|
1627
|
-
* @typeParam T -
|
|
1628
|
-
*/
|
|
1629
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1630
|
-
/**
|
|
1631
|
-
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
1632
|
-
* do not support reverse.
|
|
1633
|
-
* @return {@link dh.Sort}
|
|
1634
|
-
*/
|
|
1635
|
-
static reverse():Sort;
|
|
1636
|
-
}
|
|
1357
|
+
groupBy:Array<string>;
|
|
1637
1358
|
|
|
1638
|
-
export class Ide {
|
|
1639
1359
|
constructor();
|
|
1640
1360
|
|
|
1641
|
-
|
|
1642
|
-
* @deprecated
|
|
1643
|
-
*/
|
|
1644
|
-
getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1645
|
-
/**
|
|
1646
|
-
* @deprecated
|
|
1647
|
-
*/
|
|
1648
|
-
static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1361
|
+
toString():string;
|
|
1649
1362
|
}
|
|
1650
1363
|
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1364
|
+
/**
|
|
1365
|
+
* Deprecated for use in Deephaven Core.
|
|
1366
|
+
* @deprecated
|
|
1367
|
+
*/
|
|
1368
|
+
export class Client {
|
|
1657
1369
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
1658
1370
|
static readonly EVENT_REQUEST_STARTED:string;
|
|
1659
1371
|
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1660
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1661
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1662
|
-
|
|
1663
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1664
1372
|
|
|
1665
|
-
|
|
1666
|
-
getServerUrl():string;
|
|
1667
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
1668
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
1669
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
1670
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1671
|
-
getServerConfigValues():Promise<string[][]>;
|
|
1672
|
-
getStorageService():dh.storage.StorageService;
|
|
1673
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
1674
|
-
disconnect():void;
|
|
1675
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1676
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1677
|
-
hasListeners(name:string):boolean;
|
|
1678
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1373
|
+
constructor();
|
|
1679
1374
|
}
|
|
1680
1375
|
|
|
1681
1376
|
/**
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1377
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1378
|
+
* this type TableMap.
|
|
1379
|
+
* @deprecated
|
|
1684
1380
|
*/
|
|
1685
|
-
export class
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
*/
|
|
1691
|
-
readonly constituentType?:string|null;
|
|
1692
|
-
readonly description?:string|null;
|
|
1381
|
+
export class TableMap {
|
|
1382
|
+
static readonly EVENT_KEYADDED:string;
|
|
1383
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1384
|
+
static readonly EVENT_RECONNECT:string;
|
|
1385
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1693
1386
|
|
|
1694
1387
|
protected constructor();
|
|
1695
|
-
|
|
1696
|
-
/**
|
|
1697
|
-
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1698
|
-
* @param row -
|
|
1699
|
-
* @return Any
|
|
1700
|
-
*/
|
|
1701
|
-
get(row:Row):any;
|
|
1702
|
-
getFormat(row:Row):Format;
|
|
1703
|
-
/**
|
|
1704
|
-
* Creates a sort builder object, to be used when sorting by this column.
|
|
1705
|
-
* @return {@link dh.Sort}
|
|
1706
|
-
*/
|
|
1707
|
-
sort():Sort;
|
|
1708
|
-
/**
|
|
1709
|
-
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1710
|
-
* operation, or as a builder to create a filter operation.
|
|
1711
|
-
* @return {@link dh.FilterValue}
|
|
1712
|
-
*/
|
|
1713
|
-
filter():FilterValue;
|
|
1714
|
-
/**
|
|
1715
|
-
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1716
|
-
* @param expression -
|
|
1717
|
-
* @return {@link dh.CustomColumn}
|
|
1718
|
-
*/
|
|
1719
|
-
formatColor(expression:string):CustomColumn;
|
|
1720
|
-
/**
|
|
1721
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1722
|
-
* @param expression -
|
|
1723
|
-
* @return {@link dh.CustomColumn}
|
|
1724
|
-
*/
|
|
1725
|
-
formatNumber(expression:string):CustomColumn;
|
|
1726
|
-
/**
|
|
1727
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1728
|
-
* @param expression -
|
|
1729
|
-
* @return {@link dh.CustomColumn}
|
|
1730
|
-
*/
|
|
1731
|
-
formatDate(expression:string):CustomColumn;
|
|
1732
|
-
toString():string;
|
|
1733
|
-
/**
|
|
1734
|
-
* Label for this column.
|
|
1735
|
-
* @return String
|
|
1736
|
-
*/
|
|
1737
|
-
get name():string;
|
|
1738
|
-
/**
|
|
1739
|
-
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
|
|
1740
|
-
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
1741
|
-
* @return boolean
|
|
1742
|
-
*/
|
|
1743
|
-
get isPartitionColumn():boolean;
|
|
1744
|
-
/**
|
|
1745
|
-
*
|
|
1746
|
-
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1747
|
-
* @return int
|
|
1748
|
-
*/
|
|
1749
|
-
get index():number;
|
|
1750
|
-
get isSortable():boolean;
|
|
1751
|
-
/**
|
|
1752
|
-
* Type of the row data that can be found in this column.
|
|
1753
|
-
* @return String
|
|
1754
|
-
*/
|
|
1755
|
-
get type():string;
|
|
1756
|
-
/**
|
|
1757
|
-
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
1758
|
-
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1759
|
-
* @param expression -
|
|
1760
|
-
* @return {@link dh.CustomColumn}
|
|
1761
|
-
*/
|
|
1762
|
-
static formatRowColor(expression:string):CustomColumn;
|
|
1763
|
-
/**
|
|
1764
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1765
|
-
* @param name -
|
|
1766
|
-
* @param expression -
|
|
1767
|
-
* @return {@link dh.CustomColumn}
|
|
1768
|
-
*/
|
|
1769
|
-
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
export class LoginCredentials {
|
|
1773
|
-
type?:string|null;
|
|
1774
|
-
username?:string|null;
|
|
1775
|
-
token?:string|null;
|
|
1776
|
-
|
|
1777
|
-
constructor();
|
|
1778
1388
|
}
|
|
1779
1389
|
|
|
1780
1390
|
/**
|
|
1781
|
-
*
|
|
1782
|
-
*
|
|
1391
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1392
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1393
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1783
1394
|
*/
|
|
1784
|
-
export class
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
* roll-up table.
|
|
1792
|
-
*/
|
|
1793
|
-
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
1395
|
+
export class RangeSet {
|
|
1396
|
+
protected constructor();
|
|
1397
|
+
|
|
1398
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
1399
|
+
static ofItems(rows:number[]):RangeSet;
|
|
1400
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
1401
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
1794
1402
|
/**
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1797
|
-
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1798
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1403
|
+
* a new iterator over all indexes in this collection.
|
|
1404
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
1799
1405
|
*/
|
|
1800
|
-
|
|
1801
|
-
includeOriginalColumns?:boolean|null;
|
|
1406
|
+
iterator():Iterator<LongWrapper>;
|
|
1802
1407
|
/**
|
|
1803
|
-
*
|
|
1408
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
1409
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
1410
|
+
* property each time through a loop).
|
|
1411
|
+
* @return double
|
|
1804
1412
|
*/
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
constructor();
|
|
1413
|
+
get size():number;
|
|
1808
1414
|
}
|
|
1809
1415
|
|
|
1810
1416
|
/**
|
|
@@ -1844,7 +1450,7 @@ export namespace dh {
|
|
|
1844
1450
|
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1845
1451
|
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1846
1452
|
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1847
|
-
* where {@link
|
|
1453
|
+
* where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
|
|
1848
1454
|
* </ul>
|
|
1849
1455
|
*/
|
|
1850
1456
|
export class TreeTable implements HasEventHandling {
|
|
@@ -1892,18 +1498,18 @@ export namespace dh {
|
|
|
1892
1498
|
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1893
1499
|
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1894
1500
|
* is true, then its children will also be expanded.
|
|
1895
|
-
* @param row -
|
|
1896
|
-
* @param isExpanded -
|
|
1897
|
-
* @param expandDescendants -
|
|
1501
|
+
* @param row - the row to expand or collapse, either the absolute row index or the row object
|
|
1502
|
+
* @param isExpanded - true to expand the row, false to collapse
|
|
1503
|
+
* @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
|
|
1504
|
+
* false
|
|
1898
1505
|
*/
|
|
1899
1506
|
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1900
1507
|
expandAll():void;
|
|
1901
1508
|
collapseAll():void;
|
|
1902
1509
|
/**
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
* @
|
|
1906
|
-
* @return boolean
|
|
1510
|
+
* Tests if the specified row is expanded.
|
|
1511
|
+
* @param row - the row to test, either the absolute row index or the row object
|
|
1512
|
+
* @return boolean true if the row is expanded, false otherwise
|
|
1907
1513
|
*/
|
|
1908
1514
|
isExpanded(row:TreeRow|number):boolean;
|
|
1909
1515
|
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
@@ -1912,7 +1518,6 @@ export namespace dh {
|
|
|
1912
1518
|
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1913
1519
|
*/
|
|
1914
1520
|
close():void;
|
|
1915
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
1916
1521
|
/**
|
|
1917
1522
|
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1918
1523
|
* @param sort -
|
|
@@ -2008,8 +1613,8 @@ export namespace dh {
|
|
|
2008
1613
|
* @return Returns a cleanup function.
|
|
2009
1614
|
* @typeParam T - the type of the data that the event will provide
|
|
2010
1615
|
*/
|
|
2011
|
-
addEventListener<T>(name:string, callback:(e:
|
|
2012
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
1616
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1617
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2013
1618
|
hasListeners(name:string):boolean;
|
|
2014
1619
|
/**
|
|
2015
1620
|
* Removes an event listener added to this table.
|
|
@@ -2018,54 +1623,180 @@ export namespace dh {
|
|
|
2018
1623
|
* @return
|
|
2019
1624
|
* @typeParam T -
|
|
2020
1625
|
*/
|
|
2021
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
1626
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2022
1627
|
}
|
|
2023
1628
|
|
|
2024
1629
|
/**
|
|
2025
|
-
*
|
|
2026
|
-
*
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
1630
|
+
* A js type for operating on input tables.
|
|
1631
|
+
*
|
|
1632
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
1633
|
+
*
|
|
1634
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
1635
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
1636
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
1637
|
+
* before sending the next operation.
|
|
1638
|
+
*
|
|
1639
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
1640
|
+
*
|
|
1641
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
1642
|
+
* object.
|
|
1643
|
+
*/
|
|
1644
|
+
export class InputTable {
|
|
2037
1645
|
protected constructor();
|
|
2038
1646
|
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1647
|
+
/**
|
|
1648
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
1649
|
+
* property at that name and validate it can be put into the given column type.
|
|
1650
|
+
* @param row -
|
|
1651
|
+
* @param userTimeZone -
|
|
1652
|
+
* @return Promise of dh.InputTable
|
|
1653
|
+
*/
|
|
1654
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
1655
|
+
/**
|
|
1656
|
+
* Add multiple rows to a table.
|
|
1657
|
+
* @param rows -
|
|
1658
|
+
* @param userTimeZone -
|
|
1659
|
+
* @return Promise of dh.InputTable
|
|
1660
|
+
*/
|
|
1661
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
1662
|
+
/**
|
|
1663
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
1664
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
1665
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
1666
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
1667
|
+
* @param tableToAdd -
|
|
1668
|
+
* @return Promise of dh.InputTable
|
|
1669
|
+
*/
|
|
1670
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Add multiple tables to this Input Table.
|
|
1673
|
+
* @param tablesToAdd -
|
|
1674
|
+
* @return Promise of dh.InputTable
|
|
1675
|
+
*/
|
|
1676
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
1679
|
+
* @param tableToDelete -
|
|
1680
|
+
* @return Promise of dh.InputTable
|
|
1681
|
+
*/
|
|
1682
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
1683
|
+
/**
|
|
1684
|
+
* Delete multiple tables from this Input Table.
|
|
1685
|
+
* @param tablesToDelete -
|
|
1686
|
+
* @return
|
|
1687
|
+
*/
|
|
1688
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
1689
|
+
/**
|
|
1690
|
+
* A list of the key columns, by name
|
|
1691
|
+
* @return String array.
|
|
1692
|
+
*/
|
|
1693
|
+
get keys():string[];
|
|
1694
|
+
/**
|
|
1695
|
+
* A list of the value columns, by name
|
|
1696
|
+
* @return String array.
|
|
1697
|
+
*/
|
|
1698
|
+
get values():string[];
|
|
1699
|
+
/**
|
|
1700
|
+
* A list of the key columns.
|
|
1701
|
+
* @return Column array.
|
|
1702
|
+
*/
|
|
1703
|
+
get keyColumns():Column[];
|
|
1704
|
+
/**
|
|
1705
|
+
* A list of the value Column objects
|
|
1706
|
+
* @return {@link dh.Column} array.
|
|
1707
|
+
*/
|
|
1708
|
+
get valueColumns():Column[];
|
|
1709
|
+
/**
|
|
1710
|
+
* The source table for this Input Table
|
|
1711
|
+
* @return dh.table
|
|
1712
|
+
*/
|
|
1713
|
+
get table():Table;
|
|
2043
1714
|
}
|
|
2044
1715
|
|
|
2045
1716
|
/**
|
|
2046
|
-
*
|
|
2047
|
-
*
|
|
2048
|
-
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1717
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
1718
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
2049
1719
|
*/
|
|
2050
|
-
export class
|
|
1720
|
+
export class IdeConnection implements HasEventHandling {
|
|
1721
|
+
/**
|
|
1722
|
+
* @deprecated
|
|
1723
|
+
*/
|
|
1724
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
1725
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1726
|
+
static readonly EVENT_RECONNECT:string;
|
|
1727
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
1728
|
+
|
|
2051
1729
|
protected constructor();
|
|
2052
1730
|
|
|
2053
|
-
static ofRange(first:number, last:number):RangeSet;
|
|
2054
|
-
static ofItems(rows:number[]):RangeSet;
|
|
2055
|
-
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
2056
|
-
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
2057
1731
|
/**
|
|
2058
|
-
*
|
|
2059
|
-
* @return Iterator of {@link dh.LongWrapper}
|
|
1732
|
+
* Closes the current connection, releasing any resources on the server or client.
|
|
2060
1733
|
*/
|
|
2061
|
-
|
|
1734
|
+
close():void;
|
|
1735
|
+
running():Promise<IdeConnection>;
|
|
1736
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1737
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2062
1738
|
/**
|
|
2063
|
-
*
|
|
2064
|
-
*
|
|
2065
|
-
*
|
|
2066
|
-
* @
|
|
1739
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
1740
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1741
|
+
* log messages as are presently available.
|
|
1742
|
+
* @param callback -
|
|
1743
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
2067
1744
|
*/
|
|
2068
|
-
|
|
1745
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1746
|
+
startSession(type:string):Promise<IdeSession>;
|
|
1747
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
1748
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1749
|
+
/**
|
|
1750
|
+
* Listen for events on this object.
|
|
1751
|
+
* @param name - the name of the event to listen for
|
|
1752
|
+
* @param callback - a function to call when the event occurs
|
|
1753
|
+
* @return Returns a cleanup function.
|
|
1754
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1755
|
+
*/
|
|
1756
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1757
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1758
|
+
hasListeners(name:string):boolean;
|
|
1759
|
+
/**
|
|
1760
|
+
* Removes an event listener added to this table.
|
|
1761
|
+
* @param name -
|
|
1762
|
+
* @param callback -
|
|
1763
|
+
* @return
|
|
1764
|
+
* @typeParam T -
|
|
1765
|
+
*/
|
|
1766
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
export class CoreClient implements HasEventHandling {
|
|
1770
|
+
static readonly EVENT_CONNECT:string;
|
|
1771
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1772
|
+
static readonly EVENT_RECONNECT:string;
|
|
1773
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1774
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1775
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1776
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1777
|
+
/**
|
|
1778
|
+
* @deprecated
|
|
1779
|
+
*/
|
|
1780
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1781
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1782
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1783
|
+
|
|
1784
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1785
|
+
|
|
1786
|
+
running():Promise<CoreClient>;
|
|
1787
|
+
getServerUrl():string;
|
|
1788
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
1789
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
1790
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
1791
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1792
|
+
getServerConfigValues():Promise<string[][]>;
|
|
1793
|
+
getStorageService():dh.storage.StorageService;
|
|
1794
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
1795
|
+
disconnect():void;
|
|
1796
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1797
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1798
|
+
hasListeners(name:string):boolean;
|
|
1799
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2069
1800
|
}
|
|
2070
1801
|
|
|
2071
1802
|
/**
|
|
@@ -2141,222 +1872,611 @@ export namespace dh {
|
|
|
2141
1872
|
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
2142
1873
|
}
|
|
2143
1874
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
2150
|
-
* forward data to it.
|
|
2151
|
-
*
|
|
2152
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
2153
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
2154
|
-
* viewports to make it less expensive to compute for large tables.
|
|
2155
|
-
*/
|
|
2156
|
-
export class TableSubscription implements HasEventHandling {
|
|
2157
|
-
/**
|
|
2158
|
-
* Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
|
|
2159
|
-
* <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
|
|
2160
|
-
* allowing access to the entire range of items currently in the subscribed columns.
|
|
2161
|
-
*/
|
|
2162
|
-
static readonly EVENT_UPDATED:string;
|
|
1875
|
+
export class CustomColumn {
|
|
1876
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
1877
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1878
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
1879
|
+
static readonly TYPE_NEW:string;
|
|
2163
1880
|
|
|
2164
1881
|
protected constructor();
|
|
2165
1882
|
|
|
1883
|
+
valueOf():string;
|
|
1884
|
+
toString():string;
|
|
2166
1885
|
/**
|
|
2167
|
-
*
|
|
1886
|
+
* The expression to evaluate this custom column.
|
|
1887
|
+
* @return String
|
|
2168
1888
|
*/
|
|
2169
|
-
|
|
2170
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2171
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2172
|
-
hasListeners(name:string):boolean;
|
|
2173
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1889
|
+
get expression():string;
|
|
2174
1890
|
/**
|
|
2175
|
-
* The
|
|
2176
|
-
* @return
|
|
1891
|
+
* The name of the column to use.
|
|
1892
|
+
* @return String
|
|
2177
1893
|
*/
|
|
2178
|
-
get
|
|
1894
|
+
get name():string;
|
|
1895
|
+
/**
|
|
1896
|
+
* Type of custom column. One of
|
|
1897
|
+
*
|
|
1898
|
+
* <ul>
|
|
1899
|
+
* <li>FORMAT_COLOR</li>
|
|
1900
|
+
* <li>FORMAT_NUMBER</li>
|
|
1901
|
+
* <li>FORMAT_DATE</li>
|
|
1902
|
+
* <li>NEW</li>
|
|
1903
|
+
* </ul>
|
|
1904
|
+
* @return String
|
|
1905
|
+
*/
|
|
1906
|
+
get type():string;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
export class LongWrapper {
|
|
1910
|
+
protected constructor();
|
|
1911
|
+
|
|
1912
|
+
static ofString(str:string):LongWrapper;
|
|
1913
|
+
asNumber():number;
|
|
1914
|
+
valueOf():string;
|
|
1915
|
+
toString():string;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
export class DateWrapper extends LongWrapper {
|
|
1919
|
+
protected constructor();
|
|
1920
|
+
|
|
1921
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
1922
|
+
asDate():Date;
|
|
2179
1923
|
}
|
|
2180
1924
|
|
|
2181
1925
|
/**
|
|
2182
|
-
*
|
|
2183
|
-
*
|
|
2184
|
-
*
|
|
2185
|
-
*
|
|
2186
|
-
* of
|
|
2187
|
-
*
|
|
2188
|
-
*
|
|
2189
|
-
*
|
|
2190
|
-
*
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
1926
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1927
|
+
* interpret these responses to see what to render, or how to respond.
|
|
1928
|
+
* <p>
|
|
1929
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1930
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1931
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1932
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1933
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
1934
|
+
* <p>
|
|
1935
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1936
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1937
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1938
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1939
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1940
|
+
* <p>
|
|
1941
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1942
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1943
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1944
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1945
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1946
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1947
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1948
|
+
* <p>
|
|
1949
|
+
* This can suggest several patterns for how plugins operate:
|
|
1950
|
+
* <ul>
|
|
1951
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1952
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1953
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1954
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1955
|
+
* provided to the JS API consumer.</li>
|
|
1956
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1957
|
+
* which provided them. One concrete example of this could have been
|
|
1958
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1959
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1960
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1961
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1962
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1963
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1964
|
+
* an internal table instance.</li>
|
|
1965
|
+
* </ul>
|
|
1966
|
+
*
|
|
1967
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1968
|
+
* <ul>
|
|
1969
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1970
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1971
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1972
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1973
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
1974
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1975
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1976
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1977
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1978
|
+
* </ul>
|
|
1979
|
+
*/
|
|
1980
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1981
|
+
static readonly EVENT_MESSAGE:string;
|
|
1982
|
+
static readonly EVENT_CLOSE:string;
|
|
1983
|
+
|
|
1984
|
+
protected constructor();
|
|
1985
|
+
|
|
1986
|
+
/**
|
|
1987
|
+
* Ends the client connection to the server.
|
|
2203
1988
|
*/
|
|
2204
|
-
|
|
1989
|
+
close():void;
|
|
1990
|
+
getDataAsBase64():string;
|
|
1991
|
+
getDataAsU8():Uint8Array;
|
|
1992
|
+
getDataAsString():string;
|
|
2205
1993
|
/**
|
|
2206
|
-
*
|
|
1994
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1995
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
1996
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
2207
1997
|
*/
|
|
2208
|
-
|
|
1998
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1999
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2000
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2001
|
+
hasListeners(name:string):boolean;
|
|
2002
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2209
2003
|
/**
|
|
2210
|
-
*
|
|
2004
|
+
*
|
|
2005
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
2006
|
+
* them when finished using them.
|
|
2211
2007
|
*/
|
|
2212
|
-
|
|
2008
|
+
get exportedObjects():WidgetExportedObject[];
|
|
2213
2009
|
/**
|
|
2214
|
-
*
|
|
2010
|
+
*
|
|
2011
|
+
* @return the type of this widget
|
|
2215
2012
|
*/
|
|
2216
|
-
|
|
2013
|
+
get type():string;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
export class QueryInfo {
|
|
2017
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
2018
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2019
|
+
static readonly EVENT_RECONNECT:string;
|
|
2020
|
+
static readonly EVENT_CONNECT:string;
|
|
2021
|
+
|
|
2022
|
+
protected constructor();
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* Event fired when a command is issued from the client.
|
|
2027
|
+
*/
|
|
2028
|
+
export class CommandInfo {
|
|
2029
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
2030
|
+
|
|
2031
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
2032
|
+
get code():string;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
2036
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
2037
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
2038
|
+
* inform the UI right away that they have taken place.
|
|
2039
|
+
*/
|
|
2040
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
2041
|
+
readonly description?:string|null;
|
|
2042
|
+
readonly pluginName?:string|null;
|
|
2043
|
+
readonly layoutHints?:null|LayoutHints;
|
|
2217
2044
|
/**
|
|
2218
|
-
*
|
|
2045
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2219
2046
|
*/
|
|
2220
|
-
static readonly
|
|
2047
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
2221
2048
|
/**
|
|
2222
|
-
*
|
|
2049
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2223
2050
|
*/
|
|
2224
|
-
static readonly
|
|
2051
|
+
static readonly EVENT_UPDATED:string;
|
|
2225
2052
|
/**
|
|
2226
|
-
*
|
|
2053
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2227
2054
|
*/
|
|
2228
|
-
static readonly
|
|
2055
|
+
static readonly EVENT_ROWADDED:string;
|
|
2229
2056
|
/**
|
|
2230
|
-
*
|
|
2057
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2231
2058
|
*/
|
|
2232
|
-
static readonly
|
|
2059
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
2233
2060
|
/**
|
|
2234
|
-
*
|
|
2061
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2235
2062
|
*/
|
|
2236
|
-
static readonly
|
|
2063
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
2237
2064
|
/**
|
|
2238
|
-
*
|
|
2065
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2239
2066
|
*/
|
|
2240
|
-
|
|
2067
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
2241
2068
|
/**
|
|
2242
|
-
*
|
|
2069
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2243
2070
|
*/
|
|
2244
|
-
|
|
2071
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
2245
2072
|
/**
|
|
2246
|
-
*
|
|
2073
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2247
2074
|
*/
|
|
2248
|
-
|
|
2075
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
2249
2076
|
/**
|
|
2250
|
-
*
|
|
2251
|
-
* Table. If a column is omitted, the defaultOperation is used.
|
|
2077
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2252
2078
|
*/
|
|
2253
|
-
|
|
2079
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2254
2080
|
/**
|
|
2255
|
-
*
|
|
2256
|
-
* these columns. See also `Table.selectDistinct`.
|
|
2081
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2257
2082
|
*/
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2083
|
+
static readonly EVENT_RECONNECT:string;
|
|
2084
|
+
/**
|
|
2085
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2086
|
+
*/
|
|
2087
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
2088
|
+
/**
|
|
2089
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2090
|
+
*/
|
|
2091
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2092
|
+
/**
|
|
2093
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
2094
|
+
*/
|
|
2095
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2096
|
+
/**
|
|
2097
|
+
* The size the table will have if it is uncoalesced.
|
|
2098
|
+
*/
|
|
2099
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
2264
2100
|
|
|
2265
|
-
/**
|
|
2266
|
-
* A js type for operating on input tables.
|
|
2267
|
-
*
|
|
2268
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
2269
|
-
*
|
|
2270
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2271
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2272
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2273
|
-
* before sending the next operation.
|
|
2274
|
-
*
|
|
2275
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2276
|
-
*
|
|
2277
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2278
|
-
* object.
|
|
2279
|
-
*/
|
|
2280
|
-
export class InputTable {
|
|
2281
2101
|
protected constructor();
|
|
2282
2102
|
|
|
2103
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
2283
2104
|
/**
|
|
2284
|
-
*
|
|
2285
|
-
*
|
|
2286
|
-
* @param
|
|
2287
|
-
* @
|
|
2288
|
-
* @return Promise of dh.InputTable
|
|
2105
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
2106
|
+
* caching a returned value.
|
|
2107
|
+
* @param key -
|
|
2108
|
+
* @return {@link dh.Column}
|
|
2289
2109
|
*/
|
|
2290
|
-
|
|
2110
|
+
findColumn(key:string):Column;
|
|
2291
2111
|
/**
|
|
2292
|
-
*
|
|
2293
|
-
* @param
|
|
2294
|
-
* @
|
|
2295
|
-
* @return Promise of dh.InputTable
|
|
2112
|
+
* Retrieve multiple columns specified by the given names.
|
|
2113
|
+
* @param keys -
|
|
2114
|
+
* @return {@link dh.Column} array
|
|
2296
2115
|
*/
|
|
2297
|
-
|
|
2116
|
+
findColumns(keys:string[]):Column[];
|
|
2117
|
+
isBlinkTable():boolean;
|
|
2298
2118
|
/**
|
|
2299
|
-
*
|
|
2300
|
-
*
|
|
2301
|
-
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
2302
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
2303
|
-
* @param tableToAdd -
|
|
2119
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
2120
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
2304
2121
|
* @return Promise of dh.InputTable
|
|
2305
2122
|
*/
|
|
2306
|
-
|
|
2123
|
+
inputTable():Promise<InputTable>;
|
|
2307
2124
|
/**
|
|
2308
|
-
*
|
|
2309
|
-
* @param tablesToAdd -
|
|
2310
|
-
* @return Promise of dh.InputTable
|
|
2125
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
2311
2126
|
*/
|
|
2312
|
-
|
|
2127
|
+
close():void;
|
|
2128
|
+
getAttributes():string[];
|
|
2313
2129
|
/**
|
|
2314
|
-
*
|
|
2315
|
-
*
|
|
2316
|
-
* @
|
|
2130
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
2131
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
2132
|
+
* @param attributeName -
|
|
2133
|
+
* @return Object
|
|
2317
2134
|
*/
|
|
2318
|
-
|
|
2135
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
2136
|
+
/**
|
|
2137
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
2138
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
2139
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
2140
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
2141
|
+
* not.
|
|
2142
|
+
* @param sort -
|
|
2143
|
+
* @return {@link dh.Sort} array
|
|
2144
|
+
*/
|
|
2145
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
2146
|
+
/**
|
|
2147
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
2148
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
2149
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
2150
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
2151
|
+
* will not.
|
|
2152
|
+
* @param filter -
|
|
2153
|
+
* @return {@link dh.FilterCondition} array
|
|
2154
|
+
*/
|
|
2155
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
2156
|
+
/**
|
|
2157
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
2158
|
+
* @param customColumns -
|
|
2159
|
+
* @return {@link dh.CustomColumn} array
|
|
2160
|
+
*/
|
|
2161
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
2162
|
+
/**
|
|
2163
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
2164
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
2165
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
2166
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
2167
|
+
* needed.
|
|
2168
|
+
* @param firstRow -
|
|
2169
|
+
* @param lastRow -
|
|
2170
|
+
* @param columns -
|
|
2171
|
+
* @param updateIntervalMs -
|
|
2172
|
+
* @return {@link dh.TableViewportSubscription}
|
|
2173
|
+
*/
|
|
2174
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
2175
|
+
/**
|
|
2176
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
2177
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
2178
|
+
* separate the lifespan of this promise from the table itself, call
|
|
2179
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
2180
|
+
* @return Promise of {@link dh.TableData}
|
|
2181
|
+
*/
|
|
2182
|
+
getViewportData():Promise<ViewportData>;
|
|
2183
|
+
/**
|
|
2184
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
2185
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
2186
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
2187
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
2188
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
2189
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
2190
|
+
* @param columns -
|
|
2191
|
+
* @param updateIntervalMs -
|
|
2192
|
+
* @return {@link dh.TableSubscription}
|
|
2193
|
+
*/
|
|
2194
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
2195
|
+
/**
|
|
2196
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
2197
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
2198
|
+
* order of appearance of values from the original table.
|
|
2199
|
+
* @param columns -
|
|
2200
|
+
* @return Promise of dh.Table
|
|
2201
|
+
*/
|
|
2202
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
2203
|
+
/**
|
|
2204
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
2205
|
+
* @return Promise of dh.Table
|
|
2206
|
+
*/
|
|
2207
|
+
copy():Promise<Table>;
|
|
2208
|
+
/**
|
|
2209
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
2210
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
2211
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
2212
|
+
* called on it when not in use.
|
|
2213
|
+
* @param config -
|
|
2214
|
+
* @return Promise of dh.TotalsTable
|
|
2215
|
+
*/
|
|
2216
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
2217
|
+
/**
|
|
2218
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
2219
|
+
* above for more specifics.
|
|
2220
|
+
* @param config -
|
|
2221
|
+
* @return promise of dh.TotalsTable
|
|
2222
|
+
*/
|
|
2223
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
2224
|
+
/**
|
|
2225
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
2226
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
2227
|
+
* @param configObject -
|
|
2228
|
+
* @return Promise of dh.TreeTable
|
|
2229
|
+
*/
|
|
2230
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
2231
|
+
/**
|
|
2232
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
2233
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
2234
|
+
* @param configObject -
|
|
2235
|
+
* @return Promise dh.TreeTable
|
|
2236
|
+
*/
|
|
2237
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
2238
|
+
/**
|
|
2239
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
2240
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
2241
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
2242
|
+
* @return Promise of dh.Table
|
|
2243
|
+
*/
|
|
2244
|
+
freeze():Promise<Table>;
|
|
2245
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
2246
|
+
/**
|
|
2247
|
+
*
|
|
2248
|
+
* @inheritDoc
|
|
2249
|
+
* @deprecated
|
|
2250
|
+
*/
|
|
2251
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2252
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2253
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
2254
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2255
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2256
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2257
|
+
/**
|
|
2258
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
2259
|
+
* keys.
|
|
2260
|
+
* @param keys -
|
|
2261
|
+
* @param dropKeys -
|
|
2262
|
+
* @return Promise dh.PartitionedTable
|
|
2263
|
+
*/
|
|
2264
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2265
|
+
/**
|
|
2266
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
2267
|
+
* @param column -
|
|
2268
|
+
* @return Promise of dh.ColumnStatistics
|
|
2269
|
+
*/
|
|
2270
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
2271
|
+
/**
|
|
2272
|
+
* Seek the row matching the data provided
|
|
2273
|
+
* @param startingRow - Row to start the seek from
|
|
2274
|
+
* @param column - Column to seek for value on
|
|
2275
|
+
* @param valueType - Type of value provided
|
|
2276
|
+
* @param seekValue - Value to seek
|
|
2277
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
2278
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
2279
|
+
* `false`.
|
|
2280
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
2281
|
+
* @return A promise that resolves to the row value found.
|
|
2282
|
+
*/
|
|
2283
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
2284
|
+
toString():string;
|
|
2285
|
+
/**
|
|
2286
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
2287
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
2288
|
+
* @return boolean
|
|
2289
|
+
*/
|
|
2290
|
+
get hasInputTable():boolean;
|
|
2291
|
+
/**
|
|
2292
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
2293
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
2294
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
2295
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
2296
|
+
* @return {@link dh.Column} array
|
|
2297
|
+
*/
|
|
2298
|
+
get columns():Array<Column>;
|
|
2299
|
+
/**
|
|
2300
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
2301
|
+
* @return dh.TotalsTableConfig
|
|
2302
|
+
*/
|
|
2303
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
2304
|
+
/**
|
|
2305
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
2306
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2307
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
2308
|
+
* @return {@link dh.Sort} array
|
|
2309
|
+
*/
|
|
2310
|
+
get sort():Array<Sort>;
|
|
2311
|
+
/**
|
|
2312
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
2313
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
2314
|
+
* @return {@link dh.CustomColumn} array
|
|
2315
|
+
*/
|
|
2316
|
+
get customColumns():Array<CustomColumn>;
|
|
2317
|
+
/**
|
|
2318
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2319
|
+
* initial snapshot.
|
|
2320
|
+
* @return boolean
|
|
2321
|
+
*/
|
|
2322
|
+
get isRefreshing():boolean;
|
|
2323
|
+
/**
|
|
2324
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
2325
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2326
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
2327
|
+
* @return {@link dh.FilterCondition} array
|
|
2328
|
+
*/
|
|
2329
|
+
get filter():Array<FilterCondition>;
|
|
2330
|
+
/**
|
|
2331
|
+
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
2332
|
+
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
2333
|
+
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
2334
|
+
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
2335
|
+
*/
|
|
2336
|
+
get totalSize():number;
|
|
2337
|
+
/**
|
|
2338
|
+
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
2339
|
+
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
2340
|
+
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
2341
|
+
* <p>
|
|
2342
|
+
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
2343
|
+
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
2344
|
+
* uncoalesced.
|
|
2345
|
+
*/
|
|
2346
|
+
get size():number;
|
|
2347
|
+
/**
|
|
2348
|
+
* True if this table has been closed.
|
|
2349
|
+
* @return boolean
|
|
2350
|
+
*/
|
|
2351
|
+
get isClosed():boolean;
|
|
2352
|
+
/**
|
|
2353
|
+
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
2354
|
+
* <p>
|
|
2355
|
+
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
2356
|
+
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
2357
|
+
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
2358
|
+
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
2359
|
+
* for those columns, use {@link Table.selectDistinct}.
|
|
2360
|
+
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
2361
|
+
*/
|
|
2362
|
+
get isUncoalesced():boolean;
|
|
2363
|
+
/**
|
|
2364
|
+
* Listen for events on this object.
|
|
2365
|
+
* @param name - the name of the event to listen for
|
|
2366
|
+
* @param callback - a function to call when the event occurs
|
|
2367
|
+
* @return Returns a cleanup function.
|
|
2368
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2369
|
+
*/
|
|
2370
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2371
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2372
|
+
hasListeners(name:string):boolean;
|
|
2373
|
+
/**
|
|
2374
|
+
* Removes an event listener added to this table.
|
|
2375
|
+
* @param name -
|
|
2376
|
+
* @param callback -
|
|
2377
|
+
* @return
|
|
2378
|
+
* @typeParam T -
|
|
2379
|
+
*/
|
|
2380
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2381
|
+
/**
|
|
2382
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2383
|
+
* do not support reverse.
|
|
2384
|
+
* @return {@link dh.Sort}
|
|
2385
|
+
*/
|
|
2386
|
+
static reverse():Sort;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
export class IdeSession implements HasEventHandling {
|
|
2390
|
+
static readonly EVENT_COMMANDSTARTED:string;
|
|
2391
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2392
|
+
|
|
2393
|
+
protected constructor();
|
|
2394
|
+
|
|
2319
2395
|
/**
|
|
2320
|
-
*
|
|
2321
|
-
* @param
|
|
2322
|
-
* @
|
|
2396
|
+
* Load the named table, with columns and size information already fully populated.
|
|
2397
|
+
* @param name -
|
|
2398
|
+
* @param applyPreviewColumns - optional boolean
|
|
2399
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2323
2400
|
*/
|
|
2324
|
-
|
|
2401
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
2325
2402
|
/**
|
|
2326
|
-
*
|
|
2327
|
-
* @
|
|
2403
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
2404
|
+
* @param name -
|
|
2405
|
+
* @return promise of dh.plot.Figure
|
|
2328
2406
|
*/
|
|
2329
|
-
|
|
2407
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
2330
2408
|
/**
|
|
2331
|
-
*
|
|
2332
|
-
*
|
|
2409
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
2410
|
+
* size is presently not available until the viewport is first set.
|
|
2411
|
+
* @param name -
|
|
2412
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
2333
2413
|
*/
|
|
2334
|
-
|
|
2414
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
2415
|
+
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2416
|
+
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2417
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2418
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2335
2419
|
/**
|
|
2336
|
-
*
|
|
2337
|
-
* @
|
|
2420
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
2421
|
+
* @param tables -
|
|
2422
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2338
2423
|
*/
|
|
2339
|
-
|
|
2424
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
2425
|
+
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2426
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2427
|
+
close():void;
|
|
2428
|
+
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2429
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2430
|
+
openDocument(params:object):void;
|
|
2431
|
+
changeDocument(params:object):void;
|
|
2432
|
+
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2433
|
+
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2434
|
+
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2435
|
+
closeDocument(params:object):void;
|
|
2340
2436
|
/**
|
|
2341
|
-
*
|
|
2342
|
-
*
|
|
2437
|
+
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
2438
|
+
* values will be null.
|
|
2439
|
+
* @param size -
|
|
2440
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2343
2441
|
*/
|
|
2344
|
-
|
|
2442
|
+
emptyTable(size:number):Promise<Table>;
|
|
2345
2443
|
/**
|
|
2346
|
-
*
|
|
2347
|
-
*
|
|
2444
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
2445
|
+
* the table will be populated with the interval from the specified date until now.
|
|
2446
|
+
* @param periodNanos -
|
|
2447
|
+
* @param startTime -
|
|
2448
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2348
2449
|
*/
|
|
2349
|
-
|
|
2450
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
2451
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2452
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2453
|
+
hasListeners(name:string):boolean;
|
|
2454
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2350
2455
|
}
|
|
2351
2456
|
|
|
2352
|
-
|
|
2457
|
+
/**
|
|
2458
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2459
|
+
*/
|
|
2460
|
+
export class BigDecimalWrapper {
|
|
2353
2461
|
protected constructor();
|
|
2354
2462
|
|
|
2355
|
-
static
|
|
2356
|
-
|
|
2463
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
2464
|
+
asNumber():number;
|
|
2465
|
+
valueOf():string;
|
|
2466
|
+
toString():string;
|
|
2357
2467
|
}
|
|
2358
2468
|
|
|
2359
2469
|
|
|
2470
|
+
type ValueTypeType = string;
|
|
2471
|
+
export class ValueType {
|
|
2472
|
+
static readonly STRING:ValueTypeType;
|
|
2473
|
+
static readonly NUMBER:ValueTypeType;
|
|
2474
|
+
static readonly DOUBLE:ValueTypeType;
|
|
2475
|
+
static readonly LONG:ValueTypeType;
|
|
2476
|
+
static readonly DATETIME:ValueTypeType;
|
|
2477
|
+
static readonly BOOLEAN:ValueTypeType;
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2360
2480
|
type SearchDisplayModeType = string;
|
|
2361
2481
|
export class SearchDisplayMode {
|
|
2362
2482
|
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
@@ -2385,16 +2505,6 @@ export namespace dh {
|
|
|
2385
2505
|
static readonly SKIP:AggregationOperationType;
|
|
2386
2506
|
}
|
|
2387
2507
|
|
|
2388
|
-
type ValueTypeType = string;
|
|
2389
|
-
export class ValueType {
|
|
2390
|
-
static readonly STRING:ValueTypeType;
|
|
2391
|
-
static readonly NUMBER:ValueTypeType;
|
|
2392
|
-
static readonly DOUBLE:ValueTypeType;
|
|
2393
|
-
static readonly LONG:ValueTypeType;
|
|
2394
|
-
static readonly DATETIME:ValueTypeType;
|
|
2395
|
-
static readonly BOOLEAN:ValueTypeType;
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
2508
|
/**
|
|
2399
2509
|
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2400
2510
|
*/
|
|
@@ -2415,14 +2525,6 @@ export namespace dh {
|
|
|
2415
2525
|
|
|
2416
2526
|
export namespace dh.ide {
|
|
2417
2527
|
|
|
2418
|
-
/**
|
|
2419
|
-
* Specifies a type and either id or name (but not both).
|
|
2420
|
-
*/
|
|
2421
|
-
export interface VariableDescriptor {
|
|
2422
|
-
type:string;
|
|
2423
|
-
id?:string|null;
|
|
2424
|
-
name?:string|null;
|
|
2425
|
-
}
|
|
2426
2528
|
/**
|
|
2427
2529
|
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2428
2530
|
* server.
|
|
@@ -2445,6 +2547,21 @@ export namespace dh.ide {
|
|
|
2445
2547
|
get message():string;
|
|
2446
2548
|
}
|
|
2447
2549
|
/**
|
|
2550
|
+
* Indicates the result of code run on the server.
|
|
2551
|
+
*/
|
|
2552
|
+
export interface CommandResult {
|
|
2553
|
+
/**
|
|
2554
|
+
* Describes changes made in the course of this command.
|
|
2555
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2556
|
+
*/
|
|
2557
|
+
get changes():VariableChanges;
|
|
2558
|
+
/**
|
|
2559
|
+
* If the command failed, the error message will be provided here.
|
|
2560
|
+
* @return String
|
|
2561
|
+
*/
|
|
2562
|
+
get error():string;
|
|
2563
|
+
}
|
|
2564
|
+
/**
|
|
2448
2565
|
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2449
2566
|
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2450
2567
|
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
@@ -2469,19 +2586,12 @@ export namespace dh.ide {
|
|
|
2469
2586
|
get updated():Array<VariableDefinition>;
|
|
2470
2587
|
}
|
|
2471
2588
|
/**
|
|
2472
|
-
*
|
|
2589
|
+
* Specifies a type and either id or name (but not both).
|
|
2473
2590
|
*/
|
|
2474
|
-
export interface
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
*/
|
|
2479
|
-
get changes():VariableChanges;
|
|
2480
|
-
/**
|
|
2481
|
-
* If the command failed, the error message will be provided here.
|
|
2482
|
-
* @return String
|
|
2483
|
-
*/
|
|
2484
|
-
get error():string;
|
|
2591
|
+
export interface VariableDescriptor {
|
|
2592
|
+
type:string;
|
|
2593
|
+
id?:string|null;
|
|
2594
|
+
name?:string|null;
|
|
2485
2595
|
}
|
|
2486
2596
|
/**
|
|
2487
2597
|
* A format to describe a variable available to be read from the server. Application fields are optional, and only
|
|
@@ -2639,6 +2749,60 @@ export namespace dh.i18n {
|
|
|
2639
2749
|
get id():string;
|
|
2640
2750
|
}
|
|
2641
2751
|
|
|
2752
|
+
/**
|
|
2753
|
+
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2754
|
+
*
|
|
2755
|
+
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2756
|
+
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2757
|
+
* BigDecimal.
|
|
2758
|
+
*/
|
|
2759
|
+
export class NumberFormat {
|
|
2760
|
+
/**
|
|
2761
|
+
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2762
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2763
|
+
* @param pattern -
|
|
2764
|
+
*/
|
|
2765
|
+
constructor(pattern:string);
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2769
|
+
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2770
|
+
* take advantage of caching
|
|
2771
|
+
* @param pattern -
|
|
2772
|
+
* @return dh.i18n.NumberFormat
|
|
2773
|
+
*/
|
|
2774
|
+
static getFormat(pattern:string):NumberFormat;
|
|
2775
|
+
/**
|
|
2776
|
+
* Parses the given text using the cached format matching the given pattern.
|
|
2777
|
+
* @param pattern -
|
|
2778
|
+
* @param text -
|
|
2779
|
+
* @return double
|
|
2780
|
+
*/
|
|
2781
|
+
static parse(pattern:string, text:string):number;
|
|
2782
|
+
/**
|
|
2783
|
+
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2784
|
+
* format matching the given pattern string.
|
|
2785
|
+
* @param pattern -
|
|
2786
|
+
* @param number -
|
|
2787
|
+
* @return String
|
|
2788
|
+
*/
|
|
2789
|
+
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2790
|
+
/**
|
|
2791
|
+
* Parses the given text using this instance's pattern into a JS Number.
|
|
2792
|
+
* @param text -
|
|
2793
|
+
* @return double
|
|
2794
|
+
*/
|
|
2795
|
+
parse(text:string):number;
|
|
2796
|
+
/**
|
|
2797
|
+
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2798
|
+
* @param number -
|
|
2799
|
+
* @return String
|
|
2800
|
+
*/
|
|
2801
|
+
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2802
|
+
toString():string;
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
|
|
2642
2806
|
/**
|
|
2643
2807
|
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2644
2808
|
* additional 6 decimal places after the rest of the number.
|
|
@@ -2737,78 +2901,110 @@ export namespace dh.i18n {
|
|
|
2737
2901
|
toString():string;
|
|
2738
2902
|
}
|
|
2739
2903
|
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
export namespace dh.grpc {
|
|
2907
|
+
|
|
2740
2908
|
/**
|
|
2741
|
-
*
|
|
2742
|
-
*
|
|
2743
|
-
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2744
|
-
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2745
|
-
* BigDecimal.
|
|
2909
|
+
* gRPC transport implementation.
|
|
2746
2910
|
*/
|
|
2747
|
-
export
|
|
2911
|
+
export interface GrpcTransport {
|
|
2748
2912
|
/**
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2751
|
-
* @param pattern -
|
|
2913
|
+
* Starts the stream, sending metadata to the server.
|
|
2914
|
+
* @param metadata - the headers to send the server when opening the connection
|
|
2752
2915
|
*/
|
|
2753
|
-
|
|
2754
|
-
|
|
2916
|
+
start(metadata:{ [key: string]: string|Array<string>; }):void;
|
|
2755
2917
|
/**
|
|
2756
|
-
* a
|
|
2757
|
-
*
|
|
2758
|
-
* take advantage of caching
|
|
2759
|
-
* @param pattern -
|
|
2760
|
-
* @return dh.i18n.NumberFormat
|
|
2918
|
+
* Sends a message to the server.
|
|
2919
|
+
* @param msgBytes - bytes to send to the server
|
|
2761
2920
|
*/
|
|
2762
|
-
|
|
2921
|
+
sendMessage(msgBytes:Uint8Array):void;
|
|
2763
2922
|
/**
|
|
2764
|
-
*
|
|
2765
|
-
*
|
|
2766
|
-
* @param text -
|
|
2767
|
-
* @return double
|
|
2923
|
+
* "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
|
|
2924
|
+
* open to receiving messages.
|
|
2768
2925
|
*/
|
|
2769
|
-
|
|
2926
|
+
finishSend():void;
|
|
2770
2927
|
/**
|
|
2771
|
-
*
|
|
2772
|
-
*
|
|
2773
|
-
* @param pattern -
|
|
2774
|
-
* @param number -
|
|
2775
|
-
* @return String
|
|
2928
|
+
* End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
|
|
2929
|
+
* client from receiving any more events.
|
|
2776
2930
|
*/
|
|
2777
|
-
|
|
2931
|
+
cancel():void;
|
|
2932
|
+
}
|
|
2933
|
+
/**
|
|
2934
|
+
* Options for creating a gRPC stream transport instance.
|
|
2935
|
+
*/
|
|
2936
|
+
export interface GrpcTransportOptions {
|
|
2778
2937
|
/**
|
|
2779
|
-
*
|
|
2780
|
-
* @param text -
|
|
2781
|
-
* @return double
|
|
2938
|
+
* The gRPC method URL.
|
|
2782
2939
|
*/
|
|
2783
|
-
|
|
2940
|
+
url:URL;
|
|
2784
2941
|
/**
|
|
2785
|
-
*
|
|
2786
|
-
* @param number -
|
|
2787
|
-
* @return String
|
|
2942
|
+
* True to enable debug logging for this stream.
|
|
2788
2943
|
*/
|
|
2789
|
-
|
|
2790
|
-
|
|
2944
|
+
debug:boolean;
|
|
2945
|
+
/**
|
|
2946
|
+
* Callback for when headers and status are received. The headers are a map of header names to values, and the
|
|
2947
|
+
* status is the HTTP status code. If the connection could not be made, the status should be 0.
|
|
2948
|
+
*/
|
|
2949
|
+
onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
|
|
2950
|
+
/**
|
|
2951
|
+
* Callback for when a chunk of data is received.
|
|
2952
|
+
*/
|
|
2953
|
+
onChunk:(chunk:Uint8Array)=>void;
|
|
2954
|
+
/**
|
|
2955
|
+
* Callback for when the stream ends, with an error instance if it can be provided. Note that the present
|
|
2956
|
+
* implementation does not consume errors, even if provided.
|
|
2957
|
+
*/
|
|
2958
|
+
onEnd:(error?:Error|undefined|null)=>void;
|
|
2791
2959
|
}
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
2960
|
}
|
|
2795
2961
|
|
|
2796
2962
|
export namespace dh.plot {
|
|
2797
2963
|
|
|
2798
2964
|
/**
|
|
2799
|
-
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2965
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2966
|
+
*/
|
|
2967
|
+
export interface MultiSeries {
|
|
2968
|
+
/**
|
|
2969
|
+
* The name for this multi-series.
|
|
2970
|
+
* @return String
|
|
2971
|
+
*/
|
|
2972
|
+
get name():string;
|
|
2973
|
+
/**
|
|
2974
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2975
|
+
* @return int
|
|
2976
|
+
*/
|
|
2977
|
+
get plotStyle():SeriesPlotStyleType;
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Describes how to access and display data required within a series.
|
|
2800
2981
|
*/
|
|
2801
|
-
export interface
|
|
2982
|
+
export interface SeriesDataSource {
|
|
2802
2983
|
/**
|
|
2803
|
-
*
|
|
2984
|
+
* the type of data stored in the underlying table's Column.
|
|
2804
2985
|
* @return String
|
|
2805
2986
|
*/
|
|
2806
|
-
get
|
|
2987
|
+
get columnType():string;
|
|
2807
2988
|
/**
|
|
2808
|
-
*
|
|
2989
|
+
* the axis that this source should be drawn on.
|
|
2990
|
+
* @return dh.plot.Axis
|
|
2991
|
+
*/
|
|
2992
|
+
get axis():Axis;
|
|
2993
|
+
/**
|
|
2994
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2809
2995
|
* @return int
|
|
2810
2996
|
*/
|
|
2811
|
-
get
|
|
2997
|
+
get type():SourceTypeType;
|
|
2998
|
+
}
|
|
2999
|
+
export interface OneClick {
|
|
3000
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
3001
|
+
getValueForColumn(columName:string):any;
|
|
3002
|
+
get requireAllFiltersToDisplay():boolean;
|
|
3003
|
+
get columns():dh.Column[];
|
|
3004
|
+
}
|
|
3005
|
+
export interface FigureDataUpdatedEvent {
|
|
3006
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3007
|
+
get series():Series[];
|
|
2812
3008
|
}
|
|
2813
3009
|
/**
|
|
2814
3010
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
@@ -2878,16 +3074,6 @@ export namespace dh.plot {
|
|
|
2878
3074
|
get formatType():AxisFormatTypeType;
|
|
2879
3075
|
get minRange():number;
|
|
2880
3076
|
}
|
|
2881
|
-
export interface FigureDataUpdatedEvent {
|
|
2882
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2883
|
-
get series():Series[];
|
|
2884
|
-
}
|
|
2885
|
-
export interface OneClick {
|
|
2886
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
2887
|
-
getValueForColumn(columName:string):any;
|
|
2888
|
-
get requireAllFiltersToDisplay():boolean;
|
|
2889
|
-
get columns():dh.Column[];
|
|
2890
|
-
}
|
|
2891
3077
|
/**
|
|
2892
3078
|
* Provides access to the data for displaying in a figure.
|
|
2893
3079
|
*/
|
|
@@ -2932,113 +3118,6 @@ export namespace dh.plot {
|
|
|
2932
3118
|
get multiSeries():MultiSeries;
|
|
2933
3119
|
get shapeLabel():string;
|
|
2934
3120
|
}
|
|
2935
|
-
/**
|
|
2936
|
-
* Describes how to access and display data required within a series.
|
|
2937
|
-
*/
|
|
2938
|
-
export interface SeriesDataSource {
|
|
2939
|
-
/**
|
|
2940
|
-
* the type of data stored in the underlying table's Column.
|
|
2941
|
-
* @return String
|
|
2942
|
-
*/
|
|
2943
|
-
get columnType():string;
|
|
2944
|
-
/**
|
|
2945
|
-
* the axis that this source should be drawn on.
|
|
2946
|
-
* @return dh.plot.Axis
|
|
2947
|
-
*/
|
|
2948
|
-
get axis():Axis;
|
|
2949
|
-
/**
|
|
2950
|
-
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2951
|
-
* @return int
|
|
2952
|
-
*/
|
|
2953
|
-
get type():SourceTypeType;
|
|
2954
|
-
}
|
|
2955
|
-
|
|
2956
|
-
/**
|
|
2957
|
-
* Provide the details for a chart.
|
|
2958
|
-
*/
|
|
2959
|
-
export class Chart implements dh.HasEventHandling {
|
|
2960
|
-
/**
|
|
2961
|
-
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
2962
|
-
*/
|
|
2963
|
-
static readonly EVENT_SERIES_ADDED:string;
|
|
2964
|
-
/**
|
|
2965
|
-
* The title of the chart.
|
|
2966
|
-
* @return String
|
|
2967
|
-
*/
|
|
2968
|
-
readonly title?:string|null;
|
|
2969
|
-
|
|
2970
|
-
protected constructor();
|
|
2971
|
-
|
|
2972
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2973
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2974
|
-
hasListeners(name:string):boolean;
|
|
2975
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2976
|
-
get column():number;
|
|
2977
|
-
get showLegend():boolean;
|
|
2978
|
-
/**
|
|
2979
|
-
* The axes used in this chart.
|
|
2980
|
-
* @return dh.plot.Axis
|
|
2981
|
-
*/
|
|
2982
|
-
get axes():Axis[];
|
|
2983
|
-
get is3d():boolean;
|
|
2984
|
-
get titleFont():string;
|
|
2985
|
-
get colspan():number;
|
|
2986
|
-
get titleColor():string;
|
|
2987
|
-
get series():Series[];
|
|
2988
|
-
get rowspan():number;
|
|
2989
|
-
/**
|
|
2990
|
-
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
2991
|
-
* @return int
|
|
2992
|
-
*/
|
|
2993
|
-
get chartType():ChartTypeType;
|
|
2994
|
-
get row():number;
|
|
2995
|
-
get legendColor():string;
|
|
2996
|
-
get legendFont():string;
|
|
2997
|
-
get multiSeries():MultiSeries[];
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
export class DownsampleOptions {
|
|
3001
|
-
/**
|
|
3002
|
-
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3003
|
-
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3004
|
-
* series.subscribe().
|
|
3005
|
-
*/
|
|
3006
|
-
static MAX_SERIES_SIZE:number;
|
|
3007
|
-
/**
|
|
3008
|
-
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3009
|
-
* downsampling disabled, the series will not load data.
|
|
3010
|
-
*/
|
|
3011
|
-
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3012
|
-
/**
|
|
3013
|
-
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3014
|
-
* axes are configured.
|
|
3015
|
-
*/
|
|
3016
|
-
static readonly DEFAULT:DownsampleOptions;
|
|
3017
|
-
/**
|
|
3018
|
-
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3019
|
-
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3020
|
-
*/
|
|
3021
|
-
static readonly DISABLE:DownsampleOptions;
|
|
3022
|
-
|
|
3023
|
-
protected constructor();
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
/**
|
|
3027
|
-
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3028
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3029
|
-
* keep that cached as well.
|
|
3030
|
-
*/
|
|
3031
|
-
export class ChartData {
|
|
3032
|
-
constructor(table:dh.Table);
|
|
3033
|
-
|
|
3034
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3035
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3036
|
-
/**
|
|
3037
|
-
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3038
|
-
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3039
|
-
*/
|
|
3040
|
-
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3041
|
-
}
|
|
3042
3121
|
|
|
3043
3122
|
export class Figure implements dh.HasEventHandling {
|
|
3044
3123
|
/**
|
|
@@ -3111,8 +3190,8 @@ export namespace dh.plot {
|
|
|
3111
3190
|
* @return Returns a cleanup function.
|
|
3112
3191
|
* @typeParam T - the type of the data that the event will provide
|
|
3113
3192
|
*/
|
|
3114
|
-
addEventListener<T>(name:string, callback:(e:
|
|
3115
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
3193
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3194
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3116
3195
|
hasListeners(name:string):boolean;
|
|
3117
3196
|
/**
|
|
3118
3197
|
* Removes an event listener added to this table.
|
|
@@ -3121,7 +3200,24 @@ export namespace dh.plot {
|
|
|
3121
3200
|
* @return
|
|
3122
3201
|
* @typeParam T -
|
|
3123
3202
|
*/
|
|
3124
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
3203
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
export class ChartDescriptor {
|
|
3207
|
+
colspan?:number|null;
|
|
3208
|
+
rowspan?:number|null;
|
|
3209
|
+
series:Array<SeriesDescriptor>;
|
|
3210
|
+
axes:Array<AxisDescriptor>;
|
|
3211
|
+
chartType:string;
|
|
3212
|
+
title?:string|null;
|
|
3213
|
+
titleFont?:string|null;
|
|
3214
|
+
titleColor?:string|null;
|
|
3215
|
+
showLegend?:boolean|null;
|
|
3216
|
+
legendFont?:string|null;
|
|
3217
|
+
legendColor?:string|null;
|
|
3218
|
+
is3d?:boolean|null;
|
|
3219
|
+
|
|
3220
|
+
constructor();
|
|
3125
3221
|
}
|
|
3126
3222
|
|
|
3127
3223
|
/**
|
|
@@ -3141,23 +3237,121 @@ export namespace dh.plot {
|
|
|
3141
3237
|
constructor();
|
|
3142
3238
|
}
|
|
3143
3239
|
|
|
3144
|
-
export class
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3240
|
+
export class SeriesDescriptor {
|
|
3241
|
+
plotStyle:string;
|
|
3242
|
+
name?:string|null;
|
|
3243
|
+
linesVisible?:boolean|null;
|
|
3244
|
+
shapesVisible?:boolean|null;
|
|
3245
|
+
gradientVisible?:boolean|null;
|
|
3246
|
+
lineColor?:string|null;
|
|
3247
|
+
pointLabelFormat?:string|null;
|
|
3248
|
+
xToolTipPattern?:string|null;
|
|
3249
|
+
yToolTipPattern?:string|null;
|
|
3250
|
+
shapeLabel?:string|null;
|
|
3251
|
+
shapeSize?:number|null;
|
|
3252
|
+
shapeColor?:string|null;
|
|
3253
|
+
shape?:string|null;
|
|
3254
|
+
dataSources:Array<SourceDescriptor>;
|
|
3255
|
+
|
|
3256
|
+
constructor();
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
export class SourceDescriptor {
|
|
3260
|
+
axis:AxisDescriptor;
|
|
3261
|
+
table:dh.Table;
|
|
3262
|
+
columnName:string;
|
|
3263
|
+
type:string;
|
|
3157
3264
|
|
|
3158
3265
|
constructor();
|
|
3159
3266
|
}
|
|
3160
3267
|
|
|
3268
|
+
export class DownsampleOptions {
|
|
3269
|
+
/**
|
|
3270
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3271
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3272
|
+
* series.subscribe().
|
|
3273
|
+
*/
|
|
3274
|
+
static MAX_SERIES_SIZE:number;
|
|
3275
|
+
/**
|
|
3276
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3277
|
+
* downsampling disabled, the series will not load data.
|
|
3278
|
+
*/
|
|
3279
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3280
|
+
/**
|
|
3281
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3282
|
+
* axes are configured.
|
|
3283
|
+
*/
|
|
3284
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3285
|
+
/**
|
|
3286
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3287
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3288
|
+
*/
|
|
3289
|
+
static readonly DISABLE:DownsampleOptions;
|
|
3290
|
+
|
|
3291
|
+
protected constructor();
|
|
3292
|
+
}
|
|
3293
|
+
|
|
3294
|
+
/**
|
|
3295
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3296
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3297
|
+
* keep that cached as well.
|
|
3298
|
+
*/
|
|
3299
|
+
export class ChartData {
|
|
3300
|
+
constructor(table:dh.Table);
|
|
3301
|
+
|
|
3302
|
+
update(tableData:unknown):void;
|
|
3303
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3306
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3307
|
+
*/
|
|
3308
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
/**
|
|
3312
|
+
* Provide the details for a chart.
|
|
3313
|
+
*/
|
|
3314
|
+
export class Chart implements dh.HasEventHandling {
|
|
3315
|
+
/**
|
|
3316
|
+
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
3317
|
+
*/
|
|
3318
|
+
static readonly EVENT_SERIES_ADDED:string;
|
|
3319
|
+
/**
|
|
3320
|
+
* The title of the chart.
|
|
3321
|
+
* @return String
|
|
3322
|
+
*/
|
|
3323
|
+
readonly title?:string|null;
|
|
3324
|
+
|
|
3325
|
+
protected constructor();
|
|
3326
|
+
|
|
3327
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3328
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3329
|
+
hasListeners(name:string):boolean;
|
|
3330
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3331
|
+
get column():number;
|
|
3332
|
+
get showLegend():boolean;
|
|
3333
|
+
/**
|
|
3334
|
+
* The axes used in this chart.
|
|
3335
|
+
* @return dh.plot.Axis
|
|
3336
|
+
*/
|
|
3337
|
+
get axes():Axis[];
|
|
3338
|
+
get is3d():boolean;
|
|
3339
|
+
get titleFont():string;
|
|
3340
|
+
get colspan():number;
|
|
3341
|
+
get titleColor():string;
|
|
3342
|
+
get series():Series[];
|
|
3343
|
+
get rowspan():number;
|
|
3344
|
+
/**
|
|
3345
|
+
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3346
|
+
* @return int
|
|
3347
|
+
*/
|
|
3348
|
+
get chartType():ChartTypeType;
|
|
3349
|
+
get row():number;
|
|
3350
|
+
get legendColor():string;
|
|
3351
|
+
get legendFont():string;
|
|
3352
|
+
get multiSeries():MultiSeries[];
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3161
3355
|
/**
|
|
3162
3356
|
* Helper class for plot downsampling methods.
|
|
3163
3357
|
*/
|
|
@@ -3177,20 +3371,6 @@ export namespace dh.plot {
|
|
|
3177
3371
|
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3178
3372
|
}
|
|
3179
3373
|
|
|
3180
|
-
export class FigureFetchError {
|
|
3181
|
-
error:object;
|
|
3182
|
-
errors:Array<string>;
|
|
3183
|
-
|
|
3184
|
-
protected constructor();
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
export class SeriesDataSourceException {
|
|
3188
|
-
protected constructor();
|
|
3189
|
-
|
|
3190
|
-
get source():SeriesDataSource;
|
|
3191
|
-
get message():string;
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
3374
|
export class AxisDescriptor {
|
|
3195
3375
|
formatType:string;
|
|
3196
3376
|
type:string;
|
|
@@ -3215,13 +3395,18 @@ export namespace dh.plot {
|
|
|
3215
3395
|
constructor();
|
|
3216
3396
|
}
|
|
3217
3397
|
|
|
3218
|
-
export class
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
columnName:string;
|
|
3222
|
-
type:string;
|
|
3398
|
+
export class FigureFetchError {
|
|
3399
|
+
error:object;
|
|
3400
|
+
errors:Array<string>;
|
|
3223
3401
|
|
|
3224
|
-
constructor();
|
|
3402
|
+
protected constructor();
|
|
3403
|
+
}
|
|
3404
|
+
|
|
3405
|
+
export class SeriesDataSourceException {
|
|
3406
|
+
protected constructor();
|
|
3407
|
+
|
|
3408
|
+
get source():SeriesDataSource;
|
|
3409
|
+
get message():string;
|
|
3225
3410
|
}
|
|
3226
3411
|
|
|
3227
3412
|
export class FigureSourceException {
|
|
@@ -3231,25 +3416,60 @@ export namespace dh.plot {
|
|
|
3231
3416
|
protected constructor();
|
|
3232
3417
|
}
|
|
3233
3418
|
|
|
3234
|
-
export class SeriesDescriptor {
|
|
3235
|
-
plotStyle:string;
|
|
3236
|
-
name?:string|null;
|
|
3237
|
-
linesVisible?:boolean|null;
|
|
3238
|
-
shapesVisible?:boolean|null;
|
|
3239
|
-
gradientVisible?:boolean|null;
|
|
3240
|
-
lineColor?:string|null;
|
|
3241
|
-
pointLabelFormat?:string|null;
|
|
3242
|
-
xToolTipPattern?:string|null;
|
|
3243
|
-
yToolTipPattern?:string|null;
|
|
3244
|
-
shapeLabel?:string|null;
|
|
3245
|
-
shapeSize?:number|null;
|
|
3246
|
-
shapeColor?:string|null;
|
|
3247
|
-
shape?:string|null;
|
|
3248
|
-
dataSources:Array<SourceDescriptor>;
|
|
3249
3419
|
|
|
3250
|
-
|
|
3420
|
+
/**
|
|
3421
|
+
* This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
|
|
3422
|
+
* item. For example, a point in a error-bar plot might have a X value, three Y values (Y, Y_LOW, Y_HIGH), and some
|
|
3423
|
+
* COLOR per item - the three SeriesDataSources all would share the same Axis instance, but would have different
|
|
3424
|
+
* SourceType enums set. The exact meaning of each source type will depend on the series that they are in.
|
|
3425
|
+
*/
|
|
3426
|
+
type SourceTypeType = number;
|
|
3427
|
+
export class SourceType {
|
|
3428
|
+
static readonly X:SourceTypeType;
|
|
3429
|
+
static readonly Y:SourceTypeType;
|
|
3430
|
+
static readonly Z:SourceTypeType;
|
|
3431
|
+
static readonly X_LOW:SourceTypeType;
|
|
3432
|
+
static readonly X_HIGH:SourceTypeType;
|
|
3433
|
+
static readonly Y_LOW:SourceTypeType;
|
|
3434
|
+
static readonly Y_HIGH:SourceTypeType;
|
|
3435
|
+
static readonly TIME:SourceTypeType;
|
|
3436
|
+
static readonly OPEN:SourceTypeType;
|
|
3437
|
+
static readonly HIGH:SourceTypeType;
|
|
3438
|
+
static readonly LOW:SourceTypeType;
|
|
3439
|
+
static readonly CLOSE:SourceTypeType;
|
|
3440
|
+
static readonly SHAPE:SourceTypeType;
|
|
3441
|
+
static readonly SIZE:SourceTypeType;
|
|
3442
|
+
static readonly LABEL:SourceTypeType;
|
|
3443
|
+
static readonly COLOR:SourceTypeType;
|
|
3444
|
+
static readonly PARENT:SourceTypeType;
|
|
3445
|
+
static readonly TEXT:SourceTypeType;
|
|
3446
|
+
static readonly HOVER_TEXT:SourceTypeType;
|
|
3251
3447
|
}
|
|
3252
3448
|
|
|
3449
|
+
/**
|
|
3450
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3451
|
+
* those series should be rendered.
|
|
3452
|
+
*/
|
|
3453
|
+
type ChartTypeType = number;
|
|
3454
|
+
export class ChartType {
|
|
3455
|
+
static readonly XY:ChartTypeType;
|
|
3456
|
+
static readonly PIE:ChartTypeType;
|
|
3457
|
+
static readonly OHLC:ChartTypeType;
|
|
3458
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3459
|
+
static readonly XYZ:ChartTypeType;
|
|
3460
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3461
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3464
|
+
type AxisTypeType = number;
|
|
3465
|
+
export class AxisType {
|
|
3466
|
+
static readonly X:AxisTypeType;
|
|
3467
|
+
static readonly Y:AxisTypeType;
|
|
3468
|
+
static readonly SHAPE:AxisTypeType;
|
|
3469
|
+
static readonly SIZE:AxisTypeType;
|
|
3470
|
+
static readonly LABEL:AxisTypeType;
|
|
3471
|
+
static readonly COLOR:AxisTypeType;
|
|
3472
|
+
}
|
|
3253
3473
|
|
|
3254
3474
|
type SeriesPlotStyleType = number;
|
|
3255
3475
|
export class SeriesPlotStyle {
|
|
@@ -3267,12 +3487,6 @@ export namespace dh.plot {
|
|
|
3267
3487
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3268
3488
|
}
|
|
3269
3489
|
|
|
3270
|
-
type AxisFormatTypeType = number;
|
|
3271
|
-
export class AxisFormatType {
|
|
3272
|
-
static readonly CATEGORY:AxisFormatTypeType;
|
|
3273
|
-
static readonly NUMBER:AxisFormatTypeType;
|
|
3274
|
-
}
|
|
3275
|
-
|
|
3276
3490
|
type AxisPositionType = number;
|
|
3277
3491
|
export class AxisPosition {
|
|
3278
3492
|
static readonly TOP:AxisPositionType;
|
|
@@ -3282,58 +3496,10 @@ export namespace dh.plot {
|
|
|
3282
3496
|
static readonly NONE:AxisPositionType;
|
|
3283
3497
|
}
|
|
3284
3498
|
|
|
3285
|
-
type
|
|
3286
|
-
export class
|
|
3287
|
-
static readonly
|
|
3288
|
-
static readonly
|
|
3289
|
-
static readonly SHAPE:AxisTypeType;
|
|
3290
|
-
static readonly SIZE:AxisTypeType;
|
|
3291
|
-
static readonly LABEL:AxisTypeType;
|
|
3292
|
-
static readonly COLOR:AxisTypeType;
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
/**
|
|
3296
|
-
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3297
|
-
* those series should be rendered.
|
|
3298
|
-
*/
|
|
3299
|
-
type ChartTypeType = number;
|
|
3300
|
-
export class ChartType {
|
|
3301
|
-
static readonly XY:ChartTypeType;
|
|
3302
|
-
static readonly PIE:ChartTypeType;
|
|
3303
|
-
static readonly OHLC:ChartTypeType;
|
|
3304
|
-
static readonly CATEGORY:ChartTypeType;
|
|
3305
|
-
static readonly XYZ:ChartTypeType;
|
|
3306
|
-
static readonly CATEGORY_3D:ChartTypeType;
|
|
3307
|
-
static readonly TREEMAP:ChartTypeType;
|
|
3308
|
-
}
|
|
3309
|
-
|
|
3310
|
-
/**
|
|
3311
|
-
* This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
|
|
3312
|
-
* item. For example, a point in a error-bar plot might have a X value, three Y values (Y, Y_LOW, Y_HIGH), and some
|
|
3313
|
-
* COLOR per item - the three SeriesDataSources all would share the same Axis instance, but would have different
|
|
3314
|
-
* SourceType enums set. The exact meaning of each source type will depend on the series that they are in.
|
|
3315
|
-
*/
|
|
3316
|
-
type SourceTypeType = number;
|
|
3317
|
-
export class SourceType {
|
|
3318
|
-
static readonly X:SourceTypeType;
|
|
3319
|
-
static readonly Y:SourceTypeType;
|
|
3320
|
-
static readonly Z:SourceTypeType;
|
|
3321
|
-
static readonly X_LOW:SourceTypeType;
|
|
3322
|
-
static readonly X_HIGH:SourceTypeType;
|
|
3323
|
-
static readonly Y_LOW:SourceTypeType;
|
|
3324
|
-
static readonly Y_HIGH:SourceTypeType;
|
|
3325
|
-
static readonly TIME:SourceTypeType;
|
|
3326
|
-
static readonly OPEN:SourceTypeType;
|
|
3327
|
-
static readonly HIGH:SourceTypeType;
|
|
3328
|
-
static readonly LOW:SourceTypeType;
|
|
3329
|
-
static readonly CLOSE:SourceTypeType;
|
|
3330
|
-
static readonly SHAPE:SourceTypeType;
|
|
3331
|
-
static readonly SIZE:SourceTypeType;
|
|
3332
|
-
static readonly LABEL:SourceTypeType;
|
|
3333
|
-
static readonly COLOR:SourceTypeType;
|
|
3334
|
-
static readonly PARENT:SourceTypeType;
|
|
3335
|
-
static readonly TEXT:SourceTypeType;
|
|
3336
|
-
static readonly HOVER_TEXT:SourceTypeType;
|
|
3499
|
+
type AxisFormatTypeType = number;
|
|
3500
|
+
export class AxisFormatType {
|
|
3501
|
+
static readonly CATEGORY:AxisFormatTypeType;
|
|
3502
|
+
static readonly NUMBER:AxisFormatTypeType;
|
|
3337
3503
|
}
|
|
3338
3504
|
|
|
3339
3505
|
}
|
|
@@ -3347,19 +3513,22 @@ export namespace dh.lsp {
|
|
|
3347
3513
|
constructor();
|
|
3348
3514
|
}
|
|
3349
3515
|
|
|
3350
|
-
export class
|
|
3516
|
+
export class SignatureInformation {
|
|
3351
3517
|
label:string;
|
|
3352
3518
|
documentation:MarkupContent;
|
|
3519
|
+
parameters:Array<ParameterInformation>;
|
|
3520
|
+
activeParameter:number;
|
|
3353
3521
|
|
|
3354
3522
|
constructor();
|
|
3355
3523
|
}
|
|
3356
3524
|
|
|
3357
|
-
export class
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
text:string;
|
|
3525
|
+
export class Range {
|
|
3526
|
+
start:Position;
|
|
3527
|
+
end:Position;
|
|
3361
3528
|
|
|
3362
3529
|
constructor();
|
|
3530
|
+
|
|
3531
|
+
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3363
3532
|
}
|
|
3364
3533
|
|
|
3365
3534
|
export class Hover {
|
|
@@ -3369,22 +3538,6 @@ export namespace dh.lsp {
|
|
|
3369
3538
|
constructor();
|
|
3370
3539
|
}
|
|
3371
3540
|
|
|
3372
|
-
export class TextEdit {
|
|
3373
|
-
range:Range;
|
|
3374
|
-
text:string;
|
|
3375
|
-
|
|
3376
|
-
constructor();
|
|
3377
|
-
}
|
|
3378
|
-
|
|
3379
|
-
export class Range {
|
|
3380
|
-
start:Position;
|
|
3381
|
-
end:Position;
|
|
3382
|
-
|
|
3383
|
-
constructor();
|
|
3384
|
-
|
|
3385
|
-
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3386
|
-
}
|
|
3387
|
-
|
|
3388
3541
|
export class Position {
|
|
3389
3542
|
line:number;
|
|
3390
3543
|
character:number;
|
|
@@ -3398,11 +3551,24 @@ export namespace dh.lsp {
|
|
|
3398
3551
|
copy():Position;
|
|
3399
3552
|
}
|
|
3400
3553
|
|
|
3401
|
-
export class
|
|
3554
|
+
export class TextDocumentContentChangeEvent {
|
|
3555
|
+
range:Range;
|
|
3556
|
+
rangeLength:number;
|
|
3557
|
+
text:string;
|
|
3558
|
+
|
|
3559
|
+
constructor();
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
export class TextEdit {
|
|
3563
|
+
range:Range;
|
|
3564
|
+
text:string;
|
|
3565
|
+
|
|
3566
|
+
constructor();
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
export class ParameterInformation {
|
|
3402
3570
|
label:string;
|
|
3403
3571
|
documentation:MarkupContent;
|
|
3404
|
-
parameters:Array<ParameterInformation>;
|
|
3405
|
-
activeParameter:number;
|
|
3406
3572
|
|
|
3407
3573
|
constructor();
|
|
3408
3574
|
}
|
|
@@ -3426,21 +3592,8 @@ export namespace dh.lsp {
|
|
|
3426
3592
|
|
|
3427
3593
|
}
|
|
3428
3594
|
|
|
3429
|
-
|
|
3430
3595
|
export namespace dh.calendar {
|
|
3431
3596
|
|
|
3432
|
-
export interface Holiday {
|
|
3433
|
-
/**
|
|
3434
|
-
* The date of the Holiday.
|
|
3435
|
-
* @return {@link dh.LocalDateWrapper}
|
|
3436
|
-
*/
|
|
3437
|
-
get date():dh.LocalDateWrapper;
|
|
3438
|
-
/**
|
|
3439
|
-
* The business periods that are open on the holiday.
|
|
3440
|
-
* @return dh.calendar.BusinessPeriod
|
|
3441
|
-
*/
|
|
3442
|
-
get businessPeriods():Array<BusinessPeriod>;
|
|
3443
|
-
}
|
|
3444
3597
|
export interface BusinessPeriod {
|
|
3445
3598
|
get close():string;
|
|
3446
3599
|
get open():string;
|
|
@@ -3475,6 +3628,18 @@ export namespace dh.calendar {
|
|
|
3475
3628
|
*/
|
|
3476
3629
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3477
3630
|
}
|
|
3631
|
+
export interface Holiday {
|
|
3632
|
+
/**
|
|
3633
|
+
* The date of the Holiday.
|
|
3634
|
+
* @return {@link dh.LocalDateWrapper}
|
|
3635
|
+
*/
|
|
3636
|
+
get date():dh.LocalDateWrapper;
|
|
3637
|
+
/**
|
|
3638
|
+
* The business periods that are open on the holiday.
|
|
3639
|
+
* @return dh.calendar.BusinessPeriod
|
|
3640
|
+
*/
|
|
3641
|
+
get businessPeriods():Array<BusinessPeriod>;
|
|
3642
|
+
}
|
|
3478
3643
|
|
|
3479
3644
|
type DayOfWeekType = string;
|
|
3480
3645
|
export class DayOfWeek {
|
|
@@ -3490,3 +3655,4 @@ export namespace dh.calendar {
|
|
|
3490
3655
|
}
|
|
3491
3656
|
|
|
3492
3657
|
}
|
|
3658
|
+
|