idpay-b2b-sdk 0.0.5 → 0.0.7
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/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EVENT_TYPES as r,trackEvent as i,clientBoxControl as n}from"https://idpay.unico.io/sdk-assets/index.js";var l=null,c="IFRAME",p=()=>{let t=document.createElement("link");t.setAttribute("href","https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@
|
|
1
|
+
import{EVENT_TYPES as r,trackEvent as i,clientBoxControl as n}from"https://idpay.unico.io/sdk-assets/index.js";var l=null,c="IFRAME",p=()=>{let t=document.createElement("link");t.setAttribute("href","https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap"),t.setAttribute("rel","stylesheet");let s=new Promise(o=>{t.onload=o}),e=document.createElement("link");e.setAttribute("href","https://idpay.unico.io/sdk-assets/assets/styles.css"),e.setAttribute("rel","stylesheet");let a=new Promise(o=>{e.onload=o});return document.head.appendChild(t),document.head.appendChild(e),Promise.all([s,a])},m=async t=>{i(r.INITIALIZE),l=t?.type,l===c&&(await p(),n.create())},y=({transactionId:t,onFinish:s})=>{i(r.START_FLOW,{transactionId:t}),l===c?n.open({transactionId:t,onFinish:s}):n.redirect(t)},h={init:m,start:y};export{h as IDPaySDK};
|