@deephaven/jsapi-types 1.0.0-dev0.39.0 → 1.0.0-dev0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1901 -1901
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Minimum TypeScript Version: 4.3
|
|
2
2
|
// Generated using com.vertispan.tsdefs.doclet.TsDoclet
|
|
3
3
|
|
|
4
|
+
export interface IIterableResult<T> {
|
|
5
|
+
value:T;
|
|
6
|
+
done:boolean;
|
|
7
|
+
}
|
|
4
8
|
/**
|
|
5
9
|
* This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
|
|
6
10
|
* returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
|
|
@@ -11,12 +15,39 @@ export interface Iterator<T> {
|
|
|
11
15
|
hasNext():boolean;
|
|
12
16
|
next():IIterableResult<T>;
|
|
13
17
|
}
|
|
14
|
-
export interface IIterableResult<T> {
|
|
15
|
-
value:T;
|
|
16
|
-
done:boolean;
|
|
17
|
-
}
|
|
18
18
|
export namespace dh.storage {
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Storage service metadata about files and folders.
|
|
22
|
+
*/
|
|
23
|
+
export class ItemDetails {
|
|
24
|
+
protected constructor();
|
|
25
|
+
|
|
26
|
+
toString():string;
|
|
27
|
+
get filename():string;
|
|
28
|
+
get basename():string;
|
|
29
|
+
get size():number;
|
|
30
|
+
get etag():string;
|
|
31
|
+
get type():ItemTypeType;
|
|
32
|
+
get dirname():string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
37
|
+
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
38
|
+
* be used.
|
|
39
|
+
*/
|
|
40
|
+
export class FileContents {
|
|
41
|
+
protected constructor();
|
|
42
|
+
|
|
43
|
+
static blob(blob:Blob):FileContents;
|
|
44
|
+
static text(...text:string[]):FileContents;
|
|
45
|
+
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
46
|
+
text():Promise<string>;
|
|
47
|
+
arrayBuffer():Promise<ArrayBuffer>;
|
|
48
|
+
get etag():string;
|
|
49
|
+
}
|
|
50
|
+
|
|
20
51
|
/**
|
|
21
52
|
* Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
|
|
22
53
|
*/
|
|
@@ -75,37 +106,6 @@ export namespace dh.storage {
|
|
|
75
106
|
createDirectory(path:string):Promise<void>;
|
|
76
107
|
}
|
|
77
108
|
|
|
78
|
-
/**
|
|
79
|
-
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
80
|
-
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
81
|
-
* be used.
|
|
82
|
-
*/
|
|
83
|
-
export class FileContents {
|
|
84
|
-
protected constructor();
|
|
85
|
-
|
|
86
|
-
static blob(blob:Blob):FileContents;
|
|
87
|
-
static text(...text:string[]):FileContents;
|
|
88
|
-
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
89
|
-
text():Promise<string>;
|
|
90
|
-
arrayBuffer():Promise<ArrayBuffer>;
|
|
91
|
-
get etag():string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Storage service metadata about files and folders.
|
|
96
|
-
*/
|
|
97
|
-
export class ItemDetails {
|
|
98
|
-
protected constructor();
|
|
99
|
-
|
|
100
|
-
toString():string;
|
|
101
|
-
get filename():string;
|
|
102
|
-
get basename():string;
|
|
103
|
-
get size():number;
|
|
104
|
-
get etag():string;
|
|
105
|
-
get type():ItemTypeType;
|
|
106
|
-
get dirname():string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -118,49 +118,40 @@ export namespace dh.storage {
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
|
|
125
|
-
* and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
|
|
126
|
-
* incur other costs - it is likely faster to access data by columns using {@link getData}.
|
|
121
|
+
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
122
|
+
* details about the event.
|
|
123
|
+
* @typeParam T - the type of the event detail
|
|
127
124
|
*/
|
|
128
|
-
export interface
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
export interface Event<T> {
|
|
126
|
+
get detail():T;
|
|
127
|
+
get type():string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Represents statistics for a given table column.
|
|
131
|
+
*/
|
|
132
|
+
export interface ColumnStatistics {
|
|
135
133
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* @
|
|
134
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
135
|
+
* <p>
|
|
136
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
137
|
+
* @param name - the display name of the statistic
|
|
138
|
+
* @return String
|
|
140
139
|
*/
|
|
141
|
-
|
|
140
|
+
getType(name:string):string;
|
|
142
141
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @return
|
|
142
|
+
* 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
|
|
143
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
144
|
+
* than 19 unique values.
|
|
145
|
+
* @return Map of String double
|
|
147
146
|
*/
|
|
148
|
-
|
|
149
|
-
get columns():Array<Column>;
|
|
147
|
+
get uniqueValues():Map<string, number>;
|
|
150
148
|
/**
|
|
151
|
-
*
|
|
149
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
150
|
+
* <p>
|
|
151
|
+
* A map of each statistic's name to its value.
|
|
152
|
+
* @return Map of String and Object
|
|
152
153
|
*/
|
|
153
|
-
get
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
157
|
-
*/
|
|
158
|
-
export interface LocalDateWrapper {
|
|
159
|
-
valueOf():string;
|
|
160
|
-
getYear():number;
|
|
161
|
-
getMonthValue():number;
|
|
162
|
-
getDayOfMonth():number;
|
|
163
|
-
toString():string;
|
|
154
|
+
get statisticsMap():Map<string, object>;
|
|
164
155
|
}
|
|
165
156
|
export interface HasEventHandling {
|
|
166
157
|
/**
|
|
@@ -182,6 +173,41 @@ export namespace dh {
|
|
|
182
173
|
*/
|
|
183
174
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
184
175
|
}
|
|
176
|
+
export interface WorkerHeapInfo {
|
|
177
|
+
/**
|
|
178
|
+
* Total heap size available for this worker.
|
|
179
|
+
*/
|
|
180
|
+
get totalHeapSize():number;
|
|
181
|
+
get freeMemory():number;
|
|
182
|
+
get maximumHeapSize():number;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
186
|
+
* with additional properties to reflect the tree structure.
|
|
187
|
+
*/
|
|
188
|
+
export interface TreeRow extends Row {
|
|
189
|
+
get(column:Column):any;
|
|
190
|
+
getFormat(column:Column):Format;
|
|
191
|
+
/**
|
|
192
|
+
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
193
|
+
* rows below this one with a greater depth than this one.
|
|
194
|
+
* @return boolean
|
|
195
|
+
*/
|
|
196
|
+
get isExpanded():boolean;
|
|
197
|
+
/**
|
|
198
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
|
|
199
|
+
* and its expand/collapse icon.
|
|
200
|
+
* @return int
|
|
201
|
+
*/
|
|
202
|
+
get depth():number;
|
|
203
|
+
/**
|
|
204
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when the
|
|
205
|
+
* table updates, depending on the table's configuration.
|
|
206
|
+
* @return boolean
|
|
207
|
+
*/
|
|
208
|
+
get hasChildren():boolean;
|
|
209
|
+
get index():LongWrapper;
|
|
210
|
+
}
|
|
185
211
|
/**
|
|
186
212
|
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
187
213
|
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
@@ -209,222 +235,57 @@ export namespace dh {
|
|
|
209
235
|
*/
|
|
210
236
|
get exportedObjects():WidgetExportedObject[];
|
|
211
237
|
}
|
|
238
|
+
export interface ColumnGroup {
|
|
239
|
+
get name():string|null;
|
|
240
|
+
get children():string[]|null;
|
|
241
|
+
get color():string|null;
|
|
242
|
+
}
|
|
212
243
|
/**
|
|
213
|
-
*
|
|
214
|
-
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
215
|
-
*
|
|
216
|
-
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
217
|
-
*
|
|
218
|
-
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
219
|
-
* template when fetching a new totals table, or changing the totals table in use.
|
|
220
|
-
*
|
|
221
|
-
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
222
|
-
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
223
|
-
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
224
|
-
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
225
|
-
*
|
|
226
|
-
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
227
|
-
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
244
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
228
245
|
*/
|
|
229
|
-
export interface
|
|
246
|
+
export interface Format {
|
|
230
247
|
/**
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
|
|
234
|
-
* event per row in that range.
|
|
235
|
-
* @param firstRow -
|
|
236
|
-
* @param lastRow -
|
|
237
|
-
* @param columns -
|
|
238
|
-
* @param updateIntervalMs -
|
|
248
|
+
* The format string to apply to the value of this cell.
|
|
249
|
+
* @return String
|
|
239
250
|
*/
|
|
240
|
-
|
|
251
|
+
readonly formatString?:string|null;
|
|
241
252
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* @return Promise of {@link dh.TableData}
|
|
253
|
+
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
254
|
+
* @return String
|
|
245
255
|
*/
|
|
246
|
-
|
|
256
|
+
readonly backgroundColor?:string|null;
|
|
247
257
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* @param key -
|
|
251
|
-
* @return {@link dh.Column}
|
|
258
|
+
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
259
|
+
* @return String
|
|
252
260
|
*/
|
|
253
|
-
|
|
261
|
+
readonly color?:string|null;
|
|
254
262
|
/**
|
|
255
|
-
*
|
|
256
|
-
* @
|
|
257
|
-
* @return {@link dh.Column} array
|
|
263
|
+
*
|
|
264
|
+
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
258
265
|
*/
|
|
259
|
-
|
|
266
|
+
readonly numberFormat?:string|null;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
270
|
+
* columns) either by index, or scanning the complete present index.
|
|
271
|
+
* <p>
|
|
272
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
273
|
+
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
274
|
+
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
275
|
+
* options should be considered.
|
|
276
|
+
* <p>
|
|
277
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
278
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
279
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
280
|
+
* specific rows or cells out of the table.
|
|
281
|
+
*/
|
|
282
|
+
export interface SubscriptionTableData extends TableData {
|
|
283
|
+
get fullIndex():RangeSet;
|
|
260
284
|
/**
|
|
261
|
-
*
|
|
285
|
+
* The ordered set of row indexes removed since the last update
|
|
286
|
+
* @return the rangeset of removed rows
|
|
262
287
|
*/
|
|
263
|
-
|
|
264
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
265
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
266
|
-
nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<Event<T>>;
|
|
267
|
-
hasListeners(name:string):boolean;
|
|
268
|
-
/**
|
|
269
|
-
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
270
|
-
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
271
|
-
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
272
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
273
|
-
* not.
|
|
274
|
-
* @param sort -
|
|
275
|
-
* @return {@link dh.Sort} array
|
|
276
|
-
*/
|
|
277
|
-
applySort(sort:Sort[]):Array<Sort>;
|
|
278
|
-
/**
|
|
279
|
-
* Replace the current custom columns with a new set. These columns can be used when adding new filter and sort
|
|
280
|
-
* operations to the table, as long as they are present.
|
|
281
|
-
* @param customColumns -
|
|
282
|
-
* @return
|
|
283
|
-
*/
|
|
284
|
-
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
285
|
-
/**
|
|
286
|
-
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
287
|
-
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
288
|
-
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
289
|
-
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
290
|
-
* will not.
|
|
291
|
-
* @param filter -
|
|
292
|
-
* @return {@link dh.FilterCondition} array
|
|
293
|
-
*/
|
|
294
|
-
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
295
|
-
/**
|
|
296
|
-
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
297
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
298
|
-
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
299
|
-
* @return {@link dh.FilterCondition} array
|
|
300
|
-
*/
|
|
301
|
-
get filter():Array<FilterCondition>;
|
|
302
|
-
/**
|
|
303
|
-
* True if this table has been closed.
|
|
304
|
-
* @return boolean
|
|
305
|
-
*/
|
|
306
|
-
get isClosed():boolean;
|
|
307
|
-
/**
|
|
308
|
-
* The total number of rows in this table. This may change as the base table's configuration, filter, or contents
|
|
309
|
-
* change.
|
|
310
|
-
* @return double
|
|
311
|
-
*/
|
|
312
|
-
get size():number;
|
|
313
|
-
/**
|
|
314
|
-
* The columns present on this table. Note that this may not include all columns in the parent table, and in cases
|
|
315
|
-
* where a given column has more than one aggregation applied, the column name will have a suffix indicating the
|
|
316
|
-
* aggregation used. This suffixed name will be of the form <b>columnName + '__' + aggregationName</b>.
|
|
317
|
-
* @return {@link dh.Column} array
|
|
318
|
-
*/
|
|
319
|
-
get columns():Array<Column>;
|
|
320
|
-
get totalsTableConfig():TotalsTableConfig;
|
|
321
|
-
/**
|
|
322
|
-
* An ordered list of Sorts to apply to the table. To update, call applySort(). Note that this getter will return
|
|
323
|
-
* the new value immediately, even though it may take a little time to update on the server. You may listen for the
|
|
324
|
-
* <b>sortchanged</b> event to know when to update the UI.
|
|
325
|
-
* @return {@link dh.Sort} array
|
|
326
|
-
*/
|
|
327
|
-
get sort():Array<Sort>;
|
|
328
|
-
/**
|
|
329
|
-
* Read-only. An ordered list of custom column formulas to add to the table, either adding new columns or replacing
|
|
330
|
-
* existing ones. To update, call <b>applyCustomColumns()</b>.
|
|
331
|
-
* @return {@link dh.CustomColumn} array
|
|
332
|
-
*/
|
|
333
|
-
get customColumns():Array<CustomColumn>;
|
|
334
|
-
/**
|
|
335
|
-
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
336
|
-
* initial snapshot.
|
|
337
|
-
* @return boolean
|
|
338
|
-
*/
|
|
339
|
-
get isRefreshing():boolean;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
343
|
-
* request the viewport again.
|
|
344
|
-
*/
|
|
345
|
-
export interface ViewportRow extends Row {
|
|
346
|
-
get(column:Column):any;
|
|
347
|
-
getFormat(column:Column):Format;
|
|
348
|
-
get index():LongWrapper;
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
352
|
-
*/
|
|
353
|
-
export interface LocalTimeWrapper {
|
|
354
|
-
valueOf():string;
|
|
355
|
-
getHour():number;
|
|
356
|
-
getMinute():number;
|
|
357
|
-
getSecond():number;
|
|
358
|
-
getNano():number;
|
|
359
|
-
toString():string;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
363
|
-
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
364
|
-
* are correctly freed.
|
|
365
|
-
*/
|
|
366
|
-
export interface WidgetExportedObject {
|
|
367
|
-
/**
|
|
368
|
-
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
369
|
-
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
370
|
-
* {@link Widget.sendMessage}.
|
|
371
|
-
* @return the string type of this server-side object, or null.
|
|
372
|
-
*/
|
|
373
|
-
readonly type?:string|null;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
377
|
-
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
378
|
-
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
379
|
-
*/
|
|
380
|
-
reexport():Promise<WidgetExportedObject>;
|
|
381
|
-
/**
|
|
382
|
-
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
383
|
-
* the same instance.
|
|
384
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
385
|
-
*/
|
|
386
|
-
fetch():Promise<any>;
|
|
387
|
-
/**
|
|
388
|
-
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
389
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
390
|
-
*/
|
|
391
|
-
close():void;
|
|
392
|
-
}
|
|
393
|
-
export interface ColumnGroup {
|
|
394
|
-
get name():string|null;
|
|
395
|
-
get children():string[]|null;
|
|
396
|
-
get color():string|null;
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
400
|
-
* details about the event.
|
|
401
|
-
* @typeParam T - the type of the event detail
|
|
402
|
-
*/
|
|
403
|
-
export interface Event<T> {
|
|
404
|
-
get detail():T;
|
|
405
|
-
get type():string;
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
409
|
-
* columns) either by index, or scanning the complete present index.
|
|
410
|
-
* <p>
|
|
411
|
-
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
412
|
-
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
413
|
-
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
414
|
-
* options should be considered.
|
|
415
|
-
* <p>
|
|
416
|
-
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
417
|
-
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
418
|
-
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
419
|
-
* specific rows or cells out of the table.
|
|
420
|
-
*/
|
|
421
|
-
export interface SubscriptionTableData extends TableData {
|
|
422
|
-
get fullIndex():RangeSet;
|
|
423
|
-
/**
|
|
424
|
-
* The ordered set of row indexes removed since the last update
|
|
425
|
-
* @return the rangeset of removed rows
|
|
426
|
-
*/
|
|
427
|
-
get removed():RangeSet;
|
|
288
|
+
get removed():RangeSet;
|
|
428
289
|
/**
|
|
429
290
|
* The ordered set of row indexes added since the last update.
|
|
430
291
|
* @return the rangeset of rows added
|
|
@@ -441,88 +302,10 @@ export namespace dh {
|
|
|
441
302
|
*/
|
|
442
303
|
get rows():Array<Row>;
|
|
443
304
|
}
|
|
444
|
-
/**
|
|
445
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
446
|
-
*/
|
|
447
|
-
export interface Format {
|
|
448
|
-
/**
|
|
449
|
-
* The format string to apply to the value of this cell.
|
|
450
|
-
* @return String
|
|
451
|
-
*/
|
|
452
|
-
readonly formatString?:string|null;
|
|
453
|
-
/**
|
|
454
|
-
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
455
|
-
* @return String
|
|
456
|
-
*/
|
|
457
|
-
readonly backgroundColor?:string|null;
|
|
458
|
-
/**
|
|
459
|
-
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
460
|
-
* @return String
|
|
461
|
-
*/
|
|
462
|
-
readonly color?:string|null;
|
|
463
|
-
/**
|
|
464
|
-
*
|
|
465
|
-
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
466
|
-
*/
|
|
467
|
-
readonly numberFormat?:string|null;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
471
|
-
* with additional properties to reflect the tree structure.
|
|
472
|
-
*/
|
|
473
|
-
export interface TreeRow extends Row {
|
|
474
|
-
get(column:Column):any;
|
|
475
|
-
getFormat(column:Column):Format;
|
|
476
|
-
/**
|
|
477
|
-
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
478
|
-
* rows below this one with a greater depth than this one.
|
|
479
|
-
* @return boolean
|
|
480
|
-
*/
|
|
481
|
-
get isExpanded():boolean;
|
|
482
|
-
/**
|
|
483
|
-
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
|
|
484
|
-
* and its expand/collapse icon.
|
|
485
|
-
* @return int
|
|
486
|
-
*/
|
|
487
|
-
get depth():number;
|
|
488
|
-
/**
|
|
489
|
-
* True if this node has children and can be expanded; false otherwise. Note that this value may change when the
|
|
490
|
-
* table updates, depending on the table's configuration.
|
|
491
|
-
* @return boolean
|
|
492
|
-
*/
|
|
493
|
-
get hasChildren():boolean;
|
|
494
|
-
get index():LongWrapper;
|
|
495
|
-
}
|
|
496
305
|
export interface RefreshToken {
|
|
497
306
|
get bytes():string;
|
|
498
307
|
get expiry():number;
|
|
499
308
|
}
|
|
500
|
-
export interface LayoutHints {
|
|
501
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
502
|
-
|
|
503
|
-
get hiddenColumns():string[]|null;
|
|
504
|
-
get frozenColumns():string[]|null;
|
|
505
|
-
get columnGroups():ColumnGroup[]|null;
|
|
506
|
-
get areSavedLayoutsAllowed():boolean;
|
|
507
|
-
get frontColumns():string[]|null;
|
|
508
|
-
get backColumns():string[]|null;
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
* Similar to {@link dh.ViewportData}, but with additional properties to reflect
|
|
512
|
-
* the tree structure.
|
|
513
|
-
*/
|
|
514
|
-
export interface TreeViewportData extends TableData {
|
|
515
|
-
get(index:LongWrapper|number):TreeRow;
|
|
516
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
517
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
518
|
-
get treeSize():number;
|
|
519
|
-
/**
|
|
520
|
-
* The position of the first returned row within the tree.
|
|
521
|
-
*/
|
|
522
|
-
get offset():number;
|
|
523
|
-
get columns():Array<Column>;
|
|
524
|
-
get rows():Array<TreeRow>;
|
|
525
|
-
}
|
|
526
309
|
/**
|
|
527
310
|
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
528
311
|
* {@link dh.TotalsTable}.
|
|
@@ -613,554 +396,476 @@ export namespace dh {
|
|
|
613
396
|
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
614
397
|
}
|
|
615
398
|
/**
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
* <p>
|
|
619
|
-
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
620
|
-
* <p>
|
|
621
|
-
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
622
|
-
* scrolling without going to the server.
|
|
399
|
+
* Similar to {@link dh.ViewportData}, but with additional properties to reflect
|
|
400
|
+
* the tree structure.
|
|
623
401
|
*/
|
|
624
|
-
export interface
|
|
625
|
-
|
|
626
|
-
* Reads a row object from the viewport, based on its position in the table.
|
|
627
|
-
*/
|
|
628
|
-
get(index:LongWrapper|number):ViewportRow;
|
|
402
|
+
export interface TreeViewportData extends TableData {
|
|
403
|
+
get(index:LongWrapper|number):TreeRow;
|
|
629
404
|
getData(index:LongWrapper|number, column:Column):any;
|
|
630
405
|
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
406
|
+
get treeSize():number;
|
|
631
407
|
/**
|
|
632
|
-
* The position of the first returned row within the
|
|
408
|
+
* The position of the first returned row within the tree.
|
|
633
409
|
*/
|
|
634
410
|
get offset():number;
|
|
635
411
|
get columns():Array<Column>;
|
|
636
|
-
get rows():Array<
|
|
637
|
-
}
|
|
638
|
-
export interface WorkerHeapInfo {
|
|
639
|
-
/**
|
|
640
|
-
* Total heap size available for this worker.
|
|
641
|
-
*/
|
|
642
|
-
get totalHeapSize():number;
|
|
643
|
-
get freeMemory():number;
|
|
644
|
-
get maximumHeapSize():number;
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
648
|
-
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
649
|
-
* event, or re-request the viewport data.
|
|
650
|
-
*/
|
|
651
|
-
export interface Row {
|
|
652
|
-
get(column:Column):any;
|
|
653
|
-
getFormat(column:Column):Format;
|
|
654
|
-
get index():LongWrapper;
|
|
412
|
+
get rows():Array<TreeRow>;
|
|
655
413
|
}
|
|
656
414
|
/**
|
|
657
|
-
* Represents
|
|
415
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
416
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
417
|
+
* are correctly freed.
|
|
658
418
|
*/
|
|
659
|
-
export interface
|
|
419
|
+
export interface WidgetExportedObject {
|
|
660
420
|
/**
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* @
|
|
665
|
-
* @return String
|
|
421
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
422
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
423
|
+
* {@link Widget.sendMessage}.
|
|
424
|
+
* @return the string type of this server-side object, or null.
|
|
666
425
|
*/
|
|
667
|
-
|
|
426
|
+
readonly type?:string|null;
|
|
427
|
+
|
|
668
428
|
/**
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
* @return Map of String double
|
|
429
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
430
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
431
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
673
432
|
*/
|
|
674
|
-
|
|
433
|
+
reexport():Promise<WidgetExportedObject>;
|
|
675
434
|
/**
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
* @return Map of String and Object
|
|
435
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
436
|
+
* the same instance.
|
|
437
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
680
438
|
*/
|
|
681
|
-
|
|
439
|
+
fetch():Promise<any>;
|
|
440
|
+
/**
|
|
441
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
442
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
443
|
+
*/
|
|
444
|
+
close():void;
|
|
682
445
|
}
|
|
446
|
+
export interface LayoutHints {
|
|
447
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
683
448
|
|
|
449
|
+
get hiddenColumns():string[]|null;
|
|
450
|
+
get frozenColumns():string[]|null;
|
|
451
|
+
get columnGroups():ColumnGroup[]|null;
|
|
452
|
+
get areSavedLayoutsAllowed():boolean;
|
|
453
|
+
get frontColumns():string[]|null;
|
|
454
|
+
get backColumns():string[]|null;
|
|
455
|
+
}
|
|
684
456
|
/**
|
|
685
|
-
*
|
|
686
|
-
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
687
|
-
* methods return a new Sort instance.
|
|
457
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
688
458
|
*/
|
|
689
|
-
export
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* Builds a Sort instance to sort values in ascending order.
|
|
698
|
-
* @return {@link dh.Sort}
|
|
699
|
-
*/
|
|
700
|
-
asc():Sort;
|
|
701
|
-
/**
|
|
702
|
-
* Builds a Sort instance to sort values in descending order.
|
|
703
|
-
* @return {@link dh.Sort}
|
|
704
|
-
*/
|
|
705
|
-
desc():Sort;
|
|
706
|
-
/**
|
|
707
|
-
* Builds a Sort instance which takes the absolute value before applying order.
|
|
708
|
-
* @return {@link dh.Sort}
|
|
709
|
-
*/
|
|
710
|
-
abs():Sort;
|
|
459
|
+
export interface LocalTimeWrapper {
|
|
460
|
+
valueOf():string;
|
|
461
|
+
getHour():number;
|
|
462
|
+
getMinute():number;
|
|
463
|
+
getSecond():number;
|
|
464
|
+
getNano():number;
|
|
711
465
|
toString():string;
|
|
712
|
-
/**
|
|
713
|
-
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
714
|
-
* @return boolean
|
|
715
|
-
*/
|
|
716
|
-
get isAbs():boolean;
|
|
717
|
-
/**
|
|
718
|
-
* The column which is sorted.
|
|
719
|
-
* @return {@link dh.Column}
|
|
720
|
-
*/
|
|
721
|
-
get column():Column;
|
|
722
|
-
/**
|
|
723
|
-
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
724
|
-
* @return String
|
|
725
|
-
*/
|
|
726
|
-
get direction():string;
|
|
727
466
|
}
|
|
728
|
-
|
|
729
467
|
/**
|
|
730
|
-
*
|
|
731
|
-
*
|
|
468
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
469
|
+
* request the viewport again.
|
|
732
470
|
*/
|
|
733
|
-
export
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
static readonly HACK_CONNECTION_FAILURE:string;
|
|
738
|
-
static readonly EVENT_DISCONNECT:string;
|
|
739
|
-
static readonly EVENT_RECONNECT:string;
|
|
740
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
741
|
-
|
|
742
|
-
protected constructor();
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* Closes the current connection, releasing any resources on the server or client.
|
|
746
|
-
*/
|
|
747
|
-
close():void;
|
|
748
|
-
running():Promise<IdeConnection>;
|
|
749
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
750
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
751
|
-
/**
|
|
752
|
-
* Makes an `object` available to another user or another client on this same server which knows the value of
|
|
753
|
-
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
754
|
-
* which knows this value can read the same object.
|
|
755
|
-
* <p>
|
|
756
|
-
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
757
|
-
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
758
|
-
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
759
|
-
* <p>
|
|
760
|
-
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
761
|
-
* prevent access by unauthorized clients.
|
|
762
|
-
* @param object - the object to share with another client/user
|
|
763
|
-
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
764
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
765
|
-
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
766
|
-
* by another client, or will reject if an error occurs.
|
|
767
|
-
*/
|
|
768
|
-
shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
|
|
769
|
-
/**
|
|
770
|
-
* Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
|
|
771
|
-
* client releases this object (or their session ends), the object will be available on the server.
|
|
772
|
-
* <p>
|
|
773
|
-
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
774
|
-
* should provide this information.
|
|
775
|
-
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
776
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
777
|
-
* @param type - The type of the object, so it can be correctly read from the server
|
|
778
|
-
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
779
|
-
*/
|
|
780
|
-
getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
|
|
781
|
-
/**
|
|
782
|
-
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
783
|
-
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
784
|
-
* log messages as are presently available.
|
|
785
|
-
* @param callback -
|
|
786
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
787
|
-
*/
|
|
788
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
789
|
-
startSession(type:string):Promise<IdeSession>;
|
|
790
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
791
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
792
|
-
/**
|
|
793
|
-
* Listen for events on this object.
|
|
794
|
-
* @param name - the name of the event to listen for
|
|
795
|
-
* @param callback - a function to call when the event occurs
|
|
796
|
-
* @return Returns a cleanup function.
|
|
797
|
-
* @typeParam T - the type of the data that the event will provide
|
|
798
|
-
*/
|
|
799
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
800
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
801
|
-
hasListeners(name:string):boolean;
|
|
802
|
-
/**
|
|
803
|
-
* Removes an event listener added to this table.
|
|
804
|
-
* @param name -
|
|
805
|
-
* @param callback -
|
|
806
|
-
* @return
|
|
807
|
-
* @typeParam T -
|
|
808
|
-
*/
|
|
809
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
471
|
+
export interface ViewportRow extends Row {
|
|
472
|
+
get(column:Column):any;
|
|
473
|
+
getFormat(column:Column):Format;
|
|
474
|
+
get index():LongWrapper;
|
|
810
475
|
}
|
|
811
|
-
|
|
812
476
|
/**
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
816
|
-
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
817
|
-
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
477
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
818
478
|
*/
|
|
819
|
-
export
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
* The column representing the parent ID for each item
|
|
826
|
-
*/
|
|
827
|
-
parentColumn:string;
|
|
828
|
-
/**
|
|
829
|
-
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
830
|
-
*/
|
|
831
|
-
promoteOrphansToRoot:boolean;
|
|
832
|
-
|
|
833
|
-
constructor();
|
|
479
|
+
export interface LocalDateWrapper {
|
|
480
|
+
valueOf():string;
|
|
481
|
+
getYear():number;
|
|
482
|
+
getMonthValue():number;
|
|
483
|
+
getDayOfMonth():number;
|
|
484
|
+
toString():string;
|
|
834
485
|
}
|
|
835
|
-
|
|
836
486
|
/**
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
487
|
+
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
488
|
+
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
489
|
+
* event, or re-request the viewport data.
|
|
840
490
|
*/
|
|
841
|
-
export
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
491
|
+
export interface Row {
|
|
492
|
+
get(column:Column):any;
|
|
493
|
+
getFormat(column:Column):Format;
|
|
494
|
+
get index():LongWrapper;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
498
|
+
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
499
|
+
*
|
|
500
|
+
* Additionally, this is automatically subscribed to its one and only row, across all columns.
|
|
501
|
+
*
|
|
502
|
+
* A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
|
|
503
|
+
* template when fetching a new totals table, or changing the totals table in use.
|
|
504
|
+
*
|
|
505
|
+
* A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
|
|
506
|
+
* automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
|
|
507
|
+
* found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
|
|
508
|
+
* potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
|
|
509
|
+
*
|
|
510
|
+
* When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
|
|
511
|
+
* rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
|
|
512
|
+
*/
|
|
513
|
+
export interface TotalsTable extends JoinableTable {
|
|
849
514
|
/**
|
|
850
|
-
*
|
|
515
|
+
* Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
|
|
516
|
+
* provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
|
|
517
|
+
* events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
|
|
518
|
+
* event per row in that range.
|
|
519
|
+
* @param firstRow -
|
|
520
|
+
* @param lastRow -
|
|
521
|
+
* @param columns -
|
|
522
|
+
* @param updateIntervalMs -
|
|
851
523
|
*/
|
|
852
|
-
|
|
524
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
|
|
853
525
|
/**
|
|
854
|
-
*
|
|
526
|
+
* the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
527
|
+
* resolve until that data is ready.
|
|
528
|
+
* @return Promise of {@link dh.TableData}
|
|
855
529
|
*/
|
|
856
|
-
|
|
530
|
+
getViewportData():Promise<ViewportData>;
|
|
857
531
|
/**
|
|
858
|
-
*
|
|
532
|
+
* a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
|
|
533
|
+
* returned value.
|
|
534
|
+
* @param key -
|
|
535
|
+
* @return {@link dh.Column}
|
|
859
536
|
*/
|
|
860
|
-
|
|
537
|
+
findColumn(key:string):Column;
|
|
861
538
|
/**
|
|
862
|
-
*
|
|
539
|
+
* multiple columns specified by the given names.
|
|
540
|
+
* @param keys -
|
|
541
|
+
* @return {@link dh.Column} array
|
|
863
542
|
*/
|
|
864
|
-
|
|
543
|
+
findColumns(keys:string[]):Column[];
|
|
865
544
|
/**
|
|
866
|
-
*
|
|
545
|
+
* Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
|
|
867
546
|
*/
|
|
868
|
-
|
|
547
|
+
close():void;
|
|
548
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
549
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
550
|
+
nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<Event<T>>;
|
|
551
|
+
hasListeners(name:string):boolean;
|
|
869
552
|
/**
|
|
870
|
-
*
|
|
553
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
554
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
555
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
556
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
557
|
+
* not.
|
|
558
|
+
* @param sort -
|
|
559
|
+
* @return {@link dh.Sort} array
|
|
871
560
|
*/
|
|
872
|
-
|
|
561
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
873
562
|
/**
|
|
874
|
-
*
|
|
563
|
+
* Replace the current custom columns with a new set. These columns can be used when adding new filter and sort
|
|
564
|
+
* operations to the table, as long as they are present.
|
|
565
|
+
* @param customColumns -
|
|
566
|
+
* @return
|
|
875
567
|
*/
|
|
876
|
-
|
|
568
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
877
569
|
/**
|
|
878
|
-
*
|
|
570
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
571
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
572
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
573
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
574
|
+
* will not.
|
|
575
|
+
* @param filter -
|
|
576
|
+
* @return {@link dh.FilterCondition} array
|
|
879
577
|
*/
|
|
880
|
-
|
|
578
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
881
579
|
/**
|
|
882
|
-
*
|
|
580
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
581
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
582
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
583
|
+
* @return {@link dh.FilterCondition} array
|
|
883
584
|
*/
|
|
884
|
-
|
|
585
|
+
get filter():Array<FilterCondition>;
|
|
885
586
|
/**
|
|
886
|
-
*
|
|
587
|
+
* True if this table has been closed.
|
|
588
|
+
* @return boolean
|
|
887
589
|
*/
|
|
888
|
-
|
|
590
|
+
get isClosed():boolean;
|
|
889
591
|
/**
|
|
890
|
-
* The
|
|
592
|
+
* The total number of rows in this table. This may change as the base table's configuration, filter, or contents
|
|
593
|
+
* change.
|
|
594
|
+
* @return double
|
|
891
595
|
*/
|
|
892
|
-
|
|
596
|
+
get size():number;
|
|
893
597
|
/**
|
|
894
|
-
* The table
|
|
598
|
+
* The columns present on this table. Note that this may not include all columns in the parent table, and in cases
|
|
599
|
+
* where a given column has more than one aggregation applied, the column name will have a suffix indicating the
|
|
600
|
+
* aggregation used. This suffixed name will be of the form <b>columnName + '__' + aggregationName</b>.
|
|
601
|
+
* @return {@link dh.Column} array
|
|
895
602
|
*/
|
|
896
|
-
|
|
603
|
+
get columns():Array<Column>;
|
|
604
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
897
605
|
/**
|
|
898
|
-
*
|
|
606
|
+
* An ordered list of Sorts to apply to the table. To update, call applySort(). Note that this getter will return
|
|
607
|
+
* the new value immediately, even though it may take a little time to update on the server. You may listen for the
|
|
608
|
+
* <b>sortchanged</b> event to know when to update the UI.
|
|
609
|
+
* @return {@link dh.Sort} array
|
|
899
610
|
*/
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
protected constructor();
|
|
903
|
-
|
|
904
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
611
|
+
get sort():Array<Sort>;
|
|
905
612
|
/**
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
* @
|
|
909
|
-
* @return {@link dh.Column}
|
|
613
|
+
* Read-only. An ordered list of custom column formulas to add to the table, either adding new columns or replacing
|
|
614
|
+
* existing ones. To update, call <b>applyCustomColumns()</b>.
|
|
615
|
+
* @return {@link dh.CustomColumn} array
|
|
910
616
|
*/
|
|
911
|
-
|
|
617
|
+
get customColumns():Array<CustomColumn>;
|
|
912
618
|
/**
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
* @return
|
|
619
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
620
|
+
* initial snapshot.
|
|
621
|
+
* @return boolean
|
|
916
622
|
*/
|
|
917
|
-
|
|
918
|
-
|
|
623
|
+
get isRefreshing():boolean;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
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}.
|
|
632
|
+
*/
|
|
633
|
+
export interface TableData {
|
|
919
634
|
/**
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
* @return
|
|
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
|
|
923
638
|
*/
|
|
924
|
-
|
|
639
|
+
get(index:LongWrapper|number):Row;
|
|
925
640
|
/**
|
|
926
|
-
*
|
|
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
|
|
927
645
|
*/
|
|
928
|
-
|
|
929
|
-
getAttributes():string[];
|
|
646
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
930
647
|
/**
|
|
931
|
-
*
|
|
932
|
-
*
|
|
933
|
-
* @param
|
|
934
|
-
* @return
|
|
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
|
|
935
652
|
*/
|
|
936
|
-
|
|
653
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
654
|
+
get columns():Array<Column>;
|
|
937
655
|
/**
|
|
938
|
-
*
|
|
939
|
-
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
940
|
-
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
941
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
942
|
-
* not.
|
|
943
|
-
* @param sort -
|
|
944
|
-
* @return {@link dh.Sort} array
|
|
656
|
+
* A lazily computed array of all rows available on the client.
|
|
945
657
|
*/
|
|
946
|
-
|
|
658
|
+
get rows():Array<Row>;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
|
|
662
|
+
* ViewportData also contains the offset to this data, so that the actual row number may be determined.
|
|
663
|
+
* <p>
|
|
664
|
+
* For viewport subscriptions, it is not necessary to read with the key, only with the position.
|
|
665
|
+
* <p>
|
|
666
|
+
* Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
|
|
667
|
+
* scrolling without going to the server.
|
|
668
|
+
*/
|
|
669
|
+
export interface ViewportData extends TableData {
|
|
947
670
|
/**
|
|
948
|
-
*
|
|
949
|
-
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
950
|
-
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
951
|
-
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
952
|
-
* will not.
|
|
953
|
-
* @param filter -
|
|
954
|
-
* @return {@link dh.FilterCondition} array
|
|
671
|
+
* Reads a row object from the viewport, based on its position in the table.
|
|
955
672
|
*/
|
|
956
|
-
|
|
673
|
+
get(index:LongWrapper|number):ViewportRow;
|
|
674
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
675
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
957
676
|
/**
|
|
958
|
-
*
|
|
959
|
-
* @param customColumns -
|
|
960
|
-
* @return {@link dh.CustomColumn} array
|
|
677
|
+
* The position of the first returned row within the table.
|
|
961
678
|
*/
|
|
962
|
-
|
|
679
|
+
get offset():number;
|
|
680
|
+
get columns():Array<Column>;
|
|
681
|
+
get rows():Array<ViewportRow>;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
686
|
+
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
687
|
+
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
688
|
+
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
689
|
+
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
690
|
+
*/
|
|
691
|
+
export class TableViewportSubscription implements HasEventHandling {
|
|
692
|
+
protected constructor();
|
|
693
|
+
|
|
963
694
|
/**
|
|
964
|
-
*
|
|
965
|
-
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
966
|
-
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
967
|
-
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
968
|
-
* needed.
|
|
695
|
+
* Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
|
|
969
696
|
* @param firstRow -
|
|
970
697
|
* @param lastRow -
|
|
971
698
|
* @param columns -
|
|
972
699
|
* @param updateIntervalMs -
|
|
973
|
-
* @return {@link dh.TableViewportSubscription}
|
|
974
|
-
*/
|
|
975
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
976
|
-
/**
|
|
977
|
-
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
978
|
-
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
979
|
-
* separate the lifespan of this promise from the table itself, call
|
|
980
|
-
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
981
|
-
* @return Promise of {@link dh.TableData}
|
|
982
700
|
*/
|
|
983
|
-
|
|
701
|
+
setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
|
|
984
702
|
/**
|
|
985
|
-
*
|
|
986
|
-
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
987
|
-
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
988
|
-
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
989
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
990
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
991
|
-
* @param columns -
|
|
992
|
-
* @param updateIntervalMs -
|
|
993
|
-
* @return {@link dh.TableSubscription}
|
|
703
|
+
* Stops this viewport from running, stopping all events on itself and on the table that created it.
|
|
994
704
|
*/
|
|
995
|
-
|
|
705
|
+
close():void;
|
|
996
706
|
/**
|
|
997
|
-
*
|
|
998
|
-
*
|
|
999
|
-
* order of appearance of values from the original table.
|
|
1000
|
-
* @param columns -
|
|
1001
|
-
* @return Promise of dh.Table
|
|
707
|
+
* Gets the data currently visible in this viewport
|
|
708
|
+
* @return Promise of {@link dh.TableData}.
|
|
1002
709
|
*/
|
|
1003
|
-
|
|
710
|
+
getViewportData():Promise<ViewportData>;
|
|
711
|
+
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
1004
712
|
/**
|
|
1005
|
-
*
|
|
1006
|
-
* @
|
|
713
|
+
* Listen for events on this object.
|
|
714
|
+
* @param name - the name of the event to listen for
|
|
715
|
+
* @param callback - a function to call when the event occurs
|
|
716
|
+
* @return Returns a cleanup function.
|
|
717
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1007
718
|
*/
|
|
1008
|
-
|
|
719
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
720
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
721
|
+
hasListeners(name:string):boolean;
|
|
1009
722
|
/**
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1013
|
-
*
|
|
1014
|
-
* @
|
|
1015
|
-
* @return Promise of dh.TotalsTable
|
|
723
|
+
* Removes an event listener added to this table.
|
|
724
|
+
* @param name -
|
|
725
|
+
* @param callback -
|
|
726
|
+
* @return
|
|
727
|
+
* @typeParam T -
|
|
1016
728
|
*/
|
|
1017
|
-
|
|
729
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Options for custom columns.
|
|
734
|
+
*/
|
|
735
|
+
export class CustomColumnOptions {
|
|
1018
736
|
/**
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1021
|
-
* @param config -
|
|
1022
|
-
* @return promise of dh.TotalsTable
|
|
737
|
+
* When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
|
|
738
|
+
* nodes.
|
|
1023
739
|
*/
|
|
1024
|
-
|
|
740
|
+
rollupNodeType?:RollupNodeTypeType|null;
|
|
741
|
+
|
|
742
|
+
constructor();
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
747
|
+
*/
|
|
748
|
+
export class BigIntegerWrapper {
|
|
749
|
+
protected constructor();
|
|
750
|
+
|
|
751
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
752
|
+
asNumber():number;
|
|
753
|
+
valueOf():string;
|
|
754
|
+
toString():string;
|
|
755
|
+
equals(o:object):boolean;
|
|
756
|
+
hashCode():number;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
761
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
762
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
763
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
764
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
765
|
+
*
|
|
766
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
767
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
768
|
+
* expected formats.
|
|
769
|
+
*/
|
|
770
|
+
export class TotalsTableConfig {
|
|
1025
771
|
/**
|
|
1026
|
-
*
|
|
1027
|
-
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
1028
|
-
* @param configObject -
|
|
1029
|
-
* @return Promise of dh.TreeTable
|
|
772
|
+
* @deprecated
|
|
1030
773
|
*/
|
|
1031
|
-
|
|
774
|
+
static readonly COUNT:string;
|
|
1032
775
|
/**
|
|
1033
|
-
*
|
|
1034
|
-
* new `TreeTable` which must have close() called on it when not in use.
|
|
1035
|
-
* @param configObject -
|
|
1036
|
-
* @return Promise dh.TreeTable
|
|
776
|
+
* @deprecated
|
|
1037
777
|
*/
|
|
1038
|
-
|
|
778
|
+
static readonly MIN:string;
|
|
1039
779
|
/**
|
|
1040
|
-
*
|
|
1041
|
-
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1042
|
-
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1043
|
-
* @return Promise of dh.Table
|
|
780
|
+
* @deprecated
|
|
1044
781
|
*/
|
|
1045
|
-
|
|
1046
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
782
|
+
static readonly MAX:string;
|
|
1047
783
|
/**
|
|
1048
|
-
*
|
|
1049
|
-
* @inheritDoc
|
|
1050
784
|
* @deprecated
|
|
1051
785
|
*/
|
|
1052
|
-
|
|
1053
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1054
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1055
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1056
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1057
|
-
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
786
|
+
static readonly SUM:string;
|
|
1058
787
|
/**
|
|
1059
|
-
*
|
|
1060
|
-
* keys.
|
|
1061
|
-
* @param keys -
|
|
1062
|
-
* @param dropKeys -
|
|
1063
|
-
* @return Promise dh.PartitionedTable
|
|
788
|
+
* @deprecated
|
|
1064
789
|
*/
|
|
1065
|
-
|
|
790
|
+
static readonly ABS_SUM:string;
|
|
1066
791
|
/**
|
|
1067
|
-
*
|
|
1068
|
-
* @param column -
|
|
1069
|
-
* @return Promise of dh.ColumnStatistics
|
|
792
|
+
* @deprecated
|
|
1070
793
|
*/
|
|
1071
|
-
|
|
794
|
+
static readonly VAR:string;
|
|
1072
795
|
/**
|
|
1073
|
-
*
|
|
1074
|
-
* @param startingRow - Row to start the seek from
|
|
1075
|
-
* @param column - Column to seek for value on
|
|
1076
|
-
* @param valueType - Type of value provided
|
|
1077
|
-
* @param seekValue - Value to seek
|
|
1078
|
-
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1079
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1080
|
-
* `false`.
|
|
1081
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1082
|
-
* @return A promise that resolves to the row value found.
|
|
796
|
+
* @deprecated
|
|
1083
797
|
*/
|
|
1084
|
-
|
|
1085
|
-
toString():string;
|
|
798
|
+
static readonly AVG:string;
|
|
1086
799
|
/**
|
|
1087
|
-
*
|
|
1088
|
-
* .inputTable() to add or remove data from the underlying table.
|
|
1089
|
-
* @return boolean
|
|
800
|
+
* @deprecated
|
|
1090
801
|
*/
|
|
1091
|
-
|
|
802
|
+
static readonly STD:string;
|
|
1092
803
|
/**
|
|
1093
|
-
*
|
|
1094
|
-
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
1095
|
-
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
1096
|
-
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1097
|
-
* @return {@link dh.Column} array
|
|
804
|
+
* @deprecated
|
|
1098
805
|
*/
|
|
1099
|
-
|
|
806
|
+
static readonly FIRST:string;
|
|
1100
807
|
/**
|
|
1101
|
-
*
|
|
1102
|
-
* @return dh.TotalsTableConfig
|
|
808
|
+
* @deprecated
|
|
1103
809
|
*/
|
|
1104
|
-
|
|
810
|
+
static readonly LAST:string;
|
|
1105
811
|
/**
|
|
1106
|
-
*
|
|
1107
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1108
|
-
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
1109
|
-
* @return {@link dh.Sort} array
|
|
812
|
+
* @deprecated
|
|
1110
813
|
*/
|
|
1111
|
-
|
|
814
|
+
static readonly SKIP:string;
|
|
1112
815
|
/**
|
|
1113
|
-
*
|
|
1114
|
-
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
1115
|
-
* @return {@link dh.CustomColumn} array
|
|
816
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
1116
817
|
*/
|
|
1117
|
-
|
|
818
|
+
showTotalsByDefault:boolean;
|
|
1118
819
|
/**
|
|
1119
|
-
*
|
|
1120
|
-
* initial snapshot.
|
|
1121
|
-
* @return boolean
|
|
820
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
1122
821
|
*/
|
|
1123
|
-
|
|
822
|
+
showGrandTotalsByDefault:boolean;
|
|
1124
823
|
/**
|
|
1125
|
-
*
|
|
1126
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1127
|
-
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
1128
|
-
* @return {@link dh.FilterCondition} array
|
|
824
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
1129
825
|
*/
|
|
1130
|
-
|
|
826
|
+
defaultOperation:AggregationOperationType;
|
|
1131
827
|
/**
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1134
|
-
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
1135
|
-
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
828
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
829
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
1136
830
|
*/
|
|
1137
|
-
|
|
831
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
1138
832
|
/**
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
1142
|
-
* <p>
|
|
1143
|
-
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
1144
|
-
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
1145
|
-
* uncoalesced.
|
|
833
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
834
|
+
* these columns. See also `Table.selectDistinct`.
|
|
1146
835
|
*/
|
|
1147
|
-
|
|
836
|
+
groupBy:Array<string>;
|
|
837
|
+
|
|
838
|
+
constructor();
|
|
839
|
+
|
|
840
|
+
toString():string;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
845
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
846
|
+
*
|
|
847
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
848
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
849
|
+
* forward data to it.
|
|
850
|
+
*
|
|
851
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
852
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
853
|
+
* viewports to make it less expensive to compute for large tables.
|
|
854
|
+
*/
|
|
855
|
+
export class TableSubscription implements HasEventHandling {
|
|
856
|
+
protected constructor();
|
|
857
|
+
|
|
1148
858
|
/**
|
|
1149
|
-
*
|
|
1150
|
-
* @
|
|
859
|
+
* Updates the subscription to use the given columns and update interval.
|
|
860
|
+
* @param columns - the new columns to subscribe to
|
|
861
|
+
* @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
|
|
1151
862
|
*/
|
|
1152
|
-
|
|
863
|
+
changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
|
|
864
|
+
get columns():Array<Column>;
|
|
1153
865
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
* <p>
|
|
1156
|
-
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
1157
|
-
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
1158
|
-
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
1159
|
-
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
1160
|
-
* for those columns, use {@link Table.selectDistinct}.
|
|
1161
|
-
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
866
|
+
* Stops the subscription on the server.
|
|
1162
867
|
*/
|
|
1163
|
-
|
|
868
|
+
close():void;
|
|
1164
869
|
/**
|
|
1165
870
|
* Listen for events on this object.
|
|
1166
871
|
* @param name - the name of the event to listen for
|
|
@@ -1179,230 +884,321 @@ export namespace dh {
|
|
|
1179
884
|
* @typeParam T -
|
|
1180
885
|
*/
|
|
1181
886
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export class CoreClient implements HasEventHandling {
|
|
890
|
+
static readonly EVENT_CONNECT:string;
|
|
891
|
+
static readonly EVENT_DISCONNECT:string;
|
|
892
|
+
static readonly EVENT_RECONNECT:string;
|
|
893
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
894
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
895
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
896
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1182
897
|
/**
|
|
1183
|
-
*
|
|
1184
|
-
* do not support reverse.
|
|
1185
|
-
* @return {@link dh.Sort}
|
|
898
|
+
* @deprecated
|
|
1186
899
|
*/
|
|
1187
|
-
static
|
|
1188
|
-
|
|
900
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
901
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
902
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
903
|
+
|
|
904
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1189
905
|
|
|
906
|
+
running():Promise<CoreClient>;
|
|
907
|
+
getServerUrl():string;
|
|
908
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
909
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
910
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
911
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
912
|
+
getServerConfigValues():Promise<string[][]>;
|
|
913
|
+
getStorageService():dh.storage.StorageService;
|
|
914
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
915
|
+
disconnect():void;
|
|
916
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
917
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
918
|
+
hasListeners(name:string):boolean;
|
|
919
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
920
|
+
}
|
|
1190
921
|
|
|
1191
922
|
/**
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1194
|
-
* viewport without creating a new one, or listen directly to this object instead of the table for data events, and
|
|
1195
|
-
* always call `close()` when finished. Calling any method on this object other than close() will result in it
|
|
1196
|
-
* continuing to live on after `setViewport` is called on the original table, or after the table is modified.
|
|
923
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
924
|
+
* column.
|
|
1197
925
|
*/
|
|
1198
|
-
export class
|
|
926
|
+
export class Column {
|
|
927
|
+
/**
|
|
928
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
929
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
930
|
+
* @return String
|
|
931
|
+
*/
|
|
932
|
+
readonly constituentType?:string|null;
|
|
933
|
+
readonly description?:string|null;
|
|
934
|
+
|
|
1199
935
|
protected constructor();
|
|
1200
936
|
|
|
1201
937
|
/**
|
|
1202
|
-
*
|
|
1203
|
-
* @param
|
|
1204
|
-
* @
|
|
1205
|
-
* @param columns -
|
|
1206
|
-
* @param updateIntervalMs -
|
|
938
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
939
|
+
* @param row -
|
|
940
|
+
* @return Any
|
|
1207
941
|
*/
|
|
1208
|
-
|
|
942
|
+
get(row:Row):any;
|
|
943
|
+
getFormat(row:Row):Format;
|
|
1209
944
|
/**
|
|
1210
|
-
*
|
|
945
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
946
|
+
* @return {@link dh.Sort}
|
|
1211
947
|
*/
|
|
1212
|
-
|
|
948
|
+
sort():Sort;
|
|
1213
949
|
/**
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
950
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
951
|
+
* operation, or as a builder to create a filter operation.
|
|
952
|
+
* @return {@link dh.FilterValue}
|
|
1216
953
|
*/
|
|
1217
|
-
|
|
1218
|
-
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
954
|
+
filter():FilterValue;
|
|
1219
955
|
/**
|
|
1220
|
-
*
|
|
1221
|
-
* @param
|
|
1222
|
-
* @
|
|
1223
|
-
* @return Returns a cleanup function.
|
|
1224
|
-
* @typeParam T - the type of the data that the event will provide
|
|
956
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
957
|
+
* @param expression -
|
|
958
|
+
* @return {@link dh.CustomColumn}
|
|
1225
959
|
*/
|
|
1226
|
-
|
|
1227
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1228
|
-
hasListeners(name:string):boolean;
|
|
960
|
+
formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1229
961
|
/**
|
|
1230
|
-
*
|
|
962
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
963
|
+
* @param expression -
|
|
964
|
+
* @return {@link dh.CustomColumn}
|
|
965
|
+
*/
|
|
966
|
+
formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
967
|
+
/**
|
|
968
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
969
|
+
* @param expression -
|
|
970
|
+
* @return {@link dh.CustomColumn}
|
|
971
|
+
*/
|
|
972
|
+
formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
973
|
+
toString():string;
|
|
974
|
+
/**
|
|
975
|
+
* Label for this column.
|
|
976
|
+
* @return String
|
|
977
|
+
*/
|
|
978
|
+
get name():string;
|
|
979
|
+
/**
|
|
980
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
981
|
+
* {@link Table.uncoalesced}.
|
|
982
|
+
* @return true if the column is a partition column
|
|
983
|
+
*/
|
|
984
|
+
get isPartitionColumn():boolean;
|
|
985
|
+
/**
|
|
986
|
+
*
|
|
987
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
988
|
+
* @return int
|
|
989
|
+
*/
|
|
990
|
+
get index():number;
|
|
991
|
+
get isSortable():boolean;
|
|
992
|
+
/**
|
|
993
|
+
* Type of the row data that can be found in this column.
|
|
994
|
+
* @return String
|
|
995
|
+
*/
|
|
996
|
+
get type():string;
|
|
997
|
+
/**
|
|
998
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
999
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1000
|
+
* @param expression -
|
|
1001
|
+
* @param options -
|
|
1002
|
+
* @return {@link dh.CustomColumn}
|
|
1003
|
+
*/
|
|
1004
|
+
static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1005
|
+
/**
|
|
1006
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1231
1007
|
* @param name -
|
|
1232
|
-
* @param
|
|
1233
|
-
* @
|
|
1234
|
-
* @
|
|
1008
|
+
* @param expression -
|
|
1009
|
+
* @param options -
|
|
1010
|
+
* @return {@link dh.CustomColumn}
|
|
1235
1011
|
*/
|
|
1236
|
-
|
|
1012
|
+
static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
1237
1013
|
}
|
|
1238
1014
|
|
|
1239
1015
|
/**
|
|
1240
|
-
*
|
|
1241
|
-
*
|
|
1016
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1017
|
+
* this type TableMap.
|
|
1018
|
+
* @deprecated
|
|
1242
1019
|
*/
|
|
1243
|
-
export class
|
|
1020
|
+
export class TableMap {
|
|
1021
|
+
static readonly EVENT_KEYADDED:string;
|
|
1022
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1023
|
+
static readonly EVENT_RECONNECT:string;
|
|
1024
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1025
|
+
|
|
1026
|
+
protected constructor();
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1031
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1032
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1033
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1034
|
+
* instance.
|
|
1035
|
+
*/
|
|
1036
|
+
export class FilterValue {
|
|
1037
|
+
protected constructor();
|
|
1038
|
+
|
|
1244
1039
|
/**
|
|
1245
|
-
*
|
|
1040
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
1041
|
+
* {@link TableData.get} for DateTime values. To create
|
|
1042
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1043
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1044
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1045
|
+
* @param input - the number to wrap as a FilterValue
|
|
1046
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
1246
1047
|
*/
|
|
1247
|
-
static
|
|
1048
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1248
1049
|
/**
|
|
1249
|
-
*
|
|
1050
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
1051
|
+
* @param term -
|
|
1052
|
+
* @return {@link dh.FilterCondition}
|
|
1250
1053
|
*/
|
|
1251
|
-
|
|
1054
|
+
eq(term:FilterValue):FilterCondition;
|
|
1252
1055
|
/**
|
|
1253
|
-
*
|
|
1056
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1057
|
+
* vs lower case
|
|
1058
|
+
* @param term -
|
|
1059
|
+
* @return {@link dh.FilterCondition}
|
|
1254
1060
|
*/
|
|
1255
|
-
|
|
1061
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1256
1062
|
/**
|
|
1257
|
-
*
|
|
1063
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
1064
|
+
* @param term -
|
|
1065
|
+
* @return {@link dh.FilterCondition}
|
|
1258
1066
|
*/
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
protected constructor();
|
|
1262
|
-
|
|
1067
|
+
notEq(term:FilterValue):FilterCondition;
|
|
1263
1068
|
/**
|
|
1264
|
-
*
|
|
1265
|
-
*
|
|
1266
|
-
* @
|
|
1069
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1070
|
+
* upper vs lower case
|
|
1071
|
+
* @param term -
|
|
1072
|
+
* @return {@link dh.FilterCondition}
|
|
1267
1073
|
*/
|
|
1268
|
-
|
|
1074
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1269
1075
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
* @return
|
|
1076
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1077
|
+
* @param term -
|
|
1078
|
+
* @return {@link dh.FilterCondition}
|
|
1273
1079
|
*/
|
|
1274
|
-
|
|
1080
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
1275
1081
|
/**
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
* @return
|
|
1082
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1083
|
+
* @param term -
|
|
1084
|
+
* @return {@link dh.FilterCondition}
|
|
1279
1085
|
*/
|
|
1280
|
-
|
|
1086
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
1281
1087
|
/**
|
|
1282
|
-
*
|
|
1283
|
-
* @
|
|
1284
|
-
* @
|
|
1088
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1089
|
+
* @param term -
|
|
1090
|
+
* @return {@link dh.FilterCondition}
|
|
1285
1091
|
*/
|
|
1286
|
-
|
|
1092
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1287
1093
|
/**
|
|
1288
|
-
*
|
|
1289
|
-
* @
|
|
1094
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1095
|
+
* @param term -
|
|
1096
|
+
* @return {@link dh.FilterCondition}
|
|
1097
|
+
*/
|
|
1098
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1099
|
+
/**
|
|
1100
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1101
|
+
* @param terms -
|
|
1102
|
+
* @return {@link dh.FilterCondition}
|
|
1290
1103
|
*/
|
|
1291
|
-
|
|
1104
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
1292
1105
|
/**
|
|
1293
|
-
*
|
|
1294
|
-
*
|
|
1106
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1107
|
+
* lower case
|
|
1108
|
+
* @param terms -
|
|
1109
|
+
* @return {@link dh.FilterCondition}
|
|
1295
1110
|
*/
|
|
1296
|
-
|
|
1111
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1297
1112
|
/**
|
|
1298
|
-
*
|
|
1299
|
-
* @
|
|
1113
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1114
|
+
* @param terms -
|
|
1115
|
+
* @return {@link dh.FilterCondition}
|
|
1300
1116
|
*/
|
|
1301
|
-
|
|
1117
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
1302
1118
|
/**
|
|
1303
|
-
*
|
|
1304
|
-
*
|
|
1305
|
-
* @
|
|
1119
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1120
|
+
* upper vs lower case
|
|
1121
|
+
* @param terms -
|
|
1122
|
+
* @return {@link dh.FilterCondition}
|
|
1306
1123
|
*/
|
|
1307
|
-
|
|
1124
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1308
1125
|
/**
|
|
1309
|
-
*
|
|
1310
|
-
* @
|
|
1126
|
+
* a filter condition checking if the given value contains the given string value
|
|
1127
|
+
* @param term -
|
|
1128
|
+
* @return {@link dh.FilterCondition}
|
|
1311
1129
|
*/
|
|
1312
|
-
|
|
1130
|
+
contains(term:FilterValue):FilterCondition;
|
|
1313
1131
|
/**
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1316
|
-
* @param
|
|
1317
|
-
* @return
|
|
1318
|
-
* @typeParam T - the type of the data that the event will provide
|
|
1132
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1133
|
+
* lower case
|
|
1134
|
+
* @param term -
|
|
1135
|
+
* @return {@link dh.FilterCondition}
|
|
1319
1136
|
*/
|
|
1320
|
-
|
|
1321
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1322
|
-
hasListeners(name:string):boolean;
|
|
1137
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1323
1138
|
/**
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* @param
|
|
1327
|
-
* @return
|
|
1328
|
-
* @typeParam T -
|
|
1139
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1140
|
+
* use Java regex syntax
|
|
1141
|
+
* @param pattern -
|
|
1142
|
+
* @return {@link dh.FilterCondition}
|
|
1329
1143
|
*/
|
|
1330
|
-
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
/**
|
|
1334
|
-
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1335
|
-
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1336
|
-
* instance.
|
|
1337
|
-
*/
|
|
1338
|
-
export class FilterCondition {
|
|
1339
|
-
protected constructor();
|
|
1340
|
-
|
|
1144
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
1341
1145
|
/**
|
|
1342
|
-
* the
|
|
1343
|
-
*
|
|
1146
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1147
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1148
|
+
* @param pattern -
|
|
1149
|
+
* @return {@link dh.FilterCondition}
|
|
1344
1150
|
*/
|
|
1345
|
-
|
|
1151
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1346
1152
|
/**
|
|
1347
|
-
* a condition
|
|
1348
|
-
* @
|
|
1349
|
-
* @return FilterCondition
|
|
1153
|
+
* a filter condition checking if the current value is a true boolean
|
|
1154
|
+
* @return {@link dh.FilterCondition}
|
|
1350
1155
|
*/
|
|
1351
|
-
|
|
1156
|
+
isTrue():FilterCondition;
|
|
1352
1157
|
/**
|
|
1353
|
-
* a condition
|
|
1354
|
-
* @
|
|
1355
|
-
* @return FilterCondition.
|
|
1158
|
+
* a filter condition checking if the current value is a false boolean
|
|
1159
|
+
* @return {@link dh.FilterCondition}
|
|
1356
1160
|
*/
|
|
1357
|
-
|
|
1161
|
+
isFalse():FilterCondition;
|
|
1358
1162
|
/**
|
|
1359
|
-
* a
|
|
1360
|
-
* @return
|
|
1163
|
+
* a filter condition checking if the current value is a null value
|
|
1164
|
+
* @return {@link dh.FilterCondition}
|
|
1361
1165
|
*/
|
|
1362
|
-
|
|
1363
|
-
get columns():Array<Column>;
|
|
1166
|
+
isNull():FilterCondition;
|
|
1364
1167
|
/**
|
|
1365
|
-
* a filter condition invoking
|
|
1366
|
-
* functions:
|
|
1168
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
1169
|
+
* functions that can be invoked on a String:
|
|
1367
1170
|
* <ul>
|
|
1368
|
-
* <li><b>
|
|
1369
|
-
*
|
|
1370
|
-
* <li><b>
|
|
1371
|
-
*
|
|
1372
|
-
* <li><b>
|
|
1373
|
-
* "not a number"</i></li>
|
|
1374
|
-
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1375
|
-
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1376
|
-
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1377
|
-
* expression</li>
|
|
1378
|
-
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1379
|
-
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1171
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1172
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1173
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1174
|
+
* regular expression</li>
|
|
1175
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1380
1176
|
* <p>
|
|
1381
|
-
*
|
|
1382
|
-
* method should be used in other cases
|
|
1177
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1383
1178
|
* </p>
|
|
1384
1179
|
* </li>
|
|
1385
1180
|
* </ul>
|
|
1386
|
-
* @param
|
|
1181
|
+
* @param method -
|
|
1387
1182
|
* @param args -
|
|
1388
|
-
* @return
|
|
1183
|
+
* @return
|
|
1389
1184
|
*/
|
|
1390
|
-
|
|
1185
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
1186
|
+
toString():string;
|
|
1391
1187
|
/**
|
|
1392
|
-
* a
|
|
1393
|
-
*
|
|
1394
|
-
*
|
|
1395
|
-
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1396
|
-
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1397
|
-
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1398
|
-
* {@link dh.Column.filter}).
|
|
1399
|
-
* @param value -
|
|
1400
|
-
* @param columns -
|
|
1401
|
-
* @return dh.FilterCondition
|
|
1188
|
+
* Constructs a string for the filter API from the given parameter.
|
|
1189
|
+
* @param input -
|
|
1190
|
+
* @return
|
|
1402
1191
|
*/
|
|
1403
|
-
static
|
|
1192
|
+
static ofString(input:any):FilterValue;
|
|
1193
|
+
/**
|
|
1194
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
1195
|
+
* @param b -
|
|
1196
|
+
* @return
|
|
1197
|
+
*/
|
|
1198
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
1404
1199
|
}
|
|
1405
1200
|
|
|
1201
|
+
|
|
1406
1202
|
/**
|
|
1407
1203
|
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1408
1204
|
* mechanism, and so reimplemented here.
|
|
@@ -1629,266 +1425,312 @@ export namespace dh {
|
|
|
1629
1425
|
}
|
|
1630
1426
|
|
|
1631
1427
|
/**
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
1634
|
-
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1635
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1636
|
-
* instance.
|
|
1428
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
1429
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
1637
1430
|
*/
|
|
1638
|
-
export class
|
|
1431
|
+
export class IdeConnection implements HasEventHandling {
|
|
1432
|
+
/**
|
|
1433
|
+
* @deprecated
|
|
1434
|
+
*/
|
|
1435
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
1436
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1437
|
+
static readonly EVENT_RECONNECT:string;
|
|
1438
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
1439
|
+
|
|
1639
1440
|
protected constructor();
|
|
1640
1441
|
|
|
1641
1442
|
/**
|
|
1642
|
-
*
|
|
1643
|
-
* {@link TableData.get} for DateTime values. To create
|
|
1644
|
-
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1645
|
-
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1646
|
-
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1647
|
-
* @param input - the number to wrap as a FilterValue
|
|
1648
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1443
|
+
* Closes the current connection, releasing any resources on the server or client.
|
|
1649
1444
|
*/
|
|
1650
|
-
|
|
1445
|
+
close():void;
|
|
1446
|
+
running():Promise<IdeConnection>;
|
|
1447
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1448
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1651
1449
|
/**
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1450
|
+
* Makes an `object` available to another user or another client on this same server which knows the value of
|
|
1451
|
+
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
1452
|
+
* which knows this value can read the same object.
|
|
1453
|
+
* <p>
|
|
1454
|
+
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
1455
|
+
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
1456
|
+
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
1457
|
+
* <p>
|
|
1458
|
+
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
1459
|
+
* prevent access by unauthorized clients.
|
|
1460
|
+
* @param object - the object to share with another client/user
|
|
1461
|
+
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
1462
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
1463
|
+
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
1464
|
+
* by another client, or will reject if an error occurs.
|
|
1655
1465
|
*/
|
|
1656
|
-
|
|
1466
|
+
shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
|
|
1657
1467
|
/**
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
*
|
|
1661
|
-
*
|
|
1468
|
+
* Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
|
|
1469
|
+
* client releases this object (or their session ends), the object will be available on the server.
|
|
1470
|
+
* <p>
|
|
1471
|
+
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
1472
|
+
* should provide this information.
|
|
1473
|
+
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
1474
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
1475
|
+
* @param type - The type of the object, so it can be correctly read from the server
|
|
1476
|
+
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
1662
1477
|
*/
|
|
1663
|
-
|
|
1478
|
+
getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
|
|
1479
|
+
/**
|
|
1480
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
1481
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
1482
|
+
* log messages as are presently available.
|
|
1483
|
+
* @param callback -
|
|
1484
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
1485
|
+
*/
|
|
1486
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1487
|
+
startSession(type:string):Promise<IdeSession>;
|
|
1488
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
1489
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
1490
|
+
/**
|
|
1491
|
+
* Listen for events on this object.
|
|
1492
|
+
* @param name - the name of the event to listen for
|
|
1493
|
+
* @param callback - a function to call when the event occurs
|
|
1494
|
+
* @return Returns a cleanup function.
|
|
1495
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1496
|
+
*/
|
|
1497
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1498
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1499
|
+
hasListeners(name:string):boolean;
|
|
1500
|
+
/**
|
|
1501
|
+
* Removes an event listener added to this table.
|
|
1502
|
+
* @param name -
|
|
1503
|
+
* @param callback -
|
|
1504
|
+
* @return
|
|
1505
|
+
* @typeParam T -
|
|
1506
|
+
*/
|
|
1507
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
1512
|
+
* the server to get each Table. All tables will have the same structure.
|
|
1513
|
+
*/
|
|
1514
|
+
export class PartitionedTable implements HasEventHandling {
|
|
1515
|
+
/**
|
|
1516
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1517
|
+
*/
|
|
1518
|
+
static readonly EVENT_KEYADDED:string;
|
|
1664
1519
|
/**
|
|
1665
|
-
* a
|
|
1666
|
-
* @param term -
|
|
1667
|
-
* @return {@link dh.FilterCondition}
|
|
1520
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1668
1521
|
*/
|
|
1669
|
-
|
|
1522
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1670
1523
|
/**
|
|
1671
|
-
* a
|
|
1672
|
-
* upper vs lower case
|
|
1673
|
-
* @param term -
|
|
1674
|
-
* @return {@link dh.FilterCondition}
|
|
1524
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1675
1525
|
*/
|
|
1676
|
-
|
|
1526
|
+
static readonly EVENT_RECONNECT:string;
|
|
1677
1527
|
/**
|
|
1678
|
-
* a
|
|
1679
|
-
* @param term -
|
|
1680
|
-
* @return {@link dh.FilterCondition}
|
|
1528
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1681
1529
|
*/
|
|
1682
|
-
|
|
1530
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1531
|
+
|
|
1532
|
+
protected constructor();
|
|
1533
|
+
|
|
1683
1534
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
* @param
|
|
1686
|
-
* @return
|
|
1535
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
1536
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
1537
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
1687
1538
|
*/
|
|
1688
|
-
|
|
1539
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
1689
1540
|
/**
|
|
1690
|
-
* a
|
|
1691
|
-
* @
|
|
1692
|
-
* @return
|
|
1541
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
1542
|
+
* {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
|
|
1543
|
+
* @return A merged representation of the constituent tables.
|
|
1693
1544
|
*/
|
|
1694
|
-
|
|
1545
|
+
getMergedTable():Promise<Table>;
|
|
1695
1546
|
/**
|
|
1696
|
-
*
|
|
1697
|
-
*
|
|
1698
|
-
* @return
|
|
1547
|
+
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
1548
|
+
* for <b>keyadded</b> will ensure no keys are missed.
|
|
1549
|
+
* @return Set of Object
|
|
1699
1550
|
*/
|
|
1700
|
-
|
|
1551
|
+
getKeys():Set<object>;
|
|
1701
1552
|
/**
|
|
1702
|
-
* a
|
|
1703
|
-
* @
|
|
1704
|
-
* @
|
|
1553
|
+
* Fetch a table containing all the valid keys of the partitioned table.
|
|
1554
|
+
* @return Promise of a Table
|
|
1555
|
+
* @deprecated
|
|
1705
1556
|
*/
|
|
1706
|
-
|
|
1557
|
+
getKeyTable():Promise<Table>;
|
|
1707
1558
|
/**
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1710
|
-
* @param terms -
|
|
1711
|
-
* @return {@link dh.FilterCondition}
|
|
1559
|
+
* Fetch the underlying base table of the partitioned table.
|
|
1560
|
+
* @return Promise of a Table
|
|
1712
1561
|
*/
|
|
1713
|
-
|
|
1562
|
+
getBaseTable():Promise<Table>;
|
|
1714
1563
|
/**
|
|
1715
|
-
*
|
|
1716
|
-
*
|
|
1717
|
-
* @return {@link dh.FilterCondition}
|
|
1564
|
+
* Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
|
|
1565
|
+
* will not affect tables in use.
|
|
1718
1566
|
*/
|
|
1719
|
-
|
|
1567
|
+
close():void;
|
|
1720
1568
|
/**
|
|
1721
|
-
*
|
|
1722
|
-
*
|
|
1723
|
-
* @param terms -
|
|
1724
|
-
* @return {@link dh.FilterCondition}
|
|
1569
|
+
* The count of known keys.
|
|
1570
|
+
* @return int
|
|
1725
1571
|
*/
|
|
1726
|
-
|
|
1572
|
+
get size():number;
|
|
1727
1573
|
/**
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1730
|
-
* @return
|
|
1574
|
+
* An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
|
|
1575
|
+
* non-key columns.
|
|
1576
|
+
* @return Array of Column
|
|
1731
1577
|
*/
|
|
1732
|
-
|
|
1578
|
+
get columns():Column[];
|
|
1733
1579
|
/**
|
|
1734
|
-
*
|
|
1735
|
-
*
|
|
1736
|
-
* @param term -
|
|
1737
|
-
* @return {@link dh.FilterCondition}
|
|
1580
|
+
* An array of all the key columns that the tables are partitioned by.
|
|
1581
|
+
* @return Array of Column
|
|
1738
1582
|
*/
|
|
1739
|
-
|
|
1583
|
+
get keyColumns():Column[];
|
|
1740
1584
|
/**
|
|
1741
|
-
*
|
|
1742
|
-
*
|
|
1743
|
-
* @param
|
|
1744
|
-
* @return
|
|
1585
|
+
* Listen for events on this object.
|
|
1586
|
+
* @param name - the name of the event to listen for
|
|
1587
|
+
* @param callback - a function to call when the event occurs
|
|
1588
|
+
* @return Returns a cleanup function.
|
|
1589
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1745
1590
|
*/
|
|
1746
|
-
|
|
1591
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1592
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1593
|
+
hasListeners(name:string):boolean;
|
|
1747
1594
|
/**
|
|
1748
|
-
*
|
|
1749
|
-
*
|
|
1750
|
-
* @param
|
|
1751
|
-
* @return
|
|
1595
|
+
* Removes an event listener added to this table.
|
|
1596
|
+
* @param name -
|
|
1597
|
+
* @param callback -
|
|
1598
|
+
* @return
|
|
1599
|
+
* @typeParam T -
|
|
1752
1600
|
*/
|
|
1753
|
-
|
|
1601
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* A js type for operating on input tables.
|
|
1606
|
+
*
|
|
1607
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
1608
|
+
*
|
|
1609
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
1610
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
1611
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
1612
|
+
* before sending the next operation.
|
|
1613
|
+
*
|
|
1614
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
1615
|
+
*
|
|
1616
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
1617
|
+
* object.
|
|
1618
|
+
*/
|
|
1619
|
+
export class InputTable {
|
|
1620
|
+
protected constructor();
|
|
1621
|
+
|
|
1754
1622
|
/**
|
|
1755
|
-
* a
|
|
1756
|
-
*
|
|
1623
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
1624
|
+
* property at that name and validate it can be put into the given column type.
|
|
1625
|
+
* @param row -
|
|
1626
|
+
* @param userTimeZone -
|
|
1627
|
+
* @return Promise of dh.InputTable
|
|
1757
1628
|
*/
|
|
1758
|
-
|
|
1629
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
1759
1630
|
/**
|
|
1760
|
-
*
|
|
1761
|
-
* @
|
|
1631
|
+
* Add multiple rows to a table.
|
|
1632
|
+
* @param rows -
|
|
1633
|
+
* @param userTimeZone -
|
|
1634
|
+
* @return Promise of dh.InputTable
|
|
1762
1635
|
*/
|
|
1763
|
-
|
|
1636
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
1764
1637
|
/**
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1638
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
1639
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
1640
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
1641
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
1642
|
+
* @param tableToAdd -
|
|
1643
|
+
* @return Promise of dh.InputTable
|
|
1767
1644
|
*/
|
|
1768
|
-
|
|
1645
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
1769
1646
|
/**
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1774
|
-
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1775
|
-
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1776
|
-
* regular expression</li>
|
|
1777
|
-
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1778
|
-
* <p>
|
|
1779
|
-
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1780
|
-
* </p>
|
|
1781
|
-
* </li>
|
|
1782
|
-
* </ul>
|
|
1783
|
-
* @param method -
|
|
1784
|
-
* @param args -
|
|
1785
|
-
* @return
|
|
1647
|
+
* Add multiple tables to this Input Table.
|
|
1648
|
+
* @param tablesToAdd -
|
|
1649
|
+
* @return Promise of dh.InputTable
|
|
1786
1650
|
*/
|
|
1787
|
-
|
|
1788
|
-
toString():string;
|
|
1651
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
1789
1652
|
/**
|
|
1790
|
-
*
|
|
1791
|
-
* @param
|
|
1792
|
-
* @return
|
|
1653
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
1654
|
+
* @param tableToDelete -
|
|
1655
|
+
* @return Promise of dh.InputTable
|
|
1793
1656
|
*/
|
|
1794
|
-
|
|
1657
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
1795
1658
|
/**
|
|
1796
|
-
*
|
|
1797
|
-
* @param
|
|
1659
|
+
* Delete multiple tables from this Input Table.
|
|
1660
|
+
* @param tablesToDelete -
|
|
1798
1661
|
* @return
|
|
1799
1662
|
*/
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
*
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
1832
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1833
|
-
* provided to the JS API consumer.</li>
|
|
1834
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1835
|
-
* which provided them. One concrete example of this could have been
|
|
1836
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1837
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1838
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1839
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1840
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1841
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1842
|
-
* an internal table instance.</li>
|
|
1843
|
-
* </ul>
|
|
1844
|
-
*
|
|
1845
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1846
|
-
* <ul>
|
|
1847
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1848
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1849
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1850
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1851
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
1852
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1853
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1854
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1855
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1856
|
-
* </ul>
|
|
1663
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
1664
|
+
/**
|
|
1665
|
+
* A list of the key columns, by name
|
|
1666
|
+
* @return String array.
|
|
1667
|
+
*/
|
|
1668
|
+
get keys():string[];
|
|
1669
|
+
/**
|
|
1670
|
+
* A list of the value columns, by name
|
|
1671
|
+
* @return String array.
|
|
1672
|
+
*/
|
|
1673
|
+
get values():string[];
|
|
1674
|
+
/**
|
|
1675
|
+
* A list of the key columns.
|
|
1676
|
+
* @return Column array.
|
|
1677
|
+
*/
|
|
1678
|
+
get keyColumns():Column[];
|
|
1679
|
+
/**
|
|
1680
|
+
* A list of the value Column objects
|
|
1681
|
+
* @return {@link dh.Column} array.
|
|
1682
|
+
*/
|
|
1683
|
+
get valueColumns():Column[];
|
|
1684
|
+
/**
|
|
1685
|
+
* The source table for this Input Table
|
|
1686
|
+
* @return dh.table
|
|
1687
|
+
*/
|
|
1688
|
+
get table():Table;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1693
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
1694
|
+
* methods return a new Sort instance.
|
|
1857
1695
|
*/
|
|
1858
|
-
export class
|
|
1859
|
-
static readonly
|
|
1860
|
-
static readonly
|
|
1696
|
+
export class Sort {
|
|
1697
|
+
static readonly ASCENDING:string;
|
|
1698
|
+
static readonly DESCENDING:string;
|
|
1699
|
+
static readonly REVERSE:string;
|
|
1861
1700
|
|
|
1862
1701
|
protected constructor();
|
|
1863
1702
|
|
|
1864
1703
|
/**
|
|
1865
|
-
*
|
|
1704
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
1705
|
+
* @return {@link dh.Sort}
|
|
1866
1706
|
*/
|
|
1867
|
-
|
|
1868
|
-
getDataAsBase64():string;
|
|
1869
|
-
getDataAsU8():Uint8Array;
|
|
1870
|
-
getDataAsString():string;
|
|
1707
|
+
asc():Sort;
|
|
1871
1708
|
/**
|
|
1872
|
-
*
|
|
1873
|
-
* @
|
|
1874
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
1709
|
+
* Builds a Sort instance to sort values in descending order.
|
|
1710
|
+
* @return {@link dh.Sort}
|
|
1875
1711
|
*/
|
|
1876
|
-
|
|
1877
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1878
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1879
|
-
hasListeners(name:string):boolean;
|
|
1880
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1712
|
+
desc():Sort;
|
|
1881
1713
|
/**
|
|
1882
|
-
*
|
|
1883
|
-
* @return
|
|
1884
|
-
* them when finished using them.
|
|
1714
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1715
|
+
* @return {@link dh.Sort}
|
|
1885
1716
|
*/
|
|
1886
|
-
|
|
1717
|
+
abs():Sort;
|
|
1718
|
+
toString():string;
|
|
1887
1719
|
/**
|
|
1888
|
-
*
|
|
1889
|
-
* @return
|
|
1720
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1721
|
+
* @return boolean
|
|
1890
1722
|
*/
|
|
1891
|
-
get
|
|
1723
|
+
get isAbs():boolean;
|
|
1724
|
+
/**
|
|
1725
|
+
* The column which is sorted.
|
|
1726
|
+
* @return {@link dh.Column}
|
|
1727
|
+
*/
|
|
1728
|
+
get column():Column;
|
|
1729
|
+
/**
|
|
1730
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
1731
|
+
* @return String
|
|
1732
|
+
*/
|
|
1733
|
+
get direction():string;
|
|
1892
1734
|
}
|
|
1893
1735
|
|
|
1894
1736
|
/**
|
|
@@ -1923,27 +1765,22 @@ export namespace dh {
|
|
|
1923
1765
|
constructor();
|
|
1924
1766
|
}
|
|
1925
1767
|
|
|
1926
|
-
|
|
1927
|
-
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1928
|
-
* this type TableMap.
|
|
1929
|
-
* @deprecated
|
|
1930
|
-
*/
|
|
1931
|
-
export class TableMap {
|
|
1932
|
-
static readonly EVENT_KEYADDED:string;
|
|
1933
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1934
|
-
static readonly EVENT_RECONNECT:string;
|
|
1935
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1936
|
-
|
|
1768
|
+
export class LongWrapper {
|
|
1937
1769
|
protected constructor();
|
|
1770
|
+
|
|
1771
|
+
static ofString(str:string):LongWrapper;
|
|
1772
|
+
asNumber():number;
|
|
1773
|
+
valueOf():string;
|
|
1774
|
+
toString():string;
|
|
1938
1775
|
}
|
|
1939
1776
|
|
|
1940
1777
|
/**
|
|
1941
|
-
* Wrap
|
|
1778
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1942
1779
|
*/
|
|
1943
|
-
export class
|
|
1780
|
+
export class BigDecimalWrapper {
|
|
1944
1781
|
protected constructor();
|
|
1945
1782
|
|
|
1946
|
-
static ofString(
|
|
1783
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
1947
1784
|
asNumber():number;
|
|
1948
1785
|
valueOf():string;
|
|
1949
1786
|
toString():string;
|
|
@@ -1952,417 +1789,506 @@ export namespace dh {
|
|
|
1952
1789
|
}
|
|
1953
1790
|
|
|
1954
1791
|
/**
|
|
1955
|
-
*
|
|
1956
|
-
*
|
|
1957
|
-
*
|
|
1958
|
-
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1959
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1960
|
-
* forward data to it.
|
|
1961
|
-
*
|
|
1962
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1963
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1964
|
-
* viewports to make it less expensive to compute for large tables.
|
|
1792
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
1793
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1794
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1965
1795
|
*/
|
|
1966
|
-
export class
|
|
1796
|
+
export class RangeSet {
|
|
1967
1797
|
protected constructor();
|
|
1968
1798
|
|
|
1799
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
1800
|
+
static ofItems(rows:number[]):RangeSet;
|
|
1801
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
1802
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
1969
1803
|
/**
|
|
1970
|
-
*
|
|
1971
|
-
* @
|
|
1972
|
-
* @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
|
|
1804
|
+
* a new iterator over all indexes in this collection.
|
|
1805
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
1973
1806
|
*/
|
|
1974
|
-
|
|
1975
|
-
get columns():Array<Column>;
|
|
1807
|
+
iterator():Iterator<LongWrapper>;
|
|
1976
1808
|
/**
|
|
1977
|
-
*
|
|
1809
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
1810
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
1811
|
+
* property each time through a loop).
|
|
1812
|
+
* @return double
|
|
1813
|
+
*/
|
|
1814
|
+
get size():number;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1819
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1820
|
+
* inform the UI right away that they have taken place.
|
|
1821
|
+
*/
|
|
1822
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
1823
|
+
readonly description?:string|null;
|
|
1824
|
+
readonly pluginName?:string|null;
|
|
1825
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1826
|
+
/**
|
|
1827
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1828
|
+
*/
|
|
1829
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
1830
|
+
/**
|
|
1831
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1832
|
+
*/
|
|
1833
|
+
static readonly EVENT_UPDATED:string;
|
|
1834
|
+
/**
|
|
1835
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1836
|
+
*/
|
|
1837
|
+
static readonly EVENT_ROWADDED:string;
|
|
1838
|
+
/**
|
|
1839
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1840
|
+
*/
|
|
1841
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
1842
|
+
/**
|
|
1843
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1844
|
+
*/
|
|
1845
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
1846
|
+
/**
|
|
1847
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1848
|
+
*/
|
|
1849
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
1850
|
+
/**
|
|
1851
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1852
|
+
*/
|
|
1853
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
1854
|
+
/**
|
|
1855
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1856
|
+
*/
|
|
1857
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1858
|
+
/**
|
|
1859
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1860
|
+
*/
|
|
1861
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1862
|
+
/**
|
|
1863
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1864
|
+
*/
|
|
1865
|
+
static readonly EVENT_RECONNECT:string;
|
|
1866
|
+
/**
|
|
1867
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1868
|
+
*/
|
|
1869
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1870
|
+
/**
|
|
1871
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1872
|
+
*/
|
|
1873
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1874
|
+
/**
|
|
1875
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
1876
|
+
*/
|
|
1877
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1878
|
+
/**
|
|
1879
|
+
* The size the table will have if it is uncoalesced.
|
|
1880
|
+
*/
|
|
1881
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
1882
|
+
|
|
1883
|
+
protected constructor();
|
|
1884
|
+
|
|
1885
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1886
|
+
/**
|
|
1887
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
1888
|
+
* caching a returned value.
|
|
1889
|
+
* @param key -
|
|
1890
|
+
* @return {@link dh.Column}
|
|
1891
|
+
*/
|
|
1892
|
+
findColumn(key:string):Column;
|
|
1893
|
+
/**
|
|
1894
|
+
* Retrieve multiple columns specified by the given names.
|
|
1895
|
+
* @param keys -
|
|
1896
|
+
* @return {@link dh.Column} array
|
|
1897
|
+
*/
|
|
1898
|
+
findColumns(keys:string[]):Column[];
|
|
1899
|
+
isBlinkTable():boolean;
|
|
1900
|
+
/**
|
|
1901
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
1902
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
1903
|
+
* @return Promise of dh.InputTable
|
|
1904
|
+
*/
|
|
1905
|
+
inputTable():Promise<InputTable>;
|
|
1906
|
+
/**
|
|
1907
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
1908
|
+
*/
|
|
1909
|
+
close():void;
|
|
1910
|
+
getAttributes():string[];
|
|
1911
|
+
/**
|
|
1912
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
1913
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
1914
|
+
* @param attributeName -
|
|
1915
|
+
* @return Object
|
|
1916
|
+
*/
|
|
1917
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
1918
|
+
/**
|
|
1919
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
1920
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
1921
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
1922
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1923
|
+
* not.
|
|
1924
|
+
* @param sort -
|
|
1925
|
+
* @return {@link dh.Sort} array
|
|
1926
|
+
*/
|
|
1927
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1928
|
+
/**
|
|
1929
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
1930
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
1931
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
1932
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
1933
|
+
* will not.
|
|
1934
|
+
* @param filter -
|
|
1935
|
+
* @return {@link dh.FilterCondition} array
|
|
1978
1936
|
*/
|
|
1979
|
-
|
|
1937
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1980
1938
|
/**
|
|
1981
|
-
*
|
|
1982
|
-
* @param
|
|
1983
|
-
* @
|
|
1984
|
-
* @return Returns a cleanup function.
|
|
1985
|
-
* @typeParam T - the type of the data that the event will provide
|
|
1939
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
1940
|
+
* @param customColumns -
|
|
1941
|
+
* @return {@link dh.CustomColumn} array
|
|
1986
1942
|
*/
|
|
1987
|
-
|
|
1988
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1989
|
-
hasListeners(name:string):boolean;
|
|
1943
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1990
1944
|
/**
|
|
1991
|
-
*
|
|
1992
|
-
*
|
|
1993
|
-
*
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1945
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
1946
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
1947
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
1948
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
1949
|
+
* needed.
|
|
1950
|
+
* @param firstRow -
|
|
1951
|
+
* @param lastRow -
|
|
1952
|
+
* @param columns -
|
|
1953
|
+
* @param updateIntervalMs -
|
|
1954
|
+
* @return {@link dh.TableViewportSubscription}
|
|
1996
1955
|
*/
|
|
1997
|
-
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
export class CoreClient implements HasEventHandling {
|
|
2001
|
-
static readonly EVENT_CONNECT:string;
|
|
2002
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2003
|
-
static readonly EVENT_RECONNECT:string;
|
|
2004
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
2005
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
2006
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
2007
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1956
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
2008
1957
|
/**
|
|
2009
|
-
*
|
|
1958
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
1959
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
1960
|
+
* separate the lifespan of this promise from the table itself, call
|
|
1961
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1962
|
+
* @return Promise of {@link dh.TableData}
|
|
2010
1963
|
*/
|
|
2011
|
-
|
|
2012
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
2013
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
2014
|
-
|
|
2015
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
2016
|
-
|
|
2017
|
-
running():Promise<CoreClient>;
|
|
2018
|
-
getServerUrl():string;
|
|
2019
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
2020
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
2021
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
2022
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
2023
|
-
getServerConfigValues():Promise<string[][]>;
|
|
2024
|
-
getStorageService():dh.storage.StorageService;
|
|
2025
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
2026
|
-
disconnect():void;
|
|
2027
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2028
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2029
|
-
hasListeners(name:string):boolean;
|
|
2030
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
/**
|
|
2034
|
-
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
2035
|
-
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
2036
|
-
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
2037
|
-
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
2038
|
-
* of <b>TotalsTableConfig</b> will be supplied.
|
|
2039
|
-
*
|
|
2040
|
-
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
2041
|
-
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
2042
|
-
* expected formats.
|
|
2043
|
-
*/
|
|
2044
|
-
export class TotalsTableConfig {
|
|
1964
|
+
getViewportData():Promise<ViewportData>;
|
|
2045
1965
|
/**
|
|
2046
|
-
*
|
|
1966
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
1967
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
1968
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
1969
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1970
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1971
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1972
|
+
* @param columns -
|
|
1973
|
+
* @param updateIntervalMs -
|
|
1974
|
+
* @return {@link dh.TableSubscription}
|
|
2047
1975
|
*/
|
|
2048
|
-
|
|
1976
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
2049
1977
|
/**
|
|
2050
|
-
*
|
|
1978
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
1979
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
1980
|
+
* order of appearance of values from the original table.
|
|
1981
|
+
* @param columns -
|
|
1982
|
+
* @return Promise of dh.Table
|
|
2051
1983
|
*/
|
|
2052
|
-
|
|
1984
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
2053
1985
|
/**
|
|
2054
|
-
*
|
|
1986
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1987
|
+
* @return Promise of dh.Table
|
|
2055
1988
|
*/
|
|
2056
|
-
|
|
1989
|
+
copy():Promise<Table>;
|
|
2057
1990
|
/**
|
|
2058
|
-
*
|
|
1991
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
1992
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
1993
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1994
|
+
* called on it when not in use.
|
|
1995
|
+
* @param config -
|
|
1996
|
+
* @return Promise of dh.TotalsTable
|
|
2059
1997
|
*/
|
|
2060
|
-
|
|
1998
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
2061
1999
|
/**
|
|
2062
|
-
*
|
|
2000
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
2001
|
+
* above for more specifics.
|
|
2002
|
+
* @param config -
|
|
2003
|
+
* @return promise of dh.TotalsTable
|
|
2063
2004
|
*/
|
|
2064
|
-
|
|
2005
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
2065
2006
|
/**
|
|
2066
|
-
*
|
|
2007
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
2008
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
2009
|
+
* @param configObject -
|
|
2010
|
+
* @return Promise of dh.TreeTable
|
|
2067
2011
|
*/
|
|
2068
|
-
|
|
2012
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
2069
2013
|
/**
|
|
2070
|
-
*
|
|
2014
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
2015
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
2016
|
+
* @param configObject -
|
|
2017
|
+
* @return Promise dh.TreeTable
|
|
2071
2018
|
*/
|
|
2072
|
-
|
|
2019
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
2073
2020
|
/**
|
|
2074
|
-
*
|
|
2021
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
2022
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
2023
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
2024
|
+
* @return Promise of dh.Table
|
|
2075
2025
|
*/
|
|
2076
|
-
|
|
2026
|
+
freeze():Promise<Table>;
|
|
2027
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
2077
2028
|
/**
|
|
2029
|
+
*
|
|
2030
|
+
* @inheritDoc
|
|
2078
2031
|
* @deprecated
|
|
2079
2032
|
*/
|
|
2080
|
-
|
|
2033
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2034
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2035
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
2036
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2037
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2038
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2081
2039
|
/**
|
|
2082
|
-
*
|
|
2040
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
2041
|
+
* keys.
|
|
2042
|
+
* @param keys -
|
|
2043
|
+
* @param dropKeys -
|
|
2044
|
+
* @return Promise dh.PartitionedTable
|
|
2083
2045
|
*/
|
|
2084
|
-
|
|
2046
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2085
2047
|
/**
|
|
2086
|
-
*
|
|
2048
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
2049
|
+
* @param column -
|
|
2050
|
+
* @return Promise of dh.ColumnStatistics
|
|
2087
2051
|
*/
|
|
2088
|
-
|
|
2052
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
2089
2053
|
/**
|
|
2090
|
-
*
|
|
2054
|
+
* Seek the row matching the data provided
|
|
2055
|
+
* @param startingRow - Row to start the seek from
|
|
2056
|
+
* @param column - Column to seek for value on
|
|
2057
|
+
* @param valueType - Type of value provided
|
|
2058
|
+
* @param seekValue - Value to seek
|
|
2059
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
2060
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
2061
|
+
* `false`.
|
|
2062
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
2063
|
+
* @return A promise that resolves to the row value found.
|
|
2091
2064
|
*/
|
|
2092
|
-
|
|
2065
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
2066
|
+
toString():string;
|
|
2093
2067
|
/**
|
|
2094
|
-
*
|
|
2068
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
2069
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
2070
|
+
* @return boolean
|
|
2095
2071
|
*/
|
|
2096
|
-
|
|
2072
|
+
get hasInputTable():boolean;
|
|
2097
2073
|
/**
|
|
2098
|
-
*
|
|
2074
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
2075
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
2076
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
2077
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
2078
|
+
* @return {@link dh.Column} array
|
|
2099
2079
|
*/
|
|
2100
|
-
|
|
2080
|
+
get columns():Array<Column>;
|
|
2101
2081
|
/**
|
|
2102
|
-
*
|
|
2103
|
-
*
|
|
2082
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
2083
|
+
* @return dh.TotalsTableConfig
|
|
2104
2084
|
*/
|
|
2105
|
-
|
|
2085
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
2106
2086
|
/**
|
|
2107
|
-
*
|
|
2108
|
-
*
|
|
2087
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
2088
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2089
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
2090
|
+
* @return {@link dh.Sort} array
|
|
2109
2091
|
*/
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
constructor();
|
|
2113
|
-
|
|
2114
|
-
toString():string;
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
export class IdeSession implements HasEventHandling {
|
|
2118
|
-
static readonly EVENT_COMMANDSTARTED:string;
|
|
2119
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
2120
|
-
|
|
2121
|
-
protected constructor();
|
|
2122
|
-
|
|
2092
|
+
get sort():Array<Sort>;
|
|
2123
2093
|
/**
|
|
2124
|
-
*
|
|
2125
|
-
*
|
|
2126
|
-
* @
|
|
2127
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
2094
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
2095
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
2096
|
+
* @return {@link dh.CustomColumn} array
|
|
2128
2097
|
*/
|
|
2129
|
-
|
|
2098
|
+
get customColumns():Array<CustomColumn>;
|
|
2130
2099
|
/**
|
|
2131
|
-
*
|
|
2132
|
-
*
|
|
2133
|
-
* @return
|
|
2100
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2101
|
+
* initial snapshot.
|
|
2102
|
+
* @return boolean
|
|
2134
2103
|
*/
|
|
2135
|
-
|
|
2104
|
+
get isRefreshing():boolean;
|
|
2136
2105
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2140
|
-
* @return {@link
|
|
2141
|
-
*/
|
|
2142
|
-
|
|
2143
|
-
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2144
|
-
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2145
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2146
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2106
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
2107
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2108
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
2109
|
+
* @return {@link dh.FilterCondition} array
|
|
2110
|
+
*/
|
|
2111
|
+
get filter():Array<FilterCondition>;
|
|
2147
2112
|
/**
|
|
2148
|
-
*
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2113
|
+
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
2114
|
+
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
2115
|
+
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
2116
|
+
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
2151
2117
|
*/
|
|
2152
|
-
|
|
2153
|
-
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2118
|
+
get totalSize():number;
|
|
2154
2119
|
/**
|
|
2155
|
-
*
|
|
2156
|
-
* the
|
|
2157
|
-
*
|
|
2158
|
-
* <p>
|
|
2159
|
-
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
2160
|
-
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
2161
|
-
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
2120
|
+
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
2121
|
+
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
2122
|
+
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
2162
2123
|
* <p>
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
*
|
|
2166
|
-
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
2167
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2168
|
-
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
2169
|
-
* by another client, or will reject if an error occurs.
|
|
2124
|
+
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
2125
|
+
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
2126
|
+
* uncoalesced.
|
|
2170
2127
|
*/
|
|
2171
|
-
|
|
2128
|
+
get size():number;
|
|
2172
2129
|
/**
|
|
2173
|
-
*
|
|
2174
|
-
*
|
|
2175
|
-
* <p>
|
|
2176
|
-
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
2177
|
-
* should provide this information.
|
|
2178
|
-
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
2179
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2180
|
-
* @param type - The type of the object, so it can be correctly read from the server
|
|
2181
|
-
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
2130
|
+
* True if this table has been closed.
|
|
2131
|
+
* @return boolean
|
|
2182
2132
|
*/
|
|
2183
|
-
|
|
2184
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2185
|
-
close():void;
|
|
2186
|
-
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2187
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2188
|
-
openDocument(params:object):void;
|
|
2189
|
-
changeDocument(params:object):void;
|
|
2190
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2191
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2192
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2193
|
-
closeDocument(params:object):void;
|
|
2133
|
+
get isClosed():boolean;
|
|
2194
2134
|
/**
|
|
2195
|
-
*
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2198
|
-
*
|
|
2135
|
+
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
2136
|
+
* <p>
|
|
2137
|
+
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
2138
|
+
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
2139
|
+
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
2140
|
+
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
2141
|
+
* for those columns, use {@link Table.selectDistinct}.
|
|
2142
|
+
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
2199
2143
|
*/
|
|
2200
|
-
|
|
2144
|
+
get isUncoalesced():boolean;
|
|
2201
2145
|
/**
|
|
2202
|
-
*
|
|
2203
|
-
*
|
|
2204
|
-
* @param
|
|
2205
|
-
* @
|
|
2206
|
-
* @
|
|
2146
|
+
* Listen for events on this object.
|
|
2147
|
+
* @param name - the name of the event to listen for
|
|
2148
|
+
* @param callback - a function to call when the event occurs
|
|
2149
|
+
* @return Returns a cleanup function.
|
|
2150
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2207
2151
|
*/
|
|
2208
|
-
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
2209
2152
|
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2210
2153
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2211
2154
|
hasListeners(name:string):boolean;
|
|
2212
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
export class CustomColumn {
|
|
2216
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
2217
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
2218
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
2219
|
-
static readonly TYPE_NEW:string;
|
|
2220
|
-
|
|
2221
|
-
protected constructor();
|
|
2222
|
-
|
|
2223
|
-
valueOf():string;
|
|
2224
|
-
toString():string;
|
|
2225
|
-
static from(columnInfo:string):CustomColumn;
|
|
2226
|
-
/**
|
|
2227
|
-
* The expression to evaluate this custom column.
|
|
2228
|
-
* @return String
|
|
2229
|
-
*/
|
|
2230
|
-
get expression():string;
|
|
2231
|
-
/**
|
|
2232
|
-
* The name of the column to use.
|
|
2233
|
-
* @return String
|
|
2234
|
-
*/
|
|
2235
|
-
get name():string;
|
|
2236
2155
|
/**
|
|
2237
|
-
*
|
|
2238
|
-
* @
|
|
2156
|
+
* Removes an event listener added to this table.
|
|
2157
|
+
* @param name -
|
|
2158
|
+
* @param callback -
|
|
2159
|
+
* @return
|
|
2160
|
+
* @typeParam T -
|
|
2239
2161
|
*/
|
|
2240
|
-
|
|
2162
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2241
2163
|
/**
|
|
2242
|
-
*
|
|
2243
|
-
*
|
|
2244
|
-
*
|
|
2245
|
-
* <li>FORMAT_COLOR</li>
|
|
2246
|
-
* <li>FORMAT_NUMBER</li>
|
|
2247
|
-
* <li>FORMAT_DATE</li>
|
|
2248
|
-
* <li>NEW</li>
|
|
2249
|
-
* </ul>
|
|
2250
|
-
* @return String
|
|
2164
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2165
|
+
* do not support reverse.
|
|
2166
|
+
* @return {@link dh.Sort}
|
|
2251
2167
|
*/
|
|
2252
|
-
|
|
2168
|
+
static reverse():Sort;
|
|
2253
2169
|
}
|
|
2254
2170
|
|
|
2255
2171
|
/**
|
|
2256
|
-
*
|
|
2257
|
-
* @deprecated
|
|
2172
|
+
* Event fired when a command is issued from the client.
|
|
2258
2173
|
*/
|
|
2259
|
-
export class
|
|
2260
|
-
|
|
2261
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
2262
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2174
|
+
export class CommandInfo {
|
|
2175
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
2263
2176
|
|
|
2264
|
-
|
|
2177
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
2178
|
+
get code():string;
|
|
2265
2179
|
}
|
|
2266
2180
|
|
|
2267
2181
|
/**
|
|
2268
|
-
*
|
|
2269
|
-
*
|
|
2270
|
-
*
|
|
2271
|
-
*
|
|
2272
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2273
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2274
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2275
|
-
* before sending the next operation.
|
|
2276
|
-
*
|
|
2277
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2278
|
-
*
|
|
2279
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2280
|
-
* object.
|
|
2182
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
2183
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
2184
|
+
* instance.
|
|
2281
2185
|
*/
|
|
2282
|
-
export class
|
|
2186
|
+
export class FilterCondition {
|
|
2283
2187
|
protected constructor();
|
|
2284
2188
|
|
|
2285
2189
|
/**
|
|
2286
|
-
*
|
|
2287
|
-
*
|
|
2288
|
-
* @param row -
|
|
2289
|
-
* @param userTimeZone -
|
|
2290
|
-
* @return Promise of dh.InputTable
|
|
2291
|
-
*/
|
|
2292
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2293
|
-
/**
|
|
2294
|
-
* Add multiple rows to a table.
|
|
2295
|
-
* @param rows -
|
|
2296
|
-
* @param userTimeZone -
|
|
2297
|
-
* @return Promise of dh.InputTable
|
|
2190
|
+
* the opposite of this condition
|
|
2191
|
+
* @return FilterCondition
|
|
2298
2192
|
*/
|
|
2299
|
-
|
|
2193
|
+
not():FilterCondition;
|
|
2300
2194
|
/**
|
|
2301
|
-
*
|
|
2302
|
-
*
|
|
2303
|
-
*
|
|
2304
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
2305
|
-
* @param tableToAdd -
|
|
2306
|
-
* @return Promise of dh.InputTable
|
|
2195
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
2196
|
+
* @param filters -
|
|
2197
|
+
* @return FilterCondition
|
|
2307
2198
|
*/
|
|
2308
|
-
|
|
2199
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
2309
2200
|
/**
|
|
2310
|
-
*
|
|
2311
|
-
* @param
|
|
2312
|
-
* @return
|
|
2201
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
2202
|
+
* @param filters -
|
|
2203
|
+
* @return FilterCondition.
|
|
2313
2204
|
*/
|
|
2314
|
-
|
|
2205
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
2315
2206
|
/**
|
|
2316
|
-
*
|
|
2317
|
-
* @
|
|
2318
|
-
* @return Promise of dh.InputTable
|
|
2207
|
+
* a string suitable for debugging showing the details of this condition.
|
|
2208
|
+
* @return String.
|
|
2319
2209
|
*/
|
|
2320
|
-
|
|
2210
|
+
toString():string;
|
|
2211
|
+
get columns():Array<Column>;
|
|
2321
2212
|
/**
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
2213
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
2214
|
+
* functions:
|
|
2215
|
+
* <ul>
|
|
2216
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
2217
|
+
* than the third</li>
|
|
2218
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
2219
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
2220
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
2221
|
+
* "not a number"</i></li>
|
|
2222
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
2223
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
2224
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
2225
|
+
* expression</li>
|
|
2226
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
2227
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
2228
|
+
* <p>
|
|
2229
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
2230
|
+
* method should be used in other cases
|
|
2231
|
+
* </p>
|
|
2232
|
+
* </li>
|
|
2233
|
+
* </ul>
|
|
2234
|
+
* @param function -
|
|
2235
|
+
* @param args -
|
|
2236
|
+
* @return dh.FilterCondition
|
|
2325
2237
|
*/
|
|
2326
|
-
|
|
2238
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
2327
2239
|
/**
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2240
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
2241
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
2242
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
2243
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
2244
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
2245
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
2246
|
+
* {@link dh.Column.filter}).
|
|
2247
|
+
* @param value -
|
|
2248
|
+
* @param columns -
|
|
2249
|
+
* @return dh.FilterCondition
|
|
2330
2250
|
*/
|
|
2331
|
-
|
|
2251
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
export class CustomColumn {
|
|
2255
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
2256
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
2257
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
2258
|
+
static readonly TYPE_NEW:string;
|
|
2259
|
+
|
|
2260
|
+
protected constructor();
|
|
2261
|
+
|
|
2262
|
+
valueOf():string;
|
|
2263
|
+
toString():string;
|
|
2264
|
+
static from(columnInfo:string):CustomColumn;
|
|
2332
2265
|
/**
|
|
2333
|
-
*
|
|
2334
|
-
* @return String
|
|
2266
|
+
* The expression to evaluate this custom column.
|
|
2267
|
+
* @return String
|
|
2335
2268
|
*/
|
|
2336
|
-
get
|
|
2269
|
+
get expression():string;
|
|
2337
2270
|
/**
|
|
2338
|
-
*
|
|
2339
|
-
* @return
|
|
2271
|
+
* The name of the column to use.
|
|
2272
|
+
* @return String
|
|
2340
2273
|
*/
|
|
2341
|
-
get
|
|
2274
|
+
get name():string;
|
|
2342
2275
|
/**
|
|
2343
|
-
*
|
|
2344
|
-
* @return
|
|
2276
|
+
* The options for this custom column.
|
|
2277
|
+
* @return CustomColumOptions
|
|
2345
2278
|
*/
|
|
2346
|
-
get
|
|
2279
|
+
get options():CustomColumnOptions;
|
|
2347
2280
|
/**
|
|
2348
|
-
*
|
|
2349
|
-
*
|
|
2281
|
+
* Type of custom column. One of
|
|
2282
|
+
*
|
|
2283
|
+
* <ul>
|
|
2284
|
+
* <li>FORMAT_COLOR</li>
|
|
2285
|
+
* <li>FORMAT_NUMBER</li>
|
|
2286
|
+
* <li>FORMAT_DATE</li>
|
|
2287
|
+
* <li>NEW</li>
|
|
2288
|
+
* </ul>
|
|
2289
|
+
* @return String
|
|
2350
2290
|
*/
|
|
2351
|
-
get
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
/**
|
|
2355
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2356
|
-
*/
|
|
2357
|
-
export class BigDecimalWrapper {
|
|
2358
|
-
protected constructor();
|
|
2359
|
-
|
|
2360
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
2361
|
-
asNumber():number;
|
|
2362
|
-
valueOf():string;
|
|
2363
|
-
toString():string;
|
|
2364
|
-
equals(o:object):boolean;
|
|
2365
|
-
hashCode():number;
|
|
2291
|
+
get type():string;
|
|
2366
2292
|
}
|
|
2367
2293
|
|
|
2368
2294
|
export class LoginCredentials {
|
|
@@ -2374,58 +2300,46 @@ export namespace dh {
|
|
|
2374
2300
|
}
|
|
2375
2301
|
|
|
2376
2302
|
/**
|
|
2377
|
-
*
|
|
2303
|
+
* Deprecated for use in Deephaven Core.
|
|
2304
|
+
* @deprecated
|
|
2378
2305
|
*/
|
|
2379
|
-
export class
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
*/
|
|
2384
|
-
rollupNodeType?:RollupNodeTypeType|null;
|
|
2306
|
+
export class Client {
|
|
2307
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2308
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2309
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2385
2310
|
|
|
2386
2311
|
constructor();
|
|
2387
2312
|
}
|
|
2388
2313
|
|
|
2389
|
-
export class DateWrapper extends LongWrapper {
|
|
2390
|
-
protected constructor();
|
|
2391
|
-
|
|
2392
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
2393
|
-
asDate():Date;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
2314
|
/**
|
|
2397
|
-
*
|
|
2398
|
-
*
|
|
2399
|
-
*
|
|
2315
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
2316
|
+
*
|
|
2317
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
2318
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
2319
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
2400
2320
|
*/
|
|
2401
|
-
export class
|
|
2402
|
-
protected constructor();
|
|
2403
|
-
|
|
2404
|
-
static ofRange(first:number, last:number):RangeSet;
|
|
2405
|
-
static ofItems(rows:number[]):RangeSet;
|
|
2406
|
-
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
2407
|
-
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
2321
|
+
export class TreeTableConfig {
|
|
2408
2322
|
/**
|
|
2409
|
-
*
|
|
2410
|
-
* @return Iterator of {@link dh.LongWrapper}
|
|
2323
|
+
* The column representing the unique ID for each item
|
|
2411
2324
|
*/
|
|
2412
|
-
|
|
2325
|
+
idColumn:string;
|
|
2413
2326
|
/**
|
|
2414
|
-
* The
|
|
2415
|
-
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
2416
|
-
* property each time through a loop).
|
|
2417
|
-
* @return double
|
|
2327
|
+
* The column representing the parent ID for each item
|
|
2418
2328
|
*/
|
|
2419
|
-
|
|
2420
|
-
|
|
2329
|
+
parentColumn:string;
|
|
2330
|
+
/**
|
|
2331
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
2332
|
+
*/
|
|
2333
|
+
promoteOrphansToRoot:boolean;
|
|
2421
2334
|
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2425
|
-
static readonly EVENT_RECONNECT:string;
|
|
2426
|
-
static readonly EVENT_CONNECT:string;
|
|
2335
|
+
constructor();
|
|
2336
|
+
}
|
|
2427
2337
|
|
|
2338
|
+
export class DateWrapper extends LongWrapper {
|
|
2428
2339
|
protected constructor();
|
|
2340
|
+
|
|
2341
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
2342
|
+
asDate():Date;
|
|
2429
2343
|
}
|
|
2430
2344
|
|
|
2431
2345
|
/**
|
|
@@ -2459,126 +2373,211 @@ export namespace dh {
|
|
|
2459
2373
|
}
|
|
2460
2374
|
|
|
2461
2375
|
/**
|
|
2462
|
-
*
|
|
2463
|
-
*
|
|
2376
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
2377
|
+
* interpret these responses to see what to render, or how to respond.
|
|
2378
|
+
* <p>
|
|
2379
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
2380
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
2381
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
2382
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
2383
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
2384
|
+
* <p>
|
|
2385
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
2386
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
2387
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
2388
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
2389
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
2390
|
+
* <p>
|
|
2391
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
2392
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
2393
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
2394
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
2395
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
2396
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
2397
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
2398
|
+
* <p>
|
|
2399
|
+
* This can suggest several patterns for how plugins operate:
|
|
2400
|
+
* <ul>
|
|
2401
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
2402
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
2403
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
2404
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
2405
|
+
* provided to the JS API consumer.</li>
|
|
2406
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
2407
|
+
* which provided them. One concrete example of this could have been
|
|
2408
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
2409
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
2410
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
2411
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
2412
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
2413
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
2414
|
+
* an internal table instance.</li>
|
|
2415
|
+
* </ul>
|
|
2416
|
+
*
|
|
2417
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
2418
|
+
* <ul>
|
|
2419
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
2420
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
2421
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
2422
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
2423
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
2424
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
2425
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
2426
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
2427
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
2428
|
+
* </ul>
|
|
2464
2429
|
*/
|
|
2465
|
-
export class
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
2469
|
-
* @return String
|
|
2470
|
-
*/
|
|
2471
|
-
readonly constituentType?:string|null;
|
|
2472
|
-
readonly description?:string|null;
|
|
2430
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
2431
|
+
static readonly EVENT_MESSAGE:string;
|
|
2432
|
+
static readonly EVENT_CLOSE:string;
|
|
2473
2433
|
|
|
2474
2434
|
protected constructor();
|
|
2475
2435
|
|
|
2476
2436
|
/**
|
|
2477
|
-
*
|
|
2478
|
-
* @param row -
|
|
2479
|
-
* @return Any
|
|
2437
|
+
* Ends the client connection to the server.
|
|
2480
2438
|
*/
|
|
2481
|
-
|
|
2482
|
-
|
|
2439
|
+
close():void;
|
|
2440
|
+
getDataAsBase64():string;
|
|
2441
|
+
getDataAsU8():Uint8Array;
|
|
2442
|
+
getDataAsString():string;
|
|
2483
2443
|
/**
|
|
2484
|
-
*
|
|
2485
|
-
* @
|
|
2444
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
2445
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
2446
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
2486
2447
|
*/
|
|
2487
|
-
|
|
2448
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
2449
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2450
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2451
|
+
hasListeners(name:string):boolean;
|
|
2452
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2488
2453
|
/**
|
|
2489
|
-
*
|
|
2490
|
-
*
|
|
2491
|
-
*
|
|
2454
|
+
*
|
|
2455
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
2456
|
+
* them when finished using them.
|
|
2492
2457
|
*/
|
|
2493
|
-
|
|
2458
|
+
get exportedObjects():WidgetExportedObject[];
|
|
2494
2459
|
/**
|
|
2495
|
-
*
|
|
2496
|
-
* @
|
|
2497
|
-
* @return {@link dh.CustomColumn}
|
|
2460
|
+
*
|
|
2461
|
+
* @return the type of this widget
|
|
2498
2462
|
*/
|
|
2499
|
-
|
|
2463
|
+
get type():string;
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
export class IdeSession implements HasEventHandling {
|
|
2467
|
+
static readonly EVENT_COMMANDSTARTED:string;
|
|
2468
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2469
|
+
|
|
2470
|
+
protected constructor();
|
|
2471
|
+
|
|
2500
2472
|
/**
|
|
2501
|
-
*
|
|
2502
|
-
* @param
|
|
2503
|
-
* @
|
|
2473
|
+
* Load the named table, with columns and size information already fully populated.
|
|
2474
|
+
* @param name -
|
|
2475
|
+
* @param applyPreviewColumns - optional boolean
|
|
2476
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2504
2477
|
*/
|
|
2505
|
-
|
|
2478
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
2506
2479
|
/**
|
|
2507
|
-
*
|
|
2508
|
-
* @param
|
|
2509
|
-
* @return
|
|
2480
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
2481
|
+
* @param name -
|
|
2482
|
+
* @return promise of dh.plot.Figure
|
|
2510
2483
|
*/
|
|
2511
|
-
|
|
2512
|
-
toString():string;
|
|
2484
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
2513
2485
|
/**
|
|
2514
|
-
*
|
|
2515
|
-
*
|
|
2486
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
2487
|
+
* size is presently not available until the viewport is first set.
|
|
2488
|
+
* @param name -
|
|
2489
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
2516
2490
|
*/
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2491
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
2492
|
+
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2493
|
+
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2494
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2495
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2496
|
+
/**
|
|
2497
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
2498
|
+
* @param tables -
|
|
2499
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2522
2500
|
*/
|
|
2523
|
-
|
|
2501
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
2502
|
+
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2524
2503
|
/**
|
|
2525
|
-
*
|
|
2526
|
-
*
|
|
2527
|
-
*
|
|
2504
|
+
* Makes the `object` available to another user or another client on this same server which knows the value of
|
|
2505
|
+
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
2506
|
+
* which knows this value can read the same object.
|
|
2507
|
+
* <p>
|
|
2508
|
+
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
2509
|
+
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
2510
|
+
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
2511
|
+
* <p>
|
|
2512
|
+
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
2513
|
+
* prevent access by unauthorized clients.
|
|
2514
|
+
* @param object - the object to share with another client/user
|
|
2515
|
+
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
2516
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2517
|
+
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
2518
|
+
* by another client, or will reject if an error occurs.
|
|
2528
2519
|
*/
|
|
2529
|
-
|
|
2530
|
-
get isSortable():boolean;
|
|
2520
|
+
shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
|
|
2531
2521
|
/**
|
|
2532
|
-
*
|
|
2533
|
-
*
|
|
2522
|
+
* Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
|
|
2523
|
+
* client releases this object (or their session ends), the object will be available on the server.
|
|
2524
|
+
* <p>
|
|
2525
|
+
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
2526
|
+
* should provide this information.
|
|
2527
|
+
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
2528
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2529
|
+
* @param type - The type of the object, so it can be correctly read from the server
|
|
2530
|
+
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
2534
2531
|
*/
|
|
2535
|
-
|
|
2532
|
+
getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
|
|
2533
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2534
|
+
close():void;
|
|
2535
|
+
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2536
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2537
|
+
openDocument(params:object):void;
|
|
2538
|
+
changeDocument(params:object):void;
|
|
2539
|
+
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2540
|
+
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2541
|
+
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2542
|
+
closeDocument(params:object):void;
|
|
2536
2543
|
/**
|
|
2537
|
-
*
|
|
2538
|
-
*
|
|
2539
|
-
* @param
|
|
2540
|
-
* @
|
|
2541
|
-
* @return {@link dh.CustomColumn}
|
|
2544
|
+
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
2545
|
+
* values will be null.
|
|
2546
|
+
* @param size -
|
|
2547
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2542
2548
|
*/
|
|
2543
|
-
|
|
2549
|
+
emptyTable(size:number):Promise<Table>;
|
|
2544
2550
|
/**
|
|
2545
|
-
* a
|
|
2546
|
-
*
|
|
2547
|
-
* @param
|
|
2548
|
-
* @param
|
|
2549
|
-
* @return {@link dh.
|
|
2551
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
2552
|
+
* the table will be populated with the interval from the specified date until now.
|
|
2553
|
+
* @param periodNanos -
|
|
2554
|
+
* @param startTime -
|
|
2555
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2550
2556
|
*/
|
|
2551
|
-
|
|
2557
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
2558
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2559
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2560
|
+
hasListeners(name:string):boolean;
|
|
2561
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2552
2562
|
}
|
|
2553
2563
|
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
2561
|
-
get code():string;
|
|
2562
|
-
}
|
|
2564
|
+
export class QueryInfo {
|
|
2565
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
2566
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2567
|
+
static readonly EVENT_RECONNECT:string;
|
|
2568
|
+
static readonly EVENT_CONNECT:string;
|
|
2563
2569
|
|
|
2564
|
-
export class LongWrapper {
|
|
2565
2570
|
protected constructor();
|
|
2566
|
-
|
|
2567
|
-
static ofString(str:string):LongWrapper;
|
|
2568
|
-
asNumber():number;
|
|
2569
|
-
valueOf():string;
|
|
2570
|
-
toString():string;
|
|
2571
2571
|
}
|
|
2572
2572
|
|
|
2573
2573
|
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
static readonly
|
|
2580
|
-
static readonly
|
|
2581
|
-
static readonly BOOLEAN:ValueTypeType;
|
|
2574
|
+
/**
|
|
2575
|
+
* Describes the type of node in a rollup table.
|
|
2576
|
+
*/
|
|
2577
|
+
type RollupNodeTypeType = string;
|
|
2578
|
+
export class RollupNodeType {
|
|
2579
|
+
static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
|
|
2580
|
+
static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
|
|
2582
2581
|
}
|
|
2583
2582
|
|
|
2584
2583
|
type SearchDisplayModeType = string;
|
|
@@ -2604,6 +2603,16 @@ export namespace dh {
|
|
|
2604
2603
|
static readonly TREEMAP:VariableTypeType;
|
|
2605
2604
|
}
|
|
2606
2605
|
|
|
2606
|
+
type ValueTypeType = string;
|
|
2607
|
+
export class ValueType {
|
|
2608
|
+
static readonly STRING:ValueTypeType;
|
|
2609
|
+
static readonly NUMBER:ValueTypeType;
|
|
2610
|
+
static readonly DOUBLE:ValueTypeType;
|
|
2611
|
+
static readonly LONG:ValueTypeType;
|
|
2612
|
+
static readonly DATETIME:ValueTypeType;
|
|
2613
|
+
static readonly BOOLEAN:ValueTypeType;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2607
2616
|
/**
|
|
2608
2617
|
* This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
|
|
2609
2618
|
*/
|
|
@@ -2626,19 +2635,63 @@ export namespace dh {
|
|
|
2626
2635
|
static readonly SKIP:AggregationOperationType;
|
|
2627
2636
|
}
|
|
2628
2637
|
|
|
2629
|
-
/**
|
|
2630
|
-
* Describes the type of node in a rollup table.
|
|
2631
|
-
*/
|
|
2632
|
-
type RollupNodeTypeType = string;
|
|
2633
|
-
export class RollupNodeType {
|
|
2634
|
-
static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
|
|
2635
|
-
static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
2638
|
}
|
|
2639
2639
|
|
|
2640
2640
|
export namespace dh.ide {
|
|
2641
2641
|
|
|
2642
|
+
/**
|
|
2643
|
+
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2644
|
+
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2645
|
+
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
2646
|
+
* new types.
|
|
2647
|
+
*/
|
|
2648
|
+
export interface VariableChanges {
|
|
2649
|
+
/**
|
|
2650
|
+
*
|
|
2651
|
+
* @return The variables that no longer exist after this operation, or were replaced by some variable with a
|
|
2652
|
+
* different type.
|
|
2653
|
+
*/
|
|
2654
|
+
get removed():Array<VariableDefinition>;
|
|
2655
|
+
/**
|
|
2656
|
+
*
|
|
2657
|
+
* @return The variables that were created by this operation, or have a new type.
|
|
2658
|
+
*/
|
|
2659
|
+
get created():Array<VariableDefinition>;
|
|
2660
|
+
/**
|
|
2661
|
+
*
|
|
2662
|
+
* @return The variables that changed value during this operation.
|
|
2663
|
+
*/
|
|
2664
|
+
get updated():Array<VariableDefinition>;
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2668
|
+
* server.
|
|
2669
|
+
*/
|
|
2670
|
+
export interface LogItem {
|
|
2671
|
+
/**
|
|
2672
|
+
* The level of the log message, enabling the client to ignore messages.
|
|
2673
|
+
* @return String
|
|
2674
|
+
*/
|
|
2675
|
+
get logLevel():string;
|
|
2676
|
+
/**
|
|
2677
|
+
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2678
|
+
* @return double
|
|
2679
|
+
*/
|
|
2680
|
+
get micros():number;
|
|
2681
|
+
/**
|
|
2682
|
+
* The log message written on the server.
|
|
2683
|
+
* @return String
|
|
2684
|
+
*/
|
|
2685
|
+
get message():string;
|
|
2686
|
+
}
|
|
2687
|
+
/**
|
|
2688
|
+
* Specifies a type and either id or name (but not both).
|
|
2689
|
+
*/
|
|
2690
|
+
export interface VariableDescriptor {
|
|
2691
|
+
type:string;
|
|
2692
|
+
id?:string|null;
|
|
2693
|
+
name?:string|null;
|
|
2694
|
+
}
|
|
2642
2695
|
/**
|
|
2643
2696
|
* Indicates the result of code run on the server.
|
|
2644
2697
|
*/
|
|
@@ -2695,59 +2748,6 @@ export namespace dh.ide {
|
|
|
2695
2748
|
*/
|
|
2696
2749
|
get applicationName():string;
|
|
2697
2750
|
}
|
|
2698
|
-
/**
|
|
2699
|
-
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2700
|
-
* server.
|
|
2701
|
-
*/
|
|
2702
|
-
export interface LogItem {
|
|
2703
|
-
/**
|
|
2704
|
-
* The level of the log message, enabling the client to ignore messages.
|
|
2705
|
-
* @return String
|
|
2706
|
-
*/
|
|
2707
|
-
get logLevel():string;
|
|
2708
|
-
/**
|
|
2709
|
-
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2710
|
-
* @return double
|
|
2711
|
-
*/
|
|
2712
|
-
get micros():number;
|
|
2713
|
-
/**
|
|
2714
|
-
* The log message written on the server.
|
|
2715
|
-
* @return String
|
|
2716
|
-
*/
|
|
2717
|
-
get message():string;
|
|
2718
|
-
}
|
|
2719
|
-
/**
|
|
2720
|
-
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2721
|
-
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
2722
|
-
* a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
|
|
2723
|
-
* new types.
|
|
2724
|
-
*/
|
|
2725
|
-
export interface VariableChanges {
|
|
2726
|
-
/**
|
|
2727
|
-
*
|
|
2728
|
-
* @return The variables that no longer exist after this operation, or were replaced by some variable with a
|
|
2729
|
-
* different type.
|
|
2730
|
-
*/
|
|
2731
|
-
get removed():Array<VariableDefinition>;
|
|
2732
|
-
/**
|
|
2733
|
-
*
|
|
2734
|
-
* @return The variables that were created by this operation, or have a new type.
|
|
2735
|
-
*/
|
|
2736
|
-
get created():Array<VariableDefinition>;
|
|
2737
|
-
/**
|
|
2738
|
-
*
|
|
2739
|
-
* @return The variables that changed value during this operation.
|
|
2740
|
-
*/
|
|
2741
|
-
get updated():Array<VariableDefinition>;
|
|
2742
|
-
}
|
|
2743
|
-
/**
|
|
2744
|
-
* Specifies a type and either id or name (but not both).
|
|
2745
|
-
*/
|
|
2746
|
-
export interface VariableDescriptor {
|
|
2747
|
-
type:string;
|
|
2748
|
-
id?:string|null;
|
|
2749
|
-
name?:string|null;
|
|
2750
|
-
}
|
|
2751
2751
|
}
|
|
2752
2752
|
|
|
2753
2753
|
export namespace dh.grpc {
|
|
@@ -2769,33 +2769,15 @@ export namespace dh.grpc {
|
|
|
2769
2769
|
* status is the HTTP status code. If the connection could not be made, the status should be 0.
|
|
2770
2770
|
*/
|
|
2771
2771
|
onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
|
|
2772
|
-
/**
|
|
2773
|
-
* Callback for when a chunk of data is received.
|
|
2774
|
-
*/
|
|
2775
|
-
onChunk:(chunk:Uint8Array)=>void;
|
|
2776
|
-
/**
|
|
2777
|
-
* Callback for when the stream ends, with an error instance if it can be provided. Note that the present
|
|
2778
|
-
* implementation does not consume errors, even if provided.
|
|
2779
|
-
*/
|
|
2780
|
-
onEnd:(error?:Error|undefined|null)=>void;
|
|
2781
|
-
}
|
|
2782
|
-
/**
|
|
2783
|
-
* Factory for creating gRPC transports.
|
|
2784
|
-
*/
|
|
2785
|
-
export interface GrpcTransportFactory {
|
|
2786
|
-
/**
|
|
2787
|
-
* Create a new transport instance.
|
|
2788
|
-
* @param options - options for creating the transport
|
|
2789
|
-
* @return a transport instance to use for gRPC communication
|
|
2772
|
+
/**
|
|
2773
|
+
* Callback for when a chunk of data is received.
|
|
2790
2774
|
*/
|
|
2791
|
-
|
|
2775
|
+
onChunk:(chunk:Uint8Array)=>void;
|
|
2792
2776
|
/**
|
|
2793
|
-
*
|
|
2794
|
-
*
|
|
2795
|
-
* @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
|
|
2796
|
-
* Open/Next gRPC calls should be used
|
|
2777
|
+
* Callback for when the stream ends, with an error instance if it can be provided. Note that the present
|
|
2778
|
+
* implementation does not consume errors, even if provided.
|
|
2797
2779
|
*/
|
|
2798
|
-
|
|
2780
|
+
onEnd:(error?:Error|undefined|null)=>void;
|
|
2799
2781
|
}
|
|
2800
2782
|
/**
|
|
2801
2783
|
* gRPC transport implementation.
|
|
@@ -2822,6 +2804,24 @@ export namespace dh.grpc {
|
|
|
2822
2804
|
*/
|
|
2823
2805
|
cancel():void;
|
|
2824
2806
|
}
|
|
2807
|
+
/**
|
|
2808
|
+
* Factory for creating gRPC transports.
|
|
2809
|
+
*/
|
|
2810
|
+
export interface GrpcTransportFactory {
|
|
2811
|
+
/**
|
|
2812
|
+
* Create a new transport instance.
|
|
2813
|
+
* @param options - options for creating the transport
|
|
2814
|
+
* @return a transport instance to use for gRPC communication
|
|
2815
|
+
*/
|
|
2816
|
+
create(options:GrpcTransportOptions):GrpcTransport;
|
|
2817
|
+
/**
|
|
2818
|
+
* Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it
|
|
2819
|
+
* more than once before {@link GrpcTransport.finishSend} should be called.
|
|
2820
|
+
* @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
|
|
2821
|
+
* Open/Next gRPC calls should be used
|
|
2822
|
+
*/
|
|
2823
|
+
get supportsClientStreaming():boolean;
|
|
2824
|
+
}
|
|
2825
2825
|
}
|
|
2826
2826
|
|
|
2827
2827
|
export namespace dh.i18n {
|
|
@@ -3093,25 +3093,6 @@ export namespace dh.i18n {
|
|
|
3093
3093
|
|
|
3094
3094
|
export namespace dh.plot {
|
|
3095
3095
|
|
|
3096
|
-
export interface FigureDataUpdatedEvent {
|
|
3097
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3098
|
-
get series():Series[];
|
|
3099
|
-
}
|
|
3100
|
-
/**
|
|
3101
|
-
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
3102
|
-
*/
|
|
3103
|
-
export interface MultiSeries {
|
|
3104
|
-
/**
|
|
3105
|
-
* The name for this multi-series.
|
|
3106
|
-
* @return String
|
|
3107
|
-
*/
|
|
3108
|
-
get name():string;
|
|
3109
|
-
/**
|
|
3110
|
-
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
3111
|
-
* @return int
|
|
3112
|
-
*/
|
|
3113
|
-
get plotStyle():SeriesPlotStyleType;
|
|
3114
|
-
}
|
|
3115
3096
|
/**
|
|
3116
3097
|
* Describes how to access and display data required within a series.
|
|
3117
3098
|
*/
|
|
@@ -3132,6 +3113,31 @@ export namespace dh.plot {
|
|
|
3132
3113
|
*/
|
|
3133
3114
|
get type():SourceTypeType;
|
|
3134
3115
|
}
|
|
3116
|
+
export interface OneClick {
|
|
3117
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
3118
|
+
getValueForColumn(columName:string):any;
|
|
3119
|
+
get requireAllFiltersToDisplay():boolean;
|
|
3120
|
+
get columns():dh.Column[];
|
|
3121
|
+
}
|
|
3122
|
+
export interface FigureDataUpdatedEvent {
|
|
3123
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3124
|
+
get series():Series[];
|
|
3125
|
+
}
|
|
3126
|
+
/**
|
|
3127
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
3128
|
+
*/
|
|
3129
|
+
export interface MultiSeries {
|
|
3130
|
+
/**
|
|
3131
|
+
* The name for this multi-series.
|
|
3132
|
+
* @return String
|
|
3133
|
+
*/
|
|
3134
|
+
get name():string;
|
|
3135
|
+
/**
|
|
3136
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
3137
|
+
* @return int
|
|
3138
|
+
*/
|
|
3139
|
+
get plotStyle():SeriesPlotStyleType;
|
|
3140
|
+
}
|
|
3135
3141
|
/**
|
|
3136
3142
|
* Provides access to the data for displaying in a figure.
|
|
3137
3143
|
*/
|
|
@@ -3176,12 +3182,6 @@ export namespace dh.plot {
|
|
|
3176
3182
|
get multiSeries():MultiSeries;
|
|
3177
3183
|
get shapeLabel():string;
|
|
3178
3184
|
}
|
|
3179
|
-
export interface OneClick {
|
|
3180
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
3181
|
-
getValueForColumn(columName:string):any;
|
|
3182
|
-
get requireAllFiltersToDisplay():boolean;
|
|
3183
|
-
get columns():dh.Column[];
|
|
3184
|
-
}
|
|
3185
3185
|
/**
|
|
3186
3186
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
3187
3187
|
* may be shared between Series instances.
|
|
@@ -3270,30 +3270,30 @@ export namespace dh.plot {
|
|
|
3270
3270
|
constructor();
|
|
3271
3271
|
}
|
|
3272
3272
|
|
|
3273
|
-
export class
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3273
|
+
export class SourceDescriptor {
|
|
3274
|
+
axis:AxisDescriptor;
|
|
3275
|
+
table:dh.Table;
|
|
3276
|
+
columnName:string;
|
|
3277
|
+
type:string;
|
|
3278
|
+
|
|
3279
|
+
constructor();
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3284
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3285
|
+
* keep that cached as well.
|
|
3286
|
+
*/
|
|
3287
|
+
export class ChartData {
|
|
3288
|
+
constructor(table:dh.Table);
|
|
3289
|
+
|
|
3290
|
+
update(tableData:dh.SubscriptionTableData):void;
|
|
3291
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3290
3292
|
/**
|
|
3291
|
-
*
|
|
3292
|
-
*
|
|
3293
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3294
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3293
3295
|
*/
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
protected constructor();
|
|
3296
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3297
3297
|
}
|
|
3298
3298
|
|
|
3299
3299
|
/**
|
|
@@ -3416,80 +3416,78 @@ export namespace dh.plot {
|
|
|
3416
3416
|
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3417
3417
|
}
|
|
3418
3418
|
|
|
3419
|
-
export class
|
|
3420
|
-
|
|
3421
|
-
errors:Array<string>;
|
|
3422
|
-
|
|
3423
|
-
protected constructor();
|
|
3424
|
-
}
|
|
3425
|
-
|
|
3426
|
-
export class ChartDescriptor {
|
|
3427
|
-
colspan?:number|null;
|
|
3428
|
-
rowspan?:number|null;
|
|
3429
|
-
series:Array<SeriesDescriptor>;
|
|
3430
|
-
axes:Array<AxisDescriptor>;
|
|
3431
|
-
chartType:string;
|
|
3432
|
-
title?:string|null;
|
|
3433
|
-
titleFont?:string|null;
|
|
3434
|
-
titleColor?:string|null;
|
|
3435
|
-
showLegend?:boolean|null;
|
|
3436
|
-
legendFont?:string|null;
|
|
3437
|
-
legendColor?:string|null;
|
|
3438
|
-
is3d?:boolean|null;
|
|
3439
|
-
|
|
3440
|
-
constructor();
|
|
3441
|
-
}
|
|
3442
|
-
|
|
3443
|
-
export class SourceDescriptor {
|
|
3444
|
-
axis:AxisDescriptor;
|
|
3445
|
-
table:dh.Table;
|
|
3446
|
-
columnName:string;
|
|
3419
|
+
export class AxisDescriptor {
|
|
3420
|
+
formatType:string;
|
|
3447
3421
|
type:string;
|
|
3422
|
+
position:string;
|
|
3423
|
+
log?:boolean|null;
|
|
3424
|
+
label?:string|null;
|
|
3425
|
+
labelFont?:string|null;
|
|
3426
|
+
ticksFont?:string|null;
|
|
3427
|
+
formatPattern?:string|null;
|
|
3428
|
+
color?:string|null;
|
|
3429
|
+
minRange?:number|null;
|
|
3430
|
+
maxRange?:number|null;
|
|
3431
|
+
minorTicksVisible?:boolean|null;
|
|
3432
|
+
majorTicksVisible?:boolean|null;
|
|
3433
|
+
minorTickCount?:number|null;
|
|
3434
|
+
gapBetweenMajorTicks?:number|null;
|
|
3435
|
+
majorTickLocations?:Array<number>|null;
|
|
3436
|
+
tickLabelAngle?:number|null;
|
|
3437
|
+
invert?:boolean|null;
|
|
3438
|
+
isTimeAxis?:boolean|null;
|
|
3448
3439
|
|
|
3449
3440
|
constructor();
|
|
3450
3441
|
}
|
|
3451
3442
|
|
|
3452
|
-
export class
|
|
3453
|
-
table:dh.Table;
|
|
3454
|
-
source:SeriesDataSource;
|
|
3455
|
-
|
|
3443
|
+
export class SeriesDataSourceException {
|
|
3456
3444
|
protected constructor();
|
|
3445
|
+
|
|
3446
|
+
get source():SeriesDataSource;
|
|
3447
|
+
get message():string;
|
|
3457
3448
|
}
|
|
3458
3449
|
|
|
3459
3450
|
/**
|
|
3460
|
-
*
|
|
3451
|
+
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
3461
3452
|
*/
|
|
3462
|
-
export class
|
|
3463
|
-
|
|
3453
|
+
export class FigureDescriptor {
|
|
3454
|
+
title?:string|null;
|
|
3455
|
+
titleFont?:string|null;
|
|
3456
|
+
titleColor?:string|null;
|
|
3457
|
+
isResizable?:boolean|null;
|
|
3458
|
+
isDefaultTheme?:boolean|null;
|
|
3459
|
+
updateInterval?:number|null;
|
|
3460
|
+
cols?:number|null;
|
|
3461
|
+
rows?:number|null;
|
|
3462
|
+
charts:Array<ChartDescriptor>;
|
|
3464
3463
|
|
|
3465
|
-
|
|
3466
|
-
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3467
|
-
* the same visual fidelity as the original table, but with fewer rows.
|
|
3468
|
-
* @param table - The table to downsample.
|
|
3469
|
-
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3470
|
-
* @param yCols - The names of the Y columns to downsample.
|
|
3471
|
-
* @param width - The width of the visible area in pixels.
|
|
3472
|
-
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3473
|
-
* @return A promise that resolves to the downsampled table.
|
|
3474
|
-
*/
|
|
3475
|
-
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3464
|
+
constructor();
|
|
3476
3465
|
}
|
|
3477
3466
|
|
|
3478
|
-
|
|
3479
|
-
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3480
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3481
|
-
* keep that cached as well.
|
|
3482
|
-
*/
|
|
3483
|
-
export class ChartData {
|
|
3484
|
-
constructor(table:dh.Table);
|
|
3485
|
-
|
|
3486
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3487
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3467
|
+
export class DownsampleOptions {
|
|
3488
3468
|
/**
|
|
3489
|
-
*
|
|
3490
|
-
*
|
|
3469
|
+
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
3470
|
+
* this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
|
|
3471
|
+
* series.subscribe().
|
|
3491
3472
|
*/
|
|
3492
|
-
|
|
3473
|
+
static MAX_SERIES_SIZE:number;
|
|
3474
|
+
/**
|
|
3475
|
+
* Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
|
|
3476
|
+
* downsampling disabled, the series will not load data.
|
|
3477
|
+
*/
|
|
3478
|
+
static MAX_SUBSCRIPTION_SIZE:number;
|
|
3479
|
+
/**
|
|
3480
|
+
* Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
|
|
3481
|
+
* axes are configured.
|
|
3482
|
+
*/
|
|
3483
|
+
static readonly DEFAULT:DownsampleOptions;
|
|
3484
|
+
/**
|
|
3485
|
+
* Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
|
|
3486
|
+
* the limit of MAX_SUBSCRIPTION_SIZE.
|
|
3487
|
+
*/
|
|
3488
|
+
static readonly DISABLE:DownsampleOptions;
|
|
3489
|
+
|
|
3490
|
+
protected constructor();
|
|
3493
3491
|
}
|
|
3494
3492
|
|
|
3495
3493
|
/**
|
|
@@ -3533,53 +3531,55 @@ export namespace dh.plot {
|
|
|
3533
3531
|
get row():number;
|
|
3534
3532
|
get legendColor():string;
|
|
3535
3533
|
get legendFont():string;
|
|
3536
|
-
get multiSeries():MultiSeries[];
|
|
3537
|
-
}
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
3541
|
-
*/
|
|
3542
|
-
export class FigureDescriptor {
|
|
3543
|
-
title?:string|null;
|
|
3544
|
-
titleFont?:string|null;
|
|
3545
|
-
titleColor?:string|null;
|
|
3546
|
-
isResizable?:boolean|null;
|
|
3547
|
-
isDefaultTheme?:boolean|null;
|
|
3548
|
-
updateInterval?:number|null;
|
|
3549
|
-
cols?:number|null;
|
|
3550
|
-
rows?:number|null;
|
|
3551
|
-
charts:Array<ChartDescriptor>;
|
|
3534
|
+
get multiSeries():MultiSeries[];
|
|
3535
|
+
}
|
|
3552
3536
|
|
|
3553
|
-
|
|
3537
|
+
export class FigureSourceException {
|
|
3538
|
+
table:dh.Table;
|
|
3539
|
+
source:SeriesDataSource;
|
|
3540
|
+
|
|
3541
|
+
protected constructor();
|
|
3554
3542
|
}
|
|
3555
3543
|
|
|
3556
|
-
|
|
3544
|
+
/**
|
|
3545
|
+
* Helper class for plot downsampling methods.
|
|
3546
|
+
*/
|
|
3547
|
+
export class Downsample {
|
|
3557
3548
|
protected constructor();
|
|
3558
3549
|
|
|
3559
|
-
|
|
3560
|
-
|
|
3550
|
+
/**
|
|
3551
|
+
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3552
|
+
* the same visual fidelity as the original table, but with fewer rows.
|
|
3553
|
+
* @param table - The table to downsample.
|
|
3554
|
+
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3555
|
+
* @param yCols - The names of the Y columns to downsample.
|
|
3556
|
+
* @param width - The width of the visible area in pixels.
|
|
3557
|
+
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3558
|
+
* @return A promise that resolves to the downsampled table.
|
|
3559
|
+
*/
|
|
3560
|
+
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3561
3561
|
}
|
|
3562
3562
|
|
|
3563
|
-
export class
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3563
|
+
export class FigureFetchError {
|
|
3564
|
+
error:object;
|
|
3565
|
+
errors:Array<string>;
|
|
3566
|
+
|
|
3567
|
+
protected constructor();
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3570
|
+
export class ChartDescriptor {
|
|
3571
|
+
colspan?:number|null;
|
|
3572
|
+
rowspan?:number|null;
|
|
3573
|
+
series:Array<SeriesDescriptor>;
|
|
3574
|
+
axes:Array<AxisDescriptor>;
|
|
3575
|
+
chartType:string;
|
|
3576
|
+
title?:string|null;
|
|
3577
|
+
titleFont?:string|null;
|
|
3578
|
+
titleColor?:string|null;
|
|
3579
|
+
showLegend?:boolean|null;
|
|
3580
|
+
legendFont?:string|null;
|
|
3581
|
+
legendColor?:string|null;
|
|
3582
|
+
is3d?:boolean|null;
|
|
3583
3583
|
|
|
3584
3584
|
constructor();
|
|
3585
3585
|
}
|
|
@@ -3591,44 +3591,14 @@ export namespace dh.plot {
|
|
|
3591
3591
|
static readonly NUMBER:AxisFormatTypeType;
|
|
3592
3592
|
}
|
|
3593
3593
|
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
static readonly
|
|
3601
|
-
static readonly
|
|
3602
|
-
static readonly OHLC:ChartTypeType;
|
|
3603
|
-
static readonly CATEGORY:ChartTypeType;
|
|
3604
|
-
static readonly XYZ:ChartTypeType;
|
|
3605
|
-
static readonly CATEGORY_3D:ChartTypeType;
|
|
3606
|
-
static readonly TREEMAP:ChartTypeType;
|
|
3607
|
-
}
|
|
3608
|
-
|
|
3609
|
-
type AxisPositionType = number;
|
|
3610
|
-
export class AxisPosition {
|
|
3611
|
-
static readonly TOP:AxisPositionType;
|
|
3612
|
-
static readonly BOTTOM:AxisPositionType;
|
|
3613
|
-
static readonly LEFT:AxisPositionType;
|
|
3614
|
-
static readonly RIGHT:AxisPositionType;
|
|
3615
|
-
static readonly NONE:AxisPositionType;
|
|
3616
|
-
}
|
|
3617
|
-
|
|
3618
|
-
type SeriesPlotStyleType = number;
|
|
3619
|
-
export class SeriesPlotStyle {
|
|
3620
|
-
static readonly BAR:SeriesPlotStyleType;
|
|
3621
|
-
static readonly STACKED_BAR:SeriesPlotStyleType;
|
|
3622
|
-
static readonly LINE:SeriesPlotStyleType;
|
|
3623
|
-
static readonly AREA:SeriesPlotStyleType;
|
|
3624
|
-
static readonly STACKED_AREA:SeriesPlotStyleType;
|
|
3625
|
-
static readonly PIE:SeriesPlotStyleType;
|
|
3626
|
-
static readonly HISTOGRAM:SeriesPlotStyleType;
|
|
3627
|
-
static readonly OHLC:SeriesPlotStyleType;
|
|
3628
|
-
static readonly SCATTER:SeriesPlotStyleType;
|
|
3629
|
-
static readonly STEP:SeriesPlotStyleType;
|
|
3630
|
-
static readonly ERROR_BAR:SeriesPlotStyleType;
|
|
3631
|
-
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3594
|
+
type AxisTypeType = number;
|
|
3595
|
+
export class AxisType {
|
|
3596
|
+
static readonly X:AxisTypeType;
|
|
3597
|
+
static readonly Y:AxisTypeType;
|
|
3598
|
+
static readonly SHAPE:AxisTypeType;
|
|
3599
|
+
static readonly SIZE:AxisTypeType;
|
|
3600
|
+
static readonly LABEL:AxisTypeType;
|
|
3601
|
+
static readonly COLOR:AxisTypeType;
|
|
3632
3602
|
}
|
|
3633
3603
|
|
|
3634
3604
|
/**
|
|
@@ -3660,55 +3630,77 @@ export namespace dh.plot {
|
|
|
3660
3630
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3661
3631
|
}
|
|
3662
3632
|
|
|
3663
|
-
type
|
|
3664
|
-
export class
|
|
3665
|
-
static readonly
|
|
3666
|
-
static readonly
|
|
3667
|
-
static readonly
|
|
3668
|
-
static readonly
|
|
3669
|
-
static readonly
|
|
3670
|
-
|
|
3633
|
+
type AxisPositionType = number;
|
|
3634
|
+
export class AxisPosition {
|
|
3635
|
+
static readonly TOP:AxisPositionType;
|
|
3636
|
+
static readonly BOTTOM:AxisPositionType;
|
|
3637
|
+
static readonly LEFT:AxisPositionType;
|
|
3638
|
+
static readonly RIGHT:AxisPositionType;
|
|
3639
|
+
static readonly NONE:AxisPositionType;
|
|
3640
|
+
}
|
|
3641
|
+
|
|
3642
|
+
type SeriesPlotStyleType = number;
|
|
3643
|
+
export class SeriesPlotStyle {
|
|
3644
|
+
static readonly BAR:SeriesPlotStyleType;
|
|
3645
|
+
static readonly STACKED_BAR:SeriesPlotStyleType;
|
|
3646
|
+
static readonly LINE:SeriesPlotStyleType;
|
|
3647
|
+
static readonly AREA:SeriesPlotStyleType;
|
|
3648
|
+
static readonly STACKED_AREA:SeriesPlotStyleType;
|
|
3649
|
+
static readonly PIE:SeriesPlotStyleType;
|
|
3650
|
+
static readonly HISTOGRAM:SeriesPlotStyleType;
|
|
3651
|
+
static readonly OHLC:SeriesPlotStyleType;
|
|
3652
|
+
static readonly SCATTER:SeriesPlotStyleType;
|
|
3653
|
+
static readonly STEP:SeriesPlotStyleType;
|
|
3654
|
+
static readonly ERROR_BAR:SeriesPlotStyleType;
|
|
3655
|
+
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
/**
|
|
3659
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3660
|
+
* those series should be rendered.
|
|
3661
|
+
*/
|
|
3662
|
+
type ChartTypeType = number;
|
|
3663
|
+
export class ChartType {
|
|
3664
|
+
static readonly XY:ChartTypeType;
|
|
3665
|
+
static readonly PIE:ChartTypeType;
|
|
3666
|
+
static readonly OHLC:ChartTypeType;
|
|
3667
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3668
|
+
static readonly XYZ:ChartTypeType;
|
|
3669
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3670
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3671
3671
|
}
|
|
3672
3672
|
|
|
3673
3673
|
}
|
|
3674
3674
|
|
|
3675
3675
|
export namespace dh.lsp {
|
|
3676
3676
|
|
|
3677
|
-
export class
|
|
3677
|
+
export class CompletionItem {
|
|
3678
3678
|
label:string;
|
|
3679
|
+
kind:number;
|
|
3680
|
+
detail:string;
|
|
3679
3681
|
documentation:MarkupContent;
|
|
3682
|
+
deprecated:boolean;
|
|
3683
|
+
preselect:boolean;
|
|
3684
|
+
textEdit:TextEdit;
|
|
3685
|
+
sortText:string;
|
|
3686
|
+
filterText:string;
|
|
3687
|
+
insertTextFormat:number;
|
|
3688
|
+
additionalTextEdits:Array<TextEdit>;
|
|
3689
|
+
commitCharacters:Array<string>;
|
|
3680
3690
|
|
|
3681
3691
|
constructor();
|
|
3682
3692
|
}
|
|
3683
3693
|
|
|
3684
|
-
export class
|
|
3685
|
-
|
|
3686
|
-
|
|
3694
|
+
export class ParameterInformation {
|
|
3695
|
+
label:string;
|
|
3696
|
+
documentation:MarkupContent;
|
|
3687
3697
|
|
|
3688
3698
|
constructor();
|
|
3689
3699
|
}
|
|
3690
3700
|
|
|
3691
|
-
export class
|
|
3692
|
-
contents:MarkupContent;
|
|
3701
|
+
export class TextEdit {
|
|
3693
3702
|
range:Range;
|
|
3694
|
-
|
|
3695
|
-
constructor();
|
|
3696
|
-
}
|
|
3697
|
-
|
|
3698
|
-
export class Range {
|
|
3699
|
-
start:Position;
|
|
3700
|
-
end:Position;
|
|
3701
|
-
|
|
3702
|
-
constructor();
|
|
3703
|
-
|
|
3704
|
-
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3705
|
-
}
|
|
3706
|
-
|
|
3707
|
-
export class SignatureInformation {
|
|
3708
|
-
label:string;
|
|
3709
|
-
documentation:MarkupContent;
|
|
3710
|
-
parameters:Array<ParameterInformation>;
|
|
3711
|
-
activeParameter:number;
|
|
3703
|
+
text:string;
|
|
3712
3704
|
|
|
3713
3705
|
constructor();
|
|
3714
3706
|
}
|
|
@@ -3734,19 +3726,9 @@ export namespace dh.lsp {
|
|
|
3734
3726
|
copy():Position;
|
|
3735
3727
|
}
|
|
3736
3728
|
|
|
3737
|
-
export class
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
detail:string;
|
|
3741
|
-
documentation:MarkupContent;
|
|
3742
|
-
deprecated:boolean;
|
|
3743
|
-
preselect:boolean;
|
|
3744
|
-
textEdit:TextEdit;
|
|
3745
|
-
sortText:string;
|
|
3746
|
-
filterText:string;
|
|
3747
|
-
insertTextFormat:number;
|
|
3748
|
-
additionalTextEdits:Array<TextEdit>;
|
|
3749
|
-
commitCharacters:Array<string>;
|
|
3729
|
+
export class Hover {
|
|
3730
|
+
contents:MarkupContent;
|
|
3731
|
+
range:Range;
|
|
3750
3732
|
|
|
3751
3733
|
constructor();
|
|
3752
3734
|
}
|
|
@@ -3758,10 +3740,40 @@ export namespace dh.lsp {
|
|
|
3758
3740
|
constructor();
|
|
3759
3741
|
}
|
|
3760
3742
|
|
|
3743
|
+
export class SignatureInformation {
|
|
3744
|
+
label:string;
|
|
3745
|
+
documentation:MarkupContent;
|
|
3746
|
+
parameters:Array<ParameterInformation>;
|
|
3747
|
+
activeParameter:number;
|
|
3748
|
+
|
|
3749
|
+
constructor();
|
|
3750
|
+
}
|
|
3751
|
+
|
|
3752
|
+
export class Range {
|
|
3753
|
+
start:Position;
|
|
3754
|
+
end:Position;
|
|
3755
|
+
|
|
3756
|
+
constructor();
|
|
3757
|
+
|
|
3758
|
+
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
3761
|
}
|
|
3762
3762
|
|
|
3763
3763
|
export namespace dh.calendar {
|
|
3764
3764
|
|
|
3765
|
+
export interface Holiday {
|
|
3766
|
+
/**
|
|
3767
|
+
* The date of the Holiday.
|
|
3768
|
+
* @return {@link dh.LocalDateWrapper}
|
|
3769
|
+
*/
|
|
3770
|
+
get date():dh.LocalDateWrapper;
|
|
3771
|
+
/**
|
|
3772
|
+
* The business periods that are open on the holiday.
|
|
3773
|
+
* @return dh.calendar.BusinessPeriod
|
|
3774
|
+
*/
|
|
3775
|
+
get businessPeriods():Array<BusinessPeriod>;
|
|
3776
|
+
}
|
|
3765
3777
|
/**
|
|
3766
3778
|
* Defines a calendar with business hours and holidays.
|
|
3767
3779
|
*/
|
|
@@ -3792,18 +3804,6 @@ export namespace dh.calendar {
|
|
|
3792
3804
|
*/
|
|
3793
3805
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3794
3806
|
}
|
|
3795
|
-
export interface Holiday {
|
|
3796
|
-
/**
|
|
3797
|
-
* The date of the Holiday.
|
|
3798
|
-
* @return {@link dh.LocalDateWrapper}
|
|
3799
|
-
*/
|
|
3800
|
-
get date():dh.LocalDateWrapper;
|
|
3801
|
-
/**
|
|
3802
|
-
* The business periods that are open on the holiday.
|
|
3803
|
-
* @return dh.calendar.BusinessPeriod
|
|
3804
|
-
*/
|
|
3805
|
-
get businessPeriods():Array<BusinessPeriod>;
|
|
3806
|
-
}
|
|
3807
3807
|
export interface BusinessPeriod {
|
|
3808
3808
|
get close():string;
|
|
3809
3809
|
get open():string;
|