@thoughtspot/visual-embed-sdk 1.32.8 → 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.
@@ -199,7 +199,7 @@ const checkReleaseVersionInBeta = (releaseVersion, suppressBetaWarning) => {
199
199
  return false;
200
200
  };
201
201
  const getCustomisations = (embedConfig, viewConfig) => {
202
- var _a, _b;
202
+ var _a, _b, _c, _d;
203
203
  const customizationsFromViewConfig = viewConfig.customizations;
204
204
  const customizationsFromEmbedConfig = embedConfig.customizations
205
205
  || embedConfig.customisations;
@@ -211,6 +211,8 @@ const getCustomisations = (embedConfig, viewConfig) => {
211
211
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
212
212
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
213
213
  },
214
+ customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
215
+ || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl),
214
216
  },
215
217
  content: {
216
218
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -630,6 +632,28 @@ var HomepageModule;
630
632
  * console.log('Drilldown event', drilldown);
631
633
  * }));
632
634
  * ```
635
+ *
636
+ * If you are using React components for embedding, you can register to any
637
+ * events from the `EmbedEvent` list by using the `on<EventName>` convention.
638
+ * For example,`onAlert`, `onCopyToClipboard` and so on.
639
+ *
640
+ * @example
641
+ * ```js
642
+ * // ...
643
+ * const MyComponent = ({ dataSources }) => {
644
+ * const onLoad = () => {
645
+ * console.log(EmbedEvent.Load, {});
646
+ * };
647
+ *
648
+ * return (
649
+ * <SearchEmbed
650
+ * dataSources={dataSources}
651
+ * onLoad = {logEvent("Load")}
652
+ * />
653
+ * );
654
+ * };
655
+ * ```
656
+ *
633
657
  * @group Events
634
658
  */
635
659
  // eslint-disable-next-line no-shadow
@@ -1572,7 +1596,7 @@ var EmbedEvent;
1572
1596
  })(EmbedEvent || (EmbedEvent = {}));
1573
1597
  /**
1574
1598
  * Event types that can be triggered by the host application
1575
- * to the embedded ThoughtSpot app
1599
+ * to the embedded ThoughtSpot app.
1576
1600
  *
1577
1601
  * To trigger an event use the corresponding
1578
1602
  * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
@@ -1589,6 +1613,40 @@ var EmbedEvent;
1589
1613
  * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
1590
1614
  * ]);
1591
1615
  * ```
1616
+ * @example
1617
+ * If using React components to embed, use the format shown in this example:
1618
+ *
1619
+ * ```js
1620
+ * const selectVizs = () => {
1621
+ * embedRef.current.trigger(HostEvent.SetVisibleVizs, [
1622
+ * "715e4613-c891-4884-be44-aa8d13701c06",
1623
+ * "3f84d633-e325-44b2-be25-c6650e5a49cf"
1624
+ * ]);
1625
+ * };
1626
+ * ```
1627
+ *
1628
+ *
1629
+ * You can also attach an Embed event to a Host event to trigger
1630
+ * a specific action as shown in this example:
1631
+ *
1632
+ * @example
1633
+ * ```js
1634
+ * const EmbeddedComponent = () => {
1635
+ * const embedRef = useRef(null); // import { useRef } from react
1636
+ * const onLiveboardRendered = () => {
1637
+ * embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
1638
+ * };
1639
+ *
1640
+ * return (
1641
+ * <LiveboardEmbed
1642
+ * ref={embedRef}
1643
+ * liveboardId="<liveboard-guid>"
1644
+ * onLiveboardRendered={onLiveboardRendered}
1645
+ * />
1646
+ * );
1647
+ * }
1648
+ * ```
1649
+ *
1592
1650
  * @group Events
1593
1651
  */
1594
1652
  // eslint-disable-next-line no-shadow
@@ -2284,11 +2342,24 @@ var HostEvent;
2284
2342
  * filter: {
2285
2343
  * column: "item type",
2286
2344
  * oper: "IN",
2287
- * values: ["bags","shirts"],
2345
+ * values: ["bags","shirts"]
2288
2346
  * }
2289
2347
  * });
2290
2348
  * ```
2291
2349
  * @example
2350
+ * ```js
2351
+ *
2352
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2353
+ * filter: {
2354
+ * column: "date",
2355
+ * oper: "EQ",
2356
+ * values: ["JULY","2023"],
2357
+ * type: "MONTH_YEAR"
2358
+ * }
2359
+ * });
2360
+ * ```
2361
+ *
2362
+ * @example
2292
2363
  *
2293
2364
  * ```js
