idpay-b2b-sdk 2.0.2 → 2.0.3

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.esm.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UnicoSDK={})}(this,(function(e){"use strict";var t="2.0.2";let o,s,n,i,c=!1,r=!1;const l="IFRAME",a="REDIRECT",d="SILENT",u="dev",p="uat",f="prod",h={[u]:"https://idpay-dev.unico.io",[p]:"https://idpay-uat.unico.io",[f]:"https://idpay.unico.io"},S=e=>{let{transactionId:i,token:l,onFinish:u}=e;const p={transactionId:i,token:l,onFinish:u,host:s,sdkVersion:t,collectionId:n};if(console.log("open",p),c)switch(UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.START_FLOW,p),o){case d:UnicoSDKAssets.clientBoxControl.verify(p);break;case a:UnicoSDKAssets.clientBoxControl.redirect(i,l,s,t);break;default:UnicoSDKAssets.clientBoxControl.open(p)}else r=p},k={init:async e=>{let{token:u,useCurrentOrigin:p,env:k=f,type:A=l}=e;switch(o=A,s=p?window.location.origin:h[k],await(()=>{if(i)return Promise.resolve();i=document.createElement("script"),i.src=`${s}/sdk-assets/index.js`;const e=new Promise((e=>{i.onload=e}));return document.body.appendChild(i),Promise.all([e])})(),UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.INITIALIZE),o){case d:n=await UnicoSDKAssets.clientBoxControl.initSilent();break;case a:break;default:await(()=>{const e=document.createElement("link");e.setAttribute("href",`${s}/sdk-assets/assets/styles.css`),e.setAttribute("rel","stylesheet");const t=new Promise((t=>{e.onload=t}));return document.head.appendChild(e),Promise.all([t])})(),UnicoSDKAssets.clientBoxControl.create({host:s,token:u,sdkVersion:t})}if(c=!0,r&&S(r),n)return n},close:()=>{UnicoSDKAssets.clientBoxControl.close()},open:S};e.UnicoSDK=k}));
1
+ var e="2.0.3";let t,s,o,n,i=!1,c=!1;const r="IFRAME",a="REDIRECT",l="SILENT",d="dev",u="uat",p="prod",k={[d]:"https://idpay-dev.unico.io",[u]:"https://idpay-uat.unico.io",[p]:"https://idpay.unico.io"},A=n=>{let{transactionId:r,token:d,onFinish:u}=n;const p={transactionId:r,token:d,onFinish:u,host:s,sdkVersion:e,collectionId:o};if(console.log("open",p),i)switch(UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.START_FLOW,p),t){case l:UnicoSDKAssets.clientBoxControl.verify(p);break;case a:UnicoSDKAssets.clientBoxControl.redirect(r,d,s,e);break;default:UnicoSDKAssets.clientBoxControl.open(p)}else c=p},E={init:async d=>{let{token:u,useCurrentOrigin:E,env:S=p,type:h=r}=d;switch(t=h,s=E?window.location.origin:k[S],await(()=>{if(n)return Promise.resolve();n=document.createElement("script"),n.src=`${s}/sdk-assets/index.js`;const e=new Promise((e=>{n.onload=e}));return document.body.appendChild(n),Promise.all([e])})(),UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.INITIALIZE),t){case l:o=await UnicoSDKAssets.clientBoxControl.initSilent();break;case a:break;default:await(()=>{const e=document.createElement("link");e.setAttribute("href",`${s}/sdk-assets/assets/styles.css`),e.setAttribute("rel","stylesheet");const t=new Promise((t=>{e.onload=t}));return document.head.appendChild(e),Promise.all([t])})(),UnicoSDKAssets.clientBoxControl.create({host:s,token:u,sdkVersion:e})}if(i=!0,c&&A(c),o)return o},close:()=>{UnicoSDKAssets.clientBoxControl.close()},open:A};export{E as UnicoSDK};
package/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UnicoSDK={})}(this,(function(e){"use strict";var t="2.0.2";let o,s,n,i,c=!1,r=!1;const l="IFRAME",a="REDIRECT",d="SILENT",u="dev",p="uat",f="prod",h={[u]:"https://idpay-dev.unico.io",[p]:"https://idpay-uat.unico.io",[f]:"https://idpay.unico.io"},S=e=>{let{transactionId:i,token:l,onFinish:u}=e;const p={transactionId:i,token:l,onFinish:u,host:s,sdkVersion:t,collectionId:n};if(console.log("open",p),c)switch(UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.START_FLOW,p),o){case d:UnicoSDKAssets.clientBoxControl.verify(p);break;case a:UnicoSDKAssets.clientBoxControl.redirect(i,l,s,t);break;default:UnicoSDKAssets.clientBoxControl.open(p)}else r=p},k={init:async e=>{let{token:u,useCurrentOrigin:p,env:k=f,type:A=l}=e;switch(o=A,s=p?window.location.origin:h[k],await(()=>{if(i)return Promise.resolve();i=document.createElement("script"),i.src=`${s}/sdk-assets/index.js`;const e=new Promise((e=>{i.onload=e}));return document.body.appendChild(i),Promise.all([e])})(),UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.INITIALIZE),o){case d:n=await UnicoSDKAssets.clientBoxControl.initSilent();break;case a:break;default:await(()=>{const e=document.createElement("link");e.setAttribute("href",`${s}/sdk-assets/assets/styles.css`),e.setAttribute("rel","stylesheet");const t=new Promise((t=>{e.onload=t}));return document.head.appendChild(e),Promise.all([t])})(),UnicoSDKAssets.clientBoxControl.create({host:s,token:u,sdkVersion:t})}if(c=!0,r&&S(r),n)return n},close:()=>{UnicoSDKAssets.clientBoxControl.close()},open:S};e.UnicoSDK=k}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UnicoSDK={})}(this,(function(e){"use strict";var t="2.0.3";let o,s,n,i,c=!1,r=!1;const l="IFRAME",a="REDIRECT",d="SILENT",u="dev",p="uat",f="prod",h={[u]:"https://idpay-dev.unico.io",[p]:"https://idpay-uat.unico.io",[f]:"https://idpay.unico.io"},S=e=>{let{transactionId:i,token:l,onFinish:u}=e;const p={transactionId:i,token:l,onFinish:u,host:s,sdkVersion:t,collectionId:n};if(console.log("open",p),c)switch(UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.START_FLOW,p),o){case d:UnicoSDKAssets.clientBoxControl.verify(p);break;case a:UnicoSDKAssets.clientBoxControl.redirect(i,l,s,t);break;default:UnicoSDKAssets.clientBoxControl.open(p)}else r=p},k={init:async e=>{let{token:u,useCurrentOrigin:p,env:k=f,type:A=l}=e;switch(o=A,s=p?window.location.origin:h[k],await(()=>{if(i)return Promise.resolve();i=document.createElement("script"),i.src=`${s}/sdk-assets/index.js`;const e=new Promise((e=>{i.onload=e}));return document.body.appendChild(i),Promise.all([e])})(),UnicoSDKAssets.trackEvent(UnicoSDKAssets.EVENT_TYPES.INITIALIZE),o){case d:n=await UnicoSDKAssets.clientBoxControl.initSilent();break;case a:break;default:await(()=>{const e=document.createElement("link");e.setAttribute("href",`${s}/sdk-assets/assets/styles.css`),e.setAttribute("rel","stylesheet");const t=new Promise((t=>{e.onload=t}));return document.head.appendChild(e),Promise.all([t])})(),UnicoSDKAssets.clientBoxControl.create({host:s,token:u,sdkVersion:t})}if(c=!0,r&&S(r),n)return n},close:()=>{UnicoSDKAssets.clientBoxControl.close()},open:S};e.UnicoSDK=k}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idpay-b2b-sdk",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "main": "./index.js",
5
5
  "module": "./index.esm.js",
6
6
  "types": "./index.d.ts",