@propeller-commerce/propeller-v2-vue-ui 0.3.21 → 0.3.23
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/CHANGELOG.md +36 -0
- package/dist/components/CartPaymethods.vue.d.ts +3 -0
- package/dist/composables/vue/useCheckout.d.ts +19 -0
- package/dist/index.cjs +73 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +73 -59
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -946,7 +946,9 @@ function useCheckout(options) {
|
|
|
946
946
|
language
|
|
947
947
|
});
|
|
948
948
|
}
|
|
949
|
-
const orderStatus = opts.isQuoteMode ? "REQUEST" : "NEW";
|
|
949
|
+
const orderStatus = opts.orderStatus ?? (opts.isQuoteMode ? "REQUEST" : "NEW");
|
|
950
|
+
const finalizeOrder = opts.finalizeOrder ?? true;
|
|
951
|
+
const sendConfirmation = finalizeOrder && !opts.isQuoteMode;
|
|
950
952
|
const response = await cartService.processCart({
|
|
951
953
|
id: cartId,
|
|
952
954
|
input: { orderStatus, language }
|
|
@@ -957,10 +959,10 @@ function useCheckout(options) {
|
|
|
957
959
|
orderId,
|
|
958
960
|
status: orderStatus,
|
|
959
961
|
payStatus: PaymentStatuses.OPEN,
|
|
960
|
-
sendOrderConfirmationEmail:
|
|
961
|
-
addPDFAttachment:
|
|
962
|
-
triggerOrderSendConfirmEvent:
|
|
963
|
-
deleteCart:
|
|
962
|
+
sendOrderConfirmationEmail: sendConfirmation,
|
|
963
|
+
addPDFAttachment: sendConfirmation,
|
|
964
|
+
triggerOrderSendConfirmEvent: sendConfirmation,
|
|
965
|
+
deleteCart: finalizeOrder
|
|
964
966
|
});
|
|
965
967
|
if (opts.isQuoteMode) {
|
|
966
968
|
await orderService.triggerQuoteSendRequest?.({ orderId, language });
|
|
@@ -3054,7 +3056,7 @@ const _hoisted_6$I = {
|
|
|
3054
3056
|
};
|
|
3055
3057
|
const _hoisted_7$I = ["value", "placeholder", "disabled"];
|
|
3056
3058
|
const _hoisted_8$E = { class: "propeller-login-form__field space-y-2" };
|
|
3057
|
-
const _hoisted_9$
|
|
3059
|
+
const _hoisted_9$C = { class: "flex items-center justify-between" };
|
|
3058
3060
|
const _hoisted_10$A = {
|
|
3059
3061
|
for: "login-password",
|
|
3060
3062
|
class: "propeller-login-form__label text-sm font-medium leading-none"
|
|
@@ -3242,7 +3244,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3242
3244
|
displayForgotPassword: __props.displayForgotPasswordLink !== false && !__props.accountHeaderLoginForm
|
|
3243
3245
|
}, () => [
|
|
3244
3246
|
createElementVNode("div", _hoisted_8$E, [
|
|
3245
|
-
createElementVNode("div", _hoisted_9$
|
|
3247
|
+
createElementVNode("div", _hoisted_9$C, [
|
|
3246
3248
|
createElementVNode("label", _hoisted_10$A, toDisplayString(passwordLabel.value), 1),
|
|
3247
3249
|
showForgotPassword.value && !__props.accountHeaderLoginForm ? (openBlock(), createElementBlock("button", {
|
|
3248
3250
|
key: 0,
|
|
@@ -3386,7 +3388,7 @@ const _hoisted_5$I = { class: "propeller-account-menu__user-name font-medium tex
|
|
|
3386
3388
|
const _hoisted_6$H = { class: "propeller-account-menu__nav py-2" };
|
|
3387
3389
|
const _hoisted_7$H = { class: "propeller-account-menu__list space-y-0.5" };
|
|
3388
3390
|
const _hoisted_8$D = ["onClick", "data-active"];
|
|
3389
|
-
const _hoisted_9$
|
|
3391
|
+
const _hoisted_9$B = { class: "propeller-account-menu__logout-wrapper px-4 py-3 border-t border-border" };
|
|
3390
3392
|
const _hoisted_10$z = ["aria-label", "data-open"];
|
|
3391
3393
|
const _hoisted_11$v = {
|
|
3392
3394
|
fill: "none",
|
|
@@ -3594,7 +3596,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3594
3596
|
}), 128))
|
|
3595
3597
|
])
|
|
3596
3598
|
]),
|
|
3597
|
-
createElementVNode("div", _hoisted_9$
|
|
3599
|
+
createElementVNode("div", _hoisted_9$B, [
|
|
3598
3600
|
createElementVNode("button", {
|
|
3599
3601
|
type: "button",
|
|
3600
3602
|
class: "propeller-account-menu__logout-btn flex w-full items-center gap-3 px-3 py-2 text-sm font-medium text-primary hover:bg-secondary/5 rounded-[var(--radius-control)] transition-colors",
|
|
@@ -3719,7 +3721,7 @@ const _hoisted_8$C = {
|
|
|
3719
3721
|
key: 1,
|
|
3720
3722
|
class: "flex gap-2"
|
|
3721
3723
|
};
|
|
3722
|
-
const _hoisted_9$
|
|
3724
|
+
const _hoisted_9$A = ["value", "placeholder", "disabled"];
|
|
3723
3725
|
const _hoisted_10$y = ["disabled"];
|
|
3724
3726
|
const _hoisted_11$u = {
|
|
3725
3727
|
key: 2,
|
|
@@ -3853,7 +3855,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3853
3855
|
onKeydown: _cache[2] || (_cache[2] = async (e) => handleKeyDown(e)),
|
|
3854
3856
|
placeholder: getLabel$1("placeholder", "Enter action code"),
|
|
3855
3857
|
disabled: unref(loading)
|
|
3856
|
-
}, null, 40, _hoisted_9$
|
|
3858
|
+
}, null, 40, _hoisted_9$A),
|
|
3857
3859
|
createElementVNode("button", {
|
|
3858
3860
|
type: "button",
|
|
3859
3861
|
class: "propeller-action-code__submit bg-secondary text-primary-foreground text-sm font-medium px-4 py-2 rounded-[var(--radius-control)] hover:bg-secondary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap",
|
|
@@ -3885,7 +3887,7 @@ const _hoisted_5$G = ["min", "step", "value"];
|
|
|
3885
3887
|
const _hoisted_6$F = ["disabled"];
|
|
3886
3888
|
const _hoisted_7$F = ["min", "step", "value"];
|
|
3887
3889
|
const _hoisted_8$B = ["disabled"];
|
|
3888
|
-
const _hoisted_9$
|
|
3890
|
+
const _hoisted_9$z = {
|
|
3889
3891
|
class: "propeller-add-to-cart__icon w-[1.1em] h-[1.1em] flex-shrink-0",
|
|
3890
3892
|
viewBox: "0 0 24 24",
|
|
3891
3893
|
fill: "none",
|
|
@@ -4239,7 +4241,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
4239
4241
|
onClick: _cache[4] || (_cache[4] = async (event) => handleAddToCart()),
|
|
4240
4242
|
disabled: unref(loading)
|
|
4241
4243
|
}, [
|
|
4242
|
-
(openBlock(), createElementBlock("svg", _hoisted_9$
|
|
4244
|
+
(openBlock(), createElementBlock("svg", _hoisted_9$z, [..._cache[11] || (_cache[11] = [
|
|
4243
4245
|
createElementVNode("circle", {
|
|
4244
4246
|
cx: "8",
|
|
4245
4247
|
cy: "21",
|
|
@@ -4453,7 +4455,7 @@ const _hoisted_5$F = {
|
|
|
4453
4455
|
const _hoisted_6$E = { class: "propeller-add-to-favorite__modal-content bg-card rounded-[var(--radius-container)] max-w-md w-full shadow-lg border" };
|
|
4454
4456
|
const _hoisted_7$E = { class: "propeller-add-to-favorite__modal-header flex justify-between items-center p-6 pb-4" };
|
|
4455
4457
|
const _hoisted_8$A = { class: "propeller-add-to-favorite__modal-title text-xl font-bold" };
|
|
4456
|
-
const _hoisted_9$
|
|
4458
|
+
const _hoisted_9$y = { class: "propeller-add-to-favorite__modal-body px-6 pb-6 space-y-4" };
|
|
4457
4459
|
const _hoisted_10$w = { class: "propeller-add-to-favorite__member-lists space-y-2" };
|
|
4458
4460
|
const _hoisted_11$s = ["onClick", "disabled"];
|
|
4459
4461
|
const _hoisted_12$s = { class: "text-sm font-medium" };
|
|
@@ -4652,7 +4654,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4652
4654
|
], -1)
|
|
4653
4655
|
])])
|
|
4654
4656
|
]),
|
|
4655
|
-
createElementVNode("div", _hoisted_9$
|
|
4657
|
+
createElementVNode("div", _hoisted_9$y, [
|
|
4656
4658
|
getMemberLists().length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4657
4659
|
createElementVNode("div", _hoisted_10$w, [
|
|
4658
4660
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getMemberLists(), (list, index) => {
|
|
@@ -4766,7 +4768,7 @@ const _hoisted_8$z = {
|
|
|
4766
4768
|
key: 1,
|
|
4767
4769
|
class: "propeller-address-card__city text-muted-foreground"
|
|
4768
4770
|
};
|
|
4769
|
-
const _hoisted_9$
|
|
4771
|
+
const _hoisted_9$x = { class: "propeller-address-card__country text-muted-foreground" };
|
|
4770
4772
|
const _hoisted_10$v = {
|
|
4771
4773
|
key: 4,
|
|
4772
4774
|
class: "propeller-address-card__email text-muted-foreground"
|
|
@@ -5144,7 +5146,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
5144
5146
|
address: addr.value,
|
|
5145
5147
|
countryName: getCountryName$1(addr.value?.country)
|
|
5146
5148
|
}, () => [
|
|
5147
|
-
createElementVNode("div", _hoisted_9$
|
|
5149
|
+
createElementVNode("div", _hoisted_9$x, toDisplayString(getCountryName$1(addr.value?.country)), 1)
|
|
5148
5150
|
]) : createCommentVNode("", true),
|
|
5149
5151
|
!!__props.showEmail && addr.value?.email ? (openBlock(), createElementBlock("div", _hoisted_10$v, toDisplayString(addr.value?.email), 1)) : createCommentVNode("", true),
|
|
5150
5152
|
!!__props.showPhone && addr.value?.phone ? (openBlock(), createElementBlock("div", _hoisted_11$r, toDisplayString(addr.value?.phone), 1)) : createCommentVNode("", true),
|
|
@@ -5668,7 +5670,7 @@ const _hoisted_5$D = {
|
|
|
5668
5670
|
const _hoisted_6$C = { class: "propeller-address-selector__list grid grid-cols-2 gap-4" };
|
|
5669
5671
|
const _hoisted_7$C = ["onClick", "data-selected"];
|
|
5670
5672
|
const _hoisted_8$y = { class: "propeller-address-selector__modal-actions flex justify-end mt-6 pt-4 border-t border-border-subtle" };
|
|
5671
|
-
const _hoisted_9$
|
|
5673
|
+
const _hoisted_9$w = ["disabled"];
|
|
5672
5674
|
const _hoisted_10$u = {
|
|
5673
5675
|
key: 0,
|
|
5674
5676
|
fill: "none",
|
|
@@ -5837,7 +5839,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
5837
5839
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
5838
5840
|
createTextVNode(toDisplayString(getLabel$1("useThisAddress", "Use this address")), 1)
|
|
5839
5841
|
], 64))
|
|
5840
|
-
], 8, _hoisted_9$
|
|
5842
|
+
], 8, _hoisted_9$w)
|
|
5841
5843
|
])
|
|
5842
5844
|
], 64)) : createCommentVNode("", true)
|
|
5843
5845
|
])
|
|
@@ -5864,7 +5866,7 @@ const _hoisted_7$B = {
|
|
|
5864
5866
|
class: "propeller-cart-bonus-item__sku font-mono text-xs text-foreground-subtle"
|
|
5865
5867
|
};
|
|
5866
5868
|
const _hoisted_8$x = { class: "propeller-cart-bonus-item__title font-semibold text-sm md:text-base text-foreground line-clamp-2" };
|
|
5867
|
-
const _hoisted_9$
|
|
5869
|
+
const _hoisted_9$v = { class: "propeller-cart-bonus-item__qty text-sm text-muted-foreground whitespace-nowrap" };
|
|
5868
5870
|
const _hoisted_10$t = { class: "propeller-cart-bonus-item__price font-semibold text-foreground whitespace-nowrap" };
|
|
5869
5871
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
5870
5872
|
__name: "CartBonusItems",
|
|
@@ -5926,7 +5928,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5926
5928
|
item.product?.sku ? (openBlock(), createElementBlock("p", _hoisted_7$B, toDisplayString(getLabel$1("sku", "SKU")) + ": " + toDisplayString(item.product.sku), 1)) : createCommentVNode("", true),
|
|
5927
5929
|
createElementVNode("p", _hoisted_8$x, toDisplayString(getItemName(item)), 1)
|
|
5928
5930
|
]),
|
|
5929
|
-
createElementVNode("div", _hoisted_9$
|
|
5931
|
+
createElementVNode("div", _hoisted_9$v, toDisplayString(item.quantity) + " × ", 1),
|
|
5930
5932
|
createElementVNode("div", _hoisted_10$t, toDisplayString(getItemTotal(item)), 1)
|
|
5931
5933
|
]);
|
|
5932
5934
|
}), 128))
|
|
@@ -5937,22 +5939,24 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5937
5939
|
});
|
|
5938
5940
|
const _hoisted_1$H = {
|
|
5939
5941
|
key: 0,
|
|
5940
|
-
class: "propeller-cart-carriers__grid grid grid-cols-
|
|
5942
|
+
class: "propeller-cart-carriers__grid grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3"
|
|
5941
5943
|
};
|
|
5942
5944
|
const _hoisted_2$G = ["onClick", "data-selected"];
|
|
5943
|
-
const _hoisted_3$G = {
|
|
5944
|
-
const _hoisted_4$C = { class: "flex items-center gap-2" };
|
|
5945
|
-
const _hoisted_5$B = ["src", "alt"];
|
|
5946
|
-
const _hoisted_6$A = { class: "propeller-cart-carriers__carrier-name font-medium" };
|
|
5947
|
-
const _hoisted_7$A = {
|
|
5945
|
+
const _hoisted_3$G = {
|
|
5948
5946
|
key: 0,
|
|
5949
|
-
class: "propeller-cart-carriers__carrier-price text-xs bg-surface-hover text-muted-foreground px-2 py-
|
|
5947
|
+
class: "propeller-cart-carriers__carrier-price absolute top-2 right-2 text-xs bg-surface-hover text-muted-foreground px-2 py-0.5 rounded-full"
|
|
5950
5948
|
};
|
|
5951
|
-
const
|
|
5952
|
-
key:
|
|
5949
|
+
const _hoisted_4$C = {
|
|
5950
|
+
key: 1,
|
|
5951
|
+
class: "propeller-cart-carriers__carrier-logo-wrap flex items-center justify-center h-10 w-full"
|
|
5952
|
+
};
|
|
5953
|
+
const _hoisted_5$B = ["src", "alt"];
|
|
5954
|
+
const _hoisted_6$A = { class: "propeller-cart-carriers__carrier-name font-medium text-sm" };
|
|
5955
|
+
const _hoisted_7$A = {
|
|
5956
|
+
key: 2,
|
|
5953
5957
|
class: "propeller-cart-carriers__carrier-deadline text-xs text-muted-foreground"
|
|
5954
5958
|
};
|
|
5955
|
-
const
|
|
5959
|
+
const _hoisted_8$w = {
|
|
5956
5960
|
key: 1,
|
|
5957
5961
|
class: "propeller-cart-carriers__empty text-muted-foreground italic"
|
|
5958
5962
|
};
|
|
@@ -6024,25 +6028,22 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
6024
6028
|
key: `${carrier.name}-${index}`,
|
|
6025
6029
|
onClick: async (event) => handleSelect(carrier),
|
|
6026
6030
|
"data-selected": selectedName.value === carrier.name ? "true" : "false",
|
|
6027
|
-
class: normalizeClass(`propeller-cart-carriers__carrier cursor-pointer border
|
|
6031
|
+
class: normalizeClass(`propeller-cart-carriers__carrier relative cursor-pointer border rounded-[var(--radius-container)] p-3 flex flex-col items-center justify-center gap-2 text-center aspect-square transition-all ${selectedName.value === carrier.name ? "border-secondary bg-secondary/5 shadow-sm" : "border-border hover:border-secondary/30"}`)
|
|
6028
6032
|
}, [
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
__props.showPrice !== false ? (openBlock(), createElementBlock("span", _hoisted_7$A, toDisplayString(formatCarrierPrice(carrier.price)), 1)) : createCommentVNode("", true)
|
|
6040
|
-
]),
|
|
6041
|
-
carrier.deliveryDeadline ? (openBlock(), createElementBlock("p", _hoisted_8$w, toDisplayString(getLabel$1("deliveryDeadline", "Delivery deadline:")) + toDisplayString(carrier.deliveryDeadline), 1)) : createCommentVNode("", true)
|
|
6033
|
+
__props.showPrice !== false ? (openBlock(), createElementBlock("span", _hoisted_3$G, toDisplayString(formatCarrierPrice(carrier.price)), 1)) : createCommentVNode("", true),
|
|
6034
|
+
showLogo.value && getLogoUrl(carrier) ? (openBlock(), createElementBlock("span", _hoisted_4$C, [
|
|
6035
|
+
createElementVNode("img", {
|
|
6036
|
+
class: "propeller-cart-carriers__carrier-logo max-h-10 max-w-[80%] w-auto object-contain",
|
|
6037
|
+
src: getLogoUrl(carrier),
|
|
6038
|
+
alt: carrier.name
|
|
6039
|
+
}, null, 8, _hoisted_5$B)
|
|
6040
|
+
])) : createCommentVNode("", true),
|
|
6041
|
+
createElementVNode("span", _hoisted_6$A, toDisplayString(carrier.name), 1),
|
|
6042
|
+
carrier.deliveryDeadline ? (openBlock(), createElementBlock("p", _hoisted_7$A, toDisplayString(getLabel$1("deliveryDeadline", "Delivery deadline:")) + toDisplayString(carrier.deliveryDeadline), 1)) : createCommentVNode("", true)
|
|
6042
6043
|
], 10, _hoisted_2$G);
|
|
6043
6044
|
}), 128))
|
|
6044
6045
|
])) : createCommentVNode("", true),
|
|
6045
|
-
carriers.value.length === 0 ? (openBlock(), createElementBlock("p",
|
|
6046
|
+
carriers.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_8$w, toDisplayString(getLabel$1("noCarriers", "No carriers available.")), 1)) : createCommentVNode("", true)
|
|
6046
6047
|
], 2);
|
|
6047
6048
|
};
|
|
6048
6049
|
}
|
|
@@ -7550,16 +7551,19 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
7550
7551
|
});
|
|
7551
7552
|
const _hoisted_1$D = {
|
|
7552
7553
|
key: 0,
|
|
7553
|
-
class: "propeller-cart-paymethods__grid grid grid-cols-
|
|
7554
|
+
class: "propeller-cart-paymethods__grid grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3"
|
|
7554
7555
|
};
|
|
7555
7556
|
const _hoisted_2$C = ["onClick", "data-selected"];
|
|
7556
|
-
const _hoisted_3$C = {
|
|
7557
|
-
const _hoisted_4$y = { class: "flex items-center gap-2" };
|
|
7558
|
-
const _hoisted_5$x = { class: "propeller-cart-paymethods__method-name font-medium" };
|
|
7559
|
-
const _hoisted_6$w = {
|
|
7557
|
+
const _hoisted_3$C = {
|
|
7560
7558
|
key: 0,
|
|
7561
|
-
class: "propeller-cart-paymethods__method-price text-xs bg-surface-hover text-muted-foreground px-2 py-
|
|
7559
|
+
class: "propeller-cart-paymethods__method-price absolute top-2 right-2 text-xs bg-surface-hover text-muted-foreground px-2 py-0.5 rounded-full"
|
|
7562
7560
|
};
|
|
7561
|
+
const _hoisted_4$y = {
|
|
7562
|
+
key: 1,
|
|
7563
|
+
class: "propeller-cart-paymethods__method-logo-wrap flex items-center justify-center h-10 w-full"
|
|
7564
|
+
};
|
|
7565
|
+
const _hoisted_5$x = ["src", "alt"];
|
|
7566
|
+
const _hoisted_6$w = { class: "propeller-cart-paymethods__method-name font-medium text-sm" };
|
|
7563
7567
|
const _hoisted_7$w = {
|
|
7564
7568
|
key: 1,
|
|
7565
7569
|
class: "propeller-cart-paymethods__empty text-muted-foreground italic"
|
|
@@ -7572,6 +7576,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
7572
7576
|
user: {},
|
|
7573
7577
|
paymentsContainerClass: {},
|
|
7574
7578
|
showOnAccountForGuests: { type: Boolean, default: false },
|
|
7579
|
+
showPaymethodLogo: { type: Boolean, default: true },
|
|
7575
7580
|
onPaymethodSelect: {},
|
|
7576
7581
|
formatPrice: {},
|
|
7577
7582
|
labels: {}
|
|
@@ -7586,6 +7591,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
7586
7591
|
const showOnAccountForGuests = computed(() => {
|
|
7587
7592
|
return props.showOnAccountForGuests !== void 0 ? props.showOnAccountForGuests : false;
|
|
7588
7593
|
});
|
|
7594
|
+
const showLogo = computed(() => {
|
|
7595
|
+
return props.showPaymethodLogo !== void 0 ? props.showPaymethodLogo : true;
|
|
7596
|
+
});
|
|
7589
7597
|
const isGuest = computed(() => {
|
|
7590
7598
|
return !infra.user;
|
|
7591
7599
|
});
|
|
@@ -7627,6 +7635,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
7627
7635
|
}
|
|
7628
7636
|
return formatPrice(price || 0, { symbol: infra.currency ?? "€" });
|
|
7629
7637
|
}
|
|
7638
|
+
function getLogoUrl(method) {
|
|
7639
|
+
return method.logo || "";
|
|
7640
|
+
}
|
|
7630
7641
|
function handleSelect(method) {
|
|
7631
7642
|
selectedCode.value = method.code;
|
|
7632
7643
|
if (props.onPaymethodSelect) {
|
|
@@ -7643,14 +7654,17 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
7643
7654
|
key: method.code,
|
|
7644
7655
|
onClick: async (event) => handleSelect(method),
|
|
7645
7656
|
"data-selected": selectedCode.value === method.code ? "true" : "false",
|
|
7646
|
-
class: normalizeClass(`propeller-cart-paymethods__method cursor-pointer border
|
|
7657
|
+
class: normalizeClass(`propeller-cart-paymethods__method relative cursor-pointer border rounded-[var(--radius-container)] p-3 flex flex-col items-center justify-center gap-2 text-center aspect-square transition-all ${selectedCode.value === method.code ? "border-secondary bg-secondary/5 shadow-sm" : "border-border hover:border-secondary/30"}`)
|
|
7647
7658
|
}, [
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7659
|
+
method.price > 0 ? (openBlock(), createElementBlock("span", _hoisted_3$C, toDisplayString(formatMethodPrice(method.price)), 1)) : createCommentVNode("", true),
|
|
7660
|
+
showLogo.value && getLogoUrl(method) ? (openBlock(), createElementBlock("span", _hoisted_4$y, [
|
|
7661
|
+
createElementVNode("img", {
|
|
7662
|
+
class: "propeller-cart-paymethods__method-logo max-h-10 max-w-[80%] w-auto object-contain",
|
|
7663
|
+
src: getLogoUrl(method),
|
|
7664
|
+
alt: method.name || method.code
|
|
7665
|
+
}, null, 8, _hoisted_5$x)
|
|
7666
|
+
])) : createCommentVNode("", true),
|
|
7667
|
+
createElementVNode("span", _hoisted_6$w, toDisplayString(method.name || method.code), 1)
|
|
7654
7668
|
], 10, _hoisted_2$C);
|
|
7655
7669
|
}), 128))
|
|
7656
7670
|
])) : createCommentVNode("", true),
|