diff --git a/packages/ping-pong-view/src/embedded/div/EmbeddedDivPingPong.tsx b/packages/ping-pong-view/src/embedded/div/EmbeddedDivPingPong.tsx index 2419d458734..93734cba64b 100644 --- a/packages/ping-pong-view/src/embedded/div/EmbeddedDivPingPong.tsx +++ b/packages/ping-pong-view/src/embedded/div/EmbeddedDivPingPong.tsx @@ -20,9 +20,8 @@ import { PingPongApi, PingPongChannelApi, PingPongEnvelopeApi } from "../../api" import { EnvelopeServer } from "@kogito-tooling/envelope-bus/dist/channel"; import { EmbeddedEnvelopeFactory } from "@kogito-tooling/envelope/dist/embedded"; import { ContainerType } from "@kogito-tooling/envelope/dist/api"; -import { init } from "../../envelope"; +import { init, PingPongFactory } from "../../envelope"; import { EnvelopeBusMessage } from "@kogito-tooling/envelope-bus/dist/api"; -import { PingPongReactImplFactory } from "ping-pong-view-react"; export type Props = PingPongChannelApi & { mapping: { @@ -30,6 +29,7 @@ export type Props = PingPongChannelApi & { }; targetOrigin: string; name: string; + pingPongViewFactory: PingPongFactory; }; export const EmbeddedDivPingPong = React.forwardRef((props: Props, forwardedRef: React.Ref) => { @@ -48,7 +48,7 @@ export const EmbeddedDivPingPong = React.forwardRef((props: Props, forwardedRef: window.postMessage(message, "*", transfer); }, }, - pingPongViewFactory: new PingPongReactImplFactory(), + pingPongViewFactory: props.pingPongViewFactory, }); return envelopeServer.envelopeApi.requests.pingPongView__init( diff --git a/packages/ping-pong-view/src/envelope/PingPongEnvelopeView.tsx b/packages/ping-pong-view/src/envelope/PingPongEnvelopeView.tsx index 71bd4b159d6..986fd02c74f 100644 --- a/packages/ping-pong-view/src/envelope/PingPongEnvelopeView.tsx +++ b/packages/ping-pong-view/src/envelope/PingPongEnvelopeView.tsx @@ -34,7 +34,10 @@ export const PingPongEnvelopeView = React.forwardRef((props, forwardedRef) => { <>

This is an implementation of Ping-Pong View

-

The {"