ui.shipaid.com 0.3.174 → 0.3.176

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
@@ -4668,7 +4668,8 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4668
4668
  * @private
4669
4669
  */
4670
4670
  _renderDefaultCheckoutButton(originalClasses, protectionPrice, cartTotal, isGreenProtectionEnabled, isFreeGiftEnabled, impactActive, loading2) {
4671
- var _a, _b, _c, _d, _e, _f;
4671
+ var _a, _b, _c, _d, _e, _f, _g, _h;
4672
+ const { logo, title: title2 = "", linkContinueText } = ((_b = (_a = this._store) == null ? void 0 : _a.widgetConfigurations) == null ? void 0 : _b.checkoutPlus) || { logo: null, title: null, linkContinueText: null };
4672
4673
  return x`
4673
4674
  <style>
4674
4675
  :host {
@@ -4842,11 +4843,11 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4842
4843
  <div class="protection-info">
4843
4844
  <div class="protection-text">
4844
4845
  <img
4845
- src="${impactActive ? ShipAidImpactIcon : ShipAidBlueIcon}"
4846
+ src="${logo || (impactActive ? ShipAidImpactIcon : ShipAidBlueIcon)}"
4846
4847
  style="width: 20px;"
4847
4848
  />
4848
4849
  ${n(
4849
- !this.widgetTitle,
4850
+ !(this.widgetTitle || title2),
4850
4851
  () => x`<strong
4851
4852
  >${translate("checkout-plus.checkout-title")}+</strong
4852
4853
  >`
@@ -4854,8 +4855,8 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4854
4855
  <div class="protection-value">
4855
4856
  <slot name="checkout-plus-heading">
4856
4857
  ${n(
4857
- this.widgetTitle,
4858
- () => o$4(this.widgetTitle),
4858
+ this.widgetTitle || title2,
4859
+ () => o$4(this.widgetTitle || title2 || ""),
4859
4860
  () => impactActive ? this.renderImpactTitle(isGreenProtectionEnabled, isFreeGiftEnabled) : translate("checkout-plus.title")
4860
4861
  )}
4861
4862
  </slot>
@@ -4879,7 +4880,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4879
4880
  ${this._sellingPlanId ? x`
4880
4881
  <button
4881
4882
  id="${this.buttonId || "shipaid-checkout-button"}"
4882
- variant="${(_a = this._protectionVariant) == null ? void 0 : _a.id}"
4883
+ variant="${(_c = this._protectionVariant) == null ? void 0 : _c.id}"
4883
4884
  class="${this.buttonClasses || originalClasses}"
4884
4885
  @click=${async () => {
4885
4886
  var _a2, _b2;
@@ -4896,8 +4897,8 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4896
4897
  </button>
4897
4898
  ` : x`
4898
4899
  <a
4899
- variant="${(_b = this._protectionVariant) == null ? void 0 : _b.id}"
4900
- href="/checkout${((_c = this._protectionVariant) == null ? void 0 : _c.id) ? `?attributes[_shipaid-internal]=1&updates[${(_d = this._protectionVariant) == null ? void 0 : _d.id}]=1` : ""}"
4900
+ variant="${(_d = this._protectionVariant) == null ? void 0 : _d.id}"
4901
+ href="/checkout${((_e = this._protectionVariant) == null ? void 0 : _e.id) ? `?attributes[_shipaid-internal]=1&updates[${(_f = this._protectionVariant) == null ? void 0 : _f.id}]=1` : ""}"
4901
4902
  id="${this.buttonId || "shipaid-checkout-button"}"
4902
4903
  class="${this.buttonClasses || originalClasses}"
4903
4904
  @click=${() => {
@@ -4919,12 +4920,13 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4919
4920
  </a>
4920
4921
  `}
4921
4922
  <a
4922
- href="/checkout${((_e = this._protectionVariant) == null ? void 0 : _e.id) ? `?attributes[_shipaid-internal]=1&updates[${(_f = this._protectionVariant) == null ? void 0 : _f.id}]=0` : ""}"
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` : ""}"
4923
4924
  class="continue-link"
4924
- >
4925
- <slot name="link-continue"
4926
- >${translate("checkout-plus.continue")}${isFreeGiftEnabled ? translate("plus.suffix.no-gift") : ""}</slot
4927
- >
4925
+ > ${n(
4926
+ linkContinueText,
4927
+ () => o$4(linkContinueText),
4928
+ () => `${translate("checkout-plus.continue")}${isFreeGiftEnabled ? translate("plus.suffix.no-gift") : ""}`
4929
+ )}
4928
4930
  </a>
4929
4931
  </div>
4930
4932
  `;
@@ -5038,17 +5040,13 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
5038
5040
  this._hasProtectionInCart,
5039
5041
  () => impactActive ? x`<img
5040
5042
  src="${activeLogo || ShipAidBlackImpactIcon}"
5041
- style="width: 50px;"
5042
5043
  />` : activeLogo ? x`<img
5043
5044
  src="${activeLogo}"
5044
- style="width: 50px;"
5045
5045
  />` : ShipAidLogo,
5046
5046
  () => impactActive ? x`<img
5047
5047
  src="${inactiveLogo || ShipAidImpactIcon}"
5048
- style="width: 50px;"
5049
5048
  />` : inactiveLogo ? x`<img
5050
5049
  src="${activeLogo}"
5051
- style="width: 50px;"
5052
5050
  />` : CheckmarkIcon
5053
5051
  )}
5054
5052
  </div>