ui.shipaid.com 0.3.61 → 0.3.63

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
@@ -2012,7 +2012,7 @@ class CheckoutPackageProtection extends s$1 {
2012
2012
  class="help-icon"
2013
2013
  @click=${this.handleAbout}
2014
2014
  >
2015
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24">
2015
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
2016
2016
  <path d="M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4">
2017
2017
  </path>
2018
2018
  </svg>
@@ -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">
@@ -3205,7 +3205,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3205
3205
  this.setPopupKey();
3206
3206
  }
3207
3207
  }}>
3208
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24">
3208
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
3209
3209
  <path d="M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4">
3210
3210
  </path>
3211
3211
  </svg>
@@ -997,7 +997,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
997
997
  class="help-icon"
998
998
  @click=${this.handleAbout}
999
999
  >
1000
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24">
1000
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
1001
1001
  <path d="M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4">
1002
1002
  </path>
1003
1003
  </svg>
@@ -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">
@@ -1367,7 +1367,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1367
1367
  </div>
1368
1368
  </div>
1369
1369
  <div class="help-icon" @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}>
1370
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24">
1370
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
1371
1371
  <path d="M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4">
1372
1372
  </path>
1373
1373
  </svg>
@@ -997,7 +997,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
997
997
  class="help-icon"
998
998
  @click=${this.handleAbout}
999
999
  >
1000
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24">
1000
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
1001
1001
  <path d="M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4">
1002
1002
  </path>
1003
1003
  </svg>
@@ -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">
@@ -1367,7 +1367,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1367
1367
  </div>
1368
1368
  </div>
1369
1369
  <div class="help-icon" @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}>
1370
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24">
1370
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
1371
1371
  <path d="M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4">
1372
1372
  </path>
1373
1373
  </svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.61",
4
+ "version": "0.3.63",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",