@thoughtspot/visual-embed-sdk 1.47.2 → 1.47.3

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 (144) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/app.d.ts +6 -1
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +4 -1
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +112 -0
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/conversation.d.ts +2 -1
  9. package/cjs/src/embed/conversation.d.ts.map +1 -1
  10. package/cjs/src/embed/conversation.js.map +1 -1
  11. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  12. package/cjs/src/embed/liveboard.js +4 -1
  13. package/cjs/src/embed/liveboard.js.map +1 -1
  14. package/cjs/src/embed/liveboard.spec.js +22 -0
  15. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  16. package/cjs/src/embed/search.d.ts +24 -1
  17. package/cjs/src/embed/search.d.ts.map +1 -1
  18. package/cjs/src/embed/search.js +15 -2
  19. package/cjs/src/embed/search.js.map +1 -1
  20. package/cjs/src/embed/search.spec.js +99 -0
  21. package/cjs/src/embed/search.spec.js.map +1 -1
  22. package/cjs/src/embed/spotter-utils.d.ts +3 -0
  23. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  24. package/cjs/src/embed/spotter-utils.js +11 -3
  25. package/cjs/src/embed/spotter-utils.js.map +1 -1
  26. package/cjs/src/embed/spotter-utils.spec.js +51 -0
  27. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  28. package/cjs/src/embed/ts-embed.d.ts +1 -0
  29. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  30. package/cjs/src/embed/ts-embed.js +15 -3
  31. package/cjs/src/embed/ts-embed.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +139 -0
  33. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  34. package/cjs/src/index.d.ts +2 -2
  35. package/cjs/src/index.d.ts.map +1 -1
  36. package/cjs/src/index.js +8 -1
  37. package/cjs/src/index.js.map +1 -1
  38. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  39. package/cjs/src/mixpanel-service.js +2 -0
  40. package/cjs/src/mixpanel-service.js.map +1 -1
  41. package/cjs/src/mixpanel-service.spec.js +2 -0
  42. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  43. package/cjs/src/test/test-utils.d.ts +1 -0
  44. package/cjs/src/test/test-utils.d.ts.map +1 -1
  45. package/cjs/src/test/test-utils.js +26 -1
  46. package/cjs/src/test/test-utils.js.map +1 -1
  47. package/cjs/src/types.d.ts +424 -0
  48. package/cjs/src/types.d.ts.map +1 -1
  49. package/cjs/src/types.js +121 -1
  50. package/cjs/src/types.js.map +1 -1
  51. package/dist/{index-CFZ7RDZ9.js → index-DZq20cR6.js} +1 -1
  52. package/dist/src/embed/app.d.ts +6 -1
  53. package/dist/src/embed/app.d.ts.map +1 -1
  54. package/dist/src/embed/conversation.d.ts +2 -1
  55. package/dist/src/embed/conversation.d.ts.map +1 -1
  56. package/dist/src/embed/liveboard.d.ts.map +1 -1
  57. package/dist/src/embed/search.d.ts +24 -1
  58. package/dist/src/embed/search.d.ts.map +1 -1
  59. package/dist/src/embed/spotter-utils.d.ts +3 -0
  60. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  61. package/dist/src/embed/ts-embed.d.ts +1 -0
  62. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  63. package/dist/src/index.d.ts +2 -2
  64. package/dist/src/index.d.ts.map +1 -1
  65. package/dist/src/mixpanel-service.d.ts.map +1 -1
  66. package/dist/src/test/test-utils.d.ts +1 -0
  67. package/dist/src/test/test-utils.d.ts.map +1 -1
  68. package/dist/src/types.d.ts +424 -0
  69. package/dist/src/types.d.ts.map +1 -1
  70. package/dist/tsembed-react.es.js +173 -13
  71. package/dist/tsembed-react.js +172 -12
  72. package/dist/tsembed.es.js +174 -14
  73. package/dist/tsembed.js +172 -12
  74. package/dist/visual-embed-sdk-react-full.d.ts +425 -0
  75. package/dist/visual-embed-sdk-react.d.ts +425 -0
  76. package/dist/visual-embed-sdk.d.ts +453 -0
  77. package/lib/package.json +1 -1
  78. package/lib/src/embed/app.d.ts +6 -1
  79. package/lib/src/embed/app.d.ts.map +1 -1
  80. package/lib/src/embed/app.js +4 -1
  81. package/lib/src/embed/app.js.map +1 -1
  82. package/lib/src/embed/app.spec.js +113 -1
  83. package/lib/src/embed/app.spec.js.map +1 -1
  84. package/lib/src/embed/conversation.d.ts +2 -1
  85. package/lib/src/embed/conversation.d.ts.map +1 -1
  86. package/lib/src/embed/conversation.js.map +1 -1
  87. package/lib/src/embed/liveboard.d.ts.map +1 -1
  88. package/lib/src/embed/liveboard.js +4 -1
  89. package/lib/src/embed/liveboard.js.map +1 -1
  90. package/lib/src/embed/liveboard.spec.js +22 -0
  91. package/lib/src/embed/liveboard.spec.js.map +1 -1
  92. package/lib/src/embed/search.d.ts +24 -1
  93. package/lib/src/embed/search.d.ts.map +1 -1
  94. package/lib/src/embed/search.js +15 -2
  95. package/lib/src/embed/search.js.map +1 -1
  96. package/lib/src/embed/search.spec.js +100 -1
  97. package/lib/src/embed/search.spec.js.map +1 -1
  98. package/lib/src/embed/spotter-utils.d.ts +3 -0
  99. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  100. package/lib/src/embed/spotter-utils.js +11 -3
  101. package/lib/src/embed/spotter-utils.js.map +1 -1
  102. package/lib/src/embed/spotter-utils.spec.js +51 -0
  103. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  104. package/lib/src/embed/ts-embed.d.ts +1 -0
  105. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  106. package/lib/src/embed/ts-embed.js +14 -2
  107. package/lib/src/embed/ts-embed.js.map +1 -1
  108. package/lib/src/embed/ts-embed.spec.js +139 -0
  109. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  110. package/lib/src/index.d.ts +2 -2
  111. package/lib/src/index.d.ts.map +1 -1
  112. package/lib/src/index.js +2 -2
  113. package/lib/src/index.js.map +1 -1
  114. package/lib/src/mixpanel-service.d.ts.map +1 -1
  115. package/lib/src/mixpanel-service.js +2 -0
  116. package/lib/src/mixpanel-service.js.map +1 -1
  117. package/lib/src/mixpanel-service.spec.js +2 -0
  118. package/lib/src/mixpanel-service.spec.js.map +1 -1
  119. package/lib/src/test/test-utils.d.ts +1 -0
  120. package/lib/src/test/test-utils.d.ts.map +1 -1
  121. package/lib/src/test/test-utils.js +25 -1
  122. package/lib/src/test/test-utils.js.map +1 -1
  123. package/lib/src/types.d.ts +424 -0
  124. package/lib/src/types.d.ts.map +1 -1
  125. package/lib/src/types.js +120 -0
  126. package/lib/src/types.js.map +1 -1
  127. package/lib/src/visual-embed-sdk.d.ts +453 -0
  128. package/package.json +1 -1
  129. package/src/embed/app.spec.ts +141 -0
  130. package/src/embed/app.ts +11 -0
  131. package/src/embed/conversation.ts +2 -1
  132. package/src/embed/liveboard.spec.ts +32 -0
  133. package/src/embed/liveboard.ts +5 -0
  134. package/src/embed/search.spec.ts +118 -0
  135. package/src/embed/search.ts +43 -1
  136. package/src/embed/spotter-utils.spec.ts +52 -0
  137. package/src/embed/spotter-utils.ts +19 -3
  138. package/src/embed/ts-embed.spec.ts +185 -0
  139. package/src/embed/ts-embed.ts +14 -3
  140. package/src/index.ts +16 -0
  141. package/src/mixpanel-service.spec.ts +2 -0
  142. package/src/mixpanel-service.ts +2 -0
  143. package/src/test/test-utils.ts +33 -1
  144. package/src/types.ts +454 -0
