ui.shipaid.com 0.3.165 → 0.3.166
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
|
@@ -3666,6 +3666,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
3666
3666
|
this._checkoutButtonStylesInjected = false;
|
|
3667
3667
|
this._cachedCheckoutButton = null;
|
|
3668
3668
|
this._cachedCheckoutButtonClasses = "";
|
|
3669
|
+
this._isCartPage = false;
|
|
3669
3670
|
this._onShipAidCartEvent = (event) => {
|
|
3670
3671
|
var _a2, _b2;
|
|
3671
3672
|
if (((_b2 = (_a2 = event == null ? void 0 : event.detail) == null ? void 0 : _a2.data) == null ? void 0 : _b2.source) === "shipaid-widget") return;
|
|
@@ -5501,6 +5502,8 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
5501
5502
|
// Load the initial language and mark that the strings has been loaded so the component can render.
|
|
5502
5503
|
async connectedCallback() {
|
|
5503
5504
|
super.connectedCallback();
|
|
5505
|
+
const pathname = window.location.pathname.replace(/\/$/, "");
|
|
5506
|
+
if (pathname === "/cart") this._isCartPage = true;
|
|
5504
5507
|
await use(this.lang);
|
|
5505
5508
|
this.hasLoadedStrings = true;
|
|
5506
5509
|
this.fetchInterceptorCleanup = interceptFetch(async (args, promise) => {
|
|
@@ -5874,6 +5877,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
5874
5877
|
width: var(--shipaid-prompt-width, 100%);
|
|
5875
5878
|
margin: var(--shipaid-prompt-margin, unset);
|
|
5876
5879
|
padding: var(--shipaid-prompt-padding, unset);
|
|
5880
|
+
${this._isCartPage ? "max-width: fit-content;" : ""}
|
|
5877
5881
|
}
|
|
5878
5882
|
|
|
5879
5883
|
.shipaid-prompt p,
|