@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
|
@@ -62,7 +62,7 @@ import { logger } from '../utils/logger';
|
|
|
62
62
|
import { version } from '../../package.json';
|
|
63
63
|
import { HiddenActionItemByDefaultForSearchEmbed } from './search';
|
|
64
64
|
import { processTrigger } from '../utils/processTrigger';
|
|
65
|
-
import { UIPassthroughEvent } from '
|
|
65
|
+
import { UIPassthroughEvent } from '../contracts/ui-passthrough-contracts';
|
|
66
66
|
import * as sessionInfoService from '../utils/sessionInfoService';
|
|
67
67
|
import * as authToken from '../authToken';
|
|
68
68
|
import * as apiIntercept from '../api-intercept';
|
|
@@ -243,7 +243,10 @@ describe('Unit test case for ts embed', () => {
|
|
|
243
243
|
liveboardEmbed.render();
|
|
244
244
|
mockProcessTrigger.mockResolvedValue({ session: 'test' });
|
|
245
245
|
await executeAfterWait(async () => {
|
|
246
|
-
|
|
246
|
+
// `false` is a deliberately off-contract payload here — this
|
|
247
|
+
// asserts raw passthrough to processTrigger, not a real Save
|
|
248
|
+
// payload — so it is cast past the typed `data` parameter.
|
|
249
|
+
await liveboardEmbed.trigger(HostEvent.Save, false as any);
|
|
247
250
|
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
248
251
|
getIFrameEl(),
|
|
249
252
|
HostEvent.Save,
|
|
@@ -2961,8 +2964,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
2961
2964
|
|
|
2962
2965
|
// Reverts to the exact value the container had before.
|
|
2963
2966
|
expect(customContainer.style.position).toBe('static');
|
|
2964
|
-
// The custom container reference is dropped (back to the
|
|
2965
|
-
// body) so a destroyed embed does not pin the (possibly
|
|
2967
|
+
// The custom container reference is dropped (back to the
|
|
2968
|
+
// default body) so a destroyed embed does not pin the (possibly
|
|
2966
2969
|
// detached) element in memory.
|
|
2967
2970
|
expect((libEmbed as any).preRenderContainerEl).toBe(document.body);
|
|
2968
2971
|
|
|
@@ -3016,8 +3019,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
3016
3019
|
|
|
3017
3020
|
libEmbed.destroy();
|
|
3018
3021
|
|
|
3019
|
-
// The body sentinel must never be treated as a custom
|
|
3020
|
-
// no position override to apply and none to restore.
|
|
3022
|
+
// The body sentinel must never be treated as a custom
|
|
3023
|
+
// container: no position override to apply and none to restore.
|
|
3021
3024
|
expect(document.body.style.position).toBe(originalBodyPosition);
|
|
3022
3025
|
expect(document.body.dataset.tsEmbedOriginalPosition).toBeUndefined();
|
|
3023
3026
|
});
|
|
@@ -3152,10 +3155,11 @@ describe('Unit test case for ts embed', () => {
|
|
|
3152
3155
|
|
|
3153
3156
|
libEmbed.syncPreRenderStyle();
|
|
3154
3157
|
|
|
3155
|
-
// applyPreRenderContainerPositioning() reads
|
|
3156
|
-
// instead of taking the container as an
|
|
3157
|
-
// to assign the field before calling
|
|
3158
|
-
// lands on the detached node and
|
|
3158
|
+
// applyPreRenderContainerPositioning() reads
|
|
3159
|
+
// preRenderContainerEl instead of taking the container as an
|
|
3160
|
+
// argument, so reconcile has to assign the field before calling
|
|
3161
|
+
// it — otherwise the override lands on the detached node and
|
|
3162
|
+
// the fresh one stays static.
|
|
3159
3163
|
expect((libEmbed as any).preRenderContainerEl).toBe(newContainer);
|
|
3160
3164
|
expect(newContainer.style.position).toBe('relative');
|
|
3161
3165
|
expect(newContainer.dataset.tsEmbedOriginalPosition).toBe('static');
|
|
@@ -3286,7 +3290,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
3286
3290
|
await firstEmbed.preRender();
|
|
3287
3291
|
await waitFor(() => !!getIFrameEl());
|
|
3288
3292
|
|
|
3289
|
-
// Reset position to static so the connecting embed also
|
|
3293
|
+
// Reset position to static so the connecting embed also
|
|
3294
|
+
// triggers the guard.
|
|
3290
3295
|
customContainer.style.position = 'static';
|
|
3291
3296
|
delete customContainer.dataset['preRenderContainerOriginalPosition'];
|
|
3292
3297
|
|
|
@@ -3390,8 +3395,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
3390
3395
|
await firstEmbed.preRender();
|
|
3391
3396
|
await waitFor(() => !!getIFrameEl());
|
|
3392
3397
|
|
|
3393
|
-
// Same config on both components — the value is redundant
|
|
3394
|
-
// not wrong, so nagging about it would be noise.
|
|
3398
|
+
// Same config on both components — the value is redundant
|
|
3399
|
+
// but not wrong, so nagging about it would be noise.
|
|
3395
3400
|
const connectingEmbed = new LiveboardEmbed('#tsEmbedDiv', {
|
|
3396
3401
|
preRenderId: 'connect-same-element',
|
|
3397
3402
|
liveboardId: 'myLiveboardId',
|
|
@@ -3424,8 +3429,9 @@ describe('Unit test case for ts embed', () => {
|
|
|
3424
3429
|
await firstEmbed.preRender();
|
|
3425
3430
|
await waitFor(() => !!getIFrameEl());
|
|
3426
3431
|
|
|
3427
|
-
// A selector that resolves to the owner's element is the
|
|
3428
|
-
// container, so the comparison must be by resolved
|
|
3432
|
+
// A selector that resolves to the owner's element is the
|
|
3433
|
+
// same container, so the comparison must be by resolved
|
|
3434
|
+
// node.
|
|
3429
3435
|
const connectingEmbed = new LiveboardEmbed('#tsEmbedDiv', {
|
|
3430
3436
|
preRenderId: 'connect-same-selector',
|
|
3431
3437
|
liveboardId: 'myLiveboardId',
|
|
@@ -3489,8 +3495,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
3489
3495
|
await waitFor(() => !!getIFrameEl());
|
|
3490
3496
|
|
|
3491
3497
|
// Simulate a wrapper with no live embed behind it: the
|
|
3492
|
-
// __tsEmbed stamp used to locate the owner is gone, so
|
|
3493
|
-
// is no container to inherit.
|
|
3498
|
+
// __tsEmbed stamp used to locate the owner is gone, so
|
|
3499
|
+
// there is no container to inherit.
|
|
3494
3500
|
const wrapper = document.getElementById(
|
|
3495
3501
|
firstEmbed.getPreRenderIds().wrapper,
|
|
3496
3502
|
);
|
|
@@ -4377,7 +4383,9 @@ describe('Unit test case for ts embed', () => {
|
|
|
4377
4383
|
|
|
4378
4384
|
test('should return getPreRenderObj and log if same object', () => {
|
|
4379
4385
|
const searchEmbed = new SearchEmbed(getRootEl(), defaultViewConfig);
|
|
4380
|
-
|
|
4386
|
+
// debug, not info: the wrapper points at the embed being shown, so
|
|
4387
|
+
// this is now the common case rather than a rare diagnostic.
|
|
4388
|
+
const loggerSpy = jest.spyOn(logger, 'debug');
|
|
4381
4389
|
|
|
4382
4390
|
// getPreRenderObj reads the embed reference from preRenderWrapper
|
|
4383
4391
|
(searchEmbed as any).preRenderWrapper = {
|
|
@@ -5269,16 +5277,6 @@ describe('Additional Coverage Tests', () => {
|
|
|
5269
5277
|
});
|
|
5270
5278
|
});
|
|
5271
5279
|
|
|
5272
|
-
test('should test getIframeCenter calculation', async () => {
|
|
5273
|
-
const searchEmbed = new SearchEmbed(getRootEl(), defaultViewConfig);
|
|
5274
|
-
await searchEmbed.render();
|
|
5275
|
-
await executeAfterWait(() => {
|
|
5276
|
-
const center = searchEmbed['getIframeCenter']();
|
|
5277
|
-
expect(center).toHaveProperty('iframeCenter');
|
|
5278
|
-
expect(center).toHaveProperty('iframeHeight');
|
|
5279
|
-
expect(center).toHaveProperty('viewPortHeight');
|
|
5280
|
-
});
|
|
5281
|
-
});
|
|
5282
5280
|
|
|
5283
5281
|
test('should handle preRender with replaceExistingPreRender=true', async () => {
|
|
5284
5282
|
createRootEleForEmbed();
|
|
@@ -5366,12 +5364,14 @@ describe('Trigger method edge cases', () => {
|
|
|
5366
5364
|
const handleErrorSpy = jest.spyOn(searchEmbed as any, 'handleError').mockImplementation(() => {});
|
|
5367
5365
|
await searchEmbed.render();
|
|
5368
5366
|
|
|
5369
|
-
// First processTrigger call is getAvailableUIPassthroughKeys for
|
|
5367
|
+
// First processTrigger call is getAvailableUIPassthroughKeys for
|
|
5368
|
+
// DrillDown
|
|
5370
5369
|
mockProcessTrigger.mockResolvedValueOnce([
|
|
5371
5370
|
{ value: { keys: Object.values(UIPassthroughEvent) } },
|
|
5372
5371
|
]);
|
|
5373
5372
|
|
|
5374
|
-
// DrillDown with no points → throwDrillDownValidationError →
|
|
5373
|
+
// DrillDown with no points → throwDrillDownValidationError →
|
|
5374
|
+
// isValidationError=true
|
|
5375
5375
|
await expect(
|
|
5376
5376
|
searchEmbed.trigger(HostEvent.DrillDown, {} as any),
|
|
5377
5377
|
).rejects.toThrow('DrillDown requires a valid points object');
|
|
@@ -5546,7 +5546,8 @@ describe('Fullscreen change handler behavior', () => {
|
|
|
5546
5546
|
init({
|
|
5547
5547
|
thoughtSpotHost: 'tshost',
|
|
5548
5548
|
authType: AuthType.None,
|
|
5549
|
-
// disableFullscreenPresentation not set → defaults to true via ??
|
|
5549
|
+
// disableFullscreenPresentation not set → defaults to true via ??
|
|
5550
|
+
// true
|
|
5550
5551
|
});
|
|
5551
5552
|
|
|
5552
5553
|
const embed = new SearchEmbed(getRootEl(), defaultViewConfig);
|
|
@@ -5572,7 +5573,8 @@ describe('Fullscreen change handler behavior', () => {
|
|
|
5572
5573
|
|
|
5573
5574
|
embed['setupFullscreenChangeHandler']();
|
|
5574
5575
|
|
|
5575
|
-
// Capture the registered handler directly instead of dispatching to
|
|
5576
|
+
// Capture the registered handler directly instead of dispatching to
|
|
5577
|
+
// document
|
|
5576
5578
|
const fullscreenCall = addEventListenerSpy.mock.calls.find((c) => c[0] === 'fullscreenchange');
|
|
5577
5579
|
expect(fullscreenCall).toBeTruthy();
|
|
5578
5580
|
const handler = fullscreenCall[1] as EventListener;
|
|
@@ -5680,7 +5682,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
5680
5682
|
embed2.showPreRender();
|
|
5681
5683
|
|
|
5682
5684
|
await executeAfterWait(() => {
|
|
5683
|
-
|
|
5685
|
+
// Not LastCalledWith: LiveboardEmbed fires Navigate after this.
|
|
5686
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5684
5687
|
expect.any(Object),
|
|
5685
5688
|
HostEvent.UpdateEmbedParams,
|
|
5686
5689
|
expect.any(String),
|
|
@@ -5733,7 +5736,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
5733
5736
|
embed2.showPreRender();
|
|
5734
5737
|
|
|
5735
5738
|
await executeAfterWait(() => {
|
|
5736
|
-
|
|
5739
|
+
// Not LastCalledWith: LiveboardEmbed fires Navigate after this.
|
|
5740
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5737
5741
|
expect.any(Object),
|
|
5738
5742
|
HostEvent.UpdateEmbedParams,
|
|
5739
5743
|
expect.any(String),
|
|
@@ -5753,6 +5757,442 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
5753
5757
|
});
|
|
5754
5758
|
});
|
|
5755
5759
|
|
|
5760
|
+
test('should carry the new config filters in UpdateEmbedParams', async () => {
|
|
5761
|
+
await setupPreRenderTest('params-new-filters', { liveboardId: 'original-lb' });
|
|
5762
|
+
|
|
5763
|
+
const runtimeFilters = [
|
|
5764
|
+
{
|
|
5765
|
+
columnName: 'Color',
|
|
5766
|
+
operator: RuntimeFilterOp.IN,
|
|
5767
|
+
values: ['red', 'blue'],
|
|
5768
|
+
},
|
|
5769
|
+
];
|
|
5770
|
+
|
|
5771
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5772
|
+
preRenderId: 'params-new-filters',
|
|
5773
|
+
liveboardId: 'original-lb',
|
|
5774
|
+
runtimeFilters,
|
|
5775
|
+
});
|
|
5776
|
+
|
|
5777
|
+
embed2.showPreRender();
|
|
5778
|
+
|
|
5779
|
+
await executeAfterWait(() => {
|
|
5780
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5781
|
+
expect.any(Object),
|
|
5782
|
+
HostEvent.UpdateEmbedParams,
|
|
5783
|
+
expect.any(String),
|
|
5784
|
+
expect.objectContaining({
|
|
5785
|
+
runtimeFilters,
|
|
5786
|
+
// The serialized form is the one the container reads.
|
|
5787
|
+
runtimeFilterParams: 'col1=Color&op1=IN&val1=red&val1=blue',
|
|
5788
|
+
}),
|
|
5789
|
+
undefined,
|
|
5790
|
+
);
|
|
5791
|
+
|
|
5792
|
+
// Everything rides in the params payload; nothing follows it.
|
|
5793
|
+
const runtimeFilterCalls = mockProcessTrigger.mock.calls.filter(
|
|
5794
|
+
(call: any[]) => call[1] === HostEvent.UpdateRuntimeFilters,
|
|
5795
|
+
);
|
|
5796
|
+
expect(runtimeFilterCalls).toHaveLength(0);
|
|
5797
|
+
});
|
|
5798
|
+
});
|
|
5799
|
+
|
|
5800
|
+
test('should serialize the filters when they are not excluded from the URL', async () => {
|
|
5801
|
+
await setupPreRenderTest('params-url-filters', { liveboardId: 'original-lb' });
|
|
5802
|
+
|
|
5803
|
+
// With the flag off, getDefaultAppInitData leaves runtimeFilterParams
|
|
5804
|
+
// null and a URL render carries the filters in the iframe's query
|
|
5805
|
+
// string. A show cycle has no URL, so the payload has to carry them.
|
|
5806
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5807
|
+
preRenderId: 'params-url-filters',
|
|
5808
|
+
liveboardId: 'original-lb',
|
|
5809
|
+
excludeRuntimeFiltersfromURL: false,
|
|
5810
|
+
runtimeFilters: [
|
|
5811
|
+
{
|
|
5812
|
+
columnName: 'Color',
|
|
5813
|
+
operator: RuntimeFilterOp.IN,
|
|
5814
|
+
values: ['red'],
|
|
5815
|
+
},
|
|
5816
|
+
],
|
|
5817
|
+
});
|
|
5818
|
+
|
|
5819
|
+
embed2.showPreRender();
|
|
5820
|
+
|
|
5821
|
+
await executeAfterWait(() => {
|
|
5822
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5823
|
+
expect.any(Object),
|
|
5824
|
+
HostEvent.UpdateEmbedParams,
|
|
5825
|
+
expect.any(String),
|
|
5826
|
+
expect.objectContaining({
|
|
5827
|
+
runtimeFilterParams: 'col1=Color&op1=IN&val1=red',
|
|
5828
|
+
}),
|
|
5829
|
+
undefined,
|
|
5830
|
+
);
|
|
5831
|
+
});
|
|
5832
|
+
});
|
|
5833
|
+
|
|
5834
|
+
test('should trigger Navigate only after UpdateEmbedParams has settled', async () => {
|
|
5835
|
+
await setupPreRenderTest('navigate-after-params', {
|
|
5836
|
+
liveboardId: 'original-lb',
|
|
5837
|
+
runtimeFilters: [
|
|
5838
|
+
{
|
|
5839
|
+
columnName: 'Color',
|
|
5840
|
+
operator: RuntimeFilterOp.IN,
|
|
5841
|
+
values: ['red'],
|
|
5842
|
+
},
|
|
5843
|
+
],
|
|
5844
|
+
});
|
|
5845
|
+
|
|
5846
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5847
|
+
preRenderId: 'navigate-after-params',
|
|
5848
|
+
liveboardId: 'updated-lb',
|
|
5849
|
+
});
|
|
5850
|
+
|
|
5851
|
+
embed2.showPreRender();
|
|
5852
|
+
|
|
5853
|
+
// Inside the settle window the params are already out
|
|
5854
|
+
// and Navigate is not.
|
|
5855
|
+
await executeAfterWait(() => {
|
|
5856
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call: any[]) => call[1]);
|
|
5857
|
+
expect(eventTypes).toContain(HostEvent.UpdateEmbedParams);
|
|
5858
|
+
expect(eventTypes).not.toContain(HostEvent.Navigate);
|
|
5859
|
+
}, 50);
|
|
5860
|
+
|
|
5861
|
+
await executeAfterWait(() => {
|
|
5862
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call: any[]) => call[1]);
|
|
5863
|
+
// A Navigate that beat the params would make the container load
|
|
5864
|
+
// `updated-lb` while still holding `original-lb`'s runtime filters,
|
|
5865
|
+
// and drop the params that then arrive mid-load (SCAL-336321).
|
|
5866
|
+
expect(eventTypes).toContain(HostEvent.Navigate);
|
|
5867
|
+
expect(eventTypes.indexOf(HostEvent.UpdateEmbedParams)).toBeLessThan(
|
|
5868
|
+
eventTypes.indexOf(HostEvent.Navigate),
|
|
5869
|
+
);
|
|
5870
|
+
}, 300);
|
|
5871
|
+
});
|
|
5872
|
+
|
|
5873
|
+
test('should mark the params empty when the config declares no filters', async () => {
|
|
5874
|
+
await setupPreRenderTest('params-clear-filters', {
|
|
5875
|
+
liveboardId: 'original-lb',
|
|
5876
|
+
runtimeFilters: [
|
|
5877
|
+
{
|
|
5878
|
+
columnName: 'Color',
|
|
5879
|
+
operator: RuntimeFilterOp.IN,
|
|
5880
|
+
values: ['red', 'blue'],
|
|
5881
|
+
},
|
|
5882
|
+
],
|
|
5883
|
+
});
|
|
5884
|
+
|
|
5885
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5886
|
+
preRenderId: 'params-clear-filters',
|
|
5887
|
+
liveboardId: 'original-lb',
|
|
5888
|
+
});
|
|
5889
|
+
|
|
5890
|
+
embed2.showPreRender();
|
|
5891
|
+
|
|
5892
|
+
await executeAfterWait(() => {
|
|
5893
|
+
// Not null and not '': the container only reads this field when it
|
|
5894
|
+
// is truthy, so either would leave the previous embed's filters in
|
|
5895
|
+
// place. A lone separator passes that gate and parses to {}.
|
|
5896
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5897
|
+
expect.any(Object),
|
|
5898
|
+
HostEvent.UpdateEmbedParams,
|
|
5899
|
+
expect.any(String),
|
|
5900
|
+
expect.objectContaining({ runtimeFilterParams: '&' }),
|
|
5901
|
+
undefined,
|
|
5902
|
+
);
|
|
5903
|
+
|
|
5904
|
+
const runtimeFilterCalls = mockProcessTrigger.mock.calls.filter(
|
|
5905
|
+
(call: any[]) => call[1] === HostEvent.UpdateRuntimeFilters,
|
|
5906
|
+
);
|
|
5907
|
+
expect(runtimeFilterCalls).toHaveLength(0);
|
|
5908
|
+
});
|
|
5909
|
+
});
|
|
5910
|
+
|
|
5911
|
+
test('should mark the params empty for an explicitly empty filter array', async () => {
|
|
5912
|
+
await setupPreRenderTest('params-empty-array', {
|
|
5913
|
+
liveboardId: 'original-lb',
|
|
5914
|
+
runtimeFilters: [
|
|
5915
|
+
{
|
|
5916
|
+
columnName: 'Color',
|
|
5917
|
+
operator: RuntimeFilterOp.IN,
|
|
5918
|
+
values: ['red'],
|
|
5919
|
+
},
|
|
5920
|
+
],
|
|
5921
|
+
});
|
|
5922
|
+
|
|
5923
|
+
// `runtimeFilters: []` is the shape the customer reported as not
|
|
5924
|
+
// resetting anything.
|
|
5925
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5926
|
+
preRenderId: 'params-empty-array',
|
|
5927
|
+
liveboardId: 'original-lb',
|
|
5928
|
+
runtimeFilters: [],
|
|
5929
|
+
});
|
|
5930
|
+
|
|
5931
|
+
embed2.showPreRender();
|
|
5932
|
+
|
|
5933
|
+
await executeAfterWait(() => {
|
|
5934
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5935
|
+
expect.any(Object),
|
|
5936
|
+
HostEvent.UpdateEmbedParams,
|
|
5937
|
+
expect.any(String),
|
|
5938
|
+
expect.objectContaining({ runtimeFilterParams: '&' }),
|
|
5939
|
+
undefined,
|
|
5940
|
+
);
|
|
5941
|
+
});
|
|
5942
|
+
});
|
|
5943
|
+
|
|
5944
|
+
test('should mark the params empty when no config in the chain has filters', async () => {
|
|
5945
|
+
await setupPreRenderTest('params-no-filters', { liveboardId: 'original-lb' });
|
|
5946
|
+
|
|
5947
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5948
|
+
preRenderId: 'params-no-filters',
|
|
5949
|
+
liveboardId: 'updated-lb',
|
|
5950
|
+
});
|
|
5951
|
+
|
|
5952
|
+
embed2.showPreRender();
|
|
5953
|
+
|
|
5954
|
+
await executeAfterWait(() => {
|
|
5955
|
+
const paramsCall = mockProcessTrigger.mock.calls.find(
|
|
5956
|
+
(call: any[]) => call[1] === HostEvent.UpdateEmbedParams,
|
|
5957
|
+
);
|
|
5958
|
+
expect(paramsCall?.[3]).not.toHaveProperty('runtimeFilters');
|
|
5959
|
+
expect(paramsCall?.[3].runtimeFilterParams).toBe('&');
|
|
5960
|
+
});
|
|
5961
|
+
});
|
|
5962
|
+
|
|
5963
|
+
test('should state each embed filters as the pre-render is handed along', async () => {
|
|
5964
|
+
await setupPreRenderTest('params-chain', {
|
|
5965
|
+
liveboardId: 'original-lb',
|
|
5966
|
+
runtimeFilters: [
|
|
5967
|
+
{
|
|
5968
|
+
columnName: 'Color',
|
|
5969
|
+
operator: RuntimeFilterOp.IN,
|
|
5970
|
+
values: ['red', 'blue'],
|
|
5971
|
+
},
|
|
5972
|
+
],
|
|
5973
|
+
});
|
|
5974
|
+
|
|
5975
|
+
// Second in the chain declares none, so it empties the field rather
|
|
5976
|
+
// than letting the creator's filters stand.
|
|
5977
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5978
|
+
preRenderId: 'params-chain',
|
|
5979
|
+
liveboardId: 'second-lb',
|
|
5980
|
+
});
|
|
5981
|
+
await embed2.showPreRender();
|
|
5982
|
+
await executeAfterWait(() => {
|
|
5983
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
5984
|
+
expect.any(Object),
|
|
5985
|
+
HostEvent.UpdateEmbedParams,
|
|
5986
|
+
expect.any(String),
|
|
5987
|
+
expect.objectContaining({ runtimeFilterParams: '&' }),
|
|
5988
|
+
undefined,
|
|
5989
|
+
);
|
|
5990
|
+
});
|
|
5991
|
+
|
|
5992
|
+
mockProcessTrigger.mockClear();
|
|
5993
|
+
|
|
5994
|
+
// Third declares its own, and states them without reference to either
|
|
5995
|
+
// embed before it.
|
|
5996
|
+
const embed3 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
5997
|
+
preRenderId: 'params-chain',
|
|
5998
|
+
liveboardId: 'third-lb',
|
|
5999
|
+
runtimeFilters: [
|
|
6000
|
+
{
|
|
6001
|
+
columnName: 'Region',
|
|
6002
|
+
operator: RuntimeFilterOp.EQ,
|
|
6003
|
+
values: ['North'],
|
|
6004
|
+
},
|
|
6005
|
+
],
|
|
6006
|
+
});
|
|
6007
|
+
await embed3.showPreRender();
|
|
6008
|
+
|
|
6009
|
+
await executeAfterWait(() => {
|
|
6010
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
6011
|
+
expect.any(Object),
|
|
6012
|
+
HostEvent.UpdateEmbedParams,
|
|
6013
|
+
expect.any(String),
|
|
6014
|
+
expect.objectContaining({
|
|
6015
|
+
runtimeFilterParams: 'col1=Region&op1=EQ&val1=North',
|
|
6016
|
+
}),
|
|
6017
|
+
undefined,
|
|
6018
|
+
);
|
|
6019
|
+
});
|
|
6020
|
+
});
|
|
6021
|
+
|
|
6022
|
+
test('should carry the new config runtime parameters in UpdateEmbedParams', async () => {
|
|
6023
|
+
await setupPreRenderTest('params-parameters', {
|
|
6024
|
+
liveboardId: 'original-lb',
|
|
6025
|
+
runtimeParameters: [{ name: 'Region Param', value: 'East' }],
|
|
6026
|
+
});
|
|
6027
|
+
|
|
6028
|
+
const runtimeParameters = [{ name: 'Region Param', value: 'West' }];
|
|
6029
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6030
|
+
preRenderId: 'params-parameters',
|
|
6031
|
+
liveboardId: 'original-lb',
|
|
6032
|
+
runtimeParameters,
|
|
6033
|
+
});
|
|
6034
|
+
|
|
6035
|
+
embed2.showPreRender();
|
|
6036
|
+
|
|
6037
|
+
await executeAfterWait(() => {
|
|
6038
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
6039
|
+
expect.any(Object),
|
|
6040
|
+
HostEvent.UpdateEmbedParams,
|
|
6041
|
+
expect.any(String),
|
|
6042
|
+
expect.objectContaining({
|
|
6043
|
+
runtimeParameters,
|
|
6044
|
+
runtimeParameterParams: 'param1=Region%20Param¶mVal1=West',
|
|
6045
|
+
}),
|
|
6046
|
+
undefined,
|
|
6047
|
+
);
|
|
6048
|
+
|
|
6049
|
+
// A parameter always carries a value, so the payload says
|
|
6050
|
+
// everything there is to say — no follow-up event.
|
|
6051
|
+
const parameterCalls = mockProcessTrigger.mock.calls.filter(
|
|
6052
|
+
(call: any[]) => call[1] === HostEvent.UpdateParameters,
|
|
6053
|
+
);
|
|
6054
|
+
expect(parameterCalls).toHaveLength(0);
|
|
6055
|
+
});
|
|
6056
|
+
});
|
|
6057
|
+
|
|
6058
|
+
test('should mark the params empty when the config declares no parameters', async () => {
|
|
6059
|
+
await setupPreRenderTest('params-clear-parameters', {
|
|
6060
|
+
liveboardId: 'original-lb',
|
|
6061
|
+
runtimeParameters: [{ name: 'Region Param', value: 'East' }],
|
|
6062
|
+
});
|
|
6063
|
+
|
|
6064
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6065
|
+
preRenderId: 'params-clear-parameters',
|
|
6066
|
+
liveboardId: 'original-lb',
|
|
6067
|
+
});
|
|
6068
|
+
|
|
6069
|
+
embed2.showPreRender();
|
|
6070
|
+
|
|
6071
|
+
await executeAfterWait(() => {
|
|
6072
|
+
// Same gate as the filters: the container only reads this field
|
|
6073
|
+
// when it is truthy, so null would leave 'East' standing.
|
|
6074
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
6075
|
+
expect.any(Object),
|
|
6076
|
+
HostEvent.UpdateEmbedParams,
|
|
6077
|
+
expect.any(String),
|
|
6078
|
+
expect.objectContaining({ runtimeParameterParams: '&' }),
|
|
6079
|
+
undefined,
|
|
6080
|
+
);
|
|
6081
|
+
});
|
|
6082
|
+
});
|
|
6083
|
+
|
|
6084
|
+
test('should keep an empty string parameter value distinct from having none', async () => {
|
|
6085
|
+
await setupPreRenderTest('params-empty-value', { liveboardId: 'original-lb' });
|
|
6086
|
+
|
|
6087
|
+
// `paramVal1=` is that parameter's value, not an absence — so it must
|
|
6088
|
+
// not collapse to the empty marker.
|
|
6089
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6090
|
+
preRenderId: 'params-empty-value',
|
|
6091
|
+
liveboardId: 'original-lb',
|
|
6092
|
+
runtimeParameters: [{ name: 'Region Param', value: '' }],
|
|
6093
|
+
});
|
|
6094
|
+
|
|
6095
|
+
embed2.showPreRender();
|
|
6096
|
+
|
|
6097
|
+
await executeAfterWait(() => {
|
|
6098
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
6099
|
+
expect.any(Object),
|
|
6100
|
+
HostEvent.UpdateEmbedParams,
|
|
6101
|
+
expect.any(String),
|
|
6102
|
+
expect.objectContaining({
|
|
6103
|
+
runtimeParameterParams: 'param1=Region%20Param¶mVal1=',
|
|
6104
|
+
}),
|
|
6105
|
+
undefined,
|
|
6106
|
+
);
|
|
6107
|
+
});
|
|
6108
|
+
});
|
|
6109
|
+
|
|
6110
|
+
|
|
6111
|
+
test('should hand the pre-render over to the embed being shown', async () => {
|
|
6112
|
+
const embed1 = await setupPreRenderTest('take-over-state', { liveboardId: 'original-lb' });
|
|
6113
|
+
|
|
6114
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6115
|
+
preRenderId: 'take-over-state',
|
|
6116
|
+
liveboardId: 'second-lb',
|
|
6117
|
+
});
|
|
6118
|
+
|
|
6119
|
+
await embed2.showPreRender();
|
|
6120
|
+
|
|
6121
|
+
// It connected to embed1's pre-render and is now what the wrapper
|
|
6122
|
+
// points at, so getPreRenderObj() means "what is showing".
|
|
6123
|
+
expect((embed2 as any).getPreRenderObj()).toBe(embed2);
|
|
6124
|
+
expect((embed1 as any).getPreRenderObj()).toBe(embed2);
|
|
6125
|
+
});
|
|
6126
|
+
|
|
6127
|
+
test('should not strand callbacks when the container loads after the shown embed was hidden', async () => {
|
|
6128
|
+
// The creator is subscribed but the container has NOT announced itself
|
|
6129
|
+
// yet, which is the state a real pre-render starts in.
|
|
6130
|
+
const embed1 = await setupPreRenderTest('loaded-after-hide', { liveboardId: 'original-lb' });
|
|
6131
|
+
embed1.isEmbedContainerLoaded = false;
|
|
6132
|
+
|
|
6133
|
+
// Second embed shows, takes the pre-render over, then is hidden — which
|
|
6134
|
+
// unsubscribes it, so it will never hear EmbedListenerReady itself.
|
|
6135
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6136
|
+
preRenderId: 'loaded-after-hide',
|
|
6137
|
+
liveboardId: 'second-lb',
|
|
6138
|
+
});
|
|
6139
|
+
await embed2.showPreRender();
|
|
6140
|
+
embed2.hidePreRender();
|
|
6141
|
+
expect(embed2.isEmbedContainerLoaded).toBe(false);
|
|
6142
|
+
|
|
6143
|
+
// Container comes up and the creator hears it.
|
|
6144
|
+
(embed1 as any).createEmbedContainerHandler(EmbedEvent.EmbedListenerReady)();
|
|
6145
|
+
|
|
6146
|
+
mockProcessTrigger.mockClear();
|
|
6147
|
+
mockProcessTrigger.mockResolvedValue({});
|
|
6148
|
+
|
|
6149
|
+
// A third embed reads the state off embed2, which owns the wrapper and
|
|
6150
|
+
// never learned the container was up. Reading a per-instance snapshot
|
|
6151
|
+
// here leaves UpdateEmbedParams queued forever and the pre-render stuck
|
|
6152
|
+
// on the previous liveboard.
|
|
6153
|
+
const embed3 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6154
|
+
preRenderId: 'loaded-after-hide',
|
|
6155
|
+
liveboardId: 'third-lb',
|
|
6156
|
+
});
|
|
6157
|
+
await embed3.showPreRender();
|
|
6158
|
+
|
|
6159
|
+
expect(embed3.isEmbedContainerLoaded).toBe(true);
|
|
6160
|
+
await executeAfterWait(() => {
|
|
6161
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call: any[]) => call[1]);
|
|
6162
|
+
expect(eventTypes).toContain(HostEvent.UpdateEmbedParams);
|
|
6163
|
+
}, 300);
|
|
6164
|
+
});
|
|
6165
|
+
|
|
6166
|
+
test('should not reconcile runtime filters unless the view config opts in', async () => {
|
|
6167
|
+
await setupPreRenderTest('reconcile-flag-off', {
|
|
6168
|
+
liveboardId: 'original-lb',
|
|
6169
|
+
runtimeFilters: [
|
|
6170
|
+
{
|
|
6171
|
+
columnName: 'Color',
|
|
6172
|
+
operator: RuntimeFilterOp.IN,
|
|
6173
|
+
values: ['red', 'blue'],
|
|
6174
|
+
},
|
|
6175
|
+
],
|
|
6176
|
+
});
|
|
6177
|
+
|
|
6178
|
+
// Same shape as the clear-filters case above, minus the flag: the
|
|
6179
|
+
// previous config left filters on the shared pre-render and this one
|
|
6180
|
+
// declares none. Without preRenderConfig.reconcileRuntimeParams the SDK
|
|
6181
|
+
// leaves that to the container, so no UpdateRuntimeFilters goes out.
|
|
6182
|
+
const embed2 = new LiveboardEmbed('#tsEmbedDiv', {
|
|
6183
|
+
preRenderId: 'reconcile-flag-off',
|
|
6184
|
+
liveboardId: 'original-lb',
|
|
6185
|
+
});
|
|
6186
|
+
|
|
6187
|
+
embed2.showPreRender();
|
|
6188
|
+
|
|
6189
|
+
await executeAfterWait(() => {
|
|
6190
|
+
const eventTypes = mockProcessTrigger.mock.calls.map((call: any[]) => call[1]);
|
|
6191
|
+
expect(eventTypes).toContain(HostEvent.UpdateEmbedParams);
|
|
6192
|
+
expect(eventTypes).not.toContain(HostEvent.UpdateRuntimeFilters);
|
|
6193
|
+
});
|
|
6194
|
+
});
|
|
6195
|
+
|
|
5756
6196
|
test('should handle error when getUpdateEmbedParamsObject fails during showPreRender', async () => {
|
|
5757
6197
|
await setupPreRenderTest('error-test', { liveboardId: 'original-lb' });
|
|
5758
6198
|
|
|
@@ -6208,7 +6648,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
6208
6648
|
expect(hostElement.querySelector(`#${placeHolderId}`)).toBe(staleNestedPlaceholder);
|
|
6209
6649
|
// Before the fix this threw NotFoundError.
|
|
6210
6650
|
await expect(embed.showPreRender()).resolves.toBeDefined();
|
|
6211
|
-
// The stale nested placeholder is gone; the fresh one is a direct
|
|
6651
|
+
// The stale nested placeholder is gone; the fresh one is a direct
|
|
6652
|
+
// child.
|
|
6212
6653
|
expect(staleNestedPlaceholder.isConnected).toBe(false);
|
|
6213
6654
|
const currentPlaceholder = (
|
|
6214
6655
|
embed as any
|
|
@@ -6240,7 +6681,8 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
6240
6681
|
{ numberOfTabs: number; orderedTabIds: string[] }
|
|
6241
6682
|
> = true;
|
|
6242
6683
|
const probeUnknownField = (r: TabsResponse) =>
|
|
6243
|
-
// @ts-expect-error — field not on the GetTabs contract (was
|
|
6684
|
+
// @ts-expect-error — field not on the GetTabs contract (was
|
|
6685
|
+
// silent when `any`)
|
|
6244
6686
|
r.tabCount;
|
|
6245
6687
|
void probeUnknownField;
|
|
6246
6688
|
|
|
@@ -6253,3 +6695,175 @@ describe('ShowPreRender with UpdateEmbedParams', () => {
|
|
|
6253
6695
|
});
|
|
6254
6696
|
});
|
|
6255
6697
|
});
|
|
6698
|
+
|
|
6699
|
+
describe('excludeConfigFromURL', () => {
|
|
6700
|
+
const lbConfig = {
|
|
6701
|
+
liveboardId,
|
|
6702
|
+
hiddenActions: [Action.Download],
|
|
6703
|
+
additionalFlags: { internalBlinkFlag: true },
|
|
6704
|
+
liveboardV2: true,
|
|
6705
|
+
};
|
|
6706
|
+
|
|
6707
|
+
const withPostMessage = (viewConfig: any) => ({
|
|
6708
|
+
...viewConfig,
|
|
6709
|
+
additionalFlags: { ...viewConfig.additionalFlags, excludeConfigFromURL: true },
|
|
6710
|
+
});
|
|
6711
|
+
|
|
6712
|
+
const renderAndGetSrc = async (viewConfig: any) => {
|
|
6713
|
+
const embed = new LiveboardEmbed(getRootEl(), { ...defaultViewConfig, ...viewConfig });
|
|
6714
|
+
await embed.render();
|
|
6715
|
+
await waitFor(() => !!getIFrameEl());
|
|
6716
|
+
return { embed, src: getIFrameSrc() };
|
|
6717
|
+
};
|
|
6718
|
+
|
|
6719
|
+
const signalFrameReady = () => {
|
|
6720
|
+
postMessageToParent(getIFrameEl().contentWindow, {
|
|
6721
|
+
type: EmbedEvent.EmbedListenerReady,
|
|
6722
|
+
});
|
|
6723
|
+
};
|
|
6724
|
+
|
|
6725
|
+
beforeEach(() => {
|
|
6726
|
+
document.body.innerHTML = getDocumentBody();
|
|
6727
|
+
mockProcessTrigger.mockReset();
|
|
6728
|
+
mockProcessTrigger.mockResolvedValue({});
|
|
6729
|
+
init({
|
|
6730
|
+
thoughtSpotHost,
|
|
6731
|
+
authType: AuthType.None,
|
|
6732
|
+
});
|
|
6733
|
+
});
|
|
6734
|
+
|
|
6735
|
+
test('leaves the URL untouched when the flag is not set', async () => {
|
|
6736
|
+
const { src } = await renderAndGetSrc(lbConfig);
|
|
6737
|
+
|
|
6738
|
+
expect(src).toContain('hideAction=');
|
|
6739
|
+
expect(src).toContain('internalBlinkFlag=true');
|
|
6740
|
+
expect(src).toContain('isPinboardV2Enabled=true');
|
|
6741
|
+
});
|
|
6742
|
+
|
|
6743
|
+
test('keeps only the bootstrap params on the URL when the flag is set', async () => {
|
|
6744
|
+
const { src } = await renderAndGetSrc(withPostMessage(lbConfig));
|
|
6745
|
+
|
|
6746
|
+
// Boot and auth handshake stays on the URL.
|
|
6747
|
+
expect(src).toContain('hostAppUrl=');
|
|
6748
|
+
expect(src).toContain(`authType=${AuthType.None}`);
|
|
6749
|
+
expect(src).toContain(`sdkVersion=${version}`);
|
|
6750
|
+
expect(src).toContain('blockNonEmbedFullAppAccess=true');
|
|
6751
|
+
expect(src).toContain('viewPortHeight=');
|
|
6752
|
+
|
|
6753
|
+
// View configuration and internal flags do not.
|
|
6754
|
+
expect(src).not.toContain('hideAction=');
|
|
6755
|
+
expect(src).not.toContain('internalBlinkFlag');
|
|
6756
|
+
expect(src).not.toContain('isPinboardV2Enabled');
|
|
6757
|
+
expect(src).not.toContain('enableDataPanelV2');
|
|
6758
|
+
});
|
|
6759
|
+
|
|
6760
|
+
test('strips a non-bootstrap additionalFlag from the URL when the flag is set', async () => {
|
|
6761
|
+
const { src } = await renderAndGetSrc({
|
|
6762
|
+
...lbConfig,
|
|
6763
|
+
additionalFlags: {
|
|
6764
|
+
internalBlinkFlag: true,
|
|
6765
|
+
someCustomFlag: 'abc',
|
|
6766
|
+
excludeConfigFromURL: true,
|
|
6767
|
+
},
|
|
6768
|
+
});
|
|
6769
|
+
|
|
6770
|
+
expect(src).not.toContain('internalBlinkFlag');
|
|
6771
|
+
expect(src).not.toContain('someCustomFlag');
|
|
6772
|
+
});
|
|
6773
|
+
|
|
6774
|
+
test('keeps an additionalFlag that overrides a bootstrap param on the URL', async () => {
|
|
6775
|
+
const { src } = await renderAndGetSrc({
|
|
6776
|
+
...lbConfig,
|
|
6777
|
+
additionalFlags: { [Param.OverrideOrgId]: 42, excludeConfigFromURL: true },
|
|
6778
|
+
});
|
|
6779
|
+
|
|
6780
|
+
expect(src).toContain(`${Param.OverrideOrgId}=42`);
|
|
6781
|
+
});
|
|
6782
|
+
|
|
6783
|
+
test('keeps the deep-link route on the URL when the flag is set', async () => {
|
|
6784
|
+
const { src } = await renderAndGetSrc(withPostMessage(lbConfig));
|
|
6785
|
+
|
|
6786
|
+
expect(src).toContain(`/embed/viz/${liveboardId}`);
|
|
6787
|
+
});
|
|
6788
|
+
|
|
6789
|
+
test('sends the full config over UpdateEmbedParams once the frame is ready', async () => {
|
|
6790
|
+
await renderAndGetSrc(withPostMessage(lbConfig));
|
|
6791
|
+
|
|
6792
|
+
signalFrameReady();
|
|
6793
|
+
|
|
6794
|
+
await executeAfterWait(() => {
|
|
6795
|
+
expect(mockProcessTrigger).toHaveBeenCalledWith(
|
|
6796
|
+
expect.any(Object),
|
|
6797
|
+
HostEvent.UpdateEmbedParams,
|
|
6798
|
+
expect.any(String),
|
|
6799
|
+
expect.objectContaining({
|
|
6800
|
+
liveboardId,
|
|
6801
|
+
hiddenActions: [Action.Download],
|
|
6802
|
+
internalBlinkFlag: true,
|
|
6803
|
+
[Param.HideActions]: expect.arrayContaining([Action.Download]),
|
|
6804
|
+
}),
|
|
6805
|
+
undefined,
|
|
6806
|
+
);
|
|
6807
|
+
});
|
|
6808
|
+
});
|
|
6809
|
+
|
|
6810
|
+
test('sends UpdateEmbedParams again every time the frame signals ready', async () => {
|
|
6811
|
+
await renderAndGetSrc(withPostMessage(lbConfig));
|
|
6812
|
+
signalFrameReady();
|
|
6813
|
+
signalFrameReady();
|
|
6814
|
+
|
|
6815
|
+
await executeAfterWait(() => {
|
|
6816
|
+
const updateCalls = mockProcessTrigger.mock.calls.filter(
|
|
6817
|
+
(call) => call[1] === HostEvent.UpdateEmbedParams,
|
|
6818
|
+
);
|
|
6819
|
+
expect(updateCalls).toHaveLength(2);
|
|
6820
|
+
});
|
|
6821
|
+
});
|
|
6822
|
+
|
|
6823
|
+
test('does not send UpdateEmbedParams when the flag is not set', async () => {
|
|
6824
|
+
await renderAndGetSrc(lbConfig);
|
|
6825
|
+
|
|
6826
|
+
signalFrameReady();
|
|
6827
|
+
|
|
6828
|
+
await executeAfterWait(() => {
|
|
6829
|
+
const updateCalls = mockProcessTrigger.mock.calls.filter(
|
|
6830
|
+
(call) => call[1] === HostEvent.UpdateEmbedParams,
|
|
6831
|
+
);
|
|
6832
|
+
expect(updateCalls).toHaveLength(0);
|
|
6833
|
+
});
|
|
6834
|
+
});
|
|
6835
|
+
|
|
6836
|
+
test('does not double-send for a pre-rendered embed that is shown', async () => {
|
|
6837
|
+
mockMessageChannel();
|
|
6838
|
+
(window as any).ResizeObserver =
|
|
6839
|
+
window.ResizeObserver ||
|
|
6840
|
+
jest.fn().mockImplementation(() => ({
|
|
6841
|
+
disconnect: jest.fn(),
|
|
6842
|
+
observe: jest.fn(),
|
|
6843
|
+
unobserve: jest.fn(),
|
|
6844
|
+
}));
|
|
6845
|
+
|
|
6846
|
+
const embed = new LiveboardEmbed(getRootEl(), {
|
|
6847
|
+
...defaultViewConfig,
|
|
6848
|
+
...withPostMessage(lbConfig),
|
|
6849
|
+
preRenderId: 'send-config-post-message',
|
|
6850
|
+
});
|
|
6851
|
+
await embed.preRender();
|
|
6852
|
+
await waitFor(() => !!getIFrameEl());
|
|
6853
|
+
|
|
6854
|
+
signalFrameReady();
|
|
6855
|
+
await executeAfterWait(() => {
|
|
6856
|
+
expect(embed.isEmbedContainerLoaded).toBe(true);
|
|
6857
|
+
});
|
|
6858
|
+
|
|
6859
|
+
mockProcessTrigger.mockClear();
|
|
6860
|
+
await embed.showPreRender();
|
|
6861
|
+
|
|
6862
|
+
await executeAfterWait(() => {
|
|
6863
|
+
const updateCalls = mockProcessTrigger.mock.calls.filter(
|
|
6864
|
+
(call) => call[1] === HostEvent.UpdateEmbedParams,
|
|
6865
|
+
);
|
|
6866
|
+
expect(updateCalls).toHaveLength(1);
|
|
6867
|
+
});
|
|
6868
|
+
});
|
|
6869
|
+
});
|