@thoughtspot/visual-embed-sdk 1.26.2 → 1.26.3

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.
Files changed (153) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/app.d.ts +0 -1
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +1 -1
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/liveboard.d.ts +0 -1
  7. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  8. package/cjs/src/embed/liveboard.js +1 -1
  9. package/cjs/src/embed/liveboard.js.map +1 -1
  10. package/cjs/src/embed/sage.d.ts +0 -1
  11. package/cjs/src/embed/sage.d.ts.map +1 -1
  12. package/cjs/src/embed/sage.js +1 -1
  13. package/cjs/src/embed/sage.js.map +1 -1
  14. package/cjs/src/embed/search.d.ts +0 -1
  15. package/cjs/src/embed/search.d.ts.map +1 -1
  16. package/cjs/src/embed/search.js +2 -3
  17. package/cjs/src/embed/search.js.map +1 -1
  18. package/cjs/src/embed/ts-embed.d.ts +0 -1
  19. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  20. package/cjs/src/embed/ts-embed.js +1 -3
  21. package/cjs/src/embed/ts-embed.js.map +1 -1
  22. package/cjs/src/types.d.ts +6 -0
  23. package/cjs/src/types.d.ts.map +1 -1
  24. package/cjs/src/types.js.map +1 -1
  25. package/dist/src/embed/app.d.ts +0 -1
  26. package/dist/src/embed/app.d.ts.map +1 -1
  27. package/dist/src/embed/liveboard.d.ts +0 -1
  28. package/dist/src/embed/liveboard.d.ts.map +1 -1
  29. package/dist/src/embed/sage.d.ts +0 -1
  30. package/dist/src/embed/sage.d.ts.map +1 -1
  31. package/dist/src/embed/search.d.ts +0 -1
  32. package/dist/src/embed/search.d.ts.map +1 -1
  33. package/dist/src/embed/ts-embed.d.ts +0 -1
  34. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  35. package/dist/src/types.d.ts +6 -0
  36. package/dist/src/types.d.ts.map +1 -1
  37. package/dist/tsembed-react.es.js +7 -10
  38. package/dist/tsembed-react.js +7 -10
  39. package/dist/tsembed.es.js +7 -10
  40. package/dist/tsembed.js +7 -10
  41. package/dist/visual-embed-sdk-react-full.d.ts +6 -5
  42. package/dist/visual-embed-sdk-react.d.ts +6 -5
  43. package/dist/visual-embed-sdk.d.ts +6 -5
  44. package/lib/package.json +1 -1
  45. package/lib/src/embed/app.d.ts +0 -1
  46. package/lib/src/embed/app.d.ts.map +1 -1
  47. package/lib/src/embed/app.js +1 -1
  48. package/lib/src/embed/app.js.map +1 -1
  49. package/lib/src/embed/liveboard.d.ts +0 -1
  50. package/lib/src/embed/liveboard.d.ts.map +1 -1
  51. package/lib/src/embed/liveboard.js +1 -1
  52. package/lib/src/embed/liveboard.js.map +1 -1
  53. package/lib/src/embed/sage.d.ts +0 -1
  54. package/lib/src/embed/sage.d.ts.map +1 -1
  55. package/lib/src/embed/sage.js +1 -1
  56. package/lib/src/embed/sage.js.map +1 -1
  57. package/lib/src/embed/search.d.ts +0 -1
  58. package/lib/src/embed/search.d.ts.map +1 -1
  59. package/lib/src/embed/search.js +2 -3
  60. package/lib/src/embed/search.js.map +1 -1
  61. package/lib/src/embed/ts-embed.d.ts +0 -1
  62. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  63. package/lib/src/embed/ts-embed.js +1 -3
  64. package/lib/src/embed/ts-embed.js.map +1 -1
  65. package/lib/src/types.d.ts +6 -0
  66. package/lib/src/types.d.ts.map +1 -1
  67. package/lib/src/types.js.map +1 -1
  68. package/lib/src/visual-embed-sdk.d.ts +6 -5
  69. package/package.json +1 -1
  70. package/src/embed/app.ts +1 -2
  71. package/src/embed/liveboard.ts +1 -2
  72. package/src/embed/sage.ts +1 -2
  73. package/src/embed/search.ts +2 -4
  74. package/src/embed/ts-embed.ts +6 -9
  75. package/src/types.ts +16 -10
  76. package/cjs/src/embed/TsEmbed.d.ts +0 -302
  77. package/cjs/src/embed/TsEmbed.d.ts.map +0 -1
  78. package/cjs/src/embed/TsEmbed.js +0 -851
  79. package/cjs/src/embed/TsEmbed.js.map +0 -1
  80. package/cjs/src/utils/answerService.d.ts +0 -10
  81. package/cjs/src/utils/answerService.d.ts.map +0 -1
  82. package/cjs/src/utils/answerService.js +0 -61
  83. package/cjs/src/utils/answerService.js.map +0 -1
  84. package/cjs/src/utils/answerService.spec.d.ts +0 -2
  85. package/cjs/src/utils/answerService.spec.d.ts.map +0 -1
  86. package/cjs/src/utils/answerService.spec.js +0 -31
  87. package/cjs/src/utils/answerService.spec.js.map +0 -1
  88. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  89. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  90. package/cjs/src/utils/authService/tokenisedAuthSerice.js +0 -44
  91. package/cjs/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  92. package/cjs/src/utils/authService.d.ts +0 -55
  93. package/cjs/src/utils/authService.d.ts.map +0 -1
  94. package/cjs/src/utils/authService.js +0 -139
  95. package/cjs/src/utils/authService.js.map +0 -1
  96. package/cjs/src/utils/authService.spec.d.ts +0 -2
  97. package/cjs/src/utils/authService.spec.d.ts.map +0 -1
  98. package/cjs/src/utils/authService.spec.js +0 -82
  99. package/cjs/src/utils/authService.spec.js.map +0 -1
  100. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  101. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  102. package/cjs/src/utils/graphql/graphql-request.spec.js +0 -39
  103. package/cjs/src/utils/graphql/graphql-request.spec.js.map +0 -1
  104. package/cjs/src/utils/logger.d.ts +0 -28
  105. package/cjs/src/utils/logger.d.ts.map +0 -1
  106. package/cjs/src/utils/logger.js +0 -82
  107. package/cjs/src/utils/logger.js.map +0 -1
  108. package/dist/src/utils/answerService.d.ts +0 -10
  109. package/dist/src/utils/answerService.d.ts.map +0 -1
  110. package/dist/src/utils/answerService.spec.d.ts +0 -2
  111. package/dist/src/utils/answerService.spec.d.ts.map +0 -1
  112. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  113. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  114. package/dist/src/utils/authService.d.ts +0 -55
  115. package/dist/src/utils/authService.d.ts.map +0 -1
  116. package/dist/src/utils/authService.spec.d.ts +0 -2
  117. package/dist/src/utils/authService.spec.d.ts.map +0 -1
  118. package/dist/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  119. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  120. package/dist/src/utils/logger.d.ts +0 -28
  121. package/dist/src/utils/logger.d.ts.map +0 -1
  122. package/lib/src/embed/TsEmbed.d.ts +0 -302
  123. package/lib/src/embed/TsEmbed.d.ts.map +0 -1
  124. package/lib/src/embed/TsEmbed.js +0 -847
  125. package/lib/src/embed/TsEmbed.js.map +0 -1
  126. package/lib/src/utils/answerService.d.ts +0 -10
  127. package/lib/src/utils/answerService.d.ts.map +0 -1
  128. package/lib/src/utils/answerService.js +0 -57
  129. package/lib/src/utils/answerService.js.map +0 -1
  130. package/lib/src/utils/answerService.spec.d.ts +0 -2
  131. package/lib/src/utils/answerService.spec.d.ts.map +0 -1
  132. package/lib/src/utils/answerService.spec.js +0 -29
  133. package/lib/src/utils/answerService.spec.js.map +0 -1
  134. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  135. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  136. package/lib/src/utils/authService/tokenisedAuthSerice.js +0 -39
  137. package/lib/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  138. package/lib/src/utils/authService.d.ts +0 -55
  139. package/lib/src/utils/authService.d.ts.map +0 -1
  140. package/lib/src/utils/authService.js +0 -129
  141. package/lib/src/utils/authService.js.map +0 -1
  142. package/lib/src/utils/authService.spec.d.ts +0 -2
  143. package/lib/src/utils/authService.spec.d.ts.map +0 -1
  144. package/lib/src/utils/authService.spec.js +0 -80
  145. package/lib/src/utils/authService.spec.js.map +0 -1
  146. package/lib/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  147. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  148. package/lib/src/utils/graphql/graphql-request.spec.js +0 -36
  149. package/lib/src/utils/graphql/graphql-request.spec.js.map +0 -1
  150. package/lib/src/utils/logger.d.ts +0 -28
  151. package/lib/src/utils/logger.d.ts.map +0 -1
  152. package/lib/src/utils/logger.js +0 -75
  153. package/lib/src/utils/logger.js.map +0 -1
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogLevel = exports.setGlobalLogLevelOverride = exports.Logger = exports.getLogger = void 0;
4
- const tslib_1 = require("tslib");
5
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
- var LogLevel;
7
- (function (LogLevel) {
8
- LogLevel[LogLevel["SILENT"] = -1] = "SILENT";
9
- LogLevel[LogLevel["ERROR"] = 0] = "ERROR";
10
- LogLevel[LogLevel["WARN"] = 1] = "WARN";
11
- LogLevel[LogLevel["INFO"] = 2] = "INFO";
12
- LogLevel[LogLevel["DEBUG"] = 3] = "DEBUG";
13
- LogLevel[LogLevel["TRACE"] = 4] = "TRACE";
14
- })(LogLevel || (LogLevel = {}));
15
- exports.LogLevel = LogLevel;
16
- const logFunctions = {
17
- [LogLevel.ERROR]: console.error,
18
- [LogLevel.WARN]: console.warn,
19
- [LogLevel.INFO]: console.info,
20
- [LogLevel.DEBUG]: console.debug,
21
- [LogLevel.TRACE]: console.trace,
22
- };
23
- const loggerNameMap = {};
24
- let globalLogLevelOverride;
25
- const setGlobalLogLevelOverride = (logLevel) => {
26
- globalLogLevelOverride = logLevel;
27
- };
28
- exports.setGlobalLogLevelOverride = setGlobalLogLevelOverride;
29
- const getLogger = (name = 'Global') => {
30
- if (!loggerNameMap[name]) {
31
- loggerNameMap[name] = new Logger(name);
32
- }
33
- return loggerNameMap[name];
34
- };
35
- exports.getLogger = getLogger;
36
- class Logger {
37
- constructor(name) {
38
- this.logLevel = LogLevel.ERROR;
39
- this.setLogLevel = (newLogLevel) => {
40
- this.logLevel = newLogLevel;
41
- };
42
- this.getName = () => this.name;
43
- this.getLogLevel = () => this.logLevel;
44
- this.name = name;
45
- }
46
- canLog(logLevel) {
47
- if (logLevel === LogLevel.SILENT)
48
- return false;
49
- if (!lodash_1.default.isUndefined(globalLogLevelOverride)) {
50
- return globalLogLevelOverride >= logLevel;
51
- }
52
- return this.logLevel >= logLevel;
53
- }
54
- async logMessages(args, logLevel) {
55
- if (this.canLog(logLevel)) {
56
- const logFn = logFunctions[logLevel];
57
- if (logFn) {
58
- logFn(...args);
59
- }
60
- }
61
- }
62
- log(...args) {
63
- this.info(args);
64
- }
65
- info(...args) {
66
- this.logMessages(args, LogLevel.INFO);
67
- }
68
- debug(...args) {
69
- this.logMessages(args, LogLevel.DEBUG);
70
- }
71
- trace(...args) {
72
- this.logMessages(args, LogLevel.TRACE);
73
- }
74
- error(...args) {
75
- this.logMessages(args, LogLevel.ERROR);
76
- }
77
- warn(...args) {
78
- this.logMessages(args, LogLevel.WARN);
79
- }
80
- }
81
- exports.Logger = Logger;
82
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":";;;;AAAA,4DAAuB;AAEvB,IAAK,QAOJ;AAPD,WAAK,QAAQ;IACX,8BAAS,CAAC,CAAW,YAAA,CAAA;IACrB,6BAAQ,CAAW,WAAA,CAAA;IACnB,4BAAO,CAAW,UAAA,CAAA;IAClB,4BAAO,CAAW,UAAA,CAAA;IAClB,6BAAQ,CAAW,WAAA,CAAA;IACnB,6BAAQ,CAAW,WAAA,CAAA;AACrB,CAAC,EAPI,QAAQ,KAAR,QAAQ,QAOZ;AAyFG,4BAAQ;AAvFZ,MAAM,YAAY,GAEd;IACA,CAAC,QAAQ,CA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AC,gBAAC,CAAC,WAAW,CAAC,sBAAsB,CAAC,EAAE;YACxC,OAAO,sBAAsB,IAAI,QAAQ,CAAC;SAC7C;QACD,OAAO,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,IAAW,EAAE,QAAkB;QACpD,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACvB,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,KAAK,EAAE;gBACP,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;aAClB;SACJ;IACL,CAAC;IAEM,GAAG,CAAC,GAAG,IAAW;QACrB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAEM,IAAI,CAAC,GAAG,IAAW;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,GAAG,IAAW;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,GAAG,IAAW;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,GAAG,IAAW;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAEM,IAAI,CAAC,GAAG,IAAW;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;CACF;AAIG,wBAAM"}
@@ -1,10 +0,0 @@
1
- import { SessionInterface } from '../types';
2
- /**
3
- *
4
- * @param session
5
- * @param query
6
- * @param operation
7
- * @param thoughtSpotHost
8
- */
9
- export declare function getAnswerServiceInstance(session: SessionInterface, query: string, operation: string, thoughtSpotHost: string): any;
10
- //# sourceMappingURL=answerService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"answerService.d.ts","sourceRoot":"","sources":["answerService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,UAAU,CAAC;AAE3D;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACpC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,GACxB,GAAG,CAgDL"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=answerService.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"answerService.spec.d.ts","sourceRoot":"","sources":["answerService.spec.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- /**
2
- *
3
- * @param authVerificationUrl
4
- */
5
- export declare function fetchSessionInfoService(authVerificationUrl: string): Promise<any>;
6
- /**
7
- *
8
- * @param thoughtSpotHost
9
- */
10
- export declare function fetchLogoutService(thoughtSpotHost: string): Promise<any>;
11
- //# sourceMappingURL=tokenisedAuthSerice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenisedAuthSerice.d.ts","sourceRoot":"","sources":["tokenisedAuthSerice.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAIjF;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAQ9E"}
@@ -1,55 +0,0 @@
1
- export declare const EndPoints: {
2
- AUTH_VERIFICATION: string;
3
- SAML_LOGIN_TEMPLATE: (targetUrl: string) => string;
4
- OIDC_LOGIN_TEMPLATE: (targetUrl: string) => string;
5
- TOKEN_LOGIN: string;
6
- BASIC_LOGIN: string;
7
- LOGOUT: string;
8
- EXECUTE_TML: string;
9
- EXPORT_TML: string;
10
- IS_ACTIVE: string;
11
- };
12
- /**
13
- *
14
- * @param authVerificationUrl
15
- */
16
- export declare function fetchSessionInfoService(authVerificationUrl: string): Promise<any>;
17
- /**
18
- * Service to validate a auth token against a ThoughtSpot host.
19
- *
20
- * @param thoughtSpotHost : ThoughtSpot host to verify the token against.
21
- * @param authToken : Auth token to verify.
22
- */
23
- export declare function verifyTokenService(thoughtSpotHost: string, authToken: string): Promise<boolean>;
24
- /**
25
- *
26
- * @param authEndpoint
27
- */
28
- export declare function fetchAuthTokenService(authEndpoint: string): Promise<any>;
29
- /**
30
- *
31
- * @param thoughtSpotHost
32
- * @param username
33
- * @param authToken
34
- */
35
- export declare function fetchAuthService(thoughtSpotHost: string, username: string, authToken: string): Promise<any>;
36
- /**
37
- *
38
- * @param thoughtSpotHost
39
- * @param username
40
- * @param authToken
41
- */
42
- export declare function fetchAuthPostService(thoughtSpotHost: string, username: string, authToken: string): Promise<any>;
43
- /**
44
- *
45
- * @param thoughtSpotHost
46
- * @param username
47
- * @param password
48
- */
49
- export declare function fetchBasicAuthService(thoughtSpotHost: string, username: string, password: string): Promise<any>;
50
- /**
51
- *
52
- * @param thoughtSpotHost
53
- */
54
- export declare function fetchLogoutService(thoughtSpotHost: string): Promise<any>;
55
- //# sourceMappingURL=authService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authService.d.ts","sourceRoot":"","sources":["authService.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;qCAEe,MAAM;qCACN,MAAM;;;;;;;CAO1C,CAAC;AAgBF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAIjF;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACpC,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAE9E;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAClC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,GAAG,CAAC,CAUd;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACtC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,GAAG,CAAC,CAed;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACvC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACjB,OAAO,CAAC,GAAG,CAAC,CAUd;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAQ9E"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=authService.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authService.spec.d.ts","sourceRoot":"","sources":["authService.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import 'jest-fetch-mock';
2
- //# sourceMappingURL=graphql-request.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql-request.spec.d.ts","sourceRoot":"","sources":["graphql-request.spec.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC"}
@@ -1,28 +0,0 @@
1
- declare enum LogLevel {
2
- SILENT,
3
- ERROR,
4
- WARN,
5
- INFO,
6
- DEBUG,
7
- TRACE
8
- }
9
- declare const setGlobalLogLevelOverride: (logLevel: LogLevel) => void;
10
- declare const getLogger: (name?: string) => Logger;
11
- declare class Logger {
12
- private name;
13
- private logLevel;
14
- setLogLevel: (newLogLevel: LogLevel) => void;
15
- getName: () => string;
16
- getLogLevel: () => LogLevel;
17
- constructor(name: string);
18
- canLog(logLevel: LogLevel): boolean;
19
- logMessages(args: any[], logLevel: LogLevel): Promise<void>;
20
- log(...args: any[]): void;
21
- info(...args: any[]): void;
22
- debug(...args: any[]): void;
23
- trace(...args: any[]): void;
24
- error(...args: any[]): void;
25
- warn(...args: any[]): void;
26
- }
27
- export { getLogger, Logger, setGlobalLogLevelOverride, LogLevel, };
28
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["logger.ts"],"names":[],"mappings":"AAEA,aAAK,QAAQ;IACX,MAAqB;IACrB,KAAmB;IACnB,IAAkB;IAClB,IAAkB;IAClB,KAAmB;IACnB,KAAmB;CACpB;AAeD,QAAA,MAAM,yBAAyB,aAAc,QAAQ,KAAG,IAEvD,CAAC;AAEF,QAAA,MAAM,SAAS,qBAAsB,MAKpC,CAAC;AAEF,cAAM,MAAM;IACV,OAAO,CAAC,IAAI,CAAU;IAEtB,OAAO,CAAC,QAAQ,CAA4B;IAErC,WAAW,gBAAiB,QAAQ,UAE1C;IAEM,OAAO,QAAO,MAAM,CAAc;IAElC,WAAW,QAAO,QAAQ,CAAkB;gBAEvC,IAAI,EAAE,MAAM;IAIjB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAQ7B,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIzB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI1B,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3B,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3B,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3B,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;CAGlC;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,yBAAyB,EACzB,QAAQ,GACX,CAAC"}
@@ -1,302 +0,0 @@
1
- import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig } from '../types';
2
- /**
3
- * Base class for embedding v2 experience
4
- * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
5
- * React+GraphQL
6
- */
7
- export declare class TsEmbed {
8
- /**
9
- * The DOM node which was inserted by the SDK to either
10
- * render the iframe or display an error message.
11
- * This is useful for removing the DOM node when the
12
- * embed instance is destroyed.
13
- */
14
- private insertedDomEl;
15
- /**
16
- * The DOM node where the ThoughtSpot app is to be embedded.
17
- */
18
- private el;
19
- protected isAppInitialized: boolean;
20
- /**
21
- * A reference to the iframe within which the ThoughtSpot app
22
- * will be rendered.
23
- */
24
- protected iFrame: HTMLIFrameElement;
25
- protected viewConfig: ViewConfig;
26
- protected embedConfig: EmbedConfig;
27
- /**
28
- * The ThoughtSpot hostname or IP address
29
- */
30
- protected thoughtSpotHost: string;
31
- protected thoughtSpotV2Base: string;
32
- protected embedComponentType: string;
33
- /**
34
- * A map of event handlers for particular message types triggered
35
- * by the embedded app; multiple event handlers can be registered
36
- * against a particular message type.
37
- */
38
- private eventHandlerMap;
39
- /**
40
- * A flag that is set to true post render.
41
- */
42
- private isRendered;
43
- /**
44
- * A flag to mark if an error has occurred.
45
- */
46
- private isError;
47
- /**
48
- * Should we encode URL Query Params using base64 encoding which thoughtspot
49
- * will generate for embedding. This provides additional security to
50
- * thoughtspot clusters against Cross site scripting attacks.
51
- *
52
- * @default false
53
- */
54
- private shouldEncodeUrlQueryParams;
55
- private defaultHiddenActions;
56
- constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
57
- /**
58
- * Throws error encountered during initialization.
59
- */
60
- private throwInitError;
61
- /**
62
- * Handles errors within the SDK
63
- *
64
- * @param error The error message or object
65
- */
66
- protected handleError(error: string | Record<string, unknown>): void;
67
- /**
68
- * Extracts the type field from the event payload
69
- *
70
- * @param event The window message event
71
- */
72
- private getEventType;
73
- /**
74
- * Extracts the port field from the event payload
75
- *
76
- * @param event The window message event
77
- * @returns
78
- */
79
- private getEventPort;
80
- /**
81
- * fix for ts7.sep.cl
82
- * will be removed for ts7.oct.cl
83
- *
84
- * @param event
85
- * @param eventType
86
- * @hidden
87
- */
88
- private formatEventData;
89
- private subscribedListeners;
90
- /**
91
- * Adds a global event listener to window for "message" events.
92
- * ThoughtSpot detects if a particular event is targeted to this
93
- * embed instance through an identifier contained in the payload,
94
- * and executes the registered callbacks accordingly.
95
- */
96
- private subscribeToEvents;
97
- private unsubscribeToEvents;
98
- /**
99
- * Send Custom style as part of payload of APP_INIT
100
- *
101
- * @param _
102
- * @param responder
103
- */
104
- private appInitCb;
105
- /**
106
- * Sends updated auth token to the iFrame to avoid user logout
107
- *
108
- * @param _
109
- * @param responder
110
- */
111
- private updateAuthToken;
112
- /**
113
- * Register APP_INIT event and sendback init payload
114
- */
115
- private registerAppInit;
116
- /**
117
- * Constructs the base URL string to load the ThoughtSpot app.
118
- *
119
- * @param query
120
- */
121
- protected getEmbedBasePath(query: string): string;
122
- /**
123
- * Common query params set for all the embed modes.
124
- *
125
- * @param queryParams
126
- * @returns queryParams
127
- */
128
- protected getBaseQueryParams(queryParams?: {}): {};
129
- /**
130
- * Constructs the base URL string to load v1 of the ThoughtSpot app.
131
- * This is used for embedding Liveboards, visualizations, and full application.
132
- *
133
- * @param queryString The query string to append to the URL.
134
- * @param isAppEmbed A Boolean parameter to specify if you are embedding
135
- * the full application.
136
- */
137
- protected getV1EmbedBasePath(queryString: string): string;
138
- protected getEmbedParams(): string;
139
- protected getRootIframeSrc(): string;
140
- protected createIframeEl(frameSrc: string): HTMLIFrameElement;
141
- protected handleInsertionIntoDOM(child: string | Node, showPreRenderByDefault?: boolean): void;
142
- /**
143
- * Renders the embedded ThoughtSpot app in an iframe and sets up
144
- * event listeners.
145
- *
146
- * @param url - The URL of the embedded ThoughtSpot app.
147
- * @param showPreRenderByDefault - The flag to show the preRender by default.
148
- */
149
- protected renderIFrame(url: string, showPreRenderByDefault?: boolean): Promise<any>;
150
- getPreRenderIds(): {
151
- wrapper: string;
152
- shield: string;
153
- child: string;
154
- };
155
- protected createPreRenderWrapper(child: HTMLElement): HTMLDivElement;
156
- protected preRenderWrapper: HTMLElement;
157
- protected preRenderChild: HTMLElement;
158
- protected connectPreRendered(): boolean;
159
- protected isPreRenderAvailable(): boolean;
160
- protected insertIntoDOMForPreRender(child: string | HTMLElement, showPreRenderByDefault?: boolean): void;
161
- hidePreRender(): void;
162
- showPreRender(): void;
163
- syncPreRenderStyle(): void;
164
- protected insertIntoDOM(child: string | Node): void;
165
- /**
166
- * Sets the height of the iframe
167
- *
168
- * @param height The height in pixels
169
- */
170
- protected setIFrameHeight(height: number | string): void;
171
- /**
172
- * Executes all registered event handlers for a particular event type
173
- *
174
- * @param eventType The event type
175
- * @param data The payload invoked with the event handler
176
- * @param eventPort The event Port for a specific MessageChannel
177
- */
178
- protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
179
- /**
180
- * Returns the ThoughtSpot hostname or IP address.
181
- */
182
- protected getThoughtSpotHost(): string;
183
- /**
184
- * Gets the v1 event type (if applicable) for the EmbedEvent type
185
- *
186
- * @param eventType The v2 event type
187
- * @returns The corresponding v1 event type if one exists
188
- * or else the v2 event type itself
189
- */
190
- protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
191
- /**
192
- * Calculates the iframe center for the current visible viewPort
193
- * of iframe using Scroll position of Host App, offsetTop for iframe
194
- * in Host app. ViewPort height of the tab.
195
- *
196
- * @returns iframe Center in visible viewport,
197
- * Iframe height,
198
- * View port height.
199
- */
200
- protected getIframeCenter(): {
201
- iframeCenter: number;
202
- iframeScrolled: number;
203
- iframeHeight: number;
204
- viewPortHeight: number;
205
- iframeVisibleViewPort: number;
206
- };
207
- /**
208
- * Registers an event listener to trigger an alert when the ThoughtSpot app
209
- * sends an event of a particular message type to the host application.
210
- *
211
- * @param messageType The message type
212
- * @param callback A callback as a function
213
- * @param options The message options
214
- * @param isSelf
215
- * @param isRegisteredBySDK
216
- * @example
217
- * ```js
218
- * tsEmbed.on(EmbedEvent.Error, (data) => {
219
- * console.error(data);
220
- * });
221
- * ```
222
- * @example
223
- * ```js
224
- * tsEmbed.on(EmbedEvent.Save, (data) => {
225
- * console.log("Answer save clicked", data);
226
- * }, {
227
- * start: true // This will trigger the callback on start of save
228
- * });
229
- * ```
230
- */
231
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
232
- /**
233
- * Removes an event listener for a particular event type.
234
- *
235
- * @param messageType The message type
236
- * @param callback The callback to remove
237
- * @example
238
- * ```js
239
- * const errorHandler = (data) => { console.error(data); };
240
- * tsEmbed.on(EmbedEvent.Error, errorHandler);
241
- * tsEmbed.off(EmbedEvent.Error, errorHandler);
242
- * ```
243
- */
244
- off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
245
- /**
246
- * Triggers an event on specific Port registered against
247
- * for the EmbedEvent
248
- *
249
- * @param eventType The message type
250
- * @param data The payload to send
251
- * @param eventPort
252
- * @param payload
253
- */
254
- private triggerEventOnPort;
255
- /**
256
- * Triggers an event to the embedded app
257
- *
258
- * @param messageType The event type
259
- * @param data The payload to send with the message
260
- */
261
- trigger(messageType: HostEvent, data?: any): Promise<any>;
262
- /**
263
- * Marks the ThoughtSpot object to have been rendered
264
- * Needs to be overridden by subclasses to do the actual
265
- * rendering of the iframe.
266
- *
267
- * @param args
268
- */
269
- render(): TsEmbed;
270
- private isPreRendered;
271
- /**
272
- * Creates the preRender shell
273
- *
274
- * @param showPreRenderByDefault
275
- */
276
- preRender(showPreRenderByDefault?: boolean): TsEmbed;
277
- /**
278
- * Get the Post Url Params for THOUGHTSPOT from the current
279
- * host app URL.
280
- * THOUGHTSPOT URL params starts with a prefix "ts-"
281
- *
282
- * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
283
- */
284
- getThoughtSpotPostUrlParams(): string;
285
- /**
286
- * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
287
- *
288
- * @version SDK: 1.19.1 | ThoughtSpot: *
289
- */
290
- destroy(): void;
291
- getUnderlyingFrameElement(): HTMLIFrameElement;
292
- /**
293
- * Prerenders a generic instance of the TS component.
294
- * This means without the path but with the flags already applied.
295
- * This is useful for prerendering the component in the background.
296
- *
297
- * @version SDK: 1.22.0
298
- * @returns
299
- */
300
- prerenderGeneric(): Promise<any>;
301
- }
302
- //# sourceMappingURL=TsEmbed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TsEmbed.d.ts","sourceRoot":"","sources":["../../../src/embed/TsEmbed.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,WAAW,EACX,SAAS,EACT,UAAU,EACV,eAAe,EAGf,WAAW,EACX,cAAc,EACd,UAAU,EACX,MAAM,UAAU,CAAC;AAclB;;;;GAIG;AAEH,qBAAa,OAAO;IAClB;;;;;OAKG;IACH,OAAO,CAAC,aAAa,CAAO;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAU;IAEpB,SAAS,CAAC,gBAAgB,UAAS;IAEnC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAEjC,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IAEnC;;OAEG;IACH,SAAS,CAAC,eAAe,EAAE,MAAM,CAAC;IAKlC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAEpC,SAAS,CAAC,kBAAkB,SAAa;IAEzC;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAAoC;IAE3D;;OAEG;IACH,OAAO,CAAC,UAA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