@gooddata/sdk-ui 10.37.0 → 10.38.0-alpha.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.
Files changed (42) hide show
  1. package/esm/base/index.d.ts +2 -0
  2. package/esm/base/index.d.ts.map +1 -1
  3. package/esm/base/index.js +2 -0
  4. package/esm/base/index.js.map +1 -1
  5. package/esm/base/localization/bundles/en-US.json +8 -0
  6. package/esm/base/localization/bundles/en-US.localization-bundle.d.ts +2 -0
  7. package/esm/base/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  8. package/esm/base/localization/bundles/en-US.localization-bundle.js +2 -0
  9. package/esm/base/localization/bundles/en-US.localization-bundle.js.map +1 -1
  10. package/esm/base/results/tableData/dataViewToTableData.d.ts.map +1 -1
  11. package/esm/base/results/tableData/dataViewToTableData.js +1 -1
  12. package/esm/base/results/tableData/dataViewToTableData.js.map +1 -1
  13. package/esm/base/results/tableData/interfaces/cells.d.ts +435 -34
  14. package/esm/base/results/tableData/interfaces/cells.d.ts.map +1 -1
  15. package/esm/base/results/tableData/interfaces/cells.js +73 -1
  16. package/esm/base/results/tableData/interfaces/cells.js.map +1 -1
  17. package/esm/base/results/tableData/interfaces/columns.d.ts +375 -14
  18. package/esm/base/results/tableData/interfaces/columns.d.ts.map +1 -1
  19. package/esm/base/results/tableData/interfaces/columns.js +47 -1
  20. package/esm/base/results/tableData/interfaces/columns.js.map +1 -1
  21. package/esm/base/results/tableData/interfaces/index.d.ts +24 -0
  22. package/esm/base/results/tableData/interfaces/index.d.ts.map +1 -1
  23. package/esm/base/results/tableData/interfaces/mappingOptions.d.ts +3 -0
  24. package/esm/base/results/tableData/interfaces/mappingOptions.d.ts.map +1 -1
  25. package/esm/base/results/tableData/interfaces/rows.d.ts +21 -0
  26. package/esm/base/results/tableData/interfaces/rows.d.ts.map +1 -1
  27. package/esm/base/results/tableData/interfaces/scope.d.ts +11 -0
  28. package/esm/base/results/tableData/interfaces/scope.d.ts.map +1 -1
  29. package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.d.ts +2 -1
  30. package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.d.ts.map +1 -1
  31. package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.js +100 -19
  32. package/esm/base/results/tableData/mapping/collect/collectColumnDefinitions.js.map +1 -1
  33. package/esm/base/results/tableData/mapping/grandTotalRow/grandTotal.d.ts.map +1 -1
  34. package/esm/base/results/tableData/mapping/grandTotalRow/grandTotal.js +6 -5
  35. package/esm/base/results/tableData/mapping/grandTotalRow/grandTotal.js.map +1 -1
  36. package/esm/base/results/tableData/mapping/grandTotalRow/measureGroupHeader.d.ts.map +1 -1
  37. package/esm/base/results/tableData/mapping/grandTotalRow/measureGroupHeader.js +1 -11
  38. package/esm/base/results/tableData/mapping/grandTotalRow/measureGroupHeader.js.map +1 -1
  39. package/esm/base/results/tableData/mapping/subtotalRow/grandTotal.js +5 -3
  40. package/esm/base/results/tableData/mapping/subtotalRow/grandTotal.js.map +1 -1
  41. package/esm/sdk-ui.d.ts +868 -35
  42. package/package.json +13 -14
