@thoughtspot/visual-embed-sdk 1.32.7 → 1.32.9
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/cjs/package.json +3 -3
- package/cjs/src/css-variables.d.ts +18 -3
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/base.d.ts +34 -32
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +40 -37
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +5 -1
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/types.d.ts +80 -8
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +76 -6
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/authService.spec.js +3 -1
- package/cjs/src/utils/authService/authService.spec.js.map +1 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +3 -1
- package/cjs/src/utils.js.map +1 -1
- package/dist/src/css-variables.d.ts +18 -3
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +34 -32
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/types.d.ts +80 -8
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +314 -82
- package/dist/tsembed-react.js +257 -81
- package/dist/tsembed.es.js +354 -119
- package/dist/tsembed.js +297 -118
- package/dist/visual-embed-sdk-react-full.d.ts +132 -43
- package/dist/visual-embed-sdk-react.d.ts +132 -43
- package/dist/visual-embed-sdk.d.ts +132 -43
- package/lib/package.json +3 -3
- package/lib/src/css-variables.d.ts +18 -3
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/base.d.ts +34 -32
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +40 -37
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +5 -1
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/types.d.ts +80 -8
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +76 -6
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/authService.spec.js +3 -1
- package/lib/src/utils/authService/authService.spec.js.map +1 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +3 -1
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +132 -43
- package/package.json +3 -3
- package/src/css-variables.ts +21 -3
- package/src/embed/base.ts +35 -32
- package/src/tokenizedFetch.ts +5 -1
- package/src/types.ts +80 -8
- package/src/utils/authService/authService.spec.ts +3 -1
- package/src/utils.ts +3 -0
|
@@ -1664,21 +1664,22 @@ export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise
|
|
|
1664
1664
|
/**
|
|
1665
1665
|
* Imports TML representation of the metadata objects into ThoughtSpot.
|
|
1666
1666
|
* @param data
|
|
1667
|
+
* @returns imports TML data into ThoughtSpot
|
|
1667
1668
|
* @example
|
|
1668
1669
|
* ```js
|
|
1669
|
-
*
|
|
1670
|
-
* //Array of metadata Tmls
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1670
|
+
* executeTML({
|
|
1671
|
+
* //Array of metadata Tmls in string format
|
|
1672
|
+
* metadata_tmls: [
|
|
1673
|
+
* "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
|
|
1674
|
+
* \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
|
|
1675
|
+
* ],
|
|
1676
|
+
* import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
|
|
1677
|
+
* create_new: false, // If selected, creates TML objects with new GUIDs.
|
|
1678
|
+
* }).then(result => {
|
|
1679
|
+
* console.log(result);
|
|
1680
|
+
* }).catch(error => {
|
|
1681
|
+
* console.error(error);
|
|
1682
|
+
* });
|
|
1682
1683
|
*```
|
|
1683
1684
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1684
1685
|
* @group Global methods
|
|
@@ -1688,27 +1689,28 @@ export declare const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
|
1688
1689
|
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
|
|
1689
1690
|
* format.
|
|
1690
1691
|
* @param data
|
|
1692
|
+
* @returns exports TML data
|
|
1691
1693
|
* @example
|
|
1692
1694
|
* ```js
|
|
1693
|
-
exportTML({
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
}).then(result => {
|
|
1708
|
-
|
|
1709
|
-
}).catch(error => {
|
|
1710
|
-
|
|
1711
|
-
});
|
|
1695
|
+
* exportTML({
|
|
1696
|
+
* metadata: [
|
|
1697
|
+
* {
|
|
1698
|
+
* type: "LIVEBOARD", //Metadata Type
|
|
1699
|
+
* identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
|
|
1700
|
+
* }
|
|
1701
|
+
* ],
|
|
1702
|
+
* export_associated: false,//indicates whether to export associated metadata objects
|
|
1703
|
+
* export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
|
|
1704
|
+
* //exporting a Liveboard and its associated objects, the API
|
|
1705
|
+
* //returns the Liveboard TML data with the FQNs of the referenced
|
|
1706
|
+
* //worksheet. If the exported TML data includes FQNs, you don't need
|
|
1707
|
+
* //to manually add FQNs of the referenced objects during TML import.
|
|
1708
|
+
* edoc_format: "JSON" //It takes JSON or YAML value
|
|
1709
|
+
* }).then(result => {
|
|
1710
|
+
* console.log(result);
|
|
1711
|
+
* }).catch(error => {
|
|
1712
|
+
* console.error(error);
|
|
1713
|
+
* });
|
|
1712
1714
|
* ```
|
|
1713
1715
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1714
1716
|
* @group Global methods
|
|
@@ -2204,6 +2206,7 @@ export interface customCssInterface {
|
|
|
2204
2206
|
* Styles within the {@link CustomisationsInterface}.
|
|
2205
2207
|
*/
|
|
2206
2208
|
export interface CustomStyles {
|
|
2209
|
+
customCSSUrl?: string;
|
|
2207
2210
|
customCSS?: customCssInterface;
|
|
2208
2211
|
}
|
|
2209
2212
|
/**
|
|
@@ -2637,11 +2640,12 @@ export interface ViewConfig {
|
|
|
2637
2640
|
*/
|
|
2638
2641
|
visibleActions?: Action[];
|
|
2639
2642
|
/**
|
|
2640
|
-
* Show alert messages and toast messages in the embedded
|
|
2643
|
+
* Show alert messages and toast messages in the embedded
|
|
2644
|
+
* view in full app embed.
|
|
2641
2645
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2642
2646
|
* @example
|
|
2643
2647
|
* ```js
|
|
2644
|
-
* const embed = new
|
|
2648
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
2645
2649
|
* ... // other options
|
|
2646
2650
|
* showAlerts:true,
|
|
2647
2651
|
* })
|
|
@@ -3171,6 +3175,28 @@ export interface RuntimeParameter {
|
|
|
3171
3175
|
* console.log('Drilldown event', drilldown);
|
|
3172
3176
|
* }));
|
|
3173
3177
|
* ```
|
|
3178
|
+
*
|
|
3179
|
+
* If you are using React components for embedding, you can register to any
|
|
3180
|
+
* events from the `EmbedEvent` list by using the `on<EventName>` convention.
|
|
3181
|
+
* For example,`onAlert`, `onCopyToClipboard` and so on.
|
|
3182
|
+
*
|
|
3183
|
+
* @example
|
|
3184
|
+
* ```js
|
|
3185
|
+
* // ...
|
|
3186
|
+
* const MyComponent = ({ dataSources }) => {
|
|
3187
|
+
* const onLoad = () => {
|
|
3188
|
+
* console.log(EmbedEvent.Load, {});
|
|
3189
|
+
* };
|
|
3190
|
+
*
|
|
3191
|
+
* return (
|
|
3192
|
+
* <SearchEmbed
|
|
3193
|
+
* dataSources={dataSources}
|
|
3194
|
+
* onLoad = {logEvent("Load")}
|
|
3195
|
+
* />
|
|
3196
|
+
* );
|
|
3197
|
+
* };
|
|
3198
|
+
* ```
|
|
3199
|
+
*
|
|
3174
3200
|
* @group Events
|
|
3175
3201
|
*/
|
|
3176
3202
|
export declare enum EmbedEvent {
|
|
@@ -4045,8 +4071,8 @@ export declare enum EmbedEvent {
|
|
|
4045
4071
|
* Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
|
|
4046
4072
|
* for this embed event to get emitted.
|
|
4047
4073
|
*
|
|
4048
|
-
*
|
|
4049
|
-
*
|
|
4074
|
+
* @param: payload
|
|
4075
|
+
* @param: responder
|
|
4050
4076
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
4051
4077
|
* will run the search or not, and if not, which error message to provide.
|
|
4052
4078
|
*
|
|
@@ -4058,6 +4084,7 @@ export declare enum EmbedEvent {
|
|
|
4058
4084
|
*
|
|
4059
4085
|
* @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
|
|
4060
4086
|
*
|
|
4087
|
+
* @example
|
|
4061
4088
|
*```js
|
|
4062
4089
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
4063
4090
|
* (payload, responder) => {
|
|
@@ -4093,7 +4120,6 @@ export declare enum EmbedEvent {
|
|
|
4093
4120
|
* }})
|
|
4094
4121
|
* })
|
|
4095
4122
|
*```
|
|
4096
|
-
*
|
|
4097
4123
|
*/
|
|
4098
4124
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
4099
4125
|
/**
|
|
@@ -4111,7 +4137,7 @@ export declare enum EmbedEvent {
|
|
|
4111
4137
|
}
|
|
4112
4138
|
/**
|
|
4113
4139
|
* Event types that can be triggered by the host application
|
|
4114
|
-
* to the embedded ThoughtSpot app
|
|
4140
|
+
* to the embedded ThoughtSpot app.
|
|
4115
4141
|
*
|
|
4116
4142
|
* To trigger an event use the corresponding
|
|
4117
4143
|
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
@@ -4128,6 +4154,40 @@ export declare enum EmbedEvent {
|
|
|
4128
4154
|
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
|
|
4129
4155
|
* ]);
|
|
4130
4156
|
* ```
|
|
4157
|
+
* @example
|
|
4158
|
+
* If using React components to embed, use the format shown in this example:
|
|
4159
|
+
*
|
|
4160
|
+
* ```js
|
|
4161
|
+
* const selectVizs = () => {
|
|
4162
|
+
* embedRef.current.trigger(HostEvent.SetVisibleVizs, [
|
|
4163
|
+
* "715e4613-c891-4884-be44-aa8d13701c06",
|
|
4164
|
+
* "3f84d633-e325-44b2-be25-c6650e5a49cf"
|
|
4165
|
+
* ]);
|
|
4166
|
+
* };
|
|
4167
|
+
* ```
|
|
4168
|
+
*
|
|
4169
|
+
*
|
|
4170
|
+
* You can also attach an Embed event to a Host event to trigger
|
|
4171
|
+
* a specific action as shown in this example:
|
|
4172
|
+
*
|
|
4173
|
+
* @example
|
|
4174
|
+
* ```js
|
|
4175
|
+
* const EmbeddedComponent = () => {
|
|
4176
|
+
* const embedRef = useRef(null); // import { useRef } from react
|
|
4177
|
+
* const onLiveboardRendered = () => {
|
|
4178
|
+
* embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
|
|
4179
|
+
* };
|
|
4180
|
+
*
|
|
4181
|
+
* return (
|
|
4182
|
+
* <LiveboardEmbed
|
|
4183
|
+
* ref={embedRef}
|
|
4184
|
+
* liveboardId="<liveboard-guid>"
|
|
4185
|
+
* onLiveboardRendered={onLiveboardRendered}
|
|
4186
|
+
* />
|
|
4187
|
+
* );
|
|
4188
|
+
* }
|
|
4189
|
+
* ```
|
|
4190
|
+
*
|
|
4131
4191
|
* @group Events
|
|
4132
4192
|
*/
|
|
4133
4193
|
export declare enum HostEvent {
|
|
@@ -4821,10 +4881,23 @@ export declare enum HostEvent {
|
|
|
4821
4881
|
* filter: {
|
|
4822
4882
|
* column: "item type",
|
|
4823
4883
|
* oper: "IN",
|
|
4824
|
-
* values: ["bags","shirts"]
|
|
4884
|
+
* values: ["bags","shirts"]
|
|
4885
|
+
* }
|
|
4886
|
+
* });
|
|
4887
|
+
* ```
|
|
4888
|
+
* @example
|
|
4889
|
+
* ```js
|
|
4890
|
+
*
|
|
4891
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
4892
|
+
* filter: {
|
|
4893
|
+
* column: "date",
|
|
4894
|
+
* oper: "EQ",
|
|
4895
|
+
* values: ["JULY","2023"],
|
|
4896
|
+
* type: "MONTH_YEAR"
|
|
4825
4897
|
* }
|
|
4826
4898
|
* });
|
|
4827
4899
|
* ```
|
|
4900
|
+
*
|
|
4828
4901
|
* @example
|
|
4829
4902
|
*
|
|
4830
4903
|
* ```js
|
|
@@ -4842,7 +4915,8 @@ export declare enum HostEvent {
|
|
|
4842
4915
|
* {
|
|
4843
4916
|
* column: "Date",
|
|
4844
4917
|
* oper: 'EQ',
|
|
4845
|
-
* values: ["
|
|
4918
|
+
* values: ["2023-07-31"],
|
|
4919
|
+
* types: "EXACT_DATE"
|
|
4846
4920
|
* }]
|
|
4847
4921
|
* });
|
|
4848
4922
|
* ```
|
|
@@ -6283,9 +6357,12 @@ export interface CustomCssVariables {
|
|
|
6283
6357
|
*/
|
|
6284
6358
|
'--ts-var-root-text-transform'?: string;
|
|
6285
6359
|
/**
|
|
6286
|
-
*
|
|
6287
|
-
*
|
|
6288
|
-
*
|
|
6360
|
+
* Font color of the text on toggle buttons such as
|
|
6361
|
+
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
6362
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage experience),
|
|
6363
|
+
* and title text on the AI-generated charts and tables.
|
|
6364
|
+
* The default color code is #2770EF.
|
|
6365
|
+
*
|
|
6289
6366
|
*/
|
|
6290
6367
|
'--ts-var-application-color'?: string;
|
|
6291
6368
|
/**
|
|
@@ -6396,6 +6473,10 @@ export interface CustomCssVariables {
|
|
|
6396
6473
|
* Background color of the primary buttons on hover.
|
|
6397
6474
|
*/
|
|
6398
6475
|
'--ts-var-button--primary--hover-background'?: string;
|
|
6476
|
+
/**
|
|
6477
|
+
* Backgroud color of the primary buttons when active.
|
|
6478
|
+
*/
|
|
6479
|
+
'--ts-var-button--primary--active-background'?: string;
|
|
6399
6480
|
/**
|
|
6400
6481
|
* Font color of the text on the secondary buttons.
|
|
6401
6482
|
*/
|
|
@@ -6412,6 +6493,10 @@ export interface CustomCssVariables {
|
|
|
6412
6493
|
* Background color of the secondary button on hover.
|
|
6413
6494
|
*/
|
|
6414
6495
|
'--ts-var-button--secondary--hover-background'?: string;
|
|
6496
|
+
/**
|
|
6497
|
+
* Backgroud color of the secondary buttons when active.
|
|
6498
|
+
*/
|
|
6499
|
+
'--ts-var-button--secondary--active-background'?: string;
|
|
6415
6500
|
/**
|
|
6416
6501
|
* Font color of the tertiary button. For example, the *Undo*, *Redo*, and *Reset*
|
|
6417
6502
|
* buttons on the *Search* page.
|
|
@@ -6425,6 +6510,10 @@ export interface CustomCssVariables {
|
|
|
6425
6510
|
* Background color of the tertiary button when a user hovers over these buttons.
|
|
6426
6511
|
*/
|
|
6427
6512
|
'--ts-var-button--tertiary--hover-background'?: string;
|
|
6513
|
+
/**
|
|
6514
|
+
* Backgroud color of the tertiary buttons when active.
|
|
6515
|
+
*/
|
|
6516
|
+
'--ts-var-button--tertiary--active-background'?: string;
|
|
6428
6517
|
/**
|
|
6429
6518
|
* Font color of the title text of a visualization or Answer.
|
|
6430
6519
|
*/
|
|
@@ -1836,6 +1836,7 @@ export interface customCssInterface {
|
|
|
1836
1836
|
* Styles within the {@link CustomisationsInterface}.
|
|
1837
1837
|
*/
|
|
1838
1838
|
export interface CustomStyles {
|
|
1839
|
+
customCSSUrl?: string;
|
|
1839
1840
|
customCSS?: customCssInterface;
|
|
1840
1841
|
}
|
|
1841
1842
|
/**
|
|
@@ -2269,11 +2270,12 @@ export interface ViewConfig {
|
|
|
2269
2270
|
*/
|
|
2270
2271
|
visibleActions?: Action[];
|
|
2271
2272
|
/**
|
|
2272
|
-
* Show alert messages and toast messages in the embedded
|
|
2273
|
+
* Show alert messages and toast messages in the embedded
|
|
2274
|
+
* view in full app embed.
|
|
2273
2275
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2274
2276
|
* @example
|
|
2275
2277
|
* ```js
|
|
2276
|
-
* const embed = new
|
|
2278
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
2277
2279
|
* ... // other options
|
|
2278
2280
|
* showAlerts:true,
|
|
2279
2281
|
* })
|
|
@@ -2803,6 +2805,28 @@ export interface RuntimeParameter {
|
|
|
2803
2805
|
* console.log('Drilldown event', drilldown);
|
|
2804
2806
|
* }));
|
|
2805
2807
|
* ```
|
|
2808
|
+
*
|
|
2809
|
+
* If you are using React components for embedding, you can register to any
|
|
2810
|
+
* events from the `EmbedEvent` list by using the `on<EventName>` convention.
|
|
2811
|
+
* For example,`onAlert`, `onCopyToClipboard` and so on.
|
|
2812
|
+
*
|
|
2813
|
+
* @example
|
|
2814
|
+
* ```js
|
|
2815
|
+
* // ...
|
|
2816
|
+
* const MyComponent = ({ dataSources }) => {
|
|
2817
|
+
* const onLoad = () => {
|
|
2818
|
+
* console.log(EmbedEvent.Load, {});
|
|
2819
|
+
* };
|
|
2820
|
+
*
|
|
2821
|
+
* return (
|
|
2822
|
+
* <SearchEmbed
|
|
2823
|
+
* dataSources={dataSources}
|
|
2824
|
+
* onLoad = {logEvent("Load")}
|
|
2825
|
+
* />
|
|
2826
|
+
* );
|
|
2827
|
+
* };
|
|
2828
|
+
* ```
|
|
2829
|
+
*
|
|
2806
2830
|
* @group Events
|
|
2807
2831
|
*/
|
|
2808
2832
|
export declare enum EmbedEvent {
|
|
@@ -3677,8 +3701,8 @@ export declare enum EmbedEvent {
|
|
|
3677
3701
|
* Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
|
|
3678
3702
|
* for this embed event to get emitted.
|
|
3679
3703
|
*
|
|
3680
|
-
*
|
|
3681
|
-
*
|
|
3704
|
+
* @param: payload
|
|
3705
|
+
* @param: responder
|
|
3682
3706
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3683
3707
|
* will run the search or not, and if not, which error message to provide.
|
|
3684
3708
|
*
|
|
@@ -3690,6 +3714,7 @@ export declare enum EmbedEvent {
|
|
|
3690
3714
|
*
|
|
3691
3715
|
* @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
|
|
3692
3716
|
*
|
|
3717
|
+
* @example
|
|
3693
3718
|
*```js
|
|
3694
3719
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3695
3720
|
* (payload, responder) => {
|
|
@@ -3725,7 +3750,6 @@ export declare enum EmbedEvent {
|
|
|
3725
3750
|
* }})
|
|
3726
3751
|
* })
|
|
3727
3752
|
*```
|
|
3728
|
-
*
|
|
3729
3753
|
*/
|
|
3730
3754
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
3731
3755
|
/**
|
|
@@ -3743,7 +3767,7 @@ export declare enum EmbedEvent {
|
|
|
3743
3767
|
}
|
|
3744
3768
|
/**
|
|
3745
3769
|
* Event types that can be triggered by the host application
|
|
3746
|
-
* to the embedded ThoughtSpot app
|
|
3770
|
+
* to the embedded ThoughtSpot app.
|
|
3747
3771
|
*
|
|
3748
3772
|
* To trigger an event use the corresponding
|
|
3749
3773
|
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
@@ -3760,6 +3784,40 @@ export declare enum EmbedEvent {
|
|
|
3760
3784
|
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
|
|
3761
3785
|
* ]);
|
|
3762
3786
|
* ```
|
|
3787
|
+
* @example
|
|
3788
|
+
* If using React components to embed, use the format shown in this example:
|
|
3789
|
+
*
|
|
3790
|
+
* ```js
|
|
3791
|
+
* const selectVizs = () => {
|
|
3792
|
+
* embedRef.current.trigger(HostEvent.SetVisibleVizs, [
|
|
3793
|
+
* "715e4613-c891-4884-be44-aa8d13701c06",
|
|
3794
|
+
* "3f84d633-e325-44b2-be25-c6650e5a49cf"
|
|
3795
|
+
* ]);
|
|
3796
|
+
* };
|
|
3797
|
+
* ```
|
|
3798
|
+
*
|
|
3799
|
+
*
|
|
3800
|
+
* You can also attach an Embed event to a Host event to trigger
|
|
3801
|
+
* a specific action as shown in this example:
|
|
3802
|
+
*
|
|
3803
|
+
* @example
|
|
3804
|
+
* ```js
|
|
3805
|
+
* const EmbeddedComponent = () => {
|
|
3806
|
+
* const embedRef = useRef(null); // import { useRef } from react
|
|
3807
|
+
* const onLiveboardRendered = () => {
|
|
3808
|
+
* embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
|
|
3809
|
+
* };
|
|
3810
|
+
*
|
|
3811
|
+
* return (
|
|
3812
|
+
* <LiveboardEmbed
|
|
3813
|
+
* ref={embedRef}
|
|
3814
|
+
* liveboardId="<liveboard-guid>"
|
|
3815
|
+
* onLiveboardRendered={onLiveboardRendered}
|
|
3816
|
+
* />
|
|
3817
|
+
* );
|
|
3818
|
+
* }
|
|
3819
|
+
* ```
|
|
3820
|
+
*
|
|
3763
3821
|
* @group Events
|
|
3764
3822
|
*/
|
|
3765
3823
|
export declare enum HostEvent {
|
|
@@ -4453,10 +4511,23 @@ export declare enum HostEvent {
|
|
|
4453
4511
|
* filter: {
|
|
4454
4512
|
* column: "item type",
|
|
4455
4513
|
* oper: "IN",
|
|
4456
|
-
* values: ["bags","shirts"]
|
|
4514
|
+
* values: ["bags","shirts"]
|
|
4515
|
+
* }
|
|
4516
|
+
* });
|
|
4517
|
+
* ```
|
|
4518
|
+
* @example
|
|
4519
|
+
* ```js
|
|
4520
|
+
*
|
|
4521
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
4522
|
+
* filter: {
|
|
4523
|
+
* column: "date",
|
|
4524
|
+
* oper: "EQ",
|
|
4525
|
+
* values: ["JULY","2023"],
|
|
4526
|
+
* type: "MONTH_YEAR"
|
|
4457
4527
|
* }
|
|
4458
4528
|
* });
|
|
4459
4529
|
* ```
|
|
4530
|
+
*
|
|
4460
4531
|
* @example
|
|
4461
4532
|
*
|
|
4462
4533
|
* ```js
|
|
@@ -4474,7 +4545,8 @@ export declare enum HostEvent {
|
|
|
4474
4545
|
* {
|
|
4475
4546
|
* column: "Date",
|
|
4476
4547
|
* oper: 'EQ',
|
|
4477
|
-
* values: ["
|
|
4548
|
+
* values: ["2023-07-31"],
|
|
4549
|
+
* types: "EXACT_DATE"
|
|
4478
4550
|
* }]
|
|
4479
4551
|
* });
|
|
4480
4552
|
* ```
|
|
@@ -6258,21 +6330,22 @@ export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise
|
|
|
6258
6330
|
/**
|
|
6259
6331
|
* Imports TML representation of the metadata objects into ThoughtSpot.
|
|
6260
6332
|
* @param data
|
|
6333
|
+
* @returns imports TML data into ThoughtSpot
|
|
6261
6334
|
* @example
|
|
6262
6335
|
* ```js
|
|
6263
|
-
*
|
|
6264
|
-
* //Array of metadata Tmls
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6336
|
+
* executeTML({
|
|
6337
|
+
* //Array of metadata Tmls in string format
|
|
6338
|
+
* metadata_tmls: [
|
|
6339
|
+
* "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
|
|
6340
|
+
* \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
|
|
6341
|
+
* ],
|
|
6342
|
+
* import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
|
|
6343
|
+
* create_new: false, // If selected, creates TML objects with new GUIDs.
|
|
6344
|
+
* }).then(result => {
|
|
6345
|
+
* console.log(result);
|
|
6346
|
+
* }).catch(error => {
|
|
6347
|
+
* console.error(error);
|
|
6348
|
+
* });
|
|
6276
6349
|
*```
|
|
6277
6350
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
6278
6351
|
* @group Global methods
|
|
@@ -6282,27 +6355,28 @@ export declare const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
|
6282
6355
|
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
|
|
6283
6356
|
* format.
|
|
6284
6357
|
* @param data
|
|
6358
|
+
* @returns exports TML data
|
|
6285
6359
|
* @example
|
|
6286
6360
|
* ```js
|
|
6287
|
-
exportTML({
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
}).then(result => {
|
|
6302
|
-
|
|
6303
|
-
}).catch(error => {
|
|
6304
|
-
|
|
6305
|
-
});
|
|
6361
|
+
* exportTML({
|
|
6362
|
+
* metadata: [
|
|
6363
|
+
* {
|
|
6364
|
+
* type: "LIVEBOARD", //Metadata Type
|
|
6365
|
+
* identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
|
|
6366
|
+
* }
|
|
6367
|
+
* ],
|
|
6368
|
+
* export_associated: false,//indicates whether to export associated metadata objects
|
|
6369
|
+
* export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
|
|
6370
|
+
* //exporting a Liveboard and its associated objects, the API
|
|
6371
|
+
* //returns the Liveboard TML data with the FQNs of the referenced
|
|
6372
|
+
* //worksheet. If the exported TML data includes FQNs, you don't need
|
|
6373
|
+
* //to manually add FQNs of the referenced objects during TML import.
|
|
6374
|
+
* edoc_format: "JSON" //It takes JSON or YAML value
|
|
6375
|
+
* }).then(result => {
|
|
6376
|
+
* console.log(result);
|
|
6377
|
+
* }).catch(error => {
|
|
6378
|
+
* console.error(error);
|
|
6379
|
+
* });
|
|
6306
6380
|
* ```
|
|
6307
6381
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
6308
6382
|
* @group Global methods
|
|
@@ -6571,9 +6645,12 @@ export interface CustomCssVariables {
|
|
|
6571
6645
|
*/
|
|
6572
6646
|
'--ts-var-root-text-transform'?: string;
|
|
6573
6647
|
/**
|
|
6574
|
-
*
|
|
6575
|
-
*
|
|
6576
|
-
*
|
|
6648
|
+
* Font color of the text on toggle buttons such as
|
|
6649
|
+
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
6650
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage experience),
|
|
6651
|
+
* and title text on the AI-generated charts and tables.
|
|
6652
|
+
* The default color code is #2770EF.
|
|
6653
|
+
*
|
|
6577
6654
|
*/
|
|
6578
6655
|
'--ts-var-application-color'?: string;
|
|
6579
6656
|
/**
|
|
@@ -6684,6 +6761,10 @@ export interface CustomCssVariables {
|
|
|
6684
6761
|
* Background color of the primary buttons on hover.
|
|
6685
6762
|
*/
|
|
6686
6763
|
'--ts-var-button--primary--hover-background'?: string;
|
|
6764
|
+
/**
|
|
6765
|
+
* Backgroud color of the primary buttons when active.
|
|
6766
|
+
*/
|
|
6767
|
+
'--ts-var-button--primary--active-background'?: string;
|
|
6687
6768
|
/**
|
|
6688
6769
|
* Font color of the text on the secondary buttons.
|
|
6689
6770
|
*/
|
|
@@ -6700,6 +6781,10 @@ export interface CustomCssVariables {
|
|
|
6700
6781
|
* Background color of the secondary button on hover.
|
|
6701
6782
|
*/
|
|
6702
6783
|
'--ts-var-button--secondary--hover-background'?: string;
|
|
6784
|
+
/**
|
|
6785
|
+
* Backgroud color of the secondary buttons when active.
|
|
6786
|
+
*/
|
|
6787
|
+
'--ts-var-button--secondary--active-background'?: string;
|
|
6703
6788
|
/**
|
|
6704
6789
|
* Font color of the tertiary button. For example, the *Undo*, *Redo*, and *Reset*
|
|
6705
6790
|
* buttons on the *Search* page.
|
|
@@ -6713,6 +6798,10 @@ export interface CustomCssVariables {
|
|
|
6713
6798
|
* Background color of the tertiary button when a user hovers over these buttons.
|
|
6714
6799
|
*/
|
|
6715
6800
|
'--ts-var-button--tertiary--hover-background'?: string;
|
|
6801
|
+
/**
|
|
6802
|
+
* Backgroud color of the tertiary buttons when active.
|
|
6803
|
+
*/
|
|
6804
|
+
'--ts-var-button--tertiary--active-background'?: string;
|
|
6716
6805
|
/**
|
|
6717
6806
|
* Font color of the title text of a visualization or Answer.
|
|
6718
6807
|
*/
|