ui.shipaid.com 0.3.78 → 0.3.80
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 -2
- 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
|
@@ -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
|
}
|
package/dist/widget.iife.js
CHANGED
|
@@ -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("; ")
|
|
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">
|
package/dist/widget.umd.js
CHANGED
|
@@ -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("; ")
|
|
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">
|