@thoughtspot/visual-embed-sdk 1.52.0 → 1.52.2-beta
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/cjs/package.json +19 -4
- package/cjs/src/contracts/contracts.spec.d.ts +2 -0
- package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
- package/cjs/src/contracts/contracts.spec.js +345 -0
- package/cjs/src/contracts/contracts.spec.js.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.js +3 -0
- package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
- package/cjs/src/contracts/host-event-contracts.d.ts +416 -0
- package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/cjs/src/contracts/host-event-contracts.js +3 -0
- package/cjs/src/contracts/host-event-contracts.js.map +1 -0
- package/cjs/src/contracts/index.d.ts +22 -0
- package/cjs/src/contracts/index.d.ts.map +1 -0
- package/cjs/src/contracts/index.js +33 -0
- package/cjs/src/contracts/index.js.map +1 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/cjs/src/embed/app.d.ts +21 -143
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +21 -121
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +80 -26
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.js +1 -1
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.spec.js +24 -13
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +1 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -4
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +35 -24
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.spec.js +2 -1
- package/cjs/src/embed/embedConfig.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +12 -2
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +5 -4
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +34 -23
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +50 -44
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +10 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.js +52 -6
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.spec.js +151 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +13 -164
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +72 -135
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +213 -29
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.js +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +14 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +5 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +85 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +14 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +26 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +20 -22
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +171 -66
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +486 -38
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.js +1 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/full-height.d.ts +137 -0
- package/cjs/src/full-height.d.ts.map +1 -0
- package/cjs/src/full-height.js +272 -0
- package/cjs/src/full-height.js.map +1 -0
- package/cjs/src/full-height.spec.d.ts +2 -0
- package/cjs/src/full-height.spec.d.ts.map +1 -0
- package/cjs/src/full-height.spec.js +835 -0
- package/cjs/src/full-height.spec.js.map +1 -0
- package/cjs/src/index.d.ts +5 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +6 -4
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.js +55 -3
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
- package/cjs/src/types.d.ts +584 -24
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +370 -22
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +2 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/cjs/src/utils/custom-actions.spec.js +4 -2
- package/cjs/src/utils/custom-actions.spec.js.map +1 -1
- package/cjs/src/utils/filterConverter.d.ts +106 -0
- package/cjs/src/utils/filterConverter.d.ts.map +1 -0
- package/cjs/src/utils/filterConverter.js +215 -0
- package/cjs/src/utils/filterConverter.js.map +1 -0
- package/cjs/src/utils/filterConverter.spec.d.ts +2 -0
- package/cjs/src/utils/filterConverter.spec.d.ts.map +1 -0
- package/cjs/src/utils/filterConverter.spec.js +709 -0
- package/cjs/src/utils/filterConverter.spec.js.map +1 -0
- package/cjs/src/utils/processData.spec.js +2 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +3 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +19 -51
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
- package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.js +108 -0
- package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/cjs/src/utils.d.ts +18 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +39 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +62 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BMppCU63.js → index-CcBYlGo9.js} +1 -1
- package/dist/src/contracts/contracts.spec.d.ts +2 -0
- package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
- package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
- package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/dist/src/contracts/host-event-contracts.d.ts +416 -0
- package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/dist/src/contracts/index.d.ts +22 -0
- package/dist/src/contracts/index.d.ts.map +1 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/dist/src/embed/app.d.ts +21 -143
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +1 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +5 -4
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +10 -1
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +13 -164
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +14 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +20 -22
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/full-height.d.ts +137 -0
- package/dist/src/full-height.d.ts.map +1 -0
- package/dist/src/full-height.spec.d.ts +2 -0
- package/dist/src/full-height.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +584 -24
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/filterConverter.d.ts +106 -0
- package/dist/src/utils/filterConverter.d.ts.map +1 -0
- package/dist/src/utils/filterConverter.spec.d.ts +2 -0
- package/dist/src/utils/filterConverter.spec.d.ts.map +1 -0
- package/dist/src/utils/processTrigger.d.ts +3 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
- package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/dist/src/utils.d.ts +18 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1144 -412
- package/dist/tsembed-react.js +1143 -411
- package/dist/tsembed.es.js +1357 -418
- package/dist/tsembed.js +1352 -412
- package/dist/visual-embed-sdk-react-full.d.ts +1514 -651
- package/dist/visual-embed-sdk-react.d.ts +1351 -632
- package/dist/visual-embed-sdk.d.ts +1508 -668
- package/lib/package.json +19 -4
- package/lib/src/contracts/contracts.spec.d.ts +2 -0
- package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
- package/lib/src/contracts/contracts.spec.js +342 -0
- package/lib/src/contracts/contracts.spec.js.map +1 -0
- package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
- package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/lib/src/contracts/embed-event-payloads.js +2 -0
- package/lib/src/contracts/embed-event-payloads.js.map +1 -0
- package/lib/src/contracts/host-event-contracts.d.ts +416 -0
- package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/lib/src/contracts/host-event-contracts.js +2 -0
- package/lib/src/contracts/host-event-contracts.js.map +1 -0
- package/lib/src/contracts/index.d.ts +22 -0
- package/lib/src/contracts/index.d.ts.map +1 -0
- package/lib/src/contracts/index.js +22 -0
- package/lib/src/contracts/index.js.map +1 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/lib/src/embed/app.d.ts +21 -143
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +23 -123
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +80 -26
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.js +1 -1
- package/lib/src/embed/auto-frame-renderer.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.spec.js +24 -13
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +1 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -5
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +35 -24
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.spec.js +2 -1
- package/lib/src/embed/embedConfig.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +12 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +5 -4
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +19 -8
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +15 -9
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +10 -1
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/utils.js +48 -3
- package/lib/src/embed/hostEventClient/utils.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.spec.js +152 -1
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +13 -164
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +73 -136
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +213 -29
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +14 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +5 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +85 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +12 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +27 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +20 -22
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +171 -66
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +484 -36
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.js +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/full-height.d.ts +137 -0
- package/lib/src/full-height.d.ts.map +1 -0
- package/lib/src/full-height.js +268 -0
- package/lib/src/full-height.js.map +1 -0
- package/lib/src/full-height.spec.d.ts +2 -0
- package/lib/src/full-height.spec.d.ts.map +1 -0
- package/lib/src/full-height.spec.js +833 -0
- package/lib/src/full-height.spec.js.map +1 -0
- package/lib/src/index.d.ts +5 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.parity.spec.js +55 -3
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
- package/lib/src/types.d.ts +584 -24
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +370 -22
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +2 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/lib/src/utils/custom-actions.spec.js +4 -2
- package/lib/src/utils/custom-actions.spec.js.map +1 -1
- package/lib/src/utils/filterConverter.d.ts +106 -0
- package/lib/src/utils/filterConverter.d.ts.map +1 -0
- package/lib/src/utils/filterConverter.js +210 -0
- package/lib/src/utils/filterConverter.js.map +1 -0
- package/lib/src/utils/filterConverter.spec.d.ts +2 -0
- package/lib/src/utils/filterConverter.spec.d.ts.map +1 -0
- package/lib/src/utils/filterConverter.spec.js +707 -0
- package/lib/src/utils/filterConverter.spec.js.map +1 -0
- package/lib/src/utils/processData.spec.js +2 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +3 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +19 -51
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
- package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.js +101 -0
- package/lib/src/utils/transport/iframe-transport.js.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
- package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/lib/src/utils.d.ts +18 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +37 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +63 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1508 -668
- package/package.json +19 -4
- package/src/contracts/contracts.spec.ts +392 -0
- package/src/contracts/embed-event-payloads.ts +83 -0
- package/src/contracts/host-event-contracts.ts +500 -0
- package/src/contracts/index.ts +53 -0
- package/src/contracts/ui-passthrough-contracts.ts +301 -0
- package/src/embed/app.spec.ts +101 -34
- package/src/embed/app.ts +42 -268
- package/src/embed/auto-frame-renderer.spec.ts +24 -13
- package/src/embed/auto-frame-renderer.ts +1 -1
- package/src/embed/bodyless-conversation.ts +1 -1
- package/src/embed/conversation.spec.ts +38 -27
- package/src/embed/conversation.ts +5 -5
- package/src/embed/embedConfig.spec.ts +2 -1
- package/src/embed/events.spec.ts +14 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +16 -10
- package/src/embed/hostEventClient/host-event-client.ts +31 -10
- package/src/embed/hostEventClient/utils.spec.ts +176 -1
- package/src/embed/hostEventClient/utils.ts +53 -3
- package/src/embed/liveboard.spec.ts +261 -41
- package/src/embed/liveboard.ts +85 -300
- package/src/embed/search-bar.tsx +1 -1
- package/src/embed/search.spec.ts +103 -0
- package/src/embed/search.ts +21 -1
- package/src/embed/spotter-utils.spec.ts +29 -0
- package/src/embed/spotter-utils.ts +16 -0
- package/src/embed/ts-embed.spec.ts +650 -36
- package/src/embed/ts-embed.ts +205 -76
- package/src/errors.ts +1 -1
- package/src/full-height.spec.ts +1008 -0
- package/src/full-height.ts +361 -0
- package/src/index.ts +103 -5
- package/src/react/all-types-export.parity.spec.ts +63 -3
- package/src/react/all-types-export.ts +49 -0
- package/src/types.ts +584 -22
- package/src/utils/authService/tokenizedAuthService.spec.ts +2 -1
- package/src/utils/custom-actions.spec.ts +4 -2
- package/src/utils/filterConverter.spec.ts +801 -0
- package/src/utils/filterConverter.ts +304 -0
- package/src/utils/processData.spec.ts +2 -1
- package/src/utils/processTrigger.ts +28 -58
- package/src/utils/transport/iframe-transport.spec.ts +177 -0
- package/src/utils/transport/iframe-transport.ts +122 -0
- package/src/utils.spec.ts +71 -0
- package/src/utils.ts +38 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
- package/src/embed/hostEventClient/contracts.ts +0 -262
|
@@ -20,7 +20,7 @@ const logger_1 = require("../utils/logger");
|
|
|
20
20
|
const package_json_1 = require("../../package.json");
|
|
21
21
|
const search_1 = require("./search");
|
|
22
22
|
const processTrigger_1 = require("../utils/processTrigger");
|
|
23
|
-
const
|
|
23
|
+
const ui_passthrough_contracts_1 = require("../contracts/ui-passthrough-contracts");
|
|
24
24
|
const sessionInfoService = tslib_1.__importStar(require("../utils/sessionInfoService"));
|
|
25
25
|
const authToken = tslib_1.__importStar(require("../authToken"));
|
|
26
26
|
const apiIntercept = tslib_1.__importStar(require("../api-intercept"));
|
|
@@ -141,10 +141,10 @@ describe('Unit test case for ts embed', () => {
|
|
|
141
141
|
mockProcessTrigger.mockResolvedValue({ session: 'test' });
|
|
142
142
|
await (0, test_utils_1.executeAfterWait)(async () => {
|
|
143
143
|
const payload = { newVizName: 'test' };
|
|
144
|
-
await searchEmbed.triggerUIPassThrough(
|
|
144
|
+
await searchEmbed.triggerUIPassThrough(ui_passthrough_contracts_1.UIPassthroughEvent.PinAnswerToLiveboard, payload);
|
|
145
145
|
expect(mockProcessTrigger).toHaveBeenCalledWith((0, test_utils_1.getIFrameEl)(), types_1.HostEvent.UIPassthrough, 'http://tshost', {
|
|
146
146
|
parameters: payload,
|
|
147
|
-
type:
|
|
147
|
+
type: ui_passthrough_contracts_1.UIPassthroughEvent.PinAnswerToLiveboard,
|
|
148
148
|
}, undefined);
|
|
149
149
|
});
|
|
150
150
|
});
|
|
@@ -168,6 +168,9 @@ describe('Unit test case for ts embed', () => {
|
|
|
168
168
|
liveboardEmbed.render();
|
|
169
169
|
mockProcessTrigger.mockResolvedValue({ session: 'test' });
|
|
170
170
|
await (0, test_utils_1.executeAfterWait)(async () => {
|
|
171
|
+
// `false` is a deliberately off-contract payload here — this
|
|
172
|
+
// asserts raw passthrough to processTrigger, not a real Save
|
|
173
|
+
// payload — so it is cast past the typed `data` parameter.
|
|
171
174
|
await liveboardEmbed.trigger(types_1.HostEvent.Save, false);
|
|
172
175
|
expect(mockProcessTrigger).toHaveBeenCalledWith((0, test_utils_1.getIFrameEl)(), types_1.HostEvent.Save, 'http://tshost', false, undefined);
|
|
173
176
|
});
|
|
@@ -2443,8 +2446,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
2443
2446
|
libEmbed.destroy();
|
|
2444
2447
|
// Reverts to the exact value the container had before.
|
|
2445
2448
|
expect(customContainer.style.position).toBe('static');
|
|
2446
|
-
// The custom container reference is dropped (back to the
|
|
2447
|
-
// body) so a destroyed embed does not pin the (possibly
|
|
2449
|
+
// The custom container reference is dropped (back to the
|
|
2450
|
+
// default body) so a destroyed embed does not pin the (possibly
|
|
2448
2451
|
// detached) element in memory.
|
|
2449
2452
|
expect(libEmbed.preRenderContainerEl).toBe(document.body);
|
|
2450
2453
|
customContainer.remove();
|
|
@@ -2485,8 +2488,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
2485
2488
|
await libEmbed.preRender();
|
|
2486
2489
|
expect(libEmbed.preRenderContainerEl).toBe(document.body);
|
|
2487
2490
|
libEmbed.destroy();
|
|
2488
|
-
// The body sentinel must never be treated as a custom
|
|
2489
|
-
// no position override to apply and none to restore.
|
|
2491
|
+
// The body sentinel must never be treated as a custom
|
|
2492
|
+
// container: no position override to apply and none to restore.
|
|
2490
2493
|
expect(document.body.style.position).toBe(originalBodyPosition);
|
|
2491
2494
|
expect(document.body.dataset.tsEmbedOriginalPosition).toBeUndefined();
|
|
2492
2495
|
});
|
|
@@ -2597,10 +2600,11 @@ describe('Unit test case for ts embed', () => {
|
|
|
2597
2600
|
newContainer.style.position = 'static';
|
|
2598
2601
|
document.body.appendChild(newContainer);
|
|
2599
2602
|
libEmbed.syncPreRenderStyle();
|
|
2600
|
-
// applyPreRenderContainerPositioning() reads
|
|
2601
|
-
// instead of taking the container as an
|
|
2602
|
-
// to assign the field before calling
|
|
2603
|
-
// lands on the detached node and
|
|
2603
|
+
// applyPreRenderContainerPositioning() reads
|
|
2604
|
+
// preRenderContainerEl instead of taking the container as an
|
|
2605
|
+
// argument, so reconcile has to assign the field before calling
|
|
2606
|
+
// it — otherwise the override lands on the detached node and
|
|
2607
|
+
// the fresh one stays static.
|
|
2604
2608
|
expect(libEmbed.preRenderContainerEl).toBe(newContainer);
|
|
2605
2609
|
expect(newContainer.style.position).toBe('relative');
|
|
2606
2610
|
expect(newContainer.dataset.tsEmbedOriginalPosition).toBe('static');
|
|
@@ -2705,7 +2709,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
2705
2709
|
});
|
|
2706
2710
|
await firstEmbed.preRender();
|
|
2707
2711
|
await (0, test_utils_1.waitFor)(() => !!(0, test_utils_1.getIFrameEl)());
|
|
2708
|
-
// Reset position to static so the connecting embed also
|
|
2712
|
+
// Reset position to static so the connecting embed also
|
|
2713
|
+
// triggers the guard.
|
|
2709
2714
|
customContainer.style.position = 'static';
|
|
2710
2715
|
delete customContainer.dataset['preRenderContainerOriginalPosition'];
|
|
2711
2716
|
const connectingEmbed = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
@@ -2786,8 +2791,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
2786
2791
|
});
|
|
2787
2792
|
await firstEmbed.preRender();
|
|
2788
2793
|
await (0, test_utils_1.waitFor)(() => !!(0, test_utils_1.getIFrameEl)());
|
|
2789
|
-
// Same config on both components — the value is redundant
|
|
2790
|
-
// not wrong, so nagging about it would be noise.
|
|
2794
|
+
// Same config on both components — the value is redundant
|
|
2795
|
+
// but not wrong, so nagging about it would be noise.
|
|
2791
2796
|
const connectingEmbed = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
2792
2797
|
preRenderId: 'connect-same-element',
|
|
2793
2798
|
liveboardId: 'myLiveboardId',
|
|
@@ -2813,8 +2818,9 @@ describe('Unit test case for ts embed', () => {
|
|
|
2813
2818
|
});
|
|
2814
2819
|
await firstEmbed.preRender();
|
|
2815
2820
|
await (0, test_utils_1.waitFor)(() => !!(0, test_utils_1.getIFrameEl)());
|
|
2816
|
-
// A selector that resolves to the owner's element is the
|
|
2817
|
-
// container, so the comparison must be by resolved
|
|
2821
|
+
// A selector that resolves to the owner's element is the
|
|
2822
|
+
// same container, so the comparison must be by resolved
|
|
2823
|
+
// node.
|
|
2818
2824
|
const connectingEmbed = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
2819
2825
|
preRenderId: 'connect-same-selector',
|
|
2820
2826
|
liveboardId: 'myLiveboardId',
|
|
@@ -2864,8 +2870,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
2864
2870
|
await firstEmbed.preRender();
|
|
2865
2871
|
await (0, test_utils_1.waitFor)(() => !!(0, test_utils_1.getIFrameEl)());
|
|
2866
2872
|
// Simulate a wrapper with no live embed behind it: the
|
|
2867
|
-
// __tsEmbed stamp used to locate the owner is gone, so
|
|
2868
|
-
// is no container to inherit.
|
|
2873
|
+
// __tsEmbed stamp used to locate the owner is gone, so
|
|
2874
|
+
// there is no container to inherit.
|
|
2869
2875
|
const wrapper = document.getElementById(firstEmbed.getPreRenderIds().wrapper);
|
|
2870
2876
|
delete wrapper.__tsEmbed;
|
|
2871
2877
|
const connectingEmbed = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
@@ -3569,7 +3575,9 @@ describe('Unit test case for ts embed', () => {
|
|
|
3569
3575
|
});
|
|
3570
3576
|
test('should return getPreRenderObj and log if same object', () => {
|
|
3571
3577
|
const searchEmbed = new index_1.SearchEmbed((0, test_utils_1.getRootEl)(), defaultViewConfig);
|
|
3572
|
-
|
|
3578
|
+
// debug, not info: the wrapper points at the embed being shown, so
|
|
3579
|
+
// this is now the common case rather than a rare diagnostic.
|
|
3580
|
+
const loggerSpy = jest.spyOn(logger_1.logger, 'debug');
|
|
3573
3581
|
// getPreRenderObj reads the embed reference from preRenderWrapper
|
|
3574
3582
|
searchEmbed.preRenderWrapper = {
|
|
3575
3583
|
[searchEmbed['embedNodeKey']]: searchEmbed,
|
|
@@ -4271,16 +4279,6 @@ describe('Additional Coverage Tests', () => {
|
|
|
4271
4279
|
expect((0, test_utils_1.getIFrameEl)().style.height).toBe('500px');
|
|
4272
4280
|
});
|
|
4273
4281
|
});
|
|
4274
|
-
test('should test getIframeCenter calculation', async () => {
|
|
4275
|
-
const searchEmbed = new index_1.SearchEmbed((0, test_utils_1.getRootEl)(), defaultViewConfig);
|
|
4276
|
-
await searchEmbed.render();
|
|
4277
|
-
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4278
|
-
const center = searchEmbed['getIframeCenter']();
|
|
4279
|
-
expect(center).toHaveProperty('iframeCenter');
|
|
4280
|
-
expect(center).toHaveProperty('iframeHeight');
|
|
4281
|
-
expect(center).toHaveProperty('viewPortHeight');
|
|
4282
|
-
});
|
|
4283
|
-
});
|
|
4284
4282
|
test('should handle preRender with replaceExistingPreRender=true', async () => {
|
|
4285
4283
|
(0, test_utils_1.createRootEleForEmbed)();
|
|
4286
4284
|
const embed1 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
@@ -4351,11 +4349,13 @@ describe('Trigger method edge cases', () => {
|
|
|
4351
4349
|
const searchEmbed = new index_1.SearchEmbed((0, test_utils_1.getRootEl)(), defaultViewConfig);
|
|
4352
4350
|
const handleErrorSpy = jest.spyOn(searchEmbed, 'handleError').mockImplementation(() => { });
|
|
4353
4351
|
await searchEmbed.render();
|
|
4354
|
-
// First processTrigger call is getAvailableUIPassthroughKeys for
|
|
4352
|
+
// First processTrigger call is getAvailableUIPassthroughKeys for
|
|
4353
|
+
// DrillDown
|
|
4355
4354
|
mockProcessTrigger.mockResolvedValueOnce([
|
|
4356
|
-
{ value: { keys: Object.values(
|
|
4355
|
+
{ value: { keys: Object.values(ui_passthrough_contracts_1.UIPassthroughEvent) } },
|
|
4357
4356
|
]);
|
|
4358
|
-
// DrillDown with no points → throwDrillDownValidationError →
|
|
4357
|
+
// DrillDown with no points → throwDrillDownValidationError →
|
|
4358
|
+
// isValidationError=true
|
|
4359
4359
|
await expect(searchEmbed.trigger(types_1.HostEvent.DrillDown, {})).rejects.toThrow('DrillDown requires a valid points object');
|
|
4360
4360
|
expect(handleErrorSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
4361
4361
|
data: expect.objectContaining({ code: types_1.EmbedErrorCodes.HOST_EVENT_VALIDATION }),
|
|
@@ -4483,7 +4483,8 @@ describe('Fullscreen change handler behavior', () => {
|
|
|
4483
4483
|
(0, index_1.init)({
|
|
4484
4484
|
thoughtSpotHost: 'tshost',
|
|
4485
4485
|
authType: index_1.AuthType.None,
|
|
4486
|
-
// disableFullscreenPresentation not set → defaults to true via ??
|
|
4486
|
+
// disableFullscreenPresentation not set → defaults to true via ??
|
|
4487
|
+
// true
|
|
4487
4488
|
});
|
|
4488
4489
|
const embed = new index_1.SearchEmbed((0, test_utils_1.getRootEl)(), defaultViewConfig);
|
|
4489
4490
|
const addEventListenerSpy = jest.spyOn(document, 'addEventListener');
|
|
@@ -4501,7 +4502,8 @@ describe('Fullscreen change handler behavior', () => {
|
|
|
4501
4502
|
const loggerDebugSpy = jest.spyOn(logger_1.logger, 'debug').mockImplementation(() => { });
|
|
4502
4503
|
const triggerSpy = jest.spyOn(embed, 'trigger').mockImplementation(() => Promise.resolve(null));
|
|
4503
4504
|
embed['setupFullscreenChangeHandler']();
|
|
4504
|
-
// Capture the registered handler directly instead of dispatching to
|
|
4505
|
+
// Capture the registered handler directly instead of dispatching to
|
|
4506
|
+
// document
|
|
4505
4507
|
const fullscreenCall = addEventListenerSpy.mock.calls.find((c) => c[0] === 'fullscreenchange');
|
|
4506
4508
|
expect(fullscreenCall).toBeTruthy();
|
|
4507
4509
|
const handler = fullscreenCall[1];
|
|
@@ -4580,7 +4582,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
4580
4582
|
});
|
|
4581
4583
|
embed2.showPreRender();
|
|
4582
4584
|
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4583
|
-
|
|
4585
|
+
// Not LastCalledWith: LiveboardEmbed fires Navigate after this.
|
|
4586
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4584
4587
|
liveboardId: 'original-lb',
|
|
4585
4588
|
visibleVizs: ['viz-1'],
|
|
4586
4589
|
runtimeFilters: [
|
|
@@ -4623,7 +4626,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
4623
4626
|
});
|
|
4624
4627
|
embed2.showPreRender();
|
|
4625
4628
|
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4626
|
-
|
|
4629
|
+
// Not LastCalledWith: LiveboardEmbed fires Navigate after this.
|
|
4630
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4627
4631
|
liveboardId: 'original-lb',
|
|
4628
4632
|
visibleVizs: ['viz-1', 'viz-2'],
|
|
4629
4633
|
runtimeFilters: [
|
|
@@ -4636,6 +4640,317 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
4636
4640
|
}), undefined);
|
|
4637
4641
|
});
|
|
4638
4642
|
});
|
|
4643
|
+
test('should carry the new config filters in UpdateEmbedParams', async () => {
|
|
4644
|
+
await setupPreRenderTest('params-new-filters', { liveboardId: 'original-lb' });
|
|
4645
|
+
const runtimeFilters = [
|
|
4646
|
+
{
|
|
4647
|
+
columnName: 'Color',
|
|
4648
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4649
|
+
values: ['red', 'blue'],
|
|
4650
|
+
},
|
|
4651
|
+
];
|
|
4652
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4653
|
+
preRenderId: 'params-new-filters',
|
|
4654
|
+
liveboardId: 'original-lb',
|
|
4655
|
+
runtimeFilters,
|
|
4656
|
+
});
|
|
4657
|
+
embed2.showPreRender();
|
|
4658
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4659
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4660
|
+
runtimeFilters,
|
|
4661
|
+
// The serialized form is the one the container reads.
|
|
4662
|
+
runtimeFilterParams: 'col1=Color&op1=IN&val1=red&val1=blue',
|
|
4663
|
+
}), undefined);
|
|
4664
|
+
// Everything rides in the params payload; nothing follows it.
|
|
4665
|
+
const runtimeFilterCalls = mockProcessTrigger.mock.calls.filter((call) => call[1] === types_1.HostEvent.UpdateRuntimeFilters);
|
|
4666
|
+
expect(runtimeFilterCalls).toHaveLength(0);
|
|
4667
|
+
});
|
|
4668
|
+
});
|
|
4669
|
+
test('should serialize the filters when they are not excluded from the URL', async () => {
|
|
4670
|
+
await setupPreRenderTest('params-url-filters', { liveboardId: 'original-lb' });
|
|
4671
|
+
// With the flag off, getDefaultAppInitData leaves runtimeFilterParams
|
|
4672
|
+
// null and a URL render carries the filters in the iframe's query
|
|
4673
|
+
// string. A show cycle has no URL, so the payload has to carry them.
|
|
4674
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4675
|
+
preRenderId: 'params-url-filters',
|
|
4676
|
+
liveboardId: 'original-lb',
|
|
4677
|
+
excludeRuntimeFiltersfromURL: false,
|
|
4678
|
+
runtimeFilters: [
|
|
4679
|
+
{
|
|
4680
|
+
columnName: 'Color',
|
|
4681
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4682
|
+
values: ['red'],
|
|
4683
|
+
},
|
|
4684
|
+
],
|
|
4685
|
+
});
|
|
4686
|
+
embed2.showPreRender();
|
|
4687
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4688
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4689
|
+
runtimeFilterParams: 'col1=Color&op1=IN&val1=red',
|
|
4690
|
+
}), undefined);
|
|
4691
|
+
});
|
|
4692
|
+
});
|
|
4693
|
+
test('should trigger Navigate only after UpdateEmbedParams has settled', async () => {
|
|
4694
|
+
await setupPreRenderTest('navigate-after-params', {
|
|
4695
|
+
liveboardId: 'original-lb',
|
|
4696
|
+
runtimeFilters: [
|
|
4697
|
+
{
|
|
4698
|
+
columnName: 'Color',
|
|
4699
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4700
|
+
values: ['red'],
|
|
4701
|
+
},
|
|
4702
|
+
],
|
|
4703
|
+
});
|
|
4704
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4705
|
+
preRenderId: 'navigate-after-params',
|
|
4706
|
+
liveboardId: 'updated-lb',
|
|
4707
|
+
});
|
|
4708
|
+
embed2.showPreRender();
|
|
4709
|
+
// Inside the settle window the params are already out
|
|
4710
|
+
// and Navigate is not.
|
|
4711
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4712
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call) => call[1]);
|
|
4713
|
+
expect(eventTypes).toContain(types_1.HostEvent.UpdateEmbedParams);
|
|
4714
|
+
expect(eventTypes).not.toContain(types_1.HostEvent.Navigate);
|
|
4715
|
+
}, 50);
|
|
4716
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4717
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call) => call[1]);
|
|
4718
|
+
// A Navigate that beat the params would make the container load
|
|
4719
|
+
// `updated-lb` while still holding `original-lb`'s runtime filters,
|
|
4720
|
+
// and drop the params that then arrive mid-load (SCAL-336321).
|
|
4721
|
+
expect(eventTypes).toContain(types_1.HostEvent.Navigate);
|
|
4722
|
+
expect(eventTypes.indexOf(types_1.HostEvent.UpdateEmbedParams)).toBeLessThan(eventTypes.indexOf(types_1.HostEvent.Navigate));
|
|
4723
|
+
}, 300);
|
|
4724
|
+
});
|
|
4725
|
+
test('should mark the params empty when the config declares no filters', async () => {
|
|
4726
|
+
await setupPreRenderTest('params-clear-filters', {
|
|
4727
|
+
liveboardId: 'original-lb',
|
|
4728
|
+
runtimeFilters: [
|
|
4729
|
+
{
|
|
4730
|
+
columnName: 'Color',
|
|
4731
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4732
|
+
values: ['red', 'blue'],
|
|
4733
|
+
},
|
|
4734
|
+
],
|
|
4735
|
+
});
|
|
4736
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4737
|
+
preRenderId: 'params-clear-filters',
|
|
4738
|
+
liveboardId: 'original-lb',
|
|
4739
|
+
});
|
|
4740
|
+
embed2.showPreRender();
|
|
4741
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4742
|
+
// Not null and not '': the container only reads this field when it
|
|
4743
|
+
// is truthy, so either would leave the previous embed's filters in
|
|
4744
|
+
// place. A lone separator passes that gate and parses to {}.
|
|
4745
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({ runtimeFilterParams: '&' }), undefined);
|
|
4746
|
+
const runtimeFilterCalls = mockProcessTrigger.mock.calls.filter((call) => call[1] === types_1.HostEvent.UpdateRuntimeFilters);
|
|
4747
|
+
expect(runtimeFilterCalls).toHaveLength(0);
|
|
4748
|
+
});
|
|
4749
|
+
});
|
|
4750
|
+
test('should mark the params empty for an explicitly empty filter array', async () => {
|
|
4751
|
+
await setupPreRenderTest('params-empty-array', {
|
|
4752
|
+
liveboardId: 'original-lb',
|
|
4753
|
+
runtimeFilters: [
|
|
4754
|
+
{
|
|
4755
|
+
columnName: 'Color',
|
|
4756
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4757
|
+
values: ['red'],
|
|
4758
|
+
},
|
|
4759
|
+
],
|
|
4760
|
+
});
|
|
4761
|
+
// `runtimeFilters: []` is the shape the customer reported as not
|
|
4762
|
+
// resetting anything.
|
|
4763
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4764
|
+
preRenderId: 'params-empty-array',
|
|
4765
|
+
liveboardId: 'original-lb',
|
|
4766
|
+
runtimeFilters: [],
|
|
4767
|
+
});
|
|
4768
|
+
embed2.showPreRender();
|
|
4769
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4770
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({ runtimeFilterParams: '&' }), undefined);
|
|
4771
|
+
});
|
|
4772
|
+
});
|
|
4773
|
+
test('should mark the params empty when no config in the chain has filters', async () => {
|
|
4774
|
+
await setupPreRenderTest('params-no-filters', { liveboardId: 'original-lb' });
|
|
4775
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4776
|
+
preRenderId: 'params-no-filters',
|
|
4777
|
+
liveboardId: 'updated-lb',
|
|
4778
|
+
});
|
|
4779
|
+
embed2.showPreRender();
|
|
4780
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4781
|
+
const paramsCall = mockProcessTrigger.mock.calls.find((call) => call[1] === types_1.HostEvent.UpdateEmbedParams);
|
|
4782
|
+
expect(paramsCall === null || paramsCall === void 0 ? void 0 : paramsCall[3]).not.toHaveProperty('runtimeFilters');
|
|
4783
|
+
expect(paramsCall === null || paramsCall === void 0 ? void 0 : paramsCall[3].runtimeFilterParams).toBe('&');
|
|
4784
|
+
});
|
|
4785
|
+
});
|
|
4786
|
+
test('should state each embed filters as the pre-render is handed along', async () => {
|
|
4787
|
+
await setupPreRenderTest('params-chain', {
|
|
4788
|
+
liveboardId: 'original-lb',
|
|
4789
|
+
runtimeFilters: [
|
|
4790
|
+
{
|
|
4791
|
+
columnName: 'Color',
|
|
4792
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4793
|
+
values: ['red', 'blue'],
|
|
4794
|
+
},
|
|
4795
|
+
],
|
|
4796
|
+
});
|
|
4797
|
+
// Second in the chain declares none, so it empties the field rather
|
|
4798
|
+
// than letting the creator's filters stand.
|
|
4799
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4800
|
+
preRenderId: 'params-chain',
|
|
4801
|
+
liveboardId: 'second-lb',
|
|
4802
|
+
});
|
|
4803
|
+
await embed2.showPreRender();
|
|
4804
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4805
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({ runtimeFilterParams: '&' }), undefined);
|
|
4806
|
+
});
|
|
4807
|
+
mockProcessTrigger.mockClear();
|
|
4808
|
+
// Third declares its own, and states them without reference to either
|
|
4809
|
+
// embed before it.
|
|
4810
|
+
const embed3 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4811
|
+
preRenderId: 'params-chain',
|
|
4812
|
+
liveboardId: 'third-lb',
|
|
4813
|
+
runtimeFilters: [
|
|
4814
|
+
{
|
|
4815
|
+
columnName: 'Region',
|
|
4816
|
+
operator: types_1.RuntimeFilterOp.EQ,
|
|
4817
|
+
values: ['North'],
|
|
4818
|
+
},
|
|
4819
|
+
],
|
|
4820
|
+
});
|
|
4821
|
+
await embed3.showPreRender();
|
|
4822
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4823
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4824
|
+
runtimeFilterParams: 'col1=Region&op1=EQ&val1=North',
|
|
4825
|
+
}), undefined);
|
|
4826
|
+
});
|
|
4827
|
+
});
|
|
4828
|
+
test('should carry the new config runtime parameters in UpdateEmbedParams', async () => {
|
|
4829
|
+
await setupPreRenderTest('params-parameters', {
|
|
4830
|
+
liveboardId: 'original-lb',
|
|
4831
|
+
runtimeParameters: [{ name: 'Region Param', value: 'East' }],
|
|
4832
|
+
});
|
|
4833
|
+
const runtimeParameters = [{ name: 'Region Param', value: 'West' }];
|
|
4834
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4835
|
+
preRenderId: 'params-parameters',
|
|
4836
|
+
liveboardId: 'original-lb',
|
|
4837
|
+
runtimeParameters,
|
|
4838
|
+
});
|
|
4839
|
+
embed2.showPreRender();
|
|
4840
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4841
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4842
|
+
runtimeParameters,
|
|
4843
|
+
runtimeParameterParams: 'param1=Region%20Param¶mVal1=West',
|
|
4844
|
+
}), undefined);
|
|
4845
|
+
// A parameter always carries a value, so the payload says
|
|
4846
|
+
// everything there is to say — no follow-up event.
|
|
4847
|
+
const parameterCalls = mockProcessTrigger.mock.calls.filter((call) => call[1] === types_1.HostEvent.UpdateParameters);
|
|
4848
|
+
expect(parameterCalls).toHaveLength(0);
|
|
4849
|
+
});
|
|
4850
|
+
});
|
|
4851
|
+
test('should mark the params empty when the config declares no parameters', async () => {
|
|
4852
|
+
await setupPreRenderTest('params-clear-parameters', {
|
|
4853
|
+
liveboardId: 'original-lb',
|
|
4854
|
+
runtimeParameters: [{ name: 'Region Param', value: 'East' }],
|
|
4855
|
+
});
|
|
4856
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4857
|
+
preRenderId: 'params-clear-parameters',
|
|
4858
|
+
liveboardId: 'original-lb',
|
|
4859
|
+
});
|
|
4860
|
+
embed2.showPreRender();
|
|
4861
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4862
|
+
// Same gate as the filters: the container only reads this field
|
|
4863
|
+
// when it is truthy, so null would leave 'East' standing.
|
|
4864
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({ runtimeParameterParams: '&' }), undefined);
|
|
4865
|
+
});
|
|
4866
|
+
});
|
|
4867
|
+
test('should keep an empty string parameter value distinct from having none', async () => {
|
|
4868
|
+
await setupPreRenderTest('params-empty-value', { liveboardId: 'original-lb' });
|
|
4869
|
+
// `paramVal1=` is that parameter's value, not an absence — so it must
|
|
4870
|
+
// not collapse to the empty marker.
|
|
4871
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4872
|
+
preRenderId: 'params-empty-value',
|
|
4873
|
+
liveboardId: 'original-lb',
|
|
4874
|
+
runtimeParameters: [{ name: 'Region Param', value: '' }],
|
|
4875
|
+
});
|
|
4876
|
+
embed2.showPreRender();
|
|
4877
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4878
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
4879
|
+
runtimeParameterParams: 'param1=Region%20Param¶mVal1=',
|
|
4880
|
+
}), undefined);
|
|
4881
|
+
});
|
|
4882
|
+
});
|
|
4883
|
+
test('should hand the pre-render over to the embed being shown', async () => {
|
|
4884
|
+
const embed1 = await setupPreRenderTest('take-over-state', { liveboardId: 'original-lb' });
|
|
4885
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4886
|
+
preRenderId: 'take-over-state',
|
|
4887
|
+
liveboardId: 'second-lb',
|
|
4888
|
+
});
|
|
4889
|
+
await embed2.showPreRender();
|
|
4890
|
+
// It connected to embed1's pre-render and is now what the wrapper
|
|
4891
|
+
// points at, so getPreRenderObj() means "what is showing".
|
|
4892
|
+
expect(embed2.getPreRenderObj()).toBe(embed2);
|
|
4893
|
+
expect(embed1.getPreRenderObj()).toBe(embed2);
|
|
4894
|
+
});
|
|
4895
|
+
test('should not strand callbacks when the container loads after the shown embed was hidden', async () => {
|
|
4896
|
+
// The creator is subscribed but the container has NOT announced itself
|
|
4897
|
+
// yet, which is the state a real pre-render starts in.
|
|
4898
|
+
const embed1 = await setupPreRenderTest('loaded-after-hide', { liveboardId: 'original-lb' });
|
|
4899
|
+
embed1.isEmbedContainerLoaded = false;
|
|
4900
|
+
// Second embed shows, takes the pre-render over, then is hidden — which
|
|
4901
|
+
// unsubscribes it, so it will never hear EmbedListenerReady itself.
|
|
4902
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4903
|
+
preRenderId: 'loaded-after-hide',
|
|
4904
|
+
liveboardId: 'second-lb',
|
|
4905
|
+
});
|
|
4906
|
+
await embed2.showPreRender();
|
|
4907
|
+
embed2.hidePreRender();
|
|
4908
|
+
expect(embed2.isEmbedContainerLoaded).toBe(false);
|
|
4909
|
+
// Container comes up and the creator hears it.
|
|
4910
|
+
embed1.createEmbedContainerHandler(index_1.EmbedEvent.EmbedListenerReady)();
|
|
4911
|
+
mockProcessTrigger.mockClear();
|
|
4912
|
+
mockProcessTrigger.mockResolvedValue({});
|
|
4913
|
+
// A third embed reads the state off embed2, which owns the wrapper and
|
|
4914
|
+
// never learned the container was up. Reading a per-instance snapshot
|
|
4915
|
+
// here leaves UpdateEmbedParams queued forever and the pre-render stuck
|
|
4916
|
+
// on the previous liveboard.
|
|
4917
|
+
const embed3 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4918
|
+
preRenderId: 'loaded-after-hide',
|
|
4919
|
+
liveboardId: 'third-lb',
|
|
4920
|
+
});
|
|
4921
|
+
await embed3.showPreRender();
|
|
4922
|
+
expect(embed3.isEmbedContainerLoaded).toBe(true);
|
|
4923
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4924
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call) => call[1]);
|
|
4925
|
+
expect(eventTypes).toContain(types_1.HostEvent.UpdateEmbedParams);
|
|
4926
|
+
}, 300);
|
|
4927
|
+
});
|
|
4928
|
+
test('should not reconcile runtime filters unless the view config opts in', async () => {
|
|
4929
|
+
await setupPreRenderTest('reconcile-flag-off', {
|
|
4930
|
+
liveboardId: 'original-lb',
|
|
4931
|
+
runtimeFilters: [
|
|
4932
|
+
{
|
|
4933
|
+
columnName: 'Color',
|
|
4934
|
+
operator: types_1.RuntimeFilterOp.IN,
|
|
4935
|
+
values: ['red', 'blue'],
|
|
4936
|
+
},
|
|
4937
|
+
],
|
|
4938
|
+
});
|
|
4939
|
+
// Same shape as the clear-filters case above, minus the flag: the
|
|
4940
|
+
// previous config left filters on the shared pre-render and this one
|
|
4941
|
+
// declares none. Without preRenderConfig.reconcileRuntimeParams the SDK
|
|
4942
|
+
// leaves that to the container, so no UpdateRuntimeFilters goes out.
|
|
4943
|
+
const embed2 = new index_1.LiveboardEmbed('#tsEmbedDiv', {
|
|
4944
|
+
preRenderId: 'reconcile-flag-off',
|
|
4945
|
+
liveboardId: 'original-lb',
|
|
4946
|
+
});
|
|
4947
|
+
embed2.showPreRender();
|
|
4948
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
4949
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call) => call[1]);
|
|
4950
|
+
expect(eventTypes).toContain(types_1.HostEvent.UpdateEmbedParams);
|
|
4951
|
+
expect(eventTypes).not.toContain(types_1.HostEvent.UpdateRuntimeFilters);
|
|
4952
|
+
});
|
|
4953
|
+
});
|
|
4639
4954
|
test('should handle error when getUpdateEmbedParamsObject fails during showPreRender', async () => {
|
|
4640
4955
|
await setupPreRenderTest('error-test', { liveboardId: 'original-lb' });
|
|
4641
4956
|
const handleErrorSpy = jest.spyOn(index_1.LiveboardEmbed.prototype, 'handleError');
|
|
@@ -4995,7 +5310,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
4995
5310
|
expect(hostElement.querySelector(`#${placeHolderId}`)).toBe(staleNestedPlaceholder);
|
|
4996
5311
|
// Before the fix this threw NotFoundError.
|
|
4997
5312
|
await expect(embed.showPreRender()).resolves.toBeDefined();
|
|
4998
|
-
// The stale nested placeholder is gone; the fresh one is a direct
|
|
5313
|
+
// The stale nested placeholder is gone; the fresh one is a direct
|
|
5314
|
+
// child.
|
|
4999
5315
|
expect(staleNestedPlaceholder.isConnected).toBe(false);
|
|
5000
5316
|
const currentPlaceholder = embed.getPreRenderPlaceHolderElement();
|
|
5001
5317
|
expect(currentPlaceholder.parentElement).toBe(hostElement);
|
|
@@ -5009,7 +5325,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
5009
5325
|
const tabsIsTyped = false;
|
|
5010
5326
|
const tabsHasContractFields = true;
|
|
5011
5327
|
const probeUnknownField = (r) =>
|
|
5012
|
-
// @ts-expect-error — field not on the GetTabs contract (was
|
|
5328
|
+
// @ts-expect-error — field not on the GetTabs contract (was
|
|
5329
|
+
// silent when `any`)
|
|
5013
5330
|
r.tabCount;
|
|
5014
5331
|
void probeUnknownField;
|
|
5015
5332
|
const reload = () => searchEmbed.trigger(types_1.HostEvent.Reload);
|
|
@@ -5019,4 +5336,135 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
5019
5336
|
});
|
|
5020
5337
|
});
|
|
5021
5338
|
});
|
|
5339
|
+
describe('excludeConfigFromURL', () => {
|
|
5340
|
+
const lbConfig = {
|
|
5341
|
+
liveboardId,
|
|
5342
|
+
hiddenActions: [types_1.Action.Download],
|
|
5343
|
+
additionalFlags: { internalBlinkFlag: true },
|
|
5344
|
+
liveboardV2: true,
|
|
5345
|
+
};
|
|
5346
|
+
const withPostMessage = (viewConfig) => ({
|
|
5347
|
+
...viewConfig,
|
|
5348
|
+
additionalFlags: { ...viewConfig.additionalFlags, excludeConfigFromURL: true },
|
|
5349
|
+
});
|
|
5350
|
+
const renderAndGetSrc = async (viewConfig) => {
|
|
5351
|
+
const embed = new index_1.LiveboardEmbed((0, test_utils_1.getRootEl)(), { ...defaultViewConfig, ...viewConfig });
|
|
5352
|
+
await embed.render();
|
|
5353
|
+
await (0, test_utils_1.waitFor)(() => !!(0, test_utils_1.getIFrameEl)());
|
|
5354
|
+
return { embed, src: (0, test_utils_1.getIFrameSrc)() };
|
|
5355
|
+
};
|
|
5356
|
+
const signalFrameReady = () => {
|
|
5357
|
+
(0, test_utils_1.postMessageToParent)((0, test_utils_1.getIFrameEl)().contentWindow, {
|
|
5358
|
+
type: index_1.EmbedEvent.EmbedListenerReady,
|
|
5359
|
+
});
|
|
5360
|
+
};
|
|
5361
|
+
beforeEach(() => {
|
|
5362
|
+
document.body.innerHTML = (0, test_utils_1.getDocumentBody)();
|
|
5363
|
+
mockProcessTrigger.mockReset();
|
|
5364
|
+
mockProcessTrigger.mockResolvedValue({});
|
|
5365
|
+
(0, index_1.init)({
|
|
5366
|
+
thoughtSpotHost,
|
|
5367
|
+
authType: index_1.AuthType.None,
|
|
5368
|
+
});
|
|
5369
|
+
});
|
|
5370
|
+
test('leaves the URL untouched when the flag is not set', async () => {
|
|
5371
|
+
const { src } = await renderAndGetSrc(lbConfig);
|
|
5372
|
+
expect(src).toContain('hideAction=');
|
|
5373
|
+
expect(src).toContain('internalBlinkFlag=true');
|
|
5374
|
+
expect(src).toContain('isPinboardV2Enabled=true');
|
|
5375
|
+
});
|
|
5376
|
+
test('keeps only the bootstrap params on the URL when the flag is set', async () => {
|
|
5377
|
+
const { src } = await renderAndGetSrc(withPostMessage(lbConfig));
|
|
5378
|
+
// Boot and auth handshake stays on the URL.
|
|
5379
|
+
expect(src).toContain('hostAppUrl=');
|
|
5380
|
+
expect(src).toContain(`authType=${index_1.AuthType.None}`);
|
|
5381
|
+
expect(src).toContain(`sdkVersion=${package_json_1.version}`);
|
|
5382
|
+
expect(src).toContain('blockNonEmbedFullAppAccess=true');
|
|
5383
|
+
expect(src).toContain('viewPortHeight=');
|
|
5384
|
+
// View configuration and internal flags do not.
|
|
5385
|
+
expect(src).not.toContain('hideAction=');
|
|
5386
|
+
expect(src).not.toContain('internalBlinkFlag');
|
|
5387
|
+
expect(src).not.toContain('isPinboardV2Enabled');
|
|
5388
|
+
expect(src).not.toContain('enableDataPanelV2');
|
|
5389
|
+
});
|
|
5390
|
+
test('strips a non-bootstrap additionalFlag from the URL when the flag is set', async () => {
|
|
5391
|
+
const { src } = await renderAndGetSrc({
|
|
5392
|
+
...lbConfig,
|
|
5393
|
+
additionalFlags: {
|
|
5394
|
+
internalBlinkFlag: true,
|
|
5395
|
+
someCustomFlag: 'abc',
|
|
5396
|
+
excludeConfigFromURL: true,
|
|
5397
|
+
},
|
|
5398
|
+
});
|
|
5399
|
+
expect(src).not.toContain('internalBlinkFlag');
|
|
5400
|
+
expect(src).not.toContain('someCustomFlag');
|
|
5401
|
+
});
|
|
5402
|
+
test('keeps an additionalFlag that overrides a bootstrap param on the URL', async () => {
|
|
5403
|
+
const { src } = await renderAndGetSrc({
|
|
5404
|
+
...lbConfig,
|
|
5405
|
+
additionalFlags: { [types_1.Param.OverrideOrgId]: 42, excludeConfigFromURL: true },
|
|
5406
|
+
});
|
|
5407
|
+
expect(src).toContain(`${types_1.Param.OverrideOrgId}=42`);
|
|
5408
|
+
});
|
|
5409
|
+
test('keeps the deep-link route on the URL when the flag is set', async () => {
|
|
5410
|
+
const { src } = await renderAndGetSrc(withPostMessage(lbConfig));
|
|
5411
|
+
expect(src).toContain(`/embed/viz/${liveboardId}`);
|
|
5412
|
+
});
|
|
5413
|
+
test('sends the full config over UpdateEmbedParams once the frame is ready', async () => {
|
|
5414
|
+
await renderAndGetSrc(withPostMessage(lbConfig));
|
|
5415
|
+
signalFrameReady();
|
|
5416
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
5417
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(expect.any(Object), types_1.HostEvent.UpdateEmbedParams, expect.any(String), expect.objectContaining({
|
|
5418
|
+
liveboardId,
|
|
5419
|
+
hiddenActions: [types_1.Action.Download],
|
|
5420
|
+
internalBlinkFlag: true,
|
|
5421
|
+
[types_1.Param.HideActions]: expect.arrayContaining([types_1.Action.Download]),
|
|
5422
|
+
}), undefined);
|
|
5423
|
+
});
|
|
5424
|
+
});
|
|
5425
|
+
test('sends UpdateEmbedParams again every time the frame signals ready', async () => {
|
|
5426
|
+
await renderAndGetSrc(withPostMessage(lbConfig));
|
|
5427
|
+
signalFrameReady();
|
|
5428
|
+
signalFrameReady();
|
|
5429
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
5430
|
+
const updateCalls = mockProcessTrigger.mock.calls.filter((call) => call[1] === types_1.HostEvent.UpdateEmbedParams);
|
|
5431
|
+
expect(updateCalls).toHaveLength(2);
|
|
5432
|
+
});
|
|
5433
|
+
});
|
|
5434
|
+
test('does not send UpdateEmbedParams when the flag is not set', async () => {
|
|
5435
|
+
await renderAndGetSrc(lbConfig);
|
|
5436
|
+
signalFrameReady();
|
|
5437
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
5438
|
+
const updateCalls = mockProcessTrigger.mock.calls.filter((call) => call[1] === types_1.HostEvent.UpdateEmbedParams);
|
|
5439
|
+
expect(updateCalls).toHaveLength(0);
|
|
5440
|
+
});
|
|
5441
|
+
});
|
|
5442
|
+
test('does not double-send for a pre-rendered embed that is shown', async () => {
|
|
5443
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
5444
|
+
window.ResizeObserver =
|
|
5445
|
+
window.ResizeObserver ||
|
|
5446
|
+
jest.fn().mockImplementation(() => ({
|
|
5447
|
+
disconnect: jest.fn(),
|
|
5448
|
+
observe: jest.fn(),
|
|
5449
|
+
unobserve: jest.fn(),
|
|
5450
|
+
}));
|
|
5451
|
+
const embed = new index_1.LiveboardEmbed((0, test_utils_1.getRootEl)(), {
|
|
5452
|
+
...defaultViewConfig,
|
|
5453
|
+
...withPostMessage(lbConfig),
|
|
5454
|
+
preRenderId: 'send-config-post-message',
|
|
5455
|
+
});
|
|
5456
|
+
await embed.preRender();
|
|
5457
|
+
await (0, test_utils_1.waitFor)(() => !!(0, test_utils_1.getIFrameEl)());
|
|
5458
|
+
signalFrameReady();
|
|
5459
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
5460
|
+
expect(embed.isEmbedContainerLoaded).toBe(true);
|
|
5461
|
+
});
|
|
5462
|
+
mockProcessTrigger.mockClear();
|
|
5463
|
+
await embed.showPreRender();
|
|
5464
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
5465
|
+
const updateCalls = mockProcessTrigger.mock.calls.filter((call) => call[1] === types_1.HostEvent.UpdateEmbedParams);
|
|
5466
|
+
expect(updateCalls).toHaveLength(1);
|
|
5467
|
+
});
|
|
5468
|
+
});
|
|
5469
|
+
});
|
|
5022
5470
|
//# sourceMappingURL=ts-embed.spec.js.map
|