@propeller-commerce/propeller-v2-vue-ui 0.3.33 → 0.3.35
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 +47 -0
- package/dist/{ProductVideos.vue_vue_type_script_setup_true_lang-BSXOpWBD.js → ProductVideos.vue_vue_type_script_setup_true_lang-Cb_g4zYe.js} +16 -13
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-Cb_g4zYe.js.map +1 -0
- package/dist/{ProductVideos.vue_vue_type_script_setup_true_lang-cfRT3L_k.cjs → ProductVideos.vue_vue_type_script_setup_true_lang-D198YXi0.cjs} +16 -13
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-D198YXi0.cjs.map +1 -0
- package/dist/components/AddressCard.vue.d.ts +6 -0
- package/dist/components/CartIconAndSidebar.vue.d.ts +6 -0
- package/dist/components/CartPaymethods.vue.d.ts +8 -0
- package/dist/components/OrderList.vue.d.ts +6 -0
- package/dist/components/OrderSummary.vue.d.ts +12 -0
- package/dist/components/PriceToggle.vue.d.ts +11 -2
- package/dist/index.cjs +84 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +85 -32
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +1 -1
- package/dist/pure.js +1 -1
- package/package.json +1 -1
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-BSXOpWBD.js.map +0 -1
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-cfRT3L_k.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./index-CrrZsxTR.cjs");
|
|
4
|
-
const ProductVideos_vue_vue_type_script_setup_true_lang = require("./ProductVideos.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
const ProductVideos_vue_vue_type_script_setup_true_lang = require("./ProductVideos.vue_vue_type_script_setup_true_lang-D198YXi0.cjs");
|
|
5
5
|
const vue = require("vue");
|
|
6
6
|
const propellerSdkV2 = require("@propeller-commerce/propeller-sdk-v2");
|
|
7
7
|
const ProductGridInjectionKey = /* @__PURE__ */ Symbol("propeller-product-grid");
|
|
@@ -3184,6 +3184,11 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
|
3184
3184
|
function getLabel(key, fallback) {
|
|
3185
3185
|
return index.getLabel(props.labels, key, fallback);
|
|
3186
3186
|
}
|
|
3187
|
+
const noAccountParts = vue.computed(() => {
|
|
3188
|
+
const tpl = getLabel("noAccount", "Don't have an account? {link}");
|
|
3189
|
+
const [before, after = ""] = tpl.split("{link}");
|
|
3190
|
+
return { before, after };
|
|
3191
|
+
});
|
|
3187
3192
|
async function handleSubmit(e) {
|
|
3188
3193
|
e.preventDefault();
|
|
3189
3194
|
if (props.beforeLogin) {
|
|
@@ -3370,7 +3375,7 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
|
3370
3375
|
}, vue.toDisplayString(getLabel("forgotPassword", "Forgot Password?")), 1)
|
|
3371
3376
|
]) : vue.createCommentVNode("", true),
|
|
3372
3377
|
vue.createElementVNode("div", _hoisted_20$n, [
|
|
3373
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
3378
|
+
vue.createTextVNode(vue.toDisplayString(noAccountParts.value.before), 1),
|
|
3374
3379
|
__props.displayRegisterLink !== false ? vue.renderSlot(_ctx.$slots, "registerLink", {
|
|
3375
3380
|
key: 0,
|
|
3376
3381
|
onClick: (e) => __props.onRegisterClick?.(e),
|
|
@@ -3383,7 +3388,8 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
|
3383
3388
|
if (__props.onRegisterClick) __props.onRegisterClick();
|
|
3384
3389
|
})
|
|
3385
3390
|
}, vue.toDisplayString(getLabel("registerLink", "Register")), 1)
|
|
3386
|
-
]) : vue.createCommentVNode("", true)
|
|
3391
|
+
]) : vue.createCommentVNode("", true),
|
|
3392
|
+
vue.createTextVNode(vue.toDisplayString(noAccountParts.value.after), 1)
|
|
3387
3393
|
])
|
|
3388
3394
|
])) : vue.createCommentVNode("", true)
|
|
3389
3395
|
], 8, _hoisted_1$P);
|
|
@@ -4941,6 +4947,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
|
4941
4947
|
enableDelete: { type: Boolean, default: true },
|
|
4942
4948
|
enableSetDefault: { type: Boolean, default: true },
|
|
4943
4949
|
showDefaultBadge: { type: Boolean, default: false },
|
|
4950
|
+
showTypeBadge: { type: Boolean },
|
|
4944
4951
|
onEdit: {},
|
|
4945
4952
|
afterEdit: {},
|
|
4946
4953
|
onDelete: {},
|
|
@@ -5105,7 +5112,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
|
5105
5112
|
"data-type": addr.value?.type || ""
|
|
5106
5113
|
}, [
|
|
5107
5114
|
vue.createElementVNode("div", _hoisted_3$J, [
|
|
5108
|
-
__props.addressType ? vue.renderSlot(_ctx.$slots, "typeBadge", {
|
|
5115
|
+
__props.addressType && __props.showTypeBadge !== false ? vue.renderSlot(_ctx.$slots, "typeBadge", {
|
|
5109
5116
|
key: 0,
|
|
5110
5117
|
address: addr.value,
|
|
5111
5118
|
addressType: __props.addressType,
|
|
@@ -6926,6 +6933,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
|
6926
6933
|
cartPageButton: { type: Boolean, default: true },
|
|
6927
6934
|
onCartPageButtonClick: {},
|
|
6928
6935
|
labels: {},
|
|
6936
|
+
cartItemLabels: {},
|
|
6929
6937
|
user: {},
|
|
6930
6938
|
companyId: {},
|
|
6931
6939
|
onRequestQuoteClick: {},
|
|
@@ -7170,6 +7178,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
|
7170
7178
|
language: __props.language,
|
|
7171
7179
|
configuration: __props.configuration,
|
|
7172
7180
|
companyId: __props.companyId,
|
|
7181
|
+
labels: __props.cartItemLabels,
|
|
7173
7182
|
cardFrame: false,
|
|
7174
7183
|
showDelete: false,
|
|
7175
7184
|
readOnlyQuantity: true,
|
|
@@ -7207,7 +7216,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
|
7207
7216
|
}, vue.toDisplayString(name), 9, _hoisted_27$f)) : vue.createCommentVNode("", true)
|
|
7208
7217
|
]),
|
|
7209
7218
|
_: 1
|
|
7210
|
-
}, 40, ["cartItem", "cartId", "graphqlClient", "user", "language", "configuration", "companyId", "onTitleClick", "includeTax"]);
|
|
7219
|
+
}, 40, ["cartItem", "cartId", "graphqlClient", "user", "language", "configuration", "companyId", "labels", "onTitleClick", "includeTax"]);
|
|
7211
7220
|
}), 128)) : vue.createCommentVNode("", true),
|
|
7212
7221
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(CartBonusItemsImpl.value), {
|
|
7213
7222
|
cart: __props.cart,
|
|
@@ -7402,11 +7411,11 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
7402
7411
|
const requestDate = vue.computed(() => {
|
|
7403
7412
|
const date = props.cart?.postageData?.requestDate;
|
|
7404
7413
|
if (!date) return "";
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
}
|
|
7414
|
+
const d = new Date(date);
|
|
7415
|
+
if (isNaN(d.getTime())) return date;
|
|
7416
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
7417
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
7418
|
+
return `${day}-${month}-${d.getFullYear()}`;
|
|
7410
7419
|
});
|
|
7411
7420
|
const isPurchaseDisabled = vue.computed(() => {
|
|
7412
7421
|
if (showTermsAndConditions.value && !termsAccepted.value) return true;
|
|
@@ -7416,6 +7425,11 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
7416
7425
|
function getLabel(key, fallback) {
|
|
7417
7426
|
return index.getLabel(props.labels, key, fallback);
|
|
7418
7427
|
}
|
|
7428
|
+
const termsConsentParts = vue.computed(() => {
|
|
7429
|
+
const tpl = getLabel("termsConsent", "I agree to the {link}");
|
|
7430
|
+
const [before, after = ""] = tpl.split("{link}");
|
|
7431
|
+
return { before, after };
|
|
7432
|
+
});
|
|
7419
7433
|
function getCountryName(code) {
|
|
7420
7434
|
return index.getCountryName(code, props.countries);
|
|
7421
7435
|
}
|
|
@@ -7535,12 +7549,13 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
7535
7549
|
onChange: _cache[2] || (_cache[2] = async (event) => handleTermsChange(event.target.checked))
|
|
7536
7550
|
}, null, 40, _hoisted_30$c),
|
|
7537
7551
|
vue.createElementVNode("label", _hoisted_31$c, [
|
|
7538
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
7552
|
+
vue.createTextVNode(vue.toDisplayString(termsConsentParts.value.before), 1),
|
|
7539
7553
|
vue.createElementVNode("a", {
|
|
7540
7554
|
href: "#",
|
|
7541
7555
|
class: "text-primary hover:underline font-medium",
|
|
7542
7556
|
onClick: _cache[3] || (_cache[3] = async (event) => handleTermsLinkClick(event))
|
|
7543
|
-
}, vue.toDisplayString(getLabel("termsLink", "Terms and Conditions")), 1)
|
|
7557
|
+
}, vue.toDisplayString(getLabel("termsLink", "Terms and Conditions")), 1),
|
|
7558
|
+
vue.createTextVNode(vue.toDisplayString(termsConsentParts.value.after), 1)
|
|
7544
7559
|
])
|
|
7545
7560
|
])) : vue.createCommentVNode("", true),
|
|
7546
7561
|
showPurchaseButton.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -7593,7 +7608,8 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7593
7608
|
showPaymethodLogo: { type: Boolean, default: true },
|
|
7594
7609
|
onPaymethodSelect: {},
|
|
7595
7610
|
formatPrice: {},
|
|
7596
|
-
labels: {}
|
|
7611
|
+
labels: {},
|
|
7612
|
+
paymethodLabels: {}
|
|
7597
7613
|
},
|
|
7598
7614
|
setup(__props) {
|
|
7599
7615
|
const props = __props;
|
|
@@ -7636,6 +7652,10 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7636
7652
|
},
|
|
7637
7653
|
{ immediate: true }
|
|
7638
7654
|
);
|
|
7655
|
+
function methodName(method) {
|
|
7656
|
+
const code = (method.code || "").toLowerCase();
|
|
7657
|
+
return props.paymethodLabels?.[code] || method.name || method.code || "";
|
|
7658
|
+
}
|
|
7639
7659
|
function isOnAccountMethod(method) {
|
|
7640
7660
|
const code = (method.code || "").toLowerCase();
|
|
7641
7661
|
return code === "on_account" || code === "onaccount" || code === "on-account";
|
|
@@ -7675,10 +7695,10 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7675
7695
|
vue.createElementVNode("img", {
|
|
7676
7696
|
class: "propeller-cart-paymethods__method-logo max-h-10 max-w-[80%] w-auto object-contain",
|
|
7677
7697
|
src: getLogoUrl(method),
|
|
7678
|
-
alt: method
|
|
7698
|
+
alt: methodName(method)
|
|
7679
7699
|
}, null, 8, _hoisted_5$x)
|
|
7680
7700
|
])) : vue.createCommentVNode("", true),
|
|
7681
|
-
vue.createElementVNode("span", _hoisted_6$w, vue.toDisplayString(method
|
|
7701
|
+
vue.createElementVNode("span", _hoisted_6$w, vue.toDisplayString(methodName(method)), 1)
|
|
7682
7702
|
], 10, _hoisted_2$C);
|
|
7683
7703
|
}), 128))
|
|
7684
7704
|
])) : vue.createCommentVNode("", true),
|
|
@@ -11344,10 +11364,11 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
11344
11364
|
if (props.formatDate) return props.formatDate(dateString);
|
|
11345
11365
|
if (!dateString) return "-";
|
|
11346
11366
|
const d = new Date(dateString);
|
|
11367
|
+
if (isNaN(d.getTime())) return dateString;
|
|
11347
11368
|
const day = String(d.getDate()).padStart(2, "0");
|
|
11348
11369
|
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
11349
11370
|
const year = d.getFullYear();
|
|
11350
|
-
return `${day}
|
|
11371
|
+
return `${day}-${month}-${year}`;
|
|
11351
11372
|
}
|
|
11352
11373
|
function getProductCount(list) {
|
|
11353
11374
|
const products = list.products;
|
|
@@ -11369,6 +11390,11 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
11369
11390
|
function getLabel(key, fallback) {
|
|
11370
11391
|
return index.getLabel(props.labels, key, fallback);
|
|
11371
11392
|
}
|
|
11393
|
+
const deletePromptParts = vue.computed(() => {
|
|
11394
|
+
const tpl = getLabel("deleteConfirm", 'Are you sure you want to delete "{name}"?');
|
|
11395
|
+
const [before, after = ""] = tpl.split("{name}");
|
|
11396
|
+
return { before, after };
|
|
11397
|
+
});
|
|
11372
11398
|
return (_ctx, _cache) => {
|
|
11373
11399
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
11374
11400
|
class: vue.normalizeClass(`propeller-favorite-lists ${__props.className || ""}`),
|
|
@@ -11528,7 +11554,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
11528
11554
|
y2: "12"
|
|
11529
11555
|
})
|
|
11530
11556
|
], -1)),
|
|
11531
|
-
vue.createTextVNode(vue.toDisplayString(getTotalCount(list)) + " " + vue.toDisplayString(getLabel("
|
|
11557
|
+
vue.createTextVNode(vue.toDisplayString(getTotalCount(list)) + " " + vue.toDisplayString(getTotalCount(list) === 1 ? getLabel("itemSingular", "item") : getLabel("itemPlural", "items")), 1)
|
|
11532
11558
|
])) : vue.createCommentVNode("", true)
|
|
11533
11559
|
])
|
|
11534
11560
|
])) : vue.createCommentVNode("", true)
|
|
@@ -11682,9 +11708,9 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
11682
11708
|
]),
|
|
11683
11709
|
vue.createElementVNode("div", _hoisted_46$7, [
|
|
11684
11710
|
vue.createElementVNode("p", _hoisted_47$7, [
|
|
11685
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
11686
|
-
vue.createElementVNode("strong", null,
|
|
11687
|
-
|
|
11711
|
+
vue.createTextVNode(vue.toDisplayString(deletePromptParts.value.before), 1),
|
|
11712
|
+
vue.createElementVNode("strong", null, vue.toDisplayString(vue.unref(listToDelete)?.name), 1),
|
|
11713
|
+
vue.createTextVNode(vue.toDisplayString(deletePromptParts.value.after), 1)
|
|
11688
11714
|
]),
|
|
11689
11715
|
vue.createElementVNode("p", _hoisted_48$7, vue.toDisplayString(getLabel("deleteWarning", "This action cannot be undone.")), 1)
|
|
11690
11716
|
]),
|
|
@@ -12470,6 +12496,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
12470
12496
|
[propellerSdkV2.SortOrder.DESC]: "High to Low",
|
|
12471
12497
|
clearAll: "Clear All",
|
|
12472
12498
|
products: " Products",
|
|
12499
|
+
productSingular: "Product",
|
|
12500
|
+
productPlural: "Products",
|
|
12473
12501
|
from: "from",
|
|
12474
12502
|
results: "results",
|
|
12475
12503
|
perPage: " per page",
|
|
@@ -12568,7 +12596,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
12568
12596
|
}, [
|
|
12569
12597
|
vue.createElementVNode("div", _hoisted_2$m, [
|
|
12570
12598
|
vue.createElementVNode("div", _hoisted_3$m, [
|
|
12571
|
-
__props.itemsFound !== void 0 && __props.itemsFound > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$j, vue.toDisplayString(__props.itemsFound) + vue.toDisplayString(getLabel("
|
|
12599
|
+
__props.itemsFound !== void 0 && __props.itemsFound > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$j, vue.toDisplayString(__props.itemsFound) + " " + vue.toDisplayString(__props.itemsFound === 1 ? getLabel("productSingular") : getLabel("productPlural")), 1)) : vue.createCommentVNode("", true)
|
|
12572
12600
|
]),
|
|
12573
12601
|
vue.createElementVNode("div", _hoisted_5$j, [
|
|
12574
12602
|
vue.createElementVNode("select", {
|
|
@@ -13828,6 +13856,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
13828
13856
|
formatPrice: { type: Function },
|
|
13829
13857
|
formatDate: { type: Function },
|
|
13830
13858
|
getStatusColor: { type: Function },
|
|
13859
|
+
statusLabels: {},
|
|
13831
13860
|
labels: {},
|
|
13832
13861
|
onCartCreated: { type: Function },
|
|
13833
13862
|
afterReorder: { type: Function },
|
|
@@ -13888,13 +13917,20 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
13888
13917
|
function formatDate(dateString) {
|
|
13889
13918
|
if (props.formatDate) return props.formatDate(dateString);
|
|
13890
13919
|
if (!dateString) return "-";
|
|
13891
|
-
|
|
13920
|
+
const d = new Date(dateString);
|
|
13921
|
+
if (isNaN(d.getTime())) return dateString;
|
|
13922
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
13923
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
13924
|
+
return `${day}-${month}-${d.getFullYear()}`;
|
|
13892
13925
|
}
|
|
13893
13926
|
function formatPrice(price) {
|
|
13894
13927
|
if (props.formatPrice) return props.formatPrice(price);
|
|
13895
13928
|
if (!price) return "-";
|
|
13896
13929
|
return index.formatPrice(price, { symbol: infra.currency ?? "€" });
|
|
13897
13930
|
}
|
|
13931
|
+
function statusLabel(status) {
|
|
13932
|
+
return props.statusLabels?.[status] || status;
|
|
13933
|
+
}
|
|
13898
13934
|
function getStatusColor(status) {
|
|
13899
13935
|
if (props.getStatusColor) return props.getStatusColor(status);
|
|
13900
13936
|
switch (status) {
|
|
@@ -14209,7 +14245,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
14209
14245
|
class: vue.normalizeClass(`propeller-order-list__status px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${getStatusColor(
|
|
14210
14246
|
order.status
|
|
14211
14247
|
)}`)
|
|
14212
|
-
}, vue.toDisplayString(order.status), 11, _hoisted_38$6)) : vue.createCommentVNode("", true),
|
|
14248
|
+
}, vue.toDisplayString(statusLabel(order.status)), 11, _hoisted_38$6)) : vue.createCommentVNode("", true),
|
|
14213
14249
|
col === "total" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
|
|
14214
14250
|
vue.createTextVNode(vue.toDisplayString(formatPrice(order.total?.net)), 1)
|
|
14215
14251
|
], 64)) : vue.createCommentVNode("", true),
|
|
@@ -14391,7 +14427,10 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
14391
14427
|
function formatDate(dateStr) {
|
|
14392
14428
|
if (!dateStr) return "-";
|
|
14393
14429
|
const d = new Date(dateStr);
|
|
14394
|
-
|
|
14430
|
+
if (isNaN(d.getTime())) return dateStr;
|
|
14431
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
14432
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
14433
|
+
return `${day}-${month}-${d.getFullYear()}`;
|
|
14395
14434
|
}
|
|
14396
14435
|
function getOrderItemForShipmentItem(shipmentItem) {
|
|
14397
14436
|
if (!props.order?.items || !shipmentItem.orderItemId) return null;
|
|
@@ -14616,16 +14655,19 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
14616
14655
|
props: {
|
|
14617
14656
|
label: {},
|
|
14618
14657
|
labels: {},
|
|
14658
|
+
value: { type: Boolean },
|
|
14619
14659
|
initialState: { type: Boolean },
|
|
14620
14660
|
inclExclVatSwitched: { type: Function },
|
|
14621
14661
|
className: {}
|
|
14622
14662
|
},
|
|
14623
14663
|
setup(__props) {
|
|
14624
14664
|
const props = __props;
|
|
14625
|
-
const
|
|
14665
|
+
const isControlled = vue.computed(() => props.value !== void 0);
|
|
14666
|
+
const internal = vue.ref(props.initialState ?? true);
|
|
14667
|
+
const isOn = vue.computed(() => isControlled.value ? !!props.value : internal.value);
|
|
14626
14668
|
vue.onMounted(() => {
|
|
14627
|
-
if (typeof window !== "undefined") {
|
|
14628
|
-
|
|
14669
|
+
if (!isControlled.value && typeof window !== "undefined") {
|
|
14670
|
+
internal.value = props.initialState ?? true;
|
|
14629
14671
|
}
|
|
14630
14672
|
});
|
|
14631
14673
|
function getLabel() {
|
|
@@ -14636,7 +14678,9 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
14636
14678
|
}
|
|
14637
14679
|
function handleToggle() {
|
|
14638
14680
|
const newValue = !isOn.value;
|
|
14639
|
-
|
|
14681
|
+
if (!isControlled.value) {
|
|
14682
|
+
internal.value = newValue;
|
|
14683
|
+
}
|
|
14640
14684
|
if (props.inclExclVatSwitched) {
|
|
14641
14685
|
props.inclExclVatSwitched(newValue);
|
|
14642
14686
|
}
|
|
@@ -18456,7 +18500,10 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
18456
18500
|
if (props.formatDate) return props.formatDate(dateStr);
|
|
18457
18501
|
if (!dateStr) return "-";
|
|
18458
18502
|
const d = new Date(dateStr);
|
|
18459
|
-
|
|
18503
|
+
if (isNaN(d.getTime())) return dateStr;
|
|
18504
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
18505
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
18506
|
+
return `${day}-${month}-${d.getFullYear()}`;
|
|
18460
18507
|
}
|
|
18461
18508
|
function formatPrice(price) {
|
|
18462
18509
|
if (props.formatPrice) return props.formatPrice(price);
|
|
@@ -18717,6 +18764,11 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
18717
18764
|
function getLabel(key, fallback) {
|
|
18718
18765
|
return index.getLabel(props.labels, key, fallback);
|
|
18719
18766
|
}
|
|
18767
|
+
const termsConsentParts = vue.computed(() => {
|
|
18768
|
+
const tpl = getLabel("termsConsent", "I agree to the {link}");
|
|
18769
|
+
const [before, after = ""] = tpl.split("{link}");
|
|
18770
|
+
return { before, after };
|
|
18771
|
+
});
|
|
18720
18772
|
function handleTermsChange(checked) {
|
|
18721
18773
|
termsAccepted.value = checked;
|
|
18722
18774
|
}
|
|
@@ -18754,12 +18806,13 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
18754
18806
|
onChange: _cache[0] || (_cache[0] = async (event) => handleTermsChange(event.target.checked))
|
|
18755
18807
|
}, null, 40, _hoisted_4$3),
|
|
18756
18808
|
vue.createElementVNode("label", _hoisted_5$3, [
|
|
18757
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
18809
|
+
vue.createTextVNode(vue.toDisplayString(termsConsentParts.value.before), 1),
|
|
18758
18810
|
vue.createElementVNode("a", {
|
|
18759
18811
|
href: "#",
|
|
18760
18812
|
class: "text-primary hover:underline font-medium",
|
|
18761
18813
|
onClick: _cache[1] || (_cache[1] = async (event) => handleTermsLinkClick(event))
|
|
18762
|
-
}, vue.toDisplayString(getLabel("termsLink", "Terms and Conditions")), 1)
|
|
18814
|
+
}, vue.toDisplayString(getLabel("termsLink", "Terms and Conditions")), 1),
|
|
18815
|
+
vue.createTextVNode(vue.toDisplayString(termsConsentParts.value.after), 1)
|
|
18763
18816
|
])
|
|
18764
18817
|
])) : vue.createCommentVNode("", true),
|
|
18765
18818
|
vue.createElementVNode("button", {
|