Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/embed/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
*/
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
/**
* This flag is used to enable the 2 column layout in liveboard
* This attribute can be used to enable the two-column layout on an embedded Liveboard
* @type {boolean}
* @default false
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
Expand All @@ -380,17 +380,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
*/
enable2ColumnLayout?: boolean;
/**
* Flag to use OnBeforeSearchExecute embed event
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
* @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
*/
isOnBeforeGetVizDataInterceptEnabled?: boolean;
/**
* Flag to use home page search bar mode
* @version SDK : 1.33.0 | Thoughtspot : 10.2.0.cl
* @version SDK : 1.33.0 | Thoughtspot : 10.3.0.cl
*/
homePageSearchBarMode?: HomePageSearchBarMode;
/**
* This flag is used to enable the compact header in liveboard
* This flag can be used to enable the compact header in Liveboard
* @type {boolean}
* @default false
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
Expand All @@ -404,7 +404,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
*/
isLiveboardCompactHeaderEnabled?: boolean;
/**
* This flag is used to show/hide verified Icon in liveboard compact header
* This flag can be used to show or hide the Liveboard verified icon in the compact header.
* @type {boolean}
* @default true
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
Expand All @@ -418,7 +418,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
*/
showLiveboardVerifiedBadge?: boolean;
/**
* This flag is used to show/hide re-verify banner in liveboard compact header
* This flag can be used to show or hide the re-verify banner on the Liveboard compact header
* @type {boolean}
* @default true
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
Expand Down
2 changes: 1 addition & 1 deletion src/embed/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Base TS Embed', () => {
authEE.on(auth.AuthStatus.FAILURE, (reason) => {
expect(reason).toEqual(auth.AuthFailureType.NO_COOKIE_ACCESS);
expect(window.alert).toBeCalledWith(
'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.',
'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.',
);
done();
});
Expand Down
2 changes: 1 addition & 1 deletion src/embed/ts-embed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ describe('Unit test case for ts embed', () => {
});
libEmbed.preRender();

expect(logger.error).toHaveBeenCalledWith('PreRender id is required for preRender');
expect(logger.error).toHaveBeenCalledWith('PreRender ID is required for preRender');
});

it('showPreRender should preRender if not available', async () => {
Expand Down
18 changes: 9 additions & 9 deletions src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
export const ERROR_MESSAGE = {
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
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.',
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.',
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
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.',
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.',
SDK_NOT_INITIALIZED: 'SDK not initialized',
SESSION_INFO_FAILED: 'Failed to get session info',
SESSION_INFO_FAILED: 'Failed to get session information',
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please setup CSP Correctly for the Application to start working. You can know more about setting CSP Correctly here: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n In case you are still facing error, please read: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
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',
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
};
37 changes: 21 additions & 16 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ export interface ViewConfig {
// eslint-disable-next-line camelcase
enableV2Shell_experimental?: boolean;
/**
* To set the initial state of the search bar in case of saved-answers.
* To set the initial state of the search bar in case of saved Answers.
* @default true
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
* @example
Expand All @@ -1030,7 +1030,7 @@ export interface ViewConfig {
collapseSearchBar?: boolean;
/**
* This flag can be used to disable links inside the embedded app,
* and disables redirection of links in a new tab.
* and disable redirection of links in a new tab.
* @example
* ```js
* const embed = new LiveboardEmbed('#embed', {
Expand Down Expand Up @@ -2167,22 +2167,26 @@ export enum EmbedEvent {
*/
Rename = 'rename',
/**
* Emitted if the user wants to intercept the search execution
* and implement logic to decide whether to run the search or not
*
* Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
* This event can be emitted to intercept search execution initiated by
* the users and implement the logic to allow or restrict search execution.
* You can can also show custom error text if the search query must be
* restricted due to your application or business requirements.

* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
* for this embed event to get emitted.
* @param: payload
* @param: responder
* Contains elements that lets developers define whether ThoughtSpot
* will run the search or not, and if not, which error message to provide.
* should run the search, and if not, what error message
* should be shown to the user.
*
* execute: When execute returns true, the search will be run.
* When execute returns false, the search will not be executed.
* execute: When execute returns `true`, the search will be run.
* When execute returns `false`, the search will not be executed.
*
* error: Developers can customize the user facing message when execute is
* set to false using the error parameter in responder
* @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
* error: Developers can customize the error message text when `execute`
* returns `false` using the error parameter in responder.
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
* @example
*```js
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
Expand Down Expand Up @@ -2222,15 +2226,15 @@ export enum EmbedEvent {
*/
OnBeforeGetVizDataIntercept = 'onBeforeGetVizDataIntercept',
/**
* Emitted when parameter changes in an answer
* or liveboard
* Emitted when parameter changes in an Answer
* or Liveboard
*
* ```js
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
* console.log('payload', payload);
* })
*```
* @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
*/
ParameterChanged = 'parameterChanged',
}
Expand Down Expand Up @@ -2962,7 +2966,8 @@ export enum HostEvent {
*
* `values` - An array of one or several values. The value definition on the
* data type you choose to filter on. For a complete list of supported data types, see
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types]
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
*
* `type` - To update filters for date time, specify the date format type.
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
*
Expand Down Expand Up @@ -4237,7 +4242,7 @@ export enum Action {
AIHighlights = 'AIHighlights',

/**
* Action ID for edit schedule action on schedule on homepage
* Action ID for edit the schedule action on schedule on homepage
* @example
* ```js
* disabledActions: [Action.EditScheduleHomepage]
Expand Down
Loading
Loading