@basis-theory/web-elements 1.11.3 → 1.11.5

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/bundle/index.js +1 -1
  3. package/dist/main/index.js +4 -4
  4. package/dist/module/module.js +4 -4
  5. package/dist/package.json +3 -4
  6. package/dist/types/index.d.ts +541 -3
  7. package/package.json +7 -9
  8. package/dist/types/BasisTheory.d.ts +0 -9
  9. package/dist/types/common/BasisTheoryApiError.d.ts +0 -5
  10. package/dist/types/common/BasisTheoryValidationError.d.ts +0 -13
  11. package/dist/types/common/HttpClientError.d.ts +0 -6
  12. package/dist/types/common/index.d.ts +0 -3
  13. package/dist/types/common/logging.d.ts +0 -8
  14. package/dist/types/elements/constants.d.ts +0 -9
  15. package/dist/types/elements/getOrCreateScriptElement.d.ts +0 -1
  16. package/dist/types/elements/index.d.ts +0 -2
  17. package/dist/types/elements/loadElements.d.ts +0 -3
  18. package/dist/types/types/elements/cardTypes.d.ts +0 -29
  19. package/dist/types/types/elements/elements.d.ts +0 -74
  20. package/dist/types/types/elements/events.d.ts +0 -40
  21. package/dist/types/types/elements/index.d.ts +0 -7
  22. package/dist/types/types/elements/options.d.ts +0 -98
  23. package/dist/types/types/elements/services/index.d.ts +0 -4
  24. package/dist/types/types/elements/services/proxy.d.ts +0 -27
  25. package/dist/types/types/elements/services/sessions.d.ts +0 -11
  26. package/dist/types/types/elements/services/shared.d.ts +0 -21
  27. package/dist/types/types/elements/services/token-intents.d.ts +0 -6
  28. package/dist/types/types/elements/services/tokenize.d.ts +0 -8
  29. package/dist/types/types/elements/services/tokens.d.ts +0 -7
  30. package/dist/types/types/elements/shared.d.ts +0 -51
  31. package/dist/types/types/elements/styles.d.ts +0 -25
  32. package/dist/types/types/index.d.ts +0 -4
  33. package/dist/types/types/models/bin-details.d.ts +0 -38
  34. package/dist/types/types/models/cards.d.ts +0 -12
  35. package/dist/types/types/models/index.d.ts +0 -7
  36. package/dist/types/types/models/shared.d.ts +0 -22
  37. package/dist/types/types/models/token-intents.d.ts +0 -29
  38. package/dist/types/types/models/tokenize.d.ts +0 -7
  39. package/dist/types/types/models/tokens.d.ts +0 -53
  40. package/dist/types/types/models/util.d.ts +0 -11
  41. package/dist/types/types/sdk/index.d.ts +0 -1
  42. package/dist/types/types/sdk/services/http.d.ts +0 -11
  43. package/dist/types/types/sdk/services/index.d.ts +0 -1
  44. package/dist/types/version.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [1.11.5] - 2025-04-08
