@deephaven/jsapi-types 1.0.0-dev0.35.2 → 1.0.0-dev0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1443 -1473
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -117,94 +117,10 @@ export namespace dh.storage {
|
|
|
117
117
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
export interface TreeRow extends ViewportRow {
|
|
125
|
-
/**
|
|
126
|
-
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
127
|
-
* rows below this one with a greater depth than this one
|
|
128
|
-
* @return boolean
|
|
129
|
-
*/
|
|
130
|
-
get isExpanded():boolean;
|
|
131
|
-
/**
|
|
132
|
-
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
|
|
133
|
-
* row and its expand/collapse icon
|
|
134
|
-
* @return int
|
|
135
|
-
*/
|
|
136
|
-
get depth():number;
|
|
137
|
-
/**
|
|
138
|
-
* True if this node has children and can be expanded; false otherwise. Note that this value may change when
|
|
139
|
-
* the table updates, depending on the table's configuration
|
|
140
|
-
* @return boolean
|
|
141
|
-
*/
|
|
142
|
-
get hasChildren():boolean;
|
|
143
|
-
get index():LongWrapper;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
147
|
-
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
148
|
-
*
|
|
149
|
-
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
150
|
-
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
151
|
-
* backwards compatibility and to better follow JS expectations.
|
|
152
|
-
*/
|
|
153
|
-
export interface WidgetMessageDetails {
|
|
154
|
-
/**
|
|
155
|
-
* Returns the data from this message as a base64-encoded string.
|
|
156
|
-
*/
|
|
157
|
-
getDataAsBase64():string;
|
|
158
|
-
/**
|
|
159
|
-
* Returns the data from this message as a Uint8Array.
|
|
160
|
-
*/
|
|
161
|
-
getDataAsU8():Uint8Array;
|
|
162
|
-
/**
|
|
163
|
-
* Returns the data from this message as a utf-8 string.
|
|
164
|
-
*/
|
|
165
|
-
getDataAsString():string;
|
|
166
|
-
/**
|
|
167
|
-
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
168
|
-
* objects, and should close them when no longer needed.
|
|
169
|
-
*/
|
|
170
|
-
get exportedObjects():WidgetExportedObject[];
|
|
171
|
-
}
|
|
172
|
-
export interface Row {
|
|
173
|
-
get(column:Column):any;
|
|
174
|
-
getFormat(column:Column):Format;
|
|
175
|
-
get index():LongWrapper;
|
|
176
|
-
}
|
|
177
|
-
export interface LayoutHints {
|
|
178
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
179
|
-
|
|
180
|
-
get hiddenColumns():string[]|null;
|
|
181
|
-
get frozenColumns():string[]|null;
|
|
182
|
-
get columnGroups():ColumnGroup[]|null;
|
|
183
|
-
get areSavedLayoutsAllowed():boolean;
|
|
184
|
-
get frontColumns():string[]|null;
|
|
185
|
-
get backColumns():string[]|null;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
189
|
-
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
190
|
-
* for easier scrolling without going to the server.
|
|
191
|
-
*/
|
|
192
|
-
export interface ViewportData extends TableData {
|
|
193
|
-
/**
|
|
194
|
-
* The index of the first returned row
|
|
195
|
-
* @return double
|
|
196
|
-
*/
|
|
197
|
-
get offset():number;
|
|
198
|
-
/**
|
|
199
|
-
* A list of columns describing the data types in each row
|
|
200
|
-
* @return {@link dh.Column} array.
|
|
201
|
-
*/
|
|
202
|
-
get columns():Array<Column>;
|
|
203
|
-
/**
|
|
204
|
-
* An array of rows of data
|
|
205
|
-
* @return {@link dh.ViewportRow} array.
|
|
206
|
-
*/
|
|
207
|
-
get rows():Array<ViewportRow>;
|
|
120
|
+
export interface ColumnGroup {
|
|
121
|
+
get name():string|null;
|
|
122
|
+
get children():string[]|null;
|
|
123
|
+
get color():string|null;
|
|
208
124
|
}
|
|
209
125
|
/**
|
|
210
126
|
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
@@ -348,6 +264,16 @@ export namespace dh {
|
|
|
348
264
|
get columns():Array<Column>;
|
|
349
265
|
get rows():Array<Row>;
|
|
350
266
|
}
|
|
267
|
+
export interface LayoutHints {
|
|
268
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
269
|
+
|
|
270
|
+
get hiddenColumns():string[]|null;
|
|
271
|
+
get frozenColumns():string[]|null;
|
|
272
|
+
get columnGroups():ColumnGroup[]|null;
|
|
273
|
+
get areSavedLayoutsAllowed():boolean;
|
|
274
|
+
get frontColumns():string[]|null;
|
|
275
|
+
get backColumns():string[]|null;
|
|
276
|
+
}
|
|
351
277
|
/**
|
|
352
278
|
* Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
|
|
353
279
|
* real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
|
|
@@ -393,75 +319,6 @@ export namespace dh {
|
|
|
393
319
|
getViewportData():Promise<TableData>;
|
|
394
320
|
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
395
321
|
}
|
|
396
|
-
/**
|
|
397
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
398
|
-
*/
|
|
399
|
-
export interface Format {
|
|
400
|
-
/**
|
|
401
|
-
* The format string to apply to the value of this cell.
|
|
402
|
-
* @return String
|
|
403
|
-
*/
|
|
404
|
-
readonly formatString?:string|null;
|
|
405
|
-
/**
|
|
406
|
-
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
407
|
-
* @return String
|
|
408
|
-
*/
|
|
409
|
-
readonly backgroundColor?:string|null;
|
|
410
|
-
/**
|
|
411
|
-
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
412
|
-
* @return String
|
|
413
|
-
*/
|
|
414
|
-
readonly color?:string|null;
|
|
415
|
-
/**
|
|
416
|
-
*
|
|
417
|
-
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
418
|
-
*/
|
|
419
|
-
readonly numberFormat?:string|null;
|
|
420
|
-
}
|
|
421
|
-
/**
|
|
422
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
423
|
-
*/
|
|
424
|
-
export interface LocalTimeWrapper {
|
|
425
|
-
valueOf():string;
|
|
426
|
-
getHour():number;
|
|
427
|
-
getMinute():number;
|
|
428
|
-
getSecond():number;
|
|
429
|
-
getNano():number;
|
|
430
|
-
toString():string;
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
|
|
434
|
-
* table column.
|
|
435
|
-
*/
|
|
436
|
-
export interface ColumnStatistics {
|
|
437
|
-
/**
|
|
438
|
-
* Gets the type of formatting that should be used for given statistic.
|
|
439
|
-
* <p>
|
|
440
|
-
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
441
|
-
* @param name - the display name of the statistic
|
|
442
|
-
* @return String
|
|
443
|
-
*/
|
|
444
|
-
getType(name:string):string;
|
|
445
|
-
/**
|
|
446
|
-
* Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
|
|
447
|
-
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
448
|
-
* than 19 unique values.
|
|
449
|
-
* @return Map of String double
|
|
450
|
-
*/
|
|
451
|
-
get uniqueValues():Map<string, number>;
|
|
452
|
-
/**
|
|
453
|
-
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
454
|
-
* <p>
|
|
455
|
-
* A map of each statistic's name to its value.
|
|
456
|
-
* @return Map of String and Object
|
|
457
|
-
*/
|
|
458
|
-
get statisticsMap():Map<string, object>;
|
|
459
|
-
}
|
|
460
|
-
export interface ColumnGroup {
|
|
461
|
-
get name():string|null;
|
|
462
|
-
get children():string[]|null;
|
|
463
|
-
get color():string|null;
|
|
464
|
-
}
|
|
465
322
|
export interface WorkerHeapInfo {
|
|
466
323
|
/**
|
|
467
324
|
* Total heap size available for this worker.
|
|
@@ -470,57 +327,6 @@ export namespace dh {
|
|
|
470
327
|
get freeMemory():number;
|
|
471
328
|
get maximumHeapSize():number;
|
|
472
329
|
}
|
|
473
|
-
export interface RefreshToken {
|
|
474
|
-
get bytes():string;
|
|
475
|
-
get expiry():number;
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
479
|
-
*/
|
|
480
|
-
export interface LocalDateWrapper {
|
|
481
|
-
valueOf():string;
|
|
482
|
-
getYear():number;
|
|
483
|
-
getMonthValue():number;
|
|
484
|
-
getDayOfMonth():number;
|
|
485
|
-
toString():string;
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
489
|
-
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
490
|
-
* are correctly freed.
|
|
491
|
-
*/
|
|
492
|
-
export interface WidgetExportedObject {
|
|
493
|
-
/**
|
|
494
|
-
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
495
|
-
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
496
|
-
* {@link Widget.sendMessage}.
|
|
497
|
-
* @return the string type of this server-side object, or null.
|
|
498
|
-
*/
|
|
499
|
-
readonly type?:string|null;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
503
|
-
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
504
|
-
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
505
|
-
*/
|
|
506
|
-
reexport():Promise<WidgetExportedObject>;
|
|
507
|
-
/**
|
|
508
|
-
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
509
|
-
* the same instance.
|
|
510
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
511
|
-
*/
|
|
512
|
-
fetch():Promise<any>;
|
|
513
|
-
/**
|
|
514
|
-
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
515
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
516
|
-
*/
|
|
517
|
-
close():void;
|
|
518
|
-
}
|
|
519
|
-
export interface TreeViewportData extends TableData {
|
|
520
|
-
get offset():number;
|
|
521
|
-
get columns():Array<Column>;
|
|
522
|
-
get rows():Array<TreeRow>;
|
|
523
|
-
}
|
|
524
330
|
/**
|
|
525
331
|
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
|
|
526
332
|
* in columns) either by index, or scanning the complete present index.
|
|
@@ -555,32 +361,34 @@ export namespace dh {
|
|
|
555
361
|
get modified():RangeSet;
|
|
556
362
|
get rows():Array<Row>;
|
|
557
363
|
}
|
|
558
|
-
export interface
|
|
364
|
+
export interface RefreshToken {
|
|
365
|
+
get bytes():string;
|
|
366
|
+
get expiry():number;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
370
|
+
*/
|
|
371
|
+
export interface Format {
|
|
559
372
|
/**
|
|
560
|
-
*
|
|
561
|
-
* @
|
|
562
|
-
* @param callback - a function to call when the event occurs
|
|
563
|
-
* @return Returns a cleanup function.
|
|
564
|
-
* @typeParam T - the type of the data that the event will provide
|
|
373
|
+
* The format string to apply to the value of this cell.
|
|
374
|
+
* @return String
|
|
565
375
|
*/
|
|
566
|
-
|
|
567
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
568
|
-
hasListeners(name:string):boolean;
|
|
376
|
+
readonly formatString?:string|null;
|
|
569
377
|
/**
|
|
570
|
-
*
|
|
571
|
-
* @
|
|
572
|
-
* @param callback -
|
|
573
|
-
* @return
|
|
574
|
-
* @typeParam T -
|
|
378
|
+
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
379
|
+
* @return String
|
|
575
380
|
*/
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
381
|
+
readonly backgroundColor?:string|null;
|
|
382
|
+
/**
|
|
383
|
+
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
384
|
+
* @return String
|
|
385
|
+
*/
|
|
386
|
+
readonly color?:string|null;
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
390
|
+
*/
|
|
391
|
+
readonly numberFormat?:string|null;
|
|
584
392
|
}
|
|
585
393
|
/**
|
|
586
394
|
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
@@ -671,300 +479,203 @@ export namespace dh {
|
|
|
671
479
|
*/
|
|
672
480
|
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
673
481
|
}
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* Event fired when a command is issued from the client.
|
|
677
|
-
*/
|
|
678
|
-
export class CommandInfo {
|
|
679
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
680
|
-
|
|
681
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
682
|
-
get code():string;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
482
|
/**
|
|
686
|
-
*
|
|
687
|
-
*
|
|
483
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table,
|
|
484
|
+
* but with additional properties to reflect the tree structure.
|
|
688
485
|
*/
|
|
689
|
-
export
|
|
690
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
691
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
692
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
693
|
-
|
|
694
|
-
constructor();
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
export class Ide {
|
|
698
|
-
constructor();
|
|
699
|
-
|
|
486
|
+
export interface TreeRow extends ViewportRow {
|
|
700
487
|
/**
|
|
701
|
-
*
|
|
488
|
+
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
489
|
+
* rows below this one with a greater depth than this one
|
|
490
|
+
* @return boolean
|
|
702
491
|
*/
|
|
703
|
-
|
|
492
|
+
get isExpanded():boolean;
|
|
704
493
|
/**
|
|
705
|
-
*
|
|
494
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
|
|
495
|
+
* row and its expand/collapse icon
|
|
496
|
+
* @return int
|
|
706
497
|
*/
|
|
707
|
-
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
export class CustomColumn {
|
|
711
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
712
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
713
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
714
|
-
static readonly TYPE_NEW:string;
|
|
715
|
-
|
|
716
|
-
protected constructor();
|
|
717
|
-
|
|
718
|
-
valueOf():string;
|
|
719
|
-
toString():string;
|
|
498
|
+
get depth():number;
|
|
720
499
|
/**
|
|
721
|
-
*
|
|
722
|
-
*
|
|
500
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when
|
|
501
|
+
* the table updates, depending on the table's configuration
|
|
502
|
+
* @return boolean
|
|
723
503
|
*/
|
|
724
|
-
get
|
|
504
|
+
get hasChildren():boolean;
|
|
505
|
+
get index():LongWrapper;
|
|
506
|
+
}
|
|
507
|
+
export interface HasEventHandling {
|
|
725
508
|
/**
|
|
726
|
-
*
|
|
727
|
-
* @
|
|
509
|
+
* Listen for events on this object.
|
|
510
|
+
* @param name - the name of the event to listen for
|
|
511
|
+
* @param callback - a function to call when the event occurs
|
|
512
|
+
* @return Returns a cleanup function.
|
|
513
|
+
* @typeParam T - the type of the data that the event will provide
|
|
728
514
|
*/
|
|
729
|
-
|
|
515
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
516
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
517
|
+
hasListeners(name:string):boolean;
|
|
730
518
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
* <li>FORMAT_DATE</li>
|
|
737
|
-
* <li>NEW</li>
|
|
738
|
-
* </ul>
|
|
739
|
-
* @return String
|
|
519
|
+
* Removes an event listener added to this table.
|
|
520
|
+
* @param name -
|
|
521
|
+
* @param callback -
|
|
522
|
+
* @return
|
|
523
|
+
* @typeParam T -
|
|
740
524
|
*/
|
|
741
|
-
|
|
525
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
742
526
|
}
|
|
743
|
-
|
|
744
527
|
/**
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
749
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
750
|
-
* forward data to it.
|
|
751
|
-
*
|
|
752
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
753
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
754
|
-
* viewports to make it less expensive to compute for large tables.
|
|
528
|
+
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
529
|
+
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
530
|
+
* for easier scrolling without going to the server.
|
|
755
531
|
*/
|
|
756
|
-
export
|
|
532
|
+
export interface ViewportData extends TableData {
|
|
757
533
|
/**
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
* allowing access to the entire range of items currently in the subscribed columns.
|
|
534
|
+
* The index of the first returned row
|
|
535
|
+
* @return double
|
|
761
536
|
*/
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
protected constructor();
|
|
765
|
-
|
|
537
|
+
get offset():number;
|
|
766
538
|
/**
|
|
767
|
-
*
|
|
539
|
+
* A list of columns describing the data types in each row
|
|
540
|
+
* @return {@link dh.Column} array.
|
|
768
541
|
*/
|
|
769
|
-
|
|
770
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
771
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
772
|
-
hasListeners(name:string):boolean;
|
|
773
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
542
|
+
get columns():Array<Column>;
|
|
774
543
|
/**
|
|
775
|
-
*
|
|
776
|
-
* @return {@link dh.
|
|
544
|
+
* An array of rows of data
|
|
545
|
+
* @return {@link dh.ViewportRow} array.
|
|
777
546
|
*/
|
|
778
|
-
get
|
|
547
|
+
get rows():Array<ViewportRow>;
|
|
548
|
+
}
|
|
549
|
+
export interface Row {
|
|
550
|
+
get(column:Column):any;
|
|
551
|
+
getFormat(column:Column):Format;
|
|
552
|
+
get index():LongWrapper;
|
|
779
553
|
}
|
|
780
|
-
|
|
781
554
|
/**
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
785
|
-
*
|
|
786
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
787
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
788
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
789
|
-
* before sending the next operation.
|
|
790
|
-
*
|
|
791
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
555
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
556
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
792
557
|
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
558
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
559
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
560
|
+
* backwards compatibility and to better follow JS expectations.
|
|
795
561
|
*/
|
|
796
|
-
export
|
|
797
|
-
protected constructor();
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
801
|
-
* property at that name and validate it can be put into the given column type.
|
|
802
|
-
* @param row -
|
|
803
|
-
* @param userTimeZone -
|
|
804
|
-
* @return Promise of dh.InputTable
|
|
805
|
-
*/
|
|
806
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
562
|
+
export interface WidgetMessageDetails {
|
|
807
563
|
/**
|
|
808
|
-
*
|
|
809
|
-
* @param rows -
|
|
810
|
-
* @param userTimeZone -
|
|
811
|
-
* @return Promise of dh.InputTable
|
|
564
|
+
* Returns the data from this message as a base64-encoded string.
|
|
812
565
|
*/
|
|
813
|
-
|
|
566
|
+
getDataAsBase64():string;
|
|
814
567
|
/**
|
|
815
|
-
*
|
|
816
|
-
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
817
|
-
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
818
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
819
|
-
* @param tableToAdd -
|
|
820
|
-
* @return Promise of dh.InputTable
|
|
568
|
+
* Returns the data from this message as a Uint8Array.
|
|
821
569
|
*/
|
|
822
|
-
|
|
570
|
+
getDataAsU8():Uint8Array;
|
|
823
571
|
/**
|
|
824
|
-
*
|
|
825
|
-
* @param tablesToAdd -
|
|
826
|
-
* @return Promise of dh.InputTable
|
|
572
|
+
* Returns the data from this message as a utf-8 string.
|
|
827
573
|
*/
|
|
828
|
-
|
|
574
|
+
getDataAsString():string;
|
|
829
575
|
/**
|
|
830
|
-
*
|
|
831
|
-
*
|
|
832
|
-
* @return Promise of dh.InputTable
|
|
576
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
577
|
+
* objects, and should close them when no longer needed.
|
|
833
578
|
*/
|
|
834
|
-
|
|
579
|
+
get exportedObjects():WidgetExportedObject[];
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
|
|
583
|
+
* the viewport again.
|
|
584
|
+
*/
|
|
585
|
+
export interface ViewportRow extends Row {
|
|
586
|
+
get index():LongWrapper;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
590
|
+
*/
|
|
591
|
+
export interface LocalTimeWrapper {
|
|
592
|
+
valueOf():string;
|
|
593
|
+
getHour():number;
|
|
594
|
+
getMinute():number;
|
|
595
|
+
getSecond():number;
|
|
596
|
+
getNano():number;
|
|
597
|
+
toString():string;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
|
|
601
|
+
* table column.
|
|
602
|
+
*/
|
|
603
|
+
export interface ColumnStatistics {
|
|
835
604
|
/**
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
*
|
|
605
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
606
|
+
* <p>
|
|
607
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
608
|
+
* @param name - the display name of the statistic
|
|
609
|
+
* @return String
|
|
839
610
|
*/
|
|
840
|
-
|
|
611
|
+
getType(name:string):string;
|
|
841
612
|
/**
|
|
842
|
-
*
|
|
843
|
-
*
|
|
613
|
+
* 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
|
|
614
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
615
|
+
* than 19 unique values.
|
|
616
|
+
* @return Map of String double
|
|
844
617
|
*/
|
|
845
|
-
get
|
|
618
|
+
get uniqueValues():Map<string, number>;
|
|
846
619
|
/**
|
|
847
|
-
*
|
|
848
|
-
*
|
|
620
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
621
|
+
* <p>
|
|
622
|
+
* A map of each statistic's name to its value.
|
|
623
|
+
* @return Map of String and Object
|
|
849
624
|
*/
|
|
850
|
-
get
|
|
851
|
-
/**
|
|
852
|
-
* A list of the key columns.
|
|
853
|
-
* @return Column array.
|
|
854
|
-
*/
|
|
855
|
-
get keyColumns():Column[];
|
|
856
|
-
/**
|
|
857
|
-
* A list of the value Column objects
|
|
858
|
-
* @return {@link dh.Column} array.
|
|
859
|
-
*/
|
|
860
|
-
get valueColumns():Column[];
|
|
861
|
-
/**
|
|
862
|
-
* The source table for this Input Table
|
|
863
|
-
* @return dh.table
|
|
864
|
-
*/
|
|
865
|
-
get table():Table;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
export class QueryInfo {
|
|
869
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
870
|
-
static readonly EVENT_DISCONNECT:string;
|
|
871
|
-
static readonly EVENT_RECONNECT:string;
|
|
872
|
-
static readonly EVENT_CONNECT:string;
|
|
873
|
-
|
|
874
|
-
protected constructor();
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
export class CoreClient implements HasEventHandling {
|
|
878
|
-
static readonly EVENT_CONNECT:string;
|
|
879
|
-
static readonly EVENT_DISCONNECT:string;
|
|
880
|
-
static readonly EVENT_RECONNECT:string;
|
|
881
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
882
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
883
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
884
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
885
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
886
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
887
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
888
|
-
|
|
889
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
890
|
-
|
|
891
|
-
running():Promise<CoreClient>;
|
|
892
|
-
getServerUrl():string;
|
|
893
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
894
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
895
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
896
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
897
|
-
getServerConfigValues():Promise<string[][]>;
|
|
898
|
-
getStorageService():dh.storage.StorageService;
|
|
899
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
900
|
-
disconnect():void;
|
|
901
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
902
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
903
|
-
hasListeners(name:string):boolean;
|
|
904
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
/**
|
|
908
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
909
|
-
*/
|
|
910
|
-
export class BigDecimalWrapper {
|
|
911
|
-
protected constructor();
|
|
912
|
-
|
|
913
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
914
|
-
asNumber():number;
|
|
915
|
-
valueOf():string;
|
|
916
|
-
toString():string;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
export class DateWrapper extends LongWrapper {
|
|
920
|
-
protected constructor();
|
|
921
|
-
|
|
922
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
923
|
-
asDate():Date;
|
|
625
|
+
get statisticsMap():Map<string, object>;
|
|
924
626
|
}
|
|
925
|
-
|
|
926
627
|
/**
|
|
927
|
-
*
|
|
628
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
629
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
630
|
+
* are correctly freed.
|
|
928
631
|
*/
|
|
929
|
-
export
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
632
|
+
export interface WidgetExportedObject {
|
|
633
|
+
/**
|
|
634
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
635
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
636
|
+
* {@link Widget.sendMessage}.
|
|
637
|
+
* @return the string type of this server-side object, or null.
|
|
638
|
+
*/
|
|
639
|
+
readonly type?:string|null;
|
|
937
640
|
|
|
938
|
-
/**
|
|
939
|
-
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
940
|
-
*
|
|
941
|
-
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
942
|
-
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
943
|
-
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
944
|
-
*/
|
|
945
|
-
export class TreeTableConfig {
|
|
946
641
|
/**
|
|
947
|
-
*
|
|
642
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
643
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
644
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
948
645
|
*/
|
|
949
|
-
|
|
646
|
+
reexport():Promise<WidgetExportedObject>;
|
|
950
647
|
/**
|
|
951
|
-
*
|
|
648
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
649
|
+
* the same instance.
|
|
650
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
952
651
|
*/
|
|
953
|
-
|
|
652
|
+
fetch():Promise<any>;
|
|
954
653
|
/**
|
|
955
|
-
*
|
|
654
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
655
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
956
656
|
*/
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
657
|
+
close():void;
|
|
658
|
+
}
|
|
659
|
+
export interface TreeViewportData extends TableData {
|
|
660
|
+
get offset():number;
|
|
661
|
+
get columns():Array<Column>;
|
|
662
|
+
get rows():Array<TreeRow>;
|
|
960
663
|
}
|
|
961
|
-
|
|
962
664
|
/**
|
|
963
|
-
*
|
|
964
|
-
* authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
|
|
665
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
965
666
|
*/
|
|
966
|
-
export
|
|
967
|
-
|
|
667
|
+
export interface LocalDateWrapper {
|
|
668
|
+
valueOf():string;
|
|
669
|
+
getYear():number;
|
|
670
|
+
getMonthValue():number;
|
|
671
|
+
getDayOfMonth():number;
|
|
672
|
+
toString():string;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
export class LoginCredentials {
|
|
676
|
+
type?:string|null;
|
|
677
|
+
username?:string|null;
|
|
678
|
+
token?:string|null;
|
|
968
679
|
|
|
969
680
|
constructor();
|
|
970
681
|
}
|
|
@@ -1053,186 +764,55 @@ export namespace dh {
|
|
|
1053
764
|
toString():string;
|
|
1054
765
|
}
|
|
1055
766
|
|
|
1056
|
-
export class LongWrapper {
|
|
1057
|
-
protected constructor();
|
|
1058
|
-
|
|
1059
|
-
static ofString(str:string):LongWrapper;
|
|
1060
|
-
asNumber():number;
|
|
1061
|
-
valueOf():string;
|
|
1062
|
-
toString():string;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
767
|
/**
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
768
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
769
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
770
|
+
* inform the UI right away that they have taken place.
|
|
1068
771
|
*/
|
|
1069
|
-
export class
|
|
772
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
773
|
+
readonly description?:string|null;
|
|
774
|
+
readonly pluginName?:string|null;
|
|
775
|
+
readonly layoutHints?:null|LayoutHints;
|
|
776
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
777
|
+
static readonly EVENT_UPDATED:string;
|
|
778
|
+
static readonly EVENT_ROWADDED:string;
|
|
779
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
780
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
781
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
782
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
783
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
784
|
+
static readonly EVENT_DISCONNECT:string;
|
|
785
|
+
static readonly EVENT_RECONNECT:string;
|
|
786
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
787
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
788
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
789
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
790
|
+
|
|
791
|
+
protected constructor();
|
|
792
|
+
|
|
793
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1070
794
|
/**
|
|
1071
|
-
*
|
|
795
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
796
|
+
* caching a returned value.
|
|
797
|
+
* @param key -
|
|
798
|
+
* @return {@link dh.Column}
|
|
1072
799
|
*/
|
|
1073
|
-
|
|
800
|
+
findColumn(key:string):Column;
|
|
1074
801
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
802
|
+
* Retrieve multiple columns specified by the given names.
|
|
803
|
+
* @param keys -
|
|
804
|
+
* @return {@link dh.Column} array
|
|
1077
805
|
*/
|
|
1078
|
-
|
|
806
|
+
findColumns(keys:string[]):Column[];
|
|
807
|
+
isBlinkTable():boolean;
|
|
1079
808
|
/**
|
|
1080
|
-
*
|
|
1081
|
-
*
|
|
1082
|
-
*
|
|
1083
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
809
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
810
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
811
|
+
* @return Promise of dh.InputTable
|
|
1084
812
|
*/
|
|
1085
|
-
|
|
1086
|
-
includeOriginalColumns?:boolean|null;
|
|
813
|
+
inputTable():Promise<InputTable>;
|
|
1087
814
|
/**
|
|
1088
|
-
*
|
|
1089
|
-
*/
|
|
1090
|
-
includeDescriptions:boolean;
|
|
1091
|
-
|
|
1092
|
-
constructor();
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1097
|
-
* interpret these responses to see what to render, or how to respond.
|
|
1098
|
-
* <p>
|
|
1099
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1100
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1101
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1102
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1103
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
1104
|
-
* <p>
|
|
1105
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1106
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1107
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1108
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1109
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1110
|
-
* <p>
|
|
1111
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1112
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1113
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1114
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1115
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1116
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1117
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1118
|
-
* <p>
|
|
1119
|
-
* This can suggest several patterns for how plugins operate:
|
|
1120
|
-
* <ul>
|
|
1121
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1122
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1123
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1124
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1125
|
-
* provided to the JS API consumer.</li>
|
|
1126
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1127
|
-
* which provided them. One concrete example of this could have been
|
|
1128
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1129
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1130
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1131
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1132
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1133
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1134
|
-
* an internal table instance.</li>
|
|
1135
|
-
* </ul>
|
|
1136
|
-
*
|
|
1137
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1138
|
-
* <ul>
|
|
1139
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1140
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1141
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1142
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1143
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
1144
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1145
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1146
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1147
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1148
|
-
* </ul>
|
|
1149
|
-
*/
|
|
1150
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1151
|
-
static readonly EVENT_MESSAGE:string;
|
|
1152
|
-
static readonly EVENT_CLOSE:string;
|
|
1153
|
-
|
|
1154
|
-
protected constructor();
|
|
1155
|
-
|
|
1156
|
-
/**
|
|
1157
|
-
* Ends the client connection to the server.
|
|
1158
|
-
*/
|
|
1159
|
-
close():void;
|
|
1160
|
-
getDataAsBase64():string;
|
|
1161
|
-
getDataAsU8():Uint8Array;
|
|
1162
|
-
getDataAsString():string;
|
|
1163
|
-
/**
|
|
1164
|
-
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1165
|
-
* @param msg - string/buffer/view instance that represents data to send
|
|
1166
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
1167
|
-
*/
|
|
1168
|
-
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1169
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1170
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1171
|
-
hasListeners(name:string):boolean;
|
|
1172
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1173
|
-
/**
|
|
1174
|
-
*
|
|
1175
|
-
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1176
|
-
* them when finished using them.
|
|
1177
|
-
*/
|
|
1178
|
-
get exportedObjects():WidgetExportedObject[];
|
|
1179
|
-
/**
|
|
1180
|
-
*
|
|
1181
|
-
* @return the type of this widget
|
|
1182
|
-
*/
|
|
1183
|
-
get type():string;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
/**
|
|
1188
|
-
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1189
|
-
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1190
|
-
* inform the UI right away that they have taken place.
|
|
1191
|
-
*/
|
|
1192
|
-
export class Table implements JoinableTable, HasEventHandling {
|
|
1193
|
-
readonly description?:string|null;
|
|
1194
|
-
readonly pluginName?:string|null;
|
|
1195
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1196
|
-
static readonly EVENT_SIZECHANGED:string;
|
|
1197
|
-
static readonly EVENT_UPDATED:string;
|
|
1198
|
-
static readonly EVENT_ROWADDED:string;
|
|
1199
|
-
static readonly EVENT_ROWREMOVED:string;
|
|
1200
|
-
static readonly EVENT_ROWUPDATED:string;
|
|
1201
|
-
static readonly EVENT_SORTCHANGED:string;
|
|
1202
|
-
static readonly EVENT_FILTERCHANGED:string;
|
|
1203
|
-
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1204
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1205
|
-
static readonly EVENT_RECONNECT:string;
|
|
1206
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1207
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1208
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1209
|
-
static readonly SIZE_UNCOALESCED:number;
|
|
1210
|
-
|
|
1211
|
-
protected constructor();
|
|
1212
|
-
|
|
1213
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1214
|
-
/**
|
|
1215
|
-
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
1216
|
-
* caching a returned value.
|
|
1217
|
-
* @param key -
|
|
1218
|
-
* @return {@link dh.Column}
|
|
1219
|
-
*/
|
|
1220
|
-
findColumn(key:string):Column;
|
|
1221
|
-
/**
|
|
1222
|
-
* Retrieve multiple columns specified by the given names.
|
|
1223
|
-
* @param keys -
|
|
1224
|
-
* @return {@link dh.Column} array
|
|
1225
|
-
*/
|
|
1226
|
-
findColumns(keys:string[]):Column[];
|
|
1227
|
-
isBlinkTable():boolean;
|
|
1228
|
-
/**
|
|
1229
|
-
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
1230
|
-
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
1231
|
-
* @return Promise of dh.InputTable
|
|
1232
|
-
*/
|
|
1233
|
-
inputTable():Promise<InputTable>;
|
|
1234
|
-
/**
|
|
1235
|
-
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
815
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
1236
816
|
*/
|
|
1237
817
|
close():void;
|
|
1238
818
|
getAttributes():string[];
|
|
@@ -1490,84 +1070,318 @@ export namespace dh {
|
|
|
1490
1070
|
static reverse():Sort;
|
|
1491
1071
|
}
|
|
1492
1072
|
|
|
1073
|
+
|
|
1493
1074
|
/**
|
|
1494
|
-
*
|
|
1495
|
-
* to
|
|
1496
|
-
* methods return a new Sort instance.
|
|
1075
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
1076
|
+
* the server to get each Table. All tables will have the same structure.
|
|
1497
1077
|
*/
|
|
1498
|
-
export class
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1078
|
+
export class PartitionedTable implements HasEventHandling {
|
|
1079
|
+
/**
|
|
1080
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1081
|
+
*/
|
|
1082
|
+
static readonly EVENT_KEYADDED:string;
|
|
1083
|
+
/**
|
|
1084
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1085
|
+
*/
|
|
1086
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1087
|
+
/**
|
|
1088
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1089
|
+
*/
|
|
1090
|
+
static readonly EVENT_RECONNECT:string;
|
|
1091
|
+
/**
|
|
1092
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1093
|
+
*/
|
|
1094
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1502
1095
|
|
|
1503
1096
|
protected constructor();
|
|
1504
1097
|
|
|
1098
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
1505
1099
|
/**
|
|
1506
|
-
*
|
|
1507
|
-
* @
|
|
1100
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
1101
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
1102
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
1508
1103
|
*/
|
|
1509
|
-
|
|
1104
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
1510
1105
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1106
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
1107
|
+
* {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
|
|
1108
|
+
* @return A merged representation of the constituent tables.
|
|
1513
1109
|
*/
|
|
1514
|
-
|
|
1110
|
+
getMergedTable():Promise<Table>;
|
|
1515
1111
|
/**
|
|
1516
|
-
*
|
|
1517
|
-
*
|
|
1112
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
1113
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
1114
|
+
* @return Set of Object
|
|
1518
1115
|
*/
|
|
1519
|
-
|
|
1520
|
-
toString():string;
|
|
1116
|
+
getKeys():Set<object>;
|
|
1521
1117
|
/**
|
|
1522
|
-
*
|
|
1523
|
-
* @return
|
|
1118
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
1119
|
+
* @return Promise of a Table
|
|
1120
|
+
* @deprecated
|
|
1524
1121
|
*/
|
|
1525
|
-
|
|
1122
|
+
getKeyTable():Promise<Table>;
|
|
1526
1123
|
/**
|
|
1527
|
-
*
|
|
1528
|
-
* @return
|
|
1124
|
+
* Fetch the underlying base table of the partitioned table.
|
|
1125
|
+
* @return Promise of a Table
|
|
1529
1126
|
*/
|
|
1530
|
-
|
|
1127
|
+
getBaseTable():Promise<Table>;
|
|
1531
1128
|
/**
|
|
1532
|
-
*
|
|
1533
|
-
*
|
|
1129
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
1130
|
+
* will not affect tables in use.
|
|
1534
1131
|
*/
|
|
1535
|
-
|
|
1132
|
+
close():void;
|
|
1133
|
+
/**
|
|
1134
|
+
* The count of known keys.
|
|
1135
|
+
* @return int
|
|
1136
|
+
*/
|
|
1137
|
+
get size():number;
|
|
1138
|
+
/**
|
|
1139
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
1140
|
+
* non-key columns.
|
|
1141
|
+
* @return Array of Column
|
|
1142
|
+
*/
|
|
1143
|
+
get columns():Column[];
|
|
1144
|
+
/**
|
|
1145
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
1146
|
+
* @return Array of Column
|
|
1147
|
+
*/
|
|
1148
|
+
get keyColumns():Column[];
|
|
1149
|
+
/**
|
|
1150
|
+
* Listen for events on this object.
|
|
1151
|
+
* @param name - the name of the event to listen for
|
|
1152
|
+
* @param callback - a function to call when the event occurs
|
|
1153
|
+
* @return Returns a cleanup function.
|
|
1154
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1155
|
+
*/
|
|
1156
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1157
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1158
|
+
hasListeners(name:string):boolean;
|
|
1159
|
+
/**
|
|
1160
|
+
* Removes an event listener added to this table.
|
|
1161
|
+
* @param name -
|
|
1162
|
+
* @param callback -
|
|
1163
|
+
* @return
|
|
1164
|
+
* @typeParam T -
|
|
1165
|
+
*/
|
|
1166
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1536
1167
|
}
|
|
1537
1168
|
|
|
1538
1169
|
/**
|
|
1539
|
-
*
|
|
1540
|
-
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1541
|
-
* instance.
|
|
1170
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1542
1171
|
*/
|
|
1543
|
-
export class
|
|
1172
|
+
export class BigDecimalWrapper {
|
|
1544
1173
|
protected constructor();
|
|
1545
1174
|
|
|
1175
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
1176
|
+
asNumber():number;
|
|
1177
|
+
valueOf():string;
|
|
1178
|
+
toString():string;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
1183
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
1184
|
+
*/
|
|
1185
|
+
export class IdeConnection implements HasEventHandling {
|
|
1546
1186
|
/**
|
|
1547
|
-
*
|
|
1548
|
-
* @return FilterCondition
|
|
1187
|
+
* @deprecated
|
|
1549
1188
|
*/
|
|
1550
|
-
|
|
1189
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
1190
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1191
|
+
static readonly EVENT_RECONNECT:string;
|
|
1192
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
1193
|
+
|
|
1551
1194
|
/**
|
|
1552
|
-
* a
|
|
1553
|
-
* @param
|
|
1554
|
-
* @
|
|
1195
|
+
* creates a new instance, from which console sessions can be made. <b>options</b> are optional.
|
|
1196
|
+
* @param serverUrl - The url used when connecting to the server. Read-only.
|
|
1197
|
+
* @param connectOptions - Optional Object
|
|
1198
|
+
* @param fromJava - Optional boolean
|
|
1199
|
+
* @deprecated
|
|
1555
1200
|
*/
|
|
1556
|
-
|
|
1201
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
|
|
1202
|
+
|
|
1557
1203
|
/**
|
|
1558
|
-
*
|
|
1559
|
-
* @param filters -
|
|
1560
|
-
* @return FilterCondition.
|
|
1204
|
+
* closes the current connection, releasing any resources on the server or client.
|
|
1561
1205
|
*/
|
|
1562
|
-
|
|
1206
|
+
close():void;
|
|
1207
|
+
running():Promise<IdeConnection>;
|
|
1208
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1209
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1563
1210
|
/**
|
|
1564
|
-
* a
|
|
1565
|
-
*
|
|
1211
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
1212
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1213
|
+
* log messages as are presently available.
|
|
1214
|
+
* @param callback -
|
|
1215
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1566
1216
|
*/
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1217
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1218
|
+
startSession(type:string):Promise<IdeSession>;
|
|
1219
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
1220
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1221
|
+
/**
|
|
1222
|
+
* Listen for events on this object.
|
|
1223
|
+
* @param name - the name of the event to listen for
|
|
1224
|
+
* @param callback - a function to call when the event occurs
|
|
1225
|
+
* @return Returns a cleanup function.
|
|
1226
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1227
|
+
*/
|
|
1228
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1229
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1230
|
+
hasListeners(name:string):boolean;
|
|
1231
|
+
/**
|
|
1232
|
+
* Removes an event listener added to this table.
|
|
1233
|
+
* @param name -
|
|
1234
|
+
* @param callback -
|
|
1235
|
+
* @return
|
|
1236
|
+
* @typeParam T -
|
|
1237
|
+
*/
|
|
1238
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
export class IdeSession implements HasEventHandling {
|
|
1242
|
+
static readonly EVENT_COMMANDSTARTED:string;
|
|
1243
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1244
|
+
|
|
1245
|
+
protected constructor();
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Load the named table, with columns and size information already fully populated.
|
|
1249
|
+
* @param name -
|
|
1250
|
+
* @param applyPreviewColumns - optional boolean
|
|
1251
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1252
|
+
*/
|
|
1253
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
1256
|
+
* @param name -
|
|
1257
|
+
* @return promise of dh.plot.Figure
|
|
1258
|
+
*/
|
|
1259
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
1262
|
+
* size is presently not available until the viewport is first set.
|
|
1263
|
+
* @param name -
|
|
1264
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
1265
|
+
*/
|
|
1266
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
1267
|
+
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
1268
|
+
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
1269
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1270
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
1271
|
+
/**
|
|
1272
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
1273
|
+
* @param tables -
|
|
1274
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1275
|
+
*/
|
|
1276
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
1277
|
+
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
1278
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1279
|
+
close():void;
|
|
1280
|
+
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
1281
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1282
|
+
openDocument(params:object):void;
|
|
1283
|
+
changeDocument(params:object):void;
|
|
1284
|
+
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
1285
|
+
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
1286
|
+
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
1287
|
+
closeDocument(params:object):void;
|
|
1288
|
+
/**
|
|
1289
|
+
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
1290
|
+
* values will be null.
|
|
1291
|
+
* @param size -
|
|
1292
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1293
|
+
*/
|
|
1294
|
+
emptyTable(size:number):Promise<Table>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
1297
|
+
* the table will be populated with the interval from the specified date until now.
|
|
1298
|
+
* @param periodNanos -
|
|
1299
|
+
* @param startTime -
|
|
1300
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
1301
|
+
*/
|
|
1302
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
1303
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1304
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1305
|
+
hasListeners(name:string):boolean;
|
|
1306
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export class QueryInfo {
|
|
1310
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
1311
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1312
|
+
static readonly EVENT_RECONNECT:string;
|
|
1313
|
+
static readonly EVENT_CONNECT:string;
|
|
1314
|
+
|
|
1315
|
+
protected constructor();
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
1320
|
+
*
|
|
1321
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
1322
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
1323
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
1324
|
+
*/
|
|
1325
|
+
export class TreeTableConfig {
|
|
1326
|
+
/**
|
|
1327
|
+
* The column representing the unique ID for each item
|
|
1328
|
+
*/
|
|
1329
|
+
idColumn:string;
|
|
1330
|
+
/**
|
|
1331
|
+
* The column representing the parent ID for each item
|
|
1332
|
+
*/
|
|
1333
|
+
parentColumn:string;
|
|
1334
|
+
/**
|
|
1335
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
1336
|
+
*/
|
|
1337
|
+
promoteOrphansToRoot:boolean;
|
|
1338
|
+
|
|
1339
|
+
constructor();
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Presently optional and not used by the server, this allows the client to specify some authentication details. String
|
|
1344
|
+
* authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
|
|
1345
|
+
*/
|
|
1346
|
+
export class ConnectOptions {
|
|
1347
|
+
headers:{ [key: string]: string; };
|
|
1348
|
+
|
|
1349
|
+
constructor();
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1354
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1355
|
+
* instance.
|
|
1356
|
+
*/
|
|
1357
|
+
export class FilterCondition {
|
|
1358
|
+
protected constructor();
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* the opposite of this condition
|
|
1362
|
+
* @return FilterCondition
|
|
1363
|
+
*/
|
|
1364
|
+
not():FilterCondition;
|
|
1365
|
+
/**
|
|
1366
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
1367
|
+
* @param filters -
|
|
1368
|
+
* @return FilterCondition
|
|
1369
|
+
*/
|
|
1370
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
1371
|
+
/**
|
|
1372
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
1373
|
+
* @param filters -
|
|
1374
|
+
* @return FilterCondition.
|
|
1375
|
+
*/
|
|
1376
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
1377
|
+
/**
|
|
1378
|
+
* a string suitable for debugging showing the details of this condition.
|
|
1379
|
+
* @return String.
|
|
1380
|
+
*/
|
|
1381
|
+
toString():string;
|
|
1382
|
+
get columns():Array<Column>;
|
|
1383
|
+
/**
|
|
1384
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1571
1385
|
* functions:
|
|
1572
1386
|
* <ul>
|
|
1573
1387
|
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
@@ -1609,175 +1423,39 @@ export namespace dh {
|
|
|
1609
1423
|
}
|
|
1610
1424
|
|
|
1611
1425
|
/**
|
|
1612
|
-
*
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1615
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1616
|
-
* instance.
|
|
1426
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1427
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1428
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1617
1429
|
*/
|
|
1618
|
-
export class
|
|
1430
|
+
export class RangeSet {
|
|
1619
1431
|
protected constructor();
|
|
1620
1432
|
|
|
1433
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
1434
|
+
static ofItems(rows:number[]):RangeSet;
|
|
1435
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
1436
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
1621
1437
|
/**
|
|
1622
|
-
*
|
|
1623
|
-
* {@link
|
|
1624
|
-
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1625
|
-
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1626
|
-
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1627
|
-
* @param input - the number to wrap as a FilterValue
|
|
1628
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1629
|
-
*/
|
|
1630
|
-
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1631
|
-
/**
|
|
1632
|
-
* a filter condition checking if the current value is equal to the given parameter
|
|
1633
|
-
* @param term -
|
|
1634
|
-
* @return {@link dh.FilterCondition}
|
|
1635
|
-
*/
|
|
1636
|
-
eq(term:FilterValue):FilterCondition;
|
|
1637
|
-
/**
|
|
1638
|
-
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1639
|
-
* vs lower case
|
|
1640
|
-
* @param term -
|
|
1641
|
-
* @return {@link dh.FilterCondition}
|
|
1642
|
-
*/
|
|
1643
|
-
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1644
|
-
/**
|
|
1645
|
-
* a filter condition checking if the current value is not equal to the given parameter
|
|
1646
|
-
* @param term -
|
|
1647
|
-
* @return {@link dh.FilterCondition}
|
|
1648
|
-
*/
|
|
1649
|
-
notEq(term:FilterValue):FilterCondition;
|
|
1650
|
-
/**
|
|
1651
|
-
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1652
|
-
* upper vs lower case
|
|
1653
|
-
* @param term -
|
|
1654
|
-
* @return {@link dh.FilterCondition}
|
|
1655
|
-
*/
|
|
1656
|
-
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1657
|
-
/**
|
|
1658
|
-
* a filter condition checking if the current value is greater than the given parameter
|
|
1659
|
-
* @param term -
|
|
1660
|
-
* @return {@link dh.FilterCondition}
|
|
1661
|
-
*/
|
|
1662
|
-
greaterThan(term:FilterValue):FilterCondition;
|
|
1663
|
-
/**
|
|
1664
|
-
* a filter condition checking if the current value is less than the given parameter
|
|
1665
|
-
* @param term -
|
|
1666
|
-
* @return {@link dh.FilterCondition}
|
|
1667
|
-
*/
|
|
1668
|
-
lessThan(term:FilterValue):FilterCondition;
|
|
1669
|
-
/**
|
|
1670
|
-
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1671
|
-
* @param term -
|
|
1672
|
-
* @return {@link dh.FilterCondition}
|
|
1673
|
-
*/
|
|
1674
|
-
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1675
|
-
/**
|
|
1676
|
-
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1677
|
-
* @param term -
|
|
1678
|
-
* @return {@link dh.FilterCondition}
|
|
1438
|
+
* a new iterator over all indexes in this collection.
|
|
1439
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
1679
1440
|
*/
|
|
1680
|
-
|
|
1441
|
+
iterator():Iterator<LongWrapper>;
|
|
1681
1442
|
/**
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1684
|
-
*
|
|
1443
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
1444
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
1445
|
+
* property each time through a loop).
|
|
1446
|
+
* @return double
|
|
1685
1447
|
*/
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
* @return {@link dh.FilterCondition}
|
|
1698
|
-
*/
|
|
1699
|
-
notIn(terms:FilterValue[]):FilterCondition;
|
|
1700
|
-
/**
|
|
1701
|
-
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1702
|
-
* upper vs lower case
|
|
1703
|
-
* @param terms -
|
|
1704
|
-
* @return {@link dh.FilterCondition}
|
|
1705
|
-
*/
|
|
1706
|
-
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1707
|
-
/**
|
|
1708
|
-
* a filter condition checking if the given value contains the given string value
|
|
1709
|
-
* @param term -
|
|
1710
|
-
* @return {@link dh.FilterCondition}
|
|
1711
|
-
*/
|
|
1712
|
-
contains(term:FilterValue):FilterCondition;
|
|
1713
|
-
/**
|
|
1714
|
-
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1715
|
-
* lower case
|
|
1716
|
-
* @param term -
|
|
1717
|
-
* @return {@link dh.FilterCondition}
|
|
1718
|
-
*/
|
|
1719
|
-
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1720
|
-
/**
|
|
1721
|
-
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1722
|
-
* use Java regex syntax
|
|
1723
|
-
* @param pattern -
|
|
1724
|
-
* @return {@link dh.FilterCondition}
|
|
1725
|
-
*/
|
|
1726
|
-
matches(pattern:FilterValue):FilterCondition;
|
|
1727
|
-
/**
|
|
1728
|
-
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1729
|
-
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1730
|
-
* @param pattern -
|
|
1731
|
-
* @return {@link dh.FilterCondition}
|
|
1732
|
-
*/
|
|
1733
|
-
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1734
|
-
/**
|
|
1735
|
-
* a filter condition checking if the current value is a true boolean
|
|
1736
|
-
* @return {@link dh.FilterCondition}
|
|
1737
|
-
*/
|
|
1738
|
-
isTrue():FilterCondition;
|
|
1739
|
-
/**
|
|
1740
|
-
* a filter condition checking if the current value is a false boolean
|
|
1741
|
-
* @return {@link dh.FilterCondition}
|
|
1742
|
-
*/
|
|
1743
|
-
isFalse():FilterCondition;
|
|
1744
|
-
/**
|
|
1745
|
-
* a filter condition checking if the current value is a null value
|
|
1746
|
-
* @return {@link dh.FilterCondition}
|
|
1747
|
-
*/
|
|
1748
|
-
isNull():FilterCondition;
|
|
1749
|
-
/**
|
|
1750
|
-
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
1751
|
-
* functions that can be invoked on a String:
|
|
1752
|
-
* <ul>
|
|
1753
|
-
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1754
|
-
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1755
|
-
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1756
|
-
* regular expression</li>
|
|
1757
|
-
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1758
|
-
* <p>
|
|
1759
|
-
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1760
|
-
* </p>
|
|
1761
|
-
* </li>
|
|
1762
|
-
* </ul>
|
|
1763
|
-
* @param method -
|
|
1764
|
-
* @param args -
|
|
1765
|
-
* @return
|
|
1766
|
-
*/
|
|
1767
|
-
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
1768
|
-
toString():string;
|
|
1769
|
-
/**
|
|
1770
|
-
* Constructs a string for the filter API from the given parameter.
|
|
1771
|
-
* @param input -
|
|
1772
|
-
* @return
|
|
1773
|
-
*/
|
|
1774
|
-
static ofString(input:any):FilterValue;
|
|
1775
|
-
/**
|
|
1776
|
-
* Constructs a boolean for the filter API from the given parameter.
|
|
1777
|
-
* @param b -
|
|
1778
|
-
* @return
|
|
1779
|
-
*/
|
|
1780
|
-
static ofBoolean(b:boolean):FilterValue;
|
|
1448
|
+
get size():number;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* Event fired when a command is issued from the client.
|
|
1453
|
+
*/
|
|
1454
|
+
export class CommandInfo {
|
|
1455
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1456
|
+
|
|
1457
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
1458
|
+
get code():string;
|
|
1781
1459
|
}
|
|
1782
1460
|
|
|
1783
1461
|
/**
|
|
@@ -1795,82 +1473,304 @@ export namespace dh {
|
|
|
1795
1473
|
}
|
|
1796
1474
|
|
|
1797
1475
|
/**
|
|
1798
|
-
*
|
|
1799
|
-
*
|
|
1476
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1477
|
+
* interpret these responses to see what to render, or how to respond.
|
|
1478
|
+
* <p>
|
|
1479
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1480
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1481
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1482
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1483
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
1484
|
+
* <p>
|
|
1485
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1486
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1487
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1488
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1489
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1490
|
+
* <p>
|
|
1491
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1492
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1493
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1494
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1495
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1496
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1497
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1498
|
+
* <p>
|
|
1499
|
+
* This can suggest several patterns for how plugins operate:
|
|
1500
|
+
* <ul>
|
|
1501
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1502
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1503
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1504
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1505
|
+
* provided to the JS API consumer.</li>
|
|
1506
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1507
|
+
* which provided them. One concrete example of this could have been
|
|
1508
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1509
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1510
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1511
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1512
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1513
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1514
|
+
* an internal table instance.</li>
|
|
1515
|
+
* </ul>
|
|
1516
|
+
*
|
|
1517
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1518
|
+
* <ul>
|
|
1519
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1520
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1521
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1522
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1523
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
1524
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1525
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1526
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1527
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1528
|
+
* </ul>
|
|
1800
1529
|
*/
|
|
1801
|
-
export class
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1805
|
-
* @return String
|
|
1806
|
-
*/
|
|
1807
|
-
readonly constituentType?:string|null;
|
|
1808
|
-
readonly description?:string|null;
|
|
1530
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1531
|
+
static readonly EVENT_MESSAGE:string;
|
|
1532
|
+
static readonly EVENT_CLOSE:string;
|
|
1809
1533
|
|
|
1810
1534
|
protected constructor();
|
|
1811
1535
|
|
|
1812
1536
|
/**
|
|
1813
|
-
*
|
|
1814
|
-
* @param row -
|
|
1815
|
-
* @return Any
|
|
1537
|
+
* Ends the client connection to the server.
|
|
1816
1538
|
*/
|
|
1817
|
-
|
|
1818
|
-
|
|
1539
|
+
close():void;
|
|
1540
|
+
getDataAsBase64():string;
|
|
1541
|
+
getDataAsU8():Uint8Array;
|
|
1542
|
+
getDataAsString():string;
|
|
1819
1543
|
/**
|
|
1820
|
-
*
|
|
1821
|
-
* @
|
|
1544
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1545
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
1546
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
1822
1547
|
*/
|
|
1823
|
-
|
|
1548
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1549
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1550
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1551
|
+
hasListeners(name:string):boolean;
|
|
1552
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1824
1553
|
/**
|
|
1825
|
-
*
|
|
1826
|
-
*
|
|
1827
|
-
*
|
|
1554
|
+
*
|
|
1555
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1556
|
+
* them when finished using them.
|
|
1828
1557
|
*/
|
|
1829
|
-
|
|
1558
|
+
get exportedObjects():WidgetExportedObject[];
|
|
1830
1559
|
/**
|
|
1831
|
-
*
|
|
1832
|
-
* @
|
|
1833
|
-
* @return {@link dh.CustomColumn}
|
|
1560
|
+
*
|
|
1561
|
+
* @return the type of this widget
|
|
1834
1562
|
*/
|
|
1835
|
-
|
|
1563
|
+
get type():string;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1568
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
1569
|
+
* methods return a new Sort instance.
|
|
1570
|
+
*/
|
|
1571
|
+
export class Sort {
|
|
1572
|
+
static readonly ASCENDING:string;
|
|
1573
|
+
static readonly DESCENDING:string;
|
|
1574
|
+
static readonly REVERSE:string;
|
|
1575
|
+
|
|
1576
|
+
protected constructor();
|
|
1577
|
+
|
|
1836
1578
|
/**
|
|
1837
|
-
* a
|
|
1838
|
-
* @
|
|
1839
|
-
* @return {@link dh.CustomColumn}
|
|
1579
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
1580
|
+
* @return {@link dh.Sort}
|
|
1840
1581
|
*/
|
|
1841
|
-
|
|
1582
|
+
asc():Sort;
|
|
1842
1583
|
/**
|
|
1843
|
-
* a
|
|
1844
|
-
* @
|
|
1845
|
-
* @return {@link dh.CustomColumn}
|
|
1584
|
+
* Builds a Sort instance to sort values in descending order.
|
|
1585
|
+
* @return {@link dh.Sort}
|
|
1846
1586
|
*/
|
|
1847
|
-
|
|
1848
|
-
toString():string;
|
|
1587
|
+
desc():Sort;
|
|
1849
1588
|
/**
|
|
1850
|
-
*
|
|
1851
|
-
* @return
|
|
1589
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1590
|
+
* @return {@link dh.Sort}
|
|
1852
1591
|
*/
|
|
1853
|
-
|
|
1592
|
+
abs():Sort;
|
|
1593
|
+
toString():string;
|
|
1854
1594
|
/**
|
|
1855
|
-
* True if
|
|
1856
|
-
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
1595
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1857
1596
|
* @return boolean
|
|
1858
1597
|
*/
|
|
1859
|
-
get
|
|
1598
|
+
get isAbs():boolean;
|
|
1860
1599
|
/**
|
|
1861
|
-
*
|
|
1862
|
-
* @
|
|
1863
|
-
* @return int
|
|
1600
|
+
* The column which is sorted.
|
|
1601
|
+
* @return {@link dh.Column}
|
|
1864
1602
|
*/
|
|
1865
|
-
get
|
|
1866
|
-
get isSortable():boolean;
|
|
1603
|
+
get column():Column;
|
|
1867
1604
|
/**
|
|
1868
|
-
*
|
|
1605
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
1869
1606
|
* @return String
|
|
1870
1607
|
*/
|
|
1871
|
-
get
|
|
1872
|
-
|
|
1873
|
-
|
|
1608
|
+
get direction():string;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
export class CustomColumn {
|
|
1612
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
1613
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1614
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
1615
|
+
static readonly TYPE_NEW:string;
|
|
1616
|
+
|
|
1617
|
+
protected constructor();
|
|
1618
|
+
|
|
1619
|
+
valueOf():string;
|
|
1620
|
+
toString():string;
|
|
1621
|
+
/**
|
|
1622
|
+
* The expression to evaluate this custom column.
|
|
1623
|
+
* @return String
|
|
1624
|
+
*/
|
|
1625
|
+
get expression():string;
|
|
1626
|
+
/**
|
|
1627
|
+
* The name of the column to use.
|
|
1628
|
+
* @return String
|
|
1629
|
+
*/
|
|
1630
|
+
get name():string;
|
|
1631
|
+
/**
|
|
1632
|
+
* Type of custom column. One of
|
|
1633
|
+
*
|
|
1634
|
+
* <ul>
|
|
1635
|
+
* <li>FORMAT_COLOR</li>
|
|
1636
|
+
* <li>FORMAT_NUMBER</li>
|
|
1637
|
+
* <li>FORMAT_DATE</li>
|
|
1638
|
+
* <li>NEW</li>
|
|
1639
|
+
* </ul>
|
|
1640
|
+
* @return String
|
|
1641
|
+
*/
|
|
1642
|
+
get type():string;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
export class LongWrapper {
|
|
1646
|
+
protected constructor();
|
|
1647
|
+
|
|
1648
|
+
static ofString(str:string):LongWrapper;
|
|
1649
|
+
asNumber():number;
|
|
1650
|
+
valueOf():string;
|
|
1651
|
+
toString():string;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
export class Ide {
|
|
1655
|
+
constructor();
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* @deprecated
|
|
1659
|
+
*/
|
|
1660
|
+
getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1661
|
+
/**
|
|
1662
|
+
* @deprecated
|
|
1663
|
+
*/
|
|
1664
|
+
static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
export class CoreClient implements HasEventHandling {
|
|
1668
|
+
static readonly EVENT_CONNECT:string;
|
|
1669
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1670
|
+
static readonly EVENT_RECONNECT:string;
|
|
1671
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1672
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1673
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1674
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1675
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1676
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1677
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1678
|
+
|
|
1679
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1680
|
+
|
|
1681
|
+
running():Promise<CoreClient>;
|
|
1682
|
+
getServerUrl():string;
|
|
1683
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
1684
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
1685
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
1686
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1687
|
+
getServerConfigValues():Promise<string[][]>;
|
|
1688
|
+
getStorageService():dh.storage.StorageService;
|
|
1689
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
1690
|
+
disconnect():void;
|
|
1691
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1692
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1693
|
+
hasListeners(name:string):boolean;
|
|
1694
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
/**
|
|
1698
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1699
|
+
* column.
|
|
1700
|
+
*/
|
|
1701
|
+
export class Column {
|
|
1702
|
+
/**
|
|
1703
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1704
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1705
|
+
* @return String
|
|
1706
|
+
*/
|
|
1707
|
+
readonly constituentType?:string|null;
|
|
1708
|
+
readonly description?:string|null;
|
|
1709
|
+
|
|
1710
|
+
protected constructor();
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1714
|
+
* @param row -
|
|
1715
|
+
* @return Any
|
|
1716
|
+
*/
|
|
1717
|
+
get(row:Row):any;
|
|
1718
|
+
getFormat(row:Row):Format;
|
|
1719
|
+
/**
|
|
1720
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
1721
|
+
* @return {@link dh.Sort}
|
|
1722
|
+
*/
|
|
1723
|
+
sort():Sort;
|
|
1724
|
+
/**
|
|
1725
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1726
|
+
* operation, or as a builder to create a filter operation.
|
|
1727
|
+
* @return {@link dh.FilterValue}
|
|
1728
|
+
*/
|
|
1729
|
+
filter():FilterValue;
|
|
1730
|
+
/**
|
|
1731
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1732
|
+
* @param expression -
|
|
1733
|
+
* @return {@link dh.CustomColumn}
|
|
1734
|
+
*/
|
|
1735
|
+
formatColor(expression:string):CustomColumn;
|
|
1736
|
+
/**
|
|
1737
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1738
|
+
* @param expression -
|
|
1739
|
+
* @return {@link dh.CustomColumn}
|
|
1740
|
+
*/
|
|
1741
|
+
formatNumber(expression:string):CustomColumn;
|
|
1742
|
+
/**
|
|
1743
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1744
|
+
* @param expression -
|
|
1745
|
+
* @return {@link dh.CustomColumn}
|
|
1746
|
+
*/
|
|
1747
|
+
formatDate(expression:string):CustomColumn;
|
|
1748
|
+
toString():string;
|
|
1749
|
+
/**
|
|
1750
|
+
* Label for this column.
|
|
1751
|
+
* @return String
|
|
1752
|
+
*/
|
|
1753
|
+
get name():string;
|
|
1754
|
+
/**
|
|
1755
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
|
|
1756
|
+
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
1757
|
+
* @return boolean
|
|
1758
|
+
*/
|
|
1759
|
+
get isPartitionColumn():boolean;
|
|
1760
|
+
/**
|
|
1761
|
+
*
|
|
1762
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1763
|
+
* @return int
|
|
1764
|
+
*/
|
|
1765
|
+
get index():number;
|
|
1766
|
+
get isSortable():boolean;
|
|
1767
|
+
/**
|
|
1768
|
+
* Type of the row data that can be found in this column.
|
|
1769
|
+
* @return String
|
|
1770
|
+
*/
|
|
1771
|
+
get type():string;
|
|
1772
|
+
/**
|
|
1773
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
1874
1774
|
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1875
1775
|
* @param expression -
|
|
1876
1776
|
* @return {@link dh.CustomColumn}
|
|
@@ -1885,6 +1785,36 @@ export namespace dh {
|
|
|
1885
1785
|
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
1886
1786
|
}
|
|
1887
1787
|
|
|
1788
|
+
/**
|
|
1789
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
1790
|
+
* roll-up table.
|
|
1791
|
+
*/
|
|
1792
|
+
export class RollupConfig {
|
|
1793
|
+
/**
|
|
1794
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
1795
|
+
*/
|
|
1796
|
+
groupingColumns:Array<String>;
|
|
1797
|
+
/**
|
|
1798
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1799
|
+
* roll-up table.
|
|
1800
|
+
*/
|
|
1801
|
+
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
1802
|
+
/**
|
|
1803
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
1804
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
1805
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1806
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1807
|
+
*/
|
|
1808
|
+
includeConstituents:boolean;
|
|
1809
|
+
includeOriginalColumns?:boolean|null;
|
|
1810
|
+
/**
|
|
1811
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
1812
|
+
*/
|
|
1813
|
+
includeDescriptions:boolean;
|
|
1814
|
+
|
|
1815
|
+
constructor();
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1888
1818
|
/**
|
|
1889
1819
|
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1890
1820
|
* mechanism, and so reimplemented here.
|
|
@@ -2100,254 +2030,330 @@ export namespace dh {
|
|
|
2100
2030
|
}
|
|
2101
2031
|
|
|
2102
2032
|
/**
|
|
2103
|
-
*
|
|
2104
|
-
* the server to get each Table. All tables will have the same structure.
|
|
2033
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2105
2034
|
*/
|
|
2106
|
-
export class
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2035
|
+
export class BigIntegerWrapper {
|
|
2036
|
+
protected constructor();
|
|
2037
|
+
|
|
2038
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
2039
|
+
asNumber():number;
|
|
2040
|
+
valueOf():string;
|
|
2041
|
+
toString():string;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
2046
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
2047
|
+
*
|
|
2048
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
2049
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
2050
|
+
* forward data to it.
|
|
2051
|
+
*
|
|
2052
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
2053
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
2054
|
+
* viewports to make it less expensive to compute for large tables.
|
|
2055
|
+
*/
|
|
2056
|
+
export class TableSubscription implements HasEventHandling {
|
|
2119
2057
|
/**
|
|
2120
|
-
* Indicates that
|
|
2058
|
+
* Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
|
|
2059
|
+
* <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
|
|
2060
|
+
* allowing access to the entire range of items currently in the subscribed columns.
|
|
2121
2061
|
*/
|
|
2122
|
-
static readonly
|
|
2062
|
+
static readonly EVENT_UPDATED:string;
|
|
2123
2063
|
|
|
2124
2064
|
protected constructor();
|
|
2125
2065
|
|
|
2126
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2127
2066
|
/**
|
|
2128
|
-
*
|
|
2129
|
-
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
2130
|
-
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
2067
|
+
* Stops the subscription on the server.
|
|
2131
2068
|
*/
|
|
2132
|
-
|
|
2069
|
+
close():void;
|
|
2070
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2071
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2072
|
+
hasListeners(name:string):boolean;
|
|
2073
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2133
2074
|
/**
|
|
2134
|
-
*
|
|
2135
|
-
* {@link
|
|
2136
|
-
* @return A merged representation of the constituent tables.
|
|
2075
|
+
* The columns that were subscribed to when this subscription was created
|
|
2076
|
+
* @return {@link dh.Column}
|
|
2137
2077
|
*/
|
|
2138
|
-
|
|
2078
|
+
get columns():Array<Column>;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* Deprecated for use in Deephaven Core.
|
|
2083
|
+
* @deprecated
|
|
2084
|
+
*/
|
|
2085
|
+
export class Client {
|
|
2086
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2087
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2088
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2089
|
+
|
|
2090
|
+
constructor();
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
2095
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
2096
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
2097
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
2098
|
+
* instance.
|
|
2099
|
+
*/
|
|
2100
|
+
export class FilterValue {
|
|
2101
|
+
protected constructor();
|
|
2102
|
+
|
|
2139
2103
|
/**
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
*
|
|
2104
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
2105
|
+
* {@link TableData.get} for DateTime values. To create
|
|
2106
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
2107
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
2108
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
2109
|
+
* @param input - the number to wrap as a FilterValue
|
|
2110
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
2143
2111
|
*/
|
|
2144
|
-
|
|
2112
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
2145
2113
|
/**
|
|
2146
|
-
*
|
|
2147
|
-
* @
|
|
2114
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
2115
|
+
* @param term -
|
|
2116
|
+
* @return {@link dh.FilterCondition}
|
|
2148
2117
|
*/
|
|
2149
|
-
|
|
2118
|
+
eq(term:FilterValue):FilterCondition;
|
|
2150
2119
|
/**
|
|
2151
|
-
*
|
|
2152
|
-
*
|
|
2120
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
2121
|
+
* vs lower case
|
|
2122
|
+
* @param term -
|
|
2123
|
+
* @return {@link dh.FilterCondition}
|
|
2153
2124
|
*/
|
|
2154
|
-
|
|
2125
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
2155
2126
|
/**
|
|
2156
|
-
*
|
|
2157
|
-
* @
|
|
2127
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
2128
|
+
* @param term -
|
|
2129
|
+
* @return {@link dh.FilterCondition}
|
|
2158
2130
|
*/
|
|
2159
|
-
|
|
2131
|
+
notEq(term:FilterValue):FilterCondition;
|
|
2160
2132
|
/**
|
|
2161
|
-
*
|
|
2162
|
-
*
|
|
2163
|
-
* @
|
|
2133
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
2134
|
+
* upper vs lower case
|
|
2135
|
+
* @param term -
|
|
2136
|
+
* @return {@link dh.FilterCondition}
|
|
2164
2137
|
*/
|
|
2165
|
-
|
|
2138
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
2166
2139
|
/**
|
|
2167
|
-
*
|
|
2168
|
-
* @
|
|
2140
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
2141
|
+
* @param term -
|
|
2142
|
+
* @return {@link dh.FilterCondition}
|
|
2169
2143
|
*/
|
|
2170
|
-
|
|
2144
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
2171
2145
|
/**
|
|
2172
|
-
*
|
|
2173
|
-
* @param
|
|
2174
|
-
* @
|
|
2175
|
-
* @return Returns a cleanup function.
|
|
2176
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2146
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
2147
|
+
* @param term -
|
|
2148
|
+
* @return {@link dh.FilterCondition}
|
|
2177
2149
|
*/
|
|
2178
|
-
|
|
2179
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2180
|
-
hasListeners(name:string):boolean;
|
|
2150
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
2181
2151
|
/**
|
|
2182
|
-
*
|
|
2183
|
-
* @param
|
|
2184
|
-
* @
|
|
2185
|
-
* @return
|
|
2186
|
-
* @typeParam T -
|
|
2152
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
2153
|
+
* @param term -
|
|
2154
|
+
* @return {@link dh.FilterCondition}
|
|
2187
2155
|
*/
|
|
2188
|
-
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
export class IdeSession implements HasEventHandling {
|
|
2192
|
-
static readonly EVENT_COMMANDSTARTED:string;
|
|
2193
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
2194
|
-
|
|
2195
|
-
protected constructor();
|
|
2196
|
-
|
|
2156
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
2197
2157
|
/**
|
|
2198
|
-
*
|
|
2199
|
-
* @param
|
|
2200
|
-
* @
|
|
2201
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
2158
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
2159
|
+
* @param term -
|
|
2160
|
+
* @return {@link dh.FilterCondition}
|
|
2202
2161
|
*/
|
|
2203
|
-
|
|
2162
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
2204
2163
|
/**
|
|
2205
|
-
*
|
|
2206
|
-
* @param
|
|
2207
|
-
* @return
|
|
2164
|
+
* a filter condition checking if the current value is in the given set of values
|
|
2165
|
+
* @param terms -
|
|
2166
|
+
* @return {@link dh.FilterCondition}
|
|
2208
2167
|
*/
|
|
2209
|
-
|
|
2168
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
2210
2169
|
/**
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2213
|
-
* @param
|
|
2214
|
-
* @return {@link
|
|
2170
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
2171
|
+
* lower case
|
|
2172
|
+
* @param terms -
|
|
2173
|
+
* @return {@link dh.FilterCondition}
|
|
2215
2174
|
*/
|
|
2216
|
-
|
|
2217
|
-
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2218
|
-
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2219
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2220
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2175
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
2221
2176
|
/**
|
|
2222
|
-
*
|
|
2223
|
-
* @param
|
|
2224
|
-
* @return {@link
|
|
2177
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
2178
|
+
* @param terms -
|
|
2179
|
+
* @return {@link dh.FilterCondition}
|
|
2225
2180
|
*/
|
|
2226
|
-
|
|
2227
|
-
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2228
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2229
|
-
close():void;
|
|
2230
|
-
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2231
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2232
|
-
openDocument(params:object):void;
|
|
2233
|
-
changeDocument(params:object):void;
|
|
2234
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2235
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2236
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2237
|
-
closeDocument(params:object):void;
|
|
2181
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
2238
2182
|
/**
|
|
2239
|
-
*
|
|
2240
|
-
*
|
|
2241
|
-
* @param
|
|
2242
|
-
* @return {@link
|
|
2183
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
2184
|
+
* upper vs lower case
|
|
2185
|
+
* @param terms -
|
|
2186
|
+
* @return {@link dh.FilterCondition}
|
|
2243
2187
|
*/
|
|
2244
|
-
|
|
2188
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
2245
2189
|
/**
|
|
2246
|
-
*
|
|
2247
|
-
*
|
|
2248
|
-
* @
|
|
2249
|
-
* @param startTime -
|
|
2250
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
2190
|
+
* a filter condition checking if the given value contains the given string value
|
|
2191
|
+
* @param term -
|
|
2192
|
+
* @return {@link dh.FilterCondition}
|
|
2251
2193
|
*/
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2194
|
+
contains(term:FilterValue):FilterCondition;
|
|
2195
|
+
/**
|
|
2196
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
2197
|
+
* lower case
|
|
2198
|
+
* @param term -
|
|
2199
|
+
* @return {@link dh.FilterCondition}
|
|
2200
|
+
*/
|
|
2201
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
2202
|
+
/**
|
|
2203
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
2204
|
+
* use Java regex syntax
|
|
2205
|
+
* @param pattern -
|
|
2206
|
+
* @return {@link dh.FilterCondition}
|
|
2207
|
+
*/
|
|
2208
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
2209
|
+
/**
|
|
2210
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
2211
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
2212
|
+
* @param pattern -
|
|
2213
|
+
* @return {@link dh.FilterCondition}
|
|
2214
|
+
*/
|
|
2215
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
2216
|
+
/**
|
|
2217
|
+
* a filter condition checking if the current value is a true boolean
|
|
2218
|
+
* @return {@link dh.FilterCondition}
|
|
2219
|
+
*/
|
|
2220
|
+
isTrue():FilterCondition;
|
|
2221
|
+
/**
|
|
2222
|
+
* a filter condition checking if the current value is a false boolean
|
|
2223
|
+
* @return {@link dh.FilterCondition}
|
|
2224
|
+
*/
|
|
2225
|
+
isFalse():FilterCondition;
|
|
2226
|
+
/**
|
|
2227
|
+
* a filter condition checking if the current value is a null value
|
|
2228
|
+
* @return {@link dh.FilterCondition}
|
|
2229
|
+
*/
|
|
2230
|
+
isNull():FilterCondition;
|
|
2231
|
+
/**
|
|
2232
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
2233
|
+
* functions that can be invoked on a String:
|
|
2234
|
+
* <ul>
|
|
2235
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
2236
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
2237
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
2238
|
+
* regular expression</li>
|
|
2239
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
2240
|
+
* <p>
|
|
2241
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
2242
|
+
* </p>
|
|
2243
|
+
* </li>
|
|
2244
|
+
* </ul>
|
|
2245
|
+
* @param method -
|
|
2246
|
+
* @param args -
|
|
2247
|
+
* @return
|
|
2248
|
+
*/
|
|
2249
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
2250
|
+
toString():string;
|
|
2251
|
+
/**
|
|
2252
|
+
* Constructs a string for the filter API from the given parameter.
|
|
2253
|
+
* @param input -
|
|
2254
|
+
* @return
|
|
2255
|
+
*/
|
|
2256
|
+
static ofString(input:any):FilterValue;
|
|
2257
|
+
/**
|
|
2258
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
2259
|
+
* @param b -
|
|
2260
|
+
* @return
|
|
2261
|
+
*/
|
|
2262
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
2257
2263
|
}
|
|
2258
2264
|
|
|
2259
2265
|
/**
|
|
2260
|
-
*
|
|
2261
|
-
*
|
|
2262
|
-
*
|
|
2266
|
+
* A js type for operating on input tables.
|
|
2267
|
+
*
|
|
2268
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
2269
|
+
*
|
|
2270
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2271
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2272
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2273
|
+
* before sending the next operation.
|
|
2274
|
+
*
|
|
2275
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2276
|
+
*
|
|
2277
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2278
|
+
* object.
|
|
2263
2279
|
*/
|
|
2264
|
-
export class
|
|
2280
|
+
export class InputTable {
|
|
2265
2281
|
protected constructor();
|
|
2266
2282
|
|
|
2267
|
-
static ofRange(first:number, last:number):RangeSet;
|
|
2268
|
-
static ofItems(rows:number[]):RangeSet;
|
|
2269
|
-
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
2270
|
-
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
2271
2283
|
/**
|
|
2272
|
-
* a
|
|
2273
|
-
*
|
|
2284
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
2285
|
+
* property at that name and validate it can be put into the given column type.
|
|
2286
|
+
* @param row -
|
|
2287
|
+
* @param userTimeZone -
|
|
2288
|
+
* @return Promise of dh.InputTable
|
|
2274
2289
|
*/
|
|
2275
|
-
|
|
2290
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2276
2291
|
/**
|
|
2277
|
-
*
|
|
2278
|
-
*
|
|
2279
|
-
*
|
|
2280
|
-
* @return
|
|
2292
|
+
* Add multiple rows to a table.
|
|
2293
|
+
* @param rows -
|
|
2294
|
+
* @param userTimeZone -
|
|
2295
|
+
* @return Promise of dh.InputTable
|
|
2281
2296
|
*/
|
|
2282
|
-
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
export class LoginCredentials {
|
|
2286
|
-
type?:string|null;
|
|
2287
|
-
username?:string|null;
|
|
2288
|
-
token?:string|null;
|
|
2289
|
-
|
|
2290
|
-
constructor();
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
/**
|
|
2294
|
-
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
2295
|
-
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
2296
|
-
*/
|
|
2297
|
-
export class IdeConnection implements HasEventHandling {
|
|
2297
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
2298
2298
|
/**
|
|
2299
|
-
*
|
|
2299
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
2300
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
2301
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
2302
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
2303
|
+
* @param tableToAdd -
|
|
2304
|
+
* @return Promise of dh.InputTable
|
|
2305
|
+
*/
|
|
2306
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
2307
|
+
/**
|
|
2308
|
+
* Add multiple tables to this Input Table.
|
|
2309
|
+
* @param tablesToAdd -
|
|
2310
|
+
* @return Promise of dh.InputTable
|
|
2311
|
+
*/
|
|
2312
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
2313
|
+
/**
|
|
2314
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
2315
|
+
* @param tableToDelete -
|
|
2316
|
+
* @return Promise of dh.InputTable
|
|
2317
|
+
*/
|
|
2318
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
2319
|
+
/**
|
|
2320
|
+
* Delete multiple tables from this Input Table.
|
|
2321
|
+
* @param tablesToDelete -
|
|
2322
|
+
* @return
|
|
2300
2323
|
*/
|
|
2301
|
-
|
|
2302
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2303
|
-
static readonly EVENT_RECONNECT:string;
|
|
2304
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
2305
|
-
|
|
2324
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
2306
2325
|
/**
|
|
2307
|
-
*
|
|
2308
|
-
* @
|
|
2309
|
-
* @param connectOptions - Optional Object
|
|
2310
|
-
* @param fromJava - Optional boolean
|
|
2311
|
-
* @deprecated
|
|
2326
|
+
* A list of the key columns, by name
|
|
2327
|
+
* @return String array.
|
|
2312
2328
|
*/
|
|
2313
|
-
|
|
2314
|
-
|
|
2329
|
+
get keys():string[];
|
|
2315
2330
|
/**
|
|
2316
|
-
*
|
|
2331
|
+
* A list of the value columns, by name
|
|
2332
|
+
* @return String array.
|
|
2317
2333
|
*/
|
|
2318
|
-
|
|
2319
|
-
running():Promise<IdeConnection>;
|
|
2320
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2321
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2334
|
+
get values():string[];
|
|
2322
2335
|
/**
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
2325
|
-
* log messages as are presently available.
|
|
2326
|
-
* @param callback -
|
|
2327
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
2336
|
+
* A list of the key columns.
|
|
2337
|
+
* @return Column array.
|
|
2328
2338
|
*/
|
|
2329
|
-
|
|
2330
|
-
startSession(type:string):Promise<IdeSession>;
|
|
2331
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
2332
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
2339
|
+
get keyColumns():Column[];
|
|
2333
2340
|
/**
|
|
2334
|
-
*
|
|
2335
|
-
* @
|
|
2336
|
-
* @param callback - a function to call when the event occurs
|
|
2337
|
-
* @return Returns a cleanup function.
|
|
2338
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2341
|
+
* A list of the value Column objects
|
|
2342
|
+
* @return {@link dh.Column} array.
|
|
2339
2343
|
*/
|
|
2340
|
-
|
|
2341
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2342
|
-
hasListeners(name:string):boolean;
|
|
2344
|
+
get valueColumns():Column[];
|
|
2343
2345
|
/**
|
|
2344
|
-
*
|
|
2345
|
-
* @
|
|
2346
|
-
* @param callback -
|
|
2347
|
-
* @return
|
|
2348
|
-
* @typeParam T -
|
|
2346
|
+
* The source table for this Input Table
|
|
2347
|
+
* @return dh.table
|
|
2349
2348
|
*/
|
|
2350
|
-
|
|
2349
|
+
get table():Table;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
export class DateWrapper extends LongWrapper {
|
|
2353
|
+
protected constructor();
|
|
2354
|
+
|
|
2355
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
2356
|
+
asDate():Date;
|
|
2351
2357
|
}
|
|
2352
2358
|
|
|
2353
2359
|
|
|
@@ -2372,23 +2378,6 @@ export namespace dh {
|
|
|
2372
2378
|
static readonly SKIP:AggregationOperationType;
|
|
2373
2379
|
}
|
|
2374
2380
|
|
|
2375
|
-
type ValueTypeType = string;
|
|
2376
|
-
export class ValueType {
|
|
2377
|
-
static readonly STRING:ValueTypeType;
|
|
2378
|
-
static readonly NUMBER:ValueTypeType;
|
|
2379
|
-
static readonly DOUBLE:ValueTypeType;
|
|
2380
|
-
static readonly LONG:ValueTypeType;
|
|
2381
|
-
static readonly DATETIME:ValueTypeType;
|
|
2382
|
-
static readonly BOOLEAN:ValueTypeType;
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
type SearchDisplayModeType = string;
|
|
2386
|
-
export class SearchDisplayMode {
|
|
2387
|
-
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2388
|
-
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2389
|
-
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
2381
|
/**
|
|
2393
2382
|
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2394
2383
|
*/
|
|
@@ -2405,10 +2394,42 @@ export namespace dh {
|
|
|
2405
2394
|
static readonly TREEMAP:VariableTypeType;
|
|
2406
2395
|
}
|
|
2407
2396
|
|
|
2397
|
+
type SearchDisplayModeType = string;
|
|
2398
|
+
export class SearchDisplayMode {
|
|
2399
|
+
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2400
|
+
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2401
|
+
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
type ValueTypeType = string;
|
|
2405
|
+
export class ValueType {
|
|
2406
|
+
static readonly STRING:ValueTypeType;
|
|
2407
|
+
static readonly NUMBER:ValueTypeType;
|
|
2408
|
+
static readonly DOUBLE:ValueTypeType;
|
|
2409
|
+
static readonly LONG:ValueTypeType;
|
|
2410
|
+
static readonly DATETIME:ValueTypeType;
|
|
2411
|
+
static readonly BOOLEAN:ValueTypeType;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2408
2414
|
}
|
|
2409
2415
|
|
|
2410
2416
|
export namespace dh.ide {
|
|
2411
2417
|
|
|
2418
|
+
/**
|
|
2419
|
+
* Indicates the result of code run on the server.
|
|
2420
|
+
*/
|
|
2421
|
+
export interface CommandResult {
|
|
2422
|
+
/**
|
|
2423
|
+
* Describes changes made in the course of this command.
|
|
2424
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2425
|
+
*/
|
|
2426
|
+
get changes():VariableChanges;
|
|
2427
|
+
/**
|
|
2428
|
+
* If the command failed, the error message will be provided here.
|
|
2429
|
+
* @return String
|
|
2430
|
+
*/
|
|
2431
|
+
get error():string;
|
|
2432
|
+
}
|
|
2412
2433
|
/**
|
|
2413
2434
|
* Specifies a type and either id or name (but not both).
|
|
2414
2435
|
*/
|
|
@@ -2503,79 +2524,10 @@ export namespace dh.ide {
|
|
|
2503
2524
|
*/
|
|
2504
2525
|
get updated():Array<VariableDefinition>;
|
|
2505
2526
|
}
|
|
2506
|
-
/**
|
|
2507
|
-
* Indicates the result of code run on the server.
|
|
2508
|
-
*/
|
|
2509
|
-
export interface CommandResult {
|
|
2510
|
-
/**
|
|
2511
|
-
* Describes changes made in the course of this command.
|
|
2512
|
-
* @return {@link dh.ide.VariableChanges}.
|
|
2513
|
-
*/
|
|
2514
|
-
get changes():VariableChanges;
|
|
2515
|
-
/**
|
|
2516
|
-
* If the command failed, the error message will be provided here.
|
|
2517
|
-
* @return String
|
|
2518
|
-
*/
|
|
2519
|
-
get error():string;
|
|
2520
|
-
}
|
|
2521
2527
|
}
|
|
2522
2528
|
|
|
2523
2529
|
export namespace dh.i18n {
|
|
2524
2530
|
|
|
2525
|
-
/**
|
|
2526
|
-
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2527
|
-
*
|
|
2528
|
-
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2529
|
-
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2530
|
-
* BigDecimal.
|
|
2531
|
-
*/
|
|
2532
|
-
export class NumberFormat {
|
|
2533
|
-
/**
|
|
2534
|
-
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2535
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2536
|
-
* @param pattern -
|
|
2537
|
-
*/
|
|
2538
|
-
constructor(pattern:string);
|
|
2539
|
-
|
|
2540
|
-
/**
|
|
2541
|
-
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2542
|
-
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2543
|
-
* take advantage of caching
|
|
2544
|
-
* @param pattern -
|
|
2545
|
-
* @return dh.i18n.NumberFormat
|
|
2546
|
-
*/
|
|
2547
|
-
static getFormat(pattern:string):NumberFormat;
|
|
2548
|
-
/**
|
|
2549
|
-
* Parses the given text using the cached format matching the given pattern.
|
|
2550
|
-
* @param pattern -
|
|
2551
|
-
* @param text -
|
|
2552
|
-
* @return double
|
|
2553
|
-
*/
|
|
2554
|
-
static parse(pattern:string, text:string):number;
|
|
2555
|
-
/**
|
|
2556
|
-
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2557
|
-
* format matching the given pattern string.
|
|
2558
|
-
* @param pattern -
|
|
2559
|
-
* @param number -
|
|
2560
|
-
* @return String
|
|
2561
|
-
*/
|
|
2562
|
-
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2563
|
-
/**
|
|
2564
|
-
* Parses the given text using this instance's pattern into a JS Number.
|
|
2565
|
-
* @param text -
|
|
2566
|
-
* @return double
|
|
2567
|
-
*/
|
|
2568
|
-
parse(text:string):number;
|
|
2569
|
-
/**
|
|
2570
|
-
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2571
|
-
* @param number -
|
|
2572
|
-
* @return String
|
|
2573
|
-
*/
|
|
2574
|
-
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2575
|
-
toString():string;
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
2531
|
/**
|
|
2580
2532
|
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
2581
2533
|
* additional 6 decimal places after the rest of the number.
|
|
@@ -2674,6 +2626,60 @@ export namespace dh.i18n {
|
|
|
2674
2626
|
toString():string;
|
|
2675
2627
|
}
|
|
2676
2628
|
|
|
2629
|
+
/**
|
|
2630
|
+
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2631
|
+
*
|
|
2632
|
+
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2633
|
+
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2634
|
+
* BigDecimal.
|
|
2635
|
+
*/
|
|
2636
|
+
export class NumberFormat {
|
|
2637
|
+
/**
|
|
2638
|
+
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2639
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2640
|
+
* @param pattern -
|
|
2641
|
+
*/
|
|
2642
|
+
constructor(pattern:string);
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2646
|
+
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2647
|
+
* take advantage of caching
|
|
2648
|
+
* @param pattern -
|
|
2649
|
+
* @return dh.i18n.NumberFormat
|
|
2650
|
+
*/
|
|
2651
|
+
static getFormat(pattern:string):NumberFormat;
|
|
2652
|
+
/**
|
|
2653
|
+
* Parses the given text using the cached format matching the given pattern.
|
|
2654
|
+
* @param pattern -
|
|
2655
|
+
* @param text -
|
|
2656
|
+
* @return double
|
|
2657
|
+
*/
|
|
2658
|
+
static parse(pattern:string, text:string):number;
|
|
2659
|
+
/**
|
|
2660
|
+
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2661
|
+
* format matching the given pattern string.
|
|
2662
|
+
* @param pattern -
|
|
2663
|
+
* @param number -
|
|
2664
|
+
* @return String
|
|
2665
|
+
*/
|
|
2666
|
+
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2667
|
+
/**
|
|
2668
|
+
* Parses the given text using this instance's pattern into a JS Number.
|
|
2669
|
+
* @param text -
|
|
2670
|
+
* @return double
|
|
2671
|
+
*/
|
|
2672
|
+
parse(text:string):number;
|
|
2673
|
+
/**
|
|
2674
|
+
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2675
|
+
* @param number -
|
|
2676
|
+
* @return String
|
|
2677
|
+
*/
|
|
2678
|
+
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2679
|
+
toString():string;
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
|
|
2677
2683
|
/**
|
|
2678
2684
|
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
2679
2685
|
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
@@ -2784,11 +2790,26 @@ export namespace dh.i18n {
|
|
|
2784
2790
|
*/
|
|
2785
2791
|
get id():string;
|
|
2786
2792
|
}
|
|
2787
|
-
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
|
-
export namespace dh.plot {
|
|
2791
|
-
|
|
2793
|
+
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
export namespace dh.plot {
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2800
|
+
*/
|
|
2801
|
+
export interface MultiSeries {
|
|
2802
|
+
/**
|
|
2803
|
+
* The name for this multi-series.
|
|
2804
|
+
* @return String
|
|
2805
|
+
*/
|
|
2806
|
+
get name():string;
|
|
2807
|
+
/**
|
|
2808
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2809
|
+
* @return int
|
|
2810
|
+
*/
|
|
2811
|
+
get plotStyle():SeriesPlotStyleType;
|
|
2812
|
+
}
|
|
2792
2813
|
/**
|
|
2793
2814
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
2794
2815
|
* may be shared between Series instances.
|
|
@@ -2857,40 +2878,15 @@ export namespace dh.plot {
|
|
|
2857
2878
|
get formatType():AxisFormatTypeType;
|
|
2858
2879
|
get minRange():number;
|
|
2859
2880
|
}
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
export interface SeriesDataSource {
|
|
2864
|
-
/**
|
|
2865
|
-
* the type of data stored in the underlying table's Column.
|
|
2866
|
-
* @return String
|
|
2867
|
-
*/
|
|
2868
|
-
get columnType():string;
|
|
2869
|
-
/**
|
|
2870
|
-
* the axis that this source should be drawn on.
|
|
2871
|
-
* @return dh.plot.Axis
|
|
2872
|
-
*/
|
|
2873
|
-
get axis():Axis;
|
|
2874
|
-
/**
|
|
2875
|
-
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2876
|
-
* @return int
|
|
2877
|
-
*/
|
|
2878
|
-
get type():SourceTypeType;
|
|
2881
|
+
export interface FigureDataUpdatedEvent {
|
|
2882
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2883
|
+
get series():Series[];
|
|
2879
2884
|
}
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
* The name for this multi-series.
|
|
2886
|
-
* @return String
|
|
2887
|
-
*/
|
|
2888
|
-
get name():string;
|
|
2889
|
-
/**
|
|
2890
|
-
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2891
|
-
* @return int
|
|
2892
|
-
*/
|
|
2893
|
-
get plotStyle():SeriesPlotStyleType;
|
|
2885
|
+
export interface OneClick {
|
|
2886
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
2887
|
+
getValueForColumn(columName:string):any;
|
|
2888
|
+
get requireAllFiltersToDisplay():boolean;
|
|
2889
|
+
get columns():dh.Column[];
|
|
2894
2890
|
}
|
|
2895
2891
|
/**
|
|
2896
2892
|
* Provides access to the data for displaying in a figure.
|
|
@@ -2936,75 +2932,114 @@ export namespace dh.plot {
|
|
|
2936
2932
|
get multiSeries():MultiSeries;
|
|
2937
2933
|
get shapeLabel():string;
|
|
2938
2934
|
}
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2935
|
+
/**
|
|
2936
|
+
* Describes how to access and display data required within a series.
|
|
2937
|
+
*/
|
|
2938
|
+
export interface SeriesDataSource {
|
|
2939
|
+
/**
|
|
2940
|
+
* the type of data stored in the underlying table's Column.
|
|
2941
|
+
* @return String
|
|
2942
|
+
*/
|
|
2943
|
+
get columnType():string;
|
|
2944
|
+
/**
|
|
2945
|
+
* the axis that this source should be drawn on.
|
|
2946
|
+
* @return dh.plot.Axis
|
|
2947
|
+
*/
|
|
2948
|
+
get axis():Axis;
|
|
2949
|
+
/**
|
|
2950
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2951
|
+
* @return int
|
|
2952
|
+
*/
|
|
2953
|
+
get type():SourceTypeType;
|
|
2942
2954
|
}
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2955
|
+
|
|
2956
|
+
/**
|
|
2957
|
+
* Provide the details for a chart.
|
|
2958
|
+
*/
|
|
2959
|
+
export class Chart implements dh.HasEventHandling {
|
|
2960
|
+
/**
|
|
2961
|
+
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
2962
|
+
*/
|
|
2963
|
+
static readonly EVENT_SERIES_ADDED:string;
|
|
2964
|
+
/**
|
|
2965
|
+
* The title of the chart.
|
|
2966
|
+
* @return String
|
|
2967
|
+
*/
|
|
2968
|
+
readonly title?:string|null;
|
|
2969
|
+
|
|
2970
|
+
protected constructor();
|
|
2971
|
+
|
|
2972
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2973
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2974
|
+
hasListeners(name:string):boolean;
|
|
2975
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2976
|
+
get column():number;
|
|
2977
|
+
get showLegend():boolean;
|
|
2978
|
+
/**
|
|
2979
|
+
* The axes used in this chart.
|
|
2980
|
+
* @return dh.plot.Axis
|
|
2981
|
+
*/
|
|
2982
|
+
get axes():Axis[];
|
|
2983
|
+
get is3d():boolean;
|
|
2984
|
+
get titleFont():string;
|
|
2985
|
+
get colspan():number;
|
|
2986
|
+
get titleColor():string;
|
|
2987
|
+
get series():Series[];
|
|
2988
|
+
get rowspan():number;
|
|
2989
|
+
/**
|
|
2990
|
+
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
2991
|
+
* @return int
|
|
2992
|
+
*/
|
|
2993
|
+
get chartType():ChartTypeType;
|
|
2994
|
+
get row():number;
|
|
2995
|
+
get legendColor():string;
|
|
2996
|
+
get legendFont():string;
|
|
2997
|
+
get multiSeries():MultiSeries[];
|
|
2948
2998
|
}
|
|
2949
2999
|
|
|
2950
|
-
export class
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
3000
|
+
export class DownsampleOptions {
|
|
3001
|
+
/**
|
|
3002
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3003
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3004
|
+
* series.subscribe().
|
|
3005
|
+
*/
|
|
3006
|
+
static MAX_SERIES_SIZE:number;
|
|
3007
|
+
/**
|
|
3008
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3009
|
+
* downsampling disabled, the series will not load data.
|
|
3010
|
+
*/
|
|
3011
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3012
|
+
/**
|
|
3013
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3014
|
+
* axes are configured.
|
|
3015
|
+
*/
|
|
3016
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3017
|
+
/**
|
|
3018
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3019
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3020
|
+
*/
|
|
3021
|
+
static readonly DISABLE:DownsampleOptions;
|
|
2970
3022
|
|
|
2971
|
-
constructor();
|
|
3023
|
+
protected constructor();
|
|
2972
3024
|
}
|
|
2973
3025
|
|
|
2974
3026
|
/**
|
|
2975
|
-
*
|
|
2976
|
-
*
|
|
2977
|
-
*
|
|
2978
|
-
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
2979
|
-
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
2980
|
-
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
2981
|
-
* any) to reduce the number of points sent to the client.
|
|
2982
|
-
*
|
|
2983
|
-
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
2984
|
-
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
2985
|
-
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
2986
|
-
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
2987
|
-
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
2988
|
-
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
2989
|
-
*
|
|
2990
|
-
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
2991
|
-
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
2992
|
-
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
2993
|
-
* that the "important" values are visible.
|
|
2994
|
-
*
|
|
2995
|
-
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
2996
|
-
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
2997
|
-
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
2998
|
-
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
2999
|
-
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
3000
|
-
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
3001
|
-
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
3002
|
-
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
3003
|
-
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
3004
|
-
*
|
|
3005
|
-
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3006
|
-
* client-created figures.
|
|
3027
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3028
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3029
|
+
* keep that cached as well.
|
|
3007
3030
|
*/
|
|
3031
|
+
export class ChartData {
|
|
3032
|
+
constructor(table:dh.Table);
|
|
3033
|
+
|
|
3034
|
+
update(tableData:dh.SubscriptionTableData):void;
|
|
3035
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3036
|
+
/**
|
|
3037
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3038
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3039
|
+
*/
|
|
3040
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3008
3043
|
export class Figure implements dh.HasEventHandling {
|
|
3009
3044
|
/**
|
|
3010
3045
|
* The title of the figure.
|
|
@@ -3048,8 +3083,7 @@ export namespace dh.plot {
|
|
|
3048
3083
|
*/
|
|
3049
3084
|
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3050
3085
|
|
|
3051
|
-
|
|
3052
|
-
|
|
3086
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3053
3087
|
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3054
3088
|
/**
|
|
3055
3089
|
* Disable updates for all series in this figure.
|
|
@@ -3087,78 +3121,7 @@ export namespace dh.plot {
|
|
|
3087
3121
|
* @return
|
|
3088
3122
|
* @typeParam T -
|
|
3089
3123
|
*/
|
|
3090
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3091
|
-
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
/**
|
|
3095
|
-
* Provide the details for a chart.
|
|
3096
|
-
*/
|
|
3097
|
-
export class Chart implements dh.HasEventHandling {
|
|
3098
|
-
/**
|
|
3099
|
-
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
3100
|
-
*/
|
|
3101
|
-
static readonly EVENT_SERIES_ADDED:string;
|
|
3102
|
-
/**
|
|
3103
|
-
* The title of the chart.
|
|
3104
|
-
* @return String
|
|
3105
|
-
*/
|
|
3106
|
-
readonly title?:string|null;
|
|
3107
|
-
|
|
3108
|
-
protected constructor();
|
|
3109
|
-
|
|
3110
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
3111
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
3112
|
-
hasListeners(name:string):boolean;
|
|
3113
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3114
|
-
get column():number;
|
|
3115
|
-
get showLegend():boolean;
|
|
3116
|
-
/**
|
|
3117
|
-
* The axes used in this chart.
|
|
3118
|
-
* @return dh.plot.Axis
|
|
3119
|
-
*/
|
|
3120
|
-
get axes():Axis[];
|
|
3121
|
-
get is3d():boolean;
|
|
3122
|
-
get titleFont():string;
|
|
3123
|
-
get colspan():number;
|
|
3124
|
-
get titleColor():string;
|
|
3125
|
-
get series():Series[];
|
|
3126
|
-
get rowspan():number;
|
|
3127
|
-
/**
|
|
3128
|
-
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3129
|
-
* @return int
|
|
3130
|
-
*/
|
|
3131
|
-
get chartType():ChartTypeType;
|
|
3132
|
-
get row():number;
|
|
3133
|
-
get legendColor():string;
|
|
3134
|
-
get legendFont():string;
|
|
3135
|
-
get multiSeries():MultiSeries[];
|
|
3136
|
-
}
|
|
3137
|
-
|
|
3138
|
-
export class DownsampleOptions {
|
|
3139
|
-
/**
|
|
3140
|
-
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3141
|
-
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3142
|
-
* series.subscribe().
|
|
3143
|
-
*/
|
|
3144
|
-
static MAX_SERIES_SIZE:number;
|
|
3145
|
-
/**
|
|
3146
|
-
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3147
|
-
* downsampling disabled, the series will not load data.
|
|
3148
|
-
*/
|
|
3149
|
-
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3150
|
-
/**
|
|
3151
|
-
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3152
|
-
* axes are configured.
|
|
3153
|
-
*/
|
|
3154
|
-
static readonly DEFAULT:DownsampleOptions;
|
|
3155
|
-
/**
|
|
3156
|
-
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3157
|
-
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3158
|
-
*/
|
|
3159
|
-
static readonly DISABLE:DownsampleOptions;
|
|
3160
|
-
|
|
3161
|
-
protected constructor();
|
|
3124
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3162
3125
|
}
|
|
3163
3126
|
|
|
3164
3127
|
/**
|
|
@@ -3196,46 +3159,22 @@ export namespace dh.plot {
|
|
|
3196
3159
|
}
|
|
3197
3160
|
|
|
3198
3161
|
/**
|
|
3199
|
-
* Helper class
|
|
3200
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3201
|
-
* keep that cached as well.
|
|
3162
|
+
* Helper class for plot downsampling methods.
|
|
3202
3163
|
*/
|
|
3203
|
-
export class
|
|
3204
|
-
constructor(
|
|
3164
|
+
export class Downsample {
|
|
3165
|
+
protected constructor();
|
|
3205
3166
|
|
|
3206
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3207
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3208
3167
|
/**
|
|
3209
|
-
*
|
|
3210
|
-
*
|
|
3168
|
+
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3169
|
+
* the same visual fidelity as the original table, but with fewer rows.
|
|
3170
|
+
* @param table - The table to downsample.
|
|
3171
|
+
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3172
|
+
* @param yCols - The names of the Y columns to downsample.
|
|
3173
|
+
* @param width - The width of the visible area in pixels.
|
|
3174
|
+
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3175
|
+
* @return A promise that resolves to the downsampled table.
|
|
3211
3176
|
*/
|
|
3212
|
-
|
|
3213
|
-
}
|
|
3214
|
-
|
|
3215
|
-
export class FigureSourceException {
|
|
3216
|
-
table:dh.Table;
|
|
3217
|
-
source:SeriesDataSource;
|
|
3218
|
-
|
|
3219
|
-
protected constructor();
|
|
3220
|
-
}
|
|
3221
|
-
|
|
3222
|
-
export class SeriesDescriptor {
|
|
3223
|
-
plotStyle:string;
|
|
3224
|
-
name?:string|null;
|
|
3225
|
-
linesVisible?:boolean|null;
|
|
3226
|
-
shapesVisible?:boolean|null;
|
|
3227
|
-
gradientVisible?:boolean|null;
|
|
3228
|
-
lineColor?:string|null;
|
|
3229
|
-
pointLabelFormat?:string|null;
|
|
3230
|
-
xToolTipPattern?:string|null;
|
|
3231
|
-
yToolTipPattern?:string|null;
|
|
3232
|
-
shapeLabel?:string|null;
|
|
3233
|
-
shapeSize?:number|null;
|
|
3234
|
-
shapeColor?:string|null;
|
|
3235
|
-
shape?:string|null;
|
|
3236
|
-
dataSources:Array<SourceDescriptor>;
|
|
3237
|
-
|
|
3238
|
-
constructor();
|
|
3177
|
+
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3239
3178
|
}
|
|
3240
3179
|
|
|
3241
3180
|
export class FigureFetchError {
|
|
@@ -3252,6 +3191,30 @@ export namespace dh.plot {
|
|
|
3252
3191
|
get message():string;
|
|
3253
3192
|
}
|
|
3254
3193
|
|
|
3194
|
+
export class AxisDescriptor {
|
|
3195
|
+
formatType:string;
|
|
3196
|
+
type:string;
|
|
3197
|
+
position:string;
|
|
3198
|
+
log?:boolean|null;
|
|
3199
|
+
label?:string|null;
|
|
3200
|
+
labelFont?:string|null;
|
|
3201
|
+
ticksFont?:string|null;
|
|
3202
|
+
formatPattern?:string|null;
|
|
3203
|
+
color?:string|null;
|
|
3204
|
+
minRange?:number|null;
|
|
3205
|
+
maxRange?:number|null;
|
|
3206
|
+
minorTicksVisible?:boolean|null;
|
|
3207
|
+
majorTicksVisible?:boolean|null;
|
|
3208
|
+
minorTickCount?:number|null;
|
|
3209
|
+
gapBetweenMajorTicks?:number|null;
|
|
3210
|
+
majorTickLocations?:Array<number>|null;
|
|
3211
|
+
tickLabelAngle?:number|null;
|
|
3212
|
+
invert?:boolean|null;
|
|
3213
|
+
isTimeAxis?:boolean|null;
|
|
3214
|
+
|
|
3215
|
+
constructor();
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3255
3218
|
export class SourceDescriptor {
|
|
3256
3219
|
axis:AxisDescriptor;
|
|
3257
3220
|
table:dh.Table;
|
|
@@ -3261,40 +3224,32 @@ export namespace dh.plot {
|
|
|
3261
3224
|
constructor();
|
|
3262
3225
|
}
|
|
3263
3226
|
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
export class Downsample {
|
|
3268
|
-
protected constructor();
|
|
3227
|
+
export class FigureSourceException {
|
|
3228
|
+
table:dh.Table;
|
|
3229
|
+
source:SeriesDataSource;
|
|
3269
3230
|
|
|
3270
|
-
|
|
3271
|
-
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3272
|
-
* the same visual fidelity as the original table, but with fewer rows.
|
|
3273
|
-
* @param table - The table to downsample.
|
|
3274
|
-
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3275
|
-
* @param yCols - The names of the Y columns to downsample.
|
|
3276
|
-
* @param width - The width of the visible area in pixels.
|
|
3277
|
-
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3278
|
-
* @return A promise that resolves to the downsampled table.
|
|
3279
|
-
*/
|
|
3280
|
-
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3231
|
+
protected constructor();
|
|
3281
3232
|
}
|
|
3282
3233
|
|
|
3234
|
+
export class SeriesDescriptor {
|
|
3235
|
+
plotStyle:string;
|
|
3236
|
+
name?:string|null;
|
|
3237
|
+
linesVisible?:boolean|null;
|
|
3238
|
+
shapesVisible?:boolean|null;
|
|
3239
|
+
gradientVisible?:boolean|null;
|
|
3240
|
+
lineColor?:string|null;
|
|
3241
|
+
pointLabelFormat?:string|null;
|
|
3242
|
+
xToolTipPattern?:string|null;
|
|
3243
|
+
yToolTipPattern?:string|null;
|
|
3244
|
+
shapeLabel?:string|null;
|
|
3245
|
+
shapeSize?:number|null;
|
|
3246
|
+
shapeColor?:string|null;
|
|
3247
|
+
shape?:string|null;
|
|
3248
|
+
dataSources:Array<SourceDescriptor>;
|
|
3283
3249
|
|
|
3284
|
-
|
|
3285
|
-
export class AxisFormatType {
|
|
3286
|
-
static readonly CATEGORY:AxisFormatTypeType;
|
|
3287
|
-
static readonly NUMBER:AxisFormatTypeType;
|
|
3250
|
+
constructor();
|
|
3288
3251
|
}
|
|
3289
3252
|
|
|
3290
|
-
type AxisPositionType = number;
|
|
3291
|
-
export class AxisPosition {
|
|
3292
|
-
static readonly TOP:AxisPositionType;
|
|
3293
|
-
static readonly BOTTOM:AxisPositionType;
|
|
3294
|
-
static readonly LEFT:AxisPositionType;
|
|
3295
|
-
static readonly RIGHT:AxisPositionType;
|
|
3296
|
-
static readonly NONE:AxisPositionType;
|
|
3297
|
-
}
|
|
3298
3253
|
|
|
3299
3254
|
type SeriesPlotStyleType = number;
|
|
3300
3255
|
export class SeriesPlotStyle {
|
|
@@ -3312,6 +3267,31 @@ export namespace dh.plot {
|
|
|
3312
3267
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3313
3268
|
}
|
|
3314
3269
|
|
|
3270
|
+
type AxisFormatTypeType = number;
|
|
3271
|
+
export class AxisFormatType {
|
|
3272
|
+
static readonly CATEGORY:AxisFormatTypeType;
|
|
3273
|
+
static readonly NUMBER:AxisFormatTypeType;
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
type AxisPositionType = number;
|
|
3277
|
+
export class AxisPosition {
|
|
3278
|
+
static readonly TOP:AxisPositionType;
|
|
3279
|
+
static readonly BOTTOM:AxisPositionType;
|
|
3280
|
+
static readonly LEFT:AxisPositionType;
|
|
3281
|
+
static readonly RIGHT:AxisPositionType;
|
|
3282
|
+
static readonly NONE:AxisPositionType;
|
|
3283
|
+
}
|
|
3284
|
+
|
|
3285
|
+
type AxisTypeType = number;
|
|
3286
|
+
export class AxisType {
|
|
3287
|
+
static readonly X:AxisTypeType;
|
|
3288
|
+
static readonly Y:AxisTypeType;
|
|
3289
|
+
static readonly SHAPE:AxisTypeType;
|
|
3290
|
+
static readonly SIZE:AxisTypeType;
|
|
3291
|
+
static readonly LABEL:AxisTypeType;
|
|
3292
|
+
static readonly COLOR:AxisTypeType;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3315
3295
|
/**
|
|
3316
3296
|
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3317
3297
|
* those series should be rendered.
|
|
@@ -3356,20 +3336,17 @@ export namespace dh.plot {
|
|
|
3356
3336
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3357
3337
|
}
|
|
3358
3338
|
|
|
3359
|
-
type AxisTypeType = number;
|
|
3360
|
-
export class AxisType {
|
|
3361
|
-
static readonly X:AxisTypeType;
|
|
3362
|
-
static readonly Y:AxisTypeType;
|
|
3363
|
-
static readonly SHAPE:AxisTypeType;
|
|
3364
|
-
static readonly SIZE:AxisTypeType;
|
|
3365
|
-
static readonly LABEL:AxisTypeType;
|
|
3366
|
-
static readonly COLOR:AxisTypeType;
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
3339
|
}
|
|
3370
3340
|
|
|
3371
3341
|
export namespace dh.lsp {
|
|
3372
3342
|
|
|
3343
|
+
export class MarkupContent {
|
|
3344
|
+
kind:string;
|
|
3345
|
+
value:string;
|
|
3346
|
+
|
|
3347
|
+
constructor();
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3373
3350
|
export class ParameterInformation {
|
|
3374
3351
|
label:string;
|
|
3375
3352
|
documentation:MarkupContent;
|
|
@@ -3377,6 +3354,28 @@ export namespace dh.lsp {
|
|
|
3377
3354
|
constructor();
|
|
3378
3355
|
}
|
|
3379
3356
|
|
|
3357
|
+
export class TextDocumentContentChangeEvent {
|
|
3358
|
+
range:Range;
|
|
3359
|
+
rangeLength:number;
|
|
3360
|
+
text:string;
|
|
3361
|
+
|
|
3362
|
+
constructor();
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
export class Hover {
|
|
3366
|
+
contents:MarkupContent;
|
|
3367
|
+
range:Range;
|
|
3368
|
+
|
|
3369
|
+
constructor();
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
export class TextEdit {
|
|
3373
|
+
range:Range;
|
|
3374
|
+
text:string;
|
|
3375
|
+
|
|
3376
|
+
constructor();
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3380
3379
|
export class Range {
|
|
3381
3380
|
start:Position;
|
|
3382
3381
|
end:Position;
|
|
@@ -3399,9 +3398,11 @@ export namespace dh.lsp {
|
|
|
3399
3398
|
copy():Position;
|
|
3400
3399
|
}
|
|
3401
3400
|
|
|
3402
|
-
export class
|
|
3403
|
-
|
|
3404
|
-
|
|
3401
|
+
export class SignatureInformation {
|
|
3402
|
+
label:string;
|
|
3403
|
+
documentation:MarkupContent;
|
|
3404
|
+
parameters:Array<ParameterInformation>;
|
|
3405
|
+
activeParameter:number;
|
|
3405
3406
|
|
|
3406
3407
|
constructor();
|
|
3407
3408
|
}
|
|
@@ -3423,41 +3424,27 @@ export namespace dh.lsp {
|
|
|
3423
3424
|
constructor();
|
|
3424
3425
|
}
|
|
3425
3426
|
|
|
3426
|
-
|
|
3427
|
-
range:Range;
|
|
3428
|
-
rangeLength:number;
|
|
3429
|
-
text:string;
|
|
3430
|
-
|
|
3431
|
-
constructor();
|
|
3432
|
-
}
|
|
3433
|
-
|
|
3434
|
-
export class TextEdit {
|
|
3435
|
-
range:Range;
|
|
3436
|
-
text:string;
|
|
3427
|
+
}
|
|
3437
3428
|
|
|
3438
|
-
constructor();
|
|
3439
|
-
}
|
|
3440
3429
|
|
|
3441
|
-
|
|
3442
|
-
contents:MarkupContent;
|
|
3443
|
-
range:Range;
|
|
3430
|
+
export namespace dh.calendar {
|
|
3444
3431
|
|
|
3445
|
-
|
|
3432
|
+
export interface Holiday {
|
|
3433
|
+
/**
|
|
3434
|
+
* The date of the Holiday.
|
|
3435
|
+
* @return {@link dh.LocalDateWrapper}
|
|
3436
|
+
*/
|
|
3437
|
+
get date():dh.LocalDateWrapper;
|
|
3438
|
+
/**
|
|
3439
|
+
* The business periods that are open on the holiday.
|
|
3440
|
+
* @return dh.calendar.BusinessPeriod
|
|
3441
|
+
*/
|
|
3442
|
+
get businessPeriods():Array<BusinessPeriod>;
|
|
3446
3443
|
}
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
documentation:MarkupContent;
|
|
3451
|
-
parameters:Array<ParameterInformation>;
|
|
3452
|
-
activeParameter:number;
|
|
3453
|
-
|
|
3454
|
-
constructor();
|
|
3444
|
+
export interface BusinessPeriod {
|
|
3445
|
+
get close():string;
|
|
3446
|
+
get open():string;
|
|
3455
3447
|
}
|
|
3456
|
-
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
export namespace dh.calendar {
|
|
3460
|
-
|
|
3461
3448
|
/**
|
|
3462
3449
|
* Defines a calendar with business hours and holidays.
|
|
3463
3450
|
*/
|
|
@@ -3488,22 +3475,6 @@ export namespace dh.calendar {
|
|
|
3488
3475
|
*/
|
|
3489
3476
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3490
3477
|
}
|
|
3491
|
-
export interface Holiday {
|
|
3492
|
-
/**
|
|
3493
|
-
* The date of the Holiday.
|
|
3494
|
-
* @return {@link dh.LocalDateWrapper}
|
|
3495
|
-
*/
|
|
3496
|
-
get date():dh.LocalDateWrapper;
|
|
3497
|
-
/**
|
|
3498
|
-
* The business periods that are open on the holiday.
|
|
3499
|
-
* @return dh.calendar.BusinessPeriod
|
|
3500
|
-
*/
|
|
3501
|
-
get businessPeriods():Array<BusinessPeriod>;
|
|
3502
|
-
}
|
|
3503
|
-
export interface BusinessPeriod {
|
|
3504
|
-
get close():string;
|
|
3505
|
-
get open():string;
|
|
3506
|
-
}
|
|
3507
3478
|
|
|
3508
3479
|
type DayOfWeekType = string;
|
|
3509
3480
|
export class DayOfWeek {
|
|
@@ -3519,4 +3490,3 @@ export namespace dh.calendar {
|
|
|
3519
3490
|
}
|
|
3520
3491
|
|
|
3521
3492
|
}
|
|
3522
|
-
|