@deephaven-enterprise/jsapi-coreplus-types 1.20240517.510
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/LICENSE.md +136 -0
- package/dist/index.d.ts +395 -0
- package/package.json +24 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Deephaven Data Labs is dedicated to developing Deephaven's software in the open
|
|
2
|
+
and is making software available under the following licenses:
|
|
3
|
+
|
|
4
|
+
- **Deephaven Open Source** is made available under the Apache 2.0 License
|
|
5
|
+
- **Deephaven Community** is provided under a source-available license, the
|
|
6
|
+
Deephaven Community License Agreement
|
|
7
|
+
|
|
8
|
+
To request a commercial license for software or uses not covered by these
|
|
9
|
+
licenses or to ask any license-related question, please contact us at:
|
|
10
|
+
[license@deephaven.io](mailto:license@deephaven.io)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Deephaven Community License Agreement Version 1.0
|
|
14
|
+
|
|
15
|
+
1. **ACCEPTANCE.** This Deephaven Community License Agreement is entered into by
|
|
16
|
+
and between Deephaven Data Labs LLC, a Delaware Limited Liability Company, with
|
|
17
|
+
an address of 2800 Niagara Lane North, Plymouth, MN 55447 ("Deephaven") and
|
|
18
|
+
“You” (a) in your individual capacity, or (b) on behalf of your company if you
|
|
19
|
+
are licensing the Software for a company for which or with which you work. By
|
|
20
|
+
using the Software, You agree to all of the terms and conditions in this
|
|
21
|
+
Deephaven Community License Agreement (the "Agreement").
|
|
22
|
+
|
|
23
|
+
2. **THE SOFTWARE.** The "Software" means the version of the Deephaven Community
|
|
24
|
+
Software provided to the original licensee with this Agreement. The Software may
|
|
25
|
+
include third party owned code. Each third party module is subject to the terms
|
|
26
|
+
of its respective license; the details of which can be found in the notices
|
|
27
|
+
served at [https://github.com/deephaven/deephaven-core](https://github.com/deephaven/deephaven-core).
|
|
28
|
+
Since licensees may contribute back to the Software as provided for in Section
|
|
29
|
+
3(b), the Software may include any such contributions.
|
|
30
|
+
|
|
31
|
+
3. **GRANT OF LICENSE.** Subject to the terms and conditions of this Agreement,
|
|
32
|
+
Deephaven hereby grants You a royalty-free, worldwide, non-exclusive,
|
|
33
|
+
non-transferable license to the Software (the "License"), subject, in all of the
|
|
34
|
+
cases, to applicable laws and regulations, but not for the Prohibited Use (as
|
|
35
|
+
provided for in Section 4), solely as follows:
|
|
36
|
+
|
|
37
|
+
- a. **Internal Use.** A license to use, copy, compile, and install the
|
|
38
|
+
Software for Your internal use;
|
|
39
|
+
|
|
40
|
+
- b. **Derivative Works.** A license to (i) prepare, develop, compile, and test
|
|
41
|
+
Derivative Works of the Software, (ii) use Your Derivative Works for Your
|
|
42
|
+
internal use solely as expressly permitted in Section 3(a), and (iii) distribute
|
|
43
|
+
Your Derivative Works back to Deephaven under a separate Deephaven Contributor
|
|
44
|
+
Agreement for potential incorporation into the Software at Deephaven's sole
|
|
45
|
+
discretion. A "Derivative Work" means any work that (A) is based on or derived
|
|
46
|
+
from the Software including any modifications to the Software, or (B) meets the
|
|
47
|
+
definition of derivative work under the United States Copyright Act of 1976, 17
|
|
48
|
+
U.S.C. Section 101; and
|
|
49
|
+
|
|
50
|
+
- c. **Distribution and redistribution.** A license to distribute or
|
|
51
|
+
redistribute the Software and Your Derivative Works, and copies of the Software
|
|
52
|
+
and Your Derivative Works, to customers and other third parties for their use
|
|
53
|
+
pursuant to this Agreement subject to the prohibitions in Section 4 and
|
|
54
|
+
Agreement requirement as provided for in Section 5.
|
|
55
|
+
|
|
56
|
+
4. **PROHIBITED USE.** Notwithstanding any provision of this Agreement to the
|
|
57
|
+
contrary, the original licensee is prohibited from using, distributing, or
|
|
58
|
+
deploying the Software or Derivative Works in such a way that a third party
|
|
59
|
+
(including any recipient under Section 3(c)) can, directly or indirectly
|
|
60
|
+
through the original licensee, its agents, its technology, or solutions made
|
|
61
|
+
available to them, add, define, redefine, or modify the schema for any input
|
|
62
|
+
tables (including source tables, or other input objects) that the Software or
|
|
63
|
+
Derivative Works access. For clarification, every recipient of the Software or
|
|
64
|
+
Derivative Works after the original licensee of the Software is prohibited from
|
|
65
|
+
adding, defining, redefining, or modifying the schema for any input tables
|
|
66
|
+
(including source tables, or other input objects) that the Software or
|
|
67
|
+
Derivative Works access. This prohibition in no way affects the ability of a
|
|
68
|
+
third party to add, define, redefine, or modify the schema of output tables
|
|
69
|
+
(including output tables that are interim or derived). Further, this
|
|
70
|
+
prohibition in no way affects the ability of a third party to add, define,
|
|
71
|
+
redefine, or modify data (as opposed to schema), nor does it cause You to be
|
|
72
|
+
limited in any capacity for Your internal use as permitted in Section 3(a). If
|
|
73
|
+
You have any questions on this prohibition, please contact us at:
|
|
74
|
+
[license@deephaven.io](mailto:license@deephaven.io)
|
|
75
|
+
|
|
76
|
+
5. **AGREEMENT.** If You distribute the Software, whether directly, as a copy,
|
|
77
|
+
or via Your Derivative Works you must provide recipients a copy of this
|
|
78
|
+
Agreement (which will bind each recipient directly) and You must ensure that all
|
|
79
|
+
copyright, patent, trademark, and attribution notices from the Software are
|
|
80
|
+
retained.
|
|
81
|
+
|
|
82
|
+
6. **AFFILIATES.** You may permit Your affiliates to exercise the License,
|
|
83
|
+
provided that such exercise must be solely for Your benefit and/or the benefit
|
|
84
|
+
of Your affiliate, and You shall be responsible for all acts and omissions of
|
|
85
|
+
such affiliates in connection with such exercise of the License, including but
|
|
86
|
+
not limited to breach of any terms of this Agreement.
|
|
87
|
+
|
|
88
|
+
7. **SUBLICENSE.** The License is sublicensable only to Your third-party
|
|
89
|
+
subcontractors and contractors performing services on Your or Your affiliates'
|
|
90
|
+
behalf, subject to the terms and conditions of this Agreement. The License is
|
|
91
|
+
not sublicensable to any other third party nor is it further sublicensable. You
|
|
92
|
+
shall be responsible for all acts and omissions of such subcontractor and
|
|
93
|
+
contractors in connection with such exercise of the sublicense, including but
|
|
94
|
+
not limited to breach of any terms of this Agreement.
|
|
95
|
+
|
|
96
|
+
8. **PATENTS.** Rights to use the Software do not give You any right to
|
|
97
|
+
implement or use Deephaven's patents independently of the permitted use of the
|
|
98
|
+
Software.
|
|
99
|
+
|
|
100
|
+
9. **RESERVATION OF RIGHTS.** Deephaven reserves all rights not granted in this
|
|
101
|
+
Agreement. You have no right to use Deephaven trade names, trademarks, service
|
|
102
|
+
marks, or product names except as required for reasonable and customary use in
|
|
103
|
+
describing the origin of the Software.
|
|
104
|
+
|
|
105
|
+
10. **DISCLAIMER OF WARRANTY.** THE SOFTWARE IS LICENSED ON AN "AS IS" BASIS
|
|
106
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND. DEEPHAVEN DISCLAIMS ALL
|
|
107
|
+
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF
|
|
108
|
+
TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
109
|
+
You are solely responsible for determining the appropriateness of using,
|
|
110
|
+
distributing or redistributing the Software and Derivative Works and assume all
|
|
111
|
+
risks associated with Your exercise of the License.
|
|
112
|
+
|
|
113
|
+
11. **INDEMNIFICATION.** If You distribute or redistribute the Software or
|
|
114
|
+
Derivative Works, You agree to defend on request, and indemnify, Deephaven and
|
|
115
|
+
its affiliates, officers, directors, employees and agents from and against any
|
|
116
|
+
and all losses, damages, liabilities, claims, costs and expenses (including
|
|
117
|
+
reasonable attorney’s fees and expenses) incurred or arising from the
|
|
118
|
+
exploitation of the Software or Derivative Works.
|
|
119
|
+
|
|
120
|
+
12. **LIMITATION OF LIABILITY.** THE LICENSE IS GRANTED FOR NO FEE. IN NO EVENT
|
|
121
|
+
AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR
|
|
122
|
+
OTHERWISE, SHALL DEEPHAVEN BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR AS A
|
|
123
|
+
RESULT OF THIS AGREEMENT, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
|
124
|
+
OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS OF
|
|
125
|
+
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR LOSS OR CORRUPTION
|
|
126
|
+
OF DATA), EVEN IF DEEPHAVEN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
127
|
+
|
|
128
|
+
13. **TERMINATION.** The License will automatically terminate if You violate the
|
|
129
|
+
use rights or prohibitions in this Agreement.
|
|
130
|
+
|
|
131
|
+
14. **GOVERNING LAW.** This Agreement will be interpreted, construed and
|
|
132
|
+
enforced in all respects in accordance with the laws of the State of Delaware,
|
|
133
|
+
USA without reference to its choice of law rules to the contrary.
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
# END OF AGREEMENT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
declare module '@deephaven/jsapi-types' {
|
|
2
|
+
// Minimum TypeScript Version: 4.3
|
|
3
|
+
// Generated using com.vertispan.tsdefs.doclet.TsDoclet
|
|
4
|
+
export namespace dh.coreplus.pivot {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Tool to request the server pivot a table and return the results.
|
|
8
|
+
*/
|
|
9
|
+
export class PivotService implements dh.HasEventHandling {
|
|
10
|
+
protected constructor();
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Given a server object, finds or creates a pivot service talking to that same server. If the instance is a
|
|
14
|
+
* PivotService, it will be wrapped and returned. The initial call for a given worker must be either a PivotTable or
|
|
15
|
+
* a PivotService.
|
|
16
|
+
* @param object - some instance that lives on the server to be connected to.
|
|
17
|
+
* @return a promise that will resolve to a PivotService instance
|
|
18
|
+
*/
|
|
19
|
+
static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):Promise<PivotService>;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a pivot table from the given options - a source table, row keys, column keys, and aggregations.
|
|
22
|
+
* @param options - to use when creating the pivot table
|
|
23
|
+
* @return a Promise that resolves to a PivotTable instance
|
|
24
|
+
*/
|
|
25
|
+
createPivotTable(options:PivotCreationOptions):Promise<PivotTable>;
|
|
26
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
27
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
28
|
+
hasListeners(name:string):boolean;
|
|
29
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* For either the row or column dimension, this class provides access to dimension-specific metadata and data made
|
|
34
|
+
* available by the viewport subscription.
|
|
35
|
+
*/
|
|
36
|
+
export class DimensionData {
|
|
37
|
+
protected constructor();
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Given a position in this dimension, returns true if the item can be expanded to show children.
|
|
41
|
+
* @param position - the position in the dimension
|
|
42
|
+
* @return true if the item can be expanded
|
|
43
|
+
*/
|
|
44
|
+
hasChildren(position:number):boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Given a position in this dimension, returns true if the item is already expanded. Any item that cannot be
|
|
47
|
+
* expanded will return false.
|
|
48
|
+
* @param position - the position in the dimension
|
|
49
|
+
* @return true if the item is expanded
|
|
50
|
+
*/
|
|
51
|
+
isExpanded(position:number):boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Given a position in this dimension, returns the depth of the item in the hierarchy. The root level is 1, all
|
|
54
|
+
* items at the top level are then at depth 2, and so on.
|
|
55
|
+
* @param position - the position in the dimension
|
|
56
|
+
* @return the depth of the item in the hierarchy
|
|
57
|
+
*/
|
|
58
|
+
getDepth(position:number):number;
|
|
59
|
+
/**
|
|
60
|
+
* Given a position in this dimension, returns the keys for that item. The keys are the values of the grouping
|
|
61
|
+
* columns, and the values then represent the aggregated values for the underlying table.
|
|
62
|
+
* <p>
|
|
63
|
+
* Types of the keys are provided by
|
|
64
|
+
* {@link PivotTable.getColDim}/{@link PivotTable.getRowDim}.
|
|
65
|
+
* @param position - the position in the dimension
|
|
66
|
+
* @return an array of key values for the item at the given position
|
|
67
|
+
*/
|
|
68
|
+
getKeys(position:number):any[];
|
|
69
|
+
/**
|
|
70
|
+
* Given a position in this dimension, returns the total for the item in the dimension at that position.
|
|
71
|
+
* <p>
|
|
72
|
+
* The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
|
|
73
|
+
* @param position - the position in the dimension
|
|
74
|
+
* @param value - the value source to read, must have been included in the subscription
|
|
75
|
+
* @return the total for the item at the given position in this dimension
|
|
76
|
+
*/
|
|
77
|
+
getTotal(position:number, value:PivotSource):any;
|
|
78
|
+
/**
|
|
79
|
+
* The first position in this dimension that is present in this snapshot.
|
|
80
|
+
*/
|
|
81
|
+
get offset():number;
|
|
82
|
+
/**
|
|
83
|
+
* Number of elements in this dimension that are present in this snapshot.
|
|
84
|
+
*/
|
|
85
|
+
get count():number;
|
|
86
|
+
/**
|
|
87
|
+
* The total number of elements in this dimension, given the current expansion state. Viewports past the end of
|
|
88
|
+
* this will not be fully populated.
|
|
89
|
+
*/
|
|
90
|
+
get totalCount():number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Provides the details for an updated event from a pivot table subscription. Unlike
|
|
95
|
+
* {@link dh.TableData}, this class offers a matrix of data for each value column, and
|
|
96
|
+
* row/column expand state, depth, and grand totals.
|
|
97
|
+
*/
|
|
98
|
+
export class PivotSnapshot {
|
|
99
|
+
protected constructor();
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns the grand total for a given value source in the pivot table.
|
|
103
|
+
* <p>
|
|
104
|
+
* The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
|
|
105
|
+
* @param value - the value source to read, must have been included in the subscription
|
|
106
|
+
* @return the grand total for the given value source
|
|
107
|
+
*/
|
|
108
|
+
getGrandTotal(value:PivotSource):any;
|
|
109
|
+
/**
|
|
110
|
+
* Reads a value from the pivot table data for a given position in the grid.
|
|
111
|
+
* <p>
|
|
112
|
+
* The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
|
|
113
|
+
* @param value - the value source to read, must have been included in the subscription
|
|
114
|
+
* @param rowPosition - the row position within the pivot table
|
|
115
|
+
* @param colPosition - the column position within the pivot table
|
|
116
|
+
* @return the value present in the pivot table at the given position
|
|
117
|
+
*/
|
|
118
|
+
getValue(value:PivotSource, rowPosition:number, colPosition:number):any;
|
|
119
|
+
/**
|
|
120
|
+
* Data specific to the column dimension of the pivot table, including the groups, depth of each column, whether
|
|
121
|
+
* each column is expanded, and the totals for each column.
|
|
122
|
+
*/
|
|
123
|
+
get columns():DimensionData;
|
|
124
|
+
/**
|
|
125
|
+
* Data specific to the row dimension of the pivot table, including the groups, depth of each row, whether each row
|
|
126
|
+
* is expanded, and the totals for each row.
|
|
127
|
+
*/
|
|
128
|
+
get rows():DimensionData;
|
|
129
|
+
/**
|
|
130
|
+
* The value sources that were included in the subscription and can be read from this snapshot.
|
|
131
|
+
*/
|
|
132
|
+
get valueSources():Array<PivotSource>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Represents a PivotTable on the Deephaven server, with support for sorting, filtering, and viewports with
|
|
137
|
+
* expand/collapse on rows and columns.
|
|
138
|
+
*/
|
|
139
|
+
export class PivotTable implements dh.HasEventHandling {
|
|
140
|
+
static readonly EVENT_UPDATED:string;
|
|
141
|
+
static readonly EVENT_DISCONNECT:string;
|
|
142
|
+
static readonly EVENT_RECONNECT:string;
|
|
143
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Creates a client PivotTable instance from a {@link dh.Widget} that has been exported from the server.
|
|
147
|
+
* @param widget - a PivotTable widget that has been fetched from the server
|
|
148
|
+
*/
|
|
149
|
+
constructor(widget:dh.Widget);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Changes the row sorts of this pivot table. The row sorts may contain sorts of both the row and value sources.
|
|
153
|
+
* @param rowSorts - row and value sorts to apply to the rows of this pivot table
|
|
154
|
+
* @return the previous row sorts
|
|
155
|
+
*/
|
|
156
|
+
applyRowSort(rowSorts:PivotSort[]):Array<PivotSort>;
|
|
157
|
+
/**
|
|
158
|
+
* Changes the column sorts of this pivot table. The column sorts may contain sorts of both the column and value
|
|
159
|
+
* sources.
|
|
160
|
+
* @param colSorts - column and value sorts to apply to the columns of this pivot table
|
|
161
|
+
* @return the previous column sorts
|
|
162
|
+
*/
|
|
163
|
+
applyColumnSort(colSorts:PivotSort[]):Array<PivotSort>;
|
|
164
|
+
/**
|
|
165
|
+
* Changes the filter conditions of this pivot table. The filter array may contain any number of conditions, which
|
|
166
|
+
* will be AND'd together. Only row and column sources can be filtered, not value sources.
|
|
167
|
+
* @param filter - Row and column filter conditions to apply to this pivot table.
|
|
168
|
+
* @return the previous filter conditions
|
|
169
|
+
*/
|
|
170
|
+
applyFilter(filter:dh.FilterCondition[]):Array<dh.FilterCondition>;
|
|
171
|
+
/**
|
|
172
|
+
* Expands the row at the given position.
|
|
173
|
+
* @param position - the position of the row to expand
|
|
174
|
+
* @param expandDescendants - if true, also expands all descendants of the row, defaults to false
|
|
175
|
+
*/
|
|
176
|
+
expandRow(position:number, expandDescendants?:boolean):void;
|
|
177
|
+
/**
|
|
178
|
+
* Collapses the row at the given position.
|
|
179
|
+
* @param position - the position of the row to collapse
|
|
180
|
+
*/
|
|
181
|
+
collapseRow(position:number):void;
|
|
182
|
+
/**
|
|
183
|
+
* Sets the expansion state of the row at the given position.
|
|
184
|
+
* @param position - the position of the row to set the expansion state for
|
|
185
|
+
* @param isExpanded - if true, the row will be expanded, if false, it will be collapsed
|
|
186
|
+
* @param expandDescendants - if true, also expands all descendants of the row, defaults to false. Ignored if
|
|
187
|
+
* isExpanded is false.
|
|
188
|
+
*/
|
|
189
|
+
setRowExpanded(position:number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
190
|
+
/**
|
|
191
|
+
* Expands the column at the given position.
|
|
192
|
+
* @param position - the position of the column to expand
|
|
193
|
+
* @param expandDescendants - if true, also expands all descendants of the column, defaults to false
|
|
194
|
+
*/
|
|
195
|
+
expandColumn(position:number, expandDescendants?:boolean):void;
|
|
196
|
+
/**
|
|
197
|
+
* Collapses the column at the given position.
|
|
198
|
+
* @param position - the position of the column to collapse
|
|
199
|
+
*/
|
|
200
|
+
collapseColumn(position:number):void;
|
|
201
|
+
/**
|
|
202
|
+
* Sets the expansion state of the column at the given position.
|
|
203
|
+
* @param position - the position of the column to set the expansion state for
|
|
204
|
+
* @param isExpanded - if true, the column will be expanded, if false, it will be collapsed
|
|
205
|
+
* @param expandDescendants - if true, also expands all descendants of the column, defaults to false. Ignored if
|
|
206
|
+
* isExpanded is false.
|
|
207
|
+
*/
|
|
208
|
+
setColumnExpanded(position:number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
209
|
+
/**
|
|
210
|
+
* Expands all rows and columns in this pivot table, including all descendants of any expanded rows or columns.
|
|
211
|
+
*/
|
|
212
|
+
expandAll():void;
|
|
213
|
+
/**
|
|
214
|
+
* Collapses all rows and columns in this pivot table, including all descendants of any expanded rows or columns.
|
|
215
|
+
*/
|
|
216
|
+
collapseAll():void;
|
|
217
|
+
setViewport(options:PivotSubscriptionOptions):void;
|
|
218
|
+
/**
|
|
219
|
+
* Closes this pivot table, releasing all resources and subscriptions associated with it.
|
|
220
|
+
*/
|
|
221
|
+
close():void;
|
|
222
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
223
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
224
|
+
hasListeners(name:string):boolean;
|
|
225
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
226
|
+
/**
|
|
227
|
+
* The current filter configuration of this Tree Table.
|
|
228
|
+
* @return {@link dh.FilterCondition} array
|
|
229
|
+
*/
|
|
230
|
+
get filter():Array<dh.FilterCondition>;
|
|
231
|
+
/**
|
|
232
|
+
* The current column sort configuration of this PivotTable.
|
|
233
|
+
* @return {@link dh.coreplus.pivot.PivotSort} array
|
|
234
|
+
*/
|
|
235
|
+
get columnSort():Array<PivotSort>;
|
|
236
|
+
/**
|
|
237
|
+
* True if this pivot table is closed.
|
|
238
|
+
*/
|
|
239
|
+
get isClosed():boolean;
|
|
240
|
+
/**
|
|
241
|
+
* The sources that represent the columns of this pivot table.
|
|
242
|
+
*/
|
|
243
|
+
get columnSources():Array<PivotSource>;
|
|
244
|
+
/**
|
|
245
|
+
* The current row sort configuration of this PivotTable.
|
|
246
|
+
* @return {@link dh.coreplus.pivot.PivotSort} array
|
|
247
|
+
*/
|
|
248
|
+
get rowSort():Array<PivotSort>;
|
|
249
|
+
/**
|
|
250
|
+
* True if this pivot table's subscription may receive updates from the server.
|
|
251
|
+
*/
|
|
252
|
+
get isRefreshing():boolean;
|
|
253
|
+
/**
|
|
254
|
+
* The sources that represent the rows of this pivot table.
|
|
255
|
+
*/
|
|
256
|
+
get rowSources():Array<PivotSource>;
|
|
257
|
+
/**
|
|
258
|
+
* The sources that represent the values of this pivot table.
|
|
259
|
+
*/
|
|
260
|
+
get valueSources():Array<PivotSource>;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Analog of {@link dh.Column}, but specific to pivot tables. Represents a named, typed set of values in the pivot table
|
|
265
|
+
* that can be read.
|
|
266
|
+
*/
|
|
267
|
+
export class PivotSource {
|
|
268
|
+
protected constructor();
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Creates a new {@link dh.coreplus.pivot.PivotSort} for this source. The sort object then can be made to be ascending or descending,
|
|
272
|
+
* using {@link PivotSort.asc} or {@link PivotSort.desc}.
|
|
273
|
+
* @see {@link dh.Column.sort}
|
|
274
|
+
* @return a new {@link dh.coreplus.pivot.PivotSort} for this source
|
|
275
|
+
*/
|
|
276
|
+
sort():PivotSort;
|
|
277
|
+
/**
|
|
278
|
+
* Creates a new {@link dh.FilterValue} for this source. The filter value can used as a builder to create a
|
|
279
|
+
* {@link dh.FilterCondition} or used as a parameter to another filter operation
|
|
280
|
+
* @see {@link dh.FilterCondition}
|
|
281
|
+
* @return a new {@link dh.FilterValue} for this source
|
|
282
|
+
*/
|
|
283
|
+
filter():dh.FilterValue;
|
|
284
|
+
/**
|
|
285
|
+
* The name of this source.
|
|
286
|
+
*/
|
|
287
|
+
get name():string;
|
|
288
|
+
/**
|
|
289
|
+
* True if the data type in this source is sortable.
|
|
290
|
+
*/
|
|
291
|
+
get isSortable():boolean;
|
|
292
|
+
/**
|
|
293
|
+
* The type of this source.
|
|
294
|
+
*/
|
|
295
|
+
get type():string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Describes the desired subscription for a pivot table.
|
|
300
|
+
*/
|
|
301
|
+
export class PivotSubscriptionOptions {
|
|
302
|
+
rows:dh.RangeSet|dh.coreplus.SimpleRange;
|
|
303
|
+
columns:dh.RangeSet|dh.coreplus.SimpleRange;
|
|
304
|
+
sources:Array<PivotSource>;
|
|
305
|
+
updateIntervalMs?:number|null;
|
|
306
|
+
|
|
307
|
+
constructor();
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Options for creating a pivot table.
|
|
313
|
+
*/
|
|
314
|
+
export class PivotCreationOptions {
|
|
315
|
+
source:dh.JoinableTable;
|
|
316
|
+
rowKeys:string[];
|
|
317
|
+
columnKeys:string[];
|
|
318
|
+
aggregations:{ [key: string]: Array<string>; };
|
|
319
|
+
|
|
320
|
+
protected constructor();
|
|
321
|
+
|
|
322
|
+
toString():string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* This type is an analog of {@link dh.Sort}, with a few differences:
|
|
327
|
+
* <ul>
|
|
328
|
+
* <li>The {@link column} property always returns null, and instead there is a {@link name} property</li>
|
|
329
|
+
* <li>Reverse is not supported</li>
|
|
330
|
+
* </ul>
|
|
331
|
+
*
|
|
332
|
+
* A PivotSort doesn't sort the columns of the pivot directly, but sorts the keys uses for columns or rows.
|
|
333
|
+
*/
|
|
334
|
+
export class PivotSort {
|
|
335
|
+
static readonly ASCENDING:string;
|
|
336
|
+
static readonly DESCENDING:string;
|
|
337
|
+
|
|
338
|
+
protected constructor();
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
342
|
+
* @return {@link dh.coreplus.pivot.PivotSort}
|
|
343
|
+
*/
|
|
344
|
+
asc():PivotSort;
|
|
345
|
+
/**
|
|
346
|
+
* Builds a Sort instance to sort values in descending order.
|
|
347
|
+
* @return {@link dh.coreplus.pivot.PivotSort}
|
|
348
|
+
*/
|
|
349
|
+
desc():PivotSort;
|
|
350
|
+
/**
|
|
351
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
352
|
+
* @return {@link dh.coreplus.pivot.PivotSort}
|
|
353
|
+
*/
|
|
354
|
+
abs():PivotSort;
|
|
355
|
+
toString():string;
|
|
356
|
+
/**
|
|
357
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
358
|
+
* @return boolean
|
|
359
|
+
*/
|
|
360
|
+
get isAbs():boolean;
|
|
361
|
+
/**
|
|
362
|
+
* The column which is sorted.
|
|
363
|
+
* @return {@link dh.Column}
|
|
364
|
+
*/
|
|
365
|
+
get column():dh.Column;
|
|
366
|
+
/**
|
|
367
|
+
* The name of the column which is sorted.
|
|
368
|
+
* @return String
|
|
369
|
+
*/
|
|
370
|
+
get name():string;
|
|
371
|
+
/**
|
|
372
|
+
* The direction of this sort, either <b>ASC</b> or <b>DESC</b>.
|
|
373
|
+
* @return String
|
|
374
|
+
*/
|
|
375
|
+
get direction():string;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
export namespace dh.coreplus {
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Simple range consisting only of start and end numbers. Will be migrated to deephaven-core in the near future, and
|
|
385
|
+
* subsequently removed from this the coreplus namespace.
|
|
386
|
+
*/
|
|
387
|
+
export interface SimpleRange {
|
|
388
|
+
first:number;
|
|
389
|
+
last:number;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export { dh } from '@deephaven/jsapi-types';
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deephaven-enterprise/jsapi-coreplus-types",
|
|
3
|
+
"version": "1.20240517.510",
|
|
4
|
+
"description": "Deephaven Enterprise Core+ JSAPI Types",
|
|
5
|
+
"author": "Deephaven Data Labs LLC",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"typedoc": "^0.24.8",
|
|
10
|
+
"typescript": "^5.1.6"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@deephaven/jsapi-types": "^1.0.0-dev0.39.2"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"LICENSE.md"
|
|
18
|
+
],
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
}
|
|
24
|
+
}
|