fix(lib): 🐛 Standard embed
This commit is contained in:
@ -88,7 +88,7 @@ export const parseInitContainerCode = ({
|
|||||||
backgroundColor,
|
backgroundColor,
|
||||||
})
|
})
|
||||||
return prettier.format(
|
return prettier.format(
|
||||||
`Typebot.initContainer("typebot-container", {
|
`initContainer("typebot-container", {
|
||||||
url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}
|
url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}
|
||||||
});`,
|
});`,
|
||||||
{ parser: 'babel', plugins: [parserBabel] }
|
{ parser: 'babel', plugins: [parserBabel] }
|
||||||
@ -110,7 +110,7 @@ export const parseInitPopupCode = ({
|
|||||||
})
|
})
|
||||||
const { delayString } = parsePopupParams({ delay })
|
const { delayString } = parsePopupParams({ delay })
|
||||||
return prettier.format(
|
return prettier.format(
|
||||||
`var typebotCommands = Typebot.initPopup({url: "${url}",${delayString}${bgColorString}${customDomainString}${hiddenVariablesString}});`,
|
`var typebotCommands = initPopup({url: "${url}",${delayString}${bgColorString}${customDomainString}${hiddenVariablesString}});`,
|
||||||
{ parser: 'babel', plugins: [parserBabel] }
|
{ parser: 'babel', plugins: [parserBabel] }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ export const parseInitBubbleCode = ({
|
|||||||
proactiveMessage,
|
proactiveMessage,
|
||||||
})
|
})
|
||||||
return prettier.format(
|
return prettier.format(
|
||||||
`var typebotCommands = Typebot.initBubble({url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}${proactiveMessageString}${buttonString}});`,
|
`var typebotCommands = initBubble({url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}${proactiveMessageString}${buttonString}});`,
|
||||||
{ parser: 'babel', plugins: [parserBabel] }
|
{ parser: 'babel', plugins: [parserBabel] }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "typebot-js",
|
"name": "typebot-js",
|
||||||
"version": "2.2.5",
|
"version": "2.2.6",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"unpkg": "dist/index.umd.min.js",
|
"unpkg": "dist/index.umd.min.js",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
@ -5,6 +5,7 @@ export const createIframeContainer = (
|
|||||||
params: IframeParams
|
params: IframeParams
|
||||||
): HTMLIFrameElement => {
|
): HTMLIFrameElement => {
|
||||||
const iframe = createIframe({ ...params, loadWhenVisible: true })
|
const iframe = createIframe({ ...params, loadWhenVisible: true })
|
||||||
|
iframe.style.display = 'none'
|
||||||
return iframe
|
return iframe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ export const createIframe = ({
|
|||||||
iframe.classList.add('typebot-iframe')
|
iframe.classList.add('typebot-iframe')
|
||||||
const { onNewVariableValue, onVideoPlayed } = iframeParams
|
const { onNewVariableValue, onVideoPlayed } = iframeParams
|
||||||
listenForTypebotMessages({ onNewVariableValue, onVideoPlayed })
|
listenForTypebotMessages({ onNewVariableValue, onVideoPlayed })
|
||||||
iframe.style.display = 'none'
|
|
||||||
return iframe
|
return iframe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user