2294
2365
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
@@ -2305,7 +2376,8 @@ var HostEvent;
2305
2376
  * {
2306
2377
  * column: "Date",
2307
2378
  * oper: 'EQ',
2308
- * values: ["1656680400"]
2379
+ * values: ["2023-07-31"],
2380
+ * types: "EXACT_DATE"
2309
2381
  * }]
2310
2382
  * });
2311
2383
  * ```
@@ -14099,7 +14171,7 @@ function backwardCompat(embedConfig) {
14099
14171
  * @group Authentication / Init
14100
14172
  */
14101
14173
  const init = (embedConfig) => {
14102
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
14174
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
14103
14175
  sanity(embedConfig);
14104
14176
  resetCachedAuthToken();
14105
14177
  embedConfig = setEmbedConfig(backwardCompat({
@@ -14115,10 +14187,11 @@ const init = (embedConfig) => {
14115
14187
  const { password, ...configToTrack } = getEmbedConfig();
14116
14188
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
14117
14189
  ...configToTrack,
14118
- usedCustomizationVariables: ((_c = (_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSS) === null || _c === void 0 ? void 0 : _c.variables) != null,
14119
- usedCustomizationRules: ((_f = (_e = (_d = embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.customCSS) === null || _f === void 0 ? void 0 : _f.rules_UNSTABLE) != null,
14120
- usedCustomizationStrings: !!((_h = (_g = embedConfig.customizations) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.strings),
14121
- usedCustomizationIconSprite: !!((_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.iconSpriteUrl),
14190
+ usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
14191
+ usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
14192
+ usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
14193
+ usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
14194
+ usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
14122
14195
  });
14123
14196
  if (getEmbedConfig().callPrefetch) {
14124
14197
  prefetch(getEmbedConfig().thoughtSpotHost);
@@ -14443,7 +14516,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
14443
14516
  });
14444
14517
  }
14445
14518
 
14446
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.8";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"49 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14519
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.9";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"49 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14447
14520
 
14448
14521
  /**
14449
14522
  * Copyright (c) 2022
package/dist/tsembed.js CHANGED
@@ -205,7 +205,7 @@
205
205
  return false;
206
206
  };
207
207
  const getCustomisations = (embedConfig, viewConfig) => {
208
- var _a, _b;
208
+ var _a, _b, _c, _d;
209
209
  const customizationsFromViewConfig = viewConfig.customizations;
210
210
  const customizationsFromEmbedConfig = embedConfig.customizations
211
211
  || embedConfig.customisations;
@@ -217,6 +217,8 @@
217
217
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
218
218
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
219
219
  },
220
+ customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
221
+ || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl),
220
222
  },
221
223
  content: {
222
224
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -2216,10 +2218,23 @@
2216
2218
  * filter: {
2217
2219
  * column: "item type",
2218
2220
  * oper: "IN",
2219
- * values: ["bags","shirts"],
2221
+ * values: ["bags","shirts"]
2222
+ * }
2223
+ * });
2224
+ * ```
2225
+ * @example
2226
+ * ```js
2227
+ *
2228
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2229
+ * filter: {
2230
+ * column: "date",
2231
+ * oper: "EQ",
2232
+ * values: ["JULY","2023"],
2233
+ * type: "MONTH_YEAR"
2220
2234
  * }
2221
2235
  * });
2222
2236
  * ```
2237
+ *
2223
2238
  * @example
2224
2239
  *
2225
2240
  * ```js
@@ -2237,7 +2252,8 @@
2237
2252
  * {
2238
2253
  * column: "Date",
2239
2254
  * oper: 'EQ',
2240
- * values: ["1656680400"]
2255
+ * values: ["2023-07-31"],
2256
+ * types: "EXACT_DATE"
2241
2257
  * }]
2242
2258
  * });
2243
2259
  * ```
@@ -13975,7 +13991,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13975
13991
  * @group Authentication / Init
13976
13992
  */
