Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

txact-subscribe-button-2

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

txact-subscribe-button-2 - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

dist/main.js

@@ -1,1 +0,1 @@

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);const r=document.createElement("template");r.innerHTML='\n <style>\n .subscribe-button {\n width: 367px;\n font-family: Volvo Novum;\n font-size: 18px;\n line-height: 21px;\n text-align: center;\n letter-spacing: 0.03em;\n cursor: pointer;\n height: 70px;\n background: #007bcd;\n border: 1px solid #007bcd;\n stroke: #ffffff;\n padding: 20px 50px;\n fill: #ffffff;\n color: #ffffff;\n }\n \n .subscribe-button:hover {\n background: #008ae6;\n }\n \n .subscribe-button:focus {\n border: 1px solid #007bcd;\n }\n \n .subscribe-button[disabled] {\n opacity: 0.5;\n pointer-events: none;\n }\n \n </style>\n <div>\n <button type="subscribe-button" id=\'subscribe-button\' class="subscribe-button" >\n <slot></slot>\n </button>\n </div>\n';class o extends HTMLElement{constructor(){super(),this.root=this.attachShadow({mode:"open"}),this.root.appendChild(r.content.cloneNode(!0)),this.subscribeButton=this.root.getElementById("subscribe-button"),this.subscribeButton.addEventListener("click",()=>this.handleClick()),this.subscribeButton.disabled=!0,this._co=""}connectedCallback(){let t=`${this.ep}/products/vehicles?market=${this.market}`+`&m=${this.m}}&c=${this.c}&provider=${this.provider}`;fetch(t,{method:"GET",headers:{Accept:"application/vnd.volvocars.api.x.transferresponse.v1+json","Content-Type":"application/vnd.volvocars.api.x.stockcar.v1+json"}}).then(t=>{t.json().then(t=>{this.subscribeButton.disabled=!1,this._co="https://www.google.com"})}).catch(t=>{this.subscribeButton.disabled=!1,this._co="https://www.google.com"})}handleClick(){this._co&&window.location.replace(this._co)}get ep(){return this.getAttribute("ep")}set ep(t){this.setAttribute("ep",t)}get provider(){return this.getAttribute("provider")}set provider(t){this.setAttribute("provider",t)}get m(){return this.getAttribute("m")}set m(t){this.setAttribute("m",t)}get c(){return this.getAttribute("c")}set c(t){this.setAttribute("c",t)}get market(){return this.getAttribute("market")}set market(t){this.setAttribute("market",t)}}customElements.get("txact-subscribe-button")||window.customElements.define("txact-subscribe-button",o)}]);
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);const r=document.createElement("template");r.innerHTML='\n <style>\n .subscribe-button {\n width: 367px;\n font-family: Volvo Novum;\n font-size: 18px;\n line-height: 21px;\n text-align: center;\n letter-spacing: 0.03em;\n cursor: pointer;\n height: 70px;\n background: #007bcd;\n border: 1px solid #007bcd;\n stroke: #ffffff;\n padding: 20px 50px;\n fill: #ffffff;\n color: #ffffff;\n }\n \n .subscribe-button:hover {\n background: #008ae6;\n }\n \n .subscribe-button:focus {\n border: 1px solid #007bcd;\n }\n \n .subscribe-button[disabled] {\n opacity: 0.5;\n pointer-events: none;\n }\n \n </style>\n <div>\n <button type="subscribe-button" id=\'subscribe-button\' class="subscribe-button" >\n <slot></slot>\n </button>\n </div>\n';class s extends HTMLElement{constructor(){super(),this.root=this.attachShadow({mode:"open"}),this.root.appendChild(r.content.cloneNode(!0)),this.subscribeButton=this.root.getElementById("subscribe-button"),this.subscribeButton.addEventListener("click",()=>this.handleClick()),this.subscribeButton.disabled=!0,this._co=""}connectedCallback(){this.subscribeButton.hasAttribute("style")&&(this.subscribeButton.style=this.subscribeButton.getAttribute("style"));let t=`${this.ep}/products/vehicles?market=${this.market}`+`&m=${this.m}}&c=${this.c}&provider=${this.provider}`;fetch(t,{method:"GET",headers:{Accept:"application/vnd.volvocars.api.x.transferresponse.v1+json","Content-Type":"application/vnd.volvocars.api.x.stockcar.v1+json"}}).then(t=>{t.json().then(t=>{this.subscribeButton.disabled=!1,this._co="https://www.google.com"})}).catch(t=>{this.subscribeButton.disabled=!1,this._co="https://www.google.com"})}handleClick(){this._co&&window.location.replace(this._co)}get ep(){return this.getAttribute("ep")}set ep(t){this.setAttribute("ep",t)}get provider(){return this.getAttribute("provider")}set provider(t){this.setAttribute("provider",t)}get m(){return this.getAttribute("m")}set m(t){this.setAttribute("m",t)}get c(){return this.getAttribute("c")}set c(t){this.setAttribute("c",t)}get market(){return this.getAttribute("market")}set market(t){this.setAttribute("market",t)}}customElements.get("txact-subscribe-button")||window.customElements.define("txact-subscribe-button",s)}]);
{
"name": "txact-subscribe-button-2",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/main.js",

@@ -68,2 +68,5 @@ const subscribeButtonTemplateString = `

connectedCallback() {
if (this.subscribeButton.hasAttribute('style')) {
this.subscribeButton.style = this.subscribeButton.getAttribute('style');
}
let path=`${this.ep}/products/vehicles?market=${this.market}`+

@@ -70,0 +73,0 @@ `&m=${this.m}}&c=${this.c}&provider=${this.provider}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc