@deephaven/jsapi-types 1.0.0-dev0.33.0 → 1.0.0-dev0.33.2

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