@deephaven/jsapi-types 1.0.0-dev0.35.1 → 1.0.0-dev0.35.3

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +1632 -1632
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -17,22 +17,6 @@ export interface IIterableResult<T> {
17
17
  }
18
18
  export namespace dh.storage {
19
19
 
20
- /**
21
- * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
22
- * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
23
- * be used.
24
- */
25
- export class FileContents {
26
- protected constructor();
27
-
28
- static blob(blob:Blob):FileContents;
29
- static text(...text:string[]):FileContents;
30
- static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
31
- text():Promise<string>;
32
- arrayBuffer():Promise<ArrayBuffer>;
33
- get etag():string;
34
- }
35
-
36
20
  /**
37
21
  * Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
38
22
  */
@@ -106,6 +90,22 @@ export namespace dh.storage {
106
90
  get dirname():string;
107
91
  }
108
92
 
93
+ /**
94
+ * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
95
+ * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
96
+ * be used.
97
+ */
98
+ export class FileContents {
99
+ protected constructor();
100
+
101
+ static blob(blob:Blob):FileContents;
102
+ static text(...text:string[]):FileContents;
103
+ static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
104
+ text():Promise<string>;
105
+ arrayBuffer():Promise<ArrayBuffer>;
106
+ get etag():string;
107
+ }
108
+
109
109
 
110
110
  type ItemTypeType = string;
111
111
  export class ItemType {
@@ -117,39 +117,87 @@ export namespace dh.storage {
117
117
 
118
118
  export namespace dh {
119
119
 
120
+ export interface ColumnGroup {
121
+ get name():string|null;
122
+ get children():string[]|null;
123
+ get color():string|null;
124
+ }
120
125
  /**
121
- * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
122
- * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
123
- * for easier scrolling without going to the server.
126
+ * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
127
+ * table column.
124
128
  */
125
- export interface ViewportData extends TableData {
129
+ export interface ColumnStatistics {
126
130
  /**
127
- * The index of the first returned row
128
- * @return double
131
+ * Gets the type of formatting that should be used for given statistic.
132
+ * <p>
133
+ * the format type for a statistic. A null return value means that the column formatting should be used.
134
+ * @param name - the display name of the statistic
135
+ * @return String
129
136
  */
130
- get offset():number;
137
+ getType(name:string):string;
131
138
  /**
132
- * A list of columns describing the data types in each row
133
- * @return {@link dh.Column} array.
139
+ * 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
140
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
141
+ * than 19 unique values.
142
+ * @return Map of String double
134
143
  */
135
- get columns():Array<Column>;
144
+ get uniqueValues():Map<string, number>;
136
145
  /**
137
- * An array of rows of data
138
- * @return {@link dh.ViewportRow} array.
146
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
147
+ * <p>
148
+ * A map of each statistic's name to its value.
149
+ * @return Map of String and Object
139
150
  */
140
- get rows():Array<ViewportRow>;
151
+ get statisticsMap():Map<string, object>;
141
152
  }
142
153
  /**
143
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
154
+ * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
144
155
  */
145
- export interface LocalTimeWrapper {
156
+ export interface LocalDateWrapper {
146
157
  valueOf():string;
147
- getHour():number;
148
- getMinute():number;
149
- getSecond():number;
150
- getNano():number;
158
+ getYear():number;
159
+ getMonthValue():number;
160
+ getDayOfMonth():number;
151
161
  toString():string;
152
162
  }
163
+ /**
164
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
165
+ * in columns) either by index, or scanning the complete present index.
166
+ *
167
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading
168
+ * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
169
+ * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
170
+ * both options should be considered.
171
+ *
172
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
173
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
174
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
175
+ * read specific rows or cells out of the table.
176
+ */
177
+ export interface SubscriptionTableData extends TableData {
178
+ get fullIndex():RangeSet;
179
+ /**
180
+ * The ordered set of row indexes removed since the last update
181
+ * @return dh.RangeSet
182
+ */
183
+ get removed():RangeSet;
184
+ /**
185
+ * The ordered set of row indexes added since the last update
186
+ * @return dh.RangeSet
187
+ */
188
+ get added():RangeSet;
189
+ get columns():Array<Column>;
190
+ /**
191
+ * The ordered set of row indexes updated since the last update
192
+ * @return dh.RangeSet
193
+ */
194
+ get modified():RangeSet;
195
+ get rows():Array<Row>;
196
+ }
197
+ export interface RefreshToken {
198
+ get bytes():string;
199
+ get expiry():number;
200
+ }
153
201
  export interface LayoutHints {
154
202
  readonly searchDisplayMode?:SearchDisplayModeType|null;
155
203
 
@@ -160,11 +208,6 @@ export namespace dh {
160
208
  get frontColumns():string[]|null;
161
209
  get backColumns():string[]|null;
162
210
  }
163
- export interface Row {
164
- get(column:Column):any;
165
- getFormat(column:Column):Format;
166
- get index():LongWrapper;
167
- }
168
211
  /**
169
212
  * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
170
213
  * {@link dh.TotalsTable}.
@@ -255,17 +298,133 @@ export namespace dh {
255
298
  naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
256
299
  }
257
300
  /**
258
- * Common interface for various ways of accessing table data and formatting.
301
+ * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
302
+ * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
259
303
  *
260
- * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
261
- * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
304
+ * Additionally, this is automatically subscribed to its one and only row, across all columns.
305
+ *
306
+ * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
307
+ * template when fetching a new totals table, or changing the totals table in use.
308
+ *
309
+ * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
310
+ * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
311
+ * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
312
+ * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
313
+ *
314
+ * When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
315
+ * rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
262
316
  */
263
- export interface TableData {
264
- get(index:LongWrapper|number):Row;
265
- getData(index:LongWrapper|number, column:Column):any;
266
- getFormat(index:LongWrapper|number, column:Column):Format;
317
+ export interface TotalsTable extends JoinableTable {
318
+ /**
319
+ * Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
320
+ * provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
321
+ * events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
322
+ * event per row in that range.
323
+ * @param firstRow -
324
+ * @param lastRow -
325
+ * @param columns -
326
+ * @param updateIntervalMs -
327
+ */
328
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
329
+ /**
330
+ * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
331
+ * resolve until that data is ready.
332
+ * @return Promise of {@link dh.TableData}
333
+ */
334
+ getViewportData():Promise<TableData>;
335
+ /**
336
+ * a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
337
+ * returned value.
338
+ * @param key -
339
+ * @return {@link dh.Column}
340
+ */
341
+ findColumn(key:string):Column;
342
+ /**
343
+ * multiple columns specified by the given names.
344
+ * @param keys -
345
+ * @return {@link dh.Column} array
346
+ */
347
+ findColumns(keys:string[]):Column[];
348
+ /**
349
+ * Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
350
+ */
351
+ close():void;
352
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
353
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
354
+ nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<CustomEvent<T>>;
355
+ hasListeners(name:string):boolean;
356
+ /**
357
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
358
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
359
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
360
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
361
+ * not.
362
+ * @param sort -
363
+ * @return {@link dh.Sort} array
364
+ */
365
+ applySort(sort:Sort[]):Array<Sort>;
366
+ /**
367
+ * Replace the current custom columns with a new set. These columns can be used when adding new filter and sort
368
+ * operations to the table, as long as they are present.
369
+ * @param customColumns -
370
+ * @return
371
+ */
372
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
373
+ /**
374
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
375
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
376
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
377
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
378
+ * will not.
379
+ * @param filter -
380
+ * @return {@link dh.FilterCondition} array
381
+ */
382
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
383
+ /**
384
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
385
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
386
+ * for the <b>filterchanged</b> event to know when to update the UI.
387
+ * @return {@link dh.FilterCondition} array
388
+ */
389
+ get filter():Array<FilterCondition>;
390
+ /**
391
+ * True if this table has been closed.
392
+ * @return boolean
393
+ */
394
+ get isClosed():boolean;
395
+ /**
396
+ * The total number of rows in this table. This may change as the base table's configuration, filter, or contents
397
+ * change.
398
+ * @return double
399
+ */
400
+ get size():number;
401
+ /**
402
+ * The columns present on this table. Note that this may not include all columns in the parent table, and in cases
403
+ * where a given column has more than one aggregation applied, the column name will have a suffix indicating the
404
+ * aggregation used. This suffixed name will be of the form <b>columnName + '__' + aggregationName</b>.
405
+ * @return {@link dh.Column} array
406
+ */
267
407
  get columns():Array<Column>;
268
- get rows():Array<Row>;
408
+ get totalsTableConfig():TotalsTableConfig;
409
+ /**
410
+ * An ordered list of Sorts to apply to the table. To update, call applySort(). Note that this getter will return
411
+ * the new value immediately, even though it may take a little time to update on the server. You may listen for the
412
+ * <b>sortchanged</b> event to know when to update the UI.
413
+ * @return {@link dh.Sort} array
414
+ */
415
+ get sort():Array<Sort>;
416
+ /**
417
+ * Read-only. An ordered list of custom column formulas to add to the table, either adding new columns or replacing
418
+ * existing ones. To update, call <b>applyCustomColumns()</b>.
419
+ * @return {@link dh.CustomColumn} array
420
+ */
421
+ get customColumns():Array<CustomColumn>;
422
+ /**
423
+ * True if this table may receive updates from the server, including size changed events, updated events after
424
+ * initial snapshot.
425
+ * @return boolean
426
+ */
427
+ get isRefreshing():boolean;
269
428
  }
270
429
  /**
271
430
  * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
@@ -299,7 +458,139 @@ export namespace dh {
299
458
  */
300
459
  close():void;
301
460
  }
302
- /**
461
+ export interface WorkerHeapInfo {
462
+ /**
463
+ * Total heap size available for this worker.
464
+ */
465
+ get totalHeapSize():number;
466
+ get freeMemory():number;
467
+ get maximumHeapSize():number;
468
+ }
469
+ /**
470
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
471
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
472
+ *
473
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
474
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
475
+ * backwards compatibility and to better follow JS expectations.
476
+ */
477
+ export interface WidgetMessageDetails {
478
+ /**
479
+ * Returns the data from this message as a base64-encoded string.
480
+ */
481
+ getDataAsBase64():string;
482
+ /**
483
+ * Returns the data from this message as a Uint8Array.
484
+ */
485
+ getDataAsU8():Uint8Array;
486
+ /**
487
+ * Returns the data from this message as a utf-8 string.
488
+ */
489
+ getDataAsString():string;
490
+ /**
491
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
492
+ * objects, and should close them when no longer needed.
493
+ */
494
+ get exportedObjects():WidgetExportedObject[];
495
+ }
496
+ /**
497
+ * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
498
+ * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
499
+ * for easier scrolling without going to the server.
500
+ */
501
+ export interface ViewportData extends TableData {
502
+ /**
503
+ * The index of the first returned row
504
+ * @return double
505
+ */
506
+ get offset():number;
507
+ /**
508
+ * A list of columns describing the data types in each row
509
+ * @return {@link dh.Column} array.
510
+ */
511
+ get columns():Array<Column>;
512
+ /**
513
+ * An array of rows of data
514
+ * @return {@link dh.ViewportRow} array.
515
+ */
516
+ get rows():Array<ViewportRow>;
517
+ }
518
+ /**
519
+ * Common interface for various ways of accessing table data and formatting.
520
+ *
521
+ * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
522
+ * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
523
+ */
524
+ export interface TableData {
525
+ get(index:LongWrapper|number):Row;
526
+ getData(index:LongWrapper|number, column:Column):any;
527
+ getFormat(index:LongWrapper|number, column:Column):Format;
528
+ get columns():Array<Column>;
529
+ get rows():Array<Row>;
530
+ }
531
+ /**
532
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it.
533
+ */
534
+ export interface Format {
535
+ /**
536
+ * The format string to apply to the value of this cell.
537
+ * @return String
538
+ */
539
+ readonly formatString?:string|null;
540
+ /**
541
+ * Color to apply to the cell's background, in <b>#rrggbb</b> format.
542
+ * @return String
543
+ */
544
+ readonly backgroundColor?:string|null;
545
+ /**
546
+ * Color to apply to the text, in <b>#rrggbb</b> format.
547
+ * @return String
548
+ */
549
+ readonly color?:string|null;
550
+ /**
551
+ *
552
+ * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
553
+ */
554
+ readonly numberFormat?:string|null;
555
+ }
556
+ export interface Row {
557
+ get(column:Column):any;
558
+ getFormat(column:Column):Format;
559
+ get index():LongWrapper;
560
+ }
561
+ export interface TreeViewportData extends TableData {
562
+ get offset():number;
563
+ get columns():Array<Column>;
564
+ get rows():Array<TreeRow>;
565
+ }
566
+ export interface HasEventHandling {
567
+ /**
568
+ * Listen for events on this object.
569
+ * @param name - the name of the event to listen for
570
+ * @param callback - a function to call when the event occurs
571
+ * @return Returns a cleanup function.
572
+ * @typeParam T - the type of the data that the event will provide
573
+ */
574
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
575
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
576
+ hasListeners(name:string):boolean;
577
+ /**
578
+ * Removes an event listener added to this table.
579
+ * @param name -
580
+ * @param callback -
581
+ * @return
582
+ * @typeParam T -
583
+ */
584
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
585
+ }
586
+ /**
587
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
588
+ * the viewport again.
589
+ */
590
+ export interface ViewportRow extends Row {
591
+ get index():LongWrapper;
592
+ }
593
+ /**
303
594
  * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
304
595
  * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
305
596
  * <p>
@@ -345,263 +636,187 @@ export namespace dh {
345
636
  snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
346
637
  }
347
638
  /**
348
- * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
349
- * table column.
639
+ * Row implementation that also provides additional read-only properties. represents visible rows in the table,
640
+ * but with additional properties to reflect the tree structure.
350
641
  */
351
- export interface ColumnStatistics {
642
+ export interface TreeRow extends ViewportRow {
352
643
  /**
353
- * Gets the type of formatting that should be used for given statistic.
354
- * <p>
355
- * the format type for a statistic. A null return value means that the column formatting should be used.
356
- * @param name - the display name of the statistic
357
- * @return String
644
+ * True if this node is currently expanded to show its children; false otherwise. Those children will be the
645
+ * rows below this one with a greater depth than this one
646
+ * @return boolean
358
647
  */
359
- getType(name:string):string;
648
+ get isExpanded():boolean;
360
649
  /**
361
- * 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
362
- * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
363
- * than 19 unique values.
364
- * @return Map of String double
650
+ * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
651
+ * row and its expand/collapse icon
652
+ * @return int
365
653
  */
366
- get uniqueValues():Map<string, number>;
654
+ get depth():number;
367
655
  /**
368
- * Gets a map with the display name of statistics as keys and the numeric stat as a value.
369
- * <p>
370
- * A map of each statistic's name to its value.
371
- * @return Map of String and Object
656
+ * True if this node has children and can be expanded; false otherwise. Note that this value may change when
657
+ * the table updates, depending on the table's configuration
658
+ * @return boolean
372
659
  */
373
- get statisticsMap():Map<string, object>;
660
+ get hasChildren():boolean;
661
+ get index():LongWrapper;
374
662
  }
375
663
  /**
376
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
377
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
664
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
665
+ */
666
+ export interface LocalTimeWrapper {
667
+ valueOf():string;
668
+ getHour():number;
669
+ getMinute():number;
670
+ getSecond():number;
671
+ getNano():number;
672
+ toString():string;
673
+ }
674
+
675
+ /**
676
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
677
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
678
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
679
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
680
+ * of <b>TotalsTableConfig</b> will be supplied.
378
681
  *
379
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
380
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
381
- * backwards compatibility and to better follow JS expectations.
682
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
683
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
684
+ * expected formats.
382
685
  */
383
- export interface WidgetMessageDetails {
686
+ export class TotalsTableConfig {
384
687
  /**
385
- * Returns the data from this message as a base64-encoded string.
688
+ * @deprecated
386
689
  */
387
- getDataAsBase64():string;
690
+ static readonly COUNT:string;
388
691
  /**
389
- * Returns the data from this message as a Uint8Array.
692
+ * @deprecated
390
693
  */
391
- getDataAsU8():Uint8Array;
694
+ static readonly MIN:string;
392
695
  /**
393
- * Returns the data from this message as a utf-8 string.
696
+ * @deprecated
394
697
  */
395
- getDataAsString():string;
698
+ static readonly MAX:string;
396
699
  /**
397
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
398
- * objects, and should close them when no longer needed.
700
+ * @deprecated
399
701
  */
400
- get exportedObjects():WidgetExportedObject[];
401
- }
402
- /**
403
- * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
404
- * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
405
- *
406
- * Additionally, this is automatically subscribed to its one and only row, across all columns.
407
- *
408
- * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
409
- * template when fetching a new totals table, or changing the totals table in use.
410
- *
411
- * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
412
- * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
413
- * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
414
- * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
415
- *
416
- * When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
417
- * rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
418
- */
419
- export interface TotalsTable extends JoinableTable {
702
+ static readonly SUM:string;
420
703
  /**
421
- * Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
422
- * provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
423
- * events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
424
- * event per row in that range.
425
- * @param firstRow -
426
- * @param lastRow -
427
- * @param columns -
428
- * @param updateIntervalMs -
704
+ * @deprecated
429
705
  */
430
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
706
+ static readonly ABS_SUM:string;
431
707
  /**
432
- * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
433
- * resolve until that data is ready.
434
- * @return Promise of {@link dh.TableData}
708
+ * @deprecated
435
709
  */
436
- getViewportData():Promise<TableData>;
710
+ static readonly VAR:string;
437
711
  /**
438
- * a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
439
- * returned value.
440
- * @param key -
441
- * @return {@link dh.Column}
712
+ * @deprecated
442
713
  */
443
- findColumn(key:string):Column;
714
+ static readonly AVG:string;
444
715
  /**
445
- * multiple columns specified by the given names.
446
- * @param keys -
447
- * @return {@link dh.Column} array
448
- */
449
- findColumns(keys:string[]):Column[];
450
- /**
451
- * Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
452
- */
453
- close():void;
454
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
455
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
456
- nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<CustomEvent<T>>;
457
- hasListeners(name:string):boolean;
458
- /**
459
- * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
460
- * immediately return the new value, but you may receive update events using the old sort before the new sort is
461
- * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
462
- * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
463
- * not.
464
- * @param sort -
465
- * @return {@link dh.Sort} array
466
- */
467
- applySort(sort:Sort[]):Array<Sort>;
468
- /**
469
- * Replace the current custom columns with a new set. These columns can be used when adding new filter and sort
470
- * operations to the table, as long as they are present.
471
- * @param customColumns -
472
- * @return
716
+ * @deprecated
473
717
  */
474
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
718
+ static readonly STD:string;
475
719
  /**
476
- * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
477
- * will immediately return the new value, but you may receive update events using the old filter before the new one
478
- * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
479
- * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
480
- * will not.
481
- * @param filter -
482
- * @return {@link dh.FilterCondition} array
720
+ * @deprecated
483
721
  */
484
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
722
+ static readonly FIRST:string;
485
723
  /**
486
- * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
487
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
488
- * for the <b>filterchanged</b> event to know when to update the UI.
489
- * @return {@link dh.FilterCondition} array
724
+ * @deprecated
490
725
  */
491
- get filter():Array<FilterCondition>;
726
+ static readonly LAST:string;
492
727
  /**
493
- * True if this table has been closed.
494
- * @return boolean
728
+ * @deprecated
495
729
  */
496
- get isClosed():boolean;
730
+ static readonly SKIP:string;
497
731
  /**
498
- * The total number of rows in this table. This may change as the base table's configuration, filter, or contents
499
- * change.
500
- * @return double
732
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
501
733
  */
502
- get size():number;
734
+ showTotalsByDefault:boolean;
503
735
  /**
504
- * The columns present on this table. Note that this may not include all columns in the parent table, and in cases
505
- * where a given column has more than one aggregation applied, the column name will have a suffix indicating the
506
- * aggregation used. This suffixed name will be of the form <b>columnName + '__' + aggregationName</b>.
507
- * @return {@link dh.Column} array
736
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
508
737
  */
509
- get columns():Array<Column>;
510
- get totalsTableConfig():TotalsTableConfig;
738
+ showGrandTotalsByDefault:boolean;
511
739
  /**
512
- * An ordered list of Sorts to apply to the table. To update, call applySort(). Note that this getter will return
513
- * the new value immediately, even though it may take a little time to update on the server. You may listen for the
514
- * <b>sortchanged</b> event to know when to update the UI.
515
- * @return {@link dh.Sort} array
740
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
516
741
  */
517
- get sort():Array<Sort>;
742
+ defaultOperation:AggregationOperationType;
518
743
  /**
519
- * Read-only. An ordered list of custom column formulas to add to the table, either adding new columns or replacing
520
- * existing ones. To update, call <b>applyCustomColumns()</b>.
521
- * @return {@link dh.CustomColumn} array
744
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
745
+ * Table. If a column is omitted, the defaultOperation is used.
522
746
  */
523
- get customColumns():Array<CustomColumn>;
747
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
524
748
  /**
525
- * True if this table may receive updates from the server, including size changed events, updated events after
526
- * initial snapshot.
527
- * @return boolean
749
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
750
+ * these columns. See also `Table.selectDistinct`.
528
751
  */
529
- get isRefreshing():boolean;
530
- }
531
- export interface RefreshToken {
532
- get bytes():string;
533
- get expiry():number;
752
+ groupBy:Array<string>;
753
+
754
+ constructor();
755
+
756
+ toString():string;
534
757
  }
758
+
535
759
  /**
536
- * This object may be pooled internally or discarded and not updated. Do not retain references to it.
760
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
761
+ * this type TableMap.
762
+ * @deprecated
537
763
  */
538
- export interface Format {
539
- /**
540
- * The format string to apply to the value of this cell.
541
- * @return String
542
- */
543
- readonly formatString?:string|null;
544
- /**
545
- * Color to apply to the cell's background, in <b>#rrggbb</b> format.
546
- * @return String
547
- */
548
- readonly backgroundColor?:string|null;
549
- /**
550
- * Color to apply to the text, in <b>#rrggbb</b> format.
551
- * @return String
552
- */
553
- readonly color?:string|null;
554
- /**
555
- *
556
- * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
557
- */
558
- readonly numberFormat?:string|null;
764
+ export class TableMap {
765
+ static readonly EVENT_KEYADDED:string;
766
+ static readonly EVENT_DISCONNECT:string;
767
+ static readonly EVENT_RECONNECT:string;
768
+ static readonly EVENT_RECONNECTFAILED:string;
769
+
770
+ protected constructor();
559
771
  }
560
- /**
561
- * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
562
- */
563
- export interface LocalDateWrapper {
564
- valueOf():string;
565
- getYear():number;
566
- getMonthValue():number;
567
- getDayOfMonth():number;
568
- toString():string;
772
+
773
+ export class DateWrapper extends LongWrapper {
774
+ protected constructor();
775
+
776
+ static ofJsDate(date:Date):DateWrapper;
777
+ asDate():Date;
569
778
  }
779
+
570
780
  /**
571
- * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
572
- * in columns) either by index, or scanning the complete present index.
573
- *
574
- * This class supports two ways of reading the table - checking the changes made since the last update, and reading
575
- * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
576
- * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
577
- * both options should be considered.
578
- *
579
- * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
580
- * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
581
- * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
582
- * read specific rows or cells out of the table.
781
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
782
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
583
783
  */
584
- export interface SubscriptionTableData extends TableData {
585
- get fullIndex():RangeSet;
784
+ export class IdeConnection implements HasEventHandling {
586
785
  /**
587
- * The ordered set of row indexes removed since the last update
588
- * @return dh.RangeSet
786
+ * @deprecated
589
787
  */
590
- get removed():RangeSet;
788
+ static readonly HACK_CONNECTION_FAILURE:string;
789
+ static readonly EVENT_DISCONNECT:string;
790
+ static readonly EVENT_RECONNECT:string;
791
+ static readonly EVENT_SHUTDOWN:string;
792
+
591
793
  /**
592
- * The ordered set of row indexes added since the last update
593
- * @return dh.RangeSet
794
+ * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
795
+ * @param serverUrl - The url used when connecting to the server. Read-only.
796
+ * @param connectOptions - Optional Object
797
+ * @param fromJava - Optional boolean
798
+ * @deprecated
594
799
  */
595
- get added():RangeSet;
596
- get columns():Array<Column>;
800
+ constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
801
+
597
802
  /**
598
- * The ordered set of row indexes updated since the last update
599
- * @return dh.RangeSet
803
+ * closes the current connection, releasing any resources on the server or client.
600
804
  */
601
- get modified():RangeSet;
602
- get rows():Array<Row>;
603
- }
604
- export interface HasEventHandling {
805
+ close():void;
806
+ running():Promise<IdeConnection>;
807
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
808
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
809
+ /**
810
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
811
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
812
+ * log messages as are presently available.
813
+ * @param callback -
814
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
815
+ */
816
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
817
+ startSession(type:string):Promise<IdeSession>;
818
+ getConsoleTypes():Promise<Array<string>>;
819
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
605
820
  /**
606
821
  * Listen for events on this object.
607
822
  * @param name - the name of the event to listen for
@@ -621,297 +836,266 @@ export namespace dh {
621
836
  */
622
837
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
623
838
  }
624
- export interface TreeViewportData extends TableData {
625
- get offset():number;
626
- get columns():Array<Column>;
627
- get rows():Array<TreeRow>;
628
- }
629
- /**
630
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
631
- * the viewport again.
632
- */
633
- export interface ViewportRow extends Row {
634
- get index():LongWrapper;
635
- }
839
+
636
840
  /**
637
- * Row implementation that also provides additional read-only properties. represents visible rows in the table,
638
- * but with additional properties to reflect the tree structure.
841
+ * A js type for operating on input tables.
842
+ *
843
+ * Represents a User Input Table, which can have data added to it from other sources.
844
+ *
845
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
846
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
847
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
848
+ * before sending the next operation.
849
+ *
850
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
851
+ *
852
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
853
+ * object.
639
854
  */
640
- export interface TreeRow extends ViewportRow {
855
+ export class InputTable {
856
+ protected constructor();
857
+
641
858
  /**
642
- * True if this node is currently expanded to show its children; false otherwise. Those children will be the
643
- * rows below this one with a greater depth than this one
644
- * @return boolean
859
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
860
+ * property at that name and validate it can be put into the given column type.
861
+ * @param row -
862
+ * @param userTimeZone -
863
+ * @return Promise of dh.InputTable
645
864
  */
646
- get isExpanded():boolean;
865
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
647
866
  /**
648
- * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
649
- * row and its expand/collapse icon
650
- * @return int
867
+ * Add multiple rows to a table.
868
+ * @param rows -
869
+ * @param userTimeZone -
870
+ * @return Promise of dh.InputTable
651
871
  */
652
- get depth():number;
872
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
653
873
  /**
654
- * True if this node has children and can be expanded; false otherwise. Note that this value may change when
655
- * the table updates, depending on the table's configuration
656
- * @return boolean
874
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
875
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
876
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
877
+ * resolved to the same InputTable instance this method was called upon once the server returns.
878
+ * @param tableToAdd -
879
+ * @return Promise of dh.InputTable
657
880
  */
658
- get hasChildren():boolean;
659
- get index():LongWrapper;
660
- }
661
- export interface WorkerHeapInfo {
881
+ addTable(tableToAdd:Table):Promise<InputTable>;
662
882
  /**
663
- * Total heap size available for this worker.
883
+ * Add multiple tables to this Input Table.
884
+ * @param tablesToAdd -
885
+ * @return Promise of dh.InputTable
664
886
  */
665
- get totalHeapSize():number;
666
- get freeMemory():number;
667
- get maximumHeapSize():number;
668
- }
669
- export interface ColumnGroup {
670
- get name():string|null;
671
- get children():string[]|null;
672
- get color():string|null;
673
- }
674
-
675
- /**
676
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
677
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
678
- * methods return a new Sort instance.
679
- */
680
- export class Sort {
681
- static readonly ASCENDING:string;
682
- static readonly DESCENDING:string;
683
- static readonly REVERSE:string;
684
-
685
- protected constructor();
686
-
887
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
687
888
  /**
688
- * Builds a Sort instance to sort values in ascending order.
689
- * @return {@link dh.Sort}
889
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
890
+ * @param tableToDelete -
891
+ * @return Promise of dh.InputTable
690
892
  */
691
- asc():Sort;
893
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
692
894
  /**
693
- * Builds a Sort instance to sort values in descending order.
694
- * @return {@link dh.Sort}
895
+ * Delete multiple tables from this Input Table.
896
+ * @param tablesToDelete -
897
+ * @return
695
898
  */
696
- desc():Sort;
899
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
697
900
  /**
698
- * Builds a Sort instance which takes the absolute value before applying order.
699
- * @return {@link dh.Sort}
901
+ * A list of the key columns, by name
902
+ * @return String array.
700
903
  */
701
- abs():Sort;
702
- toString():string;
904
+ get keys():string[];
703
905
  /**
704
- * True if the absolute value of the column should be used when sorting; defaults to false.
705
- * @return boolean
906
+ * A list of the value columns, by name
907
+ * @return String array.
706
908
  */
707
- get isAbs():boolean;
909
+ get values():string[];
708
910
  /**
709
- * The column which is sorted.
710
- * @return {@link dh.Column}
911
+ * A list of the key columns.
912
+ * @return Column array.
711
913
  */
712
- get column():Column;
914
+ get keyColumns():Column[];
713
915
  /**
714
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
715
- * @return String
916
+ * A list of the value Column objects
917
+ * @return {@link dh.Column} array.
716
918
  */
717
- get direction():string;
919
+ get valueColumns():Column[];
920
+ /**
921
+ * The source table for this Input Table
922
+ * @return dh.table
923
+ */
924
+ get table():Table;
718
925
  }
719
926
 
720
927
  /**
721
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
928
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
929
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
930
+ * instance.
722
931
  */
723
- export class BigIntegerWrapper {
932
+ export class FilterCondition {
724
933
  protected constructor();
725
934
 
726
- static ofString(str:string):BigIntegerWrapper;
727
- asNumber():number;
728
- valueOf():string;
935
+ /**
936
+ * the opposite of this condition
937
+ * @return FilterCondition
938
+ */
939
+ not():FilterCondition;
940
+ /**
941
+ * a condition representing the current condition logically ANDed with the other parameters
942
+ * @param filters -
943
+ * @return FilterCondition
944
+ */
945
+ and(...filters:FilterCondition[]):FilterCondition;
946
+ /**
947
+ * a condition representing the current condition logically ORed with the other parameters
948
+ * @param filters -
949
+ * @return FilterCondition.
950
+ */
951
+ or(...filters:FilterCondition[]):FilterCondition;
952
+ /**
953
+ * a string suitable for debugging showing the details of this condition.
954
+ * @return String.
955
+ */
729
956
  toString():string;
957
+ get columns():Array<Column>;
958
+ /**
959
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
960
+ * functions:
961
+ * <ul>
962
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
963
+ * than the third</li>
964
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
965
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
966
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
967
+ * "not a number"</i></li>
968
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
969
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
970
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
971
+ * expression</li>
972
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
973
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
974
+ * <p>
975
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
976
+ * method should be used in other cases
977
+ * </p>
978
+ * </li>
979
+ * </ul>
980
+ * @param function -
981
+ * @param args -
982
+ * @return dh.FilterCondition
983
+ */
984
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
985
+ /**
986
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
987
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
988
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
989
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
990
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
991
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
992
+ * {@link dh.Column.filter}).
993
+ * @param value -
994
+ * @param columns -
995
+ * @return dh.FilterCondition
996
+ */
997
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
730
998
  }
731
999
 
732
- /**
733
- * Event fired when a command is issued from the client.
734
- */
735
- export class CommandInfo {
736
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1000
+ export class LoginCredentials {
1001
+ type?:string|null;
1002
+ username?:string|null;
1003
+ token?:string|null;
737
1004
 
738
- get result():Promise<dh.ide.CommandResult>;
739
- get code():string;
1005
+ constructor();
740
1006
  }
741
1007
 
742
1008
  /**
743
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
744
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
745
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
746
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
747
- * instance.
1009
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1010
+ * column.
748
1011
  */
749
- export class FilterValue {
1012
+ export class Column {
1013
+ /**
1014
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1015
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1016
+ * @return String
1017
+ */
1018
+ readonly constituentType?:string|null;
1019
+ readonly description?:string|null;
1020
+
750
1021
  protected constructor();
751
1022
 
752
1023
  /**
753
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
754
- * {@link TableData.get} for DateTime values. To create
755
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
756
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
757
- * 64-bit long integer, use {@link LongWrapper.ofString}.
758
- * @param input - the number to wrap as a FilterValue
759
- * @return an immutable FilterValue that can be built into a filter
1024
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
1025
+ * @param row -
1026
+ * @return Any
760
1027
  */
761
- static ofNumber(input:LongWrapper|number):FilterValue;
1028
+ get(row:Row):any;
1029
+ getFormat(row:Row):Format;
762
1030
  /**
763
- * a filter condition checking if the current value is equal to the given parameter
764
- * @param term -
765
- * @return {@link dh.FilterCondition}
1031
+ * Creates a sort builder object, to be used when sorting by this column.
1032
+ * @return {@link dh.Sort}
766
1033
  */
767
- eq(term:FilterValue):FilterCondition;
1034
+ sort():Sort;
768
1035
  /**
769
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
770
- * vs lower case
771
- * @param term -
772
- * @return {@link dh.FilterCondition}
1036
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1037
+ * operation, or as a builder to create a filter operation.
1038
+ * @return {@link dh.FilterValue}
773
1039
  */
774
- eqIgnoreCase(term:FilterValue):FilterCondition;
1040
+ filter():FilterValue;
775
1041
  /**
776
- * a filter condition checking if the current value is not equal to the given parameter
777
- * @param term -
778
- * @return {@link dh.FilterCondition}
1042
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1043
+ * @param expression -
1044
+ * @return {@link dh.CustomColumn}
779
1045
  */
780
- notEq(term:FilterValue):FilterCondition;
1046
+ formatColor(expression:string):CustomColumn;
781
1047
  /**
782
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
783
- * upper vs lower case
784
- * @param term -
785
- * @return {@link dh.FilterCondition}
1048
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1049
+ * @param expression -
1050
+ * @return {@link dh.CustomColumn}
786
1051
  */
787
- notEqIgnoreCase(term:FilterValue):FilterCondition;
1052
+ formatNumber(expression:string):CustomColumn;
788
1053
  /**
789
- * a filter condition checking if the current value is greater than the given parameter
790
- * @param term -
791
- * @return {@link dh.FilterCondition}
1054
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1055
+ * @param expression -
1056
+ * @return {@link dh.CustomColumn}
792
1057
  */
793
- greaterThan(term:FilterValue):FilterCondition;
1058
+ formatDate(expression:string):CustomColumn;
1059
+ toString():string;
794
1060
  /**
795
- * a filter condition checking if the current value is less than the given parameter
796
- * @param term -
797
- * @return {@link dh.FilterCondition}
1061
+ * Label for this column.
1062
+ * @return String
798
1063
  */
799
- lessThan(term:FilterValue):FilterCondition;
1064
+ get name():string;
800
1065
  /**
801
- * a filter condition checking if the current value is greater than or equal to the given parameter
802
- * @param term -
803
- * @return {@link dh.FilterCondition}
1066
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1067
+ * <b>isUncoalesced</b> property on <b>Table</b>)
1068
+ * @return boolean
804
1069
  */
805
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1070
+ get isPartitionColumn():boolean;
806
1071
  /**
807
- * a filter condition checking if the current value is less than or equal to the given parameter
808
- * @param term -
809
- * @return {@link dh.FilterCondition}
810
- */
811
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
812
- /**
813
- * a filter condition checking if the current value is in the given set of values
814
- * @param terms -
815
- * @return {@link dh.FilterCondition}
816
- */
817
- in(terms:FilterValue[]):FilterCondition;
818
- /**
819
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
820
- * lower case
821
- * @param terms -
822
- * @return {@link dh.FilterCondition}
823
- */
824
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
825
- /**
826
- * a filter condition checking that the current value is not in the given set of values
827
- * @param terms -
828
- * @return {@link dh.FilterCondition}
829
- */
830
- notIn(terms:FilterValue[]):FilterCondition;
831
- /**
832
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
833
- * upper vs lower case
834
- * @param terms -
835
- * @return {@link dh.FilterCondition}
836
- */
837
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
838
- /**
839
- * a filter condition checking if the given value contains the given string value
840
- * @param term -
841
- * @return {@link dh.FilterCondition}
842
- */
843
- contains(term:FilterValue):FilterCondition;
844
- /**
845
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
846
- * lower case
847
- * @param term -
848
- * @return {@link dh.FilterCondition}
849
- */
850
- containsIgnoreCase(term:FilterValue):FilterCondition;
851
- /**
852
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
853
- * use Java regex syntax
854
- * @param pattern -
855
- * @return {@link dh.FilterCondition}
856
- */
857
- matches(pattern:FilterValue):FilterCondition;
858
- /**
859
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
860
- * differences of upper vs lower case. Regex patterns use Java regex syntax
861
- * @param pattern -
862
- * @return {@link dh.FilterCondition}
863
- */
864
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
865
- /**
866
- * a filter condition checking if the current value is a true boolean
867
- * @return {@link dh.FilterCondition}
868
- */
869
- isTrue():FilterCondition;
870
- /**
871
- * a filter condition checking if the current value is a false boolean
872
- * @return {@link dh.FilterCondition}
873
- */
874
- isFalse():FilterCondition;
875
- /**
876
- * a filter condition checking if the current value is a null value
877
- * @return {@link dh.FilterCondition}
1072
+ *
1073
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1074
+ * @return int
878
1075
  */
879
- isNull():FilterCondition;
1076
+ get index():number;
1077
+ get isSortable():boolean;
880
1078
  /**
881
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
882
- * functions that can be invoked on a String:
883
- * <ul>
884
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
885
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
886
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
887
- * regular expression</li>
888
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
889
- * <p>
890
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
891
- * </p>
892
- * </li>
893
- * </ul>
894
- * @param method -
895
- * @param args -
896
- * @return
1079
+ * Type of the row data that can be found in this column.
1080
+ * @return String
897
1081
  */
898
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
899
- toString():string;
1082
+ get type():string;
900
1083
  /**
901
- * Constructs a string for the filter API from the given parameter.
902
- * @param input -
903
- * @return
1084
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1085
+ * table using <b>applyCustomColumns</b> with the parameters specified.
1086
+ * @param expression -
1087
+ * @return {@link dh.CustomColumn}
904
1088
  */
905
- static ofString(input:any):FilterValue;
1089
+ static formatRowColor(expression:string):CustomColumn;
906
1090
  /**
907
- * Constructs a boolean for the filter API from the given parameter.
908
- * @param b -
909
- * @return
1091
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1092
+ * @param name -
1093
+ * @param expression -
1094
+ * @return {@link dh.CustomColumn}
910
1095
  */
911
- static ofBoolean(b:boolean):FilterValue;
1096
+ static createCustomColumn(name:string, expression:string):CustomColumn;
912
1097
  }
913
1098
 
914
-
915
1099
  export class LongWrapper {
916
1100
  protected constructor();
917
1101
 
@@ -933,83 +1117,6 @@ export namespace dh {
933
1117
  constructor();
934
1118
  }
935
1119
 
936
- export class IdeSession implements HasEventHandling {
937
- static readonly EVENT_COMMANDSTARTED:string;
938
- static readonly EVENT_REQUEST_FAILED:string;
939
-
940
- protected constructor();
941
-
942
- /**
943
- * Load the named table, with columns and size information already fully populated.
944
- * @param name -
945
- * @param applyPreviewColumns - optional boolean
946
- * @return {@link Promise} of {@link dh.Table}
947
- */
948
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
949
- /**
950
- * Load the named Figure, including its tables and tablemaps as needed.
951
- * @param name -
952
- * @return promise of dh.plot.Figure
953
- */
954
- getFigure(name:string):Promise<dh.plot.Figure>;
955
- /**
956
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
957
- * size is presently not available until the viewport is first set.
958
- * @param name -
959
- * @return {@link Promise} of {@link dh.TreeTable}
960
- */
961
- getTreeTable(name:string):Promise<TreeTable>;
962
- getHierarchicalTable(name:string):Promise<TreeTable>;
963
- getPartitionedTable(name:string):Promise<PartitionedTable>;
964
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
965
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
966
- /**
967
- * Merges the given tables into a single table. Assumes all tables have the same structure.
968
- * @param tables -
969
- * @return {@link Promise} of {@link dh.Table}
970
- */
971
- mergeTables(tables:Table[]):Promise<Table>;
972
- bindTableToVariable(table:Table, name:string):Promise<void>;
973
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
974
- close():void;
975
- runCode(code:string):Promise<dh.ide.CommandResult>;
976
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
977
- openDocument(params:object):void;
978
- changeDocument(params:object):void;
979
- getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
980
- getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
981
- getHover(params:object):Promise<dh.lsp.Hover>;
982
- closeDocument(params:object):void;
983
- /**
984
- * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
985
- * values will be null.
986
- * @param size -
987
- * @return {@link Promise} of {@link dh.Table}
988
- */
989
- emptyTable(size:number):Promise<Table>;
990
- /**
991
- * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
992
- * the table will be populated with the interval from the specified date until now.
993
- * @param periodNanos -
994
- * @param startTime -
995
- * @return {@link Promise} of {@link dh.Table}
996
- */
997
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
998
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
999
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1000
- hasListeners(name:string):boolean;
1001
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1002
- }
1003
-
1004
- export class QueryInfo {
1005
- static readonly EVENT_TABLE_OPENED:string;
1006
- static readonly EVENT_DISCONNECT:string;
1007
- static readonly EVENT_RECONNECT:string;
1008
- static readonly EVENT_CONNECT:string;
1009
-
1010
- protected constructor();
1011
- }
1012
-
1013
1120
  /**
1014
1121
  * A Widget represents a server side object that sends one or more responses to the client. The client can then
1015
1122
  * interpret these responses to see what to render, or how to respond.
@@ -1058,329 +1165,58 @@ export namespace dh {
1058
1165
  * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1059
1166
  * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1060
1167
  * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1061
- * be used, which columns should be mapped to each axis.</li>
1062
- * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1063
- * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1064
- * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1065
- * without the server somehow signaling that it will never reference that export again.</li>
1066
- * </ul>
1067
- */
1068
- export class Widget implements WidgetMessageDetails, HasEventHandling {
1069
- static readonly EVENT_MESSAGE:string;
1070
- static readonly EVENT_CLOSE:string;
1071
-
1072
- protected constructor();
1073
-
1074
- /**
1075
- * Ends the client connection to the server.
1076
- */
1077
- close():void;
1078
- getDataAsBase64():string;
1079
- getDataAsU8():Uint8Array;
1080
- getDataAsString():string;
1081
- /**
1082
- * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1083
- * @param msg - string/buffer/view instance that represents data to send
1084
- * @param references - an array of objects that can be safely sent to the server
1085
- */
1086
- sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1087
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1088
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1089
- hasListeners(name:string):boolean;
1090
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1091
- /**
1092
- *
1093
- * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1094
- * them when finished using them.
1095
- */
1096
- get exportedObjects():WidgetExportedObject[];
1097
- /**
1098
- *
1099
- * @return the type of this widget
1100
- */
1101
- get type():string;
1102
- }
1103
-
1104
- /**
1105
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1106
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
1107
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
1108
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
1109
- * of <b>TotalsTableConfig</b> will be supplied.
1110
- *
1111
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
1112
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
1113
- * expected formats.
1114
- */
1115
- export class TotalsTableConfig {
1116
- /**
1117
- * @deprecated
1118
- */
1119
- static readonly COUNT:string;
1120
- /**
1121
- * @deprecated
1122
- */
1123
- static readonly MIN:string;
1124
- /**
1125
- * @deprecated
1126
- */
1127
- static readonly MAX:string;
1128
- /**
1129
- * @deprecated
1130
- */
1131
- static readonly SUM:string;
1132
- /**
1133
- * @deprecated
1134
- */
1135
- static readonly ABS_SUM:string;
1136
- /**
1137
- * @deprecated
1138
- */
1139
- static readonly VAR:string;
1140
- /**
1141
- * @deprecated
1142
- */
1143
- static readonly AVG:string;
1144
- /**
1145
- * @deprecated
1146
- */
1147
- static readonly STD:string;
1148
- /**
1149
- * @deprecated
1150
- */
1151
- static readonly FIRST:string;
1152
- /**
1153
- * @deprecated
1154
- */
1155
- static readonly LAST:string;
1156
- /**
1157
- * @deprecated
1158
- */
1159
- static readonly SKIP:string;
1160
- /**
1161
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
1162
- */
1163
- showTotalsByDefault:boolean;
1164
- /**
1165
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
1166
- */
1167
- showGrandTotalsByDefault:boolean;
1168
- /**
1169
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
1170
- */
1171
- defaultOperation:AggregationOperationType;
1172
- /**
1173
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
1174
- * Table. If a column is omitted, the defaultOperation is used.
1175
- */
1176
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
1177
- /**
1178
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
1179
- * these columns. See also `Table.selectDistinct`.
1180
- */
1181
- groupBy:Array<string>;
1182
-
1183
- constructor();
1184
-
1185
- toString():string;
1186
- }
1187
-
1188
- /**
1189
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1190
- *
1191
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1192
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1193
- * value can be provided describing the strategy the engine should use when grouping the rows.
1194
- */
1195
- export class TreeTableConfig {
1196
- /**
1197
- * The column representing the unique ID for each item
1198
- */
1199
- idColumn:string;
1200
- /**
1201
- * The column representing the parent ID for each item
1202
- */
1203
- parentColumn:string;
1204
- /**
1205
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1206
- */
1207
- promoteOrphansToRoot:boolean;
1208
-
1209
- constructor();
1210
- }
1211
-
1212
- /**
1213
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1214
- * roll-up table.
1215
- */
1216
- export class RollupConfig {
1217
- /**
1218
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1219
- */
1220
- groupingColumns:Array<String>;
1221
- /**
1222
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1223
- * roll-up table.
1224
- */
1225
- aggregations:{ [key: string]: Array<AggregationOperationType>; };
1226
- /**
1227
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1228
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1229
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1230
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
1231
- */
1232
- includeConstituents:boolean;
1233
- includeOriginalColumns?:boolean|null;
1234
- /**
1235
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1236
- */
1237
- includeDescriptions:boolean;
1238
-
1239
- constructor();
1240
- }
1241
-
1242
- /**
1243
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1244
- */
1245
- export class BigDecimalWrapper {
1246
- protected constructor();
1247
-
1248
- static ofString(value:string):BigDecimalWrapper;
1249
- asNumber():number;
1250
- valueOf():string;
1251
- toString():string;
1252
- }
1253
-
1254
- /**
1255
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
1256
- * the server to get each Table. All tables will have the same structure.
1257
- */
1258
- export class PartitionedTable implements HasEventHandling {
1259
- /**
1260
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1261
- */
1262
- static readonly EVENT_KEYADDED:string;
1263
- /**
1264
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1265
- */
1266
- static readonly EVENT_DISCONNECT:string;
1267
- /**
1268
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1269
- */
1270
- static readonly EVENT_RECONNECT:string;
1271
- /**
1272
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1273
- */
1274
- static readonly EVENT_RECONNECTFAILED:string;
1275
-
1276
- protected constructor();
1277
-
1278
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1279
- /**
1280
- * Fetch the table with the given key. If the key does not exist, returns `null`.
1281
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
1282
- * @return Promise of dh.Table, or `null` if the key does not exist.
1283
- */
1284
- getTable(key:object):Promise<Table|undefined|null>;
1285
- /**
1286
- * Open a new table that is the result of merging all constituent tables. See
1287
- * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
1288
- * @return A merged representation of the constituent tables.
1289
- */
1290
- getMergedTable():Promise<Table>;
1291
- /**
1292
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
1293
- * for <b>keyadded</b> will ensure no keys are missed.
1294
- * @return Set of Object
1295
- */
1296
- getKeys():Set<object>;
1297
- /**
1298
- * Fetch a table containing all the valid keys of the partitioned table.
1299
- * @return Promise of a Table
1300
- */
1301
- getKeyTable():Promise<Table>;
1302
- /**
1303
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
1304
- * will not affect tables in use.
1305
- */
1306
- close():void;
1307
- /**
1308
- * The count of known keys.
1309
- * @return int
1310
- */
1311
- get size():number;
1312
- /**
1313
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
1314
- * non-key columns.
1315
- * @return Array of Column
1316
- */
1317
- get columns():Column[];
1168
+ * be used, which columns should be mapped to each axis.</li>
1169
+ * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1170
+ * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1171
+ * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1172
+ * without the server somehow signaling that it will never reference that export again.</li>
1173
+ * </ul>
1174
+ */
1175
+ export class Widget implements WidgetMessageDetails, HasEventHandling {
1176
+ static readonly EVENT_MESSAGE:string;
1177
+ static readonly EVENT_CLOSE:string;
1178
+
1179
+ protected constructor();
1180
+
1318
1181
  /**
1319
- * An array of all the key columns that the tables are partitioned by.
1320
- * @return Array of Column
1182
+ * Ends the client connection to the server.
1321
1183
  */
1322
- get keyColumns():Column[];
1184
+ close():void;
1185
+ getDataAsBase64():string;
1186
+ getDataAsU8():Uint8Array;
1187
+ getDataAsString():string;
1323
1188
  /**
1324
- * Listen for events on this object.
1325
- * @param name - the name of the event to listen for
1326
- * @param callback - a function to call when the event occurs
1327
- * @return Returns a cleanup function.
1328
- * @typeParam T - the type of the data that the event will provide
1189
+ * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1190
+ * @param msg - string/buffer/view instance that represents data to send
1191
+ * @param references - an array of objects that can be safely sent to the server
1329
1192
  */
1193
+ sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1330
1194
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1331
1195
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1332
1196
  hasListeners(name:string):boolean;
1333
- /**
1334
- * Removes an event listener added to this table.
1335
- * @param name -
1336
- * @param callback -
1337
- * @return
1338
- * @typeParam T -
1339
- */
1340
1197
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1341
- }
1342
-
1343
- /**
1344
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1345
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1346
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1347
- */
1348
- export class RangeSet {
1349
- protected constructor();
1350
-
1351
- static ofRange(first:number, last:number):RangeSet;
1352
- static ofItems(rows:number[]):RangeSet;
1353
- static ofRanges(ranges:RangeSet[]):RangeSet;
1354
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1355
1198
  /**
1356
- * a new iterator over all indexes in this collection.
1357
- * @return Iterator of {@link dh.LongWrapper}
1199
+ *
1200
+ * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1201
+ * them when finished using them.
1358
1202
  */
1359
- iterator():Iterator<LongWrapper>;
1203
+ get exportedObjects():WidgetExportedObject[];
1360
1204
  /**
1361
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1362
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1363
- * property each time through a loop).
1364
- * @return double
1205
+ *
1206
+ * @return the type of this widget
1365
1207
  */
1366
- get size():number;
1208
+ get type():string;
1367
1209
  }
1368
1210
 
1369
- export class DateWrapper extends LongWrapper {
1370
- protected constructor();
1371
-
1372
- static ofJsDate(date:Date):DateWrapper;
1373
- asDate():Date;
1374
- }
1375
1211
 
1376
1212
  /**
1377
- * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1378
- * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1213
+ * Event fired when a command is issued from the client.
1379
1214
  */
1380
- export class ConnectOptions {
1381
- headers:{ [key: string]: string; };
1215
+ export class CommandInfo {
1216
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
1382
1217
 
1383
- constructor();
1218
+ get result():Promise<dh.ide.CommandResult>;
1219
+ get code():string;
1384
1220
  }
1385
1221
 
1386
1222
  /**
@@ -1508,151 +1344,312 @@ export namespace dh {
1508
1344
  * @param key -
1509
1345
  * @return {@link dh.Column}
1510
1346
  */
1511
- findColumn(key:string):Column;
1347
+ findColumn(key:string):Column;
1348
+ /**
1349
+ * an array with all of the named columns in order, or throws an exception if one cannot be found.
1350
+ * @param keys -
1351
+ * @return {@link dh.Column} array
1352
+ */
1353
+ findColumns(keys:string[]):Column[];
1354
+ /**
1355
+ * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
1356
+ * values for the given columns in the source table:
1357
+ * <ul>
1358
+ * <li>Rollups may make no sense, since values are aggregated.</li>
1359
+ * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
1360
+ * the tree.</li>
1361
+ * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
1362
+ * in the resulting table.</li>
1363
+ * </ul>
1364
+ */
1365
+ selectDistinct(columns:Column[]):Promise<Table>;
1366
+ getTotalsTableConfig():Promise<TotalsTableConfig>;
1367
+ getTotalsTable(config?:object):Promise<TotalsTable>;
1368
+ getGrandTotalsTable(config?:object):Promise<TotalsTable>;
1369
+ /**
1370
+ * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
1371
+ * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
1372
+ * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
1373
+ * state is also not copied.
1374
+ * @return Promise of dh.TreeTable
1375
+ */
1376
+ copy():Promise<TreeTable>;
1377
+ /**
1378
+ * The current filter configuration of this Tree Table.
1379
+ * @return {@link dh.FilterCondition} array
1380
+ */
1381
+ get filter():Array<FilterCondition>;
1382
+ /**
1383
+ * True if this is a roll-up and will provide the original rows that make up each grouping.
1384
+ * @return boolean
1385
+ */
1386
+ get includeConstituents():boolean;
1387
+ get groupedColumns():Array<Column>;
1388
+ /**
1389
+ * True if this table has been closed.
1390
+ * @return boolean
1391
+ */
1392
+ get isClosed():boolean;
1393
+ /**
1394
+ * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1395
+ * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1396
+ * when considering collapse/expand states).
1397
+ * @return double
1398
+ */
1399
+ get size():number;
1400
+ /**
1401
+ * The columns that can be shown in this Tree Table.
1402
+ * @return {@link dh.Column} array
1403
+ */
1404
+ get columns():Array<Column>;
1405
+ /**
1406
+ * The current sort configuration of this Tree Table
1407
+ * @return {@link dh.Sort} array.
1408
+ */
1409
+ get sort():Array<Sort>;
1410
+ /**
1411
+ * True if this table may receive updates from the server, including size changed events, updated events after
1412
+ * initial snapshot.
1413
+ * @return boolean
1414
+ */
1415
+ get isRefreshing():boolean;
1416
+ /**
1417
+ * Listen for events on this object.
1418
+ * @param name - the name of the event to listen for
1419
+ * @param callback - a function to call when the event occurs
1420
+ * @return Returns a cleanup function.
1421
+ * @typeParam T - the type of the data that the event will provide
1422
+ */
1423
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1424
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1425
+ hasListeners(name:string):boolean;
1426
+ /**
1427
+ * Removes an event listener added to this table.
1428
+ * @param name -
1429
+ * @param callback -
1430
+ * @return
1431
+ * @typeParam T -
1432
+ */
1433
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1434
+ }
1435
+
1436
+ export class QueryInfo {
1437
+ static readonly EVENT_TABLE_OPENED:string;
1438
+ static readonly EVENT_DISCONNECT:string;
1439
+ static readonly EVENT_RECONNECT:string;
1440
+ static readonly EVENT_CONNECT:string;
1441
+
1442
+ protected constructor();
1443
+ }
1444
+
1445
+ /**
1446
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1447
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1448
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1449
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
1450
+ * instance.
1451
+ */
1452
+ export class FilterValue {
1453
+ protected constructor();
1454
+
1455
+ /**
1456
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1457
+ * {@link TableData.get} for DateTime values. To create
1458
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1459
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1460
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
1461
+ * @param input - the number to wrap as a FilterValue
1462
+ * @return an immutable FilterValue that can be built into a filter
1463
+ */
1464
+ static ofNumber(input:LongWrapper|number):FilterValue;
1465
+ /**
1466
+ * a filter condition checking if the current value is equal to the given parameter
1467
+ * @param term -
1468
+ * @return {@link dh.FilterCondition}
1469
+ */
1470
+ eq(term:FilterValue):FilterCondition;
1471
+ /**
1472
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1473
+ * vs lower case
1474
+ * @param term -
1475
+ * @return {@link dh.FilterCondition}
1476
+ */
1477
+ eqIgnoreCase(term:FilterValue):FilterCondition;
1478
+ /**
1479
+ * a filter condition checking if the current value is not equal to the given parameter
1480
+ * @param term -
1481
+ * @return {@link dh.FilterCondition}
1482
+ */
1483
+ notEq(term:FilterValue):FilterCondition;
1484
+ /**
1485
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1486
+ * upper vs lower case
1487
+ * @param term -
1488
+ * @return {@link dh.FilterCondition}
1489
+ */
1490
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
1491
+ /**
1492
+ * a filter condition checking if the current value is greater than the given parameter
1493
+ * @param term -
1494
+ * @return {@link dh.FilterCondition}
1495
+ */
1496
+ greaterThan(term:FilterValue):FilterCondition;
1497
+ /**
1498
+ * a filter condition checking if the current value is less than the given parameter
1499
+ * @param term -
1500
+ * @return {@link dh.FilterCondition}
1501
+ */
1502
+ lessThan(term:FilterValue):FilterCondition;
1503
+ /**
1504
+ * a filter condition checking if the current value is greater than or equal to the given parameter
1505
+ * @param term -
1506
+ * @return {@link dh.FilterCondition}
1507
+ */
1508
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1509
+ /**
1510
+ * a filter condition checking if the current value is less than or equal to the given parameter
1511
+ * @param term -
1512
+ * @return {@link dh.FilterCondition}
1513
+ */
1514
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
1515
+ /**
1516
+ * a filter condition checking if the current value is in the given set of values
1517
+ * @param terms -
1518
+ * @return {@link dh.FilterCondition}
1519
+ */
1520
+ in(terms:FilterValue[]):FilterCondition;
1521
+ /**
1522
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1523
+ * lower case
1524
+ * @param terms -
1525
+ * @return {@link dh.FilterCondition}
1526
+ */
1527
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
1512
1528
  /**
1513
- * an array with all of the named columns in order, or throws an exception if one cannot be found.
1514
- * @param keys -
1515
- * @return {@link dh.Column} array
1529
+ * a filter condition checking that the current value is not in the given set of values
1530
+ * @param terms -
1531
+ * @return {@link dh.FilterCondition}
1516
1532
  */
1517
- findColumns(keys:string[]):Column[];
1533
+ notIn(terms:FilterValue[]):FilterCondition;
1518
1534
  /**
1519
- * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
1520
- * values for the given columns in the source table:
1521
- * <ul>
1522
- * <li>Rollups may make no sense, since values are aggregated.</li>
1523
- * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
1524
- * the tree.</li>
1525
- * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
1526
- * in the resulting table.</li>
1527
- * </ul>
1535
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1536
+ * upper vs lower case
1537
+ * @param terms -
1538
+ * @return {@link dh.FilterCondition}
1528
1539
  */
1529
- selectDistinct(columns:Column[]):Promise<Table>;
1530
- getTotalsTableConfig():Promise<TotalsTableConfig>;
1531
- getTotalsTable(config?:object):Promise<TotalsTable>;
1532
- getGrandTotalsTable(config?:object):Promise<TotalsTable>;
1540
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1533
1541
  /**
1534
- * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
1535
- * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
1536
- * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
1537
- * state is also not copied.
1538
- * @return Promise of dh.TreeTable
1542
+ * a filter condition checking if the given value contains the given string value
1543
+ * @param term -
1544
+ * @return {@link dh.FilterCondition}
1539
1545
  */
1540
- copy():Promise<TreeTable>;
1546
+ contains(term:FilterValue):FilterCondition;
1541
1547
  /**
1542
- * The current filter configuration of this Tree Table.
1543
- * @return {@link dh.FilterCondition} array
1548
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1549
+ * lower case
1550
+ * @param term -
1551
+ * @return {@link dh.FilterCondition}
1544
1552
  */
1545
- get filter():Array<FilterCondition>;
1553
+ containsIgnoreCase(term:FilterValue):FilterCondition;
1546
1554
  /**
1547
- * True if this is a roll-up and will provide the original rows that make up each grouping.
1548
- * @return boolean
1555
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1556
+ * use Java regex syntax
1557
+ * @param pattern -
1558
+ * @return {@link dh.FilterCondition}
1549
1559
  */
1550
- get includeConstituents():boolean;
1551
- get groupedColumns():Array<Column>;
1560
+ matches(pattern:FilterValue):FilterCondition;
1552
1561
  /**
1553
- * True if this table has been closed.
1554
- * @return boolean
1562
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1563
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
1564
+ * @param pattern -
1565
+ * @return {@link dh.FilterCondition}
1555
1566
  */
1556
- get isClosed():boolean;
1567
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1557
1568
  /**
1558
- * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1559
- * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1560
- * when considering collapse/expand states).
1561
- * @return double
1569
+ * a filter condition checking if the current value is a true boolean
1570
+ * @return {@link dh.FilterCondition}
1562
1571
  */
1563
- get size():number;
1572
+ isTrue():FilterCondition;
1564
1573
  /**
1565
- * The columns that can be shown in this Tree Table.
1566
- * @return {@link dh.Column} array
1574
+ * a filter condition checking if the current value is a false boolean
1575
+ * @return {@link dh.FilterCondition}
1567
1576
  */
1568
- get columns():Array<Column>;
1577
+ isFalse():FilterCondition;
1569
1578
  /**
1570
- * The current sort configuration of this Tree Table
1571
- * @return {@link dh.Sort} array.
1579
+ * a filter condition checking if the current value is a null value
1580
+ * @return {@link dh.FilterCondition}
1572
1581
  */
1573
- get sort():Array<Sort>;
1582
+ isNull():FilterCondition;
1574
1583
  /**
1575
- * True if this table may receive updates from the server, including size changed events, updated events after
1576
- * initial snapshot.
1577
- * @return boolean
1584
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1585
+ * functions that can be invoked on a String:
1586
+ * <ul>
1587
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1588
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1589
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1590
+ * regular expression</li>
1591
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1592
+ * <p>
1593
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1594
+ * </p>
1595
+ * </li>
1596
+ * </ul>
1597
+ * @param method -
1598
+ * @param args -
1599
+ * @return
1578
1600
  */
1579
- get isRefreshing():boolean;
1601
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
1602
+ toString():string;
1580
1603
  /**
1581
- * Listen for events on this object.
1582
- * @param name - the name of the event to listen for
1583
- * @param callback - a function to call when the event occurs
1584
- * @return Returns a cleanup function.
1585
- * @typeParam T - the type of the data that the event will provide
1604
+ * Constructs a string for the filter API from the given parameter.
1605
+ * @param input -
1606
+ * @return
1586
1607
  */
1587
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1588
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1589
- hasListeners(name:string):boolean;
1608
+ static ofString(input:any):FilterValue;
1590
1609
  /**
1591
- * Removes an event listener added to this table.
1592
- * @param name -
1593
- * @param callback -
1610
+ * Constructs a boolean for the filter API from the given parameter.
1611
+ * @param b -
1594
1612
  * @return
1595
- * @typeParam T -
1596
1613
  */
1597
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1614
+ static ofBoolean(b:boolean):FilterValue;
1598
1615
  }
1599
1616
 
1600
1617
  /**
1601
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1602
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1603
- *
1604
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1605
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1606
- * forward data to it.
1607
- *
1608
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1609
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1610
- * viewports to make it less expensive to compute for large tables.
1618
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1619
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1620
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1611
1621
  */
1612
- export class TableSubscription implements HasEventHandling {
1613
- /**
1614
- * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1615
- * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1616
- * allowing access to the entire range of items currently in the subscribed columns.
1617
- */
1618
- static readonly EVENT_UPDATED:string;
1619
-
1622
+ export class RangeSet {
1620
1623
  protected constructor();
1621
1624
 
1625
+ static ofRange(first:number, last:number):RangeSet;
1626
+ static ofItems(rows:number[]):RangeSet;
1627
+ static ofRanges(ranges:RangeSet[]):RangeSet;
1628
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1622
1629
  /**
1623
- * Stops the subscription on the server.
1624
- */
1625
- close():void;
1626
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1627
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1628
- hasListeners(name:string):boolean;
1629
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1630
- /**
1631
- * The columns that were subscribed to when this subscription was created
1632
- * @return {@link dh.Column}
1633
- */
1634
- get columns():Array<Column>;
1635
- }
1636
-
1637
- export class Ide {
1638
- constructor();
1639
-
1640
- /**
1641
- * @deprecated
1630
+ * a new iterator over all indexes in this collection.
1631
+ * @return Iterator of {@link dh.LongWrapper}
1642
1632
  */
1643
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1633
+ iterator():Iterator<LongWrapper>;
1644
1634
  /**
1645
- * @deprecated
1635
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1636
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1637
+ * property each time through a loop).
1638
+ * @return double
1646
1639
  */
1647
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1640
+ get size():number;
1648
1641
  }
1649
1642
 
1650
- export class LoginCredentials {
1651
- type?:string|null;
1652
- username?:string|null;
1653
- token?:string|null;
1643
+ /**
1644
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
1645
+ */
1646
+ export class BigIntegerWrapper {
1647
+ protected constructor();
1654
1648
 
1655
- constructor();
1649
+ static ofString(str:string):BigIntegerWrapper;
1650
+ asNumber():number;
1651
+ valueOf():string;
1652
+ toString():string;
1656
1653
  }
1657
1654
 
1658
1655
  export class CoreClient implements HasEventHandling {
@@ -1685,151 +1682,117 @@ export namespace dh {
1685
1682
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1686
1683
  }
1687
1684
 
1685
+ export class CustomColumn {
1686
+ static readonly TYPE_FORMAT_COLOR:string;
1687
+ static readonly TYPE_FORMAT_NUMBER:string;
1688
+ static readonly TYPE_FORMAT_DATE:string;
1689
+ static readonly TYPE_NEW:string;
1690
+
1691
+ protected constructor();
1692
+
1693
+ valueOf():string;
1694
+ toString():string;
1695
+ /**
1696
+ * The expression to evaluate this custom column.
1697
+ * @return String
1698
+ */
1699
+ get expression():string;
1700
+ /**
1701
+ * The name of the column to use.
1702
+ * @return String
1703
+ */
1704
+ get name():string;
1705
+ /**
1706
+ * Type of custom column. One of
1707
+ *
1708
+ * <ul>
1709
+ * <li>FORMAT_COLOR</li>
1710
+ * <li>FORMAT_NUMBER</li>
1711
+ * <li>FORMAT_DATE</li>
1712
+ * <li>NEW</li>
1713
+ * </ul>
1714
+ * @return String
1715
+ */
1716
+ get type():string;
1717
+ }
1718
+
1688
1719
  /**
1689
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1690
- * some options, JS applications can run code on the server, and interact with available exportable objects.
1720
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1721
+ */
1722
+ export class BigDecimalWrapper {
1723
+ protected constructor();
1724
+
1725
+ static ofString(value:string):BigDecimalWrapper;
1726
+ asNumber():number;
1727
+ valueOf():string;
1728
+ toString():string;
1729
+ }
1730
+
1731
+ /**
1732
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1733
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1734
+ *
1735
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1736
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1737
+ * forward data to it.
1738
+ *
1739
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1740
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1741
+ * viewports to make it less expensive to compute for large tables.
1691
1742
  */
1692
- export class IdeConnection implements HasEventHandling {
1743
+ export class TableSubscription implements HasEventHandling {
1693
1744
  /**
1694
- * @deprecated
1745
+ * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1746
+ * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1747
+ * allowing access to the entire range of items currently in the subscribed columns.
1695
1748
  */
1696
- static readonly HACK_CONNECTION_FAILURE:string;
1697
- static readonly EVENT_DISCONNECT:string;
1698
- static readonly EVENT_RECONNECT:string;
1699
- static readonly EVENT_SHUTDOWN:string;
1749
+ static readonly EVENT_UPDATED:string;
1700
1750
 
1701
- /**
1702
- * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
1703
- * @param serverUrl - The url used when connecting to the server. Read-only.
1704
- * @param connectOptions - Optional Object
1705
- * @param fromJava - Optional boolean
1706
- * @deprecated
1707
- */
1708
- constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
1751
+ protected constructor();
1709
1752
 
1710
1753
  /**
1711
- * closes the current connection, releasing any resources on the server or client.
1754
+ * Stops the subscription on the server.
1712
1755
  */
1713
1756
  close():void;
1714
- running():Promise<IdeConnection>;
1715
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1716
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1717
- /**
1718
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1719
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1720
- * log messages as are presently available.
1721
- * @param callback -
1722
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1723
- */
1724
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1725
- startSession(type:string):Promise<IdeSession>;
1726
- getConsoleTypes():Promise<Array<string>>;
1727
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1728
- /**
1729
- * Listen for events on this object.
1730
- * @param name - the name of the event to listen for
1731
- * @param callback - a function to call when the event occurs
1732
- * @return Returns a cleanup function.
1733
- * @typeParam T - the type of the data that the event will provide
1734
- */
1735
1757
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1736
1758
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1737
1759
  hasListeners(name:string):boolean;
1760
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1738
1761
  /**
1739
- * Removes an event listener added to this table.
1740
- * @param name -
1741
- * @param callback -
1742
- * @return
1743
- * @typeParam T -
1762
+ * The columns that were subscribed to when this subscription was created
1763
+ * @return {@link dh.Column}
1744
1764
  */
1745
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1765
+ get columns():Array<Column>;
1746
1766
  }
1747
1767
 
1748
1768
  /**
1749
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1750
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1751
- * instance.
1769
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1770
+ * roll-up table.
1752
1771
  */
1753
- export class FilterCondition {
1754
- protected constructor();
1755
-
1756
- /**
1757
- * the opposite of this condition
1758
- * @return FilterCondition
1759
- */
1760
- not():FilterCondition;
1761
- /**
1762
- * a condition representing the current condition logically ANDed with the other parameters
1763
- * @param filters -
1764
- * @return FilterCondition
1765
- */
1766
- and(...filters:FilterCondition[]):FilterCondition;
1772
+ export class RollupConfig {
1767
1773
  /**
1768
- * a condition representing the current condition logically ORed with the other parameters
1769
- * @param filters -
1770
- * @return FilterCondition.
1774
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1771
1775
  */
1772
- or(...filters:FilterCondition[]):FilterCondition;
1776
+ groupingColumns:Array<String>;
1773
1777
  /**
1774
- * a string suitable for debugging showing the details of this condition.
1775
- * @return String.
1778
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1779
+ * roll-up table.
1776
1780
  */
1777
- toString():string;
1778
- get columns():Array<Column>;
1781
+ aggregations:{ [key: string]: Array<AggregationOperationType>; };
1779
1782
  /**
1780
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1781
- * functions:
1782
- * <ul>
1783
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1784
- * than the third</li>
1785
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1786
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1787
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1788
- * "not a number"</i></li>
1789
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1790
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1791
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1792
- * expression</li>
1793
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1794
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1795
- * <p>
1796
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1797
- * method should be used in other cases
1798
- * </p>
1799
- * </li>
1800
- * </ul>
1801
- * @param function -
1802
- * @param args -
1803
- * @return dh.FilterCondition
1783
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1784
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1785
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1786
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1804
1787
  */
1805
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1788
+ includeConstituents:boolean;
1789
+ includeOriginalColumns?:boolean|null;
1806
1790
  /**
1807
- * a filter condition which will check if the given value can be found in any supported column on whatever table
1808
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1809
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1810
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1811
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1812
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1813
- * {@link dh.Column.filter}).
1814
- * @param value -
1815
- * @param columns -
1816
- * @return dh.FilterCondition
1791
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1817
1792
  */
1818
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1819
- }
1820
-
1821
- /**
1822
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1823
- * this type TableMap.
1824
- * @deprecated
1825
- */
1826
- export class TableMap {
1827
- static readonly EVENT_KEYADDED:string;
1828
- static readonly EVENT_DISCONNECT:string;
1829
- static readonly EVENT_RECONNECT:string;
1830
- static readonly EVENT_RECONNECTFAILED:string;
1793
+ includeDescriptions:boolean;
1831
1794
 
1832
- protected constructor();
1795
+ constructor();
1833
1796
  }
1834
1797
 
1835
1798
  /**
@@ -2084,34 +2047,139 @@ export namespace dh {
2084
2047
  * for the <b>filterchanged</b> event to know when to update the UI.
2085
2048
  * @return {@link dh.FilterCondition} array
2086
2049
  */
2087
- get filter():Array<FilterCondition>;
2050
+ get filter():Array<FilterCondition>;
2051
+ /**
2052
+ * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
2053
+ * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
2054
+ * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
2055
+ * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
2056
+ * @return double
2057
+ */
2058
+ get totalSize():number;
2059
+ /**
2060
+ * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
2061
+ * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
2062
+ * property). for details).
2063
+ * @return double
2064
+ */
2065
+ get size():number;
2066
+ /**
2067
+ * True if this table has been closed.
2068
+ * @return boolean
2069
+ */
2070
+ get isClosed():boolean;
2071
+ /**
2072
+ * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
2073
+ * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
2074
+ * will be unavailable until table is coalesced.
2075
+ * @return boolean
2076
+ */
2077
+ get isUncoalesced():boolean;
2078
+ /**
2079
+ * Listen for events on this object.
2080
+ * @param name - the name of the event to listen for
2081
+ * @param callback - a function to call when the event occurs
2082
+ * @return Returns a cleanup function.
2083
+ * @typeParam T - the type of the data that the event will provide
2084
+ */
2085
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2086
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2087
+ hasListeners(name:string):boolean;
2088
+ /**
2089
+ * Removes an event listener added to this table.
2090
+ * @param name -
2091
+ * @param callback -
2092
+ * @return
2093
+ * @typeParam T -
2094
+ */
2095
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2096
+ /**
2097
+ * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
2098
+ * do not support reverse.
2099
+ * @return {@link dh.Sort}
2100
+ */
2101
+ static reverse():Sort;
2102
+ }
2103
+
2104
+ /**
2105
+ * Presently optional and not used by the server, this allows the client to specify some authentication details. String
2106
+ * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
2107
+ */
2108
+ export class ConnectOptions {
2109
+ headers:{ [key: string]: string; };
2110
+
2111
+ constructor();
2112
+ }
2113
+
2114
+ /**
2115
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
2116
+ * the server to get each Table. All tables will have the same structure.
2117
+ */
2118
+ export class PartitionedTable implements HasEventHandling {
2119
+ /**
2120
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2121
+ */
2122
+ static readonly EVENT_KEYADDED:string;
2123
+ /**
2124
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2125
+ */
2126
+ static readonly EVENT_DISCONNECT:string;
2127
+ /**
2128
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2129
+ */
2130
+ static readonly EVENT_RECONNECT:string;
2131
+ /**
2132
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2133
+ */
2134
+ static readonly EVENT_RECONNECTFAILED:string;
2135
+
2136
+ protected constructor();
2137
+
2138
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
2139
+ /**
2140
+ * Fetch the table with the given key. If the key does not exist, returns `null`.
2141
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
2142
+ * @return Promise of dh.Table, or `null` if the key does not exist.
2143
+ */
2144
+ getTable(key:object):Promise<Table|undefined|null>;
2145
+ /**
2146
+ * Open a new table that is the result of merging all constituent tables. See
2147
+ * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
2148
+ * @return A merged representation of the constituent tables.
2149
+ */
2150
+ getMergedTable():Promise<Table>;
2151
+ /**
2152
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
2153
+ * for <b>keyadded</b> will ensure no keys are missed.
2154
+ * @return Set of Object
2155
+ */
2156
+ getKeys():Set<object>;
2157
+ /**
2158
+ * Fetch a table containing all the valid keys of the partitioned table.
2159
+ * @return Promise of a Table
2160
+ */
2161
+ getKeyTable():Promise<Table>;
2088
2162
  /**
2089
- * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
2090
- * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
2091
- * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
2092
- * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
2093
- * @return double
2163
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
2164
+ * will not affect tables in use.
2094
2165
  */
2095
- get totalSize():number;
2166
+ close():void;
2096
2167
  /**
2097
- * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
2098
- * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
2099
- * property). for details).
2100
- * @return double
2168
+ * The count of known keys.
2169
+ * @return int
2101
2170
  */
2102
2171
  get size():number;
2103
2172
  /**
2104
- * True if this table has been closed.
2105
- * @return boolean
2173
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
2174
+ * non-key columns.
2175
+ * @return Array of Column
2106
2176
  */
2107
- get isClosed():boolean;
2177
+ get columns():Column[];
2108
2178
  /**
2109
- * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
2110
- * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
2111
- * will be unavailable until table is coalesced.
2112
- * @return boolean
2179
+ * An array of all the key columns that the tables are partitioned by.
2180
+ * @return Array of Column
2113
2181
  */
2114
- get isUncoalesced():boolean;
2182
+ get keyColumns():Column[];
2115
2183
  /**
2116
2184
  * Listen for events on this object.
2117
2185
  * @param name - the name of the event to listen for
@@ -2130,224 +2198,156 @@ export namespace dh {
2130
2198
  * @typeParam T -
2131
2199
  */
2132
2200
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2133
- /**
2134
- * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
2135
- * do not support reverse.
2136
- * @return {@link dh.Sort}
2137
- */
2138
- static reverse():Sort;
2139
2201
  }
2140
2202
 
2141
2203
  /**
2142
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
2143
- * column.
2204
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
2205
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
2206
+ * methods return a new Sort instance.
2144
2207
  */
2145
- export class Column {
2146
- /**
2147
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
2148
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
2149
- * @return String
2150
- */
2151
- readonly constituentType?:string|null;
2152
- readonly description?:string|null;
2208
+ export class Sort {
2209
+ static readonly ASCENDING:string;
2210
+ static readonly DESCENDING:string;
2211
+ static readonly REVERSE:string;
2153
2212
 
2154
2213
  protected constructor();
2155
2214
 
2156
2215
  /**
2157
- * the value for this column in the given row. Type will be consistent with the type of the Column.
2158
- * @param row -
2159
- * @return Any
2160
- */
2161
- get(row:Row):any;
2162
- getFormat(row:Row):Format;
2163
- /**
2164
- * Creates a sort builder object, to be used when sorting by this column.
2216
+ * Builds a Sort instance to sort values in ascending order.
2165
2217
  * @return {@link dh.Sort}
2166
2218
  */
2167
- sort():Sort;
2168
- /**
2169
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
2170
- * operation, or as a builder to create a filter operation.
2171
- * @return {@link dh.FilterValue}
2172
- */
2173
- filter():FilterValue;
2174
- /**
2175
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
2176
- * @param expression -
2177
- * @return {@link dh.CustomColumn}
2178
- */
2179
- formatColor(expression:string):CustomColumn;
2219
+ asc():Sort;
2180
2220
  /**
2181
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2182
- * @param expression -
2183
- * @return {@link dh.CustomColumn}
2221
+ * Builds a Sort instance to sort values in descending order.
2222
+ * @return {@link dh.Sort}
2184
2223
  */
2185
- formatNumber(expression:string):CustomColumn;
2224
+ desc():Sort;
2186
2225
  /**
2187
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2188
- * @param expression -
2189
- * @return {@link dh.CustomColumn}
2226
+ * Builds a Sort instance which takes the absolute value before applying order.
2227
+ * @return {@link dh.Sort}
2190
2228
  */
2191
- formatDate(expression:string):CustomColumn;
2229
+ abs():Sort;
2192
2230
  toString():string;
2193
2231
  /**
2194
- * Label for this column.
2195
- * @return String
2196
- */
2197
- get name():string;
2198
- /**
2199
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
2200
- * <b>isUncoalesced</b> property on <b>Table</b>)
2232
+ * True if the absolute value of the column should be used when sorting; defaults to false.
2201
2233
  * @return boolean
2202
2234
  */
2203
- get isPartitionColumn():boolean;
2235
+ get isAbs():boolean;
2204
2236
  /**
2205
- *
2206
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
2207
- * @return int
2237
+ * The column which is sorted.
2238
+ * @return {@link dh.Column}
2208
2239
  */
2209
- get index():number;
2210
- get isSortable():boolean;
2240
+ get column():Column;
2211
2241
  /**
2212
- * Type of the row data that can be found in this column.
2242
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
2213
2243
  * @return String
2214
2244
  */
2215
- get type():string;
2216
- /**
2217
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
2218
- * table using <b>applyCustomColumns</b> with the parameters specified.
2219
- * @param expression -
2220
- * @return {@link dh.CustomColumn}
2221
- */
2222
- static formatRowColor(expression:string):CustomColumn;
2223
- /**
2224
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2225
- * @param name -
2226
- * @param expression -
2227
- * @return {@link dh.CustomColumn}
2228
- */
2229
- static createCustomColumn(name:string, expression:string):CustomColumn;
2245
+ get direction():string;
2230
2246
  }
2231
2247
 
2232
- export class CustomColumn {
2233
- static readonly TYPE_FORMAT_COLOR:string;
2234
- static readonly TYPE_FORMAT_NUMBER:string;
2235
- static readonly TYPE_FORMAT_DATE:string;
2236
- static readonly TYPE_NEW:string;
2237
-
2238
- protected constructor();
2239
-
2240
- valueOf():string;
2241
- toString():string;
2242
- /**
2243
- * The expression to evaluate this custom column.
2244
- * @return String
2245
- */
2246
- get expression():string;
2247
- /**
2248
- * The name of the column to use.
2249
- * @return String
2250
- */
2251
- get name():string;
2252
- /**
2253
- * Type of custom column. One of
2254
- *
2255
- * <ul>
2256
- * <li>FORMAT_COLOR</li>
2257
- * <li>FORMAT_NUMBER</li>
2258
- * <li>FORMAT_DATE</li>
2259
- * <li>NEW</li>
2260
- * </ul>
2261
- * @return String
2262
- */
2263
- get type():string;
2264
- }
2248
+ export class IdeSession implements HasEventHandling {
2249
+ static readonly EVENT_COMMANDSTARTED:string;
2250
+ static readonly EVENT_REQUEST_FAILED:string;
2265
2251
 
2266
- /**
2267
- * A js type for operating on input tables.
2268
- *
2269
- * Represents a User Input Table, which can have data added to it from other sources.
2270
- *
2271
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
2272
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
2273
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
2274
- * before sending the next operation.
2275
- *
2276
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
2277
- *
2278
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
2279
- * object.
2280
- */
2281
- export class InputTable {
2282
2252
  protected constructor();
2283
2253
 
2284
2254
  /**
2285
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
2286
- * property at that name and validate it can be put into the given column type.
2287
- * @param row -
2288
- * @param userTimeZone -
2289
- * @return Promise of dh.InputTable
2255
+ * Load the named table, with columns and size information already fully populated.
2256
+ * @param name -
2257
+ * @param applyPreviewColumns - optional boolean
2258
+ * @return {@link Promise} of {@link dh.Table}
2290
2259
  */
2291
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
2260
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2292
2261
  /**
2293
- * Add multiple rows to a table.
2294
- * @param rows -
2295
- * @param userTimeZone -
2296
- * @return Promise of dh.InputTable
2262
+ * Load the named Figure, including its tables and tablemaps as needed.
2263
+ * @param name -
2264
+ * @return promise of dh.plot.Figure
2297
2265
  */
2298
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
2266
+ getFigure(name:string):Promise<dh.plot.Figure>;
2299
2267
  /**
2300
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
2301
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
2302
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
2303
- * resolved to the same InputTable instance this method was called upon once the server returns.
2304
- * @param tableToAdd -
2305
- * @return Promise of dh.InputTable
2268
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
2269
+ * size is presently not available until the viewport is first set.
2270
+ * @param name -
2271
+ * @return {@link Promise} of {@link dh.TreeTable}
2306
2272
  */
2307
- addTable(tableToAdd:Table):Promise<InputTable>;
2273
+ getTreeTable(name:string):Promise<TreeTable>;
2274
+ getHierarchicalTable(name:string):Promise<TreeTable>;
2275
+ getPartitionedTable(name:string):Promise<PartitionedTable>;
2276
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
2277
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2308
2278
  /**
2309
- * Add multiple tables to this Input Table.
2310
- * @param tablesToAdd -
2311
- * @return Promise of dh.InputTable
2279
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
2280
+ * @param tables -
2281
+ * @return {@link Promise} of {@link dh.Table}
2312
2282
  */
2313
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
2283
+ mergeTables(tables:Table[]):Promise<Table>;
2284
+ bindTableToVariable(table:Table, name:string):Promise<void>;
2285
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2286
+ close():void;
2287
+ runCode(code:string):Promise<dh.ide.CommandResult>;
2288
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2289
+ openDocument(params:object):void;
2290
+ changeDocument(params:object):void;
2291
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
2292
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
2293
+ getHover(params:object):Promise<dh.lsp.Hover>;
2294
+ closeDocument(params:object):void;
2314
2295
  /**
2315
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
2316
- * @param tableToDelete -
2317
- * @return Promise of dh.InputTable
2296
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
2297
+ * values will be null.
2298
+ * @param size -
2299
+ * @return {@link Promise} of {@link dh.Table}
2318
2300
  */
2319
- deleteTable(tableToDelete:Table):Promise<InputTable>;
2301
+ emptyTable(size:number):Promise<Table>;
2320
2302
  /**
2321
- * Delete multiple tables from this Input Table.
2322
- * @param tablesToDelete -
2323
- * @return
2303
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2304
+ * the table will be populated with the interval from the specified date until now.
2305
+ * @param periodNanos -
2306
+ * @param startTime -
2307
+ * @return {@link Promise} of {@link dh.Table}
2324
2308
  */
2325
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
2309
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2310
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2311
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2312
+ hasListeners(name:string):boolean;
2313
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2314
+ }
2315
+
2316
+ export class Ide {
2317
+ constructor();
2318
+
2326
2319
  /**
2327
- * A list of the key columns, by name
2328
- * @return String array.
2320
+ * @deprecated
2329
2321
  */
2330
- get keys():string[];
2322
+ getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
2331
2323
  /**
2332
- * A list of the value columns, by name
2333
- * @return String array.
2324
+ * @deprecated
2334
2325
  */
2335
- get values():string[];
2326
+ static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
2327
+ }
2328
+
2329
+ /**
2330
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
2331
+ *
2332
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
2333
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
2334
+ * value can be provided describing the strategy the engine should use when grouping the rows.
2335
+ */
2336
+ export class TreeTableConfig {
2336
2337
  /**
2337
- * A list of the key columns.
2338
- * @return Column array.
2338
+ * The column representing the unique ID for each item
2339
2339
  */
2340
- get keyColumns():Column[];
2340
+ idColumn:string;
2341
2341
  /**
2342
- * A list of the value Column objects
2343
- * @return {@link dh.Column} array.
2342
+ * The column representing the parent ID for each item
2344
2343
  */
2345
- get valueColumns():Column[];
2344
+ parentColumn:string;
2346
2345
  /**
2347
- * The source table for this Input Table
2348
- * @return dh.table
2346
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
2349
2347
  */
2350
- get table():Table;
2348
+ promoteOrphansToRoot:boolean;
2349
+
2350
+ constructor();
2351
2351
  }
2352
2352
 
2353
2353
 
@@ -2358,6 +2358,22 @@ export namespace dh {
2358
2358
  static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2359
2359
  }
2360
2360
 
2361
+ /**
2362
+ * A set of string constants that can be used to describe the different objects the JS API can export.
2363
+ */
2364
+ type VariableTypeType = string;
2365
+ export class VariableType {
2366
+ static readonly TABLE:VariableTypeType;
2367
+ static readonly TREETABLE:VariableTypeType;
2368
+ static readonly HIERARCHICALTABLE:VariableTypeType;
2369
+ static readonly TABLEMAP:VariableTypeType;
2370
+ static readonly PARTITIONEDTABLE:VariableTypeType;
2371
+ static readonly FIGURE:VariableTypeType;
2372
+ static readonly OTHERWIDGET:VariableTypeType;
2373
+ static readonly PANDAS:VariableTypeType;
2374
+ static readonly TREEMAP:VariableTypeType;
2375
+ }
2376
+
2361
2377
  type ValueTypeType = string;
2362
2378
  export class ValueType {
2363
2379
  static readonly STRING:ValueTypeType;
@@ -2389,47 +2405,10 @@ export namespace dh {
2389
2405
  static readonly SKIP:AggregationOperationType;
2390
2406
  }
2391
2407
 
2392
- /**
2393
- * A set of string constants that can be used to describe the different objects the JS API can export.
2394
- */
2395
- type VariableTypeType = string;
2396
- export class VariableType {
2397
- static readonly TABLE:VariableTypeType;
2398
- static readonly TREETABLE:VariableTypeType;
2399
- static readonly HIERARCHICALTABLE:VariableTypeType;
2400
- static readonly TABLEMAP:VariableTypeType;
2401
- static readonly PARTITIONEDTABLE:VariableTypeType;
2402
- static readonly FIGURE:VariableTypeType;
2403
- static readonly OTHERWIDGET:VariableTypeType;
2404
- static readonly PANDAS:VariableTypeType;
2405
- static readonly TREEMAP:VariableTypeType;
2406
- }
2407
-
2408
2408
  }
2409
2409
 
2410
2410
  export namespace dh.ide {
2411
2411
 
2412
- /**
2413
- * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2414
- * server.
2415
- */
2416
- export interface LogItem {
2417
- /**
2418
- * The level of the log message, enabling the client to ignore messages.
2419
- * @return String
2420
- */
2421
- get logLevel():string;
2422
- /**
2423
- * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2424
- * @return double
2425
- */
2426
- get micros():number;
2427
- /**
2428
- * The log message written on the server.
2429
- * @return String
2430
- */
2431
- get message():string;
2432
- }
2433
2412
  /**
2434
2413
  * Specifies a type and either id or name (but not both).
2435
2414
  */
@@ -2439,45 +2418,19 @@ export namespace dh.ide {
2439
2418
  name?:string|null;
2440
2419
  }
2441
2420
  /**
2442
- * A format to describe a variable available to be read from the server. Application fields are optional, and only
2443
- * populated when a variable is provided by application mode.
2444
- * <p>
2445
- * APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
2421
+ * Indicates the result of code run on the server.
2446
2422
  */
2447
- export interface VariableDefinition {
2448
- get name():string;
2449
- /**
2450
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2451
- * reasonable to put in the title
2452
- * @return String
2453
- */
2454
- get description():string;
2455
- /**
2456
- * An opaque identifier for this variable
2457
- * @return String
2458
- */
2459
- get id():string;
2460
- /**
2461
- * The type of the variable, one of <b>dh.VariableType</b>
2462
- * @return dh.VariableType.
2463
- */
2464
- get type():dh.VariableTypeType;
2465
- /**
2466
- * The name of the variable, to be used when rendering it to a user
2467
- * @return String
2468
- */
2469
- get title():string;
2423
+ export interface CommandResult {
2470
2424
  /**
2471
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2472
- * reasonable to put in the title
2473
- * @return String
2425
+ * Describes changes made in the course of this command.
2426
+ * @return {@link dh.ide.VariableChanges}.
2474
2427
  */
2475
- get applicationId():string;
2428
+ get changes():VariableChanges;
2476
2429
  /**
2477
- * The name of the application which provided this variable
2430
+ * If the command failed, the error message will be provided here.
2478
2431
  * @return String
2479
2432
  */
2480
- get applicationName():string;
2433
+ get error():string;
2481
2434
  }
2482
2435
  /**
2483
2436
  * Describes changes in the current set of variables in the script session. Note that variables that changed value
@@ -2504,77 +2457,70 @@ export namespace dh.ide {
2504
2457
  get updated():Array<VariableDefinition>;
2505
2458
  }
2506
2459
  /**
2507
- * Indicates the result of code run on the server.
2460
+ * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2461
+ * server.
2508
2462
  */
2509
- export interface CommandResult {
2463
+ export interface LogItem {
2510
2464
  /**
2511
- * Describes changes made in the course of this command.
2512
- * @return {@link dh.ide.VariableChanges}.
2465
+ * The level of the log message, enabling the client to ignore messages.
2466
+ * @return String
2513
2467
  */
2514
- get changes():VariableChanges;
2468
+ get logLevel():string;
2515
2469
  /**
2516
- * If the command failed, the error message will be provided here.
2470
+ * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2471
+ * @return double
2472
+ */
2473
+ get micros():number;
2474
+ /**
2475
+ * The log message written on the server.
2517
2476
  * @return String
2518
2477
  */
2519
- get error():string;
2478
+ get message():string;
2520
2479
  }
2521
- }
2522
-
2523
- export namespace dh.i18n {
2524
-
2525
2480
  /**
2526
- * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2527
- *
2528
- * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2529
- * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2530
- * BigDecimal.
2481
+ * A format to describe a variable available to be read from the server. Application fields are optional, and only
2482
+ * populated when a variable is provided by application mode.
2483
+ * <p>
2484
+ * APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
2531
2485
  */
2532
- export class NumberFormat {
2486
+ export interface VariableDefinition {
2487
+ get name():string;
2533
2488
  /**
2534
- * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2535
- * function, which will create and cache an instance so that later calls share the same instance.
2536
- * @param pattern -
2489
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2490
+ * reasonable to put in the title
2491
+ * @return String
2537
2492
  */
2538
- constructor(pattern:string);
2539
-
2493
+ get description():string;
2540
2494
  /**
2541
- * a number format instance matching the specified format. If this format has not been specified before, a new
2542
- * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2543
- * take advantage of caching
2544
- * @param pattern -
2545
- * @return dh.i18n.NumberFormat
2495
+ * An opaque identifier for this variable
2496
+ * @return String
2546
2497
  */
2547
- static getFormat(pattern:string):NumberFormat;
2498
+ get id():string;
2548
2499
  /**
2549
- * Parses the given text using the cached format matching the given pattern.
2550
- * @param pattern -
2551
- * @param text -
2552
- * @return double
2500
+ * The type of the variable, one of <b>dh.VariableType</b>
2501
+ * @return dh.VariableType.
2553
2502
  */
2554
- static parse(pattern:string, text:string):number;
2503
+ get type():dh.VariableTypeType;
2555
2504
  /**
2556
- * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2557
- * format matching the given pattern string.
2558
- * @param pattern -
2559
- * @param number -
2505
+ * The name of the variable, to be used when rendering it to a user
2560
2506
  * @return String
2561
2507
  */
2562
- static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2508
+ get title():string;
2563
2509
  /**
2564
- * Parses the given text using this instance's pattern into a JS Number.
2565
- * @param text -
2566
- * @return double
2510
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2511
+ * reasonable to put in the title
2512
+ * @return String
2567
2513
  */
2568
- parse(text:string):number;
2514
+ get applicationId():string;
2569
2515
  /**
2570
- * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2571
- * @param number -
2516
+ * The name of the application which provided this variable
2572
2517
  * @return String
2573
2518
  */
2574
- format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2575
- toString():string;
2519
+ get applicationName():string;
2576
2520
  }
2521
+ }
2577
2522
 
2523
+ export namespace dh.i18n {
2578
2524
 
2579
2525
  /**
2580
2526
  * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
@@ -2768,30 +2714,124 @@ export namespace dh.i18n {
2768
2714
  protected constructor();
2769
2715
 
2770
2716
  /**
2771
- * Factory method which creates timezone instances from one of the supported keys.
2772
- * @param tzCode -
2773
- * @return dh.i18n.TimeZone
2717
+ * Factory method which creates timezone instances from one of the supported keys.
2718
+ * @param tzCode -
2719
+ * @return dh.i18n.TimeZone
2720
+ */
2721
+ static getTimeZone(tzCode:string):TimeZone;
2722
+ /**
2723
+ * the standard offset of this timezone, in minutes
2724
+ * @return int
2725
+ */
2726
+ get standardOffset():number;
2727
+ /**
2728
+ * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2729
+ * @return String
2730
+ */
2731
+ get id():string;
2732
+ }
2733
+
2734
+ /**
2735
+ * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2736
+ *
2737
+ * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2738
+ * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2739
+ * BigDecimal.
2740
+ */
2741
+ export class NumberFormat {
2742
+ /**
2743
+ * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2744
+ * function, which will create and cache an instance so that later calls share the same instance.
2745
+ * @param pattern -
2746
+ */
2747
+ constructor(pattern:string);
2748
+
2749
+ /**
2750
+ * a number format instance matching the specified format. If this format has not been specified before, a new
2751
+ * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2752
+ * take advantage of caching
2753
+ * @param pattern -
2754
+ * @return dh.i18n.NumberFormat
2774
2755
  */
2775
- static getTimeZone(tzCode:string):TimeZone;
2756
+ static getFormat(pattern:string):NumberFormat;
2776
2757
  /**
2777
- * the standard offset of this timezone, in minutes
2778
- * @return int
2758
+ * Parses the given text using the cached format matching the given pattern.
2759
+ * @param pattern -
2760
+ * @param text -
2761
+ * @return double
2779
2762
  */
2780
- get standardOffset():number;
2763
+ static parse(pattern:string, text:string):number;
2781
2764
  /**
2782
- * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2765
+ * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2766
+ * format matching the given pattern string.
2767
+ * @param pattern -
2768
+ * @param number -
2783
2769
  * @return String
2784
2770
  */
2785
- get id():string;
2771
+ static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2772
+ /**
2773
+ * Parses the given text using this instance's pattern into a JS Number.
2774
+ * @param text -
2775
+ * @return double
2776
+ */
2777
+ parse(text:string):number;
2778
+ /**
2779
+ * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2780
+ * @param number -
2781
+ * @return String
2782
+ */
2783
+ format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2784
+ toString():string;
2786
2785
  }
2787
2786
 
2787
+
2788
2788
  }
2789
2789
 
2790
2790
  export namespace dh.plot {
2791
2791
 
2792
- export interface FigureDataUpdatedEvent {
2793
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2794
- get series():Series[];
2792
+ /**
2793
+ * Provides access to the data for displaying in a figure.
2794
+ */
2795
+ export interface Series {
2796
+ readonly isLinesVisible?:boolean|null;
2797
+ readonly pointLabelFormat?:string|null;
2798
+ readonly yToolTipPattern?:string|null;
2799
+ readonly shapeSize?:number|null;
2800
+ readonly xToolTipPattern?:string|null;
2801
+ readonly isShapesVisible?:boolean|null;
2802
+
2803
+ subscribe(forceDisableDownsample?:DownsampleOptions):void;
2804
+ /**
2805
+ * Disable updates for this Series.
2806
+ */
2807
+ unsubscribe():void;
2808
+ get shape():string;
2809
+ /**
2810
+ * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2811
+ * the axis.
2812
+ * @return {@link dh.plot.SeriesDataSource}
2813
+ */
2814
+ get sources():SeriesDataSource[];
2815
+ get lineColor():string;
2816
+ /**
2817
+ * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2818
+ * @return int
2819
+ */
2820
+ get plotStyle():SeriesPlotStyleType;
2821
+ get oneClick():OneClick;
2822
+ get gradientVisible():boolean;
2823
+ get shapeColor():string;
2824
+ /**
2825
+ * The name for this series.
2826
+ * @return String
2827
+ */
2828
+ get name():string;
2829
+ /**
2830
+ * indicates that this series belongs to a MultiSeries, null otherwise
2831
+ * @return dh.plot.MultiSeries
2832
+ */
2833
+ get multiSeries():MultiSeries;
2834
+ get shapeLabel():string;
2795
2835
  }
2796
2836
  /**
2797
2837
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
@@ -2876,6 +2916,16 @@ export namespace dh.plot {
2876
2916
  */
2877
2917
  get plotStyle():SeriesPlotStyleType;
2878
2918
  }
2919
+ export interface OneClick {
2920
+ setValueForColumn(columnName:string, value:any):void;
2921
+ getValueForColumn(columName:string):any;
2922
+ get requireAllFiltersToDisplay():boolean;
2923
+ get columns():dh.Column[];
2924
+ }
2925
+ export interface FigureDataUpdatedEvent {
2926
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2927
+ get series():Series[];
2928
+ }
2879
2929
  /**
2880
2930
  * Describes how to access and display data required within a series.
2881
2931
  */
@@ -2896,91 +2946,24 @@ export namespace dh.plot {
2896
2946
  */
2897
2947
  get type():SourceTypeType;
2898
2948
  }
2899
- /**
2900
- * Provides access to the data for displaying in a figure.
2901
- */
2902
- export interface Series {
2903
- readonly isLinesVisible?:boolean|null;
2904
- readonly pointLabelFormat?:string|null;
2905
- readonly yToolTipPattern?:string|null;
2906
- readonly shapeSize?:number|null;
2907
- readonly xToolTipPattern?:string|null;
2908
- readonly isShapesVisible?:boolean|null;
2909
-
2910
- subscribe(forceDisableDownsample?:DownsampleOptions):void;
2911
- /**
2912
- * Disable updates for this Series.
2913
- */
2914
- unsubscribe():void;
2915
- get shape():string;
2916
- /**
2917
- * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2918
- * the axis.
2919
- * @return {@link dh.plot.SeriesDataSource}
2920
- */
2921
- get sources():SeriesDataSource[];
2922
- get lineColor():string;
2923
- /**
2924
- * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2925
- * @return int
2926
- */
2927
- get plotStyle():SeriesPlotStyleType;
2928
- get oneClick():OneClick;
2929
- get gradientVisible():boolean;
2930
- get shapeColor():string;
2931
- /**
2932
- * The name for this series.
2933
- * @return String
2934
- */
2935
- get name():string;
2936
- /**
2937
- * indicates that this series belongs to a MultiSeries, null otherwise
2938
- * @return dh.plot.MultiSeries
2939
- */
2940
- get multiSeries():MultiSeries;
2941
- get shapeLabel():string;
2942
- }
2943
- export interface OneClick {
2944
- setValueForColumn(columnName:string, value:any):void;
2945
- getValueForColumn(columName:string):any;
2946
- get requireAllFiltersToDisplay():boolean;
2947
- get columns():dh.Column[];
2948
- }
2949
-
2950
- export class SeriesDescriptor {
2951
- plotStyle:string;
2952
- name?:string|null;
2953
- linesVisible?:boolean|null;
2954
- shapesVisible?:boolean|null;
2955
- gradientVisible?:boolean|null;
2956
- lineColor?:string|null;
2957
- pointLabelFormat?:string|null;
2958
- xToolTipPattern?:string|null;
2959
- yToolTipPattern?:string|null;
2960
- shapeLabel?:string|null;
2961
- shapeSize?:number|null;
2962
- shapeColor?:string|null;
2963
- shape?:string|null;
2964
- dataSources:Array<SourceDescriptor>;
2965
-
2966
- constructor();
2967
- }
2968
2949
 
2969
2950
  /**
2970
- * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
2971
- * underlying table, but also support a mapping function to let client code translate data in some way for display and
2972
- * keep that cached as well.
2951
+ * Helper class for plot downsampling methods.
2973
2952
  */
2974
- export class ChartData {
2975
- constructor(table:dh.Table);
2953
+ export class Downsample {
2954
+ protected constructor();
2976
2955
 
2977
- update(tableData:dh.SubscriptionTableData):void;
2978
- getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
2979
2956
  /**
2980
- * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
2981
- * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
2957
+ * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
2958
+ * the same visual fidelity as the original table, but with fewer rows.
2959
+ * @param table - The table to downsample.
2960
+ * @param xCol - The name of the X column to downsample. Must be an Instant or long.
2961
+ * @param yCols - The names of the Y columns to downsample.
2962
+ * @param width - The width of the visible area in pixels.
2963
+ * @param xRange - The visible range as `[start, end]` or null to always use all data.
2964
+ * @return A promise that resolves to the downsampled table.
2982
2965
  */
2983
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
2966
+ static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
2984
2967
  }
2985
2968
 
2986
2969
  /**
@@ -3103,37 +3086,35 @@ export namespace dh.plot {
3103
3086
  static create(config:FigureDescriptor):Promise<Figure>;
3104
3087
  }
3105
3088
 
3106
- export class DownsampleOptions {
3107
- /**
3108
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3109
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3110
- * series.subscribe().
3111
- */
3112
- static MAX_SERIES_SIZE:number;
3113
- /**
3114
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3115
- * downsampling disabled, the series will not load data.
3116
- */
3117
- static MAX_SUBSCRIPTION_SIZE:number;
3118
- /**
3119
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3120
- * axes are configured.
3121
- */
3122
- static readonly DEFAULT:DownsampleOptions;
3123
- /**
3124
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3125
- * the limit of MAX_SUBSCRIPTION_SIZE.
3126
- */
3127
- static readonly DISABLE:DownsampleOptions;
3089
+ export class FigureSourceException {
3090
+ table:dh.Table;
3091
+ source:SeriesDataSource;
3128
3092
 
3129
3093
  protected constructor();
3130
3094
  }
3131
3095
 
3132
- export class FigureFetchError {
3133
- error:object;
3134
- errors:Array<string>;
3096
+ export class AxisDescriptor {
3097
+ formatType:string;
3098
+ type:string;
3099
+ position:string;
3100
+ log?:boolean|null;
3101
+ label?:string|null;
3102
+ labelFont?:string|null;
3103
+ ticksFont?:string|null;
3104
+ formatPattern?:string|null;
3105
+ color?:string|null;
3106
+ minRange?:number|null;
3107
+ maxRange?:number|null;
3108
+ minorTicksVisible?:boolean|null;
3109
+ majorTicksVisible?:boolean|null;
3110
+ minorTickCount?:number|null;
3111
+ gapBetweenMajorTicks?:number|null;
3112
+ majorTickLocations?:Array<number>|null;
3113
+ tickLabelAngle?:number|null;
3114
+ invert?:boolean|null;
3115
+ isTimeAxis?:boolean|null;
3135
3116
 
3136
- protected constructor();
3117
+ constructor();
3137
3118
  }
3138
3119
 
3139
3120
  /**
@@ -3143,33 +3124,23 @@ export namespace dh.plot {
3143
3124
  title?:string|null;
3144
3125
  titleFont?:string|null;
3145
3126
  titleColor?:string|null;
3146
- isResizable?:boolean|null;
3147
- isDefaultTheme?:boolean|null;
3148
- updateInterval?:number|null;
3149
- cols?:number|null;
3150
- rows?:number|null;
3151
- charts:Array<ChartDescriptor>;
3152
-
3153
- constructor();
3154
- }
3155
-
3156
- export class ChartDescriptor {
3157
- colspan?:number|null;
3158
- rowspan?:number|null;
3159
- series:Array<SeriesDescriptor>;
3160
- axes:Array<AxisDescriptor>;
3161
- chartType:string;
3162
- title?:string|null;
3163
- titleFont?:string|null;
3164
- titleColor?:string|null;
3165
- showLegend?:boolean|null;
3166
- legendFont?:string|null;
3167
- legendColor?:string|null;
3168
- is3d?:boolean|null;
3127
+ isResizable?:boolean|null;
3128
+ isDefaultTheme?:boolean|null;
3129
+ updateInterval?:number|null;
3130
+ cols?:number|null;
3131
+ rows?:number|null;
3132
+ charts:Array<ChartDescriptor>;
3169
3133
 
3170
3134
  constructor();
3171
3135
  }
3172
3136
 
3137
+ export class FigureFetchError {
3138
+ error:object;
3139
+ errors:Array<string>;
3140
+
3141
+ protected constructor();
3142
+ }
3143
+
3173
3144
  /**
3174
3145
  * Provide the details for a chart.
3175
3146
  */
@@ -3214,37 +3185,6 @@ export namespace dh.plot {
3214
3185
  get multiSeries():MultiSeries[];
3215
3186
  }
3216
3187
 
3217
- export class AxisDescriptor {
3218
- formatType:string;
3219
- type:string;
3220
- position:string;
3221
- log?:boolean|null;
3222
- label?:string|null;
3223
- labelFont?:string|null;
3224
- ticksFont?:string|null;
3225
- formatPattern?:string|null;
3226
- color?:string|null;
3227
- minRange?:number|null;
3228
- maxRange?:number|null;
3229
- minorTicksVisible?:boolean|null;
3230
- majorTicksVisible?:boolean|null;
3231
- minorTickCount?:number|null;
3232
- gapBetweenMajorTicks?:number|null;
3233
- majorTickLocations?:Array<number>|null;
3234
- tickLabelAngle?:number|null;
3235
- invert?:boolean|null;
3236
- isTimeAxis?:boolean|null;
3237
-
3238
- constructor();
3239
- }
3240
-
3241
- export class SeriesDataSourceException {
3242
- protected constructor();
3243
-
3244
- get source():SeriesDataSource;
3245
- get message():string;
3246
- }
3247
-
3248
3188
  export class SourceDescriptor {
3249
3189
  axis:AxisDescriptor;
3250
3190
  table:dh.Table;
@@ -3255,41 +3195,92 @@ export namespace dh.plot {
3255
3195
  }
3256
3196
 
3257
3197
  /**
3258
- * Helper class for plot downsampling methods.
3198
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3199
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
3200
+ * keep that cached as well.
3259
3201
  */
3260
- export class Downsample {
3261
- protected constructor();
3202
+ export class ChartData {
3203
+ constructor(table:dh.Table);
3262
3204
 
3205
+ update(tableData:dh.SubscriptionTableData):void;
3206
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3263
3207
  /**
3264
- * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3265
- * the same visual fidelity as the original table, but with fewer rows.
3266
- * @param table - The table to downsample.
3267
- * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3268
- * @param yCols - The names of the Y columns to downsample.
3269
- * @param width - The width of the visible area in pixels.
3270
- * @param xRange - The visible range as `[start, end]` or null to always use all data.
3271
- * @return A promise that resolves to the downsampled table.
3208
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3209
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3272
3210
  */
3273
- static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3211
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3274
3212
  }
3275
3213
 
3276
- export class FigureSourceException {
3277
- table:dh.Table;
3278
- source:SeriesDataSource;
3214
+ export class SeriesDescriptor {
3215
+ plotStyle:string;
3216
+ name?:string|null;
3217
+ linesVisible?:boolean|null;
3218
+ shapesVisible?:boolean|null;
3219
+ gradientVisible?:boolean|null;
3220
+ lineColor?:string|null;
3221
+ pointLabelFormat?:string|null;
3222
+ xToolTipPattern?:string|null;
3223
+ yToolTipPattern?:string|null;
3224
+ shapeLabel?:string|null;
3225
+ shapeSize?:number|null;
3226
+ shapeColor?:string|null;
3227
+ shape?:string|null;
3228
+ dataSources:Array<SourceDescriptor>;
3279
3229
 
3230
+ constructor();
3231
+ }
3232
+
3233
+ export class SeriesDataSourceException {
3280
3234
  protected constructor();
3235
+
3236
+ get source():SeriesDataSource;
3237
+ get message():string;
3281
3238
  }
3282
3239
 
3240
+ export class ChartDescriptor {
3241
+ colspan?:number|null;
3242
+ rowspan?:number|null;
3243
+ series:Array<SeriesDescriptor>;
3244
+ axes:Array<AxisDescriptor>;
3245
+ chartType:string;
3246
+ title?:string|null;
3247
+ titleFont?:string|null;
3248
+ titleColor?:string|null;
3249
+ showLegend?:boolean|null;
3250
+ legendFont?:string|null;
3251
+ legendColor?:string|null;
3252
+ is3d?:boolean|null;
3253
+
3254
+ constructor();
3255
+ }
3283
3256
 
3284
- type AxisPositionType = number;
3285
- export class AxisPosition {
3286
- static readonly TOP:AxisPositionType;
3287
- static readonly BOTTOM:AxisPositionType;
3288
- static readonly LEFT:AxisPositionType;
3289
- static readonly RIGHT:AxisPositionType;
3290
- static readonly NONE:AxisPositionType;
3257
+ export class DownsampleOptions {
3258
+ /**
3259
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3260
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3261
+ * series.subscribe().
3262
+ */
3263
+ static MAX_SERIES_SIZE:number;
3264
+ /**
3265
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3266
+ * downsampling disabled, the series will not load data.
3267
+ */
3268
+ static MAX_SUBSCRIPTION_SIZE:number;
3269
+ /**
3270
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3271
+ * axes are configured.
3272
+ */
3273
+ static readonly DEFAULT:DownsampleOptions;
3274
+ /**
3275
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3276
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3277
+ */
3278
+ static readonly DISABLE:DownsampleOptions;
3279
+
3280
+ protected constructor();
3291
3281
  }
3292
3282
 
3283
+
3293
3284
  type AxisTypeType = number;
3294
3285
  export class AxisType {
3295
3286
  static readonly X:AxisTypeType;
@@ -3331,10 +3322,13 @@ export namespace dh.plot {
3331
3322
  static readonly TREEMAP:SeriesPlotStyleType;
3332
3323
  }
3333
3324
 
3334
- type AxisFormatTypeType = number;
3335
- export class AxisFormatType {
3336
- static readonly CATEGORY:AxisFormatTypeType;
3337
- static readonly NUMBER:AxisFormatTypeType;
3325
+ type AxisPositionType = number;
3326
+ export class AxisPosition {
3327
+ static readonly TOP:AxisPositionType;
3328
+ static readonly BOTTOM:AxisPositionType;
3329
+ static readonly LEFT:AxisPositionType;
3330
+ static readonly RIGHT:AxisPositionType;
3331
+ static readonly NONE:AxisPositionType;
3338
3332
  }
3339
3333
 
3340
3334
  /**
@@ -3366,31 +3360,34 @@ export namespace dh.plot {
3366
3360
  static readonly HOVER_TEXT:SourceTypeType;
3367
3361
  }
3368
3362
 
3363
+ type AxisFormatTypeType = number;
3364
+ export class AxisFormatType {
3365
+ static readonly CATEGORY:AxisFormatTypeType;
3366
+ static readonly NUMBER:AxisFormatTypeType;
3367
+ }
3368
+
3369
3369
  }
3370
3370
 
3371
3371
  export namespace dh.lsp {
3372
3372
 
3373
- export class SignatureInformation {
3374
- label:string;
3375
- documentation:MarkupContent;
3376
- parameters:Array<ParameterInformation>;
3377
- activeParameter:number;
3373
+ export class TextDocumentContentChangeEvent {
3374
+ range:Range;
3375
+ rangeLength:number;
3376
+ text:string;
3378
3377
 
3379
3378
  constructor();
3380
3379
  }
3381
3380
 
3382
- export class Range {
3383
- start:Position;
3384
- end:Position;
3381
+ export class Hover {
3382
+ contents:MarkupContent;
3383
+ range:Range;
3385
3384
 
3386
3385
  constructor();
3387
-
3388
- isInside(innerStart:Position, innerEnd:Position):boolean;
3389
3386
  }
3390
3387
 
3391
- export class MarkupContent {
3392
- kind:string;
3393
- value:string;
3388
+ export class TextEdit {
3389
+ range:Range;
3390
+ text:string;
3394
3391
 
3395
3392
  constructor();
3396
3393
  }
@@ -3412,53 +3409,67 @@ export namespace dh.lsp {
3412
3409
  constructor();
3413
3410
  }
3414
3411
 
3415
- export class Position {
3416
- line:number;
3417
- character:number;
3412
+ export class ParameterInformation {
3413
+ label:string;
3414
+ documentation:MarkupContent;
3418
3415
 
3419
3416
  constructor();
3420
-
3421
- lessThan(start:Position):boolean;
3422
- lessOrEqual(start:Position):boolean;
3423
- greaterThan(end:Position):boolean;
3424
- greaterOrEqual(end:Position):boolean;
3425
- copy():Position;
3426
3417
  }
3427
3418
 
3428
- export class Hover {
3429
- contents:MarkupContent;
3430
- range:Range;
3419
+ export class SignatureInformation {
3420
+ label:string;
3421
+ documentation:MarkupContent;
3422
+ parameters:Array<ParameterInformation>;
3423
+ activeParameter:number;
3431
3424
 
3432
3425
  constructor();
3433
3426
  }
3434
3427
 
3435
- export class ParameterInformation {
3436
- label:string;
3437
- documentation:MarkupContent;
3428
+ export class MarkupContent {
3429
+ kind:string;
3430
+ value:string;
3438
3431
 
3439
3432
  constructor();
3440
3433
  }
3441
3434
 
3442
- export class TextDocumentContentChangeEvent {
3443
- range:Range;
3444
- rangeLength:number;
3445
- text:string;
3435
+ export class Range {
3436
+ start:Position;
3437
+ end:Position;
3446
3438
 
3447
3439
  constructor();
3440
+
3441
+ isInside(innerStart:Position, innerEnd:Position):boolean;
3448
3442
  }
3449
3443
 
3450
- export class TextEdit {
3451
- range:Range;
3452
- text:string;
3444
+ export class Position {
3445
+ line:number;
3446
+ character:number;
3453
3447
 
3454
3448
  constructor();
3449
+
3450
+ lessThan(start:Position):boolean;
3451
+ lessOrEqual(start:Position):boolean;
3452
+ greaterThan(end:Position):boolean;
3453
+ greaterOrEqual(end:Position):boolean;
3454
+ copy():Position;
3455
3455
  }
3456
3456
 
3457
3457
  }
3458
3458
 
3459
-
3460
3459
  export namespace dh.calendar {
3461
3460
 
3461
+ export interface Holiday {
3462
+ /**
3463
+ * The date of the Holiday.
3464
+ * @return {@link dh.LocalDateWrapper}
3465
+ */
3466
+ get date():dh.LocalDateWrapper;
3467
+ /**
3468
+ * The business periods that are open on the holiday.
3469
+ * @return dh.calendar.BusinessPeriod
3470
+ */
3471
+ get businessPeriods():Array<BusinessPeriod>;
3472
+ }
3462
3473
  /**
3463
3474
  * Defines a calendar with business hours and holidays.
3464
3475
  */
@@ -3493,18 +3504,6 @@ export namespace dh.calendar {
3493
3504
  get close():string;
3494
3505
  get open():string;
3495
3506
  }
3496
- export interface Holiday {
3497
- /**
3498
- * The date of the Holiday.
3499
- * @return {@link dh.LocalDateWrapper}
3500
- */
3501
- get date():dh.LocalDateWrapper;
3502
- /**
3503
- * The business periods that are open on the holiday.
3504
- * @return dh.calendar.BusinessPeriod
3505
- */
3506
- get businessPeriods():Array<BusinessPeriod>;
3507
- }
3508
3507
 
3509
3508
  type DayOfWeekType = string;
3510
3509
  export class DayOfWeek {
@@ -3520,3 +3519,4 @@ export namespace dh.calendar {
3520
3519
  }
3521
3520
 
3522
3521
  }
3522
+