Skip to content

Commit

Permalink
fix(lib): 🐛 Standard embed
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 17, 2022
1 parent 0f38141 commit c9b3b04
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apps/builder/components/share/codeSnippets/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const parseInitContainerCode = ({
backgroundColor,
})
return prettier.format(
`Typebot.initContainer("typebot-container", {
`initContainer("typebot-container", {
url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}
});`,
{ parser: 'babel', plugins: [parserBabel] }
Expand All @@ -110,7 +110,7 @@ export const parseInitPopupCode = ({
})
const { delayString } = parsePopupParams({ delay })
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] }
)
}
Expand All @@ -134,7 +134,7 @@ export const parseInitBubbleCode = ({
proactiveMessage,
})
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] }
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/typebot-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typebot-js",
"version": "2.2.5",
"version": "2.2.6",
"main": "dist/index.js",
"unpkg": "dist/index.umd.min.js",
"license": "AGPL-3.0-or-later",
Expand Down
1 change: 1 addition & 0 deletions packages/typebot-js/src/embedTypes/chat/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const createIframeContainer = (
params: IframeParams
): HTMLIFrameElement => {
const iframe = createIframe({ ...params, loadWhenVisible: true })
iframe.style.display = 'none'
return iframe
}

Expand Down
1 change: 0 additions & 1 deletion packages/typebot-js/src/iframe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const createIframe = ({
iframe.classList.add('typebot-iframe')
const { onNewVariableValue, onVideoPlayed } = iframeParams
listenForTypebotMessages({ onNewVariableValue, onVideoPlayed })
iframe.style.display = 'none'
return iframe
}

Expand Down

0 comments on commit c9b3b04

Please sign in to comment.