@basis-theory/3ds-web
Advanced tools
Comparing version 1.0.0-beta.9 to 1.0.0-beta.10
@@ -164,5 +164,8 @@ | ||
}; | ||
const $56c0ab67849851da$export$b824392d62597b74 = (id)=>{ | ||
const $56c0ab67849851da$export$b824392d62597b74 = (id, /** | ||
* Sets display none on the iframe container | ||
*/ hidden = false)=>{ | ||
const container = document.createElement("div"); | ||
container.id = id; | ||
if (hidden) container.setAttribute("style", "display:none;"); | ||
document.body.appendChild(container); | ||
@@ -375,9 +378,9 @@ }; | ||
const $48cb3e19e657c0d1$export$30207c6d2c13b02b = (()=>{ | ||
try { | ||
(0, $56c0ab67849851da$export$b824392d62597b74)((0, $d7d24f50044f5db6$export$3f521420530811cf).FRAME_CONTAINER_ID); | ||
(0, $56c0ab67849851da$export$b824392d62597b74)((0, $d7d24f50044f5db6$export$9aef2de9a9febd46).FRAME_CONTAINER_ID); | ||
} catch (error) { | ||
(0, $7eeff694ab6fbf78$export$af88d00dbe7f521).log.error("Unable to create iframe container", error); | ||
} | ||
return (apiKey, configOptions)=>{ | ||
try { | ||
(0, $56c0ab67849851da$export$b824392d62597b74)((0, $d7d24f50044f5db6$export$3f521420530811cf).FRAME_CONTAINER_ID, true); | ||
(0, $56c0ab67849851da$export$b824392d62597b74)(configOptions?.challengeContainerOptions?.id ?? (0, $d7d24f50044f5db6$export$9aef2de9a9febd46).FRAME_CONTAINER_ID); | ||
} catch (error) { | ||
(0, $7eeff694ab6fbf78$export$af88d00dbe7f521).log.error("Unable to create iframe container", error); | ||
} | ||
(0, $1fcbbbb68dcca4cc$export$7d6f1c8842f9f527).init(apiKey, configOptions?.apiBaseUrl); | ||
@@ -384,0 +387,0 @@ return { |
@@ -158,5 +158,8 @@ const $ede1e6694b13a411$export$3f521420530811cf = { | ||
}; | ||
const $c64965f72f06da5e$export$b824392d62597b74 = (id)=>{ | ||
const $c64965f72f06da5e$export$b824392d62597b74 = (id, /** | ||
* Sets display none on the iframe container | ||
*/ hidden = false)=>{ | ||
const container = document.createElement("div"); | ||
container.id = id; | ||
if (hidden) container.setAttribute("style", "display:none;"); | ||
document.body.appendChild(container); | ||
@@ -369,9 +372,9 @@ }; | ||
const $78b3785cefa2a9d4$export$30207c6d2c13b02b = (()=>{ | ||
try { | ||
(0, $c64965f72f06da5e$export$b824392d62597b74)((0, $ede1e6694b13a411$export$3f521420530811cf).FRAME_CONTAINER_ID); | ||
(0, $c64965f72f06da5e$export$b824392d62597b74)((0, $ede1e6694b13a411$export$9aef2de9a9febd46).FRAME_CONTAINER_ID); | ||
} catch (error) { | ||
(0, $9baa5c7531c09ef3$export$af88d00dbe7f521).log.error("Unable to create iframe container", error); | ||
} | ||
return (apiKey, configOptions)=>{ | ||
try { | ||
(0, $c64965f72f06da5e$export$b824392d62597b74)((0, $ede1e6694b13a411$export$3f521420530811cf).FRAME_CONTAINER_ID, true); | ||
(0, $c64965f72f06da5e$export$b824392d62597b74)(configOptions?.challengeContainerOptions?.id ?? (0, $ede1e6694b13a411$export$9aef2de9a9febd46).FRAME_CONTAINER_ID); | ||
} catch (error) { | ||
(0, $9baa5c7531c09ef3$export$af88d00dbe7f521).log.error("Unable to create iframe container", error); | ||
} | ||
(0, $263638c749818df0$export$7d6f1c8842f9f527).init(apiKey, configOptions?.apiBaseUrl); | ||
@@ -378,0 +381,0 @@ return { |
{ | ||
"name": "@basis-theory/3ds-web", | ||
"version": "1.0.0-beta.9", | ||
"version": "1.0.0-beta.10", | ||
"repository": "https://github.com/Basis-Theory/3ds-web", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -6,2 +6,8 @@ type ConfigOptions = { | ||
apiBaseUrl?: string; | ||
challengeContainerOptions: { | ||
/** | ||
* Overrides default ID of iframe container | ||
*/ | ||
id?: string; | ||
}; | ||
}; | ||
@@ -8,0 +14,0 @@ export const BasisTheory3ds: (apiKey: string, configOptions?: ConfigOptions) => { |
@@ -5,4 +5,4 @@ declare const createIframe: (container: HTMLElement | null, name: string, id: string, width?: string, height?: string, onLoadCallback?: GlobalEventHandlers['onload']) => HTMLIFrameElement; | ||
declare const createElement: (tagName: string, child: Node) => HTMLElement; | ||
declare const createIframeContainer: (id: string) => void; | ||
declare const createIframeContainer: (id: string, hidden?: boolean) => void; | ||
declare const removeIframe: (ids?: string[]) => (void | undefined)[] | undefined; | ||
export { createElement, createForm, createIframe, createIframeContainer, createInput, removeIframe, }; |
53375
837