ui.shipaid.com 0.3.61 → 0.3.62
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 +1 -1
- package/dist/widget.iife.js +1 -1
- package/dist/widget.umd.js +1 -1
- package/package.json +1 -1
package/dist/widget.es.js
CHANGED
|
@@ -3104,7 +3104,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
3104
3104
|
if (!originalCheckoutButton) return;
|
|
3105
3105
|
const originalClasses = originalCheckoutButton.className;
|
|
3106
3106
|
const protectionPrice = Number((_a = this._protectionVariant) == null ? void 0 : _a.price) || 0;
|
|
3107
|
-
const cartPrice = Number((_b = this._cart) == null ? void 0 : _b.total_price) || 0;
|
|
3107
|
+
const cartPrice = (Number((_b = this._cart) == null ? void 0 : _b.total_price) || 0) / 100;
|
|
3108
3108
|
const cartTotal = !this._hasProtectionInCart ? protectionPrice + cartPrice : cartPrice;
|
|
3109
3109
|
const loading2 = x`
|
|
3110
3110
|
<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">
|
package/dist/widget.iife.js
CHANGED
|
@@ -1274,7 +1274,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
|
|
|
1274
1274
|
@shipaid-add-protection=${()=>{var t,e;sessionStorage.setItem("shipaid_variant",JSON.stringify(null==(t=this._protectionVariant)?void 0:t.id)),window.location.href=`/checkout?attributes[_shipaid-internal]=1&updates[${null==(e=this._protectionVariant)?void 0:e.id}]=1`}}
|
|
1275
1275
|
@shipaid-remove-protection=${async()=>{await this.removeProtection(),window.location.href="/checkout"}}
|
|
1276
1276
|
></checkout-package-protection>
|
|
1277
|
-
`,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}const i=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!i)return;const o=i.className,r=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,n=Number(null==(e=this._cart)?void 0:e.total_price)||0,s=this._hasProtectionInCart?n:r+n,a=H`
|
|
1277
|
+
`,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}const i=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!i)return;const o=i.className,r=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,n=(Number(null==(e=this._cart)?void 0:e.total_price)||0)/100,s=this._hasProtectionInCart?n:r+n,a=H`
|
|
1278
1278
|
<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">
|
|
1279
1279
|
<circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
|
|
1280
1280
|
<path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
|
package/dist/widget.umd.js
CHANGED
|
@@ -1274,7 +1274,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
|
|
|
1274
1274
|
@shipaid-add-protection=${()=>{var t,e;sessionStorage.setItem("shipaid_variant",JSON.stringify(null==(t=this._protectionVariant)?void 0:t.id)),window.location.href=`/checkout?attributes[_shipaid-internal]=1&updates[${null==(e=this._protectionVariant)?void 0:e.id}]=1`}}
|
|
1275
1275
|
@shipaid-remove-protection=${async()=>{await this.removeProtection(),window.location.href="/checkout"}}
|
|
1276
1276
|
></checkout-package-protection>
|
|
1277
|
-
`,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}const i=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!i)return;const o=i.className,r=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,n=Number(null==(e=this._cart)?void 0:e.total_price)||0,s=this._hasProtectionInCart?n:r+n,a=H`
|
|
1277
|
+
`,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}const i=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!i)return;const o=i.className,r=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,n=(Number(null==(e=this._cart)?void 0:e.total_price)||0)/100,s=this._hasProtectionInCart?n:r+n,a=H`
|
|
1278
1278
|
<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">
|
|
1279
1279
|
<circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
|
|
1280
1280
|
<path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
|