ui.shipaid.com 0.3.156 → 0.3.157
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
|
@@ -3757,6 +3757,30 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
3757
3757
|
}
|
|
3758
3758
|
return x`${parts.map((p2) => x`${p2} `)}`;
|
|
3759
3759
|
};
|
|
3760
|
+
this.updated = (changedProperties) => {
|
|
3761
|
+
super.updated(changedProperties);
|
|
3762
|
+
if (!this._hasFinishedSetup) return;
|
|
3763
|
+
const dbContactlessSelector = this._getContactlessCheckoutSelector();
|
|
3764
|
+
const sessionSelector = sessionStorage.getItem("shipaidWidgetTheme");
|
|
3765
|
+
if (!sessionSelector && dbContactlessSelector) {
|
|
3766
|
+
sessionStorage.setItem("shipaidWidgetTheme", dbContactlessSelector);
|
|
3767
|
+
}
|
|
3768
|
+
if (this.useShipAidCheckout || !dbContactlessSelector) {
|
|
3769
|
+
sessionStorage.removeItem("shipaidWidgetTheme");
|
|
3770
|
+
}
|
|
3771
|
+
if (!this.useShipAidCheckout) {
|
|
3772
|
+
document.querySelectorAll('[id*="shipaid-checkout-container"]').forEach((container) => container.remove());
|
|
3773
|
+
}
|
|
3774
|
+
if (!this._shouldShowWidgetContent()) {
|
|
3775
|
+
const selector = sessionStorage.getItem("shipaidWidgetTheme") || this.dataSelector;
|
|
3776
|
+
if (selector) {
|
|
3777
|
+
this.getElementsBySelector(selector).forEach((button) => {
|
|
3778
|
+
button.removeAttribute("shipaid-hidden");
|
|
3779
|
+
});
|
|
3780
|
+
}
|
|
3781
|
+
this._restoreCheckoutButtonState();
|
|
3782
|
+
}
|
|
3783
|
+
};
|
|
3760
3784
|
}
|
|
3761
3785
|
shouldUpdate(props) {
|
|
3762
3786
|
return this.hasLoadedStrings && super.shouldUpdate(props);
|
|
@@ -5522,30 +5546,6 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
5522
5546
|
}
|
|
5523
5547
|
this._restoreCheckoutButtonState();
|
|
5524
5548
|
}
|
|
5525
|
-
updated(changedProperties) {
|
|
5526
|
-
super.updated(changedProperties);
|
|
5527
|
-
if (!this._hasFinishedSetup) return;
|
|
5528
|
-
const dbContactlessSelector = this._getContactlessCheckoutSelector();
|
|
5529
|
-
const sessionSelector = sessionStorage.getItem("shipaidWidgetTheme");
|
|
5530
|
-
if (!sessionSelector && dbContactlessSelector) {
|
|
5531
|
-
sessionStorage.setItem("shipaidWidgetTheme", dbContactlessSelector);
|
|
5532
|
-
}
|
|
5533
|
-
if (this.useShipAidCheckout || !dbContactlessSelector) {
|
|
5534
|
-
sessionStorage.removeItem("shipaidWidgetTheme");
|
|
5535
|
-
}
|
|
5536
|
-
if (!this.useShipAidCheckout) {
|
|
5537
|
-
document.querySelectorAll('[id*="shipaid-checkout-container"]').forEach((container) => container.remove());
|
|
5538
|
-
}
|
|
5539
|
-
if (!this._shouldShowWidgetContent()) {
|
|
5540
|
-
const selector = sessionStorage.getItem("shipaidWidgetTheme") || this.dataSelector;
|
|
5541
|
-
if (selector) {
|
|
5542
|
-
this.getElementsBySelector(selector).forEach((button) => {
|
|
5543
|
-
button.removeAttribute("shipaid-hidden");
|
|
5544
|
-
});
|
|
5545
|
-
}
|
|
5546
|
-
this._restoreCheckoutButtonState();
|
|
5547
|
-
}
|
|
5548
|
-
}
|
|
5549
5549
|
async updateProtection(force = false) {
|
|
5550
5550
|
var _a, _b, _c;
|
|
5551
5551
|
this._cartLastUpdated = /* @__PURE__ */ new Date();
|