@thoughtspot/visual-embed-sdk 1.18.0-alpha.1 → 1.18.0-alpha.2
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/dist/src/embed/search-bar.d.ts +1 -5
- package/dist/src/react/util.d.ts +1 -1
- package/dist/src/test/test-utils.d.ts +1 -1
- package/dist/src/types.d.ts +7 -7
- package/dist/tsembed.es.js +1 -1
- package/dist/tsembed.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/embed/search-bar.d.ts +1 -5
- package/lib/src/embed/search-bar.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/react/util.d.ts +1 -1
- package/lib/src/test/test-utils.d.ts +1 -1
- package/lib/src/types.d.ts +7 -7
- package/lib/src/visual-embed-sdk.d.ts +1 -5
- package/package.json +1 -1
- package/src/embed/search-bar.tsx +10 -5
- package/src/react/index.spec.tsx +0 -1
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { ViewConfig } from '../types';
|
|
2
2
|
import { TsEmbed } from './ts-embed';
|
|
3
3
|
import { SearchOptions } from './search';
|
|
4
|
-
export interface SearchBarViewConfig extends ViewConfig {
|
|
5
|
-
/**
|
|
6
|
-
* If set to true, hides the data sources panel.
|
|
7
|
-
*/
|
|
8
|
-
hideDataSources?: boolean;
|
|
4
|
+
export interface SearchBarViewConfig extends Omit<ViewConfig, 'disabledActions' | 'hiddenActions' | 'visibleActions' | 'disabledActionReason' | 'runtimeFilters' | 'showAlerts'> {
|
|
9
5
|
/**
|
|
10
6
|
* The array of data source GUIDs to set on load.
|
|
11
7
|
*/
|
package/dist/src/react/util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmbedEvent, MessageCallback, ViewConfig } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export type EmbedEventHandlers = {
|
|
3
3
|
[key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
|
|
4
4
|
};
|
|
5
5
|
export interface EmbedProps extends ViewConfig, EmbedEventHandlers {
|
|
@@ -2,7 +2,7 @@ export declare const defaultParamsWithoutHiddenActions: string;
|
|
|
2
2
|
export declare const defaultParams: string;
|
|
3
3
|
export declare const defaultParamsForPinboardEmbed: string;
|
|
4
4
|
export declare const getDocumentBody: () => string;
|
|
5
|
-
|
|
5
|
+
type DOMElement = HTMLElement | Document;
|
|
6
6
|
export declare const getRootEl: () => HTMLElement;
|
|
7
7
|
export declare const getRootEl2: () => HTMLElement;
|
|
8
8
|
export declare const getIFrameEl: (container?: DOMElement) => HTMLIFrameElement;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare enum AuthType {
|
|
|
69
69
|
*/
|
|
70
70
|
Basic = "Basic"
|
|
71
71
|
}
|
|
72
|
-
export
|
|
72
|
+
export type DOMSelector = string | HTMLElement;
|
|
73
73
|
interface customCssInterface {
|
|
74
74
|
variables?: {
|
|
75
75
|
[variableName: string]: string;
|
|
@@ -340,7 +340,7 @@ export interface ViewConfig {
|
|
|
340
340
|
/**
|
|
341
341
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
342
342
|
*/
|
|
343
|
-
export
|
|
343
|
+
export type MessagePayload = {
|
|
344
344
|
type: string;
|
|
345
345
|
data: any;
|
|
346
346
|
status?: string;
|
|
@@ -348,22 +348,22 @@ export declare type MessagePayload = {
|
|
|
348
348
|
/**
|
|
349
349
|
* MessageOptions: By Providing options, getting specific event start / end based on option
|
|
350
350
|
*/
|
|
351
|
-
export
|
|
351
|
+
export type MessageOptions = {
|
|
352
352
|
start?: boolean;
|
|
353
353
|
};
|
|
354
354
|
/**
|
|
355
355
|
* MessageCallback: Embed event message callback
|
|
356
356
|
*/
|
|
357
|
-
export
|
|
357
|
+
export type MessageCallback = (payload: MessagePayload, responder?: (data: any) => void) => void;
|
|
358
358
|
/**
|
|
359
359
|
* MessageCallbackObj: contains message options & callback function
|
|
360
360
|
*/
|
|
361
|
-
export
|
|
361
|
+
export type MessageCallbackObj = {
|
|
362
362
|
options: MessageOptions;
|
|
363
363
|
callback: MessageCallback;
|
|
364
364
|
};
|
|
365
|
-
export
|
|
366
|
-
export
|
|
365
|
+
export type GenericCallbackFn = (...args: any[]) => any;
|
|
366
|
+
export type QueryParams = {
|
|
367
367
|
[key: string]: string;
|
|
368
368
|
};
|
|
369
369
|
/**
|
package/dist/tsembed.es.js
CHANGED
|
@@ -9376,7 +9376,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
9376
9376
|
});
|
|
9377
9377
|
}
|
|
9378
9378
|
|
|
9379
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.18.0-alpha.
|
|
9379
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.18.0-alpha.2";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/**"];var exports={".":"./lib/src/index.js","./react":{"import":"./lib/src/react/index.js",require:"./cjs/src/react.index.js",types:"./lib/src/react/index.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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","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","@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/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","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",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"4.1.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.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","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,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};
|
|
9380
9380
|
|
|
9381
9381
|
/**
|
|
9382
9382
|
* Copyright (c) 2022
|
package/dist/tsembed.js
CHANGED
|
@@ -9342,7 +9342,7 @@
|
|
|
9342
9342
|
});
|
|
9343
9343
|
}
|
|
9344
9344
|
|
|
9345
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.18.0-alpha.
|
|
9345
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.18.0-alpha.2";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/**"];var exports$1={".":"./lib/src/index.js","./react":{"import":"./lib/src/react/index.js",require:"./cjs/src/react.index.js",types:"./lib/src/react/index.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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","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","@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/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","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",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"4.1.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.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","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,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};
|
|
9346
9346
|
|
|
9347
9347
|
/**
|
|
9348
9348
|
* Copyright (c) 2022
|
package/lib/package.json
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { ViewConfig } from '../types';
|
|
2
2
|
import { TsEmbed } from './ts-embed';
|
|
3
3
|
import { SearchOptions } from './search';
|
|
4
|
-
export interface SearchBarViewConfig extends ViewConfig {
|
|
5
|
-
/**
|
|
6
|
-
* If set to true, hides the data sources panel.
|
|
7
|
-
*/
|
|
8
|
-
hideDataSources?: boolean;
|
|
4
|
+
export interface SearchBarViewConfig extends Omit<ViewConfig, 'disabledActions' | 'hiddenActions' | 'visibleActions' | 'disabledActionReason' | 'runtimeFilters' | 'showAlerts'> {
|
|
9
5
|
/**
|
|
10
6
|
* The array of data source GUIDs to set on load.
|
|
11
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.js","sourceRoot":"","sources":["../../../src/embed/search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,EAAsB,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"search-bar.js","sourceRoot":"","sources":["../../../src/embed/search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KA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,iBAAiB,GAAG,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACjE,IAAI,iBAAiB,EAAE;YACnB,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;SACnC;QACD,MAAM,gBAAgB,GAAG,IAAI,CAAC,2BAA2B,EAAE,CAAC;QAE5D,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,gBAAgB,EAAE,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,MAAM;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAExC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -78,7 +78,7 @@ describe('React Components', () => {
|
|
|
78
78
|
});
|
|
79
79
|
describe('SearchBarEmbed', () => {
|
|
80
80
|
it('Should Render the Iframe with props', async () => {
|
|
81
|
-
const { container } = render(React.createElement(SearchBarEmbed, {
|
|
81
|
+
const { container } = render(React.createElement(SearchBarEmbed, { className: "embedClass", dataSources: ['test'], searchOptions: {
|
|
82
82
|
searchTokenString: '[revenue]',
|
|
83
83
|
executeSearch: true,
|
|
84
84
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../src/react/index.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AACnC,OAAO,yCAAyC,CAAC;AACjD,OAAO,EAAsB,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAA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AAS,EAAC,YAAY,EACtB,WAAW,EAAE,CAAC,MAAM,CAAC,EACrB,aAAa,EAAE;oBACX,iBAAiB,EAAE,WAAW;oBAC9B,aAAa,EAAE,IAAI;iBACtB,GACH,CACL,CAAC;YAEF,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;YAE5C,MAAM,CACF,WAAW,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CACnD,YAAY,CACf,CACJ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACb,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAChC,UAAU,eAAe,4EAA4E,OAAO,iCAAiC,MAAM,CAAC,WAAW,0JAA0J,CAC5T,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/lib/src/react/util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmbedEvent, MessageCallback, ViewConfig } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export type EmbedEventHandlers = {
|
|
3
3
|
[key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
|
|
4
4
|
};
|
|
5
5
|
export interface EmbedProps extends ViewConfig, EmbedEventHandlers {
|
|
@@ -2,7 +2,7 @@ export declare const defaultParamsWithoutHiddenActions: string;
|
|
|
2
2
|
export declare const defaultParams: string;
|
|
3
3
|
export declare const defaultParamsForPinboardEmbed: string;
|
|
4
4
|
export declare const getDocumentBody: () => string;
|
|
5
|
-
|
|
5
|
+
type DOMElement = HTMLElement | Document;
|
|
6
6
|
export declare const getRootEl: () => HTMLElement;
|
|
7
7
|
export declare const getRootEl2: () => HTMLElement;
|
|
8
8
|
export declare const getIFrameEl: (container?: DOMElement) => HTMLIFrameElement;
|
package/lib/src/types.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare enum AuthType {
|
|
|
69
69
|
*/
|
|
70
70
|
Basic = "Basic"
|
|
71
71
|
}
|
|
72
|
-
export
|
|
72
|
+
export type DOMSelector = string | HTMLElement;
|
|
73
73
|
interface customCssInterface {
|
|
74
74
|
variables?: {
|
|
75
75
|
[variableName: string]: string;
|
|
@@ -340,7 +340,7 @@ export interface ViewConfig {
|
|
|
340
340
|
/**
|
|
341
341
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
342
342
|
*/
|
|
343
|
-
export
|
|
343
|
+
export type MessagePayload = {
|
|
344
344
|
type: string;
|
|
345
345
|
data: any;
|
|
346
346
|
status?: string;
|
|
@@ -348,22 +348,22 @@ export declare type MessagePayload = {
|
|
|
348
348
|
/**
|
|
349
349
|
* MessageOptions: By Providing options, getting specific event start / end based on option
|
|
350
350
|
*/
|
|
351
|
-
export
|
|
351
|
+
export type MessageOptions = {
|
|
352
352
|
start?: boolean;
|
|
353
353
|
};
|
|
354
354
|
/**
|
|
355
355
|
* MessageCallback: Embed event message callback
|
|
356
356
|
*/
|
|
357
|
-
export
|
|
357
|
+
export type MessageCallback = (payload: MessagePayload, responder?: (data: any) => void) => void;
|
|
358
358
|
/**
|
|
359
359
|
* MessageCallbackObj: contains message options & callback function
|
|
360
360
|
*/
|
|
361
|
-
export
|
|
361
|
+
export type MessageCallbackObj = {
|
|
362
362
|
options: MessageOptions;
|
|
363
363
|
callback: MessageCallback;
|
|
364
364
|
};
|
|
365
|
-
export
|
|
366
|
-
export
|
|
365
|
+
export type GenericCallbackFn = (...args: any[]) => any;
|
|
366
|
+
export type QueryParams = {
|
|
367
367
|
[key: string]: string;
|
|
368
368
|
};
|
|
369
369
|
/**
|
|
@@ -409,11 +409,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
|
|
|
409
409
|
import { ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
|
|
410
410
|
import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
|
|
411
411
|
import { SearchOptions } from '@thoughtspot/visual-embed-sdk/embed/search';
|
|
412
|
-
export interface SearchBarViewConfig extends ViewConfig {
|
|
413
|
-
/**
|
|
414
|
-
* If set to true, hides the data sources panel.
|
|
415
|
-
*/
|
|
416
|
-
hideDataSources?: boolean;
|
|
412
|
+
export interface SearchBarViewConfig extends Omit<ViewConfig, 'disabledActions' | 'hiddenActions' | 'visibleActions' | 'disabledActionReason' | 'runtimeFilters' | 'showAlerts'> {
|
|
417
413
|
/**
|
|
418
414
|
* The array of data source GUIDs to set on load.
|
|
419
415
|
*/
|
package/package.json
CHANGED
package/src/embed/search-bar.tsx
CHANGED
|
@@ -3,11 +3,16 @@ import { getQueryParamString } from '../utils';
|
|
|
3
3
|
import { TsEmbed } from './ts-embed';
|
|
4
4
|
import { SearchOptions } from './search';
|
|
5
5
|
|
|
6
|
-
export interface SearchBarViewConfig
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export interface SearchBarViewConfig
|
|
7
|
+
extends Omit<
|
|
8
|
+
ViewConfig,
|
|
9
|
+
| 'disabledActions'
|
|
10
|
+
| 'hiddenActions'
|
|
11
|
+
| 'visibleActions'
|
|
12
|
+
| 'disabledActionReason'
|
|
13
|
+
| 'runtimeFilters'
|
|
14
|
+
| 'showAlerts'
|
|
15
|
+
> {
|
|
11
16
|
/**
|
|
12
17
|
* The array of data source GUIDs to set on load.
|
|
13
18
|
*/
|
package/src/react/index.spec.tsx
CHANGED