@@ -2,6 +2,7 @@ import * as mixpanel from 'mixpanel-browser';
2
2
  import { logger } from './utils/logger';
3
3
  import { SessionInfo } from './utils/sessionInfoService';
4
4
  import { ERROR_MESSAGE } from './errors';
5
+ import { version } from '../package.json';
5
6
 
6
7
  export const EndPoints = {
7
8
  CONFIG: '/callosum/v1/system/config',
@@ -80,6 +81,7 @@ export function initMixpanel(sessionInfo: SessionInfo): void {
80
81
  clusterName: sessionInfo.clusterName,
81
82
  releaseVersion: sessionInfo.releaseVersion,
82
83
  hostAppUrl: window?.location?.host || '',
84
+ sdkVersion: version,
83
85
  });
84
86
  isMixpanelInitialized = true;
85
87
  emptyQueue();
@@ -1,6 +1,6 @@
1
1
  import { has } from 'lodash';
2
2
  import { version } from '../../package.json';
3
- import { Action, AuthType } from '../types';
3
+ import { Action, AuthType, EmbedEvent } from '../types';
4
4
 
5
5
  /**
6
6
  Initialises fetch to the global object
@@ -166,3 +166,35 @@ export const mockSessionInfo = {
166
166
  genNo: 5,
167
167
  },
168
168
  };
169
+
170
+ export const testVisualOverridesInEmbed = async (
171
+ embed: any,
172
+ visualOverrides: any,
173
+ ) => {
174
+ const mockEmbedEventPayload = {
175
+ type: EmbedEvent.APP_INIT,
176
+ data: {},
177
+ };
178
+
179
+ embed.render();
180
+
181
+ const mockPort: any = {
182
+ postMessage: jest.fn(),
183
+ };
184
+
185
+ await executeAfterWait(() => {
186
+ const iframe = getIFrameEl();
187
+ postMessageToParent(iframe.contentWindow, mockEmbedEventPayload, mockPort);
188
+ });
189
+
190
+ await executeAfterWait(() => {
191
+ expect(mockPort.postMessage).toHaveBeenCalledWith({
192
+ type: EmbedEvent.APP_INIT,
193
+ data: expect.objectContaining({
194
+ embedParams: expect.objectContaining({
195
+ visualOverridesParams: visualOverrides,
196
+ }),
197
+ }),
198
+ });
199
+ });
200
+ };
package/src/types.ts CHANGED
@@ -1994,6 +1994,22 @@ export interface LiveboardAppEmbedViewConfig {
1994
1994
  * ```
1995
1995
  */
