@deephaven/jsapi-types 1.0.0-dev0.36.1 → 1.0.0-dev0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1925 -1828
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
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
|
-
}
|
|
8
4
|
/**
|
|
9
5
|
* This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
|
|
10
6
|
* returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
|
|
@@ -15,39 +11,12 @@ export interface Iterator<T> {
|
|
|
15
11
|
hasNext():boolean;
|
|
16
12
|
next():IIterableResult<T>;
|
|
17
13
|
}
|
|
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
|
-
|
|
51
20
|
/**
|
|
52
21
|
* Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
|
|
53
22
|
*/
|
|
@@ -106,6 +75,37 @@ export namespace dh.storage {
|
|
|
106
75
|
createDirectory(path:string):Promise<void>;
|
|
107
76
|
}
|
|
108
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
80
|
+
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
81
|
+
* be used.
|
|
82
|
+
*/
|
|
83
|
+
export class FileContents {
|
|
84
|
+
protected constructor();
|
|
85
|
+
|
|
86
|
+
static blob(blob:Blob):FileContents;
|
|
87
|
+
static text(...text:string[]):FileContents;
|
|
88
|
+
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
89
|
+
text():Promise<string>;
|
|
90
|
+
arrayBuffer():Promise<ArrayBuffer>;
|
|
91
|
+
get etag():string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Storage service metadata about files and folders.
|
|
96
|
+
*/
|
|
97
|
+
export class ItemDetails {
|
|
98
|
+
protected constructor();
|
|
99
|
+
|
|
100
|
+
toString():string;
|
|
101
|
+
get filename():string;
|
|
102
|
+
get basename():string;
|
|
103
|
+
get size():number;
|
|
104
|
+
get etag():string;
|
|
105
|
+
get type():ItemTypeType;
|
|
106
|
+
get dirname():string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -117,120 +117,14 @@ export namespace dh.storage {
|
|
|
117
117
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
|
-
export interface ColumnGroup {
|
|
121
|
-
get name():string|null;
|
|
122
|
-
get children():string[]|null;
|
|
123
|
-
get color():string|null;
|
|
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
|
-
}
|
|
133
|
-
/**
|
|
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.
|
|
138
|
-
*/
|
|
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 {
|
|
182
|
-
/**
|
|
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 -
|
|
188
|
-
*/
|
|
189
|
-
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
|
|
190
|
-
/**
|
|
191
|
-
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
192
|
-
*/
|
|
193
|
-
close():void;
|
|
194
|
-
/**
|
|
195
|
-
* Gets the data currently visible in this viewport
|
|
196
|
-
* @return Promise of {@link dh.TableData}.
|
|
197
|
-
*/
|
|
198
|
-
getViewportData():Promise<TableData>;
|
|
199
|
-
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
200
|
-
}
|
|
201
120
|
/**
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* This class supports two ways of reading the table - checking the changes made since the last update, and reading
|
|
206
|
-
* all data currently in the table. While it is more expensive to always iterate over every single row in the table,
|
|
207
|
-
* it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
|
|
208
|
-
* both options should be considered.
|
|
209
|
-
*
|
|
210
|
-
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
211
|
-
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
212
|
-
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
|
|
213
|
-
* read specific rows or cells out of the table.
|
|
121
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
122
|
+
* request the viewport again.
|
|
214
123
|
*/
|
|
215
|
-
export interface
|
|
216
|
-
get
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
* @return dh.RangeSet
|
|
220
|
-
*/
|
|
221
|
-
get removed():RangeSet;
|
|
222
|
-
/**
|
|
223
|
-
* The ordered set of row indexes added since the last update
|
|
224
|
-
* @return dh.RangeSet
|
|
225
|
-
*/
|
|
226
|
-
get added():RangeSet;
|
|
227
|
-
get columns():Array<Column>;
|
|
228
|
-
/**
|
|
229
|
-
* The ordered set of row indexes updated since the last update
|
|
230
|
-
* @return dh.RangeSet
|
|
231
|
-
*/
|
|
232
|
-
get modified():RangeSet;
|
|
233
|
-
get rows():Array<Row>;
|
|
124
|
+
export interface ViewportRow extends Row {
|
|
125
|
+
get(column:Column):any;
|
|
126
|
+
getFormat(column:Column):Format;
|
|
127
|
+
get index():LongWrapper;
|
|
234
128
|
}
|
|
235
129
|
export interface HasEventHandling {
|
|
236
130
|
/**
|
|
@@ -240,8 +134,8 @@ export namespace dh {
|
|
|
240
134
|
* @return Returns a cleanup function.
|
|
241
135
|
* @typeParam T - the type of the data that the event will provide
|
|
242
136
|
*/
|
|
243
|
-
addEventListener<T>(name:string, callback:(e:
|
|
244
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
137
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
138
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
245
139
|
hasListeners(name:string):boolean;
|
|
246
140
|
/**
|
|
247
141
|
* Removes an event listener added to this table.
|
|
@@ -250,198 +144,48 @@ export namespace dh {
|
|
|
250
144
|
* @return
|
|
251
145
|
* @typeParam T -
|
|
252
146
|
*/
|
|
253
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
147
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
254
148
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
export interface JoinableTable {
|
|
260
|
-
freeze():Promise<Table>;
|
|
261
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
262
|
-
/**
|
|
263
|
-
* Joins this table to the provided table, using one of the specified join types:
|
|
264
|
-
* <ul>
|
|
265
|
-
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
266
|
-
* provided matching rule.</li>
|
|
267
|
-
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
268
|
-
* tables.</li>
|
|
269
|
-
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
270
|
-
* with errors if there is not exactly one.</li>
|
|
271
|
-
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
272
|
-
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
273
|
-
* </ul>
|
|
274
|
-
*
|
|
275
|
-
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
276
|
-
* <p>
|
|
277
|
-
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
278
|
-
* more guidance on picking a join operation.
|
|
279
|
-
* @deprecated Instead, call the specific method for the join type.
|
|
280
|
-
* @param joinType - The type of join to perform, see the list above.
|
|
281
|
-
* @param rightTable - The table to match to values in this table
|
|
282
|
-
* @param columnsToMatch - Columns that should match
|
|
283
|
-
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
284
|
-
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
285
|
-
* @return a promise that will resolve to the joined table
|
|
286
|
-
*/
|
|
287
|
-
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
288
|
-
/**
|
|
289
|
-
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
290
|
-
* row from the right table.
|
|
291
|
-
* <p>
|
|
292
|
-
* The `asOfMatchRule` value can be one of:
|
|
293
|
-
* <ul>
|
|
294
|
-
* <li>LESS_THAN_EQUAL</li>
|
|
295
|
-
* <li>LESS_THAN</li>
|
|
296
|
-
* <li>GREATER_THAN_EQUAL</li>
|
|
297
|
-
* <li>GREATER_THAN</li>
|
|
298
|
-
* </ul>
|
|
299
|
-
* @param rightTable - the table to match to values in this table
|
|
300
|
-
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
301
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
302
|
-
* columns
|
|
303
|
-
* @param asOfMatchRule - the match rule to use, see above
|
|
304
|
-
* @return a promise that will resolve to the joined table
|
|
305
|
-
*/
|
|
306
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
307
|
-
/**
|
|
308
|
-
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
309
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
310
|
-
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
311
|
-
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
312
|
-
* @param rightTable - the table to match to values in this table
|
|
313
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
314
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
315
|
-
* columns
|
|
316
|
-
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
317
|
-
* server select a value
|
|
318
|
-
* @return a promise that will resolve to the joined table
|
|
319
|
-
*/
|
|
320
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
321
|
-
/**
|
|
322
|
-
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
323
|
-
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
324
|
-
* table being added to the output.
|
|
325
|
-
* @param rightTable - the table to match to values in this table
|
|
326
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
327
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
328
|
-
* columns
|
|
329
|
-
* @return a promise that will resolve to the joined table
|
|
330
|
-
*/
|
|
331
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
332
|
-
/**
|
|
333
|
-
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
334
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
335
|
-
* right table being added to the output.
|
|
336
|
-
* @param rightTable - the table to match to values in this table
|
|
337
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
338
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
339
|
-
* columns
|
|
340
|
-
* @return a promise that will resolve to the joined table
|
|
341
|
-
*/
|
|
342
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
149
|
+
export interface ColumnGroup {
|
|
150
|
+
get name():string|null;
|
|
151
|
+
get children():string[]|null;
|
|
152
|
+
get color():string|null;
|
|
343
153
|
}
|
|
344
154
|
/**
|
|
345
|
-
* Row implementation that also provides additional read-only properties. represents visible rows in the table,
|
|
346
|
-
*
|
|
155
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
156
|
+
* with additional properties to reflect the tree structure.
|
|
347
157
|
*/
|
|
348
|
-
export interface TreeRow extends
|
|
158
|
+
export interface TreeRow extends Row {
|
|
159
|
+
get(column:Column):any;
|
|
160
|
+
getFormat(column:Column):Format;
|
|
349
161
|
/**
|
|
350
162
|
* 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
|
|
163
|
+
* rows below this one with a greater depth than this one.
|
|
352
164
|
* @return boolean
|
|
353
165
|
*/
|
|
354
166
|
get isExpanded():boolean;
|
|
355
167
|
/**
|
|
356
|
-
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
|
|
357
|
-
*
|
|
168
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
|
|
169
|
+
* and its expand/collapse icon.
|
|
358
170
|
* @return int
|
|
359
171
|
*/
|
|
360
172
|
get depth():number;
|
|
361
173
|
/**
|
|
362
|
-
* True if this node has children and can be expanded; false otherwise. Note that this value may change when
|
|
363
|
-
*
|
|
174
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when the
|
|
175
|
+
* table updates, depending on the table's configuration.
|
|
364
176
|
* @return boolean
|
|
365
177
|
*/
|
|
366
178
|
get hasChildren():boolean;
|
|
367
179
|
get index():LongWrapper;
|
|
368
180
|
}
|
|
181
|
+
export interface RefreshToken {
|
|
182
|
+
get bytes():string;
|
|
183
|
+
get expiry():number;
|
|
184
|
+
}
|
|
369
185
|
/**
|
|
370
|
-
*
|
|
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.
|
|
186
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
373
187
|
*/
|
|
374
|
-
export interface
|
|
375
|
-
/**
|
|
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 {
|
|
188
|
+
export interface Format {
|
|
445
189
|
/**
|
|
446
190
|
* The format string to apply to the value of this cell.
|
|
447
191
|
* @return String
|
|
@@ -464,34 +208,6 @@ export namespace dh {
|
|
|
464
208
|
readonly numberFormat?:string|null;
|
|
465
209
|
}
|
|
466
210
|
/**
|
|
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
211
|
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
496
212
|
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
497
213
|
* are correctly freed.
|
|
@@ -523,9 +239,13 @@ export namespace dh {
|
|
|
523
239
|
*/
|
|
524
240
|
close():void;
|
|
525
241
|
}
|
|
526
|
-
export interface
|
|
527
|
-
|
|
528
|
-
|
|
242
|
+
export interface WorkerHeapInfo {
|
|
243
|
+
/**
|
|
244
|
+
* Total heap size available for this worker.
|
|
245
|
+
*/
|
|
246
|
+
get totalHeapSize():number;
|
|
247
|
+
get freeMemory():number;
|
|
248
|
+
get maximumHeapSize():number;
|
|
529
249
|
}
|
|
530
250
|
/**
|
|
531
251
|
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
@@ -555,13 +275,13 @@ export namespace dh {
|
|
|
555
275
|
* @param columns -
|
|
556
276
|
* @param updateIntervalMs -
|
|
557
277
|
*/
|
|
558
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
|
|
278
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
|
|
559
279
|
/**
|
|
560
280
|
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
561
281
|
* resolve until that data is ready.
|
|
562
282
|
* @return Promise of {@link dh.TableData}
|
|
563
283
|
*/
|
|
564
|
-
getViewportData():Promise<
|
|
284
|
+
getViewportData():Promise<ViewportData>;
|
|
565
285
|
/**
|
|
566
286
|
* a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
|
|
567
287
|
* returned value.
|
|
@@ -579,9 +299,9 @@ export namespace dh {
|
|
|
579
299
|
* Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
|
|
580
300
|
*/
|
|
581
301
|
close():void;
|
|
582
|
-
addEventListener<T>(name:string, callback:(e:
|
|
583
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
584
|
-
nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<
|
|
302
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
303
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
304
|
+
nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<Event<T>>;
|
|
585
305
|
hasListeners(name:string):boolean;
|
|
586
306
|
/**
|
|
587
307
|
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
@@ -657,168 +377,377 @@ export namespace dh {
|
|
|
657
377
|
get isRefreshing():boolean;
|
|
658
378
|
}
|
|
659
379
|
export interface TreeViewportData extends TableData {
|
|
660
|
-
get
|
|
380
|
+
get(index:LongWrapper|number):TreeRow;
|
|
381
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
382
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
383
|
+
get treeSize():number;
|
|
661
384
|
get columns():Array<Column>;
|
|
662
385
|
get rows():Array<TreeRow>;
|
|
663
386
|
}
|
|
664
387
|
/**
|
|
665
|
-
*
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
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.
|
|
388
|
+
* Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
|
|
389
|
+
* on tables, data in trees, and snapshots.
|
|
390
|
+
* <p>
|
|
391
|
+
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
392
|
+
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
393
|
+
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
678
394
|
*/
|
|
679
|
-
export
|
|
395
|
+
export interface TableData {
|
|
680
396
|
/**
|
|
681
|
-
*
|
|
397
|
+
* Reads a row object from the table, from which any subscribed column can be read.
|
|
398
|
+
* @param index - the position or key to access
|
|
399
|
+
* @return the row at the given location
|
|
682
400
|
*/
|
|
683
|
-
|
|
401
|
+
get(index:LongWrapper|number):Row;
|
|
684
402
|
/**
|
|
685
|
-
*
|
|
403
|
+
* Reads a specific cell from the table, by row key and column.
|
|
404
|
+
* @param index - the row in the table to get data from
|
|
405
|
+
* @param column - the column to read
|
|
406
|
+
* @return the value in the table
|
|
686
407
|
*/
|
|
687
|
-
|
|
408
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
688
409
|
/**
|
|
689
|
-
*
|
|
410
|
+
* The server-specified Format to use for the cell at the given position.
|
|
411
|
+
* @param index - the row to read
|
|
412
|
+
* @param column - the column to read
|
|
413
|
+
* @return a Format instance with any server-specified details
|
|
690
414
|
*/
|
|
691
|
-
|
|
415
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
416
|
+
get columns():Array<Column>;
|
|
692
417
|
/**
|
|
693
|
-
*
|
|
418
|
+
* A lazily computed array of all rows available on the client.
|
|
694
419
|
*/
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
420
|
+
get rows():Array<Row>;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
424
|
+
* details about the event.
|
|
425
|
+
* @typeParam T - the type of the event detail
|
|
426
|
+
*/
|
|
427
|
+
export interface Event<T> {
|
|
428
|
+
readonly detail?:null|@jsinterop.annotations.JsNullable T;
|
|
698
429
|
|
|
699
|
-
|
|
430
|
+
get type():string;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
434
|
+
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
435
|
+
* event, or re-request the viewport data.
|
|
436
|
+
*/
|
|
437
|
+
export interface Row {
|
|
438
|
+
get(column:Column):any;
|
|
439
|
+
getFormat(column:Column):Format;
|
|
440
|
+
get index():LongWrapper;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
444
|
+
* {@link dh.TotalsTable}.
|
|
445
|
+
*/
|
|
446
|
+
export interface JoinableTable {
|
|
447
|
+
freeze():Promise<Table>;
|
|
448
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
700
449
|
/**
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
450
|
+
* Joins this table to the provided table, using one of the specified join types:
|
|
451
|
+
* <ul>
|
|
452
|
+
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
453
|
+
* provided matching rule.</li>
|
|
454
|
+
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
455
|
+
* tables.</li>
|
|
456
|
+
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
457
|
+
* with errors if there is not exactly one.</li>
|
|
458
|
+
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
459
|
+
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
460
|
+
* </ul>
|
|
461
|
+
*
|
|
462
|
+
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
463
|
+
* <p>
|
|
464
|
+
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
465
|
+
* more guidance on picking a join operation.
|
|
466
|
+
* @deprecated Instead, call the specific method for the join type.
|
|
467
|
+
* @param joinType - The type of join to perform, see the list above.
|
|
468
|
+
* @param rightTable - The table to match to values in this table
|
|
469
|
+
* @param columnsToMatch - Columns that should match
|
|
470
|
+
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
471
|
+
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
472
|
+
* @return a promise that will resolve to the joined table
|
|
704
473
|
*/
|
|
705
|
-
|
|
474
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
706
475
|
/**
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
476
|
+
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
477
|
+
* row from the right table.
|
|
478
|
+
* <p>
|
|
479
|
+
* The `asOfMatchRule` value can be one of:
|
|
480
|
+
* <ul>
|
|
481
|
+
* <li>LESS_THAN_EQUAL</li>
|
|
482
|
+
* <li>LESS_THAN</li>
|
|
483
|
+
* <li>GREATER_THAN_EQUAL</li>
|
|
484
|
+
* <li>GREATER_THAN</li>
|
|
485
|
+
* </ul>
|
|
486
|
+
* @param rightTable - the table to match to values in this table
|
|
487
|
+
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
488
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
489
|
+
* columns
|
|
490
|
+
* @param asOfMatchRule - the match rule to use, see above
|
|
491
|
+
* @return a promise that will resolve to the joined table
|
|
710
492
|
*/
|
|
711
|
-
|
|
493
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
712
494
|
/**
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
495
|
+
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
496
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
497
|
+
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
498
|
+
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
499
|
+
* @param rightTable - the table to match to values in this table
|
|
500
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
501
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
502
|
+
* columns
|
|
503
|
+
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
504
|
+
* server select a value
|
|
505
|
+
* @return a promise that will resolve to the joined table
|
|
716
506
|
*/
|
|
717
|
-
|
|
507
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
718
508
|
/**
|
|
719
|
-
*
|
|
720
|
-
*
|
|
721
|
-
*
|
|
509
|
+
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
510
|
+
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
511
|
+
* table being added to the output.
|
|
512
|
+
* @param rightTable - the table to match to values in this table
|
|
513
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
514
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
515
|
+
* columns
|
|
516
|
+
* @return a promise that will resolve to the joined table
|
|
722
517
|
*/
|
|
723
|
-
|
|
518
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
724
519
|
/**
|
|
725
|
-
*
|
|
726
|
-
*
|
|
520
|
+
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
521
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
522
|
+
* right table being added to the output.
|
|
523
|
+
* @param rightTable - the table to match to values in this table
|
|
524
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
525
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
526
|
+
* columns
|
|
527
|
+
* @return a promise that will resolve to the joined table
|
|
727
528
|
*/
|
|
728
|
-
|
|
529
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
533
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
534
|
+
*
|
|
535
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
536
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
537
|
+
* backwards compatibility and to better follow JS expectations.
|
|
538
|
+
*/
|
|
539
|
+
export interface WidgetMessageDetails {
|
|
729
540
|
/**
|
|
730
|
-
*
|
|
731
|
-
* will not affect tables in use.
|
|
541
|
+
* Returns the data from this message as a base64-encoded string.
|
|
732
542
|
*/
|
|
733
|
-
|
|
543
|
+
getDataAsBase64():string;
|
|
734
544
|
/**
|
|
735
|
-
*
|
|
736
|
-
* @return int
|
|
545
|
+
* Returns the data from this message as a Uint8Array.
|
|
737
546
|
*/
|
|
738
|
-
|
|
547
|
+
getDataAsU8():Uint8Array;
|
|
739
548
|
/**
|
|
740
|
-
*
|
|
741
|
-
* non-key columns.
|
|
742
|
-
* @return Array of Column
|
|
549
|
+
* Returns the data from this message as a utf-8 string.
|
|
743
550
|
*/
|
|
744
|
-
|
|
551
|
+
getDataAsString():string;
|
|
745
552
|
/**
|
|
746
|
-
*
|
|
747
|
-
*
|
|
553
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
554
|
+
* objects, and should close them when no longer needed.
|
|
748
555
|
*/
|
|
749
|
-
get
|
|
556
|
+
get exportedObjects():WidgetExportedObject[];
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
|
|
560
|
+
* ViewportData also contains the offset to this data, so that the actual row number may be determined.
|
|
561
|
+
* <p>
|
|
562
|
+
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
563
|
+
* <p>
|
|
564
|
+
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
565
|
+
* scrolling without going to the server.
|
|
566
|
+
*/
|
|
567
|
+
export interface ViewportData extends TableData {
|
|
750
568
|
/**
|
|
751
|
-
*
|
|
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
|
|
569
|
+
* Reads a row object from the viewport, based on its position in the table.
|
|
756
570
|
*/
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
571
|
+
get(index:LongWrapper|number):ViewportRow;
|
|
572
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
573
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
760
574
|
/**
|
|
761
|
-
*
|
|
762
|
-
* @param name -
|
|
763
|
-
* @param callback -
|
|
764
|
-
* @return
|
|
765
|
-
* @typeParam T -
|
|
575
|
+
* The position of the first returned row, null if this data is not for a viewport.
|
|
766
576
|
*/
|
|
767
|
-
|
|
577
|
+
get offset():number;
|
|
578
|
+
get columns():Array<Column>;
|
|
579
|
+
get rows():Array<ViewportRow>;
|
|
768
580
|
}
|
|
769
|
-
|
|
770
581
|
/**
|
|
771
|
-
*
|
|
582
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
583
|
+
* columns) either by index, or scanning the complete present index.
|
|
584
|
+
* <p>
|
|
585
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
586
|
+
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
587
|
+
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
588
|
+
* options should be considered.
|
|
589
|
+
* <p>
|
|
590
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
591
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
592
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
593
|
+
* specific rows or cells out of the table.
|
|
772
594
|
*/
|
|
773
|
-
export
|
|
774
|
-
|
|
595
|
+
export interface SubscriptionTableData extends TableData {
|
|
596
|
+
get fullIndex():RangeSet;
|
|
597
|
+
/**
|
|
598
|
+
* The ordered set of row indexes removed since the last update
|
|
599
|
+
* @return the rangeset of removed rows
|
|
600
|
+
*/
|
|
601
|
+
get removed():RangeSet;
|
|
602
|
+
/**
|
|
603
|
+
* The ordered set of row indexes added since the last update.
|
|
604
|
+
* @return the rangeset of rows added
|
|
605
|
+
*/
|
|
606
|
+
get added():RangeSet;
|
|
607
|
+
get columns():Array<Column>;
|
|
608
|
+
/**
|
|
609
|
+
* The ordered set of row indexes updated since the last update
|
|
610
|
+
* @return the rnageset of modified rows
|
|
611
|
+
*/
|
|
612
|
+
get modified():RangeSet;
|
|
613
|
+
/**
|
|
614
|
+
* A lazily computed array of all rows available on the client.
|
|
615
|
+
*/
|
|
616
|
+
get rows():Array<Row>;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Represents statistics for a given table column.
|
|
620
|
+
*/
|
|
621
|
+
export interface ColumnStatistics {
|
|
622
|
+
/**
|
|
623
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
624
|
+
* <p>
|
|
625
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
626
|
+
* @param name - the display name of the statistic
|
|
627
|
+
* @return String
|
|
628
|
+
*/
|
|
629
|
+
getType(name:string):string;
|
|
630
|
+
/**
|
|
631
|
+
* 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
|
|
632
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
633
|
+
* than 19 unique values.
|
|
634
|
+
* @return Map of String double
|
|
635
|
+
*/
|
|
636
|
+
get uniqueValues():Map<string, number>;
|
|
637
|
+
/**
|
|
638
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
639
|
+
* <p>
|
|
640
|
+
* A map of each statistic's name to its value.
|
|
641
|
+
* @return Map of String and Object
|
|
642
|
+
*/
|
|
643
|
+
get statisticsMap():Map<string, object>;
|
|
644
|
+
}
|
|
645
|
+
export interface LayoutHints {
|
|
646
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
775
647
|
|
|
776
|
-
|
|
777
|
-
|
|
648
|
+
get hiddenColumns():string[]|null;
|
|
649
|
+
get frozenColumns():string[]|null;
|
|
650
|
+
get columnGroups():ColumnGroup[]|null;
|
|
651
|
+
get areSavedLayoutsAllowed():boolean;
|
|
652
|
+
get frontColumns():string[]|null;
|
|
653
|
+
get backColumns():string[]|null;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
657
|
+
*/
|
|
658
|
+
export interface LocalDateWrapper {
|
|
659
|
+
valueOf():string;
|
|
660
|
+
getYear():number;
|
|
661
|
+
getMonthValue():number;
|
|
662
|
+
getDayOfMonth():number;
|
|
663
|
+
toString():string;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
667
|
+
*/
|
|
668
|
+
export interface LocalTimeWrapper {
|
|
778
669
|
valueOf():string;
|
|
670
|
+
getHour():number;
|
|
671
|
+
getMinute():number;
|
|
672
|
+
getSecond():number;
|
|
673
|
+
getNano():number;
|
|
779
674
|
toString():string;
|
|
780
675
|
}
|
|
781
676
|
|
|
782
677
|
/**
|
|
783
|
-
*
|
|
784
|
-
*
|
|
678
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
679
|
+
* the server to get each Table. All tables will have the same structure.
|
|
785
680
|
*/
|
|
786
|
-
export class
|
|
681
|
+
export class PartitionedTable implements HasEventHandling {
|
|
787
682
|
/**
|
|
788
|
-
*
|
|
683
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
684
|
+
*/
|
|
685
|
+
static readonly EVENT_KEYADDED:string;
|
|
686
|
+
/**
|
|
687
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
789
688
|
*/
|
|
790
|
-
static readonly HACK_CONNECTION_FAILURE:string;
|
|
791
689
|
static readonly EVENT_DISCONNECT:string;
|
|
690
|
+
/**
|
|
691
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
692
|
+
*/
|
|
792
693
|
static readonly EVENT_RECONNECT:string;
|
|
793
|
-
|
|
694
|
+
/**
|
|
695
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
696
|
+
*/
|
|
697
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
698
|
+
|
|
699
|
+
protected constructor();
|
|
794
700
|
|
|
795
701
|
/**
|
|
796
|
-
*
|
|
797
|
-
* @param
|
|
798
|
-
* @
|
|
799
|
-
|
|
702
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
703
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
704
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
705
|
+
*/
|
|
706
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
707
|
+
/**
|
|
708
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
709
|
+
* {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
|
|
710
|
+
* @return A merged representation of the constituent tables.
|
|
711
|
+
*/
|
|
712
|
+
getMergedTable():Promise<Table>;
|
|
713
|
+
/**
|
|
714
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
715
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
716
|
+
* @return Set of Object
|
|
717
|
+
*/
|
|
718
|
+
getKeys():Set<object>;
|
|
719
|
+
/**
|
|
720
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
721
|
+
* @return Promise of a Table
|
|
800
722
|
* @deprecated
|
|
801
723
|
*/
|
|
802
|
-
|
|
803
|
-
|
|
724
|
+
getKeyTable():Promise<Table>;
|
|
725
|
+
/**
|
|
726
|
+
* Fetch the underlying base table of the partitioned table.
|
|
727
|
+
* @return Promise of a Table
|
|
728
|
+
*/
|
|
729
|
+
getBaseTable():Promise<Table>;
|
|
804
730
|
/**
|
|
805
|
-
*
|
|
731
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
732
|
+
* will not affect tables in use.
|
|
806
733
|
*/
|
|
807
734
|
close():void;
|
|
808
|
-
running():Promise<IdeConnection>;
|
|
809
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
810
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
811
735
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* log messages as are presently available.
|
|
815
|
-
* @param callback -
|
|
816
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
736
|
+
* The count of known keys.
|
|
737
|
+
* @return int
|
|
817
738
|
*/
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
739
|
+
get size():number;
|
|
740
|
+
/**
|
|
741
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
742
|
+
* non-key columns.
|
|
743
|
+
* @return Array of Column
|
|
744
|
+
*/
|
|
745
|
+
get columns():Column[];
|
|
746
|
+
/**
|
|
747
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
748
|
+
* @return Array of Column
|
|
749
|
+
*/
|
|
750
|
+
get keyColumns():Column[];
|
|
822
751
|
/**
|
|
823
752
|
* Listen for events on this object.
|
|
824
753
|
* @param name - the name of the event to listen for
|
|
@@ -826,8 +755,8 @@ export namespace dh {
|
|
|
826
755
|
* @return Returns a cleanup function.
|
|
827
756
|
* @typeParam T - the type of the data that the event will provide
|
|
828
757
|
*/
|
|
829
|
-
addEventListener<T>(name:string, callback:(e:
|
|
830
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
758
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
759
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
831
760
|
hasListeners(name:string):boolean;
|
|
832
761
|
/**
|
|
833
762
|
* Removes an event listener added to this table.
|
|
@@ -836,7 +765,65 @@ export namespace dh {
|
|
|
836
765
|
* @return
|
|
837
766
|
* @typeParam T -
|
|
838
767
|
*/
|
|
839
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
768
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export class DateWrapper extends LongWrapper {
|
|
772
|
+
protected constructor();
|
|
773
|
+
|
|
774
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
775
|
+
asDate():Date;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
780
|
+
* roll-up table.
|
|
781
|
+
*/
|
|
782
|
+
export class RollupConfig {
|
|
783
|
+
/**
|
|
784
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
785
|
+
*/
|
|
786
|
+
groupingColumns:Array<String>;
|
|
787
|
+
/**
|
|
788
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
789
|
+
* roll-up table.
|
|
790
|
+
*/
|
|
791
|
+
aggregations:{ [key: string]: Array<string>; };
|
|
792
|
+
/**
|
|
793
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
794
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
795
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
796
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
797
|
+
*/
|
|
798
|
+
includeConstituents:boolean;
|
|
799
|
+
includeOriginalColumns?:boolean|null;
|
|
800
|
+
/**
|
|
801
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
802
|
+
*/
|
|
803
|
+
includeDescriptions:boolean;
|
|
804
|
+
|
|
805
|
+
constructor();
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
810
|
+
*/
|
|
811
|
+
export class BigIntegerWrapper {
|
|
812
|
+
protected constructor();
|
|
813
|
+
|
|
814
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
815
|
+
asNumber():number;
|
|
816
|
+
valueOf():string;
|
|
817
|
+
toString():string;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export class QueryInfo {
|
|
821
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
822
|
+
static readonly EVENT_DISCONNECT:string;
|
|
823
|
+
static readonly EVENT_RECONNECT:string;
|
|
824
|
+
static readonly EVENT_CONNECT:string;
|
|
825
|
+
|
|
826
|
+
protected constructor();
|
|
840
827
|
}
|
|
841
828
|
|
|
842
829
|
export class IdeSession implements HasEventHandling {
|
|
@@ -901,14 +888,480 @@ export namespace dh {
|
|
|
901
888
|
* @return {@link Promise} of {@link dh.Table}
|
|
902
889
|
*/
|
|
903
890
|
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
904
|
-
addEventListener<T>(name:string, callback:(e:
|
|
905
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
891
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
892
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
906
893
|
hasListeners(name:string):boolean;
|
|
907
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
894
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
908
895
|
}
|
|
909
896
|
|
|
910
897
|
/**
|
|
911
|
-
*
|
|
898
|
+
* A js type for operating on input tables.
|
|
899
|
+
*
|
|
900
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
901
|
+
*
|
|
902
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
903
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
904
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
905
|
+
* before sending the next operation.
|
|
906
|
+
*
|
|
907
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
908
|
+
*
|
|
909
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
910
|
+
* object.
|
|
911
|
+
*/
|
|
912
|
+
export class InputTable {
|
|
913
|
+
protected constructor();
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
917
|
+
* property at that name and validate it can be put into the given column type.
|
|
918
|
+
* @param row -
|
|
919
|
+
* @param userTimeZone -
|
|
920
|
+
* @return Promise of dh.InputTable
|
|
921
|
+
*/
|
|
922
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
923
|
+
/**
|
|
924
|
+
* Add multiple rows to a table.
|
|
925
|
+
* @param rows -
|
|
926
|
+
* @param userTimeZone -
|
|
927
|
+
* @return Promise of dh.InputTable
|
|
928
|
+
*/
|
|
929
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
930
|
+
/**
|
|
931
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
932
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
933
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
934
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
935
|
+
* @param tableToAdd -
|
|
936
|
+
* @return Promise of dh.InputTable
|
|
937
|
+
*/
|
|
938
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
939
|
+
/**
|
|
940
|
+
* Add multiple tables to this Input Table.
|
|
941
|
+
* @param tablesToAdd -
|
|
942
|
+
* @return Promise of dh.InputTable
|
|
943
|
+
*/
|
|
944
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
945
|
+
/**
|
|
946
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
947
|
+
* @param tableToDelete -
|
|
948
|
+
* @return Promise of dh.InputTable
|
|
949
|
+
*/
|
|
950
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
951
|
+
/**
|
|
952
|
+
* Delete multiple tables from this Input Table.
|
|
953
|
+
* @param tablesToDelete -
|
|
954
|
+
* @return
|
|
955
|
+
*/
|
|
956
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
957
|
+
/**
|
|
958
|
+
* A list of the key columns, by name
|
|
959
|
+
* @return String array.
|
|
960
|
+
*/
|
|
961
|
+
get keys():string[];
|
|
962
|
+
/**
|
|
963
|
+
* A list of the value columns, by name
|
|
964
|
+
* @return String array.
|
|
965
|
+
*/
|
|
966
|
+
get values():string[];
|
|
967
|
+
/**
|
|
968
|
+
* A list of the key columns.
|
|
969
|
+
* @return Column array.
|
|
970
|
+
*/
|
|
971
|
+
get keyColumns():Column[];
|
|
972
|
+
/**
|
|
973
|
+
* A list of the value Column objects
|
|
974
|
+
* @return {@link dh.Column} array.
|
|
975
|
+
*/
|
|
976
|
+
get valueColumns():Column[];
|
|
977
|
+
/**
|
|
978
|
+
* The source table for this Input Table
|
|
979
|
+
* @return dh.table
|
|
980
|
+
*/
|
|
981
|
+
get table():Table;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
986
|
+
*/
|
|
987
|
+
export class ConnectOptions {
|
|
988
|
+
/**
|
|
989
|
+
* Optional map of http header names and values to send to the server with each request.
|
|
990
|
+
*/
|
|
991
|
+
headers?:{ [key: string]: string; }|null;
|
|
992
|
+
/**
|
|
993
|
+
* True to enable debug logging. At this time, only enables logging for gRPC calls.
|
|
994
|
+
*/
|
|
995
|
+
debug?:boolean|null;
|
|
996
|
+
/**
|
|
997
|
+
* Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
|
|
998
|
+
* of `fetch`.
|
|
999
|
+
* <p>
|
|
1000
|
+
* Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
|
|
1001
|
+
*/
|
|
1002
|
+
useWebsockets?:boolean|null;
|
|
1003
|
+
|
|
1004
|
+
constructor();
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
export class CoreClient implements HasEventHandling {
|
|
1008
|
+
static readonly EVENT_CONNECT:string;
|
|
1009
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1010
|
+
static readonly EVENT_RECONNECT:string;
|
|
1011
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1012
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1013
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1014
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1015
|
+
/**
|
|
1016
|
+
* @deprecated
|
|
1017
|
+
*/
|
|
1018
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1019
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1020
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1021
|
+
|
|
1022
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1023
|
+
|
|
1024
|
+
running():Promise<CoreClient>;
|
|
1025
|
+
getServerUrl():string;
|
|
1026
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
1027
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
1028
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
1029
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1030
|
+
getServerConfigValues():Promise<string[][]>;
|
|
1031
|
+
getStorageService():dh.storage.StorageService;
|
|
1032
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
1033
|
+
disconnect():void;
|
|
1034
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1035
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1036
|
+
hasListeners(name:string):boolean;
|
|
1037
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Event fired when a command is issued from the client.
|
|
1042
|
+
*/
|
|
1043
|
+
export class CommandInfo {
|
|
1044
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1045
|
+
|
|
1046
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
1047
|
+
get code():string;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1052
|
+
* mechanism, and so reimplemented here.
|
|
1053
|
+
* <p>
|
|
1054
|
+
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1055
|
+
* <p>
|
|
1056
|
+
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1057
|
+
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1058
|
+
* <p>
|
|
1059
|
+
* The table size will be -1 until a viewport has been fetched.
|
|
1060
|
+
* <p>
|
|
1061
|
+
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1062
|
+
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1063
|
+
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1064
|
+
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1065
|
+
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1066
|
+
* the viewport).
|
|
1067
|
+
* <p>
|
|
1068
|
+
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1069
|
+
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1070
|
+
* <p>
|
|
1071
|
+
* <ul>
|
|
1072
|
+
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1073
|
+
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1074
|
+
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1075
|
+
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1076
|
+
* new operation is pending.</li>
|
|
1077
|
+
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
1078
|
+
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
1079
|
+
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1080
|
+
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1081
|
+
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1082
|
+
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1083
|
+
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1084
|
+
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1085
|
+
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1086
|
+
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1087
|
+
* where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
|
|
1088
|
+
* </ul>
|
|
1089
|
+
*/
|
|
1090
|
+
export class TreeTable implements HasEventHandling {
|
|
1091
|
+
/**
|
|
1092
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1093
|
+
*/
|
|
1094
|
+
static readonly EVENT_UPDATED:string;
|
|
1095
|
+
/**
|
|
1096
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1097
|
+
*/
|
|
1098
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1099
|
+
/**
|
|
1100
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1101
|
+
*/
|
|
1102
|
+
static readonly EVENT_RECONNECT:string;
|
|
1103
|
+
/**
|
|
1104
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1105
|
+
*/
|
|
1106
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1107
|
+
/**
|
|
1108
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1109
|
+
*/
|
|
1110
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1111
|
+
readonly description?:string|null;
|
|
1112
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1113
|
+
|
|
1114
|
+
protected constructor();
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1118
|
+
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1119
|
+
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1120
|
+
* boolean parameter.
|
|
1121
|
+
* @param row -
|
|
1122
|
+
* @param expandDescendants -
|
|
1123
|
+
*/
|
|
1124
|
+
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1125
|
+
/**
|
|
1126
|
+
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1127
|
+
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1128
|
+
* @param row -
|
|
1129
|
+
*/
|
|
1130
|
+
collapse(row:TreeRow|number):void;
|
|
1131
|
+
/**
|
|
1132
|
+
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1133
|
+
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1134
|
+
* is true, then its children will also be expanded.
|
|
1135
|
+
* @param row - the row to expand or collapse, either the absolute row index or the row object
|
|
1136
|
+
* @param isExpanded - true to expand the row, false to collapse
|
|
1137
|
+
* @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
|
|
1138
|
+
* false
|
|
1139
|
+
*/
|
|
1140
|
+
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1141
|
+
expandAll():void;
|
|
1142
|
+
collapseAll():void;
|
|
1143
|
+
/**
|
|
1144
|
+
* Tests if the specified row is expanded.
|
|
1145
|
+
* @param row - the row to test, either the absolute row index or the row object
|
|
1146
|
+
* @return boolean true if the row is expanded, false otherwise
|
|
1147
|
+
*/
|
|
1148
|
+
isExpanded(row:TreeRow|number):boolean;
|
|
1149
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1150
|
+
getViewportData():Promise<TreeViewportData>;
|
|
1151
|
+
/**
|
|
1152
|
+
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1153
|
+
*/
|
|
1154
|
+
close():void;
|
|
1155
|
+
/**
|
|
1156
|
+
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1157
|
+
* @param sort -
|
|
1158
|
+
* @return {@link dh.Sort} array
|
|
1159
|
+
*/
|
|
1160
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1163
|
+
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1164
|
+
* condition. Returns the previous sort in use.
|
|
1165
|
+
* @param filter -
|
|
1166
|
+
* @return {@link dh.FilterCondition} array
|
|
1167
|
+
*/
|
|
1168
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1169
|
+
/**
|
|
1170
|
+
* a column with the given name, or throws an exception if it cannot be found
|
|
1171
|
+
* @param key -
|
|
1172
|
+
* @return {@link dh.Column}
|
|
1173
|
+
*/
|
|
1174
|
+
findColumn(key:string):Column;
|
|
1175
|
+
/**
|
|
1176
|
+
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
1177
|
+
* @param keys -
|
|
1178
|
+
* @return {@link dh.Column} array
|
|
1179
|
+
*/
|
|
1180
|
+
findColumns(keys:string[]):Column[];
|
|
1181
|
+
/**
|
|
1182
|
+
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
1183
|
+
* values for the given columns in the source table:
|
|
1184
|
+
* <ul>
|
|
1185
|
+
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1186
|
+
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1187
|
+
* the tree.</li>
|
|
1188
|
+
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1189
|
+
* in the resulting table.</li>
|
|
1190
|
+
* </ul>
|
|
1191
|
+
*/
|
|
1192
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1193
|
+
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1194
|
+
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1195
|
+
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1196
|
+
/**
|
|
1197
|
+
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1198
|
+
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1199
|
+
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1200
|
+
* state is also not copied.
|
|
1201
|
+
* @return Promise of dh.TreeTable
|
|
1202
|
+
*/
|
|
1203
|
+
copy():Promise<TreeTable>;
|
|
1204
|
+
/**
|
|
1205
|
+
* The current filter configuration of this Tree Table.
|
|
1206
|
+
* @return {@link dh.FilterCondition} array
|
|
1207
|
+
*/
|
|
1208
|
+
get filter():Array<FilterCondition>;
|
|
1209
|
+
/**
|
|
1210
|
+
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
1211
|
+
* @return boolean
|
|
1212
|
+
*/
|
|
1213
|
+
get includeConstituents():boolean;
|
|
1214
|
+
get groupedColumns():Array<Column>;
|
|
1215
|
+
/**
|
|
1216
|
+
* True if this table has been closed.
|
|
1217
|
+
* @return boolean
|
|
1218
|
+
*/
|
|
1219
|
+
get isClosed():boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
1222
|
+
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1223
|
+
* when considering collapse/expand states).
|
|
1224
|
+
* @return double
|
|
1225
|
+
*/
|
|
1226
|
+
get size():number;
|
|
1227
|
+
/**
|
|
1228
|
+
* The columns that can be shown in this Tree Table.
|
|
1229
|
+
* @return {@link dh.Column} array
|
|
1230
|
+
*/
|
|
1231
|
+
get columns():Array<Column>;
|
|
1232
|
+
/**
|
|
1233
|
+
* The current sort configuration of this Tree Table
|
|
1234
|
+
* @return {@link dh.Sort} array.
|
|
1235
|
+
*/
|
|
1236
|
+
get sort():Array<Sort>;
|
|
1237
|
+
/**
|
|
1238
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1239
|
+
* initial snapshot.
|
|
1240
|
+
* @return boolean
|
|
1241
|
+
*/
|
|
1242
|
+
get isRefreshing():boolean;
|
|
1243
|
+
/**
|
|
1244
|
+
* Listen for events on this object.
|
|
1245
|
+
* @param name - the name of the event to listen for
|
|
1246
|
+
* @param callback - a function to call when the event occurs
|
|
1247
|
+
* @return Returns a cleanup function.
|
|
1248
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1249
|
+
*/
|
|
1250
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1251
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1252
|
+
hasListeners(name:string):boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* Removes an event listener added to this table.
|
|
1255
|
+
* @param name -
|
|
1256
|
+
* @param callback -
|
|
1257
|
+
* @return
|
|
1258
|
+
* @typeParam T -
|
|
1259
|
+
*/
|
|
1260
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1266
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1267
|
+
* instance.
|
|
1268
|
+
*/
|
|
1269
|
+
export class FilterCondition {
|
|
1270
|
+
protected constructor();
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* the opposite of this condition
|
|
1274
|
+
* @return FilterCondition
|
|
1275
|
+
*/
|
|
1276
|
+
not():FilterCondition;
|
|
1277
|
+
/**
|
|
1278
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
1279
|
+
* @param filters -
|
|
1280
|
+
* @return FilterCondition
|
|
1281
|
+
*/
|
|
1282
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
1283
|
+
/**
|
|
1284
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
1285
|
+
* @param filters -
|
|
1286
|
+
* @return FilterCondition.
|
|
1287
|
+
*/
|
|
1288
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
1289
|
+
/**
|
|
1290
|
+
* a string suitable for debugging showing the details of this condition.
|
|
1291
|
+
* @return String.
|
|
1292
|
+
*/
|
|
1293
|
+
toString():string;
|
|
1294
|
+
get columns():Array<Column>;
|
|
1295
|
+
/**
|
|
1296
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1297
|
+
* functions:
|
|
1298
|
+
* <ul>
|
|
1299
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1300
|
+
* than the third</li>
|
|
1301
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1302
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1303
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1304
|
+
* "not a number"</i></li>
|
|
1305
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1306
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1307
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1308
|
+
* expression</li>
|
|
1309
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1310
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1311
|
+
* <p>
|
|
1312
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1313
|
+
* method should be used in other cases
|
|
1314
|
+
* </p>
|
|
1315
|
+
* </li>
|
|
1316
|
+
* </ul>
|
|
1317
|
+
* @param function -
|
|
1318
|
+
* @param args -
|
|
1319
|
+
* @return dh.FilterCondition
|
|
1320
|
+
*/
|
|
1321
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
1322
|
+
/**
|
|
1323
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
1324
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1325
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1326
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1327
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1328
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1329
|
+
* {@link dh.Column.filter}).
|
|
1330
|
+
* @param value -
|
|
1331
|
+
* @param columns -
|
|
1332
|
+
* @return dh.FilterCondition
|
|
1333
|
+
*/
|
|
1334
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1339
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1340
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1341
|
+
*/
|
|
1342
|
+
export class RangeSet {
|
|
1343
|
+
protected constructor();
|
|
1344
|
+
|
|
1345
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
1346
|
+
static ofItems(rows:number[]):RangeSet;
|
|
1347
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
1348
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
1349
|
+
/**
|
|
1350
|
+
* a new iterator over all indexes in this collection.
|
|
1351
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
1352
|
+
*/
|
|
1353
|
+
iterator():Iterator<LongWrapper>;
|
|
1354
|
+
/**
|
|
1355
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
1356
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
1357
|
+
* property each time through a loop).
|
|
1358
|
+
* @return double
|
|
1359
|
+
*/
|
|
1360
|
+
get size():number;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
912
1365
|
*
|
|
913
1366
|
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
914
1367
|
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
@@ -931,28 +1384,6 @@ export namespace dh {
|
|
|
931
1384
|
constructor();
|
|
932
1385
|
}
|
|
933
1386
|
|
|
934
|
-
/**
|
|
935
|
-
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
936
|
-
*/
|
|
937
|
-
export class BigIntegerWrapper {
|
|
938
|
-
protected constructor();
|
|
939
|
-
|
|
940
|
-
static ofString(str:string):BigIntegerWrapper;
|
|
941
|
-
asNumber():number;
|
|
942
|
-
valueOf():string;
|
|
943
|
-
toString():string;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* Presently optional and not used by the server, this allows the client to specify some authentication details. String
|
|
948
|
-
* authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
|
|
949
|
-
*/
|
|
950
|
-
export class ConnectOptions {
|
|
951
|
-
headers:{ [key: string]: string; };
|
|
952
|
-
|
|
953
|
-
constructor();
|
|
954
|
-
}
|
|
955
|
-
|
|
956
1387
|
/**
|
|
957
1388
|
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
958
1389
|
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
@@ -1125,174 +1556,108 @@ export namespace dh {
|
|
|
1125
1556
|
static ofBoolean(b:boolean):FilterValue;
|
|
1126
1557
|
}
|
|
1127
1558
|
|
|
1128
|
-
|
|
1129
|
-
/**
|
|
1130
|
-
* Event fired when a command is issued from the client.
|
|
1131
|
-
*/
|
|
1132
|
-
export class CommandInfo {
|
|
1133
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1134
|
-
|
|
1135
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
1136
|
-
get code():string;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
1559
|
/**
|
|
1140
|
-
*
|
|
1141
|
-
*
|
|
1142
|
-
* @deprecated
|
|
1560
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
1561
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
1143
1562
|
*/
|
|
1144
|
-
export class
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
static readonly
|
|
1149
|
-
|
|
1150
|
-
protected constructor();
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
export class QueryInfo {
|
|
1154
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
1563
|
+
export class IdeConnection implements HasEventHandling {
|
|
1564
|
+
/**
|
|
1565
|
+
* @deprecated
|
|
1566
|
+
*/
|
|
1567
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
1155
1568
|
static readonly EVENT_DISCONNECT:string;
|
|
1156
1569
|
static readonly EVENT_RECONNECT:string;
|
|
1157
|
-
static readonly
|
|
1158
|
-
|
|
1159
|
-
protected constructor();
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1164
|
-
* interpret these responses to see what to render, or how to respond.
|
|
1165
|
-
* <p>
|
|
1166
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1167
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1168
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1169
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1170
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
1171
|
-
* <p>
|
|
1172
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1173
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1174
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1175
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1176
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1177
|
-
* <p>
|
|
1178
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1179
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1180
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1181
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1182
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1183
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1184
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1185
|
-
* <p>
|
|
1186
|
-
* This can suggest several patterns for how plugins operate:
|
|
1187
|
-
* <ul>
|
|
1188
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1189
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1190
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1191
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1192
|
-
* provided to the JS API consumer.</li>
|
|
1193
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1194
|
-
* which provided them. One concrete example of this could have been
|
|
1195
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1196
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1197
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1198
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1199
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1200
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1201
|
-
* an internal table instance.</li>
|
|
1202
|
-
* </ul>
|
|
1203
|
-
*
|
|
1204
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1205
|
-
* <ul>
|
|
1206
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1207
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1208
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1209
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1210
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
1211
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1212
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1213
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1214
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1215
|
-
* </ul>
|
|
1216
|
-
*/
|
|
1217
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1218
|
-
static readonly EVENT_MESSAGE:string;
|
|
1219
|
-
static readonly EVENT_CLOSE:string;
|
|
1570
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
1220
1571
|
|
|
1221
1572
|
protected constructor();
|
|
1222
1573
|
|
|
1223
1574
|
/**
|
|
1224
|
-
*
|
|
1575
|
+
* Closes the current connection, releasing any resources on the server or client.
|
|
1225
1576
|
*/
|
|
1226
1577
|
close():void;
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1578
|
+
running():Promise<IdeConnection>;
|
|
1579
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1580
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1230
1581
|
/**
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1582
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
1583
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1584
|
+
* log messages as are presently available.
|
|
1585
|
+
* @param callback -
|
|
1586
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1234
1587
|
*/
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1588
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1589
|
+
startSession(type:string):Promise<IdeSession>;
|
|
1590
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
1591
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1240
1592
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
* @
|
|
1243
|
-
*
|
|
1593
|
+
* Listen for events on this object.
|
|
1594
|
+
* @param name - the name of the event to listen for
|
|
1595
|
+
* @param callback - a function to call when the event occurs
|
|
1596
|
+
* @return Returns a cleanup function.
|
|
1597
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1244
1598
|
*/
|
|
1245
|
-
|
|
1599
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1600
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1601
|
+
hasListeners(name:string):boolean;
|
|
1246
1602
|
/**
|
|
1247
|
-
*
|
|
1248
|
-
* @
|
|
1603
|
+
* Removes an event listener added to this table.
|
|
1604
|
+
* @param name -
|
|
1605
|
+
* @param callback -
|
|
1606
|
+
* @return
|
|
1607
|
+
* @typeParam T -
|
|
1249
1608
|
*/
|
|
1250
|
-
|
|
1609
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
export class LongWrapper {
|
|
1613
|
+
protected constructor();
|
|
1614
|
+
|
|
1615
|
+
static ofString(str:string):LongWrapper;
|
|
1616
|
+
asNumber():number;
|
|
1617
|
+
valueOf():string;
|
|
1618
|
+
toString():string;
|
|
1251
1619
|
}
|
|
1252
1620
|
|
|
1253
1621
|
/**
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1622
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1623
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
1624
|
+
*
|
|
1625
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1626
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1627
|
+
* forward data to it.
|
|
1628
|
+
*
|
|
1629
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1630
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1631
|
+
* viewports to make it less expensive to compute for large tables.
|
|
1257
1632
|
*/
|
|
1258
|
-
export class
|
|
1259
|
-
static readonly ASCENDING:string;
|
|
1260
|
-
static readonly DESCENDING:string;
|
|
1261
|
-
static readonly REVERSE:string;
|
|
1262
|
-
|
|
1633
|
+
export class TableSubscription implements HasEventHandling {
|
|
1263
1634
|
protected constructor();
|
|
1264
1635
|
|
|
1265
1636
|
/**
|
|
1266
|
-
*
|
|
1267
|
-
* @
|
|
1268
|
-
|
|
1269
|
-
asc():Sort;
|
|
1270
|
-
/**
|
|
1271
|
-
* Builds a Sort instance to sort values in descending order.
|
|
1272
|
-
* @return {@link dh.Sort}
|
|
1273
|
-
*/
|
|
1274
|
-
desc():Sort;
|
|
1275
|
-
/**
|
|
1276
|
-
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1277
|
-
* @return {@link dh.Sort}
|
|
1278
|
-
*/
|
|
1279
|
-
abs():Sort;
|
|
1280
|
-
toString():string;
|
|
1281
|
-
/**
|
|
1282
|
-
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1283
|
-
* @return boolean
|
|
1637
|
+
* Updates the subscription to use the given columns and update interval.
|
|
1638
|
+
* @param columns - the new columns to subscribe to
|
|
1639
|
+
* @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
|
|
1284
1640
|
*/
|
|
1285
|
-
|
|
1641
|
+
changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
|
|
1642
|
+
get columns():Array<Column>;
|
|
1286
1643
|
/**
|
|
1287
|
-
*
|
|
1288
|
-
* @
|
|
1644
|
+
* Listen for events on this object.
|
|
1645
|
+
* @param name - the name of the event to listen for
|
|
1646
|
+
* @param callback - a function to call when the event occurs
|
|
1647
|
+
* @return Returns a cleanup function.
|
|
1648
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1289
1649
|
*/
|
|
1290
|
-
|
|
1650
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1651
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1652
|
+
hasListeners(name:string):boolean;
|
|
1291
1653
|
/**
|
|
1292
|
-
*
|
|
1293
|
-
* @
|
|
1654
|
+
* Removes an event listener added to this table.
|
|
1655
|
+
* @param name -
|
|
1656
|
+
* @param callback -
|
|
1657
|
+
* @return
|
|
1658
|
+
* @typeParam T -
|
|
1294
1659
|
*/
|
|
1295
|
-
|
|
1660
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1296
1661
|
}
|
|
1297
1662
|
|
|
1298
1663
|
export class CustomColumn {
|
|
@@ -1338,669 +1703,424 @@ export namespace dh {
|
|
|
1338
1703
|
readonly description?:string|null;
|
|
1339
1704
|
readonly pluginName?:string|null;
|
|
1340
1705
|
readonly layoutHints?:null|LayoutHints;
|
|
1341
|
-
static readonly EVENT_SIZECHANGED:string;
|
|
1342
|
-
static readonly EVENT_UPDATED:string;
|
|
1343
|
-
static readonly EVENT_ROWADDED:string;
|
|
1344
|
-
static readonly EVENT_ROWREMOVED:string;
|
|
1345
|
-
static readonly EVENT_ROWUPDATED:string;
|
|
1346
|
-
static readonly EVENT_SORTCHANGED:string;
|
|
1347
|
-
static readonly EVENT_FILTERCHANGED:string;
|
|
1348
|
-
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1349
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1350
|
-
static readonly EVENT_RECONNECT:string;
|
|
1351
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1352
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1353
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1354
|
-
static readonly SIZE_UNCOALESCED:number;
|
|
1355
|
-
|
|
1356
|
-
protected constructor();
|
|
1357
|
-
|
|
1358
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1359
|
-
/**
|
|
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}
|
|
1364
|
-
*/
|
|
1365
|
-
findColumn(key:string):Column;
|
|
1366
|
-
/**
|
|
1367
|
-
* Retrieve multiple columns specified by the given names.
|
|
1368
|
-
* @param keys -
|
|
1369
|
-
* @return {@link dh.Column} array
|
|
1370
|
-
*/
|
|
1371
|
-
findColumns(keys:string[]):Column[];
|
|
1372
|
-
isBlinkTable():boolean;
|
|
1373
|
-
/**
|
|
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
|
|
1377
|
-
*/
|
|
1378
|
-
inputTable():Promise<InputTable>;
|
|
1379
|
-
/**
|
|
1380
|
-
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
1381
|
-
*/
|
|
1382
|
-
close():void;
|
|
1383
|
-
getAttributes():string[];
|
|
1384
|
-
/**
|
|
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
|
|
1389
|
-
*/
|
|
1390
|
-
getAttribute(attributeName:string):unknown|undefined|null;
|
|
1391
|
-
/**
|
|
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
|
|
1399
|
-
*/
|
|
1400
|
-
applySort(sort:Sort[]):Array<Sort>;
|
|
1401
|
-
/**
|
|
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
|
|
1409
|
-
*/
|
|
1410
|
-
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1411
|
-
/**
|
|
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
|
|
1415
|
-
*/
|
|
1416
|
-
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1417
|
-
/**
|
|
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}
|
|
1428
|
-
*/
|
|
1429
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
|
|
1430
|
-
/**
|
|
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}
|
|
1436
|
-
*/
|
|
1437
|
-
getViewportData():Promise<TableData>;
|
|
1438
|
-
/**
|
|
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}
|
|
1448
|
-
*/
|
|
1449
|
-
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
1450
|
-
/**
|
|
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
|
|
1456
|
-
*/
|
|
1457
|
-
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1458
|
-
/**
|
|
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
|
|
1461
|
-
*/
|
|
1462
|
-
copy():Promise<Table>;
|
|
1463
|
-
/**
|
|
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
|
|
1470
|
-
*/
|
|
1471
|
-
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1472
|
-
/**
|
|
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
|
|
1477
|
-
*/
|
|
1478
|
-
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1479
|
-
/**
|
|
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
|
|
1484
|
-
*/
|
|
1485
|
-
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
1486
|
-
/**
|
|
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
|
|
1491
|
-
*/
|
|
1492
|
-
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
1493
|
-
/**
|
|
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
|
|
1498
|
-
*/
|
|
1499
|
-
freeze():Promise<Table>;
|
|
1500
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1501
|
-
/**
|
|
1502
|
-
*
|
|
1503
|
-
* @inheritDoc
|
|
1504
|
-
* @deprecated
|
|
1505
|
-
*/
|
|
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>;
|
|
1512
|
-
/**
|
|
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
|
|
1518
|
-
*/
|
|
1519
|
-
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1520
|
-
/**
|
|
1521
|
-
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
1522
|
-
* @param column -
|
|
1523
|
-
* @return Promise of dh.ColumnStatistics
|
|
1524
|
-
*/
|
|
1525
|
-
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
1526
|
-
/**
|
|
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.
|
|
1537
|
-
*/
|
|
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;
|
|
1540
|
-
/**
|
|
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
|
|
1544
|
-
*/
|
|
1545
|
-
get hasInputTable():boolean;
|
|
1546
|
-
/**
|
|
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
|
|
1552
|
-
*/
|
|
1553
|
-
get columns():Array<Column>;
|
|
1554
|
-
/**
|
|
1555
|
-
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
1556
|
-
* @return dh.TotalsTableConfig
|
|
1557
|
-
*/
|
|
1558
|
-
get totalsTableConfig():TotalsTableConfig;
|
|
1559
|
-
/**
|
|
1560
|
-
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
1561
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1562
|
-
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
1563
|
-
* @return {@link dh.Sort} array
|
|
1564
|
-
*/
|
|
1565
|
-
get sort():Array<Sort>;
|
|
1566
1706
|
/**
|
|
1567
|
-
*
|
|
1568
|
-
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
1569
|
-
* @return {@link dh.CustomColumn} array
|
|
1707
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1570
1708
|
*/
|
|
1571
|
-
|
|
1709
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
1572
1710
|
/**
|
|
1573
|
-
*
|
|
1574
|
-
* initial snapshot.
|
|
1575
|
-
* @return boolean
|
|
1711
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1576
1712
|
*/
|
|
1577
|
-
|
|
1713
|
+
static readonly EVENT_UPDATED:string;
|
|
1578
1714
|
/**
|
|
1579
|
-
*
|
|
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
|
|
1715
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1583
1716
|
*/
|
|
1584
|
-
|
|
1717
|
+
static readonly EVENT_ROWADDED:string;
|
|
1585
1718
|
/**
|
|
1586
|
-
* The
|
|
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
|
|
1719
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1591
1720
|
*/
|
|
1592
|
-
|
|
1721
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
1593
1722
|
/**
|
|
1594
|
-
* The
|
|
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
|
|
1723
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1598
1724
|
*/
|
|
1599
|
-
|
|
1725
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
1600
1726
|
/**
|
|
1601
|
-
*
|
|
1602
|
-
* @return boolean
|
|
1727
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1603
1728
|
*/
|
|
1604
|
-
|
|
1729
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
1605
1730
|
/**
|
|
1606
|
-
*
|
|
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
|
|
1731
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1610
1732
|
*/
|
|
1611
|
-
|
|
1733
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
1612
1734
|
/**
|
|
1613
|
-
*
|
|
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
|
|
1735
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1618
1736
|
*/
|
|
1619
|
-
|
|
1620
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1621
|
-
hasListeners(name:string):boolean;
|
|
1737
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1622
1738
|
/**
|
|
1623
|
-
*
|
|
1624
|
-
* @param name -
|
|
1625
|
-
* @param callback -
|
|
1626
|
-
* @return
|
|
1627
|
-
* @typeParam T -
|
|
1739
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1628
1740
|
*/
|
|
1629
|
-
|
|
1741
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1630
1742
|
/**
|
|
1631
|
-
*
|
|
1632
|
-
* do not support reverse.
|
|
1633
|
-
* @return {@link dh.Sort}
|
|
1743
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1634
1744
|
*/
|
|
1635
|
-
static
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
export class Ide {
|
|
1639
|
-
constructor();
|
|
1640
|
-
|
|
1745
|
+
static readonly EVENT_RECONNECT:string;
|
|
1641
1746
|
/**
|
|
1642
|
-
*
|
|
1747
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1643
1748
|
*/
|
|
1644
|
-
|
|
1749
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1645
1750
|
/**
|
|
1646
|
-
*
|
|
1751
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1647
1752
|
*/
|
|
1648
|
-
static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
export class CoreClient implements HasEventHandling {
|
|
1652
|
-
static readonly EVENT_CONNECT:string;
|
|
1653
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1654
|
-
static readonly EVENT_RECONNECT:string;
|
|
1655
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1656
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1657
1753
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
1658
|
-
|
|
1754
|
+
/**
|
|
1755
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1756
|
+
*/
|
|
1659
1757
|
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1660
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1661
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1662
|
-
|
|
1663
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1664
|
-
|
|
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
1758
|
/**
|
|
1687
|
-
*
|
|
1688
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1689
|
-
* @return String
|
|
1759
|
+
* The size the table will have if it is uncoalesced.
|
|
1690
1760
|
*/
|
|
1691
|
-
readonly
|
|
1692
|
-
readonly description?:string|null;
|
|
1761
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
1693
1762
|
|
|
1694
1763
|
protected constructor();
|
|
1695
1764
|
|
|
1765
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1696
1766
|
/**
|
|
1697
|
-
*
|
|
1698
|
-
*
|
|
1699
|
-
* @
|
|
1767
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
1768
|
+
* caching a returned value.
|
|
1769
|
+
* @param key -
|
|
1770
|
+
* @return {@link dh.Column}
|
|
1700
1771
|
*/
|
|
1701
|
-
|
|
1702
|
-
getFormat(row:Row):Format;
|
|
1772
|
+
findColumn(key:string):Column;
|
|
1703
1773
|
/**
|
|
1704
|
-
*
|
|
1705
|
-
* @
|
|
1774
|
+
* Retrieve multiple columns specified by the given names.
|
|
1775
|
+
* @param keys -
|
|
1776
|
+
* @return {@link dh.Column} array
|
|
1706
1777
|
*/
|
|
1707
|
-
|
|
1778
|
+
findColumns(keys:string[]):Column[];
|
|
1779
|
+
isBlinkTable():boolean;
|
|
1708
1780
|
/**
|
|
1709
|
-
*
|
|
1710
|
-
*
|
|
1711
|
-
* @return
|
|
1781
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
1782
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
1783
|
+
* @return Promise of dh.InputTable
|
|
1712
1784
|
*/
|
|
1713
|
-
|
|
1785
|
+
inputTable():Promise<InputTable>;
|
|
1714
1786
|
/**
|
|
1715
|
-
*
|
|
1716
|
-
* @param expression -
|
|
1717
|
-
* @return {@link dh.CustomColumn}
|
|
1787
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
1718
1788
|
*/
|
|
1719
|
-
|
|
1789
|
+
close():void;
|
|
1790
|
+
getAttributes():string[];
|
|
1720
1791
|
/**
|
|
1721
|
-
* a
|
|
1722
|
-
*
|
|
1723
|
-
* @
|
|
1792
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
1793
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
1794
|
+
* @param attributeName -
|
|
1795
|
+
* @return Object
|
|
1724
1796
|
*/
|
|
1725
|
-
|
|
1797
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
1726
1798
|
/**
|
|
1727
|
-
*
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1799
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
1800
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
1801
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
1802
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1803
|
+
* not.
|
|
1804
|
+
* @param sort -
|
|
1805
|
+
* @return {@link dh.Sort} array
|
|
1730
1806
|
*/
|
|
1731
|
-
|
|
1732
|
-
toString():string;
|
|
1807
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1733
1808
|
/**
|
|
1734
|
-
*
|
|
1735
|
-
*
|
|
1809
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
1810
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
1811
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
1812
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
1813
|
+
* will not.
|
|
1814
|
+
* @param filter -
|
|
1815
|
+
* @return {@link dh.FilterCondition} array
|
|
1736
1816
|
*/
|
|
1737
|
-
|
|
1817
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1738
1818
|
/**
|
|
1739
|
-
*
|
|
1740
|
-
*
|
|
1741
|
-
* @return
|
|
1819
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
1820
|
+
* @param customColumns -
|
|
1821
|
+
* @return {@link dh.CustomColumn} array
|
|
1742
1822
|
*/
|
|
1743
|
-
|
|
1823
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1744
1824
|
/**
|
|
1745
|
-
*
|
|
1746
|
-
*
|
|
1747
|
-
*
|
|
1825
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
1826
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
1827
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
1828
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
1829
|
+
* needed.
|
|
1830
|
+
* @param firstRow -
|
|
1831
|
+
* @param lastRow -
|
|
1832
|
+
* @param columns -
|
|
1833
|
+
* @param updateIntervalMs -
|
|
1834
|
+
* @return {@link dh.TableViewportSubscription}
|
|
1748
1835
|
*/
|
|
1749
|
-
|
|
1750
|
-
get isSortable():boolean;
|
|
1836
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
1751
1837
|
/**
|
|
1752
|
-
*
|
|
1753
|
-
*
|
|
1838
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
1839
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
1840
|
+
* separate the lifespan of this promise from the table itself, call
|
|
1841
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1842
|
+
* @return Promise of {@link dh.TableData}
|
|
1754
1843
|
*/
|
|
1755
|
-
|
|
1844
|
+
getViewportData():Promise<ViewportData>;
|
|
1756
1845
|
/**
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
*
|
|
1760
|
-
*
|
|
1846
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
1847
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
1848
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
1849
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1850
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1851
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1852
|
+
* @param columns -
|
|
1853
|
+
* @param updateIntervalMs -
|
|
1854
|
+
* @return {@link dh.TableSubscription}
|
|
1761
1855
|
*/
|
|
1762
|
-
|
|
1856
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
1763
1857
|
/**
|
|
1764
|
-
* a
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
* @
|
|
1858
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
1859
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
1860
|
+
* order of appearance of values from the original table.
|
|
1861
|
+
* @param columns -
|
|
1862
|
+
* @return Promise of dh.Table
|
|
1768
1863
|
*/
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1864
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1865
|
+
/**
|
|
1866
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1867
|
+
* @return Promise of dh.Table
|
|
1868
|
+
*/
|
|
1869
|
+
copy():Promise<Table>;
|
|
1870
|
+
/**
|
|
1871
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
1872
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
1873
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1874
|
+
* called on it when not in use.
|
|
1875
|
+
* @param config -
|
|
1876
|
+
* @return Promise of dh.TotalsTable
|
|
1877
|
+
*/
|
|
1878
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1879
|
+
/**
|
|
1880
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
1881
|
+
* above for more specifics.
|
|
1882
|
+
* @param config -
|
|
1883
|
+
* @return promise of dh.TotalsTable
|
|
1884
|
+
*/
|
|
1885
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1886
|
+
/**
|
|
1887
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
1888
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
1889
|
+
* @param configObject -
|
|
1890
|
+
* @return Promise of dh.TreeTable
|
|
1891
|
+
*/
|
|
1892
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
1893
|
+
/**
|
|
1894
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
1895
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
1896
|
+
* @param configObject -
|
|
1897
|
+
* @return Promise dh.TreeTable
|
|
1898
|
+
*/
|
|
1899
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
1900
|
+
/**
|
|
1901
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
1902
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1903
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1904
|
+
* @return Promise of dh.Table
|
|
1905
|
+
*/
|
|
1906
|
+
freeze():Promise<Table>;
|
|
1907
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1785
1908
|
/**
|
|
1786
|
-
*
|
|
1909
|
+
*
|
|
1910
|
+
* @inheritDoc
|
|
1911
|
+
* @deprecated
|
|
1787
1912
|
*/
|
|
1788
|
-
|
|
1913
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1914
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1915
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1916
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1917
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1918
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1789
1919
|
/**
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
1920
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
1921
|
+
* keys.
|
|
1922
|
+
* @param keys -
|
|
1923
|
+
* @param dropKeys -
|
|
1924
|
+
* @return Promise dh.PartitionedTable
|
|
1792
1925
|
*/
|
|
1793
|
-
|
|
1926
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1794
1927
|
/**
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1798
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1928
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
1929
|
+
* @param column -
|
|
1930
|
+
* @return Promise of dh.ColumnStatistics
|
|
1799
1931
|
*/
|
|
1800
|
-
|
|
1801
|
-
includeOriginalColumns?:boolean|null;
|
|
1932
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
1802
1933
|
/**
|
|
1803
|
-
*
|
|
1934
|
+
* Seek the row matching the data provided
|
|
1935
|
+
* @param startingRow - Row to start the seek from
|
|
1936
|
+
* @param column - Column to seek for value on
|
|
1937
|
+
* @param valueType - Type of value provided
|
|
1938
|
+
* @param seekValue - Value to seek
|
|
1939
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1940
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1941
|
+
* `false`.
|
|
1942
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1943
|
+
* @return A promise that resolves to the row value found.
|
|
1804
1944
|
*/
|
|
1805
|
-
|
|
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 {
|
|
1945
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
1946
|
+
toString():string;
|
|
1851
1947
|
/**
|
|
1852
|
-
*
|
|
1948
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
1949
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
1950
|
+
* @return boolean
|
|
1853
1951
|
*/
|
|
1854
|
-
|
|
1952
|
+
get hasInputTable():boolean;
|
|
1855
1953
|
/**
|
|
1856
|
-
*
|
|
1954
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
1955
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
1956
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
1957
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1958
|
+
* @return {@link dh.Column} array
|
|
1857
1959
|
*/
|
|
1858
|
-
|
|
1960
|
+
get columns():Array<Column>;
|
|
1859
1961
|
/**
|
|
1860
|
-
*
|
|
1962
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
1963
|
+
* @return dh.TotalsTableConfig
|
|
1861
1964
|
*/
|
|
1862
|
-
|
|
1965
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
1863
1966
|
/**
|
|
1864
|
-
*
|
|
1967
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
1968
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1969
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
1970
|
+
* @return {@link dh.Sort} array
|
|
1865
1971
|
*/
|
|
1866
|
-
|
|
1972
|
+
get sort():Array<Sort>;
|
|
1867
1973
|
/**
|
|
1868
|
-
*
|
|
1974
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
1975
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
1976
|
+
* @return {@link dh.CustomColumn} array
|
|
1869
1977
|
*/
|
|
1870
|
-
|
|
1871
|
-
readonly description?:string|null;
|
|
1872
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1873
|
-
|
|
1874
|
-
protected constructor();
|
|
1875
|
-
|
|
1978
|
+
get customColumns():Array<CustomColumn>;
|
|
1876
1979
|
/**
|
|
1877
|
-
*
|
|
1878
|
-
*
|
|
1879
|
-
*
|
|
1880
|
-
* boolean parameter.
|
|
1881
|
-
* @param row -
|
|
1882
|
-
* @param expandDescendants -
|
|
1980
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1981
|
+
* initial snapshot.
|
|
1982
|
+
* @return boolean
|
|
1883
1983
|
*/
|
|
1884
|
-
|
|
1984
|
+
get isRefreshing():boolean;
|
|
1885
1985
|
/**
|
|
1886
|
-
*
|
|
1887
|
-
*
|
|
1888
|
-
*
|
|
1986
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
1987
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1988
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
1989
|
+
* @return {@link dh.FilterCondition} array
|
|
1889
1990
|
*/
|
|
1890
|
-
|
|
1991
|
+
get filter():Array<FilterCondition>;
|
|
1891
1992
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
*
|
|
1895
|
-
* @
|
|
1896
|
-
* @param isExpanded -
|
|
1897
|
-
* @param expandDescendants -
|
|
1993
|
+
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
1994
|
+
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
1995
|
+
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
1996
|
+
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
1898
1997
|
*/
|
|
1899
|
-
|
|
1900
|
-
expandAll():void;
|
|
1901
|
-
collapseAll():void;
|
|
1998
|
+
get totalSize():number;
|
|
1902
1999
|
/**
|
|
1903
|
-
*
|
|
1904
|
-
* is
|
|
1905
|
-
* @
|
|
1906
|
-
*
|
|
2000
|
+
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
2001
|
+
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
2002
|
+
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
2003
|
+
* <p>
|
|
2004
|
+
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
2005
|
+
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
2006
|
+
* uncoalesced.
|
|
1907
2007
|
*/
|
|
1908
|
-
|
|
1909
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1910
|
-
getViewportData():Promise<TreeViewportData>;
|
|
2008
|
+
get size():number;
|
|
1911
2009
|
/**
|
|
1912
|
-
*
|
|
2010
|
+
* True if this table has been closed.
|
|
2011
|
+
* @return boolean
|
|
1913
2012
|
*/
|
|
1914
|
-
|
|
1915
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2013
|
+
get isClosed():boolean;
|
|
1916
2014
|
/**
|
|
1917
|
-
*
|
|
1918
|
-
*
|
|
1919
|
-
*
|
|
2015
|
+
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
2016
|
+
* <p>
|
|
2017
|
+
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
2018
|
+
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
2019
|
+
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
2020
|
+
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
2021
|
+
* for those columns, use {@link Table.selectDistinct}.
|
|
2022
|
+
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
1920
2023
|
*/
|
|
1921
|
-
|
|
2024
|
+
get isUncoalesced():boolean;
|
|
1922
2025
|
/**
|
|
1923
|
-
*
|
|
1924
|
-
*
|
|
1925
|
-
*
|
|
1926
|
-
* @
|
|
1927
|
-
* @
|
|
2026
|
+
* Listen for events on this object.
|
|
2027
|
+
* @param name - the name of the event to listen for
|
|
2028
|
+
* @param callback - a function to call when the event occurs
|
|
2029
|
+
* @return Returns a cleanup function.
|
|
2030
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1928
2031
|
*/
|
|
1929
|
-
|
|
2032
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2033
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2034
|
+
hasListeners(name:string):boolean;
|
|
1930
2035
|
/**
|
|
1931
|
-
*
|
|
1932
|
-
* @param
|
|
1933
|
-
* @
|
|
2036
|
+
* Removes an event listener added to this table.
|
|
2037
|
+
* @param name -
|
|
2038
|
+
* @param callback -
|
|
2039
|
+
* @return
|
|
2040
|
+
* @typeParam T -
|
|
1934
2041
|
*/
|
|
1935
|
-
|
|
2042
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1936
2043
|
/**
|
|
1937
|
-
*
|
|
1938
|
-
*
|
|
1939
|
-
* @return {@link dh.
|
|
2044
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2045
|
+
* do not support reverse.
|
|
2046
|
+
* @return {@link dh.Sort}
|
|
1940
2047
|
*/
|
|
1941
|
-
|
|
2048
|
+
static reverse():Sort;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
2053
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
2054
|
+
* methods return a new Sort instance.
|
|
2055
|
+
*/
|
|
2056
|
+
export class Sort {
|
|
2057
|
+
static readonly ASCENDING:string;
|
|
2058
|
+
static readonly DESCENDING:string;
|
|
2059
|
+
static readonly REVERSE:string;
|
|
2060
|
+
|
|
2061
|
+
protected constructor();
|
|
2062
|
+
|
|
1942
2063
|
/**
|
|
1943
|
-
*
|
|
1944
|
-
*
|
|
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>
|
|
2064
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
2065
|
+
* @return {@link dh.Sort}
|
|
1952
2066
|
*/
|
|
1953
|
-
|
|
1954
|
-
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1955
|
-
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1956
|
-
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
2067
|
+
asc():Sort;
|
|
1957
2068
|
/**
|
|
1958
|
-
* a
|
|
1959
|
-
*
|
|
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
|
|
2069
|
+
* Builds a Sort instance to sort values in descending order.
|
|
2070
|
+
* @return {@link dh.Sort}
|
|
1963
2071
|
*/
|
|
1964
|
-
|
|
2072
|
+
desc():Sort;
|
|
1965
2073
|
/**
|
|
1966
|
-
*
|
|
1967
|
-
* @return {@link dh.
|
|
2074
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
2075
|
+
* @return {@link dh.Sort}
|
|
1968
2076
|
*/
|
|
1969
|
-
|
|
2077
|
+
abs():Sort;
|
|
2078
|
+
toString():string;
|
|
1970
2079
|
/**
|
|
1971
|
-
* True if
|
|
2080
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1972
2081
|
* @return boolean
|
|
1973
2082
|
*/
|
|
1974
|
-
get
|
|
1975
|
-
get groupedColumns():Array<Column>;
|
|
2083
|
+
get isAbs():boolean;
|
|
1976
2084
|
/**
|
|
1977
|
-
*
|
|
1978
|
-
* @return
|
|
2085
|
+
* The column which is sorted.
|
|
2086
|
+
* @return {@link dh.Column}
|
|
1979
2087
|
*/
|
|
1980
|
-
get
|
|
2088
|
+
get column():Column;
|
|
1981
2089
|
/**
|
|
1982
|
-
* The
|
|
1983
|
-
*
|
|
1984
|
-
* when considering collapse/expand states).
|
|
1985
|
-
* @return double
|
|
2090
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
2091
|
+
* @return String
|
|
1986
2092
|
*/
|
|
1987
|
-
get
|
|
2093
|
+
get direction():string;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
2098
|
+
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
2099
|
+
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
2100
|
+
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
2101
|
+
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
2102
|
+
*/
|
|
2103
|
+
export class TableViewportSubscription implements HasEventHandling {
|
|
2104
|
+
protected constructor();
|
|
2105
|
+
|
|
1988
2106
|
/**
|
|
1989
|
-
*
|
|
1990
|
-
* @
|
|
2107
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
2108
|
+
* @param firstRow -
|
|
2109
|
+
* @param lastRow -
|
|
2110
|
+
* @param columns -
|
|
2111
|
+
* @param updateIntervalMs -
|
|
1991
2112
|
*/
|
|
1992
|
-
|
|
2113
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
|
|
1993
2114
|
/**
|
|
1994
|
-
*
|
|
1995
|
-
* @return {@link dh.Sort} array.
|
|
2115
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
1996
2116
|
*/
|
|
1997
|
-
|
|
2117
|
+
close():void;
|
|
1998
2118
|
/**
|
|
1999
|
-
*
|
|
2000
|
-
*
|
|
2001
|
-
* @return boolean
|
|
2119
|
+
* Gets the data currently visible in this viewport
|
|
2120
|
+
* @return Promise of {@link dh.TableData}.
|
|
2002
2121
|
*/
|
|
2003
|
-
|
|
2122
|
+
getViewportData():Promise<ViewportData>;
|
|
2123
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
2004
2124
|
/**
|
|
2005
2125
|
* Listen for events on this object.
|
|
2006
2126
|
* @param name - the name of the event to listen for
|
|
@@ -2008,8 +2128,8 @@ export namespace dh {
|
|
|
2008
2128
|
* @return Returns a cleanup function.
|
|
2009
2129
|
* @typeParam T - the type of the data that the event will provide
|
|
2010
2130
|
*/
|
|
2011
|
-
addEventListener<T>(name:string, callback:(e:
|
|
2012
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
2131
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2132
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2013
2133
|
hasListeners(name:string):boolean;
|
|
2014
2134
|
/**
|
|
2015
2135
|
* Removes an event listener added to this table.
|
|
@@ -2018,7 +2138,98 @@ export namespace dh {
|
|
|
2018
2138
|
* @return
|
|
2019
2139
|
* @typeParam T -
|
|
2020
2140
|
*/
|
|
2021
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
2141
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
2146
|
+
* interpret these responses to see what to render, or how to respond.
|
|
2147
|
+
* <p>
|
|
2148
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
2149
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
2150
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
2151
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
2152
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
2153
|
+
* <p>
|
|
2154
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
2155
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
2156
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
2157
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
2158
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
2159
|
+
* <p>
|
|
2160
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
2161
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
2162
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
2163
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
2164
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
2165
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
2166
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
2167
|
+
* <p>
|
|
2168
|
+
* This can suggest several patterns for how plugins operate:
|
|
2169
|
+
* <ul>
|
|
2170
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
2171
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
2172
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
2173
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
2174
|
+
* provided to the JS API consumer.</li>
|
|
2175
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
2176
|
+
* which provided them. One concrete example of this could have been
|
|
2177
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
2178
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
2179
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
2180
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
2181
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
2182
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
2183
|
+
* an internal table instance.</li>
|
|
2184
|
+
* </ul>
|
|
2185
|
+
*
|
|
2186
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
2187
|
+
* <ul>
|
|
2188
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
2189
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
2190
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
2191
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
2192
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
2193
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
2194
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
2195
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
2196
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
2197
|
+
* </ul>
|
|
2198
|
+
*/
|
|
2199
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
2200
|
+
static readonly EVENT_MESSAGE:string;
|
|
2201
|
+
static readonly EVENT_CLOSE:string;
|
|
2202
|
+
|
|
2203
|
+
protected constructor();
|
|
2204
|
+
|
|
2205
|
+
/**
|
|
2206
|
+
* Ends the client connection to the server.
|
|
2207
|
+
*/
|
|
2208
|
+
close():void;
|
|
2209
|
+
getDataAsBase64():string;
|
|
2210
|
+
getDataAsU8():Uint8Array;
|
|
2211
|
+
getDataAsString():string;
|
|
2212
|
+
/**
|
|
2213
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
2214
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
2215
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
2216
|
+
*/
|
|
2217
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
2218
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2219
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2220
|
+
hasListeners(name:string):boolean;
|
|
2221
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2222
|
+
/**
|
|
2223
|
+
*
|
|
2224
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
2225
|
+
* them when finished using them.
|
|
2226
|
+
*/
|
|
2227
|
+
get exportedObjects():WidgetExportedObject[];
|
|
2228
|
+
/**
|
|
2229
|
+
*
|
|
2230
|
+
* @return the type of this widget
|
|
2231
|
+
*/
|
|
2232
|
+
get type():string;
|
|
2022
2233
|
}
|
|
2023
2234
|
|
|
2024
2235
|
/**
|
|
@@ -2033,149 +2244,129 @@ export namespace dh {
|
|
|
2033
2244
|
constructor();
|
|
2034
2245
|
}
|
|
2035
2246
|
|
|
2036
|
-
|
|
2247
|
+
/**
|
|
2248
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2249
|
+
*/
|
|
2250
|
+
export class BigDecimalWrapper {
|
|
2037
2251
|
protected constructor();
|
|
2038
2252
|
|
|
2039
|
-
static ofString(
|
|
2253
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
2040
2254
|
asNumber():number;
|
|
2041
2255
|
valueOf():string;
|
|
2042
2256
|
toString():string;
|
|
2043
2257
|
}
|
|
2044
2258
|
|
|
2045
2259
|
/**
|
|
2046
|
-
*
|
|
2047
|
-
*
|
|
2048
|
-
*
|
|
2260
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
2261
|
+
* this type TableMap.
|
|
2262
|
+
* @deprecated
|
|
2049
2263
|
*/
|
|
2050
|
-
export class
|
|
2264
|
+
export class TableMap {
|
|
2265
|
+
static readonly EVENT_KEYADDED:string;
|
|
2266
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2267
|
+
static readonly EVENT_RECONNECT:string;
|
|
2268
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
2269
|
+
|
|
2051
2270
|
protected constructor();
|
|
2271
|
+
}
|
|
2052
2272
|
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
* @return Iterator of {@link dh.LongWrapper}
|
|
2060
|
-
*/
|
|
2061
|
-
iterator():Iterator<LongWrapper>;
|
|
2062
|
-
/**
|
|
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
|
|
2067
|
-
*/
|
|
2068
|
-
get size():number;
|
|
2273
|
+
export class LoginCredentials {
|
|
2274
|
+
type?:string|null;
|
|
2275
|
+
username?:string|null;
|
|
2276
|
+
token?:string|null;
|
|
2277
|
+
|
|
2278
|
+
constructor();
|
|
2069
2279
|
}
|
|
2070
2280
|
|
|
2071
2281
|
/**
|
|
2072
|
-
* Describes
|
|
2073
|
-
*
|
|
2074
|
-
* instance.
|
|
2282
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
2283
|
+
* column.
|
|
2075
2284
|
*/
|
|
2076
|
-
export class
|
|
2285
|
+
export class Column {
|
|
2286
|
+
/**
|
|
2287
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
2288
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
2289
|
+
* @return String
|
|
2290
|
+
*/
|
|
2291
|
+
readonly constituentType?:string|null;
|
|
2292
|
+
readonly description?:string|null;
|
|
2293
|
+
|
|
2077
2294
|
protected constructor();
|
|
2078
2295
|
|
|
2079
2296
|
/**
|
|
2080
|
-
* the
|
|
2081
|
-
* @
|
|
2297
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
2298
|
+
* @param row -
|
|
2299
|
+
* @return Any
|
|
2082
2300
|
*/
|
|
2083
|
-
|
|
2301
|
+
get(row:Row):any;
|
|
2302
|
+
getFormat(row:Row):Format;
|
|
2084
2303
|
/**
|
|
2085
|
-
* a
|
|
2086
|
-
* @
|
|
2087
|
-
* @return FilterCondition
|
|
2304
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
2305
|
+
* @return {@link dh.Sort}
|
|
2088
2306
|
*/
|
|
2089
|
-
|
|
2307
|
+
sort():Sort;
|
|
2090
2308
|
/**
|
|
2091
|
-
* a
|
|
2092
|
-
*
|
|
2093
|
-
* @return
|
|
2309
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
2310
|
+
* operation, or as a builder to create a filter operation.
|
|
2311
|
+
* @return {@link dh.FilterValue}
|
|
2094
2312
|
*/
|
|
2095
|
-
|
|
2313
|
+
filter():FilterValue;
|
|
2096
2314
|
/**
|
|
2097
|
-
* a
|
|
2098
|
-
* @
|
|
2315
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
2316
|
+
* @param expression -
|
|
2317
|
+
* @return {@link dh.CustomColumn}
|
|
2099
2318
|
*/
|
|
2100
|
-
|
|
2101
|
-
get columns():Array<Column>;
|
|
2319
|
+
formatColor(expression:string):CustomColumn;
|
|
2102
2320
|
/**
|
|
2103
|
-
* a
|
|
2104
|
-
*
|
|
2105
|
-
*
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
* <
|
|
2110
|
-
*
|
|
2111
|
-
*
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
*
|
|
2117
|
-
*
|
|
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
|
|
2321
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2322
|
+
* @param expression -
|
|
2323
|
+
* @return {@link dh.CustomColumn}
|
|
2324
|
+
*/
|
|
2325
|
+
formatNumber(expression:string):CustomColumn;
|
|
2326
|
+
/**
|
|
2327
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2328
|
+
* @param expression -
|
|
2329
|
+
* @return {@link dh.CustomColumn}
|
|
2330
|
+
*/
|
|
2331
|
+
formatDate(expression:string):CustomColumn;
|
|
2332
|
+
toString():string;
|
|
2333
|
+
/**
|
|
2334
|
+
* Label for this column.
|
|
2335
|
+
* @return String
|
|
2127
2336
|
*/
|
|
2128
|
-
|
|
2337
|
+
get name():string;
|
|
2129
2338
|
/**
|
|
2130
|
-
*
|
|
2131
|
-
*
|
|
2132
|
-
*
|
|
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
|
|
2339
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
2340
|
+
* {@link Table.uncoalesced}.
|
|
2341
|
+
* @return true if the column is a partition column
|
|
2140
2342
|
*/
|
|
2141
|
-
|
|
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 {
|
|
2343
|
+
get isPartitionColumn():boolean;
|
|
2157
2344
|
/**
|
|
2158
|
-
*
|
|
2159
|
-
*
|
|
2160
|
-
*
|
|
2345
|
+
*
|
|
2346
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
2347
|
+
* @return int
|
|
2161
2348
|
*/
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
protected constructor();
|
|
2165
|
-
|
|
2349
|
+
get index():number;
|
|
2350
|
+
get isSortable():boolean;
|
|
2166
2351
|
/**
|
|
2167
|
-
*
|
|
2352
|
+
* Type of the row data that can be found in this column.
|
|
2353
|
+
* @return String
|
|
2168
2354
|
*/
|
|
2169
|
-
|
|
2170
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2171
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2172
|
-
hasListeners(name:string):boolean;
|
|
2173
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2355
|
+
get type():string;
|
|
2174
2356
|
/**
|
|
2175
|
-
*
|
|
2176
|
-
*
|
|
2357
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
2358
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
2359
|
+
* @param expression -
|
|
2360
|
+
* @return {@link dh.CustomColumn}
|
|
2177
2361
|
*/
|
|
2178
|
-
|
|
2362
|
+
static formatRowColor(expression:string):CustomColumn;
|
|
2363
|
+
/**
|
|
2364
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2365
|
+
* @param name -
|
|
2366
|
+
* @param expression -
|
|
2367
|
+
* @return {@link dh.CustomColumn}
|
|
2368
|
+
*/
|
|
2369
|
+
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
2179
2370
|
}
|
|
2180
2371
|
|
|
2181
2372
|
/**
|
|
@@ -2262,128 +2453,6 @@ export namespace dh {
|
|
|
2262
2453
|
toString():string;
|
|
2263
2454
|
}
|
|
2264
2455
|
|
|
2265
|
-
/**
|
|
2266
|
-
* A js type for operating on input tables.
|
|
2267
|
-
*
|
|
2268
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
2269
|
-
*
|
|
2270
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2271
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2272
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2273
|
-
* before sending the next operation.
|
|
2274
|
-
*
|
|
2275
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2276
|
-
*
|
|
2277
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2278
|
-
* object.
|
|
2279
|
-
*/
|
|
2280
|
-
export class InputTable {
|
|
2281
|
-
protected constructor();
|
|
2282
|
-
|
|
2283
|
-
/**
|
|
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
|
|
2289
|
-
*/
|
|
2290
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2291
|
-
/**
|
|
2292
|
-
* Add multiple rows to a table.
|
|
2293
|
-
* @param rows -
|
|
2294
|
-
* @param userTimeZone -
|
|
2295
|
-
* @return Promise of dh.InputTable
|
|
2296
|
-
*/
|
|
2297
|
-
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
2298
|
-
/**
|
|
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
|
|
2305
|
-
*/
|
|
2306
|
-
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
2307
|
-
/**
|
|
2308
|
-
* Add multiple tables to this Input Table.
|
|
2309
|
-
* @param tablesToAdd -
|
|
2310
|
-
* @return Promise of dh.InputTable
|
|
2311
|
-
*/
|
|
2312
|
-
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
2313
|
-
/**
|
|
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
|
|
2317
|
-
*/
|
|
2318
|
-
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
2319
|
-
/**
|
|
2320
|
-
* Delete multiple tables from this Input Table.
|
|
2321
|
-
* @param tablesToDelete -
|
|
2322
|
-
* @return
|
|
2323
|
-
*/
|
|
2324
|
-
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
2325
|
-
/**
|
|
2326
|
-
* A list of the key columns, by name
|
|
2327
|
-
* @return String array.
|
|
2328
|
-
*/
|
|
2329
|
-
get keys():string[];
|
|
2330
|
-
/**
|
|
2331
|
-
* A list of the value columns, by name
|
|
2332
|
-
* @return String array.
|
|
2333
|
-
*/
|
|
2334
|
-
get values():string[];
|
|
2335
|
-
/**
|
|
2336
|
-
* A list of the key columns.
|
|
2337
|
-
* @return Column array.
|
|
2338
|
-
*/
|
|
2339
|
-
get keyColumns():Column[];
|
|
2340
|
-
/**
|
|
2341
|
-
* A list of the value Column objects
|
|
2342
|
-
* @return {@link dh.Column} array.
|
|
2343
|
-
*/
|
|
2344
|
-
get valueColumns():Column[];
|
|
2345
|
-
/**
|
|
2346
|
-
* The source table for this Input Table
|
|
2347
|
-
* @return dh.table
|
|
2348
|
-
*/
|
|
2349
|
-
get table():Table;
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
export class DateWrapper extends LongWrapper {
|
|
2353
|
-
protected constructor();
|
|
2354
|
-
|
|
2355
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
2356
|
-
asDate():Date;
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
type SearchDisplayModeType = string;
|
|
2361
|
-
export class SearchDisplayMode {
|
|
2362
|
-
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2363
|
-
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2364
|
-
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
|
-
/**
|
|
2368
|
-
* This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
|
|
2369
|
-
*/
|
|
2370
|
-
type AggregationOperationType = string;
|
|
2371
|
-
export class AggregationOperation {
|
|
2372
|
-
static readonly COUNT:AggregationOperationType;
|
|
2373
|
-
static readonly COUNT_DISTINCT:AggregationOperationType;
|
|
2374
|
-
static readonly DISTINCT:AggregationOperationType;
|
|
2375
|
-
static readonly MIN:AggregationOperationType;
|
|
2376
|
-
static readonly MAX:AggregationOperationType;
|
|
2377
|
-
static readonly SUM:AggregationOperationType;
|
|
2378
|
-
static readonly ABS_SUM:AggregationOperationType;
|
|
2379
|
-
static readonly VAR:AggregationOperationType;
|
|
2380
|
-
static readonly AVG:AggregationOperationType;
|
|
2381
|
-
static readonly STD:AggregationOperationType;
|
|
2382
|
-
static readonly FIRST:AggregationOperationType;
|
|
2383
|
-
static readonly LAST:AggregationOperationType;
|
|
2384
|
-
static readonly UNIQUE:AggregationOperationType;
|
|
2385
|
-
static readonly SKIP:AggregationOperationType;
|
|
2386
|
-
}
|
|
2387
2456
|
|
|
2388
2457
|
type ValueTypeType = string;
|
|
2389
2458
|
export class ValueType {
|
|
@@ -2411,63 +2480,38 @@ export namespace dh {
|
|
|
2411
2480
|
static readonly TREEMAP:VariableTypeType;
|
|
2412
2481
|
}
|
|
2413
2482
|
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
export namespace dh.ide {
|
|
2417
|
-
|
|
2418
|
-
/**
|
|
2419
|
-
* Specifies a type and either id or name (but not both).
|
|
2420
|
-
*/
|
|
2421
|
-
export interface VariableDescriptor {
|
|
2422
|
-
type:string;
|
|
2423
|
-
id?:string|null;
|
|
2424
|
-
name?:string|null;
|
|
2425
|
-
}
|
|
2426
2483
|
/**
|
|
2427
|
-
*
|
|
2428
|
-
* server.
|
|
2484
|
+
* This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
|
|
2429
2485
|
*/
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2486
|
+
type AggregationOperationType = string;
|
|
2487
|
+
export class AggregationOperation {
|
|
2488
|
+
static readonly COUNT:AggregationOperationType;
|
|
2489
|
+
static readonly COUNT_DISTINCT:AggregationOperationType;
|
|
2490
|
+
static readonly DISTINCT:AggregationOperationType;
|
|
2491
|
+
static readonly MIN:AggregationOperationType;
|
|
2492
|
+
static readonly MAX:AggregationOperationType;
|
|
2493
|
+
static readonly SUM:AggregationOperationType;
|
|
2494
|
+
static readonly ABS_SUM:AggregationOperationType;
|
|
2495
|
+
static readonly VAR:AggregationOperationType;
|
|
2496
|
+
static readonly AVG:AggregationOperationType;
|
|
2497
|
+
static readonly STD:AggregationOperationType;
|
|
2498
|
+
static readonly FIRST:AggregationOperationType;
|
|
2499
|
+
static readonly LAST:AggregationOperationType;
|
|
2500
|
+
static readonly UNIQUE:AggregationOperationType;
|
|
2501
|
+
static readonly SKIP:AggregationOperationType;
|
|
2446
2502
|
}
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
export interface VariableChanges {
|
|
2454
|
-
/**
|
|
2455
|
-
*
|
|
2456
|
-
* @return The variables that no longer exist after this operation, or were replaced by some variable with a
|
|
2457
|
-
* different type.
|
|
2458
|
-
*/
|
|
2459
|
-
get removed():Array<VariableDefinition>;
|
|
2460
|
-
/**
|
|
2461
|
-
*
|
|
2462
|
-
* @return The variables that were created by this operation, or have a new type.
|
|
2463
|
-
*/
|
|
2464
|
-
get created():Array<VariableDefinition>;
|
|
2465
|
-
/**
|
|
2466
|
-
*
|
|
2467
|
-
* @return The variables that changed value during this operation.
|
|
2468
|
-
*/
|
|
2469
|
-
get updated():Array<VariableDefinition>;
|
|
2503
|
+
|
|
2504
|
+
type SearchDisplayModeType = string;
|
|
2505
|
+
export class SearchDisplayMode {
|
|
2506
|
+
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2507
|
+
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2508
|
+
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2470
2509
|
}
|
|
2510
|
+
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
export namespace dh.ide {
|
|
2514
|
+
|
|
2471
2515
|
/**
|
|
2472
2516
|
* Indicates the result of code run on the server.
|
|
2473
2517
|
*/
|
|
@@ -2524,121 +2568,117 @@ export namespace dh.ide {
|
|
|
2524
2568
|
*/
|
|
2525
2569
|
get applicationName():string;
|
|
2526
2570
|
}
|
|
2571
|
+
/**
|
|
2572
|
+
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2573
|
+
* server.
|
|
2574
|
+
*/
|
|
2575
|
+
export interface LogItem {
|
|
2576
|
+
/**
|
|
2577
|
+
* The level of the log message, enabling the client to ignore messages.
|
|
2578
|
+
* @return String
|
|
2579
|
+
*/
|
|
2580
|
+
get logLevel():string;
|
|
2581
|
+
/**
|
|
2582
|
+
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2583
|
+
* @return double
|
|
2584
|
+
*/
|
|
2585
|
+
get micros():number;
|
|
2586
|
+
/**
|
|
2587
|
+
* The log message written on the server.
|
|
2588
|
+
* @return String
|
|
2589
|
+
*/
|
|
2590
|
+
get message():string;
|
|
2591
|
+
}
|
|
2592
|
+
/**
|
|
2593
|
+
* Specifies a type and either id or name (but not both).
|
|
2594
|
+
*/
|
|
2595
|
+
export interface VariableDescriptor {
|
|
2596
|
+
type:string;
|
|
2597
|
+
id?:string|null;
|
|
2598
|
+
name?:string|null;
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2602
|
+
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2603
|
+
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
2604
|
+
* new types.
|
|
2605
|
+
*/
|
|
2606
|
+
export interface VariableChanges {
|
|
2607
|
+
/**
|
|
2608
|
+
*
|
|
2609
|
+
* @return The variables that no longer exist after this operation, or were replaced by some variable with a
|
|
2610
|
+
* different type.
|
|
2611
|
+
*/
|
|
2612
|
+
get removed():Array<VariableDefinition>;
|
|
2613
|
+
/**
|
|
2614
|
+
*
|
|
2615
|
+
* @return The variables that were created by this operation, or have a new type.
|
|
2616
|
+
*/
|
|
2617
|
+
get created():Array<VariableDefinition>;
|
|
2618
|
+
/**
|
|
2619
|
+
*
|
|
2620
|
+
* @return The variables that changed value during this operation.
|
|
2621
|
+
*/
|
|
2622
|
+
get updated():Array<VariableDefinition>;
|
|
2623
|
+
}
|
|
2527
2624
|
}
|
|
2528
2625
|
|
|
2529
2626
|
export namespace dh.i18n {
|
|
2530
2627
|
|
|
2531
2628
|
/**
|
|
2532
|
-
*
|
|
2533
|
-
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
2534
|
-
* <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
|
|
2535
|
-
* instance.
|
|
2536
|
-
*
|
|
2537
|
-
*
|
|
2538
|
-
* The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
|
|
2539
|
-
* return the same details:
|
|
2540
|
-
*
|
|
2541
|
-
* <ul>
|
|
2542
|
-
* <li>GMT/UTC</li>
|
|
2543
|
-
* <li>Asia/Tokyo</li>
|
|
2544
|
-
* <li>Asia/Seoul</li>
|
|
2545
|
-
* <li>Asia/Hong_Kong</li>
|
|
2546
|
-
* <li>Asia/Singapore</li>
|
|
2547
|
-
* <li>Asia/Calcutta/Asia/Kolkata</li>
|
|
2548
|
-
* <li>Europe/Berlin</li>
|
|
2549
|
-
* <li>Europe/London</li>
|
|
2550
|
-
* <li>America/Sao_Paulo</li>
|
|
2551
|
-
* <li>America/St_Johns</li>
|
|
2552
|
-
* <li>America/Halifax</li>
|
|
2553
|
-
* <li>America/New_York</li>
|
|
2554
|
-
* <li>America/Chicago</li>
|
|
2555
|
-
* <li>America/Denver</li>
|
|
2556
|
-
* <li>America/Los_Angeles</li>
|
|
2557
|
-
* <li>America/Anchorage</li>
|
|
2558
|
-
* <li>Pacific/Honolulu</li>
|
|
2559
|
-
* </ul>
|
|
2560
|
-
*
|
|
2561
|
-
* A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
|
|
2629
|
+
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2562
2630
|
*
|
|
2563
|
-
*
|
|
2564
|
-
*
|
|
2565
|
-
*
|
|
2566
|
-
* <li>Z</li>
|
|
2567
|
-
* <li>NY</li>
|
|
2568
|
-
* <li>ET</li>
|
|
2569
|
-
* <li>EST</li>
|
|
2570
|
-
* <li>EDT</li>
|
|
2571
|
-
* <li>MN</li>
|
|
2572
|
-
* <li>CT</li>
|
|
2573
|
-
* <li>CST</li>
|
|
2574
|
-
* <li>CDT</li>
|
|
2575
|
-
* <li>MT</li>
|
|
2576
|
-
* <li>MST</li>
|
|
2577
|
-
* <li>MDT</li>
|
|
2578
|
-
* <li>PT</li>
|
|
2579
|
-
* <li>PST</li>
|
|
2580
|
-
* <li>PDT</li>
|
|
2581
|
-
* <li>HI</li>
|
|
2582
|
-
* <li>HST</li>
|
|
2583
|
-
* <li>HDT</li>
|
|
2584
|
-
* <li>BT</li>
|
|
2585
|
-
* <li>BRST</li>
|
|
2586
|
-
* <li>BRT</li>
|
|
2587
|
-
* <li>KR</li>
|
|
2588
|
-
* <li>KST</li>
|
|
2589
|
-
* <li>HK</li>
|
|
2590
|
-
* <li>HKT</li>
|
|
2591
|
-
* <li>JP</li>
|
|
2592
|
-
* <li>JST</li>
|
|
2593
|
-
* <li>AT</li>
|
|
2594
|
-
* <li>AST</li>
|
|
2595
|
-
* <li>ADT</li>
|
|
2596
|
-
* <li>NF</li>
|
|
2597
|
-
* <li>NST</li>
|
|
2598
|
-
* <li>NDT</li>
|
|
2599
|
-
* <li>AL</li>
|
|
2600
|
-
* <li>AKST</li>
|
|
2601
|
-
* <li>AKDT</li>
|
|
2602
|
-
* <li>IN</li>
|
|
2603
|
-
* <li>IST</li>
|
|
2604
|
-
* <li>CE</li>
|
|
2605
|
-
* <li>CET</li>
|
|
2606
|
-
* <li>CEST</li>
|
|
2607
|
-
* <li>SG</li>
|
|
2608
|
-
* <li>SGT</li>
|
|
2609
|
-
* <li>LON</li>
|
|
2610
|
-
* <li>BST</li>
|
|
2611
|
-
* <li>MOS</li>
|
|
2612
|
-
* <li>SHG</li>
|
|
2613
|
-
* <li>CH</li>
|
|
2614
|
-
* <li>NL</li>
|
|
2615
|
-
* <li>TW</li>
|
|
2616
|
-
* <li>SYD</li>
|
|
2617
|
-
* <li>AEST</li>
|
|
2618
|
-
* <li>AEDT</li>
|
|
2619
|
-
* </ul>
|
|
2631
|
+
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2632
|
+
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2633
|
+
* BigDecimal.
|
|
2620
2634
|
*/
|
|
2621
|
-
export class
|
|
2622
|
-
|
|
2635
|
+
export class NumberFormat {
|
|
2636
|
+
/**
|
|
2637
|
+
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2638
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2639
|
+
* @param pattern -
|
|
2640
|
+
*/
|
|
2641
|
+
constructor(pattern:string);
|
|
2623
2642
|
|
|
2624
2643
|
/**
|
|
2625
|
-
*
|
|
2626
|
-
*
|
|
2627
|
-
*
|
|
2644
|
+
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2645
|
+
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2646
|
+
* take advantage of caching
|
|
2647
|
+
* @param pattern -
|
|
2648
|
+
* @return dh.i18n.NumberFormat
|
|
2628
2649
|
*/
|
|
2629
|
-
static
|
|
2650
|
+
static getFormat(pattern:string):NumberFormat;
|
|
2630
2651
|
/**
|
|
2631
|
-
* the
|
|
2632
|
-
* @
|
|
2652
|
+
* Parses the given text using the cached format matching the given pattern.
|
|
2653
|
+
* @param pattern -
|
|
2654
|
+
* @param text -
|
|
2655
|
+
* @return double
|
|
2633
2656
|
*/
|
|
2634
|
-
|
|
2657
|
+
static parse(pattern:string, text:string):number;
|
|
2635
2658
|
/**
|
|
2636
|
-
* the
|
|
2659
|
+
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2660
|
+
* format matching the given pattern string.
|
|
2661
|
+
* @param pattern -
|
|
2662
|
+
* @param number -
|
|
2637
2663
|
* @return String
|
|
2638
2664
|
*/
|
|
2639
|
-
|
|
2665
|
+
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2666
|
+
/**
|
|
2667
|
+
* Parses the given text using this instance's pattern into a JS Number.
|
|
2668
|
+
* @param text -
|
|
2669
|
+
* @return double
|
|
2670
|
+
*/
|
|
2671
|
+
parse(text:string):number;
|
|
2672
|
+
/**
|
|
2673
|
+
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2674
|
+
* @param number -
|
|
2675
|
+
* @return String
|
|
2676
|
+
*/
|
|
2677
|
+
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2678
|
+
toString():string;
|
|
2640
2679
|
}
|
|
2641
2680
|
|
|
2681
|
+
|
|
2642
2682
|
/**
|
|
2643
2683
|
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2644
2684
|
* additional 6 decimal places after the rest of the number.
|
|
@@ -2738,77 +2778,129 @@ export namespace dh.i18n {
|
|
|
2738
2778
|
}
|
|
2739
2779
|
|
|
2740
2780
|
/**
|
|
2741
|
-
*
|
|
2781
|
+
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
2782
|
+
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
2783
|
+
* <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
|
|
2784
|
+
* instance.
|
|
2742
2785
|
*
|
|
2743
|
-
*
|
|
2744
|
-
*
|
|
2745
|
-
*
|
|
2786
|
+
*
|
|
2787
|
+
* The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
|
|
2788
|
+
* return the same details:
|
|
2789
|
+
*
|
|
2790
|
+
* <ul>
|
|
2791
|
+
* <li>GMT/UTC</li>
|
|
2792
|
+
* <li>Asia/Tokyo</li>
|
|
2793
|
+
* <li>Asia/Seoul</li>
|
|
2794
|
+
* <li>Asia/Hong_Kong</li>
|
|
2795
|
+
* <li>Asia/Singapore</li>
|
|
2796
|
+
* <li>Asia/Calcutta/Asia/Kolkata</li>
|
|
2797
|
+
* <li>Europe/Berlin</li>
|
|
2798
|
+
* <li>Europe/London</li>
|
|
2799
|
+
* <li>America/Sao_Paulo</li>
|
|
2800
|
+
* <li>America/St_Johns</li>
|
|
2801
|
+
* <li>America/Halifax</li>
|
|
2802
|
+
* <li>America/New_York</li>
|
|
2803
|
+
* <li>America/Chicago</li>
|
|
2804
|
+
* <li>America/Denver</li>
|
|
2805
|
+
* <li>America/Los_Angeles</li>
|
|
2806
|
+
* <li>America/Anchorage</li>
|
|
2807
|
+
* <li>Pacific/Honolulu</li>
|
|
2808
|
+
* </ul>
|
|
2809
|
+
*
|
|
2810
|
+
* A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
|
|
2811
|
+
*
|
|
2812
|
+
* <ul>
|
|
2813
|
+
* <li>UTC</li>
|
|
2814
|
+
* <li>GMT</li>
|
|
2815
|
+
* <li>Z</li>
|
|
2816
|
+
* <li>NY</li>
|
|
2817
|
+
* <li>ET</li>
|
|
2818
|
+
* <li>EST</li>
|
|
2819
|
+
* <li>EDT</li>
|
|
2820
|
+
* <li>MN</li>
|
|
2821
|
+
* <li>CT</li>
|
|
2822
|
+
* <li>CST</li>
|
|
2823
|
+
* <li>CDT</li>
|
|
2824
|
+
* <li>MT</li>
|
|
2825
|
+
* <li>MST</li>
|
|
2826
|
+
* <li>MDT</li>
|
|
2827
|
+
* <li>PT</li>
|
|
2828
|
+
* <li>PST</li>
|
|
2829
|
+
* <li>PDT</li>
|
|
2830
|
+
* <li>HI</li>
|
|
2831
|
+
* <li>HST</li>
|
|
2832
|
+
* <li>HDT</li>
|
|
2833
|
+
* <li>BT</li>
|
|
2834
|
+
* <li>BRST</li>
|
|
2835
|
+
* <li>BRT</li>
|
|
2836
|
+
* <li>KR</li>
|
|
2837
|
+
* <li>KST</li>
|
|
2838
|
+
* <li>HK</li>
|
|
2839
|
+
* <li>HKT</li>
|
|
2840
|
+
* <li>JP</li>
|
|
2841
|
+
* <li>JST</li>
|
|
2842
|
+
* <li>AT</li>
|
|
2843
|
+
* <li>AST</li>
|
|
2844
|
+
* <li>ADT</li>
|
|
2845
|
+
* <li>NF</li>
|
|
2846
|
+
* <li>NST</li>
|
|
2847
|
+
* <li>NDT</li>
|
|
2848
|
+
* <li>AL</li>
|
|
2849
|
+
* <li>AKST</li>
|
|
2850
|
+
* <li>AKDT</li>
|
|
2851
|
+
* <li>IN</li>
|
|
2852
|
+
* <li>IST</li>
|
|
2853
|
+
* <li>CE</li>
|
|
2854
|
+
* <li>CET</li>
|
|
2855
|
+
* <li>CEST</li>
|
|
2856
|
+
* <li>SG</li>
|
|
2857
|
+
* <li>SGT</li>
|
|
2858
|
+
* <li>LON</li>
|
|
2859
|
+
* <li>BST</li>
|
|
2860
|
+
* <li>MOS</li>
|
|
2861
|
+
* <li>SHG</li>
|
|
2862
|
+
* <li>CH</li>
|
|
2863
|
+
* <li>NL</li>
|
|
2864
|
+
* <li>TW</li>
|
|
2865
|
+
* <li>SYD</li>
|
|
2866
|
+
* <li>AEST</li>
|
|
2867
|
+
* <li>AEDT</li>
|
|
2868
|
+
* </ul>
|
|
2746
2869
|
*/
|
|
2747
|
-
export class
|
|
2748
|
-
|
|
2749
|
-
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2750
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2751
|
-
* @param pattern -
|
|
2752
|
-
*/
|
|
2753
|
-
constructor(pattern:string);
|
|
2870
|
+
export class TimeZone {
|
|
2871
|
+
protected constructor();
|
|
2754
2872
|
|
|
2755
2873
|
/**
|
|
2756
|
-
*
|
|
2757
|
-
*
|
|
2758
|
-
*
|
|
2759
|
-
* @param pattern -
|
|
2760
|
-
* @return dh.i18n.NumberFormat
|
|
2761
|
-
*/
|
|
2762
|
-
static getFormat(pattern:string):NumberFormat;
|
|
2763
|
-
/**
|
|
2764
|
-
* Parses the given text using the cached format matching the given pattern.
|
|
2765
|
-
* @param pattern -
|
|
2766
|
-
* @param text -
|
|
2767
|
-
* @return double
|
|
2768
|
-
*/
|
|
2769
|
-
static parse(pattern:string, text:string):number;
|
|
2770
|
-
/**
|
|
2771
|
-
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2772
|
-
* format matching the given pattern string.
|
|
2773
|
-
* @param pattern -
|
|
2774
|
-
* @param number -
|
|
2775
|
-
* @return String
|
|
2874
|
+
* Factory method which creates timezone instances from one of the supported keys.
|
|
2875
|
+
* @param tzCode -
|
|
2876
|
+
* @return dh.i18n.TimeZone
|
|
2776
2877
|
*/
|
|
2777
|
-
static
|
|
2878
|
+
static getTimeZone(tzCode:string):TimeZone;
|
|
2778
2879
|
/**
|
|
2779
|
-
*
|
|
2780
|
-
* @
|
|
2781
|
-
* @return double
|
|
2880
|
+
* the standard offset of this timezone, in minutes
|
|
2881
|
+
* @return int
|
|
2782
2882
|
*/
|
|
2783
|
-
|
|
2883
|
+
get standardOffset():number;
|
|
2784
2884
|
/**
|
|
2785
|
-
*
|
|
2786
|
-
* @param number -
|
|
2885
|
+
* the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
|
|
2787
2886
|
* @return String
|
|
2788
2887
|
*/
|
|
2789
|
-
|
|
2790
|
-
toString():string;
|
|
2888
|
+
get id():string;
|
|
2791
2889
|
}
|
|
2792
2890
|
|
|
2793
|
-
|
|
2794
2891
|
}
|
|
2795
2892
|
|
|
2796
2893
|
export namespace dh.plot {
|
|
2797
2894
|
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
get
|
|
2807
|
-
/**
|
|
2808
|
-
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2809
|
-
* @return int
|
|
2810
|
-
*/
|
|
2811
|
-
get plotStyle():SeriesPlotStyleType;
|
|
2895
|
+
export interface OneClick {
|
|
2896
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
2897
|
+
getValueForColumn(columName:string):any;
|
|
2898
|
+
get requireAllFiltersToDisplay():boolean;
|
|
2899
|
+
get columns():dh.Column[];
|
|
2900
|
+
}
|
|
2901
|
+
export interface FigureDataUpdatedEvent {
|
|
2902
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2903
|
+
get series():Series[];
|
|
2812
2904
|
}
|
|
2813
2905
|
/**
|
|
2814
2906
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
@@ -2878,16 +2970,6 @@ export namespace dh.plot {
|
|
|
2878
2970
|
get formatType():AxisFormatTypeType;
|
|
2879
2971
|
get minRange():number;
|
|
2880
2972
|
}
|
|
2881
|
-
export interface FigureDataUpdatedEvent {
|
|
2882
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2883
|
-
get series():Series[];
|
|
2884
|
-
}
|
|
2885
|
-
export interface OneClick {
|
|
2886
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
2887
|
-
getValueForColumn(columName:string):any;
|
|
2888
|
-
get requireAllFiltersToDisplay():boolean;
|
|
2889
|
-
get columns():dh.Column[];
|
|
2890
|
-
}
|
|
2891
2973
|
/**
|
|
2892
2974
|
* Provides access to the data for displaying in a figure.
|
|
2893
2975
|
*/
|
|
@@ -2933,111 +3015,39 @@ export namespace dh.plot {
|
|
|
2933
3015
|
get shapeLabel():string;
|
|
2934
3016
|
}
|
|
2935
3017
|
/**
|
|
2936
|
-
* Describes
|
|
3018
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2937
3019
|
*/
|
|
2938
|
-
export interface
|
|
3020
|
+
export interface MultiSeries {
|
|
2939
3021
|
/**
|
|
2940
|
-
*
|
|
3022
|
+
* The name for this multi-series.
|
|
2941
3023
|
* @return String
|
|
2942
3024
|
*/
|
|
2943
|
-
get
|
|
2944
|
-
/**
|
|
2945
|
-
* the axis that this source should be drawn on.
|
|
2946
|
-
* @return dh.plot.Axis
|
|
2947
|
-
*/
|
|
2948
|
-
get axis():Axis;
|
|
3025
|
+
get name():string;
|
|
2949
3026
|
/**
|
|
2950
|
-
*
|
|
3027
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2951
3028
|
* @return int
|
|
2952
3029
|
*/
|
|
2953
|
-
get
|
|
3030
|
+
get plotStyle():SeriesPlotStyleType;
|
|
2954
3031
|
}
|
|
2955
|
-
|
|
2956
3032
|
/**
|
|
2957
|
-
*
|
|
3033
|
+
* Describes how to access and display data required within a series.
|
|
2958
3034
|
*/
|
|
2959
|
-
export
|
|
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;
|
|
3035
|
+
export interface SeriesDataSource {
|
|
2964
3036
|
/**
|
|
2965
|
-
*
|
|
3037
|
+
* the type of data stored in the underlying table's Column.
|
|
2966
3038
|
* @return String
|
|
2967
3039
|
*/
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
protected constructor();
|
|
2971
|
-
|
|
2972
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2973
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2974
|
-
hasListeners(name:string):boolean;
|
|
2975
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2976
|
-
get column():number;
|
|
2977
|
-
get showLegend():boolean;
|
|
3040
|
+
get columnType():string;
|
|
2978
3041
|
/**
|
|
2979
|
-
*
|
|
3042
|
+
* the axis that this source should be drawn on.
|
|
2980
3043
|
* @return dh.plot.Axis
|
|
2981
3044
|
*/
|
|
2982
|
-
get
|
|
2983
|
-
get is3d():boolean;
|
|
2984
|
-
get titleFont():string;
|
|
2985
|
-
get colspan():number;
|
|
2986
|
-
get titleColor():string;
|
|
2987
|
-
get series():Series[];
|
|
2988
|
-
get rowspan():number;
|
|
3045
|
+
get axis():Axis;
|
|
2989
3046
|
/**
|
|
2990
|
-
*
|
|
3047
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2991
3048
|
* @return int
|
|
2992
3049
|
*/
|
|
2993
|
-
get
|
|
2994
|
-
get row():number;
|
|
2995
|
-
get legendColor():string;
|
|
2996
|
-
get legendFont():string;
|
|
2997
|
-
get multiSeries():MultiSeries[];
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
export class DownsampleOptions {
|
|
3001
|
-
/**
|
|
3002
|
-
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3003
|
-
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3004
|
-
* series.subscribe().
|
|
3005
|
-
*/
|
|
3006
|
-
static MAX_SERIES_SIZE:number;
|
|
3007
|
-
/**
|
|
3008
|
-
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3009
|
-
* downsampling disabled, the series will not load data.
|
|
3010
|
-
*/
|
|
3011
|
-
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3012
|
-
/**
|
|
3013
|
-
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3014
|
-
* axes are configured.
|
|
3015
|
-
*/
|
|
3016
|
-
static readonly DEFAULT:DownsampleOptions;
|
|
3017
|
-
/**
|
|
3018
|
-
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3019
|
-
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3020
|
-
*/
|
|
3021
|
-
static readonly DISABLE:DownsampleOptions;
|
|
3022
|
-
|
|
3023
|
-
protected constructor();
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
/**
|
|
3027
|
-
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3028
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3029
|
-
* keep that cached as well.
|
|
3030
|
-
*/
|
|
3031
|
-
export class ChartData {
|
|
3032
|
-
constructor(table:dh.Table);
|
|
3033
|
-
|
|
3034
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3035
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3036
|
-
/**
|
|
3037
|
-
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3038
|
-
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3039
|
-
*/
|
|
3040
|
-
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3050
|
+
get type():SourceTypeType;
|
|
3041
3051
|
}
|
|
3042
3052
|
|
|
3043
3053
|
export class Figure implements dh.HasEventHandling {
|
|
@@ -3111,8 +3121,8 @@ export namespace dh.plot {
|
|
|
3111
3121
|
* @return Returns a cleanup function.
|
|
3112
3122
|
* @typeParam T - the type of the data that the event will provide
|
|
3113
3123
|
*/
|
|
3114
|
-
addEventListener<T>(name:string, callback:(e:
|
|
3115
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<
|
|
3124
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3125
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3116
3126
|
hasListeners(name:string):boolean;
|
|
3117
3127
|
/**
|
|
3118
3128
|
* Removes an event listener added to this table.
|
|
@@ -3121,7 +3131,7 @@ export namespace dh.plot {
|
|
|
3121
3131
|
* @return
|
|
3122
3132
|
* @typeParam T -
|
|
3123
3133
|
*/
|
|
3124
|
-
removeEventListener<T>(name:string, callback:(e:
|
|
3134
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3125
3135
|
}
|
|
3126
3136
|
|
|
3127
3137
|
/**
|
|
@@ -3158,37 +3168,55 @@ export namespace dh.plot {
|
|
|
3158
3168
|
constructor();
|
|
3159
3169
|
}
|
|
3160
3170
|
|
|
3171
|
+
export class FigureFetchError {
|
|
3172
|
+
error:object;
|
|
3173
|
+
errors:Array<string>;
|
|
3174
|
+
|
|
3175
|
+
protected constructor();
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3161
3178
|
/**
|
|
3162
|
-
*
|
|
3179
|
+
* Provide the details for a chart.
|
|
3163
3180
|
*/
|
|
3164
|
-
export class
|
|
3181
|
+
export class Chart implements dh.HasEventHandling {
|
|
3182
|
+
/**
|
|
3183
|
+
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
3184
|
+
*/
|
|
3185
|
+
static readonly EVENT_SERIES_ADDED:string;
|
|
3186
|
+
/**
|
|
3187
|
+
* The title of the chart.
|
|
3188
|
+
* @return String
|
|
3189
|
+
*/
|
|
3190
|
+
readonly title?:string|null;
|
|
3191
|
+
|
|
3165
3192
|
protected constructor();
|
|
3166
3193
|
|
|
3194
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3195
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3196
|
+
hasListeners(name:string):boolean;
|
|
3197
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3198
|
+
get column():number;
|
|
3199
|
+
get showLegend():boolean;
|
|
3167
3200
|
/**
|
|
3168
|
-
*
|
|
3169
|
-
*
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3201
|
+
* The axes used in this chart.
|
|
3202
|
+
* @return dh.plot.Axis
|
|
3203
|
+
*/
|
|
3204
|
+
get axes():Axis[];
|
|
3205
|
+
get is3d():boolean;
|
|
3206
|
+
get titleFont():string;
|
|
3207
|
+
get colspan():number;
|
|
3208
|
+
get titleColor():string;
|
|
3209
|
+
get series():Series[];
|
|
3210
|
+
get rowspan():number;
|
|
3211
|
+
/**
|
|
3212
|
+
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3213
|
+
* @return int
|
|
3176
3214
|
*/
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
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;
|
|
3215
|
+
get chartType():ChartTypeType;
|
|
3216
|
+
get row():number;
|
|
3217
|
+
get legendColor():string;
|
|
3218
|
+
get legendFont():string;
|
|
3219
|
+
get multiSeries():MultiSeries[];
|
|
3192
3220
|
}
|
|
3193
3221
|
|
|
3194
3222
|
export class AxisDescriptor {
|
|
@@ -3224,11 +3252,11 @@ export namespace dh.plot {
|
|
|
3224
3252
|
constructor();
|
|
3225
3253
|
}
|
|
3226
3254
|
|
|
3227
|
-
export class
|
|
3228
|
-
table:dh.Table;
|
|
3229
|
-
source:SeriesDataSource;
|
|
3230
|
-
|
|
3255
|
+
export class SeriesDataSourceException {
|
|
3231
3256
|
protected constructor();
|
|
3257
|
+
|
|
3258
|
+
get source():SeriesDataSource;
|
|
3259
|
+
get message():string;
|
|
3232
3260
|
}
|
|
3233
3261
|
|
|
3234
3262
|
export class SeriesDescriptor {
|
|
@@ -3250,6 +3278,75 @@ export namespace dh.plot {
|
|
|
3250
3278
|
constructor();
|
|
3251
3279
|
}
|
|
3252
3280
|
|
|
3281
|
+
export class FigureSourceException {
|
|
3282
|
+
table:dh.Table;
|
|
3283
|
+
source:SeriesDataSource;
|
|
3284
|
+
|
|
3285
|
+
protected constructor();
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
export class DownsampleOptions {
|
|
3289
|
+
/**
|
|
3290
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3291
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3292
|
+
* series.subscribe().
|
|
3293
|
+
*/
|
|
3294
|
+
static MAX_SERIES_SIZE:number;
|
|
3295
|
+
/**
|
|
3296
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3297
|
+
* downsampling disabled, the series will not load data.
|
|
3298
|
+
*/
|
|
3299
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3300
|
+
/**
|
|
3301
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3302
|
+
* axes are configured.
|
|
3303
|
+
*/
|
|
3304
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3305
|
+
/**
|
|
3306
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3307
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3308
|
+
*/
|
|
3309
|
+
static readonly DISABLE:DownsampleOptions;
|
|
3310
|
+
|
|
3311
|
+
protected constructor();
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
/**
|
|
3315
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3316
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3317
|
+
* keep that cached as well.
|
|
3318
|
+
*/
|
|
3319
|
+
export class ChartData {
|
|
3320
|
+
constructor(table:dh.Table);
|
|
3321
|
+
|
|
3322
|
+
update(tableData:unknown):void;
|
|
3323
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3324
|
+
/**
|
|
3325
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3326
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3327
|
+
*/
|
|
3328
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
/**
|
|
3332
|
+
* Helper class for plot downsampling methods.
|
|
3333
|
+
*/
|
|
3334
|
+
export class Downsample {
|
|
3335
|
+
protected constructor();
|
|
3336
|
+
|
|
3337
|
+
/**
|
|
3338
|
+
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3339
|
+
* the same visual fidelity as the original table, but with fewer rows.
|
|
3340
|
+
* @param table - The table to downsample.
|
|
3341
|
+
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3342
|
+
* @param yCols - The names of the Y columns to downsample.
|
|
3343
|
+
* @param width - The width of the visible area in pixels.
|
|
3344
|
+
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3345
|
+
* @return A promise that resolves to the downsampled table.
|
|
3346
|
+
*/
|
|
3347
|
+
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3253
3350
|
|
|
3254
3351
|
type SeriesPlotStyleType = number;
|
|
3255
3352
|
export class SeriesPlotStyle {
|
|
@@ -3267,46 +3364,6 @@ export namespace dh.plot {
|
|
|
3267
3364
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3268
3365
|
}
|
|
3269
3366
|
|
|
3270
|
-
type AxisFormatTypeType = number;
|
|
3271
|
-
export class AxisFormatType {
|
|
3272
|
-
static readonly CATEGORY:AxisFormatTypeType;
|
|
3273
|
-
static readonly NUMBER:AxisFormatTypeType;
|
|
3274
|
-
}
|
|
3275
|
-
|
|
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;
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
type AxisTypeType = number;
|
|
3286
|
-
export class AxisType {
|
|
3287
|
-
static readonly X:AxisTypeType;
|
|
3288
|
-
static readonly Y:AxisTypeType;
|
|
3289
|
-
static readonly SHAPE:AxisTypeType;
|
|
3290
|
-
static readonly SIZE:AxisTypeType;
|
|
3291
|
-
static readonly LABEL:AxisTypeType;
|
|
3292
|
-
static readonly COLOR:AxisTypeType;
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
/**
|
|
3296
|
-
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3297
|
-
* those series should be rendered.
|
|
3298
|
-
*/
|
|
3299
|
-
type ChartTypeType = number;
|
|
3300
|
-
export class ChartType {
|
|
3301
|
-
static readonly XY:ChartTypeType;
|
|
3302
|
-
static readonly PIE:ChartTypeType;
|
|
3303
|
-
static readonly OHLC:ChartTypeType;
|
|
3304
|
-
static readonly CATEGORY:ChartTypeType;
|
|
3305
|
-
static readonly XYZ:ChartTypeType;
|
|
3306
|
-
static readonly CATEGORY_3D:ChartTypeType;
|
|
3307
|
-
static readonly TREEMAP:ChartTypeType;
|
|
3308
|
-
}
|
|
3309
|
-
|
|
3310
3367
|
/**
|
|
3311
3368
|
* This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
|
|
3312
3369
|
* 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
|
|
@@ -3336,23 +3393,49 @@ export namespace dh.plot {
|
|
|
3336
3393
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3337
3394
|
}
|
|
3338
3395
|
|
|
3339
|
-
|
|
3396
|
+
type AxisFormatTypeType = number;
|
|
3397
|
+
export class AxisFormatType {
|
|
3398
|
+
static readonly CATEGORY:AxisFormatTypeType;
|
|
3399
|
+
static readonly NUMBER:AxisFormatTypeType;
|
|
3400
|
+
}
|
|
3340
3401
|
|
|
3341
|
-
|
|
3402
|
+
type AxisTypeType = number;
|
|
3403
|
+
export class AxisType {
|
|
3404
|
+
static readonly X:AxisTypeType;
|
|
3405
|
+
static readonly Y:AxisTypeType;
|
|
3406
|
+
static readonly SHAPE:AxisTypeType;
|
|
3407
|
+
static readonly SIZE:AxisTypeType;
|
|
3408
|
+
static readonly LABEL:AxisTypeType;
|
|
3409
|
+
static readonly COLOR:AxisTypeType;
|
|
3410
|
+
}
|
|
3342
3411
|
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3412
|
+
type AxisPositionType = number;
|
|
3413
|
+
export class AxisPosition {
|
|
3414
|
+
static readonly TOP:AxisPositionType;
|
|
3415
|
+
static readonly BOTTOM:AxisPositionType;
|
|
3416
|
+
static readonly LEFT:AxisPositionType;
|
|
3417
|
+
static readonly RIGHT:AxisPositionType;
|
|
3418
|
+
static readonly NONE:AxisPositionType;
|
|
3419
|
+
}
|
|
3346
3420
|
|
|
3347
|
-
|
|
3421
|
+
/**
|
|
3422
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3423
|
+
* those series should be rendered.
|
|
3424
|
+
*/
|
|
3425
|
+
type ChartTypeType = number;
|
|
3426
|
+
export class ChartType {
|
|
3427
|
+
static readonly XY:ChartTypeType;
|
|
3428
|
+
static readonly PIE:ChartTypeType;
|
|
3429
|
+
static readonly OHLC:ChartTypeType;
|
|
3430
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3431
|
+
static readonly XYZ:ChartTypeType;
|
|
3432
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3433
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3348
3434
|
}
|
|
3349
3435
|
|
|
3350
|
-
|
|
3351
|
-
label:string;
|
|
3352
|
-
documentation:MarkupContent;
|
|
3436
|
+
}
|
|
3353
3437
|
|
|
3354
|
-
|
|
3355
|
-
}
|
|
3438
|
+
export namespace dh.lsp {
|
|
3356
3439
|
|
|
3357
3440
|
export class TextDocumentContentChangeEvent {
|
|
3358
3441
|
range:Range;
|
|
@@ -3362,6 +3445,13 @@ export namespace dh.lsp {
|
|
|
3362
3445
|
constructor();
|
|
3363
3446
|
}
|
|
3364
3447
|
|
|
3448
|
+
export class MarkupContent {
|
|
3449
|
+
kind:string;
|
|
3450
|
+
value:string;
|
|
3451
|
+
|
|
3452
|
+
constructor();
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3365
3455
|
export class Hover {
|
|
3366
3456
|
contents:MarkupContent;
|
|
3367
3457
|
range:Range;
|
|
@@ -3369,20 +3459,28 @@ export namespace dh.lsp {
|
|
|
3369
3459
|
constructor();
|
|
3370
3460
|
}
|
|
3371
3461
|
|
|
3372
|
-
export class
|
|
3373
|
-
|
|
3374
|
-
|
|
3462
|
+
export class ParameterInformation {
|
|
3463
|
+
label:string;
|
|
3464
|
+
documentation:MarkupContent;
|
|
3375
3465
|
|
|
3376
3466
|
constructor();
|
|
3377
3467
|
}
|
|
3378
3468
|
|
|
3379
|
-
export class
|
|
3380
|
-
|
|
3381
|
-
|
|
3469
|
+
export class CompletionItem {
|
|
3470
|
+
label:string;
|
|
3471
|
+
kind:number;
|
|
3472
|
+
detail:string;
|
|
3473
|
+
documentation:MarkupContent;
|
|
3474
|
+
deprecated:boolean;
|
|
3475
|
+
preselect:boolean;
|
|
3476
|
+
textEdit:TextEdit;
|
|
3477
|
+
sortText:string;
|
|
3478
|
+
filterText:string;
|
|
3479
|
+
insertTextFormat:number;
|
|
3480
|
+
additionalTextEdits:Array<TextEdit>;
|
|
3481
|
+
commitCharacters:Array<string>;
|
|
3382
3482
|
|
|
3383
3483
|
constructor();
|
|
3384
|
-
|
|
3385
|
-
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3386
3484
|
}
|
|
3387
3485
|
|
|
3388
3486
|
export class Position {
|
|
@@ -3398,35 +3496,33 @@ export namespace dh.lsp {
|
|
|
3398
3496
|
copy():Position;
|
|
3399
3497
|
}
|
|
3400
3498
|
|
|
3401
|
-
export class
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
parameters:Array<ParameterInformation>;
|
|
3405
|
-
activeParameter:number;
|
|
3499
|
+
export class TextEdit {
|
|
3500
|
+
range:Range;
|
|
3501
|
+
text:string;
|
|
3406
3502
|
|
|
3407
3503
|
constructor();
|
|
3408
3504
|
}
|
|
3409
3505
|
|
|
3410
|
-
export class
|
|
3506
|
+
export class Range {
|
|
3507
|
+
start:Position;
|
|
3508
|
+
end:Position;
|
|
3509
|
+
|
|
3510
|
+
constructor();
|
|
3511
|
+
|
|
3512
|
+
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
export class SignatureInformation {
|
|
3411
3516
|
label:string;
|
|
3412
|
-
kind:number;
|
|
3413
|
-
detail:string;
|
|
3414
3517
|
documentation:MarkupContent;
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
textEdit:TextEdit;
|
|
3418
|
-
sortText:string;
|
|
3419
|
-
filterText:string;
|
|
3420
|
-
insertTextFormat:number;
|
|
3421
|
-
additionalTextEdits:Array<TextEdit>;
|
|
3422
|
-
commitCharacters:Array<string>;
|
|
3518
|
+
parameters:Array<ParameterInformation>;
|
|
3519
|
+
activeParameter:number;
|
|
3423
3520
|
|
|
3424
3521
|
constructor();
|
|
3425
3522
|
}
|
|
3426
3523
|
|
|
3427
3524
|
}
|
|
3428
3525
|
|
|
3429
|
-
|
|
3430
3526
|
export namespace dh.calendar {
|
|
3431
3527
|
|
|
3432
3528
|
export interface Holiday {
|
|
@@ -3441,10 +3537,6 @@ export namespace dh.calendar {
|
|
|
3441
3537
|
*/
|
|
3442
3538
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3443
3539
|
}
|
|
3444
|
-
export interface BusinessPeriod {
|
|
3445
|
-
get close():string;
|
|
3446
|
-
get open():string;
|
|
3447
|
-
}
|
|
3448
3540
|
/**
|
|
3449
3541
|
* Defines a calendar with business hours and holidays.
|
|
3450
3542
|
*/
|
|
@@ -3475,6 +3567,10 @@ export namespace dh.calendar {
|
|
|
3475
3567
|
*/
|
|
3476
3568
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3477
3569
|
}
|
|
3570
|
+
export interface BusinessPeriod {
|
|
3571
|
+
get close():string;
|
|
3572
|
+
get open():string;
|
|
3573
|
+
}
|
|
3478
3574
|
|
|
3479
3575
|
type DayOfWeekType = string;
|
|
3480
3576
|
export class DayOfWeek {
|
|
@@ -3490,3 +3586,4 @@ export namespace dh.calendar {
|
|
|
3490
3586
|
}
|
|
3491
3587
|
|
|
3492
3588
|
}
|
|
3589
|
+
|