@deephaven/jsapi-types 1.0.0-dev0.35.0 → 1.0.0-dev0.35.2
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 +1910 -1874
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -117,186 +117,6 @@ export namespace dh.storage {
|
|
|
117
117
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
|
-
/**
|
|
121
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
122
|
-
*/
|
|
123
|
-
export interface LocalTimeWrapper {
|
|
124
|
-
valueOf():string;
|
|
125
|
-
getHour():number;
|
|
126
|
-
getMinute():number;
|
|
127
|
-
getSecond():number;
|
|
128
|
-
getNano():number;
|
|
129
|
-
toString():string;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
133
|
-
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
134
|
-
* for easier scrolling without going to the server.
|
|
135
|
-
*/
|
|
136
|
-
export interface ViewportData extends TableData {
|
|
137
|
-
/**
|
|
138
|
-
* The index of the first returned row
|
|
139
|
-
* @return double
|
|
140
|
-
*/
|
|
141
|
-
get offset():number;
|
|
142
|
-
/**
|
|
143
|
-
* A list of columns describing the data types in each row
|
|
144
|
-
* @return {@link dh.Column} array.
|
|
145
|
-
*/
|
|
146
|
-
get columns():Array<Column>;
|
|
147
|
-
/**
|
|
148
|
-
* An array of rows of data
|
|
149
|
-
* @return {@link dh.ViewportRow} array.
|
|
150
|
-
*/
|
|
151
|
-
get rows():Array<ViewportRow>;
|
|
152
|
-
}
|
|
153
|
-
export interface LayoutHints {
|
|
154
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
155
|
-
|
|
156
|
-
get hiddenColumns():string[]|null;
|
|
157
|
-
get frozenColumns():string[]|null;
|
|
158
|
-
get columnGroups():ColumnGroup[]|null;
|
|
159
|
-
get areSavedLayoutsAllowed():boolean;
|
|
160
|
-
get frontColumns():string[]|null;
|
|
161
|
-
get backColumns():string[]|null;
|
|
162
|
-
}
|
|
163
|
-
export interface ColumnGroup {
|
|
164
|
-
get name():string|null;
|
|
165
|
-
get children():string[]|null;
|
|
166
|
-
get color():string|null;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Common interface for various ways of accessing table data and formatting.
|
|
170
|
-
*
|
|
171
|
-
* Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
|
|
172
|
-
* implement only abstract methods, and default methods present in this interface will dispatch accordingly.
|
|
173
|
-
*/
|
|
174
|
-
export interface TableData {
|
|
175
|
-
get(index:LongWrapper|number):Row;
|
|
176
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
177
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
178
|
-
get columns():Array<Column>;
|
|
179
|
-
get rows():Array<Row>;
|
|
180
|
-
}
|
|
181
|
-
export interface Row {
|
|
182
|
-
get(column:Column):any;
|
|
183
|
-
getFormat(column:Column):Format;
|
|
184
|
-
get index():LongWrapper;
|
|
185
|
-
}
|
|
186
|
-
export interface TreeViewportData extends TableData {
|
|
187
|
-
get offset():number;
|
|
188
|
-
get columns():Array<Column>;
|
|
189
|
-
get rows():Array<TreeRow>;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
193
|
-
* {@link dh.TotalsTable}.
|
|
194
|
-
*/
|
|
195
|
-
export interface JoinableTable {
|
|
196
|
-
freeze():Promise<Table>;
|
|
197
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
198
|
-
/**
|
|
199
|
-
* Joins this table to the provided table, using one of the specified join types:
|
|
200
|
-
* <ul>
|
|
201
|
-
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
202
|
-
* provided matching rule.</li>
|
|
203
|
-
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
204
|
-
* tables.</li>
|
|
205
|
-
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
206
|
-
* with errors if there is not exactly one.</li>
|
|
207
|
-
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
208
|
-
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
209
|
-
* </ul>
|
|
210
|
-
*
|
|
211
|
-
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
212
|
-
* <p>
|
|
213
|
-
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
214
|
-
* more guidance on picking a join operation.
|
|
215
|
-
* @deprecated Instead, call the specific method for the join type.
|
|
216
|
-
* @param joinType - The type of join to perform, see the list above.
|
|
217
|
-
* @param rightTable - The table to match to values in this table
|
|
218
|
-
* @param columnsToMatch - Columns that should match
|
|
219
|
-
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
220
|
-
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
221
|
-
* @return a promise that will resolve to the joined table
|
|
222
|
-
*/
|
|
223
|
-
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
224
|
-
/**
|
|
225
|
-
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
226
|
-
* row from the right table.
|
|
227
|
-
* <p>
|
|
228
|
-
* The `asOfMatchRule` value can be one of:
|
|
229
|
-
* <ul>
|
|
230
|
-
* <li>LESS_THAN_EQUAL</li>
|
|
231
|
-
* <li>LESS_THAN</li>
|
|
232
|
-
* <li>GREATER_THAN_EQUAL</li>
|
|
233
|
-
* <li>GREATER_THAN</li>
|
|
234
|
-
* </ul>
|
|
235
|
-
* @param rightTable - the table to match to values in this table
|
|
236
|
-
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
237
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
238
|
-
* columns
|
|
239
|
-
* @param asOfMatchRule - the match rule to use, see above
|
|
240
|
-
* @return a promise that will resolve to the joined table
|
|
241
|
-
*/
|
|
242
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
243
|
-
/**
|
|
244
|
-
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
245
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
246
|
-
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
247
|
-
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
248
|
-
* @param rightTable - the table to match to values in this table
|
|
249
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
250
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
251
|
-
* columns
|
|
252
|
-
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
253
|
-
* server select a value
|
|
254
|
-
* @return a promise that will resolve to the joined table
|
|
255
|
-
*/
|
|
256
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
257
|
-
/**
|
|
258
|
-
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
259
|
-
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
260
|
-
* table being added to the output.
|
|
261
|
-
* @param rightTable - the table to match to values in this table
|
|
262
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
263
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
264
|
-
* columns
|
|
265
|
-
* @return a promise that will resolve to the joined table
|
|
266
|
-
*/
|
|
267
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
268
|
-
/**
|
|
269
|
-
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
270
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
271
|
-
* right table being added to the output.
|
|
272
|
-
* @param rightTable - the table to match to values in this table
|
|
273
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
274
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
275
|
-
* columns
|
|
276
|
-
* @return a promise that will resolve to the joined table
|
|
277
|
-
*/
|
|
278
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
279
|
-
}
|
|
280
|
-
export interface HasEventHandling {
|
|
281
|
-
/**
|
|
282
|
-
* Listen for events on this object.
|
|
283
|
-
* @param name - the name of the event to listen for
|
|
284
|
-
* @param callback - a function to call when the event occurs
|
|
285
|
-
* @return Returns a cleanup function.
|
|
286
|
-
* @typeParam T - the type of the data that the event will provide
|
|
287
|
-
*/
|
|
288
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
289
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
290
|
-
hasListeners(name:string):boolean;
|
|
291
|
-
/**
|
|
292
|
-
* Removes an event listener added to this table.
|
|
293
|
-
* @param name -
|
|
294
|
-
* @param callback -
|
|
295
|
-
* @return
|
|
296
|
-
* @typeParam T -
|
|
297
|
-
*/
|
|
298
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
299
|
-
}
|
|
300
120
|
/**
|
|
301
121
|
* Row implementation that also provides additional read-only properties. represents visible rows in the table,
|
|
302
122
|
* but with additional properties to reflect the tree structure.
|
|
@@ -322,41 +142,69 @@ export namespace dh {
|
|
|
322
142
|
get hasChildren():boolean;
|
|
323
143
|
get index():LongWrapper;
|
|
324
144
|
}
|
|
325
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
147
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
148
|
+
*
|
|
149
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
150
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
151
|
+
* backwards compatibility and to better follow JS expectations.
|
|
152
|
+
*/
|
|
153
|
+
export interface WidgetMessageDetails {
|
|
326
154
|
/**
|
|
327
|
-
*
|
|
155
|
+
* Returns the data from this message as a base64-encoded string.
|
|
328
156
|
*/
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
157
|
+
getDataAsBase64():string;
|
|
158
|
+
/**
|
|
159
|
+
* Returns the data from this message as a Uint8Array.
|
|
160
|
+
*/
|
|
161
|
+
getDataAsU8():Uint8Array;
|
|
162
|
+
/**
|
|
163
|
+
* Returns the data from this message as a utf-8 string.
|
|
164
|
+
*/
|
|
165
|
+
getDataAsString():string;
|
|
166
|
+
/**
|
|
167
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
168
|
+
* objects, and should close them when no longer needed.
|
|
169
|
+
*/
|
|
170
|
+
get exportedObjects():WidgetExportedObject[];
|
|
171
|
+
}
|
|
172
|
+
export interface Row {
|
|
173
|
+
get(column:Column):any;
|
|
174
|
+
getFormat(column:Column):Format;
|
|
175
|
+
get index():LongWrapper;
|
|
176
|
+
}
|
|
177
|
+
export interface LayoutHints {
|
|
178
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
179
|
+
|
|
180
|
+
get hiddenColumns():string[]|null;
|
|
181
|
+
get frozenColumns():string[]|null;
|
|
182
|
+
get columnGroups():ColumnGroup[]|null;
|
|
183
|
+
get areSavedLayoutsAllowed():boolean;
|
|
184
|
+
get frontColumns():string[]|null;
|
|
185
|
+
get backColumns():string[]|null;
|
|
332
186
|
}
|
|
333
187
|
/**
|
|
334
|
-
*
|
|
335
|
-
*
|
|
188
|
+
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
189
|
+
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
190
|
+
* for easier scrolling without going to the server.
|
|
336
191
|
*/
|
|
337
|
-
export interface
|
|
192
|
+
export interface ViewportData extends TableData {
|
|
338
193
|
/**
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
342
|
-
* @param name - the display name of the statistic
|
|
343
|
-
* @return String
|
|
194
|
+
* The index of the first returned row
|
|
195
|
+
* @return double
|
|
344
196
|
*/
|
|
345
|
-
|
|
197
|
+
get offset():number;
|
|
346
198
|
/**
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
* than 19 unique values.
|
|
350
|
-
* @return Map of String double
|
|
199
|
+
* A list of columns describing the data types in each row
|
|
200
|
+
* @return {@link dh.Column} array.
|
|
351
201
|
*/
|
|
352
|
-
get
|
|
202
|
+
get columns():Array<Column>;
|
|
353
203
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
* A map of each statistic's name to its value.
|
|
357
|
-
* @return Map of String and Object
|
|
204
|
+
* An array of rows of data
|
|
205
|
+
* @return {@link dh.ViewportRow} array.
|
|
358
206
|
*/
|
|
359
|
-
get
|
|
207
|
+
get rows():Array<ViewportRow>;
|
|
360
208
|
}
|
|
361
209
|
/**
|
|
362
210
|
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
@@ -488,72 +336,153 @@ export namespace dh {
|
|
|
488
336
|
get isRefreshing():boolean;
|
|
489
337
|
}
|
|
490
338
|
/**
|
|
491
|
-
*
|
|
492
|
-
* in columns) either by index, or scanning the complete present index.
|
|
339
|
+
* Common interface for various ways of accessing table data and formatting.
|
|
493
340
|
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
|
|
497
|
-
|
|
341
|
+
* Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
|
|
342
|
+
* implement only abstract methods, and default methods present in this interface will dispatch accordingly.
|
|
343
|
+
*/
|
|
344
|
+
export interface TableData {
|
|
345
|
+
get(index:LongWrapper|number):Row;
|
|
346
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
347
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
348
|
+
get columns():Array<Column>;
|
|
349
|
+
get rows():Array<Row>;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
|
|
353
|
+
* real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
|
|
354
|
+
* <p>
|
|
355
|
+
* As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
|
|
356
|
+
* server. The setViewport method can be used to adjust this table instead of creating a new one.
|
|
357
|
+
* <p>
|
|
358
|
+
* Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
|
|
359
|
+
* to the underlying handle and accumulated data.
|
|
360
|
+
* <p>
|
|
361
|
+
* As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
|
|
362
|
+
* the idea then that the caller did not actually use this type. This means that for every exported method (which then
|
|
363
|
+
* will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
|
|
364
|
+
* version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
|
|
365
|
+
* deems it no longer in use.
|
|
366
|
+
* <p>
|
|
367
|
+
* Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
|
|
368
|
+
* true), providing a way to stop the server from streaming updates to the client.
|
|
498
369
|
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
370
|
+
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
371
|
+
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
372
|
+
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
373
|
+
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
374
|
+
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
503
375
|
*/
|
|
504
|
-
export interface
|
|
505
|
-
get fullIndex():RangeSet;
|
|
376
|
+
export interface TableViewportSubscription extends HasEventHandling {
|
|
506
377
|
/**
|
|
507
|
-
*
|
|
508
|
-
* @
|
|
378
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
379
|
+
* @param firstRow -
|
|
380
|
+
* @param lastRow -
|
|
381
|
+
* @param columns -
|
|
382
|
+
* @param updateIntervalMs -
|
|
509
383
|
*/
|
|
510
|
-
|
|
384
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
|
|
511
385
|
/**
|
|
512
|
-
*
|
|
513
|
-
* @return dh.RangeSet
|
|
386
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
514
387
|
*/
|
|
515
|
-
|
|
516
|
-
get columns():Array<Column>;
|
|
388
|
+
close():void;
|
|
517
389
|
/**
|
|
518
|
-
*
|
|
519
|
-
* @return dh.
|
|
390
|
+
* Gets the data currently visible in this viewport
|
|
391
|
+
* @return Promise of {@link dh.TableData}.
|
|
520
392
|
*/
|
|
521
|
-
|
|
522
|
-
|
|
393
|
+
getViewportData():Promise<TableData>;
|
|
394
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
523
395
|
}
|
|
524
396
|
/**
|
|
525
|
-
*
|
|
526
|
-
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
527
|
-
*
|
|
528
|
-
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
529
|
-
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
530
|
-
* backwards compatibility and to better follow JS expectations.
|
|
397
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
531
398
|
*/
|
|
532
|
-
export interface
|
|
399
|
+
export interface Format {
|
|
533
400
|
/**
|
|
534
|
-
*
|
|
401
|
+
* The format string to apply to the value of this cell.
|
|
402
|
+
* @return String
|
|
535
403
|
*/
|
|
536
|
-
|
|
404
|
+
readonly formatString?:string|null;
|
|
537
405
|
/**
|
|
538
|
-
*
|
|
406
|
+
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
407
|
+
* @return String
|
|
539
408
|
*/
|
|
540
|
-
|
|
409
|
+
readonly backgroundColor?:string|null;
|
|
541
410
|
/**
|
|
542
|
-
*
|
|
411
|
+
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
412
|
+
* @return String
|
|
543
413
|
*/
|
|
544
|
-
|
|
414
|
+
readonly color?:string|null;
|
|
545
415
|
/**
|
|
546
|
-
*
|
|
547
|
-
*
|
|
416
|
+
*
|
|
417
|
+
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
548
418
|
*/
|
|
549
|
-
|
|
419
|
+
readonly numberFormat?:string|null;
|
|
550
420
|
}
|
|
551
421
|
/**
|
|
552
|
-
*
|
|
553
|
-
* the viewport again.
|
|
422
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
554
423
|
*/
|
|
555
|
-
export interface
|
|
556
|
-
|
|
424
|
+
export interface LocalTimeWrapper {
|
|
425
|
+
valueOf():string;
|
|
426
|
+
getHour():number;
|
|
427
|
+
getMinute():number;
|
|
428
|
+
getSecond():number;
|
|
429
|
+
getNano():number;
|
|
430
|
+
toString():string;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
|
|
434
|
+
* table column.
|
|
435
|
+
*/
|
|
436
|
+
export interface ColumnStatistics {
|
|
437
|
+
/**
|
|
438
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
439
|
+
* <p>
|
|
440
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
441
|
+
* @param name - the display name of the statistic
|
|
442
|
+
* @return String
|
|
443
|
+
*/
|
|
444
|
+
getType(name:string):string;
|
|
445
|
+
/**
|
|
446
|
+
* 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
|
|
447
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
448
|
+
* than 19 unique values.
|
|
449
|
+
* @return Map of String double
|
|
450
|
+
*/
|
|
451
|
+
get uniqueValues():Map<string, number>;
|
|
452
|
+
/**
|
|
453
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
454
|
+
* <p>
|
|
455
|
+
* A map of each statistic's name to its value.
|
|
456
|
+
* @return Map of String and Object
|
|
457
|
+
*/
|
|
458
|
+
get statisticsMap():Map<string, object>;
|
|
459
|
+
}
|
|
460
|
+
export interface ColumnGroup {
|
|
461
|
+
get name():string|null;
|
|
462
|
+
get children():string[]|null;
|
|
463
|
+
get color():string|null;
|
|
464
|
+
}
|
|
465
|
+
export interface WorkerHeapInfo {
|
|
466
|
+
/**
|
|
467
|
+
* Total heap size available for this worker.
|
|
468
|
+
*/
|
|
469
|
+
get totalHeapSize():number;
|
|
470
|
+
get freeMemory():number;
|
|
471
|
+
get maximumHeapSize():number;
|
|
472
|
+
}
|
|
473
|
+
export interface RefreshToken {
|
|
474
|
+
get bytes():string;
|
|
475
|
+
get expiry():number;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
479
|
+
*/
|
|
480
|
+
export interface LocalDateWrapper {
|
|
481
|
+
valueOf():string;
|
|
482
|
+
getYear():number;
|
|
483
|
+
getMonthValue():number;
|
|
484
|
+
getDayOfMonth():number;
|
|
485
|
+
toString():string;
|
|
557
486
|
}
|
|
558
487
|
/**
|
|
559
488
|
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
@@ -587,1066 +516,978 @@ export namespace dh {
|
|
|
587
516
|
*/
|
|
588
517
|
close():void;
|
|
589
518
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
valueOf():string;
|
|
595
|
-
getYear():number;
|
|
596
|
-
getMonthValue():number;
|
|
597
|
-
getDayOfMonth():number;
|
|
598
|
-
toString():string;
|
|
599
|
-
}
|
|
600
|
-
export interface RefreshToken {
|
|
601
|
-
get bytes():string;
|
|
602
|
-
get expiry():number;
|
|
519
|
+
export interface TreeViewportData extends TableData {
|
|
520
|
+
get offset():number;
|
|
521
|
+
get columns():Array<Column>;
|
|
522
|
+
get rows():Array<TreeRow>;
|
|
603
523
|
}
|
|
604
524
|
/**
|
|
605
|
-
*
|
|
525
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
|
|
526
|
+
* in columns) either by index, or scanning the complete present index.
|
|
527
|
+
*
|
|
528
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading
|
|
529
|
+
* all data currently in the table. While it is more expensive to always iterate over every single row in the table,
|
|
530
|
+
* it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
|
|
531
|
+
* both options should be considered.
|
|
532
|
+
*
|
|
533
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
534
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
535
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
|
|
536
|
+
* read specific rows or cells out of the table.
|
|
606
537
|
*/
|
|
607
|
-
export interface
|
|
538
|
+
export interface SubscriptionTableData extends TableData {
|
|
539
|
+
get fullIndex():RangeSet;
|
|
608
540
|
/**
|
|
609
|
-
* The
|
|
610
|
-
* @return
|
|
541
|
+
* The ordered set of row indexes removed since the last update
|
|
542
|
+
* @return dh.RangeSet
|
|
611
543
|
*/
|
|
612
|
-
|
|
544
|
+
get removed():RangeSet;
|
|
613
545
|
/**
|
|
614
|
-
*
|
|
615
|
-
* @return
|
|
546
|
+
* The ordered set of row indexes added since the last update
|
|
547
|
+
* @return dh.RangeSet
|
|
616
548
|
*/
|
|
617
|
-
|
|
549
|
+
get added():RangeSet;
|
|
550
|
+
get columns():Array<Column>;
|
|
618
551
|
/**
|
|
619
|
-
*
|
|
620
|
-
* @return
|
|
552
|
+
* The ordered set of row indexes updated since the last update
|
|
553
|
+
* @return dh.RangeSet
|
|
621
554
|
*/
|
|
622
|
-
|
|
555
|
+
get modified():RangeSet;
|
|
556
|
+
get rows():Array<Row>;
|
|
557
|
+
}
|
|
558
|
+
export interface HasEventHandling {
|
|
623
559
|
/**
|
|
624
|
-
*
|
|
625
|
-
* @
|
|
560
|
+
* Listen for events on this object.
|
|
561
|
+
* @param name - the name of the event to listen for
|
|
562
|
+
* @param callback - a function to call when the event occurs
|
|
563
|
+
* @return Returns a cleanup function.
|
|
564
|
+
* @typeParam T - the type of the data that the event will provide
|
|
626
565
|
*/
|
|
627
|
-
|
|
566
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
567
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
568
|
+
hasListeners(name:string):boolean;
|
|
569
|
+
/**
|
|
570
|
+
* Removes an event listener added to this table.
|
|
571
|
+
* @param name -
|
|
572
|
+
* @param callback -
|
|
573
|
+
* @return
|
|
574
|
+
* @typeParam T -
|
|
575
|
+
*/
|
|
576
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
628
577
|
}
|
|
629
578
|
/**
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
* <p>
|
|
633
|
-
* As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
|
|
634
|
-
* server. The setViewport method can be used to adjust this table instead of creating a new one.
|
|
635
|
-
* <p>
|
|
636
|
-
* Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
|
|
637
|
-
* to the underlying handle and accumulated data.
|
|
638
|
-
* <p>
|
|
639
|
-
* As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
|
|
640
|
-
* the idea then that the caller did not actually use this type. This means that for every exported method (which then
|
|
641
|
-
* will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
|
|
642
|
-
* version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
|
|
643
|
-
* deems it no longer in use.
|
|
644
|
-
* <p>
|
|
645
|
-
* Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
|
|
646
|
-
* true), providing a way to stop the server from streaming updates to the client.
|
|
647
|
-
*
|
|
648
|
-
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
649
|
-
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
650
|
-
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
651
|
-
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
652
|
-
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
579
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
|
|
580
|
+
* the viewport again.
|
|
653
581
|
*/
|
|
654
|
-
export interface
|
|
582
|
+
export interface ViewportRow extends Row {
|
|
583
|
+
get index():LongWrapper;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
587
|
+
* {@link dh.TotalsTable}.
|
|
588
|
+
*/
|
|
589
|
+
export interface JoinableTable {
|
|
590
|
+
freeze():Promise<Table>;
|
|
591
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
655
592
|
/**
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
*
|
|
593
|
+
* Joins this table to the provided table, using one of the specified join types:
|
|
594
|
+
* <ul>
|
|
595
|
+
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
596
|
+
* provided matching rule.</li>
|
|
597
|
+
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
598
|
+
* tables.</li>
|
|
599
|
+
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
600
|
+
* with errors if there is not exactly one.</li>
|
|
601
|
+
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
602
|
+
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
603
|
+
* </ul>
|
|
604
|
+
*
|
|
605
|
+
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
606
|
+
* <p>
|
|
607
|
+
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
608
|
+
* more guidance on picking a join operation.
|
|
609
|
+
* @deprecated Instead, call the specific method for the join type.
|
|
610
|
+
* @param joinType - The type of join to perform, see the list above.
|
|
611
|
+
* @param rightTable - The table to match to values in this table
|
|
612
|
+
* @param columnsToMatch - Columns that should match
|
|
613
|
+
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
614
|
+
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
615
|
+
* @return a promise that will resolve to the joined table
|
|
661
616
|
*/
|
|
662
|
-
|
|
617
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
663
618
|
/**
|
|
664
|
-
*
|
|
619
|
+
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
620
|
+
* row from the right table.
|
|
621
|
+
* <p>
|
|
622
|
+
* The `asOfMatchRule` value can be one of:
|
|
623
|
+
* <ul>
|
|
624
|
+
* <li>LESS_THAN_EQUAL</li>
|
|
625
|
+
* <li>LESS_THAN</li>
|
|
626
|
+
* <li>GREATER_THAN_EQUAL</li>
|
|
627
|
+
* <li>GREATER_THAN</li>
|
|
628
|
+
* </ul>
|
|
629
|
+
* @param rightTable - the table to match to values in this table
|
|
630
|
+
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
631
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
632
|
+
* columns
|
|
633
|
+
* @param asOfMatchRule - the match rule to use, see above
|
|
634
|
+
* @return a promise that will resolve to the joined table
|
|
665
635
|
*/
|
|
666
|
-
|
|
636
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
667
637
|
/**
|
|
668
|
-
*
|
|
669
|
-
*
|
|
638
|
+
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
639
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
640
|
+
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
641
|
+
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
642
|
+
* @param rightTable - the table to match to values in this table
|
|
643
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
644
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
645
|
+
* columns
|
|
646
|
+
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
647
|
+
* server select a value
|
|
648
|
+
* @return a promise that will resolve to the joined table
|
|
670
649
|
*/
|
|
671
|
-
|
|
672
|
-
|
|
650
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
651
|
+
/**
|
|
652
|
+
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
653
|
+
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
654
|
+
* table being added to the output.
|
|
655
|
+
* @param rightTable - the table to match to values in this table
|
|
656
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
657
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
658
|
+
* columns
|
|
659
|
+
* @return a promise that will resolve to the joined table
|
|
660
|
+
*/
|
|
661
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
662
|
+
/**
|
|
663
|
+
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
664
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
665
|
+
* right table being added to the output.
|
|
666
|
+
* @param rightTable - the table to match to values in this table
|
|
667
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
668
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
669
|
+
* columns
|
|
670
|
+
* @return a promise that will resolve to the joined table
|
|
671
|
+
*/
|
|
672
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
/**
|
|
676
|
-
*
|
|
677
|
-
* this type TableMap.
|
|
678
|
-
* @deprecated
|
|
676
|
+
* Event fired when a command is issued from the client.
|
|
679
677
|
*/
|
|
680
|
-
export class
|
|
681
|
-
|
|
682
|
-
static readonly EVENT_DISCONNECT:string;
|
|
683
|
-
static readonly EVENT_RECONNECT:string;
|
|
684
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
678
|
+
export class CommandInfo {
|
|
679
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
685
680
|
|
|
686
|
-
|
|
681
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
682
|
+
get code():string;
|
|
687
683
|
}
|
|
688
684
|
|
|
689
|
-
|
|
690
|
-
|
|
685
|
+
/**
|
|
686
|
+
* Deprecated for use in Deephaven Core.
|
|
687
|
+
* @deprecated
|
|
688
|
+
*/
|
|
689
|
+
export class Client {
|
|
691
690
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
691
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
692
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
692
693
|
|
|
693
|
-
|
|
694
|
+
constructor();
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export class Ide {
|
|
698
|
+
constructor();
|
|
694
699
|
|
|
695
700
|
/**
|
|
696
|
-
*
|
|
697
|
-
* @param name -
|
|
698
|
-
* @param applyPreviewColumns - optional boolean
|
|
699
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
700
|
-
*/
|
|
701
|
-
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
702
|
-
/**
|
|
703
|
-
* Load the named Figure, including its tables and tablemaps as needed.
|
|
704
|
-
* @param name -
|
|
705
|
-
* @return promise of dh.plot.Figure
|
|
701
|
+
* @deprecated
|
|
706
702
|
*/
|
|
707
|
-
|
|
703
|
+
getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
708
704
|
/**
|
|
709
|
-
*
|
|
710
|
-
* size is presently not available until the viewport is first set.
|
|
711
|
-
* @param name -
|
|
712
|
-
* @return {@link Promise} of {@link dh.TreeTable}
|
|
705
|
+
* @deprecated
|
|
713
706
|
*/
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
707
|
+
static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export class CustomColumn {
|
|
711
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
712
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
713
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
714
|
+
static readonly TYPE_NEW:string;
|
|
715
|
+
|
|
716
|
+
protected constructor();
|
|
717
|
+
|
|
718
|
+
valueOf():string;
|
|
719
|
+
toString():string;
|
|
719
720
|
/**
|
|
720
|
-
*
|
|
721
|
-
* @
|
|
722
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
721
|
+
* The expression to evaluate this custom column.
|
|
722
|
+
* @return String
|
|
723
723
|
*/
|
|
724
|
-
|
|
725
|
-
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
726
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
727
|
-
close():void;
|
|
728
|
-
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
729
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
730
|
-
openDocument(params:object):void;
|
|
731
|
-
changeDocument(params:object):void;
|
|
732
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
733
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
734
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
735
|
-
closeDocument(params:object):void;
|
|
724
|
+
get expression():string;
|
|
736
725
|
/**
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
* @param size -
|
|
740
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
726
|
+
* The name of the column to use.
|
|
727
|
+
* @return String
|
|
741
728
|
*/
|
|
742
|
-
|
|
729
|
+
get name():string;
|
|
743
730
|
/**
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
731
|
+
* Type of custom column. One of
|
|
732
|
+
*
|
|
733
|
+
* <ul>
|
|
734
|
+
* <li>FORMAT_COLOR</li>
|
|
735
|
+
* <li>FORMAT_NUMBER</li>
|
|
736
|
+
* <li>FORMAT_DATE</li>
|
|
737
|
+
* <li>NEW</li>
|
|
738
|
+
* </ul>
|
|
739
|
+
* @return String
|
|
749
740
|
*/
|
|
750
|
-
|
|
751
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
752
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
753
|
-
hasListeners(name:string):boolean;
|
|
754
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
741
|
+
get type():string;
|
|
755
742
|
}
|
|
756
743
|
|
|
757
744
|
/**
|
|
758
|
-
* Represents a
|
|
759
|
-
*
|
|
745
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
746
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
747
|
+
*
|
|
748
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
749
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
750
|
+
* forward data to it.
|
|
751
|
+
*
|
|
752
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
753
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
754
|
+
* viewports to make it less expensive to compute for large tables.
|
|
760
755
|
*/
|
|
761
|
-
export class
|
|
762
|
-
/**
|
|
763
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
764
|
-
*/
|
|
765
|
-
static readonly EVENT_KEYADDED:string;
|
|
766
|
-
/**
|
|
767
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
768
|
-
*/
|
|
769
|
-
static readonly EVENT_DISCONNECT:string;
|
|
770
|
-
/**
|
|
771
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
772
|
-
*/
|
|
773
|
-
static readonly EVENT_RECONNECT:string;
|
|
756
|
+
export class TableSubscription implements HasEventHandling {
|
|
774
757
|
/**
|
|
775
|
-
* Indicates that
|
|
758
|
+
* Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
|
|
759
|
+
* <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
|
|
760
|
+
* allowing access to the entire range of items currently in the subscribed columns.
|
|
776
761
|
*/
|
|
777
|
-
static readonly
|
|
762
|
+
static readonly EVENT_UPDATED:string;
|
|
778
763
|
|
|
779
764
|
protected constructor();
|
|
780
765
|
|
|
781
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
782
766
|
/**
|
|
783
|
-
*
|
|
784
|
-
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
785
|
-
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
786
|
-
*/
|
|
787
|
-
getTable(key:object):Promise<Table|undefined|null>;
|
|
788
|
-
/**
|
|
789
|
-
* Open a new table that is the result of merging all constituent tables. See
|
|
790
|
-
* {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
|
|
791
|
-
* @return A merged representation of the constituent tables.
|
|
792
|
-
*/
|
|
793
|
-
getMergedTable():Promise<Table>;
|
|
794
|
-
/**
|
|
795
|
-
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
796
|
-
* for <b>keyadded</b> will ensure no keys are missed.
|
|
797
|
-
* @return Set of Object
|
|
798
|
-
*/
|
|
799
|
-
getKeys():Set<object>;
|
|
800
|
-
/**
|
|
801
|
-
* Fetch a table containing all the valid keys of the partitioned table.
|
|
802
|
-
* @return Promise of a Table
|
|
803
|
-
*/
|
|
804
|
-
getKeyTable():Promise<Table>;
|
|
805
|
-
/**
|
|
806
|
-
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
807
|
-
* will not affect tables in use.
|
|
767
|
+
* Stops the subscription on the server.
|
|
808
768
|
*/
|
|
809
769
|
close():void;
|
|
810
|
-
/**
|
|
811
|
-
* The count of known keys.
|
|
812
|
-
* @return int
|
|
813
|
-
*/
|
|
814
|
-
get size():number;
|
|
815
|
-
/**
|
|
816
|
-
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
817
|
-
* non-key columns.
|
|
818
|
-
* @return Array of Column
|
|
819
|
-
*/
|
|
820
|
-
get columns():Column[];
|
|
821
|
-
/**
|
|
822
|
-
* An array of all the key columns that the tables are partitioned by.
|
|
823
|
-
* @return Array of Column
|
|
824
|
-
*/
|
|
825
|
-
get keyColumns():Column[];
|
|
826
|
-
/**
|
|
827
|
-
* Listen for events on this object.
|
|
828
|
-
* @param name - the name of the event to listen for
|
|
829
|
-
* @param callback - a function to call when the event occurs
|
|
830
|
-
* @return Returns a cleanup function.
|
|
831
|
-
* @typeParam T - the type of the data that the event will provide
|
|
832
|
-
*/
|
|
833
770
|
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
834
771
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
835
772
|
hasListeners(name:string):boolean;
|
|
836
|
-
/**
|
|
837
|
-
* Removes an event listener added to this table.
|
|
838
|
-
* @param name -
|
|
839
|
-
* @param callback -
|
|
840
|
-
* @return
|
|
841
|
-
* @typeParam T -
|
|
842
|
-
*/
|
|
843
773
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
export class Ide {
|
|
847
|
-
constructor();
|
|
848
|
-
|
|
849
774
|
/**
|
|
850
|
-
*
|
|
851
|
-
|
|
852
|
-
getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
853
|
-
/**
|
|
854
|
-
* @deprecated
|
|
775
|
+
* The columns that were subscribed to when this subscription was created
|
|
776
|
+
* @return {@link dh.Column}
|
|
855
777
|
*/
|
|
856
|
-
|
|
778
|
+
get columns():Array<Column>;
|
|
857
779
|
}
|
|
858
780
|
|
|
859
781
|
/**
|
|
860
|
-
* A
|
|
861
|
-
* interpret these responses to see what to render, or how to respond.
|
|
862
|
-
* <p>
|
|
863
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
864
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
865
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
866
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
867
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
868
|
-
* <p>
|
|
869
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
870
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
871
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
872
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
873
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
874
|
-
* <p>
|
|
875
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
876
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
877
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
878
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
879
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
880
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
881
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
882
|
-
* <p>
|
|
883
|
-
* This can suggest several patterns for how plugins operate:
|
|
884
|
-
* <ul>
|
|
885
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
886
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
887
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
888
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
889
|
-
* provided to the JS API consumer.</li>
|
|
890
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
891
|
-
* which provided them. One concrete example of this could have been
|
|
892
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
893
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
894
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
895
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
896
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
897
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
898
|
-
* an internal table instance.</li>
|
|
899
|
-
* </ul>
|
|
782
|
+
* A js type for operating on input tables.
|
|
900
783
|
*
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
*
|
|
904
|
-
*
|
|
905
|
-
*
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
* </ul>
|
|
784
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
785
|
+
*
|
|
786
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
787
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
788
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
789
|
+
* before sending the next operation.
|
|
790
|
+
*
|
|
791
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
792
|
+
*
|
|
793
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
794
|
+
* object.
|
|
913
795
|
*/
|
|
914
|
-
export class
|
|
915
|
-
static readonly EVENT_MESSAGE:string;
|
|
916
|
-
static readonly EVENT_CLOSE:string;
|
|
917
|
-
|
|
796
|
+
export class InputTable {
|
|
918
797
|
protected constructor();
|
|
919
798
|
|
|
920
799
|
/**
|
|
921
|
-
*
|
|
800
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
801
|
+
* property at that name and validate it can be put into the given column type.
|
|
802
|
+
* @param row -
|
|
803
|
+
* @param userTimeZone -
|
|
804
|
+
* @return Promise of dh.InputTable
|
|
805
|
+
*/
|
|
806
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
807
|
+
/**
|
|
808
|
+
* Add multiple rows to a table.
|
|
809
|
+
* @param rows -
|
|
810
|
+
* @param userTimeZone -
|
|
811
|
+
* @return Promise of dh.InputTable
|
|
812
|
+
*/
|
|
813
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
814
|
+
/**
|
|
815
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
816
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
817
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
818
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
819
|
+
* @param tableToAdd -
|
|
820
|
+
* @return Promise of dh.InputTable
|
|
821
|
+
*/
|
|
822
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
823
|
+
/**
|
|
824
|
+
* Add multiple tables to this Input Table.
|
|
825
|
+
* @param tablesToAdd -
|
|
826
|
+
* @return Promise of dh.InputTable
|
|
827
|
+
*/
|
|
828
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
829
|
+
/**
|
|
830
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
831
|
+
* @param tableToDelete -
|
|
832
|
+
* @return Promise of dh.InputTable
|
|
833
|
+
*/
|
|
834
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
835
|
+
/**
|
|
836
|
+
* Delete multiple tables from this Input Table.
|
|
837
|
+
* @param tablesToDelete -
|
|
838
|
+
* @return
|
|
839
|
+
*/
|
|
840
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
841
|
+
/**
|
|
842
|
+
* A list of the key columns, by name
|
|
843
|
+
* @return String array.
|
|
922
844
|
*/
|
|
923
|
-
|
|
924
|
-
getDataAsBase64():string;
|
|
925
|
-
getDataAsU8():Uint8Array;
|
|
926
|
-
getDataAsString():string;
|
|
845
|
+
get keys():string[];
|
|
927
846
|
/**
|
|
928
|
-
*
|
|
929
|
-
* @
|
|
930
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
847
|
+
* A list of the value columns, by name
|
|
848
|
+
* @return String array.
|
|
931
849
|
*/
|
|
932
|
-
|
|
933
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
934
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
935
|
-
hasListeners(name:string):boolean;
|
|
936
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
850
|
+
get values():string[];
|
|
937
851
|
/**
|
|
938
|
-
*
|
|
939
|
-
* @return
|
|
940
|
-
* them when finished using them.
|
|
852
|
+
* A list of the key columns.
|
|
853
|
+
* @return Column array.
|
|
941
854
|
*/
|
|
942
|
-
get
|
|
855
|
+
get keyColumns():Column[];
|
|
943
856
|
/**
|
|
944
|
-
*
|
|
945
|
-
* @return
|
|
857
|
+
* A list of the value Column objects
|
|
858
|
+
* @return {@link dh.Column} array.
|
|
946
859
|
*/
|
|
947
|
-
get
|
|
860
|
+
get valueColumns():Column[];
|
|
861
|
+
/**
|
|
862
|
+
* The source table for this Input Table
|
|
863
|
+
* @return dh.table
|
|
864
|
+
*/
|
|
865
|
+
get table():Table;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export class QueryInfo {
|
|
869
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
870
|
+
static readonly EVENT_DISCONNECT:string;
|
|
871
|
+
static readonly EVENT_RECONNECT:string;
|
|
872
|
+
static readonly EVENT_CONNECT:string;
|
|
873
|
+
|
|
874
|
+
protected constructor();
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
export class CoreClient implements HasEventHandling {
|
|
878
|
+
static readonly EVENT_CONNECT:string;
|
|
879
|
+
static readonly EVENT_DISCONNECT:string;
|
|
880
|
+
static readonly EVENT_RECONNECT:string;
|
|
881
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
882
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
883
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
884
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
885
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
886
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
887
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
888
|
+
|
|
889
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
890
|
+
|
|
891
|
+
running():Promise<CoreClient>;
|
|
892
|
+
getServerUrl():string;
|
|
893
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
894
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
895
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
896
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
897
|
+
getServerConfigValues():Promise<string[][]>;
|
|
898
|
+
getStorageService():dh.storage.StorageService;
|
|
899
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
900
|
+
disconnect():void;
|
|
901
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
902
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
903
|
+
hasListeners(name:string):boolean;
|
|
904
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
909
|
+
*/
|
|
910
|
+
export class BigDecimalWrapper {
|
|
911
|
+
protected constructor();
|
|
912
|
+
|
|
913
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
914
|
+
asNumber():number;
|
|
915
|
+
valueOf():string;
|
|
916
|
+
toString():string;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
export class DateWrapper extends LongWrapper {
|
|
920
|
+
protected constructor();
|
|
921
|
+
|
|
922
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
923
|
+
asDate():Date;
|
|
948
924
|
}
|
|
949
925
|
|
|
926
|
+
/**
|
|
927
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
928
|
+
*/
|
|
929
|
+
export class BigIntegerWrapper {
|
|
930
|
+
protected constructor();
|
|
931
|
+
|
|
932
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
933
|
+
asNumber():number;
|
|
934
|
+
valueOf():string;
|
|
935
|
+
toString():string;
|
|
936
|
+
}
|
|
950
937
|
|
|
951
938
|
/**
|
|
952
|
-
*
|
|
953
|
-
*
|
|
939
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
940
|
+
*
|
|
941
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
942
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
943
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
954
944
|
*/
|
|
955
|
-
export class
|
|
956
|
-
/**
|
|
957
|
-
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
958
|
-
*/
|
|
959
|
-
groupingColumns:Array<String>;
|
|
945
|
+
export class TreeTableConfig {
|
|
960
946
|
/**
|
|
961
|
-
*
|
|
962
|
-
* roll-up table.
|
|
947
|
+
* The column representing the unique ID for each item
|
|
963
948
|
*/
|
|
964
|
-
|
|
949
|
+
idColumn:string;
|
|
965
950
|
/**
|
|
966
|
-
*
|
|
967
|
-
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
968
|
-
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
969
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
951
|
+
* The column representing the parent ID for each item
|
|
970
952
|
*/
|
|
971
|
-
|
|
972
|
-
includeOriginalColumns?:boolean|null;
|
|
953
|
+
parentColumn:string;
|
|
973
954
|
/**
|
|
974
|
-
* Optional parameter indicating if
|
|
955
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
975
956
|
*/
|
|
976
|
-
|
|
957
|
+
promoteOrphansToRoot:boolean;
|
|
977
958
|
|
|
978
959
|
constructor();
|
|
979
960
|
}
|
|
980
961
|
|
|
981
962
|
/**
|
|
982
|
-
* Presently
|
|
983
|
-
*
|
|
963
|
+
* Presently optional and not used by the server, this allows the client to specify some authentication details. String
|
|
964
|
+
* authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
|
|
984
965
|
*/
|
|
985
|
-
export class
|
|
986
|
-
|
|
987
|
-
* @deprecated
|
|
988
|
-
*/
|
|
989
|
-
static readonly HACK_CONNECTION_FAILURE:string;
|
|
990
|
-
static readonly EVENT_DISCONNECT:string;
|
|
991
|
-
static readonly EVENT_RECONNECT:string;
|
|
992
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
966
|
+
export class ConnectOptions {
|
|
967
|
+
headers:{ [key: string]: string; };
|
|
993
968
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
* @param serverUrl - The url used when connecting to the server. Read-only.
|
|
997
|
-
* @param connectOptions - Optional Object
|
|
998
|
-
* @param fromJava - Optional boolean
|
|
999
|
-
* @deprecated
|
|
1000
|
-
*/
|
|
1001
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
|
|
969
|
+
constructor();
|
|
970
|
+
}
|
|
1002
971
|
|
|
972
|
+
/**
|
|
973
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
974
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
975
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
976
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
977
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
978
|
+
*
|
|
979
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
980
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
981
|
+
* expected formats.
|
|
982
|
+
*/
|
|
983
|
+
export class TotalsTableConfig {
|
|
1003
984
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
*/
|
|
1006
|
-
close():void;
|
|
1007
|
-
running():Promise<IdeConnection>;
|
|
1008
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1009
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1010
|
-
/**
|
|
1011
|
-
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
1012
|
-
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1013
|
-
* log messages as are presently available.
|
|
1014
|
-
* @param callback -
|
|
1015
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
985
|
+
* @deprecated
|
|
1016
986
|
*/
|
|
1017
|
-
|
|
1018
|
-
startSession(type:string):Promise<IdeSession>;
|
|
1019
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
1020
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
987
|
+
static readonly COUNT:string;
|
|
1021
988
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
* @param name - the name of the event to listen for
|
|
1024
|
-
* @param callback - a function to call when the event occurs
|
|
1025
|
-
* @return Returns a cleanup function.
|
|
1026
|
-
* @typeParam T - the type of the data that the event will provide
|
|
989
|
+
* @deprecated
|
|
1027
990
|
*/
|
|
1028
|
-
|
|
1029
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1030
|
-
hasListeners(name:string):boolean;
|
|
991
|
+
static readonly MIN:string;
|
|
1031
992
|
/**
|
|
1032
|
-
*
|
|
1033
|
-
* @param name -
|
|
1034
|
-
* @param callback -
|
|
1035
|
-
* @return
|
|
1036
|
-
* @typeParam T -
|
|
993
|
+
* @deprecated
|
|
1037
994
|
*/
|
|
1038
|
-
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1043
|
-
* column.
|
|
1044
|
-
*/
|
|
1045
|
-
export class Column {
|
|
995
|
+
static readonly MAX:string;
|
|
1046
996
|
/**
|
|
1047
|
-
*
|
|
1048
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1049
|
-
* @return String
|
|
997
|
+
* @deprecated
|
|
1050
998
|
*/
|
|
1051
|
-
readonly
|
|
1052
|
-
readonly description?:string|null;
|
|
1053
|
-
|
|
1054
|
-
protected constructor();
|
|
1055
|
-
|
|
999
|
+
static readonly SUM:string;
|
|
1056
1000
|
/**
|
|
1057
|
-
*
|
|
1058
|
-
* @param row -
|
|
1059
|
-
* @return Any
|
|
1001
|
+
* @deprecated
|
|
1060
1002
|
*/
|
|
1061
|
-
|
|
1062
|
-
getFormat(row:Row):Format;
|
|
1003
|
+
static readonly ABS_SUM:string;
|
|
1063
1004
|
/**
|
|
1064
|
-
*
|
|
1065
|
-
* @return {@link dh.Sort}
|
|
1005
|
+
* @deprecated
|
|
1066
1006
|
*/
|
|
1067
|
-
|
|
1007
|
+
static readonly VAR:string;
|
|
1068
1008
|
/**
|
|
1069
|
-
*
|
|
1070
|
-
* operation, or as a builder to create a filter operation.
|
|
1071
|
-
* @return {@link dh.FilterValue}
|
|
1009
|
+
* @deprecated
|
|
1072
1010
|
*/
|
|
1073
|
-
|
|
1011
|
+
static readonly AVG:string;
|
|
1074
1012
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
* @param expression -
|
|
1077
|
-
* @return {@link dh.CustomColumn}
|
|
1013
|
+
* @deprecated
|
|
1078
1014
|
*/
|
|
1079
|
-
|
|
1015
|
+
static readonly STD:string;
|
|
1080
1016
|
/**
|
|
1081
|
-
*
|
|
1082
|
-
* @param expression -
|
|
1083
|
-
* @return {@link dh.CustomColumn}
|
|
1017
|
+
* @deprecated
|
|
1084
1018
|
*/
|
|
1085
|
-
|
|
1019
|
+
static readonly FIRST:string;
|
|
1086
1020
|
/**
|
|
1087
|
-
*
|
|
1088
|
-
* @param expression -
|
|
1089
|
-
* @return {@link dh.CustomColumn}
|
|
1021
|
+
* @deprecated
|
|
1090
1022
|
*/
|
|
1091
|
-
|
|
1092
|
-
toString():string;
|
|
1023
|
+
static readonly LAST:string;
|
|
1093
1024
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
* @return String
|
|
1025
|
+
* @deprecated
|
|
1096
1026
|
*/
|
|
1097
|
-
|
|
1027
|
+
static readonly SKIP:string;
|
|
1098
1028
|
/**
|
|
1099
|
-
*
|
|
1100
|
-
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
1101
|
-
* @return boolean
|
|
1029
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
1102
1030
|
*/
|
|
1103
|
-
|
|
1031
|
+
showTotalsByDefault:boolean;
|
|
1104
1032
|
/**
|
|
1105
|
-
*
|
|
1106
|
-
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1107
|
-
* @return int
|
|
1033
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
1108
1034
|
*/
|
|
1109
|
-
|
|
1110
|
-
get isSortable():boolean;
|
|
1035
|
+
showGrandTotalsByDefault:boolean;
|
|
1111
1036
|
/**
|
|
1112
|
-
*
|
|
1113
|
-
* @return String
|
|
1037
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
1114
1038
|
*/
|
|
1115
|
-
|
|
1039
|
+
defaultOperation:AggregationOperationType;
|
|
1116
1040
|
/**
|
|
1117
|
-
*
|
|
1118
|
-
*
|
|
1119
|
-
* @param expression -
|
|
1120
|
-
* @return {@link dh.CustomColumn}
|
|
1041
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
1042
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
1121
1043
|
*/
|
|
1122
|
-
|
|
1044
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
1123
1045
|
/**
|
|
1124
|
-
*
|
|
1125
|
-
*
|
|
1126
|
-
* @param expression -
|
|
1127
|
-
* @return {@link dh.CustomColumn}
|
|
1046
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
1047
|
+
* these columns. See also `Table.selectDistinct`.
|
|
1128
1048
|
*/
|
|
1129
|
-
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
export class LoginCredentials {
|
|
1133
|
-
type?:string|null;
|
|
1134
|
-
username?:string|null;
|
|
1135
|
-
token?:string|null;
|
|
1049
|
+
groupBy:Array<string>;
|
|
1136
1050
|
|
|
1137
1051
|
constructor();
|
|
1138
|
-
}
|
|
1139
1052
|
|
|
1140
|
-
|
|
1141
|
-
protected constructor();
|
|
1142
|
-
|
|
1143
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
1144
|
-
asDate():Date;
|
|
1053
|
+
toString():string;
|
|
1145
1054
|
}
|
|
1146
1055
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
*/
|
|
1150
|
-
export class CommandInfo {
|
|
1151
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1056
|
+
export class LongWrapper {
|
|
1057
|
+
protected constructor();
|
|
1152
1058
|
|
|
1153
|
-
|
|
1154
|
-
|
|
1059
|
+
static ofString(str:string):LongWrapper;
|
|
1060
|
+
asNumber():number;
|
|
1061
|
+
valueOf():string;
|
|
1062
|
+
toString():string;
|
|
1155
1063
|
}
|
|
1156
1064
|
|
|
1157
1065
|
/**
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1160
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
1161
|
-
*
|
|
1162
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
1163
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
1164
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
1165
|
-
* before sending the next operation.
|
|
1166
|
-
*
|
|
1167
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
1168
|
-
*
|
|
1169
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
1170
|
-
* object.
|
|
1066
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
1067
|
+
* roll-up table.
|
|
1171
1068
|
*/
|
|
1172
|
-
export class
|
|
1173
|
-
protected constructor();
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
1177
|
-
* property at that name and validate it can be put into the given column type.
|
|
1178
|
-
* @param row -
|
|
1179
|
-
* @param userTimeZone -
|
|
1180
|
-
* @return Promise of dh.InputTable
|
|
1181
|
-
*/
|
|
1182
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
1183
|
-
/**
|
|
1184
|
-
* Add multiple rows to a table.
|
|
1185
|
-
* @param rows -
|
|
1186
|
-
* @param userTimeZone -
|
|
1187
|
-
* @return Promise of dh.InputTable
|
|
1188
|
-
*/
|
|
1189
|
-
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
1190
|
-
/**
|
|
1191
|
-
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
1192
|
-
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
1193
|
-
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
1194
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
1195
|
-
* @param tableToAdd -
|
|
1196
|
-
* @return Promise of dh.InputTable
|
|
1197
|
-
*/
|
|
1198
|
-
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
1199
|
-
/**
|
|
1200
|
-
* Add multiple tables to this Input Table.
|
|
1201
|
-
* @param tablesToAdd -
|
|
1202
|
-
* @return Promise of dh.InputTable
|
|
1203
|
-
*/
|
|
1204
|
-
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
1205
|
-
/**
|
|
1206
|
-
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
1207
|
-
* @param tableToDelete -
|
|
1208
|
-
* @return Promise of dh.InputTable
|
|
1209
|
-
*/
|
|
1210
|
-
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
1211
|
-
/**
|
|
1212
|
-
* Delete multiple tables from this Input Table.
|
|
1213
|
-
* @param tablesToDelete -
|
|
1214
|
-
* @return
|
|
1215
|
-
*/
|
|
1216
|
-
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
1217
|
-
/**
|
|
1218
|
-
* A list of the key columns, by name
|
|
1219
|
-
* @return String array.
|
|
1220
|
-
*/
|
|
1221
|
-
get keys():string[];
|
|
1069
|
+
export class RollupConfig {
|
|
1222
1070
|
/**
|
|
1223
|
-
*
|
|
1224
|
-
* @return String array.
|
|
1071
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
1225
1072
|
*/
|
|
1226
|
-
|
|
1073
|
+
groupingColumns:Array<String>;
|
|
1227
1074
|
/**
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1075
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1076
|
+
* roll-up table.
|
|
1230
1077
|
*/
|
|
1231
|
-
|
|
1078
|
+
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
1232
1079
|
/**
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1080
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
1081
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
1082
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1083
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1235
1084
|
*/
|
|
1236
|
-
|
|
1085
|
+
includeConstituents:boolean;
|
|
1086
|
+
includeOriginalColumns?:boolean|null;
|
|
1237
1087
|
/**
|
|
1238
|
-
*
|
|
1239
|
-
* @return dh.table
|
|
1088
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
1240
1089
|
*/
|
|
1241
|
-
|
|
1090
|
+
includeDescriptions:boolean;
|
|
1091
|
+
|
|
1092
|
+
constructor();
|
|
1242
1093
|
}
|
|
1243
1094
|
|
|
1244
1095
|
/**
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1247
|
-
* <p>
|
|
1248
|
-
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1249
|
-
* <p>
|
|
1250
|
-
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1251
|
-
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1096
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1097
|
+
* interpret these responses to see what to render, or how to respond.
|
|
1252
1098
|
* <p>
|
|
1253
|
-
*
|
|
1099
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1100
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1101
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1102
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1103
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
1254
1104
|
* <p>
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
*
|
|
1258
|
-
*
|
|
1259
|
-
*
|
|
1260
|
-
* the viewport).
|
|
1105
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1106
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1107
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1108
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1109
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1261
1110
|
* <p>
|
|
1262
|
-
*
|
|
1263
|
-
*
|
|
1111
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1112
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1113
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1114
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1115
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1116
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1117
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1264
1118
|
* <p>
|
|
1119
|
+
* This can suggest several patterns for how plugins operate:
|
|
1265
1120
|
* <ul>
|
|
1266
|
-
* <li>
|
|
1267
|
-
*
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
* <li>
|
|
1272
|
-
*
|
|
1273
|
-
*
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
*
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1121
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1122
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1123
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1124
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1125
|
+
* provided to the JS API consumer.</li>
|
|
1126
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1127
|
+
* which provided them. One concrete example of this could have been
|
|
1128
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1129
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1130
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1131
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1132
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1133
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1134
|
+
* an internal table instance.</li>
|
|
1135
|
+
* </ul>
|
|
1136
|
+
*
|
|
1137
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1138
|
+
* <ul>
|
|
1139
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1140
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1141
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1142
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1143
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
1144
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1145
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1146
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1147
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1282
1148
|
* </ul>
|
|
1283
1149
|
*/
|
|
1284
|
-
export class
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1150
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1151
|
+
static readonly EVENT_MESSAGE:string;
|
|
1152
|
+
static readonly EVENT_CLOSE:string;
|
|
1153
|
+
|
|
1154
|
+
protected constructor();
|
|
1155
|
+
|
|
1289
1156
|
/**
|
|
1290
|
-
*
|
|
1157
|
+
* Ends the client connection to the server.
|
|
1291
1158
|
*/
|
|
1292
|
-
|
|
1159
|
+
close():void;
|
|
1160
|
+
getDataAsBase64():string;
|
|
1161
|
+
getDataAsU8():Uint8Array;
|
|
1162
|
+
getDataAsString():string;
|
|
1293
1163
|
/**
|
|
1294
|
-
*
|
|
1164
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1165
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
1166
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
1295
1167
|
*/
|
|
1296
|
-
|
|
1168
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1169
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1170
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1171
|
+
hasListeners(name:string):boolean;
|
|
1172
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1297
1173
|
/**
|
|
1298
|
-
*
|
|
1174
|
+
*
|
|
1175
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1176
|
+
* them when finished using them.
|
|
1299
1177
|
*/
|
|
1300
|
-
|
|
1178
|
+
get exportedObjects():WidgetExportedObject[];
|
|
1301
1179
|
/**
|
|
1302
|
-
*
|
|
1180
|
+
*
|
|
1181
|
+
* @return the type of this widget
|
|
1303
1182
|
*/
|
|
1304
|
-
|
|
1183
|
+
get type():string;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1189
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1190
|
+
* inform the UI right away that they have taken place.
|
|
1191
|
+
*/
|
|
1192
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
1305
1193
|
readonly description?:string|null;
|
|
1194
|
+
readonly pluginName?:string|null;
|
|
1306
1195
|
readonly layoutHints?:null|LayoutHints;
|
|
1196
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
1197
|
+
static readonly EVENT_UPDATED:string;
|
|
1198
|
+
static readonly EVENT_ROWADDED:string;
|
|
1199
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
1200
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
1201
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
1202
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
1203
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1204
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1205
|
+
static readonly EVENT_RECONNECT:string;
|
|
1206
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1207
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1208
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1209
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
1307
1210
|
|
|
1308
1211
|
protected constructor();
|
|
1309
1212
|
|
|
1213
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1310
1214
|
/**
|
|
1311
|
-
*
|
|
1312
|
-
*
|
|
1313
|
-
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1314
|
-
* boolean parameter.
|
|
1315
|
-
* @param row -
|
|
1316
|
-
* @param expandDescendants -
|
|
1317
|
-
*/
|
|
1318
|
-
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1319
|
-
/**
|
|
1320
|
-
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1321
|
-
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1322
|
-
* @param row -
|
|
1323
|
-
*/
|
|
1324
|
-
collapse(row:TreeRow|number):void;
|
|
1325
|
-
/**
|
|
1326
|
-
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1327
|
-
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1328
|
-
* is true, then its children will also be expanded.
|
|
1329
|
-
* @param row -
|
|
1330
|
-
* @param isExpanded -
|
|
1331
|
-
* @param expandDescendants -
|
|
1332
|
-
*/
|
|
1333
|
-
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1334
|
-
expandAll():void;
|
|
1335
|
-
collapseAll():void;
|
|
1336
|
-
/**
|
|
1337
|
-
* true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
|
|
1338
|
-
* is available
|
|
1339
|
-
* @param row -
|
|
1340
|
-
* @return boolean
|
|
1341
|
-
*/
|
|
1342
|
-
isExpanded(row:TreeRow|number):boolean;
|
|
1343
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1344
|
-
getViewportData():Promise<TreeViewportData>;
|
|
1345
|
-
/**
|
|
1346
|
-
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1347
|
-
*/
|
|
1348
|
-
close():void;
|
|
1349
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
1350
|
-
/**
|
|
1351
|
-
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1352
|
-
* @param sort -
|
|
1353
|
-
* @return {@link dh.Sort} array
|
|
1354
|
-
*/
|
|
1355
|
-
applySort(sort:Sort[]):Array<Sort>;
|
|
1356
|
-
/**
|
|
1357
|
-
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1358
|
-
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1359
|
-
* condition. Returns the previous sort in use.
|
|
1360
|
-
* @param filter -
|
|
1361
|
-
* @return {@link dh.FilterCondition} array
|
|
1362
|
-
*/
|
|
1363
|
-
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1364
|
-
/**
|
|
1365
|
-
* a column with the given name, or throws an exception if it cannot be found
|
|
1215
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
1216
|
+
* caching a returned value.
|
|
1366
1217
|
* @param key -
|
|
1367
1218
|
* @return {@link dh.Column}
|
|
1368
1219
|
*/
|
|
1369
1220
|
findColumn(key:string):Column;
|
|
1370
1221
|
/**
|
|
1371
|
-
*
|
|
1222
|
+
* Retrieve multiple columns specified by the given names.
|
|
1372
1223
|
* @param keys -
|
|
1373
1224
|
* @return {@link dh.Column} array
|
|
1374
1225
|
*/
|
|
1375
1226
|
findColumns(keys:string[]):Column[];
|
|
1227
|
+
isBlinkTable():boolean;
|
|
1376
1228
|
/**
|
|
1377
|
-
*
|
|
1378
|
-
*
|
|
1379
|
-
*
|
|
1380
|
-
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1381
|
-
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1382
|
-
* the tree.</li>
|
|
1383
|
-
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1384
|
-
* in the resulting table.</li>
|
|
1385
|
-
* </ul>
|
|
1386
|
-
*/
|
|
1387
|
-
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1388
|
-
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1389
|
-
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1390
|
-
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1391
|
-
/**
|
|
1392
|
-
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1393
|
-
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1394
|
-
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1395
|
-
* state is also not copied.
|
|
1396
|
-
* @return Promise of dh.TreeTable
|
|
1397
|
-
*/
|
|
1398
|
-
copy():Promise<TreeTable>;
|
|
1399
|
-
/**
|
|
1400
|
-
* The current filter configuration of this Tree Table.
|
|
1401
|
-
* @return {@link dh.FilterCondition} array
|
|
1229
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
1230
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
1231
|
+
* @return Promise of dh.InputTable
|
|
1402
1232
|
*/
|
|
1403
|
-
|
|
1233
|
+
inputTable():Promise<InputTable>;
|
|
1404
1234
|
/**
|
|
1405
|
-
*
|
|
1406
|
-
* @return boolean
|
|
1235
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
1407
1236
|
*/
|
|
1408
|
-
|
|
1409
|
-
|
|
1237
|
+
close():void;
|
|
1238
|
+
getAttributes():string[];
|
|
1410
1239
|
/**
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1240
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
1241
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
1242
|
+
* @param attributeName -
|
|
1243
|
+
* @return Object
|
|
1413
1244
|
*/
|
|
1414
|
-
|
|
1245
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
1415
1246
|
/**
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1247
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
1248
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
1249
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
1250
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1251
|
+
* not.
|
|
1252
|
+
* @param sort -
|
|
1253
|
+
* @return {@link dh.Sort} array
|
|
1420
1254
|
*/
|
|
1421
|
-
|
|
1255
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1422
1256
|
/**
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1257
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
1258
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
1259
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
1260
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
1261
|
+
* will not.
|
|
1262
|
+
* @param filter -
|
|
1263
|
+
* @return {@link dh.FilterCondition} array
|
|
1425
1264
|
*/
|
|
1426
|
-
|
|
1265
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1427
1266
|
/**
|
|
1428
|
-
*
|
|
1429
|
-
* @
|
|
1267
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
1268
|
+
* @param customColumns -
|
|
1269
|
+
* @return {@link dh.CustomColumn} array
|
|
1430
1270
|
*/
|
|
1431
|
-
|
|
1271
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1432
1272
|
/**
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1273
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
1274
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
1275
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
1276
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
1277
|
+
* needed.
|
|
1278
|
+
* @param firstRow -
|
|
1279
|
+
* @param lastRow -
|
|
1280
|
+
* @param columns -
|
|
1281
|
+
* @param updateIntervalMs -
|
|
1282
|
+
* @return {@link dh.TableViewportSubscription}
|
|
1436
1283
|
*/
|
|
1437
|
-
|
|
1284
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
|
|
1438
1285
|
/**
|
|
1439
|
-
*
|
|
1440
|
-
*
|
|
1441
|
-
*
|
|
1442
|
-
* @
|
|
1443
|
-
* @
|
|
1286
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
1287
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
1288
|
+
* separate the lifespan of this promise from the table itself, call
|
|
1289
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1290
|
+
* @return Promise of {@link dh.TableData}
|
|
1444
1291
|
*/
|
|
1445
|
-
|
|
1446
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1447
|
-
hasListeners(name:string):boolean;
|
|
1292
|
+
getViewportData():Promise<TableData>;
|
|
1448
1293
|
/**
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1294
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
1295
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
1296
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
1297
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1298
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1299
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1300
|
+
* @param columns -
|
|
1301
|
+
* @param updateIntervalMs -
|
|
1302
|
+
* @return {@link dh.TableSubscription}
|
|
1454
1303
|
*/
|
|
1455
|
-
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
/**
|
|
1459
|
-
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1460
|
-
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1461
|
-
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1462
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1463
|
-
* instance.
|
|
1464
|
-
*/
|
|
1465
|
-
export class FilterValue {
|
|
1466
|
-
protected constructor();
|
|
1467
|
-
|
|
1304
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
1468
1305
|
/**
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
1473
|
-
*
|
|
1474
|
-
* @param input - the number to wrap as a FilterValue
|
|
1475
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1306
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
1307
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
1308
|
+
* order of appearance of values from the original table.
|
|
1309
|
+
* @param columns -
|
|
1310
|
+
* @return Promise of dh.Table
|
|
1476
1311
|
*/
|
|
1477
|
-
|
|
1312
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1478
1313
|
/**
|
|
1479
|
-
* a
|
|
1480
|
-
* @
|
|
1481
|
-
* @return {@link dh.FilterCondition}
|
|
1314
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1315
|
+
* @return Promise of dh.Table
|
|
1482
1316
|
*/
|
|
1483
|
-
|
|
1317
|
+
copy():Promise<Table>;
|
|
1484
1318
|
/**
|
|
1485
|
-
* a
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1319
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
1320
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
1321
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1322
|
+
* called on it when not in use.
|
|
1323
|
+
* @param config -
|
|
1324
|
+
* @return Promise of dh.TotalsTable
|
|
1489
1325
|
*/
|
|
1490
|
-
|
|
1326
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1491
1327
|
/**
|
|
1492
|
-
* a
|
|
1493
|
-
*
|
|
1494
|
-
* @
|
|
1328
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
1329
|
+
* above for more specifics.
|
|
1330
|
+
* @param config -
|
|
1331
|
+
* @return promise of dh.TotalsTable
|
|
1495
1332
|
*/
|
|
1496
|
-
|
|
1333
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
1497
1334
|
/**
|
|
1498
|
-
* a
|
|
1499
|
-
*
|
|
1500
|
-
* @param
|
|
1501
|
-
* @return
|
|
1335
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
1336
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
1337
|
+
* @param configObject -
|
|
1338
|
+
* @return Promise of dh.TreeTable
|
|
1502
1339
|
*/
|
|
1503
|
-
|
|
1340
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
1504
1341
|
/**
|
|
1505
|
-
* a
|
|
1506
|
-
*
|
|
1507
|
-
* @
|
|
1342
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
1343
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
1344
|
+
* @param configObject -
|
|
1345
|
+
* @return Promise dh.TreeTable
|
|
1508
1346
|
*/
|
|
1509
|
-
|
|
1347
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
1510
1348
|
/**
|
|
1511
|
-
* a
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1349
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
1350
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1351
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1352
|
+
* @return Promise of dh.Table
|
|
1514
1353
|
*/
|
|
1515
|
-
|
|
1354
|
+
freeze():Promise<Table>;
|
|
1355
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1516
1356
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
* @
|
|
1519
|
-
* @
|
|
1357
|
+
*
|
|
1358
|
+
* @inheritDoc
|
|
1359
|
+
* @deprecated
|
|
1520
1360
|
*/
|
|
1521
|
-
|
|
1361
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1362
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1363
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1364
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1365
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1366
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1522
1367
|
/**
|
|
1523
|
-
* a
|
|
1524
|
-
*
|
|
1525
|
-
* @
|
|
1368
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
1369
|
+
* keys.
|
|
1370
|
+
* @param keys -
|
|
1371
|
+
* @param dropKeys -
|
|
1372
|
+
* @return Promise dh.PartitionedTable
|
|
1526
1373
|
*/
|
|
1527
|
-
|
|
1374
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1528
1375
|
/**
|
|
1529
|
-
* a
|
|
1530
|
-
* @param
|
|
1531
|
-
* @return
|
|
1376
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
1377
|
+
* @param column -
|
|
1378
|
+
* @return Promise of dh.ColumnStatistics
|
|
1532
1379
|
*/
|
|
1533
|
-
|
|
1380
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
1534
1381
|
/**
|
|
1535
|
-
*
|
|
1536
|
-
*
|
|
1537
|
-
* @param
|
|
1538
|
-
* @
|
|
1382
|
+
* Seek the row matching the data provided
|
|
1383
|
+
* @param startingRow - Row to start the seek from
|
|
1384
|
+
* @param column - Column to seek for value on
|
|
1385
|
+
* @param valueType - Type of value provided
|
|
1386
|
+
* @param seekValue - Value to seek
|
|
1387
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1388
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1389
|
+
* `false`.
|
|
1390
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1391
|
+
* @return A promise that resolves to the row value found.
|
|
1539
1392
|
*/
|
|
1540
|
-
|
|
1393
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
1394
|
+
toString():string;
|
|
1541
1395
|
/**
|
|
1542
|
-
*
|
|
1543
|
-
*
|
|
1544
|
-
* @return
|
|
1396
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
1397
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
1398
|
+
* @return boolean
|
|
1545
1399
|
*/
|
|
1546
|
-
|
|
1400
|
+
get hasInputTable():boolean;
|
|
1547
1401
|
/**
|
|
1548
|
-
*
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1551
|
-
*
|
|
1402
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
1403
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
1404
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
1405
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1406
|
+
* @return {@link dh.Column} array
|
|
1552
1407
|
*/
|
|
1553
|
-
|
|
1408
|
+
get columns():Array<Column>;
|
|
1554
1409
|
/**
|
|
1555
|
-
*
|
|
1556
|
-
* @
|
|
1557
|
-
* @return {@link dh.FilterCondition}
|
|
1410
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
1411
|
+
* @return dh.TotalsTableConfig
|
|
1558
1412
|
*/
|
|
1559
|
-
|
|
1413
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
1560
1414
|
/**
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
*
|
|
1564
|
-
* @return {@link dh.
|
|
1415
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
1416
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1417
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
1418
|
+
* @return {@link dh.Sort} array
|
|
1565
1419
|
*/
|
|
1566
|
-
|
|
1420
|
+
get sort():Array<Sort>;
|
|
1567
1421
|
/**
|
|
1568
|
-
*
|
|
1569
|
-
*
|
|
1570
|
-
* @
|
|
1571
|
-
* @return {@link dh.FilterCondition}
|
|
1422
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
1423
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
1424
|
+
* @return {@link dh.CustomColumn} array
|
|
1572
1425
|
*/
|
|
1573
|
-
|
|
1426
|
+
get customColumns():Array<CustomColumn>;
|
|
1574
1427
|
/**
|
|
1575
|
-
*
|
|
1576
|
-
*
|
|
1577
|
-
* @
|
|
1578
|
-
* @return {@link dh.FilterCondition}
|
|
1428
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1429
|
+
* initial snapshot.
|
|
1430
|
+
* @return boolean
|
|
1579
1431
|
*/
|
|
1580
|
-
|
|
1432
|
+
get isRefreshing():boolean;
|
|
1581
1433
|
/**
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
1434
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
1435
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1436
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
1437
|
+
* @return {@link dh.FilterCondition} array
|
|
1584
1438
|
*/
|
|
1585
|
-
|
|
1439
|
+
get filter():Array<FilterCondition>;
|
|
1586
1440
|
/**
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
1441
|
+
* The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
|
|
1442
|
+
* not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
|
|
1443
|
+
* applySort(). Note that this getter will return the new value immediately, even though it may take a little time
|
|
1444
|
+
* to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
|
|
1445
|
+
* @return double
|
|
1589
1446
|
*/
|
|
1590
|
-
|
|
1447
|
+
get totalSize():number;
|
|
1591
1448
|
/**
|
|
1592
|
-
*
|
|
1593
|
-
*
|
|
1449
|
+
* The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
|
|
1450
|
+
* Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
|
|
1451
|
+
* property). for details).
|
|
1452
|
+
* @return double
|
|
1594
1453
|
*/
|
|
1595
|
-
|
|
1454
|
+
get size():number;
|
|
1596
1455
|
/**
|
|
1597
|
-
*
|
|
1598
|
-
*
|
|
1599
|
-
* <ul>
|
|
1600
|
-
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1601
|
-
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1602
|
-
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1603
|
-
* regular expression</li>
|
|
1604
|
-
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1605
|
-
* <p>
|
|
1606
|
-
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1607
|
-
* </p>
|
|
1608
|
-
* </li>
|
|
1609
|
-
* </ul>
|
|
1610
|
-
* @param method -
|
|
1611
|
-
* @param args -
|
|
1612
|
-
* @return
|
|
1456
|
+
* True if this table has been closed.
|
|
1457
|
+
* @return boolean
|
|
1613
1458
|
*/
|
|
1614
|
-
|
|
1615
|
-
toString():string;
|
|
1459
|
+
get isClosed():boolean;
|
|
1616
1460
|
/**
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1619
|
-
*
|
|
1461
|
+
* Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
|
|
1462
|
+
* table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
|
|
1463
|
+
* will be unavailable until table is coalesced.
|
|
1464
|
+
* @return boolean
|
|
1620
1465
|
*/
|
|
1621
|
-
|
|
1466
|
+
get isUncoalesced():boolean;
|
|
1622
1467
|
/**
|
|
1623
|
-
*
|
|
1624
|
-
* @param
|
|
1625
|
-
* @
|
|
1468
|
+
* Listen for events on this object.
|
|
1469
|
+
* @param name - the name of the event to listen for
|
|
1470
|
+
* @param callback - a function to call when the event occurs
|
|
1471
|
+
* @return Returns a cleanup function.
|
|
1472
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1626
1473
|
*/
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
* authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
|
|
1645
|
-
*/
|
|
1646
|
-
export class ConnectOptions {
|
|
1647
|
-
headers:{ [key: string]: string; };
|
|
1648
|
-
|
|
1649
|
-
constructor();
|
|
1474
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1475
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1476
|
+
hasListeners(name:string):boolean;
|
|
1477
|
+
/**
|
|
1478
|
+
* Removes an event listener added to this table.
|
|
1479
|
+
* @param name -
|
|
1480
|
+
* @param callback -
|
|
1481
|
+
* @return
|
|
1482
|
+
* @typeParam T -
|
|
1483
|
+
*/
|
|
1484
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1485
|
+
/**
|
|
1486
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
1487
|
+
* do not support reverse.
|
|
1488
|
+
* @return {@link dh.Sort}
|
|
1489
|
+
*/
|
|
1490
|
+
static reverse():Sort;
|
|
1650
1491
|
}
|
|
1651
1492
|
|
|
1652
1493
|
/**
|
|
@@ -1694,571 +1535,639 @@ export namespace dh {
|
|
|
1694
1535
|
get direction():string;
|
|
1695
1536
|
}
|
|
1696
1537
|
|
|
1697
|
-
export class QueryInfo {
|
|
1698
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
1699
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1700
|
-
static readonly EVENT_RECONNECT:string;
|
|
1701
|
-
static readonly EVENT_CONNECT:string;
|
|
1702
|
-
|
|
1703
|
-
protected constructor();
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
1538
|
/**
|
|
1707
|
-
*
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1710
|
-
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
1711
|
-
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
1539
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1540
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1541
|
+
* instance.
|
|
1712
1542
|
*/
|
|
1713
|
-
export class
|
|
1543
|
+
export class FilterCondition {
|
|
1544
|
+
protected constructor();
|
|
1545
|
+
|
|
1714
1546
|
/**
|
|
1715
|
-
*
|
|
1547
|
+
* the opposite of this condition
|
|
1548
|
+
* @return FilterCondition
|
|
1716
1549
|
*/
|
|
1717
|
-
|
|
1550
|
+
not():FilterCondition;
|
|
1718
1551
|
/**
|
|
1719
|
-
*
|
|
1552
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
1553
|
+
* @param filters -
|
|
1554
|
+
* @return FilterCondition
|
|
1720
1555
|
*/
|
|
1721
|
-
|
|
1556
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
1722
1557
|
/**
|
|
1723
|
-
*
|
|
1558
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
1559
|
+
* @param filters -
|
|
1560
|
+
* @return FilterCondition.
|
|
1724
1561
|
*/
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
constructor();
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
/**
|
|
1731
|
-
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1732
|
-
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
1733
|
-
*
|
|
1734
|
-
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1735
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1736
|
-
* forward data to it.
|
|
1737
|
-
*
|
|
1738
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1739
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1740
|
-
* viewports to make it less expensive to compute for large tables.
|
|
1741
|
-
*/
|
|
1742
|
-
export class TableSubscription implements HasEventHandling {
|
|
1562
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
1743
1563
|
/**
|
|
1744
|
-
*
|
|
1745
|
-
*
|
|
1746
|
-
* allowing access to the entire range of items currently in the subscribed columns.
|
|
1564
|
+
* a string suitable for debugging showing the details of this condition.
|
|
1565
|
+
* @return String.
|
|
1747
1566
|
*/
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
protected constructor();
|
|
1751
|
-
|
|
1567
|
+
toString():string;
|
|
1568
|
+
get columns():Array<Column>;
|
|
1752
1569
|
/**
|
|
1753
|
-
*
|
|
1570
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1571
|
+
* functions:
|
|
1572
|
+
* <ul>
|
|
1573
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1574
|
+
* than the third</li>
|
|
1575
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1576
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1577
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1578
|
+
* "not a number"</i></li>
|
|
1579
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1580
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1581
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1582
|
+
* expression</li>
|
|
1583
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1584
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1585
|
+
* <p>
|
|
1586
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1587
|
+
* method should be used in other cases
|
|
1588
|
+
* </p>
|
|
1589
|
+
* </li>
|
|
1590
|
+
* </ul>
|
|
1591
|
+
* @param function -
|
|
1592
|
+
* @param args -
|
|
1593
|
+
* @return dh.FilterCondition
|
|
1754
1594
|
*/
|
|
1755
|
-
|
|
1756
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1757
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1758
|
-
hasListeners(name:string):boolean;
|
|
1759
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1595
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
1760
1596
|
/**
|
|
1761
|
-
*
|
|
1762
|
-
*
|
|
1597
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
1598
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1599
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1600
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1601
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1602
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1603
|
+
* {@link dh.Column.filter}).
|
|
1604
|
+
* @param value -
|
|
1605
|
+
* @param columns -
|
|
1606
|
+
* @return dh.FilterCondition
|
|
1763
1607
|
*/
|
|
1764
|
-
|
|
1608
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
1765
1609
|
}
|
|
1766
1610
|
|
|
1767
1611
|
/**
|
|
1768
|
-
*
|
|
1612
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1613
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1614
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1615
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1616
|
+
* instance.
|
|
1769
1617
|
*/
|
|
1770
|
-
export class
|
|
1771
|
-
protected constructor();
|
|
1772
|
-
|
|
1773
|
-
static ofString(str:string):BigIntegerWrapper;
|
|
1774
|
-
asNumber():number;
|
|
1775
|
-
valueOf():string;
|
|
1776
|
-
toString():string;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
export class CustomColumn {
|
|
1780
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
1781
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1782
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
1783
|
-
static readonly TYPE_NEW:string;
|
|
1784
|
-
|
|
1618
|
+
export class FilterValue {
|
|
1785
1619
|
protected constructor();
|
|
1786
1620
|
|
|
1787
|
-
valueOf():string;
|
|
1788
|
-
toString():string;
|
|
1789
1621
|
/**
|
|
1790
|
-
*
|
|
1791
|
-
* @
|
|
1622
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
1623
|
+
* {@link TableData.get} for DateTime values. To create
|
|
1624
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1625
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1626
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1627
|
+
* @param input - the number to wrap as a FilterValue
|
|
1628
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
1792
1629
|
*/
|
|
1793
|
-
|
|
1630
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1794
1631
|
/**
|
|
1795
|
-
*
|
|
1796
|
-
* @
|
|
1632
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
1633
|
+
* @param term -
|
|
1634
|
+
* @return {@link dh.FilterCondition}
|
|
1797
1635
|
*/
|
|
1798
|
-
|
|
1636
|
+
eq(term:FilterValue):FilterCondition;
|
|
1799
1637
|
/**
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1804
|
-
* <li>FORMAT_NUMBER</li>
|
|
1805
|
-
* <li>FORMAT_DATE</li>
|
|
1806
|
-
* <li>NEW</li>
|
|
1807
|
-
* </ul>
|
|
1808
|
-
* @return String
|
|
1638
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1639
|
+
* vs lower case
|
|
1640
|
+
* @param term -
|
|
1641
|
+
* @return {@link dh.FilterCondition}
|
|
1809
1642
|
*/
|
|
1810
|
-
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
/**
|
|
1814
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1815
|
-
*/
|
|
1816
|
-
export class BigDecimalWrapper {
|
|
1817
|
-
protected constructor();
|
|
1818
|
-
|
|
1819
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
1820
|
-
asNumber():number;
|
|
1821
|
-
valueOf():string;
|
|
1822
|
-
toString():string;
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
/**
|
|
1826
|
-
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
1827
|
-
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
1828
|
-
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
1829
|
-
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
1830
|
-
* of <b>TotalsTableConfig</b> will be supplied.
|
|
1831
|
-
*
|
|
1832
|
-
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
1833
|
-
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
1834
|
-
* expected formats.
|
|
1835
|
-
*/
|
|
1836
|
-
export class TotalsTableConfig {
|
|
1643
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1837
1644
|
/**
|
|
1838
|
-
*
|
|
1645
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
1646
|
+
* @param term -
|
|
1647
|
+
* @return {@link dh.FilterCondition}
|
|
1839
1648
|
*/
|
|
1840
|
-
|
|
1649
|
+
notEq(term:FilterValue):FilterCondition;
|
|
1841
1650
|
/**
|
|
1842
|
-
*
|
|
1651
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1652
|
+
* upper vs lower case
|
|
1653
|
+
* @param term -
|
|
1654
|
+
* @return {@link dh.FilterCondition}
|
|
1843
1655
|
*/
|
|
1844
|
-
|
|
1656
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1845
1657
|
/**
|
|
1846
|
-
*
|
|
1658
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1659
|
+
* @param term -
|
|
1660
|
+
* @return {@link dh.FilterCondition}
|
|
1847
1661
|
*/
|
|
1848
|
-
|
|
1662
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
1849
1663
|
/**
|
|
1850
|
-
*
|
|
1664
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1665
|
+
* @param term -
|
|
1666
|
+
* @return {@link dh.FilterCondition}
|
|
1851
1667
|
*/
|
|
1852
|
-
|
|
1668
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
1669
|
+
/**
|
|
1670
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1671
|
+
* @param term -
|
|
1672
|
+
* @return {@link dh.FilterCondition}
|
|
1673
|
+
*/
|
|
1674
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1675
|
+
/**
|
|
1676
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1677
|
+
* @param term -
|
|
1678
|
+
* @return {@link dh.FilterCondition}
|
|
1679
|
+
*/
|
|
1680
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1681
|
+
/**
|
|
1682
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1683
|
+
* @param terms -
|
|
1684
|
+
* @return {@link dh.FilterCondition}
|
|
1685
|
+
*/
|
|
1686
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
1687
|
+
/**
|
|
1688
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1689
|
+
* lower case
|
|
1690
|
+
* @param terms -
|
|
1691
|
+
* @return {@link dh.FilterCondition}
|
|
1692
|
+
*/
|
|
1693
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1853
1694
|
/**
|
|
1854
|
-
*
|
|
1695
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1696
|
+
* @param terms -
|
|
1697
|
+
* @return {@link dh.FilterCondition}
|
|
1855
1698
|
*/
|
|
1856
|
-
|
|
1699
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
1857
1700
|
/**
|
|
1858
|
-
*
|
|
1701
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1702
|
+
* upper vs lower case
|
|
1703
|
+
* @param terms -
|
|
1704
|
+
* @return {@link dh.FilterCondition}
|
|
1859
1705
|
*/
|
|
1860
|
-
|
|
1706
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1861
1707
|
/**
|
|
1862
|
-
*
|
|
1708
|
+
* a filter condition checking if the given value contains the given string value
|
|
1709
|
+
* @param term -
|
|
1710
|
+
* @return {@link dh.FilterCondition}
|
|
1863
1711
|
*/
|
|
1864
|
-
|
|
1712
|
+
contains(term:FilterValue):FilterCondition;
|
|
1865
1713
|
/**
|
|
1866
|
-
*
|
|
1714
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1715
|
+
* lower case
|
|
1716
|
+
* @param term -
|
|
1717
|
+
* @return {@link dh.FilterCondition}
|
|
1867
1718
|
*/
|
|
1868
|
-
|
|
1719
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1869
1720
|
/**
|
|
1870
|
-
*
|
|
1721
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1722
|
+
* use Java regex syntax
|
|
1723
|
+
* @param pattern -
|
|
1724
|
+
* @return {@link dh.FilterCondition}
|
|
1871
1725
|
*/
|
|
1872
|
-
|
|
1726
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
1873
1727
|
/**
|
|
1874
|
-
*
|
|
1728
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1729
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1730
|
+
* @param pattern -
|
|
1731
|
+
* @return {@link dh.FilterCondition}
|
|
1875
1732
|
*/
|
|
1876
|
-
|
|
1733
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1877
1734
|
/**
|
|
1878
|
-
*
|
|
1735
|
+
* a filter condition checking if the current value is a true boolean
|
|
1736
|
+
* @return {@link dh.FilterCondition}
|
|
1879
1737
|
*/
|
|
1880
|
-
|
|
1738
|
+
isTrue():FilterCondition;
|
|
1881
1739
|
/**
|
|
1882
|
-
*
|
|
1740
|
+
* a filter condition checking if the current value is a false boolean
|
|
1741
|
+
* @return {@link dh.FilterCondition}
|
|
1883
1742
|
*/
|
|
1884
|
-
|
|
1743
|
+
isFalse():FilterCondition;
|
|
1885
1744
|
/**
|
|
1886
|
-
*
|
|
1745
|
+
* a filter condition checking if the current value is a null value
|
|
1746
|
+
* @return {@link dh.FilterCondition}
|
|
1887
1747
|
*/
|
|
1888
|
-
|
|
1748
|
+
isNull():FilterCondition;
|
|
1889
1749
|
/**
|
|
1890
|
-
*
|
|
1750
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
1751
|
+
* functions that can be invoked on a String:
|
|
1752
|
+
* <ul>
|
|
1753
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1754
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1755
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1756
|
+
* regular expression</li>
|
|
1757
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1758
|
+
* <p>
|
|
1759
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1760
|
+
* </p>
|
|
1761
|
+
* </li>
|
|
1762
|
+
* </ul>
|
|
1763
|
+
* @param method -
|
|
1764
|
+
* @param args -
|
|
1765
|
+
* @return
|
|
1891
1766
|
*/
|
|
1892
|
-
|
|
1767
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
1768
|
+
toString():string;
|
|
1893
1769
|
/**
|
|
1894
|
-
*
|
|
1895
|
-
*
|
|
1770
|
+
* Constructs a string for the filter API from the given parameter.
|
|
1771
|
+
* @param input -
|
|
1772
|
+
* @return
|
|
1896
1773
|
*/
|
|
1897
|
-
|
|
1774
|
+
static ofString(input:any):FilterValue;
|
|
1898
1775
|
/**
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1776
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
1777
|
+
* @param b -
|
|
1778
|
+
* @return
|
|
1901
1779
|
*/
|
|
1902
|
-
|
|
1780
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
1781
|
+
}
|
|
1903
1782
|
|
|
1904
|
-
|
|
1783
|
+
/**
|
|
1784
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1785
|
+
* this type TableMap.
|
|
1786
|
+
* @deprecated
|
|
1787
|
+
*/
|
|
1788
|
+
export class TableMap {
|
|
1789
|
+
static readonly EVENT_KEYADDED:string;
|
|
1790
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1791
|
+
static readonly EVENT_RECONNECT:string;
|
|
1792
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1905
1793
|
|
|
1906
|
-
|
|
1794
|
+
protected constructor();
|
|
1907
1795
|
}
|
|
1908
1796
|
|
|
1909
1797
|
/**
|
|
1910
|
-
* Describes
|
|
1911
|
-
*
|
|
1912
|
-
* instance.
|
|
1798
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1799
|
+
* column.
|
|
1913
1800
|
*/
|
|
1914
|
-
export class
|
|
1801
|
+
export class Column {
|
|
1802
|
+
/**
|
|
1803
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1804
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1805
|
+
* @return String
|
|
1806
|
+
*/
|
|
1807
|
+
readonly constituentType?:string|null;
|
|
1808
|
+
readonly description?:string|null;
|
|
1809
|
+
|
|
1915
1810
|
protected constructor();
|
|
1916
1811
|
|
|
1917
1812
|
/**
|
|
1918
|
-
* the
|
|
1919
|
-
* @
|
|
1813
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1814
|
+
* @param row -
|
|
1815
|
+
* @return Any
|
|
1920
1816
|
*/
|
|
1921
|
-
|
|
1817
|
+
get(row:Row):any;
|
|
1818
|
+
getFormat(row:Row):Format;
|
|
1922
1819
|
/**
|
|
1923
|
-
* a
|
|
1924
|
-
* @
|
|
1925
|
-
* @return FilterCondition
|
|
1820
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
1821
|
+
* @return {@link dh.Sort}
|
|
1926
1822
|
*/
|
|
1927
|
-
|
|
1823
|
+
sort():Sort;
|
|
1928
1824
|
/**
|
|
1929
|
-
* a
|
|
1930
|
-
*
|
|
1931
|
-
* @return
|
|
1825
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1826
|
+
* operation, or as a builder to create a filter operation.
|
|
1827
|
+
* @return {@link dh.FilterValue}
|
|
1932
1828
|
*/
|
|
1933
|
-
|
|
1829
|
+
filter():FilterValue;
|
|
1934
1830
|
/**
|
|
1935
|
-
* a
|
|
1936
|
-
* @
|
|
1831
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1832
|
+
* @param expression -
|
|
1833
|
+
* @return {@link dh.CustomColumn}
|
|
1834
|
+
*/
|
|
1835
|
+
formatColor(expression:string):CustomColumn;
|
|
1836
|
+
/**
|
|
1837
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1838
|
+
* @param expression -
|
|
1839
|
+
* @return {@link dh.CustomColumn}
|
|
1937
1840
|
*/
|
|
1841
|
+
formatNumber(expression:string):CustomColumn;
|
|
1842
|
+
/**
|
|
1843
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1844
|
+
* @param expression -
|
|
1845
|
+
* @return {@link dh.CustomColumn}
|
|
1846
|
+
*/
|
|
1847
|
+
formatDate(expression:string):CustomColumn;
|
|
1938
1848
|
toString():string;
|
|
1939
|
-
get columns():Array<Column>;
|
|
1940
1849
|
/**
|
|
1941
|
-
*
|
|
1942
|
-
*
|
|
1943
|
-
* <ul>
|
|
1944
|
-
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1945
|
-
* than the third</li>
|
|
1946
|
-
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1947
|
-
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1948
|
-
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1949
|
-
* "not a number"</i></li>
|
|
1950
|
-
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1951
|
-
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1952
|
-
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1953
|
-
* expression</li>
|
|
1954
|
-
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1955
|
-
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1956
|
-
* <p>
|
|
1957
|
-
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1958
|
-
* method should be used in other cases
|
|
1959
|
-
* </p>
|
|
1960
|
-
* </li>
|
|
1961
|
-
* </ul>
|
|
1962
|
-
* @param function -
|
|
1963
|
-
* @param args -
|
|
1964
|
-
* @return dh.FilterCondition
|
|
1850
|
+
* Label for this column.
|
|
1851
|
+
* @return String
|
|
1965
1852
|
*/
|
|
1966
|
-
|
|
1853
|
+
get name():string;
|
|
1854
|
+
/**
|
|
1855
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
|
|
1856
|
+
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
1857
|
+
* @return boolean
|
|
1858
|
+
*/
|
|
1859
|
+
get isPartitionColumn():boolean;
|
|
1860
|
+
/**
|
|
1861
|
+
*
|
|
1862
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1863
|
+
* @return int
|
|
1864
|
+
*/
|
|
1865
|
+
get index():number;
|
|
1866
|
+
get isSortable():boolean;
|
|
1867
|
+
/**
|
|
1868
|
+
* Type of the row data that can be found in this column.
|
|
1869
|
+
* @return String
|
|
1870
|
+
*/
|
|
1871
|
+
get type():string;
|
|
1872
|
+
/**
|
|
1873
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
1874
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1875
|
+
* @param expression -
|
|
1876
|
+
* @return {@link dh.CustomColumn}
|
|
1877
|
+
*/
|
|
1878
|
+
static formatRowColor(expression:string):CustomColumn;
|
|
1879
|
+
/**
|
|
1880
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1881
|
+
* @param name -
|
|
1882
|
+
* @param expression -
|
|
1883
|
+
* @return {@link dh.CustomColumn}
|
|
1884
|
+
*/
|
|
1885
|
+
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1890
|
+
* mechanism, and so reimplemented here.
|
|
1891
|
+
* <p>
|
|
1892
|
+
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1893
|
+
* <p>
|
|
1894
|
+
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1895
|
+
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1896
|
+
* <p>
|
|
1897
|
+
* The table size will be -1 until a viewport has been fetched.
|
|
1898
|
+
* <p>
|
|
1899
|
+
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1900
|
+
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1901
|
+
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1902
|
+
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1903
|
+
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1904
|
+
* the viewport).
|
|
1905
|
+
* <p>
|
|
1906
|
+
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1907
|
+
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1908
|
+
* <p>
|
|
1909
|
+
* <ul>
|
|
1910
|
+
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1911
|
+
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1912
|
+
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1913
|
+
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1914
|
+
* new operation is pending.</li>
|
|
1915
|
+
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
1916
|
+
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
1917
|
+
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1918
|
+
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1919
|
+
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1920
|
+
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1921
|
+
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1922
|
+
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1923
|
+
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1924
|
+
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1925
|
+
* where {@link TreeRow.hasChildren} is false will be different from usual.</li>
|
|
1926
|
+
* </ul>
|
|
1927
|
+
*/
|
|
1928
|
+
export class TreeTable implements HasEventHandling {
|
|
1967
1929
|
/**
|
|
1968
|
-
*
|
|
1969
|
-
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1970
|
-
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1971
|
-
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1972
|
-
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1973
|
-
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1974
|
-
* {@link dh.Column.filter}).
|
|
1975
|
-
* @param value -
|
|
1976
|
-
* @param columns -
|
|
1977
|
-
* @return dh.FilterCondition
|
|
1930
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1978
1931
|
*/
|
|
1979
|
-
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
/**
|
|
1983
|
-
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1984
|
-
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1985
|
-
* inform the UI right away that they have taken place.
|
|
1986
|
-
*/
|
|
1987
|
-
export class Table implements JoinableTable, HasEventHandling {
|
|
1988
|
-
readonly description?:string|null;
|
|
1989
|
-
readonly pluginName?:string|null;
|
|
1990
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1991
|
-
static readonly EVENT_SIZECHANGED:string;
|
|
1992
1932
|
static readonly EVENT_UPDATED:string;
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
static readonly EVENT_SORTCHANGED:string;
|
|
1997
|
-
static readonly EVENT_FILTERCHANGED:string;
|
|
1998
|
-
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1933
|
+
/**
|
|
1934
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1935
|
+
*/
|
|
1999
1936
|
static readonly EVENT_DISCONNECT:string;
|
|
1937
|
+
/**
|
|
1938
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1939
|
+
*/
|
|
2000
1940
|
static readonly EVENT_RECONNECT:string;
|
|
1941
|
+
/**
|
|
1942
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1943
|
+
*/
|
|
2001
1944
|
static readonly EVENT_RECONNECTFAILED:string;
|
|
1945
|
+
/**
|
|
1946
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1947
|
+
*/
|
|
2002
1948
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
2003
|
-
|
|
2004
|
-
|
|
1949
|
+
readonly description?:string|null;
|
|
1950
|
+
readonly layoutHints?:null|LayoutHints;
|
|
2005
1951
|
|
|
2006
1952
|
protected constructor();
|
|
2007
1953
|
|
|
2008
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
2009
1954
|
/**
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
2012
|
-
*
|
|
2013
|
-
*
|
|
1955
|
+
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1956
|
+
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1957
|
+
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1958
|
+
* boolean parameter.
|
|
1959
|
+
* @param row -
|
|
1960
|
+
* @param expandDescendants -
|
|
2014
1961
|
*/
|
|
2015
|
-
|
|
1962
|
+
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
2016
1963
|
/**
|
|
2017
|
-
*
|
|
2018
|
-
*
|
|
2019
|
-
* @
|
|
1964
|
+
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1965
|
+
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1966
|
+
* @param row -
|
|
2020
1967
|
*/
|
|
2021
|
-
|
|
2022
|
-
isBlinkTable():boolean;
|
|
1968
|
+
collapse(row:TreeRow|number):void;
|
|
2023
1969
|
/**
|
|
2024
|
-
*
|
|
2025
|
-
*
|
|
2026
|
-
*
|
|
1970
|
+
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1971
|
+
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1972
|
+
* is true, then its children will also be expanded.
|
|
1973
|
+
* @param row -
|
|
1974
|
+
* @param isExpanded -
|
|
1975
|
+
* @param expandDescendants -
|
|
2027
1976
|
*/
|
|
2028
|
-
|
|
1977
|
+
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1978
|
+
expandAll():void;
|
|
1979
|
+
collapseAll():void;
|
|
2029
1980
|
/**
|
|
2030
|
-
*
|
|
1981
|
+
* true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
|
|
1982
|
+
* is available
|
|
1983
|
+
* @param row -
|
|
1984
|
+
* @return boolean
|
|
2031
1985
|
*/
|
|
2032
|
-
|
|
2033
|
-
|
|
1986
|
+
isExpanded(row:TreeRow|number):boolean;
|
|
1987
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1988
|
+
getViewportData():Promise<TreeViewportData>;
|
|
2034
1989
|
/**
|
|
2035
|
-
*
|
|
2036
|
-
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
2037
|
-
* @param attributeName -
|
|
2038
|
-
* @return Object
|
|
1990
|
+
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
2039
1991
|
*/
|
|
2040
|
-
|
|
1992
|
+
close():void;
|
|
1993
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2041
1994
|
/**
|
|
2042
|
-
*
|
|
2043
|
-
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
2044
|
-
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
2045
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
2046
|
-
* not.
|
|
1995
|
+
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
2047
1996
|
* @param sort -
|
|
2048
1997
|
* @return {@link dh.Sort} array
|
|
2049
1998
|
*/
|
|
2050
1999
|
applySort(sort:Sort[]):Array<Sort>;
|
|
2051
2000
|
/**
|
|
2052
|
-
*
|
|
2053
|
-
* will
|
|
2054
|
-
*
|
|
2055
|
-
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
2056
|
-
* will not.
|
|
2001
|
+
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
2002
|
+
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
2003
|
+
* condition. Returns the previous sort in use.
|
|
2057
2004
|
* @param filter -
|
|
2058
2005
|
* @return {@link dh.FilterCondition} array
|
|
2059
2006
|
*/
|
|
2060
2007
|
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
2061
2008
|
/**
|
|
2062
|
-
*
|
|
2063
|
-
* @param
|
|
2064
|
-
* @return {@link dh.
|
|
2065
|
-
*/
|
|
2066
|
-
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
2067
|
-
/**
|
|
2068
|
-
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
2069
|
-
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
2070
|
-
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
2071
|
-
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
2072
|
-
* needed.
|
|
2073
|
-
* @param firstRow -
|
|
2074
|
-
* @param lastRow -
|
|
2075
|
-
* @param columns -
|
|
2076
|
-
* @param updateIntervalMs -
|
|
2077
|
-
* @return {@link dh.TableViewportSubscription}
|
|
2078
|
-
*/
|
|
2079
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
|
|
2080
|
-
/**
|
|
2081
|
-
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
2082
|
-
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
2083
|
-
* separate the lifespan of this promise from the table itself, call
|
|
2084
|
-
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
2085
|
-
* @return Promise of {@link dh.TableData}
|
|
2009
|
+
* a column with the given name, or throws an exception if it cannot be found
|
|
2010
|
+
* @param key -
|
|
2011
|
+
* @return {@link dh.Column}
|
|
2086
2012
|
*/
|
|
2087
|
-
|
|
2013
|
+
findColumn(key:string):Column;
|
|
2088
2014
|
/**
|
|
2089
|
-
*
|
|
2090
|
-
*
|
|
2091
|
-
*
|
|
2092
|
-
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
2093
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
2094
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
2095
|
-
* @param columns -
|
|
2096
|
-
* @param updateIntervalMs -
|
|
2097
|
-
* @return {@link dh.TableSubscription}
|
|
2015
|
+
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
2016
|
+
* @param keys -
|
|
2017
|
+
* @return {@link dh.Column} array
|
|
2098
2018
|
*/
|
|
2099
|
-
|
|
2019
|
+
findColumns(keys:string[]):Column[];
|
|
2100
2020
|
/**
|
|
2101
|
-
*
|
|
2102
|
-
*
|
|
2103
|
-
*
|
|
2104
|
-
*
|
|
2105
|
-
*
|
|
2021
|
+
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
2022
|
+
* values for the given columns in the source table:
|
|
2023
|
+
* <ul>
|
|
2024
|
+
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
2025
|
+
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
2026
|
+
* the tree.</li>
|
|
2027
|
+
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
2028
|
+
* in the resulting table.</li>
|
|
2029
|
+
* </ul>
|
|
2106
2030
|
*/
|
|
2107
2031
|
selectDistinct(columns:Column[]):Promise<Table>;
|
|
2032
|
+
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
2033
|
+
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
2034
|
+
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
2108
2035
|
/**
|
|
2109
|
-
*
|
|
2110
|
-
*
|
|
2036
|
+
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
2037
|
+
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
2038
|
+
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
2039
|
+
* state is also not copied.
|
|
2040
|
+
* @return Promise of dh.TreeTable
|
|
2111
2041
|
*/
|
|
2112
|
-
copy():Promise<
|
|
2042
|
+
copy():Promise<TreeTable>;
|
|
2113
2043
|
/**
|
|
2114
|
-
*
|
|
2115
|
-
*
|
|
2116
|
-
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
2117
|
-
* called on it when not in use.
|
|
2118
|
-
* @param config -
|
|
2119
|
-
* @return Promise of dh.TotalsTable
|
|
2044
|
+
* The current filter configuration of this Tree Table.
|
|
2045
|
+
* @return {@link dh.FilterCondition} array
|
|
2120
2046
|
*/
|
|
2121
|
-
|
|
2047
|
+
get filter():Array<FilterCondition>;
|
|
2122
2048
|
/**
|
|
2123
|
-
*
|
|
2124
|
-
*
|
|
2125
|
-
* @param config -
|
|
2126
|
-
* @return promise of dh.TotalsTable
|
|
2049
|
+
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
2050
|
+
* @return boolean
|
|
2127
2051
|
*/
|
|
2128
|
-
|
|
2052
|
+
get includeConstituents():boolean;
|
|
2053
|
+
get groupedColumns():Array<Column>;
|
|
2129
2054
|
/**
|
|
2130
|
-
*
|
|
2131
|
-
*
|
|
2132
|
-
* @param configObject -
|
|
2133
|
-
* @return Promise of dh.TreeTable
|
|
2055
|
+
* True if this table has been closed.
|
|
2056
|
+
* @return boolean
|
|
2134
2057
|
*/
|
|
2135
|
-
|
|
2058
|
+
get isClosed():boolean;
|
|
2136
2059
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2140
|
-
* @return
|
|
2060
|
+
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
2061
|
+
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
2062
|
+
* when considering collapse/expand states).
|
|
2063
|
+
* @return double
|
|
2141
2064
|
*/
|
|
2142
|
-
|
|
2065
|
+
get size():number;
|
|
2143
2066
|
/**
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2146
|
-
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
2147
|
-
* @return Promise of dh.Table
|
|
2067
|
+
* The columns that can be shown in this Tree Table.
|
|
2068
|
+
* @return {@link dh.Column} array
|
|
2148
2069
|
*/
|
|
2149
|
-
|
|
2150
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
2070
|
+
get columns():Array<Column>;
|
|
2151
2071
|
/**
|
|
2152
|
-
*
|
|
2153
|
-
* @
|
|
2154
|
-
* @deprecated
|
|
2072
|
+
* The current sort configuration of this Tree Table
|
|
2073
|
+
* @return {@link dh.Sort} array.
|
|
2155
2074
|
*/
|
|
2156
|
-
|
|
2157
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2158
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
2159
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2160
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2161
|
-
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2075
|
+
get sort():Array<Sort>;
|
|
2162
2076
|
/**
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
* @
|
|
2166
|
-
|
|
2167
|
-
|
|
2077
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2078
|
+
* initial snapshot.
|
|
2079
|
+
* @return boolean
|
|
2080
|
+
*/
|
|
2081
|
+
get isRefreshing():boolean;
|
|
2082
|
+
/**
|
|
2083
|
+
* Listen for events on this object.
|
|
2084
|
+
* @param name - the name of the event to listen for
|
|
2085
|
+
* @param callback - a function to call when the event occurs
|
|
2086
|
+
* @return Returns a cleanup function.
|
|
2087
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2168
2088
|
*/
|
|
2169
|
-
|
|
2089
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2090
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2091
|
+
hasListeners(name:string):boolean;
|
|
2170
2092
|
/**
|
|
2171
|
-
*
|
|
2172
|
-
* @param
|
|
2173
|
-
* @
|
|
2093
|
+
* Removes an event listener added to this table.
|
|
2094
|
+
* @param name -
|
|
2095
|
+
* @param callback -
|
|
2096
|
+
* @return
|
|
2097
|
+
* @typeParam T -
|
|
2174
2098
|
*/
|
|
2175
|
-
|
|
2099
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
2104
|
+
* the server to get each Table. All tables will have the same structure.
|
|
2105
|
+
*/
|
|
2106
|
+
export class PartitionedTable implements HasEventHandling {
|
|
2176
2107
|
/**
|
|
2177
|
-
*
|
|
2178
|
-
* @param startingRow - Row to start the seek from
|
|
2179
|
-
* @param column - Column to seek for value on
|
|
2180
|
-
* @param valueType - Type of value provided
|
|
2181
|
-
* @param seekValue - Value to seek
|
|
2182
|
-
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
2183
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
2184
|
-
* `false`.
|
|
2185
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
2186
|
-
* @return A promise that resolves to the row value found.
|
|
2108
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2187
2109
|
*/
|
|
2188
|
-
|
|
2189
|
-
toString():string;
|
|
2110
|
+
static readonly EVENT_KEYADDED:string;
|
|
2190
2111
|
/**
|
|
2191
|
-
*
|
|
2192
|
-
* .inputTable() to add or remove data from the underlying table.
|
|
2193
|
-
* @return boolean
|
|
2112
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2194
2113
|
*/
|
|
2195
|
-
|
|
2114
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2196
2115
|
/**
|
|
2197
|
-
*
|
|
2198
|
-
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
2199
|
-
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
2200
|
-
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
2201
|
-
* @return {@link dh.Column} array
|
|
2116
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2202
2117
|
*/
|
|
2203
|
-
|
|
2118
|
+
static readonly EVENT_RECONNECT:string;
|
|
2204
2119
|
/**
|
|
2205
|
-
*
|
|
2206
|
-
* @return dh.TotalsTableConfig
|
|
2120
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2207
2121
|
*/
|
|
2208
|
-
|
|
2122
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
2123
|
+
|
|
2124
|
+
protected constructor();
|
|
2125
|
+
|
|
2126
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2209
2127
|
/**
|
|
2210
|
-
*
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2213
|
-
* @return {@link dh.Sort} array
|
|
2128
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
2129
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
2130
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
2214
2131
|
*/
|
|
2215
|
-
|
|
2132
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
2216
2133
|
/**
|
|
2217
|
-
*
|
|
2218
|
-
*
|
|
2219
|
-
* @return
|
|
2134
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
2135
|
+
* {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
|
|
2136
|
+
* @return A merged representation of the constituent tables.
|
|
2220
2137
|
*/
|
|
2221
|
-
|
|
2138
|
+
getMergedTable():Promise<Table>;
|
|
2222
2139
|
/**
|
|
2223
|
-
*
|
|
2224
|
-
*
|
|
2225
|
-
* @return
|
|
2140
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
2141
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
2142
|
+
* @return Set of Object
|
|
2226
2143
|
*/
|
|
2227
|
-
|
|
2144
|
+
getKeys():Set<object>;
|
|
2228
2145
|
/**
|
|
2229
|
-
*
|
|
2230
|
-
* return
|
|
2231
|
-
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
2232
|
-
* @return {@link dh.FilterCondition} array
|
|
2146
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
2147
|
+
* @return Promise of a Table
|
|
2233
2148
|
*/
|
|
2234
|
-
|
|
2149
|
+
getKeyTable():Promise<Table>;
|
|
2235
2150
|
/**
|
|
2236
|
-
*
|
|
2237
|
-
* not
|
|
2238
|
-
* applySort(). Note that this getter will return the new value immediately, even though it may take a little time
|
|
2239
|
-
* to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
|
|
2240
|
-
* @return double
|
|
2151
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
2152
|
+
* will not affect tables in use.
|
|
2241
2153
|
*/
|
|
2242
|
-
|
|
2154
|
+
close():void;
|
|
2243
2155
|
/**
|
|
2244
|
-
* The
|
|
2245
|
-
*
|
|
2246
|
-
* property). for details).
|
|
2247
|
-
* @return double
|
|
2156
|
+
* The count of known keys.
|
|
2157
|
+
* @return int
|
|
2248
2158
|
*/
|
|
2249
2159
|
get size():number;
|
|
2250
2160
|
/**
|
|
2251
|
-
*
|
|
2252
|
-
*
|
|
2161
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
2162
|
+
* non-key columns.
|
|
2163
|
+
* @return Array of Column
|
|
2253
2164
|
*/
|
|
2254
|
-
get
|
|
2165
|
+
get columns():Column[];
|
|
2255
2166
|
/**
|
|
2256
|
-
*
|
|
2257
|
-
*
|
|
2258
|
-
* will be unavailable until table is coalesced.
|
|
2259
|
-
* @return boolean
|
|
2167
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
2168
|
+
* @return Array of Column
|
|
2260
2169
|
*/
|
|
2261
|
-
get
|
|
2170
|
+
get keyColumns():Column[];
|
|
2262
2171
|
/**
|
|
2263
2172
|
* Listen for events on this object.
|
|
2264
2173
|
* @param name - the name of the event to listen for
|
|
@@ -2277,12 +2186,74 @@ export namespace dh {
|
|
|
2277
2186
|
* @typeParam T -
|
|
2278
2187
|
*/
|
|
2279
2188
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
export class IdeSession implements HasEventHandling {
|
|
2192
|
+
static readonly EVENT_COMMANDSTARTED:string;
|
|
2193
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2194
|
+
|
|
2195
|
+
protected constructor();
|
|
2196
|
+
|
|
2280
2197
|
/**
|
|
2281
|
-
*
|
|
2282
|
-
*
|
|
2283
|
-
* @
|
|
2198
|
+
* Load the named table, with columns and size information already fully populated.
|
|
2199
|
+
* @param name -
|
|
2200
|
+
* @param applyPreviewColumns - optional boolean
|
|
2201
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2284
2202
|
*/
|
|
2285
|
-
|
|
2203
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
2204
|
+
/**
|
|
2205
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
2206
|
+
* @param name -
|
|
2207
|
+
* @return promise of dh.plot.Figure
|
|
2208
|
+
*/
|
|
2209
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
2210
|
+
/**
|
|
2211
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
2212
|
+
* size is presently not available until the viewport is first set.
|
|
2213
|
+
* @param name -
|
|
2214
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
2215
|
+
*/
|
|
2216
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
2217
|
+
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2218
|
+
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2219
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2220
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2221
|
+
/**
|
|
2222
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
2223
|
+
* @param tables -
|
|
2224
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2225
|
+
*/
|
|
2226
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
2227
|
+
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2228
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2229
|
+
close():void;
|
|
2230
|
+
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2231
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2232
|
+
openDocument(params:object):void;
|
|
2233
|
+
changeDocument(params:object):void;
|
|
2234
|
+
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2235
|
+
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2236
|
+
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2237
|
+
closeDocument(params:object):void;
|
|
2238
|
+
/**
|
|
2239
|
+
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
2240
|
+
* values will be null.
|
|
2241
|
+
* @param size -
|
|
2242
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2243
|
+
*/
|
|
2244
|
+
emptyTable(size:number):Promise<Table>;
|
|
2245
|
+
/**
|
|
2246
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
2247
|
+
* the table will be populated with the interval from the specified date until now.
|
|
2248
|
+
* @param periodNanos -
|
|
2249
|
+
* @param startTime -
|
|
2250
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2251
|
+
*/
|
|
2252
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
2253
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2254
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2255
|
+
hasListeners(name:string):boolean;
|
|
2256
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2286
2257
|
}
|
|
2287
2258
|
|
|
2288
2259
|
/**
|
|
@@ -2311,42 +2282,71 @@ export namespace dh {
|
|
|
2311
2282
|
get size():number;
|
|
2312
2283
|
}
|
|
2313
2284
|
|
|
2314
|
-
export class
|
|
2315
|
-
|
|
2285
|
+
export class LoginCredentials {
|
|
2286
|
+
type?:string|null;
|
|
2287
|
+
username?:string|null;
|
|
2288
|
+
token?:string|null;
|
|
2316
2289
|
|
|
2317
|
-
|
|
2318
|
-
asNumber():number;
|
|
2319
|
-
valueOf():string;
|
|
2320
|
-
toString():string;
|
|
2290
|
+
constructor();
|
|
2321
2291
|
}
|
|
2322
2292
|
|
|
2323
|
-
|
|
2324
|
-
|
|
2293
|
+
/**
|
|
2294
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
2295
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
2296
|
+
*/
|
|
2297
|
+
export class IdeConnection implements HasEventHandling {
|
|
2298
|
+
/**
|
|
2299
|
+
* @deprecated
|
|
2300
|
+
*/
|
|
2301
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
2325
2302
|
static readonly EVENT_DISCONNECT:string;
|
|
2326
2303
|
static readonly EVENT_RECONNECT:string;
|
|
2327
|
-
static readonly
|
|
2328
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
2329
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
2330
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
2331
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2332
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
2333
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
2304
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
2334
2305
|
|
|
2335
|
-
|
|
2306
|
+
/**
|
|
2307
|
+
* creates a new instance, from which console sessions can be made. <b>options</b> are optional.
|
|
2308
|
+
* @param serverUrl - The url used when connecting to the server. Read-only.
|
|
2309
|
+
* @param connectOptions - Optional Object
|
|
2310
|
+
* @param fromJava - Optional boolean
|
|
2311
|
+
* @deprecated
|
|
2312
|
+
*/
|
|
2313
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
|
|
2336
2314
|
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2315
|
+
/**
|
|
2316
|
+
* closes the current connection, releasing any resources on the server or client.
|
|
2317
|
+
*/
|
|
2318
|
+
close():void;
|
|
2319
|
+
running():Promise<IdeConnection>;
|
|
2320
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2321
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2322
|
+
/**
|
|
2323
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
2324
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
2325
|
+
* log messages as are presently available.
|
|
2326
|
+
* @param callback -
|
|
2327
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
2328
|
+
*/
|
|
2329
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2330
|
+
startSession(type:string):Promise<IdeSession>;
|
|
2331
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
2332
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
2333
|
+
/**
|
|
2334
|
+
* Listen for events on this object.
|
|
2335
|
+
* @param name - the name of the event to listen for
|
|
2336
|
+
* @param callback - a function to call when the event occurs
|
|
2337
|
+
* @return Returns a cleanup function.
|
|
2338
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2339
|
+
*/
|
|
2347
2340
|
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2348
2341
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2349
2342
|
hasListeners(name:string):boolean;
|
|
2343
|
+
/**
|
|
2344
|
+
* Removes an event listener added to this table.
|
|
2345
|
+
* @param name -
|
|
2346
|
+
* @param callback -
|
|
2347
|
+
* @return
|
|
2348
|
+
* @typeParam T -
|
|
2349
|
+
*/
|
|
2350
2350
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2351
2351
|
}
|
|
2352
2352
|
|
|
@@ -2409,6 +2409,14 @@ export namespace dh {
|
|
|
2409
2409
|
|
|
2410
2410
|
export namespace dh.ide {
|
|
2411
2411
|
|
|
2412
|
+
/**
|
|
2413
|
+
* Specifies a type and either id or name (but not both).
|
|
2414
|
+
*/
|
|
2415
|
+
export interface VariableDescriptor {
|
|
2416
|
+
type:string;
|
|
2417
|
+
id?:string|null;
|
|
2418
|
+
name?:string|null;
|
|
2419
|
+
}
|
|
2412
2420
|
/**
|
|
2413
2421
|
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2414
2422
|
* server.
|
|
@@ -2431,29 +2439,6 @@ export namespace dh.ide {
|
|
|
2431
2439
|
get message():string;
|
|
2432
2440
|
}
|
|
2433
2441
|
/**
|
|
2434
|
-
* Indicates the result of code run on the server.
|
|
2435
|
-
*/
|
|
2436
|
-
export interface CommandResult {
|
|
2437
|
-
/**
|
|
2438
|
-
* Describes changes made in the course of this command.
|
|
2439
|
-
* @return {@link dh.ide.VariableChanges}.
|
|
2440
|
-
*/
|
|
2441
|
-
get changes():VariableChanges;
|
|
2442
|
-
/**
|
|
2443
|
-
* If the command failed, the error message will be provided here.
|
|
2444
|
-
* @return String
|
|
2445
|
-
*/
|
|
2446
|
-
get error():string;
|
|
2447
|
-
}
|
|
2448
|
-
/**
|
|
2449
|
-
* Specifies a type and either id or name (but not both).
|
|
2450
|
-
*/
|
|
2451
|
-
export interface VariableDescriptor {
|
|
2452
|
-
type:string;
|
|
2453
|
-
id?:string|null;
|
|
2454
|
-
name?:string|null;
|
|
2455
|
-
}
|
|
2456
|
-
/**
|
|
2457
2442
|
* A format to describe a variable available to be read from the server. Application fields are optional, and only
|
|
2458
2443
|
* populated when a variable is provided by application mode.
|
|
2459
2444
|
* <p>
|
|
@@ -2518,121 +2503,79 @@ export namespace dh.ide {
|
|
|
2518
2503
|
*/
|
|
2519
2504
|
get updated():Array<VariableDefinition>;
|
|
2520
2505
|
}
|
|
2506
|
+
/**
|
|
2507
|
+
* Indicates the result of code run on the server.
|
|
2508
|
+
*/
|
|
2509
|
+
export interface CommandResult {
|
|
2510
|
+
/**
|
|
2511
|
+
* Describes changes made in the course of this command.
|
|
2512
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2513
|
+
*/
|
|
2514
|
+
get changes():VariableChanges;
|
|
2515
|
+
/**
|
|
2516
|
+
* If the command failed, the error message will be provided here.
|
|
2517
|
+
* @return String
|
|
2518
|
+
*/
|
|
2519
|
+
get error():string;
|
|
2520
|
+
}
|
|
2521
2521
|
}
|
|
2522
2522
|
|
|
2523
2523
|
export namespace dh.i18n {
|
|
2524
2524
|
|
|
2525
2525
|
/**
|
|
2526
|
-
*
|
|
2527
|
-
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
2528
|
-
* <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
|
|
2529
|
-
* instance.
|
|
2530
|
-
*
|
|
2531
|
-
*
|
|
2532
|
-
* The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
|
|
2533
|
-
* return the same details:
|
|
2534
|
-
*
|
|
2535
|
-
* <ul>
|
|
2536
|
-
* <li>GMT/UTC</li>
|
|
2537
|
-
* <li>Asia/Tokyo</li>
|
|
2538
|
-
* <li>Asia/Seoul</li>
|
|
2539
|
-
* <li>Asia/Hong_Kong</li>
|
|
2540
|
-
* <li>Asia/Singapore</li>
|
|
2541
|
-
* <li>Asia/Calcutta/Asia/Kolkata</li>
|
|
2542
|
-
* <li>Europe/Berlin</li>
|
|
2543
|
-
* <li>Europe/London</li>
|
|
2544
|
-
* <li>America/Sao_Paulo</li>
|
|
2545
|
-
* <li>America/St_Johns</li>
|
|
2546
|
-
* <li>America/Halifax</li>
|
|
2547
|
-
* <li>America/New_York</li>
|
|
2548
|
-
* <li>America/Chicago</li>
|
|
2549
|
-
* <li>America/Denver</li>
|
|
2550
|
-
* <li>America/Los_Angeles</li>
|
|
2551
|
-
* <li>America/Anchorage</li>
|
|
2552
|
-
* <li>Pacific/Honolulu</li>
|
|
2553
|
-
* </ul>
|
|
2554
|
-
*
|
|
2555
|
-
* A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
|
|
2526
|
+
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2556
2527
|
*
|
|
2557
|
-
*
|
|
2558
|
-
*
|
|
2559
|
-
*
|
|
2560
|
-
* <li>Z</li>
|
|
2561
|
-
* <li>NY</li>
|
|
2562
|
-
* <li>ET</li>
|
|
2563
|
-
* <li>EST</li>
|
|
2564
|
-
* <li>EDT</li>
|
|
2565
|
-
* <li>MN</li>
|
|
2566
|
-
* <li>CT</li>
|
|
2567
|
-
* <li>CST</li>
|
|
2568
|
-
* <li>CDT</li>
|
|
2569
|
-
* <li>MT</li>
|
|
2570
|
-
* <li>MST</li>
|
|
2571
|
-
* <li>MDT</li>
|
|
2572
|
-
* <li>PT</li>
|
|
2573
|
-
* <li>PST</li>
|
|
2574
|
-
* <li>PDT</li>
|
|
2575
|
-
* <li>HI</li>
|
|
2576
|
-
* <li>HST</li>
|
|
2577
|
-
* <li>HDT</li>
|
|
2578
|
-
* <li>BT</li>
|
|
2579
|
-
* <li>BRST</li>
|
|
2580
|
-
* <li>BRT</li>
|
|
2581
|
-
* <li>KR</li>
|
|
2582
|
-
* <li>KST</li>
|
|
2583
|
-
* <li>HK</li>
|
|
2584
|
-
* <li>HKT</li>
|
|
2585
|
-
* <li>JP</li>
|
|
2586
|
-
* <li>JST</li>
|
|
2587
|
-
* <li>AT</li>
|
|
2588
|
-
* <li>AST</li>
|
|
2589
|
-
* <li>ADT</li>
|
|
2590
|
-
* <li>NF</li>
|
|
2591
|
-
* <li>NST</li>
|
|
2592
|
-
* <li>NDT</li>
|
|
2593
|
-
* <li>AL</li>
|
|
2594
|
-
* <li>AKST</li>
|
|
2595
|
-
* <li>AKDT</li>
|
|
2596
|
-
* <li>IN</li>
|
|
2597
|
-
* <li>IST</li>
|
|
2598
|
-
* <li>CE</li>
|
|
2599
|
-
* <li>CET</li>
|
|
2600
|
-
* <li>CEST</li>
|
|
2601
|
-
* <li>SG</li>
|
|
2602
|
-
* <li>SGT</li>
|
|
2603
|
-
* <li>LON</li>
|
|
2604
|
-
* <li>BST</li>
|
|
2605
|
-
* <li>MOS</li>
|
|
2606
|
-
* <li>SHG</li>
|
|
2607
|
-
* <li>CH</li>
|
|
2608
|
-
* <li>NL</li>
|
|
2609
|
-
* <li>TW</li>
|
|
2610
|
-
* <li>SYD</li>
|
|
2611
|
-
* <li>AEST</li>
|
|
2612
|
-
* <li>AEDT</li>
|
|
2613
|
-
* </ul>
|
|
2528
|
+
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2529
|
+
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2530
|
+
* BigDecimal.
|
|
2614
2531
|
*/
|
|
2615
|
-
export class
|
|
2616
|
-
|
|
2532
|
+
export class NumberFormat {
|
|
2533
|
+
/**
|
|
2534
|
+
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2535
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2536
|
+
* @param pattern -
|
|
2537
|
+
*/
|
|
2538
|
+
constructor(pattern:string);
|
|
2617
2539
|
|
|
2618
2540
|
/**
|
|
2619
|
-
*
|
|
2620
|
-
*
|
|
2621
|
-
*
|
|
2541
|
+
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2542
|
+
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2543
|
+
* take advantage of caching
|
|
2544
|
+
* @param pattern -
|
|
2545
|
+
* @return dh.i18n.NumberFormat
|
|
2622
2546
|
*/
|
|
2623
|
-
static
|
|
2547
|
+
static getFormat(pattern:string):NumberFormat;
|
|
2624
2548
|
/**
|
|
2625
|
-
* the
|
|
2626
|
-
* @
|
|
2549
|
+
* Parses the given text using the cached format matching the given pattern.
|
|
2550
|
+
* @param pattern -
|
|
2551
|
+
* @param text -
|
|
2552
|
+
* @return double
|
|
2627
2553
|
*/
|
|
2628
|
-
|
|
2554
|
+
static parse(pattern:string, text:string):number;
|
|
2629
2555
|
/**
|
|
2630
|
-
* the
|
|
2556
|
+
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2557
|
+
* format matching the given pattern string.
|
|
2558
|
+
* @param pattern -
|
|
2559
|
+
* @param number -
|
|
2631
2560
|
* @return String
|
|
2632
2561
|
*/
|
|
2633
|
-
|
|
2562
|
+
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2563
|
+
/**
|
|
2564
|
+
* Parses the given text using this instance's pattern into a JS Number.
|
|
2565
|
+
* @param text -
|
|
2566
|
+
* @return double
|
|
2567
|
+
*/
|
|
2568
|
+
parse(text:string):number;
|
|
2569
|
+
/**
|
|
2570
|
+
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2571
|
+
* @param number -
|
|
2572
|
+
* @return String
|
|
2573
|
+
*/
|
|
2574
|
+
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2575
|
+
toString():string;
|
|
2634
2576
|
}
|
|
2635
2577
|
|
|
2578
|
+
|
|
2636
2579
|
/**
|
|
2637
2580
|
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2638
2581
|
* additional 6 decimal places after the rest of the number.
|
|
@@ -2732,93 +2675,120 @@ export namespace dh.i18n {
|
|
|
2732
2675
|
}
|
|
2733
2676
|
|
|
2734
2677
|
/**
|
|
2735
|
-
*
|
|
2678
|
+
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
2679
|
+
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
2680
|
+
* <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
|
|
2681
|
+
* instance.
|
|
2736
2682
|
*
|
|
2737
|
-
*
|
|
2738
|
-
*
|
|
2739
|
-
*
|
|
2683
|
+
*
|
|
2684
|
+
* The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
|
|
2685
|
+
* return the same details:
|
|
2686
|
+
*
|
|
2687
|
+
* <ul>
|
|
2688
|
+
* <li>GMT/UTC</li>
|
|
2689
|
+
* <li>Asia/Tokyo</li>
|
|
2690
|
+
* <li>Asia/Seoul</li>
|
|
2691
|
+
* <li>Asia/Hong_Kong</li>
|
|
2692
|
+
* <li>Asia/Singapore</li>
|
|
2693
|
+
* <li>Asia/Calcutta/Asia/Kolkata</li>
|
|
2694
|
+
* <li>Europe/Berlin</li>
|
|
2695
|
+
* <li>Europe/London</li>
|
|
2696
|
+
* <li>America/Sao_Paulo</li>
|
|
2697
|
+
* <li>America/St_Johns</li>
|
|
2698
|
+
* <li>America/Halifax</li>
|
|
2699
|
+
* <li>America/New_York</li>
|
|
2700
|
+
* <li>America/Chicago</li>
|
|
2701
|
+
* <li>America/Denver</li>
|
|
2702
|
+
* <li>America/Los_Angeles</li>
|
|
2703
|
+
* <li>America/Anchorage</li>
|
|
2704
|
+
* <li>Pacific/Honolulu</li>
|
|
2705
|
+
* </ul>
|
|
2706
|
+
*
|
|
2707
|
+
* A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
|
|
2708
|
+
*
|
|
2709
|
+
* <ul>
|
|
2710
|
+
* <li>UTC</li>
|
|
2711
|
+
* <li>GMT</li>
|
|
2712
|
+
* <li>Z</li>
|
|
2713
|
+
* <li>NY</li>
|
|
2714
|
+
* <li>ET</li>
|
|
2715
|
+
* <li>EST</li>
|
|
2716
|
+
* <li>EDT</li>
|
|
2717
|
+
* <li>MN</li>
|
|
2718
|
+
* <li>CT</li>
|
|
2719
|
+
* <li>CST</li>
|
|
2720
|
+
* <li>CDT</li>
|
|
2721
|
+
* <li>MT</li>
|
|
2722
|
+
* <li>MST</li>
|
|
2723
|
+
* <li>MDT</li>
|
|
2724
|
+
* <li>PT</li>
|
|
2725
|
+
* <li>PST</li>
|
|
2726
|
+
* <li>PDT</li>
|
|
2727
|
+
* <li>HI</li>
|
|
2728
|
+
* <li>HST</li>
|
|
2729
|
+
* <li>HDT</li>
|
|
2730
|
+
* <li>BT</li>
|
|
2731
|
+
* <li>BRST</li>
|
|
2732
|
+
* <li>BRT</li>
|
|
2733
|
+
* <li>KR</li>
|
|
2734
|
+
* <li>KST</li>
|
|
2735
|
+
* <li>HK</li>
|
|
2736
|
+
* <li>HKT</li>
|
|
2737
|
+
* <li>JP</li>
|
|
2738
|
+
* <li>JST</li>
|
|
2739
|
+
* <li>AT</li>
|
|
2740
|
+
* <li>AST</li>
|
|
2741
|
+
* <li>ADT</li>
|
|
2742
|
+
* <li>NF</li>
|
|
2743
|
+
* <li>NST</li>
|
|
2744
|
+
* <li>NDT</li>
|
|
2745
|
+
* <li>AL</li>
|
|
2746
|
+
* <li>AKST</li>
|
|
2747
|
+
* <li>AKDT</li>
|
|
2748
|
+
* <li>IN</li>
|
|
2749
|
+
* <li>IST</li>
|
|
2750
|
+
* <li>CE</li>
|
|
2751
|
+
* <li>CET</li>
|
|
2752
|
+
* <li>CEST</li>
|
|
2753
|
+
* <li>SG</li>
|
|
2754
|
+
* <li>SGT</li>
|
|
2755
|
+
* <li>LON</li>
|
|
2756
|
+
* <li>BST</li>
|
|
2757
|
+
* <li>MOS</li>
|
|
2758
|
+
* <li>SHG</li>
|
|
2759
|
+
* <li>CH</li>
|
|
2760
|
+
* <li>NL</li>
|
|
2761
|
+
* <li>TW</li>
|
|
2762
|
+
* <li>SYD</li>
|
|
2763
|
+
* <li>AEST</li>
|
|
2764
|
+
* <li>AEDT</li>
|
|
2765
|
+
* </ul>
|
|
2740
2766
|
*/
|
|
2741
|
-
export class
|
|
2742
|
-
|
|
2743
|
-
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2744
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2745
|
-
* @param pattern -
|
|
2746
|
-
*/
|
|
2747
|
-
constructor(pattern:string);
|
|
2767
|
+
export class TimeZone {
|
|
2768
|
+
protected constructor();
|
|
2748
2769
|
|
|
2749
2770
|
/**
|
|
2750
|
-
*
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
* @param pattern -
|
|
2754
|
-
* @return dh.i18n.NumberFormat
|
|
2755
|
-
*/
|
|
2756
|
-
static getFormat(pattern:string):NumberFormat;
|
|
2757
|
-
/**
|
|
2758
|
-
* Parses the given text using the cached format matching the given pattern.
|
|
2759
|
-
* @param pattern -
|
|
2760
|
-
* @param text -
|
|
2761
|
-
* @return double
|
|
2762
|
-
*/
|
|
2763
|
-
static parse(pattern:string, text:string):number;
|
|
2764
|
-
/**
|
|
2765
|
-
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2766
|
-
* format matching the given pattern string.
|
|
2767
|
-
* @param pattern -
|
|
2768
|
-
* @param number -
|
|
2769
|
-
* @return String
|
|
2771
|
+
* Factory method which creates timezone instances from one of the supported keys.
|
|
2772
|
+
* @param tzCode -
|
|
2773
|
+
* @return dh.i18n.TimeZone
|
|
2770
2774
|
*/
|
|
2771
|
-
static
|
|
2775
|
+
static getTimeZone(tzCode:string):TimeZone;
|
|
2772
2776
|
/**
|
|
2773
|
-
*
|
|
2774
|
-
* @
|
|
2775
|
-
* @return double
|
|
2777
|
+
* the standard offset of this timezone, in minutes
|
|
2778
|
+
* @return int
|
|
2776
2779
|
*/
|
|
2777
|
-
|
|
2780
|
+
get standardOffset():number;
|
|
2778
2781
|
/**
|
|
2779
|
-
*
|
|
2780
|
-
* @param number -
|
|
2782
|
+
* the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
|
|
2781
2783
|
* @return String
|
|
2782
2784
|
*/
|
|
2783
|
-
|
|
2784
|
-
toString():string;
|
|
2785
|
+
get id():string;
|
|
2785
2786
|
}
|
|
2786
2787
|
|
|
2787
|
-
|
|
2788
2788
|
}
|
|
2789
2789
|
|
|
2790
2790
|
export namespace dh.plot {
|
|
2791
2791
|
|
|
2792
|
-
export interface FigureDataUpdatedEvent {
|
|
2793
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2794
|
-
get series():Series[];
|
|
2795
|
-
}
|
|
2796
|
-
export interface OneClick {
|
|
2797
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
2798
|
-
getValueForColumn(columName:string):any;
|
|
2799
|
-
get requireAllFiltersToDisplay():boolean;
|
|
2800
|
-
get columns():dh.Column[];
|
|
2801
|
-
}
|
|
2802
|
-
/**
|
|
2803
|
-
* Describes how to access and display data required within a series.
|
|
2804
|
-
*/
|
|
2805
|
-
export interface SeriesDataSource {
|
|
2806
|
-
/**
|
|
2807
|
-
* the type of data stored in the underlying table's Column.
|
|
2808
|
-
* @return String
|
|
2809
|
-
*/
|
|
2810
|
-
get columnType():string;
|
|
2811
|
-
/**
|
|
2812
|
-
* the axis that this source should be drawn on.
|
|
2813
|
-
* @return dh.plot.Axis
|
|
2814
|
-
*/
|
|
2815
|
-
get axis():Axis;
|
|
2816
|
-
/**
|
|
2817
|
-
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2818
|
-
* @return int
|
|
2819
|
-
*/
|
|
2820
|
-
get type():SourceTypeType;
|
|
2821
|
-
}
|
|
2822
2792
|
/**
|
|
2823
2793
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
2824
2794
|
* may be shared between Series instances.
|
|
@@ -2888,6 +2858,26 @@ export namespace dh.plot {
|
|
|
2888
2858
|
get minRange():number;
|
|
2889
2859
|
}
|
|
2890
2860
|
/**
|
|
2861
|
+
* Describes how to access and display data required within a series.
|
|
2862
|
+
*/
|
|
2863
|
+
export interface SeriesDataSource {
|
|
2864
|
+
/**
|
|
2865
|
+
* the type of data stored in the underlying table's Column.
|
|
2866
|
+
* @return String
|
|
2867
|
+
*/
|
|
2868
|
+
get columnType():string;
|
|
2869
|
+
/**
|
|
2870
|
+
* the axis that this source should be drawn on.
|
|
2871
|
+
* @return dh.plot.Axis
|
|
2872
|
+
*/
|
|
2873
|
+
get axis():Axis;
|
|
2874
|
+
/**
|
|
2875
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2876
|
+
* @return int
|
|
2877
|
+
*/
|
|
2878
|
+
get type():SourceTypeType;
|
|
2879
|
+
}
|
|
2880
|
+
/**
|
|
2891
2881
|
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2892
2882
|
*/
|
|
2893
2883
|
export interface MultiSeries {
|
|
@@ -2946,14 +2936,15 @@ export namespace dh.plot {
|
|
|
2946
2936
|
get multiSeries():MultiSeries;
|
|
2947
2937
|
get shapeLabel():string;
|
|
2948
2938
|
}
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2939
|
+
export interface FigureDataUpdatedEvent {
|
|
2940
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2941
|
+
get series():Series[];
|
|
2942
|
+
}
|
|
2943
|
+
export interface OneClick {
|
|
2944
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
2945
|
+
getValueForColumn(columName:string):any;
|
|
2946
|
+
get requireAllFiltersToDisplay():boolean;
|
|
2947
|
+
get columns():dh.Column[];
|
|
2957
2948
|
}
|
|
2958
2949
|
|
|
2959
2950
|
export class AxisDescriptor {
|
|
@@ -2980,6 +2971,40 @@ export namespace dh.plot {
|
|
|
2980
2971
|
constructor();
|
|
2981
2972
|
}
|
|
2982
2973
|
|
|
2974
|
+
/**
|
|
2975
|
+
* Provides the details for a figure.
|
|
2976
|
+
*
|
|
2977
|
+
* The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
|
|
2978
|
+
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
2979
|
+
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
2980
|
+
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
2981
|
+
* any) to reduce the number of points sent to the client.
|
|
2982
|
+
*
|
|
2983
|
+
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
2984
|
+
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
2985
|
+
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
2986
|
+
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
2987
|
+
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
2988
|
+
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
2989
|
+
*
|
|
2990
|
+
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
2991
|
+
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
2992
|
+
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
2993
|
+
* that the "important" values are visible.
|
|
2994
|
+
*
|
|
2995
|
+
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
2996
|
+
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
2997
|
+
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
2998
|
+
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
2999
|
+
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
3000
|
+
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
3001
|
+
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
3002
|
+
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
3003
|
+
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
3004
|
+
*
|
|
3005
|
+
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3006
|
+
* client-created figures.
|
|
3007
|
+
*/
|
|
2983
3008
|
export class Figure implements dh.HasEventHandling {
|
|
2984
3009
|
/**
|
|
2985
3010
|
* The title of the figure.
|
|
@@ -3023,131 +3048,47 @@ export namespace dh.plot {
|
|
|
3023
3048
|
*/
|
|
3024
3049
|
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3025
3050
|
|
|
3026
|
-
|
|
3027
|
-
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3028
|
-
/**
|
|
3029
|
-
* Disable updates for all series in this figure.
|
|
3030
|
-
*/
|
|
3031
|
-
unsubscribe():void;
|
|
3032
|
-
/**
|
|
3033
|
-
* Close the figure, and clean up subscriptions.
|
|
3034
|
-
*/
|
|
3035
|
-
close():void;
|
|
3036
|
-
/**
|
|
3037
|
-
* The charts to draw.
|
|
3038
|
-
* @return dh.plot.Chart
|
|
3039
|
-
*/
|
|
3040
|
-
get charts():Chart[];
|
|
3041
|
-
get updateInterval():number;
|
|
3042
|
-
get titleColor():string;
|
|
3043
|
-
get titleFont():string;
|
|
3044
|
-
get rows():number;
|
|
3045
|
-
get cols():number;
|
|
3046
|
-
get errors():Array<string>;
|
|
3047
|
-
/**
|
|
3048
|
-
* Listen for events on this object.
|
|
3049
|
-
* @param name - the name of the event to listen for
|
|
3050
|
-
* @param callback - a function to call when the event occurs
|
|
3051
|
-
* @return Returns a cleanup function.
|
|
3052
|
-
* @typeParam T - the type of the data that the event will provide
|
|
3053
|
-
*/
|
|
3054
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
3055
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
3056
|
-
hasListeners(name:string):boolean;
|
|
3057
|
-
/**
|
|
3058
|
-
* Removes an event listener added to this table.
|
|
3059
|
-
* @param name -
|
|
3060
|
-
* @param callback -
|
|
3061
|
-
* @return
|
|
3062
|
-
* @typeParam T -
|
|
3063
|
-
*/
|
|
3064
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
|
-
export class FigureFetchError {
|
|
3068
|
-
error:object;
|
|
3069
|
-
errors:Array<string>;
|
|
3070
|
-
|
|
3071
|
-
protected constructor();
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
export class ChartDescriptor {
|
|
3075
|
-
colspan?:number|null;
|
|
3076
|
-
rowspan?:number|null;
|
|
3077
|
-
series:Array<SeriesDescriptor>;
|
|
3078
|
-
axes:Array<AxisDescriptor>;
|
|
3079
|
-
chartType:string;
|
|
3080
|
-
title?:string|null;
|
|
3081
|
-
titleFont?:string|null;
|
|
3082
|
-
titleColor?:string|null;
|
|
3083
|
-
showLegend?:boolean|null;
|
|
3084
|
-
legendFont?:string|null;
|
|
3085
|
-
legendColor?:string|null;
|
|
3086
|
-
is3d?:boolean|null;
|
|
3087
|
-
|
|
3088
|
-
constructor();
|
|
3089
|
-
}
|
|
3090
|
-
|
|
3091
|
-
export class SeriesDescriptor {
|
|
3092
|
-
plotStyle:string;
|
|
3093
|
-
name?:string|null;
|
|
3094
|
-
linesVisible?:boolean|null;
|
|
3095
|
-
shapesVisible?:boolean|null;
|
|
3096
|
-
gradientVisible?:boolean|null;
|
|
3097
|
-
lineColor?:string|null;
|
|
3098
|
-
pointLabelFormat?:string|null;
|
|
3099
|
-
xToolTipPattern?:string|null;
|
|
3100
|
-
yToolTipPattern?:string|null;
|
|
3101
|
-
shapeLabel?:string|null;
|
|
3102
|
-
shapeSize?:number|null;
|
|
3103
|
-
shapeColor?:string|null;
|
|
3104
|
-
shape?:string|null;
|
|
3105
|
-
dataSources:Array<SourceDescriptor>;
|
|
3106
|
-
|
|
3107
|
-
constructor();
|
|
3108
|
-
}
|
|
3109
|
-
|
|
3110
|
-
/**
|
|
3111
|
-
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3112
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3113
|
-
* keep that cached as well.
|
|
3114
|
-
*/
|
|
3115
|
-
export class ChartData {
|
|
3116
|
-
constructor(table:dh.Table);
|
|
3051
|
+
protected constructor();
|
|
3117
3052
|
|
|
3118
|
-
|
|
3119
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3053
|
+
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3120
3054
|
/**
|
|
3121
|
-
*
|
|
3122
|
-
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3055
|
+
* Disable updates for all series in this figure.
|
|
3123
3056
|
*/
|
|
3124
|
-
|
|
3125
|
-
}
|
|
3126
|
-
|
|
3127
|
-
export class DownsampleOptions {
|
|
3057
|
+
unsubscribe():void;
|
|
3128
3058
|
/**
|
|
3129
|
-
*
|
|
3130
|
-
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3131
|
-
* series.subscribe().
|
|
3059
|
+
* Close the figure, and clean up subscriptions.
|
|
3132
3060
|
*/
|
|
3133
|
-
|
|
3061
|
+
close():void;
|
|
3134
3062
|
/**
|
|
3135
|
-
*
|
|
3136
|
-
*
|
|
3063
|
+
* The charts to draw.
|
|
3064
|
+
* @return dh.plot.Chart
|
|
3137
3065
|
*/
|
|
3138
|
-
|
|
3066
|
+
get charts():Chart[];
|
|
3067
|
+
get updateInterval():number;
|
|
3068
|
+
get titleColor():string;
|
|
3069
|
+
get titleFont():string;
|
|
3070
|
+
get rows():number;
|
|
3071
|
+
get cols():number;
|
|
3072
|
+
get errors():Array<string>;
|
|
3139
3073
|
/**
|
|
3140
|
-
*
|
|
3141
|
-
*
|
|
3074
|
+
* Listen for events on this object.
|
|
3075
|
+
* @param name - the name of the event to listen for
|
|
3076
|
+
* @param callback - a function to call when the event occurs
|
|
3077
|
+
* @return Returns a cleanup function.
|
|
3078
|
+
* @typeParam T - the type of the data that the event will provide
|
|
3142
3079
|
*/
|
|
3143
|
-
|
|
3080
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
3081
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
3082
|
+
hasListeners(name:string):boolean;
|
|
3144
3083
|
/**
|
|
3145
|
-
*
|
|
3146
|
-
*
|
|
3084
|
+
* Removes an event listener added to this table.
|
|
3085
|
+
* @param name -
|
|
3086
|
+
* @param callback -
|
|
3087
|
+
* @return
|
|
3088
|
+
* @typeParam T -
|
|
3147
3089
|
*/
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
protected constructor();
|
|
3090
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3091
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3151
3092
|
}
|
|
3152
3093
|
|
|
3153
3094
|
/**
|
|
@@ -3194,9 +3135,28 @@ export namespace dh.plot {
|
|
|
3194
3135
|
get multiSeries():MultiSeries[];
|
|
3195
3136
|
}
|
|
3196
3137
|
|
|
3197
|
-
export class
|
|
3198
|
-
|
|
3199
|
-
|
|
3138
|
+
export class DownsampleOptions {
|
|
3139
|
+
/**
|
|
3140
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3141
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3142
|
+
* series.subscribe().
|
|
3143
|
+
*/
|
|
3144
|
+
static MAX_SERIES_SIZE:number;
|
|
3145
|
+
/**
|
|
3146
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3147
|
+
* downsampling disabled, the series will not load data.
|
|
3148
|
+
*/
|
|
3149
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3150
|
+
/**
|
|
3151
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3152
|
+
* axes are configured.
|
|
3153
|
+
*/
|
|
3154
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3155
|
+
/**
|
|
3156
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3157
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3158
|
+
*/
|
|
3159
|
+
static readonly DISABLE:DownsampleOptions;
|
|
3200
3160
|
|
|
3201
3161
|
protected constructor();
|
|
3202
3162
|
}
|
|
@@ -3218,6 +3178,73 @@ export namespace dh.plot {
|
|
|
3218
3178
|
constructor();
|
|
3219
3179
|
}
|
|
3220
3180
|
|
|
3181
|
+
export class ChartDescriptor {
|
|
3182
|
+
colspan?:number|null;
|
|
3183
|
+
rowspan?:number|null;
|
|
3184
|
+
series:Array<SeriesDescriptor>;
|
|
3185
|
+
axes:Array<AxisDescriptor>;
|
|
3186
|
+
chartType:string;
|
|
3187
|
+
title?:string|null;
|
|
3188
|
+
titleFont?:string|null;
|
|
3189
|
+
titleColor?:string|null;
|
|
3190
|
+
showLegend?:boolean|null;
|
|
3191
|
+
legendFont?:string|null;
|
|
3192
|
+
legendColor?:string|null;
|
|
3193
|
+
is3d?:boolean|null;
|
|
3194
|
+
|
|
3195
|
+
constructor();
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
/**
|
|
3199
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3200
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3201
|
+
* keep that cached as well.
|
|
3202
|
+
*/
|
|
3203
|
+
export class ChartData {
|
|
3204
|
+
constructor(table:dh.Table);
|
|
3205
|
+
|
|
3206
|
+
update(tableData:dh.SubscriptionTableData):void;
|
|
3207
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3208
|
+
/**
|
|
3209
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3210
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3211
|
+
*/
|
|
3212
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
export class FigureSourceException {
|
|
3216
|
+
table:dh.Table;
|
|
3217
|
+
source:SeriesDataSource;
|
|
3218
|
+
|
|
3219
|
+
protected constructor();
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
export class SeriesDescriptor {
|
|
3223
|
+
plotStyle:string;
|
|
3224
|
+
name?:string|null;
|
|
3225
|
+
linesVisible?:boolean|null;
|
|
3226
|
+
shapesVisible?:boolean|null;
|
|
3227
|
+
gradientVisible?:boolean|null;
|
|
3228
|
+
lineColor?:string|null;
|
|
3229
|
+
pointLabelFormat?:string|null;
|
|
3230
|
+
xToolTipPattern?:string|null;
|
|
3231
|
+
yToolTipPattern?:string|null;
|
|
3232
|
+
shapeLabel?:string|null;
|
|
3233
|
+
shapeSize?:number|null;
|
|
3234
|
+
shapeColor?:string|null;
|
|
3235
|
+
shape?:string|null;
|
|
3236
|
+
dataSources:Array<SourceDescriptor>;
|
|
3237
|
+
|
|
3238
|
+
constructor();
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
export class FigureFetchError {
|
|
3242
|
+
error:object;
|
|
3243
|
+
errors:Array<string>;
|
|
3244
|
+
|
|
3245
|
+
protected constructor();
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3221
3248
|
export class SeriesDataSourceException {
|
|
3222
3249
|
protected constructor();
|
|
3223
3250
|
|
|
@@ -3225,6 +3252,15 @@ export namespace dh.plot {
|
|
|
3225
3252
|
get message():string;
|
|
3226
3253
|
}
|
|
3227
3254
|
|
|
3255
|
+
export class SourceDescriptor {
|
|
3256
|
+
axis:AxisDescriptor;
|
|
3257
|
+
table:dh.Table;
|
|
3258
|
+
columnName:string;
|
|
3259
|
+
type:string;
|
|
3260
|
+
|
|
3261
|
+
constructor();
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3228
3264
|
/**
|
|
3229
3265
|
* Helper class for plot downsampling methods.
|
|
3230
3266
|
*/
|
|
@@ -3245,31 +3281,6 @@ export namespace dh.plot {
|
|
|
3245
3281
|
}
|
|
3246
3282
|
|
|
3247
3283
|
|
|
3248
|
-
type AxisTypeType = number;
|
|
3249
|
-
export class AxisType {
|
|
3250
|
-
static readonly X:AxisTypeType;
|
|
3251
|
-
static readonly Y:AxisTypeType;
|
|
3252
|
-
static readonly SHAPE:AxisTypeType;
|
|
3253
|
-
static readonly SIZE:AxisTypeType;
|
|
3254
|
-
static readonly LABEL:AxisTypeType;
|
|
3255
|
-
static readonly COLOR:AxisTypeType;
|
|
3256
|
-
}
|
|
3257
|
-
|
|
3258
|
-
/**
|
|
3259
|
-
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3260
|
-
* those series should be rendered.
|
|
3261
|
-
*/
|
|
3262
|
-
type ChartTypeType = number;
|
|
3263
|
-
export class ChartType {
|
|
3264
|
-
static readonly XY:ChartTypeType;
|
|
3265
|
-
static readonly PIE:ChartTypeType;
|
|
3266
|
-
static readonly OHLC:ChartTypeType;
|
|
3267
|
-
static readonly CATEGORY:ChartTypeType;
|
|
3268
|
-
static readonly XYZ:ChartTypeType;
|
|
3269
|
-
static readonly CATEGORY_3D:ChartTypeType;
|
|
3270
|
-
static readonly TREEMAP:ChartTypeType;
|
|
3271
|
-
}
|
|
3272
|
-
|
|
3273
3284
|
type AxisFormatTypeType = number;
|
|
3274
3285
|
export class AxisFormatType {
|
|
3275
3286
|
static readonly CATEGORY:AxisFormatTypeType;
|
|
@@ -3301,6 +3312,21 @@ export namespace dh.plot {
|
|
|
3301
3312
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3302
3313
|
}
|
|
3303
3314
|
|
|
3315
|
+
/**
|
|
3316
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3317
|
+
* those series should be rendered.
|
|
3318
|
+
*/
|
|
3319
|
+
type ChartTypeType = number;
|
|
3320
|
+
export class ChartType {
|
|
3321
|
+
static readonly XY:ChartTypeType;
|
|
3322
|
+
static readonly PIE:ChartTypeType;
|
|
3323
|
+
static readonly OHLC:ChartTypeType;
|
|
3324
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3325
|
+
static readonly XYZ:ChartTypeType;
|
|
3326
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3327
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3304
3330
|
/**
|
|
3305
3331
|
* This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
|
|
3306
3332
|
* 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
|
|
@@ -3330,13 +3356,23 @@ export namespace dh.plot {
|
|
|
3330
3356
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3331
3357
|
}
|
|
3332
3358
|
|
|
3359
|
+
type AxisTypeType = number;
|
|
3360
|
+
export class AxisType {
|
|
3361
|
+
static readonly X:AxisTypeType;
|
|
3362
|
+
static readonly Y:AxisTypeType;
|
|
3363
|
+
static readonly SHAPE:AxisTypeType;
|
|
3364
|
+
static readonly SIZE:AxisTypeType;
|
|
3365
|
+
static readonly LABEL:AxisTypeType;
|
|
3366
|
+
static readonly COLOR:AxisTypeType;
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3333
3369
|
}
|
|
3334
3370
|
|
|
3335
3371
|
export namespace dh.lsp {
|
|
3336
3372
|
|
|
3337
|
-
export class
|
|
3338
|
-
|
|
3339
|
-
|
|
3373
|
+
export class ParameterInformation {
|
|
3374
|
+
label:string;
|
|
3375
|
+
documentation:MarkupContent;
|
|
3340
3376
|
|
|
3341
3377
|
constructor();
|
|
3342
3378
|
}
|
|
@@ -3350,14 +3386,6 @@ export namespace dh.lsp {
|
|
|
3350
3386
|
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3351
3387
|
}
|
|
3352
3388
|
|
|
3353
|
-
export class TextDocumentContentChangeEvent {
|
|
3354
|
-
range:Range;
|
|
3355
|
-
rangeLength:number;
|
|
3356
|
-
text:string;
|
|
3357
|
-
|
|
3358
|
-
constructor();
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
3389
|
export class Position {
|
|
3362
3390
|
line:number;
|
|
3363
3391
|
character:number;
|
|
@@ -3371,9 +3399,9 @@ export namespace dh.lsp {
|
|
|
3371
3399
|
copy():Position;
|
|
3372
3400
|
}
|
|
3373
3401
|
|
|
3374
|
-
export class
|
|
3375
|
-
|
|
3376
|
-
|
|
3402
|
+
export class MarkupContent {
|
|
3403
|
+
kind:string;
|
|
3404
|
+
value:string;
|
|
3377
3405
|
|
|
3378
3406
|
constructor();
|
|
3379
3407
|
}
|
|
@@ -3395,18 +3423,17 @@ export namespace dh.lsp {
|
|
|
3395
3423
|
constructor();
|
|
3396
3424
|
}
|
|
3397
3425
|
|
|
3398
|
-
export class
|
|
3399
|
-
|
|
3400
|
-
|
|
3426
|
+
export class TextDocumentContentChangeEvent {
|
|
3427
|
+
range:Range;
|
|
3428
|
+
rangeLength:number;
|
|
3429
|
+
text:string;
|
|
3401
3430
|
|
|
3402
3431
|
constructor();
|
|
3403
3432
|
}
|
|
3404
3433
|
|
|
3405
|
-
export class
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
parameters:Array<ParameterInformation>;
|
|
3409
|
-
activeParameter:number;
|
|
3434
|
+
export class TextEdit {
|
|
3435
|
+
range:Range;
|
|
3436
|
+
text:string;
|
|
3410
3437
|
|
|
3411
3438
|
constructor();
|
|
3412
3439
|
}
|
|
@@ -3418,6 +3445,15 @@ export namespace dh.lsp {
|
|
|
3418
3445
|
constructor();
|
|
3419
3446
|
}
|
|
3420
3447
|
|
|
3448
|
+
export class SignatureInformation {
|
|
3449
|
+
label:string;
|
|
3450
|
+
documentation:MarkupContent;
|
|
3451
|
+
parameters:Array<ParameterInformation>;
|
|
3452
|
+
activeParameter:number;
|
|
3453
|
+
|
|
3454
|
+
constructor();
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3421
3457
|
}
|
|
3422
3458
|
|
|
3423
3459
|
export namespace dh.calendar {
|
|
@@ -3452,10 +3488,6 @@ export namespace dh.calendar {
|
|
|
3452
3488
|
*/
|
|
3453
3489
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3454
3490
|
}
|
|
3455
|
-
export interface BusinessPeriod {
|
|
3456
|
-
get close():string;
|
|
3457
|
-
get open():string;
|
|
3458
|
-
}
|
|
3459
3491
|
export interface Holiday {
|
|
3460
3492
|
/**
|
|
3461
3493
|
* The date of the Holiday.
|
|
@@ -3468,6 +3500,10 @@ export namespace dh.calendar {
|
|
|
3468
3500
|
*/
|
|
3469
3501
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3470
3502
|
}
|
|
3503
|
+
export interface BusinessPeriod {
|
|
3504
|
+
get close():string;
|
|
3505
|
+
get open():string;
|
|
3506
|
+
}
|
|
3471
3507
|
|
|
3472
3508
|
type DayOfWeekType = string;
|
|
3473
3509
|
export class DayOfWeek {
|