1996
1996
  isLiveboardMasterpiecesEnabled?: boolean;
1997
+ /**
1998
+ * Enable or disable Muze chart phase 1 GA
1999
+ *
2000
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
2001
+ * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
2002
+ * @default false
2003
+ * @example
2004
+ * ```js
2005
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
2006
+ * const embed = new <EmbedComponent>('#tsEmbed', {
2007
+ * ... // other embed view config
2008
+ * newChartsLibrary: true,
2009
+ * })
2010
+ * ```
2011
+ */
2012
+ newChartsLibrary?: boolean;
1997
2013
  }
1998
2014
 
1999
2015
  export interface AllEmbedViewConfig
@@ -5862,6 +5878,7 @@ export enum Param {
5862
5878
  ShowLiveboardTitle = 'showLiveboardTitle',
5863
5879
  ShowMaskedFilterChip = 'showMaskedFilterChip',
5864
5880
  IsLiveboardMasterpiecesEnabled = 'isLiveboardMasterpiecesEnabled',
5881
+ EnableNewChartLibrary = 'muzeChartPhase1EnabledGA',
5865
5882
  HiddenTabs = 'hideTabs',
5866
5883
  VisibleTabs = 'visibleTabs',
5867
5884
  HideTabPanel = 'hideTabPanel',
@@ -8197,3 +8214,440 @@ export interface ContextObject {
8197
8214
  objectIds: ObjectIds;
8198
8215
  };
8199
8216
  }