13977
13993
  const init = (embedConfig) => {
13978
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13994
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13979
13995
  sanity(embedConfig);
13980
13996
  resetCachedAuthToken();
13981
13997
  embedConfig = setEmbedConfig(backwardCompat({
@@ -13991,10 +14007,11 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13991
14007
  const { password, ...configToTrack } = getEmbedConfig();
13992
14008
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
13993
14009
  ...configToTrack,
13994
- usedCustomizationVariables: ((_c = (_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSS) === null || _c === void 0 ? void 0 : _c.variables) != null,
13995
- usedCustomizationRules: ((_f = (_e = (_d = embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.customCSS) === null || _f === void 0 ? void 0 : _f.rules_UNSTABLE) != null,
13996
- usedCustomizationStrings: !!((_h = (_g = embedConfig.customizations) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.strings),
13997
- usedCustomizationIconSprite: !!((_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.iconSpriteUrl),
14010
+ usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
14011
+ usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
14012
+ usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
14013
+ usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
14014
+ usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
13998
14015
  });
13999
14016
  if (getEmbedConfig().callPrefetch) {
14000
14017
  prefetch(getEmbedConfig().thoughtSpotHost);
@@ -14319,7 +14336,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14319
14336
  });
14320
14337
  }
14321
14338
 
14322
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.8";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"49 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14339
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.9";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"49 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14323
14340
 
14324
14341
  /**
14325
14342
  * Copyright (c) 2022
@@ -2206,6 +2206,7 @@ export interface customCssInterface {
2206
2206
  * Styles within the {@link CustomisationsInterface}.
2207
2207
  */
2208
2208
  export interface CustomStyles {
2209
+ customCSSUrl?: string;
2209
2210
  customCSS?: customCssInterface;
2210
2211
  }
2211
2212
  /**
@@ -2639,11 +2640,12 @@ export interface ViewConfig {
2639
2640
  */
2640
2641
  visibleActions?: Action[];
2641
2642
  /**
2642
- * Show alert messages and toast messages in the embedded view.
2643
+ * Show alert messages and toast messages in the embedded
2644
+ * view in full app embed.
2643
2645
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2644
2646
  * @example
2645
2647
  * ```js
2646
- * const embed = new LiveboardEmbed('#embed-container', {
2648
+ * const embed = new AppEmbed('#embed-container', {
2647
2649
  * ... // other options
2648
2650
  * showAlerts:true,
2649
2651
  * })
@@ -3173,6 +3175,28 @@ export interface RuntimeParameter {
3173
3175
  * console.log('Drilldown event', drilldown);
3174
3176
  * }));
3175
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
+ *
3176
3200
  * @group Events
3177
3201
  */
3178
3202
  export declare enum EmbedEvent {
@@ -4113,7 +4137,7 @@ export declare enum EmbedEvent {
4113
4137
  }
4114
4138
  /**
4115
4139
  * Event types that can be triggered by the host application
4116
- * to the embedded ThoughtSpot app
4140
+ * to the embedded ThoughtSpot app.
4117
4141
  *
4118
4142
  * To trigger an event use the corresponding
4119
4143
  * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
@@ -4130,6 +4154,40 @@ export declare enum EmbedEvent {
4130
4154
  * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
4131
4155
  * ]);
4132
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
+ *
4133
4191
  * @group Events
4134
4192
  */
4135
4193
  export declare enum HostEvent {
@@ -4823,11 +4881,24 @@ export declare enum HostEvent {
4823
4881
  * filter: {
4824
4882
  * column: "item type",
4825
4883
  * oper: "IN",
4826
- * values: ["bags","shirts"],
4884
+ * values: ["bags","shirts"]
4827
4885
  * }
4828
4886
  * });
4829
4887
  * ```
4830
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"
4897
+ * }
4898
+ * });
4899
+ * ```
4900
+ *
4901
+ * @example
4831
4902
  *
4832
4903
  * ```js
4833
4904
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
@@ -4844,7 +4915,8 @@ export declare enum HostEvent {
4844
4915
  * {
4845
4916
  * column: "Date",
4846
4917
  * oper: 'EQ',
4847
- * values: ["1656680400"]
4918
+ * values: ["2023-07-31"],
4919
+ * types: "EXACT_DATE"
4848
4920
  * }]
4849
4921
  * });
4850
4922
  * ```
@@ -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 view.
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 LiveboardEmbed('#embed-container', {
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 {
@@ -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,11 +4511,24 @@ export declare enum HostEvent {
4453
4511
  * filter: {
4454
4512
  * column: "item type",
4455
4513
  * oper: "IN",
4456
- * values: ["bags","shirts"],
4514
+ * values: ["bags","shirts"]
4457
4515
  * }
4458
4516
  * });
4459
4517
  * ```
4460
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"
4527
+ * }
4528
+ * });
4529
+ * ```
4530
+ *
4531
+ * @example
4461
4532
  *
4462
4533
  * ```js
4463
4534
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
@@ -4474,7 +4545,8 @@ export declare enum HostEvent {
4474
4545
  * {
4475
4546
  * column: "Date",
4476
4547
  * oper: 'EQ',
4477
- * values: ["1656680400"]
4548
+ * values: ["2023-07-31"],
4549
+ * types: "EXACT_DATE"
4478
4550
  * }]
4479
4551
  * });
4480
4552
  * ```