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