@deephaven/jsapi-types 41.3.0 → 41.5.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 +1903 -1867
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,22 +17,6 @@ export interface IIterableResult<T> {
|
|
|
17
17
|
}
|
|
18
18
|
export namespace dh.storage {
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
22
|
-
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
23
|
-
* be used.
|
|
24
|
-
*/
|
|
25
|
-
export class FileContents {
|
|
26
|
-
protected constructor();
|
|
27
|
-
|
|
28
|
-
static blob(blob:Blob):FileContents;
|
|
29
|
-
static text(...text:string[]):FileContents;
|
|
30
|
-
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
31
|
-
text():Promise<string>;
|
|
32
|
-
arrayBuffer():Promise<ArrayBuffer>;
|
|
33
|
-
get etag():string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
20
|
/**
|
|
37
21
|
* Storage service metadata about files and folders.
|
|
38
22
|
*/
|
|
@@ -106,6 +90,22 @@ export namespace dh.storage {
|
|
|
106
90
|
createDirectory(path:string):Promise<void>;
|
|
107
91
|
}
|
|
108
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
95
|
+
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
96
|
+
* be used.
|
|
97
|
+
*/
|
|
98
|
+
export class FileContents {
|
|
99
|
+
protected constructor();
|
|
100
|
+
|
|
101
|
+
static blob(blob:Blob):FileContents;
|
|
102
|
+
static text(...text:string[]):FileContents;
|
|
103
|
+
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
104
|
+
text():Promise<string>;
|
|
105
|
+
arrayBuffer():Promise<ArrayBuffer>;
|
|
106
|
+
get etag():string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -118,21 +118,77 @@ export namespace dh.storage {
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
122
122
|
*/
|
|
123
|
-
export interface
|
|
123
|
+
export interface LocalTimeWrapper {
|
|
124
|
+
valueOf():string;
|
|
125
|
+
getHour():number;
|
|
126
|
+
getMinute():number;
|
|
127
|
+
getSecond():number;
|
|
128
|
+
getNano():number;
|
|
129
|
+
toString():string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
|
|
133
|
+
* ViewportData also contains the offset to this data, so that the actual row number may be determined.
|
|
134
|
+
* <p>
|
|
135
|
+
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
136
|
+
* <p>
|
|
137
|
+
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
138
|
+
* scrolling without going to the server.
|
|
139
|
+
*/
|
|
140
|
+
export interface ViewportData extends TableData {
|
|
124
141
|
/**
|
|
125
|
-
*
|
|
142
|
+
* Reads a row object from the viewport, based on its position in the table.
|
|
143
|
+
*/
|
|
144
|
+
get(index:LongWrapper|number):ViewportRow;
|
|
145
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
146
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
147
|
+
/**
|
|
148
|
+
* The position of the first returned row within the table.
|
|
149
|
+
*/
|
|
150
|
+
get offset():number;
|
|
151
|
+
get columns():Array<Column>;
|
|
152
|
+
get rows():Array<ViewportRow>;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
156
|
+
* request the viewport again.
|
|
157
|
+
*/
|
|
158
|
+
export interface ViewportRow extends Row {
|
|
159
|
+
get(column:Column):any;
|
|
160
|
+
getFormat(column:Column):Format;
|
|
161
|
+
get index():LongWrapper;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Options for requesting a snapshot of a table.
|
|
165
|
+
*/
|
|
166
|
+
export interface SnapshotOptions extends DataOptions {
|
|
167
|
+
/**
|
|
168
|
+
* If true, the snapshot will be filled starting from the end of the table, where 0 is the last row of the
|
|
126
169
|
* table. Default is false.
|
|
127
170
|
*/
|
|
128
171
|
isReverseViewport?:boolean|null;
|
|
129
172
|
/**
|
|
130
|
-
* The rows to include in the
|
|
173
|
+
* The rows to include in the snapshot. This can be either a {@link dh.RangeSet} or a single range with
|
|
131
174
|
* `first` and `last` properties.
|
|
132
175
|
*/
|
|
133
176
|
rows:RangeSet|SimpleRange;
|
|
134
177
|
}
|
|
135
178
|
/**
|
|
179
|
+
* Options for requesting a full-table subscription to a table.
|
|
180
|
+
*/
|
|
181
|
+
export interface SubscriptionOptions extends DataOptions {
|
|
182
|
+
/**
|
|
183
|
+
* Minimum interval between updates, in milliseconds. If not specified, the server default will be used,
|
|
184
|
+
* typically 1000ms.
|
|
185
|
+
* <p>
|
|
186
|
+
* Note that setting this to smaller values will not necessarily result in more frequent updates - the server
|
|
187
|
+
* may not propagate updates that frequently, or there may be no updates to propagate.
|
|
188
|
+
*/
|
|
189
|
+
updateIntervalMs?:number|null;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
136
192
|
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
137
193
|
* details about the event.
|
|
138
194
|
* @typeParam T - the type of the event detail
|
|
@@ -141,20 +197,36 @@ export namespace dh {
|
|
|
141
197
|
get detail():T;
|
|
142
198
|
get type():string;
|
|
143
199
|
}
|
|
144
|
-
export interface
|
|
145
|
-
get
|
|
146
|
-
get
|
|
147
|
-
get color():string|null;
|
|
200
|
+
export interface RefreshToken {
|
|
201
|
+
get bytes():string;
|
|
202
|
+
get expiry():number;
|
|
148
203
|
}
|
|
149
204
|
/**
|
|
150
|
-
* Represents
|
|
151
|
-
*
|
|
152
|
-
*
|
|
205
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
206
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
207
|
+
*
|
|
208
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
209
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
210
|
+
* backwards compatibility and to better follow JS expectations.
|
|
153
211
|
*/
|
|
154
|
-
export interface
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
212
|
+
export interface WidgetMessageDetails {
|
|
213
|
+
/**
|
|
214
|
+
* Returns the data from this message as a base64-encoded string.
|
|
215
|
+
*/
|
|
216
|
+
getDataAsBase64():string;
|
|
217
|
+
/**
|
|
218
|
+
* Returns the data from this message as a Uint8Array.
|
|
219
|
+
*/
|
|
220
|
+
getDataAsU8():Uint8Array;
|
|
221
|
+
/**
|
|
222
|
+
* Returns the data from this message as a utf-8 string.
|
|
223
|
+
*/
|
|
224
|
+
getDataAsString():string;
|
|
225
|
+
/**
|
|
226
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
227
|
+
* objects, and should close them when no longer needed.
|
|
228
|
+
*/
|
|
229
|
+
get exportedObjects():WidgetExportedObject[];
|
|
158
230
|
}
|
|
159
231
|
/**
|
|
160
232
|
* Options for requesting a preview of columns when requesting table data. The two properties
|
|
@@ -174,178 +246,60 @@ export namespace dh {
|
|
|
174
246
|
*/
|
|
175
247
|
array?:number|null;
|
|
176
248
|
}
|
|
177
|
-
export interface HasEventHandling {
|
|
178
|
-
/**
|
|
179
|
-
* Listen for events on this object.
|
|
180
|
-
* @param name - the name of the event to listen for
|
|
181
|
-
* @param callback - a function to call when the event occurs
|
|
182
|
-
* @return Returns a cleanup function.
|
|
183
|
-
* @typeParam T - the type of the data that the event will provide
|
|
184
|
-
*/
|
|
185
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
186
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
187
|
-
hasListeners(name:string):boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Removes an event listener added to this table.
|
|
190
|
-
* @param name -
|
|
191
|
-
* @param callback -
|
|
192
|
-
* @return
|
|
193
|
-
* @typeParam T -
|
|
194
|
-
*/
|
|
195
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
199
|
-
* request the viewport again.
|
|
200
|
-
*/
|
|
201
|
-
export interface ViewportRow extends Row {
|
|
202
|
-
get(column:Column):any;
|
|
203
|
-
getFormat(column:Column):Format;
|
|
204
|
-
get index():LongWrapper;
|
|
205
|
-
}
|
|
206
249
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* <p>
|
|
210
|
-
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
211
|
-
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
212
|
-
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
250
|
+
* Similar to {@link dh.ViewportData}, but with additional properties to reflect
|
|
251
|
+
* the tree structure.
|
|
213
252
|
*/
|
|
214
|
-
export interface TableData {
|
|
215
|
-
|
|
216
|
-
* Reads a row object from the table, from which any subscribed column can be read.
|
|
217
|
-
* @param index - the position or key to access
|
|
218
|
-
* @return the row at the given location
|
|
219
|
-
*/
|
|
220
|
-
get(index:LongWrapper|number):Row;
|
|
221
|
-
/**
|
|
222
|
-
* Reads a specific cell from the table, by row key and column.
|
|
223
|
-
* @param index - the row in the table to get data from
|
|
224
|
-
* @param column - the column to read
|
|
225
|
-
* @return the value in the table
|
|
226
|
-
*/
|
|
253
|
+
export interface TreeViewportData extends TableData {
|
|
254
|
+
get(index:LongWrapper|number):TreeRow;
|
|
227
255
|
getData(index:LongWrapper|number, column:Column):any;
|
|
228
|
-
/**
|
|
229
|
-
* The server-specified Format to use for the cell at the given position.
|
|
230
|
-
* @param index - the row to read
|
|
231
|
-
* @param column - the column to read
|
|
232
|
-
* @return a Format instance with any server-specified details
|
|
233
|
-
*/
|
|
234
256
|
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
235
|
-
get
|
|
257
|
+
get treeSize():number;
|
|
236
258
|
/**
|
|
237
|
-
*
|
|
259
|
+
* The position of the first returned row within the tree.
|
|
238
260
|
*/
|
|
239
|
-
get
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
243
|
-
|
|
244
|
-
get hiddenColumns():string[]|null;
|
|
245
|
-
get frozenColumns():string[]|null;
|
|
246
|
-
get columnGroups():ColumnGroup[]|null;
|
|
247
|
-
get areSavedLayoutsAllowed():boolean;
|
|
248
|
-
get frontColumns():string[]|null;
|
|
249
|
-
get backColumns():string[]|null;
|
|
261
|
+
get offset():number;
|
|
262
|
+
get columns():Array<Column>;
|
|
263
|
+
get rows():Array<TreeRow>;
|
|
250
264
|
}
|
|
251
265
|
/**
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
266
|
+
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
267
|
+
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
268
|
+
*
|
|
269
|
+
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
270
|
+
*
|
|
271
|
+
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
272
|
+
* template when fetching a new totals table, or changing the totals table in use.
|
|
273
|
+
*
|
|
274
|
+
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
275
|
+
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
276
|
+
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
277
|
+
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
278
|
+
*
|
|
279
|
+
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
280
|
+
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
255
281
|
*/
|
|
256
|
-
export interface
|
|
282
|
+
export interface TotalsTable extends JoinableTable {
|
|
257
283
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
284
|
+
* Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
|
|
285
|
+
* provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
|
|
286
|
+
* events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
|
|
287
|
+
* event per row in that range.
|
|
288
|
+
* @param firstRow -
|
|
289
|
+
* @param lastRow -
|
|
290
|
+
* @param columns -
|
|
291
|
+
* @param updateIntervalMs -
|
|
292
|
+
* @deprecated Use {@link #createViewportSubscription(Object)} instead.
|
|
262
293
|
*/
|
|
263
|
-
|
|
264
|
-
|
|
294
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
|
|
265
295
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* @return
|
|
296
|
+
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
297
|
+
* resolve until that data is ready.
|
|
298
|
+
* @return Promise of {@link dh.TableData}
|
|
299
|
+
* @deprecated use {@link TableViewportSubscription#getViewportData()} on the result from
|
|
300
|
+
* {@link #createViewportSubscription(Object)} instead.
|
|
269
301
|
*/
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
273
|
-
* the same instance.
|
|
274
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
275
|
-
*/
|
|
276
|
-
fetch():Promise<any>;
|
|
277
|
-
/**
|
|
278
|
-
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
279
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
280
|
-
*/
|
|
281
|
-
close():void;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Options for requesting a full-table subscription to a table.
|
|
285
|
-
*/
|
|
286
|
-
export interface SubscriptionOptions extends DataOptions {
|
|
287
|
-
/**
|
|
288
|
-
* Minimum interval between updates, in milliseconds. If not specified, the server default will be used,
|
|
289
|
-
* typically 1000ms.
|
|
290
|
-
* <p>
|
|
291
|
-
* Note that setting this to smaller values will not necessarily result in more frequent updates - the server
|
|
292
|
-
* may not propagate updates that frequently, or there may be no updates to propagate.
|
|
293
|
-
*/
|
|
294
|
-
updateIntervalMs?:number|null;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Options for requesting a snapshot of a table.
|
|
298
|
-
*/
|
|
299
|
-
export interface SnapshotOptions extends DataOptions {
|
|
300
|
-
/**
|
|
301
|
-
* If true, the snapshot will be filled starting from the end of the table, where 0 is the last row of the
|
|
302
|
-
* table. Default is false.
|
|
303
|
-
*/
|
|
304
|
-
isReverseViewport?:boolean|null;
|
|
305
|
-
/**
|
|
306
|
-
* The rows to include in the snapshot. This can be either a {@link dh.RangeSet} or a single range with
|
|
307
|
-
* `first` and `last` properties.
|
|
308
|
-
*/
|
|
309
|
-
rows:RangeSet|SimpleRange;
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
313
|
-
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
314
|
-
*
|
|
315
|
-
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
316
|
-
*
|
|
317
|
-
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
318
|
-
* template when fetching a new totals table, or changing the totals table in use.
|
|
319
|
-
*
|
|
320
|
-
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
321
|
-
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
322
|
-
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
323
|
-
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
324
|
-
*
|
|
325
|
-
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
326
|
-
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
327
|
-
*/
|
|
328
|
-
export interface TotalsTable extends JoinableTable {
|
|
329
|
-
/**
|
|
330
|
-
* Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
|
|
331
|
-
* provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
|
|
332
|
-
* events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
|
|
333
|
-
* event per row in that range.
|
|
334
|
-
* @param firstRow -
|
|
335
|
-
* @param lastRow -
|
|
336
|
-
* @param columns -
|
|
337
|
-
* @param updateIntervalMs -
|
|
338
|
-
* @deprecated Use {@link #createViewportSubscription(Object)} instead.
|
|
339
|
-
*/
|
|
340
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
|
|
341
|
-
/**
|
|
342
|
-
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
343
|
-
* resolve until that data is ready.
|
|
344
|
-
* @return Promise of {@link dh.TableData}
|
|
345
|
-
* @deprecated use {@link TableViewportSubscription#getViewportData()} on the result from
|
|
346
|
-
* {@link #createViewportSubscription(Object)} instead.
|
|
347
|
-
*/
|
|
348
|
-
getViewportData():Promise<ViewportData>;
|
|
302
|
+
getViewportData():Promise<ViewportData>;
|
|
349
303
|
/**
|
|
350
304
|
* Creates a subscription to this table, with the given options. See {@link Table.createSubscription} for
|
|
351
305
|
* more information.
|
|
@@ -463,6 +417,83 @@ export namespace dh {
|
|
|
463
417
|
get isRefreshing():boolean;
|
|
464
418
|
}
|
|
465
419
|
/**
|
|
420
|
+
* Options for requesting a viewport subscription to a table.
|
|
421
|
+
*/
|
|
422
|
+
export interface ViewportSubscriptionOptions extends SubscriptionOptions {
|
|
423
|
+
/**
|
|
424
|
+
* If true, the viewport will be filled starting from the end of the table, where 0 is the last row of the
|
|
425
|
+
* table. Default is false.
|
|
426
|
+
*/
|
|
427
|
+
isReverseViewport?:boolean|null;
|
|
428
|
+
/**
|
|
429
|
+
* The rows to include in the viewport. This can be either a {@link dh.RangeSet} or a single range with
|
|
430
|
+
* `first` and `last` properties.
|
|
431
|
+
*/
|
|
432
|
+
rows:RangeSet|SimpleRange;
|
|
433
|
+
}
|
|
434
|
+
export interface LayoutHints {
|
|
435
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
436
|
+
|
|
437
|
+
get hiddenColumns():string[]|null;
|
|
438
|
+
get frozenColumns():string[]|null;
|
|
439
|
+
get columnGroups():ColumnGroup[]|null;
|
|
440
|
+
get areSavedLayoutsAllowed():boolean;
|
|
441
|
+
get frontColumns():string[]|null;
|
|
442
|
+
get backColumns():string[]|null;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
446
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
447
|
+
* are correctly freed.
|
|
448
|
+
*/
|
|
449
|
+
export interface WidgetExportedObject {
|
|
450
|
+
/**
|
|
451
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
452
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
453
|
+
* {@link Widget.sendMessage}.
|
|
454
|
+
* @return the string type of this server-side object, or null.
|
|
455
|
+
*/
|
|
456
|
+
readonly type?:string|null;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
460
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
461
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
462
|
+
*/
|
|
463
|
+
reexport():Promise<WidgetExportedObject>;
|
|
464
|
+
/**
|
|
465
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
466
|
+
* the same instance.
|
|
467
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
468
|
+
*/
|
|
469
|
+
fetch():Promise<any>;
|
|
470
|
+
/**
|
|
471
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
472
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
473
|
+
*/
|
|
474
|
+
close():void;
|
|
475
|
+
}
|
|
476
|
+
export interface HasEventHandling {
|
|
477
|
+
/**
|
|
478
|
+
* Listen for events on this object.
|
|
479
|
+
* @param name - the name of the event to listen for
|
|
480
|
+
* @param callback - a function to call when the event occurs
|
|
481
|
+
* @return Returns a cleanup function.
|
|
482
|
+
* @typeParam T - the type of the data that the event will provide
|
|
483
|
+
*/
|
|
484
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
485
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
486
|
+
hasListeners(name:string):boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Removes an event listener added to this table.
|
|
489
|
+
* @param name -
|
|
490
|
+
* @param callback -
|
|
491
|
+
* @return
|
|
492
|
+
* @typeParam T -
|
|
493
|
+
*/
|
|
494
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
466
497
|
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
467
498
|
* columns) either by index, or scanning the complete present index.
|
|
468
499
|
* <p>
|
|
@@ -499,10 +530,6 @@ export namespace dh {
|
|
|
499
530
|
*/
|
|
500
531
|
get rows():Array<Row>;
|
|
501
532
|
}
|
|
502
|
-
export interface RefreshToken {
|
|
503
|
-
get bytes():string;
|
|
504
|
-
get expiry():number;
|
|
505
|
-
}
|
|
506
533
|
/**
|
|
507
534
|
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
508
535
|
* with additional properties to reflect the tree structure.
|
|
@@ -531,116 +558,51 @@ export namespace dh {
|
|
|
531
558
|
get index():LongWrapper;
|
|
532
559
|
}
|
|
533
560
|
/**
|
|
534
|
-
* Represents
|
|
535
|
-
* {@link dh.TotalsTable}.
|
|
561
|
+
* Represents statistics for a given table column.
|
|
536
562
|
*/
|
|
537
|
-
export interface
|
|
538
|
-
freeze():Promise<Table>;
|
|
539
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
540
|
-
/**
|
|
541
|
-
* Joins this table to the provided table, using one of the specified join types:
|
|
542
|
-
* <ul>
|
|
543
|
-
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
544
|
-
* provided matching rule.</li>
|
|
545
|
-
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
546
|
-
* tables.</li>
|
|
547
|
-
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
548
|
-
* with errors if there is not exactly one.</li>
|
|
549
|
-
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
550
|
-
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
551
|
-
* </ul>
|
|
552
|
-
*
|
|
553
|
-
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
554
|
-
* <p>
|
|
555
|
-
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
556
|
-
* more guidance on picking a join operation.
|
|
557
|
-
* @deprecated Instead, call the specific method for the join type.
|
|
558
|
-
* @param joinType - The type of join to perform, see the list above.
|
|
559
|
-
* @param rightTable - The table to match to values in this table
|
|
560
|
-
* @param columnsToMatch - Columns that should match
|
|
561
|
-
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
562
|
-
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
563
|
-
* @return a promise that will resolve to the joined table
|
|
564
|
-
*/
|
|
565
|
-
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
563
|
+
export interface ColumnStatistics {
|
|
566
564
|
/**
|
|
567
|
-
*
|
|
568
|
-
* row from the right table.
|
|
565
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
569
566
|
* <p>
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
* <li>LESS_THAN</li>
|
|
574
|
-
* <li>GREATER_THAN_EQUAL</li>
|
|
575
|
-
* <li>GREATER_THAN</li>
|
|
576
|
-
* </ul>
|
|
577
|
-
* @param rightTable - the table to match to values in this table
|
|
578
|
-
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
579
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
580
|
-
* columns
|
|
581
|
-
* @param asOfMatchRule - the match rule to use, see above
|
|
582
|
-
* @return a promise that will resolve to the joined table
|
|
583
|
-
*/
|
|
584
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
585
|
-
/**
|
|
586
|
-
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
587
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
588
|
-
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
589
|
-
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
590
|
-
* @param rightTable - the table to match to values in this table
|
|
591
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
592
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
593
|
-
* columns
|
|
594
|
-
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
595
|
-
* server select a value
|
|
596
|
-
* @return a promise that will resolve to the joined table
|
|
567
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
568
|
+
* @param name - the display name of the statistic
|
|
569
|
+
* @return String
|
|
597
570
|
*/
|
|
598
|
-
|
|
571
|
+
getType(name:string):string;
|
|
599
572
|
/**
|
|
600
|
-
* a
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
* @
|
|
604
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
605
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
606
|
-
* columns
|
|
607
|
-
* @return a promise that will resolve to the joined table
|
|
573
|
+
* 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
|
|
574
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
575
|
+
* than 19 unique values.
|
|
576
|
+
* @return Map of String double
|
|
608
577
|
*/
|
|
609
|
-
|
|
578
|
+
get uniqueValues():Map<string, number>;
|
|
610
579
|
/**
|
|
611
|
-
* a
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
* @
|
|
615
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
616
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
617
|
-
* columns
|
|
618
|
-
* @return a promise that will resolve to the joined table
|
|
580
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
581
|
+
* <p>
|
|
582
|
+
* A map of each statistic's name to its value.
|
|
583
|
+
* @return Map of String and Object
|
|
619
584
|
*/
|
|
620
|
-
|
|
585
|
+
get statisticsMap():Map<string, object>;
|
|
621
586
|
}
|
|
622
587
|
/**
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
627
|
-
* <p>
|
|
628
|
-
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
629
|
-
* scrolling without going to the server.
|
|
588
|
+
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
589
|
+
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
590
|
+
* event, or re-request the viewport data.
|
|
630
591
|
*/
|
|
631
|
-
export interface
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
592
|
+
export interface Row {
|
|
593
|
+
get(column:Column):any;
|
|
594
|
+
getFormat(column:Column):Format;
|
|
595
|
+
get index():LongWrapper;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
599
|
+
*/
|
|
600
|
+
export interface LocalDateWrapper {
|
|
601
|
+
valueOf():string;
|
|
602
|
+
getYear():number;
|
|
603
|
+
getMonthValue():number;
|
|
604
|
+
getDayOfMonth():number;
|
|
605
|
+
toString():string;
|
|
644
606
|
}
|
|
645
607
|
/**
|
|
646
608
|
* Options for requesting table data, either as a snapshot or a subscription. See subtypes for more specific options:
|
|
@@ -661,41 +623,52 @@ export namespace dh {
|
|
|
661
623
|
columns:Array<Column>;
|
|
662
624
|
}
|
|
663
625
|
/**
|
|
664
|
-
*
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
getDayOfMonth():number;
|
|
671
|
-
toString():string;
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
675
|
-
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
676
|
-
*
|
|
677
|
-
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
678
|
-
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
679
|
-
* backwards compatibility and to better follow JS expectations.
|
|
626
|
+
* Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
|
|
627
|
+
* on tables, data in trees, and snapshots.
|
|
628
|
+
* <p>
|
|
629
|
+
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
630
|
+
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
631
|
+
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
680
632
|
*/
|
|
681
|
-
export interface
|
|
633
|
+
export interface TableData {
|
|
682
634
|
/**
|
|
683
|
-
*
|
|
635
|
+
* Reads a row object from the table, from which any subscribed column can be read.
|
|
636
|
+
* @param index - the position or key to access
|
|
637
|
+
* @return the row at the given location
|
|
684
638
|
*/
|
|
685
|
-
|
|
639
|
+
get(index:LongWrapper|number):Row;
|
|
686
640
|
/**
|
|
687
|
-
*
|
|
641
|
+
* Reads a specific cell from the table, by row key and column.
|
|
642
|
+
* @param index - the row in the table to get data from
|
|
643
|
+
* @param column - the column to read
|
|
644
|
+
* @return the value in the table
|
|
688
645
|
*/
|
|
689
|
-
|
|
646
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
690
647
|
/**
|
|
691
|
-
*
|
|
648
|
+
* The server-specified Format to use for the cell at the given position.
|
|
649
|
+
* @param index - the row to read
|
|
650
|
+
* @param column - the column to read
|
|
651
|
+
* @return a Format instance with any server-specified details
|
|
692
652
|
*/
|
|
693
|
-
|
|
653
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
654
|
+
get columns():Array<Column>;
|
|
694
655
|
/**
|
|
695
|
-
*
|
|
696
|
-
* objects, and should close them when no longer needed.
|
|
656
|
+
* A lazily computed array of all rows available on the client.
|
|
697
657
|
*/
|
|
698
|
-
get
|
|
658
|
+
get rows():Array<Row>;
|
|
659
|
+
}
|
|
660
|
+
export interface ColumnGroup {
|
|
661
|
+
get name():string|null;
|
|
662
|
+
get children():string[]|null;
|
|
663
|
+
get color():string|null;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Simple range consisting only of start and end numbers. Will be migrated to deephaven-core in the near future, and
|
|
667
|
+
* subsequently removed from this the coreplus namespace.
|
|
668
|
+
*/
|
|
669
|
+
export interface SimpleRange {
|
|
670
|
+
first:number;
|
|
671
|
+
last:number;
|
|
699
672
|
}
|
|
700
673
|
export interface WorkerHeapInfo {
|
|
701
674
|
/**
|
|
@@ -706,31 +679,93 @@ export namespace dh {
|
|
|
706
679
|
get maximumHeapSize():number;
|
|
707
680
|
}
|
|
708
681
|
/**
|
|
709
|
-
* Represents
|
|
682
|
+
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
683
|
+
* {@link dh.TotalsTable}.
|
|
710
684
|
*/
|
|
711
|
-
export interface
|
|
685
|
+
export interface JoinableTable {
|
|
686
|
+
freeze():Promise<Table>;
|
|
687
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
712
688
|
/**
|
|
713
|
-
*
|
|
689
|
+
* Joins this table to the provided table, using one of the specified join types:
|
|
690
|
+
* <ul>
|
|
691
|
+
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
692
|
+
* provided matching rule.</li>
|
|
693
|
+
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
694
|
+
* tables.</li>
|
|
695
|
+
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
696
|
+
* with errors if there is not exactly one.</li>
|
|
697
|
+
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
698
|
+
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
699
|
+
* </ul>
|
|
700
|
+
*
|
|
701
|
+
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
714
702
|
* <p>
|
|
715
|
-
* the
|
|
716
|
-
*
|
|
717
|
-
* @
|
|
703
|
+
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
704
|
+
* more guidance on picking a join operation.
|
|
705
|
+
* @deprecated Instead, call the specific method for the join type.
|
|
706
|
+
* @param joinType - The type of join to perform, see the list above.
|
|
707
|
+
* @param rightTable - The table to match to values in this table
|
|
708
|
+
* @param columnsToMatch - Columns that should match
|
|
709
|
+
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
710
|
+
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
711
|
+
* @return a promise that will resolve to the joined table
|
|
718
712
|
*/
|
|
719
|
-
|
|
713
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
720
714
|
/**
|
|
721
|
-
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
715
|
+
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
716
|
+
* row from the right table.
|
|
717
|
+
* <p>
|
|
718
|
+
* The `asOfMatchRule` value can be one of:
|
|
719
|
+
* <ul>
|
|
720
|
+
* <li>LESS_THAN_EQUAL</li>
|
|
721
|
+
* <li>LESS_THAN</li>
|
|
722
|
+
* <li>GREATER_THAN_EQUAL</li>
|
|
723
|
+
* <li>GREATER_THAN</li>
|
|
724
|
+
* </ul>
|
|
725
|
+
* @param rightTable - the table to match to values in this table
|
|
726
|
+
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
727
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
728
|
+
* columns
|
|
729
|
+
* @param asOfMatchRule - the match rule to use, see above
|
|
730
|
+
* @return a promise that will resolve to the joined table
|
|
725
731
|
*/
|
|
726
|
-
|
|
732
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
727
733
|
/**
|
|
728
|
-
*
|
|
729
|
-
* <
|
|
730
|
-
*
|
|
731
|
-
*
|
|
734
|
+
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
735
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
736
|
+
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
737
|
+
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
738
|
+
* @param rightTable - the table to match to values in this table
|
|
739
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
740
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
741
|
+
* columns
|
|
742
|
+
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
743
|
+
* server select a value
|
|
744
|
+
* @return a promise that will resolve to the joined table
|
|
732
745
|
*/
|
|
733
|
-
|
|
746
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
747
|
+
/**
|
|
748
|
+
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
749
|
+
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
750
|
+
* table being added to the output.
|
|
751
|
+
* @param rightTable - the table to match to values in this table
|
|
752
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
753
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
754
|
+
* columns
|
|
755
|
+
* @return a promise that will resolve to the joined table
|
|
756
|
+
*/
|
|
757
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
758
|
+
/**
|
|
759
|
+
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
760
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
761
|
+
* right table being added to the output.
|
|
762
|
+
* @param rightTable - the table to match to values in this table
|
|
763
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
764
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
765
|
+
* columns
|
|
766
|
+
* @return a promise that will resolve to the joined table
|
|
767
|
+
*/
|
|
768
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
734
769
|
}
|
|
735
770
|
/**
|
|
736
771
|
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
@@ -757,89 +792,173 @@ export namespace dh {
|
|
|
757
792
|
*/
|
|
758
793
|
readonly numberFormat?:string|null;
|
|
759
794
|
}
|
|
795
|
+
|
|
760
796
|
/**
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*/
|
|
764
|
-
export interface SimpleRange {
|
|
765
|
-
first:number;
|
|
766
|
-
last:number;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
770
|
-
*/
|
|
771
|
-
export interface LocalTimeWrapper {
|
|
772
|
-
valueOf():string;
|
|
773
|
-
getHour():number;
|
|
774
|
-
getMinute():number;
|
|
775
|
-
getSecond():number;
|
|
776
|
-
getNano():number;
|
|
777
|
-
toString():string;
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* Similar to {@link dh.ViewportData}, but with additional properties to reflect
|
|
781
|
-
* the tree structure.
|
|
797
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
798
|
+
* roll-up table.
|
|
782
799
|
*/
|
|
783
|
-
export
|
|
784
|
-
get(index:LongWrapper|number):TreeRow;
|
|
785
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
786
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
787
|
-
get treeSize():number;
|
|
800
|
+
export class RollupConfig {
|
|
788
801
|
/**
|
|
789
|
-
*
|
|
802
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
790
803
|
*/
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
804
|
+
groupingColumns:Array<String>;
|
|
805
|
+
/**
|
|
806
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
807
|
+
* roll-up table.
|
|
808
|
+
*/
|
|
809
|
+
aggregations:{ [key: string]: Array<string>; };
|
|
810
|
+
/**
|
|
811
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
812
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
813
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
814
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
815
|
+
*/
|
|
816
|
+
includeConstituents:boolean;
|
|
817
|
+
includeOriginalColumns?:boolean|null;
|
|
818
|
+
/**
|
|
819
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
820
|
+
*/
|
|
821
|
+
includeDescriptions:boolean;
|
|
822
|
+
|
|
823
|
+
constructor();
|
|
794
824
|
}
|
|
795
825
|
|
|
796
|
-
export class LongWrapper {
|
|
826
|
+
export class DateWrapper extends LongWrapper {
|
|
797
827
|
protected constructor();
|
|
798
828
|
|
|
799
|
-
static
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
829
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
830
|
+
asDate():Date;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
export class LongWrapper {
|
|
834
|
+
protected constructor();
|
|
835
|
+
|
|
836
|
+
static ofString(str:string):LongWrapper;
|
|
837
|
+
asNumber():number;
|
|
838
|
+
valueOf():string;
|
|
839
|
+
toString():string;
|
|
803
840
|
}
|
|
804
841
|
|
|
805
842
|
/**
|
|
806
|
-
* This
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
810
|
-
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
843
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
844
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
845
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
811
846
|
*/
|
|
812
|
-
export class
|
|
847
|
+
export class RangeSet {
|
|
813
848
|
protected constructor();
|
|
814
849
|
|
|
850
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
851
|
+
static ofItems(rows:number[]):RangeSet;
|
|
852
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
853
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
815
854
|
/**
|
|
816
|
-
*
|
|
817
|
-
* @
|
|
818
|
-
* @param lastRow -
|
|
819
|
-
* @param columns -
|
|
820
|
-
* @param updateIntervalMs -
|
|
821
|
-
* @deprecated use {@link #update(Object)} instead
|
|
855
|
+
* a new iterator over all indexes in this collection.
|
|
856
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
822
857
|
*/
|
|
823
|
-
|
|
858
|
+
iterator():Iterator<LongWrapper>;
|
|
824
859
|
/**
|
|
825
|
-
*
|
|
826
|
-
*
|
|
860
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
861
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
862
|
+
* property each time through a loop).
|
|
863
|
+
* @return double
|
|
827
864
|
*/
|
|
828
|
-
|
|
865
|
+
get size():number;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Deprecated for use in Deephaven Core.
|
|
870
|
+
* @deprecated
|
|
871
|
+
*/
|
|
872
|
+
export class Client {
|
|
873
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
874
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
875
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
876
|
+
|
|
877
|
+
constructor();
|
|
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
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
890
|
+
* the server to get each Table. All tables will have the same structure.
|
|
891
|
+
*/
|
|
892
|
+
export class PartitionedTable implements HasEventHandling {
|
|
829
893
|
/**
|
|
830
|
-
*
|
|
894
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
895
|
+
*/
|
|
896
|
+
static readonly EVENT_KEYADDED:string;
|
|
897
|
+
/**
|
|
898
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
899
|
+
*/
|
|
900
|
+
static readonly EVENT_DISCONNECT:string;
|
|
901
|
+
/**
|
|
902
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
903
|
+
*/
|
|
904
|
+
static readonly EVENT_RECONNECT:string;
|
|
905
|
+
/**
|
|
906
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
907
|
+
*/
|
|
908
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
909
|
+
|
|
910
|
+
protected constructor();
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
914
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
915
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
916
|
+
*/
|
|
917
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
918
|
+
/**
|
|
919
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
920
|
+
* {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
|
|
921
|
+
* @return A merged representation of the constituent tables.
|
|
922
|
+
*/
|
|
923
|
+
getMergedTable():Promise<Table>;
|
|
924
|
+
/**
|
|
925
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
926
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
927
|
+
* @return Set of Object
|
|
928
|
+
*/
|
|
929
|
+
getKeys():Set<object>;
|
|
930
|
+
/**
|
|
931
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
932
|
+
* @return Promise of a Table
|
|
933
|
+
* @deprecated
|
|
934
|
+
*/
|
|
935
|
+
getKeyTable():Promise<Table>;
|
|
936
|
+
/**
|
|
937
|
+
* Fetch the underlying base table of the partitioned table.
|
|
938
|
+
* @return Promise of a Table
|
|
939
|
+
*/
|
|
940
|
+
getBaseTable():Promise<Table>;
|
|
941
|
+
/**
|
|
942
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
943
|
+
* will not affect tables in use.
|
|
831
944
|
*/
|
|
832
945
|
close():void;
|
|
833
946
|
/**
|
|
834
|
-
*
|
|
835
|
-
* @return
|
|
947
|
+
* The count of known keys.
|
|
948
|
+
* @return int
|
|
836
949
|
*/
|
|
837
|
-
|
|
950
|
+
get size():number;
|
|
838
951
|
/**
|
|
839
|
-
*
|
|
840
|
-
*
|
|
952
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
953
|
+
* non-key columns.
|
|
954
|
+
* @return Array of Column
|
|
841
955
|
*/
|
|
842
|
-
|
|
956
|
+
get columns():Column[];
|
|
957
|
+
/**
|
|
958
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
959
|
+
* @return Array of Column
|
|
960
|
+
*/
|
|
961
|
+
get keyColumns():Column[];
|
|
843
962
|
/**
|
|
844
963
|
* Listen for events on this object.
|
|
845
964
|
* @param name - the name of the event to listen for
|
|
@@ -861,172 +980,226 @@ export namespace dh {
|
|
|
861
980
|
}
|
|
862
981
|
|
|
863
982
|
/**
|
|
864
|
-
*
|
|
865
|
-
* roll-up table.
|
|
983
|
+
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
866
984
|
*/
|
|
867
|
-
export class
|
|
985
|
+
export class ConnectOptions {
|
|
868
986
|
/**
|
|
869
|
-
*
|
|
987
|
+
* Optional map of http header names and values to send to the server with each request.
|
|
870
988
|
*/
|
|
871
|
-
|
|
989
|
+
headers?:{ [key: string]: string; }|null;
|
|
872
990
|
/**
|
|
873
|
-
*
|
|
874
|
-
* roll-up table.
|
|
991
|
+
* True to enable debug logging. At this time, only enables logging for gRPC calls.
|
|
875
992
|
*/
|
|
876
|
-
|
|
993
|
+
debug?:boolean|null;
|
|
877
994
|
/**
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
995
|
+
* Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
|
|
996
|
+
* of `fetch`. Ignored if {@link dh.transportFactory} is set.
|
|
997
|
+
* <p>
|
|
998
|
+
* Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
|
|
882
999
|
*/
|
|
883
|
-
|
|
884
|
-
includeOriginalColumns?:boolean|null;
|
|
1000
|
+
useWebsockets?:boolean|null;
|
|
885
1001
|
/**
|
|
886
|
-
*
|
|
1002
|
+
* The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
|
|
1003
|
+
* {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
|
|
1004
|
+
* <p>
|
|
1005
|
+
* Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
|
|
1006
|
+
* `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
|
|
1007
|
+
* https, it will use fetch, otherwise it will use websockets.
|
|
887
1008
|
*/
|
|
888
|
-
|
|
1009
|
+
transportFactory?:dh.grpc.GrpcTransportFactory|null;
|
|
889
1010
|
|
|
890
1011
|
constructor();
|
|
891
1012
|
}
|
|
892
1013
|
|
|
893
1014
|
/**
|
|
894
|
-
*
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
*
|
|
898
|
-
*
|
|
899
|
-
*
|
|
900
|
-
*
|
|
901
|
-
*
|
|
902
|
-
*
|
|
1015
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1016
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
1017
|
+
* <p>
|
|
1018
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1019
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1020
|
+
* forward data to it.
|
|
1021
|
+
* <p>
|
|
1022
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1023
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1024
|
+
* viewports to make it less expensive to compute for large tables.
|
|
903
1025
|
*/
|
|
904
|
-
export class
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
static readonly COUNT:string;
|
|
909
|
-
/**
|
|
910
|
-
* @deprecated
|
|
911
|
-
*/
|
|
912
|
-
static readonly MIN:string;
|
|
913
|
-
/**
|
|
914
|
-
* @deprecated
|
|
915
|
-
*/
|
|
916
|
-
static readonly MAX:string;
|
|
917
|
-
/**
|
|
918
|
-
* @deprecated
|
|
919
|
-
*/
|
|
920
|
-
static readonly SUM:string;
|
|
921
|
-
/**
|
|
922
|
-
* @deprecated
|
|
923
|
-
*/
|
|
924
|
-
static readonly ABS_SUM:string;
|
|
925
|
-
/**
|
|
926
|
-
* @deprecated
|
|
927
|
-
*/
|
|
928
|
-
static readonly VAR:string;
|
|
1026
|
+
export class TableSubscription implements HasEventHandling {
|
|
1027
|
+
protected constructor();
|
|
1028
|
+
|
|
1029
|
+
static createTableSubscription(options:SubscriptionOptions, existingTable:Table):TableSubscription;
|
|
929
1030
|
/**
|
|
930
|
-
*
|
|
1031
|
+
* Updates the subscription to use the given columns and update interval.
|
|
1032
|
+
* @param columns - the new columns to subscribe to
|
|
1033
|
+
* @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
|
|
931
1034
|
*/
|
|
932
|
-
|
|
1035
|
+
changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
|
|
933
1036
|
/**
|
|
934
|
-
*
|
|
1037
|
+
* Update the options for this viewport subscription. This cannot alter the update interval or preview options.
|
|
1038
|
+
* @param options - the subscription options
|
|
935
1039
|
*/
|
|
936
|
-
|
|
1040
|
+
update(options:SubscriptionOptions):void;
|
|
1041
|
+
get columns():Array<Column>;
|
|
937
1042
|
/**
|
|
938
|
-
*
|
|
1043
|
+
* Stops the subscription on the server.
|
|
939
1044
|
*/
|
|
940
|
-
|
|
1045
|
+
close():void;
|
|
941
1046
|
/**
|
|
942
|
-
*
|
|
1047
|
+
* Listen for events on this object.
|
|
1048
|
+
* @param name - the name of the event to listen for
|
|
1049
|
+
* @param callback - a function to call when the event occurs
|
|
1050
|
+
* @return Returns a cleanup function.
|
|
1051
|
+
* @typeParam T - the type of the data that the event will provide
|
|
943
1052
|
*/
|
|
944
|
-
|
|
1053
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1054
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1055
|
+
hasListeners(name:string):boolean;
|
|
945
1056
|
/**
|
|
946
|
-
*
|
|
1057
|
+
* Removes an event listener added to this table.
|
|
1058
|
+
* @param name -
|
|
1059
|
+
* @param callback -
|
|
1060
|
+
* @return
|
|
1061
|
+
* @typeParam T -
|
|
947
1062
|
*/
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
951
|
-
*/
|
|
952
|
-
showTotalsByDefault:boolean;
|
|
953
|
-
/**
|
|
954
|
-
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
955
|
-
*/
|
|
956
|
-
showGrandTotalsByDefault:boolean;
|
|
957
|
-
/**
|
|
958
|
-
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
959
|
-
*/
|
|
960
|
-
defaultOperation:AggregationOperationType;
|
|
961
|
-
/**
|
|
962
|
-
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
963
|
-
* Table. If a column is omitted, the defaultOperation is used.
|
|
964
|
-
*/
|
|
965
|
-
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
966
|
-
/**
|
|
967
|
-
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
968
|
-
* these columns. See also `Table.selectDistinct`.
|
|
969
|
-
*/
|
|
970
|
-
groupBy:Array<string>;
|
|
971
|
-
|
|
972
|
-
constructor();
|
|
973
|
-
|
|
974
|
-
toString():string;
|
|
1063
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
975
1064
|
}
|
|
976
1065
|
|
|
977
1066
|
/**
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
1067
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1068
|
+
* interpret these responses to see what to render, or how to respond.
|
|
1069
|
+
* <p>
|
|
1070
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1071
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1072
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1073
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1074
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
1075
|
+
* <p>
|
|
1076
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1077
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1078
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1079
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1080
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1081
|
+
* <p>
|
|
1082
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1083
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1084
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1085
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1086
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1087
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1088
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1089
|
+
* <p>
|
|
1090
|
+
* This can suggest several patterns for how plugins operate:
|
|
1091
|
+
* <ul>
|
|
1092
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1093
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1094
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1095
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1096
|
+
* provided to the JS API consumer.</li>
|
|
1097
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1098
|
+
* which provided them. One concrete example of this could have been
|
|
1099
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1100
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1101
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1102
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1103
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1104
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1105
|
+
* an internal table instance.</li>
|
|
1106
|
+
* </ul>
|
|
1107
|
+
*
|
|
1108
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1109
|
+
* <ul>
|
|
1110
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1111
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1112
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1113
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1114
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
1115
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1116
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1117
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1118
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1119
|
+
* </ul>
|
|
981
1120
|
*/
|
|
982
|
-
export class
|
|
983
|
-
static readonly
|
|
984
|
-
static readonly
|
|
985
|
-
static readonly REVERSE:string;
|
|
1121
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1122
|
+
static readonly EVENT_MESSAGE:string;
|
|
1123
|
+
static readonly EVENT_CLOSE:string;
|
|
986
1124
|
|
|
987
1125
|
protected constructor();
|
|
988
1126
|
|
|
989
1127
|
/**
|
|
990
|
-
*
|
|
991
|
-
* @return {@link dh.Sort}
|
|
992
|
-
*/
|
|
993
|
-
asc():Sort;
|
|
994
|
-
/**
|
|
995
|
-
* Builds a Sort instance to sort values in descending order.
|
|
996
|
-
* @return {@link dh.Sort}
|
|
997
|
-
*/
|
|
998
|
-
desc():Sort;
|
|
999
|
-
/**
|
|
1000
|
-
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1001
|
-
* @return {@link dh.Sort}
|
|
1128
|
+
* Ends the client connection to the server.
|
|
1002
1129
|
*/
|
|
1003
|
-
|
|
1004
|
-
|
|
1130
|
+
close():void;
|
|
1131
|
+
getDataAsBase64():string;
|
|
1132
|
+
getDataAsU8():Uint8Array;
|
|
1133
|
+
getDataAsString():string;
|
|
1005
1134
|
/**
|
|
1006
|
-
*
|
|
1007
|
-
* @
|
|
1135
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1136
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
1137
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
1008
1138
|
*/
|
|
1009
|
-
|
|
1139
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1140
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1141
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1142
|
+
hasListeners(name:string):boolean;
|
|
1143
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1010
1144
|
/**
|
|
1011
|
-
*
|
|
1012
|
-
* @return
|
|
1145
|
+
*
|
|
1146
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1147
|
+
* them when finished using them.
|
|
1013
1148
|
*/
|
|
1014
|
-
get
|
|
1149
|
+
get exportedObjects():WidgetExportedObject[];
|
|
1015
1150
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
* @return
|
|
1151
|
+
*
|
|
1152
|
+
* @return the type of this widget
|
|
1018
1153
|
*/
|
|
1019
|
-
get
|
|
1154
|
+
get type():string;
|
|
1020
1155
|
}
|
|
1021
1156
|
|
|
1157
|
+
|
|
1022
1158
|
/**
|
|
1023
|
-
*
|
|
1159
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1160
|
+
* this type TableMap.
|
|
1161
|
+
* @deprecated
|
|
1024
1162
|
*/
|
|
1025
|
-
export class
|
|
1026
|
-
|
|
1163
|
+
export class TableMap {
|
|
1164
|
+
static readonly EVENT_KEYADDED:string;
|
|
1165
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1166
|
+
static readonly EVENT_RECONNECT:string;
|
|
1167
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1027
1168
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1169
|
+
protected constructor();
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
export class CoreClient implements HasEventHandling {
|
|
1173
|
+
static readonly EVENT_CONNECT:string;
|
|
1174
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1175
|
+
static readonly EVENT_RECONNECT:string;
|
|
1176
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1177
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1178
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1179
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1180
|
+
/**
|
|
1181
|
+
* @deprecated
|
|
1182
|
+
*/
|
|
1183
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1184
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1185
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1186
|
+
|
|
1187
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1188
|
+
|
|
1189
|
+
running():Promise<CoreClient>;
|
|
1190
|
+
getServerUrl():string;
|
|
1191
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
1192
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
1193
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
1194
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1195
|
+
getServerConfigValues():Promise<string[][]>;
|
|
1196
|
+
getStorageService():dh.storage.StorageService;
|
|
1197
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
1198
|
+
disconnect():void;
|
|
1199
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1200
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1201
|
+
hasListeners(name:string):boolean;
|
|
1202
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1030
1203
|
}
|
|
1031
1204
|
|
|
1032
1205
|
/**
|
|
@@ -1102,222 +1275,400 @@ export namespace dh {
|
|
|
1102
1275
|
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
1103
1276
|
}
|
|
1104
1277
|
|
|
1278
|
+
export class QueryInfo {
|
|
1279
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
1280
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1281
|
+
static readonly EVENT_RECONNECT:string;
|
|
1282
|
+
static readonly EVENT_CONNECT:string;
|
|
1283
|
+
|
|
1284
|
+
protected constructor();
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1105
1287
|
/**
|
|
1106
|
-
*
|
|
1288
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1289
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
1290
|
+
* methods return a new Sort instance.
|
|
1107
1291
|
*/
|
|
1108
|
-
export class
|
|
1292
|
+
export class Sort {
|
|
1293
|
+
static readonly ASCENDING:string;
|
|
1294
|
+
static readonly DESCENDING:string;
|
|
1295
|
+
static readonly REVERSE:string;
|
|
1296
|
+
|
|
1297
|
+
protected constructor();
|
|
1298
|
+
|
|
1109
1299
|
/**
|
|
1110
|
-
*
|
|
1300
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
1301
|
+
* @return {@link dh.Sort}
|
|
1111
1302
|
*/
|
|
1112
|
-
|
|
1303
|
+
asc():Sort;
|
|
1113
1304
|
/**
|
|
1114
|
-
*
|
|
1305
|
+
* Builds a Sort instance to sort values in descending order.
|
|
1306
|
+
* @return {@link dh.Sort}
|
|
1115
1307
|
*/
|
|
1116
|
-
|
|
1308
|
+
desc():Sort;
|
|
1117
1309
|
/**
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1120
|
-
* <p>
|
|
1121
|
-
* Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
|
|
1310
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1311
|
+
* @return {@link dh.Sort}
|
|
1122
1312
|
*/
|
|
1123
|
-
|
|
1313
|
+
abs():Sort;
|
|
1314
|
+
toString():string;
|
|
1124
1315
|
/**
|
|
1125
|
-
*
|
|
1126
|
-
*
|
|
1127
|
-
* <p>
|
|
1128
|
-
* Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
|
|
1129
|
-
* `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
|
|
1130
|
-
* https, it will use fetch, otherwise it will use websockets.
|
|
1316
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1317
|
+
* @return boolean
|
|
1131
1318
|
*/
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1319
|
+
get isAbs():boolean;
|
|
1320
|
+
/**
|
|
1321
|
+
* The column which is sorted.
|
|
1322
|
+
* @return {@link dh.Column}
|
|
1323
|
+
*/
|
|
1324
|
+
get column():Column;
|
|
1325
|
+
/**
|
|
1326
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
1327
|
+
* @return String
|
|
1328
|
+
*/
|
|
1329
|
+
get direction():string;
|
|
1135
1330
|
}
|
|
1136
1331
|
|
|
1137
1332
|
/**
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1333
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
1334
|
+
*
|
|
1335
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
1336
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
1337
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
1140
1338
|
*/
|
|
1141
|
-
export class
|
|
1339
|
+
export class TreeTableConfig {
|
|
1142
1340
|
/**
|
|
1143
|
-
*
|
|
1341
|
+
* The column representing the unique ID for each item
|
|
1144
1342
|
*/
|
|
1145
|
-
|
|
1146
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1147
|
-
static readonly EVENT_RECONNECT:string;
|
|
1148
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
1149
|
-
|
|
1150
|
-
protected constructor();
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* Closes the current connection, releasing any resources on the server or client.
|
|
1154
|
-
*/
|
|
1155
|
-
close():void;
|
|
1156
|
-
running():Promise<IdeConnection>;
|
|
1343
|
+
idColumn:string;
|
|
1157
1344
|
/**
|
|
1158
|
-
*
|
|
1159
|
-
* @param name - the name of the table to fetch
|
|
1160
|
-
* @param applyPreviewColumns - false to disable previews, defaults to true
|
|
1161
|
-
* @return a {@link Promise} that will resolve to the table, or reject with an error if it cannot be loaded.
|
|
1162
|
-
* @deprecated Added to resolve a specific issue, in the future preview will be applied as part of the subscription.
|
|
1345
|
+
* The column representing the parent ID for each item
|
|
1163
1346
|
*/
|
|
1164
|
-
|
|
1165
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1166
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1347
|
+
parentColumn:string;
|
|
1167
1348
|
/**
|
|
1168
|
-
*
|
|
1169
|
-
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
1170
|
-
* which knows this value can read the same object.
|
|
1171
|
-
* <p>
|
|
1172
|
-
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
1173
|
-
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
1174
|
-
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
1175
|
-
* <p>
|
|
1176
|
-
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
1177
|
-
* prevent access by unauthorized clients.
|
|
1178
|
-
* @param object - the object to share with another client/user
|
|
1179
|
-
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
1180
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
1181
|
-
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
1182
|
-
* by another client, or will reject if an error occurs.
|
|
1349
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
1183
1350
|
*/
|
|
1184
|
-
|
|
1351
|
+
promoteOrphansToRoot:boolean;
|
|
1352
|
+
|
|
1353
|
+
constructor();
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1358
|
+
* mechanism, and so reimplemented here.
|
|
1359
|
+
* <p>
|
|
1360
|
+
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1361
|
+
* <p>
|
|
1362
|
+
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1363
|
+
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1364
|
+
* <p>
|
|
1365
|
+
* The table size will be -1 until a viewport has been fetched.
|
|
1366
|
+
* <p>
|
|
1367
|
+
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1368
|
+
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1369
|
+
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1370
|
+
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1371
|
+
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1372
|
+
* the viewport).
|
|
1373
|
+
* <p>
|
|
1374
|
+
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1375
|
+
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1376
|
+
* <p>
|
|
1377
|
+
* <ul>
|
|
1378
|
+
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1379
|
+
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1380
|
+
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1381
|
+
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1382
|
+
* new operation is pending.</li>
|
|
1383
|
+
* <li>Custom columns are supported on Rollup tables, but not on Tree tables. If the TreeTable was created client-side,
|
|
1384
|
+
* the original Table can have custom columns applied, and the TreeTable can be recreated.</li>
|
|
1385
|
+
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1386
|
+
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1387
|
+
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1388
|
+
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1389
|
+
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1390
|
+
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1391
|
+
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1392
|
+
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1393
|
+
* where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
|
|
1394
|
+
* </ul>
|
|
1395
|
+
*/
|
|
1396
|
+
export class TreeTable implements HasEventHandling {
|
|
1185
1397
|
/**
|
|
1186
|
-
*
|
|
1187
|
-
* client releases this object (or their session ends), the object will be available on the server.
|
|
1188
|
-
* <p>
|
|
1189
|
-
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
1190
|
-
* should provide this information.
|
|
1191
|
-
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
1192
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
1193
|
-
* @param type - The type of the object, so it can be correctly read from the server
|
|
1194
|
-
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
1398
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1195
1399
|
*/
|
|
1196
|
-
|
|
1197
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
1400
|
+
static readonly EVENT_UPDATED:string;
|
|
1198
1401
|
/**
|
|
1199
|
-
*
|
|
1200
|
-
* @param tables -
|
|
1201
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
1402
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1202
1403
|
*/
|
|
1203
|
-
|
|
1404
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1204
1405
|
/**
|
|
1205
|
-
*
|
|
1206
|
-
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1207
|
-
* log messages as are presently available.
|
|
1208
|
-
* @param callback -
|
|
1209
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1406
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1210
1407
|
*/
|
|
1211
|
-
|
|
1212
|
-
startSession(type:string):Promise<IdeSession>;
|
|
1213
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
1214
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1408
|
+
static readonly EVENT_RECONNECT:string;
|
|
1215
1409
|
/**
|
|
1216
|
-
*
|
|
1217
|
-
* @param name - the name of the event to listen for
|
|
1218
|
-
* @param callback - a function to call when the event occurs
|
|
1219
|
-
* @return Returns a cleanup function.
|
|
1220
|
-
* @typeParam T - the type of the data that the event will provide
|
|
1410
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1221
1411
|
*/
|
|
1222
|
-
|
|
1223
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1224
|
-
hasListeners(name:string):boolean;
|
|
1412
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1225
1413
|
/**
|
|
1226
|
-
*
|
|
1227
|
-
* @param name -
|
|
1228
|
-
* @param callback -
|
|
1229
|
-
* @return
|
|
1230
|
-
* @typeParam T -
|
|
1414
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1231
1415
|
*/
|
|
1232
|
-
|
|
1233
|
-
|
|
1416
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1417
|
+
readonly description?:string|null;
|
|
1418
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1234
1419
|
|
|
1235
|
-
/**
|
|
1236
|
-
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1237
|
-
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1238
|
-
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1239
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1240
|
-
* instance.
|
|
1241
|
-
*/
|
|
1242
|
-
export class FilterValue {
|
|
1243
1420
|
protected constructor();
|
|
1244
1421
|
|
|
1245
1422
|
/**
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1250
|
-
*
|
|
1251
|
-
* @param
|
|
1252
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1423
|
+
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1424
|
+
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1425
|
+
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1426
|
+
* boolean parameter.
|
|
1427
|
+
* @param row -
|
|
1428
|
+
* @param expandDescendants -
|
|
1253
1429
|
*/
|
|
1254
|
-
|
|
1430
|
+
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1255
1431
|
/**
|
|
1256
|
-
*
|
|
1257
|
-
*
|
|
1258
|
-
* @
|
|
1432
|
+
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1433
|
+
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1434
|
+
* @param row -
|
|
1259
1435
|
*/
|
|
1260
|
-
|
|
1436
|
+
collapse(row:TreeRow|number):void;
|
|
1261
1437
|
/**
|
|
1262
|
-
*
|
|
1263
|
-
*
|
|
1264
|
-
*
|
|
1265
|
-
* @
|
|
1438
|
+
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1439
|
+
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1440
|
+
* is true, then its children will also be expanded.
|
|
1441
|
+
* @param row - the row to expand or collapse, either the absolute row index or the row object
|
|
1442
|
+
* @param isExpanded - true to expand the row, false to collapse
|
|
1443
|
+
* @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
|
|
1444
|
+
* false
|
|
1266
1445
|
*/
|
|
1267
|
-
|
|
1446
|
+
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1447
|
+
expandAll():void;
|
|
1448
|
+
collapseAll():void;
|
|
1268
1449
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
* @param
|
|
1271
|
-
* @return
|
|
1450
|
+
* Tests if the specified row is expanded.
|
|
1451
|
+
* @param row - the row to test, either the absolute row index or the row object
|
|
1452
|
+
* @return boolean true if the row is expanded, false otherwise
|
|
1272
1453
|
*/
|
|
1273
|
-
|
|
1454
|
+
isExpanded(row:TreeRow|number):boolean;
|
|
1455
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1456
|
+
getViewportData():Promise<TreeViewportData>;
|
|
1274
1457
|
/**
|
|
1275
|
-
*
|
|
1276
|
-
* upper vs lower case
|
|
1277
|
-
* @param term -
|
|
1278
|
-
* @return {@link dh.FilterCondition}
|
|
1458
|
+
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1279
1459
|
*/
|
|
1280
|
-
|
|
1460
|
+
close():void;
|
|
1281
1461
|
/**
|
|
1282
|
-
*
|
|
1283
|
-
* @param
|
|
1284
|
-
* @return {@link dh.
|
|
1462
|
+
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1463
|
+
* @param sort -
|
|
1464
|
+
* @return {@link dh.Sort} array
|
|
1285
1465
|
*/
|
|
1286
|
-
|
|
1466
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1287
1467
|
/**
|
|
1288
|
-
*
|
|
1289
|
-
*
|
|
1290
|
-
*
|
|
1468
|
+
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1469
|
+
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1470
|
+
* condition. Returns the previous sort in use.
|
|
1471
|
+
* @param filter -
|
|
1472
|
+
* @return {@link dh.FilterCondition} array
|
|
1291
1473
|
*/
|
|
1292
|
-
|
|
1474
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1293
1475
|
/**
|
|
1294
|
-
*
|
|
1295
|
-
* @
|
|
1296
|
-
* @
|
|
1476
|
+
* Adding new columns to the table based on other columns using updateView() mechanics. Rollup tables are supported
|
|
1477
|
+
* but Tree tables will throw an {@link java.lang.UnsupportedOperationException} if this function is called.
|
|
1478
|
+
* @param customColumns -
|
|
1479
|
+
* @return {@link dh.CustomColumn} array
|
|
1297
1480
|
*/
|
|
1298
|
-
|
|
1481
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1299
1482
|
/**
|
|
1300
|
-
* a
|
|
1301
|
-
* @param
|
|
1302
|
-
* @return {@link dh.
|
|
1483
|
+
* a column with the given name, or throws an exception if it cannot be found
|
|
1484
|
+
* @param key -
|
|
1485
|
+
* @return {@link dh.Column}
|
|
1303
1486
|
*/
|
|
1304
|
-
|
|
1487
|
+
findColumn(key:string):Column;
|
|
1305
1488
|
/**
|
|
1306
|
-
*
|
|
1307
|
-
* @param
|
|
1308
|
-
* @return {@link dh.
|
|
1489
|
+
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
1490
|
+
* @param keys -
|
|
1491
|
+
* @return {@link dh.Column} array
|
|
1309
1492
|
*/
|
|
1310
|
-
|
|
1493
|
+
findColumns(keys:string[]):Column[];
|
|
1311
1494
|
/**
|
|
1312
|
-
*
|
|
1313
|
-
*
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1495
|
+
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
1496
|
+
* values for the given columns in the source table:
|
|
1497
|
+
* <ul>
|
|
1498
|
+
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1499
|
+
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1500
|
+
* the tree.</li>
|
|
1501
|
+
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1502
|
+
* in the resulting table.</li>
|
|
1503
|
+
* </ul>
|
|
1316
1504
|
*/
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1505
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1506
|
+
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1507
|
+
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1508
|
+
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1509
|
+
/**
|
|
1510
|
+
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1511
|
+
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1512
|
+
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1513
|
+
* state is also not copied.
|
|
1514
|
+
* @return Promise of dh.TreeTable
|
|
1515
|
+
*/
|
|
1516
|
+
copy():Promise<TreeTable>;
|
|
1517
|
+
/**
|
|
1518
|
+
* The current filter configuration of this Tree Table.
|
|
1519
|
+
* @return {@link dh.FilterCondition} array
|
|
1520
|
+
*/
|
|
1521
|
+
get filter():Array<FilterCondition>;
|
|
1522
|
+
/**
|
|
1523
|
+
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
1524
|
+
* @return boolean
|
|
1525
|
+
*/
|
|
1526
|
+
get includeConstituents():boolean;
|
|
1527
|
+
get groupedColumns():Array<Column>;
|
|
1528
|
+
/**
|
|
1529
|
+
* True if this table has been closed.
|
|
1530
|
+
* @return boolean
|
|
1531
|
+
*/
|
|
1532
|
+
get isClosed():boolean;
|
|
1533
|
+
/**
|
|
1534
|
+
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
1535
|
+
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1536
|
+
* when considering collapse/expand states).
|
|
1537
|
+
* @return double
|
|
1538
|
+
*/
|
|
1539
|
+
get size():number;
|
|
1540
|
+
/**
|
|
1541
|
+
* Returns the columns that are aggregated.
|
|
1542
|
+
* @return array of aggregated columns
|
|
1543
|
+
*/
|
|
1544
|
+
get aggregatedColumns():Array<Column>;
|
|
1545
|
+
/**
|
|
1546
|
+
* The columns that can be shown in this Tree Table.
|
|
1547
|
+
* @return {@link dh.Column} array
|
|
1548
|
+
*/
|
|
1549
|
+
get columns():Array<Column>;
|
|
1550
|
+
/**
|
|
1551
|
+
* The current sort configuration of this Tree Table
|
|
1552
|
+
* @return {@link dh.Sort} array.
|
|
1553
|
+
*/
|
|
1554
|
+
get sort():Array<Sort>;
|
|
1555
|
+
/**
|
|
1556
|
+
* The current list of custom columns added to this Tree Table.
|
|
1557
|
+
* @return {@link dh.CustomColumn} array
|
|
1558
|
+
*/
|
|
1559
|
+
get customColumns():Array<CustomColumn>;
|
|
1560
|
+
/**
|
|
1561
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1562
|
+
* initial snapshot.
|
|
1563
|
+
* @return boolean
|
|
1564
|
+
*/
|
|
1565
|
+
get isRefreshing():boolean;
|
|
1566
|
+
/**
|
|
1567
|
+
* Listen for events on this object.
|
|
1568
|
+
* @param name - the name of the event to listen for
|
|
1569
|
+
* @param callback - a function to call when the event occurs
|
|
1570
|
+
* @return Returns a cleanup function.
|
|
1571
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1572
|
+
*/
|
|
1573
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1574
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1575
|
+
hasListeners(name:string):boolean;
|
|
1576
|
+
/**
|
|
1577
|
+
* Removes an event listener added to this table.
|
|
1578
|
+
* @param name -
|
|
1579
|
+
* @param callback -
|
|
1580
|
+
* @return
|
|
1581
|
+
* @typeParam T -
|
|
1582
|
+
*/
|
|
1583
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1588
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1589
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1590
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1591
|
+
* instance.
|
|
1592
|
+
*/
|
|
1593
|
+
export class FilterValue {
|
|
1594
|
+
protected constructor();
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
1598
|
+
* {@link TableData.get} for DateTime values. To create
|
|
1599
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1600
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1601
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1602
|
+
* @param input - the number to wrap as a FilterValue
|
|
1603
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
1604
|
+
*/
|
|
1605
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1606
|
+
/**
|
|
1607
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
1608
|
+
* @param term -
|
|
1609
|
+
* @return {@link dh.FilterCondition}
|
|
1610
|
+
*/
|
|
1611
|
+
eq(term:FilterValue):FilterCondition;
|
|
1612
|
+
/**
|
|
1613
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1614
|
+
* vs lower case
|
|
1615
|
+
* @param term -
|
|
1616
|
+
* @return {@link dh.FilterCondition}
|
|
1617
|
+
*/
|
|
1618
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1619
|
+
/**
|
|
1620
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
1621
|
+
* @param term -
|
|
1622
|
+
* @return {@link dh.FilterCondition}
|
|
1623
|
+
*/
|
|
1624
|
+
notEq(term:FilterValue):FilterCondition;
|
|
1625
|
+
/**
|
|
1626
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1627
|
+
* upper vs lower case
|
|
1628
|
+
* @param term -
|
|
1629
|
+
* @return {@link dh.FilterCondition}
|
|
1630
|
+
*/
|
|
1631
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1632
|
+
/**
|
|
1633
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1634
|
+
* @param term -
|
|
1635
|
+
* @return {@link dh.FilterCondition}
|
|
1636
|
+
*/
|
|
1637
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
1638
|
+
/**
|
|
1639
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1640
|
+
* @param term -
|
|
1641
|
+
* @return {@link dh.FilterCondition}
|
|
1642
|
+
*/
|
|
1643
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
1644
|
+
/**
|
|
1645
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1646
|
+
* @param term -
|
|
1647
|
+
* @return {@link dh.FilterCondition}
|
|
1648
|
+
*/
|
|
1649
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1650
|
+
/**
|
|
1651
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1652
|
+
* @param term -
|
|
1653
|
+
* @return {@link dh.FilterCondition}
|
|
1654
|
+
*/
|
|
1655
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1656
|
+
/**
|
|
1657
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1658
|
+
* @param terms -
|
|
1659
|
+
* @return {@link dh.FilterCondition}
|
|
1660
|
+
*/
|
|
1661
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
1662
|
+
/**
|
|
1663
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1664
|
+
* lower case
|
|
1665
|
+
* @param terms -
|
|
1666
|
+
* @return {@link dh.FilterCondition}
|
|
1667
|
+
*/
|
|
1668
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1669
|
+
/**
|
|
1670
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1671
|
+
* @param terms -
|
|
1321
1672
|
* @return {@link dh.FilterCondition}
|
|
1322
1673
|
*/
|
|
1323
1674
|
notIn(terms:FilterValue[]):FilterCondition;
|
|
@@ -1404,248 +1755,162 @@ export namespace dh {
|
|
|
1404
1755
|
static ofBoolean(b:boolean):FilterValue;
|
|
1405
1756
|
}
|
|
1406
1757
|
|
|
1407
|
-
|
|
1408
1758
|
/**
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
*
|
|
1759
|
+
* A js type for operating on input tables.
|
|
1760
|
+
*
|
|
1761
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
1762
|
+
*
|
|
1763
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
1764
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
1765
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
1766
|
+
* before sending the next operation.
|
|
1767
|
+
*
|
|
1768
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
1769
|
+
*
|
|
1770
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
1771
|
+
* object.
|
|
1419
1772
|
*/
|
|
1420
|
-
export class
|
|
1773
|
+
export class InputTable {
|
|
1421
1774
|
protected constructor();
|
|
1422
1775
|
|
|
1423
|
-
static createTableSubscription(options:SubscriptionOptions, existingTable:Table):TableSubscription;
|
|
1424
1776
|
/**
|
|
1425
|
-
*
|
|
1426
|
-
*
|
|
1427
|
-
* @param
|
|
1777
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
1778
|
+
* property at that name and validate it can be put into the given column type.
|
|
1779
|
+
* @param row -
|
|
1780
|
+
* @param userTimeZone -
|
|
1781
|
+
* @return Promise of dh.InputTable
|
|
1428
1782
|
*/
|
|
1429
|
-
|
|
1783
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
1430
1784
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
* @param
|
|
1785
|
+
* Add multiple rows to a table.
|
|
1786
|
+
* @param rows -
|
|
1787
|
+
* @param userTimeZone -
|
|
1788
|
+
* @return Promise of dh.InputTable
|
|
1433
1789
|
*/
|
|
1434
|
-
|
|
1435
|
-
get columns():Array<Column>;
|
|
1790
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
1436
1791
|
/**
|
|
1437
|
-
*
|
|
1792
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
1793
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
1794
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
1795
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
1796
|
+
* @param tableToAdd -
|
|
1797
|
+
* @return Promise of dh.InputTable
|
|
1438
1798
|
*/
|
|
1439
|
-
|
|
1799
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
1440
1800
|
/**
|
|
1441
|
-
*
|
|
1442
|
-
* @param
|
|
1443
|
-
* @
|
|
1444
|
-
* @return Returns a cleanup function.
|
|
1445
|
-
* @typeParam T - the type of the data that the event will provide
|
|
1801
|
+
* Add multiple tables to this Input Table.
|
|
1802
|
+
* @param tablesToAdd -
|
|
1803
|
+
* @return Promise of dh.InputTable
|
|
1446
1804
|
*/
|
|
1447
|
-
|
|
1448
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1449
|
-
hasListeners(name:string):boolean;
|
|
1805
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
1450
1806
|
/**
|
|
1451
|
-
*
|
|
1452
|
-
* @param
|
|
1453
|
-
* @
|
|
1807
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
1808
|
+
* @param tableToDelete -
|
|
1809
|
+
* @return Promise of dh.InputTable
|
|
1810
|
+
*/
|
|
1811
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
1812
|
+
/**
|
|
1813
|
+
* Delete multiple tables from this Input Table.
|
|
1814
|
+
* @param tablesToDelete -
|
|
1454
1815
|
* @return
|
|
1455
|
-
* @typeParam T -
|
|
1456
1816
|
*/
|
|
1457
|
-
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
/**
|
|
1461
|
-
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1462
|
-
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1463
|
-
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1464
|
-
*/
|
|
1465
|
-
export class RangeSet {
|
|
1466
|
-
protected constructor();
|
|
1467
|
-
|
|
1468
|
-
static ofRange(first:number, last:number):RangeSet;
|
|
1469
|
-
static ofItems(rows:number[]):RangeSet;
|
|
1470
|
-
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
1471
|
-
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
1472
|
-
/**
|
|
1473
|
-
* a new iterator over all indexes in this collection.
|
|
1474
|
-
* @return Iterator of {@link dh.LongWrapper}
|
|
1475
|
-
*/
|
|
1476
|
-
iterator():Iterator<LongWrapper>;
|
|
1477
|
-
/**
|
|
1478
|
-
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
1479
|
-
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
1480
|
-
* property each time through a loop).
|
|
1481
|
-
* @return double
|
|
1482
|
-
*/
|
|
1483
|
-
get size():number;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
/**
|
|
1487
|
-
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1488
|
-
* column.
|
|
1489
|
-
*/
|
|
1490
|
-
export class Column {
|
|
1491
|
-
/**
|
|
1492
|
-
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1493
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1494
|
-
* @return String
|
|
1495
|
-
*/
|
|
1496
|
-
readonly constituentType?:string|null;
|
|
1497
|
-
readonly description?:string|null;
|
|
1498
|
-
|
|
1499
|
-
protected constructor();
|
|
1500
|
-
|
|
1501
|
-
/**
|
|
1502
|
-
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1503
|
-
* @param row -
|
|
1504
|
-
* @return Any
|
|
1505
|
-
*/
|
|
1506
|
-
get(row:Row):any;
|
|
1507
|
-
getFormat(row:Row):Format;
|
|
1508
|
-
/**
|
|
1509
|
-
* Creates a sort builder object, to be used when sorting by this column.
|
|
1510
|
-
* @return {@link dh.Sort}
|
|
1511
|
-
*/
|
|
1512
|
-
sort():Sort;
|
|
1513
|
-
/**
|
|
1514
|
-
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1515
|
-
* operation, or as a builder to create a filter operation.
|
|
1516
|
-
* @return {@link dh.FilterValue}
|
|
1517
|
-
*/
|
|
1518
|
-
filter():FilterValue;
|
|
1519
|
-
/**
|
|
1520
|
-
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1521
|
-
* @param expression -
|
|
1522
|
-
* @return {@link dh.CustomColumn}
|
|
1523
|
-
*/
|
|
1524
|
-
formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1525
|
-
/**
|
|
1526
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1527
|
-
* @param expression -
|
|
1528
|
-
* @return {@link dh.CustomColumn}
|
|
1529
|
-
*/
|
|
1530
|
-
formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1531
|
-
/**
|
|
1532
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1533
|
-
* @param expression -
|
|
1534
|
-
* @return {@link dh.CustomColumn}
|
|
1535
|
-
*/
|
|
1536
|
-
formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1537
|
-
toString():string;
|
|
1538
|
-
/**
|
|
1539
|
-
* Label for this column.
|
|
1540
|
-
* @return String
|
|
1541
|
-
*/
|
|
1542
|
-
get name():string;
|
|
1817
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
1543
1818
|
/**
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
1546
|
-
* @return true if the column is a partition column
|
|
1819
|
+
* A list of the key columns, by name
|
|
1820
|
+
* @return String array.
|
|
1547
1821
|
*/
|
|
1548
|
-
get
|
|
1822
|
+
get keys():string[];
|
|
1549
1823
|
/**
|
|
1550
|
-
*
|
|
1551
|
-
* @
|
|
1552
|
-
* @return int
|
|
1824
|
+
* A list of the value columns, by name
|
|
1825
|
+
* @return String array.
|
|
1553
1826
|
*/
|
|
1554
|
-
get
|
|
1555
|
-
get isSortable():boolean;
|
|
1827
|
+
get values():string[];
|
|
1556
1828
|
/**
|
|
1557
|
-
*
|
|
1558
|
-
* @return
|
|
1829
|
+
* A list of the key columns.
|
|
1830
|
+
* @return Column array.
|
|
1559
1831
|
*/
|
|
1560
|
-
get
|
|
1832
|
+
get keyColumns():Column[];
|
|
1561
1833
|
/**
|
|
1562
|
-
*
|
|
1563
|
-
*
|
|
1564
|
-
* @param expression -
|
|
1565
|
-
* @param options -
|
|
1566
|
-
* @return {@link dh.CustomColumn}
|
|
1834
|
+
* A list of the value Column objects
|
|
1835
|
+
* @return {@link dh.Column} array.
|
|
1567
1836
|
*/
|
|
1568
|
-
|
|
1837
|
+
get valueColumns():Column[];
|
|
1569
1838
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
* @
|
|
1572
|
-
* @param expression -
|
|
1573
|
-
* @param options -
|
|
1574
|
-
* @return {@link dh.CustomColumn}
|
|
1839
|
+
* The source table for this Input Table
|
|
1840
|
+
* @return dh.table
|
|
1575
1841
|
*/
|
|
1576
|
-
|
|
1842
|
+
get table():Table;
|
|
1577
1843
|
}
|
|
1578
1844
|
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
static readonly TYPE_NEW:string;
|
|
1584
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1847
|
+
*/
|
|
1848
|
+
export class BigDecimalWrapper {
|
|
1585
1849
|
protected constructor();
|
|
1586
1850
|
|
|
1851
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
1852
|
+
asNumber():number;
|
|
1587
1853
|
valueOf():string;
|
|
1588
1854
|
toString():string;
|
|
1589
|
-
|
|
1855
|
+
equals(o:object):boolean;
|
|
1856
|
+
hashCode():number;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
1861
|
+
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
1862
|
+
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
1863
|
+
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
1864
|
+
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
1865
|
+
*/
|
|
1866
|
+
export class TableViewportSubscription implements HasEventHandling {
|
|
1867
|
+
protected constructor();
|
|
1868
|
+
|
|
1590
1869
|
/**
|
|
1591
|
-
*
|
|
1592
|
-
* @
|
|
1870
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
1871
|
+
* @param firstRow -
|
|
1872
|
+
* @param lastRow -
|
|
1873
|
+
* @param columns -
|
|
1874
|
+
* @param updateIntervalMs -
|
|
1875
|
+
* @deprecated use {@link #update(Object)} instead
|
|
1593
1876
|
*/
|
|
1594
|
-
|
|
1877
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
|
|
1595
1878
|
/**
|
|
1596
|
-
*
|
|
1597
|
-
* @
|
|
1879
|
+
* Update the options for this viewport subscription. This cannot alter the update interval or preview options.
|
|
1880
|
+
* @param options - the subscription options
|
|
1598
1881
|
*/
|
|
1599
|
-
|
|
1882
|
+
update(options:ViewportSubscriptionOptions):void;
|
|
1600
1883
|
/**
|
|
1601
|
-
*
|
|
1602
|
-
* @return CustomColumOptions
|
|
1884
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
1603
1885
|
*/
|
|
1604
|
-
|
|
1886
|
+
close():void;
|
|
1605
1887
|
/**
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1608
|
-
* <ul>
|
|
1609
|
-
* <li>FORMAT_COLOR</li>
|
|
1610
|
-
* <li>FORMAT_NUMBER</li>
|
|
1611
|
-
* <li>FORMAT_DATE</li>
|
|
1612
|
-
* <li>NEW</li>
|
|
1613
|
-
* </ul>
|
|
1614
|
-
* @return String
|
|
1888
|
+
* Gets the data currently visible in this viewport
|
|
1889
|
+
* @return Promise of {@link dh.TableData}.
|
|
1615
1890
|
*/
|
|
1616
|
-
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
export class CoreClient implements HasEventHandling {
|
|
1620
|
-
static readonly EVENT_CONNECT:string;
|
|
1621
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1622
|
-
static readonly EVENT_RECONNECT:string;
|
|
1623
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1624
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1625
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
1626
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1891
|
+
getViewportData():Promise<ViewportData>;
|
|
1627
1892
|
/**
|
|
1628
|
-
*
|
|
1893
|
+
*
|
|
1894
|
+
* @deprecated Use {@link JsTable#createSnapshot(Object)} instead
|
|
1895
|
+
*/
|
|
1896
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
1897
|
+
/**
|
|
1898
|
+
* Listen for events on this object.
|
|
1899
|
+
* @param name - the name of the event to listen for
|
|
1900
|
+
* @param callback - a function to call when the event occurs
|
|
1901
|
+
* @return Returns a cleanup function.
|
|
1902
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1629
1903
|
*/
|
|
1630
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1631
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1632
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1633
|
-
|
|
1634
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1635
|
-
|
|
1636
|
-
running():Promise<CoreClient>;
|
|
1637
|
-
getServerUrl():string;
|
|
1638
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
1639
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
1640
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
1641
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1642
|
-
getServerConfigValues():Promise<string[][]>;
|
|
1643
|
-
getStorageService():dh.storage.StorageService;
|
|
1644
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
1645
|
-
disconnect():void;
|
|
1646
1904
|
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1647
1905
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1648
1906
|
hasListeners(name:string):boolean;
|
|
1907
|
+
/**
|
|
1908
|
+
* Removes an event listener added to this table.
|
|
1909
|
+
* @param name -
|
|
1910
|
+
* @param callback -
|
|
1911
|
+
* @return
|
|
1912
|
+
* @typeParam T -
|
|
1913
|
+
*/
|
|
1649
1914
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1650
1915
|
}
|
|
1651
1916
|
|
|
@@ -1749,233 +2014,230 @@ export namespace dh {
|
|
|
1749
2014
|
}
|
|
1750
2015
|
|
|
1751
2016
|
/**
|
|
1752
|
-
*
|
|
1753
|
-
* mechanism, and so reimplemented here.
|
|
1754
|
-
* <p>
|
|
1755
|
-
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1756
|
-
* <p>
|
|
1757
|
-
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1758
|
-
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1759
|
-
* <p>
|
|
1760
|
-
* The table size will be -1 until a viewport has been fetched.
|
|
1761
|
-
* <p>
|
|
1762
|
-
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1763
|
-
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1764
|
-
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1765
|
-
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1766
|
-
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1767
|
-
* the viewport).
|
|
1768
|
-
* <p>
|
|
1769
|
-
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1770
|
-
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1771
|
-
* <p>
|
|
1772
|
-
* <ul>
|
|
1773
|
-
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1774
|
-
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1775
|
-
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1776
|
-
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1777
|
-
* new operation is pending.</li>
|
|
1778
|
-
* <li>Custom columns are supported on Rollup tables, but not on Tree tables. If the TreeTable was created client-side,
|
|
1779
|
-
* the original Table can have custom columns applied, and the TreeTable can be recreated.</li>
|
|
1780
|
-
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1781
|
-
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1782
|
-
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1783
|
-
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1784
|
-
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1785
|
-
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1786
|
-
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1787
|
-
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1788
|
-
* where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
|
|
1789
|
-
* </ul>
|
|
2017
|
+
* Event fired when a command is issued from the client.
|
|
1790
2018
|
*/
|
|
1791
|
-
export class
|
|
2019
|
+
export class CommandInfo {
|
|
2020
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
2021
|
+
|
|
2022
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
2023
|
+
get code():string;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
export class CustomColumn {
|
|
2027
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
2028
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
2029
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
2030
|
+
static readonly TYPE_NEW:string;
|
|
2031
|
+
|
|
2032
|
+
protected constructor();
|
|
2033
|
+
|
|
2034
|
+
valueOf():string;
|
|
2035
|
+
toString():string;
|
|
2036
|
+
static from(columnInfo:string):CustomColumn;
|
|
1792
2037
|
/**
|
|
1793
|
-
*
|
|
2038
|
+
* The expression to evaluate this custom column.
|
|
2039
|
+
* @return String
|
|
1794
2040
|
*/
|
|
1795
|
-
|
|
2041
|
+
get expression():string;
|
|
1796
2042
|
/**
|
|
1797
|
-
*
|
|
2043
|
+
* The name of the column to use.
|
|
2044
|
+
* @return String
|
|
1798
2045
|
*/
|
|
1799
|
-
|
|
2046
|
+
get name():string;
|
|
1800
2047
|
/**
|
|
1801
|
-
*
|
|
2048
|
+
* The options for this custom column.
|
|
2049
|
+
* @return CustomColumOptions
|
|
1802
2050
|
*/
|
|
1803
|
-
|
|
2051
|
+
get options():CustomColumnOptions;
|
|
1804
2052
|
/**
|
|
1805
|
-
*
|
|
2053
|
+
* Type of custom column. One of
|
|
2054
|
+
*
|
|
2055
|
+
* <ul>
|
|
2056
|
+
* <li>FORMAT_COLOR</li>
|
|
2057
|
+
* <li>FORMAT_NUMBER</li>
|
|
2058
|
+
* <li>FORMAT_DATE</li>
|
|
2059
|
+
* <li>NEW</li>
|
|
2060
|
+
* </ul>
|
|
2061
|
+
* @return String
|
|
1806
2062
|
*/
|
|
1807
|
-
|
|
2063
|
+
get type():string;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
/**
|
|
2067
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
2068
|
+
* column.
|
|
2069
|
+
*/
|
|
2070
|
+
export class Column {
|
|
1808
2071
|
/**
|
|
1809
|
-
*
|
|
2072
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
2073
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
2074
|
+
* @return String
|
|
1810
2075
|
*/
|
|
1811
|
-
|
|
2076
|
+
readonly constituentType?:string|null;
|
|
1812
2077
|
readonly description?:string|null;
|
|
1813
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1814
2078
|
|
|
1815
2079
|
protected constructor();
|
|
1816
2080
|
|
|
1817
2081
|
/**
|
|
1818
|
-
*
|
|
1819
|
-
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1820
|
-
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1821
|
-
* boolean parameter.
|
|
2082
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1822
2083
|
* @param row -
|
|
1823
|
-
* @
|
|
2084
|
+
* @return Any
|
|
1824
2085
|
*/
|
|
1825
|
-
|
|
2086
|
+
get(row:Row):any;
|
|
2087
|
+
getFormat(row:Row):Format;
|
|
1826
2088
|
/**
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1829
|
-
* @param row -
|
|
2089
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
2090
|
+
* @return {@link dh.Sort}
|
|
1830
2091
|
*/
|
|
1831
|
-
|
|
2092
|
+
sort():Sort;
|
|
1832
2093
|
/**
|
|
1833
|
-
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1836
|
-
* @param row - the row to expand or collapse, either the absolute row index or the row object
|
|
1837
|
-
* @param isExpanded - true to expand the row, false to collapse
|
|
1838
|
-
* @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
|
|
1839
|
-
* false
|
|
2094
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
2095
|
+
* operation, or as a builder to create a filter operation.
|
|
2096
|
+
* @return {@link dh.FilterValue}
|
|
1840
2097
|
*/
|
|
1841
|
-
|
|
1842
|
-
expandAll():void;
|
|
1843
|
-
collapseAll():void;
|
|
2098
|
+
filter():FilterValue;
|
|
1844
2099
|
/**
|
|
1845
|
-
*
|
|
1846
|
-
* @param
|
|
1847
|
-
* @return
|
|
2100
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
2101
|
+
* @param expression -
|
|
2102
|
+
* @return {@link dh.CustomColumn}
|
|
1848
2103
|
*/
|
|
1849
|
-
|
|
1850
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1851
|
-
getViewportData():Promise<TreeViewportData>;
|
|
2104
|
+
formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1852
2105
|
/**
|
|
1853
|
-
*
|
|
2106
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2107
|
+
* @param expression -
|
|
2108
|
+
* @return {@link dh.CustomColumn}
|
|
1854
2109
|
*/
|
|
1855
|
-
|
|
2110
|
+
formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1856
2111
|
/**
|
|
1857
|
-
*
|
|
1858
|
-
* @param
|
|
1859
|
-
* @return {@link dh.
|
|
2112
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2113
|
+
* @param expression -
|
|
2114
|
+
* @return {@link dh.CustomColumn}
|
|
1860
2115
|
*/
|
|
1861
|
-
|
|
2116
|
+
formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2117
|
+
toString():string;
|
|
1862
2118
|
/**
|
|
1863
|
-
*
|
|
1864
|
-
*
|
|
1865
|
-
* condition. Returns the previous sort in use.
|
|
1866
|
-
* @param filter -
|
|
1867
|
-
* @return {@link dh.FilterCondition} array
|
|
2119
|
+
* Label for this column.
|
|
2120
|
+
* @return String
|
|
1868
2121
|
*/
|
|
1869
|
-
|
|
2122
|
+
get name():string;
|
|
1870
2123
|
/**
|
|
1871
|
-
*
|
|
1872
|
-
*
|
|
1873
|
-
* @
|
|
1874
|
-
* @return {@link dh.CustomColumn} array
|
|
2124
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
2125
|
+
* {@link Table.uncoalesced}.
|
|
2126
|
+
* @return true if the column is a partition column
|
|
1875
2127
|
*/
|
|
1876
|
-
|
|
2128
|
+
get isPartitionColumn():boolean;
|
|
1877
2129
|
/**
|
|
1878
|
-
*
|
|
1879
|
-
* @
|
|
1880
|
-
* @return
|
|
2130
|
+
*
|
|
2131
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
2132
|
+
* @return int
|
|
1881
2133
|
*/
|
|
1882
|
-
|
|
2134
|
+
get index():number;
|
|
2135
|
+
get isSortable():boolean;
|
|
1883
2136
|
/**
|
|
1884
|
-
*
|
|
1885
|
-
* @
|
|
1886
|
-
* @return {@link dh.Column} array
|
|
2137
|
+
* Type of the row data that can be found in this column.
|
|
2138
|
+
* @return String
|
|
1887
2139
|
*/
|
|
1888
|
-
|
|
2140
|
+
get type():string;
|
|
1889
2141
|
/**
|
|
1890
|
-
*
|
|
1891
|
-
*
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
*
|
|
1895
|
-
* the tree.</li>
|
|
1896
|
-
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1897
|
-
* in the resulting table.</li>
|
|
1898
|
-
* </ul>
|
|
2142
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
2143
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
2144
|
+
* @param expression -
|
|
2145
|
+
* @param options -
|
|
2146
|
+
* @return {@link dh.CustomColumn}
|
|
1899
2147
|
*/
|
|
1900
|
-
|
|
1901
|
-
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1902
|
-
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1903
|
-
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
2148
|
+
static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1904
2149
|
/**
|
|
1905
|
-
* a
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1909
|
-
* @return
|
|
2150
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2151
|
+
* @param name -
|
|
2152
|
+
* @param expression -
|
|
2153
|
+
* @param options -
|
|
2154
|
+
* @return {@link dh.CustomColumn}
|
|
1910
2155
|
*/
|
|
1911
|
-
|
|
2156
|
+
static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
2161
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
2162
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
2163
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
2164
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
2165
|
+
*
|
|
2166
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
2167
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
2168
|
+
* expected formats.
|
|
2169
|
+
*/
|
|
2170
|
+
export class TotalsTableConfig {
|
|
1912
2171
|
/**
|
|
1913
|
-
*
|
|
1914
|
-
* @return {@link dh.FilterCondition} array
|
|
2172
|
+
* @deprecated
|
|
1915
2173
|
*/
|
|
1916
|
-
|
|
2174
|
+
static readonly COUNT:string;
|
|
1917
2175
|
/**
|
|
1918
|
-
*
|
|
1919
|
-
* @return boolean
|
|
2176
|
+
* @deprecated
|
|
1920
2177
|
*/
|
|
1921
|
-
|
|
1922
|
-
get groupedColumns():Array<Column>;
|
|
2178
|
+
static readonly MIN:string;
|
|
1923
2179
|
/**
|
|
1924
|
-
*
|
|
1925
|
-
* @return boolean
|
|
2180
|
+
* @deprecated
|
|
1926
2181
|
*/
|
|
1927
|
-
|
|
2182
|
+
static readonly MAX:string;
|
|
1928
2183
|
/**
|
|
1929
|
-
*
|
|
1930
|
-
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1931
|
-
* when considering collapse/expand states).
|
|
1932
|
-
* @return double
|
|
2184
|
+
* @deprecated
|
|
1933
2185
|
*/
|
|
1934
|
-
|
|
2186
|
+
static readonly SUM:string;
|
|
1935
2187
|
/**
|
|
1936
|
-
*
|
|
1937
|
-
* @return array of aggregated columns
|
|
2188
|
+
* @deprecated
|
|
1938
2189
|
*/
|
|
1939
|
-
|
|
2190
|
+
static readonly ABS_SUM:string;
|
|
1940
2191
|
/**
|
|
1941
|
-
*
|
|
1942
|
-
* @return {@link dh.Column} array
|
|
2192
|
+
* @deprecated
|
|
1943
2193
|
*/
|
|
1944
|
-
|
|
2194
|
+
static readonly VAR:string;
|
|
1945
2195
|
/**
|
|
1946
|
-
*
|
|
1947
|
-
* @return {@link dh.Sort} array.
|
|
2196
|
+
* @deprecated
|
|
1948
2197
|
*/
|
|
1949
|
-
|
|
2198
|
+
static readonly AVG:string;
|
|
1950
2199
|
/**
|
|
1951
|
-
*
|
|
1952
|
-
* @return {@link dh.CustomColumn} array
|
|
2200
|
+
* @deprecated
|
|
1953
2201
|
*/
|
|
1954
|
-
|
|
2202
|
+
static readonly STD:string;
|
|
1955
2203
|
/**
|
|
1956
|
-
*
|
|
1957
|
-
* initial snapshot.
|
|
1958
|
-
* @return boolean
|
|
2204
|
+
* @deprecated
|
|
1959
2205
|
*/
|
|
1960
|
-
|
|
2206
|
+
static readonly FIRST:string;
|
|
1961
2207
|
/**
|
|
1962
|
-
*
|
|
1963
|
-
* @param name - the name of the event to listen for
|
|
1964
|
-
* @param callback - a function to call when the event occurs
|
|
1965
|
-
* @return Returns a cleanup function.
|
|
1966
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2208
|
+
* @deprecated
|
|
1967
2209
|
*/
|
|
1968
|
-
|
|
1969
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1970
|
-
hasListeners(name:string):boolean;
|
|
2210
|
+
static readonly LAST:string;
|
|
1971
2211
|
/**
|
|
1972
|
-
*
|
|
1973
|
-
* @param name -
|
|
1974
|
-
* @param callback -
|
|
1975
|
-
* @return
|
|
1976
|
-
* @typeParam T -
|
|
2212
|
+
* @deprecated
|
|
1977
2213
|
*/
|
|
1978
|
-
|
|
2214
|
+
static readonly SKIP:string;
|
|
2215
|
+
/**
|
|
2216
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2217
|
+
*/
|
|
2218
|
+
showTotalsByDefault:boolean;
|
|
2219
|
+
/**
|
|
2220
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2221
|
+
*/
|
|
2222
|
+
showGrandTotalsByDefault:boolean;
|
|
2223
|
+
/**
|
|
2224
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
2225
|
+
*/
|
|
2226
|
+
defaultOperation:AggregationOperationType;
|
|
2227
|
+
/**
|
|
2228
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
2229
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
2230
|
+
*/
|
|
2231
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
2232
|
+
/**
|
|
2233
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
2234
|
+
* these columns. See also `Table.selectDistinct`.
|
|
2235
|
+
*/
|
|
2236
|
+
groupBy:Array<string>;
|
|
2237
|
+
|
|
2238
|
+
constructor();
|
|
2239
|
+
|
|
2240
|
+
toString():string;
|
|
1979
2241
|
}
|
|
1980
2242
|
|
|
1981
2243
|
/**
|
|
@@ -1993,17 +2255,114 @@ export namespace dh {
|
|
|
1993
2255
|
}
|
|
1994
2256
|
|
|
1995
2257
|
/**
|
|
1996
|
-
*
|
|
2258
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
2259
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
1997
2260
|
*/
|
|
1998
|
-
export class
|
|
2261
|
+
export class IdeConnection implements HasEventHandling {
|
|
2262
|
+
/**
|
|
2263
|
+
* @deprecated
|
|
2264
|
+
*/
|
|
2265
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
2266
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2267
|
+
static readonly EVENT_RECONNECT:string;
|
|
2268
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
2269
|
+
|
|
1999
2270
|
protected constructor();
|
|
2000
2271
|
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2272
|
+
/**
|
|
2273
|
+
* Closes the current connection, releasing any resources on the server or client.
|
|
2274
|
+
*/
|
|
2275
|
+
close():void;
|
|
2276
|
+
running():Promise<IdeConnection>;
|
|
2277
|
+
/**
|
|
2278
|
+
* Load the named table, with columns and size information already fully populated.
|
|
2279
|
+
* @param name - the name of the table to fetch
|
|
2280
|
+
* @param applyPreviewColumns - false to disable previews, defaults to true
|
|
2281
|
+
* @return a {@link Promise} that will resolve to the table, or reject with an error if it cannot be loaded.
|
|
2282
|
+
* @deprecated Added to resolve a specific issue, in the future preview will be applied as part of the subscription.
|
|
2283
|
+
*/
|
|
2284
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
2285
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2286
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2287
|
+
/**
|
|
2288
|
+
* Makes an `object` available to another user or another client on this same server which knows the value of
|
|
2289
|
+
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
2290
|
+
* which knows this value can read the same object.
|
|
2291
|
+
* <p>
|
|
2292
|
+
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
2293
|
+
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
2294
|
+
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
2295
|
+
* <p>
|
|
2296
|
+
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
2297
|
+
* prevent access by unauthorized clients.
|
|
2298
|
+
* @param object - the object to share with another client/user
|
|
2299
|
+
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
2300
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2301
|
+
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
2302
|
+
* by another client, or will reject if an error occurs.
|
|
2303
|
+
*/
|
|
2304
|
+
shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
|
|
2305
|
+
/**
|
|
2306
|
+
* Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
|
|
2307
|
+
* client releases this object (or their session ends), the object will be available on the server.
|
|
2308
|
+
* <p>
|
|
2309
|
+
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
2310
|
+
* should provide this information.
|
|
2311
|
+
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
2312
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2313
|
+
* @param type - The type of the object, so it can be correctly read from the server
|
|
2314
|
+
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
2315
|
+
*/
|
|
2316
|
+
getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
|
|
2317
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2318
|
+
/**
|
|
2319
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
2320
|
+
* @param tables -
|
|
2321
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2322
|
+
*/
|
|
2323
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
2324
|
+
/**
|
|
2325
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
2326
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
2327
|
+
* log messages as are presently available.
|
|
2328
|
+
* @param callback -
|
|
2329
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
2330
|
+
*/
|
|
2331
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2332
|
+
startSession(type:string):Promise<IdeSession>;
|
|
2333
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
2334
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
2335
|
+
/**
|
|
2336
|
+
* Listen for events on this object.
|
|
2337
|
+
* @param name - the name of the event to listen for
|
|
2338
|
+
* @param callback - a function to call when the event occurs
|
|
2339
|
+
* @return Returns a cleanup function.
|
|
2340
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2341
|
+
*/
|
|
2342
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2343
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2344
|
+
hasListeners(name:string):boolean;
|
|
2345
|
+
/**
|
|
2346
|
+
* Removes an event listener added to this table.
|
|
2347
|
+
* @param name -
|
|
2348
|
+
* @param callback -
|
|
2349
|
+
* @return
|
|
2350
|
+
* @typeParam T -
|
|
2351
|
+
*/
|
|
2352
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
/**
|
|
2356
|
+
* Options for custom columns.
|
|
2357
|
+
*/
|
|
2358
|
+
export class CustomColumnOptions {
|
|
2359
|
+
/**
|
|
2360
|
+
* When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
|
|
2361
|
+
* nodes.
|
|
2362
|
+
*/
|
|
2363
|
+
rollupNodeType?:RollupNodeTypeType|null;
|
|
2364
|
+
|
|
2365
|
+
constructor();
|
|
2007
2366
|
}
|
|
2008
2367
|
|
|
2009
2368
|
/**
|
|
@@ -2302,318 +2661,70 @@ export namespace dh {
|
|
|
2302
2661
|
* @return {@link dh.Column} array
|
|
2303
2662
|
*/
|
|
2304
2663
|
get columns():Array<Column>;
|
|
2305
|
-
/**
|
|
2306
|
-
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
2307
|
-
* @return dh.TotalsTableConfig
|
|
2308
|
-
*/
|
|
2309
|
-
get totalsTableConfig():TotalsTableConfig;
|
|
2310
|
-
/**
|
|
2311
|
-
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
2312
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2313
|
-
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
2314
|
-
* @return {@link dh.Sort} array
|
|
2315
|
-
*/
|
|
2316
|
-
get sort():Array<Sort>;
|
|
2317
|
-
/**
|
|
2318
|
-
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
2319
|
-
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
2320
|
-
* @return {@link dh.CustomColumn} array
|
|
2321
|
-
*/
|
|
2322
|
-
get customColumns():Array<CustomColumn>;
|
|
2323
|
-
/**
|
|
2324
|
-
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2325
|
-
* initial snapshot.
|
|
2326
|
-
* @return boolean
|
|
2327
|
-
*/
|
|
2328
|
-
get isRefreshing():boolean;
|
|
2329
|
-
/**
|
|
2330
|
-
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
2331
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2332
|
-
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
2333
|
-
* @return {@link dh.FilterCondition} array
|
|
2334
|
-
*/
|
|
2335
|
-
get filter():Array<FilterCondition>;
|
|
2336
|
-
/**
|
|
2337
|
-
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
2338
|
-
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
2339
|
-
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
2340
|
-
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
2341
|
-
*/
|
|
2342
|
-
get totalSize():number;
|
|
2343
|
-
/**
|
|
2344
|
-
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
2345
|
-
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
2346
|
-
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
2347
|
-
* <p>
|
|
2348
|
-
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
2349
|
-
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
2350
|
-
* uncoalesced.
|
|
2351
|
-
*/
|
|
2352
|
-
get size():number;
|
|
2353
|
-
/**
|
|
2354
|
-
* True if this table has been closed.
|
|
2355
|
-
* @return boolean
|
|
2356
|
-
*/
|
|
2357
|
-
get isClosed():boolean;
|
|
2358
|
-
/**
|
|
2359
|
-
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
2360
|
-
* <p>
|
|
2361
|
-
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
2362
|
-
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
2363
|
-
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
2364
|
-
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
2365
|
-
* for those columns, use {@link Table.selectDistinct}.
|
|
2366
|
-
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
2367
|
-
*/
|
|
2368
|
-
get isUncoalesced():boolean;
|
|
2369
|
-
/**
|
|
2370
|
-
* Listen for events on this object.
|
|
2371
|
-
* @param name - the name of the event to listen for
|
|
2372
|
-
* @param callback - a function to call when the event occurs
|
|
2373
|
-
* @return Returns a cleanup function.
|
|
2374
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2375
|
-
*/
|
|
2376
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2377
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2378
|
-
hasListeners(name:string):boolean;
|
|
2379
|
-
/**
|
|
2380
|
-
* Removes an event listener added to this table.
|
|
2381
|
-
* @param name -
|
|
2382
|
-
* @param callback -
|
|
2383
|
-
* @return
|
|
2384
|
-
* @typeParam T -
|
|
2385
|
-
*/
|
|
2386
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2387
|
-
/**
|
|
2388
|
-
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2389
|
-
* do not support reverse.
|
|
2390
|
-
* @return {@link dh.Sort}
|
|
2391
|
-
*/
|
|
2392
|
-
static reverse():Sort;
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
|
-
/**
|
|
2396
|
-
* Deprecated for use in Deephaven Core.
|
|
2397
|
-
* @deprecated
|
|
2398
|
-
*/
|
|
2399
|
-
export class Client {
|
|
2400
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
2401
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
2402
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2403
|
-
|
|
2404
|
-
constructor();
|
|
2405
|
-
}
|
|
2406
|
-
|
|
2407
|
-
/**
|
|
2408
|
-
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
2409
|
-
*
|
|
2410
|
-
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
2411
|
-
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
2412
|
-
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
2413
|
-
*/
|
|
2414
|
-
export class TreeTableConfig {
|
|
2415
|
-
/**
|
|
2416
|
-
* The column representing the unique ID for each item
|
|
2417
|
-
*/
|
|
2418
|
-
idColumn:string;
|
|
2419
|
-
/**
|
|
2420
|
-
* The column representing the parent ID for each item
|
|
2421
|
-
*/
|
|
2422
|
-
parentColumn:string;
|
|
2423
|
-
/**
|
|
2424
|
-
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
2425
|
-
*/
|
|
2426
|
-
promoteOrphansToRoot:boolean;
|
|
2427
|
-
|
|
2428
|
-
constructor();
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
/**
|
|
2432
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
2433
|
-
* interpret these responses to see what to render, or how to respond.
|
|
2434
|
-
* <p>
|
|
2435
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
2436
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
2437
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
2438
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
2439
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
2440
|
-
* <p>
|
|
2441
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
2442
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
2443
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
2444
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
2445
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
2446
|
-
* <p>
|
|
2447
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
2448
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
2449
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
2450
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
2451
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
2452
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
2453
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
2454
|
-
* <p>
|
|
2455
|
-
* This can suggest several patterns for how plugins operate:
|
|
2456
|
-
* <ul>
|
|
2457
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
2458
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
2459
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
2460
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
2461
|
-
* provided to the JS API consumer.</li>
|
|
2462
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
2463
|
-
* which provided them. One concrete example of this could have been
|
|
2464
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
2465
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
2466
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
2467
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
2468
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
2469
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
2470
|
-
* an internal table instance.</li>
|
|
2471
|
-
* </ul>
|
|
2472
|
-
*
|
|
2473
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
2474
|
-
* <ul>
|
|
2475
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
2476
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
2477
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
2478
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
2479
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
2480
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
2481
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
2482
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
2483
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
2484
|
-
* </ul>
|
|
2485
|
-
*/
|
|
2486
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
2487
|
-
static readonly EVENT_MESSAGE:string;
|
|
2488
|
-
static readonly EVENT_CLOSE:string;
|
|
2489
|
-
|
|
2490
|
-
protected constructor();
|
|
2491
|
-
|
|
2492
|
-
/**
|
|
2493
|
-
* Ends the client connection to the server.
|
|
2494
|
-
*/
|
|
2495
|
-
close():void;
|
|
2496
|
-
getDataAsBase64():string;
|
|
2497
|
-
getDataAsU8():Uint8Array;
|
|
2498
|
-
getDataAsString():string;
|
|
2499
|
-
/**
|
|
2500
|
-
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
2501
|
-
* @param msg - string/buffer/view instance that represents data to send
|
|
2502
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
2503
|
-
*/
|
|
2504
|
-
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
2505
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2506
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2507
|
-
hasListeners(name:string):boolean;
|
|
2508
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2509
|
-
/**
|
|
2510
|
-
*
|
|
2511
|
-
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
2512
|
-
* them when finished using them.
|
|
2513
|
-
*/
|
|
2514
|
-
get exportedObjects():WidgetExportedObject[];
|
|
2515
|
-
/**
|
|
2516
|
-
*
|
|
2517
|
-
* @return the type of this widget
|
|
2518
|
-
*/
|
|
2519
|
-
get type():string;
|
|
2520
|
-
}
|
|
2521
|
-
|
|
2522
|
-
export class DateWrapper extends LongWrapper {
|
|
2523
|
-
protected constructor();
|
|
2524
|
-
|
|
2525
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
2526
|
-
asDate():Date;
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
/**
|
|
2530
|
-
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
2531
|
-
* this type TableMap.
|
|
2532
|
-
* @deprecated
|
|
2533
|
-
*/
|
|
2534
|
-
export class TableMap {
|
|
2535
|
-
static readonly EVENT_KEYADDED:string;
|
|
2536
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2537
|
-
static readonly EVENT_RECONNECT:string;
|
|
2538
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
2539
|
-
|
|
2540
|
-
protected constructor();
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
|
-
/**
|
|
2544
|
-
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
2545
|
-
* the server to get each Table. All tables will have the same structure.
|
|
2546
|
-
*/
|
|
2547
|
-
export class PartitionedTable implements HasEventHandling {
|
|
2548
|
-
/**
|
|
2549
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2550
|
-
*/
|
|
2551
|
-
static readonly EVENT_KEYADDED:string;
|
|
2552
|
-
/**
|
|
2553
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2554
|
-
*/
|
|
2555
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2556
|
-
/**
|
|
2557
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2558
|
-
*/
|
|
2559
|
-
static readonly EVENT_RECONNECT:string;
|
|
2560
|
-
/**
|
|
2561
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
2562
|
-
*/
|
|
2563
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
2564
|
-
|
|
2565
|
-
protected constructor();
|
|
2566
|
-
|
|
2567
|
-
/**
|
|
2568
|
-
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
2569
|
-
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
2570
|
-
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
2664
|
+
/**
|
|
2665
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
2666
|
+
* @return dh.TotalsTableConfig
|
|
2571
2667
|
*/
|
|
2572
|
-
|
|
2668
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
2573
2669
|
/**
|
|
2574
|
-
*
|
|
2575
|
-
*
|
|
2576
|
-
*
|
|
2670
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
2671
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2672
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
2673
|
+
* @return {@link dh.Sort} array
|
|
2577
2674
|
*/
|
|
2578
|
-
|
|
2675
|
+
get sort():Array<Sort>;
|
|
2579
2676
|
/**
|
|
2580
|
-
*
|
|
2581
|
-
*
|
|
2582
|
-
* @return
|
|
2677
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
2678
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
2679
|
+
* @return {@link dh.CustomColumn} array
|
|
2583
2680
|
*/
|
|
2584
|
-
|
|
2681
|
+
get customColumns():Array<CustomColumn>;
|
|
2585
2682
|
/**
|
|
2586
|
-
*
|
|
2587
|
-
*
|
|
2588
|
-
* @
|
|
2683
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2684
|
+
* initial snapshot.
|
|
2685
|
+
* @return boolean
|
|
2589
2686
|
*/
|
|
2590
|
-
|
|
2687
|
+
get isRefreshing():boolean;
|
|
2591
2688
|
/**
|
|
2592
|
-
*
|
|
2593
|
-
*
|
|
2689
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
2690
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2691
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
2692
|
+
* @return {@link dh.FilterCondition} array
|
|
2594
2693
|
*/
|
|
2595
|
-
|
|
2694
|
+
get filter():Array<FilterCondition>;
|
|
2596
2695
|
/**
|
|
2597
|
-
*
|
|
2598
|
-
* will not
|
|
2696
|
+
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
2697
|
+
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
2698
|
+
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
2699
|
+
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
2599
2700
|
*/
|
|
2600
|
-
|
|
2701
|
+
get totalSize():number;
|
|
2601
2702
|
/**
|
|
2602
|
-
* The count of
|
|
2603
|
-
* @
|
|
2703
|
+
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
2704
|
+
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
2705
|
+
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
2706
|
+
* <p>
|
|
2707
|
+
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
2708
|
+
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
2709
|
+
* uncoalesced.
|
|
2604
2710
|
*/
|
|
2605
2711
|
get size():number;
|
|
2606
2712
|
/**
|
|
2607
|
-
*
|
|
2608
|
-
*
|
|
2609
|
-
* @return Array of Column
|
|
2713
|
+
* True if this table has been closed.
|
|
2714
|
+
* @return boolean
|
|
2610
2715
|
*/
|
|
2611
|
-
get
|
|
2716
|
+
get isClosed():boolean;
|
|
2612
2717
|
/**
|
|
2613
|
-
*
|
|
2614
|
-
*
|
|
2718
|
+
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
2719
|
+
* <p>
|
|
2720
|
+
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
2721
|
+
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
2722
|
+
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
2723
|
+
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
2724
|
+
* for those columns, use {@link Table.selectDistinct}.
|
|
2725
|
+
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
2615
2726
|
*/
|
|
2616
|
-
get
|
|
2727
|
+
get isUncoalesced():boolean;
|
|
2617
2728
|
/**
|
|
2618
2729
|
* Listen for events on this object.
|
|
2619
2730
|
* @param name - the name of the event to listen for
|
|
@@ -2632,126 +2743,22 @@ export namespace dh {
|
|
|
2632
2743
|
* @typeParam T -
|
|
2633
2744
|
*/
|
|
2634
2745
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2635
|
-
}
|
|
2636
|
-
|
|
2637
|
-
export class QueryInfo {
|
|
2638
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
2639
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2640
|
-
static readonly EVENT_RECONNECT:string;
|
|
2641
|
-
static readonly EVENT_CONNECT:string;
|
|
2642
|
-
|
|
2643
|
-
protected constructor();
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
/**
|
|
2647
|
-
* A js type for operating on input tables.
|
|
2648
|
-
*
|
|
2649
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
2650
|
-
*
|
|
2651
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2652
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2653
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2654
|
-
* before sending the next operation.
|
|
2655
|
-
*
|
|
2656
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2657
|
-
*
|
|
2658
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2659
|
-
* object.
|
|
2660
|
-
*/
|
|
2661
|
-
export class InputTable {
|
|
2662
|
-
protected constructor();
|
|
2663
|
-
|
|
2664
|
-
/**
|
|
2665
|
-
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
2666
|
-
* property at that name and validate it can be put into the given column type.
|
|
2667
|
-
* @param row -
|
|
2668
|
-
* @param userTimeZone -
|
|
2669
|
-
* @return Promise of dh.InputTable
|
|
2670
|
-
*/
|
|
2671
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2672
|
-
/**
|
|
2673
|
-
* Add multiple rows to a table.
|
|
2674
|
-
* @param rows -
|
|
2675
|
-
* @param userTimeZone -
|
|
2676
|
-
* @return Promise of dh.InputTable
|
|
2677
|
-
*/
|
|
2678
|
-
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
2679
|
-
/**
|
|
2680
|
-
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
2681
|
-
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
2682
|
-
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
2683
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
2684
|
-
* @param tableToAdd -
|
|
2685
|
-
* @return Promise of dh.InputTable
|
|
2686
|
-
*/
|
|
2687
|
-
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
2688
|
-
/**
|
|
2689
|
-
* Add multiple tables to this Input Table.
|
|
2690
|
-
* @param tablesToAdd -
|
|
2691
|
-
* @return Promise of dh.InputTable
|
|
2692
|
-
*/
|
|
2693
|
-
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
2694
|
-
/**
|
|
2695
|
-
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
2696
|
-
* @param tableToDelete -
|
|
2697
|
-
* @return Promise of dh.InputTable
|
|
2698
|
-
*/
|
|
2699
|
-
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
2700
|
-
/**
|
|
2701
|
-
* Delete multiple tables from this Input Table.
|
|
2702
|
-
* @param tablesToDelete -
|
|
2703
|
-
* @return
|
|
2704
|
-
*/
|
|
2705
|
-
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
2706
|
-
/**
|
|
2707
|
-
* A list of the key columns, by name
|
|
2708
|
-
* @return String array.
|
|
2709
|
-
*/
|
|
2710
|
-
get keys():string[];
|
|
2711
|
-
/**
|
|
2712
|
-
* A list of the value columns, by name
|
|
2713
|
-
* @return String array.
|
|
2714
|
-
*/
|
|
2715
|
-
get values():string[];
|
|
2716
|
-
/**
|
|
2717
|
-
* A list of the key columns.
|
|
2718
|
-
* @return Column array.
|
|
2719
|
-
*/
|
|
2720
|
-
get keyColumns():Column[];
|
|
2721
2746
|
/**
|
|
2722
|
-
*
|
|
2723
|
-
*
|
|
2724
|
-
|
|
2725
|
-
get valueColumns():Column[];
|
|
2726
|
-
/**
|
|
2727
|
-
* The source table for this Input Table
|
|
2728
|
-
* @return dh.table
|
|
2747
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2748
|
+
* do not support reverse.
|
|
2749
|
+
* @return {@link dh.Sort}
|
|
2729
2750
|
*/
|
|
2730
|
-
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
export class LoginCredentials {
|
|
2734
|
-
type?:string|null;
|
|
2735
|
-
username?:string|null;
|
|
2736
|
-
token?:string|null;
|
|
2737
|
-
|
|
2738
|
-
constructor();
|
|
2751
|
+
static reverse():Sort;
|
|
2739
2752
|
}
|
|
2740
2753
|
|
|
2741
|
-
/**
|
|
2742
|
-
* Options for custom columns.
|
|
2743
|
-
*/
|
|
2744
|
-
export class CustomColumnOptions {
|
|
2745
|
-
/**
|
|
2746
|
-
* When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
|
|
2747
|
-
* nodes.
|
|
2748
|
-
*/
|
|
2749
|
-
rollupNodeType?:RollupNodeTypeType|null;
|
|
2750
2754
|
|
|
2751
|
-
|
|
2755
|
+
type SearchDisplayModeType = string;
|
|
2756
|
+
export class SearchDisplayMode {
|
|
2757
|
+
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2758
|
+
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2759
|
+
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2752
2760
|
}
|
|
2753
2761
|
|
|
2754
|
-
|
|
2755
2762
|
/**
|
|
2756
2763
|
* This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
|
|
2757
2764
|
*/
|
|
@@ -2774,15 +2781,6 @@ export namespace dh {
|
|
|
2774
2781
|
static readonly SKIP:AggregationOperationType;
|
|
2775
2782
|
}
|
|
2776
2783
|
|
|
2777
|
-
/**
|
|
2778
|
-
* Describes the type of node in a rollup table.
|
|
2779
|
-
*/
|
|
2780
|
-
type RollupNodeTypeType = string;
|
|
2781
|
-
export class RollupNodeType {
|
|
2782
|
-
static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
|
|
2783
|
-
static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
2784
|
type ValueTypeType = string;
|
|
2787
2785
|
export class ValueType {
|
|
2788
2786
|
static readonly STRING:ValueTypeType;
|
|
@@ -2794,78 +2792,34 @@ export namespace dh {
|
|
|
2794
2792
|
}
|
|
2795
2793
|
|
|
2796
2794
|
/**
|
|
2797
|
-
*
|
|
2795
|
+
* Describes the type of node in a rollup table.
|
|
2798
2796
|
*/
|
|
2799
|
-
type
|
|
2800
|
-
export class
|
|
2801
|
-
static readonly
|
|
2802
|
-
static readonly
|
|
2803
|
-
static readonly HIERARCHICALTABLE:VariableTypeType;
|
|
2804
|
-
static readonly TABLEMAP:VariableTypeType;
|
|
2805
|
-
static readonly PARTITIONEDTABLE:VariableTypeType;
|
|
2806
|
-
static readonly FIGURE:VariableTypeType;
|
|
2807
|
-
static readonly OTHERWIDGET:VariableTypeType;
|
|
2808
|
-
static readonly PANDAS:VariableTypeType;
|
|
2809
|
-
static readonly TREEMAP:VariableTypeType;
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
type SearchDisplayModeType = string;
|
|
2813
|
-
export class SearchDisplayMode {
|
|
2814
|
-
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2815
|
-
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2816
|
-
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2797
|
+
type RollupNodeTypeType = string;
|
|
2798
|
+
export class RollupNodeType {
|
|
2799
|
+
static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
|
|
2800
|
+
static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
|
|
2817
2801
|
}
|
|
2818
2802
|
|
|
2819
|
-
}
|
|
2820
|
-
|
|
2821
|
-
export namespace dh.ide {
|
|
2822
|
-
|
|
2823
|
-
/**
|
|
2824
|
-
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2825
|
-
* server.
|
|
2826
|
-
*/
|
|
2827
|
-
export interface LogItem {
|
|
2828
|
-
/**
|
|
2829
|
-
* The level of the log message, enabling the client to ignore messages.
|
|
2830
|
-
* @return String
|
|
2831
|
-
*/
|
|
2832
|
-
get logLevel():string;
|
|
2833
|
-
/**
|
|
2834
|
-
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2835
|
-
* @return double
|
|
2836
|
-
*/
|
|
2837
|
-
get micros():number;
|
|
2838
|
-
/**
|
|
2839
|
-
* The log message written on the server.
|
|
2840
|
-
* @return String
|
|
2841
|
-
*/
|
|
2842
|
-
get message():string;
|
|
2843
|
-
}
|
|
2844
2803
|
/**
|
|
2845
|
-
*
|
|
2804
|
+
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2846
2805
|
*/
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
/**
|
|
2859
|
-
* The timestamp when the command finished running.
|
|
2860
|
-
* @return DateWrapper
|
|
2861
|
-
*/
|
|
2862
|
-
get endTimestamp():dh.DateWrapper;
|
|
2863
|
-
/**
|
|
2864
|
-
* The timestamp when the command started running.
|
|
2865
|
-
* @return DateWrapper
|
|
2866
|
-
*/
|
|
2867
|
-
get startTimestamp():dh.DateWrapper;
|
|
2806
|
+
type VariableTypeType = string;
|
|
2807
|
+
export class VariableType {
|
|
2808
|
+
static readonly TABLE:VariableTypeType;
|
|
2809
|
+
static readonly TREETABLE:VariableTypeType;
|
|
2810
|
+
static readonly HIERARCHICALTABLE:VariableTypeType;
|
|
2811
|
+
static readonly TABLEMAP:VariableTypeType;
|
|
2812
|
+
static readonly PARTITIONEDTABLE:VariableTypeType;
|
|
2813
|
+
static readonly FIGURE:VariableTypeType;
|
|
2814
|
+
static readonly OTHERWIDGET:VariableTypeType;
|
|
2815
|
+
static readonly PANDAS:VariableTypeType;
|
|
2816
|
+
static readonly TREEMAP:VariableTypeType;
|
|
2868
2817
|
}
|
|
2818
|
+
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
export namespace dh.ide {
|
|
2822
|
+
|
|
2869
2823
|
/**
|
|
2870
2824
|
* A format to describe a variable available to be read from the server. Application fields are optional, and only
|
|
2871
2825
|
* populated when a variable is provided by application mode.
|
|
@@ -2908,14 +2862,6 @@ export namespace dh.ide {
|
|
|
2908
2862
|
get applicationName():string;
|
|
2909
2863
|
}
|
|
2910
2864
|
/**
|
|
2911
|
-
* Specifies a type and either id or name (but not both).
|
|
2912
|
-
*/
|
|
2913
|
-
export interface VariableDescriptor {
|
|
2914
|
-
type:string;
|
|
2915
|
-
id?:string|null;
|
|
2916
|
-
name?:string|null;
|
|
2917
|
-
}
|
|
2918
|
-
/**
|
|
2919
2865
|
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2920
2866
|
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2921
2867
|
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
@@ -2939,6 +2885,60 @@ export namespace dh.ide {
|
|
|
2939
2885
|
*/
|
|
2940
2886
|
get updated():Array<VariableDefinition>;
|
|
2941
2887
|
}
|
|
2888
|
+
/**
|
|
2889
|
+
* Indicates the result of code run on the server.
|
|
2890
|
+
*/
|
|
2891
|
+
export interface CommandResult {
|
|
2892
|
+
/**
|
|
2893
|
+
* Describes changes made in the course of this command.
|
|
2894
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2895
|
+
*/
|
|
2896
|
+
get changes():VariableChanges;
|
|
2897
|
+
/**
|
|
2898
|
+
* If the command failed, the error message will be provided here.
|
|
2899
|
+
* @return String
|
|
2900
|
+
*/
|
|
2901
|
+
get error():string;
|
|
2902
|
+
/**
|
|
2903
|
+
* The timestamp when the command finished running.
|
|
2904
|
+
* @return DateWrapper
|
|
2905
|
+
*/
|
|
2906
|
+
get endTimestamp():dh.DateWrapper;
|
|
2907
|
+
/**
|
|
2908
|
+
* The timestamp when the command started running.
|
|
2909
|
+
* @return DateWrapper
|
|
2910
|
+
*/
|
|
2911
|
+
get startTimestamp():dh.DateWrapper;
|
|
2912
|
+
}
|
|
2913
|
+
/**
|
|
2914
|
+
* Specifies a type and either id or name (but not both).
|
|
2915
|
+
*/
|
|
2916
|
+
export interface VariableDescriptor {
|
|
2917
|
+
type:string;
|
|
2918
|
+
id?:string|null;
|
|
2919
|
+
name?:string|null;
|
|
2920
|
+
}
|
|
2921
|
+
/**
|
|
2922
|
+
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2923
|
+
* server.
|
|
2924
|
+
*/
|
|
2925
|
+
export interface LogItem {
|
|
2926
|
+
/**
|
|
2927
|
+
* The level of the log message, enabling the client to ignore messages.
|
|
2928
|
+
* @return String
|
|
2929
|
+
*/
|
|
2930
|
+
get logLevel():string;
|
|
2931
|
+
/**
|
|
2932
|
+
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2933
|
+
* @return double
|
|
2934
|
+
*/
|
|
2935
|
+
get micros():number;
|
|
2936
|
+
/**
|
|
2937
|
+
* The log message written on the server.
|
|
2938
|
+
* @return String
|
|
2939
|
+
*/
|
|
2940
|
+
get message():string;
|
|
2941
|
+
}
|
|
2942
2942
|
}
|
|
2943
2943
|
|
|
2944
2944
|
export namespace dh.grpc {
|
|
@@ -2971,31 +2971,6 @@ export namespace dh.grpc {
|
|
|
2971
2971
|
onEnd:(error?:Error|undefined|null)=>void;
|
|
2972
2972
|
}
|
|
2973
2973
|
/**
|
|
2974
|
-
* gRPC transport implementation.
|
|
2975
|
-
*/
|
|
2976
|
-
export interface GrpcTransport {
|
|
2977
|
-
/**
|
|
2978
|
-
* Starts the stream, sending metadata to the server.
|
|
2979
|
-
* @param metadata - the headers to send the server when opening the connection
|
|
2980
|
-
*/
|
|
2981
|
-
start(metadata:{ [key: string]: string|Array<string>; }):void;
|
|
2982
|
-
/**
|
|
2983
|
-
* Sends a message to the server.
|
|
2984
|
-
* @param msgBytes - bytes to send to the server
|
|
2985
|
-
*/
|
|
2986
|
-
sendMessage(msgBytes:Uint8Array):void;
|
|
2987
|
-
/**
|
|
2988
|
-
* "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
|
|
2989
|
-
* open to receiving messages.
|
|
2990
|
-
*/
|
|
2991
|
-
finishSend():void;
|
|
2992
|
-
/**
|
|
2993
|
-
* End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
|
|
2994
|
-
* client from receiving any more events.
|
|
2995
|
-
*/
|
|
2996
|
-
cancel():void;
|
|
2997
|
-
}
|
|
2998
|
-
/**
|
|
2999
2974
|
* Factory for creating gRPC transports.
|
|
3000
2975
|
*/
|
|
3001
2976
|
export interface GrpcTransportFactory {
|
|
@@ -3013,107 +2988,34 @@ export namespace dh.grpc {
|
|
|
3013
2988
|
*/
|
|
3014
2989
|
get supportsClientStreaming():boolean;
|
|
3015
2990
|
}
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
|
-
export namespace dh.i18n {
|
|
3019
|
-
|
|
3020
2991
|
/**
|
|
3021
|
-
*
|
|
3022
|
-
* additional 6 decimal places after the rest of the number.
|
|
3023
|
-
*
|
|
3024
|
-
* Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
|
|
3025
|
-
* and assuming it to be a lossy nano value, and parsing into a js Date.
|
|
3026
|
-
*
|
|
3027
|
-
*
|
|
3028
|
-
* Utility class to parse and format various date/time values, using the same format patterns as are supported by the
|
|
3029
|
-
* standard Java implementation used in the Deephaven server and swing client.
|
|
3030
|
-
*
|
|
3031
|
-
* As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
|
|
3032
|
-
* with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
|
|
3033
|
-
* however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
|
|
3034
|
-
* still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
|
|
3035
|
-
* object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
|
|
3036
|
-
* to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
|
|
3037
|
-
* `asDate()` to return a JS `Date` value.
|
|
3038
|
-
*
|
|
3039
|
-
*
|
|
3040
|
-
* Caveats:
|
|
3041
|
-
*
|
|
3042
|
-
*
|
|
3043
|
-
* - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
|
|
3044
|
-
* short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
|
|
3045
|
-
* browser to emit the user's own timezone.
|
|
2992
|
+
* gRPC transport implementation.
|
|
3046
2993
|
*/
|
|
3047
|
-
export
|
|
3048
|
-
static readonly NANOS_PER_MILLI:number;
|
|
3049
|
-
|
|
3050
|
-
/**
|
|
3051
|
-
* Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
|
|
3052
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
3053
|
-
* @param pattern -
|
|
3054
|
-
*/
|
|
3055
|
-
constructor(pattern:string);
|
|
3056
|
-
|
|
3057
|
-
/**
|
|
3058
|
-
*
|
|
3059
|
-
* @param pattern -
|
|
3060
|
-
* @return a date format instance matching the specified format. If this format has not been specified before, a new
|
|
3061
|
-
* instance will be created and stored for later reuse.
|
|
3062
|
-
*/
|
|
3063
|
-
static getFormat(pattern:string):DateTimeFormat;
|
|
3064
|
-
/**
|
|
3065
|
-
* Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
|
|
3066
|
-
* `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
|
|
3067
|
-
* the instance method for more details on input objects.
|
|
3068
|
-
* @param pattern -
|
|
3069
|
-
* @param date -
|
|
3070
|
-
* @param timeZone -
|
|
3071
|
-
* @return
|
|
3072
|
-
*/
|
|
3073
|
-
static format(pattern:string, date:any, timeZone?:TimeZone):string;
|
|
3074
|
-
/**
|
|
3075
|
-
* Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
|
|
3076
|
-
* @param pattern -
|
|
3077
|
-
* @param text -
|
|
3078
|
-
* @return
|
|
3079
|
-
*/
|
|
3080
|
-
static parseAsDate(pattern:string, text:string):Date;
|
|
2994
|
+
export interface GrpcTransport {
|
|
3081
2995
|
/**
|
|
3082
|
-
*
|
|
3083
|
-
*
|
|
3084
|
-
* @param pattern -
|
|
3085
|
-
* @param text -
|
|
3086
|
-
* @param tz -
|
|
3087
|
-
* @return
|
|
2996
|
+
* Starts the stream, sending metadata to the server.
|
|
2997
|
+
* @param metadata - the headers to send the server when opening the connection
|
|
3088
2998
|
*/
|
|
3089
|
-
|
|
2999
|
+
start(metadata:{ [key: string]: string|Array<string>; }):void;
|
|
3090
3000
|
/**
|
|
3091
|
-
*
|
|
3092
|
-
*
|
|
3093
|
-
* nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
|
|
3094
|
-
* expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
|
|
3095
|
-
* date/time in that timezone.
|
|
3096
|
-
* @param date -
|
|
3097
|
-
* @param timeZone -
|
|
3098
|
-
* @return String
|
|
3001
|
+
* Sends a message to the server.
|
|
3002
|
+
* @param msgBytes - bytes to send to the server
|
|
3099
3003
|
*/
|
|
3100
|
-
|
|
3004
|
+
sendMessage(msgBytes:Uint8Array):void;
|
|
3101
3005
|
/**
|
|
3102
|
-
*
|
|
3103
|
-
*
|
|
3104
|
-
* @param text -
|
|
3105
|
-
* @param tz -
|
|
3106
|
-
* @return
|
|
3006
|
+
* "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
|
|
3007
|
+
* open to receiving messages.
|
|
3107
3008
|
*/
|
|
3108
|
-
|
|
3009
|
+
finishSend():void;
|
|
3109
3010
|
/**
|
|
3110
|
-
*
|
|
3111
|
-
*
|
|
3112
|
-
* @return
|
|
3011
|
+
* End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
|
|
3012
|
+
* client from receiving any more events.
|
|
3113
3013
|
*/
|
|
3114
|
-
|
|
3115
|
-
toString():string;
|
|
3014
|
+
cancel():void;
|
|
3116
3015
|
}
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
export namespace dh.i18n {
|
|
3117
3019
|
|
|
3118
3020
|
/**
|
|
3119
3021
|
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
@@ -3205,25 +3107,123 @@ export namespace dh.i18n {
|
|
|
3205
3107
|
* <li>AEDT</li>
|
|
3206
3108
|
* </ul>
|
|
3207
3109
|
*/
|
|
3208
|
-
export class TimeZone {
|
|
3209
|
-
protected constructor();
|
|
3110
|
+
export class TimeZone {
|
|
3111
|
+
protected constructor();
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Factory method which creates timezone instances from one of the supported keys.
|
|
3115
|
+
* @param tzCode -
|
|
3116
|
+
* @return dh.i18n.TimeZone
|
|
3117
|
+
*/
|
|
3118
|
+
static getTimeZone(tzCode:string):TimeZone;
|
|
3119
|
+
/**
|
|
3120
|
+
* the standard offset of this timezone, in minutes
|
|
3121
|
+
* @return int
|
|
3122
|
+
*/
|
|
3123
|
+
get standardOffset():number;
|
|
3124
|
+
/**
|
|
3125
|
+
* the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
|
|
3126
|
+
* @return String
|
|
3127
|
+
*/
|
|
3128
|
+
get id():string;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
|
|
3133
|
+
* additional 6 decimal places after the rest of the number.
|
|
3134
|
+
*
|
|
3135
|
+
* Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
|
|
3136
|
+
* and assuming it to be a lossy nano value, and parsing into a js Date.
|
|
3137
|
+
*
|
|
3138
|
+
*
|
|
3139
|
+
* Utility class to parse and format various date/time values, using the same format patterns as are supported by the
|
|
3140
|
+
* standard Java implementation used in the Deephaven server and swing client.
|
|
3141
|
+
*
|
|
3142
|
+
* As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
|
|
3143
|
+
* with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
|
|
3144
|
+
* however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
|
|
3145
|
+
* still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
|
|
3146
|
+
* object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
|
|
3147
|
+
* to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
|
|
3148
|
+
* `asDate()` to return a JS `Date` value.
|
|
3149
|
+
*
|
|
3150
|
+
*
|
|
3151
|
+
* Caveats:
|
|
3152
|
+
*
|
|
3153
|
+
*
|
|
3154
|
+
* - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
|
|
3155
|
+
* short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
|
|
3156
|
+
* browser to emit the user's own timezone.
|
|
3157
|
+
*/
|
|
3158
|
+
export class DateTimeFormat {
|
|
3159
|
+
static readonly NANOS_PER_MILLI:number;
|
|
3210
3160
|
|
|
3211
3161
|
/**
|
|
3212
|
-
*
|
|
3213
|
-
*
|
|
3214
|
-
* @
|
|
3162
|
+
* Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
|
|
3163
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
3164
|
+
* @param pattern -
|
|
3215
3165
|
*/
|
|
3216
|
-
|
|
3166
|
+
constructor(pattern:string);
|
|
3167
|
+
|
|
3217
3168
|
/**
|
|
3218
|
-
*
|
|
3219
|
-
* @
|
|
3169
|
+
*
|
|
3170
|
+
* @param pattern -
|
|
3171
|
+
* @return a date format instance matching the specified format. If this format has not been specified before, a new
|
|
3172
|
+
* instance will be created and stored for later reuse.
|
|
3220
3173
|
*/
|
|
3221
|
-
|
|
3174
|
+
static getFormat(pattern:string):DateTimeFormat;
|
|
3222
3175
|
/**
|
|
3223
|
-
*
|
|
3176
|
+
* Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
|
|
3177
|
+
* `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
|
|
3178
|
+
* the instance method for more details on input objects.
|
|
3179
|
+
* @param pattern -
|
|
3180
|
+
* @param date -
|
|
3181
|
+
* @param timeZone -
|
|
3182
|
+
* @return
|
|
3183
|
+
*/
|
|
3184
|
+
static format(pattern:string, date:any, timeZone?:TimeZone):string;
|
|
3185
|
+
/**
|
|
3186
|
+
* Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
|
|
3187
|
+
* @param pattern -
|
|
3188
|
+
* @param text -
|
|
3189
|
+
* @return
|
|
3190
|
+
*/
|
|
3191
|
+
static parseAsDate(pattern:string, text:string):Date;
|
|
3192
|
+
/**
|
|
3193
|
+
* Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
|
|
3194
|
+
* A `TimeZone` object can optionally be provided to parse to a desired timezone.
|
|
3195
|
+
* @param pattern -
|
|
3196
|
+
* @param text -
|
|
3197
|
+
* @param tz -
|
|
3198
|
+
* @return
|
|
3199
|
+
*/
|
|
3200
|
+
static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
|
|
3201
|
+
/**
|
|
3202
|
+
* Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
|
|
3203
|
+
* include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
|
|
3204
|
+
* nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
|
|
3205
|
+
* expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
|
|
3206
|
+
* date/time in that timezone.
|
|
3207
|
+
* @param date -
|
|
3208
|
+
* @param timeZone -
|
|
3224
3209
|
* @return String
|
|
3225
3210
|
*/
|
|
3226
|
-
|
|
3211
|
+
format(date:any, timeZone?:TimeZone):string;
|
|
3212
|
+
/**
|
|
3213
|
+
* Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
|
|
3214
|
+
* nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
|
|
3215
|
+
* @param text -
|
|
3216
|
+
* @param tz -
|
|
3217
|
+
* @return
|
|
3218
|
+
*/
|
|
3219
|
+
parse(text:string, tz?:TimeZone):dh.DateWrapper;
|
|
3220
|
+
/**
|
|
3221
|
+
* Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
|
|
3222
|
+
* @param text -
|
|
3223
|
+
* @return
|
|
3224
|
+
*/
|
|
3225
|
+
parseAsDate(text:string):Date;
|
|
3226
|
+
toString():string;
|
|
3227
3227
|
}
|
|
3228
3228
|
|
|
3229
3229
|
/**
|
|
@@ -3284,6 +3284,51 @@ export namespace dh.i18n {
|
|
|
3284
3284
|
|
|
3285
3285
|
export namespace dh.plot {
|
|
3286
3286
|
|
|
3287
|
+
export interface FigureDataUpdatedEvent {
|
|
3288
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3289
|
+
get series():Series[];
|
|
3290
|
+
}
|
|
3291
|
+
/**
|
|
3292
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
3293
|
+
*/
|
|
3294
|
+
export interface MultiSeries {
|
|
3295
|
+
/**
|
|
3296
|
+
* The name for this multi-series.
|
|
3297
|
+
* @return String
|
|
3298
|
+
*/
|
|
3299
|
+
get name():string;
|
|
3300
|
+
/**
|
|
3301
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
3302
|
+
* @return int
|
|
3303
|
+
*/
|
|
3304
|
+
get plotStyle():SeriesPlotStyleType;
|
|
3305
|
+
}
|
|
3306
|
+
/**
|
|
3307
|
+
* Describes how to access and display data required within a series.
|
|
3308
|
+
*/
|
|
3309
|
+
export interface SeriesDataSource {
|
|
3310
|
+
/**
|
|
3311
|
+
* the type of data stored in the underlying table's Column.
|
|
3312
|
+
* @return String
|
|
3313
|
+
*/
|
|
3314
|
+
get columnType():string;
|
|
3315
|
+
/**
|
|
3316
|
+
* the axis that this source should be drawn on.
|
|
3317
|
+
* @return dh.plot.Axis
|
|
3318
|
+
*/
|
|
3319
|
+
get axis():Axis;
|
|
3320
|
+
/**
|
|
3321
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
3322
|
+
* @return int
|
|
3323
|
+
*/
|
|
3324
|
+
get type():SourceTypeType;
|
|
3325
|
+
}
|
|
3326
|
+
export interface OneClick {
|
|
3327
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
3328
|
+
getValueForColumn(columName:string):any;
|
|
3329
|
+
get requireAllFiltersToDisplay():boolean;
|
|
3330
|
+
get columns():dh.Column[];
|
|
3331
|
+
}
|
|
3287
3332
|
/**
|
|
3288
3333
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
3289
3334
|
* may be shared between Series instances.
|
|
@@ -3353,31 +3398,6 @@ export namespace dh.plot {
|
|
|
3353
3398
|
get minRange():number;
|
|
3354
3399
|
}
|
|
3355
3400
|
/**
|
|
3356
|
-
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
3357
|
-
*/
|
|
3358
|
-
export interface MultiSeries {
|
|
3359
|
-
/**
|
|
3360
|
-
* The name for this multi-series.
|
|
3361
|
-
* @return String
|
|
3362
|
-
*/
|
|
3363
|
-
get name():string;
|
|
3364
|
-
/**
|
|
3365
|
-
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
3366
|
-
* @return int
|
|
3367
|
-
*/
|
|
3368
|
-
get plotStyle():SeriesPlotStyleType;
|
|
3369
|
-
}
|
|
3370
|
-
export interface OneClick {
|
|
3371
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
3372
|
-
getValueForColumn(columName:string):any;
|
|
3373
|
-
get requireAllFiltersToDisplay():boolean;
|
|
3374
|
-
get columns():dh.Column[];
|
|
3375
|
-
}
|
|
3376
|
-
export interface FigureDataUpdatedEvent {
|
|
3377
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3378
|
-
get series():Series[];
|
|
3379
|
-
}
|
|
3380
|
-
/**
|
|
3381
3401
|
* Provides access to the data for displaying in a figure.
|
|
3382
3402
|
*/
|
|
3383
3403
|
export interface Series {
|
|
@@ -3421,51 +3441,28 @@ export namespace dh.plot {
|
|
|
3421
3441
|
get multiSeries():MultiSeries;
|
|
3422
3442
|
get shapeLabel():string;
|
|
3423
3443
|
}
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
get columnType():string;
|
|
3433
|
-
/**
|
|
3434
|
-
* the axis that this source should be drawn on.
|
|
3435
|
-
* @return dh.plot.Axis
|
|
3436
|
-
*/
|
|
3437
|
-
get axis():Axis;
|
|
3438
|
-
/**
|
|
3439
|
-
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
3440
|
-
* @return int
|
|
3441
|
-
*/
|
|
3442
|
-
get type():SourceTypeType;
|
|
3444
|
+
|
|
3445
|
+
export class SourceDescriptor {
|
|
3446
|
+
axis:AxisDescriptor;
|
|
3447
|
+
table:dh.Table;
|
|
3448
|
+
columnName:string;
|
|
3449
|
+
type:string;
|
|
3450
|
+
|
|
3451
|
+
constructor();
|
|
3443
3452
|
}
|
|
3444
3453
|
|
|
3445
|
-
export class
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
static MAX_SERIES_SIZE:number;
|
|
3452
|
-
/**
|
|
3453
|
-
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3454
|
-
* downsampling disabled, the series will not load data.
|
|
3455
|
-
*/
|
|
3456
|
-
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3457
|
-
/**
|
|
3458
|
-
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3459
|
-
* axes are configured.
|
|
3460
|
-
*/
|
|
3461
|
-
static readonly DEFAULT:DownsampleOptions;
|
|
3462
|
-
/**
|
|
3463
|
-
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3464
|
-
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3465
|
-
*/
|
|
3466
|
-
static readonly DISABLE:DownsampleOptions;
|
|
3454
|
+
export class FigureSourceException {
|
|
3455
|
+
table:dh.Table;
|
|
3456
|
+
source:SeriesDataSource;
|
|
3457
|
+
|
|
3458
|
+
protected constructor();
|
|
3459
|
+
}
|
|
3467
3460
|
|
|
3461
|
+
export class SeriesDataSourceException {
|
|
3468
3462
|
protected constructor();
|
|
3463
|
+
|
|
3464
|
+
get source():SeriesDataSource;
|
|
3465
|
+
get message():string;
|
|
3469
3466
|
}
|
|
3470
3467
|
|
|
3471
3468
|
export class FigureFetchError {
|
|
@@ -3475,6 +3472,23 @@ export namespace dh.plot {
|
|
|
3475
3472
|
protected constructor();
|
|
3476
3473
|
}
|
|
3477
3474
|
|
|
3475
|
+
/**
|
|
3476
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3477
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3478
|
+
* keep that cached as well.
|
|
3479
|
+
*/
|
|
3480
|
+
export class ChartData {
|
|
3481
|
+
constructor(table:dh.Table);
|
|
3482
|
+
|
|
3483
|
+
update(tableData:dh.SubscriptionTableData):void;
|
|
3484
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3485
|
+
/**
|
|
3486
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3487
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3488
|
+
*/
|
|
3489
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3478
3492
|
/**
|
|
3479
3493
|
* Helper class for plot downsampling methods.
|
|
3480
3494
|
*/
|
|
@@ -3494,6 +3508,59 @@ export namespace dh.plot {
|
|
|
3494
3508
|
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3495
3509
|
}
|
|
3496
3510
|
|
|
3511
|
+
export class SeriesDescriptor {
|
|
3512
|
+
plotStyle:string;
|
|
3513
|
+
name?:string|null;
|
|
3514
|
+
linesVisible?:boolean|null;
|
|
3515
|
+
shapesVisible?:boolean|null;
|
|
3516
|
+
gradientVisible?:boolean|null;
|
|
3517
|
+
lineColor?:string|null;
|
|
3518
|
+
pointLabelFormat?:string|null;
|
|
3519
|
+
xToolTipPattern?:string|null;
|
|
3520
|
+
yToolTipPattern?:string|null;
|
|
3521
|
+
shapeLabel?:string|null;
|
|
3522
|
+
shapeSize?:number|null;
|
|
3523
|
+
shapeColor?:string|null;
|
|
3524
|
+
shape?:string|null;
|
|
3525
|
+
dataSources:Array<SourceDescriptor>;
|
|
3526
|
+
|
|
3527
|
+
constructor();
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
/**
|
|
3531
|
+
* Provides the details for a figure.
|
|
3532
|
+
*
|
|
3533
|
+
* The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
|
|
3534
|
+
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
3535
|
+
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
3536
|
+
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
3537
|
+
* any) to reduce the number of points sent to the client.
|
|
3538
|
+
*
|
|
3539
|
+
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
3540
|
+
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
3541
|
+
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
3542
|
+
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
3543
|
+
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
3544
|
+
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
3545
|
+
*
|
|
3546
|
+
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
3547
|
+
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
3548
|
+
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
3549
|
+
* that the "important" values are visible.
|
|
3550
|
+
*
|
|
3551
|
+
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
3552
|
+
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
3553
|
+
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
3554
|
+
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
3555
|
+
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
3556
|
+
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
3557
|
+
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
3558
|
+
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
3559
|
+
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
3560
|
+
*
|
|
3561
|
+
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3562
|
+
* client-created figures.
|
|
3563
|
+
*/
|
|
3497
3564
|
export class Figure implements dh.HasEventHandling {
|
|
3498
3565
|
/**
|
|
3499
3566
|
* The title of the figure.
|
|
@@ -3537,7 +3604,8 @@ export namespace dh.plot {
|
|
|
3537
3604
|
*/
|
|
3538
3605
|
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3539
3606
|
|
|
3540
|
-
|
|
3607
|
+
protected constructor();
|
|
3608
|
+
|
|
3541
3609
|
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3542
3610
|
/**
|
|
3543
3611
|
* Disable updates for all series in this figure.
|
|
@@ -3576,15 +3644,7 @@ export namespace dh.plot {
|
|
|
3576
3644
|
* @typeParam T -
|
|
3577
3645
|
*/
|
|
3578
3646
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
export class SourceDescriptor {
|
|
3582
|
-
axis:AxisDescriptor;
|
|
3583
|
-
table:dh.Table;
|
|
3584
|
-
columnName:string;
|
|
3585
|
-
type:string;
|
|
3586
|
-
|
|
3587
|
-
constructor();
|
|
3647
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3588
3648
|
}
|
|
3589
3649
|
|
|
3590
3650
|
export class ChartDescriptor {
|
|
@@ -3604,23 +3664,6 @@ export namespace dh.plot {
|
|
|
3604
3664
|
constructor();
|
|
3605
3665
|
}
|
|
3606
3666
|
|
|
3607
|
-
/**
|
|
3608
|
-
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3609
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3610
|
-
* keep that cached as well.
|
|
3611
|
-
*/
|
|
3612
|
-
export class ChartData {
|
|
3613
|
-
constructor(table:dh.Table);
|
|
3614
|
-
|
|
3615
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3616
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3617
|
-
/**
|
|
3618
|
-
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3619
|
-
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3620
|
-
*/
|
|
3621
|
-
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3622
|
-
}
|
|
3623
|
-
|
|
3624
3667
|
/**
|
|
3625
3668
|
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
3626
3669
|
*/
|
|
@@ -3638,49 +3681,6 @@ export namespace dh.plot {
|
|
|
3638
3681
|
constructor();
|
|
3639
3682
|
}
|
|
3640
3683
|
|
|
3641
|
-
export class AxisDescriptor {
|
|
3642
|
-
formatType:string;
|
|
3643
|
-
type:string;
|
|
3644
|
-
position:string;
|
|
3645
|
-
log?:boolean|null;
|
|
3646
|
-
label?:string|null;
|
|
3647
|
-
labelFont?:string|null;
|
|
3648
|
-
ticksFont?:string|null;
|
|
3649
|
-
formatPattern?:string|null;
|
|
3650
|
-
color?:string|null;
|
|
3651
|
-
minRange?:number|null;
|
|
3652
|
-
maxRange?:number|null;
|
|
3653
|
-
minorTicksVisible?:boolean|null;
|
|
3654
|
-
majorTicksVisible?:boolean|null;
|
|
3655
|
-
minorTickCount?:number|null;
|
|
3656
|
-
gapBetweenMajorTicks?:number|null;
|
|
3657
|
-
majorTickLocations?:Array<number>|null;
|
|
3658
|
-
tickLabelAngle?:number|null;
|
|
3659
|
-
invert?:boolean|null;
|
|
3660
|
-
isTimeAxis?:boolean|null;
|
|
3661
|
-
|
|
3662
|
-
constructor();
|
|
3663
|
-
}
|
|
3664
|
-
|
|
3665
|
-
export class SeriesDescriptor {
|
|
3666
|
-
plotStyle:string;
|
|
3667
|
-
name?:string|null;
|
|
3668
|
-
linesVisible?:boolean|null;
|
|
3669
|
-
shapesVisible?:boolean|null;
|
|
3670
|
-
gradientVisible?:boolean|null;
|
|
3671
|
-
lineColor?:string|null;
|
|
3672
|
-
pointLabelFormat?:string|null;
|
|
3673
|
-
xToolTipPattern?:string|null;
|
|
3674
|
-
yToolTipPattern?:string|null;
|
|
3675
|
-
shapeLabel?:string|null;
|
|
3676
|
-
shapeSize?:number|null;
|
|
3677
|
-
shapeColor?:string|null;
|
|
3678
|
-
shape?:string|null;
|
|
3679
|
-
dataSources:Array<SourceDescriptor>;
|
|
3680
|
-
|
|
3681
|
-
constructor();
|
|
3682
|
-
}
|
|
3683
|
-
|
|
3684
3684
|
/**
|
|
3685
3685
|
* Provide the details for a chart.
|
|
3686
3686
|
*/
|
|
@@ -3725,18 +3725,54 @@ export namespace dh.plot {
|
|
|
3725
3725
|
get multiSeries():MultiSeries[];
|
|
3726
3726
|
}
|
|
3727
3727
|
|
|
3728
|
-
export class
|
|
3729
|
-
|
|
3730
|
-
|
|
3728
|
+
export class AxisDescriptor {
|
|
3729
|
+
formatType:string;
|
|
3730
|
+
type:string;
|
|
3731
|
+
position:string;
|
|
3732
|
+
log?:boolean|null;
|
|
3733
|
+
label?:string|null;
|
|
3734
|
+
labelFont?:string|null;
|
|
3735
|
+
ticksFont?:string|null;
|
|
3736
|
+
formatPattern?:string|null;
|
|
3737
|
+
color?:string|null;
|
|
3738
|
+
minRange?:number|null;
|
|
3739
|
+
maxRange?:number|null;
|
|
3740
|
+
minorTicksVisible?:boolean|null;
|
|
3741
|
+
majorTicksVisible?:boolean|null;
|
|
3742
|
+
minorTickCount?:number|null;
|
|
3743
|
+
gapBetweenMajorTicks?:number|null;
|
|
3744
|
+
majorTickLocations?:Array<number>|null;
|
|
3745
|
+
tickLabelAngle?:number|null;
|
|
3746
|
+
invert?:boolean|null;
|
|
3747
|
+
isTimeAxis?:boolean|null;
|
|
3731
3748
|
|
|
3732
|
-
|
|
3749
|
+
constructor();
|
|
3733
3750
|
}
|
|
3734
3751
|
|
|
3735
|
-
export class
|
|
3736
|
-
|
|
3752
|
+
export class DownsampleOptions {
|
|
3753
|
+
/**
|
|
3754
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3755
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3756
|
+
* series.subscribe().
|
|
3757
|
+
*/
|
|
3758
|
+
static MAX_SERIES_SIZE:number;
|
|
3759
|
+
/**
|
|
3760
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3761
|
+
* downsampling disabled, the series will not load data.
|
|
3762
|
+
*/
|
|
3763
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3764
|
+
/**
|
|
3765
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3766
|
+
* axes are configured.
|
|
3767
|
+
*/
|
|
3768
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3769
|
+
/**
|
|
3770
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3771
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3772
|
+
*/
|
|
3773
|
+
static readonly DISABLE:DownsampleOptions;
|
|
3737
3774
|
|
|
3738
|
-
|
|
3739
|
-
get message():string;
|
|
3775
|
+
protected constructor();
|
|
3740
3776
|
}
|
|
3741
3777
|
|
|
3742
3778
|
|
|
@@ -3769,6 +3805,16 @@ export namespace dh.plot {
|
|
|
3769
3805
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3770
3806
|
}
|
|
3771
3807
|
|
|
3808
|
+
type AxisTypeType = number;
|
|
3809
|
+
export class AxisType {
|
|
3810
|
+
static readonly X:AxisTypeType;
|
|
3811
|
+
static readonly Y:AxisTypeType;
|
|
3812
|
+
static readonly SHAPE:AxisTypeType;
|
|
3813
|
+
static readonly SIZE:AxisTypeType;
|
|
3814
|
+
static readonly LABEL:AxisTypeType;
|
|
3815
|
+
static readonly COLOR:AxisTypeType;
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3772
3818
|
/**
|
|
3773
3819
|
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3774
3820
|
* those series should be rendered.
|
|
@@ -3815,30 +3861,23 @@ export namespace dh.plot {
|
|
|
3815
3861
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3816
3862
|
}
|
|
3817
3863
|
|
|
3818
|
-
type AxisTypeType = number;
|
|
3819
|
-
export class AxisType {
|
|
3820
|
-
static readonly X:AxisTypeType;
|
|
3821
|
-
static readonly Y:AxisTypeType;
|
|
3822
|
-
static readonly SHAPE:AxisTypeType;
|
|
3823
|
-
static readonly SIZE:AxisTypeType;
|
|
3824
|
-
static readonly LABEL:AxisTypeType;
|
|
3825
|
-
static readonly COLOR:AxisTypeType;
|
|
3826
|
-
}
|
|
3827
|
-
|
|
3828
3864
|
}
|
|
3829
3865
|
|
|
3830
3866
|
export namespace dh.lsp {
|
|
3831
3867
|
|
|
3832
|
-
export class
|
|
3833
|
-
|
|
3834
|
-
|
|
3868
|
+
export class Range {
|
|
3869
|
+
start:Position;
|
|
3870
|
+
end:Position;
|
|
3835
3871
|
|
|
3836
3872
|
constructor();
|
|
3873
|
+
|
|
3874
|
+
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3837
3875
|
}
|
|
3838
3876
|
|
|
3839
|
-
export class
|
|
3840
|
-
contents:MarkupContent;
|
|
3877
|
+
export class TextDocumentContentChangeEvent {
|
|
3841
3878
|
range:Range;
|
|
3879
|
+
rangeLength:number;
|
|
3880
|
+
text:string;
|
|
3842
3881
|
|
|
3843
3882
|
constructor();
|
|
3844
3883
|
}
|
|
@@ -3852,41 +3891,11 @@ export namespace dh.lsp {
|
|
|
3852
3891
|
constructor();
|
|
3853
3892
|
}
|
|
3854
3893
|
|
|
3855
|
-
export class
|
|
3856
|
-
|
|
3857
|
-
rangeLength:number;
|
|
3858
|
-
text:string;
|
|
3859
|
-
|
|
3860
|
-
constructor();
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
export class Position {
|
|
3864
|
-
line:number;
|
|
3865
|
-
character:number;
|
|
3866
|
-
|
|
3867
|
-
constructor();
|
|
3868
|
-
|
|
3869
|
-
lessThan(start:Position):boolean;
|
|
3870
|
-
lessOrEqual(start:Position):boolean;
|
|
3871
|
-
greaterThan(end:Position):boolean;
|
|
3872
|
-
greaterOrEqual(end:Position):boolean;
|
|
3873
|
-
copy():Position;
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
|
-
export class TextEdit {
|
|
3894
|
+
export class Hover {
|
|
3895
|
+
contents:MarkupContent;
|
|
3877
3896
|
range:Range;
|
|
3878
|
-
text:string;
|
|
3879
|
-
|
|
3880
|
-
constructor();
|
|
3881
|
-
}
|
|
3882
|
-
|
|
3883
|
-
export class Range {
|
|
3884
|
-
start:Position;
|
|
3885
|
-
end:Position;
|
|
3886
3897
|
|
|
3887
3898
|
constructor();
|
|
3888
|
-
|
|
3889
|
-
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3890
3899
|
}
|
|
3891
3900
|
|
|
3892
3901
|
export class MarkupContent {
|
|
@@ -3913,23 +3922,37 @@ export namespace dh.lsp {
|
|
|
3913
3922
|
constructor();
|
|
3914
3923
|
}
|
|
3915
3924
|
|
|
3916
|
-
|
|
3925
|
+
export class TextEdit {
|
|
3926
|
+
range:Range;
|
|
3927
|
+
text:string;
|
|
3917
3928
|
|
|
3929
|
+
constructor();
|
|
3930
|
+
}
|
|
3918
3931
|
|
|
3919
|
-
export
|
|
3932
|
+
export class ParameterInformation {
|
|
3933
|
+
label:string;
|
|
3934
|
+
documentation:MarkupContent;
|
|
3920
3935
|
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3936
|
+
constructor();
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
export class Position {
|
|
3940
|
+
line:number;
|
|
3941
|
+
character:number;
|
|
3942
|
+
|
|
3943
|
+
constructor();
|
|
3944
|
+
|
|
3945
|
+
lessThan(start:Position):boolean;
|
|
3946
|
+
lessOrEqual(start:Position):boolean;
|
|
3947
|
+
greaterThan(end:Position):boolean;
|
|
3948
|
+
greaterOrEqual(end:Position):boolean;
|
|
3949
|
+
copy():Position;
|
|
3932
3950
|
}
|
|
3951
|
+
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
export namespace dh.calendar {
|
|
3955
|
+
|
|
3933
3956
|
/**
|
|
3934
3957
|
* Defines a calendar with business hours and holidays.
|
|
3935
3958
|
*/
|
|
@@ -3960,6 +3983,18 @@ export namespace dh.calendar {
|
|
|
3960
3983
|
*/
|
|
3961
3984
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3962
3985
|
}
|
|
3986
|
+
export interface Holiday {
|
|
3987
|
+
/**
|
|
3988
|
+
* The date of the Holiday.
|
|
3989
|
+
* @return {@link dh.LocalDateWrapper}
|
|
3990
|
+
*/
|
|
3991
|
+
get date():dh.LocalDateWrapper;
|
|
3992
|
+
/**
|
|
3993
|
+
* The business periods that are open on the holiday.
|
|
3994
|
+
* @return dh.calendar.BusinessPeriod
|
|
3995
|
+
*/
|
|
3996
|
+
get businessPeriods():Array<BusinessPeriod>;
|
|
3997
|
+
}
|
|
3963
3998
|
export interface BusinessPeriod {
|
|
3964
3999
|
get close():string;
|
|
3965
4000
|
get open():string;
|
|
@@ -3979,3 +4014,4 @@ export namespace dh.calendar {
|
|
|
3979
4014
|
}
|
|
3980
4015
|
|
|
3981
4016
|
}
|
|
4017
|
+
|