ui.shipaid.com 0.3.79 → 0.3.81

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/dist/widget.es.js CHANGED
@@ -2018,7 +2018,7 @@ class CheckoutPackageProtection extends s$1 {
2018
2018
  </div>
2019
2019
 
2020
2020
  <a id="shipaid-checkout-button" class="${this.originalClasses}" href="/checkout${this.shipaidVariant ? `?attributes[_shipaid-internal]=1&updates[${this.shipaidVariant}]=1` : ""}">
2021
- CHECKOUT+ ${this.checkoutTotal}
2021
+ <span>CHECKOUT+ ${this.checkoutTotal}</span>
2022
2022
  </a>
2023
2023
 
2024
2024
  <a id="shipaid-continue-button" href="#" class="continue-link" @click=${this.handleCheckoutWithoutProtection}>
@@ -2950,7 +2950,6 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
2950
2950
  const styleRules = styles2.split(";").map((rule) => rule.trim()).filter(Boolean);
2951
2951
  const shipaidCheckoutContainerStyles = styleRules.filter((rule) => rule.includes("shipaid-checkout-container")).join("; ");
2952
2952
  const shipaidCheckoutComponentStyles = styleRules.filter((rule) => !rule.includes("shipaid-checkout-container")).join("; ");
2953
- console.log("Styles applied ===========>", { shipaidCheckoutContainerStyles, shipaidCheckoutComponentStyles });
2954
2953
  const styleElement = document.createElement("style");
2955
2954
  styleElement.id = "shipaid-styles";
2956
2955
  styleElement.textContent = `
@@ -2959,7 +2958,6 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
2959
2958
  }
2960
2959
 
2961
2960
  .shipaid-checkout-container {
2962
- width: 100%;
2963
2961
  display: flex;
2964
2962
  ${shipaidCheckoutContainerStyles};
2965
2963
  justify-content: var(--shipaid-checkout-container-x-position, center);
@@ -2978,6 +2976,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
2978
2976
  if (!container) {
2979
2977
  container = document.createElement("div");
2980
2978
  container.id = containerId;
2979
+ container.style.width = "100%";
2981
2980
  container.className = "shipaid-checkout-container";
2982
2981
  originalCheckoutButton.insertAdjacentElement("afterend", container);
2983
2982
  }
@@ -3003,6 +3002,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3003
3002
  .shipaid-container a#shipaid-checkout-button {
3004
3003
  width: 100%;
3005
3004
  margin: 0px;
3005
+ text-decoration: unset;
3006
3006
  }
3007
3007
  .shipaid-container a#shipaid-continue-button {
3008
3008
  display: block;
@@ -1005,7 +1005,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1005
1005
  </div>
1006
1006
 
1007
1007
  <a id="shipaid-checkout-button" class="${this.originalClasses}" href="/checkout${this.shipaidVariant?`?attributes[_shipaid-internal]=1&updates[${this.shipaidVariant}]=1`:""}">
1008
- CHECKOUT+ ${this.checkoutTotal}
1008
+ <span>CHECKOUT+ ${this.checkoutTotal}</span>
1009
1009
  </a>
1010
1010
 
1011
1011
  <a id="shipaid-continue-button" href="#" class="continue-link" @click=${this.handleCheckoutWithoutProtection}>
@@ -1179,7 +1179,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1179
1179
  @close=${()=>{this.persistPopup&&localStorage.removeItem(`${Ce}`),this._popup=null}}
1180
1180
  @remove-protection=${()=>{this.removeProtection(),this.persistPopup&&localStorage.removeItem(`${Ce}`),this._popup=null}}
1181
1181
  ></shipaid-popup-confirmation>
1182
- `}contactlessCheckoutButtonTemplate(){var t,e,i,o;const r=(null==(o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.theme_checkout)?void 0:o.styles)||"";if(!document.getElementById("shipaid-styles")&&r.trim()){const t=r.split(";").map((t=>t.trim())).filter(Boolean),e=t.filter((t=>t.includes("shipaid-checkout-container"))).join("; "),i=t.filter((t=>!t.includes("shipaid-checkout-container"))).join("; ");console.log("Styles applied ===========>",{shipaidCheckoutContainerStyles:e,shipaidCheckoutComponentStyles:i});const o=document.createElement("style");o.id="shipaid-styles",o.textContent=`\n checkout-package-protection {\n ${i};\n }\n\n .shipaid-checkout-container {\n width: 100%;\n display: flex;\n ${e};\n justify-content: var(--shipaid-checkout-container-x-position, center);\n }\n `.trim(),document.head.appendChild(o)}const n=document.querySelectorAll(`${sessionStorage.getItem("shipaidWidgetTheme")}:not(#shipaid-checkout-button)`);if(n.length)return n.forEach(((t,e)=>{var i,o,r;const n=`shipaid-checkout-container-${e}`;t.style.display="none";const a=t.className;let s=document.getElementById(n);s||(s=document.createElement("div"),s.id=n,s.className="shipaid-checkout-container",t.insertAdjacentElement("afterend",s));const p=Number(null==(i=this._protectionVariant)?void 0:i.price)||0,d=(Number(null==(o=this._cart)?void 0:o.total_price)||0)/100,l=this._hasProtectionInCart?d:p+d,c=H`
1182
+ `}contactlessCheckoutButtonTemplate(){var t,e,i,o;const r=(null==(o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.theme_checkout)?void 0:o.styles)||"";if(!document.getElementById("shipaid-styles")&&r.trim()){const t=r.split(";").map((t=>t.trim())).filter(Boolean),e=t.filter((t=>t.includes("shipaid-checkout-container"))).join("; "),i=t.filter((t=>!t.includes("shipaid-checkout-container"))).join("; "),o=document.createElement("style");o.id="shipaid-styles",o.textContent=`\n checkout-package-protection {\n ${i};\n }\n\n .shipaid-checkout-container {\n display: flex;\n ${e};\n justify-content: var(--shipaid-checkout-container-x-position, center);\n }\n `.trim(),document.head.appendChild(o)}const n=document.querySelectorAll(`${sessionStorage.getItem("shipaidWidgetTheme")}:not(#shipaid-checkout-button)`);if(n.length)return n.forEach(((t,e)=>{var i,o,r;const n=`shipaid-checkout-container-${e}`;t.style.display="none";const a=t.className;let s=document.getElementById(n);s||(s=document.createElement("div"),s.id=n,s.style.width="100%",s.className="shipaid-checkout-container",t.insertAdjacentElement("afterend",s));const p=Number(null==(i=this._protectionVariant)?void 0:i.price)||0,d=(Number(null==(o=this._cart)?void 0:o.total_price)||0)/100,l=this._hasProtectionInCart?d:p+d,c=H`
1183
1183
  <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
1184
1184
  <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
1185
1185
  <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
@@ -1196,6 +1196,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1196
1196
  .shipaid-container a#shipaid-checkout-button {
1197
1197
  width: 100%;
1198
1198
  margin: 0px;
1199
+ text-decoration: unset;
1199
1200
  }
1200
1201
  .shipaid-container a#shipaid-continue-button {
1201
1202
  display: block;
@@ -1005,7 +1005,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1005
1005
  </div>
1006
1006
 
1007
1007
  <a id="shipaid-checkout-button" class="${this.originalClasses}" href="/checkout${this.shipaidVariant?`?attributes[_shipaid-internal]=1&updates[${this.shipaidVariant}]=1`:""}">
1008
- CHECKOUT+ ${this.checkoutTotal}
1008
+ <span>CHECKOUT+ ${this.checkoutTotal}</span>
1009
1009
  </a>
1010
1010
 
1011
1011
  <a id="shipaid-continue-button" href="#" class="continue-link" @click=${this.handleCheckoutWithoutProtection}>
@@ -1179,7 +1179,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1179
1179
  @close=${()=>{this.persistPopup&&localStorage.removeItem(`${Ce}`),this._popup=null}}
1180
1180
  @remove-protection=${()=>{this.removeProtection(),this.persistPopup&&localStorage.removeItem(`${Ce}`),this._popup=null}}
1181
1181
  ></shipaid-popup-confirmation>
1182
- `}contactlessCheckoutButtonTemplate(){var t,e,i,o;const r=(null==(o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.theme_checkout)?void 0:o.styles)||"";if(!document.getElementById("shipaid-styles")&&r.trim()){const t=r.split(";").map((t=>t.trim())).filter(Boolean),e=t.filter((t=>t.includes("shipaid-checkout-container"))).join("; "),i=t.filter((t=>!t.includes("shipaid-checkout-container"))).join("; ");console.log("Styles applied ===========>",{shipaidCheckoutContainerStyles:e,shipaidCheckoutComponentStyles:i});const o=document.createElement("style");o.id="shipaid-styles",o.textContent=`\n checkout-package-protection {\n ${i};\n }\n\n .shipaid-checkout-container {\n width: 100%;\n display: flex;\n ${e};\n justify-content: var(--shipaid-checkout-container-x-position, center);\n }\n `.trim(),document.head.appendChild(o)}const n=document.querySelectorAll(`${sessionStorage.getItem("shipaidWidgetTheme")}:not(#shipaid-checkout-button)`);if(n.length)return n.forEach(((t,e)=>{var i,o,r;const n=`shipaid-checkout-container-${e}`;t.style.display="none";const a=t.className;let s=document.getElementById(n);s||(s=document.createElement("div"),s.id=n,s.className="shipaid-checkout-container",t.insertAdjacentElement("afterend",s));const p=Number(null==(i=this._protectionVariant)?void 0:i.price)||0,d=(Number(null==(o=this._cart)?void 0:o.total_price)||0)/100,l=this._hasProtectionInCart?d:p+d,c=H`
1182
+ `}contactlessCheckoutButtonTemplate(){var t,e,i,o;const r=(null==(o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.theme_checkout)?void 0:o.styles)||"";if(!document.getElementById("shipaid-styles")&&r.trim()){const t=r.split(";").map((t=>t.trim())).filter(Boolean),e=t.filter((t=>t.includes("shipaid-checkout-container"))).join("; "),i=t.filter((t=>!t.includes("shipaid-checkout-container"))).join("; "),o=document.createElement("style");o.id="shipaid-styles",o.textContent=`\n checkout-package-protection {\n ${i};\n }\n\n .shipaid-checkout-container {\n display: flex;\n ${e};\n justify-content: var(--shipaid-checkout-container-x-position, center);\n }\n `.trim(),document.head.appendChild(o)}const n=document.querySelectorAll(`${sessionStorage.getItem("shipaidWidgetTheme")}:not(#shipaid-checkout-button)`);if(n.length)return n.forEach(((t,e)=>{var i,o,r;const n=`shipaid-checkout-container-${e}`;t.style.display="none";const a=t.className;let s=document.getElementById(n);s||(s=document.createElement("div"),s.id=n,s.style.width="100%",s.className="shipaid-checkout-container",t.insertAdjacentElement("afterend",s));const p=Number(null==(i=this._protectionVariant)?void 0:i.price)||0,d=(Number(null==(o=this._cart)?void 0:o.total_price)||0)/100,l=this._hasProtectionInCart?d:p+d,c=H`
1183
1183
  <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
1184
1184
  <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
1185
1185
  <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
@@ -1196,6 +1196,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1196
1196
  .shipaid-container a#shipaid-checkout-button {
1197
1197
  width: 100%;
1198
1198
  margin: 0px;
1199
+ text-decoration: unset;
1199
1200
  }
1200
1201
  .shipaid-container a#shipaid-continue-button {
1201
1202
  display: block;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.79",
4
+ "version": "0.3.81",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",