@deephaven-enterprise/jsapi-coreplus-types 2026.1.58 → 2026.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +216 -216
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -38,6 +38,222 @@ export namespace dh.coreplus.pivot {
38
38
  toString():string;
39
39
  }
40
40
 
41
+ /**
42
+ * Describes the desired snapshot for a pivot table.
43
+ */
44
+ export class PivotSnapshotOptions {
45
+ /**
46
+ * The rows to include in the snapshot.
47
+ */
48
+ rows:dh.RangeSet|dh.SimpleRange;
49
+ /**
50
+ * The columns to include in the snapshot
51
+ */
52
+ columns:dh.RangeSet|dh.SimpleRange;
53
+ /**
54
+ * The aggregated sources to include in the snapshot
55
+ */
56
+ sources:Array<PivotSource>;
57
+
58
+ constructor();
59
+ }
60
+
61
+ /**
62
+ * Tool to request the server pivot a table and return the results. Obtain an instance with
63
+ * {@link getInstance}, then call {@link createPivotTable} to pivot a table.
64
+ */
65
+ export class PivotService implements dh.HasEventHandling {
66
+ protected constructor();
67
+
68
+ /**
69
+ * Given a server object, finds or creates a pivot service talking to that same server. If the instance is a
70
+ * PivotService, it will be wrapped and returned. The initial call for a given worker must be either a PivotTable or
71
+ * a PivotService.
72
+ * @param object - an object on the server to connect to.
73
+ * @return a promise that resolves to a `PivotService` for that server, or an error.
74
+ */
75
+ static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):Promise<PivotService>;
76
+ /**
77
+ * Creates a pivot table from the given options - a source table, row keys, column keys, and aggregations.
78
+ * @param options - the {@link dh.coreplus.pivot.PivotCreationOptions} to use when creating the pivot table.
79
+ * @return a promise that resolves to the new `PivotTable`, or an error.
80
+ */
81
+ createPivotTable(options:PivotCreationOptions):Promise<PivotTable>;
82
+ addEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):()=>void;
83
+ nextEvent<T>(arg0:string, arg1?:number):Promise<dh.Event<T>>;
84
+ hasListeners(arg0:string):boolean;
85
+ removeEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):boolean;
86
+ }
87
+
88
+ /**
89
+ * Provides the details for an updated event from a pivot table subscription. Unlike
90
+ * {@link dh.TableData}, this class offers a matrix of data for each value column, and
91
+ * row/column expand state, depth, and grand totals.
92
+ */
93
+ export class PivotSnapshot {
94
+ protected constructor();
95
+
96
+ /**
97
+ * Returns the grand total for a given value source in the pivot table.
98
+ * <p>
99
+ * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
100
+ * @param value - the value source to read, must have been included in the subscription
101
+ * @return the grand total for the given value source
102
+ */
103
+ getGrandTotal(value:PivotSource):any;
104
+ /**
105
+ * Reads a value from the pivot table data for a given position in the grid.
106
+ * <p>
107
+ * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
108
+ * <p>
109
+ * Both positions are absolute positions within the pivot table, matching those used by {@link PivotSnapshot.rows} and
110
+ * {@link PivotSnapshot.columns}, so each must fall within the corresponding dimension's offset and count.
111
+ * @param value - the value source to read, must have been included in the subscription
112
+ * @param rowPosition - the row position within the pivot table
113
+ * @param colPosition - the column position within the pivot table
114
+ * @return the value present in the pivot table at the given position
115
+ */
116
+ getValue(value:PivotSource, rowPosition:number, colPosition:number):any;
117
+ /**
118
+ * Data specific to the column dimension of the pivot table, including the groups, depth of each column, whether
119
+ * each column is expanded, and the totals for each column.
120
+ */
121
+ get columns():DimensionData;
122
+ /**
123
+ * Data specific to the row dimension of the pivot table, including the groups, depth of each row, whether each row
124
+ * is expanded, and the totals for each row.
125
+ */
126
+ get rows():DimensionData;
127
+ /**
128
+ * The value sources that were included in the subscription and can be read from this snapshot.
129
+ */
130
+ get valueSources():Array<PivotSource>;
131
+ }
132
+
133
+ /**
134
+ * For either the row or column dimension, this class provides access to dimension-specific metadata and data made
135
+ * available by the viewport subscription.
136
+ */
137
+ export class DimensionData {
138
+ protected constructor();
139
+
140
+ /**
141
+ * Given a position in this dimension, returns `true` if the item can be expanded to show children.
142
+ * @param position - the position in the dimension
143
+ * @return `true` if the item can be expanded
144
+ */
145
+ hasChildren(position:number):boolean;
146
+ /**
147
+ * Given a position in this dimension, returns `true` if the item is already expanded. Any item that
148
+ * cannot be expanded will return `false`.
149
+ * @param position - the position in the dimension
150
+ * @return `true` if the item is expanded
151
+ */
152
+ isExpanded(position:number):boolean;
153
+ /**
154
+ * Given a position in this dimension, returns the depth of the item in the hierarchy. The root level is 1, all
155
+ * items at the top level are then at depth 2, and so on.
156
+ * @param position - the position in the dimension
157
+ * @return the depth of the item in the hierarchy
158
+ */
159
+ getDepth(position:number):number;
160
+ /**
161
+ * Given a position in this dimension, returns the keys for that item. The keys are the values of the grouping
162
+ * columns, and the values then represent the aggregated values for the underlying table.
163
+ * <p>
164
+ * Types of the keys are provided by
165
+ * {@link PivotTable.getColDim}/{@link PivotTable.getRowDim}.
166
+ * @param position - the position in the dimension
167
+ * @return an array of key values for the item at the given position
168
+ */
169
+ getKeys(position:number):any[];
170
+ /**
171
+ * Given a position in this dimension, returns the total for the item in the dimension at that position.
172
+ * <p>
173
+ * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
174
+ * @param position - the position in the dimension
175
+ * @param value - the value source to read, must have been included in the subscription
176
+ * @return the total for the item at the given position in this dimension
177
+ */
178
+ getTotal(position:number, value:PivotSource):any;
179
+ /**
180
+ * The first position in this dimension that is present in this snapshot.
181
+ */
182
+ get offset():number;
183
+ /**
184
+ * The number of elements in this dimension that are present in this snapshot.
185
+ */
186
+ get count():number;
187
+ /**
188
+ * The total number of elements in this dimension, given the current expansion state. Viewports past the end of
189
+ * this will not be fully populated.
190
+ */
191
+ get totalCount():number;
192
+ }
193
+
194
+ /**
195
+ * Describes the desired subscription for a pivot table.
196
+ */
197
+ export class PivotSubscriptionOptions {
198
+ /**
199
+ * The rows to include in the subscription.
200
+ */
201
+ rows:dh.RangeSet|dh.SimpleRange;
202
+ /**
203
+ * The columns to include in the subscription.
204
+ */
205
+ columns:dh.RangeSet|dh.SimpleRange;
206
+ /**
207
+ * The aggregated sources to include in the subscription.
208
+ */
209
+ sources:Array<PivotSource>;
210
+ /**
211
+ * The minimum time in milliseconds between updates from the server.
212
+ */
213
+ updateIntervalMs?:number|null;
214
+
215
+ constructor();
216
+ }
217
+
218
+ /**
219
+ * Analog of {@link dh.Column}, but specific to pivot tables. Represents a named, typed set of values in the pivot table
220
+ * that can be read.
221
+ */
222
+ export class PivotSource {
223
+ protected constructor();
224
+
225
+ /**
226
+ * Creates a new {@link dh.coreplus.pivot.PivotSort} for this source. The sort object then can be made to be ascending or descending,
227
+ * using {@link PivotSort.asc} or {@link PivotSort.desc}.
228
+ * @return a new {@link dh.coreplus.pivot.PivotSort} for this source
229
+ * @see {@link dh.Column.sort}
230
+ */
231
+ sort():PivotSort;
232
+ /**
233
+ * Creates a new {@link dh.FilterValue} for this source. The filter value can be used as a builder to create a
234
+ * {@link dh.FilterCondition}, or used as a parameter to another filter operation.
235
+ * @return a new {@link dh.FilterValue} for this source
236
+ * @see {@link dh.FilterCondition}
237
+ */
238
+ filter():dh.FilterValue;
239
+ /**
240
+ * The name of this source.
241
+ */
242
+ get name():string;
243
+ /**
244
+ * `true` if the data type in this source is sortable.
245
+ */
246
+ get isSortable():boolean;
247
+ /**
248
+ * The description of this source, if any.
249
+ */
250
+ get description():string;
251
+ /**
252
+ * The type of this source.
253
+ */
254
+ get type():string;
255
+ }
256
+
41
257
  /**
42
258
  * Represents a PivotTable on the Deephaven server, with support for sorting, filtering, and viewports with
43
259
  * expand/collapse on rows and columns.
@@ -260,33 +476,6 @@ export namespace dh.coreplus.pivot {
260
476
  removeEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):boolean;
261
477
  }
262
478
 
263
- /**
264
- * Tool to request the server pivot a table and return the results. Obtain an instance with
265
- * {@link getInstance}, then call {@link createPivotTable} to pivot a table.
266
- */
267
- export class PivotService implements dh.HasEventHandling {
268
- protected constructor();
269
-
270
- /**
271
- * Given a server object, finds or creates a pivot service talking to that same server. If the instance is a
272
- * PivotService, it will be wrapped and returned. The initial call for a given worker must be either a PivotTable or
273
- * a PivotService.
274
- * @param object - an object on the server to connect to.
275
- * @return a promise that resolves to a `PivotService` for that server, or an error.
276
- */
277
- static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):Promise<PivotService>;
278
- /**
279
- * Creates a pivot table from the given options - a source table, row keys, column keys, and aggregations.
280
- * @param options - the {@link dh.coreplus.pivot.PivotCreationOptions} to use when creating the pivot table.
281
- * @return a promise that resolves to the new `PivotTable`, or an error.
282
- */
283
- createPivotTable(options:PivotCreationOptions):Promise<PivotTable>;
284
- addEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):()=>void;
285
- nextEvent<T>(arg0:string, arg1?:number):Promise<dh.Event<T>>;
286
- hasListeners(arg0:string):boolean;
287
- removeEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):boolean;
288
- }
289
-
290
479
  /**
291
480
  * This type is an analog of {@link dh.Sort}, with a few differences:
292
481
  * <ul>
@@ -340,195 +529,6 @@ export namespace dh.coreplus.pivot {
340
529
  get direction():string;
341
530
  }
342
531
 
343
- /**
344
- * Analog of {@link dh.Column}, but specific to pivot tables. Represents a named, typed set of values in the pivot table
345
- * that can be read.
346
- */
347
- export class PivotSource {
348
- protected constructor();
349
-
350
- /**
351
- * Creates a new {@link dh.coreplus.pivot.PivotSort} for this source. The sort object then can be made to be ascending or descending,
352
- * using {@link PivotSort.asc} or {@link PivotSort.desc}.
353
- * @return a new {@link dh.coreplus.pivot.PivotSort} for this source
354
- * @see {@link dh.Column.sort}
355
- */
356
- sort():PivotSort;
357
- /**
358
- * Creates a new {@link dh.FilterValue} for this source. The filter value can be used as a builder to create a
359
- * {@link dh.FilterCondition}, or used as a parameter to another filter operation.
360
- * @return a new {@link dh.FilterValue} for this source
361
- * @see {@link dh.FilterCondition}
362
- */
363
- filter():dh.FilterValue;
364
- /**
365
- * The name of this source.
366
- */
367
- get name():string;
368
- /**
369
- * `true` if the data type in this source is sortable.
370
- */
371
- get isSortable():boolean;
372
- /**
373
- * The description of this source, if any.
374
- */
375
- get description():string;
376
- /**
377
- * The type of this source.
378
- */
379
- get type():string;
380
- }
381
-
382
- /**
383
- * Describes the desired subscription for a pivot table.
384
- */
385
- export class PivotSubscriptionOptions {
386
- /**
387
- * The rows to include in the subscription.
388
- */
389
- rows:dh.RangeSet|dh.SimpleRange;
390
- /**
391
- * The columns to include in the subscription.
392
- */
393
- columns:dh.RangeSet|dh.SimpleRange;
394
- /**
395
- * The aggregated sources to include in the subscription.
396
- */
397
- sources:Array<PivotSource>;
398
- /**
399
- * The minimum time in milliseconds between updates from the server.
400
- */
401
- updateIntervalMs?:number|null;
402
-
403
- constructor();
404
- }
405
-
406
- /**
407
- * Provides the details for an updated event from a pivot table subscription. Unlike
408
- * {@link dh.TableData}, this class offers a matrix of data for each value column, and
409
- * row/column expand state, depth, and grand totals.
410
- */
411
- export class PivotSnapshot {
412
- protected constructor();
413
-
414
- /**
415
- * Returns the grand total for a given value source in the pivot table.
416
- * <p>
417
- * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
418
- * @param value - the value source to read, must have been included in the subscription
419
- * @return the grand total for the given value source
420
- */
421
- getGrandTotal(value:PivotSource):any;
422
- /**
423
- * Reads a value from the pivot table data for a given position in the grid.
424
- * <p>
425
- * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
426
- * <p>
427
- * Both positions are absolute positions within the pivot table, matching those used by {@link PivotSnapshot.rows} and
428
- * {@link PivotSnapshot.columns}, so each must fall within the corresponding dimension's offset and count.
429
- * @param value - the value source to read, must have been included in the subscription
430
- * @param rowPosition - the row position within the pivot table
431
- * @param colPosition - the column position within the pivot table
432
- * @return the value present in the pivot table at the given position
433
- */
434
- getValue(value:PivotSource, rowPosition:number, colPosition:number):any;
435
- /**
436
- * Data specific to the column dimension of the pivot table, including the groups, depth of each column, whether
437
- * each column is expanded, and the totals for each column.
438
- */
439
- get columns():DimensionData;
440
- /**
441
- * Data specific to the row dimension of the pivot table, including the groups, depth of each row, whether each row
442
- * is expanded, and the totals for each row.
443
- */
444
- get rows():DimensionData;
445
- /**
446
- * The value sources that were included in the subscription and can be read from this snapshot.
447
- */
448
- get valueSources():Array<PivotSource>;
449
- }
450
-
451
- /**
452
- * For either the row or column dimension, this class provides access to dimension-specific metadata and data made
453
- * available by the viewport subscription.
454
- */
455
- export class DimensionData {
456
- protected constructor();
457
-
458
- /**
459
- * Given a position in this dimension, returns `true` if the item can be expanded to show children.
460
- * @param position - the position in the dimension
461
- * @return `true` if the item can be expanded
462
- */
463
- hasChildren(position:number):boolean;
464
- /**
465
- * Given a position in this dimension, returns `true` if the item is already expanded. Any item that
466
- * cannot be expanded will return `false`.
467
- * @param position - the position in the dimension
468
- * @return `true` if the item is expanded
469
- */
470
- isExpanded(position:number):boolean;
471
- /**
472
- * Given a position in this dimension, returns the depth of the item in the hierarchy. The root level is 1, all
473
- * items at the top level are then at depth 2, and so on.
474
- * @param position - the position in the dimension
475
- * @return the depth of the item in the hierarchy
476
- */
477
- getDepth(position:number):number;
478
- /**
479
- * Given a position in this dimension, returns the keys for that item. The keys are the values of the grouping
480
- * columns, and the values then represent the aggregated values for the underlying table.
481
- * <p>
482
- * Types of the keys are provided by
483
- * {@link PivotTable.getColDim}/{@link PivotTable.getRowDim}.
484
- * @param position - the position in the dimension
485
- * @return an array of key values for the item at the given position
486
- */
487
- getKeys(position:number):any[];
488
- /**
489
- * Given a position in this dimension, returns the total for the item in the dimension at that position.
490
- * <p>
491
- * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
492
- * @param position - the position in the dimension
493
- * @param value - the value source to read, must have been included in the subscription
494
- * @return the total for the item at the given position in this dimension
495
- */
496
- getTotal(position:number, value:PivotSource):any;
497
- /**
498
- * The first position in this dimension that is present in this snapshot.
499
- */
500
- get offset():number;
501
- /**
502
- * The number of elements in this dimension that are present in this snapshot.
503
- */
504
- get count():number;
505
- /**
506
- * The total number of elements in this dimension, given the current expansion state. Viewports past the end of
507
- * this will not be fully populated.
508
- */
509
- get totalCount():number;
510
- }
511
-
512
- /**
513
- * Describes the desired snapshot for a pivot table.
514
- */
515
- export class PivotSnapshotOptions {
516
- /**
517
- * The rows to include in the snapshot.
518
- */
519
- rows:dh.RangeSet|dh.SimpleRange;
520
- /**
521
- * The columns to include in the snapshot
522
- */
523
- columns:dh.RangeSet|dh.SimpleRange;
524
- /**
525
- * The aggregated sources to include in the snapshot
526
- */
527
- sources:Array<PivotSource>;
528
-
529
- constructor();
530
- }
531
-
532
532
  }
533
533
 
534
534
  export namespace dh.coreplus.schema {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven-enterprise/jsapi-coreplus-types",
3
- "version": "2026.1.58",
3
+ "version": "2026.1.60",
4
4
  "description": "Deephaven Enterprise Core+ JSAPI Types",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "SEE LICENSE IN LICENSE.md",