2
+
3
+ ### Bug Fixes
4
+
5
+ - e89c349 2025-04-04 fix: text element validation and elements masking (#415) by kevin@basistheory.com
6
+ - f4ef076 2025-04-03 fix: avoid dupped elementWindows (#416) by kevin@basistheory.com
7
+
8
+ ## [1.11.4] - 2025-03-26
9
+
10
+ ### Bug Fixes
11
+
12
+ - 50b67d0 2025-03-25 fix: move export to its own file (#411) by kevin@basistheory.com
13
+ - 0510ce8 2025-03-25 fix: export web-elements (#410) by kevin@basistheory.com
14
+ - a5b6d8f 2025-03-25 fix(text element): expose validateOnChange (#408) by kevin@basistheory.com
15
+
16
+ ### Chores
17
+
18
+ - 8203052 2025-03-25 chore: let parcel handle type generation (#414) by kevin@basistheory.com
19
+ - 507db5c 2025-03-25 chore: split type declaration config from build (#413) by kevin@basistheory.com
20
+ - 7fccd68 2025-03-25 chore: upgrade ts (#412) by kevin@basistheory.com
21
+
1
22
  ## [1.11.3] - 2025-03-21
2
23
 
3
24
  ### Bug Fixes
@@ -1 +1 @@
1
- !function(){function e(e,r,n,t,o,i,l){try{var s=e[i](l),c=s.value}catch(e){n(e);return}s.done?r(c):Promise.resolve(c).then(t,o)}function r(r){return function(){var n=this,t=arguments;return new Promise(function(o,i){var l=r.apply(n,t);function s(r){e(l,o,i,s,c,"next",r)}function c(r){e(l,o,i,s,c,"throw",r)}s(void 0)})}}function n(e,r){var n,t,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,t&&(o=2&i[0]?t.return:i[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,i[1])).done)return o;switch(t=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,t=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=r.call(e,l)}catch(e){i=[6,e],t=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var t,o,i,l,s,c,a=function(e){var r=document.querySelector('script[src^="'.concat(e,'"]'));if(r)return r;var n=document.head||document.body;if(!n)throw Error("No <head> or <body> elements found in the document.");var t=Object.assign(document.createElement("script"),{src:e});return n.append(t),t},u="Tried to load BasisTheoryElements in a non-DOM environment.",d="Unable to load the Elements script. This may be due to network restrictions or browser extensions like ad blockers interfering with script loading. Check browser settings or network connection and try again.",f="https://".concat(void 0),h=(o=!0,i=r(function(e,r){var t,i,l,s,c,a,u=arguments;return n(this,function(n){switch(n.label){case 0:if(t=u.length>2&&void 0!==u[2]?u[2]:{},!o)return[2];a=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.forEach(function(r){var t;t=n[r],r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t})}return e}({level:r,message:e,service:"web-elements-loader",env:f.includes("localhost")?"local":f.includes("dev")?"dev":"prod",referrer:null===(i=document)||void 0===i?void 0:i.referrer,origin:null===(l=window)||void 0===l?void 0:l.location.origin,url:null===(s=window)||void 0===s?void 0:s.location.href,userAgent:null===(c=navigator)||void 0===c?void 0:c.userAgent},t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fetch("https://http-intake.logs.datadoghq.com/v1/input/".concat("pubb96b84a13912504f4354f2d794ea4fab"),{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}})];case 2:return n.sent(),[3,4];case 3:return n.sent(),console.warn("There was an error sending telemetry."),[3,4];case 4:return[2]}})}),l=function(e,r){return i.apply(this,arguments)},{setTelemetryEnabled:function(e){o=e},log:{error:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,"error",r)},info:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,"info",r)},warn:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,"warn",r)}}}),p=function(e,t){return new Promise(function(o,i){var l,s=a(e),c=!1;s.addEventListener("load",function(){window.BasisTheoryElements?o(window.BasisTheoryElements):(r(function(){return n(this,function(e){switch(e.label){case 0:return[4,h.log.error("Elements not found on window on load",{logType:"elementsNotFoundOnWindow",logOrigin:"loadScript",retryCount:t})];case 1:return e.sent(),[2]}})})(),i(Error("Basis Theory Elements did not load properly. Check network tab for more details.")))}),s.addEventListener("error",(l=r(function(r){var l,a,f;return n(this,function(n){switch(n.label){case 0:if(c)return[2];return c=!0,[4,h.log.error("Elements script onError event",{logType:"elementsScriptOnError",logOrigin:"loadScript",retryCount:t,event:{message:null==r?void 0:r.message,source:null==r?void 0:r.filename,lineno:null==r?void 0:r.lineno,colno:null==r?void 0:r.colno,error:null==r?void 0:r.error,target:null==r?void 0:r.target}})];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,3,,5]),null==s||s.remove(),[3,5];case 3:return l=n.sent(),[4,h.log.error("Error removing script from DOM on retry attempt ".concat(t),{logType:"scriptRemovalError",logOrigin:"loadScript",retryCount:t,removalError:l})];case 4:return n.sent(),[3,5];case 5:if(0===t)return p(e,t+1).then(o).catch(i),[2];n.label=6;case 6:return n.trys.push([6,12,,14]),[4,fetch(e)];case 7:if((a=n.sent()).ok)return[3,9];return[4,h.log.error("Second attempt to load elements script failed, fetch failed with status: ".concat(a.status,"."),{logType:"elementsScriptFetchFailure",logOrigin:"loadScript",retryCount:t,fetchResult:"error",fetchResponse:a})];case 8:return n.sent(),i(Error(u)),[3,11];case 9:return[4,h.log.error("Second attempt to load elements script failed, fetch success",{logType:"elementsScriptFetchFailure",logOrigin:"loadScript",retryCount:t,fetchResult:"success",fetchResponse:a})];case 10:n.sent(),i(Error(d)),n.label=11;case 11:return[3,14];case 12:return f=n.sent(),[4,h.log.error("Second attempt failed to load elements script failed, fetch network error.",{logType:"elementsScriptFetchError",logOrigin:"loadScript",retryCount:t,fetchResult:"error",fetchError:f})];case 13:return n.sent(),i(Error(d)),[3,14];case 14:return i((null==r?void 0:r.error)||(null==r?void 0:r.message)||Error(d)),[2]}})}),function(e){return l.apply(this,arguments)}))})},v={};v={version:"1.11.3"};var m=(s=r(function(e,o){var i,l,s,c;return n(this,function(a){switch(a.label){case 0:var d;if(!e||0===e.length)throw Error("API key is required");return i=(null==o?void 0:o._devMode)?"js.flock-dev.com":"js.basistheory.com",[4,(d="https://".concat(i,"/web-elements/").concat(v.version,"/client/index.js"),t||(t=new Promise(function(e,t){if(("undefined"==typeof window?"undefined":(o=window)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)!="object"){r(function(){return n(this,function(e){switch(e.label){case 0:return[4,h.log.warn(u,{logType:"elementsNonDomError",logOrigin:"loadElements"})];case 1:return e.sent(),t(Error(u)),[2]}})})();return}if(window.BasisTheoryElements){e(window.BasisTheoryElements);return}var o,i="https://".concat(void 0,"/elements");if(void 0!==d)try{i=new URL(d).toString().replace(RegExp("\\/$","u"),"")}catch(e){throw r(function(){return n(this,function(e){switch(e.label){case 0:return[4,h.log.warn("Invalid format for the given Elements client url.",{logType:"invalidClientUrlError",logOrigin:"loadElements"})];case 1:return e.sent(),[2]}})})(),Error("Invalid format for the given Elements client url.")}p(i,0).then(e).catch(function(e){t(e)})})),t)];case 1:return[2,a.sent().init(e,"https://".concat(i,"/web-elements/").concat(v.version,"/hosted-elements/"),!1,null===(l=null==o?void 0:o.useSameOriginApi)||void 0===l||l,null!==(s=null==o?void 0:o.disableTelemetry)&&void 0!==s&&s,null!==(c=null==o?void 0:o.debug)&&void 0!==c&&c)]}})}),function(e,r){return s.apply(this,arguments)}),g=((c=g||{}).DECIMAL="decimal",c.EMAIL="email",c.NONE="none",c.NUMERIC="numeric",c.SEARCH="search",c.TEL="tel",c.TEXT="text",c.URL="url",c);"undefined"!=typeof window&&document.currentScript&&!window.basistheory&&(window.basistheory=m)}();
1
+ !function(){function e(e,r,t,n,o,i,l){try{var s=e[i](l),c=s.value}catch(e){t(e);return}s.done?r(c):Promise.resolve(c).then(n,o)}function r(r){return function(){var t=this,n=arguments;return new Promise(function(o,i){var l=r.apply(t,n);function s(r){e(l,o,i,s,c,"next",r)}function c(r){e(l,o,i,s,c,"throw",r)}s(void 0)})}}function t(e,r){var t,n,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var c=[i,s];if(t)throw TypeError("Generator is already executing.");for(;l;)try{if(t=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=r.call(e,l)}catch(e){c=[6,e],n=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var n,o,i,l,s,c,a=function(e){var r=document.querySelector('script[src^="'.concat(e,'"]'));if(r)return r;var t=document.head||document.body;if(!t)throw Error("No <head> or <body> elements found in the document.");var n=Object.assign(document.createElement("script"),{src:e});return t.append(n),n},u="Tried to load BasisTheoryElements in a non-DOM environment.",d="Unable to load the Elements script. This may be due to network restrictions or browser extensions like ad blockers interfering with script loading. Check browser settings or network connection and try again.",f="https://".concat(void 0),h=(o=!0,i=r(function(e,r){var n,i,l,s,c,a,u,d=arguments;return t(this,function(t){switch(t.label){case 0:if(n=d.length>2&&void 0!==d[2]?d[2]:{},!o)return[2];u=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({level:r,message:e,service:"web-elements-loader",env:f.includes("localhost")?"local":f.includes("dev")?"dev":"prod",referrer:null===(i=document)||void 0===i?void 0:i.referrer,origin:null===(l=window)||void 0===l?void 0:l.location.origin,url:null===(s=window)||void 0===s?void 0:s.location.href,userAgent:null===(c=navigator)||void 0===c?void 0:c.userAgent},n),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,fetch("https://http-intake.logs.datadoghq.com/v1/input/".concat("pubb96b84a13912504f4354f2d794ea4fab"),{method:"POST",body:JSON.stringify(u),headers:{"Content-Type":"application/json"}})];case 2:return t.sent(),[3,4];case 3:return t.sent(),console.warn("There was an error sending telemetry."),[3,4];case 4:return[2]}})}),l=function(e,r){return i.apply(this,arguments)},{setTelemetryEnabled:function(e){o=e},log:{error:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,"error",r)},info:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,"info",r)},warn:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,"warn",r)}}}),p=function(e,n){return new Promise(function(o,i){var l,s=a(e),c=!1;s.addEventListener("load",function(){window.BasisTheoryElements?o(window.BasisTheoryElements):(r(function(){return t(this,function(e){switch(e.label){case 0:return[4,h.log.error("Elements not found on window on load",{logType:"elementsNotFoundOnWindow",logOrigin:"loadScript",retryCount:n})];case 1:return e.sent(),[2]}})})(),i(Error("Basis Theory Elements did not load properly. Check network tab for more details.")))}),s.addEventListener("error",(l=r(function(r){var l,a,f;return t(this,function(t){switch(t.label){case 0:if(c)return[2];return c=!0,[4,h.log.error("Elements script onError event",{logType:"elementsScriptOnError",logOrigin:"loadScript",retryCount:n,event:{message:null==r?void 0:r.message,source:null==r?void 0:r.filename,lineno:null==r?void 0:r.lineno,colno:null==r?void 0:r.colno,error:null==r?void 0:r.error,target:null==r?void 0:r.target}})];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,3,,5]),null==s||s.remove(),[3,5];case 3:return l=t.sent(),[4,h.log.error("Error removing script from DOM on retry attempt ".concat(n),{logType:"scriptRemovalError",logOrigin:"loadScript",retryCount:n,removalError:l})];case 4:return t.sent(),[3,5];case 5:if(0===n)return p(e,n+1).then(o).catch(i),[2];t.label=6;case 6:return t.trys.push([6,12,,14]),[4,fetch(e)];case 7:if((a=t.sent()).ok)return[3,9];return[4,h.log.error("Second attempt to load elements script failed, fetch failed with status: ".concat(a.status,"."),{logType:"elementsScriptFetchFailure",logOrigin:"loadScript",retryCount:n,fetchResult:"error",fetchResponse:a})];case 8:return t.sent(),i(Error(u)),[3,11];case 9:return[4,h.log.error("Second attempt to load elements script failed, fetch success",{logType:"elementsScriptFetchFailure",logOrigin:"loadScript",retryCount:n,fetchResult:"success",fetchResponse:a})];case 10:t.sent(),i(Error(d)),t.label=11;case 11:return[3,14];case 12:return f=t.sent(),[4,h.log.error("Second attempt failed to load elements script failed, fetch network error.",{logType:"elementsScriptFetchError",logOrigin:"loadScript",retryCount:n,fetchResult:"error",fetchError:f})];case 13:return t.sent(),i(Error(d)),[3,14];case 14:return i((null==r?void 0:r.error)||(null==r?void 0:r.message)||Error(d)),[2]}})}),function(e){return l.apply(this,arguments)}))})},v={};v={version:"1.11.5"};var m=(s=r(function(e,o){var i,l,s,c;return t(this,function(a){switch(a.label){case 0:var d;if(!e||0===e.length)throw Error("API key is required");return i=(null==o?void 0:o._devMode)?"js.flock-dev.com":"js.basistheory.com",[4,(d="https://".concat(i,"/web-elements/").concat(v.version,"/client/index.js"),n||(n=new Promise(function(e,n){if(("undefined"==typeof window?"undefined":(o=window)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)!="object"){r(function(){return t(this,function(e){switch(e.label){case 0:return[4,h.log.warn(u,{logType:"elementsNonDomError",logOrigin:"loadElements"})];case 1:return e.sent(),n(Error(u)),[2]}})})();return}if(window.BasisTheoryElements){e(window.BasisTheoryElements);return}var o,i="https://".concat(void 0,"/elements");if(void 0!==d)try{i=new URL(d).toString().replace(RegExp("\\/$","u"),"")}catch(e){throw r(function(){return t(this,function(e){switch(e.label){case 0:return[4,h.log.warn("Invalid format for the given Elements client url.",{logType:"invalidClientUrlError",logOrigin:"loadElements"})];case 1:return e.sent(),[2]}})})(),Error("Invalid format for the given Elements client url.")}p(i,0).then(e).catch(function(e){n(e)})})),n)];case 1:return[2,a.sent().init(e,"https://".concat(i,"/web-elements/").concat(v.version,"/hosted-elements/"),!1,null===(l=null==o?void 0:o.useSameOriginApi)||void 0===l||l,null!==(s=null==o?void 0:o.disableTelemetry)&&void 0!==s&&s,null!==(c=null==o?void 0:o.debug)&&void 0!==c&&c)]}})}),function(e,r){return s.apply(this,arguments)}),g=((c=g||{}).DECIMAL="decimal",c.EMAIL="email",c.NONE="none",c.NUMERIC="numeric",c.SEARCH="search",c.TEL="tel",c.TEXT="text",c.URL="url",c);"undefined"!=typeof window&&document.currentScript&&!window.basistheory&&(window.basistheory=m)}();
@@ -127,10 +127,10 @@ const $ef6e1b024b683770$export$dea6ebbc92df4fa3 = [
127
127
 
128
128
 
129
129
 
130
- const $fe2ec396f58502a3$var$DEFAULT_BASE_URL = `https://${undefined}`;
130
+ const $fe2ec396f58502a3$var$DEFAULT_BASE_URL = `https://${process.env.API_HOST}`;
131
131
  const $fe2ec396f58502a3$export$af88d00dbe7f521 = (()=>{
132
132
  const ddTok = 'pubb96b84a13912504f4354f2d794ea4fab';
133
- let isTelemetryEnabled = true;
133
+ let isTelemetryEnabled = process.env.NODE_ENV !== 'test';
134
134
  const _log = async (message, level, attributes = {})=>{
135
135
  if (!isTelemetryEnabled) return;
136
136
  let env;
@@ -285,7 +285,7 @@ const $6477b722f43d24f2$export$2b0a6e5a1c78018f = (elementsClientUrl)=>{
285
285
  return;
286
286
  }
287
287
  // TODO refactor/remove this fallback
288
- let url = `https://${undefined}/elements`;
288
+ let url = `https://${process.env.JS_HOST}/elements`;
289
289
  if (typeof elementsClientUrl !== 'undefined') try {
290
290
  const urlObject = new URL(elementsClientUrl);
291
291
  url = urlObject.toString().replace(/\/$/u, '');
@@ -309,7 +309,7 @@ const $6477b722f43d24f2$export$2b0a6e5a1c78018f = (elementsClientUrl)=>{
309
309
 
310
310
 
311
311
  var $eef42ce81412d9ae$exports = {};
312
- const $eef42ce81412d9ae$var$version = '1.11.3';
312
+ const $eef42ce81412d9ae$var$version = '1.11.5';
313
313
  $eef42ce81412d9ae$exports = {
314
314
  version: $eef42ce81412d9ae$var$version
315
315
  };
@@ -127,10 +127,10 @@ const $2e9038c0999bba06$export$dea6ebbc92df4fa3 = [
127
127
 
128
128
 
129
129
 
130
- const $367e4a81566d966b$var$DEFAULT_BASE_URL = `https://${undefined}`;
130
+ const $367e4a81566d966b$var$DEFAULT_BASE_URL = `https://${process.env.API_HOST}`;
131
131
  const $367e4a81566d966b$export$af88d00dbe7f521 = (()=>{
132
132
  const ddTok = 'pubb96b84a13912504f4354f2d794ea4fab';
133
- let isTelemetryEnabled = true;
133
+ let isTelemetryEnabled = process.env.NODE_ENV !== 'test';
134
134
  const _log = async (message, level, attributes = {})=>{
135
135
  if (!isTelemetryEnabled) return;
136
136
  let env;
@@ -285,7 +285,7 @@ const $2cc07a9862fd14af$export$2b0a6e5a1c78018f = (elementsClientUrl)=>{
285
285
  return;
286
286
  }
287
287
  // TODO refactor/remove this fallback
288
- let url = `https://${undefined}/elements`;
288
+ let url = `https://${process.env.JS_HOST}/elements`;
289
289
  if (typeof elementsClientUrl !== 'undefined') try {
290
290
  const urlObject = new URL(elementsClientUrl);
291
291
  url = urlObject.toString().replace(/\/$/u, '');
@@ -309,7 +309,7 @@ const $2cc07a9862fd14af$export$2b0a6e5a1c78018f = (elementsClientUrl)=>{
309
309
 
310
310
 
311
311
  var $6a2f0bfcc5905f21$exports = {};
312
- const $6a2f0bfcc5905f21$var$version = '1.11.3';
312
+ const $6a2f0bfcc5905f21$var$version = '1.11.5';
313
313
  $6a2f0bfcc5905f21$exports = {
314
314
  version: $6a2f0bfcc5905f21$var$version
315
315
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/web-elements",
3
- "version": "1.11.3",
3
+ "version": "1.11.5",
4
4
  "repository": "https://github.com/basis-theory/web-elements",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -16,10 +16,9 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "prebuild": "TARGET_DIR=../../web-elements/src node ../scripts/web-elements/write-version-file.js",
19
- "build:dev": "yarn clean && parcel build && yarn generateTypes && npx size-limit && yarn generate-sri",
20
- "build": "node ../scripts/web-elements/prepare.js && parcel build --no-cache && yarn generateTypes && yarn generate-sri",
19
+ "build:dev": "yarn clean && parcel build && npx size-limit && yarn generate-sri",
20
+ "build": "node ../scripts/web-elements/prepare.js && parcel build --no-cache && yarn generate-sri",
21
21
  "clean": "rimraf dist .parcel-cache",
22
- "generateTypes": "tsc --emitDeclarationOnly",
23
22
  "generate-sri": "node ../scripts/web-elements/generate-sri.js",
24
23
  "lint-staged": "lint-staged",
25
24
  "lint:fix": "eslint --fix",