package/esm/sdk-ui.d.ts CHANGED
@@ -2941,6 +2941,12 @@ export declare interface IResultMetaMethods {
2941
2941
  */
2942
2942
  export declare function isAnyPlaceholder<T>(obj: unknown): obj is AnyPlaceholder<T>;
2943
2943
 
2944
+ /**
2945
+ * Type guard to check if a column definition is an attribute column
2946
+ * @alpha
2947
+ */
2948
+ export declare function isAttributeColumnDefinition(columnDefinition: unknown): columnDefinition is ITableAttributeColumnDefinition;
2949
+
2944
2950
  /**
2945
2951
  * Typeguard checking whether input is an instance of {@link BadRequestSdkError};
2946
2952
  *
@@ -3049,6 +3055,12 @@ export declare function isGeoTokenMissing(obj: unknown): obj is GeoTokenMissingS
3049
3055
  */
3050
3056
  export declare function isGoodDataSdkError(obj: unknown): obj is GoodDataSdkError;
3051
3057
 
3058
+ /**
3059
+ * Type guard to check if a column definition is a grand total column
3060
+ * @alpha
3061
+ */
3062
+ export declare function isGrandTotalColumnDefinition(columnDefinition: unknown): columnDefinition is ITableGrandTotalColumnDefinition;
3063
+
3052
3064
  /**
3053
3065
  * Typeguard checking whether the object is an {@link IHeaderPredicate} instance.
3054
3066
  * @public
@@ -3062,6 +3074,18 @@ export declare function isHeaderPredicate(obj: unknown): obj is IHeaderPredicate
3062
3074
  */
3063
3075
  export declare const isLocale: (locale: unknown) => locale is ILocale;
3064
3076
 
3077
+ /**
3078
+ * Type guard to check if a column definition is a measure group header column
3079
+ * @alpha
3080
+ */
3081
+ export declare function isMeasureGroupHeaderColumnDefinition(columnDefinition: unknown): columnDefinition is ITableMeasureGroupHeaderColumnDefinition;
3082
+
3083
+ /**
3084
+ * Type guard to check if a column definition is a measure group value column
3085
+ * @alpha
3086
+ */
3087
+ export declare function isMeasureGroupValueColumnDefinition(columnDefinition: unknown): columnDefinition is ITableMeasureGroupValueColumnDefinition;
3088
+
3065
3089
  /**
3066
3090
  * Typeguard checking whether input is an instance of {@link NegativeValuesSdkError};
3067
3091
  *
@@ -3101,6 +3125,75 @@ export declare function isProtectedReport(obj: unknown): obj is ProtectedReportS
3101
3125
  */
3102
3126
  export declare function isSomeHeaderPredicateMatched(drillablePredicates: IHeaderPredicate[], header: IMappingHeader, dv: DataViewFacade): boolean;
3103
3127
 
3128
+ /**
3129
+ * Type guard to check if a column definition is a subtotal column
3130
+ * @alpha
3131
+ */
3132
+ export declare function isSubtotalColumnDefinition(columnDefinition: unknown): columnDefinition is ITableSubtotalColumnDefinition;
3133
+
3134
+ /**
3135
+ * Type guard checking whether input is an instance of {@link ITableAttributeHeaderValue}
3136
+ *
3137
+ * @alpha
3138
+ */
3139
+ export declare function isTableAttributeHeaderValue(obj: unknown): obj is ITableAttributeHeaderValue;
3140
+
3141
+ /**
3142
+ * Type guard checking whether input is an instance of {@link ITableGrandTotalHeaderValue}
3143
+ *
3144
+ * @alpha
3145
+ */
3146
+ export declare function isTableGrandTotalHeaderValue(obj: unknown): obj is ITableGrandTotalHeaderValue;
3147
+
3148
+ /**
3149
+ * Type guard checking whether input is an instance of {@link ITableGrandTotalMeasureValue}
3150
+ *
3151
+ * @alpha
3152
+ */
3153
+ export declare function isTableGrandTotalMeasureValue(obj: unknown): obj is ITableGrandTotalMeasureValue;
3154
+
3155
+ /**
3156
+ * Type guard checking whether input is an instance of {@link ITableGrandTotalSubtotalMeasureValue}
3157
+ *
3158
+ * @alpha
3159
+ */
3160
+ export declare function isTableGrandTotalSubtotalMeasureValue(obj: unknown): obj is ITableGrandTotalSubtotalMeasureValue;
3161
+
3162
+ /**
3163
+ * Type guard checking whether input is an instance of {@link ITableMeasureHeaderValue}
3164
+ *
3165
+ * @alpha
3166
+ */
3167
+ export declare function isTableMeasureHeaderValue(obj: unknown): obj is ITableMeasureHeaderValue;
3168
+
3169
+ /**
3170
+ * Type guard checking whether input is an instance of {@link ITableMeasureValue}
3171
+ *
3172
+ * @alpha
3173
+ */
3174
+ export declare function isTableMeasureValue(obj: unknown): obj is ITableMeasureValue;
3175
+
3176
+ /**
3177
+ * Type guard checking whether input is an instance of {@link ITableOverallTotalMeasureValue}
3178
+ *
3179
+ * @alpha
3180
+ */
3181
+ export declare function isTableOverallTotalMeasureValue(obj: unknown): obj is ITableOverallTotalMeasureValue;
3182
+
3183
+ /**
3184
+ * Type guard checking whether input is an instance of {@link ITableSubtotalMeasureValue}
3185
+ *
3186
+ * @alpha
3187
+ */
3188
+ export declare function isTableSubtotalMeasureValue(obj: unknown): obj is ITableSubtotalMeasureValue;
3189
+
3190
+ /**
3191
+ * Type guard checking whether input is an instance of {@link ITableTotalHeaderValue}
3192
+ *
3193
+ * @alpha
3194
+ */
3195
+ export declare function isTableTotalHeaderValue(obj: unknown): obj is ITableTotalHeaderValue;
3196
+
3104
3197
  /**
3105
3198
  * Typeguard checking whether input is an instance of {@link UnauthorizedSdkError};
3106
3199
  *
@@ -3116,41 +3209,191 @@ export declare function isUnauthorized(obj: unknown): obj is UnauthorizedSdkErro
3116
3209
  export declare function isUnknownSdkError(obj: unknown): obj is UnexpectedSdkError;
3117
3210
 
3118
3211
  /**
3212
+ * Type guard to check if a column definition is a value column
3213
+ * @alpha
3214
+ */
3215
+ export declare function isValueColumnDefinition(columnDefinition: unknown): columnDefinition is ITableValueColumnDefinition;
3216
+
3217
+ /**
3218
+ * Defines a column that shows row attribute values (like "Country" or "City").
3219
+ *
3220
+ * **What it does:**
3221
+ * These are the leftmost columns that show your row groupings. If you have
3222
+ * "Country" and "City" in your rows bucket, you'll get two attribute columns.
3223
+ *
3224
+ * **When it's created:**
3225
+ * - Automatically created for each attribute in the rows bucket
3226
+ * - Always appears first (leftmost) in the table
3227
+ * - Created regardless of whether you have measures in rows or columns
3228
+ *
3229
+ * **Real example:**
3230
+ * ```
3231
+ * | Country | City | Sales | <- "Country" and "City" are attribute columns
3232
+ * |---------|------|-------|
3233
+ * | USA | NYC | 100 |
3234
+ * | USA | LA | 200 |
3235
+ * ```
3236
+ *
3119
3237
  * @alpha
3120
3238
  */
3121
3239
  export declare interface ITableAttributeColumnDefinition {
3240
+ /**
3241
+ * Always "attribute" - identifies this as an attribute column.
3242
+ */
3122
3243
  type: "attribute";
3244
+ /**
3245
+ * Position of this column in the final table (0-based).
3246
+ */
3123
3247
  columnIndex: number;
3248
+ /**
3249
+ * Which attribute from the rows bucket this column represents (0-based).
3250
+ */
3124
3251
  rowHeaderIndex: number;
3252
+ /**
3253
+ * Metadata about this attribute (name, data type, formatting, etc.).
3254
+ * Contains information like the attribute's display name, local identifier, etc.
3255
+ */
3125
3256
  attributeDescriptor: IAttributeDescriptor;
3126
3257
  }
3127
3258
 
3128
3259
  /**
3260
+ * Cell located in {@link ITableAttributeColumnDefinition} – typically the leftmost
3261
+ * part of the table describing the current row's attribute values.
3262
+ *
3263
+ * It represents a single `IResultAttributeHeader` coming from the execution
3264
+ * response and can be present in both value rows and subtotal rows.
3265
+ *
3266
+ * **Visual example**
3267
+ * ```
3268
+ * Attribute | Measure |
3269
+ * -----------+---------+
3270
+ * USA | 100 | <- "USA" is attributeHeader
3271
+ * ```
3272
+ *
3129
3273
  * @alpha
3130
3274
  */
3131
3275
  export declare interface ITableAttributeHeaderValue {
3276
+ /**
3277
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3278
+ */
3132
3279
  type: "attributeHeader";
3280
+ /**
3281
+ * Attribute element value ready to be rendered. (e.g. "United States")
3282
+ */
3133
3283
  formattedValue: string | null;
3284
+ /**
3285
+ * The raw `IResultAttributeHeader` object from the execution response.
3286
+ */
3134
3287
  value: IResultAttributeHeader;
3288
+ /**
3289
+ * Zero-based row position of this cell in the final `data` matrix.
3290
+ */
3135
3291
  rowIndex: number;
3292
+ /**
3293
+ * Zero-based column position of this cell in the final `data` matrix.
3294
+ */
3136
3295
  columnIndex: number;
3137
- rowDefinition: ITableRowDefinition;
3296
+ /**
3297
+ * Full row context describing which row this cell belongs to
3298
+ * (value, subtotal, or grand-total row).
3299
+ */
3300
+ rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
3301
+ /**
3302
+ * Full column context describing which attribute column this cell belongs to.
3303
+ * Always an attribute column since this interface is for attribute headers.
3304
+ */
3138
3305
  columnDefinition: ITableAttributeColumnDefinition;
3139
3306
  }
3140
3307
 
3141
3308
  /**
3309
+ * Represents all possible column types in a pivot table structure.
3310
+ *
3311
+ * Think of a pivot table as having these column types from left to right:
3312
+ * 1. **Attribute columns** - Show row grouping labels (like "Country", "City")
3313
+ * 2. **Measure header column** - Shows measure names (only when measures are in rows)
3314
+ * 3. **Value/Total columns** - Show actual numbers and totals
3315
+ *
3316
+ * The exact combination depends on your data setup:
3317
+ *
3318
+ * **When measures are in columns (normal pivot table):**
3319
+ * ```
3320
+ * | | | Brand > Product | | |
3321
+ * | | |---------------------|----------------|----------------|
3322
+ * | | | GoodData | | ColMin Σ |
3323
+ * | | |---------------------|----------------| |
3324
+ * | | | Panther | Bear | Sum A | |
3325
+ * |---------|--------|---------------------|----------------|----------------|
3326
+ * | Country | City | Sales | Sales | Sales | Sales |
3327
+ * |---------|--------|----------|----------|----------------|----------------|
3328
+ * | USA | NYC | 100 | 150 | 250 | 100 |
3329
+ * | USA | LA | 200 | 250 | 450 | 200 |
3330
+ * ```
3331
+ * - Country, City are {@link ITableAttributeColumnDefinition}
3332
+ * - Sales is {@link ITableValueColumnDefinition}
3333
+ * - Sum A is {@link ITableSubtotalColumnDefinition}
3334
+ * - ColSum Σ is {@link ITableGrandTotalColumnDefinition}
3335
+ *
3336
+ * **When measures are in rows (transposed + non-pivoted):**
3337
+ * ```
3338
+ * | Country | City | MeasureGroupHeader | MeasureGroupValue |
3339
+ * |---------|------|---------------------|-----------------------|
3340
+ * | USA | NYC | Sales | 100 |
3341
+ * | USA | NYC | Profit | 20 |
3342
+ * ```
3343
+ * - Country, City are {@link ITableAttributeColumnDefinition}
3344
+ * - MeasureGroupHeader is {@link ITableMeasureGroupHeaderColumnDefinition}
3345
+ * - MeasureGroupValue is {@link ITableMeasureGroupValueColumnDefinition}
3346
+ *
3347
+ * **When measures are in rows (transposed + pivoted):**
3348
+ * ```
3349
+ * | | Quarter | |
3350
+ * |----------------------------------------|----------------| |
3351
+ * | Country | City | MeasureGroupHeader | Q1 | ColSum Σ |
3352
+ * |---------|------|-----------------------|----------------|----------------|
3353
+ * | USA | NYC | Sales | 250 | 500 |
3354
+ * | USA | NYC | Profit | 450 | 900 |
3355
+ * ```
3356
+ * - Country, City are {@link ITableAttributeColumnDefinition}
3357
+ * - MeasureGroupHeader is {@link ITableMeasureGroupHeaderColumnDefinition}
3358
+ * - Q1 is {@link ITableValueColumnDefinition}
3359
+ * - ColSum Σ is {@link ITableGrandTotalColumnDefinition}
3360
+ *
3142
3361
  * @alpha
3143
3362
  */
3144
3363
  export declare type ITableColumnDefinition = ITableAttributeColumnDefinition | ITableValueColumnDefinition | ITableMeasureGroupHeaderColumnDefinition | ITableMeasureGroupValueColumnDefinition | ITableSubtotalColumnDefinition | ITableGrandTotalColumnDefinition;
3145
3364
 
3146
3365
  /**
3366
+ * **The complete table data structure**.
3367
+ *
3368
+ * This is the main interface that represents a fully processed table data with all the metadata
3369
+ * needed to render pivot tables, flat tables, and transposed tables.
3370
+ *
3371
+ * It contains the structural definitions (rows/columns), the actual cell data, and flags
3372
+ * that describe the table layout and data interpretation.
3373
+ *
3147
3374
  * @alpha
3148
3375
  */
3149
3376
  export declare type ITableData = {
3377
+ /**
3378
+ * Array of column definitions that describe the structure and meaning of each column.
3379
+ */
3150
3380
  columnDefinitions: ITableColumnDefinition[];
3381
+ /**
3382
+ * Array of row definitions that describe the structure and meaning of each row.
3383
+ */
3151
3384
  rowDefinitions: ITableRowDefinition[];
3385
+ /**
3386
+ * 2D array of table cell data where `data[rowIndex][columnIndex]` contains
3387
+ * the formatted and raw values for that specific table position.
3388
+ */
3152
3389
  data: ITableDataValue[][];
3390
+ /**
3391
+ * Whether the table uses pivoting (attributes in columns bucket).
3392
+ */
3153
3393
  isPivoted: boolean;
3394
+ /**
3395
+ * Whether measures are transposed from columns into rows.
3396
+ */
3154
3397
  isTransposed: boolean;
3155
3398
  };
3156
3399
 
@@ -3173,6 +3416,17 @@ export declare interface ITableDataAttributeTotalScope {
3173
3416
  }
3174
3417
 
3175
3418
  /**
3419
+ * Union of all possible scope types that identify what a specific row or column represents.
3420
+ *
3421
+ * **Think of scopes as the "address" system for table data:**
3422
+ * - Each row has a `rowScope: ITableDataHeaderScope[]` array
3423
+ * - Each column has a `columnScope: ITableDataHeaderScope[]` array
3424
+ * - These arrays describe the "path" to identify exactly what data belongs in each cell
3425
+ *
3426
+ * When all scopes are regular scopes (attributes and measures) it represents value column or value row.
3427
+ * When scopes are mixed regular and total scopes, it represents subtotal column or subtotal row.
3428
+ * When all scopes are total scopes it represents grand total column or grand total row.
3429
+ *
3176
3430
  * @alpha
3177
3431
  */
3178
3432
  export declare type ITableDataHeaderScope = ITableDataAttributeScope | ITableDataAttributeTotalScope | ITableDataMeasureScope | ITableDataMeasureTotalScope | ITableDataMeasureGroupScope;
@@ -3204,53 +3458,204 @@ export declare interface ITableDataMeasureTotalScope {
3204
3458
  }
3205
3459
 
3206
3460
  /**
3461
+ * Union of **all possible cell value shapes** that can appear in the table
3462
+ * `data` matrix. Each variant corresponds to a concrete column × row
3463
+ * intersection produced by `dataViewToTableData`.
3464
+ *
3465
+ * - Header cells (`attributeHeader`, `measureHeader`, `totalHeader`)
3466
+ * - Numeric cells with raw measure data (`value`)
3467
+ * - Aggregations (`subtotalValue`, `grandTotalValue`, `grandTotalSubtotalValue`, `overallTotalValue`)
3468
+ *
3469
+ * When interpreting the `data` matrix you should always rely on the concrete subtype.
3470
+ *
3471
+ * **Example table without transposition:**
3472
+ * ```
3473
+ * Attr A | Col A | Sum A | ColSum Σ |
3474
+ * ----------+---------+---------+----------+
3475
+ * Row X | 100 | 200 | 300 |
3476
+ * Sum B | 400 | 600 | 1000 |
3477
+ * RowSum Σ | 500 | 800 | 1300 |
3478
+ * ```
3479
+ * - Attr A is attribute column, Col A is value column, Sum A is subtotal column, ColSum Σ is grand total column
3480
+ * - Row X is value row, Sum B is subtotal row, RowSum Σ is grand total row
3481
+ *
3482
+ * In this example:
3483
+ * - Row X is `attributeHeader`
3484
+ * - Sum B is `totalHeader`
3485
+ * - RowSum Σ is `grandTotalHeader`
3486
+ * - Row X : Col A - `100` is `value`
3487
+ * - Row X : Sum A - `200` is `subtotalValue`
3488
+ * - Row X : ColSum Σ - `300` is `grandTotalValue`
3489
+ * - Sum B : Col A - `400` is `subtotalValue`
3490
+ * - Sum B : Sum A - `600` is `subtotalValue`
3491
+ * - Sum B : ColSum Σ - `1000` is `grandTotalSubtotalValue`
3492
+ * - RowSum Σ : Col A - `500` is `grandTotalValue`
3493
+ * - RowSum Σ : Sum A - `800` is `grandTotalSubtotalValue`
3494
+ * - RowSum Σ : ColSum Σ - `1300` is `overallTotalValue`
3495
+ *
3207
3496
  * @alpha
3208
3497
  */
3209
3498
  export declare type ITableDataValue = ITableAttributeHeaderValue | ITableMeasureHeaderValue | ITableTotalHeaderValue | ITableMeasureValue | ITableSubtotalMeasureValue | ITableGrandTotalHeaderValue | ITableGrandTotalMeasureValue | ITableGrandTotalSubtotalMeasureValue | ITableOverallTotalMeasureValue;
3210
3499
 
3211
3500
  /**
3501
+ * Defines columns that show grand total values.
3502
+ *
3503
+ * **What it does:**
3504
+ * Shows grand totals - these are columns that show the aggregation of values for the top level pivoting attribute,
3505
+ * always appears as the rightmost columns.
3506
+ *
3507
+ * **When it's created:**
3508
+ * - Only when you have at least 1 attribute in the columns bucket (pivoting).
3509
+ * - Only when you set total for the leftmost column attribute.
3510
+ * - In the example, total is set for Brand x Sales.
3511
+ *
3512
+ * **Real example:**
3513
+ * ```
3514
+ * | | | Brand > Product | |
3515
+ * | | |---------------------|----------------|
3516
+ * | | | GoodData | ColMin Σ |
3517
+ * | | |---------------------| |
3518
+ * | | | Panther | Bear | |
3519
+ * |---------|--------|---------------------|----------------|
3520
+ * | Country | City | Sales | Sales | Sales |
3521
+ * |---------|--------|----------|----------|----------------|
3522
+ * | USA | NYC | 100 | 150 | 100 |
3523
+ * | USA | LA | 200 | 250 | 200 |
3524
+ * ```
3525
+ *
3212
3526
  * @alpha
3213
3527
  */
3214
- export declare interface ITableGrandTotalColumnDefinition {
3528
+ export declare type ITableGrandTotalColumnDefinition = {
3529
+ /**
3530
+ * Always "grandTotal" - identifies this as a grand total column.
3531
+ */
3215
3532
  type: "grandTotal";
3533
+ /**
3534
+ * Position of this column in the final table (0-based).
3535
+ * Usually the rightmost column in the table.
3536
+ */
3216
3537
  columnIndex: number;
3538
+ /**
3539
+ * Position in the original column headers array.
3540
+ */
3217
3541
  columnHeaderIndex: number;
3542
+ /**
3543
+ * Describes exactly what this column represents.
3544
+ */
3218
3545
  columnScope: ITableDataHeaderScope[];
3219
- }
3546
+ } & (/**
3547
+ * Handles case, when pivoting and measures are in rows.
3548
+ */ {
3549
+ isEmpty: false;
3550
+ isTransposed: true;
3551
+ totalHeader: IResultTotalHeader;
3552
+ attributeDescriptor: IAttributeDescriptor;
3553
+ } | /**
3554
+ * Handles standard pivoting case without transposition.
3555
+ */ {
3556
+ isEmpty: false;
3557
+ isTransposed: false;
3558
+ totalHeader: IResultTotalHeader;
3559
+ measureDescriptor: IMeasureDescriptor;
3560
+ });
3220
3561
 
3221
3562
  /**
3563
+ * Header cell labeling a **grand-total row** (usually located in the first columns).
3564
+ *
3565
+ * **Visual example:**
3566
+ * ```
3567
+ * | Q1 | Q2 | ColSum Σ |
3568
+ * -----------+-----+-----+----------+
3569
+ * USA | 100 | 120 | 220 |
3570
+ * CAN | 80 | 90 | 170 |
3571
+ * RowSum Σ | 180 | 210 | 390 | <- RowSum Σ is grandTotalHeader
3572
+ * ```
3573
+ *
3222
3574
  * @alpha
3223
3575
  */
3224
3576
  export declare interface ITableGrandTotalHeaderValue {
3577
+ /**
3578
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3579
+ */
3225
3580
  type: "grandTotalHeader";
3581
+ /**
3582
+ * Display text for the grand total row label (e.g., "Sum", "Total").
3583
+ * Usually shows the aggregation type or a localized "Total" label.
3584
+ */
3226
3585
  formattedValue: string | null;
3586
+ /**
3587
+ * Zero-based row position in the `data` matrix.
3588
+ * Points to a grand-total row that this header cell labels.
3589
+ */
3227
3590
  rowIndex: number;
3591
+ /**
3592
+ * Zero-based column position in the `data` matrix.
3593
+ * Usually points to the first attribute column (leftmost) or
3594
+ * measure header column (when measures are transposed).
3595
+ */
3228
3596
  columnIndex: number;
3229
- rowDefinition: ITableRowDefinition;
3230
- columnDefinition: ITableColumnDefinition;
3231
- grandTotalInfo?: {
3232
- type: TotalType;
3233
- measure: IMeasureDescriptor;
3234
- attribute: IAttributeDescriptor;
3235
- };
3597
+ /**
3598
+ * Row context - grand-total row since this header
3599
+ * cell is labeling a grand-total row.
3600
+ */
3601
+ rowDefinition: ITableGrandTotalRowDefinition;
3602
+ /**
3603
+ * Column context - typically an attribute column or measure header column
3604
+ * where the grand total label appears.
3605
+ */
3606
+ columnDefinition: ITableAttributeColumnDefinition | ITableMeasureGroupHeaderColumnDefinition;
3236
3607
  }
3237
3608
 
3238
3609
  /**
3610
+ * Numeric cell containing **grand totals** – totals across rows or columns.
3611
+ *
3612
+ * **Visual example**
3613
+ * ```
3614
+ * // Column grand total:
3615
+ * | Q1 | ColSum Σ |
3616
+ * -----------+-----+----------+
3617
+ * USA | 100 | 220 | <- 220 is grandTotalValue
3618
+ *
3619
+ * // Row grand total:
3620
+ * | Q1 | Q2 |
3621
+ * -----------+-----+-----+
3622
+ * USA | 100 | 120 |
3623
+ * RowSum Σ | 180 | 210 | <- 180 and 210 are grandTotalValue cells
3624
+ * ```
3625
+ *
3239
3626
  * @alpha
3240
3627
  */
3241
3628
  export declare interface ITableGrandTotalMeasureValue {
3629
+ /**
3630
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3631
+ */
3242
3632
  type: "grandTotalValue";
3633
+ /**
3634
+ * Human-readable formatted grand total value (e.g., "$10,000.00").
3635
+ * Uses the measure's format string and locale settings.
3636
+ */
3243
3637
  formattedValue: string | null;
3638
+ /**
3639
+ * Raw aggregated grand total value from the backend.
3640
+ * Result of aggregating across all rows or columns for this measure.
3641
+ */
3244
3642
  value: DataValue;
3643
+ /**
3644
+ * Zero-based row position in the `data` matrix.
3645
+ */
3245
3646
  rowIndex: number;
3647
+ /**
3648
+ * Zero-based column position in the `data` matrix.
3649
+ */
3246
3650
  columnIndex: number;
3247
- rowDefinition: ITableRowDefinition;
3248
- columnDefinition: ITableColumnDefinition;
3249
- grandTotalInfo?: {
3250
- type: TotalType;
3251
- measure: IMeasureDescriptor;
3252
- attribute: IAttributeDescriptor;
3253
- };
3651
+ /**
3652
+ * Row context - value or grand-total row.
3653
+ */
3654
+ rowDefinition: ITableValueRowDefinition | ITableGrandTotalRowDefinition;
3655
+ /**
3656
+ * Column context - value column, grand-total column, or measure group value column.
3657
+ */
3658
+ columnDefinition: ITableValueColumnDefinition | ITableGrandTotalColumnDefinition | ITableMeasureGroupValueColumnDefinition;
3254
3659
  }
3255
3660
 
3256
3661
  /**
@@ -3266,111 +3671,434 @@ export declare interface ITableGrandTotalRowDefinition {
3266
3671
  }
3267
3672
 
3268
3673
  /**
3674
+ * Numeric cell at the **intersection of row and column subtotals + grandtotals** – the *subtotals of grandtotals*.
3675
+ *
3676
+ * **Visual example**
3677
+ * ```
3678
+ * // Column grand total + row subtotal:
3679
+ * | Q1 | ColSum Σ |
3680
+ * -----------+-----+----------+
3681
+ * Sum A | 100 | 220 | <- 220 is grandTotalSubtotalValue
3682
+ *
3683
+ * // Row grand total + column subtotal:
3684
+ * | Q1 | Sum A |
3685
+ * -----------+-----+-------+
3686
+ * USA | 100 | 120 |
3687
+ * RowSum Σ | 180 | 210 | <- 210 is grandTotalSubtotalValue
3688
+ * ```
3689
+ *
3269
3690
  * @alpha
3270
3691
  */
3271
3692
  export declare interface ITableGrandTotalSubtotalMeasureValue {
3693
+ /**
3694
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3695
+ */
3272
3696
  type: "grandTotalSubtotalValue";
3697
+ /**
3698
+ * Human-readable formatted intersection total value (e.g., "$15,000.00").
3699
+ */
3273
3700
  formattedValue: string | null;
3701
+ /**
3702
+ * Raw aggregated value at the intersection of row and column totals.
3703
+ */
3274
3704
  value: DataValue;
3705
+ /**
3706
+ * Zero-based row position in the `data` matrix.
3707
+ */
3275
3708
  rowIndex: number;
3709
+ /**
3710
+ * Zero-based column position in the `data` matrix.
3711
+ */
3276
3712
  columnIndex: number;
3277
- rowDefinition: ITableRowDefinition;
3278
- columnDefinition: ITableColumnDefinition;
3279
- grandTotalInfo?: {
3280
- type: TotalType;
3281
- measure: IMeasureDescriptor;
3282
- attribute: IAttributeDescriptor;
3283
- };
3713
+ /**
3714
+ * Row context - grand-total row or subtotal row.
3715
+ */
3716
+ rowDefinition: ITableSubtotalRowDefinition | ITableGrandTotalRowDefinition;
3717
+ /**
3718
+ * Column context - subtotal column or grand-total column.
3719
+ */
3720
+ columnDefinition: ITableSubtotalColumnDefinition | ITableGrandTotalColumnDefinition;
3284
3721
  }
3285
3722
 
3286
3723
  /**
3724
+ * Defines the column that shows measure names when measures are in rows.
3725
+ *
3726
+ * **What it does:**
3727
+ * When you put measures in rows instead of columns, you need a column to show
3728
+ * which measure each row represents ("Sales", "Profit", etc.).
3729
+ *
3730
+ * **When it's created:**
3731
+ * - Only when `measureDimension === "rows"` (measures are transposed)
3732
+ * - Always created when you have measures in rows
3733
+ * - Appears right after your attribute columns
3734
+ *
3735
+ * **Real example:**
3736
+ * ```
3737
+ * | Country | City | Measure | Q1 | Q2 | <- "Measure" column shows measure names
3738
+ * |---------|------|---------|-----|-----|
3739
+ * | USA | NYC | Sales | 100 | 150 |
3740
+ * | USA | NYC | Profit | 20 | 30 |
3741
+ * | USA | LA | Sales | 200 | 250 |
3742
+ * | USA | LA | Profit | 40 | 50 |
3743
+ * ```
3744
+ *
3287
3745
  * @alpha
3288
3746
  */
3289
3747
  export declare interface ITableMeasureGroupHeaderColumnDefinition {
3748
+ /**
3749
+ * Always "measureGroupHeader" - identifies this as a measure names column.
3750
+ */
3290
3751
  type: "measureGroupHeader";
3752
+ /**
3753
+ * Position of this column in the final table (0-based).
3754
+ * Always appears right after attribute columns, before value columns.
3755
+ */
3291
3756
  columnIndex: number;
3757
+ /**
3758
+ * Metadata about the group of measures being displayed.
3759
+ * Contains information about all measures that will appear in rows.
3760
+ */
3292
3761
  measureGroupDescriptor: IMeasureGroupDescriptor;
3762
+ /**
3763
+ * Descriptors for attributes that are in the columns bucket.
3764
+ */
3293
3765
  attributeDescriptors: IAttributeDescriptor[];
3294
3766
  }
3295
3767
 
3296
3768
  /**
3769
+ * Defines the single value column when measures are in rows and there are no column attributes.
3770
+ *
3771
+ * **What it does:**
3772
+ * When measures are in rows and you don't have any attributes in columns,
3773
+ * you get one simple "Values" column that shows all the numbers.
3774
+ *
3775
+ * **When it's created:**
3776
+ * - Only when measures are in rows and there are no pivoting columns.
3777
+ * - Appears as the rightmost column after the measure header column
3778
+ *
3779
+ * **Real example:**
3780
+ * ```
3781
+ * | Country | City | Measure | Value | <- "Value" is the measure group value column
3782
+ * |---------|------|---------|-------|
3783
+ * | USA | NYC | Sales | 100 |
3784
+ * | USA | NYC | Profit | 20 |
3785
+ * | USA | LA | Sales | 200 |
3786
+ * | USA | LA | Profit | 40 |
3787
+ * ```
3788
+ *
3789
+ * **What happens if you DO have column attributes:**
3790
+ * If you have attributes in columns (like "Q1", "Q2"), then instead of this single
3791
+ * column, you get multiple `ITableValueColumnDefinition` columns - one for each
3792
+ * column attribute combination.
3793
+ *
3297
3794
  * @alpha
3298
3795
  */
3299
3796
  export declare interface ITableMeasureGroupValueColumnDefinition {
3797
+ /**
3798
+ * Always "measureGroupValue" - identifies this as the single values column
3799
+ * when measures are in rows and there are no column attributes.
3800
+ */
3300
3801
  type: "measureGroupValue";
3802
+ /**
3803
+ * Position of this column in the final table (0-based).
3804
+ * Always the rightmost column when this type is used.
3805
+ */
3301
3806
  columnIndex: number;
3807
+ /**
3808
+ * Metadata about the group of measures whose values are shown.
3809
+ */
3302
3810
  measureGroupDescriptor: IMeasureGroupDescriptor;
3303
3811
  }
3304
3812
 
3305
3813
  /**
3814
+ * Cell inside the {@link ITableMeasureGroupHeaderColumnDefinition}.
3815
+ * Appears **only when measures are transposed into rows**.
3816
+ * Each cell corresponds to one `IResultMeasureHeader` and labels the measure for that specific row.
3817
+ *
3818
+ * **Visual example**
3819
+ * ```
3820
+ * Attribute | Measure | Value |
3821
+ * -----------+---------+-------+
3822
+ * USA | Sales | 100 | <- "Sales" is measureHeader
3823
+ * USA | Cost | 80 | <- "Cost" is measureHeader
3824
+ * ```
3825
+ * The "Sales" and "Cost" **names** in the "Measure" column are `measureHeader` cells.
3826
+ * The numeric values (100, 80) are regular `value` cells.
3827
+ *
3828
+ * **When measures are in columns (no transposition), this interface is NOT used.**
3829
+ * Instead, measure names appear as regular column headers in the table structure.
3830
+ *
3306
3831
  * @alpha
3307
3832
  */
3308
3833
  export declare interface ITableMeasureHeaderValue {
3834
+ /**
3835
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3836
+ */
3309
3837
  type: "measureHeader";
3838
+ /**
3839
+ * Display name of the measure (e.g., "Sales", "Revenue").
3840
+ */
3310
3841
  formattedValue: string | null;
3842
+ /**
3843
+ * The raw `IResultMeasureHeader` object.
3844
+ */
3311
3845
  value: IResultMeasureHeader;
3846
+ /**
3847
+ * Zero-based row position in the `data` matrix.
3848
+ */
3312
3849
  rowIndex: number;
3850
+ /**
3851
+ * Zero-based column position in the `data` matrix.
3852
+ */
3313
3853
  columnIndex: number;
3314
- rowDefinition: ITableRowDefinition;
3315
- columnDefinition: ITableColumnDefinition;
3854
+ /**
3855
+ * Row context - can be only value row.
3856
+ */
3857
+ rowDefinition: ITableValueRowDefinition;
3858
+ /**
3859
+ * Column context - always a `measureGroupHeader` column.
3860
+ */
3861
+ columnDefinition: ITableMeasureGroupHeaderColumnDefinition;
3316
3862
  }
3317
3863
 
3318
3864
  /**
3865
+ * Numeric cell containing a **raw measure value** for regular (non-aggregated) row/column intersections.
3866
+ *
3867
+ * **Visual examples:**
3868
+ * ```
3869
+ * // Normal (measures in columns):
3870
+ * Country | Sales |
3871
+ * -----------+--------+
3872
+ * USA | 100 | <- 100 is value cell
3873
+ *
3874
+ * // Transposed (measures in rows):
3875
+ * Country | | |
3876
+ * -----------+---------+-------+
3877
+ * USA | Sales | 100 | <- 100 is value cell
3878
+ * ```
3879
+ *
3319
3880
  * @alpha
3320
3881
  */
3321
3882
  export declare interface ITableMeasureValue {
3883
+ /**
3884
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3885
+ */
3322
3886
  type: "value";
3887
+ /**
3888
+ * Human-readable formatted number ready for display (e.g., "$1,234.56").
3889
+ * Formatted using the measure's format string and respects locale settings.
3890
+ * Null if the raw value is null/missing.
3891
+ */
3323
3892
  formattedValue: string | null;
3893
+ /**
3894
+ * Raw numeric value from the backend execution response.
3895
+ * Can be number, string, or null depending on the measure data.
3896
+ */
3324
3897
  value: DataValue;
3898
+ /**
3899
+ * Zero-based row position in the `data` matrix.
3900
+ */
3325
3901
  rowIndex: number;
3902
+ /**
3903
+ * Zero-based column position in the `data` matrix.
3904
+ */
3326
3905
  columnIndex: number;
3906
+ /**
3907
+ * Row context - value or subtotal row.
3908
+ */
3327
3909
  rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
3910
+ /**
3911
+ * Column context - value column or measureGroupValue column.
3912
+ */
3328
3913
  columnDefinition: ITableValueColumnDefinition | ITableMeasureGroupValueColumnDefinition;
3329
3914
  }
3330
3915
 
3331
3916
  /**
3917
+ * Numeric cell at the **overall grand-total** intersection (bottom-right corner)
3918
+ * aggregating across *all* rows and columns.
3919
+ *
3920
+ * **Visual example:**
3921
+ * ```
3922
+ * | Q1 | Q2 | ColSum Σ |
3923
+ * -----------+-----+-----+----------+
3924
+ * USA | 100 | 120 | 220 |
3925
+ * CAN | 80 | 90 | 170 |
3926
+ * RowSum Σ | 180 | 210 | 390 | <- 390 is overallTotalValue
3927
+ * ```
3928
+ *
3332
3929
  * @alpha
3333
3930
  */
3334
3931
  export declare interface ITableOverallTotalMeasureValue {
3932
+ /**
3933
+ * Discriminator literal for narrowing the `ITableDataValue` union.
3934
+ */
3335
3935
  type: "overallTotalValue";
3936
+ /**
3937
+ * Human-readable formatted overall total value (e.g., "$50,000.00").
3938
+ */
3336
3939
  formattedValue: string | null;
3940
+ /**
3941
+ * Raw overall total value from the backend.
3942
+ */
3337
3943
  value: DataValue;
3944
+ /**
3945
+ * Zero-based row position in the `data` matrix.
3946
+ */
3338
3947
  rowIndex: number;
3948
+ /**
3949
+ * Zero-based column position in the `data` matrix.
3950
+ */
3339
3951
  columnIndex: number;
3952
+ /**
3953
+ * Row context - grand-total row since this is the
3954
+ * grand-total row × grand-total column intersection.
3955
+ */
3340
3956
  rowDefinition: ITableGrandTotalRowDefinition;
3957
+ /**
3958
+ * Column context - grand-total column since this is the
3959
+ * grand-total row × grand-total column intersection.
3960
+ */
3341
3961
  columnDefinition: ITableGrandTotalColumnDefinition;
3342
- grandTotalInfo?: {
3343
- type: TotalType;
3344
- measure: IMeasureDescriptor;
3345
- attribute: IAttributeDescriptor;
3346
- };
3347
3962
  }
3348
3963
 
3349
3964
  /**
3965
+ * Union of all possible row types in the table data structure.
3966
+ *
3967
+ * Think of the final table as a stack of these row types:
3968
+ * 1. **Value rows** – normal data rows (one per combination of row attributes)
3969
+ * 2. **Subtotal rows** – subtotal rows (only when subtotals are configured)
3970
+ * 3. **Grand-total rows** – grand-total rows (only when grand totals are configured)
3971
+ *
3972
+ * The exact mix depends on your configuration (pivoting, transposition, totals settings).
3973
+ *
3974
+ * **Example layout (no transposition, subtotals + grand totals enabled):**
3975
+ * ```
3976
+ * | Country | City | Q1 Sales | Q2 Sales |
3977
+ * |-------------|----------|----------|----------|
3978
+ * | USA | NYC | 100 | 150 | <- value row
3979
+ * | USA | LA | 200 | 250 | <- value row
3980
+ * | USA | SUBTOTAL | 300 | 400 | <- subtotal row
3981
+ * | CAN | TOR | 80 | 90 | <- value row
3982
+ * | CAN | SUBTOTAL | 80 | 90 | <- subtotal row
3983
+ * | GRAND TOTAL | | 380 | 490 | <- grand-total row
3984
+ * ```
3985
+ *
3350
3986
  * @alpha
3351
3987
  */
3352
3988
  export declare type ITableRowDefinition = ITableValueRowDefinition | ITableSubtotalRowDefinition | ITableGrandTotalRowDefinition;
3353
3989
 
3354
3990
  /**
3991
+ * Defines columns that show subtotal values.
3992
+ *
3993
+ * **What it does:**
3994
+ * Shows subtotals - these are columns that show the aggregation of values for a specific attribute pivoting subgroup.
3995
+ *
3996
+ * **When it's created:**
3997
+ * - Only when you have at least 2 attributes in the columns bucket (pivoting).
3998
+ * - Only when you set total for pivoting subgroup (not the leftmost column attribute - then it's grand total).
3999
+ * - In the example, total is set for Product x Sales.
4000
+ *
4001
+ * **Real example:**
4002
+ * ```
4003
+ * | | | Brand > Product | |
4004
+ * | | |---------------------|----------------|
4005
+ * | | | GoodData | |
4006
+ * | | |---------------------|----------------|
4007
+ * | | | Panther | Bear | Sum A |
4008
+ * |---------|--------|---------------------|----------------|
4009
+ * | Country | City | Sales | Sales | Sales |
4010
+ * |---------|--------|----------|----------|----------------|
4011
+ * | USA | NYC | 100 | 150 | 250 |
4012
+ * | USA | LA | 200 | 250 | 450 |
4013
+ * ```
4014
+ *
3355
4015
  * @alpha
3356
4016
  */
3357
- export declare interface ITableSubtotalColumnDefinition {
4017
+ export declare type ITableSubtotalColumnDefinition = {
4018
+ /**
4019
+ * Always "subtotal" - identifies this as a subtotal column.
4020
+ */
3358
4021
  type: "subtotal";
4022
+ /**
4023
+ * Position of this column in the final table (0-based).
4024
+ * Usually appears after regular value columns for each pivot subgroup.
4025
+ */
3359
4026
  columnIndex: number;
4027
+ /**
4028
+ * Position in the original headers array.
4029
+ */
3360
4030
  columnHeaderIndex: number;
4031
+ /**
4032
+ * Describes exactly what this column represents.
4033
+ * For subtotal, its always mix of regular attribute / measure scopes and total scopes.
4034
+ */
3361
4035
  columnScope: ITableDataHeaderScope[];
4036
+ } & (/**
4037
+ * Handles case, when pivoting and measures are in rows.
4038
+ */ {
4039
+ isEmpty: false;
4040
+ isTransposed: true;
4041
+ totalHeader: IResultTotalHeader;
4042
+ attributeDescriptor: IAttributeDescriptor;
3362
4043
  }
4044
+ /**
4045
+ * Handles standard pivoting case without transposition.
4046
+ */
4047
+ | {
4048
+ isEmpty: false;
4049
+ isTransposed: false;
4050
+ totalHeader: IResultTotalHeader;
4051
+ measureDescriptor: IMeasureDescriptor;
4052
+ });
3363
4053
 
3364
4054
  /**
4055
+ * Numeric cell containing **subtotals** aggregated across sibling rows/columns.
4056
+ *
4057
+ * **Visual example**
4058
+ * ```
4059
+ * // Row subtotal:
4060
+ * | Sales |
4061
+ * -----------+--------+
4062
+ * USA | 100 |
4063
+ * Sum A | 170 | <- 170 is subtotalValue
4064
+ *
4065
+ * // Column subtotal:
4066
+ * | Q1 | Sum A |
4067
+ * -----------+-----+---------+
4068
+ * USA | 100 | 220 | <- 220 is subtotalValue
4069
+ * ```
4070
+ *
3365
4071
  * @alpha
3366
4072
  */
3367
4073
  export declare interface ITableSubtotalMeasureValue {
4074
+ /**
4075
+ * Discriminator literal for narrowing the `ITableDataValue` union.
4076
+ */
3368
4077
  type: "subtotalValue";
4078
+ /**
4079
+ * Human-readable formatted subtotal value (e.g., "$2,345.67").
4080
+ */
3369
4081
  formattedValue: string | null;
4082
+ /**
4083
+ * Raw aggregated subtotal value from the backend.
4084
+ * Result of summing/averaging/etc. across sibling rows or columns.
4085
+ */
3370
4086
  value: DataValue;
4087
+ /**
4088
+ * Zero-based row position in the `data` matrix.
4089
+ */
3371
4090
  rowIndex: number;
4091
+ /**
4092
+ * Zero-based column position in the `data` matrix.
4093
+ */
3372
4094
  columnIndex: number;
4095
+ /**
4096
+ * Row context - value or subtotal row.
4097
+ */
3373
4098
  rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
4099
+ /**
4100
+ * Column context - value column or subtotal column.
4101
+ */
3374
4102
  columnDefinition: ITableValueColumnDefinition | ITableSubtotalColumnDefinition;
3375
4103
  }
3376
4104
 
@@ -3384,27 +4112,132 @@ export declare interface ITableSubtotalRowDefinition {
3384
4112
  }
3385
4113
 
3386
4114
  /**
4115
+ * Cell that represents total header.
4116
+ * Each cell corresponds to one `IResultTotalHeader` and labels the total for that specific row / column.
4117
+ *
4118
+ * **Visual example**
4119
+ * ```
4120
+ * Attribute | Value |
4121
+ * -----------+-------+
4122
+ * USA | 100 |
4123
+ * Sum A | 80 | <- "Sum A" is totalHeader
4124
+ * ```
4125
+ *
3387
4126
  * @alpha
3388
4127
  */
3389
4128
  export declare interface ITableTotalHeaderValue {
4129
+ /**
4130
+ * Discriminator literal for narrowing the `ITableDataValue` union.
4131
+ */
3390
4132
  type: "totalHeader";
4133
+ /**
4134
+ * Display text for the total header (e.g., "Sum", "Avg", "Max").
4135
+ */
3391
4136
  formattedValue: string | null;
4137
+ /**
4138
+ * The raw `IResultTotalHeader` object containing total metadata
4139
+ * like totalType, measureIndex, etc.
4140
+ */
3392
4141
  value: IResultTotalHeader;
4142
+ /**
4143
+ * Zero-based row position in the `data` matrix.
4144
+ * Usually points to a subtotal or grand-total row.
4145
+ */
3393
4146
  rowIndex: number;
4147
+ /**
4148
+ * Zero-based column position in the `data` matrix.
4149
+ * Points to the measure header column when measures are transposed.
4150
+ */
3394
4151
  columnIndex: number;
3395
- rowDefinition: ITableRowDefinition;
3396
- columnDefinition: ITableColumnDefinition;
4152
+ /**
4153
+ * Row context - subtotal or value row.
4154
+ */
4155
+ rowDefinition: ITableValueRowDefinition | ITableSubtotalRowDefinition;
4156
+ /**
4157
+ * Column context - value column, subtotal column, measure group header column, or attribute column.
4158
+ */
4159
+ columnDefinition: ITableValueColumnDefinition | ITableSubtotalColumnDefinition | ITableMeasureGroupHeaderColumnDefinition | ITableAttributeColumnDefinition;
3397
4160
  }
3398
4161
 
3399
4162
  /**
4163
+ * Defines columns that contain actual data values (values and subtotals).
4164
+ *
4165
+ * **What it does:**
4166
+ * These columns show your actual data - sales numbers, counts, percentages, etc.
4167
+ * The `columnScope` tells you exactly what this column represents.
4168
+ *
4169
+ * **When it's created:**
4170
+ * The system creates these based on your column headers. Here's how:
4171
+ *
4172
+ * **Simple case - just measures:**
4173
+ * ```
4174
+ * | Country | Sales | Profit | <- Sales and Profit are value columns
4175
+ * |---------|-------|--------|
4176
+ * | USA | 100 | 20 |
4177
+ * ```
4178
+ *
4179
+ * **Pivoted case - attributes + measures in columns:**
4180
+ * ```
4181
+ * | Country | East Sales | East Profit | West Sales | West Profit |
4182
+ * |---------|------------|-------------|------------|-------------|
4183
+ * | USA | 100 | 20 | 150 | 30 |
4184
+ * ```
4185
+ *
4186
+ * **Transposed case - measures in rows, attributes in columns:**
4187
+ * ```
4188
+ * | Country | Measure | East | West |
4189
+ * |---------|---------|------|------|
4190
+ * | USA | Sales | 100 | 150 |
4191
+ * | USA | Profit | 20 | 30 |
4192
+ * ```
4193
+ *
3400
4194
  * @alpha
3401
4195
  */
3402
- export declare interface ITableValueColumnDefinition {
4196
+ export declare type ITableValueColumnDefinition = {
4197
+ /**
4198
+ * Always "value" - identifies this as a value column.
4199
+ */
3403
4200
  type: "value";
4201
+ /**
4202
+ * Position of this column in the final table (0-based).
4203
+ * Comes after all row attribute columns.
4204
+ */
3404
4205
  columnIndex: number;
4206
+ /**
4207
+ * Position in the original column headers array.
4208
+ */
3405
4209
  columnHeaderIndex: number;
4210
+ /**
4211
+ * Describes exactly what this column represents.
4212
+ * For value, its always only regular attribute / measure scopes.
4213
+ */
3406
4214
  columnScope: ITableDataHeaderScope[];
4215
+ } & (/**
4216
+ * Handles case, when pivoting and measures are in rows.
4217
+ */ {
4218
+ isEmpty: false;
4219
+ isTransposed: true;
4220
+ attributeHeader: IResultAttributeHeader;
4221
+ attributeDescriptor: IAttributeDescriptor;
3407
4222
  }
4223
+ /**
4224
+ * Handles standard pivoting case without transposition.
4225
+ */
4226
+ | {
4227
+ isEmpty: false;
4228
+ isTransposed: false;
4229
+ measureHeader: IResultMeasureHeader;
4230
+ measureDescriptor: IMeasureDescriptor;
4231
+ }
4232
+ /**
4233
+ * Handles case, when pivoting, but there are no measures.
4234
+ */
4235
+ | {
4236
+ isEmpty: true;
4237
+ isTransposed: false;
4238
+ attributeHeader: IResultAttributeHeader;
4239
+ attributeDescriptor: IAttributeDescriptor;
4240
+ });
3408
4241
 
3409
4242
  /**
3410
4243
  * @alpha