@deephaven/jsapi-types 1.0.0-dev0.35.3 → 1.0.0-dev0.36.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 +2018 -2048
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Minimum TypeScript Version: 4.3
|
|
2
2
|
// Generated using com.vertispan.tsdefs.doclet.TsDoclet
|
|
3
3
|
|
|
4
|
+
export interface IIterableResult<T> {
|
|
5
|
+
value:T;
|
|
6
|
+
done:boolean;
|
|
7
|
+
}
|
|
4
8
|
/**
|
|
5
9
|
* This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
|
|
6
10
|
* returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
|
|
@@ -11,12 +15,39 @@ export interface Iterator<T> {
|
|
|
11
15
|
hasNext():boolean;
|
|
12
16
|
next():IIterableResult<T>;
|
|
13
17
|
}
|
|
14
|
-
export interface IIterableResult<T> {
|
|
15
|
-
value:T;
|
|
16
|
-
done:boolean;
|
|
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
|
+
/**
|
|
36
|
+
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
37
|
+
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
38
|
+
* be used.
|
|
39
|
+
*/
|
|
40
|
+
export class FileContents {
|
|
41
|
+
protected constructor();
|
|
42
|
+
|
|
43
|
+
static blob(blob:Blob):FileContents;
|
|
44
|
+
static text(...text:string[]):FileContents;
|
|
45
|
+
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
46
|
+
text():Promise<string>;
|
|
47
|
+
arrayBuffer():Promise<ArrayBuffer>;
|
|
48
|
+
get etag():string;
|
|
49
|
+
}
|
|
50
|
+
|
|
20
51
|
/**
|
|
21
52
|
* Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
|
|
22
53
|
*/
|
|
@@ -75,37 +106,6 @@ export namespace dh.storage {
|
|
|
75
106
|
createDirectory(path:string):Promise<void>;
|
|
76
107
|
}
|
|
77
108
|
|
|
78
|
-
/**
|
|
79
|
-
* Storage service metadata about files and folders.
|
|
80
|
-
*/
|
|
81
|
-
export class ItemDetails {
|
|
82
|
-
protected constructor();
|
|
83
|
-
|
|
84
|
-
toString():string;
|
|
85
|
-
get filename():string;
|
|
86
|
-
get basename():string;
|
|
87
|
-
get size():number;
|
|
88
|
-
get etag():string;
|
|
89
|
-
get type():ItemTypeType;
|
|
90
|
-
get dirname():string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
95
|
-
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
96
|
-
* be used.
|
|
97
|
-
*/
|
|
98
|
-
export class FileContents {
|
|
99
|
-
protected constructor();
|
|
100
|
-
|
|
101
|
-
static blob(blob:Blob):FileContents;
|
|
102
|
-
static text(...text:string[]):FileContents;
|
|
103
|
-
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
104
|
-
text():Promise<string>;
|
|
105
|
-
arrayBuffer():Promise<ArrayBuffer>;
|
|
106
|
-
get etag():string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -122,43 +122,81 @@ export namespace dh {
|
|
|
122
122
|
get children():string[]|null;
|
|
123
123
|
get color():string|null;
|
|
124
124
|
}
|
|
125
|
+
export interface WorkerHeapInfo {
|
|
126
|
+
/**
|
|
127
|
+
* Total heap size available for this worker.
|
|
128
|
+
*/
|
|
129
|
+
get totalHeapSize():number;
|
|
130
|
+
get freeMemory():number;
|
|
131
|
+
get maximumHeapSize():number;
|
|
132
|
+
}
|
|
125
133
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
134
|
+
* Common interface for various ways of accessing table data and formatting.
|
|
135
|
+
*
|
|
136
|
+
* Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
|
|
137
|
+
* implement only abstract methods, and default methods present in this interface will dispatch accordingly.
|
|
128
138
|
*/
|
|
129
|
-
export interface
|
|
139
|
+
export interface TableData {
|
|
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;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
|
|
158
|
+
* real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
|
|
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.
|
|
180
|
+
*/
|
|
181
|
+
export interface TableViewportSubscription extends HasEventHandling {
|
|
130
182
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* @param
|
|
135
|
-
* @
|
|
183
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
184
|
+
* @param firstRow -
|
|
185
|
+
* @param lastRow -
|
|
186
|
+
* @param columns -
|
|
187
|
+
* @param updateIntervalMs -
|
|
136
188
|
*/
|
|
137
|
-
|
|
189
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
|
|
138
190
|
/**
|
|
139
|
-
*
|
|
140
|
-
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
141
|
-
* than 19 unique values.
|
|
142
|
-
* @return Map of String double
|
|
191
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
143
192
|
*/
|
|
144
|
-
|
|
193
|
+
close():void;
|
|
145
194
|
/**
|
|
146
|
-
* Gets
|
|
147
|
-
*
|
|
148
|
-
* A map of each statistic's name to its value.
|
|
149
|
-
* @return Map of String and Object
|
|
195
|
+
* Gets the data currently visible in this viewport
|
|
196
|
+
* @return Promise of {@link dh.TableData}.
|
|
150
197
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
155
|
-
*/
|
|
156
|
-
export interface LocalDateWrapper {
|
|
157
|
-
valueOf():string;
|
|
158
|
-
getYear():number;
|
|
159
|
-
getMonthValue():number;
|
|
160
|
-
getDayOfMonth():number;
|
|
161
|
-
toString():string;
|
|
198
|
+
getViewportData():Promise<TableData>;
|
|
199
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
162
200
|
}
|
|
163
201
|
/**
|
|
164
202
|
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
|
|
@@ -194,19 +232,25 @@ export namespace dh {
|
|
|
194
232
|
get modified():RangeSet;
|
|
195
233
|
get rows():Array<Row>;
|
|
196
234
|
}
|
|
197
|
-
export interface
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
235
|
+
export interface HasEventHandling {
|
|
236
|
+
/**
|
|
237
|
+
* Listen for events on this object.
|
|
238
|
+
* @param name - the name of the event to listen for
|
|
239
|
+
* @param callback - a function to call when the event occurs
|
|
240
|
+
* @return Returns a cleanup function.
|
|
241
|
+
* @typeParam T - the type of the data that the event will provide
|
|
242
|
+
*/
|
|
243
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
244
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
245
|
+
hasListeners(name:string):boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Removes an event listener added to this table.
|
|
248
|
+
* @param name -
|
|
249
|
+
* @param callback -
|
|
250
|
+
* @return
|
|
251
|
+
* @typeParam T -
|
|
252
|
+
*/
|
|
253
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
210
254
|
}
|
|
211
255
|
/**
|
|
212
256
|
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
@@ -298,49 +342,235 @@ export namespace dh {
|
|
|
298
342
|
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
299
343
|
}
|
|
300
344
|
/**
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
305
|
-
*
|
|
306
|
-
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
307
|
-
* template when fetching a new totals table, or changing the totals table in use.
|
|
308
|
-
*
|
|
309
|
-
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
310
|
-
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
311
|
-
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
312
|
-
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
313
|
-
*
|
|
314
|
-
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
315
|
-
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
345
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table,
|
|
346
|
+
* but with additional properties to reflect the tree structure.
|
|
316
347
|
*/
|
|
317
|
-
export interface
|
|
348
|
+
export interface TreeRow extends ViewportRow {
|
|
318
349
|
/**
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
* event per row in that range.
|
|
323
|
-
* @param firstRow -
|
|
324
|
-
* @param lastRow -
|
|
325
|
-
* @param columns -
|
|
326
|
-
* @param updateIntervalMs -
|
|
350
|
+
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
351
|
+
* rows below this one with a greater depth than this one
|
|
352
|
+
* @return boolean
|
|
327
353
|
*/
|
|
328
|
-
|
|
354
|
+
get isExpanded():boolean;
|
|
329
355
|
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* @return
|
|
356
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
|
|
357
|
+
* row and its expand/collapse icon
|
|
358
|
+
* @return int
|
|
333
359
|
*/
|
|
334
|
-
|
|
360
|
+
get depth():number;
|
|
335
361
|
/**
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* @
|
|
339
|
-
* @return {@link dh.Column}
|
|
362
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when
|
|
363
|
+
* the table updates, depending on the table's configuration
|
|
364
|
+
* @return boolean
|
|
340
365
|
*/
|
|
341
|
-
|
|
366
|
+
get hasChildren():boolean;
|
|
367
|
+
get index():LongWrapper;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
371
|
+
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
372
|
+
* for easier scrolling without going to the server.
|
|
373
|
+
*/
|
|
374
|
+
export interface ViewportData extends TableData {
|
|
342
375
|
/**
|
|
343
|
-
*
|
|
376
|
+
* The index of the first returned row
|
|
377
|
+
* @return double
|
|
378
|
+
*/
|
|
379
|
+
get offset():number;
|
|
380
|
+
/**
|
|
381
|
+
* A list of columns describing the data types in each row
|
|
382
|
+
* @return {@link dh.Column} array.
|
|
383
|
+
*/
|
|
384
|
+
get columns():Array<Column>;
|
|
385
|
+
/**
|
|
386
|
+
* An array of rows of data
|
|
387
|
+
* @return {@link dh.ViewportRow} array.
|
|
388
|
+
*/
|
|
389
|
+
get rows():Array<ViewportRow>;
|
|
390
|
+
}
|
|
391
|
+
export interface Row {
|
|
392
|
+
get(column:Column):any;
|
|
393
|
+
getFormat(column:Column):Format;
|
|
394
|
+
get index():LongWrapper;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
398
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
399
|
+
*
|
|
400
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
401
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
402
|
+
* backwards compatibility and to better follow JS expectations.
|
|
403
|
+
*/
|
|
404
|
+
export interface WidgetMessageDetails {
|
|
405
|
+
/**
|
|
406
|
+
* Returns the data from this message as a base64-encoded string.
|
|
407
|
+
*/
|
|
408
|
+
getDataAsBase64():string;
|
|
409
|
+
/**
|
|
410
|
+
* Returns the data from this message as a Uint8Array.
|
|
411
|
+
*/
|
|
412
|
+
getDataAsU8():Uint8Array;
|
|
413
|
+
/**
|
|
414
|
+
* Returns the data from this message as a utf-8 string.
|
|
415
|
+
*/
|
|
416
|
+
getDataAsString():string;
|
|
417
|
+
/**
|
|
418
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
419
|
+
* objects, and should close them when no longer needed.
|
|
420
|
+
*/
|
|
421
|
+
get exportedObjects():WidgetExportedObject[];
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
|
|
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.
|
|
432
|
+
*/
|
|
433
|
+
export interface LocalTimeWrapper {
|
|
434
|
+
valueOf():string;
|
|
435
|
+
getHour():number;
|
|
436
|
+
getMinute():number;
|
|
437
|
+
getSecond():number;
|
|
438
|
+
getNano():number;
|
|
439
|
+
toString():string;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
443
|
+
*/
|
|
444
|
+
export interface Format {
|
|
445
|
+
/**
|
|
446
|
+
* The format string to apply to the value of this cell.
|
|
447
|
+
* @return String
|
|
448
|
+
*/
|
|
449
|
+
readonly formatString?:string|null;
|
|
450
|
+
/**
|
|
451
|
+
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
452
|
+
* @return String
|
|
453
|
+
*/
|
|
454
|
+
readonly backgroundColor?:string|null;
|
|
455
|
+
/**
|
|
456
|
+
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
457
|
+
* @return String
|
|
458
|
+
*/
|
|
459
|
+
readonly color?:string|null;
|
|
460
|
+
/**
|
|
461
|
+
*
|
|
462
|
+
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
463
|
+
*/
|
|
464
|
+
readonly numberFormat?:string|null;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
|
|
468
|
+
* table column.
|
|
469
|
+
*/
|
|
470
|
+
export interface ColumnStatistics {
|
|
471
|
+
/**
|
|
472
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
473
|
+
* <p>
|
|
474
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
475
|
+
* @param name - the display name of the statistic
|
|
476
|
+
* @return String
|
|
477
|
+
*/
|
|
478
|
+
getType(name:string):string;
|
|
479
|
+
/**
|
|
480
|
+
* Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
|
|
481
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
482
|
+
* than 19 unique values.
|
|
483
|
+
* @return Map of String double
|
|
484
|
+
*/
|
|
485
|
+
get uniqueValues():Map<string, number>;
|
|
486
|
+
/**
|
|
487
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
488
|
+
* <p>
|
|
489
|
+
* A map of each statistic's name to its value.
|
|
490
|
+
* @return Map of String and Object
|
|
491
|
+
*/
|
|
492
|
+
get statisticsMap():Map<string, object>;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
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
|
+
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
532
|
+
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
533
|
+
*
|
|
534
|
+
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
535
|
+
*
|
|
536
|
+
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
537
|
+
* template when fetching a new totals table, or changing the totals table in use.
|
|
538
|
+
*
|
|
539
|
+
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
540
|
+
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
541
|
+
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
542
|
+
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
543
|
+
*
|
|
544
|
+
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
545
|
+
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
546
|
+
*/
|
|
547
|
+
export interface TotalsTable extends JoinableTable {
|
|
548
|
+
/**
|
|
549
|
+
* Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
|
|
550
|
+
* provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
|
|
551
|
+
* events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
|
|
552
|
+
* event per row in that range.
|
|
553
|
+
* @param firstRow -
|
|
554
|
+
* @param lastRow -
|
|
555
|
+
* @param columns -
|
|
556
|
+
* @param updateIntervalMs -
|
|
557
|
+
*/
|
|
558
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
|
|
559
|
+
/**
|
|
560
|
+
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
561
|
+
* resolve until that data is ready.
|
|
562
|
+
* @return Promise of {@link dh.TableData}
|
|
563
|
+
*/
|
|
564
|
+
getViewportData():Promise<TableData>;
|
|
565
|
+
/**
|
|
566
|
+
* a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
|
|
567
|
+
* returned value.
|
|
568
|
+
* @param key -
|
|
569
|
+
* @return {@link dh.Column}
|
|
570
|
+
*/
|
|
571
|
+
findColumn(key:string):Column;
|
|
572
|
+
/**
|
|
573
|
+
* multiple columns specified by the given names.
|
|
344
574
|
* @param keys -
|
|
345
575
|
* @return {@link dh.Column} array
|
|
346
576
|
*/
|
|
@@ -426,144 +656,169 @@ export namespace dh {
|
|
|
426
656
|
*/
|
|
427
657
|
get isRefreshing():boolean;
|
|
428
658
|
}
|
|
659
|
+
export interface TreeViewportData extends TableData {
|
|
660
|
+
get offset():number;
|
|
661
|
+
get columns():Array<Column>;
|
|
662
|
+
get rows():Array<TreeRow>;
|
|
663
|
+
}
|
|
429
664
|
/**
|
|
430
|
-
*
|
|
431
|
-
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
432
|
-
* are correctly freed.
|
|
665
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
433
666
|
*/
|
|
434
|
-
export interface
|
|
667
|
+
export interface LocalDateWrapper {
|
|
668
|
+
valueOf():string;
|
|
669
|
+
getYear():number;
|
|
670
|
+
getMonthValue():number;
|
|
671
|
+
getDayOfMonth():number;
|
|
672
|
+
toString():string;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
677
|
+
* the server to get each Table. All tables will have the same structure.
|
|
678
|
+
*/
|
|
679
|
+
export class PartitionedTable implements HasEventHandling {
|
|
435
680
|
/**
|
|
436
|
-
*
|
|
437
|
-
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
438
|
-
* {@link Widget.sendMessage}.
|
|
439
|
-
* @return the string type of this server-side object, or null.
|
|
681
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
440
682
|
*/
|
|
441
|
-
readonly
|
|
442
|
-
|
|
683
|
+
static readonly EVENT_KEYADDED:string;
|
|
443
684
|
/**
|
|
444
|
-
*
|
|
445
|
-
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
446
|
-
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
685
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
447
686
|
*/
|
|
448
|
-
|
|
687
|
+
static readonly EVENT_DISCONNECT:string;
|
|
449
688
|
/**
|
|
450
|
-
*
|
|
451
|
-
* the same instance.
|
|
452
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
689
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
453
690
|
*/
|
|
454
|
-
|
|
691
|
+
static readonly EVENT_RECONNECT:string;
|
|
455
692
|
/**
|
|
456
|
-
*
|
|
457
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
693
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
458
694
|
*/
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
695
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
696
|
+
|
|
697
|
+
protected constructor();
|
|
698
|
+
|
|
699
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
462
700
|
/**
|
|
463
|
-
*
|
|
701
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
702
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
703
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
464
704
|
*/
|
|
465
|
-
|
|
466
|
-
get freeMemory():number;
|
|
467
|
-
get maximumHeapSize():number;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
471
|
-
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
472
|
-
*
|
|
473
|
-
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
474
|
-
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
475
|
-
* backwards compatibility and to better follow JS expectations.
|
|
476
|
-
*/
|
|
477
|
-
export interface WidgetMessageDetails {
|
|
705
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
478
706
|
/**
|
|
479
|
-
*
|
|
707
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
708
|
+
* {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
|
|
709
|
+
* @return A merged representation of the constituent tables.
|
|
480
710
|
*/
|
|
481
|
-
|
|
711
|
+
getMergedTable():Promise<Table>;
|
|
482
712
|
/**
|
|
483
|
-
*
|
|
713
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
714
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
715
|
+
* @return Set of Object
|
|
484
716
|
*/
|
|
485
|
-
|
|
717
|
+
getKeys():Set<object>;
|
|
486
718
|
/**
|
|
487
|
-
*
|
|
719
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
720
|
+
* @return Promise of a Table
|
|
721
|
+
* @deprecated
|
|
488
722
|
*/
|
|
489
|
-
|
|
723
|
+
getKeyTable():Promise<Table>;
|
|
490
724
|
/**
|
|
491
|
-
*
|
|
492
|
-
*
|
|
725
|
+
* Fetch the underlying base table of the partitioned table.
|
|
726
|
+
* @return Promise of a Table
|
|
493
727
|
*/
|
|
494
|
-
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
498
|
-
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
499
|
-
* for easier scrolling without going to the server.
|
|
500
|
-
*/
|
|
501
|
-
export interface ViewportData extends TableData {
|
|
728
|
+
getBaseTable():Promise<Table>;
|
|
502
729
|
/**
|
|
503
|
-
*
|
|
504
|
-
*
|
|
730
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
731
|
+
* will not affect tables in use.
|
|
505
732
|
*/
|
|
506
|
-
|
|
733
|
+
close():void;
|
|
507
734
|
/**
|
|
508
|
-
*
|
|
509
|
-
* @return
|
|
735
|
+
* The count of known keys.
|
|
736
|
+
* @return int
|
|
510
737
|
*/
|
|
511
|
-
get
|
|
738
|
+
get size():number;
|
|
512
739
|
/**
|
|
513
|
-
* An array of
|
|
514
|
-
*
|
|
740
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
741
|
+
* non-key columns.
|
|
742
|
+
* @return Array of Column
|
|
515
743
|
*/
|
|
516
|
-
get
|
|
744
|
+
get columns():Column[];
|
|
745
|
+
/**
|
|
746
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
747
|
+
* @return Array of Column
|
|
748
|
+
*/
|
|
749
|
+
get keyColumns():Column[];
|
|
750
|
+
/**
|
|
751
|
+
* Listen for events on this object.
|
|
752
|
+
* @param name - the name of the event to listen for
|
|
753
|
+
* @param callback - a function to call when the event occurs
|
|
754
|
+
* @return Returns a cleanup function.
|
|
755
|
+
* @typeParam T - the type of the data that the event will provide
|
|
756
|
+
*/
|
|
757
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
758
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
759
|
+
hasListeners(name:string):boolean;
|
|
760
|
+
/**
|
|
761
|
+
* Removes an event listener added to this table.
|
|
762
|
+
* @param name -
|
|
763
|
+
* @param callback -
|
|
764
|
+
* @return
|
|
765
|
+
* @typeParam T -
|
|
766
|
+
*/
|
|
767
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
517
768
|
}
|
|
769
|
+
|
|
518
770
|
/**
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
* Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
|
|
522
|
-
* implement only abstract methods, and default methods present in this interface will dispatch accordingly.
|
|
771
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
523
772
|
*/
|
|
524
|
-
export
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
773
|
+
export class BigDecimalWrapper {
|
|
774
|
+
protected constructor();
|
|
775
|
+
|
|
776
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
777
|
+
asNumber():number;
|
|
778
|
+
valueOf():string;
|
|
779
|
+
toString():string;
|
|
530
780
|
}
|
|
781
|
+
|
|
531
782
|
/**
|
|
532
|
-
*
|
|
783
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
784
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
533
785
|
*/
|
|
534
|
-
export
|
|
786
|
+
export class IdeConnection implements HasEventHandling {
|
|
535
787
|
/**
|
|
536
|
-
*
|
|
537
|
-
* @return String
|
|
788
|
+
* @deprecated
|
|
538
789
|
*/
|
|
539
|
-
readonly
|
|
790
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
791
|
+
static readonly EVENT_DISCONNECT:string;
|
|
792
|
+
static readonly EVENT_RECONNECT:string;
|
|
793
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
794
|
+
|
|
540
795
|
/**
|
|
541
|
-
*
|
|
542
|
-
* @
|
|
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
|
|
543
801
|
*/
|
|
544
|
-
|
|
802
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
|
|
803
|
+
|
|
545
804
|
/**
|
|
546
|
-
*
|
|
547
|
-
* @return String
|
|
805
|
+
* closes the current connection, releasing any resources on the server or client.
|
|
548
806
|
*/
|
|
549
|
-
|
|
807
|
+
close():void;
|
|
808
|
+
running():Promise<IdeConnection>;
|
|
809
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
810
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
550
811
|
/**
|
|
551
|
-
*
|
|
552
|
-
*
|
|
812
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
813
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
814
|
+
* log messages as are presently available.
|
|
815
|
+
* @param callback -
|
|
816
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
553
817
|
*/
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
getFormat(column:Column):Format;
|
|
559
|
-
get index():LongWrapper;
|
|
560
|
-
}
|
|
561
|
-
export interface TreeViewportData extends TableData {
|
|
562
|
-
get offset():number;
|
|
563
|
-
get columns():Array<Column>;
|
|
564
|
-
get rows():Array<TreeRow>;
|
|
565
|
-
}
|
|
566
|
-
export interface HasEventHandling {
|
|
818
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
819
|
+
startSession(type:string):Promise<IdeSession>;
|
|
820
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
821
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
567
822
|
/**
|
|
568
823
|
* Listen for events on this object.
|
|
569
824
|
* @param name - the name of the event to listen for
|
|
@@ -583,1498 +838,1169 @@ export namespace dh {
|
|
|
583
838
|
*/
|
|
584
839
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
585
840
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
|
|
595
|
-
* real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
|
|
596
|
-
* <p>
|
|
597
|
-
* As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
|
|
598
|
-
* server. The setViewport method can be used to adjust this table instead of creating a new one.
|
|
599
|
-
* <p>
|
|
600
|
-
* Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
|
|
601
|
-
* to the underlying handle and accumulated data.
|
|
602
|
-
* <p>
|
|
603
|
-
* As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
|
|
604
|
-
* the idea then that the caller did not actually use this type. This means that for every exported method (which then
|
|
605
|
-
* will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
|
|
606
|
-
* version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
|
|
607
|
-
* deems it no longer in use.
|
|
608
|
-
* <p>
|
|
609
|
-
* Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
|
|
610
|
-
* true), providing a way to stop the server from streaming updates to the client.
|
|
611
|
-
*
|
|
612
|
-
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
613
|
-
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
614
|
-
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
615
|
-
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
616
|
-
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
617
|
-
*/
|
|
618
|
-
export interface TableViewportSubscription extends HasEventHandling {
|
|
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
|
+
|
|
619
848
|
/**
|
|
620
|
-
*
|
|
621
|
-
* @param
|
|
622
|
-
* @param
|
|
623
|
-
* @
|
|
624
|
-
* @param updateIntervalMs -
|
|
849
|
+
* Load the named table, with columns and size information already fully populated.
|
|
850
|
+
* @param name -
|
|
851
|
+
* @param applyPreviewColumns - optional boolean
|
|
852
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
625
853
|
*/
|
|
626
|
-
|
|
854
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
627
855
|
/**
|
|
628
|
-
*
|
|
856
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
857
|
+
* @param name -
|
|
858
|
+
* @return promise of dh.plot.Figure
|
|
629
859
|
*/
|
|
630
|
-
|
|
860
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
631
861
|
/**
|
|
632
|
-
*
|
|
633
|
-
*
|
|
862
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
863
|
+
* size is presently not available until the viewport is first set.
|
|
864
|
+
* @param name -
|
|
865
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
634
866
|
*/
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
* but with additional properties to reflect the tree structure.
|
|
641
|
-
*/
|
|
642
|
-
export interface TreeRow extends ViewportRow {
|
|
867
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
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>;
|
|
643
872
|
/**
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
* @return
|
|
873
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
874
|
+
* @param tables -
|
|
875
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
647
876
|
*/
|
|
648
|
-
|
|
877
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
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;
|
|
649
889
|
/**
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
* @
|
|
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}
|
|
653
894
|
*/
|
|
654
|
-
|
|
895
|
+
emptyTable(size:number):Promise<Table>;
|
|
655
896
|
/**
|
|
656
|
-
*
|
|
657
|
-
* the table
|
|
658
|
-
* @
|
|
897
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
898
|
+
* the table will be populated with the interval from the specified date until now.
|
|
899
|
+
* @param periodNanos -
|
|
900
|
+
* @param startTime -
|
|
901
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
659
902
|
*/
|
|
660
|
-
|
|
661
|
-
|
|
903
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
904
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
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;
|
|
662
908
|
}
|
|
909
|
+
|
|
663
910
|
/**
|
|
664
|
-
*
|
|
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.
|
|
665
916
|
*/
|
|
666
|
-
export
|
|
917
|
+
export class TreeTableConfig {
|
|
918
|
+
/**
|
|
919
|
+
* The column representing the unique ID for each item
|
|
920
|
+
*/
|
|
921
|
+
idColumn:string;
|
|
922
|
+
/**
|
|
923
|
+
* The column representing the parent ID for each item
|
|
924
|
+
*/
|
|
925
|
+
parentColumn:string;
|
|
926
|
+
/**
|
|
927
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
928
|
+
*/
|
|
929
|
+
promoteOrphansToRoot:boolean;
|
|
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;
|
|
667
942
|
valueOf():string;
|
|
668
|
-
getHour():number;
|
|
669
|
-
getMinute():number;
|
|
670
|
-
getSecond():number;
|
|
671
|
-
getNano():number;
|
|
672
943
|
toString():string;
|
|
673
944
|
}
|
|
674
945
|
|
|
675
946
|
/**
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
679
|
-
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
680
|
-
* of <b>TotalsTableConfig</b> will be supplied.
|
|
681
|
-
*
|
|
682
|
-
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
683
|
-
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
684
|
-
* expected formats.
|
|
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.
|
|
685
949
|
*/
|
|
686
|
-
export class
|
|
950
|
+
export class ConnectOptions {
|
|
951
|
+
headers:{ [key: string]: string; };
|
|
952
|
+
|
|
953
|
+
constructor();
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
958
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
959
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
960
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
961
|
+
* instance.
|
|
962
|
+
*/
|
|
963
|
+
export class FilterValue {
|
|
964
|
+
protected constructor();
|
|
965
|
+
|
|
687
966
|
/**
|
|
688
|
-
*
|
|
967
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
968
|
+
* {@link TableData.get} for DateTime values. To create
|
|
969
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
970
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
971
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
972
|
+
* @param input - the number to wrap as a FilterValue
|
|
973
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
689
974
|
*/
|
|
690
|
-
static
|
|
975
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
691
976
|
/**
|
|
692
|
-
*
|
|
977
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
978
|
+
* @param term -
|
|
979
|
+
* @return {@link dh.FilterCondition}
|
|
693
980
|
*/
|
|
694
|
-
|
|
981
|
+
eq(term:FilterValue):FilterCondition;
|
|
695
982
|
/**
|
|
696
|
-
*
|
|
983
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
984
|
+
* vs lower case
|
|
985
|
+
* @param term -
|
|
986
|
+
* @return {@link dh.FilterCondition}
|
|
697
987
|
*/
|
|
698
|
-
|
|
988
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
699
989
|
/**
|
|
700
|
-
*
|
|
990
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
991
|
+
* @param term -
|
|
992
|
+
* @return {@link dh.FilterCondition}
|
|
701
993
|
*/
|
|
702
|
-
|
|
994
|
+
notEq(term:FilterValue):FilterCondition;
|
|
703
995
|
/**
|
|
704
|
-
*
|
|
996
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
997
|
+
* upper vs lower case
|
|
998
|
+
* @param term -
|
|
999
|
+
* @return {@link dh.FilterCondition}
|
|
705
1000
|
*/
|
|
706
|
-
|
|
1001
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
707
1002
|
/**
|
|
708
|
-
*
|
|
1003
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1004
|
+
* @param term -
|
|
1005
|
+
* @return {@link dh.FilterCondition}
|
|
709
1006
|
*/
|
|
710
|
-
|
|
1007
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
711
1008
|
/**
|
|
712
|
-
*
|
|
1009
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1010
|
+
* @param term -
|
|
1011
|
+
* @return {@link dh.FilterCondition}
|
|
713
1012
|
*/
|
|
714
|
-
|
|
1013
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
715
1014
|
/**
|
|
716
|
-
*
|
|
1015
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1016
|
+
* @param term -
|
|
1017
|
+
* @return {@link dh.FilterCondition}
|
|
717
1018
|
*/
|
|
718
|
-
|
|
1019
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
719
1020
|
/**
|
|
720
|
-
*
|
|
1021
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1022
|
+
* @param term -
|
|
1023
|
+
* @return {@link dh.FilterCondition}
|
|
721
1024
|
*/
|
|
722
|
-
|
|
1025
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
723
1026
|
/**
|
|
724
|
-
*
|
|
1027
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1028
|
+
* @param terms -
|
|
1029
|
+
* @return {@link dh.FilterCondition}
|
|
725
1030
|
*/
|
|
726
|
-
|
|
1031
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
727
1032
|
/**
|
|
728
|
-
*
|
|
1033
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1034
|
+
* lower case
|
|
1035
|
+
* @param terms -
|
|
1036
|
+
* @return {@link dh.FilterCondition}
|
|
729
1037
|
*/
|
|
730
|
-
|
|
1038
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
731
1039
|
/**
|
|
732
|
-
*
|
|
1040
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1041
|
+
* @param terms -
|
|
1042
|
+
* @return {@link dh.FilterCondition}
|
|
733
1043
|
*/
|
|
734
|
-
|
|
1044
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
735
1045
|
/**
|
|
736
|
-
*
|
|
1046
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1047
|
+
* upper vs lower case
|
|
1048
|
+
* @param terms -
|
|
1049
|
+
* @return {@link dh.FilterCondition}
|
|
737
1050
|
*/
|
|
738
|
-
|
|
1051
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
739
1052
|
/**
|
|
740
|
-
*
|
|
1053
|
+
* a filter condition checking if the given value contains the given string value
|
|
1054
|
+
* @param term -
|
|
1055
|
+
* @return {@link dh.FilterCondition}
|
|
741
1056
|
*/
|
|
742
|
-
|
|
1057
|
+
contains(term:FilterValue):FilterCondition;
|
|
743
1058
|
/**
|
|
744
|
-
*
|
|
745
|
-
*
|
|
1059
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1060
|
+
* lower case
|
|
1061
|
+
* @param term -
|
|
1062
|
+
* @return {@link dh.FilterCondition}
|
|
746
1063
|
*/
|
|
747
|
-
|
|
1064
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
748
1065
|
/**
|
|
749
|
-
*
|
|
750
|
-
*
|
|
1066
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1067
|
+
* use Java regex syntax
|
|
1068
|
+
* @param pattern -
|
|
1069
|
+
* @return {@link dh.FilterCondition}
|
|
751
1070
|
*/
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
constructor();
|
|
755
|
-
|
|
756
|
-
toString():string;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
761
|
-
* this type TableMap.
|
|
762
|
-
* @deprecated
|
|
763
|
-
*/
|
|
764
|
-
export class TableMap {
|
|
765
|
-
static readonly EVENT_KEYADDED:string;
|
|
766
|
-
static readonly EVENT_DISCONNECT:string;
|
|
767
|
-
static readonly EVENT_RECONNECT:string;
|
|
768
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
769
|
-
|
|
770
|
-
protected constructor();
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
export class DateWrapper extends LongWrapper {
|
|
774
|
-
protected constructor();
|
|
775
|
-
|
|
776
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
777
|
-
asDate():Date;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
782
|
-
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
783
|
-
*/
|
|
784
|
-
export class IdeConnection implements HasEventHandling {
|
|
1071
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
785
1072
|
/**
|
|
786
|
-
*
|
|
1073
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1074
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1075
|
+
* @param pattern -
|
|
1076
|
+
* @return {@link dh.FilterCondition}
|
|
787
1077
|
*/
|
|
788
|
-
|
|
789
|
-
static readonly EVENT_DISCONNECT:string;
|
|
790
|
-
static readonly EVENT_RECONNECT:string;
|
|
791
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
792
|
-
|
|
1078
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
793
1079
|
/**
|
|
794
|
-
*
|
|
795
|
-
* @
|
|
796
|
-
* @param connectOptions - Optional Object
|
|
797
|
-
* @param fromJava - Optional boolean
|
|
798
|
-
* @deprecated
|
|
1080
|
+
* a filter condition checking if the current value is a true boolean
|
|
1081
|
+
* @return {@link dh.FilterCondition}
|
|
799
1082
|
*/
|
|
800
|
-
|
|
801
|
-
|
|
1083
|
+
isTrue():FilterCondition;
|
|
802
1084
|
/**
|
|
803
|
-
*
|
|
1085
|
+
* a filter condition checking if the current value is a false boolean
|
|
1086
|
+
* @return {@link dh.FilterCondition}
|
|
804
1087
|
*/
|
|
805
|
-
|
|
806
|
-
running():Promise<IdeConnection>;
|
|
807
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
808
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1088
|
+
isFalse():FilterCondition;
|
|
809
1089
|
/**
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
* log messages as are presently available.
|
|
813
|
-
* @param callback -
|
|
814
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1090
|
+
* a filter condition checking if the current value is a null value
|
|
1091
|
+
* @return {@link dh.FilterCondition}
|
|
815
1092
|
*/
|
|
816
|
-
|
|
817
|
-
startSession(type:string):Promise<IdeSession>;
|
|
818
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
819
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1093
|
+
isNull():FilterCondition;
|
|
820
1094
|
/**
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
1095
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
1096
|
+
* functions that can be invoked on a String:
|
|
1097
|
+
* <ul>
|
|
1098
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1099
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1100
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1101
|
+
* regular expression</li>
|
|
1102
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1103
|
+
* <p>
|
|
1104
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1105
|
+
* </p>
|
|
1106
|
+
* </li>
|
|
1107
|
+
* </ul>
|
|
1108
|
+
* @param method -
|
|
1109
|
+
* @param args -
|
|
1110
|
+
* @return
|
|
826
1111
|
*/
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
hasListeners(name:string):boolean;
|
|
1112
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
1113
|
+
toString():string;
|
|
830
1114
|
/**
|
|
831
|
-
*
|
|
832
|
-
* @param
|
|
833
|
-
* @param callback -
|
|
1115
|
+
* Constructs a string for the filter API from the given parameter.
|
|
1116
|
+
* @param input -
|
|
834
1117
|
* @return
|
|
835
|
-
* @typeParam T -
|
|
836
1118
|
*/
|
|
837
|
-
|
|
1119
|
+
static ofString(input:any):FilterValue;
|
|
1120
|
+
/**
|
|
1121
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
1122
|
+
* @param b -
|
|
1123
|
+
* @return
|
|
1124
|
+
*/
|
|
1125
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
838
1126
|
}
|
|
839
1127
|
|
|
1128
|
+
|
|
840
1129
|
/**
|
|
841
|
-
*
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
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>
|
|
851
1203
|
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
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>
|
|
854
1216
|
*/
|
|
855
|
-
export class
|
|
1217
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1218
|
+
static readonly EVENT_MESSAGE:string;
|
|
1219
|
+
static readonly EVENT_CLOSE:string;
|
|
1220
|
+
|
|
856
1221
|
protected constructor();
|
|
857
1222
|
|
|
858
1223
|
/**
|
|
859
|
-
*
|
|
860
|
-
* property at that name and validate it can be put into the given column type.
|
|
861
|
-
* @param row -
|
|
862
|
-
* @param userTimeZone -
|
|
863
|
-
* @return Promise of dh.InputTable
|
|
864
|
-
*/
|
|
865
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
866
|
-
/**
|
|
867
|
-
* Add multiple rows to a table.
|
|
868
|
-
* @param rows -
|
|
869
|
-
* @param userTimeZone -
|
|
870
|
-
* @return Promise of dh.InputTable
|
|
1224
|
+
* Ends the client connection to the server.
|
|
871
1225
|
*/
|
|
872
|
-
|
|
1226
|
+
close():void;
|
|
1227
|
+
getDataAsBase64():string;
|
|
1228
|
+
getDataAsU8():Uint8Array;
|
|
1229
|
+
getDataAsString():string;
|
|
873
1230
|
/**
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
878
|
-
* @param tableToAdd -
|
|
879
|
-
* @return Promise of dh.InputTable
|
|
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
|
|
880
1234
|
*/
|
|
881
|
-
|
|
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;
|
|
882
1240
|
/**
|
|
883
|
-
*
|
|
884
|
-
* @
|
|
885
|
-
*
|
|
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.
|
|
886
1244
|
*/
|
|
887
|
-
|
|
1245
|
+
get exportedObjects():WidgetExportedObject[];
|
|
888
1246
|
/**
|
|
889
|
-
*
|
|
890
|
-
* @
|
|
891
|
-
* @return Promise of dh.InputTable
|
|
1247
|
+
*
|
|
1248
|
+
* @return the type of this widget
|
|
892
1249
|
*/
|
|
893
|
-
|
|
1250
|
+
get type():string;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1255
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
1256
|
+
* methods return a new Sort instance.
|
|
1257
|
+
*/
|
|
1258
|
+
export class Sort {
|
|
1259
|
+
static readonly ASCENDING:string;
|
|
1260
|
+
static readonly DESCENDING:string;
|
|
1261
|
+
static readonly REVERSE:string;
|
|
1262
|
+
|
|
1263
|
+
protected constructor();
|
|
1264
|
+
|
|
894
1265
|
/**
|
|
895
|
-
*
|
|
896
|
-
* @
|
|
897
|
-
* @return
|
|
1266
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
1267
|
+
* @return {@link dh.Sort}
|
|
898
1268
|
*/
|
|
899
|
-
|
|
1269
|
+
asc():Sort;
|
|
900
1270
|
/**
|
|
901
|
-
*
|
|
902
|
-
* @return
|
|
1271
|
+
* Builds a Sort instance to sort values in descending order.
|
|
1272
|
+
* @return {@link dh.Sort}
|
|
903
1273
|
*/
|
|
904
|
-
|
|
1274
|
+
desc():Sort;
|
|
905
1275
|
/**
|
|
906
|
-
*
|
|
907
|
-
* @return
|
|
1276
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1277
|
+
* @return {@link dh.Sort}
|
|
908
1278
|
*/
|
|
909
|
-
|
|
1279
|
+
abs():Sort;
|
|
1280
|
+
toString():string;
|
|
910
1281
|
/**
|
|
911
|
-
*
|
|
912
|
-
* @return
|
|
1282
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1283
|
+
* @return boolean
|
|
913
1284
|
*/
|
|
914
|
-
get
|
|
1285
|
+
get isAbs():boolean;
|
|
915
1286
|
/**
|
|
916
|
-
*
|
|
917
|
-
* @return {@link dh.Column}
|
|
1287
|
+
* The column which is sorted.
|
|
1288
|
+
* @return {@link dh.Column}
|
|
918
1289
|
*/
|
|
919
|
-
get
|
|
1290
|
+
get column():Column;
|
|
920
1291
|
/**
|
|
921
|
-
* The
|
|
922
|
-
* @return
|
|
1292
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
1293
|
+
* @return String
|
|
923
1294
|
*/
|
|
924
|
-
get
|
|
1295
|
+
get direction():string;
|
|
925
1296
|
}
|
|
926
1297
|
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1298
|
+
export class CustomColumn {
|
|
1299
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
1300
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1301
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
1302
|
+
static readonly TYPE_NEW:string;
|
|
1303
|
+
|
|
933
1304
|
protected constructor();
|
|
934
1305
|
|
|
1306
|
+
valueOf():string;
|
|
1307
|
+
toString():string;
|
|
935
1308
|
/**
|
|
936
|
-
*
|
|
937
|
-
* @return
|
|
938
|
-
*/
|
|
939
|
-
not():FilterCondition;
|
|
940
|
-
/**
|
|
941
|
-
* a condition representing the current condition logically ANDed with the other parameters
|
|
942
|
-
* @param filters -
|
|
943
|
-
* @return FilterCondition
|
|
944
|
-
*/
|
|
945
|
-
and(...filters:FilterCondition[]):FilterCondition;
|
|
946
|
-
/**
|
|
947
|
-
* a condition representing the current condition logically ORed with the other parameters
|
|
948
|
-
* @param filters -
|
|
949
|
-
* @return FilterCondition.
|
|
1309
|
+
* The expression to evaluate this custom column.
|
|
1310
|
+
* @return String
|
|
950
1311
|
*/
|
|
951
|
-
|
|
1312
|
+
get expression():string;
|
|
952
1313
|
/**
|
|
953
|
-
*
|
|
954
|
-
* @return String
|
|
1314
|
+
* The name of the column to use.
|
|
1315
|
+
* @return String
|
|
955
1316
|
*/
|
|
956
|
-
|
|
957
|
-
get columns():Array<Column>;
|
|
1317
|
+
get name():string;
|
|
958
1318
|
/**
|
|
959
|
-
*
|
|
960
|
-
*
|
|
1319
|
+
* Type of custom column. One of
|
|
1320
|
+
*
|
|
961
1321
|
* <ul>
|
|
962
|
-
* <li
|
|
963
|
-
*
|
|
964
|
-
* <li
|
|
965
|
-
* <li
|
|
966
|
-
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
967
|
-
* "not a number"</i></li>
|
|
968
|
-
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
969
|
-
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
970
|
-
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
971
|
-
* expression</li>
|
|
972
|
-
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
973
|
-
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
974
|
-
* <p>
|
|
975
|
-
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
976
|
-
* method should be used in other cases
|
|
977
|
-
* </p>
|
|
978
|
-
* </li>
|
|
1322
|
+
* <li>FORMAT_COLOR</li>
|
|
1323
|
+
* <li>FORMAT_NUMBER</li>
|
|
1324
|
+
* <li>FORMAT_DATE</li>
|
|
1325
|
+
* <li>NEW</li>
|
|
979
1326
|
* </ul>
|
|
980
|
-
* @
|
|
981
|
-
* @param args -
|
|
982
|
-
* @return dh.FilterCondition
|
|
983
|
-
*/
|
|
984
|
-
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
985
|
-
/**
|
|
986
|
-
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
987
|
-
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
988
|
-
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
989
|
-
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
990
|
-
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
991
|
-
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
992
|
-
* {@link dh.Column.filter}).
|
|
993
|
-
* @param value -
|
|
994
|
-
* @param columns -
|
|
995
|
-
* @return dh.FilterCondition
|
|
1327
|
+
* @return String
|
|
996
1328
|
*/
|
|
997
|
-
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
export class LoginCredentials {
|
|
1001
|
-
type?:string|null;
|
|
1002
|
-
username?:string|null;
|
|
1003
|
-
token?:string|null;
|
|
1004
|
-
|
|
1005
|
-
constructor();
|
|
1329
|
+
get type():string;
|
|
1006
1330
|
}
|
|
1007
1331
|
|
|
1008
1332
|
/**
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1333
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1334
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1335
|
+
* inform the UI right away that they have taken place.
|
|
1011
1336
|
*/
|
|
1012
|
-
export class
|
|
1013
|
-
/**
|
|
1014
|
-
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1015
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1016
|
-
* @return String
|
|
1017
|
-
*/
|
|
1018
|
-
readonly constituentType?:string|null;
|
|
1337
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
1019
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;
|
|
1020
1355
|
|
|
1021
1356
|
protected constructor();
|
|
1022
1357
|
|
|
1358
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1023
1359
|
/**
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
* @
|
|
1360
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
1361
|
+
* caching a returned value.
|
|
1362
|
+
* @param key -
|
|
1363
|
+
* @return {@link dh.Column}
|
|
1027
1364
|
*/
|
|
1028
|
-
|
|
1029
|
-
getFormat(row:Row):Format;
|
|
1365
|
+
findColumn(key:string):Column;
|
|
1030
1366
|
/**
|
|
1031
|
-
*
|
|
1032
|
-
* @
|
|
1367
|
+
* Retrieve multiple columns specified by the given names.
|
|
1368
|
+
* @param keys -
|
|
1369
|
+
* @return {@link dh.Column} array
|
|
1033
1370
|
*/
|
|
1034
|
-
|
|
1371
|
+
findColumns(keys:string[]):Column[];
|
|
1372
|
+
isBlinkTable():boolean;
|
|
1035
1373
|
/**
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1038
|
-
* @return
|
|
1374
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
1375
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
1376
|
+
* @return Promise of dh.InputTable
|
|
1039
1377
|
*/
|
|
1040
|
-
|
|
1378
|
+
inputTable():Promise<InputTable>;
|
|
1041
1379
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* @param expression -
|
|
1044
|
-
* @return {@link dh.CustomColumn}
|
|
1380
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
1045
1381
|
*/
|
|
1046
|
-
|
|
1382
|
+
close():void;
|
|
1383
|
+
getAttributes():string[];
|
|
1047
1384
|
/**
|
|
1048
|
-
* a
|
|
1049
|
-
*
|
|
1050
|
-
* @
|
|
1385
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
1386
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
1387
|
+
* @param attributeName -
|
|
1388
|
+
* @return Object
|
|
1051
1389
|
*/
|
|
1052
|
-
|
|
1390
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
1053
1391
|
/**
|
|
1054
|
-
*
|
|
1055
|
-
*
|
|
1056
|
-
*
|
|
1392
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
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
|
|
1057
1399
|
*/
|
|
1058
|
-
|
|
1059
|
-
toString():string;
|
|
1400
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1060
1401
|
/**
|
|
1061
|
-
*
|
|
1062
|
-
*
|
|
1402
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
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
|
|
1063
1409
|
*/
|
|
1064
|
-
|
|
1410
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1065
1411
|
/**
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
1068
|
-
* @return
|
|
1412
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
1413
|
+
* @param customColumns -
|
|
1414
|
+
* @return {@link dh.CustomColumn} array
|
|
1069
1415
|
*/
|
|
1070
|
-
|
|
1416
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1071
1417
|
/**
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1418
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
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}
|
|
1075
1428
|
*/
|
|
1076
|
-
|
|
1077
|
-
get isSortable():boolean;
|
|
1429
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
|
|
1078
1430
|
/**
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1431
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
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}
|
|
1081
1436
|
*/
|
|
1082
|
-
|
|
1437
|
+
getViewportData():Promise<TableData>;
|
|
1083
1438
|
/**
|
|
1084
|
-
*
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
*
|
|
1439
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
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}
|
|
1088
1448
|
*/
|
|
1089
|
-
|
|
1449
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
1090
1450
|
/**
|
|
1091
|
-
* a
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
1094
|
-
* @
|
|
1095
|
-
|
|
1096
|
-
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
export class LongWrapper {
|
|
1100
|
-
protected constructor();
|
|
1101
|
-
|
|
1102
|
-
static ofString(str:string):LongWrapper;
|
|
1103
|
-
asNumber():number;
|
|
1104
|
-
valueOf():string;
|
|
1105
|
-
toString():string;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* Deprecated for use in Deephaven Core.
|
|
1110
|
-
* @deprecated
|
|
1111
|
-
*/
|
|
1112
|
-
export class Client {
|
|
1113
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1114
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
1115
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1116
|
-
|
|
1117
|
-
constructor();
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1122
|
-
* interpret these responses to see what to render, or how to respond.
|
|
1123
|
-
* <p>
|
|
1124
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1125
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1126
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1127
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1128
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
1129
|
-
* <p>
|
|
1130
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1131
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1132
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1133
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1134
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1135
|
-
* <p>
|
|
1136
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1137
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1138
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1139
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1140
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1141
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1142
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1143
|
-
* <p>
|
|
1144
|
-
* This can suggest several patterns for how plugins operate:
|
|
1145
|
-
* <ul>
|
|
1146
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1147
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1148
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1149
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1150
|
-
* provided to the JS API consumer.</li>
|
|
1151
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1152
|
-
* which provided them. One concrete example of this could have been
|
|
1153
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1154
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1155
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1156
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1157
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1158
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1159
|
-
* an internal table instance.</li>
|
|
1160
|
-
* </ul>
|
|
1161
|
-
*
|
|
1162
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1163
|
-
* <ul>
|
|
1164
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1165
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1166
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1167
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1168
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
1169
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1170
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1171
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1172
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1173
|
-
* </ul>
|
|
1174
|
-
*/
|
|
1175
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1176
|
-
static readonly EVENT_MESSAGE:string;
|
|
1177
|
-
static readonly EVENT_CLOSE:string;
|
|
1178
|
-
|
|
1179
|
-
protected constructor();
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* Ends the client connection to the server.
|
|
1183
|
-
*/
|
|
1184
|
-
close():void;
|
|
1185
|
-
getDataAsBase64():string;
|
|
1186
|
-
getDataAsU8():Uint8Array;
|
|
1187
|
-
getDataAsString():string;
|
|
1188
|
-
/**
|
|
1189
|
-
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1190
|
-
* @param msg - string/buffer/view instance that represents data to send
|
|
1191
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
1192
|
-
*/
|
|
1193
|
-
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1194
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1195
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1196
|
-
hasListeners(name:string):boolean;
|
|
1197
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1198
|
-
/**
|
|
1199
|
-
*
|
|
1200
|
-
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1201
|
-
* them when finished using them.
|
|
1202
|
-
*/
|
|
1203
|
-
get exportedObjects():WidgetExportedObject[];
|
|
1204
|
-
/**
|
|
1205
|
-
*
|
|
1206
|
-
* @return the type of this widget
|
|
1207
|
-
*/
|
|
1208
|
-
get type():string;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
/**
|
|
1213
|
-
* Event fired when a command is issued from the client.
|
|
1214
|
-
*/
|
|
1215
|
-
export class CommandInfo {
|
|
1216
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1217
|
-
|
|
1218
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
1219
|
-
get code():string;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1224
|
-
* mechanism, and so reimplemented here.
|
|
1225
|
-
* <p>
|
|
1226
|
-
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1227
|
-
* <p>
|
|
1228
|
-
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1229
|
-
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1230
|
-
* <p>
|
|
1231
|
-
* The table size will be -1 until a viewport has been fetched.
|
|
1232
|
-
* <p>
|
|
1233
|
-
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1234
|
-
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1235
|
-
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1236
|
-
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1237
|
-
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1238
|
-
* the viewport).
|
|
1239
|
-
* <p>
|
|
1240
|
-
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1241
|
-
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1242
|
-
* <p>
|
|
1243
|
-
* <ul>
|
|
1244
|
-
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1245
|
-
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1246
|
-
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1247
|
-
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1248
|
-
* new operation is pending.</li>
|
|
1249
|
-
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
1250
|
-
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
1251
|
-
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1252
|
-
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1253
|
-
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1254
|
-
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1255
|
-
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1256
|
-
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1257
|
-
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1258
|
-
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1259
|
-
* where {@link TreeRow.hasChildren} is false will be different from usual.</li>
|
|
1260
|
-
* </ul>
|
|
1261
|
-
*/
|
|
1262
|
-
export class TreeTable implements HasEventHandling {
|
|
1263
|
-
/**
|
|
1264
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1265
|
-
*/
|
|
1266
|
-
static readonly EVENT_UPDATED:string;
|
|
1267
|
-
/**
|
|
1268
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1269
|
-
*/
|
|
1270
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1271
|
-
/**
|
|
1272
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1273
|
-
*/
|
|
1274
|
-
static readonly EVENT_RECONNECT:string;
|
|
1275
|
-
/**
|
|
1276
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1277
|
-
*/
|
|
1278
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1279
|
-
/**
|
|
1280
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1281
|
-
*/
|
|
1282
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1283
|
-
readonly description?:string|null;
|
|
1284
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1285
|
-
|
|
1286
|
-
protected constructor();
|
|
1287
|
-
|
|
1288
|
-
/**
|
|
1289
|
-
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1290
|
-
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1291
|
-
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1292
|
-
* boolean parameter.
|
|
1293
|
-
* @param row -
|
|
1294
|
-
* @param expandDescendants -
|
|
1295
|
-
*/
|
|
1296
|
-
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1297
|
-
/**
|
|
1298
|
-
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1299
|
-
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1300
|
-
* @param row -
|
|
1301
|
-
*/
|
|
1302
|
-
collapse(row:TreeRow|number):void;
|
|
1303
|
-
/**
|
|
1304
|
-
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1305
|
-
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1306
|
-
* is true, then its children will also be expanded.
|
|
1307
|
-
* @param row -
|
|
1308
|
-
* @param isExpanded -
|
|
1309
|
-
* @param expandDescendants -
|
|
1310
|
-
*/
|
|
1311
|
-
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1312
|
-
expandAll():void;
|
|
1313
|
-
collapseAll():void;
|
|
1314
|
-
/**
|
|
1315
|
-
* true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
|
|
1316
|
-
* is available
|
|
1317
|
-
* @param row -
|
|
1318
|
-
* @return boolean
|
|
1319
|
-
*/
|
|
1320
|
-
isExpanded(row:TreeRow|number):boolean;
|
|
1321
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1322
|
-
getViewportData():Promise<TreeViewportData>;
|
|
1323
|
-
/**
|
|
1324
|
-
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1325
|
-
*/
|
|
1326
|
-
close():void;
|
|
1327
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
1328
|
-
/**
|
|
1329
|
-
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1330
|
-
* @param sort -
|
|
1331
|
-
* @return {@link dh.Sort} array
|
|
1332
|
-
*/
|
|
1333
|
-
applySort(sort:Sort[]):Array<Sort>;
|
|
1334
|
-
/**
|
|
1335
|
-
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1336
|
-
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1337
|
-
* condition. Returns the previous sort in use.
|
|
1338
|
-
* @param filter -
|
|
1339
|
-
* @return {@link dh.FilterCondition} array
|
|
1340
|
-
*/
|
|
1341
|
-
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1342
|
-
/**
|
|
1343
|
-
* a column with the given name, or throws an exception if it cannot be found
|
|
1344
|
-
* @param key -
|
|
1345
|
-
* @return {@link dh.Column}
|
|
1346
|
-
*/
|
|
1347
|
-
findColumn(key:string):Column;
|
|
1348
|
-
/**
|
|
1349
|
-
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
1350
|
-
* @param keys -
|
|
1351
|
-
* @return {@link dh.Column} array
|
|
1352
|
-
*/
|
|
1353
|
-
findColumns(keys:string[]):Column[];
|
|
1354
|
-
/**
|
|
1355
|
-
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
1356
|
-
* values for the given columns in the source table:
|
|
1357
|
-
* <ul>
|
|
1358
|
-
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1359
|
-
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1360
|
-
* the tree.</li>
|
|
1361
|
-
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1362
|
-
* in the resulting table.</li>
|
|
1363
|
-
* </ul>
|
|
1451
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
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
|
|
1364
1456
|
*/
|
|
1365
1457
|
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1366
|
-
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1367
|
-
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1368
|
-
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1369
|
-
/**
|
|
1370
|
-
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1371
|
-
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1372
|
-
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1373
|
-
* state is also not copied.
|
|
1374
|
-
* @return Promise of dh.TreeTable
|
|
1375
|
-
*/
|
|
1376
|
-
copy():Promise<TreeTable>;
|
|
1377
|
-
/**
|
|
1378
|
-
* The current filter configuration of this Tree Table.
|
|
1379
|
-
* @return {@link dh.FilterCondition} array
|
|
1380
|
-
*/
|
|
1381
|
-
get filter():Array<FilterCondition>;
|
|
1382
|
-
/**
|
|
1383
|
-
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
1384
|
-
* @return boolean
|
|
1385
|
-
*/
|
|
1386
|
-
get includeConstituents():boolean;
|
|
1387
|
-
get groupedColumns():Array<Column>;
|
|
1388
|
-
/**
|
|
1389
|
-
* True if this table has been closed.
|
|
1390
|
-
* @return boolean
|
|
1391
|
-
*/
|
|
1392
|
-
get isClosed():boolean;
|
|
1393
|
-
/**
|
|
1394
|
-
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
1395
|
-
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1396
|
-
* when considering collapse/expand states).
|
|
1397
|
-
* @return double
|
|
1398
|
-
*/
|
|
1399
|
-
get size():number;
|
|
1400
|
-
/**
|
|
1401
|
-
* The columns that can be shown in this Tree Table.
|
|
1402
|
-
* @return {@link dh.Column} array
|
|
1403
|
-
*/
|
|
1404
|
-
get columns():Array<Column>;
|
|
1405
|
-
/**
|
|
1406
|
-
* The current sort configuration of this Tree Table
|
|
1407
|
-
* @return {@link dh.Sort} array.
|
|
1408
|
-
*/
|
|
1409
|
-
get sort():Array<Sort>;
|
|
1410
|
-
/**
|
|
1411
|
-
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1412
|
-
* initial snapshot.
|
|
1413
|
-
* @return boolean
|
|
1414
|
-
*/
|
|
1415
|
-
get isRefreshing():boolean;
|
|
1416
|
-
/**
|
|
1417
|
-
* Listen for events on this object.
|
|
1418
|
-
* @param name - the name of the event to listen for
|
|
1419
|
-
* @param callback - a function to call when the event occurs
|
|
1420
|
-
* @return Returns a cleanup function.
|
|
1421
|
-
* @typeParam T - the type of the data that the event will provide
|
|
1422
|
-
*/
|
|
1423
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1424
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1425
|
-
hasListeners(name:string):boolean;
|
|
1426
|
-
/**
|
|
1427
|
-
* Removes an event listener added to this table.
|
|
1428
|
-
* @param name -
|
|
1429
|
-
* @param callback -
|
|
1430
|
-
* @return
|
|
1431
|
-
* @typeParam T -
|
|
1432
|
-
*/
|
|
1433
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
export class QueryInfo {
|
|
1437
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
1438
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1439
|
-
static readonly EVENT_RECONNECT:string;
|
|
1440
|
-
static readonly EVENT_CONNECT:string;
|
|
1441
|
-
|
|
1442
|
-
protected constructor();
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
/**
|
|
1446
|
-
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1447
|
-
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1448
|
-
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1449
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1450
|
-
* instance.
|
|
1451
|
-
*/
|
|
1452
|
-
export class FilterValue {
|
|
1453
|
-
protected constructor();
|
|
1454
|
-
|
|
1455
1458
|
/**
|
|
1456
|
-
*
|
|
1457
|
-
*
|
|
1458
|
-
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1459
|
-
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1460
|
-
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1461
|
-
* @param input - the number to wrap as a FilterValue
|
|
1462
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1463
|
-
*/
|
|
1464
|
-
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1465
|
-
/**
|
|
1466
|
-
* a filter condition checking if the current value is equal to the given parameter
|
|
1467
|
-
* @param term -
|
|
1468
|
-
* @return {@link dh.FilterCondition}
|
|
1469
|
-
*/
|
|
1470
|
-
eq(term:FilterValue):FilterCondition;
|
|
1471
|
-
/**
|
|
1472
|
-
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1473
|
-
* vs lower case
|
|
1474
|
-
* @param term -
|
|
1475
|
-
* @return {@link dh.FilterCondition}
|
|
1476
|
-
*/
|
|
1477
|
-
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1478
|
-
/**
|
|
1479
|
-
* a filter condition checking if the current value is not equal to the given parameter
|
|
1480
|
-
* @param term -
|
|
1481
|
-
* @return {@link dh.FilterCondition}
|
|
1482
|
-
*/
|
|
1483
|
-
notEq(term:FilterValue):FilterCondition;
|
|
1484
|
-
/**
|
|
1485
|
-
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1486
|
-
* upper vs lower case
|
|
1487
|
-
* @param term -
|
|
1488
|
-
* @return {@link dh.FilterCondition}
|
|
1489
|
-
*/
|
|
1490
|
-
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1491
|
-
/**
|
|
1492
|
-
* a filter condition checking if the current value is greater than the given parameter
|
|
1493
|
-
* @param term -
|
|
1494
|
-
* @return {@link dh.FilterCondition}
|
|
1495
|
-
*/
|
|
1496
|
-
greaterThan(term:FilterValue):FilterCondition;
|
|
1497
|
-
/**
|
|
1498
|
-
* a filter condition checking if the current value is less than the given parameter
|
|
1499
|
-
* @param term -
|
|
1500
|
-
* @return {@link dh.FilterCondition}
|
|
1501
|
-
*/
|
|
1502
|
-
lessThan(term:FilterValue):FilterCondition;
|
|
1503
|
-
/**
|
|
1504
|
-
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1505
|
-
* @param term -
|
|
1506
|
-
* @return {@link dh.FilterCondition}
|
|
1507
|
-
*/
|
|
1508
|
-
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1509
|
-
/**
|
|
1510
|
-
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1511
|
-
* @param term -
|
|
1512
|
-
* @return {@link dh.FilterCondition}
|
|
1459
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1460
|
+
* @return Promise of dh.Table
|
|
1513
1461
|
*/
|
|
1514
|
-
|
|
1462
|
+
copy():Promise<Table>;
|
|
1515
1463
|
/**
|
|
1516
|
-
* a
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1464
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
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
|
|
1519
1470
|
*/
|
|
1520
|
-
|
|
1471
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1521
1472
|
/**
|
|
1522
|
-
* a
|
|
1523
|
-
*
|
|
1524
|
-
* @param
|
|
1525
|
-
* @return
|
|
1473
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
1474
|
+
* above for more specifics.
|
|
1475
|
+
* @param config -
|
|
1476
|
+
* @return promise of dh.TotalsTable
|
|
1526
1477
|
*/
|
|
1527
|
-
|
|
1478
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1528
1479
|
/**
|
|
1529
|
-
* a
|
|
1530
|
-
*
|
|
1531
|
-
* @
|
|
1480
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
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
|
|
1532
1484
|
*/
|
|
1533
|
-
|
|
1485
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
1534
1486
|
/**
|
|
1535
|
-
* a
|
|
1536
|
-
*
|
|
1537
|
-
* @param
|
|
1538
|
-
* @return
|
|
1487
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
1488
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
1489
|
+
* @param configObject -
|
|
1490
|
+
* @return Promise dh.TreeTable
|
|
1539
1491
|
*/
|
|
1540
|
-
|
|
1492
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
1541
1493
|
/**
|
|
1542
|
-
* a
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1494
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
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
|
|
1545
1498
|
*/
|
|
1546
|
-
|
|
1499
|
+
freeze():Promise<Table>;
|
|
1500
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1547
1501
|
/**
|
|
1548
|
-
*
|
|
1549
|
-
*
|
|
1550
|
-
* @
|
|
1551
|
-
* @return {@link dh.FilterCondition}
|
|
1502
|
+
*
|
|
1503
|
+
* @inheritDoc
|
|
1504
|
+
* @deprecated
|
|
1552
1505
|
*/
|
|
1553
|
-
|
|
1506
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
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>;
|
|
1554
1512
|
/**
|
|
1555
|
-
* a
|
|
1556
|
-
*
|
|
1557
|
-
* @param
|
|
1558
|
-
* @
|
|
1513
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
1514
|
+
* keys.
|
|
1515
|
+
* @param keys -
|
|
1516
|
+
* @param dropKeys -
|
|
1517
|
+
* @return Promise dh.PartitionedTable
|
|
1559
1518
|
*/
|
|
1560
|
-
|
|
1519
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1561
1520
|
/**
|
|
1562
|
-
* a
|
|
1563
|
-
*
|
|
1564
|
-
* @
|
|
1565
|
-
* @return {@link dh.FilterCondition}
|
|
1521
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
1522
|
+
* @param column -
|
|
1523
|
+
* @return Promise of dh.ColumnStatistics
|
|
1566
1524
|
*/
|
|
1567
|
-
|
|
1525
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
1568
1526
|
/**
|
|
1569
|
-
*
|
|
1570
|
-
* @
|
|
1527
|
+
* Seek the row matching the data provided
|
|
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.
|
|
1571
1537
|
*/
|
|
1572
|
-
|
|
1538
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
1539
|
+
toString():string;
|
|
1573
1540
|
/**
|
|
1574
|
-
* a
|
|
1575
|
-
*
|
|
1541
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
1542
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
1543
|
+
* @return boolean
|
|
1576
1544
|
*/
|
|
1577
|
-
|
|
1545
|
+
get hasInputTable():boolean;
|
|
1578
1546
|
/**
|
|
1579
|
-
*
|
|
1580
|
-
*
|
|
1547
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
1548
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
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
|
|
1581
1552
|
*/
|
|
1582
|
-
|
|
1553
|
+
get columns():Array<Column>;
|
|
1583
1554
|
/**
|
|
1584
|
-
*
|
|
1585
|
-
*
|
|
1586
|
-
* <ul>
|
|
1587
|
-
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1588
|
-
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1589
|
-
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1590
|
-
* regular expression</li>
|
|
1591
|
-
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1592
|
-
* <p>
|
|
1593
|
-
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1594
|
-
* </p>
|
|
1595
|
-
* </li>
|
|
1596
|
-
* </ul>
|
|
1597
|
-
* @param method -
|
|
1598
|
-
* @param args -
|
|
1599
|
-
* @return
|
|
1555
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
1556
|
+
* @return dh.TotalsTableConfig
|
|
1600
1557
|
*/
|
|
1601
|
-
|
|
1602
|
-
toString():string;
|
|
1558
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
1603
1559
|
/**
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
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
|
|
1607
1564
|
*/
|
|
1608
|
-
|
|
1565
|
+
get sort():Array<Sort>;
|
|
1609
1566
|
/**
|
|
1610
|
-
*
|
|
1611
|
-
*
|
|
1612
|
-
* @return
|
|
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
|
|
1613
1570
|
*/
|
|
1614
|
-
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1619
|
-
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1620
|
-
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1621
|
-
*/
|
|
1622
|
-
export class RangeSet {
|
|
1623
|
-
protected constructor();
|
|
1624
|
-
|
|
1625
|
-
static ofRange(first:number, last:number):RangeSet;
|
|
1626
|
-
static ofItems(rows:number[]):RangeSet;
|
|
1627
|
-
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
1628
|
-
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
1571
|
+
get customColumns():Array<CustomColumn>;
|
|
1629
1572
|
/**
|
|
1630
|
-
*
|
|
1631
|
-
*
|
|
1573
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1574
|
+
* initial snapshot.
|
|
1575
|
+
* @return boolean
|
|
1632
1576
|
*/
|
|
1633
|
-
|
|
1577
|
+
get isRefreshing():boolean;
|
|
1634
1578
|
/**
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
* @return
|
|
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
|
|
1639
1583
|
*/
|
|
1640
|
-
get
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
/**
|
|
1644
|
-
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1645
|
-
*/
|
|
1646
|
-
export class BigIntegerWrapper {
|
|
1647
|
-
protected constructor();
|
|
1648
|
-
|
|
1649
|
-
static ofString(str:string):BigIntegerWrapper;
|
|
1650
|
-
asNumber():number;
|
|
1651
|
-
valueOf():string;
|
|
1652
|
-
toString():string;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
export class CoreClient implements HasEventHandling {
|
|
1656
|
-
static readonly EVENT_CONNECT:string;
|
|
1657
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1658
|
-
static readonly EVENT_RECONNECT:string;
|
|
1659
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1660
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1661
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1662
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
1663
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1664
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1665
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1666
|
-
|
|
1667
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1668
|
-
|
|
1669
|
-
running():Promise<CoreClient>;
|
|
1670
|
-
getServerUrl():string;
|
|
1671
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
1672
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
1673
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
1674
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1675
|
-
getServerConfigValues():Promise<string[][]>;
|
|
1676
|
-
getStorageService():dh.storage.StorageService;
|
|
1677
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
1678
|
-
disconnect():void;
|
|
1679
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1680
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1681
|
-
hasListeners(name:string):boolean;
|
|
1682
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
export class CustomColumn {
|
|
1686
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
1687
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1688
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
1689
|
-
static readonly TYPE_NEW:string;
|
|
1690
|
-
|
|
1691
|
-
protected constructor();
|
|
1692
|
-
|
|
1693
|
-
valueOf():string;
|
|
1694
|
-
toString():string;
|
|
1584
|
+
get filter():Array<FilterCondition>;
|
|
1695
1585
|
/**
|
|
1696
|
-
* The
|
|
1697
|
-
*
|
|
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
|
|
1698
1591
|
*/
|
|
1699
|
-
get
|
|
1592
|
+
get totalSize():number;
|
|
1700
1593
|
/**
|
|
1701
|
-
* The
|
|
1702
|
-
*
|
|
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
|
|
1703
1598
|
*/
|
|
1704
|
-
get
|
|
1599
|
+
get size():number;
|
|
1705
1600
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
1708
|
-
* <ul>
|
|
1709
|
-
* <li>FORMAT_COLOR</li>
|
|
1710
|
-
* <li>FORMAT_NUMBER</li>
|
|
1711
|
-
* <li>FORMAT_DATE</li>
|
|
1712
|
-
* <li>NEW</li>
|
|
1713
|
-
* </ul>
|
|
1714
|
-
* @return String
|
|
1601
|
+
* True if this table has been closed.
|
|
1602
|
+
* @return boolean
|
|
1715
1603
|
*/
|
|
1716
|
-
get
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
/**
|
|
1720
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1721
|
-
*/
|
|
1722
|
-
export class BigDecimalWrapper {
|
|
1723
|
-
protected constructor();
|
|
1724
|
-
|
|
1725
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
1726
|
-
asNumber():number;
|
|
1727
|
-
valueOf():string;
|
|
1728
|
-
toString():string;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
/**
|
|
1732
|
-
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1733
|
-
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
1734
|
-
*
|
|
1735
|
-
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1736
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1737
|
-
* forward data to it.
|
|
1738
|
-
*
|
|
1739
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1740
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1741
|
-
* viewports to make it less expensive to compute for large tables.
|
|
1742
|
-
*/
|
|
1743
|
-
export class TableSubscription implements HasEventHandling {
|
|
1604
|
+
get isClosed():boolean;
|
|
1744
1605
|
/**
|
|
1745
|
-
*
|
|
1746
|
-
* <b>
|
|
1747
|
-
*
|
|
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
|
|
1748
1610
|
*/
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
protected constructor();
|
|
1752
|
-
|
|
1611
|
+
get isUncoalesced():boolean;
|
|
1753
1612
|
/**
|
|
1754
|
-
*
|
|
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
|
|
1755
1618
|
*/
|
|
1756
|
-
close():void;
|
|
1757
1619
|
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1758
1620
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1759
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
|
+
*/
|
|
1760
1629
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1761
1630
|
/**
|
|
1762
|
-
*
|
|
1763
|
-
*
|
|
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}
|
|
1764
1634
|
*/
|
|
1765
|
-
|
|
1635
|
+
static reverse():Sort;
|
|
1766
1636
|
}
|
|
1767
1637
|
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
*/
|
|
1772
|
-
export class RollupConfig {
|
|
1773
|
-
/**
|
|
1774
|
-
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
1775
|
-
*/
|
|
1776
|
-
groupingColumns:Array<String>;
|
|
1777
|
-
/**
|
|
1778
|
-
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1779
|
-
* roll-up table.
|
|
1780
|
-
*/
|
|
1781
|
-
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
1638
|
+
export class Ide {
|
|
1639
|
+
constructor();
|
|
1640
|
+
|
|
1782
1641
|
/**
|
|
1783
|
-
*
|
|
1784
|
-
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
1785
|
-
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1786
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1642
|
+
* @deprecated
|
|
1787
1643
|
*/
|
|
1788
|
-
|
|
1789
|
-
includeOriginalColumns?:boolean|null;
|
|
1644
|
+
getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1790
1645
|
/**
|
|
1791
|
-
*
|
|
1646
|
+
* @deprecated
|
|
1792
1647
|
*/
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
constructor();
|
|
1648
|
+
static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1796
1649
|
}
|
|
1797
1650
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1801
|
-
* inform the UI right away that they have taken place.
|
|
1802
|
-
*/
|
|
1803
|
-
export class Table implements JoinableTable, HasEventHandling {
|
|
1804
|
-
readonly description?:string|null;
|
|
1805
|
-
readonly pluginName?:string|null;
|
|
1806
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1807
|
-
static readonly EVENT_SIZECHANGED:string;
|
|
1808
|
-
static readonly EVENT_UPDATED:string;
|
|
1809
|
-
static readonly EVENT_ROWADDED:string;
|
|
1810
|
-
static readonly EVENT_ROWREMOVED:string;
|
|
1811
|
-
static readonly EVENT_ROWUPDATED:string;
|
|
1812
|
-
static readonly EVENT_SORTCHANGED:string;
|
|
1813
|
-
static readonly EVENT_FILTERCHANGED:string;
|
|
1814
|
-
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1651
|
+
export class CoreClient implements HasEventHandling {
|
|
1652
|
+
static readonly EVENT_CONNECT:string;
|
|
1815
1653
|
static readonly EVENT_DISCONNECT:string;
|
|
1816
1654
|
static readonly EVENT_RECONNECT:string;
|
|
1817
|
-
static readonly
|
|
1655
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1656
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1818
1657
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
1658
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1819
1659
|
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1820
|
-
static readonly
|
|
1660
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1661
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1662
|
+
|
|
1663
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1664
|
+
|
|
1665
|
+
running():Promise<CoreClient>;
|
|
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;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1683
|
+
* column.
|
|
1684
|
+
*/
|
|
1685
|
+
export class Column {
|
|
1686
|
+
/**
|
|
1687
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1688
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1689
|
+
* @return String
|
|
1690
|
+
*/
|
|
1691
|
+
readonly constituentType?:string|null;
|
|
1692
|
+
readonly description?:string|null;
|
|
1821
1693
|
|
|
1822
1694
|
protected constructor();
|
|
1823
1695
|
|
|
1824
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1825
1696
|
/**
|
|
1826
|
-
*
|
|
1827
|
-
*
|
|
1828
|
-
* @
|
|
1829
|
-
* @return {@link dh.Column}
|
|
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
|
|
1830
1700
|
*/
|
|
1831
|
-
|
|
1701
|
+
get(row:Row):any;
|
|
1702
|
+
getFormat(row:Row):Format;
|
|
1832
1703
|
/**
|
|
1833
|
-
*
|
|
1834
|
-
* @
|
|
1835
|
-
* @return {@link dh.Column} array
|
|
1704
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
1705
|
+
* @return {@link dh.Sort}
|
|
1836
1706
|
*/
|
|
1837
|
-
|
|
1838
|
-
isBlinkTable():boolean;
|
|
1707
|
+
sort():Sort;
|
|
1839
1708
|
/**
|
|
1840
|
-
*
|
|
1841
|
-
*
|
|
1842
|
-
* @return
|
|
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}
|
|
1843
1712
|
*/
|
|
1844
|
-
|
|
1713
|
+
filter():FilterValue;
|
|
1845
1714
|
/**
|
|
1846
|
-
*
|
|
1715
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1716
|
+
* @param expression -
|
|
1717
|
+
* @return {@link dh.CustomColumn}
|
|
1847
1718
|
*/
|
|
1848
|
-
|
|
1849
|
-
getAttributes():string[];
|
|
1719
|
+
formatColor(expression:string):CustomColumn;
|
|
1850
1720
|
/**
|
|
1851
|
-
*
|
|
1852
|
-
*
|
|
1853
|
-
* @
|
|
1854
|
-
* @return Object
|
|
1721
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1722
|
+
* @param expression -
|
|
1723
|
+
* @return {@link dh.CustomColumn}
|
|
1855
1724
|
*/
|
|
1856
|
-
|
|
1725
|
+
formatNumber(expression:string):CustomColumn;
|
|
1857
1726
|
/**
|
|
1858
|
-
*
|
|
1859
|
-
*
|
|
1860
|
-
*
|
|
1861
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1862
|
-
* not.
|
|
1863
|
-
* @param sort -
|
|
1864
|
-
* @return {@link dh.Sort} array
|
|
1727
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1728
|
+
* @param expression -
|
|
1729
|
+
* @return {@link dh.CustomColumn}
|
|
1865
1730
|
*/
|
|
1866
|
-
|
|
1731
|
+
formatDate(expression:string):CustomColumn;
|
|
1732
|
+
toString():string;
|
|
1867
1733
|
/**
|
|
1868
|
-
*
|
|
1869
|
-
*
|
|
1870
|
-
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
1871
|
-
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
1872
|
-
* will not.
|
|
1873
|
-
* @param filter -
|
|
1874
|
-
* @return {@link dh.FilterCondition} array
|
|
1734
|
+
* Label for this column.
|
|
1735
|
+
* @return String
|
|
1875
1736
|
*/
|
|
1876
|
-
|
|
1737
|
+
get name():string;
|
|
1877
1738
|
/**
|
|
1878
|
-
*
|
|
1879
|
-
*
|
|
1880
|
-
* @return
|
|
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
|
|
1881
1742
|
*/
|
|
1882
|
-
|
|
1743
|
+
get isPartitionColumn():boolean;
|
|
1883
1744
|
/**
|
|
1884
|
-
*
|
|
1885
|
-
*
|
|
1886
|
-
*
|
|
1887
|
-
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
1888
|
-
* needed.
|
|
1889
|
-
* @param firstRow -
|
|
1890
|
-
* @param lastRow -
|
|
1891
|
-
* @param columns -
|
|
1892
|
-
* @param updateIntervalMs -
|
|
1893
|
-
* @return {@link dh.TableViewportSubscription}
|
|
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
|
|
1894
1748
|
*/
|
|
1895
|
-
|
|
1749
|
+
get index():number;
|
|
1750
|
+
get isSortable():boolean;
|
|
1896
1751
|
/**
|
|
1897
|
-
*
|
|
1898
|
-
*
|
|
1899
|
-
* separate the lifespan of this promise from the table itself, call
|
|
1900
|
-
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1901
|
-
* @return Promise of {@link dh.TableData}
|
|
1752
|
+
* Type of the row data that can be found in this column.
|
|
1753
|
+
* @return String
|
|
1902
1754
|
*/
|
|
1903
|
-
|
|
1755
|
+
get type():string;
|
|
1904
1756
|
/**
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1909
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1910
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1911
|
-
* @param columns -
|
|
1912
|
-
* @param updateIntervalMs -
|
|
1913
|
-
* @return {@link dh.TableSubscription}
|
|
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}
|
|
1914
1761
|
*/
|
|
1915
|
-
|
|
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
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
1782
|
+
* roll-up table.
|
|
1783
|
+
*/
|
|
1784
|
+
export class RollupConfig {
|
|
1785
|
+
/**
|
|
1786
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
1787
|
+
*/
|
|
1788
|
+
groupingColumns:Array<String>;
|
|
1916
1789
|
/**
|
|
1917
|
-
*
|
|
1918
|
-
*
|
|
1919
|
-
* order of appearance of values from the original table.
|
|
1920
|
-
* @param columns -
|
|
1921
|
-
* @return Promise of dh.Table
|
|
1790
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1791
|
+
* roll-up table.
|
|
1922
1792
|
*/
|
|
1923
|
-
|
|
1793
|
+
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
1924
1794
|
/**
|
|
1925
|
-
*
|
|
1926
|
-
*
|
|
1795
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
1796
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
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.
|
|
1927
1799
|
*/
|
|
1928
|
-
|
|
1800
|
+
includeConstituents:boolean;
|
|
1801
|
+
includeOriginalColumns?:boolean|null;
|
|
1929
1802
|
/**
|
|
1930
|
-
*
|
|
1931
|
-
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
1932
|
-
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1933
|
-
* called on it when not in use.
|
|
1934
|
-
* @param config -
|
|
1935
|
-
* @return Promise of dh.TotalsTable
|
|
1803
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
1936
1804
|
*/
|
|
1937
|
-
|
|
1805
|
+
includeDescriptions:boolean;
|
|
1806
|
+
|
|
1807
|
+
constructor();
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1812
|
+
* mechanism, and so reimplemented here.
|
|
1813
|
+
* <p>
|
|
1814
|
+
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1815
|
+
* <p>
|
|
1816
|
+
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1817
|
+
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1818
|
+
* <p>
|
|
1819
|
+
* The table size will be -1 until a viewport has been fetched.
|
|
1820
|
+
* <p>
|
|
1821
|
+
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1822
|
+
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1823
|
+
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1824
|
+
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1825
|
+
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1826
|
+
* the viewport).
|
|
1827
|
+
* <p>
|
|
1828
|
+
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1829
|
+
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1830
|
+
* <p>
|
|
1831
|
+
* <ul>
|
|
1832
|
+
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1833
|
+
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1834
|
+
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1835
|
+
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1836
|
+
* new operation is pending.</li>
|
|
1837
|
+
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
1838
|
+
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
1839
|
+
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1840
|
+
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1841
|
+
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1842
|
+
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1843
|
+
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1844
|
+
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1845
|
+
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1846
|
+
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1847
|
+
* where {@link TreeRow.hasChildren} is false will be different from usual.</li>
|
|
1848
|
+
* </ul>
|
|
1849
|
+
*/
|
|
1850
|
+
export class TreeTable implements HasEventHandling {
|
|
1938
1851
|
/**
|
|
1939
|
-
*
|
|
1940
|
-
* above for more specifics.
|
|
1941
|
-
* @param config -
|
|
1942
|
-
* @return promise of dh.TotalsTable
|
|
1852
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1943
1853
|
*/
|
|
1944
|
-
|
|
1854
|
+
static readonly EVENT_UPDATED:string;
|
|
1945
1855
|
/**
|
|
1946
|
-
*
|
|
1947
|
-
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
1948
|
-
* @param configObject -
|
|
1949
|
-
* @return Promise of dh.TreeTable
|
|
1856
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1950
1857
|
*/
|
|
1951
|
-
|
|
1858
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1952
1859
|
/**
|
|
1953
|
-
*
|
|
1954
|
-
* new `TreeTable` which must have close() called on it when not in use.
|
|
1955
|
-
* @param configObject -
|
|
1956
|
-
* @return Promise dh.TreeTable
|
|
1860
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1957
1861
|
*/
|
|
1958
|
-
|
|
1862
|
+
static readonly EVENT_RECONNECT:string;
|
|
1959
1863
|
/**
|
|
1960
|
-
*
|
|
1961
|
-
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1962
|
-
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1963
|
-
* @return Promise of dh.Table
|
|
1864
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1964
1865
|
*/
|
|
1965
|
-
|
|
1966
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1866
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1967
1867
|
/**
|
|
1968
|
-
*
|
|
1969
|
-
* @inheritDoc
|
|
1970
|
-
* @deprecated
|
|
1868
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1971
1869
|
*/
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1870
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1871
|
+
readonly description?:string|null;
|
|
1872
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1873
|
+
|
|
1874
|
+
protected constructor();
|
|
1875
|
+
|
|
1978
1876
|
/**
|
|
1979
|
-
*
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1982
|
-
*
|
|
1983
|
-
* @
|
|
1877
|
+
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1878
|
+
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1879
|
+
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1880
|
+
* boolean parameter.
|
|
1881
|
+
* @param row -
|
|
1882
|
+
* @param expandDescendants -
|
|
1984
1883
|
*/
|
|
1985
|
-
|
|
1884
|
+
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1986
1885
|
/**
|
|
1987
|
-
*
|
|
1988
|
-
*
|
|
1989
|
-
* @
|
|
1886
|
+
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1887
|
+
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1888
|
+
* @param row -
|
|
1990
1889
|
*/
|
|
1991
|
-
|
|
1890
|
+
collapse(row:TreeRow|number):void;
|
|
1992
1891
|
/**
|
|
1993
|
-
*
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1996
|
-
* @param
|
|
1997
|
-
* @param
|
|
1998
|
-
* @param
|
|
1999
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
2000
|
-
* `false`.
|
|
2001
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
2002
|
-
* @return A promise that resolves to the row value found.
|
|
1892
|
+
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1893
|
+
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1894
|
+
* is true, then its children will also be expanded.
|
|
1895
|
+
* @param row -
|
|
1896
|
+
* @param isExpanded -
|
|
1897
|
+
* @param expandDescendants -
|
|
2003
1898
|
*/
|
|
2004
|
-
|
|
2005
|
-
|
|
1899
|
+
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1900
|
+
expandAll():void;
|
|
1901
|
+
collapseAll():void;
|
|
2006
1902
|
/**
|
|
2007
|
-
*
|
|
2008
|
-
*
|
|
1903
|
+
* true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
|
|
1904
|
+
* is available
|
|
1905
|
+
* @param row -
|
|
2009
1906
|
* @return boolean
|
|
2010
1907
|
*/
|
|
2011
|
-
|
|
1908
|
+
isExpanded(row:TreeRow|number):boolean;
|
|
1909
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1910
|
+
getViewportData():Promise<TreeViewportData>;
|
|
2012
1911
|
/**
|
|
2013
|
-
*
|
|
2014
|
-
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
2015
|
-
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
2016
|
-
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
2017
|
-
* @return {@link dh.Column} array
|
|
1912
|
+
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
2018
1913
|
*/
|
|
2019
|
-
|
|
1914
|
+
close():void;
|
|
1915
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2020
1916
|
/**
|
|
2021
|
-
*
|
|
2022
|
-
* @
|
|
1917
|
+
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1918
|
+
* @param sort -
|
|
1919
|
+
* @return {@link dh.Sort} array
|
|
2023
1920
|
*/
|
|
2024
|
-
|
|
1921
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
2025
1922
|
/**
|
|
2026
|
-
*
|
|
2027
|
-
*
|
|
2028
|
-
*
|
|
2029
|
-
* @
|
|
1923
|
+
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1924
|
+
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1925
|
+
* condition. Returns the previous sort in use.
|
|
1926
|
+
* @param filter -
|
|
1927
|
+
* @return {@link dh.FilterCondition} array
|
|
2030
1928
|
*/
|
|
2031
|
-
|
|
1929
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
2032
1930
|
/**
|
|
2033
|
-
*
|
|
2034
|
-
*
|
|
2035
|
-
* @return {@link dh.
|
|
1931
|
+
* a column with the given name, or throws an exception if it cannot be found
|
|
1932
|
+
* @param key -
|
|
1933
|
+
* @return {@link dh.Column}
|
|
2036
1934
|
*/
|
|
2037
|
-
|
|
1935
|
+
findColumn(key:string):Column;
|
|
2038
1936
|
/**
|
|
2039
|
-
*
|
|
2040
|
-
*
|
|
2041
|
-
* @return
|
|
1937
|
+
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
1938
|
+
* @param keys -
|
|
1939
|
+
* @return {@link dh.Column} array
|
|
2042
1940
|
*/
|
|
2043
|
-
|
|
1941
|
+
findColumns(keys:string[]):Column[];
|
|
2044
1942
|
/**
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2047
|
-
*
|
|
1943
|
+
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
1944
|
+
* values for the given columns in the source table:
|
|
1945
|
+
* <ul>
|
|
1946
|
+
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1947
|
+
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1948
|
+
* the tree.</li>
|
|
1949
|
+
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1950
|
+
* in the resulting table.</li>
|
|
1951
|
+
* </ul>
|
|
1952
|
+
*/
|
|
1953
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1954
|
+
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1955
|
+
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1956
|
+
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1957
|
+
/**
|
|
1958
|
+
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1959
|
+
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1960
|
+
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1961
|
+
* state is also not copied.
|
|
1962
|
+
* @return Promise of dh.TreeTable
|
|
1963
|
+
*/
|
|
1964
|
+
copy():Promise<TreeTable>;
|
|
1965
|
+
/**
|
|
1966
|
+
* The current filter configuration of this Tree Table.
|
|
2048
1967
|
* @return {@link dh.FilterCondition} array
|
|
2049
1968
|
*/
|
|
2050
1969
|
get filter():Array<FilterCondition>;
|
|
2051
1970
|
/**
|
|
2052
|
-
*
|
|
2053
|
-
*
|
|
2054
|
-
* applySort(). Note that this getter will return the new value immediately, even though it may take a little time
|
|
2055
|
-
* to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
|
|
2056
|
-
* @return double
|
|
1971
|
+
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
1972
|
+
* @return boolean
|
|
2057
1973
|
*/
|
|
2058
|
-
get
|
|
1974
|
+
get includeConstituents():boolean;
|
|
1975
|
+
get groupedColumns():Array<Column>;
|
|
2059
1976
|
/**
|
|
2060
|
-
*
|
|
2061
|
-
*
|
|
2062
|
-
|
|
1977
|
+
* True if this table has been closed.
|
|
1978
|
+
* @return boolean
|
|
1979
|
+
*/
|
|
1980
|
+
get isClosed():boolean;
|
|
1981
|
+
/**
|
|
1982
|
+
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
1983
|
+
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1984
|
+
* when considering collapse/expand states).
|
|
2063
1985
|
* @return double
|
|
2064
1986
|
*/
|
|
2065
1987
|
get size():number;
|
|
2066
1988
|
/**
|
|
2067
|
-
*
|
|
2068
|
-
* @return
|
|
1989
|
+
* The columns that can be shown in this Tree Table.
|
|
1990
|
+
* @return {@link dh.Column} array
|
|
2069
1991
|
*/
|
|
2070
|
-
get
|
|
1992
|
+
get columns():Array<Column>;
|
|
2071
1993
|
/**
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
2074
|
-
|
|
1994
|
+
* The current sort configuration of this Tree Table
|
|
1995
|
+
* @return {@link dh.Sort} array.
|
|
1996
|
+
*/
|
|
1997
|
+
get sort():Array<Sort>;
|
|
1998
|
+
/**
|
|
1999
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2000
|
+
* initial snapshot.
|
|
2075
2001
|
* @return boolean
|
|
2076
2002
|
*/
|
|
2077
|
-
get
|
|
2003
|
+
get isRefreshing():boolean;
|
|
2078
2004
|
/**
|
|
2079
2005
|
* Listen for events on this object.
|
|
2080
2006
|
* @param name - the name of the event to listen for
|
|
@@ -2093,261 +2019,341 @@ export namespace dh {
|
|
|
2093
2019
|
* @typeParam T -
|
|
2094
2020
|
*/
|
|
2095
2021
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2096
|
-
/**
|
|
2097
|
-
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2098
|
-
* do not support reverse.
|
|
2099
|
-
* @return {@link dh.Sort}
|
|
2100
|
-
*/
|
|
2101
|
-
static reverse():Sort;
|
|
2102
2022
|
}
|
|
2103
2023
|
|
|
2104
2024
|
/**
|
|
2105
|
-
*
|
|
2106
|
-
*
|
|
2025
|
+
* Deprecated for use in Deephaven Core.
|
|
2026
|
+
* @deprecated
|
|
2107
2027
|
*/
|
|
2108
|
-
export class
|
|
2109
|
-
|
|
2028
|
+
export class Client {
|
|
2029
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2030
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2031
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2110
2032
|
|
|
2111
2033
|
constructor();
|
|
2112
2034
|
}
|
|
2113
2035
|
|
|
2036
|
+
export class LongWrapper {
|
|
2037
|
+
protected constructor();
|
|
2038
|
+
|
|
2039
|
+
static ofString(str:string):LongWrapper;
|
|
2040
|
+
asNumber():number;
|
|
2041
|
+
valueOf():string;
|
|
2042
|
+
toString():string;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2114
2045
|
/**
|
|
2115
|
-
*
|
|
2116
|
-
*
|
|
2046
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
2047
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
2048
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
2117
2049
|
*/
|
|
2118
|
-
export class
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
static
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
*/
|
|
2126
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2050
|
+
export class RangeSet {
|
|
2051
|
+
protected constructor();
|
|
2052
|
+
|
|
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;
|
|
2127
2057
|
/**
|
|
2128
|
-
*
|
|
2058
|
+
* a new iterator over all indexes in this collection.
|
|
2059
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
2129
2060
|
*/
|
|
2130
|
-
|
|
2061
|
+
iterator():Iterator<LongWrapper>;
|
|
2131
2062
|
/**
|
|
2132
|
-
*
|
|
2063
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
2064
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
2065
|
+
* property each time through a loop).
|
|
2066
|
+
* @return double
|
|
2133
2067
|
*/
|
|
2134
|
-
|
|
2068
|
+
get size():number;
|
|
2069
|
+
}
|
|
2135
2070
|
|
|
2071
|
+
/**
|
|
2072
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
2073
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
2074
|
+
* instance.
|
|
2075
|
+
*/
|
|
2076
|
+
export class FilterCondition {
|
|
2136
2077
|
protected constructor();
|
|
2137
2078
|
|
|
2138
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2139
|
-
/**
|
|
2140
|
-
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
2141
|
-
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
2142
|
-
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
2143
|
-
*/
|
|
2144
|
-
getTable(key:object):Promise<Table|undefined|null>;
|
|
2145
2079
|
/**
|
|
2146
|
-
*
|
|
2147
|
-
*
|
|
2148
|
-
* @return A merged representation of the constituent tables.
|
|
2080
|
+
* the opposite of this condition
|
|
2081
|
+
* @return FilterCondition
|
|
2149
2082
|
*/
|
|
2150
|
-
|
|
2083
|
+
not():FilterCondition;
|
|
2151
2084
|
/**
|
|
2152
|
-
*
|
|
2153
|
-
*
|
|
2154
|
-
* @return
|
|
2085
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
2086
|
+
* @param filters -
|
|
2087
|
+
* @return FilterCondition
|
|
2155
2088
|
*/
|
|
2156
|
-
|
|
2089
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
2157
2090
|
/**
|
|
2158
|
-
*
|
|
2159
|
-
* @
|
|
2091
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
2092
|
+
* @param filters -
|
|
2093
|
+
* @return FilterCondition.
|
|
2160
2094
|
*/
|
|
2161
|
-
|
|
2095
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
2162
2096
|
/**
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2097
|
+
* a string suitable for debugging showing the details of this condition.
|
|
2098
|
+
* @return String.
|
|
2165
2099
|
*/
|
|
2166
|
-
|
|
2100
|
+
toString():string;
|
|
2101
|
+
get columns():Array<Column>;
|
|
2167
2102
|
/**
|
|
2168
|
-
*
|
|
2169
|
-
*
|
|
2103
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
2104
|
+
* functions:
|
|
2105
|
+
* <ul>
|
|
2106
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
2107
|
+
* than the third</li>
|
|
2108
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
2109
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
2110
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
2111
|
+
* "not a number"</i></li>
|
|
2112
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
2113
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
2114
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
2115
|
+
* expression</li>
|
|
2116
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
2117
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
2118
|
+
* <p>
|
|
2119
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
2120
|
+
* method should be used in other cases
|
|
2121
|
+
* </p>
|
|
2122
|
+
* </li>
|
|
2123
|
+
* </ul>
|
|
2124
|
+
* @param function -
|
|
2125
|
+
* @param args -
|
|
2126
|
+
* @return dh.FilterCondition
|
|
2170
2127
|
*/
|
|
2171
|
-
|
|
2128
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
2172
2129
|
/**
|
|
2173
|
-
*
|
|
2174
|
-
*
|
|
2175
|
-
*
|
|
2130
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
2131
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
2132
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
2133
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
2134
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
2135
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
2136
|
+
* {@link dh.Column.filter}).
|
|
2137
|
+
* @param value -
|
|
2138
|
+
* @param columns -
|
|
2139
|
+
* @return dh.FilterCondition
|
|
2176
2140
|
*/
|
|
2177
|
-
|
|
2141
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
2146
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
2147
|
+
*
|
|
2148
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
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 {
|
|
2178
2157
|
/**
|
|
2179
|
-
*
|
|
2180
|
-
*
|
|
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.
|
|
2181
2161
|
*/
|
|
2182
|
-
|
|
2162
|
+
static readonly EVENT_UPDATED:string;
|
|
2163
|
+
|
|
2164
|
+
protected constructor();
|
|
2165
|
+
|
|
2183
2166
|
/**
|
|
2184
|
-
*
|
|
2185
|
-
* @param name - the name of the event to listen for
|
|
2186
|
-
* @param callback - a function to call when the event occurs
|
|
2187
|
-
* @return Returns a cleanup function.
|
|
2188
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2167
|
+
* Stops the subscription on the server.
|
|
2189
2168
|
*/
|
|
2169
|
+
close():void;
|
|
2190
2170
|
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2191
2171
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2192
2172
|
hasListeners(name:string):boolean;
|
|
2173
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2193
2174
|
/**
|
|
2194
|
-
*
|
|
2195
|
-
* @
|
|
2196
|
-
* @param callback -
|
|
2197
|
-
* @return
|
|
2198
|
-
* @typeParam T -
|
|
2175
|
+
* The columns that were subscribed to when this subscription was created
|
|
2176
|
+
* @return {@link dh.Column}
|
|
2199
2177
|
*/
|
|
2200
|
-
|
|
2178
|
+
get columns():Array<Column>;
|
|
2201
2179
|
}
|
|
2202
2180
|
|
|
2203
2181
|
/**
|
|
2204
|
-
* Describes a
|
|
2205
|
-
*
|
|
2206
|
-
*
|
|
2182
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
2183
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
2184
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
2185
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
2186
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
2187
|
+
*
|
|
2188
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
2189
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
2190
|
+
* expected formats.
|
|
2207
2191
|
*/
|
|
2208
|
-
export class
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2192
|
+
export class TotalsTableConfig {
|
|
2193
|
+
/**
|
|
2194
|
+
* @deprecated
|
|
2195
|
+
*/
|
|
2196
|
+
static readonly COUNT:string;
|
|
2197
|
+
/**
|
|
2198
|
+
* @deprecated
|
|
2199
|
+
*/
|
|
2200
|
+
static readonly MIN:string;
|
|
2201
|
+
/**
|
|
2202
|
+
* @deprecated
|
|
2203
|
+
*/
|
|
2204
|
+
static readonly MAX:string;
|
|
2205
|
+
/**
|
|
2206
|
+
* @deprecated
|
|
2207
|
+
*/
|
|
2208
|
+
static readonly SUM:string;
|
|
2209
|
+
/**
|
|
2210
|
+
* @deprecated
|
|
2211
|
+
*/
|
|
2212
|
+
static readonly ABS_SUM:string;
|
|
2213
|
+
/**
|
|
2214
|
+
* @deprecated
|
|
2215
|
+
*/
|
|
2216
|
+
static readonly VAR:string;
|
|
2217
|
+
/**
|
|
2218
|
+
* @deprecated
|
|
2219
|
+
*/
|
|
2220
|
+
static readonly AVG:string;
|
|
2221
|
+
/**
|
|
2222
|
+
* @deprecated
|
|
2223
|
+
*/
|
|
2224
|
+
static readonly STD:string;
|
|
2215
2225
|
/**
|
|
2216
|
-
*
|
|
2217
|
-
* @return {@link dh.Sort}
|
|
2226
|
+
* @deprecated
|
|
2218
2227
|
*/
|
|
2219
|
-
|
|
2228
|
+
static readonly FIRST:string;
|
|
2220
2229
|
/**
|
|
2221
|
-
*
|
|
2222
|
-
* @return {@link dh.Sort}
|
|
2230
|
+
* @deprecated
|
|
2223
2231
|
*/
|
|
2224
|
-
|
|
2232
|
+
static readonly LAST:string;
|
|
2225
2233
|
/**
|
|
2226
|
-
*
|
|
2227
|
-
* @return {@link dh.Sort}
|
|
2234
|
+
* @deprecated
|
|
2228
2235
|
*/
|
|
2229
|
-
|
|
2230
|
-
toString():string;
|
|
2236
|
+
static readonly SKIP:string;
|
|
2231
2237
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
* @return boolean
|
|
2238
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2234
2239
|
*/
|
|
2235
|
-
|
|
2240
|
+
showTotalsByDefault:boolean;
|
|
2236
2241
|
/**
|
|
2237
|
-
*
|
|
2238
|
-
* @return {@link dh.Column}
|
|
2242
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2239
2243
|
*/
|
|
2240
|
-
|
|
2244
|
+
showGrandTotalsByDefault:boolean;
|
|
2241
2245
|
/**
|
|
2242
|
-
*
|
|
2243
|
-
* @return String
|
|
2246
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
2244
2247
|
*/
|
|
2245
|
-
|
|
2246
|
-
|
|
2248
|
+
defaultOperation:AggregationOperationType;
|
|
2249
|
+
/**
|
|
2250
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
2251
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
2252
|
+
*/
|
|
2253
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
2254
|
+
/**
|
|
2255
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
2256
|
+
* these columns. See also `Table.selectDistinct`.
|
|
2257
|
+
*/
|
|
2258
|
+
groupBy:Array<string>;
|
|
2247
2259
|
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2260
|
+
constructor();
|
|
2261
|
+
|
|
2262
|
+
toString():string;
|
|
2263
|
+
}
|
|
2251
2264
|
|
|
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 {
|
|
2252
2281
|
protected constructor();
|
|
2253
2282
|
|
|
2254
2283
|
/**
|
|
2255
|
-
*
|
|
2256
|
-
*
|
|
2257
|
-
* @param
|
|
2258
|
-
* @
|
|
2284
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
2285
|
+
* property at that name and validate it can be put into the given column type.
|
|
2286
|
+
* @param row -
|
|
2287
|
+
* @param userTimeZone -
|
|
2288
|
+
* @return Promise of dh.InputTable
|
|
2259
2289
|
*/
|
|
2260
|
-
|
|
2290
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2261
2291
|
/**
|
|
2262
|
-
*
|
|
2263
|
-
* @param
|
|
2264
|
-
* @
|
|
2292
|
+
* Add multiple rows to a table.
|
|
2293
|
+
* @param rows -
|
|
2294
|
+
* @param userTimeZone -
|
|
2295
|
+
* @return Promise of dh.InputTable
|
|
2265
2296
|
*/
|
|
2266
|
-
|
|
2297
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
2267
2298
|
/**
|
|
2268
|
-
*
|
|
2269
|
-
*
|
|
2270
|
-
*
|
|
2271
|
-
*
|
|
2299
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
2300
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
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 -
|
|
2304
|
+
* @return Promise of dh.InputTable
|
|
2272
2305
|
*/
|
|
2273
|
-
|
|
2274
|
-
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2275
|
-
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2276
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2277
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2306
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
2278
2307
|
/**
|
|
2279
|
-
*
|
|
2280
|
-
* @param
|
|
2281
|
-
* @return
|
|
2308
|
+
* Add multiple tables to this Input Table.
|
|
2309
|
+
* @param tablesToAdd -
|
|
2310
|
+
* @return Promise of dh.InputTable
|
|
2282
2311
|
*/
|
|
2283
|
-
|
|
2284
|
-
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2285
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2286
|
-
close():void;
|
|
2287
|
-
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2288
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2289
|
-
openDocument(params:object):void;
|
|
2290
|
-
changeDocument(params:object):void;
|
|
2291
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2292
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2293
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2294
|
-
closeDocument(params:object):void;
|
|
2312
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
2295
2313
|
/**
|
|
2296
|
-
*
|
|
2297
|
-
*
|
|
2298
|
-
* @
|
|
2299
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
2314
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
2315
|
+
* @param tableToDelete -
|
|
2316
|
+
* @return Promise of dh.InputTable
|
|
2300
2317
|
*/
|
|
2301
|
-
|
|
2318
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
2302
2319
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
*
|
|
2305
|
-
* @
|
|
2306
|
-
* @param startTime -
|
|
2307
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
2320
|
+
* Delete multiple tables from this Input Table.
|
|
2321
|
+
* @param tablesToDelete -
|
|
2322
|
+
* @return
|
|
2308
2323
|
*/
|
|
2309
|
-
|
|
2310
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2311
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2312
|
-
hasListeners(name:string):boolean;
|
|
2313
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
export class Ide {
|
|
2317
|
-
constructor();
|
|
2318
|
-
|
|
2324
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
2319
2325
|
/**
|
|
2320
|
-
*
|
|
2326
|
+
* A list of the key columns, by name
|
|
2327
|
+
* @return String array.
|
|
2321
2328
|
*/
|
|
2322
|
-
|
|
2329
|
+
get keys():string[];
|
|
2323
2330
|
/**
|
|
2324
|
-
*
|
|
2331
|
+
* A list of the value columns, by name
|
|
2332
|
+
* @return String array.
|
|
2325
2333
|
*/
|
|
2326
|
-
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
/**
|
|
2330
|
-
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
2331
|
-
*
|
|
2332
|
-
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
2333
|
-
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
2334
|
-
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
2335
|
-
*/
|
|
2336
|
-
export class TreeTableConfig {
|
|
2334
|
+
get values():string[];
|
|
2337
2335
|
/**
|
|
2338
|
-
*
|
|
2336
|
+
* A list of the key columns.
|
|
2337
|
+
* @return Column array.
|
|
2339
2338
|
*/
|
|
2340
|
-
|
|
2339
|
+
get keyColumns():Column[];
|
|
2341
2340
|
/**
|
|
2342
|
-
*
|
|
2341
|
+
* A list of the value Column objects
|
|
2342
|
+
* @return {@link dh.Column} array.
|
|
2343
2343
|
*/
|
|
2344
|
-
|
|
2344
|
+
get valueColumns():Column[];
|
|
2345
2345
|
/**
|
|
2346
|
-
*
|
|
2346
|
+
* The source table for this Input Table
|
|
2347
|
+
* @return dh.table
|
|
2347
2348
|
*/
|
|
2348
|
-
|
|
2349
|
+
get table():Table;
|
|
2350
|
+
}
|
|
2349
2351
|
|
|
2350
|
-
|
|
2352
|
+
export class DateWrapper extends LongWrapper {
|
|
2353
|
+
protected constructor();
|
|
2354
|
+
|
|
2355
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
2356
|
+
asDate():Date;
|
|
2351
2357
|
}
|
|
2352
2358
|
|
|
2353
2359
|
|
|
@@ -2358,32 +2364,6 @@ export namespace dh {
|
|
|
2358
2364
|
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2359
2365
|
}
|
|
2360
2366
|
|
|
2361
|
-
/**
|
|
2362
|
-
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2363
|
-
*/
|
|
2364
|
-
type VariableTypeType = string;
|
|
2365
|
-
export class VariableType {
|
|
2366
|
-
static readonly TABLE:VariableTypeType;
|
|
2367
|
-
static readonly TREETABLE:VariableTypeType;
|
|
2368
|
-
static readonly HIERARCHICALTABLE:VariableTypeType;
|
|
2369
|
-
static readonly TABLEMAP:VariableTypeType;
|
|
2370
|
-
static readonly PARTITIONEDTABLE:VariableTypeType;
|
|
2371
|
-
static readonly FIGURE:VariableTypeType;
|
|
2372
|
-
static readonly OTHERWIDGET:VariableTypeType;
|
|
2373
|
-
static readonly PANDAS:VariableTypeType;
|
|
2374
|
-
static readonly TREEMAP:VariableTypeType;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
type ValueTypeType = string;
|
|
2378
|
-
export class ValueType {
|
|
2379
|
-
static readonly STRING:ValueTypeType;
|
|
2380
|
-
static readonly NUMBER:ValueTypeType;
|
|
2381
|
-
static readonly DOUBLE:ValueTypeType;
|
|
2382
|
-
static readonly LONG:ValueTypeType;
|
|
2383
|
-
static readonly DATETIME:ValueTypeType;
|
|
2384
|
-
static readonly BOOLEAN:ValueTypeType;
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
2367
|
/**
|
|
2388
2368
|
* This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
|
|
2389
2369
|
*/
|
|
@@ -2405,6 +2385,32 @@ export namespace dh {
|
|
|
2405
2385
|
static readonly SKIP:AggregationOperationType;
|
|
2406
2386
|
}
|
|
2407
2387
|
|
|
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
|
+
/**
|
|
2399
|
+
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2400
|
+
*/
|
|
2401
|
+
type VariableTypeType = string;
|
|
2402
|
+
export class VariableType {
|
|
2403
|
+
static readonly TABLE:VariableTypeType;
|
|
2404
|
+
static readonly TREETABLE:VariableTypeType;
|
|
2405
|
+
static readonly HIERARCHICALTABLE:VariableTypeType;
|
|
2406
|
+
static readonly TABLEMAP:VariableTypeType;
|
|
2407
|
+
static readonly PARTITIONEDTABLE:VariableTypeType;
|
|
2408
|
+
static readonly FIGURE:VariableTypeType;
|
|
2409
|
+
static readonly OTHERWIDGET:VariableTypeType;
|
|
2410
|
+
static readonly PANDAS:VariableTypeType;
|
|
2411
|
+
static readonly TREEMAP:VariableTypeType;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2408
2414
|
}
|
|
2409
2415
|
|
|
2410
2416
|
export namespace dh.ide {
|
|
@@ -2418,19 +2424,25 @@ export namespace dh.ide {
|
|
|
2418
2424
|
name?:string|null;
|
|
2419
2425
|
}
|
|
2420
2426
|
/**
|
|
2421
|
-
*
|
|
2427
|
+
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2428
|
+
* server.
|
|
2422
2429
|
*/
|
|
2423
|
-
export interface
|
|
2430
|
+
export interface LogItem {
|
|
2424
2431
|
/**
|
|
2425
|
-
*
|
|
2426
|
-
* @return
|
|
2432
|
+
* The level of the log message, enabling the client to ignore messages.
|
|
2433
|
+
* @return String
|
|
2434
|
+
*/
|
|
2435
|
+
get logLevel():string;
|
|
2436
|
+
/**
|
|
2437
|
+
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2438
|
+
* @return double
|
|
2427
2439
|
*/
|
|
2428
|
-
get
|
|
2440
|
+
get micros():number;
|
|
2429
2441
|
/**
|
|
2430
|
-
*
|
|
2442
|
+
* The log message written on the server.
|
|
2431
2443
|
* @return String
|
|
2432
2444
|
*/
|
|
2433
|
-
get
|
|
2445
|
+
get message():string;
|
|
2434
2446
|
}
|
|
2435
2447
|
/**
|
|
2436
2448
|
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
@@ -2457,25 +2469,19 @@ export namespace dh.ide {
|
|
|
2457
2469
|
get updated():Array<VariableDefinition>;
|
|
2458
2470
|
}
|
|
2459
2471
|
/**
|
|
2460
|
-
*
|
|
2461
|
-
* server.
|
|
2472
|
+
* Indicates the result of code run on the server.
|
|
2462
2473
|
*/
|
|
2463
|
-
export interface
|
|
2464
|
-
/**
|
|
2465
|
-
* The level of the log message, enabling the client to ignore messages.
|
|
2466
|
-
* @return String
|
|
2467
|
-
*/
|
|
2468
|
-
get logLevel():string;
|
|
2474
|
+
export interface CommandResult {
|
|
2469
2475
|
/**
|
|
2470
|
-
*
|
|
2471
|
-
* @return
|
|
2476
|
+
* Describes changes made in the course of this command.
|
|
2477
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2472
2478
|
*/
|
|
2473
|
-
get
|
|
2479
|
+
get changes():VariableChanges;
|
|
2474
2480
|
/**
|
|
2475
|
-
*
|
|
2481
|
+
* If the command failed, the error message will be provided here.
|
|
2476
2482
|
* @return String
|
|
2477
2483
|
*/
|
|
2478
|
-
get
|
|
2484
|
+
get error():string;
|
|
2479
2485
|
}
|
|
2480
2486
|
/**
|
|
2481
2487
|
* A format to describe a variable available to be read from the server. Application fields are optional, and only
|
|
@@ -2522,104 +2528,6 @@ export namespace dh.ide {
|
|
|
2522
2528
|
|
|
2523
2529
|
export namespace dh.i18n {
|
|
2524
2530
|
|
|
2525
|
-
/**
|
|
2526
|
-
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2527
|
-
* additional 6 decimal places after the rest of the number.
|
|
2528
|
-
*
|
|
2529
|
-
* Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
|
|
2530
|
-
* and assuming it to be a lossy nano value, and parsing into a js Date.
|
|
2531
|
-
*
|
|
2532
|
-
*
|
|
2533
|
-
* Utility class to parse and format various date/time values, using the same format patterns as are supported by the
|
|
2534
|
-
* standard Java implementation used in the Deephaven server and swing client.
|
|
2535
|
-
*
|
|
2536
|
-
* As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
|
|
2537
|
-
* with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
|
|
2538
|
-
* however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
|
|
2539
|
-
* still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
|
|
2540
|
-
* object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
|
|
2541
|
-
* to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
|
|
2542
|
-
* `asDate()` to return a JS `Date` value.
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2545
|
-
* Caveats:
|
|
2546
|
-
*
|
|
2547
|
-
*
|
|
2548
|
-
* - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
|
|
2549
|
-
* short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
|
|
2550
|
-
* browser to emit the user's own timezone.
|
|
2551
|
-
*/
|
|
2552
|
-
export class DateTimeFormat {
|
|
2553
|
-
static readonly NANOS_PER_MILLI:number;
|
|
2554
|
-
|
|
2555
|
-
/**
|
|
2556
|
-
* Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2557
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2558
|
-
* @param pattern -
|
|
2559
|
-
*/
|
|
2560
|
-
constructor(pattern:string);
|
|
2561
|
-
|
|
2562
|
-
/**
|
|
2563
|
-
*
|
|
2564
|
-
* @param pattern -
|
|
2565
|
-
* @return a date format instance matching the specified format. If this format has not been specified before, a new
|
|
2566
|
-
* instance will be created and stored for later reuse.
|
|
2567
|
-
*/
|
|
2568
|
-
static getFormat(pattern:string):DateTimeFormat;
|
|
2569
|
-
/**
|
|
2570
|
-
* Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
|
|
2571
|
-
* `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
|
|
2572
|
-
* the instance method for more details on input objects.
|
|
2573
|
-
* @param pattern -
|
|
2574
|
-
* @param date -
|
|
2575
|
-
* @param timeZone -
|
|
2576
|
-
* @return
|
|
2577
|
-
*/
|
|
2578
|
-
static format(pattern:string, date:any, timeZone?:TimeZone):string;
|
|
2579
|
-
/**
|
|
2580
|
-
* Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
|
|
2581
|
-
* @param pattern -
|
|
2582
|
-
* @param text -
|
|
2583
|
-
* @return
|
|
2584
|
-
*/
|
|
2585
|
-
static parseAsDate(pattern:string, text:string):Date;
|
|
2586
|
-
/**
|
|
2587
|
-
* Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
|
|
2588
|
-
* A `TimeZone` object can optionally be provided to parse to a desired timezone.
|
|
2589
|
-
* @param pattern -
|
|
2590
|
-
* @param text -
|
|
2591
|
-
* @param tz -
|
|
2592
|
-
* @return
|
|
2593
|
-
*/
|
|
2594
|
-
static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2595
|
-
/**
|
|
2596
|
-
* Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
|
|
2597
|
-
* include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
|
|
2598
|
-
* nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
|
|
2599
|
-
* expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
|
|
2600
|
-
* date/time in that timezone.
|
|
2601
|
-
* @param date -
|
|
2602
|
-
* @param timeZone -
|
|
2603
|
-
* @return String
|
|
2604
|
-
*/
|
|
2605
|
-
format(date:any, timeZone?:TimeZone):string;
|
|
2606
|
-
/**
|
|
2607
|
-
* Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
|
|
2608
|
-
* nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
|
|
2609
|
-
* @param text -
|
|
2610
|
-
* @param tz -
|
|
2611
|
-
* @return
|
|
2612
|
-
*/
|
|
2613
|
-
parse(text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2614
|
-
/**
|
|
2615
|
-
* Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
|
|
2616
|
-
* @param text -
|
|
2617
|
-
* @return
|
|
2618
|
-
*/
|
|
2619
|
-
parseAsDate(text:string):Date;
|
|
2620
|
-
toString():string;
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
2531
|
/**
|
|
2624
2532
|
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
2625
2533
|
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
@@ -2731,6 +2639,104 @@ export namespace dh.i18n {
|
|
|
2731
2639
|
get id():string;
|
|
2732
2640
|
}
|
|
2733
2641
|
|
|
2642
|
+
/**
|
|
2643
|
+
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2644
|
+
* additional 6 decimal places after the rest of the number.
|
|
2645
|
+
*
|
|
2646
|
+
* Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
|
|
2647
|
+
* and assuming it to be a lossy nano value, and parsing into a js Date.
|
|
2648
|
+
*
|
|
2649
|
+
*
|
|
2650
|
+
* Utility class to parse and format various date/time values, using the same format patterns as are supported by the
|
|
2651
|
+
* standard Java implementation used in the Deephaven server and swing client.
|
|
2652
|
+
*
|
|
2653
|
+
* As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
|
|
2654
|
+
* with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
|
|
2655
|
+
* however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
|
|
2656
|
+
* still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
|
|
2657
|
+
* object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
|
|
2658
|
+
* to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
|
|
2659
|
+
* `asDate()` to return a JS `Date` value.
|
|
2660
|
+
*
|
|
2661
|
+
*
|
|
2662
|
+
* Caveats:
|
|
2663
|
+
*
|
|
2664
|
+
*
|
|
2665
|
+
* - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
|
|
2666
|
+
* short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
|
|
2667
|
+
* browser to emit the user's own timezone.
|
|
2668
|
+
*/
|
|
2669
|
+
export class DateTimeFormat {
|
|
2670
|
+
static readonly NANOS_PER_MILLI:number;
|
|
2671
|
+
|
|
2672
|
+
/**
|
|
2673
|
+
* Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2674
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2675
|
+
* @param pattern -
|
|
2676
|
+
*/
|
|
2677
|
+
constructor(pattern:string);
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
*
|
|
2681
|
+
* @param pattern -
|
|
2682
|
+
* @return a date format instance matching the specified format. If this format has not been specified before, a new
|
|
2683
|
+
* instance will be created and stored for later reuse.
|
|
2684
|
+
*/
|
|
2685
|
+
static getFormat(pattern:string):DateTimeFormat;
|
|
2686
|
+
/**
|
|
2687
|
+
* Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
|
|
2688
|
+
* `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
|
|
2689
|
+
* the instance method for more details on input objects.
|
|
2690
|
+
* @param pattern -
|
|
2691
|
+
* @param date -
|
|
2692
|
+
* @param timeZone -
|
|
2693
|
+
* @return
|
|
2694
|
+
*/
|
|
2695
|
+
static format(pattern:string, date:any, timeZone?:TimeZone):string;
|
|
2696
|
+
/**
|
|
2697
|
+
* Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
|
|
2698
|
+
* @param pattern -
|
|
2699
|
+
* @param text -
|
|
2700
|
+
* @return
|
|
2701
|
+
*/
|
|
2702
|
+
static parseAsDate(pattern:string, text:string):Date;
|
|
2703
|
+
/**
|
|
2704
|
+
* Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
|
|
2705
|
+
* A `TimeZone` object can optionally be provided to parse to a desired timezone.
|
|
2706
|
+
* @param pattern -
|
|
2707
|
+
* @param text -
|
|
2708
|
+
* @param tz -
|
|
2709
|
+
* @return
|
|
2710
|
+
*/
|
|
2711
|
+
static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2712
|
+
/**
|
|
2713
|
+
* Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
|
|
2714
|
+
* include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
|
|
2715
|
+
* nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
|
|
2716
|
+
* expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
|
|
2717
|
+
* date/time in that timezone.
|
|
2718
|
+
* @param date -
|
|
2719
|
+
* @param timeZone -
|
|
2720
|
+
* @return String
|
|
2721
|
+
*/
|
|
2722
|
+
format(date:any, timeZone?:TimeZone):string;
|
|
2723
|
+
/**
|
|
2724
|
+
* Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
|
|
2725
|
+
* nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
|
|
2726
|
+
* @param text -
|
|
2727
|
+
* @param tz -
|
|
2728
|
+
* @return
|
|
2729
|
+
*/
|
|
2730
|
+
parse(text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2731
|
+
/**
|
|
2732
|
+
* Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
|
|
2733
|
+
* @param text -
|
|
2734
|
+
* @return
|
|
2735
|
+
*/
|
|
2736
|
+
parseAsDate(text:string):Date;
|
|
2737
|
+
toString():string;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2734
2740
|
/**
|
|
2735
2741
|
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2736
2742
|
*
|
|
@@ -2790,48 +2796,19 @@ export namespace dh.i18n {
|
|
|
2790
2796
|
export namespace dh.plot {
|
|
2791
2797
|
|
|
2792
2798
|
/**
|
|
2793
|
-
*
|
|
2794
|
-
*/
|
|
2795
|
-
export interface
|
|
2796
|
-
readonly isLinesVisible?:boolean|null;
|
|
2797
|
-
readonly pointLabelFormat?:string|null;
|
|
2798
|
-
readonly yToolTipPattern?:string|null;
|
|
2799
|
-
readonly shapeSize?:number|null;
|
|
2800
|
-
readonly xToolTipPattern?:string|null;
|
|
2801
|
-
readonly isShapesVisible?:boolean|null;
|
|
2802
|
-
|
|
2803
|
-
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
2804
|
-
/**
|
|
2805
|
-
* Disable updates for this Series.
|
|
2806
|
-
*/
|
|
2807
|
-
unsubscribe():void;
|
|
2808
|
-
get shape():string;
|
|
2809
|
-
/**
|
|
2810
|
-
* Contains details on how to access data within the chart for this series. keyed with the way that this series uses
|
|
2811
|
-
* the axis.
|
|
2812
|
-
* @return {@link dh.plot.SeriesDataSource}
|
|
2813
|
-
*/
|
|
2814
|
-
get sources():SeriesDataSource[];
|
|
2815
|
-
get lineColor():string;
|
|
2816
|
-
/**
|
|
2817
|
-
* The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2818
|
-
* @return int
|
|
2819
|
-
*/
|
|
2820
|
-
get plotStyle():SeriesPlotStyleType;
|
|
2821
|
-
get oneClick():OneClick;
|
|
2822
|
-
get gradientVisible():boolean;
|
|
2823
|
-
get shapeColor():string;
|
|
2799
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2800
|
+
*/
|
|
2801
|
+
export interface MultiSeries {
|
|
2824
2802
|
/**
|
|
2825
|
-
* The name for this series.
|
|
2803
|
+
* The name for this multi-series.
|
|
2826
2804
|
* @return String
|
|
2827
2805
|
*/
|
|
2828
2806
|
get name():string;
|
|
2829
2807
|
/**
|
|
2830
|
-
*
|
|
2831
|
-
* @return
|
|
2808
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2809
|
+
* @return int
|
|
2832
2810
|
*/
|
|
2833
|
-
get
|
|
2834
|
-
get shapeLabel():string;
|
|
2811
|
+
get plotStyle():SeriesPlotStyleType;
|
|
2835
2812
|
}
|
|
2836
2813
|
/**
|
|
2837
2814
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
@@ -2901,30 +2878,59 @@ export namespace dh.plot {
|
|
|
2901
2878
|
get formatType():AxisFormatTypeType;
|
|
2902
2879
|
get minRange():number;
|
|
2903
2880
|
}
|
|
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
|
+
}
|
|
2904
2891
|
/**
|
|
2905
|
-
*
|
|
2892
|
+
* Provides access to the data for displaying in a figure.
|
|
2906
2893
|
*/
|
|
2907
|
-
export interface
|
|
2894
|
+
export interface Series {
|
|
2895
|
+
readonly isLinesVisible?:boolean|null;
|
|
2896
|
+
readonly pointLabelFormat?:string|null;
|
|
2897
|
+
readonly yToolTipPattern?:string|null;
|
|
2898
|
+
readonly shapeSize?:number|null;
|
|
2899
|
+
readonly xToolTipPattern?:string|null;
|
|
2900
|
+
readonly isShapesVisible?:boolean|null;
|
|
2901
|
+
|
|
2902
|
+
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
2908
2903
|
/**
|
|
2909
|
-
*
|
|
2910
|
-
* @return String
|
|
2904
|
+
* Disable updates for this Series.
|
|
2911
2905
|
*/
|
|
2912
|
-
|
|
2906
|
+
unsubscribe():void;
|
|
2907
|
+
get shape():string;
|
|
2913
2908
|
/**
|
|
2914
|
-
*
|
|
2909
|
+
* Contains details on how to access data within the chart for this series. keyed with the way that this series uses
|
|
2910
|
+
* the axis.
|
|
2911
|
+
* @return {@link dh.plot.SeriesDataSource}
|
|
2912
|
+
*/
|
|
2913
|
+
get sources():SeriesDataSource[];
|
|
2914
|
+
get lineColor():string;
|
|
2915
|
+
/**
|
|
2916
|
+
* The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2915
2917
|
* @return int
|
|
2916
2918
|
*/
|
|
2917
2919
|
get plotStyle():SeriesPlotStyleType;
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2920
|
+
get oneClick():OneClick;
|
|
2921
|
+
get gradientVisible():boolean;
|
|
2922
|
+
get shapeColor():string;
|
|
2923
|
+
/**
|
|
2924
|
+
* The name for this series.
|
|
2925
|
+
* @return String
|
|
2926
|
+
*/
|
|
2927
|
+
get name():string;
|
|
2928
|
+
/**
|
|
2929
|
+
* indicates that this series belongs to a MultiSeries, null otherwise
|
|
2930
|
+
* @return dh.plot.MultiSeries
|
|
2931
|
+
*/
|
|
2932
|
+
get multiSeries():MultiSeries;
|
|
2933
|
+
get shapeLabel():string;
|
|
2928
2934
|
}
|
|
2929
2935
|
/**
|
|
2930
2936
|
* Describes how to access and display data required within a series.
|
|
@@ -2948,58 +2954,92 @@ export namespace dh.plot {
|
|
|
2948
2954
|
}
|
|
2949
2955
|
|
|
2950
2956
|
/**
|
|
2951
|
-
*
|
|
2957
|
+
* Provide the details for a chart.
|
|
2952
2958
|
*/
|
|
2953
|
-
export class
|
|
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
|
+
|
|
2954
2970
|
protected constructor();
|
|
2955
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;
|
|
2956
2978
|
/**
|
|
2957
|
-
*
|
|
2958
|
-
*
|
|
2959
|
-
* @param table - The table to downsample.
|
|
2960
|
-
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
2961
|
-
* @param yCols - The names of the Y columns to downsample.
|
|
2962
|
-
* @param width - The width of the visible area in pixels.
|
|
2963
|
-
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
2964
|
-
* @return A promise that resolves to the downsampled table.
|
|
2979
|
+
* The axes used in this chart.
|
|
2980
|
+
* @return dh.plot.Axis
|
|
2965
2981
|
*/
|
|
2966
|
-
|
|
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();
|
|
2967
3024
|
}
|
|
2968
3025
|
|
|
2969
3026
|
/**
|
|
2970
|
-
*
|
|
2971
|
-
*
|
|
2972
|
-
*
|
|
2973
|
-
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
2974
|
-
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
2975
|
-
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
2976
|
-
* any) to reduce the number of points sent to the client.
|
|
2977
|
-
*
|
|
2978
|
-
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
2979
|
-
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
2980
|
-
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
2981
|
-
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
2982
|
-
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
2983
|
-
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
2984
|
-
*
|
|
2985
|
-
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
2986
|
-
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
2987
|
-
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
2988
|
-
* that the "important" values are visible.
|
|
2989
|
-
*
|
|
2990
|
-
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
2991
|
-
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
2992
|
-
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
2993
|
-
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
2994
|
-
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
2995
|
-
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
2996
|
-
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
2997
|
-
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
2998
|
-
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
2999
|
-
*
|
|
3000
|
-
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3001
|
-
* client-created figures.
|
|
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.
|
|
3002
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
|
+
|
|
3003
3043
|
export class Figure implements dh.HasEventHandling {
|
|
3004
3044
|
/**
|
|
3005
3045
|
* The title of the figure.
|
|
@@ -3043,8 +3083,7 @@ export namespace dh.plot {
|
|
|
3043
3083
|
*/
|
|
3044
3084
|
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3045
3085
|
|
|
3046
|
-
|
|
3047
|
-
|
|
3086
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3048
3087
|
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3049
3088
|
/**
|
|
3050
3089
|
* Disable updates for all series in this figure.
|
|
@@ -3083,38 +3122,6 @@ export namespace dh.plot {
|
|
|
3083
3122
|
* @typeParam T -
|
|
3084
3123
|
*/
|
|
3085
3124
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3086
|
-
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
export class FigureSourceException {
|
|
3090
|
-
table:dh.Table;
|
|
3091
|
-
source:SeriesDataSource;
|
|
3092
|
-
|
|
3093
|
-
protected constructor();
|
|
3094
|
-
}
|
|
3095
|
-
|
|
3096
|
-
export class AxisDescriptor {
|
|
3097
|
-
formatType:string;
|
|
3098
|
-
type:string;
|
|
3099
|
-
position:string;
|
|
3100
|
-
log?:boolean|null;
|
|
3101
|
-
label?:string|null;
|
|
3102
|
-
labelFont?:string|null;
|
|
3103
|
-
ticksFont?:string|null;
|
|
3104
|
-
formatPattern?:string|null;
|
|
3105
|
-
color?:string|null;
|
|
3106
|
-
minRange?:number|null;
|
|
3107
|
-
maxRange?:number|null;
|
|
3108
|
-
minorTicksVisible?:boolean|null;
|
|
3109
|
-
majorTicksVisible?:boolean|null;
|
|
3110
|
-
minorTickCount?:number|null;
|
|
3111
|
-
gapBetweenMajorTicks?:number|null;
|
|
3112
|
-
majorTickLocations?:Array<number>|null;
|
|
3113
|
-
tickLabelAngle?:number|null;
|
|
3114
|
-
invert?:boolean|null;
|
|
3115
|
-
isTimeAxis?:boolean|null;
|
|
3116
|
-
|
|
3117
|
-
constructor();
|
|
3118
3125
|
}
|
|
3119
3126
|
|
|
3120
3127
|
/**
|
|
@@ -3134,55 +3141,78 @@ export namespace dh.plot {
|
|
|
3134
3141
|
constructor();
|
|
3135
3142
|
}
|
|
3136
3143
|
|
|
3137
|
-
export class
|
|
3138
|
-
|
|
3139
|
-
|
|
3144
|
+
export class ChartDescriptor {
|
|
3145
|
+
colspan?:number|null;
|
|
3146
|
+
rowspan?:number|null;
|
|
3147
|
+
series:Array<SeriesDescriptor>;
|
|
3148
|
+
axes:Array<AxisDescriptor>;
|
|
3149
|
+
chartType:string;
|
|
3150
|
+
title?:string|null;
|
|
3151
|
+
titleFont?:string|null;
|
|
3152
|
+
titleColor?:string|null;
|
|
3153
|
+
showLegend?:boolean|null;
|
|
3154
|
+
legendFont?:string|null;
|
|
3155
|
+
legendColor?:string|null;
|
|
3156
|
+
is3d?:boolean|null;
|
|
3140
3157
|
|
|
3141
|
-
|
|
3158
|
+
constructor();
|
|
3142
3159
|
}
|
|
3143
3160
|
|
|
3144
3161
|
/**
|
|
3145
|
-
*
|
|
3162
|
+
* Helper class for plot downsampling methods.
|
|
3146
3163
|
*/
|
|
3147
|
-
export class
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
*/
|
|
3151
|
-
static readonly EVENT_SERIES_ADDED:string;
|
|
3164
|
+
export class Downsample {
|
|
3165
|
+
protected constructor();
|
|
3166
|
+
|
|
3152
3167
|
/**
|
|
3153
|
-
*
|
|
3154
|
-
*
|
|
3168
|
+
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3169
|
+
* the same visual fidelity as the original table, but with fewer rows.
|
|
3170
|
+
* @param table - The table to downsample.
|
|
3171
|
+
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3172
|
+
* @param yCols - The names of the Y columns to downsample.
|
|
3173
|
+
* @param width - The width of the visible area in pixels.
|
|
3174
|
+
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3175
|
+
* @return A promise that resolves to the downsampled table.
|
|
3155
3176
|
*/
|
|
3156
|
-
|
|
3177
|
+
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
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
|
+
}
|
|
3157
3193
|
|
|
3158
|
-
|
|
3194
|
+
export class AxisDescriptor {
|
|
3195
|
+
formatType:string;
|
|
3196
|
+
type:string;
|
|
3197
|
+
position:string;
|
|
3198
|
+
log?:boolean|null;
|
|
3199
|
+
label?:string|null;
|
|
3200
|
+
labelFont?:string|null;
|
|
3201
|
+
ticksFont?:string|null;
|
|
3202
|
+
formatPattern?:string|null;
|
|
3203
|
+
color?:string|null;
|
|
3204
|
+
minRange?:number|null;
|
|
3205
|
+
maxRange?:number|null;
|
|
3206
|
+
minorTicksVisible?:boolean|null;
|
|
3207
|
+
majorTicksVisible?:boolean|null;
|
|
3208
|
+
minorTickCount?:number|null;
|
|
3209
|
+
gapBetweenMajorTicks?:number|null;
|
|
3210
|
+
majorTickLocations?:Array<number>|null;
|
|
3211
|
+
tickLabelAngle?:number|null;
|
|
3212
|
+
invert?:boolean|null;
|
|
3213
|
+
isTimeAxis?:boolean|null;
|
|
3159
3214
|
|
|
3160
|
-
|
|
3161
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
3162
|
-
hasListeners(name:string):boolean;
|
|
3163
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3164
|
-
get column():number;
|
|
3165
|
-
get showLegend():boolean;
|
|
3166
|
-
/**
|
|
3167
|
-
* The axes used in this chart.
|
|
3168
|
-
* @return dh.plot.Axis
|
|
3169
|
-
*/
|
|
3170
|
-
get axes():Axis[];
|
|
3171
|
-
get is3d():boolean;
|
|
3172
|
-
get titleFont():string;
|
|
3173
|
-
get colspan():number;
|
|
3174
|
-
get titleColor():string;
|
|
3175
|
-
get series():Series[];
|
|
3176
|
-
get rowspan():number;
|
|
3177
|
-
/**
|
|
3178
|
-
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3179
|
-
* @return int
|
|
3180
|
-
*/
|
|
3181
|
-
get chartType():ChartTypeType;
|
|
3182
|
-
get row():number;
|
|
3183
|
-
get legendColor():string;
|
|
3184
|
-
get legendFont():string;
|
|
3185
|
-
get multiSeries():MultiSeries[];
|
|
3215
|
+
constructor();
|
|
3186
3216
|
}
|
|
3187
3217
|
|
|
3188
3218
|
export class SourceDescriptor {
|
|
@@ -3194,21 +3224,11 @@ export namespace dh.plot {
|
|
|
3194
3224
|
constructor();
|
|
3195
3225
|
}
|
|
3196
3226
|
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
* keep that cached as well.
|
|
3201
|
-
*/
|
|
3202
|
-
export class ChartData {
|
|
3203
|
-
constructor(table:dh.Table);
|
|
3227
|
+
export class FigureSourceException {
|
|
3228
|
+
table:dh.Table;
|
|
3229
|
+
source:SeriesDataSource;
|
|
3204
3230
|
|
|
3205
|
-
|
|
3206
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3207
|
-
/**
|
|
3208
|
-
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3209
|
-
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3210
|
-
*/
|
|
3211
|
-
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3231
|
+
protected constructor();
|
|
3212
3232
|
}
|
|
3213
3233
|
|
|
3214
3234
|
export class SeriesDescriptor {
|
|
@@ -3230,57 +3250,38 @@ export namespace dh.plot {
|
|
|
3230
3250
|
constructor();
|
|
3231
3251
|
}
|
|
3232
3252
|
|
|
3233
|
-
export class SeriesDataSourceException {
|
|
3234
|
-
protected constructor();
|
|
3235
3253
|
|
|
3236
|
-
|
|
3237
|
-
|
|
3254
|
+
type SeriesPlotStyleType = number;
|
|
3255
|
+
export class SeriesPlotStyle {
|
|
3256
|
+
static readonly BAR:SeriesPlotStyleType;
|
|
3257
|
+
static readonly STACKED_BAR:SeriesPlotStyleType;
|
|
3258
|
+
static readonly LINE:SeriesPlotStyleType;
|
|
3259
|
+
static readonly AREA:SeriesPlotStyleType;
|
|
3260
|
+
static readonly STACKED_AREA:SeriesPlotStyleType;
|
|
3261
|
+
static readonly PIE:SeriesPlotStyleType;
|
|
3262
|
+
static readonly HISTOGRAM:SeriesPlotStyleType;
|
|
3263
|
+
static readonly OHLC:SeriesPlotStyleType;
|
|
3264
|
+
static readonly SCATTER:SeriesPlotStyleType;
|
|
3265
|
+
static readonly STEP:SeriesPlotStyleType;
|
|
3266
|
+
static readonly ERROR_BAR:SeriesPlotStyleType;
|
|
3267
|
+
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3238
3268
|
}
|
|
3239
3269
|
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
axes:Array<AxisDescriptor>;
|
|
3245
|
-
chartType:string;
|
|
3246
|
-
title?:string|null;
|
|
3247
|
-
titleFont?:string|null;
|
|
3248
|
-
titleColor?:string|null;
|
|
3249
|
-
showLegend?:boolean|null;
|
|
3250
|
-
legendFont?:string|null;
|
|
3251
|
-
legendColor?:string|null;
|
|
3252
|
-
is3d?:boolean|null;
|
|
3253
|
-
|
|
3254
|
-
constructor();
|
|
3270
|
+
type AxisFormatTypeType = number;
|
|
3271
|
+
export class AxisFormatType {
|
|
3272
|
+
static readonly CATEGORY:AxisFormatTypeType;
|
|
3273
|
+
static readonly NUMBER:AxisFormatTypeType;
|
|
3255
3274
|
}
|
|
3256
3275
|
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
static
|
|
3264
|
-
/**
|
|
3265
|
-
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3266
|
-
* downsampling disabled, the series will not load data.
|
|
3267
|
-
*/
|
|
3268
|
-
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3269
|
-
/**
|
|
3270
|
-
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3271
|
-
* axes are configured.
|
|
3272
|
-
*/
|
|
3273
|
-
static readonly DEFAULT:DownsampleOptions;
|
|
3274
|
-
/**
|
|
3275
|
-
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3276
|
-
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3277
|
-
*/
|
|
3278
|
-
static readonly DISABLE:DownsampleOptions;
|
|
3279
|
-
|
|
3280
|
-
protected constructor();
|
|
3276
|
+
type AxisPositionType = number;
|
|
3277
|
+
export class AxisPosition {
|
|
3278
|
+
static readonly TOP:AxisPositionType;
|
|
3279
|
+
static readonly BOTTOM:AxisPositionType;
|
|
3280
|
+
static readonly LEFT:AxisPositionType;
|
|
3281
|
+
static readonly RIGHT:AxisPositionType;
|
|
3282
|
+
static readonly NONE:AxisPositionType;
|
|
3281
3283
|
}
|
|
3282
3284
|
|
|
3283
|
-
|
|
3284
3285
|
type AxisTypeType = number;
|
|
3285
3286
|
export class AxisType {
|
|
3286
3287
|
static readonly X:AxisTypeType;
|
|
@@ -3306,31 +3307,6 @@ export namespace dh.plot {
|
|
|
3306
3307
|
static readonly TREEMAP:ChartTypeType;
|
|
3307
3308
|
}
|
|
3308
3309
|
|
|
3309
|
-
type SeriesPlotStyleType = number;
|
|
3310
|
-
export class SeriesPlotStyle {
|
|
3311
|
-
static readonly BAR:SeriesPlotStyleType;
|
|
3312
|
-
static readonly STACKED_BAR:SeriesPlotStyleType;
|
|
3313
|
-
static readonly LINE:SeriesPlotStyleType;
|
|
3314
|
-
static readonly AREA:SeriesPlotStyleType;
|
|
3315
|
-
static readonly STACKED_AREA:SeriesPlotStyleType;
|
|
3316
|
-
static readonly PIE:SeriesPlotStyleType;
|
|
3317
|
-
static readonly HISTOGRAM:SeriesPlotStyleType;
|
|
3318
|
-
static readonly OHLC:SeriesPlotStyleType;
|
|
3319
|
-
static readonly SCATTER:SeriesPlotStyleType;
|
|
3320
|
-
static readonly STEP:SeriesPlotStyleType;
|
|
3321
|
-
static readonly ERROR_BAR:SeriesPlotStyleType;
|
|
3322
|
-
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3323
|
-
}
|
|
3324
|
-
|
|
3325
|
-
type AxisPositionType = number;
|
|
3326
|
-
export class AxisPosition {
|
|
3327
|
-
static readonly TOP:AxisPositionType;
|
|
3328
|
-
static readonly BOTTOM:AxisPositionType;
|
|
3329
|
-
static readonly LEFT:AxisPositionType;
|
|
3330
|
-
static readonly RIGHT:AxisPositionType;
|
|
3331
|
-
static readonly NONE:AxisPositionType;
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
3310
|
/**
|
|
3335
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
|
|
3336
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
|
|
@@ -3360,74 +3336,42 @@ export namespace dh.plot {
|
|
|
3360
3336
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3361
3337
|
}
|
|
3362
3338
|
|
|
3363
|
-
type AxisFormatTypeType = number;
|
|
3364
|
-
export class AxisFormatType {
|
|
3365
|
-
static readonly CATEGORY:AxisFormatTypeType;
|
|
3366
|
-
static readonly NUMBER:AxisFormatTypeType;
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
3339
|
}
|
|
3370
3340
|
|
|
3371
3341
|
export namespace dh.lsp {
|
|
3372
3342
|
|
|
3373
|
-
export class
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
text:string;
|
|
3377
|
-
|
|
3378
|
-
constructor();
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
export class Hover {
|
|
3382
|
-
contents:MarkupContent;
|
|
3383
|
-
range:Range;
|
|
3384
|
-
|
|
3385
|
-
constructor();
|
|
3386
|
-
}
|
|
3387
|
-
|
|
3388
|
-
export class TextEdit {
|
|
3389
|
-
range:Range;
|
|
3390
|
-
text:string;
|
|
3343
|
+
export class MarkupContent {
|
|
3344
|
+
kind:string;
|
|
3345
|
+
value:string;
|
|
3391
3346
|
|
|
3392
3347
|
constructor();
|
|
3393
3348
|
}
|
|
3394
3349
|
|
|
3395
|
-
export class
|
|
3350
|
+
export class ParameterInformation {
|
|
3396
3351
|
label:string;
|
|
3397
|
-
kind:number;
|
|
3398
|
-
detail:string;
|
|
3399
3352
|
documentation:MarkupContent;
|
|
3400
|
-
deprecated:boolean;
|
|
3401
|
-
preselect:boolean;
|
|
3402
|
-
textEdit:TextEdit;
|
|
3403
|
-
sortText:string;
|
|
3404
|
-
filterText:string;
|
|
3405
|
-
insertTextFormat:number;
|
|
3406
|
-
additionalTextEdits:Array<TextEdit>;
|
|
3407
|
-
commitCharacters:Array<string>;
|
|
3408
3353
|
|
|
3409
3354
|
constructor();
|
|
3410
3355
|
}
|
|
3411
3356
|
|
|
3412
|
-
export class
|
|
3413
|
-
|
|
3414
|
-
|
|
3357
|
+
export class TextDocumentContentChangeEvent {
|
|
3358
|
+
range:Range;
|
|
3359
|
+
rangeLength:number;
|
|
3360
|
+
text:string;
|
|
3415
3361
|
|
|
3416
3362
|
constructor();
|
|
3417
3363
|
}
|
|
3418
3364
|
|
|
3419
|
-
export class
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
parameters:Array<ParameterInformation>;
|
|
3423
|
-
activeParameter:number;
|
|
3365
|
+
export class Hover {
|
|
3366
|
+
contents:MarkupContent;
|
|
3367
|
+
range:Range;
|
|
3424
3368
|
|
|
3425
3369
|
constructor();
|
|
3426
3370
|
}
|
|
3427
3371
|
|
|
3428
|
-
export class
|
|
3429
|
-
|
|
3430
|
-
|
|
3372
|
+
export class TextEdit {
|
|
3373
|
+
range:Range;
|
|
3374
|
+
text:string;
|
|
3431
3375
|
|
|
3432
3376
|
constructor();
|
|
3433
3377
|
}
|
|
@@ -3454,8 +3398,35 @@ export namespace dh.lsp {
|
|
|
3454
3398
|
copy():Position;
|
|
3455
3399
|
}
|
|
3456
3400
|
|
|
3401
|
+
export class SignatureInformation {
|
|
3402
|
+
label:string;
|
|
3403
|
+
documentation:MarkupContent;
|
|
3404
|
+
parameters:Array<ParameterInformation>;
|
|
3405
|
+
activeParameter:number;
|
|
3406
|
+
|
|
3407
|
+
constructor();
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
export class CompletionItem {
|
|
3411
|
+
label:string;
|
|
3412
|
+
kind:number;
|
|
3413
|
+
detail:string;
|
|
3414
|
+
documentation:MarkupContent;
|
|
3415
|
+
deprecated:boolean;
|
|
3416
|
+
preselect:boolean;
|
|
3417
|
+
textEdit:TextEdit;
|
|
3418
|
+
sortText:string;
|
|
3419
|
+
filterText:string;
|
|
3420
|
+
insertTextFormat:number;
|
|
3421
|
+
additionalTextEdits:Array<TextEdit>;
|
|
3422
|
+
commitCharacters:Array<string>;
|
|
3423
|
+
|
|
3424
|
+
constructor();
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3457
3427
|
}
|
|
3458
3428
|
|
|
3429
|
+
|
|
3459
3430
|
export namespace dh.calendar {
|
|
3460
3431
|
|
|
3461
3432
|
export interface Holiday {
|
|
@@ -3470,6 +3441,10 @@ export namespace dh.calendar {
|
|
|
3470
3441
|
*/
|
|
3471
3442
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3472
3443
|
}
|
|
3444
|
+
export interface BusinessPeriod {
|
|
3445
|
+
get close():string;
|
|
3446
|
+
get open():string;
|
|
3447
|
+
}
|
|
3473
3448
|
/**
|
|
3474
3449
|
* Defines a calendar with business hours and holidays.
|
|
3475
3450
|
*/
|
|
@@ -3500,10 +3475,6 @@ export namespace dh.calendar {
|
|
|
3500
3475
|
*/
|
|
3501
3476
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3502
3477
|
}
|
|
3503
|
-
export interface BusinessPeriod {
|
|
3504
|
-
get close():string;
|
|
3505
|
-
get open():string;
|
|
3506
|
-
}
|
|
3507
3478
|
|
|
3508
3479
|
type DayOfWeekType = string;
|
|
3509
3480
|
export class DayOfWeek {
|
|
@@ -3519,4 +3490,3 @@ export namespace dh.calendar {
|
|
|
3519
3490
|
}
|
|
3520
3491
|
|
|
3521
3492
|
}
|
|
3522
|
-
|