ui.shipaid.com 0.3.176 → 0.3.178
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 +9 -7
- package/dist/widget.iife.js +15 -12
- package/dist/widget.umd.js +15 -12
- package/package.json +1 -1
package/dist/widget.es.js
CHANGED
|
@@ -4922,11 +4922,10 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
|
|
|
4922
4922
|
<a
|
|
4923
4923
|
href="/checkout${((_g = this._protectionVariant) == null ? void 0 : _g.id) ? `?attributes[_shipaid-internal]=1&updates[${(_h = this._protectionVariant) == null ? void 0 : _h.id}]=0` : ""}"
|
|
4924
4924
|
class="continue-link"
|
|
4925
|
-
>
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
)}
|
|
4925
|
+
>
|
|
4926
|
+
<slot name="link-continue"
|
|
4927
|
+
>${linkContinueText || translate("checkout-plus.continue")}${!linkContinueText && isFreeGiftEnabled ? translate("plus.suffix.no-gift") : ""}</slot
|
|
4928
|
+
>
|
|
4930
4929
|
</a>
|
|
4931
4930
|
</div>
|
|
4932
4931
|
`;
|
|
@@ -6986,6 +6985,7 @@ class ShipAidCheckoutPlus extends s$1 {
|
|
|
6986
6985
|
return x`${styles2}${content}`;
|
|
6987
6986
|
}
|
|
6988
6987
|
_renderLegacyContent({ isGreen, isFreeGiftEnabled, iconImg, price }) {
|
|
6988
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6989
6989
|
const helpClass = isGreen ? "cp-help green" : "cp-help";
|
|
6990
6990
|
const title2 = get("checkout-plus.labels.cta");
|
|
6991
6991
|
const protectedLabel = get("checkout-plus.labels.protected");
|
|
@@ -7002,6 +7002,8 @@ class ShipAidCheckoutPlus extends s$1 {
|
|
|
7002
7002
|
const withFreeGift = isFreeGiftEnabled ? ` ${get("plus.suffix.with-free-gift")}` : "";
|
|
7003
7003
|
const unprotectedLabel = get("checkout-plus.continue");
|
|
7004
7004
|
const noGiftSuffix = isFreeGiftEnabled ? get("plus.suffix.no-gift") : "";
|
|
7005
|
+
const customProtectionLabel = (_c = (_b = (_a = this._store) == null ? void 0 : _a.checkoutPlus) == null ? void 0 : _b.labels) == null ? void 0 : _c.protectedLabel;
|
|
7006
|
+
const customNoProtectionLabel = (_f = (_e = (_d = this._store) == null ? void 0 : _d.checkoutPlus) == null ? void 0 : _e.labels) == null ? void 0 : _f.noProtectedLabel;
|
|
7005
7007
|
return x`
|
|
7006
7008
|
<div class="cp-container">
|
|
7007
7009
|
<div class="cp-topbar">
|
|
@@ -7029,12 +7031,12 @@ class ShipAidCheckoutPlus extends s$1 {
|
|
|
7029
7031
|
</div>
|
|
7030
7032
|
|
|
7031
7033
|
<button class="cp-primary" ?disabled=${this._toggleLoading} @click=${this.handleLegacyPrimaryClick}>
|
|
7032
|
-
${this._hasProtectionInCart ? checkoutLabel : x`${primaryProtected}${withFreeGift}`}
|
|
7034
|
+
${customProtectionLabel || (this._hasProtectionInCart ? checkoutLabel : x`${primaryProtected}${withFreeGift}`)}
|
|
7033
7035
|
</button>
|
|
7034
7036
|
</div>
|
|
7035
7037
|
${this._hasProtectionInCart ? A : x`
|
|
7036
7038
|
<button class="cp-secondary" ?disabled=${this._toggleLoading} @click=${this.handleLegacySecondaryClick}>
|
|
7037
|
-
${unprotectedLabel}${noGiftSuffix}
|
|
7039
|
+
${customNoProtectionLabel || unprotectedLabel}${!customNoProtectionLabel || noGiftSuffix}
|
|
7038
7040
|
</button>
|
|
7039
7041
|
`}
|
|
7040
7042
|
`;
|
package/dist/widget.iife.js
CHANGED
|
@@ -1232,7 +1232,10 @@ function GA(A,e,t){return A?e():null==t?void 0:t()}const JA=aA`
|
|
|
1232
1232
|
<a
|
|
1233
1233
|
href="/checkout${(null==(B=this._protectionVariant)?void 0:B.id)?`?attributes[_shipaid-internal]=1&updates[${null==(Q=this._protectionVariant)?void 0:Q.id}]=0`:""}"
|
|
1234
1234
|
class="continue-link"
|
|
1235
|
-
>
|
|
1235
|
+
>
|
|
1236
|
+
<slot name="link-continue"
|
|
1237
|
+
>${c||LA("checkout-plus.continue")}${!c&&n?LA("plus.suffix.no-gift"):""}</slot
|
|
1238
|
+
>
|
|
1236
1239
|
</a>
|
|
1237
1240
|
</div>
|
|
1238
1241
|
`}checkoutButtonTemplate(){var A,e;this._injectCheckoutButtonGlobalStyles();const t=this._findAndCacheCheckoutButton();if(!t)return;t.setAttribute("shipaid-hidden","");const d=this._cachedCheckoutButtonClasses||t.className,{protectionPrice:n,cartTotal:r}=this._calculateCheckoutCartTotals(),{isGreenProtectionEnabled:a,isFreeGiftEnabled:o,impactActive:g}=this._getCheckoutImpactFeatures(),v=E`
|
|
@@ -1961,39 +1964,39 @@ function GA(A,e,t){return A?e():null==t?void 0:t()}const JA=aA`
|
|
|
1961
1964
|
--cp-icon:11px;
|
|
1962
1965
|
}
|
|
1963
1966
|
}
|
|
1964
|
-
</style>`;this._hasRenderedLegacyOnce||"legacy"!==this._uiMode||(this._hasRenderedLegacyOnce=!0);const u="legacy"===this._uiMode?this._renderLegacyContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g}):this._renderToggleContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g});return E`${v}${u}`}_renderLegacyContent({isGreen:A,isFreeGiftEnabled:e,iconImg:t,price:d}){const
|
|
1967
|
+
</style>`;this._hasRenderedLegacyOnce||"legacy"!==this._uiMode||(this._hasRenderedLegacyOnce=!0);const u="legacy"===this._uiMode?this._renderLegacyContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g}):this._renderToggleContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g});return E`${v}${u}`}_renderLegacyContent({isGreen:A,isFreeGiftEnabled:e,iconImg:t,price:d}){var n,r,a,o,g,v;const u=A?"cp-help green":"cp-help",f=qA("checkout-plus.labels.cta"),D=qA("checkout-plus.labels.protected"),B=e?qA("plus.suffix.free-gift"):"",Q=A?qA("plus.suffix.tree"):"",p=qA("plus.learn-more"),s=qA("plus.benefits.title"),c=qA("plus.see-details"),i=qA("plus.benefits.protected"),l=qA("plus.benefits.free-gift"),P=qA("plus.benefits.tree"),b=qA("checkout-plus.buttons.secondary"),z=qA("checkout-plus.buttons.primary"),N=e?` ${qA("plus.suffix.with-free-gift")}`:"",X=qA("checkout-plus.continue"),w=e?qA("plus.suffix.no-gift"):"",m=null==(a=null==(r=null==(n=this._store)?void 0:n.checkoutPlus)?void 0:r.labels)?void 0:a.protectedLabel,O=null==(v=null==(g=null==(o=this._store)?void 0:o.checkoutPlus)?void 0:g.labels)?void 0:v.noProtectedLabel;return E`
|
|
1965
1968
|
<div class="cp-container">
|
|
1966
1969
|
<div class="cp-topbar">
|
|
1967
1970
|
<div class="cp-left">
|
|
1968
|
-
<img src="${t}" alt="${
|
|
1969
|
-
<span class="cp-title">${
|
|
1971
|
+
<img src="${t}" alt="${f}" class="cp-icon" />
|
|
1972
|
+
<span class="cp-title">${f} <small>${D}${B}${Q}</small></span>
|
|
1970
1973
|
</div>
|
|
1971
1974
|
<div class="cp-price">
|
|
1972
1975
|
<span>${d||"—"}</span>
|
|
1973
|
-
<span class=${
|
|
1976
|
+
<span class=${u} title="${p}" @click=${this.toggleDetails} aria-expanded="${this.isDetailsOpen}">${ne}</span>
|
|
1974
1977
|
</div>
|
|
1975
1978
|
</div>
|
|
1976
1979
|
<div class="cp-benefits-container ${this.isDetailsOpen?"open":""}">
|
|
1977
1980
|
<div class="cp-benefits">
|
|
1978
1981
|
<div class="cp-benefits__header">
|
|
1979
|
-
<span>${
|
|
1980
|
-
<a href="#" class="cp-benefits__link" @click=${()=>Ve("shipaid-checkout-plus")}>${
|
|
1982
|
+
<span>${s}</span>
|
|
1983
|
+
<a href="#" class="cp-benefits__link" @click=${()=>Ve("shipaid-checkout-plus")}>${c}</a>
|
|
1981
1984
|
</div>
|
|
1982
1985
|
<ul>
|
|
1983
|
-
<li>${ae}${
|
|
1984
|
-
${e?E`<li>${re}${
|
|
1985
|
-
${A?E`<li>${de}${
|
|
1986
|
+
<li>${ae}${i}</li>
|
|
1987
|
+
${e?E`<li>${re}${l}</li>`:T}
|
|
1988
|
+
${A?E`<li>${de}${P}</li>`:T}
|
|
1986
1989
|
</ul>
|
|
1987
1990
|
</div>
|
|
1988
1991
|
</div>
|
|
1989
1992
|
|
|
1990
1993
|
<button class="cp-primary" ?disabled=${this._toggleLoading} @click=${this.handleLegacyPrimaryClick}>
|
|
1991
|
-
${this._hasProtectionInCart?
|
|
1994
|
+
${m||(this._hasProtectionInCart?b:E`${z}${N}`)}
|
|
1992
1995
|
</button>
|
|
1993
1996
|
</div>
|
|
1994
1997
|
${this._hasProtectionInCart?T:E`
|
|
1995
1998
|
<button class="cp-secondary" ?disabled=${this._toggleLoading} @click=${this.handleLegacySecondaryClick}>
|
|
1996
|
-
${
|
|
1999
|
+
${O||X}${!O||w}
|
|
1997
2000
|
</button>
|
|
1998
2001
|
`}
|
|
1999
2002
|
`}_renderToggleContent({isGreen:A,isFreeGiftEnabled:e,iconImg:t,price:d}){const n=this._desiredProtection,r=A?"cp-help green":"cp-help",a=qA("checkout-plus.labels.cta"),o=qA("checkout-plus.labels.protected"),g=e?qA("plus.suffix.free-gift"):"",v=A?qA("plus.suffix.tree"):"",u=qA("plus.learn-more"),f=qA("plus.benefits.title"),D=qA("plus.see-details"),B=qA("plus.benefits.protected"),Q=qA("plus.benefits.free-gift"),p=qA("plus.benefits.tree"),s=qA("checkout-plus.aria.shipping"),c=qA("checkout-plus.buttons.secondary");return E`
|
package/dist/widget.umd.js
CHANGED
|
@@ -1232,7 +1232,10 @@ function GA(A,e,t){return A?e():null==t?void 0:t()}const JA=aA`
|
|
|
1232
1232
|
<a
|
|
1233
1233
|
href="/checkout${(null==(B=this._protectionVariant)?void 0:B.id)?`?attributes[_shipaid-internal]=1&updates[${null==(Q=this._protectionVariant)?void 0:Q.id}]=0`:""}"
|
|
1234
1234
|
class="continue-link"
|
|
1235
|
-
>
|
|
1235
|
+
>
|
|
1236
|
+
<slot name="link-continue"
|
|
1237
|
+
>${c||LA("checkout-plus.continue")}${!c&&n?LA("plus.suffix.no-gift"):""}</slot
|
|
1238
|
+
>
|
|
1236
1239
|
</a>
|
|
1237
1240
|
</div>
|
|
1238
1241
|
`}checkoutButtonTemplate(){var A,e;this._injectCheckoutButtonGlobalStyles();const t=this._findAndCacheCheckoutButton();if(!t)return;t.setAttribute("shipaid-hidden","");const d=this._cachedCheckoutButtonClasses||t.className,{protectionPrice:n,cartTotal:r}=this._calculateCheckoutCartTotals(),{isGreenProtectionEnabled:a,isFreeGiftEnabled:o,impactActive:g}=this._getCheckoutImpactFeatures(),v=E`
|
|
@@ -1961,39 +1964,39 @@ function GA(A,e,t){return A?e():null==t?void 0:t()}const JA=aA`
|
|
|
1961
1964
|
--cp-icon:11px;
|
|
1962
1965
|
}
|
|
1963
1966
|
}
|
|
1964
|
-
</style>`;this._hasRenderedLegacyOnce||"legacy"!==this._uiMode||(this._hasRenderedLegacyOnce=!0);const u="legacy"===this._uiMode?this._renderLegacyContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g}):this._renderToggleContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g});return E`${v}${u}`}_renderLegacyContent({isGreen:A,isFreeGiftEnabled:e,iconImg:t,price:d}){const
|
|
1967
|
+
</style>`;this._hasRenderedLegacyOnce||"legacy"!==this._uiMode||(this._hasRenderedLegacyOnce=!0);const u="legacy"===this._uiMode?this._renderLegacyContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g}):this._renderToggleContent({isGreen:r,isFreeGiftEnabled:a,iconImg:o,price:g});return E`${v}${u}`}_renderLegacyContent({isGreen:A,isFreeGiftEnabled:e,iconImg:t,price:d}){var n,r,a,o,g,v;const u=A?"cp-help green":"cp-help",f=qA("checkout-plus.labels.cta"),D=qA("checkout-plus.labels.protected"),B=e?qA("plus.suffix.free-gift"):"",Q=A?qA("plus.suffix.tree"):"",p=qA("plus.learn-more"),s=qA("plus.benefits.title"),c=qA("plus.see-details"),i=qA("plus.benefits.protected"),l=qA("plus.benefits.free-gift"),P=qA("plus.benefits.tree"),b=qA("checkout-plus.buttons.secondary"),z=qA("checkout-plus.buttons.primary"),N=e?` ${qA("plus.suffix.with-free-gift")}`:"",X=qA("checkout-plus.continue"),w=e?qA("plus.suffix.no-gift"):"",m=null==(a=null==(r=null==(n=this._store)?void 0:n.checkoutPlus)?void 0:r.labels)?void 0:a.protectedLabel,O=null==(v=null==(g=null==(o=this._store)?void 0:o.checkoutPlus)?void 0:g.labels)?void 0:v.noProtectedLabel;return E`
|
|
1965
1968
|
<div class="cp-container">
|
|
1966
1969
|
<div class="cp-topbar">
|
|
1967
1970
|
<div class="cp-left">
|
|
1968
|
-
<img src="${t}" alt="${
|
|
1969
|
-
<span class="cp-title">${
|
|
1971
|
+
<img src="${t}" alt="${f}" class="cp-icon" />
|
|
1972
|
+
<span class="cp-title">${f} <small>${D}${B}${Q}</small></span>
|
|
1970
1973
|
</div>
|
|
1971
1974
|
<div class="cp-price">
|
|
1972
1975
|
<span>${d||"—"}</span>
|
|
1973
|
-
<span class=${
|
|
1976
|
+
<span class=${u} title="${p}" @click=${this.toggleDetails} aria-expanded="${this.isDetailsOpen}">${ne}</span>
|
|
1974
1977
|
</div>
|
|
1975
1978
|
</div>
|
|
1976
1979
|
<div class="cp-benefits-container ${this.isDetailsOpen?"open":""}">
|
|
1977
1980
|
<div class="cp-benefits">
|
|
1978
1981
|
<div class="cp-benefits__header">
|
|
1979
|
-
<span>${
|
|
1980
|
-
<a href="#" class="cp-benefits__link" @click=${()=>Ve("shipaid-checkout-plus")}>${
|
|
1982
|
+
<span>${s}</span>
|
|
1983
|
+
<a href="#" class="cp-benefits__link" @click=${()=>Ve("shipaid-checkout-plus")}>${c}</a>
|
|
1981
1984
|
</div>
|
|
1982
1985
|
<ul>
|
|
1983
|
-
<li>${ae}${
|
|
1984
|
-
${e?E`<li>${re}${
|
|
1985
|
-
${A?E`<li>${de}${
|
|
1986
|
+
<li>${ae}${i}</li>
|
|
1987
|
+
${e?E`<li>${re}${l}</li>`:T}
|
|
1988
|
+
${A?E`<li>${de}${P}</li>`:T}
|
|
1986
1989
|
</ul>
|
|
1987
1990
|
</div>
|
|
1988
1991
|
</div>
|
|
1989
1992
|
|
|
1990
1993
|
<button class="cp-primary" ?disabled=${this._toggleLoading} @click=${this.handleLegacyPrimaryClick}>
|
|
1991
|
-
${this._hasProtectionInCart?
|
|
1994
|
+
${m||(this._hasProtectionInCart?b:E`${z}${N}`)}
|
|
1992
1995
|
</button>
|
|
1993
1996
|
</div>
|
|
1994
1997
|
${this._hasProtectionInCart?T:E`
|
|
1995
1998
|
<button class="cp-secondary" ?disabled=${this._toggleLoading} @click=${this.handleLegacySecondaryClick}>
|
|
1996
|
-
${
|
|
1999
|
+
${O||X}${!O||w}
|
|
1997
2000
|
</button>
|
|
1998
2001
|
`}
|
|
1999
2002
|
`}_renderToggleContent({isGreen:A,isFreeGiftEnabled:e,iconImg:t,price:d}){const n=this._desiredProtection,r=A?"cp-help green":"cp-help",a=qA("checkout-plus.labels.cta"),o=qA("checkout-plus.labels.protected"),g=e?qA("plus.suffix.free-gift"):"",v=A?qA("plus.suffix.tree"):"",u=qA("plus.learn-more"),f=qA("plus.benefits.title"),D=qA("plus.see-details"),B=qA("plus.benefits.protected"),Q=qA("plus.benefits.free-gift"),p=qA("plus.benefits.tree"),s=qA("checkout-plus.aria.shipping"),c=qA("checkout-plus.buttons.secondary");return E`
|