@deephaven/jsapi-types 1.0.0-dev0.37.0 → 1.0.0-dev0.38.0beta20241219
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 +1991 -1869
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,21 @@ export interface IIterableResult<T> {
|
|
|
17
17
|
}
|
|
18
18
|
export namespace dh.storage {
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Storage service metadata about files and folders.
|
|
22
|
+
*/
|
|
23
|
+
export class ItemDetails {
|
|
24
|
+
protected constructor();
|
|
25
|
+
|
|
26
|
+
toString():string;
|
|
27
|
+
get filename():string;
|
|
28
|
+
get basename():string;
|
|
29
|
+
get size():number;
|
|
30
|
+
get etag():string;
|
|
31
|
+
get type():ItemTypeType;
|
|
32
|
+
get dirname():string;
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
/**
|
|
21
36
|
* Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
|
|
22
37
|
*/
|
|
@@ -91,21 +106,6 @@ export namespace dh.storage {
|
|
|
91
106
|
get etag():string;
|
|
92
107
|
}
|
|
93
108
|
|
|
94
|
-
/**
|
|
95
|
-
* Storage service metadata about files and folders.
|
|
96
|
-
*/
|
|
97
|
-
export class ItemDetails {
|
|
98
|
-
protected constructor();
|
|
99
|
-
|
|
100
|
-
toString():string;
|
|
101
|
-
get filename():string;
|
|
102
|
-
get basename():string;
|
|
103
|
-
get size():number;
|
|
104
|
-
get etag():string;
|
|
105
|
-
get type():ItemTypeType;
|
|
106
|
-
get dirname():string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -118,38 +118,44 @@ export namespace dh.storage {
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
121
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
122
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
123
|
+
* are correctly freed.
|
|
123
124
|
*/
|
|
124
|
-
export interface
|
|
125
|
-
get(column:Column):any;
|
|
126
|
-
getFormat(column:Column):Format;
|
|
127
|
-
get index():LongWrapper;
|
|
128
|
-
}
|
|
129
|
-
export interface HasEventHandling {
|
|
125
|
+
export interface WidgetExportedObject {
|
|
130
126
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* @
|
|
134
|
-
* @return
|
|
135
|
-
* @typeParam T - the type of the data that the event will provide
|
|
127
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
128
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
129
|
+
* {@link Widget.sendMessage}.
|
|
130
|
+
* @return the string type of this server-side object, or null.
|
|
136
131
|
*/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
hasListeners(name:string):boolean;
|
|
132
|
+
readonly type?:string|null;
|
|
133
|
+
|
|
140
134
|
/**
|
|
141
|
-
*
|
|
142
|
-
* @
|
|
143
|
-
* @
|
|
144
|
-
* @return
|
|
145
|
-
* @typeParam T -
|
|
135
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
136
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
137
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
146
138
|
*/
|
|
147
|
-
|
|
139
|
+
reexport():Promise<WidgetExportedObject>;
|
|
140
|
+
/**
|
|
141
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
142
|
+
* the same instance.
|
|
143
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
144
|
+
*/
|
|
145
|
+
fetch():Promise<any>;
|
|
146
|
+
/**
|
|
147
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
148
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
149
|
+
*/
|
|
150
|
+
close():void;
|
|
148
151
|
}
|
|
149
|
-
export interface
|
|
150
|
-
get
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
export interface TreeViewportData extends TableData {
|
|
153
|
+
get(index:LongWrapper|number):TreeRow;
|
|
154
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
155
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
156
|
+
get treeSize():number;
|
|
157
|
+
get columns():Array<Column>;
|
|
158
|
+
get rows():Array<TreeRow>;
|
|
153
159
|
}
|
|
154
160
|
/**
|
|
155
161
|
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
@@ -178,108 +184,269 @@ export namespace dh {
|
|
|
178
184
|
get hasChildren():boolean;
|
|
179
185
|
get index():LongWrapper;
|
|
180
186
|
}
|
|
187
|
+
export interface WorkerHeapInfo {
|
|
188
|
+
/**
|
|
189
|
+
* Total heap size available for this worker.
|
|
190
|
+
*/
|
|
191
|
+
get totalHeapSize():number;
|
|
192
|
+
get freeMemory():number;
|
|
193
|
+
get maximumHeapSize():number;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
197
|
+
* request the viewport again.
|
|
198
|
+
*/
|
|
199
|
+
export interface ViewportRow extends Row {
|
|
200
|
+
get(column:Column):any;
|
|
201
|
+
getFormat(column:Column):Format;
|
|
202
|
+
get index():LongWrapper;
|
|
203
|
+
}
|
|
181
204
|
export interface RefreshToken {
|
|
182
205
|
get bytes():string;
|
|
183
206
|
get expiry():number;
|
|
184
207
|
}
|
|
185
208
|
/**
|
|
186
|
-
*
|
|
209
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
210
|
+
* columns) either by index, or scanning the complete present index.
|
|
211
|
+
* <p>
|
|
212
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
213
|
+
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
214
|
+
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
215
|
+
* options should be considered.
|
|
216
|
+
* <p>
|
|
217
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
218
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
219
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
220
|
+
* specific rows or cells out of the table.
|
|
187
221
|
*/
|
|
188
|
-
export interface
|
|
222
|
+
export interface SubscriptionTableData extends TableData {
|
|
223
|
+
get fullIndex():RangeSet;
|
|
189
224
|
/**
|
|
190
|
-
* The
|
|
191
|
-
* @return
|
|
225
|
+
* The ordered set of row indexes removed since the last update
|
|
226
|
+
* @return the rangeset of removed rows
|
|
192
227
|
*/
|
|
193
|
-
|
|
228
|
+
get removed():RangeSet;
|
|
194
229
|
/**
|
|
195
|
-
*
|
|
196
|
-
* @return
|
|
230
|
+
* The ordered set of row indexes added since the last update.
|
|
231
|
+
* @return the rangeset of rows added
|
|
197
232
|
*/
|
|
198
|
-
|
|
233
|
+
get added():RangeSet;
|
|
234
|
+
get columns():Array<Column>;
|
|
199
235
|
/**
|
|
200
|
-
*
|
|
201
|
-
* @return
|
|
236
|
+
* The ordered set of row indexes updated since the last update
|
|
237
|
+
* @return the rnageset of modified rows
|
|
202
238
|
*/
|
|
203
|
-
|
|
239
|
+
get modified():RangeSet;
|
|
204
240
|
/**
|
|
205
|
-
*
|
|
206
|
-
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
241
|
+
* A lazily computed array of all rows available on the client.
|
|
207
242
|
*/
|
|
208
|
-
|
|
243
|
+
get rows():Array<Row>;
|
|
209
244
|
}
|
|
210
245
|
/**
|
|
211
|
-
* Represents a
|
|
212
|
-
*
|
|
213
|
-
*
|
|
246
|
+
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
247
|
+
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
248
|
+
* event, or re-request the viewport data.
|
|
214
249
|
*/
|
|
215
|
-
export interface
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
250
|
+
export interface Row {
|
|
251
|
+
get(column:Column):any;
|
|
252
|
+
getFormat(column:Column):Format;
|
|
253
|
+
get index():LongWrapper;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Represents statistics for a given table column.
|
|
257
|
+
*/
|
|
258
|
+
export interface ColumnStatistics {
|
|
224
259
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
260
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
261
|
+
* <p>
|
|
262
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
263
|
+
* @param name - the display name of the statistic
|
|
264
|
+
* @return String
|
|
228
265
|
*/
|
|
229
|
-
|
|
266
|
+
getType(name:string):string;
|
|
230
267
|
/**
|
|
231
|
-
*
|
|
232
|
-
* the
|
|
233
|
-
*
|
|
268
|
+
* 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
|
|
269
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
270
|
+
* than 19 unique values.
|
|
271
|
+
* @return Map of String double
|
|
234
272
|
*/
|
|
235
|
-
|
|
273
|
+
get uniqueValues():Map<string, number>;
|
|
236
274
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
275
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
276
|
+
* <p>
|
|
277
|
+
* A map of each statistic's name to its value.
|
|
278
|
+
* @return Map of String and Object
|
|
239
279
|
*/
|
|
240
|
-
|
|
280
|
+
get statisticsMap():Map<string, object>;
|
|
241
281
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
282
|
+
/**
|
|
283
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
284
|
+
*/
|
|
285
|
+
export interface LocalTimeWrapper {
|
|
286
|
+
valueOf():string;
|
|
287
|
+
getHour():number;
|
|
288
|
+
getMinute():number;
|
|
289
|
+
getSecond():number;
|
|
290
|
+
getNano():number;
|
|
291
|
+
toString():string;
|
|
249
292
|
}
|
|
250
293
|
/**
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
* template when fetching a new totals table, or changing the totals table in use.
|
|
258
|
-
*
|
|
259
|
-
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
260
|
-
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
261
|
-
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
262
|
-
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
263
|
-
*
|
|
264
|
-
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
265
|
-
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
294
|
+
* Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
|
|
295
|
+
* on tables, data in trees, and snapshots.
|
|
296
|
+
* <p>
|
|
297
|
+
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
298
|
+
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
299
|
+
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
266
300
|
*/
|
|
267
|
-
export interface
|
|
301
|
+
export interface TableData {
|
|
268
302
|
/**
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* event per row in that range.
|
|
273
|
-
* @param firstRow -
|
|
274
|
-
* @param lastRow -
|
|
275
|
-
* @param columns -
|
|
276
|
-
* @param updateIntervalMs -
|
|
303
|
+
* Reads a row object from the table, from which any subscribed column can be read.
|
|
304
|
+
* @param index - the position or key to access
|
|
305
|
+
* @return the row at the given location
|
|
277
306
|
*/
|
|
278
|
-
|
|
307
|
+
get(index:LongWrapper|number):Row;
|
|
279
308
|
/**
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* @
|
|
309
|
+
* Reads a specific cell from the table, by row key and column.
|
|
310
|
+
* @param index - the row in the table to get data from
|
|
311
|
+
* @param column - the column to read
|
|
312
|
+
* @return the value in the table
|
|
313
|
+
*/
|
|
314
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
315
|
+
/**
|
|
316
|
+
* The server-specified Format to use for the cell at the given position.
|
|
317
|
+
* @param index - the row to read
|
|
318
|
+
* @param column - the column to read
|
|
319
|
+
* @return a Format instance with any server-specified details
|
|
320
|
+
*/
|
|
321
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
322
|
+
get columns():Array<Column>;
|
|
323
|
+
/**
|
|
324
|
+
* A lazily computed array of all rows available on the client.
|
|
325
|
+
*/
|
|
326
|
+
get rows():Array<Row>;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
|
|
330
|
+
* ViewportData also contains the offset to this data, so that the actual row number may be determined.
|
|
331
|
+
* <p>
|
|
332
|
+
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
333
|
+
* <p>
|
|
334
|
+
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
335
|
+
* scrolling without going to the server.
|
|
336
|
+
*/
|
|
337
|
+
export interface ViewportData extends TableData {
|
|
338
|
+
/**
|
|
339
|
+
* Reads a row object from the viewport, based on its position in the table.
|
|
340
|
+
*/
|
|
341
|
+
get(index:LongWrapper|number):ViewportRow;
|
|
342
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
343
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
344
|
+
/**
|
|
345
|
+
* The position of the first returned row, null if this data is not for a viewport.
|
|
346
|
+
*/
|
|
347
|
+
get offset():number;
|
|
348
|
+
get columns():Array<Column>;
|
|
349
|
+
get rows():Array<ViewportRow>;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
353
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
354
|
+
*
|
|
355
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
356
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
357
|
+
* backwards compatibility and to better follow JS expectations.
|
|
358
|
+
*/
|
|
359
|
+
export interface WidgetMessageDetails {
|
|
360
|
+
/**
|
|
361
|
+
* Returns the data from this message as a base64-encoded string.
|
|
362
|
+
*/
|
|
363
|
+
getDataAsBase64():string;
|
|
364
|
+
/**
|
|
365
|
+
* Returns the data from this message as a Uint8Array.
|
|
366
|
+
*/
|
|
367
|
+
getDataAsU8():Uint8Array;
|
|
368
|
+
/**
|
|
369
|
+
* Returns the data from this message as a utf-8 string.
|
|
370
|
+
*/
|
|
371
|
+
getDataAsString():string;
|
|
372
|
+
/**
|
|
373
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
374
|
+
* objects, and should close them when no longer needed.
|
|
375
|
+
*/
|
|
376
|
+
get exportedObjects():WidgetExportedObject[];
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
380
|
+
* details about the event.
|
|
381
|
+
* @typeParam T - the type of the event detail
|
|
382
|
+
*/
|
|
383
|
+
export interface Event<T> {
|
|
384
|
+
get detail():T;
|
|
385
|
+
get type():string;
|
|
386
|
+
}
|
|
387
|
+
export interface HasEventHandling {
|
|
388
|
+
/**
|
|
389
|
+
* Listen for events on this object.
|
|
390
|
+
* @param name - the name of the event to listen for
|
|
391
|
+
* @param callback - a function to call when the event occurs
|
|
392
|
+
* @return Returns a cleanup function.
|
|
393
|
+
* @typeParam T - the type of the data that the event will provide
|
|
394
|
+
*/
|
|
395
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
396
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
397
|
+
hasListeners(name:string):boolean;
|
|
398
|
+
/**
|
|
399
|
+
* Removes an event listener added to this table.
|
|
400
|
+
* @param name -
|
|
401
|
+
* @param callback -
|
|
402
|
+
* @return
|
|
403
|
+
* @typeParam T -
|
|
404
|
+
*/
|
|
405
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
409
|
+
*/
|
|
410
|
+
export interface LocalDateWrapper {
|
|
411
|
+
valueOf():string;
|
|
412
|
+
getYear():number;
|
|
413
|
+
getMonthValue():number;
|
|
414
|
+
getDayOfMonth():number;
|
|
415
|
+
toString():string;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
419
|
+
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
420
|
+
*
|
|
421
|
+
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
422
|
+
*
|
|
423
|
+
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
424
|
+
* template when fetching a new totals table, or changing the totals table in use.
|
|
425
|
+
*
|
|
426
|
+
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
427
|
+
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
428
|
+
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
429
|
+
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
430
|
+
*
|
|
431
|
+
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
432
|
+
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
433
|
+
*/
|
|
434
|
+
export interface TotalsTable extends JoinableTable {
|
|
435
|
+
/**
|
|
436
|
+
* Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
|
|
437
|
+
* provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
|
|
438
|
+
* events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
|
|
439
|
+
* event per row in that range.
|
|
440
|
+
* @param firstRow -
|
|
441
|
+
* @param lastRow -
|
|
442
|
+
* @param columns -
|
|
443
|
+
* @param updateIntervalMs -
|
|
444
|
+
*/
|
|
445
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
|
|
446
|
+
/**
|
|
447
|
+
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
448
|
+
* resolve until that data is ready.
|
|
449
|
+
* @return Promise of {@link dh.TableData}
|
|
283
450
|
*/
|
|
284
451
|
getViewportData():Promise<ViewportData>;
|
|
285
452
|
/**
|
|
@@ -376,68 +543,15 @@ export namespace dh {
|
|
|
376
543
|
*/
|
|
377
544
|
get isRefreshing():boolean;
|
|
378
545
|
}
|
|
379
|
-
export interface
|
|
380
|
-
|
|
381
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
382
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
383
|
-
get treeSize():number;
|
|
384
|
-
get columns():Array<Column>;
|
|
385
|
-
get rows():Array<TreeRow>;
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
|
|
389
|
-
* on tables, data in trees, and snapshots.
|
|
390
|
-
* <p>
|
|
391
|
-
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
392
|
-
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
393
|
-
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
394
|
-
*/
|
|
395
|
-
export interface TableData {
|
|
396
|
-
/**
|
|
397
|
-
* Reads a row object from the table, from which any subscribed column can be read.
|
|
398
|
-
* @param index - the position or key to access
|
|
399
|
-
* @return the row at the given location
|
|
400
|
-
*/
|
|
401
|
-
get(index:LongWrapper|number):Row;
|
|
402
|
-
/**
|
|
403
|
-
* Reads a specific cell from the table, by row key and column.
|
|
404
|
-
* @param index - the row in the table to get data from
|
|
405
|
-
* @param column - the column to read
|
|
406
|
-
* @return the value in the table
|
|
407
|
-
*/
|
|
408
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
409
|
-
/**
|
|
410
|
-
* The server-specified Format to use for the cell at the given position.
|
|
411
|
-
* @param index - the row to read
|
|
412
|
-
* @param column - the column to read
|
|
413
|
-
* @return a Format instance with any server-specified details
|
|
414
|
-
*/
|
|
415
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
416
|
-
get columns():Array<Column>;
|
|
417
|
-
/**
|
|
418
|
-
* A lazily computed array of all rows available on the client.
|
|
419
|
-
*/
|
|
420
|
-
get rows():Array<Row>;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
424
|
-
* details about the event.
|
|
425
|
-
* @typeParam T - the type of the event detail
|
|
426
|
-
*/
|
|
427
|
-
export interface Event<T> {
|
|
428
|
-
readonly detail?:null|@jsinterop.annotations.JsNullable T;
|
|
546
|
+
export interface LayoutHints {
|
|
547
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
429
548
|
|
|
430
|
-
get
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
*/
|
|
437
|
-
export interface Row {
|
|
438
|
-
get(column:Column):any;
|
|
439
|
-
getFormat(column:Column):Format;
|
|
440
|
-
get index():LongWrapper;
|
|
549
|
+
get hiddenColumns():string[]|null;
|
|
550
|
+
get frozenColumns():string[]|null;
|
|
551
|
+
get columnGroups():ColumnGroup[]|null;
|
|
552
|
+
get areSavedLayoutsAllowed():boolean;
|
|
553
|
+
get frontColumns():string[]|null;
|
|
554
|
+
get backColumns():string[]|null;
|
|
441
555
|
}
|
|
442
556
|
/**
|
|
443
557
|
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
@@ -528,524 +642,391 @@ export namespace dh {
|
|
|
528
642
|
*/
|
|
529
643
|
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
530
644
|
}
|
|
645
|
+
export interface ColumnGroup {
|
|
646
|
+
get name():string|null;
|
|
647
|
+
get children():string[]|null;
|
|
648
|
+
get color():string|null;
|
|
649
|
+
}
|
|
531
650
|
/**
|
|
532
|
-
*
|
|
533
|
-
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
534
|
-
*
|
|
535
|
-
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
536
|
-
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
537
|
-
* backwards compatibility and to better follow JS expectations.
|
|
651
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
538
652
|
*/
|
|
539
|
-
export interface
|
|
653
|
+
export interface Format {
|
|
540
654
|
/**
|
|
541
|
-
*
|
|
655
|
+
* The format string to apply to the value of this cell.
|
|
656
|
+
* @return String
|
|
542
657
|
*/
|
|
543
|
-
|
|
658
|
+
readonly formatString?:string|null;
|
|
544
659
|
/**
|
|
545
|
-
*
|
|
660
|
+
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
661
|
+
* @return String
|
|
546
662
|
*/
|
|
547
|
-
|
|
663
|
+
readonly backgroundColor?:string|null;
|
|
548
664
|
/**
|
|
549
|
-
*
|
|
665
|
+
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
666
|
+
* @return String
|
|
550
667
|
*/
|
|
551
|
-
|
|
668
|
+
readonly color?:string|null;
|
|
552
669
|
/**
|
|
553
|
-
*
|
|
554
|
-
*
|
|
670
|
+
*
|
|
671
|
+
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
555
672
|
*/
|
|
556
|
-
|
|
673
|
+
readonly numberFormat?:string|null;
|
|
557
674
|
}
|
|
675
|
+
|
|
558
676
|
/**
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
563
|
-
* <p>
|
|
564
|
-
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
565
|
-
* scrolling without going to the server.
|
|
677
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
678
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
679
|
+
* inform the UI right away that they have taken place.
|
|
566
680
|
*/
|
|
567
|
-
export
|
|
681
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
682
|
+
readonly description?:string|null;
|
|
683
|
+
readonly pluginName?:string|null;
|
|
684
|
+
readonly layoutHints?:null|LayoutHints;
|
|
568
685
|
/**
|
|
569
|
-
*
|
|
686
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
570
687
|
*/
|
|
571
|
-
|
|
572
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
573
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
688
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
574
689
|
/**
|
|
575
|
-
* The
|
|
690
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
576
691
|
*/
|
|
577
|
-
|
|
578
|
-
get columns():Array<Column>;
|
|
579
|
-
get rows():Array<ViewportRow>;
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
583
|
-
* columns) either by index, or scanning the complete present index.
|
|
584
|
-
* <p>
|
|
585
|
-
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
586
|
-
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
587
|
-
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
588
|
-
* options should be considered.
|
|
589
|
-
* <p>
|
|
590
|
-
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
591
|
-
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
592
|
-
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
593
|
-
* specific rows or cells out of the table.
|
|
594
|
-
*/
|
|
595
|
-
export interface SubscriptionTableData extends TableData {
|
|
596
|
-
get fullIndex():RangeSet;
|
|
692
|
+
static readonly EVENT_UPDATED:string;
|
|
597
693
|
/**
|
|
598
|
-
* The
|
|
599
|
-
* @return the rangeset of removed rows
|
|
694
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
600
695
|
*/
|
|
601
|
-
|
|
696
|
+
static readonly EVENT_ROWADDED:string;
|
|
602
697
|
/**
|
|
603
|
-
* The
|
|
604
|
-
* @return the rangeset of rows added
|
|
698
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
605
699
|
*/
|
|
606
|
-
|
|
607
|
-
get columns():Array<Column>;
|
|
700
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
608
701
|
/**
|
|
609
|
-
* The
|
|
610
|
-
* @return the rnageset of modified rows
|
|
702
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
611
703
|
*/
|
|
612
|
-
|
|
704
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
613
705
|
/**
|
|
614
|
-
*
|
|
706
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
615
707
|
*/
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Represents statistics for a given table column.
|
|
620
|
-
*/
|
|
621
|
-
export interface ColumnStatistics {
|
|
708
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
622
709
|
/**
|
|
623
|
-
*
|
|
624
|
-
* <p>
|
|
625
|
-
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
626
|
-
* @param name - the display name of the statistic
|
|
627
|
-
* @return String
|
|
710
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
628
711
|
*/
|
|
629
|
-
|
|
712
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
630
713
|
/**
|
|
631
|
-
*
|
|
632
|
-
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
633
|
-
* than 19 unique values.
|
|
634
|
-
* @return Map of String double
|
|
714
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
635
715
|
*/
|
|
636
|
-
|
|
716
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
637
717
|
/**
|
|
638
|
-
*
|
|
639
|
-
* <p>
|
|
640
|
-
* A map of each statistic's name to its value.
|
|
641
|
-
* @return Map of String and Object
|
|
718
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
642
719
|
*/
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
export interface LayoutHints {
|
|
646
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
647
|
-
|
|
648
|
-
get hiddenColumns():string[]|null;
|
|
649
|
-
get frozenColumns():string[]|null;
|
|
650
|
-
get columnGroups():ColumnGroup[]|null;
|
|
651
|
-
get areSavedLayoutsAllowed():boolean;
|
|
652
|
-
get frontColumns():string[]|null;
|
|
653
|
-
get backColumns():string[]|null;
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
657
|
-
*/
|
|
658
|
-
export interface LocalDateWrapper {
|
|
659
|
-
valueOf():string;
|
|
660
|
-
getYear():number;
|
|
661
|
-
getMonthValue():number;
|
|
662
|
-
getDayOfMonth():number;
|
|
663
|
-
toString():string;
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
667
|
-
*/
|
|
668
|
-
export interface LocalTimeWrapper {
|
|
669
|
-
valueOf():string;
|
|
670
|
-
getHour():number;
|
|
671
|
-
getMinute():number;
|
|
672
|
-
getSecond():number;
|
|
673
|
-
getNano():number;
|
|
674
|
-
toString():string;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
679
|
-
* the server to get each Table. All tables will have the same structure.
|
|
680
|
-
*/
|
|
681
|
-
export class PartitionedTable implements HasEventHandling {
|
|
720
|
+
static readonly EVENT_DISCONNECT:string;
|
|
682
721
|
/**
|
|
683
|
-
*
|
|
722
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
684
723
|
*/
|
|
685
|
-
static readonly
|
|
724
|
+
static readonly EVENT_RECONNECT:string;
|
|
686
725
|
/**
|
|
687
|
-
*
|
|
726
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
688
727
|
*/
|
|
689
|
-
static readonly
|
|
728
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
690
729
|
/**
|
|
691
|
-
*
|
|
730
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
692
731
|
*/
|
|
693
|
-
static readonly
|
|
732
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
694
733
|
/**
|
|
695
|
-
*
|
|
734
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
696
735
|
*/
|
|
697
|
-
static readonly
|
|
736
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
737
|
+
/**
|
|
738
|
+
* The size the table will have if it is uncoalesced.
|
|
739
|
+
*/
|
|
740
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
698
741
|
|
|
699
742
|
protected constructor();
|
|
700
743
|
|
|
744
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
701
745
|
/**
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
* @
|
|
746
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
747
|
+
* caching a returned value.
|
|
748
|
+
* @param key -
|
|
749
|
+
* @return {@link dh.Column}
|
|
705
750
|
*/
|
|
706
|
-
|
|
751
|
+
findColumn(key:string):Column;
|
|
707
752
|
/**
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
* @return
|
|
753
|
+
* Retrieve multiple columns specified by the given names.
|
|
754
|
+
* @param keys -
|
|
755
|
+
* @return {@link dh.Column} array
|
|
711
756
|
*/
|
|
712
|
-
|
|
757
|
+
findColumns(keys:string[]):Column[];
|
|
758
|
+
isBlinkTable():boolean;
|
|
713
759
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
* @return
|
|
760
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
761
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
762
|
+
* @return Promise of dh.InputTable
|
|
717
763
|
*/
|
|
718
|
-
|
|
764
|
+
inputTable():Promise<InputTable>;
|
|
719
765
|
/**
|
|
720
|
-
*
|
|
721
|
-
* @return Promise of a Table
|
|
722
|
-
* @deprecated
|
|
766
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
723
767
|
*/
|
|
724
|
-
|
|
768
|
+
close():void;
|
|
769
|
+
getAttributes():string[];
|
|
725
770
|
/**
|
|
726
|
-
*
|
|
727
|
-
*
|
|
771
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
772
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
773
|
+
* @param attributeName -
|
|
774
|
+
* @return Object
|
|
728
775
|
*/
|
|
729
|
-
|
|
776
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
730
777
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
778
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
779
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
780
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
781
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
782
|
+
* not.
|
|
783
|
+
* @param sort -
|
|
784
|
+
* @return {@link dh.Sort} array
|
|
733
785
|
*/
|
|
734
|
-
|
|
786
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
735
787
|
/**
|
|
736
|
-
*
|
|
737
|
-
*
|
|
788
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
789
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
790
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
791
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
792
|
+
* will not.
|
|
793
|
+
* @param filter -
|
|
794
|
+
* @return {@link dh.FilterCondition} array
|
|
738
795
|
*/
|
|
739
|
-
|
|
796
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
740
797
|
/**
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
* @return
|
|
798
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
799
|
+
* @param customColumns -
|
|
800
|
+
* @return {@link dh.CustomColumn} array
|
|
744
801
|
*/
|
|
745
|
-
|
|
802
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
746
803
|
/**
|
|
747
|
-
*
|
|
748
|
-
*
|
|
804
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
805
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
806
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
807
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
808
|
+
* needed.
|
|
809
|
+
* @param firstRow -
|
|
810
|
+
* @param lastRow -
|
|
811
|
+
* @param columns -
|
|
812
|
+
* @param updateIntervalMs -
|
|
813
|
+
* @return {@link dh.TableViewportSubscription}
|
|
749
814
|
*/
|
|
750
|
-
|
|
815
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
751
816
|
/**
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
* @
|
|
756
|
-
* @
|
|
817
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
818
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
819
|
+
* separate the lifespan of this promise from the table itself, call
|
|
820
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
821
|
+
* @return Promise of {@link dh.TableData}
|
|
757
822
|
*/
|
|
758
|
-
|
|
759
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
760
|
-
hasListeners(name:string):boolean;
|
|
823
|
+
getViewportData():Promise<ViewportData>;
|
|
761
824
|
/**
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
825
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
826
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
827
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
828
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
829
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
830
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
831
|
+
* @param columns -
|
|
832
|
+
* @param updateIntervalMs -
|
|
833
|
+
* @return {@link dh.TableSubscription}
|
|
767
834
|
*/
|
|
768
|
-
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
export class DateWrapper extends LongWrapper {
|
|
772
|
-
protected constructor();
|
|
773
|
-
|
|
774
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
775
|
-
asDate():Date;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
780
|
-
* roll-up table.
|
|
781
|
-
*/
|
|
782
|
-
export class RollupConfig {
|
|
835
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
783
836
|
/**
|
|
784
|
-
*
|
|
837
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
838
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
839
|
+
* order of appearance of values from the original table.
|
|
840
|
+
* @param columns -
|
|
841
|
+
* @return Promise of dh.Table
|
|
785
842
|
*/
|
|
786
|
-
|
|
843
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
787
844
|
/**
|
|
788
|
-
*
|
|
789
|
-
*
|
|
845
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
846
|
+
* @return Promise of dh.Table
|
|
790
847
|
*/
|
|
791
|
-
|
|
848
|
+
copy():Promise<Table>;
|
|
792
849
|
/**
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
850
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
851
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
852
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
853
|
+
* called on it when not in use.
|
|
854
|
+
* @param config -
|
|
855
|
+
* @return Promise of dh.TotalsTable
|
|
797
856
|
*/
|
|
798
|
-
|
|
799
|
-
includeOriginalColumns?:boolean|null;
|
|
857
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
800
858
|
/**
|
|
801
|
-
*
|
|
859
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
860
|
+
* above for more specifics.
|
|
861
|
+
* @param config -
|
|
862
|
+
* @return promise of dh.TotalsTable
|
|
802
863
|
*/
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
constructor();
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
/**
|
|
809
|
-
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
810
|
-
*/
|
|
811
|
-
export class BigIntegerWrapper {
|
|
812
|
-
protected constructor();
|
|
813
|
-
|
|
814
|
-
static ofString(str:string):BigIntegerWrapper;
|
|
815
|
-
asNumber():number;
|
|
816
|
-
valueOf():string;
|
|
817
|
-
toString():string;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
export class QueryInfo {
|
|
821
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
822
|
-
static readonly EVENT_DISCONNECT:string;
|
|
823
|
-
static readonly EVENT_RECONNECT:string;
|
|
824
|
-
static readonly EVENT_CONNECT:string;
|
|
825
|
-
|
|
826
|
-
protected constructor();
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
export class IdeSession implements HasEventHandling {
|
|
830
|
-
static readonly EVENT_COMMANDSTARTED:string;
|
|
831
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
832
|
-
|
|
833
|
-
protected constructor();
|
|
834
|
-
|
|
864
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
835
865
|
/**
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
* @param
|
|
839
|
-
* @return
|
|
866
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
867
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
868
|
+
* @param configObject -
|
|
869
|
+
* @return Promise of dh.TreeTable
|
|
840
870
|
*/
|
|
841
|
-
|
|
871
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
842
872
|
/**
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
* @
|
|
873
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
874
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
875
|
+
* @param configObject -
|
|
876
|
+
* @return Promise dh.TreeTable
|
|
846
877
|
*/
|
|
847
|
-
|
|
878
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
848
879
|
/**
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
* @return
|
|
880
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
881
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
882
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
883
|
+
* @return Promise of dh.Table
|
|
853
884
|
*/
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
857
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
858
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
885
|
+
freeze():Promise<Table>;
|
|
886
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
859
887
|
/**
|
|
860
|
-
*
|
|
861
|
-
* @
|
|
862
|
-
* @
|
|
888
|
+
*
|
|
889
|
+
* @inheritDoc
|
|
890
|
+
* @deprecated
|
|
863
891
|
*/
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
openDocument(params:object):void;
|
|
871
|
-
changeDocument(params:object):void;
|
|
872
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
873
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
874
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
875
|
-
closeDocument(params:object):void;
|
|
892
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
893
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
894
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
895
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
896
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
897
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
876
898
|
/**
|
|
877
|
-
* Creates
|
|
878
|
-
*
|
|
879
|
-
* @param
|
|
880
|
-
* @
|
|
899
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
900
|
+
* keys.
|
|
901
|
+
* @param keys -
|
|
902
|
+
* @param dropKeys -
|
|
903
|
+
* @return Promise dh.PartitionedTable
|
|
881
904
|
*/
|
|
882
|
-
|
|
905
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
883
906
|
/**
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
* @
|
|
887
|
-
* @param startTime -
|
|
888
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
907
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
908
|
+
* @param column -
|
|
909
|
+
* @return Promise of dh.ColumnStatistics
|
|
889
910
|
*/
|
|
890
|
-
|
|
891
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
892
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
893
|
-
hasListeners(name:string):boolean;
|
|
894
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* A js type for operating on input tables.
|
|
899
|
-
*
|
|
900
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
901
|
-
*
|
|
902
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
903
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
904
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
905
|
-
* before sending the next operation.
|
|
906
|
-
*
|
|
907
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
908
|
-
*
|
|
909
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
910
|
-
* object.
|
|
911
|
-
*/
|
|
912
|
-
export class InputTable {
|
|
913
|
-
protected constructor();
|
|
914
|
-
|
|
911
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
915
912
|
/**
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
* @param
|
|
919
|
-
* @param
|
|
920
|
-
* @
|
|
913
|
+
* Seek the row matching the data provided
|
|
914
|
+
* @param startingRow - Row to start the seek from
|
|
915
|
+
* @param column - Column to seek for value on
|
|
916
|
+
* @param valueType - Type of value provided
|
|
917
|
+
* @param seekValue - Value to seek
|
|
918
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
919
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
920
|
+
* `false`.
|
|
921
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
922
|
+
* @return A promise that resolves to the row value found.
|
|
921
923
|
*/
|
|
922
|
-
|
|
924
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
925
|
+
toString():string;
|
|
923
926
|
/**
|
|
924
|
-
*
|
|
925
|
-
*
|
|
926
|
-
* @
|
|
927
|
-
* @return Promise of dh.InputTable
|
|
927
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
928
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
929
|
+
* @return boolean
|
|
928
930
|
*/
|
|
929
|
-
|
|
931
|
+
get hasInputTable():boolean;
|
|
930
932
|
/**
|
|
931
|
-
*
|
|
932
|
-
*
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
* @
|
|
936
|
-
* @return Promise of dh.InputTable
|
|
933
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
934
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
935
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
936
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
937
|
+
* @return {@link dh.Column} array
|
|
937
938
|
*/
|
|
938
|
-
|
|
939
|
+
get columns():Array<Column>;
|
|
939
940
|
/**
|
|
940
|
-
*
|
|
941
|
-
* @
|
|
942
|
-
* @return Promise of dh.InputTable
|
|
941
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
942
|
+
* @return dh.TotalsTableConfig
|
|
943
943
|
*/
|
|
944
|
-
|
|
944
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
945
945
|
/**
|
|
946
|
-
*
|
|
947
|
-
*
|
|
948
|
-
*
|
|
946
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
947
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
948
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
949
|
+
* @return {@link dh.Sort} array
|
|
949
950
|
*/
|
|
950
|
-
|
|
951
|
+
get sort():Array<Sort>;
|
|
951
952
|
/**
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
* @return
|
|
953
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
954
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
955
|
+
* @return {@link dh.CustomColumn} array
|
|
955
956
|
*/
|
|
956
|
-
|
|
957
|
+
get customColumns():Array<CustomColumn>;
|
|
957
958
|
/**
|
|
958
|
-
*
|
|
959
|
-
*
|
|
959
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
960
|
+
* initial snapshot.
|
|
961
|
+
* @return boolean
|
|
960
962
|
*/
|
|
961
|
-
get
|
|
963
|
+
get isRefreshing():boolean;
|
|
962
964
|
/**
|
|
963
|
-
*
|
|
964
|
-
*
|
|
965
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
966
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
967
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
968
|
+
* @return {@link dh.FilterCondition} array
|
|
965
969
|
*/
|
|
966
|
-
get
|
|
970
|
+
get filter():Array<FilterCondition>;
|
|
967
971
|
/**
|
|
968
|
-
*
|
|
969
|
-
*
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* A list of the value Column objects
|
|
974
|
-
* @return {@link dh.Column} array.
|
|
975
|
-
*/
|
|
976
|
-
get valueColumns():Column[];
|
|
977
|
-
/**
|
|
978
|
-
* The source table for this Input Table
|
|
979
|
-
* @return dh.table
|
|
972
|
+
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
973
|
+
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
974
|
+
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
975
|
+
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
980
976
|
*/
|
|
981
|
-
get
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
/**
|
|
985
|
-
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
986
|
-
*/
|
|
987
|
-
export class ConnectOptions {
|
|
977
|
+
get totalSize():number;
|
|
988
978
|
/**
|
|
989
|
-
*
|
|
979
|
+
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
980
|
+
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
981
|
+
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
982
|
+
* <p>
|
|
983
|
+
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
984
|
+
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
985
|
+
* uncoalesced.
|
|
990
986
|
*/
|
|
991
|
-
|
|
987
|
+
get size():number;
|
|
992
988
|
/**
|
|
993
|
-
* True
|
|
989
|
+
* True if this table has been closed.
|
|
990
|
+
* @return boolean
|
|
994
991
|
*/
|
|
995
|
-
|
|
992
|
+
get isClosed():boolean;
|
|
996
993
|
/**
|
|
997
|
-
*
|
|
998
|
-
* of `fetch`.
|
|
994
|
+
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
999
995
|
* <p>
|
|
1000
|
-
*
|
|
996
|
+
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
997
|
+
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
998
|
+
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
999
|
+
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
1000
|
+
* for those columns, use {@link Table.selectDistinct}.
|
|
1001
|
+
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
1001
1002
|
*/
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
constructor();
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
export class CoreClient implements HasEventHandling {
|
|
1008
|
-
static readonly EVENT_CONNECT:string;
|
|
1009
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1010
|
-
static readonly EVENT_RECONNECT:string;
|
|
1011
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1012
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1013
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
1014
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1003
|
+
get isUncoalesced():boolean;
|
|
1015
1004
|
/**
|
|
1016
|
-
*
|
|
1005
|
+
* Listen for events on this object.
|
|
1006
|
+
* @param name - the name of the event to listen for
|
|
1007
|
+
* @param callback - a function to call when the event occurs
|
|
1008
|
+
* @return Returns a cleanup function.
|
|
1009
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1017
1010
|
*/
|
|
1018
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1019
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1020
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1021
|
-
|
|
1022
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1023
|
-
|
|
1024
|
-
running():Promise<CoreClient>;
|
|
1025
|
-
getServerUrl():string;
|
|
1026
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
1027
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
1028
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
1029
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1030
|
-
getServerConfigValues():Promise<string[][]>;
|
|
1031
|
-
getStorageService():dh.storage.StorageService;
|
|
1032
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
1033
|
-
disconnect():void;
|
|
1034
1011
|
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1035
1012
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1036
1013
|
hasListeners(name:string):boolean;
|
|
1014
|
+
/**
|
|
1015
|
+
* Removes an event listener added to this table.
|
|
1016
|
+
* @param name -
|
|
1017
|
+
* @param callback -
|
|
1018
|
+
* @return
|
|
1019
|
+
* @typeParam T -
|
|
1020
|
+
*/
|
|
1037
1021
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
1024
|
+
* do not support reverse.
|
|
1025
|
+
* @return {@link dh.Sort}
|
|
1026
|
+
*/
|
|
1027
|
+
static reverse():Sort;
|
|
1038
1028
|
}
|
|
1039
1029
|
|
|
1040
|
-
/**
|
|
1041
|
-
* Event fired when a command is issued from the client.
|
|
1042
|
-
*/
|
|
1043
|
-
export class CommandInfo {
|
|
1044
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1045
|
-
|
|
1046
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
1047
|
-
get code():string;
|
|
1048
|
-
}
|
|
1049
1030
|
|
|
1050
1031
|
/**
|
|
1051
1032
|
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
@@ -1260,364 +1241,198 @@ export namespace dh {
|
|
|
1260
1241
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1261
1242
|
}
|
|
1262
1243
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
/**
|
|
1273
|
-
* the opposite of this condition
|
|
1274
|
-
* @return FilterCondition
|
|
1275
|
-
*/
|
|
1276
|
-
not():FilterCondition;
|
|
1277
|
-
/**
|
|
1278
|
-
* a condition representing the current condition logically ANDed with the other parameters
|
|
1279
|
-
* @param filters -
|
|
1280
|
-
* @return FilterCondition
|
|
1281
|
-
*/
|
|
1282
|
-
and(...filters:FilterCondition[]):FilterCondition;
|
|
1283
|
-
/**
|
|
1284
|
-
* a condition representing the current condition logically ORed with the other parameters
|
|
1285
|
-
* @param filters -
|
|
1286
|
-
* @return FilterCondition.
|
|
1287
|
-
*/
|
|
1288
|
-
or(...filters:FilterCondition[]):FilterCondition;
|
|
1289
|
-
/**
|
|
1290
|
-
* a string suitable for debugging showing the details of this condition.
|
|
1291
|
-
* @return String.
|
|
1292
|
-
*/
|
|
1293
|
-
toString():string;
|
|
1294
|
-
get columns():Array<Column>;
|
|
1295
|
-
/**
|
|
1296
|
-
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1297
|
-
* functions:
|
|
1298
|
-
* <ul>
|
|
1299
|
-
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1300
|
-
* than the third</li>
|
|
1301
|
-
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1302
|
-
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1303
|
-
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1304
|
-
* "not a number"</i></li>
|
|
1305
|
-
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1306
|
-
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1307
|
-
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1308
|
-
* expression</li>
|
|
1309
|
-
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1310
|
-
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1311
|
-
* <p>
|
|
1312
|
-
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1313
|
-
* method should be used in other cases
|
|
1314
|
-
* </p>
|
|
1315
|
-
* </li>
|
|
1316
|
-
* </ul>
|
|
1317
|
-
* @param function -
|
|
1318
|
-
* @param args -
|
|
1319
|
-
* @return dh.FilterCondition
|
|
1320
|
-
*/
|
|
1321
|
-
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
1244
|
+
export class CoreClient implements HasEventHandling {
|
|
1245
|
+
static readonly EVENT_CONNECT:string;
|
|
1246
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1247
|
+
static readonly EVENT_RECONNECT:string;
|
|
1248
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1249
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1250
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1251
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1322
1252
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1325
|
-
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1326
|
-
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1327
|
-
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1328
|
-
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1329
|
-
* {@link dh.Column.filter}).
|
|
1330
|
-
* @param value -
|
|
1331
|
-
* @param columns -
|
|
1332
|
-
* @return dh.FilterCondition
|
|
1253
|
+
* @deprecated
|
|
1333
1254
|
*/
|
|
1334
|
-
static
|
|
1335
|
-
|
|
1255
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1256
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1257
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1336
1258
|
|
|
1337
|
-
|
|
1338
|
-
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1339
|
-
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1340
|
-
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1341
|
-
*/
|
|
1342
|
-
export class RangeSet {
|
|
1343
|
-
protected constructor();
|
|
1259
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1344
1260
|
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
*/
|
|
1360
|
-
get size():number;
|
|
1261
|
+
running():Promise<CoreClient>;
|
|
1262
|
+
getServerUrl():string;
|
|
1263
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
1264
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
1265
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
1266
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1267
|
+
getServerConfigValues():Promise<string[][]>;
|
|
1268
|
+
getStorageService():dh.storage.StorageService;
|
|
1269
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
1270
|
+
disconnect():void;
|
|
1271
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1272
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1273
|
+
hasListeners(name:string):boolean;
|
|
1274
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1361
1275
|
}
|
|
1362
1276
|
|
|
1363
1277
|
/**
|
|
1364
|
-
*
|
|
1278
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1279
|
+
* interpret these responses to see what to render, or how to respond.
|
|
1280
|
+
* <p>
|
|
1281
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1282
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1283
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1284
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1285
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
1286
|
+
* <p>
|
|
1287
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1288
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1289
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1290
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1291
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1292
|
+
* <p>
|
|
1293
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1294
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1295
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1296
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1297
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1298
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1299
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1300
|
+
* <p>
|
|
1301
|
+
* This can suggest several patterns for how plugins operate:
|
|
1302
|
+
* <ul>
|
|
1303
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1304
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1305
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1306
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1307
|
+
* provided to the JS API consumer.</li>
|
|
1308
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1309
|
+
* which provided them. One concrete example of this could have been
|
|
1310
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1311
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1312
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1313
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1314
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1315
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1316
|
+
* an internal table instance.</li>
|
|
1317
|
+
* </ul>
|
|
1365
1318
|
*
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1319
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1320
|
+
* <ul>
|
|
1321
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1322
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1323
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1324
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1325
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
1326
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1327
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1328
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1329
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1330
|
+
* </ul>
|
|
1369
1331
|
*/
|
|
1370
|
-
export class
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
*/
|
|
1374
|
-
idColumn:string;
|
|
1375
|
-
/**
|
|
1376
|
-
* The column representing the parent ID for each item
|
|
1377
|
-
*/
|
|
1378
|
-
parentColumn:string;
|
|
1379
|
-
/**
|
|
1380
|
-
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
1381
|
-
*/
|
|
1382
|
-
promoteOrphansToRoot:boolean;
|
|
1383
|
-
|
|
1384
|
-
constructor();
|
|
1385
|
-
}
|
|
1332
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1333
|
+
static readonly EVENT_MESSAGE:string;
|
|
1334
|
+
static readonly EVENT_CLOSE:string;
|
|
1386
1335
|
|
|
1387
|
-
/**
|
|
1388
|
-
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1389
|
-
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1390
|
-
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1391
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1392
|
-
* instance.
|
|
1393
|
-
*/
|
|
1394
|
-
export class FilterValue {
|
|
1395
1336
|
protected constructor();
|
|
1396
1337
|
|
|
1397
1338
|
/**
|
|
1398
|
-
*
|
|
1399
|
-
* {@link TableData.get} for DateTime values. To create
|
|
1400
|
-
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1401
|
-
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1402
|
-
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1403
|
-
* @param input - the number to wrap as a FilterValue
|
|
1404
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1405
|
-
*/
|
|
1406
|
-
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1407
|
-
/**
|
|
1408
|
-
* a filter condition checking if the current value is equal to the given parameter
|
|
1409
|
-
* @param term -
|
|
1410
|
-
* @return {@link dh.FilterCondition}
|
|
1411
|
-
*/
|
|
1412
|
-
eq(term:FilterValue):FilterCondition;
|
|
1413
|
-
/**
|
|
1414
|
-
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1415
|
-
* vs lower case
|
|
1416
|
-
* @param term -
|
|
1417
|
-
* @return {@link dh.FilterCondition}
|
|
1418
|
-
*/
|
|
1419
|
-
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1420
|
-
/**
|
|
1421
|
-
* a filter condition checking if the current value is not equal to the given parameter
|
|
1422
|
-
* @param term -
|
|
1423
|
-
* @return {@link dh.FilterCondition}
|
|
1424
|
-
*/
|
|
1425
|
-
notEq(term:FilterValue):FilterCondition;
|
|
1426
|
-
/**
|
|
1427
|
-
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1428
|
-
* upper vs lower case
|
|
1429
|
-
* @param term -
|
|
1430
|
-
* @return {@link dh.FilterCondition}
|
|
1431
|
-
*/
|
|
1432
|
-
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1433
|
-
/**
|
|
1434
|
-
* a filter condition checking if the current value is greater than the given parameter
|
|
1435
|
-
* @param term -
|
|
1436
|
-
* @return {@link dh.FilterCondition}
|
|
1437
|
-
*/
|
|
1438
|
-
greaterThan(term:FilterValue):FilterCondition;
|
|
1439
|
-
/**
|
|
1440
|
-
* a filter condition checking if the current value is less than the given parameter
|
|
1441
|
-
* @param term -
|
|
1442
|
-
* @return {@link dh.FilterCondition}
|
|
1443
|
-
*/
|
|
1444
|
-
lessThan(term:FilterValue):FilterCondition;
|
|
1445
|
-
/**
|
|
1446
|
-
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1447
|
-
* @param term -
|
|
1448
|
-
* @return {@link dh.FilterCondition}
|
|
1449
|
-
*/
|
|
1450
|
-
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1451
|
-
/**
|
|
1452
|
-
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1453
|
-
* @param term -
|
|
1454
|
-
* @return {@link dh.FilterCondition}
|
|
1455
|
-
*/
|
|
1456
|
-
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1457
|
-
/**
|
|
1458
|
-
* a filter condition checking if the current value is in the given set of values
|
|
1459
|
-
* @param terms -
|
|
1460
|
-
* @return {@link dh.FilterCondition}
|
|
1461
|
-
*/
|
|
1462
|
-
in(terms:FilterValue[]):FilterCondition;
|
|
1463
|
-
/**
|
|
1464
|
-
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1465
|
-
* lower case
|
|
1466
|
-
* @param terms -
|
|
1467
|
-
* @return {@link dh.FilterCondition}
|
|
1468
|
-
*/
|
|
1469
|
-
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1470
|
-
/**
|
|
1471
|
-
* a filter condition checking that the current value is not in the given set of values
|
|
1472
|
-
* @param terms -
|
|
1473
|
-
* @return {@link dh.FilterCondition}
|
|
1474
|
-
*/
|
|
1475
|
-
notIn(terms:FilterValue[]):FilterCondition;
|
|
1476
|
-
/**
|
|
1477
|
-
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1478
|
-
* upper vs lower case
|
|
1479
|
-
* @param terms -
|
|
1480
|
-
* @return {@link dh.FilterCondition}
|
|
1481
|
-
*/
|
|
1482
|
-
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1483
|
-
/**
|
|
1484
|
-
* a filter condition checking if the given value contains the given string value
|
|
1485
|
-
* @param term -
|
|
1486
|
-
* @return {@link dh.FilterCondition}
|
|
1487
|
-
*/
|
|
1488
|
-
contains(term:FilterValue):FilterCondition;
|
|
1489
|
-
/**
|
|
1490
|
-
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1491
|
-
* lower case
|
|
1492
|
-
* @param term -
|
|
1493
|
-
* @return {@link dh.FilterCondition}
|
|
1494
|
-
*/
|
|
1495
|
-
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1496
|
-
/**
|
|
1497
|
-
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1498
|
-
* use Java regex syntax
|
|
1499
|
-
* @param pattern -
|
|
1500
|
-
* @return {@link dh.FilterCondition}
|
|
1501
|
-
*/
|
|
1502
|
-
matches(pattern:FilterValue):FilterCondition;
|
|
1503
|
-
/**
|
|
1504
|
-
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1505
|
-
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1506
|
-
* @param pattern -
|
|
1507
|
-
* @return {@link dh.FilterCondition}
|
|
1508
|
-
*/
|
|
1509
|
-
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1510
|
-
/**
|
|
1511
|
-
* a filter condition checking if the current value is a true boolean
|
|
1512
|
-
* @return {@link dh.FilterCondition}
|
|
1513
|
-
*/
|
|
1514
|
-
isTrue():FilterCondition;
|
|
1515
|
-
/**
|
|
1516
|
-
* a filter condition checking if the current value is a false boolean
|
|
1517
|
-
* @return {@link dh.FilterCondition}
|
|
1518
|
-
*/
|
|
1519
|
-
isFalse():FilterCondition;
|
|
1520
|
-
/**
|
|
1521
|
-
* a filter condition checking if the current value is a null value
|
|
1522
|
-
* @return {@link dh.FilterCondition}
|
|
1339
|
+
* Ends the client connection to the server.
|
|
1523
1340
|
*/
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
*
|
|
1530
|
-
*
|
|
1531
|
-
*
|
|
1532
|
-
* regular expression</li>
|
|
1533
|
-
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1534
|
-
* <p>
|
|
1535
|
-
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1536
|
-
* </p>
|
|
1537
|
-
* </li>
|
|
1538
|
-
* </ul>
|
|
1539
|
-
* @param method -
|
|
1540
|
-
* @param args -
|
|
1541
|
-
* @return
|
|
1341
|
+
close():void;
|
|
1342
|
+
getDataAsBase64():string;
|
|
1343
|
+
getDataAsU8():Uint8Array;
|
|
1344
|
+
getDataAsString():string;
|
|
1345
|
+
/**
|
|
1346
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1347
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
1348
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
1542
1349
|
*/
|
|
1543
|
-
|
|
1544
|
-
|
|
1350
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1351
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1352
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1353
|
+
hasListeners(name:string):boolean;
|
|
1354
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1545
1355
|
/**
|
|
1546
|
-
*
|
|
1547
|
-
* @
|
|
1548
|
-
*
|
|
1356
|
+
*
|
|
1357
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1358
|
+
* them when finished using them.
|
|
1549
1359
|
*/
|
|
1550
|
-
|
|
1360
|
+
get exportedObjects():WidgetExportedObject[];
|
|
1551
1361
|
/**
|
|
1552
|
-
*
|
|
1553
|
-
* @
|
|
1554
|
-
* @return
|
|
1362
|
+
*
|
|
1363
|
+
* @return the type of this widget
|
|
1555
1364
|
*/
|
|
1556
|
-
|
|
1365
|
+
get type():string;
|
|
1557
1366
|
}
|
|
1558
1367
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
*/
|
|
1563
|
-
export class IdeConnection implements HasEventHandling {
|
|
1564
|
-
/**
|
|
1565
|
-
* @deprecated
|
|
1566
|
-
*/
|
|
1567
|
-
static readonly HACK_CONNECTION_FAILURE:string;
|
|
1568
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1569
|
-
static readonly EVENT_RECONNECT:string;
|
|
1570
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
1368
|
+
export class IdeSession implements HasEventHandling {
|
|
1369
|
+
static readonly EVENT_COMMANDSTARTED:string;
|
|
1370
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1571
1371
|
|
|
1572
1372
|
protected constructor();
|
|
1573
1373
|
|
|
1574
1374
|
/**
|
|
1575
|
-
*
|
|
1375
|
+
* Load the named table, with columns and size information already fully populated.
|
|
1376
|
+
* @param name -
|
|
1377
|
+
* @param applyPreviewColumns - optional boolean
|
|
1378
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1576
1379
|
*/
|
|
1577
|
-
|
|
1578
|
-
|
|
1380
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
1381
|
+
/**
|
|
1382
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
1383
|
+
* @param name -
|
|
1384
|
+
* @return promise of dh.plot.Figure
|
|
1385
|
+
*/
|
|
1386
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
1389
|
+
* size is presently not available until the viewport is first set.
|
|
1390
|
+
* @param name -
|
|
1391
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
1392
|
+
*/
|
|
1393
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
1394
|
+
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
1395
|
+
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
1579
1396
|
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1580
|
-
|
|
1397
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
1581
1398
|
/**
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1585
|
-
* @param callback -
|
|
1586
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1399
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
1400
|
+
* @param tables -
|
|
1401
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1587
1402
|
*/
|
|
1403
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
1404
|
+
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
1405
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1406
|
+
close():void;
|
|
1407
|
+
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
1588
1408
|
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1409
|
+
openDocument(params:object):void;
|
|
1410
|
+
changeDocument(params:object):void;
|
|
1411
|
+
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
1412
|
+
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
1413
|
+
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
1414
|
+
closeDocument(params:object):void;
|
|
1592
1415
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
1595
|
-
* @param
|
|
1596
|
-
* @return
|
|
1597
|
-
|
|
1416
|
+
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
1417
|
+
* values will be null.
|
|
1418
|
+
* @param size -
|
|
1419
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1420
|
+
*/
|
|
1421
|
+
emptyTable(size:number):Promise<Table>;
|
|
1422
|
+
/**
|
|
1423
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
1424
|
+
* the table will be populated with the interval from the specified date until now.
|
|
1425
|
+
* @param periodNanos -
|
|
1426
|
+
* @param startTime -
|
|
1427
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1598
1428
|
*/
|
|
1429
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
1599
1430
|
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1600
1431
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1601
1432
|
hasListeners(name:string):boolean;
|
|
1602
|
-
/**
|
|
1603
|
-
* Removes an event listener added to this table.
|
|
1604
|
-
* @param name -
|
|
1605
|
-
* @param callback -
|
|
1606
|
-
* @return
|
|
1607
|
-
* @typeParam T -
|
|
1608
|
-
*/
|
|
1609
1433
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1610
1434
|
}
|
|
1611
1435
|
|
|
1612
|
-
export class LongWrapper {
|
|
1613
|
-
protected constructor();
|
|
1614
|
-
|
|
1615
|
-
static ofString(str:string):LongWrapper;
|
|
1616
|
-
asNumber():number;
|
|
1617
|
-
valueOf():string;
|
|
1618
|
-
toString():string;
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
1436
|
/**
|
|
1622
1437
|
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1623
1438
|
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
@@ -1641,6 +1456,10 @@ export namespace dh {
|
|
|
1641
1456
|
changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
|
|
1642
1457
|
get columns():Array<Column>;
|
|
1643
1458
|
/**
|
|
1459
|
+
* Stops the subscription on the server.
|
|
1460
|
+
*/
|
|
1461
|
+
close():void;
|
|
1462
|
+
/**
|
|
1644
1463
|
* Listen for events on this object.
|
|
1645
1464
|
* @param name - the name of the event to listen for
|
|
1646
1465
|
* @param callback - a function to call when the event occurs
|
|
@@ -1660,826 +1479,993 @@ export namespace dh {
|
|
|
1660
1479
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1661
1480
|
}
|
|
1662
1481
|
|
|
1663
|
-
export class
|
|
1664
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
1665
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1666
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
1667
|
-
static readonly TYPE_NEW:string;
|
|
1668
|
-
|
|
1482
|
+
export class LongWrapper {
|
|
1669
1483
|
protected constructor();
|
|
1670
1484
|
|
|
1485
|
+
static ofString(str:string):LongWrapper;
|
|
1486
|
+
asNumber():number;
|
|
1671
1487
|
valueOf():string;
|
|
1672
1488
|
toString():string;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1493
|
+
* this type TableMap.
|
|
1494
|
+
* @deprecated
|
|
1495
|
+
*/
|
|
1496
|
+
export class TableMap {
|
|
1497
|
+
static readonly EVENT_KEYADDED:string;
|
|
1498
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1499
|
+
static readonly EVENT_RECONNECT:string;
|
|
1500
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1501
|
+
|
|
1502
|
+
protected constructor();
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
1507
|
+
* roll-up table.
|
|
1508
|
+
*/
|
|
1509
|
+
export class RollupConfig {
|
|
1673
1510
|
/**
|
|
1674
|
-
*
|
|
1511
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
1512
|
+
*/
|
|
1513
|
+
groupingColumns:Array<String>;
|
|
1514
|
+
/**
|
|
1515
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1516
|
+
* roll-up table.
|
|
1517
|
+
*/
|
|
1518
|
+
aggregations:{ [key: string]: Array<string>; };
|
|
1519
|
+
/**
|
|
1520
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
1521
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
1522
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1523
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1524
|
+
*/
|
|
1525
|
+
includeConstituents:boolean;
|
|
1526
|
+
includeOriginalColumns?:boolean|null;
|
|
1527
|
+
/**
|
|
1528
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
1529
|
+
*/
|
|
1530
|
+
includeDescriptions:boolean;
|
|
1531
|
+
|
|
1532
|
+
constructor();
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1537
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
1538
|
+
* methods return a new Sort instance.
|
|
1539
|
+
*/
|
|
1540
|
+
export class Sort {
|
|
1541
|
+
static readonly ASCENDING:string;
|
|
1542
|
+
static readonly DESCENDING:string;
|
|
1543
|
+
static readonly REVERSE:string;
|
|
1544
|
+
|
|
1545
|
+
protected constructor();
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
1549
|
+
* @return {@link dh.Sort}
|
|
1550
|
+
*/
|
|
1551
|
+
asc():Sort;
|
|
1552
|
+
/**
|
|
1553
|
+
* Builds a Sort instance to sort values in descending order.
|
|
1554
|
+
* @return {@link dh.Sort}
|
|
1555
|
+
*/
|
|
1556
|
+
desc():Sort;
|
|
1557
|
+
/**
|
|
1558
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1559
|
+
* @return {@link dh.Sort}
|
|
1560
|
+
*/
|
|
1561
|
+
abs():Sort;
|
|
1562
|
+
toString():string;
|
|
1563
|
+
/**
|
|
1564
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1565
|
+
* @return boolean
|
|
1566
|
+
*/
|
|
1567
|
+
get isAbs():boolean;
|
|
1568
|
+
/**
|
|
1569
|
+
* The column which is sorted.
|
|
1570
|
+
* @return {@link dh.Column}
|
|
1571
|
+
*/
|
|
1572
|
+
get column():Column;
|
|
1573
|
+
/**
|
|
1574
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
1675
1575
|
* @return String
|
|
1676
1576
|
*/
|
|
1677
|
-
get
|
|
1577
|
+
get direction():string;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1582
|
+
* column.
|
|
1583
|
+
*/
|
|
1584
|
+
export class Column {
|
|
1678
1585
|
/**
|
|
1679
|
-
*
|
|
1586
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1587
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1680
1588
|
* @return String
|
|
1681
1589
|
*/
|
|
1682
|
-
|
|
1590
|
+
readonly constituentType?:string|null;
|
|
1591
|
+
readonly description?:string|null;
|
|
1592
|
+
|
|
1593
|
+
protected constructor();
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1597
|
+
* @param row -
|
|
1598
|
+
* @return Any
|
|
1599
|
+
*/
|
|
1600
|
+
get(row:Row):any;
|
|
1601
|
+
getFormat(row:Row):Format;
|
|
1602
|
+
/**
|
|
1603
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
1604
|
+
* @return {@link dh.Sort}
|
|
1605
|
+
*/
|
|
1606
|
+
sort():Sort;
|
|
1607
|
+
/**
|
|
1608
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1609
|
+
* operation, or as a builder to create a filter operation.
|
|
1610
|
+
* @return {@link dh.FilterValue}
|
|
1611
|
+
*/
|
|
1612
|
+
filter():FilterValue;
|
|
1683
1613
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
*
|
|
1686
|
-
*
|
|
1687
|
-
* <li>FORMAT_COLOR</li>
|
|
1688
|
-
* <li>FORMAT_NUMBER</li>
|
|
1689
|
-
* <li>FORMAT_DATE</li>
|
|
1690
|
-
* <li>NEW</li>
|
|
1691
|
-
* </ul>
|
|
1692
|
-
* @return String
|
|
1614
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1615
|
+
* @param expression -
|
|
1616
|
+
* @return {@link dh.CustomColumn}
|
|
1693
1617
|
*/
|
|
1694
|
-
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1699
|
-
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1700
|
-
* inform the UI right away that they have taken place.
|
|
1701
|
-
*/
|
|
1702
|
-
export class Table implements JoinableTable, HasEventHandling {
|
|
1703
|
-
readonly description?:string|null;
|
|
1704
|
-
readonly pluginName?:string|null;
|
|
1705
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1618
|
+
formatColor(expression:string):CustomColumn;
|
|
1706
1619
|
/**
|
|
1707
|
-
*
|
|
1620
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1621
|
+
* @param expression -
|
|
1622
|
+
* @return {@link dh.CustomColumn}
|
|
1708
1623
|
*/
|
|
1709
|
-
|
|
1624
|
+
formatNumber(expression:string):CustomColumn;
|
|
1710
1625
|
/**
|
|
1711
|
-
*
|
|
1626
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1627
|
+
* @param expression -
|
|
1628
|
+
* @return {@link dh.CustomColumn}
|
|
1712
1629
|
*/
|
|
1713
|
-
|
|
1630
|
+
formatDate(expression:string):CustomColumn;
|
|
1631
|
+
toString():string;
|
|
1714
1632
|
/**
|
|
1715
|
-
*
|
|
1633
|
+
* Label for this column.
|
|
1634
|
+
* @return String
|
|
1716
1635
|
*/
|
|
1717
|
-
|
|
1636
|
+
get name():string;
|
|
1718
1637
|
/**
|
|
1719
|
-
*
|
|
1638
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
1639
|
+
* {@link Table.uncoalesced}.
|
|
1640
|
+
* @return true if the column is a partition column
|
|
1720
1641
|
*/
|
|
1721
|
-
|
|
1642
|
+
get isPartitionColumn():boolean;
|
|
1722
1643
|
/**
|
|
1723
|
-
*
|
|
1644
|
+
*
|
|
1645
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1646
|
+
* @return int
|
|
1724
1647
|
*/
|
|
1725
|
-
|
|
1648
|
+
get index():number;
|
|
1649
|
+
get isSortable():boolean;
|
|
1726
1650
|
/**
|
|
1727
|
-
*
|
|
1651
|
+
* Type of the row data that can be found in this column.
|
|
1652
|
+
* @return String
|
|
1728
1653
|
*/
|
|
1729
|
-
|
|
1654
|
+
get type():string;
|
|
1730
1655
|
/**
|
|
1731
|
-
*
|
|
1656
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
1657
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1658
|
+
* @param expression -
|
|
1659
|
+
* @return {@link dh.CustomColumn}
|
|
1732
1660
|
*/
|
|
1733
|
-
static
|
|
1661
|
+
static formatRowColor(expression:string):CustomColumn;
|
|
1734
1662
|
/**
|
|
1735
|
-
*
|
|
1663
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1664
|
+
* @param name -
|
|
1665
|
+
* @param expression -
|
|
1666
|
+
* @return {@link dh.CustomColumn}
|
|
1736
1667
|
*/
|
|
1737
|
-
static
|
|
1668
|
+
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1673
|
+
*/
|
|
1674
|
+
export class BigDecimalWrapper {
|
|
1675
|
+
protected constructor();
|
|
1676
|
+
|
|
1677
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
1678
|
+
asNumber():number;
|
|
1679
|
+
valueOf():string;
|
|
1680
|
+
toString():string;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
/**
|
|
1684
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1685
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1686
|
+
* instance.
|
|
1687
|
+
*/
|
|
1688
|
+
export class FilterCondition {
|
|
1689
|
+
protected constructor();
|
|
1690
|
+
|
|
1738
1691
|
/**
|
|
1739
|
-
*
|
|
1692
|
+
* the opposite of this condition
|
|
1693
|
+
* @return FilterCondition
|
|
1740
1694
|
*/
|
|
1741
|
-
|
|
1695
|
+
not():FilterCondition;
|
|
1742
1696
|
/**
|
|
1743
|
-
*
|
|
1697
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
1698
|
+
* @param filters -
|
|
1699
|
+
* @return FilterCondition
|
|
1744
1700
|
*/
|
|
1745
|
-
|
|
1701
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
1746
1702
|
/**
|
|
1747
|
-
*
|
|
1703
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
1704
|
+
* @param filters -
|
|
1705
|
+
* @return FilterCondition.
|
|
1748
1706
|
*/
|
|
1749
|
-
|
|
1707
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
1750
1708
|
/**
|
|
1751
|
-
*
|
|
1709
|
+
* a string suitable for debugging showing the details of this condition.
|
|
1710
|
+
* @return String.
|
|
1752
1711
|
*/
|
|
1753
|
-
|
|
1712
|
+
toString():string;
|
|
1713
|
+
get columns():Array<Column>;
|
|
1754
1714
|
/**
|
|
1755
|
-
*
|
|
1715
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1716
|
+
* functions:
|
|
1717
|
+
* <ul>
|
|
1718
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1719
|
+
* than the third</li>
|
|
1720
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1721
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1722
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1723
|
+
* "not a number"</i></li>
|
|
1724
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1725
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1726
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1727
|
+
* expression</li>
|
|
1728
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1729
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1730
|
+
* <p>
|
|
1731
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1732
|
+
* method should be used in other cases
|
|
1733
|
+
* </p>
|
|
1734
|
+
* </li>
|
|
1735
|
+
* </ul>
|
|
1736
|
+
* @param function -
|
|
1737
|
+
* @param args -
|
|
1738
|
+
* @return dh.FilterCondition
|
|
1756
1739
|
*/
|
|
1757
|
-
static
|
|
1740
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
1758
1741
|
/**
|
|
1759
|
-
*
|
|
1742
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
1743
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1744
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1745
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1746
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1747
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1748
|
+
* {@link dh.Column.filter}).
|
|
1749
|
+
* @param value -
|
|
1750
|
+
* @param columns -
|
|
1751
|
+
* @return dh.FilterCondition
|
|
1760
1752
|
*/
|
|
1761
|
-
static
|
|
1753
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
1754
|
+
}
|
|
1762
1755
|
|
|
1763
|
-
|
|
1756
|
+
/**
|
|
1757
|
+
* Event fired when a command is issued from the client.
|
|
1758
|
+
*/
|
|
1759
|
+
export class CommandInfo {
|
|
1760
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1764
1761
|
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1762
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
1763
|
+
get code():string;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
1768
|
+
*/
|
|
1769
|
+
export class ConnectOptions {
|
|
1773
1770
|
/**
|
|
1774
|
-
*
|
|
1775
|
-
* @param keys -
|
|
1776
|
-
* @return {@link dh.Column} array
|
|
1771
|
+
* Optional map of http header names and values to send to the server with each request.
|
|
1777
1772
|
*/
|
|
1778
|
-
|
|
1779
|
-
isBlinkTable():boolean;
|
|
1773
|
+
headers?:{ [key: string]: string; }|null;
|
|
1780
1774
|
/**
|
|
1781
|
-
*
|
|
1782
|
-
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
1783
|
-
* @return Promise of dh.InputTable
|
|
1775
|
+
* True to enable debug logging. At this time, only enables logging for gRPC calls.
|
|
1784
1776
|
*/
|
|
1785
|
-
|
|
1777
|
+
debug?:boolean|null;
|
|
1786
1778
|
/**
|
|
1787
|
-
*
|
|
1779
|
+
* Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
|
|
1780
|
+
* of `fetch`. Ignored if {@link dh.transportFactory} is set.
|
|
1781
|
+
* <p>
|
|
1782
|
+
* Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
|
|
1788
1783
|
*/
|
|
1789
|
-
|
|
1790
|
-
getAttributes():string[];
|
|
1784
|
+
useWebsockets?:boolean|null;
|
|
1791
1785
|
/**
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1786
|
+
* The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
|
|
1787
|
+
* {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
|
|
1788
|
+
* <p>
|
|
1789
|
+
* Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
|
|
1790
|
+
* `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
|
|
1791
|
+
* https, it will use fetch, otherwise it will use websockets.
|
|
1796
1792
|
*/
|
|
1797
|
-
|
|
1793
|
+
transportFactory?:dh.grpc.GrpcTransportFactory|null;
|
|
1794
|
+
|
|
1795
|
+
constructor();
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1800
|
+
*/
|
|
1801
|
+
export class BigIntegerWrapper {
|
|
1802
|
+
protected constructor();
|
|
1803
|
+
|
|
1804
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
1805
|
+
asNumber():number;
|
|
1806
|
+
valueOf():string;
|
|
1807
|
+
toString():string;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
1812
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
1813
|
+
*/
|
|
1814
|
+
export class IdeConnection implements HasEventHandling {
|
|
1798
1815
|
/**
|
|
1799
|
-
*
|
|
1800
|
-
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
1801
|
-
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
1802
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1803
|
-
* not.
|
|
1804
|
-
* @param sort -
|
|
1805
|
-
* @return {@link dh.Sort} array
|
|
1816
|
+
* @deprecated
|
|
1806
1817
|
*/
|
|
1807
|
-
|
|
1818
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
1819
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1820
|
+
static readonly EVENT_RECONNECT:string;
|
|
1821
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
1822
|
+
|
|
1823
|
+
protected constructor();
|
|
1824
|
+
|
|
1808
1825
|
/**
|
|
1809
|
-
*
|
|
1810
|
-
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
1811
|
-
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
1812
|
-
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
1813
|
-
* will not.
|
|
1814
|
-
* @param filter -
|
|
1815
|
-
* @return {@link dh.FilterCondition} array
|
|
1826
|
+
* Closes the current connection, releasing any resources on the server or client.
|
|
1816
1827
|
*/
|
|
1817
|
-
|
|
1828
|
+
close():void;
|
|
1829
|
+
running():Promise<IdeConnection>;
|
|
1830
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1831
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1818
1832
|
/**
|
|
1819
|
-
*
|
|
1820
|
-
*
|
|
1821
|
-
*
|
|
1833
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
1834
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1835
|
+
* log messages as are presently available.
|
|
1836
|
+
* @param callback -
|
|
1837
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1822
1838
|
*/
|
|
1823
|
-
|
|
1839
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1840
|
+
startSession(type:string):Promise<IdeSession>;
|
|
1841
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
1842
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1824
1843
|
/**
|
|
1825
|
-
*
|
|
1826
|
-
*
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1829
|
-
*
|
|
1830
|
-
* @param firstRow -
|
|
1831
|
-
* @param lastRow -
|
|
1832
|
-
* @param columns -
|
|
1833
|
-
* @param updateIntervalMs -
|
|
1834
|
-
* @return {@link dh.TableViewportSubscription}
|
|
1844
|
+
* Listen for events on this object.
|
|
1845
|
+
* @param name - the name of the event to listen for
|
|
1846
|
+
* @param callback - a function to call when the event occurs
|
|
1847
|
+
* @return Returns a cleanup function.
|
|
1848
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1835
1849
|
*/
|
|
1836
|
-
|
|
1850
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1851
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1852
|
+
hasListeners(name:string):boolean;
|
|
1837
1853
|
/**
|
|
1838
|
-
*
|
|
1839
|
-
*
|
|
1840
|
-
*
|
|
1841
|
-
*
|
|
1842
|
-
* @
|
|
1854
|
+
* Removes an event listener added to this table.
|
|
1855
|
+
* @param name -
|
|
1856
|
+
* @param callback -
|
|
1857
|
+
* @return
|
|
1858
|
+
* @typeParam T -
|
|
1843
1859
|
*/
|
|
1844
|
-
|
|
1860
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
1865
|
+
*
|
|
1866
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
1867
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
1868
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
1869
|
+
*/
|
|
1870
|
+
export class TreeTableConfig {
|
|
1845
1871
|
/**
|
|
1846
|
-
*
|
|
1847
|
-
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
1848
|
-
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
1849
|
-
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1850
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1851
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1852
|
-
* @param columns -
|
|
1853
|
-
* @param updateIntervalMs -
|
|
1854
|
-
* @return {@link dh.TableSubscription}
|
|
1872
|
+
* The column representing the unique ID for each item
|
|
1855
1873
|
*/
|
|
1856
|
-
|
|
1874
|
+
idColumn:string;
|
|
1857
1875
|
/**
|
|
1858
|
-
*
|
|
1859
|
-
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
1860
|
-
* order of appearance of values from the original table.
|
|
1861
|
-
* @param columns -
|
|
1862
|
-
* @return Promise of dh.Table
|
|
1876
|
+
* The column representing the parent ID for each item
|
|
1863
1877
|
*/
|
|
1864
|
-
|
|
1878
|
+
parentColumn:string;
|
|
1865
1879
|
/**
|
|
1866
|
-
*
|
|
1867
|
-
* @return Promise of dh.Table
|
|
1880
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
1868
1881
|
*/
|
|
1869
|
-
|
|
1882
|
+
promoteOrphansToRoot:boolean;
|
|
1883
|
+
|
|
1884
|
+
constructor();
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1889
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1890
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1891
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1892
|
+
* instance.
|
|
1893
|
+
*/
|
|
1894
|
+
export class FilterValue {
|
|
1895
|
+
protected constructor();
|
|
1896
|
+
|
|
1870
1897
|
/**
|
|
1871
|
-
* a
|
|
1872
|
-
*
|
|
1873
|
-
*
|
|
1874
|
-
*
|
|
1875
|
-
*
|
|
1876
|
-
* @
|
|
1898
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
1899
|
+
* {@link TableData.get} for DateTime values. To create
|
|
1900
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1901
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1902
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1903
|
+
* @param input - the number to wrap as a FilterValue
|
|
1904
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
1877
1905
|
*/
|
|
1878
|
-
|
|
1906
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1879
1907
|
/**
|
|
1880
|
-
* a
|
|
1881
|
-
*
|
|
1882
|
-
* @
|
|
1883
|
-
* @return promise of dh.TotalsTable
|
|
1908
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
1909
|
+
* @param term -
|
|
1910
|
+
* @return {@link dh.FilterCondition}
|
|
1884
1911
|
*/
|
|
1885
|
-
|
|
1912
|
+
eq(term:FilterValue):FilterCondition;
|
|
1886
1913
|
/**
|
|
1887
|
-
* a
|
|
1888
|
-
*
|
|
1889
|
-
* @param
|
|
1890
|
-
* @return
|
|
1914
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1915
|
+
* vs lower case
|
|
1916
|
+
* @param term -
|
|
1917
|
+
* @return {@link dh.FilterCondition}
|
|
1891
1918
|
*/
|
|
1892
|
-
|
|
1919
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1893
1920
|
/**
|
|
1894
|
-
* a
|
|
1895
|
-
*
|
|
1896
|
-
* @
|
|
1897
|
-
* @return Promise dh.TreeTable
|
|
1921
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
1922
|
+
* @param term -
|
|
1923
|
+
* @return {@link dh.FilterCondition}
|
|
1898
1924
|
*/
|
|
1899
|
-
|
|
1925
|
+
notEq(term:FilterValue):FilterCondition;
|
|
1900
1926
|
/**
|
|
1901
|
-
* a
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
* @return
|
|
1927
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1928
|
+
* upper vs lower case
|
|
1929
|
+
* @param term -
|
|
1930
|
+
* @return {@link dh.FilterCondition}
|
|
1905
1931
|
*/
|
|
1906
|
-
|
|
1907
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1932
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1908
1933
|
/**
|
|
1909
|
-
*
|
|
1910
|
-
* @
|
|
1911
|
-
* @
|
|
1934
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1935
|
+
* @param term -
|
|
1936
|
+
* @return {@link dh.FilterCondition}
|
|
1912
1937
|
*/
|
|
1913
|
-
|
|
1914
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1915
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1916
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1917
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1918
|
-
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1938
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
1919
1939
|
/**
|
|
1920
|
-
*
|
|
1921
|
-
*
|
|
1922
|
-
* @
|
|
1923
|
-
* @param dropKeys -
|
|
1924
|
-
* @return Promise dh.PartitionedTable
|
|
1940
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1941
|
+
* @param term -
|
|
1942
|
+
* @return {@link dh.FilterCondition}
|
|
1925
1943
|
*/
|
|
1926
|
-
|
|
1944
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
1927
1945
|
/**
|
|
1928
|
-
* a
|
|
1929
|
-
* @param
|
|
1930
|
-
* @return
|
|
1946
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1947
|
+
* @param term -
|
|
1948
|
+
* @return {@link dh.FilterCondition}
|
|
1931
1949
|
*/
|
|
1932
|
-
|
|
1950
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1933
1951
|
/**
|
|
1934
|
-
*
|
|
1935
|
-
* @param
|
|
1936
|
-
* @
|
|
1937
|
-
* @param valueType - Type of value provided
|
|
1938
|
-
* @param seekValue - Value to seek
|
|
1939
|
-
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1940
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1941
|
-
* `false`.
|
|
1942
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1943
|
-
* @return A promise that resolves to the row value found.
|
|
1952
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1953
|
+
* @param term -
|
|
1954
|
+
* @return {@link dh.FilterCondition}
|
|
1944
1955
|
*/
|
|
1945
|
-
|
|
1946
|
-
toString():string;
|
|
1956
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1947
1957
|
/**
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
* @return
|
|
1958
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1959
|
+
* @param terms -
|
|
1960
|
+
* @return {@link dh.FilterCondition}
|
|
1951
1961
|
*/
|
|
1952
|
-
|
|
1962
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
1953
1963
|
/**
|
|
1954
|
-
*
|
|
1955
|
-
*
|
|
1956
|
-
*
|
|
1957
|
-
*
|
|
1958
|
-
* @return {@link dh.Column} array
|
|
1964
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1965
|
+
* lower case
|
|
1966
|
+
* @param terms -
|
|
1967
|
+
* @return {@link dh.FilterCondition}
|
|
1959
1968
|
*/
|
|
1960
|
-
|
|
1969
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1961
1970
|
/**
|
|
1962
|
-
*
|
|
1963
|
-
* @
|
|
1971
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1972
|
+
* @param terms -
|
|
1973
|
+
* @return {@link dh.FilterCondition}
|
|
1964
1974
|
*/
|
|
1965
|
-
|
|
1975
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
1966
1976
|
/**
|
|
1967
|
-
*
|
|
1968
|
-
*
|
|
1969
|
-
*
|
|
1970
|
-
* @return {@link dh.
|
|
1977
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1978
|
+
* upper vs lower case
|
|
1979
|
+
* @param terms -
|
|
1980
|
+
* @return {@link dh.FilterCondition}
|
|
1971
1981
|
*/
|
|
1972
|
-
|
|
1982
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1973
1983
|
/**
|
|
1974
|
-
*
|
|
1975
|
-
*
|
|
1976
|
-
* @return {@link dh.
|
|
1984
|
+
* a filter condition checking if the given value contains the given string value
|
|
1985
|
+
* @param term -
|
|
1986
|
+
* @return {@link dh.FilterCondition}
|
|
1977
1987
|
*/
|
|
1978
|
-
|
|
1988
|
+
contains(term:FilterValue):FilterCondition;
|
|
1979
1989
|
/**
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1982
|
-
* @
|
|
1990
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1991
|
+
* lower case
|
|
1992
|
+
* @param term -
|
|
1993
|
+
* @return {@link dh.FilterCondition}
|
|
1983
1994
|
*/
|
|
1984
|
-
|
|
1995
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1985
1996
|
/**
|
|
1986
|
-
*
|
|
1987
|
-
*
|
|
1988
|
-
*
|
|
1989
|
-
* @return {@link dh.FilterCondition}
|
|
1997
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1998
|
+
* use Java regex syntax
|
|
1999
|
+
* @param pattern -
|
|
2000
|
+
* @return {@link dh.FilterCondition}
|
|
1990
2001
|
*/
|
|
1991
|
-
|
|
2002
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
1992
2003
|
/**
|
|
1993
|
-
*
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1996
|
-
* @return
|
|
2004
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
2005
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
2006
|
+
* @param pattern -
|
|
2007
|
+
* @return {@link dh.FilterCondition}
|
|
1997
2008
|
*/
|
|
1998
|
-
|
|
2009
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1999
2010
|
/**
|
|
2000
|
-
*
|
|
2001
|
-
*
|
|
2002
|
-
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
2003
|
-
* <p>
|
|
2004
|
-
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
2005
|
-
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
2006
|
-
* uncoalesced.
|
|
2011
|
+
* a filter condition checking if the current value is a true boolean
|
|
2012
|
+
* @return {@link dh.FilterCondition}
|
|
2007
2013
|
*/
|
|
2008
|
-
|
|
2014
|
+
isTrue():FilterCondition;
|
|
2009
2015
|
/**
|
|
2010
|
-
*
|
|
2011
|
-
* @return
|
|
2016
|
+
* a filter condition checking if the current value is a false boolean
|
|
2017
|
+
* @return {@link dh.FilterCondition}
|
|
2012
2018
|
*/
|
|
2013
|
-
|
|
2019
|
+
isFalse():FilterCondition;
|
|
2014
2020
|
/**
|
|
2015
|
-
*
|
|
2016
|
-
*
|
|
2017
|
-
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
2018
|
-
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
2019
|
-
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
2020
|
-
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
2021
|
-
* for those columns, use {@link Table.selectDistinct}.
|
|
2022
|
-
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
2021
|
+
* a filter condition checking if the current value is a null value
|
|
2022
|
+
* @return {@link dh.FilterCondition}
|
|
2023
2023
|
*/
|
|
2024
|
-
|
|
2024
|
+
isNull():FilterCondition;
|
|
2025
2025
|
/**
|
|
2026
|
-
*
|
|
2027
|
-
*
|
|
2028
|
-
*
|
|
2029
|
-
*
|
|
2030
|
-
*
|
|
2026
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
2027
|
+
* functions that can be invoked on a String:
|
|
2028
|
+
* <ul>
|
|
2029
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
2030
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
2031
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
2032
|
+
* regular expression</li>
|
|
2033
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
2034
|
+
* <p>
|
|
2035
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
2036
|
+
* </p>
|
|
2037
|
+
* </li>
|
|
2038
|
+
* </ul>
|
|
2039
|
+
* @param method -
|
|
2040
|
+
* @param args -
|
|
2041
|
+
* @return
|
|
2031
2042
|
*/
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
hasListeners(name:string):boolean;
|
|
2043
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
2044
|
+
toString():string;
|
|
2035
2045
|
/**
|
|
2036
|
-
*
|
|
2037
|
-
* @param
|
|
2038
|
-
* @param callback -
|
|
2046
|
+
* Constructs a string for the filter API from the given parameter.
|
|
2047
|
+
* @param input -
|
|
2039
2048
|
* @return
|
|
2040
|
-
* @typeParam T -
|
|
2041
2049
|
*/
|
|
2042
|
-
|
|
2050
|
+
static ofString(input:any):FilterValue;
|
|
2043
2051
|
/**
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2046
|
-
* @return
|
|
2052
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
2053
|
+
* @param b -
|
|
2054
|
+
* @return
|
|
2047
2055
|
*/
|
|
2048
|
-
static
|
|
2056
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
2049
2057
|
}
|
|
2050
2058
|
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
export class Sort {
|
|
2057
|
-
static readonly ASCENDING:string;
|
|
2058
|
-
static readonly DESCENDING:string;
|
|
2059
|
-
static readonly REVERSE:string;
|
|
2059
|
+
export class QueryInfo {
|
|
2060
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
2061
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2062
|
+
static readonly EVENT_RECONNECT:string;
|
|
2063
|
+
static readonly EVENT_CONNECT:string;
|
|
2060
2064
|
|
|
2061
2065
|
protected constructor();
|
|
2066
|
+
}
|
|
2062
2067
|
|
|
2068
|
+
/**
|
|
2069
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
2070
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
2071
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
2072
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
2073
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
2074
|
+
*
|
|
2075
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
2076
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
2077
|
+
* expected formats.
|
|
2078
|
+
*/
|
|
2079
|
+
export class TotalsTableConfig {
|
|
2063
2080
|
/**
|
|
2064
|
-
*
|
|
2065
|
-
* @return {@link dh.Sort}
|
|
2066
|
-
*/
|
|
2067
|
-
asc():Sort;
|
|
2068
|
-
/**
|
|
2069
|
-
* Builds a Sort instance to sort values in descending order.
|
|
2070
|
-
* @return {@link dh.Sort}
|
|
2081
|
+
* @deprecated
|
|
2071
2082
|
*/
|
|
2072
|
-
|
|
2083
|
+
static readonly COUNT:string;
|
|
2073
2084
|
/**
|
|
2074
|
-
*
|
|
2075
|
-
* @return {@link dh.Sort}
|
|
2085
|
+
* @deprecated
|
|
2076
2086
|
*/
|
|
2077
|
-
|
|
2078
|
-
toString():string;
|
|
2087
|
+
static readonly MIN:string;
|
|
2079
2088
|
/**
|
|
2080
|
-
*
|
|
2081
|
-
* @return boolean
|
|
2089
|
+
* @deprecated
|
|
2082
2090
|
*/
|
|
2083
|
-
|
|
2091
|
+
static readonly MAX:string;
|
|
2084
2092
|
/**
|
|
2085
|
-
*
|
|
2086
|
-
* @return {@link dh.Column}
|
|
2093
|
+
* @deprecated
|
|
2087
2094
|
*/
|
|
2088
|
-
|
|
2095
|
+
static readonly SUM:string;
|
|
2089
2096
|
/**
|
|
2090
|
-
*
|
|
2091
|
-
* @return String
|
|
2097
|
+
* @deprecated
|
|
2092
2098
|
*/
|
|
2093
|
-
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
/**
|
|
2097
|
-
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
2098
|
-
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
2099
|
-
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
2100
|
-
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
2101
|
-
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
2102
|
-
*/
|
|
2103
|
-
export class TableViewportSubscription implements HasEventHandling {
|
|
2104
|
-
protected constructor();
|
|
2105
|
-
|
|
2099
|
+
static readonly ABS_SUM:string;
|
|
2106
2100
|
/**
|
|
2107
|
-
*
|
|
2108
|
-
* @param firstRow -
|
|
2109
|
-
* @param lastRow -
|
|
2110
|
-
* @param columns -
|
|
2111
|
-
* @param updateIntervalMs -
|
|
2101
|
+
* @deprecated
|
|
2112
2102
|
*/
|
|
2113
|
-
|
|
2103
|
+
static readonly VAR:string;
|
|
2114
2104
|
/**
|
|
2115
|
-
*
|
|
2105
|
+
* @deprecated
|
|
2116
2106
|
*/
|
|
2117
|
-
|
|
2107
|
+
static readonly AVG:string;
|
|
2118
2108
|
/**
|
|
2119
|
-
*
|
|
2120
|
-
* @return Promise of {@link dh.TableData}.
|
|
2109
|
+
* @deprecated
|
|
2121
2110
|
*/
|
|
2122
|
-
|
|
2123
|
-
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
2111
|
+
static readonly STD:string;
|
|
2124
2112
|
/**
|
|
2125
|
-
*
|
|
2126
|
-
* @param name - the name of the event to listen for
|
|
2127
|
-
* @param callback - a function to call when the event occurs
|
|
2128
|
-
* @return Returns a cleanup function.
|
|
2129
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2113
|
+
* @deprecated
|
|
2130
2114
|
*/
|
|
2131
|
-
|
|
2132
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2133
|
-
hasListeners(name:string):boolean;
|
|
2115
|
+
static readonly FIRST:string;
|
|
2134
2116
|
/**
|
|
2135
|
-
*
|
|
2136
|
-
* @param name -
|
|
2137
|
-
* @param callback -
|
|
2138
|
-
* @return
|
|
2139
|
-
* @typeParam T -
|
|
2117
|
+
* @deprecated
|
|
2140
2118
|
*/
|
|
2141
|
-
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
/**
|
|
2145
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
2146
|
-
* interpret these responses to see what to render, or how to respond.
|
|
2147
|
-
* <p>
|
|
2148
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
2149
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
2150
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
2151
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
2152
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
2153
|
-
* <p>
|
|
2154
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
2155
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
2156
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
2157
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
2158
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
2159
|
-
* <p>
|
|
2160
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
2161
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
2162
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
2163
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
2164
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
2165
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
2166
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
2167
|
-
* <p>
|
|
2168
|
-
* This can suggest several patterns for how plugins operate:
|
|
2169
|
-
* <ul>
|
|
2170
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
2171
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
2172
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
2173
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
2174
|
-
* provided to the JS API consumer.</li>
|
|
2175
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
2176
|
-
* which provided them. One concrete example of this could have been
|
|
2177
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
2178
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
2179
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
2180
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
2181
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
2182
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
2183
|
-
* an internal table instance.</li>
|
|
2184
|
-
* </ul>
|
|
2185
|
-
*
|
|
2186
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
2187
|
-
* <ul>
|
|
2188
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
2189
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
2190
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
2191
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
2192
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
2193
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
2194
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
2195
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
2196
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
2197
|
-
* </ul>
|
|
2198
|
-
*/
|
|
2199
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
2200
|
-
static readonly EVENT_MESSAGE:string;
|
|
2201
|
-
static readonly EVENT_CLOSE:string;
|
|
2202
|
-
|
|
2203
|
-
protected constructor();
|
|
2204
|
-
|
|
2119
|
+
static readonly LAST:string;
|
|
2205
2120
|
/**
|
|
2206
|
-
*
|
|
2121
|
+
* @deprecated
|
|
2207
2122
|
*/
|
|
2208
|
-
|
|
2209
|
-
getDataAsBase64():string;
|
|
2210
|
-
getDataAsU8():Uint8Array;
|
|
2211
|
-
getDataAsString():string;
|
|
2123
|
+
static readonly SKIP:string;
|
|
2212
2124
|
/**
|
|
2213
|
-
*
|
|
2214
|
-
* @param msg - string/buffer/view instance that represents data to send
|
|
2215
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
2125
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2216
2126
|
*/
|
|
2217
|
-
|
|
2218
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2219
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2220
|
-
hasListeners(name:string):boolean;
|
|
2221
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2127
|
+
showTotalsByDefault:boolean;
|
|
2222
2128
|
/**
|
|
2223
|
-
*
|
|
2224
|
-
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
2225
|
-
* them when finished using them.
|
|
2129
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2226
2130
|
*/
|
|
2227
|
-
|
|
2131
|
+
showGrandTotalsByDefault:boolean;
|
|
2228
2132
|
/**
|
|
2229
|
-
*
|
|
2230
|
-
* @return the type of this widget
|
|
2133
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
2231
2134
|
*/
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2135
|
+
defaultOperation:AggregationOperationType;
|
|
2136
|
+
/**
|
|
2137
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
2138
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
2139
|
+
*/
|
|
2140
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
2141
|
+
/**
|
|
2142
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
2143
|
+
* these columns. See also `Table.selectDistinct`.
|
|
2144
|
+
*/
|
|
2145
|
+
groupBy:Array<string>;
|
|
2243
2146
|
|
|
2244
2147
|
constructor();
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
/**
|
|
2248
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2249
|
-
*/
|
|
2250
|
-
export class BigDecimalWrapper {
|
|
2251
|
-
protected constructor();
|
|
2252
2148
|
|
|
2253
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
2254
|
-
asNumber():number;
|
|
2255
|
-
valueOf():string;
|
|
2256
2149
|
toString():string;
|
|
2257
2150
|
}
|
|
2258
2151
|
|
|
2259
2152
|
/**
|
|
2260
|
-
*
|
|
2261
|
-
*
|
|
2262
|
-
* @deprecated
|
|
2153
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
2154
|
+
* the server to get each Table. All tables will have the same structure.
|
|
2263
2155
|
*/
|
|
2264
|
-
export class
|
|
2156
|
+
export class PartitionedTable implements HasEventHandling {
|
|
2157
|
+
/**
|
|
2158
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2159
|
+
*/
|
|
2265
2160
|
static readonly EVENT_KEYADDED:string;
|
|
2161
|
+
/**
|
|
2162
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2163
|
+
*/
|
|
2266
2164
|
static readonly EVENT_DISCONNECT:string;
|
|
2165
|
+
/**
|
|
2166
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2167
|
+
*/
|
|
2267
2168
|
static readonly EVENT_RECONNECT:string;
|
|
2268
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
2269
|
-
|
|
2270
|
-
protected constructor();
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
export class LoginCredentials {
|
|
2274
|
-
type?:string|null;
|
|
2275
|
-
username?:string|null;
|
|
2276
|
-
token?:string|null;
|
|
2277
|
-
|
|
2278
|
-
constructor();
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
/**
|
|
2282
|
-
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
2283
|
-
* column.
|
|
2284
|
-
*/
|
|
2285
|
-
export class Column {
|
|
2286
2169
|
/**
|
|
2287
|
-
*
|
|
2288
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
2289
|
-
* @return String
|
|
2170
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2290
2171
|
*/
|
|
2291
|
-
readonly
|
|
2292
|
-
readonly description?:string|null;
|
|
2172
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
2293
2173
|
|
|
2294
2174
|
protected constructor();
|
|
2295
2175
|
|
|
2296
2176
|
/**
|
|
2297
|
-
* the
|
|
2298
|
-
* @param
|
|
2299
|
-
* @return
|
|
2300
|
-
*/
|
|
2301
|
-
get(row:Row):any;
|
|
2302
|
-
getFormat(row:Row):Format;
|
|
2303
|
-
/**
|
|
2304
|
-
* Creates a sort builder object, to be used when sorting by this column.
|
|
2305
|
-
* @return {@link dh.Sort}
|
|
2177
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
2178
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
2179
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
2306
2180
|
*/
|
|
2307
|
-
|
|
2181
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
2308
2182
|
/**
|
|
2309
|
-
*
|
|
2310
|
-
*
|
|
2311
|
-
* @return
|
|
2183
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
2184
|
+
* {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
|
|
2185
|
+
* @return A merged representation of the constituent tables.
|
|
2312
2186
|
*/
|
|
2313
|
-
|
|
2187
|
+
getMergedTable():Promise<Table>;
|
|
2314
2188
|
/**
|
|
2315
|
-
*
|
|
2316
|
-
*
|
|
2317
|
-
* @return
|
|
2189
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
2190
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
2191
|
+
* @return Set of Object
|
|
2318
2192
|
*/
|
|
2319
|
-
|
|
2193
|
+
getKeys():Set<object>;
|
|
2320
2194
|
/**
|
|
2321
|
-
* a
|
|
2322
|
-
* @
|
|
2323
|
-
* @
|
|
2195
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
2196
|
+
* @return Promise of a Table
|
|
2197
|
+
* @deprecated
|
|
2324
2198
|
*/
|
|
2325
|
-
|
|
2199
|
+
getKeyTable():Promise<Table>;
|
|
2326
2200
|
/**
|
|
2327
|
-
*
|
|
2328
|
-
* @
|
|
2329
|
-
* @return {@link dh.CustomColumn}
|
|
2201
|
+
* Fetch the underlying base table of the partitioned table.
|
|
2202
|
+
* @return Promise of a Table
|
|
2330
2203
|
*/
|
|
2331
|
-
|
|
2332
|
-
toString():string;
|
|
2204
|
+
getBaseTable():Promise<Table>;
|
|
2333
2205
|
/**
|
|
2334
|
-
*
|
|
2335
|
-
*
|
|
2206
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
2207
|
+
* will not affect tables in use.
|
|
2336
2208
|
*/
|
|
2337
|
-
|
|
2209
|
+
close():void;
|
|
2338
2210
|
/**
|
|
2339
|
-
*
|
|
2340
|
-
*
|
|
2341
|
-
* @return true if the column is a partition column
|
|
2211
|
+
* The count of known keys.
|
|
2212
|
+
* @return int
|
|
2342
2213
|
*/
|
|
2343
|
-
get
|
|
2214
|
+
get size():number;
|
|
2344
2215
|
/**
|
|
2345
|
-
*
|
|
2346
|
-
*
|
|
2347
|
-
* @return
|
|
2216
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
2217
|
+
* non-key columns.
|
|
2218
|
+
* @return Array of Column
|
|
2348
2219
|
*/
|
|
2349
|
-
get
|
|
2350
|
-
get isSortable():boolean;
|
|
2220
|
+
get columns():Column[];
|
|
2351
2221
|
/**
|
|
2352
|
-
*
|
|
2353
|
-
* @return
|
|
2222
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
2223
|
+
* @return Array of Column
|
|
2354
2224
|
*/
|
|
2355
|
-
get
|
|
2225
|
+
get keyColumns():Column[];
|
|
2356
2226
|
/**
|
|
2357
|
-
*
|
|
2358
|
-
*
|
|
2359
|
-
* @param
|
|
2360
|
-
* @return
|
|
2227
|
+
* Listen for events on this object.
|
|
2228
|
+
* @param name - the name of the event to listen for
|
|
2229
|
+
* @param callback - a function to call when the event occurs
|
|
2230
|
+
* @return Returns a cleanup function.
|
|
2231
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2361
2232
|
*/
|
|
2362
|
-
|
|
2233
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2234
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2235
|
+
hasListeners(name:string):boolean;
|
|
2363
2236
|
/**
|
|
2364
|
-
*
|
|
2237
|
+
* Removes an event listener added to this table.
|
|
2365
2238
|
* @param name -
|
|
2366
|
-
* @param
|
|
2367
|
-
* @return
|
|
2239
|
+
* @param callback -
|
|
2240
|
+
* @return
|
|
2241
|
+
* @typeParam T -
|
|
2368
2242
|
*/
|
|
2369
|
-
|
|
2243
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
export class DateWrapper extends LongWrapper {
|
|
2247
|
+
protected constructor();
|
|
2248
|
+
|
|
2249
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
2250
|
+
asDate():Date;
|
|
2370
2251
|
}
|
|
2371
2252
|
|
|
2372
2253
|
/**
|
|
2373
|
-
*
|
|
2374
|
-
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
2375
|
-
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
2376
|
-
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
2377
|
-
* of <b>TotalsTableConfig</b> will be supplied.
|
|
2254
|
+
* A js type for operating on input tables.
|
|
2378
2255
|
*
|
|
2379
|
-
*
|
|
2380
|
-
*
|
|
2381
|
-
*
|
|
2256
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
2257
|
+
*
|
|
2258
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2259
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2260
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2261
|
+
* before sending the next operation.
|
|
2262
|
+
*
|
|
2263
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2264
|
+
*
|
|
2265
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2266
|
+
* object.
|
|
2382
2267
|
*/
|
|
2383
|
-
export class
|
|
2268
|
+
export class InputTable {
|
|
2269
|
+
protected constructor();
|
|
2270
|
+
|
|
2384
2271
|
/**
|
|
2385
|
-
*
|
|
2272
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
2273
|
+
* property at that name and validate it can be put into the given column type.
|
|
2274
|
+
* @param row -
|
|
2275
|
+
* @param userTimeZone -
|
|
2276
|
+
* @return Promise of dh.InputTable
|
|
2386
2277
|
*/
|
|
2387
|
-
|
|
2278
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2279
|
+
/**
|
|
2280
|
+
* Add multiple rows to a table.
|
|
2281
|
+
* @param rows -
|
|
2282
|
+
* @param userTimeZone -
|
|
2283
|
+
* @return Promise of dh.InputTable
|
|
2284
|
+
*/
|
|
2285
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
2288
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
2289
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
2290
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
2291
|
+
* @param tableToAdd -
|
|
2292
|
+
* @return Promise of dh.InputTable
|
|
2293
|
+
*/
|
|
2294
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
2295
|
+
/**
|
|
2296
|
+
* Add multiple tables to this Input Table.
|
|
2297
|
+
* @param tablesToAdd -
|
|
2298
|
+
* @return Promise of dh.InputTable
|
|
2299
|
+
*/
|
|
2300
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
2388
2301
|
/**
|
|
2389
|
-
*
|
|
2302
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
2303
|
+
* @param tableToDelete -
|
|
2304
|
+
* @return Promise of dh.InputTable
|
|
2390
2305
|
*/
|
|
2391
|
-
|
|
2306
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
2392
2307
|
/**
|
|
2393
|
-
*
|
|
2308
|
+
* Delete multiple tables from this Input Table.
|
|
2309
|
+
* @param tablesToDelete -
|
|
2310
|
+
* @return
|
|
2394
2311
|
*/
|
|
2395
|
-
|
|
2312
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
2396
2313
|
/**
|
|
2397
|
-
*
|
|
2314
|
+
* A list of the key columns, by name
|
|
2315
|
+
* @return String array.
|
|
2398
2316
|
*/
|
|
2399
|
-
|
|
2317
|
+
get keys():string[];
|
|
2400
2318
|
/**
|
|
2401
|
-
*
|
|
2319
|
+
* A list of the value columns, by name
|
|
2320
|
+
* @return String array.
|
|
2402
2321
|
*/
|
|
2403
|
-
|
|
2322
|
+
get values():string[];
|
|
2404
2323
|
/**
|
|
2405
|
-
*
|
|
2324
|
+
* A list of the key columns.
|
|
2325
|
+
* @return Column array.
|
|
2406
2326
|
*/
|
|
2407
|
-
|
|
2327
|
+
get keyColumns():Column[];
|
|
2408
2328
|
/**
|
|
2409
|
-
*
|
|
2329
|
+
* A list of the value Column objects
|
|
2330
|
+
* @return {@link dh.Column} array.
|
|
2410
2331
|
*/
|
|
2411
|
-
|
|
2332
|
+
get valueColumns():Column[];
|
|
2412
2333
|
/**
|
|
2413
|
-
*
|
|
2334
|
+
* The source table for this Input Table
|
|
2335
|
+
* @return dh.table
|
|
2414
2336
|
*/
|
|
2415
|
-
|
|
2337
|
+
get table():Table;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* Deprecated for use in Deephaven Core.
|
|
2342
|
+
* @deprecated
|
|
2343
|
+
*/
|
|
2344
|
+
export class Client {
|
|
2345
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2346
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2347
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2348
|
+
|
|
2349
|
+
constructor();
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
2354
|
+
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
2355
|
+
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
2356
|
+
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
2357
|
+
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
2358
|
+
*/
|
|
2359
|
+
export class TableViewportSubscription implements HasEventHandling {
|
|
2360
|
+
protected constructor();
|
|
2361
|
+
|
|
2416
2362
|
/**
|
|
2417
|
-
*
|
|
2363
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
2364
|
+
* @param firstRow -
|
|
2365
|
+
* @param lastRow -
|
|
2366
|
+
* @param columns -
|
|
2367
|
+
* @param updateIntervalMs -
|
|
2418
2368
|
*/
|
|
2419
|
-
|
|
2369
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
|
|
2420
2370
|
/**
|
|
2421
|
-
*
|
|
2371
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
2422
2372
|
*/
|
|
2423
|
-
|
|
2373
|
+
close():void;
|
|
2424
2374
|
/**
|
|
2425
|
-
*
|
|
2375
|
+
* Gets the data currently visible in this viewport
|
|
2376
|
+
* @return Promise of {@link dh.TableData}.
|
|
2426
2377
|
*/
|
|
2427
|
-
|
|
2378
|
+
getViewportData():Promise<ViewportData>;
|
|
2379
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
2428
2380
|
/**
|
|
2429
|
-
*
|
|
2381
|
+
* Listen for events on this object.
|
|
2382
|
+
* @param name - the name of the event to listen for
|
|
2383
|
+
* @param callback - a function to call when the event occurs
|
|
2384
|
+
* @return Returns a cleanup function.
|
|
2385
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2430
2386
|
*/
|
|
2431
|
-
|
|
2387
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2388
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2389
|
+
hasListeners(name:string):boolean;
|
|
2432
2390
|
/**
|
|
2433
|
-
*
|
|
2391
|
+
* Removes an event listener added to this table.
|
|
2392
|
+
* @param name -
|
|
2393
|
+
* @param callback -
|
|
2394
|
+
* @return
|
|
2395
|
+
* @typeParam T -
|
|
2434
2396
|
*/
|
|
2435
|
-
|
|
2397
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
export class CustomColumn {
|
|
2401
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
2402
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
2403
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
2404
|
+
static readonly TYPE_NEW:string;
|
|
2405
|
+
|
|
2406
|
+
protected constructor();
|
|
2407
|
+
|
|
2408
|
+
valueOf():string;
|
|
2409
|
+
toString():string;
|
|
2436
2410
|
/**
|
|
2437
|
-
*
|
|
2411
|
+
* The expression to evaluate this custom column.
|
|
2412
|
+
* @return String
|
|
2438
2413
|
*/
|
|
2439
|
-
|
|
2414
|
+
get expression():string;
|
|
2440
2415
|
/**
|
|
2441
|
-
*
|
|
2442
|
-
*
|
|
2416
|
+
* The name of the column to use.
|
|
2417
|
+
* @return String
|
|
2443
2418
|
*/
|
|
2444
|
-
|
|
2419
|
+
get name():string;
|
|
2445
2420
|
/**
|
|
2446
|
-
*
|
|
2447
|
-
*
|
|
2421
|
+
* Type of custom column. One of
|
|
2422
|
+
*
|
|
2423
|
+
* <ul>
|
|
2424
|
+
* <li>FORMAT_COLOR</li>
|
|
2425
|
+
* <li>FORMAT_NUMBER</li>
|
|
2426
|
+
* <li>FORMAT_DATE</li>
|
|
2427
|
+
* <li>NEW</li>
|
|
2428
|
+
* </ul>
|
|
2429
|
+
* @return String
|
|
2448
2430
|
*/
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
constructor();
|
|
2452
|
-
|
|
2453
|
-
toString():string;
|
|
2431
|
+
get type():string;
|
|
2454
2432
|
}
|
|
2455
2433
|
|
|
2434
|
+
export class LoginCredentials {
|
|
2435
|
+
type?:string|null;
|
|
2436
|
+
username?:string|null;
|
|
2437
|
+
token?:string|null;
|
|
2456
2438
|
|
|
2457
|
-
|
|
2458
|
-
export class ValueType {
|
|
2459
|
-
static readonly STRING:ValueTypeType;
|
|
2460
|
-
static readonly NUMBER:ValueTypeType;
|
|
2461
|
-
static readonly DOUBLE:ValueTypeType;
|
|
2462
|
-
static readonly LONG:ValueTypeType;
|
|
2463
|
-
static readonly DATETIME:ValueTypeType;
|
|
2464
|
-
static readonly BOOLEAN:ValueTypeType;
|
|
2439
|
+
constructor();
|
|
2465
2440
|
}
|
|
2466
2441
|
|
|
2467
2442
|
/**
|
|
2468
|
-
*
|
|
2443
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
2444
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
2445
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
2469
2446
|
*/
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
static
|
|
2474
|
-
static
|
|
2475
|
-
static
|
|
2476
|
-
static
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2447
|
+
export class RangeSet {
|
|
2448
|
+
protected constructor();
|
|
2449
|
+
|
|
2450
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
2451
|
+
static ofItems(rows:number[]):RangeSet;
|
|
2452
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
2453
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
2454
|
+
/**
|
|
2455
|
+
* a new iterator over all indexes in this collection.
|
|
2456
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
2457
|
+
*/
|
|
2458
|
+
iterator():Iterator<LongWrapper>;
|
|
2459
|
+
/**
|
|
2460
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
2461
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
2462
|
+
* property each time through a loop).
|
|
2463
|
+
* @return double
|
|
2464
|
+
*/
|
|
2465
|
+
get size():number;
|
|
2481
2466
|
}
|
|
2482
2467
|
|
|
2468
|
+
|
|
2483
2469
|
/**
|
|
2484
2470
|
* This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
|
|
2485
2471
|
*/
|
|
@@ -2501,6 +2487,32 @@ export namespace dh {
|
|
|
2501
2487
|
static readonly SKIP:AggregationOperationType;
|
|
2502
2488
|
}
|
|
2503
2489
|
|
|
2490
|
+
/**
|
|
2491
|
+
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2492
|
+
*/
|
|
2493
|
+
type VariableTypeType = string;
|
|
2494
|
+
export class VariableType {
|
|
2495
|
+
static readonly TABLE:VariableTypeType;
|
|
2496
|
+
static readonly TREETABLE:VariableTypeType;
|
|
2497
|
+
static readonly HIERARCHICALTABLE:VariableTypeType;
|
|
2498
|
+
static readonly TABLEMAP:VariableTypeType;
|
|
2499
|
+
static readonly PARTITIONEDTABLE:VariableTypeType;
|
|
2500
|
+
static readonly FIGURE:VariableTypeType;
|
|
2501
|
+
static readonly OTHERWIDGET:VariableTypeType;
|
|
2502
|
+
static readonly PANDAS:VariableTypeType;
|
|
2503
|
+
static readonly TREEMAP:VariableTypeType;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
type ValueTypeType = string;
|
|
2507
|
+
export class ValueType {
|
|
2508
|
+
static readonly STRING:ValueTypeType;
|
|
2509
|
+
static readonly NUMBER:ValueTypeType;
|
|
2510
|
+
static readonly DOUBLE:ValueTypeType;
|
|
2511
|
+
static readonly LONG:ValueTypeType;
|
|
2512
|
+
static readonly DATETIME:ValueTypeType;
|
|
2513
|
+
static readonly BOOLEAN:ValueTypeType;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2504
2516
|
type SearchDisplayModeType = string;
|
|
2505
2517
|
export class SearchDisplayMode {
|
|
2506
2518
|
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
@@ -2512,6 +2524,27 @@ export namespace dh {
|
|
|
2512
2524
|
|
|
2513
2525
|
export namespace dh.ide {
|
|
2514
2526
|
|
|
2527
|
+
/**
|
|
2528
|
+
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2529
|
+
* server.
|
|
2530
|
+
*/
|
|
2531
|
+
export interface LogItem {
|
|
2532
|
+
/**
|
|
2533
|
+
* The level of the log message, enabling the client to ignore messages.
|
|
2534
|
+
* @return String
|
|
2535
|
+
*/
|
|
2536
|
+
get logLevel():string;
|
|
2537
|
+
/**
|
|
2538
|
+
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2539
|
+
* @return double
|
|
2540
|
+
*/
|
|
2541
|
+
get micros():number;
|
|
2542
|
+
/**
|
|
2543
|
+
* The log message written on the server.
|
|
2544
|
+
* @return String
|
|
2545
|
+
*/
|
|
2546
|
+
get message():string;
|
|
2547
|
+
}
|
|
2515
2548
|
/**
|
|
2516
2549
|
* Indicates the result of code run on the server.
|
|
2517
2550
|
*/
|
|
@@ -2520,12 +2553,36 @@ export namespace dh.ide {
|
|
|
2520
2553
|
* Describes changes made in the course of this command.
|
|
2521
2554
|
* @return {@link dh.ide.VariableChanges}.
|
|
2522
2555
|
*/
|
|
2523
|
-
get changes():VariableChanges;
|
|
2556
|
+
get changes():VariableChanges;
|
|
2557
|
+
/**
|
|
2558
|
+
* If the command failed, the error message will be provided here.
|
|
2559
|
+
* @return String
|
|
2560
|
+
*/
|
|
2561
|
+
get error():string;
|
|
2562
|
+
}
|
|
2563
|
+
/**
|
|
2564
|
+
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2565
|
+
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2566
|
+
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
2567
|
+
* new types.
|
|
2568
|
+
*/
|
|
2569
|
+
export interface VariableChanges {
|
|
2570
|
+
/**
|
|
2571
|
+
*
|
|
2572
|
+
* @return The variables that no longer exist after this operation, or were replaced by some variable with a
|
|
2573
|
+
* different type.
|
|
2574
|
+
*/
|
|
2575
|
+
get removed():Array<VariableDefinition>;
|
|
2576
|
+
/**
|
|
2577
|
+
*
|
|
2578
|
+
* @return The variables that were created by this operation, or have a new type.
|
|
2579
|
+
*/
|
|
2580
|
+
get created():Array<VariableDefinition>;
|
|
2524
2581
|
/**
|
|
2525
|
-
*
|
|
2526
|
-
* @return
|
|
2582
|
+
*
|
|
2583
|
+
* @return The variables that changed value during this operation.
|
|
2527
2584
|
*/
|
|
2528
|
-
get
|
|
2585
|
+
get updated():Array<VariableDefinition>;
|
|
2529
2586
|
}
|
|
2530
2587
|
/**
|
|
2531
2588
|
* A format to describe a variable available to be read from the server. Application fields are optional, and only
|
|
@@ -2569,57 +2626,86 @@ export namespace dh.ide {
|
|
|
2569
2626
|
get applicationName():string;
|
|
2570
2627
|
}
|
|
2571
2628
|
/**
|
|
2572
|
-
*
|
|
2573
|
-
* server.
|
|
2629
|
+
* Specifies a type and either id or name (but not both).
|
|
2574
2630
|
*/
|
|
2575
|
-
export interface
|
|
2631
|
+
export interface VariableDescriptor {
|
|
2632
|
+
type:string;
|
|
2633
|
+
id?:string|null;
|
|
2634
|
+
name?:string|null;
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
export namespace dh.grpc {
|
|
2639
|
+
|
|
2640
|
+
/**
|
|
2641
|
+
* Options for creating a gRPC stream transport instance.
|
|
2642
|
+
*/
|
|
2643
|
+
export interface GrpcTransportOptions {
|
|
2576
2644
|
/**
|
|
2577
|
-
* The
|
|
2578
|
-
* @return String
|
|
2645
|
+
* The gRPC method URL.
|
|
2579
2646
|
*/
|
|
2580
|
-
|
|
2647
|
+
url:URL;
|
|
2581
2648
|
/**
|
|
2582
|
-
*
|
|
2583
|
-
* @return double
|
|
2649
|
+
* True to enable debug logging for this stream.
|
|
2584
2650
|
*/
|
|
2585
|
-
|
|
2651
|
+
debug:boolean;
|
|
2586
2652
|
/**
|
|
2587
|
-
* The
|
|
2588
|
-
*
|
|
2653
|
+
* Callback for when headers and status are received. The headers are a map of header names to values, and the
|
|
2654
|
+
* status is the HTTP status code. If the connection could not be made, the status should be 0.
|
|
2589
2655
|
*/
|
|
2590
|
-
|
|
2656
|
+
onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
|
|
2657
|
+
/**
|
|
2658
|
+
* Callback for when a chunk of data is received.
|
|
2659
|
+
*/
|
|
2660
|
+
onChunk:(chunk:Uint8Array)=>void;
|
|
2661
|
+
/**
|
|
2662
|
+
* Callback for when the stream ends, with an error instance if it can be provided. Note that the present
|
|
2663
|
+
* implementation does not consume errors, even if provided.
|
|
2664
|
+
*/
|
|
2665
|
+
onEnd:(error?:Error|undefined|null)=>void;
|
|
2591
2666
|
}
|
|
2592
2667
|
/**
|
|
2593
|
-
*
|
|
2668
|
+
* Factory for creating gRPC transports.
|
|
2594
2669
|
*/
|
|
2595
|
-
export interface
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2670
|
+
export interface GrpcTransportFactory {
|
|
2671
|
+
/**
|
|
2672
|
+
* Create a new transport instance.
|
|
2673
|
+
* @param options - options for creating the transport
|
|
2674
|
+
* @return a transport instance to use for gRPC communication
|
|
2675
|
+
*/
|
|
2676
|
+
create(options:GrpcTransportOptions):GrpcTransport;
|
|
2677
|
+
/**
|
|
2678
|
+
* Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it
|
|
2679
|
+
* more than once before {@link GrpcTransport.finishSend} should be called.
|
|
2680
|
+
* @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
|
|
2681
|
+
* Open/Next gRPC calls should be used
|
|
2682
|
+
*/
|
|
2683
|
+
get supportsClientStreaming():boolean;
|
|
2599
2684
|
}
|
|
2600
2685
|
/**
|
|
2601
|
-
*
|
|
2602
|
-
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2603
|
-
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
2604
|
-
* new types.
|
|
2686
|
+
* gRPC transport implementation.
|
|
2605
2687
|
*/
|
|
2606
|
-
export interface
|
|
2688
|
+
export interface GrpcTransport {
|
|
2607
2689
|
/**
|
|
2608
|
-
*
|
|
2609
|
-
* @
|
|
2610
|
-
* different type.
|
|
2690
|
+
* Starts the stream, sending metadata to the server.
|
|
2691
|
+
* @param metadata - the headers to send the server when opening the connection
|
|
2611
2692
|
*/
|
|
2612
|
-
|
|
2693
|
+
start(metadata:{ [key: string]: string|Array<string>; }):void;
|
|
2613
2694
|
/**
|
|
2614
|
-
*
|
|
2615
|
-
* @
|
|
2695
|
+
* Sends a message to the server.
|
|
2696
|
+
* @param msgBytes - bytes to send to the server
|
|
2616
2697
|
*/
|
|
2617
|
-
|
|
2698
|
+
sendMessage(msgBytes:Uint8Array):void;
|
|
2618
2699
|
/**
|
|
2619
|
-
*
|
|
2620
|
-
*
|
|
2700
|
+
* "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
|
|
2701
|
+
* open to receiving messages.
|
|
2621
2702
|
*/
|
|
2622
|
-
|
|
2703
|
+
finishSend():void;
|
|
2704
|
+
/**
|
|
2705
|
+
* End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
|
|
2706
|
+
* client from receiving any more events.
|
|
2707
|
+
*/
|
|
2708
|
+
cancel():void;
|
|
2623
2709
|
}
|
|
2624
2710
|
}
|
|
2625
2711
|
|
|
@@ -2679,104 +2765,6 @@ export namespace dh.i18n {
|
|
|
2679
2765
|
}
|
|
2680
2766
|
|
|
2681
2767
|
|
|
2682
|
-
/**
|
|
2683
|
-
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2684
|
-
* additional 6 decimal places after the rest of the number.
|
|
2685
|
-
*
|
|
2686
|
-
* Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
|
|
2687
|
-
* and assuming it to be a lossy nano value, and parsing into a js Date.
|
|
2688
|
-
*
|
|
2689
|
-
*
|
|
2690
|
-
* Utility class to parse and format various date/time values, using the same format patterns as are supported by the
|
|
2691
|
-
* standard Java implementation used in the Deephaven server and swing client.
|
|
2692
|
-
*
|
|
2693
|
-
* As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
|
|
2694
|
-
* with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
|
|
2695
|
-
* however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
|
|
2696
|
-
* still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
|
|
2697
|
-
* object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
|
|
2698
|
-
* to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
|
|
2699
|
-
* `asDate()` to return a JS `Date` value.
|
|
2700
|
-
*
|
|
2701
|
-
*
|
|
2702
|
-
* Caveats:
|
|
2703
|
-
*
|
|
2704
|
-
*
|
|
2705
|
-
* - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
|
|
2706
|
-
* short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
|
|
2707
|
-
* browser to emit the user's own timezone.
|
|
2708
|
-
*/
|
|
2709
|
-
export class DateTimeFormat {
|
|
2710
|
-
static readonly NANOS_PER_MILLI:number;
|
|
2711
|
-
|
|
2712
|
-
/**
|
|
2713
|
-
* Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2714
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2715
|
-
* @param pattern -
|
|
2716
|
-
*/
|
|
2717
|
-
constructor(pattern:string);
|
|
2718
|
-
|
|
2719
|
-
/**
|
|
2720
|
-
*
|
|
2721
|
-
* @param pattern -
|
|
2722
|
-
* @return a date format instance matching the specified format. If this format has not been specified before, a new
|
|
2723
|
-
* instance will be created and stored for later reuse.
|
|
2724
|
-
*/
|
|
2725
|
-
static getFormat(pattern:string):DateTimeFormat;
|
|
2726
|
-
/**
|
|
2727
|
-
* Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
|
|
2728
|
-
* `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
|
|
2729
|
-
* the instance method for more details on input objects.
|
|
2730
|
-
* @param pattern -
|
|
2731
|
-
* @param date -
|
|
2732
|
-
* @param timeZone -
|
|
2733
|
-
* @return
|
|
2734
|
-
*/
|
|
2735
|
-
static format(pattern:string, date:any, timeZone?:TimeZone):string;
|
|
2736
|
-
/**
|
|
2737
|
-
* Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
|
|
2738
|
-
* @param pattern -
|
|
2739
|
-
* @param text -
|
|
2740
|
-
* @return
|
|
2741
|
-
*/
|
|
2742
|
-
static parseAsDate(pattern:string, text:string):Date;
|
|
2743
|
-
/**
|
|
2744
|
-
* Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
|
|
2745
|
-
* A `TimeZone` object can optionally be provided to parse to a desired timezone.
|
|
2746
|
-
* @param pattern -
|
|
2747
|
-
* @param text -
|
|
2748
|
-
* @param tz -
|
|
2749
|
-
* @return
|
|
2750
|
-
*/
|
|
2751
|
-
static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2752
|
-
/**
|
|
2753
|
-
* Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
|
|
2754
|
-
* include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
|
|
2755
|
-
* nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
|
|
2756
|
-
* expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
|
|
2757
|
-
* date/time in that timezone.
|
|
2758
|
-
* @param date -
|
|
2759
|
-
* @param timeZone -
|
|
2760
|
-
* @return String
|
|
2761
|
-
*/
|
|
2762
|
-
format(date:any, timeZone?:TimeZone):string;
|
|
2763
|
-
/**
|
|
2764
|
-
* Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
|
|
2765
|
-
* nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
|
|
2766
|
-
* @param text -
|
|
2767
|
-
* @param tz -
|
|
2768
|
-
* @return
|
|
2769
|
-
*/
|
|
2770
|
-
parse(text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2771
|
-
/**
|
|
2772
|
-
* Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
|
|
2773
|
-
* @param text -
|
|
2774
|
-
* @return
|
|
2775
|
-
*/
|
|
2776
|
-
parseAsDate(text:string):Date;
|
|
2777
|
-
toString():string;
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
2768
|
/**
|
|
2781
2769
|
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
2782
2770
|
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
@@ -2888,20 +2876,108 @@ export namespace dh.i18n {
|
|
|
2888
2876
|
get id():string;
|
|
2889
2877
|
}
|
|
2890
2878
|
|
|
2879
|
+
/**
|
|
2880
|
+
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2881
|
+
* additional 6 decimal places after the rest of the number.
|
|
2882
|
+
*
|
|
2883
|
+
* Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
|
|
2884
|
+
* and assuming it to be a lossy nano value, and parsing into a js Date.
|
|
2885
|
+
*
|
|
2886
|
+
*
|
|
2887
|
+
* Utility class to parse and format various date/time values, using the same format patterns as are supported by the
|
|
2888
|
+
* standard Java implementation used in the Deephaven server and swing client.
|
|
2889
|
+
*
|
|
2890
|
+
* As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
|
|
2891
|
+
* with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
|
|
2892
|
+
* however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
|
|
2893
|
+
* still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
|
|
2894
|
+
* object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
|
|
2895
|
+
* to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
|
|
2896
|
+
* `asDate()` to return a JS `Date` value.
|
|
2897
|
+
*
|
|
2898
|
+
*
|
|
2899
|
+
* Caveats:
|
|
2900
|
+
*
|
|
2901
|
+
*
|
|
2902
|
+
* - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
|
|
2903
|
+
* short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
|
|
2904
|
+
* browser to emit the user's own timezone.
|
|
2905
|
+
*/
|
|
2906
|
+
export class DateTimeFormat {
|
|
2907
|
+
static readonly NANOS_PER_MILLI:number;
|
|
2908
|
+
|
|
2909
|
+
/**
|
|
2910
|
+
* Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2911
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2912
|
+
* @param pattern -
|
|
2913
|
+
*/
|
|
2914
|
+
constructor(pattern:string);
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
*
|
|
2918
|
+
* @param pattern -
|
|
2919
|
+
* @return a date format instance matching the specified format. If this format has not been specified before, a new
|
|
2920
|
+
* instance will be created and stored for later reuse.
|
|
2921
|
+
*/
|
|
2922
|
+
static getFormat(pattern:string):DateTimeFormat;
|
|
2923
|
+
/**
|
|
2924
|
+
* Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
|
|
2925
|
+
* `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
|
|
2926
|
+
* the instance method for more details on input objects.
|
|
2927
|
+
* @param pattern -
|
|
2928
|
+
* @param date -
|
|
2929
|
+
* @param timeZone -
|
|
2930
|
+
* @return
|
|
2931
|
+
*/
|
|
2932
|
+
static format(pattern:string, date:any, timeZone?:TimeZone):string;
|
|
2933
|
+
/**
|
|
2934
|
+
* Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
|
|
2935
|
+
* @param pattern -
|
|
2936
|
+
* @param text -
|
|
2937
|
+
* @return
|
|
2938
|
+
*/
|
|
2939
|
+
static parseAsDate(pattern:string, text:string):Date;
|
|
2940
|
+
/**
|
|
2941
|
+
* Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
|
|
2942
|
+
* A `TimeZone` object can optionally be provided to parse to a desired timezone.
|
|
2943
|
+
* @param pattern -
|
|
2944
|
+
* @param text -
|
|
2945
|
+
* @param tz -
|
|
2946
|
+
* @return
|
|
2947
|
+
*/
|
|
2948
|
+
static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2949
|
+
/**
|
|
2950
|
+
* Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
|
|
2951
|
+
* include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
|
|
2952
|
+
* nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
|
|
2953
|
+
* expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
|
|
2954
|
+
* date/time in that timezone.
|
|
2955
|
+
* @param date -
|
|
2956
|
+
* @param timeZone -
|
|
2957
|
+
* @return String
|
|
2958
|
+
*/
|
|
2959
|
+
format(date:any, timeZone?:TimeZone):string;
|
|
2960
|
+
/**
|
|
2961
|
+
* Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
|
|
2962
|
+
* nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
|
|
2963
|
+
* @param text -
|
|
2964
|
+
* @param tz -
|
|
2965
|
+
* @return
|
|
2966
|
+
*/
|
|
2967
|
+
parse(text:string, tz?:TimeZone):dh.DateWrapper;
|
|
2968
|
+
/**
|
|
2969
|
+
* Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
|
|
2970
|
+
* @param text -
|
|
2971
|
+
* @return
|
|
2972
|
+
*/
|
|
2973
|
+
parseAsDate(text:string):Date;
|
|
2974
|
+
toString():string;
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2891
2977
|
}
|
|
2892
2978
|
|
|
2893
2979
|
export namespace dh.plot {
|
|
2894
2980
|
|
|
2895
|
-
export interface OneClick {
|
|
2896
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
2897
|
-
getValueForColumn(columName:string):any;
|
|
2898
|
-
get requireAllFiltersToDisplay():boolean;
|
|
2899
|
-
get columns():dh.Column[];
|
|
2900
|
-
}
|
|
2901
|
-
export interface FigureDataUpdatedEvent {
|
|
2902
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2903
|
-
get series():Series[];
|
|
2904
|
-
}
|
|
2905
2981
|
/**
|
|
2906
2982
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
2907
2983
|
* may be shared between Series instances.
|
|
@@ -3014,6 +3090,10 @@ export namespace dh.plot {
|
|
|
3014
3090
|
get multiSeries():MultiSeries;
|
|
3015
3091
|
get shapeLabel():string;
|
|
3016
3092
|
}
|
|
3093
|
+
export interface FigureDataUpdatedEvent {
|
|
3094
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3095
|
+
get series():Series[];
|
|
3096
|
+
}
|
|
3017
3097
|
/**
|
|
3018
3098
|
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
3019
3099
|
*/
|
|
@@ -3049,130 +3129,11 @@ export namespace dh.plot {
|
|
|
3049
3129
|
*/
|
|
3050
3130
|
get type():SourceTypeType;
|
|
3051
3131
|
}
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
*/
|
|
3058
|
-
readonly title?:string|null;
|
|
3059
|
-
/**
|
|
3060
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3061
|
-
*/
|
|
3062
|
-
static readonly EVENT_UPDATED:string;
|
|
3063
|
-
/**
|
|
3064
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3065
|
-
*/
|
|
3066
|
-
static readonly EVENT_SERIES_ADDED:string;
|
|
3067
|
-
/**
|
|
3068
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3069
|
-
*/
|
|
3070
|
-
static readonly EVENT_DISCONNECT:string;
|
|
3071
|
-
/**
|
|
3072
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3073
|
-
*/
|
|
3074
|
-
static readonly EVENT_RECONNECT:string;
|
|
3075
|
-
/**
|
|
3076
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3077
|
-
*/
|
|
3078
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
3079
|
-
/**
|
|
3080
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3081
|
-
*/
|
|
3082
|
-
static readonly EVENT_DOWNSAMPLESTARTED:string;
|
|
3083
|
-
/**
|
|
3084
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3085
|
-
*/
|
|
3086
|
-
static readonly EVENT_DOWNSAMPLEFINISHED:string;
|
|
3087
|
-
/**
|
|
3088
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3089
|
-
*/
|
|
3090
|
-
static readonly EVENT_DOWNSAMPLEFAILED:string;
|
|
3091
|
-
/**
|
|
3092
|
-
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3093
|
-
*/
|
|
3094
|
-
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3095
|
-
|
|
3096
|
-
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3097
|
-
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3098
|
-
/**
|
|
3099
|
-
* Disable updates for all series in this figure.
|
|
3100
|
-
*/
|
|
3101
|
-
unsubscribe():void;
|
|
3102
|
-
/**
|
|
3103
|
-
* Close the figure, and clean up subscriptions.
|
|
3104
|
-
*/
|
|
3105
|
-
close():void;
|
|
3106
|
-
/**
|
|
3107
|
-
* The charts to draw.
|
|
3108
|
-
* @return dh.plot.Chart
|
|
3109
|
-
*/
|
|
3110
|
-
get charts():Chart[];
|
|
3111
|
-
get updateInterval():number;
|
|
3112
|
-
get titleColor():string;
|
|
3113
|
-
get titleFont():string;
|
|
3114
|
-
get rows():number;
|
|
3115
|
-
get cols():number;
|
|
3116
|
-
get errors():Array<string>;
|
|
3117
|
-
/**
|
|
3118
|
-
* Listen for events on this object.
|
|
3119
|
-
* @param name - the name of the event to listen for
|
|
3120
|
-
* @param callback - a function to call when the event occurs
|
|
3121
|
-
* @return Returns a cleanup function.
|
|
3122
|
-
* @typeParam T - the type of the data that the event will provide
|
|
3123
|
-
*/
|
|
3124
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3125
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3126
|
-
hasListeners(name:string):boolean;
|
|
3127
|
-
/**
|
|
3128
|
-
* Removes an event listener added to this table.
|
|
3129
|
-
* @param name -
|
|
3130
|
-
* @param callback -
|
|
3131
|
-
* @return
|
|
3132
|
-
* @typeParam T -
|
|
3133
|
-
*/
|
|
3134
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
/**
|
|
3138
|
-
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
3139
|
-
*/
|
|
3140
|
-
export class FigureDescriptor {
|
|
3141
|
-
title?:string|null;
|
|
3142
|
-
titleFont?:string|null;
|
|
3143
|
-
titleColor?:string|null;
|
|
3144
|
-
isResizable?:boolean|null;
|
|
3145
|
-
isDefaultTheme?:boolean|null;
|
|
3146
|
-
updateInterval?:number|null;
|
|
3147
|
-
cols?:number|null;
|
|
3148
|
-
rows?:number|null;
|
|
3149
|
-
charts:Array<ChartDescriptor>;
|
|
3150
|
-
|
|
3151
|
-
constructor();
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
|
-
export class ChartDescriptor {
|
|
3155
|
-
colspan?:number|null;
|
|
3156
|
-
rowspan?:number|null;
|
|
3157
|
-
series:Array<SeriesDescriptor>;
|
|
3158
|
-
axes:Array<AxisDescriptor>;
|
|
3159
|
-
chartType:string;
|
|
3160
|
-
title?:string|null;
|
|
3161
|
-
titleFont?:string|null;
|
|
3162
|
-
titleColor?:string|null;
|
|
3163
|
-
showLegend?:boolean|null;
|
|
3164
|
-
legendFont?:string|null;
|
|
3165
|
-
legendColor?:string|null;
|
|
3166
|
-
is3d?:boolean|null;
|
|
3167
|
-
|
|
3168
|
-
constructor();
|
|
3169
|
-
}
|
|
3170
|
-
|
|
3171
|
-
export class FigureFetchError {
|
|
3172
|
-
error:object;
|
|
3173
|
-
errors:Array<string>;
|
|
3174
|
-
|
|
3175
|
-
protected constructor();
|
|
3132
|
+
export interface OneClick {
|
|
3133
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
3134
|
+
getValueForColumn(columName:string):any;
|
|
3135
|
+
get requireAllFiltersToDisplay():boolean;
|
|
3136
|
+
get columns():dh.Column[];
|
|
3176
3137
|
}
|
|
3177
3138
|
|
|
3178
3139
|
/**
|
|
@@ -3219,6 +3180,39 @@ export namespace dh.plot {
|
|
|
3219
3180
|
get multiSeries():MultiSeries[];
|
|
3220
3181
|
}
|
|
3221
3182
|
|
|
3183
|
+
export class DownsampleOptions {
|
|
3184
|
+
/**
|
|
3185
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3186
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3187
|
+
* series.subscribe().
|
|
3188
|
+
*/
|
|
3189
|
+
static MAX_SERIES_SIZE:number;
|
|
3190
|
+
/**
|
|
3191
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3192
|
+
* downsampling disabled, the series will not load data.
|
|
3193
|
+
*/
|
|
3194
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3195
|
+
/**
|
|
3196
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3197
|
+
* axes are configured.
|
|
3198
|
+
*/
|
|
3199
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3200
|
+
/**
|
|
3201
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3202
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3203
|
+
*/
|
|
3204
|
+
static readonly DISABLE:DownsampleOptions;
|
|
3205
|
+
|
|
3206
|
+
protected constructor();
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
export class SeriesDataSourceException {
|
|
3210
|
+
protected constructor();
|
|
3211
|
+
|
|
3212
|
+
get source():SeriesDataSource;
|
|
3213
|
+
get message():string;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3222
3216
|
export class AxisDescriptor {
|
|
3223
3217
|
formatType:string;
|
|
3224
3218
|
type:string;
|
|
@@ -3243,72 +3237,124 @@ export namespace dh.plot {
|
|
|
3243
3237
|
constructor();
|
|
3244
3238
|
}
|
|
3245
3239
|
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3240
|
+
/**
|
|
3241
|
+
* Provides the details for a figure.
|
|
3242
|
+
*
|
|
3243
|
+
* The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
|
|
3244
|
+
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
3245
|
+
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
3246
|
+
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
3247
|
+
* any) to reduce the number of points sent to the client.
|
|
3248
|
+
*
|
|
3249
|
+
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
3250
|
+
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
3251
|
+
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
3252
|
+
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
3253
|
+
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
3254
|
+
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
3255
|
+
*
|
|
3256
|
+
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
3257
|
+
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
3258
|
+
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
3259
|
+
* that the "important" values are visible.
|
|
3260
|
+
*
|
|
3261
|
+
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
3262
|
+
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
3263
|
+
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
3264
|
+
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
3265
|
+
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
3266
|
+
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
3267
|
+
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
3268
|
+
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
3269
|
+
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
3270
|
+
*
|
|
3271
|
+
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3272
|
+
* client-created figures.
|
|
3273
|
+
*/
|
|
3274
|
+
export class Figure implements dh.HasEventHandling {
|
|
3275
|
+
/**
|
|
3276
|
+
* The title of the figure.
|
|
3277
|
+
* @return String
|
|
3278
|
+
*/
|
|
3279
|
+
readonly title?:string|null;
|
|
3280
|
+
/**
|
|
3281
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3282
|
+
*/
|
|
3283
|
+
static readonly EVENT_UPDATED:string;
|
|
3284
|
+
/**
|
|
3285
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3286
|
+
*/
|
|
3287
|
+
static readonly EVENT_SERIES_ADDED:string;
|
|
3288
|
+
/**
|
|
3289
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3290
|
+
*/
|
|
3291
|
+
static readonly EVENT_DISCONNECT:string;
|
|
3292
|
+
/**
|
|
3293
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3294
|
+
*/
|
|
3295
|
+
static readonly EVENT_RECONNECT:string;
|
|
3296
|
+
/**
|
|
3297
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3298
|
+
*/
|
|
3299
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
3300
|
+
/**
|
|
3301
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3302
|
+
*/
|
|
3303
|
+
static readonly EVENT_DOWNSAMPLESTARTED:string;
|
|
3304
|
+
/**
|
|
3305
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3306
|
+
*/
|
|
3307
|
+
static readonly EVENT_DOWNSAMPLEFINISHED:string;
|
|
3308
|
+
/**
|
|
3309
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3310
|
+
*/
|
|
3311
|
+
static readonly EVENT_DOWNSAMPLEFAILED:string;
|
|
3312
|
+
/**
|
|
3313
|
+
* The data within this figure was updated. <b>event.detail</b> is <b>FigureUpdateEventData</b>
|
|
3314
|
+
*/
|
|
3315
|
+
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3284
3316
|
|
|
3285
3317
|
protected constructor();
|
|
3286
|
-
}
|
|
3287
3318
|
|
|
3288
|
-
|
|
3319
|
+
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3289
3320
|
/**
|
|
3290
|
-
*
|
|
3291
|
-
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3292
|
-
* series.subscribe().
|
|
3321
|
+
* Disable updates for all series in this figure.
|
|
3293
3322
|
*/
|
|
3294
|
-
|
|
3323
|
+
unsubscribe():void;
|
|
3295
3324
|
/**
|
|
3296
|
-
*
|
|
3297
|
-
* downsampling disabled, the series will not load data.
|
|
3325
|
+
* Close the figure, and clean up subscriptions.
|
|
3298
3326
|
*/
|
|
3299
|
-
|
|
3327
|
+
close():void;
|
|
3300
3328
|
/**
|
|
3301
|
-
*
|
|
3302
|
-
*
|
|
3329
|
+
* The charts to draw.
|
|
3330
|
+
* @return dh.plot.Chart
|
|
3303
3331
|
*/
|
|
3304
|
-
|
|
3332
|
+
get charts():Chart[];
|
|
3333
|
+
get updateInterval():number;
|
|
3334
|
+
get titleColor():string;
|
|
3335
|
+
get titleFont():string;
|
|
3336
|
+
get rows():number;
|
|
3337
|
+
get cols():number;
|
|
3338
|
+
get errors():Array<string>;
|
|
3305
3339
|
/**
|
|
3306
|
-
*
|
|
3307
|
-
* the
|
|
3340
|
+
* Listen for events on this object.
|
|
3341
|
+
* @param name - the name of the event to listen for
|
|
3342
|
+
* @param callback - a function to call when the event occurs
|
|
3343
|
+
* @return Returns a cleanup function.
|
|
3344
|
+
* @typeParam T - the type of the data that the event will provide
|
|
3308
3345
|
*/
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3346
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3347
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3348
|
+
hasListeners(name:string):boolean;
|
|
3349
|
+
/**
|
|
3350
|
+
* Removes an event listener added to this table.
|
|
3351
|
+
* @param name -
|
|
3352
|
+
* @param callback -
|
|
3353
|
+
* @return
|
|
3354
|
+
* @typeParam T -
|
|
3355
|
+
*/
|
|
3356
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3357
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3312
3358
|
}
|
|
3313
3359
|
|
|
3314
3360
|
/**
|
|
@@ -3328,6 +3374,23 @@ export namespace dh.plot {
|
|
|
3328
3374
|
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3329
3375
|
}
|
|
3330
3376
|
|
|
3377
|
+
export class ChartDescriptor {
|
|
3378
|
+
colspan?:number|null;
|
|
3379
|
+
rowspan?:number|null;
|
|
3380
|
+
series:Array<SeriesDescriptor>;
|
|
3381
|
+
axes:Array<AxisDescriptor>;
|
|
3382
|
+
chartType:string;
|
|
3383
|
+
title?:string|null;
|
|
3384
|
+
titleFont?:string|null;
|
|
3385
|
+
titleColor?:string|null;
|
|
3386
|
+
showLegend?:boolean|null;
|
|
3387
|
+
legendFont?:string|null;
|
|
3388
|
+
legendColor?:string|null;
|
|
3389
|
+
is3d?:boolean|null;
|
|
3390
|
+
|
|
3391
|
+
constructor();
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3331
3394
|
/**
|
|
3332
3395
|
* Helper class for plot downsampling methods.
|
|
3333
3396
|
*/
|
|
@@ -3347,6 +3410,74 @@ export namespace dh.plot {
|
|
|
3347
3410
|
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3348
3411
|
}
|
|
3349
3412
|
|
|
3413
|
+
export class FigureFetchError {
|
|
3414
|
+
error:object;
|
|
3415
|
+
errors:Array<string>;
|
|
3416
|
+
|
|
3417
|
+
protected constructor();
|
|
3418
|
+
}
|
|
3419
|
+
|
|
3420
|
+
/**
|
|
3421
|
+
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
3422
|
+
*/
|
|
3423
|
+
export class FigureDescriptor {
|
|
3424
|
+
title?:string|null;
|
|
3425
|
+
titleFont?:string|null;
|
|
3426
|
+
titleColor?:string|null;
|
|
3427
|
+
isResizable?:boolean|null;
|
|
3428
|
+
isDefaultTheme?:boolean|null;
|
|
3429
|
+
updateInterval?:number|null;
|
|
3430
|
+
cols?:number|null;
|
|
3431
|
+
rows?:number|null;
|
|
3432
|
+
charts:Array<ChartDescriptor>;
|
|
3433
|
+
|
|
3434
|
+
constructor();
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
export class FigureSourceException {
|
|
3438
|
+
table:dh.Table;
|
|
3439
|
+
source:SeriesDataSource;
|
|
3440
|
+
|
|
3441
|
+
protected constructor();
|
|
3442
|
+
}
|
|
3443
|
+
|
|
3444
|
+
export class SourceDescriptor {
|
|
3445
|
+
axis:AxisDescriptor;
|
|
3446
|
+
table:dh.Table;
|
|
3447
|
+
columnName:string;
|
|
3448
|
+
type:string;
|
|
3449
|
+
|
|
3450
|
+
constructor();
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
export class SeriesDescriptor {
|
|
3454
|
+
plotStyle:string;
|
|
3455
|
+
name?:string|null;
|
|
3456
|
+
linesVisible?:boolean|null;
|
|
3457
|
+
shapesVisible?:boolean|null;
|
|
3458
|
+
gradientVisible?:boolean|null;
|
|
3459
|
+
lineColor?:string|null;
|
|
3460
|
+
pointLabelFormat?:string|null;
|
|
3461
|
+
xToolTipPattern?:string|null;
|
|
3462
|
+
yToolTipPattern?:string|null;
|
|
3463
|
+
shapeLabel?:string|null;
|
|
3464
|
+
shapeSize?:number|null;
|
|
3465
|
+
shapeColor?:string|null;
|
|
3466
|
+
shape?:string|null;
|
|
3467
|
+
dataSources:Array<SourceDescriptor>;
|
|
3468
|
+
|
|
3469
|
+
constructor();
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3472
|
+
|
|
3473
|
+
type AxisPositionType = number;
|
|
3474
|
+
export class AxisPosition {
|
|
3475
|
+
static readonly TOP:AxisPositionType;
|
|
3476
|
+
static readonly BOTTOM:AxisPositionType;
|
|
3477
|
+
static readonly LEFT:AxisPositionType;
|
|
3478
|
+
static readonly RIGHT:AxisPositionType;
|
|
3479
|
+
static readonly NONE:AxisPositionType;
|
|
3480
|
+
}
|
|
3350
3481
|
|
|
3351
3482
|
type SeriesPlotStyleType = number;
|
|
3352
3483
|
export class SeriesPlotStyle {
|
|
@@ -3364,6 +3495,31 @@ export namespace dh.plot {
|
|
|
3364
3495
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3365
3496
|
}
|
|
3366
3497
|
|
|
3498
|
+
type AxisTypeType = number;
|
|
3499
|
+
export class AxisType {
|
|
3500
|
+
static readonly X:AxisTypeType;
|
|
3501
|
+
static readonly Y:AxisTypeType;
|
|
3502
|
+
static readonly SHAPE:AxisTypeType;
|
|
3503
|
+
static readonly SIZE:AxisTypeType;
|
|
3504
|
+
static readonly LABEL:AxisTypeType;
|
|
3505
|
+
static readonly COLOR:AxisTypeType;
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
/**
|
|
3509
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3510
|
+
* those series should be rendered.
|
|
3511
|
+
*/
|
|
3512
|
+
type ChartTypeType = number;
|
|
3513
|
+
export class ChartType {
|
|
3514
|
+
static readonly XY:ChartTypeType;
|
|
3515
|
+
static readonly PIE:ChartTypeType;
|
|
3516
|
+
static readonly OHLC:ChartTypeType;
|
|
3517
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3518
|
+
static readonly XYZ:ChartTypeType;
|
|
3519
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3520
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3521
|
+
}
|
|
3522
|
+
|
|
3367
3523
|
/**
|
|
3368
3524
|
* This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
|
|
3369
3525
|
* 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
|
|
@@ -3399,69 +3555,42 @@ export namespace dh.plot {
|
|
|
3399
3555
|
static readonly NUMBER:AxisFormatTypeType;
|
|
3400
3556
|
}
|
|
3401
3557
|
|
|
3402
|
-
type AxisTypeType = number;
|
|
3403
|
-
export class AxisType {
|
|
3404
|
-
static readonly X:AxisTypeType;
|
|
3405
|
-
static readonly Y:AxisTypeType;
|
|
3406
|
-
static readonly SHAPE:AxisTypeType;
|
|
3407
|
-
static readonly SIZE:AxisTypeType;
|
|
3408
|
-
static readonly LABEL:AxisTypeType;
|
|
3409
|
-
static readonly COLOR:AxisTypeType;
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
type AxisPositionType = number;
|
|
3413
|
-
export class AxisPosition {
|
|
3414
|
-
static readonly TOP:AxisPositionType;
|
|
3415
|
-
static readonly BOTTOM:AxisPositionType;
|
|
3416
|
-
static readonly LEFT:AxisPositionType;
|
|
3417
|
-
static readonly RIGHT:AxisPositionType;
|
|
3418
|
-
static readonly NONE:AxisPositionType;
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
|
-
/**
|
|
3422
|
-
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3423
|
-
* those series should be rendered.
|
|
3424
|
-
*/
|
|
3425
|
-
type ChartTypeType = number;
|
|
3426
|
-
export class ChartType {
|
|
3427
|
-
static readonly XY:ChartTypeType;
|
|
3428
|
-
static readonly PIE:ChartTypeType;
|
|
3429
|
-
static readonly OHLC:ChartTypeType;
|
|
3430
|
-
static readonly CATEGORY:ChartTypeType;
|
|
3431
|
-
static readonly XYZ:ChartTypeType;
|
|
3432
|
-
static readonly CATEGORY_3D:ChartTypeType;
|
|
3433
|
-
static readonly TREEMAP:ChartTypeType;
|
|
3434
|
-
}
|
|
3435
|
-
|
|
3436
3558
|
}
|
|
3437
3559
|
|
|
3438
3560
|
export namespace dh.lsp {
|
|
3439
3561
|
|
|
3440
|
-
export class
|
|
3562
|
+
export class Hover {
|
|
3563
|
+
contents:MarkupContent;
|
|
3441
3564
|
range:Range;
|
|
3442
|
-
rangeLength:number;
|
|
3443
|
-
text:string;
|
|
3444
3565
|
|
|
3445
3566
|
constructor();
|
|
3446
3567
|
}
|
|
3447
3568
|
|
|
3448
|
-
export class
|
|
3449
|
-
|
|
3450
|
-
|
|
3569
|
+
export class TextEdit {
|
|
3570
|
+
range:Range;
|
|
3571
|
+
text:string;
|
|
3451
3572
|
|
|
3452
3573
|
constructor();
|
|
3453
3574
|
}
|
|
3454
3575
|
|
|
3455
|
-
export class
|
|
3456
|
-
|
|
3457
|
-
|
|
3576
|
+
export class Position {
|
|
3577
|
+
line:number;
|
|
3578
|
+
character:number;
|
|
3458
3579
|
|
|
3459
3580
|
constructor();
|
|
3581
|
+
|
|
3582
|
+
lessThan(start:Position):boolean;
|
|
3583
|
+
lessOrEqual(start:Position):boolean;
|
|
3584
|
+
greaterThan(end:Position):boolean;
|
|
3585
|
+
greaterOrEqual(end:Position):boolean;
|
|
3586
|
+
copy():Position;
|
|
3460
3587
|
}
|
|
3461
3588
|
|
|
3462
|
-
export class
|
|
3589
|
+
export class SignatureInformation {
|
|
3463
3590
|
label:string;
|
|
3464
3591
|
documentation:MarkupContent;
|
|
3592
|
+
parameters:Array<ParameterInformation>;
|
|
3593
|
+
activeParameter:number;
|
|
3465
3594
|
|
|
3466
3595
|
constructor();
|
|
3467
3596
|
}
|
|
@@ -3483,21 +3612,16 @@ export namespace dh.lsp {
|
|
|
3483
3612
|
constructor();
|
|
3484
3613
|
}
|
|
3485
3614
|
|
|
3486
|
-
export class
|
|
3487
|
-
|
|
3488
|
-
|
|
3615
|
+
export class MarkupContent {
|
|
3616
|
+
kind:string;
|
|
3617
|
+
value:string;
|
|
3489
3618
|
|
|
3490
3619
|
constructor();
|
|
3491
|
-
|
|
3492
|
-
lessThan(start:Position):boolean;
|
|
3493
|
-
lessOrEqual(start:Position):boolean;
|
|
3494
|
-
greaterThan(end:Position):boolean;
|
|
3495
|
-
greaterOrEqual(end:Position):boolean;
|
|
3496
|
-
copy():Position;
|
|
3497
3620
|
}
|
|
3498
3621
|
|
|
3499
|
-
export class
|
|
3622
|
+
export class TextDocumentContentChangeEvent {
|
|
3500
3623
|
range:Range;
|
|
3624
|
+
rangeLength:number;
|
|
3501
3625
|
text:string;
|
|
3502
3626
|
|
|
3503
3627
|
constructor();
|
|
@@ -3512,19 +3636,22 @@ export namespace dh.lsp {
|
|
|
3512
3636
|
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3513
3637
|
}
|
|
3514
3638
|
|
|
3515
|
-
export class
|
|
3639
|
+
export class ParameterInformation {
|
|
3516
3640
|
label:string;
|
|
3517
3641
|
documentation:MarkupContent;
|
|
3518
|
-
parameters:Array<ParameterInformation>;
|
|
3519
|
-
activeParameter:number;
|
|
3520
3642
|
|
|
3521
3643
|
constructor();
|
|
3522
3644
|
}
|
|
3523
3645
|
|
|
3524
3646
|
}
|
|
3525
3647
|
|
|
3648
|
+
|
|
3526
3649
|
export namespace dh.calendar {
|
|
3527
3650
|
|
|
3651
|
+
export interface BusinessPeriod {
|
|
3652
|
+
get close():string;
|
|
3653
|
+
get open():string;
|
|
3654
|
+
}
|
|
3528
3655
|
export interface Holiday {
|
|
3529
3656
|
/**
|
|
3530
3657
|
* The date of the Holiday.
|
|
@@ -3567,10 +3694,6 @@ export namespace dh.calendar {
|
|
|
3567
3694
|
*/
|
|
3568
3695
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3569
3696
|
}
|
|
3570
|
-
export interface BusinessPeriod {
|
|
3571
|
-
get close():string;
|
|
3572
|
-
get open():string;
|
|
3573
|
-
}
|
|
3574
3697
|
|
|
3575
3698
|
type DayOfWeekType = string;
|
|
3576
3699
|
export class DayOfWeek {
|
|
@@ -3586,4 +3709,3 @@ export namespace dh.calendar {
|
|
|
3586
3709
|
}
|
|
3587
3710
|
|
|
3588
3711
|
}
|
|
3589
|
-
|