8217
+
8218
+
8219
+ // ─── Visual Overrides ────────────────────────────────────────────────────────
8220
+
8221
+ export interface FontProperties {
8222
+ color?: string;
8223
+ bold?: boolean;
8224
+ italic?: boolean;
8225
+ strikeThrough?: boolean;
8226
+ underline?: boolean;
8227
+ }
8228
+
8229
+ export interface SolidBackgroundAttrs {
8230
+ color?: string;
8231
+ }
8232
+
8233
+ export interface GradientBackgroundAttrs {
8234
+ backgroundFormatMidpoint?: number;
8235
+ colors?: string[];
8236
+ backgroundFormatRange?: number[];
8237
+ isAutoScaled?: boolean;
8238
+ }
8239
+
8240
+ /**
8241
+ * Data label filter operators
8242
+ * @group Visual Overrides
8243
+ */
8244
+ export enum DataLabelFilterOperator {
8245
+ /** Greater than */
8246
+ GreaterThan = 'GREATER_THAN',
8247
+ /** Less than */
8248
+ LessThan = 'LESS_THAN',
8249
+ /** Greater than or equal to */
8250
+ GreaterThanOrEqualTo = 'GREATER_THAN_OR_EQUAL_TO',
8251
+ /** Less than or equal to */
8252
+ LessThanOrEqualTo = 'LESS_THAN_OR_EQUAL_TO',
8253
+ /** Equal to */
8254
+ EqualTo = 'EQUAL_TO',
8255
+ /** Not equal to */
8256
+ NotEqualTo = 'NOT_EQUAL_TO',
8257
+ }
8258
+
8259
+ /**
8260
+ * Conditional formatting operators
8261
+ * @group Visual Overrides
8262
+ */
8263
+ export enum ConditionalFormattingOperator {
8264
+ /** Is equal to */
8265
+ Is = 'IS',
8266
+ /** Is not equal to */
8267
+ IsNot = 'IS_NOT',
8268
+ /** Contains */
8269
+ Contains = 'CONTAINS',
8270
+ /** Does not contain */
8271
+ DoesNotContain = 'DOES_NOT_CONTAIN',
8272
+ /** Starts with */
8273
+ StartsWith = 'STARTS_WITH',
8274
+ /** Ends with */
8275
+ EndsWith = 'ENDS_WITH',
8276
+ /** Greater than */
8277
+ GreaterThan = 'GREATER_THAN',
8278
+ /** Less than */
8279
+ LessThan = 'LESS_THAN',
8280
+ /** Greater than or equal to */
8281
+ GreaterThanEqualTo = 'GREATER_THAN_EQUAL_TO',
8282
+ /** Less than or equal to */
8283
+ LessThanEqualTo = 'LESS_THAN_EQUAL_TO',
8284
+ /** Equal to */
8285
+ EqualTo = 'EQUAL_TO',
8286
+ /** Not equal to */
8287
+ NotEqualTo = 'NOT_EQUAL_TO',
8288
+ /** Is between */
8289
+ IsBetween = 'IS_BETWEEN',
8290
+ /** Is null */
8291
+ IsNull = 'IS_NULL',
8292
+ /** Is not null */
8293
+ IsNotNull = 'IS_NOT_NULL',
8294
+ }
8295
+
8296
+ /**
8297
+ * Background format types for conditional formatting
8298
+ * @group Visual Overrides
8299
+ */
8300
+ export enum BackgroundFormatType {
8301
+ /** Solid color background */
8302
+ Solid = 'SOLID',
8303
+ /** Gradient background */
8304
+ Gradient = 'GRADIENT',
8305
+ }
8306
+
8307
+ /**
8308
+ * Comparison types for conditional formatting
8309
+ * @group Visual Overrides
8310
+ */
8311
+ export enum ConditionalFormattingComparisonType {
8312
+ /** Value-based comparison */
8313
+ ValueBased = 'VALUE_BASED',
8314
+ /** Column-based comparison */
8315
+ ColumnBased = 'COLUMN_BASED',
8316
+ /** Parameter-based comparison */
8317
+ ParameterBased = 'PARAMETER_BASED',
8318
+ }
8319
+
8320
+ /**
8321
+ * A single conditional formatting rule row
8322
+ * @group Visual Overrides
8323
+ */
8324
+ export interface ConditionalFormattingRow {
8325
+ /** Comparison operator */
8326
+ operator: ConditionalFormattingOperator | string;
8327
+ /** Value to compare against */
8328
+ value?: string;
8329
+ /** Range values for range-based comparisons */
8330
+ rangeValues?: { min: number; max: number };
8331
+ /** Plot the formatting as a band/area */
8332
+ plotAsBand?: boolean;
8333
+ /** Highlight this row if the condition is met */
8334
+ isHighlightRow?: boolean;
8335
+ /** Type of comparison: value-based, column-based, or parameter-based */
8336
+ comparisonType?: ConditionalFormattingComparisonType | string;
8337
+ /** Column ID to apply the formatting to (left-hand side) */
8338
+ lhsColumnId?: string;
8339
+ /** Column name to compare against (right-hand side) */
8340
+ columnToCompare?: string;
8341
+ /** Parameter ID to compare against */
8342
+ comparisonParameterId?: string;
8343
+ /** Font properties to apply (color, bold, italic, etc.) */
8344
+ fontProperties?: FontProperties;
8345
+ /** Background format type: solid color or gradient */
8346
+ backgroundFormatType?: BackgroundFormatType | string;
8347
+ /** Solid background color attributes */
8348
+ solidBackgroundAttrs?: SolidBackgroundAttrs;
8349
+ /** Gradient background attributes */
8350
+ gradientBackgroundAttrs?: GradientBackgroundAttrs;
8351
+ }
8352
+
8353
+ /**
8354
+ * Conditional formatting configuration
8355
+ * @group Visual Overrides
8356
+ */
8357
+ export interface ConditionalFormatting {
8358
+ /** Array of conditional formatting rules */
8359
+ rows?: ConditionalFormattingRow[];
8360
+ }
8361
+
8362
+ /**
8363
+ * Color palette for charts
8364
+ * @group Visual Overrides
8365
+ */
8366
+ export interface ColorPalette {
8367
+ /** Array of color values (hex codes or color names) */
8368
+ colors?: string[];
8369
+ }
8370
+
8371
+ /**
8372
+ * Legend position options
8373
+ * @group Visual Overrides
8374
+ */
8375
+ export enum LegendPosition {
8376
+ /** Position legend at the top */
8377
+ Top = 'top',
8378
+ /** Position legend at the bottom */
8379
+ Bottom = 'bottom',
8380
+ /** Position legend on the left */
8381
+ Left = 'left',
8382
+ /** Position legend on the right */
8383
+ Right = 'right',
8384
+ }
8385
+
8386
+ /**
8387
+ * Table theme options
8388
+ * @group Visual Overrides
8389
+ */
8390
+ export enum TableTheme {
8391
+ /** Outline theme */
8392
+ Outline = 'OUTLINE',
8393
+ /** Row theme */
8394
+ Row = 'ROW',
8395
+ /** Zebra theme */
8396
+ Zebra = 'ZEBRA',
8397
+ }
8398
+
8399
+ /**
8400
+ * Table content density options
8401
+ * @group Visual Overrides
8402
+ */
8403
+ export enum TableContentDensity {
8404
+ /** Regular density */
8405
+ Regular = 'REGULAR',
8406
+ /** Compact density */
8407
+ Compact = 'COMPACT',
8408
+ }
8409
+
8410
+ /**
8411
+ * Chart legend configuration
8412
+ * @group Visual Overrides
8413
+ */
8414
+ export interface ChartLegend {
8415
+ /** Show or hide the legend */
8416
+ show?: boolean;
8417
+ /** Position of the legend */
8418
+ position?: LegendPosition | string;
8419
+ /** Color palette to use for legend colors */
8420
+ colorPalette?: ColorPalette;
8421
+ }
8422
+
8423
+ /**
8424
+ * Filter for data labels
8425
+ * @group Visual Overrides
8426
+ */
8427
+ export interface DataLabelFilter {
8428
+ /** Filter threshold value */
8429
+ value?: number;
8430
+ /** Filter operator */
8431
+ operator?: DataLabelFilterOperator | string;
8432
+ }
8433
+
8434
+ /**
8435
+ * Data label configuration for a specific column
8436
+ * @group Visual Overrides
8437
+ */
8438
+ export interface ColumnDataLabel {
8439
+ /** Column name to apply data label overrides to */
8440
+ name: string;
8441
+ /** Show or hide data labels for this column */
8442
+ visible?: boolean;
8443
+ /** Filter to apply to data labels */
8444
+ filter?: DataLabelFilter | null;
8445
+ }
8446
+
8447
+ /**
8448
+ * Chart data label configuration
8449
+ * @group Visual Overrides
8450
+ */
8451
+ export interface ChartDataLabel {
8452
+ /** Show labels for all data points */
8453
+ allLabels?: boolean;
8454
+ /** Show labels for stacked values */
8455
+ stackLabels?: boolean;
8456
+ /** Per-column data label configurations */
8457
+ columnDataLabel?: ColumnDataLabel[];
8458
+ }
8459
+
8460
+ /**
8461
+ * Chart summaries and totals configuration
8462
+ * @group Visual Overrides
8463
+ */
8464
+ export interface ChartSummaries {
8465
+ /** Show row totals */
8466
+ showRowTotals?: boolean;
8467
+ /** Show column totals */
8468
+ showColumnTotals?: boolean;
8469
+ /** Show row grand totals */
8470
+ showRowGrandTotals?: boolean;
8471
+ /** Show column grand totals */
8472
+ showColumnGrandTotals?: boolean;
8473
+ }
8474
+
8475
+ /**
8476
+ * Gridline configuration
8477
+ * @group Visual Overrides
8478
+ */
8479
+ export interface GridLine {
8480
+ /** Show vertical gridlines */
8481
+ x?: boolean;
8482
+ /** Show horizontal gridlines */
8483
+ y?: boolean;
8484
+ }
8485
+
8486
+ /**
8487
+ * Chart display configuration
8488
+ * @group Visual Overrides
8489
+ */
8490
+ export interface ChartDisplay {
8491
+ /** Summary and totals configuration */
8492
+ summaries?: ChartSummaries;
8493
+ /** Show regression line on chart */
8494
+ regressionLine?: boolean;
8495
+ /** Gridline visibility configuration */
8496
+ gridLine?: GridLine;
8497
+ }
8498
+
8499
+ /**
8500
+ * Y-axis range configuration
8501
+ * @group Visual Overrides
8502
+ */
8503
+ export interface YAxisRange {
8504
+ /** Minimum value for Y-axis */
8505
+ min?: number;
8506
+ /** Maximum value for Y-axis */
8507
+ max?: number;
8508
+ }
8509
+
8510
+ /**
8511
+ * Chart axis configuration
8512
+ * @group Visual Overrides
8513
+ */
8514
+ export interface ChartAxis {
8515
+ /** Column names to link to this axis */
8516
+ linkedColumns?: string[];
8517
+ /** Show the axis name */
8518
+ showName?: boolean;
8519
+ /** Show the axis label values */
8520
+ showLabelValue?: boolean;
8521
+ /** Y-axis range configuration */
8522
+ yAxisRange?: YAxisRange;
8523
+ }
8524
+
8525
+ /**
8526
+ * Chart column override configuration
8527
+ * @group Visual Overrides
8528
+ */
8529
+ export interface ChartColumn {
8530
+ /** Column name to apply overrides to */
8531
+ name: string;
8532
+ /** Color for the column (hex code) */
8533
+ color?: string;
8534
+ /** Conditional formatting rules to apply to the column */
8535
+ conditionalFormatting?: ConditionalFormatting;
8536
+ }
8537
+
8538
+ /**
8539
+ * Chart visualization overrides
8540
+ * @group Visual Overrides
8541
+ */
8542
+ export interface ChartOverrides {
8543
+ /** Legend configuration */
8544
+ legend?: ChartLegend;
8545
+ /** Data label configuration */
8546
+ dataLabel?: ChartDataLabel;
8547
+ /** Display properties (summaries, regression line, gridlines) */
8548
+ display?: ChartDisplay;
8549
+ /** Per-axis configurations */
8550
+ axis?: ChartAxis[];
8551
+ /** Per-column configurations */
8552
+ columns?: ChartColumn[];
8553
+ /** Update mask paths for partial updates */
8554
+ updateMaskPaths?: string[];
8555
+ }
8556
+
8557
+ /**
8558
+ * Table column override configuration
8559
+ * @group Visual Overrides
8560
+ */
8561
+ export interface TableColumn {
8562
+ /**
8563
+ * Name of the column to apply overrides to
8564
+ */
8565
+ name: string;
8566
+ /**
8567
+ * Enable or disable text wrapping for the column
8568
+ */
8569
+ wrapText?: boolean;
8570
+ /**
8571
+ * Show or hide the column
8572
+ */
8573
+ show?: boolean;
8574
+ /**
8575
+ * Conditional formatting rules to apply to the column
8576
+ */
8577
+ conditionalFormatting?: ConditionalFormatting;
8578
+ }
8579
+
8580
+ /**
8581
+ * Table display configuration
8582
+ * @group Visual Overrides
8583
+ */
8584
+ export interface TableDisplay {
8585
+ /** Table theme */
8586
+ tableTheme?: TableTheme | string;
8587
+ /** Table content density */
8588
+ tableContentDensity?: TableContentDensity | string;
8589
+ }
8590
+
8591
+ /**
8592
+ * Column summary visibility configuration
8593
+ * @group Visual Overrides
8594
+ */
8595
+ export interface ColumnSummaryVisibility {
8596
+ /** Column ID to control summary visibility for */
8597
+ columnId: string;
8598
+ /** Show or hide summary for this column */
8599
+ visible: boolean;
8600
+ }
8601
+
8602
+ /**
8603
+ * Display summary configuration
8604
+ * @group Visual Overrides
8605
+ */
8606
+ export interface DisplaySummaryConfig {
8607
+ /** Show all column summaries by default */
8608
+ showAllSummaries?: boolean;
8609
+ /** Per-column summary visibility overrides */
8610
+ columnVisibility?: ColumnSummaryVisibility[];
8611
+ }
8612
+
8613
+ /**
8614
+ * Table visualization overrides
8615
+ * @group Visual Overrides
8616
+ */
8617
+ export interface TableOverrides {
8618
+ /** Per-column configurations (properties, conditional formatting) */
8619
+ columns?: TableColumn[];
8620
+ /** Table display properties (theme, density) */
8621
+ display?: TableDisplay;
8622
+ /** Summary/headline column visibility configuration */
8623
+ displaySummaryConfig?: DisplaySummaryConfig;
8624
+ /** Update mask paths for partial updates */
8625
+ updateMaskPaths?: string[];
8626
+ }
8627
+
8628
+ /**
8629
+ * Visualization overrides to customize chart and table rendering
8630
+ * within embedded ThoughtSpot components.
8631
+ *
8632
+ * @group Visual Overrides
8633
+ * @example
8634
+ * ```js
8635
+ * const embed = new AppEmbed('#tsEmbed', {
8636
+ * visualOverrides: {
8637
+ * chart: {
8638
+ * legend: { show: true, position: 'bottom' },
8639
+ * columns: [{ name: 'Revenue', color: '#1f77b4' }],
8640
+ * },
8641
+ * table: {
8642
+ * display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' },
8643
+ * },
8644
+ * },
8645
+ * });
8646
+ * ```
8647
+ */
8648
+ export interface VisualizationOverrides {
8649
+ /** Chart visualization overrides */
8650
+ chart?: ChartOverrides;
8651
+ /** Table visualization overrides */
8652
+ table?: TableOverrides;
8653
+ }