@thoughtspot/visual-embed-sdk 1.44.3 → 1.44.4
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/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/embed/app.d.ts +44 -32
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +24 -6
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +145 -13
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +4 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/types.d.ts +100 -44
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +74 -15
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +2 -1
- package/cjs/src/utils.js.map +1 -1
- package/dist/{index-D0n5LIka.js → index-C5FAW929.js} +1 -1
- package/dist/src/embed/app.d.ts +44 -32
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +100 -44
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +104 -25
- package/dist/tsembed-react.js +103 -24
- package/dist/tsembed.es.js +105 -26
- package/dist/tsembed.js +130 -51
- package/dist/visual-embed-sdk-react-full.d.ts +140 -70
- package/dist/visual-embed-sdk-react.d.ts +146 -78
- package/dist/visual-embed-sdk.d.ts +193 -80
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +44 -32
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +24 -6
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +145 -13
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/types.d.ts +100 -44
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +74 -15
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +2 -1
- package/lib/src/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/embed/app.ts +44 -32
- package/src/embed/liveboard.ts +1 -1
- package/src/embed/ts-embed.spec.ts +190 -15
- package/src/embed/ts-embed.ts +24 -6
- package/src/errors.ts +1 -0
- package/src/index.ts +4 -0
- package/src/types.ts +100 -43
- package/src/utils.ts +2 -1
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.4 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -188,57 +188,71 @@
|
|
|
188
188
|
})(exports.AuthType || (exports.AuthType = {}));
|
|
189
189
|
/**
|
|
190
190
|
*
|
|
191
|
-
* This
|
|
192
|
-
* To access the updated modular homepage,
|
|
193
|
-
* set `modularHomeExperience` to `true`
|
|
194
|
-
* (available as Early Access feature in 9.12.5.cl).
|
|
191
|
+
* **Note**: This attribute is not supported in the classic (V1) homepage experience.
|
|
195
192
|
*
|
|
196
193
|
*/
|
|
197
194
|
exports.HomeLeftNavItem = void 0;
|
|
198
195
|
(function (HomeLeftNavItem) {
|
|
199
196
|
/**
|
|
197
|
+
* The *Search data* option in
|
|
198
|
+
* the *Insights* left navigation panel.
|
|
200
199
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
201
200
|
*/
|
|
202
201
|
HomeLeftNavItem["SearchData"] = "search-data";
|
|
203
202
|
/**
|
|
203
|
+
* The *Home* menu option in
|
|
204
|
+
* the *Insights* left navigation panel.
|
|
204
205
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
205
206
|
*/
|
|
206
207
|
HomeLeftNavItem["Home"] = "insights-home";
|
|
207
208
|
/**
|
|
209
|
+
* The *Liveboards* menu option in
|
|
210
|
+
* the *Insights* left navigation panel.
|
|
208
211
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
209
212
|
*/
|
|
210
213
|
HomeLeftNavItem["Liveboards"] = "liveboards";
|
|
211
214
|
/**
|
|
215
|
+
* The *Answers* menu option in
|
|
216
|
+
* the *Insights* left navigation panel.
|
|
212
217
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
213
218
|
*/
|
|
214
219
|
HomeLeftNavItem["Answers"] = "answers";
|
|
215
220
|
/**
|
|
221
|
+
* The *Monitor subscriptions* menu option in
|
|
222
|
+
* the *Insights* left navigation panel.
|
|
216
223
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
217
224
|
*/
|
|
218
225
|
HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
|
|
219
226
|
/**
|
|
227
|
+
* The *SpotIQ analysis* menu option in
|
|
228
|
+
* the *Insights* left navigation panel.
|
|
220
229
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
221
230
|
*/
|
|
222
231
|
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
223
232
|
/**
|
|
233
|
+
* The *Liveboard schedules* menu option in
|
|
234
|
+
* the *Insights* left navigation panel.
|
|
224
235
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
225
236
|
*/
|
|
226
237
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
227
238
|
/**
|
|
228
|
-
*
|
|
229
|
-
*
|
|
239
|
+
* The create option in the *Insights*
|
|
240
|
+
* left navigation panel.
|
|
241
|
+
* Available in the V3 navigation experience.
|
|
230
242
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
231
243
|
*/
|
|
232
244
|
HomeLeftNavItem["Create"] = "create";
|
|
233
245
|
/**
|
|
234
|
-
* Spotter option in the
|
|
235
|
-
*
|
|
246
|
+
* The *Spotter* menu option in the *Insights*
|
|
247
|
+
* left navigation panel.
|
|
248
|
+
* Available in the V3 navigation experience.
|
|
236
249
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
237
250
|
*/
|
|
238
251
|
HomeLeftNavItem["Spotter"] = "spotter";
|
|
239
252
|
/**
|
|
240
|
-
* Favorites
|
|
241
|
-
*
|
|
253
|
+
* The *Favorites* section in the *Insights*
|
|
254
|
+
* left navigation panel.
|
|
255
|
+
* Available in the V3 navigation experience.
|
|
242
256
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
243
257
|
*/
|
|
244
258
|
HomeLeftNavItem["Favorites"] = "favorites";
|
|
@@ -310,10 +324,11 @@
|
|
|
310
324
|
RuntimeFilterOp["NOT_IN"] = "NOT_IN";
|
|
311
325
|
})(exports.RuntimeFilterOp || (exports.RuntimeFilterOp = {}));
|
|
312
326
|
/**
|
|
313
|
-
* Home page
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
327
|
+
* Home page modules that can be hidden
|
|
328
|
+
* via `hiddenHomepageModules` and reordered via
|
|
329
|
+
* `reorderedHomepageModules`.
|
|
330
|
+
*
|
|
331
|
+
* **Note**: This option is not supported in the classic (v1) experience.
|
|
317
332
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
318
333
|
*/
|
|
319
334
|
exports.HomepageModule = void 0;
|
|
@@ -327,7 +342,7 @@
|
|
|
327
342
|
*/
|
|
328
343
|
HomepageModule["Watchlist"] = "WATCHLIST";
|
|
329
344
|
/**
|
|
330
|
-
*
|
|
345
|
+
* Favorite module
|
|
331
346
|
*/
|
|
332
347
|
HomepageModule["Favorite"] = "FAVORITE";
|
|
333
348
|
/**
|
|
@@ -1483,6 +1498,28 @@
|
|
|
1483
1498
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1484
1499
|
*/
|
|
1485
1500
|
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1501
|
+
/**
|
|
1502
|
+
* Emitted when user opens up the Add to Coaching modal on any visualization in Spotter Embed.
|
|
1503
|
+
* @example
|
|
1504
|
+
* ```js
|
|
1505
|
+
* spotterEmbed.on(EmbedEvent.AddToCoaching, (payload) => {
|
|
1506
|
+
* console.log('payload', payload);
|
|
1507
|
+
* })
|
|
1508
|
+
*```
|
|
1509
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
1510
|
+
*/
|
|
1511
|
+
EmbedEvent["AddToCoaching"] = "addToCoaching";
|
|
1512
|
+
/**
|
|
1513
|
+
* Emitted when user opens up the data model instructions modal in Spotter embed.
|
|
1514
|
+
* @example
|
|
1515
|
+
* ```js
|
|
1516
|
+
* spotterEmbed.on(EmbedEvent.DataModelInstructions, (payload) => {
|
|
1517
|
+
* console.log('payload', payload);
|
|
1518
|
+
* })
|
|
1519
|
+
* ```
|
|
1520
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
1521
|
+
*/
|
|
1522
|
+
EmbedEvent["DataModelInstructions"] = "DataModelInstructions";
|
|
1486
1523
|
/**
|
|
1487
1524
|
* Emitted when the Spotter query is triggered in Spotter embed.
|
|
1488
1525
|
* @example
|
|
@@ -2907,6 +2944,26 @@
|
|
|
2907
2944
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2908
2945
|
*/
|
|
2909
2946
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2947
|
+
/**
|
|
2948
|
+
* Opens the Add to Coaching modal from a visualization in Spotter Embed.
|
|
2949
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
2950
|
+
* @example
|
|
2951
|
+
* ```js
|
|
2952
|
+
* spotterEmbed.trigger(HostEvent.AddToCoaching, { vizId: '730496d6-6903-4601-937e-2c691821af3c' });
|
|
2953
|
+
*
|
|
2954
|
+
*```
|
|
2955
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
2956
|
+
*/
|
|
2957
|
+
HostEvent["AddToCoaching"] = "addToCoaching";
|
|
2958
|
+
/**
|
|
2959
|
+
* Opens the data model instructions modal in Spotter Embed.
|
|
2960
|
+
* @example
|
|
2961
|
+
* ```js
|
|
2962
|
+
* spotterEmbed.trigger(HostEvent.DataModelInstructions);
|
|
2963
|
+
* ```
|
|
2964
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
2965
|
+
*/
|
|
2966
|
+
HostEvent["DataModelInstructions"] = "DataModelInstructions";
|
|
2910
2967
|
/**
|
|
2911
2968
|
* Resets the Spotter Embed Conversation.
|
|
2912
2969
|
* @example
|
|
@@ -4652,7 +4709,7 @@
|
|
|
4652
4709
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4653
4710
|
* @group Error Handling
|
|
4654
4711
|
*/
|
|
4655
|
-
|
|
4712
|
+
exports.ErrorDetailsTypes = void 0;
|
|
4656
4713
|
(function (ErrorDetailsTypes) {
|
|
4657
4714
|
/** API call failure */
|
|
4658
4715
|
ErrorDetailsTypes["API"] = "API";
|
|
@@ -4660,7 +4717,7 @@
|
|
|
4660
4717
|
ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
4661
4718
|
/** Network connectivity or request error */
|
|
4662
4719
|
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4663
|
-
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
4720
|
+
})(exports.ErrorDetailsTypes || (exports.ErrorDetailsTypes = {}));
|
|
4664
4721
|
/**
|
|
4665
4722
|
* Specific error codes for embedded component errors.
|
|
4666
4723
|
*
|
|
@@ -4694,7 +4751,7 @@
|
|
|
4694
4751
|
* }
|
|
4695
4752
|
* });
|
|
4696
4753
|
* */
|
|
4697
|
-
|
|
4754
|
+
exports.EmbedErrorCodes = void 0;
|
|
4698
4755
|
(function (EmbedErrorCodes) {
|
|
4699
4756
|
/** Worksheet ID not found or does not exist */
|
|
4700
4757
|
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
@@ -4718,7 +4775,9 @@
|
|
|
4718
4775
|
EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
|
|
4719
4776
|
/** Error parsing api intercept body */
|
|
4720
4777
|
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4721
|
-
|
|
4778
|
+
/** Failed to update embed parameters during pre-render */
|
|
4779
|
+
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
4780
|
+
})(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
|
|
4722
4781
|
/**
|
|
4723
4782
|
* Enum for the type of API intercepted
|
|
4724
4783
|
*/
|
|
@@ -4891,6 +4950,7 @@
|
|
|
4891
4950
|
LOGIN_FAILED: 'Login failed',
|
|
4892
4951
|
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
4893
4952
|
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
4953
|
+
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
|
|
4894
4954
|
};
|
|
4895
4955
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
4896
4956
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -5016,7 +5076,8 @@
|
|
|
5016
5076
|
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5017
5077
|
return false;
|
|
5018
5078
|
}
|
|
5019
|
-
// This pattern allows for an optional negative sign, and numbers
|
|
5079
|
+
// This pattern allows for an optional negative sign, and numbers
|
|
5080
|
+
// that can be integers or decimals (including leading dot).
|
|
5020
5081
|
const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
|
|
5021
5082
|
const parts = value.trim().split(/\s+/);
|
|
5022
5083
|
if (parts.length > 4) {
|
|
@@ -17988,7 +18049,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17988
18049
|
return eventData;
|
|
17989
18050
|
}
|
|
17990
18051
|
|
|
17991
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
18052
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.4";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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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={classnames:"^2.3.1",eventemitter3:"^4.0.7",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",yaml:"^2.5.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":"^11.2.0","@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":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.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:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
|
|
17992
18053
|
|
|
17993
18054
|
class HostEventClient {
|
|
17994
18055
|
constructor(iFrame) {
|
|
@@ -18187,9 +18248,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18187
18248
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
18188
18249
|
if (bodyParseError) {
|
|
18189
18250
|
const errorDetails = {
|
|
18190
|
-
errorType: ErrorDetailsTypes.API,
|
|
18251
|
+
errorType: exports.ErrorDetailsTypes.API,
|
|
18191
18252
|
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18192
|
-
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18253
|
+
code: exports.EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18193
18254
|
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18194
18255
|
};
|
|
18195
18256
|
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
@@ -18505,9 +18566,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18505
18566
|
*/
|
|
18506
18567
|
throwInitError() {
|
|
18507
18568
|
this.handleError({
|
|
18508
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18569
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18509
18570
|
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18510
|
-
code: EmbedErrorCodes.INIT_ERROR,
|
|
18571
|
+
code: exports.EmbedErrorCodes.INIT_ERROR,
|
|
18511
18572
|
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18512
18573
|
});
|
|
18513
18574
|
}
|
|
@@ -18600,9 +18661,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18600
18661
|
window.addEventListener('online', onlineEventListener);
|
|
18601
18662
|
const offlineEventListener = (e) => {
|
|
18602
18663
|
const errorDetails = {
|
|
18603
|
-
errorType: ErrorDetailsTypes.NETWORK,
|
|
18664
|
+
errorType: exports.ErrorDetailsTypes.NETWORK,
|
|
18604
18665
|
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18605
|
-
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18666
|
+
code: exports.EmbedErrorCodes.NETWORK_ERROR,
|
|
18606
18667
|
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18607
18668
|
};
|
|
18608
18669
|
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
@@ -18686,10 +18747,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18686
18747
|
]);
|
|
18687
18748
|
if (customActionsResult.errors.length > 0) {
|
|
18688
18749
|
this.handleError({
|
|
18689
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18750
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18690
18751
|
message: customActionsResult.errors,
|
|
18691
|
-
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18692
|
-
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18752
|
+
code: exports.EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18753
|
+
error: { type: exports.EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18693
18754
|
});
|
|
18694
18755
|
}
|
|
18695
18756
|
const baseInitData = {
|
|
@@ -18731,9 +18792,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18731
18792
|
.join('/');
|
|
18732
18793
|
return `${basePath}#`;
|
|
18733
18794
|
}
|
|
18734
|
-
getUpdateEmbedParamsObject() {
|
|
18795
|
+
async getUpdateEmbedParamsObject() {
|
|
18735
18796
|
let queryParams = this.getEmbedParamsObject();
|
|
18736
|
-
|
|
18797
|
+
const appInitData = await this.getAppInitData();
|
|
18798
|
+
queryParams = { ...this.viewConfig, ...queryParams, ...appInitData };
|
|
18737
18799
|
return queryParams;
|
|
18738
18800
|
}
|
|
18739
18801
|
/**
|
|
@@ -18787,18 +18849,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18787
18849
|
};
|
|
18788
18850
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18789
18851
|
this.handleError({
|
|
18790
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18852
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18791
18853
|
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18792
|
-
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18854
|
+
code: exports.EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18793
18855
|
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18794
18856
|
});
|
|
18795
18857
|
return queryParams;
|
|
18796
18858
|
}
|
|
18797
18859
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18798
18860
|
this.handleError({
|
|
18799
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18861
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18800
18862
|
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18801
|
-
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18863
|
+
code: exports.EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18802
18864
|
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18803
18865
|
});
|
|
18804
18866
|
return queryParams;
|
|
@@ -19026,9 +19088,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19026
19088
|
});
|
|
19027
19089
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
19028
19090
|
this.handleError({
|
|
19029
|
-
errorType: ErrorDetailsTypes.API,
|
|
19091
|
+
errorType: exports.ErrorDetailsTypes.API,
|
|
19030
19092
|
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
19031
|
-
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
19093
|
+
code: exports.EmbedErrorCodes.LOGIN_FAILED,
|
|
19032
19094
|
error: error,
|
|
19033
19095
|
});
|
|
19034
19096
|
});
|
|
@@ -19042,6 +19104,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19042
19104
|
preRenderWrapper.id = preRenderIds.wrapper;
|
|
19043
19105
|
const initialPreRenderWrapperStyle = {
|
|
19044
19106
|
position: 'absolute',
|
|
19107
|
+
top: '0',
|
|
19108
|
+
left: '0',
|
|
19045
19109
|
width: '100vw',
|
|
19046
19110
|
height: '100vh',
|
|
19047
19111
|
};
|
|
@@ -19336,18 +19400,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19336
19400
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19337
19401
|
if (!this.isRendered) {
|
|
19338
19402
|
this.handleError({
|
|
19339
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19403
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19340
19404
|
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19341
|
-
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19405
|
+
code: exports.EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19342
19406
|
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19343
19407
|
});
|
|
19344
19408
|
return null;
|
|
19345
19409
|
}
|
|
19346
19410
|
if (!messageType) {
|
|
19347
19411
|
this.handleError({
|
|
19348
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19412
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19349
19413
|
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19350
|
-
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19414
|
+
code: exports.EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19351
19415
|
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19352
19416
|
});
|
|
19353
19417
|
return null;
|
|
@@ -19506,8 +19570,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19506
19570
|
}
|
|
19507
19571
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
19508
19572
|
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
19509
|
-
this.executeAfterEmbedContainerLoaded(() => {
|
|
19510
|
-
|
|
19573
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
19574
|
+
try {
|
|
19575
|
+
const params = await this.getUpdateEmbedParamsObject();
|
|
19576
|
+
this.trigger(exports.HostEvent.UpdateEmbedParams, params);
|
|
19577
|
+
}
|
|
19578
|
+
catch (error) {
|
|
19579
|
+
logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
|
|
19580
|
+
this.handleError({
|
|
19581
|
+
errorType: exports.ErrorDetailsTypes.API,
|
|
19582
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
|
|
19583
|
+
code: exports.EmbedErrorCodes.UPDATE_PARAMS_FAILED,
|
|
19584
|
+
error: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
19585
|
+
});
|
|
19586
|
+
}
|
|
19511
19587
|
});
|
|
19512
19588
|
}
|
|
19513
19589
|
this.beforePrerenderVisible();
|
|
@@ -19527,7 +19603,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19527
19603
|
this.resizeObserver.observe(this.el);
|
|
19528
19604
|
}
|
|
19529
19605
|
}
|
|
19530
|
-
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
19606
|
+
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events', 'overflow']);
|
|
19531
19607
|
this.subscribeToEvents();
|
|
19532
19608
|
// Setup fullscreen change handler for prerendered components
|
|
19533
19609
|
if (this.iFrame) {
|
|
@@ -19570,7 +19646,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19570
19646
|
opacity: '0',
|
|
19571
19647
|
pointerEvents: 'none',
|
|
19572
19648
|
zIndex: '-1000',
|
|
19573
|
-
position: 'absolute
|
|
19649
|
+
position: 'absolute',
|
|
19650
|
+
top: '0',
|
|
19651
|
+
left: '0',
|
|
19652
|
+
overflow: 'hidden',
|
|
19574
19653
|
};
|
|
19575
19654
|
setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
|
|
19576
19655
|
if (this.resizeObserver) {
|
|
@@ -20443,9 +20522,9 @@ query GetEurekaVizSnapshots(
|
|
|
20443
20522
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20444
20523
|
if (!liveboardId) {
|
|
20445
20524
|
this.handleError({
|
|
20446
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20525
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20447
20526
|
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20448
|
-
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20527
|
+
code: exports.EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20449
20528
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20450
20529
|
});
|
|
20451
20530
|
}
|
|
@@ -21412,9 +21491,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21412
21491
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21413
21492
|
if (!worksheetId) {
|
|
21414
21493
|
this.handleError({
|
|
21415
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21494
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21416
21495
|
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21417
|
-
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21496
|
+
code: exports.EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21418
21497
|
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21419
21498
|
});
|
|
21420
21499
|
}
|