@gooddata/sdk-ui 10.37.0 → 10.38.0-alpha.1
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/esm/base/index.d.ts +2 -0
- package/esm/base/index.d.ts.map +1 -1
- package/esm/base/index.js +2 -0
- package/esm/base/index.js.map +1 -1
- package/esm/base/localization/bundles/en-US.json +8 -0
- package/esm/base/localization/bundles/en-US.localization-bundle.d.ts +2 -0
- package/esm/base/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/base/localization/bundles/en-US.localization-bundle.js +2 -0
- package/esm/base/localization/bundles/en-US.localization-bundle.js.map +1 -1
- package/esm/base/results/tableData/dataViewToTableData.d.ts.map +1 -1
- package/esm/base/results/tableData/dataViewToTableData.js +1 -1
- package/esm/base/results/tableData/dataViewToTableData.js.map +1 -1
- package/esm/base/results/tableData/interfaces/cells.d.ts +435 -34
- package/esm/base/results/tableData/interfaces/cells.d.ts.map +1 -1
- package/esm/base/results/tableData/interfaces/cells.js +73 -1
- package/esm/base/results/tableData/interfaces/cells.js.map +1 -1
- package/esm/base/results/tableData/interfaces/columns.d.ts +375 -14
- package/esm/base/results/tableData/interfaces/columns.d.ts.map +1 -1
- package/esm/base/results/tableData/interfaces/columns.js +47 -1
- package/esm/base/results/tableData/interfaces/columns.js.map +1 -1
- package/esm/base/results/tableData/interfaces/index.d.ts +24 -0
- package/esm/base/results/tableData/interfaces/index.d.ts.map +1 -1
- package/esm/base/results/tableData/interfaces/mappingOptions.d.ts +3 -0
- package/esm/base/results/tableData/interfaces/mappingOptions.d.ts.map +1 -1
- package/esm/base/results/tableData/interfaces/rows.d.ts +21 -0
- package/esm/base/results/tableData/interfaces/rows.d.ts.map +1 -1
- package/esm/base/results/tableData/interfaces/scope.d.ts +11 -0
- package/esm/base/results/tableData/interfaces/scope.d.ts.map +1 -1
- package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.d.ts +2 -1
- package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.d.ts.map +1 -1
- package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.js +100 -19
- package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.js.map +1 -1
- package/esm/base/results/tableData/mapping/grandTotalRow/grandTotal.d.ts.map +1 -1
- package/esm/base/results/tableData/mapping/grandTotalRow/grandTotal.js +6 -5
- package/esm/base/results/tableData/mapping/grandTotalRow/grandTotal.js.map +1 -1
- package/esm/base/results/tableData/mapping/grandTotalRow/measureGroupHeader.d.ts.map +1 -1
- package/esm/base/results/tableData/mapping/grandTotalRow/measureGroupHeader.js +1 -11
- package/esm/base/results/tableData/mapping/grandTotalRow/measureGroupHeader.js.map +1 -1
- package/esm/base/results/tableData/mapping/subtotalRow/grandTotal.js +5 -3
- package/esm/base/results/tableData/mapping/subtotalRow/grandTotal.js.map +1 -1
- package/esm/sdk-ui.d.ts +868 -35
- package/package.json +9 -9
@@ -1,135 +1,536 @@
|
|
1
|
-
import { DataValue,
|
2
|
-
import { ITableGrandTotalRowDefinition,
|
3
|
-
import { ITableAttributeColumnDefinition,
|
1
|
+
import { DataValue, IResultAttributeHeader, IResultMeasureHeader, IResultTotalHeader } from "@gooddata/sdk-model";
|
2
|
+
import { ITableGrandTotalRowDefinition, ITableSubtotalRowDefinition, ITableValueRowDefinition } from "./rows.js";
|
3
|
+
import { ITableAttributeColumnDefinition, ITableGrandTotalColumnDefinition, ITableMeasureGroupHeaderColumnDefinition, ITableMeasureGroupValueColumnDefinition, ITableSubtotalColumnDefinition, ITableValueColumnDefinition } from "./columns.js";
|
4
4
|
/**
|
5
|
+
* Union of **all possible cell value shapes** that can appear in the table
|
6
|
+
* `data` matrix. Each variant corresponds to a concrete column × row
|
7
|
+
* intersection produced by `dataViewToTableData`.
|
8
|
+
*
|
9
|
+
* - Header cells (`attributeHeader`, `measureHeader`, `totalHeader`)
|
10
|
+
* - Numeric cells with raw measure data (`value`)
|
11
|
+
* - Aggregations (`subtotalValue`, `grandTotalValue`, `grandTotalSubtotalValue`, `overallTotalValue`)
|
12
|
+
*
|
13
|
+
* When interpreting the `data` matrix you should always rely on the concrete subtype.
|
14
|
+
*
|
15
|
+
* **Example table without transposition:**
|
16
|
+
* ```
|
17
|
+
* Attr A | Col A | Sum A | ColSum Σ |
|
18
|
+
* ----------+---------+---------+----------+
|
19
|
+
* Row X | 100 | 200 | 300 |
|
20
|
+
* Sum B | 400 | 600 | 1000 |
|
21
|
+
* RowSum Σ | 500 | 800 | 1300 |
|
22
|
+
* ```
|
23
|
+
* - Attr A is attribute column, Col A is value column, Sum A is subtotal column, ColSum Σ is grand total column
|
24
|
+
* - Row X is value row, Sum B is subtotal row, RowSum Σ is grand total row
|
25
|
+
*
|
26
|
+
* In this example:
|
27
|
+
* - Row X is `attributeHeader`
|
28
|
+
* - Sum B is `totalHeader`
|
29
|
+
* - RowSum Σ is `grandTotalHeader`
|
30
|
+
* - Row X : Col A - `100` is `value`
|
31
|
+
* - Row X : Sum A - `200` is `subtotalValue`
|
32
|
+
* - Row X : ColSum Σ - `300` is `grandTotalValue`
|
33
|
+
* - Sum B : Col A - `400` is `subtotalValue`
|
34
|
+
* - Sum B : Sum A - `600` is `subtotalValue`
|
35
|
+
* - Sum B : ColSum Σ - `1000` is `grandTotalSubtotalValue`
|
36
|
+
* - RowSum Σ : Col A - `500` is `grandTotalValue`
|
37
|
+
* - RowSum Σ : Sum A - `800` is `grandTotalSubtotalValue`
|
38
|
+
* - RowSum Σ : ColSum Σ - `1300` is `overallTotalValue`
|
39
|
+
*
|
5
40
|
* @alpha
|
6
41
|
*/
|
7
42
|
export type ITableDataValue = ITableAttributeHeaderValue | ITableMeasureHeaderValue | ITableTotalHeaderValue | ITableMeasureValue | ITableSubtotalMeasureValue | ITableGrandTotalHeaderValue | ITableGrandTotalMeasureValue | ITableGrandTotalSubtotalMeasureValue | ITableOverallTotalMeasureValue;
|
8
43
|
/**
|
44
|
+
* Cell located in {@link ITableAttributeColumnDefinition} – typically the leftmost
|
45
|
+
* part of the table describing the current row's attribute values.
|
46
|
+
*
|
47
|
+
* It represents a single `IResultAttributeHeader` coming from the execution
|
48
|
+
* response and can be present in both value rows and subtotal rows.
|
49
|
+
*
|
50
|
+
* **Visual example**
|
51
|
+
* ```
|
52
|
+
* Attribute | Measure |
|
53
|
+
* -----------+---------+
|
54
|
+
* USA | 100 | <- "USA" is attributeHeader
|
55
|
+
* ```
|
56
|
+
*
|
9
57
|
* @alpha
|
10
58
|
*/
|
11
59
|
export interface ITableAttributeHeaderValue {
|
60
|
+
/**
|
61
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
62
|
+
*/
|
12
63
|
type: "attributeHeader";
|
64
|
+
/**
|
65
|
+
* Attribute element value ready to be rendered. (e.g. "United States")
|
66
|
+
*/
|
13
67
|
formattedValue: string | null;
|
68
|
+
/**
|
69
|
+
* The raw `IResultAttributeHeader` object from the execution response.
|
70
|
+
*/
|
14
71
|
value: IResultAttributeHeader;
|
72
|
+
/**
|
73
|
+
* Zero-based row position of this cell in the final `data` matrix.
|
74
|
+
*/
|
15
75
|
rowIndex: number;
|
76
|
+
/**
|
77
|
+
* Zero-based column position of this cell in the final `data` matrix.
|
78
|
+
*/
|
16
79
|
columnIndex: number;
|
17
|
-
|
80
|
+
/**
|
81
|
+
* Full row context describing which row this cell belongs to
|
82
|
+
* (value, subtotal, or grand-total row).
|
83
|
+
*/
|
84
|
+
rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
|
85
|
+
/**
|
86
|
+
* Full column context describing which attribute column this cell belongs to.
|
87
|
+
* Always an attribute column since this interface is for attribute headers.
|
88
|
+
*/
|
18
89
|
columnDefinition: ITableAttributeColumnDefinition;
|
19
90
|
}
|
20
91
|
/**
|
92
|
+
* Cell inside the {@link ITableMeasureGroupHeaderColumnDefinition}.
|
93
|
+
* Appears **only when measures are transposed into rows**.
|
94
|
+
* Each cell corresponds to one `IResultMeasureHeader` and labels the measure for that specific row.
|
95
|
+
*
|
96
|
+
* **Visual example**
|
97
|
+
* ```
|
98
|
+
* Attribute | Measure | Value |
|
99
|
+
* -----------+---------+-------+
|
100
|
+
* USA | Sales | 100 | <- "Sales" is measureHeader
|
101
|
+
* USA | Cost | 80 | <- "Cost" is measureHeader
|
102
|
+
* ```
|
103
|
+
* The "Sales" and "Cost" **names** in the "Measure" column are `measureHeader` cells.
|
104
|
+
* The numeric values (100, 80) are regular `value` cells.
|
105
|
+
*
|
106
|
+
* **When measures are in columns (no transposition), this interface is NOT used.**
|
107
|
+
* Instead, measure names appear as regular column headers in the table structure.
|
108
|
+
*
|
21
109
|
* @alpha
|
22
110
|
*/
|
23
111
|
export interface ITableMeasureHeaderValue {
|
112
|
+
/**
|
113
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
114
|
+
*/
|
24
115
|
type: "measureHeader";
|
116
|
+
/**
|
117
|
+
* Display name of the measure (e.g., "Sales", "Revenue").
|
118
|
+
*/
|
25
119
|
formattedValue: string | null;
|
120
|
+
/**
|
121
|
+
* The raw `IResultMeasureHeader` object.
|
122
|
+
*/
|
26
123
|
value: IResultMeasureHeader;
|
124
|
+
/**
|
125
|
+
* Zero-based row position in the `data` matrix.
|
126
|
+
*/
|
27
127
|
rowIndex: number;
|
128
|
+
/**
|
129
|
+
* Zero-based column position in the `data` matrix.
|
130
|
+
*/
|
28
131
|
columnIndex: number;
|
29
|
-
|
30
|
-
|
132
|
+
/**
|
133
|
+
* Row context - can be only value row.
|
134
|
+
*/
|
135
|
+
rowDefinition: ITableValueRowDefinition;
|
136
|
+
/**
|
137
|
+
* Column context - always a `measureGroupHeader` column.
|
138
|
+
*/
|
139
|
+
columnDefinition: ITableMeasureGroupHeaderColumnDefinition;
|
31
140
|
}
|
32
141
|
/**
|
142
|
+
* Cell that represents total header.
|
143
|
+
* Each cell corresponds to one `IResultTotalHeader` and labels the total for that specific row / column.
|
144
|
+
*
|
145
|
+
* **Visual example**
|
146
|
+
* ```
|
147
|
+
* Attribute | Value |
|
148
|
+
* -----------+-------+
|
149
|
+
* USA | 100 |
|
150
|
+
* Sum A | 80 | <- "Sum A" is totalHeader
|
151
|
+
* ```
|
152
|
+
*
|
33
153
|
* @alpha
|
34
154
|
*/
|
35
155
|
export interface ITableTotalHeaderValue {
|
156
|
+
/**
|
157
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
158
|
+
*/
|
36
159
|
type: "totalHeader";
|
160
|
+
/**
|
161
|
+
* Display text for the total header (e.g., "Sum", "Avg", "Max").
|
162
|
+
*/
|
37
163
|
formattedValue: string | null;
|
164
|
+
/**
|
165
|
+
* The raw `IResultTotalHeader` object containing total metadata
|
166
|
+
* like totalType, measureIndex, etc.
|
167
|
+
*/
|
38
168
|
value: IResultTotalHeader;
|
169
|
+
/**
|
170
|
+
* Zero-based row position in the `data` matrix.
|
171
|
+
* Usually points to a subtotal or grand-total row.
|
172
|
+
*/
|
39
173
|
rowIndex: number;
|
174
|
+
/**
|
175
|
+
* Zero-based column position in the `data` matrix.
|
176
|
+
* Points to the measure header column when measures are transposed.
|
177
|
+
*/
|
40
178
|
columnIndex: number;
|
41
|
-
|
42
|
-
|
179
|
+
/**
|
180
|
+
* Row context - subtotal or value row.
|
181
|
+
*/
|
182
|
+
rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
|
183
|
+
/**
|
184
|
+
* Column context - value column, subtotal column, measure group header column, or attribute column.
|
185
|
+
*/
|
186
|
+
columnDefinition: ITableValueColumnDefinition | ITableSubtotalColumnDefinition | ITableMeasureGroupHeaderColumnDefinition | ITableAttributeColumnDefinition;
|
43
187
|
}
|
44
188
|
/**
|
189
|
+
* Numeric cell containing a **raw measure value** for regular (non-aggregated) row/column intersections.
|
190
|
+
*
|
191
|
+
* **Visual examples:**
|
192
|
+
* ```
|
193
|
+
* // Normal (measures in columns):
|
194
|
+
* Country | Sales |
|
195
|
+
* -----------+--------+
|
196
|
+
* USA | 100 | <- 100 is value cell
|
197
|
+
*
|
198
|
+
* // Transposed (measures in rows):
|
199
|
+
* Country | | |
|
200
|
+
* -----------+---------+-------+
|
201
|
+
* USA | Sales | 100 | <- 100 is value cell
|
202
|
+
* ```
|
203
|
+
*
|
45
204
|
* @alpha
|
46
205
|
*/
|
47
206
|
export interface ITableMeasureValue {
|
207
|
+
/**
|
208
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
209
|
+
*/
|
48
210
|
type: "value";
|
211
|
+
/**
|
212
|
+
* Human-readable formatted number ready for display (e.g., "$1,234.56").
|
213
|
+
* Formatted using the measure's format string and respects locale settings.
|
214
|
+
* Null if the raw value is null/missing.
|
215
|
+
*/
|
49
216
|
formattedValue: string | null;
|
217
|
+
/**
|
218
|
+
* Raw numeric value from the backend execution response.
|
219
|
+
* Can be number, string, or null depending on the measure data.
|
220
|
+
*/
|
50
221
|
value: DataValue;
|
222
|
+
/**
|
223
|
+
* Zero-based row position in the `data` matrix.
|
224
|
+
*/
|
51
225
|
rowIndex: number;
|
226
|
+
/**
|
227
|
+
* Zero-based column position in the `data` matrix.
|
228
|
+
*/
|
52
229
|
columnIndex: number;
|
230
|
+
/**
|
231
|
+
* Row context - value or subtotal row.
|
232
|
+
*/
|
53
233
|
rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
|
234
|
+
/**
|
235
|
+
* Column context - value column or measureGroupValue column.
|
236
|
+
*/
|
54
237
|
columnDefinition: ITableValueColumnDefinition | ITableMeasureGroupValueColumnDefinition;
|
55
238
|
}
|
56
239
|
/**
|
240
|
+
* Numeric cell containing **subtotals** aggregated across sibling rows/columns.
|
241
|
+
*
|
242
|
+
* **Visual example**
|
243
|
+
* ```
|
244
|
+
* // Row subtotal:
|
245
|
+
* | Sales |
|
246
|
+
* -----------+--------+
|
247
|
+
* USA | 100 |
|
248
|
+
* Sum A | 170 | <- 170 is subtotalValue
|
249
|
+
*
|
250
|
+
* // Column subtotal:
|
251
|
+
* | Q1 | Sum A |
|
252
|
+
* -----------+-----+---------+
|
253
|
+
* USA | 100 | 220 | <- 220 is subtotalValue
|
254
|
+
* ```
|
255
|
+
*
|
57
256
|
* @alpha
|
58
257
|
*/
|
59
258
|
export interface ITableSubtotalMeasureValue {
|
259
|
+
/**
|
260
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
261
|
+
*/
|
60
262
|
type: "subtotalValue";
|
263
|
+
/**
|
264
|
+
* Human-readable formatted subtotal value (e.g., "$2,345.67").
|
265
|
+
*/
|
61
266
|
formattedValue: string | null;
|
267
|
+
/**
|
268
|
+
* Raw aggregated subtotal value from the backend.
|
269
|
+
* Result of summing/averaging/etc. across sibling rows or columns.
|
270
|
+
*/
|
62
271
|
value: DataValue;
|
272
|
+
/**
|
273
|
+
* Zero-based row position in the `data` matrix.
|
274
|
+
*/
|
63
275
|
rowIndex: number;
|
276
|
+
/**
|
277
|
+
* Zero-based column position in the `data` matrix.
|
278
|
+
*/
|
64
279
|
columnIndex: number;
|
280
|
+
/**
|
281
|
+
* Row context - value or subtotal row.
|
282
|
+
*/
|
65
283
|
rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
|
284
|
+
/**
|
285
|
+
* Column context - value column or subtotal column.
|
286
|
+
*/
|
66
287
|
columnDefinition: ITableValueColumnDefinition | ITableSubtotalColumnDefinition;
|
67
288
|
}
|
68
289
|
/**
|
290
|
+
* Numeric cell containing **grand totals** – totals across rows or columns.
|
291
|
+
*
|
292
|
+
* **Visual example**
|
293
|
+
* ```
|
294
|
+
* // Column grand total:
|
295
|
+
* | Q1 | ColSum Σ |
|
296
|
+
* -----------+-----+----------+
|
297
|
+
* USA | 100 | 220 | <- 220 is grandTotalValue
|
298
|
+
*
|
299
|
+
* // Row grand total:
|
300
|
+
* | Q1 | Q2 |
|
301
|
+
* -----------+-----+-----+
|
302
|
+
* USA | 100 | 120 |
|
303
|
+
* RowSum Σ | 180 | 210 | <- 180 and 210 are grandTotalValue cells
|
304
|
+
* ```
|
305
|
+
*
|
69
306
|
* @alpha
|
70
307
|
*/
|
71
308
|
export interface ITableGrandTotalMeasureValue {
|
309
|
+
/**
|
310
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
311
|
+
*/
|
72
312
|
type: "grandTotalValue";
|
313
|
+
/**
|
314
|
+
* Human-readable formatted grand total value (e.g., "$10,000.00").
|
315
|
+
* Uses the measure's format string and locale settings.
|
316
|
+
*/
|
73
317
|
formattedValue: string | null;
|
318
|
+
/**
|
319
|
+
* Raw aggregated grand total value from the backend.
|
320
|
+
* Result of aggregating across all rows or columns for this measure.
|
321
|
+
*/
|
74
322
|
value: DataValue;
|
323
|
+
/**
|
324
|
+
* Zero-based row position in the `data` matrix.
|
325
|
+
*/
|
75
326
|
rowIndex: number;
|
327
|
+
/**
|
328
|
+
* Zero-based column position in the `data` matrix.
|
329
|
+
*/
|
76
330
|
columnIndex: number;
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
331
|
+
/**
|
332
|
+
* Row context - value or grand-total row.
|
333
|
+
*/
|
334
|
+
rowDefinition: ITableValueRowDefinition | ITableGrandTotalRowDefinition;
|
335
|
+
/**
|
336
|
+
* Column context - value column, grand-total column, or measure group value column.
|
337
|
+
*/
|
338
|
+
columnDefinition: ITableValueColumnDefinition | ITableGrandTotalColumnDefinition | ITableMeasureGroupValueColumnDefinition;
|
84
339
|
}
|
85
340
|
/**
|
341
|
+
* Numeric cell at the **intersection of row and column subtotals + grandtotals** – the *subtotals of grandtotals*.
|
342
|
+
*
|
343
|
+
* **Visual example**
|
344
|
+
* ```
|
345
|
+
* // Column grand total + row subtotal:
|
346
|
+
* | Q1 | ColSum Σ |
|
347
|
+
* -----------+-----+----------+
|
348
|
+
* Sum A | 100 | 220 | <- 220 is grandTotalSubtotalValue
|
349
|
+
*
|
350
|
+
* // Row grand total + column subtotal:
|
351
|
+
* | Q1 | Sum A |
|
352
|
+
* -----------+-----+-------+
|
353
|
+
* USA | 100 | 120 |
|
354
|
+
* RowSum Σ | 180 | 210 | <- 210 is grandTotalSubtotalValue
|
355
|
+
* ```
|
356
|
+
*
|
86
357
|
* @alpha
|
87
358
|
*/
|
88
359
|
export interface ITableGrandTotalSubtotalMeasureValue {
|
360
|
+
/**
|
361
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
362
|
+
*/
|
89
363
|
type: "grandTotalSubtotalValue";
|
364
|
+
/**
|
365
|
+
* Human-readable formatted intersection total value (e.g., "$15,000.00").
|
366
|
+
*/
|
90
367
|
formattedValue: string | null;
|
368
|
+
/**
|
369
|
+
* Raw aggregated value at the intersection of row and column totals.
|
370
|
+
*/
|
91
371
|
value: DataValue;
|
372
|
+
/**
|
373
|
+
* Zero-based row position in the `data` matrix.
|
374
|
+
*/
|
92
375
|
rowIndex: number;
|
376
|
+
/**
|
377
|
+
* Zero-based column position in the `data` matrix.
|
378
|
+
*/
|
93
379
|
columnIndex: number;
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
380
|
+
/**
|
381
|
+
* Row context - grand-total row or subtotal row.
|
382
|
+
*/
|
383
|
+
rowDefinition: ITableSubtotalRowDefinition | ITableGrandTotalRowDefinition;
|
384
|
+
/**
|
385
|
+
* Column context - subtotal column or grand-total column.
|
386
|
+
*/
|
387
|
+
columnDefinition: ITableSubtotalColumnDefinition | ITableGrandTotalColumnDefinition;
|
101
388
|
}
|
102
389
|
/**
|
390
|
+
* Numeric cell at the **overall grand-total** intersection (bottom-right corner)
|
391
|
+
* aggregating across *all* rows and columns.
|
392
|
+
*
|
393
|
+
* **Visual example:**
|
394
|
+
* ```
|
395
|
+
* | Q1 | Q2 | ColSum Σ |
|
396
|
+
* -----------+-----+-----+----------+
|
397
|
+
* USA | 100 | 120 | 220 |
|
398
|
+
* CAN | 80 | 90 | 170 |
|
399
|
+
* RowSum Σ | 180 | 210 | 390 | <- 390 is overallTotalValue
|
400
|
+
* ```
|
401
|
+
*
|
103
402
|
* @alpha
|
104
403
|
*/
|
105
404
|
export interface ITableOverallTotalMeasureValue {
|
405
|
+
/**
|
406
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
407
|
+
*/
|
106
408
|
type: "overallTotalValue";
|
409
|
+
/**
|
410
|
+
* Human-readable formatted overall total value (e.g., "$50,000.00").
|
411
|
+
*/
|
107
412
|
formattedValue: string | null;
|
413
|
+
/**
|
414
|
+
* Raw overall total value from the backend.
|
415
|
+
*/
|
108
416
|
value: DataValue;
|
417
|
+
/**
|
418
|
+
* Zero-based row position in the `data` matrix.
|
419
|
+
*/
|
109
420
|
rowIndex: number;
|
421
|
+
/**
|
422
|
+
* Zero-based column position in the `data` matrix.
|
423
|
+
*/
|
110
424
|
columnIndex: number;
|
425
|
+
/**
|
426
|
+
* Row context - grand-total row since this is the
|
427
|
+
* grand-total row × grand-total column intersection.
|
428
|
+
*/
|
111
429
|
rowDefinition: ITableGrandTotalRowDefinition;
|
430
|
+
/**
|
431
|
+
* Column context - grand-total column since this is the
|
432
|
+
* grand-total row × grand-total column intersection.
|
433
|
+
*/
|
112
434
|
columnDefinition: ITableGrandTotalColumnDefinition;
|
113
|
-
grandTotalInfo?: {
|
114
|
-
type: TotalType;
|
115
|
-
measure: IMeasureDescriptor;
|
116
|
-
attribute: IAttributeDescriptor;
|
117
|
-
};
|
118
435
|
}
|
119
436
|
/**
|
437
|
+
* Header cell labeling a **grand-total row** (usually located in the first columns).
|
438
|
+
*
|
439
|
+
* **Visual example:**
|
440
|
+
* ```
|
441
|
+
* | Q1 | Q2 | ColSum Σ |
|
442
|
+
* -----------+-----+-----+----------+
|
443
|
+
* USA | 100 | 120 | 220 |
|
444
|
+
* CAN | 80 | 90 | 170 |
|
445
|
+
* RowSum Σ | 180 | 210 | 390 | <- RowSum Σ is grandTotalHeader
|
446
|
+
* ```
|
447
|
+
*
|
120
448
|
* @alpha
|
121
449
|
*/
|
122
450
|
export interface ITableGrandTotalHeaderValue {
|
451
|
+
/**
|
452
|
+
* Discriminator literal for narrowing the `ITableDataValue` union.
|
453
|
+
*/
|
123
454
|
type: "grandTotalHeader";
|
455
|
+
/**
|
456
|
+
* Display text for the grand total row label (e.g., "Sum", "Total").
|
457
|
+
* Usually shows the aggregation type or a localized "Total" label.
|
458
|
+
*/
|
124
459
|
formattedValue: string | null;
|
460
|
+
/**
|
461
|
+
* Zero-based row position in the `data` matrix.
|
462
|
+
* Points to a grand-total row that this header cell labels.
|
463
|
+
*/
|
125
464
|
rowIndex: number;
|
465
|
+
/**
|
466
|
+
* Zero-based column position in the `data` matrix.
|
467
|
+
* Usually points to the first attribute column (leftmost) or
|
468
|
+
* measure header column (when measures are transposed).
|
469
|
+
*/
|
126
470
|
columnIndex: number;
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
471
|
+
/**
|
472
|
+
* Row context - grand-total row since this header
|
473
|
+
* cell is labeling a grand-total row.
|
474
|
+
*/
|
475
|
+
rowDefinition: ITableGrandTotalRowDefinition;
|
476
|
+
/**
|
477
|
+
* Column context - typically an attribute column or measure header column
|
478
|
+
* where the grand total label appears.
|
479
|
+
*/
|
480
|
+
columnDefinition: ITableAttributeColumnDefinition | ITableMeasureGroupHeaderColumnDefinition;
|
134
481
|
}
|
482
|
+
/**
|
483
|
+
* Type guard checking whether input is an instance of {@link ITableAttributeHeaderValue}
|
484
|
+
*
|
485
|
+
* @alpha
|
486
|
+
*/
|
487
|
+
export declare function isTableAttributeHeaderValue(obj: unknown): obj is ITableAttributeHeaderValue;
|
488
|
+
/**
|
489
|
+
* Type guard checking whether input is an instance of {@link ITableMeasureHeaderValue}
|
490
|
+
*
|
491
|
+
* @alpha
|
492
|
+
*/
|
493
|
+
export declare function isTableMeasureHeaderValue(obj: unknown): obj is ITableMeasureHeaderValue;
|
494
|
+
/**
|
495
|
+
* Type guard checking whether input is an instance of {@link ITableTotalHeaderValue}
|
496
|
+
*
|
497
|
+
* @alpha
|
498
|
+
*/
|
499
|
+
export declare function isTableTotalHeaderValue(obj: unknown): obj is ITableTotalHeaderValue;
|
500
|
+
/**
|
501
|
+
* Type guard checking whether input is an instance of {@link ITableMeasureValue}
|
502
|
+
*
|
503
|
+
* @alpha
|
504
|
+
*/
|
505
|
+
export declare function isTableMeasureValue(obj: unknown): obj is ITableMeasureValue;
|
506
|
+
/**
|
507
|
+
* Type guard checking whether input is an instance of {@link ITableSubtotalMeasureValue}
|
508
|
+
*
|
509
|
+
* @alpha
|
510
|
+
*/
|
511
|
+
export declare function isTableSubtotalMeasureValue(obj: unknown): obj is ITableSubtotalMeasureValue;
|
512
|
+
/**
|
513
|
+
* Type guard checking whether input is an instance of {@link ITableGrandTotalMeasureValue}
|
514
|
+
*
|
515
|
+
* @alpha
|
516
|
+
*/
|
517
|
+
export declare function isTableGrandTotalMeasureValue(obj: unknown): obj is ITableGrandTotalMeasureValue;
|
518
|
+
/**
|
519
|
+
* Type guard checking whether input is an instance of {@link ITableGrandTotalSubtotalMeasureValue}
|
520
|
+
*
|
521
|
+
* @alpha
|
522
|
+
*/
|
523
|
+
export declare function isTableGrandTotalSubtotalMeasureValue(obj: unknown): obj is ITableGrandTotalSubtotalMeasureValue;
|
524
|
+
/**
|
525
|
+
* Type guard checking whether input is an instance of {@link ITableOverallTotalMeasureValue}
|
526
|
+
*
|
527
|
+
* @alpha
|
528
|
+
*/
|
529
|
+
export declare function isTableOverallTotalMeasureValue(obj: unknown): obj is ITableOverallTotalMeasureValue;
|
530
|
+
/**
|
531
|
+
* Type guard checking whether input is an instance of {@link ITableGrandTotalHeaderValue}
|
532
|
+
*
|
533
|
+
* @alpha
|
534
|
+
*/
|
535
|
+
export declare function isTableGrandTotalHeaderValue(obj: unknown): obj is ITableGrandTotalHeaderValue;
|
135
536
|
//# sourceMappingURL=cells.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../../../../src/base/results/tableData/interfaces/cells.ts"],"names":[],"mappings":"AACA,OAAO,EACH,SAAS,EACT,
|
1
|
+
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../../../../src/base/results/tableData/interfaces/cells.ts"],"names":[],"mappings":"AACA,OAAO,EACH,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,EAC3B,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,+BAA+B,EAC/B,gCAAgC,EAChC,wCAAwC,EACxC,uCAAuC,EACvC,8BAA8B,EAC9B,2BAA2B,EAC9B,MAAM,cAAc,CAAC;AAGtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,MAAM,eAAe,GACrB,0BAA0B,GAC1B,wBAAwB,GACxB,sBAAsB,GACtB,kBAAkB,GAClB,0BAA0B,GAC1B,2BAA2B,GAC3B,4BAA4B,GAC5B,oCAAoC,GACpC,8BAA8B,CAAC;AAErC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,KAAK,EAAE,sBAAsB,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,EAAE,wBAAwB,GAAG,2BAA2B,CAAC;IACtE;;;OAGG;IACH,gBAAgB,EAAE,+BAA+B,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,KAAK,EAAE,oBAAoB,CAAC;IAC5B;;OAEG;IACH,QAAQ,EAAE,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G,EAAE,OAAO,GAAG,GAAG,IAAI,8BAA8B,CAEnG;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,2BAA2B,CAE7F"}
|
@@ -1,2 +1,74 @@
|
|
1
|
-
|
1
|
+
import isEmpty from "lodash/isEmpty.js";
|
2
|
+
/**
|
3
|
+
* Type guard checking whether input is an instance of {@link ITableAttributeHeaderValue}
|
4
|
+
*
|
5
|
+
* @alpha
|
6
|
+
*/
|
7
|
+
export function isTableAttributeHeaderValue(obj) {
|
8
|
+
return !isEmpty(obj) && obj.type === "attributeHeader";
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* Type guard checking whether input is an instance of {@link ITableMeasureHeaderValue}
|
12
|
+
*
|
13
|
+
* @alpha
|
14
|
+
*/
|
15
|
+
export function isTableMeasureHeaderValue(obj) {
|
16
|
+
return !isEmpty(obj) && obj.type === "measureHeader";
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Type guard checking whether input is an instance of {@link ITableTotalHeaderValue}
|
20
|
+
*
|
21
|
+
* @alpha
|
22
|
+
*/
|
23
|
+
export function isTableTotalHeaderValue(obj) {
|
24
|
+
return !isEmpty(obj) && obj.type === "totalHeader";
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Type guard checking whether input is an instance of {@link ITableMeasureValue}
|
28
|
+
*
|
29
|
+
* @alpha
|
30
|
+
*/
|
31
|
+
export function isTableMeasureValue(obj) {
|
32
|
+
return !isEmpty(obj) && obj.type === "value";
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Type guard checking whether input is an instance of {@link ITableSubtotalMeasureValue}
|
36
|
+
*
|
37
|
+
* @alpha
|
38
|
+
*/
|
39
|
+
export function isTableSubtotalMeasureValue(obj) {
|
40
|
+
return !isEmpty(obj) && obj.type === "subtotalValue";
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* Type guard checking whether input is an instance of {@link ITableGrandTotalMeasureValue}
|
44
|
+
*
|
45
|
+
* @alpha
|
46
|
+
*/
|
47
|
+
export function isTableGrandTotalMeasureValue(obj) {
|
48
|
+
return !isEmpty(obj) && obj.type === "grandTotalValue";
|
49
|
+
}
|
50
|
+
/**
|
51
|
+
* Type guard checking whether input is an instance of {@link ITableGrandTotalSubtotalMeasureValue}
|
52
|
+
*
|
53
|
+
* @alpha
|
54
|
+
*/
|
55
|
+
export function isTableGrandTotalSubtotalMeasureValue(obj) {
|
56
|
+
return !isEmpty(obj) && obj.type === "grandTotalSubtotalValue";
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* Type guard checking whether input is an instance of {@link ITableOverallTotalMeasureValue}
|
60
|
+
*
|
61
|
+
* @alpha
|
62
|
+
*/
|
63
|
+
export function isTableOverallTotalMeasureValue(obj) {
|
64
|
+
return !isEmpty(obj) && obj.type === "overallTotalValue";
|
65
|
+
}
|
66
|
+
/**
|
67
|
+
* Type guard checking whether input is an instance of {@link ITableGrandTotalHeaderValue}
|
68
|
+
*
|
69
|
+
* @alpha
|
70
|
+
*/
|
71
|
+
export function isTableGrandTotalHeaderValue(obj) {
|
72
|
+
return !isEmpty(obj) && obj.type === "grandTotalHeader";
|
73
|
+
}
|
2
74
|
//# sourceMappingURL=cells.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cells.js","sourceRoot":"","sources":["../../../../../src/base/results/tableData/interfaces/cells.ts"],"names":[],"mappings":""}
|
1
|
+
{"version":3,"file":"cells.js","sourceRoot":"","sources":["../../../../../src/base/results/tableData/interfaces/cells.ts"],"names":[],"mappings":"AAoBA,OAAO,OAAO,MAAM,mBAAmB,CAAC;AA0fxC;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACpD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAK,GAAkC,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC3F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAY;IAClD,OAAO,CA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