@thoughtspot/visual-embed-sdk 1.33.2 → 1.33.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/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +5 -2
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +15 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +2 -2
- package/cjs/src/embed/app.d.ts +20 -6
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +3 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.spec.js +13 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +13 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -3
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +2 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +6 -6
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +10 -9
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -1
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts +0 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +0 -1
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/types.d.ts +40 -22
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +35 -17
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +0 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -4
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
- package/cjs/src/utils/sessionInfoService.js +0 -4
- package/cjs/src/utils/sessionInfoService.js.map +1 -1
- package/cjs/src/utils.d.ts +1 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +13 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +6 -6
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CqrIh3Vj.js → index-Cl8Rsh6W.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +2 -2
- package/dist/src/embed/app.d.ts +20 -6
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -3
- package/dist/src/embed/liveboard.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/tokenizedFetch.d.ts +0 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/types.d.ts +40 -22
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -4
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +1 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +72 -42
- package/dist/tsembed-react.js +71 -41
- package/dist/tsembed.es.js +72 -42
- package/dist/tsembed.js +71 -41
- package/dist/visual-embed-sdk-react-full.d.ts +62 -38
- package/dist/visual-embed-sdk-react.d.ts +62 -38
- package/dist/visual-embed-sdk.d.ts +62 -38
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +6 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +15 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +2 -2
- package/lib/src/embed/app.d.ts +20 -6
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +3 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.spec.js +13 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +4 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +13 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -3
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +2 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +6 -6
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +10 -9
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts +0 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +0 -1
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/types.d.ts +40 -22
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +35 -17
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +0 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -4
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
- package/lib/src/utils/sessionInfoService.js +0 -4
- package/lib/src/utils/sessionInfoService.js.map +1 -1
- package/lib/src/utils.d.ts +1 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +11 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +6 -6
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +62 -38
- package/package.json +1 -1
- package/src/auth.spec.ts +15 -3
- package/src/auth.ts +7 -3
- package/src/css-variables.ts +2 -2
- package/src/embed/app.spec.ts +15 -0
- package/src/embed/app.ts +23 -7
- package/src/embed/base.spec.ts +13 -1
- package/src/embed/conversation.spec.ts +16 -0
- package/src/embed/conversation.ts +4 -0
- package/src/embed/liveboard.spec.ts +2 -2
- package/src/embed/liveboard.ts +1 -4
- package/src/embed/search.spec.ts +6 -6
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.spec.ts +1 -1
- package/src/errors.ts +10 -9
- package/src/react/index.spec.tsx +1 -1
- package/src/tokenizedFetch.ts +0 -1
- package/src/types.ts +38 -20
- package/src/utils/processData.ts +0 -1
- package/src/utils/sessionInfoService.ts +0 -4
- package/src/utils.spec.ts +6 -6
- package/src/utils.ts +14 -2
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.33.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.33.4 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
@@ -304,6 +304,10 @@
|
|
|
304
304
|
}
|
|
305
305
|
return value;
|
|
306
306
|
};
|
|
307
|
+
const getSSOMarker = (markerId) => {
|
|
308
|
+
const encStringToAppend = encodeURIComponent(markerId);
|
|
309
|
+
return `tsSSOMarker=${encStringToAppend}`;
|
|
310
|
+
};
|
|
307
311
|
/**
|
|
308
312
|
* Append a string to a URL's hash fragment
|
|
309
313
|
* @param url A URL
|
|
@@ -312,12 +316,17 @@
|
|
|
312
316
|
const appendToUrlHash = (url, stringToAppend) => {
|
|
313
317
|
let outputUrl = url;
|
|
314
318
|
const encStringToAppend = encodeURIComponent(stringToAppend);
|
|
319
|
+
const marker = `tsSSOMarker=${encStringToAppend}`;
|
|
320
|
+
let splitAdder = '';
|
|
315
321
|
if (url.indexOf('#') >= 0) {
|
|
316
|
-
|
|
322
|
+
// If second half of hash contains a '?' already add a '&' instead of
|
|
323
|
+
// '?' which appends to query params.
|
|
324
|
+
splitAdder = url.split('#')[1].indexOf('?') >= 0 ? '&' : '?';
|
|
317
325
|
}
|
|
318
326
|
else {
|
|
319
|
-
|
|
327
|
+
splitAdder = '#?';
|
|
320
328
|
}
|
|
329
|
+
outputUrl = `${outputUrl}${splitAdder}${marker}`;
|
|
321
330
|
return outputUrl;
|
|
322
331
|
};
|
|
323
332
|
/**
|
|
@@ -1684,22 +1693,26 @@
|
|
|
1684
1693
|
*/
|
|
1685
1694
|
EmbedEvent["Rename"] = "rename";
|
|
1686
1695
|
/**
|
|
1687
|
-
* Emitted if the user wants to intercept the search execution
|
|
1688
|
-
* and implement logic to decide whether to run the search or not
|
|
1689
1696
|
*
|
|
1690
|
-
*
|
|
1697
|
+
* This event can be emitted to intercept search execution initiated by
|
|
1698
|
+
* the users and implement the logic to allow or restrict search execution.
|
|
1699
|
+
* You can can also show custom error text if the search query must be
|
|
1700
|
+
* restricted due to your application or business requirements.
|
|
1701
|
+
|
|
1702
|
+
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
1691
1703
|
* for this embed event to get emitted.
|
|
1692
1704
|
* @param: payload
|
|
1693
1705
|
* @param: responder
|
|
1694
1706
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
1695
|
-
*
|
|
1707
|
+
* should run the search, and if not, what error message
|
|
1708
|
+
* should be shown to the user.
|
|
1696
1709
|
*
|
|
1697
|
-
* execute: When execute returns true
|
|
1698
|
-
* When execute returns false
|
|
1710
|
+
* execute: When execute returns `true`, the search will be run.
|
|
1711
|
+
* When execute returns `false`, the search will not be executed.
|
|
1699
1712
|
*
|
|
1700
|
-
* error: Developers can customize the
|
|
1701
|
-
*
|
|
1702
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
1713
|
+
* error: Developers can customize the error message text when `execute`
|
|
1714
|
+
* returns `false` using the error parameter in responder.
|
|
1715
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
1703
1716
|
* @example
|
|
1704
1717
|
*```js
|
|
1705
1718
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -1739,15 +1752,15 @@
|
|
|
1739
1752
|
*/
|
|
1740
1753
|
EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
|
|
1741
1754
|
/**
|
|
1742
|
-
* Emitted when parameter changes in an
|
|
1743
|
-
* or
|
|
1755
|
+
* Emitted when parameter changes in an Answer
|
|
1756
|
+
* or Liveboard
|
|
1744
1757
|
*
|
|
1745
1758
|
* ```js
|
|
1746
1759
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
1747
1760
|
* console.log('payload', payload);
|
|
1748
1761
|
* })
|
|
1749
1762
|
*```
|
|
1750
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
1763
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
1751
1764
|
*/
|
|
1752
1765
|
EmbedEvent["ParameterChanged"] = "parameterChanged";
|
|
1753
1766
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
@@ -2478,8 +2491,12 @@
|
|
|
2478
2491
|
* see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
|
|
2479
2492
|
*
|
|
2480
2493
|
* `values` - An array of one or several values. The value definition on the
|
|
2481
|
-
* data type you choose to filter on. For a complete list of supported data types,
|
|
2482
|
-
*
|
|
2494
|
+
* data type you choose to filter on. For a complete list of supported data types, see
|
|
2495
|
+
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
|
|
2496
|
+
*
|
|
2497
|
+
* `type` - To update filters for date time, specify the date format type.
|
|
2498
|
+
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
|
|
2499
|
+
*
|
|
2483
2500
|
* @example
|
|
2484
2501
|
* ```js
|
|
2485
2502
|
*
|
|
@@ -2609,7 +2626,7 @@
|
|
|
2609
2626
|
*/
|
|
2610
2627
|
HostEvent["AskSage"] = "AskSage";
|
|
2611
2628
|
/**
|
|
2612
|
-
* Trigger
|
|
2629
|
+
* Trigger cross filter update action on a Liveboard
|
|
2613
2630
|
* @example
|
|
2614
2631
|
* ```js
|
|
2615
2632
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -2624,7 +2641,7 @@
|
|
|
2624
2641
|
*/
|
|
2625
2642
|
HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
|
|
2626
2643
|
/**
|
|
2627
|
-
* Trigger
|
|
2644
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
2628
2645
|
* @example
|
|
2629
2646
|
* ```js
|
|
2630
2647
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -2770,6 +2787,7 @@
|
|
|
2770
2787
|
Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
|
|
2771
2788
|
Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
|
|
2772
2789
|
Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
|
|
2790
|
+
Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
|
|
2773
2791
|
})(Param || (Param = {}));
|
|
2774
2792
|
/**
|
|
2775
2793
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -3741,7 +3759,7 @@
|
|
|
3741
3759
|
*/
|
|
3742
3760
|
Action["AIHighlights"] = "AIHighlights";
|
|
3743
3761
|
/**
|
|
3744
|
-
* Action ID for edit schedule action on schedule on homepage
|
|
3762
|
+
* Action ID for edit the schedule action on schedule on homepage
|
|
3745
3763
|
* @example
|
|
3746
3764
|
* ```js
|
|
3747
3765
|
* disabledActions: [Action.EditScheduleHomepage]
|
|
@@ -3803,6 +3821,15 @@
|
|
|
3803
3821
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3804
3822
|
*/
|
|
3805
3823
|
Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
|
|
3824
|
+
/**
|
|
3825
|
+
* Action ID for disabling chip reorder in Answer and Liveboard
|
|
3826
|
+
* @example
|
|
3827
|
+
* ```js
|
|
3828
|
+
* const disabledActions = [Action.DisableChipReorder]
|
|
3829
|
+
* ```
|
|
3830
|
+
* @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
|
|
3831
|
+
*/
|
|
3832
|
+
Action["DisableChipReorder"] = "disableChipReorder";
|
|
3806
3833
|
})(exports.Action || (exports.Action = {}));
|
|
3807
3834
|
var PrefetchFeatures;
|
|
3808
3835
|
(function (PrefetchFeatures) {
|
|
@@ -6169,20 +6196,21 @@
|
|
|
6169
6196
|
|
|
6170
6197
|
const ERROR_MESSAGE = {
|
|
6171
6198
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6199
|
+
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
|
|
6200
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
6201
|
+
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
6202
|
+
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
6203
|
+
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
6204
|
+
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|
|
6205
|
+
DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
|
|
6178
6206
|
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
6179
|
-
SESSION_INFO_FAILED: 'Failed to get session
|
|
6207
|
+
SESSION_INFO_FAILED: 'Failed to get session information',
|
|
6180
6208
|
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
6181
6209
|
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
6182
|
-
PRERENDER_ID_MISSING: 'PreRender
|
|
6210
|
+
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
|
|
6183
6211
|
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
6184
6212
|
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
6185
|
-
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please
|
|
6213
|
+
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
6186
6214
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
6187
6215
|
};
|
|
6188
6216
|
|
|
@@ -6389,7 +6417,6 @@
|
|
|
6389
6417
|
* Fetch wrapper that adds the authentication token to the request.
|
|
6390
6418
|
* Use this to call the ThoughtSpot APIs when using the visual embed sdk.
|
|
6391
6419
|
* The interface for this method is the same as Web `Fetch`.
|
|
6392
|
-
*
|
|
6393
6420
|
* @param input
|
|
6394
6421
|
* @param init
|
|
6395
6422
|
* @example
|
|
@@ -13773,7 +13800,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
13773
13800
|
* Returns the session info object and caches it for future use.
|
|
13774
13801
|
* Once fetched the session info object is cached and returned from the cache on
|
|
13775
13802
|
* subsequent calls.
|
|
13776
|
-
*
|
|
13777
13803
|
* @example ```js
|
|
13778
13804
|
* const sessionInfo = await getSessionInfo();
|
|
13779
13805
|
* console.log(sessionInfo);
|
|
@@ -13792,7 +13818,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
13792
13818
|
}
|
|
13793
13819
|
/**
|
|
13794
13820
|
* Processes the session info response and returns the session info object.
|
|
13795
|
-
*
|
|
13796
13821
|
* @param sessionInfoResp {any} Response from the session info API.
|
|
13797
13822
|
* @returns {SessionInfo} The session info object.
|
|
13798
13823
|
* @example ```js
|
|
@@ -13965,7 +13990,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
13965
13990
|
* Check if we are stuck at the SSO redirect URL
|
|
13966
13991
|
*/
|
|
13967
13992
|
function isAtSSORedirectUrl() {
|
|
13968
|
-
return window.location.href.indexOf(SSO_REDIRECTION_MARKER_GUID) >= 0;
|
|
13993
|
+
return window.location.href.indexOf(getSSOMarker(SSO_REDIRECTION_MARKER_GUID)) >= 0;
|
|
13969
13994
|
}
|
|
13970
13995
|
/**
|
|
13971
13996
|
* Remove the SSO redirect URL marker
|
|
@@ -13976,7 +14001,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
13976
14001
|
// reload the page which we don't want. We'll live with adding an
|
|
13977
14002
|
// unnecessary hash to the parent page URL until we find any use case where
|
|
13978
14003
|
// that creates an issue.
|
|
13979
|
-
|
|
14004
|
+
// Replace any occurences of ?ssoMarker=guid or &ssoMarker=guid.
|
|
14005
|
+
let updatedHash = window.location.hash.replace(`?${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
14006
|
+
updatedHash = updatedHash.replace(`&${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
14007
|
+
window.location.hash = updatedHash;
|
|
13980
14008
|
}
|
|
13981
14009
|
/**
|
|
13982
14010
|
* Perform token based authentication
|
|
@@ -14249,7 +14277,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14249
14277
|
}
|
|
14250
14278
|
/**
|
|
14251
14279
|
* Responds to AuthInit sent from host signifying successful authentication in host.
|
|
14252
|
-
*
|
|
14253
14280
|
* @param e
|
|
14254
14281
|
* @returns {any}
|
|
14255
14282
|
*/
|
|
@@ -14390,7 +14417,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14390
14417
|
});
|
|
14391
14418
|
}
|
|
14392
14419
|
|
|
14393
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.33.
|
|
14420
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.33.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 . --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",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":"^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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@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",crypto:"^1.0.1","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:"4.24.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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"30 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};
|
|
14394
14421
|
|
|
14395
14422
|
/**
|
|
14396
14423
|
* Copyright (c) 2022
|
|
@@ -15614,7 +15641,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15614
15641
|
}
|
|
15615
15642
|
getEmbedParams() {
|
|
15616
15643
|
var _a;
|
|
15617
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 =
|
|
15644
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15618
15645
|
/* eslint-disable-next-line max-len */
|
|
15619
15646
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
15620
15647
|
const queryParams = this.getBaseQueryParams();
|
|
@@ -15831,9 +15858,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15831
15858
|
* embedded Liveboard or visualization.
|
|
15832
15859
|
*/
|
|
15833
15860
|
getEmbedParams() {
|
|
15834
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 =
|
|
15861
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15835
15862
|
/* eslint-disable-next-line max-len */
|
|
15836
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15863
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, } = this.viewConfig;
|
|
15837
15864
|
let params = {};
|
|
15838
15865
|
params[Param.EmbedApp] = true;
|
|
15839
15866
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -15848,6 +15875,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15848
15875
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
15849
15876
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
15850
15877
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
15878
|
+
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
15851
15879
|
params = this.getBaseQueryParams(params);
|
|
15852
15880
|
if (fullHeight === true) {
|
|
15853
15881
|
params[Param.fullHeight] = true;
|
|
@@ -16126,7 +16154,7 @@ query GetEurekaVizSnapshots(
|
|
|
16126
16154
|
let params = {};
|
|
16127
16155
|
params[Param.EmbedApp] = true;
|
|
16128
16156
|
params = this.getBaseQueryParams(params);
|
|
16129
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 =
|
|
16157
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, } = this.viewConfig;
|
|
16130
16158
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
16131
16159
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
16132
16160
|
if (fullHeight === true) {
|
|
@@ -16302,7 +16330,6 @@ query GetEurekaVizSnapshots(
|
|
|
16302
16330
|
/**
|
|
16303
16331
|
* Returns the full url of the liveboard/viz which can be used to open
|
|
16304
16332
|
* this liveboard inside the full Thoughtspot application in a new tab.
|
|
16305
|
-
*
|
|
16306
16333
|
* @returns url string
|
|
16307
16334
|
*/
|
|
16308
16335
|
getLiveboardUrl() {
|
|
@@ -16360,6 +16387,9 @@ query GetEurekaVizSnapshots(
|
|
|
16360
16387
|
getIframeSrc() {
|
|
16361
16388
|
const { worksheetId, searchOptions, } = this.viewConfig;
|
|
16362
16389
|
const path = 'insights/conv-assist';
|
|
16390
|
+
if (!worksheetId) {
|
|
16391
|
+
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
16392
|
+
}
|
|
16363
16393
|
const queryParams = this.getBaseQueryParams();
|
|
16364
16394
|
queryParams[Param.SpotterEnabled] = true;
|
|
16365
16395
|
let query = '';
|