@thoughtspot/visual-embed-sdk 1.6.0-alpha.2 → 1.6.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/auth.d.ts +2 -4
- package/dist/src/embed/app.d.ts +9 -2
- package/dist/src/embed/liveboard.d.ts +19 -19
- package/dist/src/embed/liveboard.spec.d.ts +1 -0
- package/dist/src/embed/search.d.ts +4 -0
- package/dist/src/embed/ts-embed.d.ts +2 -11
- package/dist/src/types.d.ts +24 -24
- package/dist/tsembed.es.js +82 -68
- package/dist/tsembed.js +81 -67
- package/lib/package.json +5 -1
- package/lib/src/auth.d.ts +2 -4
- package/lib/src/auth.js +25 -7
- package/lib/src/auth.js.map +1 -1
- package/lib/src/embed/app.d.ts +9 -2
- package/lib/src/embed/app.js +18 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +31 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +55 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +19 -19
- package/lib/src/embed/liveboard.js +12 -13
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.d.ts +1 -0
- package/lib/src/embed/liveboard.spec.js +159 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -0
- package/lib/src/embed/search.d.ts +4 -0
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +2 -11
- package/lib/src/embed/ts-embed.js +4 -23
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +63 -6
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +24 -24
- package/lib/src/types.js +21 -22
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +51 -49
- package/package.json +5 -1
- package/src/auth.ts +35 -7
- package/src/embed/app.spec.ts +40 -0
- package/src/embed/app.ts +21 -2
- package/src/embed/events.spec.ts +60 -1
- package/src/embed/liveboard.spec.ts +199 -0
- package/src/embed/liveboard.ts +21 -24
- package/src/embed/search.ts +5 -0
- package/src/embed/ts-embed.spec.ts +78 -5
- package/src/embed/ts-embed.ts +6 -25
- package/src/types.ts +24 -24
- package/dist/src/embed/pinboard.d.ts +0 -85
- package/lib/src/embed/pinboard.d.ts +0 -85
- package/lib/src/embed/pinboard.js +0 -107
- package/lib/src/embed/pinboard.js.map +0 -1
- package/lib/src/utils/fetchAnswers.d.ts +0 -3
- package/lib/src/utils/fetchAnswers.js +0 -49
- package/lib/src/utils/fetchAnswers.js.map +0 -1
package/dist/tsembed.js
CHANGED
|
@@ -133,6 +133,10 @@
|
|
|
133
133
|
* SSO using SAML
|
|
134
134
|
*/
|
|
135
135
|
AuthType["SSO"] = "SSO_SAML";
|
|
136
|
+
/**
|
|
137
|
+
* SSO using IODC
|
|
138
|
+
*/
|
|
139
|
+
AuthType["IODC"] = "SSO_IODC";
|
|
136
140
|
/**
|
|
137
141
|
* Trusted authentication server
|
|
138
142
|
*/
|
|
@@ -220,12 +224,12 @@
|
|
|
220
224
|
*/
|
|
221
225
|
EmbedEvent["Load"] = "load";
|
|
222
226
|
/**
|
|
223
|
-
* Data pertaining to answer or
|
|
224
|
-
* @return data - The answer or
|
|
227
|
+
* Data pertaining to answer or Liveboard is received
|
|
228
|
+
* @return data - The answer or Liveboard data
|
|
225
229
|
*/
|
|
226
230
|
EmbedEvent["Data"] = "data";
|
|
227
231
|
/**
|
|
228
|
-
* Search/answer/
|
|
232
|
+
* Search/answer/Liveboard filters have been applied/updated
|
|
229
233
|
* @hidden
|
|
230
234
|
*/
|
|
231
235
|
EmbedEvent["FiltersChanged"] = "filtersChanged";
|
|
@@ -248,13 +252,13 @@
|
|
|
248
252
|
/**
|
|
249
253
|
* A custom action has been triggered
|
|
250
254
|
* @return actionId - The id of the custom action
|
|
251
|
-
* @return data - The answer or
|
|
255
|
+
* @return data - The answer or Liveboard data
|
|
252
256
|
*/
|
|
253
257
|
EmbedEvent["CustomAction"] = "customAction";
|
|
254
258
|
/**
|
|
255
259
|
* A double click has been triggered on table/chart
|
|
256
260
|
* @return ContextMenuInputPoints - data point that is double clicked
|
|
257
|
-
*
|
|
261
|
+
* @version 1.5.0 or later
|
|
258
262
|
*/
|
|
259
263
|
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
|
|
260
264
|
/**
|
|
@@ -272,8 +276,8 @@
|
|
|
272
276
|
*/
|
|
273
277
|
EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
|
|
274
278
|
/**
|
|
275
|
-
* The height of the embedded
|
|
276
|
-
* @return data - The height of the embedded
|
|
279
|
+
* The height of the embedded Liveboard or visualization has been computed.
|
|
280
|
+
* @return data - The height of the embedded Liveboard or visualization
|
|
277
281
|
* @hidden
|
|
278
282
|
*/
|
|
279
283
|
EmbedEvent["EmbedHeight"] = "EMBED_HEIGHT";
|
|
@@ -285,7 +289,6 @@
|
|
|
285
289
|
EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
|
|
286
290
|
/**
|
|
287
291
|
* Detects the route change.
|
|
288
|
-
* @hidden
|
|
289
292
|
*/
|
|
290
293
|
EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
|
|
291
294
|
/**
|
|
@@ -297,7 +300,7 @@
|
|
|
297
300
|
* Emitted when the embed does not have cookie access. This
|
|
298
301
|
* happens on Safari where third-party cookies are blocked by default.
|
|
299
302
|
*
|
|
300
|
-
* @version 1.1.0
|
|
303
|
+
* @version 1.1.0 or later
|
|
301
304
|
*/
|
|
302
305
|
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
|
|
303
306
|
/**
|
|
@@ -308,12 +311,12 @@
|
|
|
308
311
|
EmbedEvent["SAMLComplete"] = "samlComplete";
|
|
309
312
|
/**
|
|
310
313
|
* Emitted when any modal is opened in the app
|
|
311
|
-
*
|
|
314
|
+
* @version 1.6.0 or later
|
|
312
315
|
*/
|
|
313
316
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
314
317
|
/**
|
|
315
318
|
* Emitted when any modal is closed in the app
|
|
316
|
-
*
|
|
319
|
+
* @version 1.6.0 or later
|
|
317
320
|
*/
|
|
318
321
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
319
322
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
@@ -330,7 +333,7 @@
|
|
|
330
333
|
* eg. { selectedPoints: []}
|
|
331
334
|
* @param columnGuid - a string guid of the column to drill by. This is optional,
|
|
332
335
|
* if not provided it will auto drill by the configured column. \
|
|
333
|
-
*
|
|
336
|
+
* @version 1.5.0 or later
|
|
334
337
|
*/
|
|
335
338
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
336
339
|
/**
|
|
@@ -344,10 +347,10 @@
|
|
|
344
347
|
*/
|
|
345
348
|
HostEvent["Reload"] = "reload";
|
|
346
349
|
/**
|
|
347
|
-
* Set the visible
|
|
348
|
-
* @param - an array of ids of
|
|
350
|
+
* Set the visible visualizations on a Liveboard.
|
|
351
|
+
* @param - an array of ids of visualizations to show, the ids not passed
|
|
349
352
|
* will be hidden.
|
|
350
|
-
*
|
|
353
|
+
* @version 1.6.0 or later
|
|
351
354
|
*/
|
|
352
355
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
353
356
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
@@ -374,6 +377,7 @@
|
|
|
374
377
|
(function (Param) {
|
|
375
378
|
Param["DataSources"] = "dataSources";
|
|
376
379
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
380
|
+
Param["ExpandAllDataSource"] = "expandAllDataSource";
|
|
377
381
|
Param["DisableActions"] = "disableAction";
|
|
378
382
|
Param["DisableActionReason"] = "disableHint";
|
|
379
383
|
Param["ForceTable"] = "forceTable";
|
|
@@ -405,11 +409,6 @@
|
|
|
405
409
|
Action["MakeACopy"] = "makeACopy";
|
|
406
410
|
Action["EditACopy"] = "editACopy";
|
|
407
411
|
Action["CopyLink"] = "embedDocument";
|
|
408
|
-
/**
|
|
409
|
-
* @hidden
|
|
410
|
-
*/
|
|
411
|
-
Action["PinboardSnapshot"] = "pinboardSnapshot";
|
|
412
|
-
Action["LiveboardSnapshot"] = "liveboardSnapshot";
|
|
413
412
|
Action["ResetLayout"] = "resetLayout";
|
|
414
413
|
Action["Schedule"] = "schedule";
|
|
415
414
|
Action["SchedulesList"] = "schedule-list";
|
|
@@ -446,7 +445,7 @@
|
|
|
446
445
|
* @hidden
|
|
447
446
|
*/
|
|
448
447
|
Action["PinboardInfo"] = "pinboardInfo";
|
|
449
|
-
Action["LiveboardInfo"] = "
|
|
448
|
+
Action["LiveboardInfo"] = "pinboardInfo";
|
|
450
449
|
Action["SendAnswerFeedback"] = "sendFeedback";
|
|
451
450
|
/**
|
|
452
451
|
* @deprecated Will be removed in next version
|
|
@@ -8475,6 +8474,7 @@
|
|
|
8475
8474
|
const EndPoints = {
|
|
8476
8475
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
8477
8476
|
SSO_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
|
|
8477
|
+
IODC_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/oidc/login?targetURLPath=${targetUrl}`,
|
|
8478
8478
|
TOKEN_LOGIN: '/callosum/v1/session/login/token',
|
|
8479
8479
|
BASIC_LOGIN: '/callosum/v1/session/login',
|
|
8480
8480
|
};
|
|
@@ -8582,7 +8582,7 @@
|
|
|
8582
8582
|
* Perform SAML authentication
|
|
8583
8583
|
* @param embedConfig The embed configuration
|
|
8584
8584
|
*/
|
|
8585
|
-
const
|
|
8585
|
+
const doSSOAuth = async (embedConfig, ssoEndPoint) => {
|
|
8586
8586
|
const { thoughtSpotHost } = embedConfig;
|
|
8587
8587
|
const loggedIn = await isLoggedIn(thoughtSpotHost);
|
|
8588
8588
|
if (loggedIn) {
|
|
@@ -8599,6 +8599,15 @@
|
|
|
8599
8599
|
loggedInStatus = false;
|
|
8600
8600
|
return;
|
|
8601
8601
|
}
|
|
8602
|
+
const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
|
|
8603
|
+
if (embedConfig.noRedirect) {
|
|
8604
|
+
await samlPopupFlow(ssoURL);
|
|
8605
|
+
return;
|
|
8606
|
+
}
|
|
8607
|
+
window.location.href = ssoURL;
|
|
8608
|
+
};
|
|
8609
|
+
const doSamlAuth = async (embedConfig) => {
|
|
8610
|
+
const { thoughtSpotHost } = embedConfig;
|
|
8602
8611
|
// redirect for SSO, when the SSO authentication is done, this page will be loaded
|
|
8603
8612
|
// again and the same JS will execute again.
|
|
8604
8613
|
const ssoRedirectUrl = embedConfig.noRedirect
|
|
@@ -8606,12 +8615,18 @@
|
|
|
8606
8615
|
: appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
|
|
8607
8616
|
// bring back the page to the same URL
|
|
8608
8617
|
const ssoEndPoint = `${EndPoints.SSO_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8618
|
+
await doSSOAuth(embedConfig, ssoEndPoint);
|
|
8619
|
+
};
|
|
8620
|
+
const doIODCAuth = async (embedConfig) => {
|
|
8621
|
+
const { thoughtSpotHost } = embedConfig;
|
|
8622
|
+
// redirect for SSO, when the SSO authentication is done, this page will be loaded
|
|
8623
|
+
// again and the same JS will execute again.
|
|
8624
|
+
const ssoRedirectUrl = embedConfig.noRedirect
|
|
8625
|
+
? `${thoughtSpotHost}/v2/#/embed/saml-complete`
|
|
8626
|
+
: appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
|
|
8627
|
+
// bring back the page to the same URL
|
|
8628
|
+
const ssoEndPoint = `${EndPoints.IODC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
|
|
8629
|
+
await doSSOAuth(embedConfig, ssoEndPoint);
|
|
8615
8630
|
};
|
|
8616
8631
|
/**
|
|
8617
8632
|
* Perform authentication on the ThoughtSpot cluster
|
|
@@ -8622,6 +8637,8 @@
|
|
|
8622
8637
|
switch (authType) {
|
|
8623
8638
|
case exports.AuthType.SSO:
|
|
8624
8639
|
return doSamlAuth(embedConfig);
|
|
8640
|
+
case exports.AuthType.IODC:
|
|
8641
|
+
return doIODCAuth(embedConfig);
|
|
8625
8642
|
case exports.AuthType.AuthServer:
|
|
8626
8643
|
return doTokenAuth(embedConfig);
|
|
8627
8644
|
case exports.AuthType.Basic:
|
|
@@ -8817,7 +8834,7 @@
|
|
|
8817
8834
|
}
|
|
8818
8835
|
}
|
|
8819
8836
|
|
|
8820
|
-
var version="1.6.0-
|
|
8837
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.6.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":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",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","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/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","mixpanel-browser":"^2.41.0"};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",classnames:"^2.3.1","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.1.0","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.1.0","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};
|
|
8821
8838
|
|
|
8822
8839
|
/**
|
|
8823
8840
|
* Copyright (c) 2021
|
|
@@ -8827,6 +8844,7 @@
|
|
|
8827
8844
|
* @summary Base classes
|
|
8828
8845
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8829
8846
|
*/
|
|
8847
|
+
const { version: version$1 } = pkgInfo;
|
|
8830
8848
|
/**
|
|
8831
8849
|
* The event id map from v2 event names to v1 event id
|
|
8832
8850
|
* v1 events are the classic embed events implemented in Blink v1
|
|
@@ -8978,12 +8996,12 @@
|
|
|
8978
8996
|
queryParams[Param.HostAppUrl] = encodeURIComponent(hostAppUrl);
|
|
8979
8997
|
queryParams[Param.ViewPortHeight] = window.innerHeight;
|
|
8980
8998
|
queryParams[Param.ViewPortWidth] = window.innerWidth;
|
|
8981
|
-
queryParams[Param.Version] = version;
|
|
8999
|
+
queryParams[Param.Version] = version$1;
|
|
8982
9000
|
if (this.embedConfig.customCssUrl) {
|
|
8983
9001
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
8984
9002
|
}
|
|
8985
9003
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
|
|
8986
|
-
if ((visibleActions
|
|
9004
|
+
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
8987
9005
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
8988
9006
|
return queryParams;
|
|
8989
9007
|
}
|
|
@@ -9003,7 +9021,7 @@
|
|
|
9003
9021
|
}
|
|
9004
9022
|
/**
|
|
9005
9023
|
* Constructs the base URL string to load v1 of the ThoughtSpot app.
|
|
9006
|
-
* This is used for embedding
|
|
9024
|
+
* This is used for embedding Liveboards, visualizations, and full application.
|
|
9007
9025
|
* @param queryString The query string to append to the URL.
|
|
9008
9026
|
* @param isAppEmbed A Boolean parameter to specify if you are embedding
|
|
9009
9027
|
* the full application.
|
|
@@ -9181,26 +9199,6 @@
|
|
|
9181
9199
|
this.eventHandlerMap.set(messageType, callbacks);
|
|
9182
9200
|
return this;
|
|
9183
9201
|
}
|
|
9184
|
-
/**
|
|
9185
|
-
* Navigates users to the specified application page.
|
|
9186
|
-
* Use this method to navigate users from the embedded
|
|
9187
|
-
* ThoughtSpot context to a specific page in your app.
|
|
9188
|
-
* @param path The page path string.
|
|
9189
|
-
* For example, to navigate users to a liveboard page,
|
|
9190
|
-
* define the method as navigateToPage('liveboard/<liveboardId>').
|
|
9191
|
-
*/
|
|
9192
|
-
navigateToPage(path) {
|
|
9193
|
-
var _a;
|
|
9194
|
-
const iframeSrc = (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.src;
|
|
9195
|
-
if (iframeSrc) {
|
|
9196
|
-
const embedPath = '#/embed';
|
|
9197
|
-
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
9198
|
-
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
9199
|
-
}
|
|
9200
|
-
else {
|
|
9201
|
-
console.log('Please call render before invoking this method');
|
|
9202
|
-
}
|
|
9203
|
-
}
|
|
9204
9202
|
/**
|
|
9205
9203
|
* Triggers an event on specific Port registered against
|
|
9206
9204
|
* for the EmbedEvent
|
|
@@ -9316,7 +9314,7 @@
|
|
|
9316
9314
|
}
|
|
9317
9315
|
/**
|
|
9318
9316
|
* Constructs a map of parameters to be passed on to the
|
|
9319
|
-
* embedded
|
|
9317
|
+
* embedded Liveboard or visualization.
|
|
9320
9318
|
*/
|
|
9321
9319
|
getEmbedParams() {
|
|
9322
9320
|
const params = this.getBaseQueryParams();
|
|
@@ -9379,6 +9377,23 @@
|
|
|
9379
9377
|
}
|
|
9380
9378
|
return path;
|
|
9381
9379
|
}
|
|
9380
|
+
/**
|
|
9381
|
+
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
9382
|
+
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
9383
|
+
* @param path The string, set to iframe src and navigate to new page
|
|
9384
|
+
* eg: appEmbed.navigateToPage('pinboards')
|
|
9385
|
+
*/
|
|
9386
|
+
navigateToPage(path) {
|
|
9387
|
+
if (this.iFrame) {
|
|
9388
|
+
const iframeSrc = this.iFrame.src;
|
|
9389
|
+
const embedPath = '#/embed';
|
|
9390
|
+
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
9391
|
+
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
9392
|
+
}
|
|
9393
|
+
else {
|
|
9394
|
+
console.log('Please call render before invoking this method');
|
|
9395
|
+
}
|
|
9396
|
+
}
|
|
9382
9397
|
/**
|
|
9383
9398
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
9384
9399
|
* @param renderOptions An object containing the page ID
|
|
@@ -9397,7 +9412,7 @@
|
|
|
9397
9412
|
/**
|
|
9398
9413
|
* Copyright (c) 2021
|
|
9399
9414
|
*
|
|
9400
|
-
* Embed a ThoughtSpot
|
|
9415
|
+
* Embed a ThoughtSpot Liveboard or visualization
|
|
9401
9416
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
9402
9417
|
* https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
|
|
9403
9418
|
*
|
|
@@ -9405,7 +9420,7 @@
|
|
|
9405
9420
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
9406
9421
|
*/
|
|
9407
9422
|
/**
|
|
9408
|
-
* Embed a ThoughtSpot
|
|
9423
|
+
* Embed a ThoughtSpot Liveboard or visualization
|
|
9409
9424
|
* @Category Liveboards and Charts
|
|
9410
9425
|
*/
|
|
9411
9426
|
class LiveboardEmbed extends V1Embed {
|
|
@@ -9425,16 +9440,15 @@
|
|
|
9425
9440
|
const obj = this.getIframeCenter();
|
|
9426
9441
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
9427
9442
|
};
|
|
9428
|
-
this.
|
|
9429
|
-
if (data.data.
|
|
9430
|
-
data.data.canvasState !== 'pinboard') {
|
|
9443
|
+
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
9444
|
+
if (!data.data.currentPath.startsWith('/embed/viz/')) {
|
|
9431
9445
|
this.setIFrameHeight(this.defaultHeight);
|
|
9432
9446
|
}
|
|
9433
9447
|
};
|
|
9434
9448
|
}
|
|
9435
9449
|
/**
|
|
9436
9450
|
* Construct a map of params to be passed on to the
|
|
9437
|
-
* embedded
|
|
9451
|
+
* embedded Liveboard or visualization.
|
|
9438
9452
|
*/
|
|
9439
9453
|
getEmbedParams() {
|
|
9440
9454
|
const params = this.getBaseQueryParams();
|
|
@@ -9458,12 +9472,12 @@
|
|
|
9458
9472
|
return queryParams;
|
|
9459
9473
|
}
|
|
9460
9474
|
/**
|
|
9461
|
-
* Construct the URL of the embedded ThoughtSpot
|
|
9475
|
+
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
9462
9476
|
* to be loaded within the iframe.
|
|
9463
|
-
* @param liveboardId The GUID of the
|
|
9464
|
-
* @param vizId The optional GUID of a visualization within the
|
|
9477
|
+
* @param liveboardId The GUID of the Liveboard.
|
|
9478
|
+
* @param vizId The optional GUID of a visualization within the Liveboard.
|
|
9465
9479
|
* @param runtimeFilters A list of runtime filters to be applied to
|
|
9466
|
-
* the
|
|
9480
|
+
* the Liveboard or visualization on load.
|
|
9467
9481
|
*/
|
|
9468
9482
|
getIFrameSrc(liveboardId, vizId, runtimeFilters) {
|
|
9469
9483
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
@@ -9478,8 +9492,8 @@
|
|
|
9478
9492
|
return url;
|
|
9479
9493
|
}
|
|
9480
9494
|
/**
|
|
9481
|
-
* Render an embedded ThoughtSpot
|
|
9482
|
-
* @param renderOptions An object specifying the
|
|
9495
|
+
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
9496
|
+
* @param renderOptions An object specifying the Liveboard ID,
|
|
9483
9497
|
* visualization ID and the runtime filters.
|
|
9484
9498
|
*/
|
|
9485
9499
|
render() {
|
|
@@ -9490,7 +9504,7 @@
|
|
|
9490
9504
|
this.handleError(ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION);
|
|
9491
9505
|
}
|
|
9492
9506
|
if (this.viewConfig.fullHeight === true) {
|
|
9493
|
-
this.on(exports.EmbedEvent.RouteChange, this.
|
|
9507
|
+
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
9494
9508
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
9495
9509
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
9496
9510
|
}
|
|
@@ -9545,7 +9559,7 @@
|
|
|
9545
9559
|
* @param dataSources A list of data source GUIDs
|
|
9546
9560
|
*/
|
|
9547
9561
|
getIFrameSrc(answerId, dataSources) {
|
|
9548
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
|
|
9562
|
+
const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
|
|
9549
9563
|
const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
|
|
9550
9564
|
const queryParams = this.getBaseQueryParams();
|
|
9551
9565
|
if (dataSources && dataSources.length) {
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"asciidoctor": "^2.2.1",
|
|
66
66
|
"babel-jest": "^26.6.3",
|
|
67
67
|
"babel-preset-gatsby": "^1.10.0",
|
|
68
|
+
"classnames": "^2.3.1",
|
|
68
69
|
"command-line-args": "^5.1.1",
|
|
69
70
|
"coveralls": "^3.1.0",
|
|
70
71
|
"dts-bundle": "0.7.3",
|
|
@@ -126,6 +127,9 @@
|
|
|
126
127
|
"type": "git",
|
|
127
128
|
"url": "git+https://github.com/thoughtspot/visual-embed-sdk.git"
|
|
128
129
|
},
|
|
130
|
+
"publishConfig": {
|
|
131
|
+
"registry": "https://registry.npmjs.org"
|
|
132
|
+
},
|
|
129
133
|
"keywords": [
|
|
130
134
|
"thoughtspot",
|
|
131
135
|
"everywhere",
|
package/lib/src/auth.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-2422
|
|
|
7
7
|
export declare const EndPoints: {
|
|
8
8
|
AUTH_VERIFICATION: string;
|
|
9
9
|
SSO_LOGIN_TEMPLATE: (targetUrl: string) => string;
|
|
10
|
+
IODC_LOGIN_TEMPLATE: (targetUrl: string) => string;
|
|
10
11
|
TOKEN_LOGIN: string;
|
|
11
12
|
BASIC_LOGIN: string;
|
|
12
13
|
};
|
|
@@ -29,11 +30,8 @@ export declare const doTokenAuth: (embedConfig: EmbedConfig) => Promise<void>;
|
|
|
29
30
|
* @param embedConfig The embed configuration
|
|
30
31
|
*/
|
|
31
32
|
export declare const doBasicAuth: (embedConfig: EmbedConfig) => Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Perform SAML authentication
|
|
34
|
-
* @param embedConfig The embed configuration
|
|
35
|
-
*/
|
|
36
33
|
export declare const doSamlAuth: (embedConfig: EmbedConfig) => Promise<void>;
|
|
34
|
+
export declare const doIODCAuth: (embedConfig: EmbedConfig) => Promise<void>;
|
|
37
35
|
/**
|
|
38
36
|
* Perform authentication on the ThoughtSpot cluster
|
|
39
37
|
* @param embedConfig The embed configuration
|
package/lib/src/auth.js
CHANGED
|
@@ -15,6 +15,7 @@ export const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b
|
|
|
15
15
|
export const EndPoints = {
|
|
16
16
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
17
17
|
SSO_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
|
|
18
|
+
IODC_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/oidc/login?targetURLPath=${targetUrl}`,
|
|
18
19
|
TOKEN_LOGIN: '/callosum/v1/session/login/token',
|
|
19
20
|
BASIC_LOGIN: '/callosum/v1/session/login',
|
|
20
21
|
};
|
|
@@ -128,7 +129,7 @@ async function samlPopupFlow(ssoURL) {
|
|
|
128
129
|
* Perform SAML authentication
|
|
129
130
|
* @param embedConfig The embed configuration
|
|
130
131
|
*/
|
|
131
|
-
|
|
132
|
+
const doSSOAuth = async (embedConfig, ssoEndPoint) => {
|
|
132
133
|
const { thoughtSpotHost } = embedConfig;
|
|
133
134
|
const loggedIn = await isLoggedIn(thoughtSpotHost);
|
|
134
135
|
if (loggedIn) {
|
|
@@ -145,6 +146,15 @@ export const doSamlAuth = async (embedConfig) => {
|
|
|
145
146
|
loggedInStatus = false;
|
|
146
147
|
return;
|
|
147
148
|
}
|
|
149
|
+
const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
|
|
150
|
+
if (embedConfig.noRedirect) {
|
|
151
|
+
await samlPopupFlow(ssoURL);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
window.location.href = ssoURL;
|
|
155
|
+
};
|
|
156
|
+
export const doSamlAuth = async (embedConfig) => {
|
|
157
|
+
const { thoughtSpotHost } = embedConfig;
|
|
148
158
|
// redirect for SSO, when the SSO authentication is done, this page will be loaded
|
|
149
159
|
// again and the same JS will execute again.
|
|
150
160
|
const ssoRedirectUrl = embedConfig.noRedirect
|
|
@@ -152,12 +162,18 @@ export const doSamlAuth = async (embedConfig) => {
|
|
|
152
162
|
: appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
|
|
153
163
|
// bring back the page to the same URL
|
|
154
164
|
const ssoEndPoint = `${EndPoints.SSO_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
await doSSOAuth(embedConfig, ssoEndPoint);
|
|
166
|
+
};
|
|
167
|
+
export const doIODCAuth = async (embedConfig) => {
|
|
168
|
+
const { thoughtSpotHost } = embedConfig;
|
|
169
|
+
// redirect for SSO, when the SSO authentication is done, this page will be loaded
|
|
170
|
+
// again and the same JS will execute again.
|
|
171
|
+
const ssoRedirectUrl = embedConfig.noRedirect
|
|
172
|
+
? `${thoughtSpotHost}/v2/#/embed/saml-complete`
|
|
173
|
+
: appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
|
|
174
|
+
// bring back the page to the same URL
|
|
175
|
+
const ssoEndPoint = `${EndPoints.IODC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
|
|
176
|
+
await doSSOAuth(embedConfig, ssoEndPoint);
|
|
161
177
|
};
|
|
162
178
|
/**
|
|
163
179
|
* Perform authentication on the ThoughtSpot cluster
|
|
@@ -168,6 +184,8 @@ export const authenticate = async (embedConfig) => {
|
|
|
168
184
|
switch (authType) {
|
|
169
185
|
case AuthType.SSO:
|
|
170
186
|
return doSamlAuth(embedConfig);
|
|
187
|
+
case AuthType.IODC:
|
|
188
|
+
return doIODCAuth(embedConfig);
|
|
171
189
|
case AuthType.AuthServer:
|
|
172
190
|
return doTokenAuth(embedConfig);
|
|
173
191
|
case AuthType.Basic:
|
package/lib/src/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAe,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,2CAA2C;AAC3C,OAAO,EACH,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,qDAAqD;AACrD,MAAM,CAAC,IAAI,cAAc,GAAG,KAAK,CAAC;AAClC,qDAAqD;AACrD,MAAM,CAAC,IAAI,cAAc,GAAW,IAAI,CAAC;AACzC,qDAAqD;AACrD,MAAM,CAAC,IAAI,qBAAqB,GAAkB,IAAI,CAAC;AACvD,qDAAqD;AACrD,MAAM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GAAG,WAAW,CAAC;IACxC,kFAAkF;IAClF,4CAA4C;IAC5C,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU;QACzC,CAAC,CAAC,GAAG,eAAe,2BAA2B;QAC/C,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC,CAAC;IAEzE,sCAAsC;IACtC,MAAM,WAAW,GAAG,GAAG,SAAS,CAAC,mBAAmB,CAChD,kBAAkB,CAAC,cAAc,CAAC,CACrC,EAAE,CAAC;IAEJ,MAAM,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,WAAwB,EAAiB,EAAE;IAC1E,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;IACjC,QAAQ,QAAQ,EAAE;QACd,KAAK,QAAQ,CAAC,GAAG;YACb,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;QACnC,KAAK,QAAQ,CAAC,IAAI;YACd,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;QACnC,KAAK,QAAQ,CAAC,UAAU;YACpB,OAAO,WAAW,CAAC,WAAW,CAAC,CAAC;QACpC,KAAK,QAAQ,CAAC,KAAK;YACf,OAAO,WAAW,CAAC,WAAW,CAAC,CAAC;QACpC;YACI,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KAChC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAY,EAAE,CAAC,cAAc,CAAC"}
|
package/lib/src/embed/app.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
67
67
|
pageId?: Page;
|
|
68
68
|
/**
|
|
69
69
|
* This puts a filter tag on the application. All metadata lists in the application, such as
|
|
70
|
-
*
|
|
70
|
+
* Liveboards and answers, would be filtered by this tag.
|
|
71
71
|
*/
|
|
72
72
|
tag?: string;
|
|
73
73
|
/**
|
|
@@ -84,7 +84,7 @@ export declare class AppEmbed extends V1Embed {
|
|
|
84
84
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
85
85
|
/**
|
|
86
86
|
* Constructs a map of parameters to be passed on to the
|
|
87
|
-
* embedded
|
|
87
|
+
* embedded Liveboard or visualization.
|
|
88
88
|
*/
|
|
89
89
|
private getEmbedParams;
|
|
90
90
|
/**
|
|
@@ -103,6 +103,13 @@ export declare class AppEmbed extends V1Embed {
|
|
|
103
103
|
* @returns The URL path that the embedded app understands.
|
|
104
104
|
*/
|
|
105
105
|
private formatPath;
|
|
106
|
+
/**
|
|
107
|
+
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
108
|
+
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
109
|
+
* @param path The string, set to iframe src and navigate to new page
|
|
110
|
+
* eg: appEmbed.navigateToPage('pinboards')
|
|
111
|
+
*/
|
|
112
|
+
navigateToPage(path: string): void;
|
|
106
113
|
/**
|
|
107
114
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
108
115
|
* @param renderOptions An object containing the page ID
|
package/lib/src/embed/app.js
CHANGED
|
@@ -53,7 +53,7 @@ export class AppEmbed extends V1Embed {
|
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Constructs a map of parameters to be passed on to the
|
|
56
|
-
* embedded
|
|
56
|
+
* embedded Liveboard or visualization.
|
|
57
57
|
*/
|
|
58
58
|
getEmbedParams() {
|
|
59
59
|
const params = this.getBaseQueryParams();
|
|
@@ -116,6 +116,23 @@ export class AppEmbed extends V1Embed {
|
|
|
116
116
|
}
|
|
117
117
|
return path;
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
121
|
+
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
122
|
+
* @param path The string, set to iframe src and navigate to new page
|
|
123
|
+
* eg: appEmbed.navigateToPage('pinboards')
|
|
124
|
+
*/
|
|
125
|
+
navigateToPage(path) {
|
|
126
|
+
if (this.iFrame) {
|
|
127
|
+
const iframeSrc = this.iFrame.src;
|
|
128
|
+
const embedPath = '#/embed';
|
|
129
|
+
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
130
|
+
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
console.log('Please call render before invoking this method');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
119
136
|
/**
|
|
120
137
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
121
138
|
* @param renderOptions An object containing the page ID
|
package/lib/src/embed/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/embed/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,KAAK,EAA8B,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,IAyBX;AAzBD,WAAY,IAAI;IACZ;;OAEG;IACH,qBAAa,CAAA;IACb;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,2BAAmB,CAAA;IACnB;;OAEG;IACH,iCAAyB,CAAA;IACzB;;OAEG;IACH,+BAAuB,CAAA;IACvB;;OAEG;IACH,qBAAa,CAAA;AACjB,CAAC,EAzBW,IAAI,KAAJ,IAAI,QAyBf;AAuCD;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,OAAO;IAGjC,kDAAkD;IAClD,YAAY,WAAwB,EAAE,UAAyB;QAC3D,KAAK,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC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