@propeller-commerce/propeller-v2-react-ui 0.4.23 → 0.4.25

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/index.d.cts CHANGED
@@ -2574,6 +2574,12 @@ interface AddressCardProps {
2574
2574
  enableSetDefault?: boolean;
2575
2575
  /** Display the "Default ... Address" badge @default false */
2576
2576
  showDefaultBadge?: boolean;
2577
+ /**
2578
+ * Display the address-type badge (invoice/delivery chip) @default true.
2579
+ * Set to `false` where the surrounding heading already names the address
2580
+ * type, to avoid a redundant raw-looking chip.
2581
+ */
2582
+ showTypeBadge?: boolean;
2577
2583
  /** Called when address is edited; receives the updated address object */
2578
2584
  onEdit?: (address: Address) => void | Promise<void>;
2579
2585
  /** Called after address edit completes */
@@ -3051,6 +3057,12 @@ interface CartIconAndSidebarProps {
3051
3057
  * continueShopping, qty, total, checkoutButton, cartPageButton, closeLabel
3052
3058
  */
3053
3059
  labels?: Record<string, string>;
3060
+ /**
3061
+ * Labels forwarded to the inner CartItem rows (e.g. `qtyPrefix`). Without
3062
+ * this the sidebar's line items fell back to English ("Qty:") even on a
3063
+ * localized page. Keys match CartItem's label map.
3064
+ */
3065
+ cartItemLabels?: Record<string, string>;
3054
3066
  /** Logged-in user — used to determine purchaser role and authorization limit */
3055
3067
  user?: Contact | Customer;
3056
3068
  /** Configuration object passed to the component */
@@ -3165,6 +3177,14 @@ interface CartPaymethodsProps {
3165
3177
  currency?: string;
3166
3178
  /** Labels for the component */
3167
3179
  labels?: Record<string, string>;
3180
+ /**
3181
+ * Localized display names for payment methods, keyed by the method **code**
3182
+ * (lower-cased, e.g. `{ pickup: 'Bij afhalen', on_account: 'Op rekening' }`).
3183
+ * The backend `method.name` is often an un-localized English string (e.g.
3184
+ * "On pickup"), so this map lets the host override it per locale. Lookup
3185
+ * order: `paymethodLabels[code]` → `method.name` → `method.code`.
3186
+ */
3187
+ paymethodLabels?: Record<string, string>;
3168
3188
  }
3169
3189
  /**
3170
3190
  * Renders the cart's available payment methods as a selectable grid. Hides the
@@ -4731,6 +4751,13 @@ interface OrderListProps {
4731
4751
  formatDate?: (dateString: string) => string;
4732
4752
  /** Get status color */
4733
4753
  getStatusColor?: (status: string) => string;
4754
+ /**
4755
+ * Localized display labels for order/quote statuses, keyed by the raw backend
4756
+ * status value (e.g. `{ NEW: 'Nieuw', CONFIRMED: 'Bevestigd', REQUEST:
4757
+ * 'Aangevraagd' }`). Unknown statuses fall back to the raw value. Without
4758
+ * this the list printed the raw enum (NEW/CONFIRMED/REQUEST) to the customer.
4759
+ */
4760
+ statusLabels?: Record<string, string>;
4734
4761
  /** Localization label overrides for UI strings. */
4735
4762
  labels?: {
4736
4763
  /** Text for the per-row "View" action button. */
@@ -4824,6 +4851,19 @@ interface OrderSummaryProps {
4824
4851
  formatDate?: (dateString: string) => string;
4825
4852
  /** Labels for the component */
4826
4853
  labels?: Record<string, string>;
4854
+ /**
4855
+ * Localized order/quote status labels, keyed by the raw backend status
4856
+ * (e.g. `{ NEW: 'Nieuw', REQUEST: 'Aangevraagd' }`). Unknown → raw value.
4857
+ */
4858
+ statusLabels?: Record<string, string>;
4859
+ /**
4860
+ * Localized payment-method names, keyed by the raw method value LOWER-CASED
4861
+ * (e.g. `{ rekening: 'Op rekening', account: 'Op rekening' }`). The backend
4862
+ * sends different raw values on the order vs quote path (REKENING / ACCOUNT),
4863
+ * so mapping both here makes the same method render identically. Unknown →
4864
+ * raw value.
4865
+ */
4866
+ paymethodLabels?: Record<string, string>;
4827
4867
  /** List of countries for resolving codes to names [{code: 'NL', name: 'Netherlands'}, ...] */
4828
4868
  countries?: {
4829
4869
  code: string;
package/dist/index.d.ts CHANGED
@@ -2574,6 +2574,12 @@ interface AddressCardProps {
2574
2574
  enableSetDefault?: boolean;
2575
2575
  /** Display the "Default ... Address" badge @default false */
2576
2576
  showDefaultBadge?: boolean;
2577
+ /**
2578
+ * Display the address-type badge (invoice/delivery chip) @default true.
2579
+ * Set to `false` where the surrounding heading already names the address
2580
+ * type, to avoid a redundant raw-looking chip.
2581
+ */
2582
+ showTypeBadge?: boolean;
2577
2583
  /** Called when address is edited; receives the updated address object */
2578
2584
  onEdit?: (address: Address) => void | Promise<void>;
2579
2585
  /** Called after address edit completes */
@@ -3051,6 +3057,12 @@ interface CartIconAndSidebarProps {
3051
3057
  * continueShopping, qty, total, checkoutButton, cartPageButton, closeLabel
3052
3058
  */
3053
3059
  labels?: Record<string, string>;
3060
+ /**
3061
+ * Labels forwarded to the inner CartItem rows (e.g. `qtyPrefix`). Without
3062
+ * this the sidebar's line items fell back to English ("Qty:") even on a
3063
+ * localized page. Keys match CartItem's label map.
3064
+ */
3065
+ cartItemLabels?: Record<string, string>;
3054
3066
  /** Logged-in user — used to determine purchaser role and authorization limit */
3055
3067
  user?: Contact | Customer;
3056
3068
  /** Configuration object passed to the component */
@@ -3165,6 +3177,14 @@ interface CartPaymethodsProps {
3165
3177
  currency?: string;
3166
3178
  /** Labels for the component */
3167
3179
  labels?: Record<string, string>;
3180
+ /**
3181
+ * Localized display names for payment methods, keyed by the method **code**
3182
+ * (lower-cased, e.g. `{ pickup: 'Bij afhalen', on_account: 'Op rekening' }`).
3183
+ * The backend `method.name` is often an un-localized English string (e.g.
3184
+ * "On pickup"), so this map lets the host override it per locale. Lookup
3185
+ * order: `paymethodLabels[code]` → `method.name` → `method.code`.
3186
+ */
3187
+ paymethodLabels?: Record<string, string>;
3168
3188
  }
3169
3189
  /**
3170
3190
  * Renders the cart's available payment methods as a selectable grid. Hides the
@@ -4731,6 +4751,13 @@ interface OrderListProps {
4731
4751
  formatDate?: (dateString: string) => string;
4732
4752
  /** Get status color */
4733
4753
  getStatusColor?: (status: string) => string;
4754
+ /**
4755
+ * Localized display labels for order/quote statuses, keyed by the raw backend
4756
+ * status value (e.g. `{ NEW: 'Nieuw', CONFIRMED: 'Bevestigd', REQUEST:
4757
+ * 'Aangevraagd' }`). Unknown statuses fall back to the raw value. Without
4758
+ * this the list printed the raw enum (NEW/CONFIRMED/REQUEST) to the customer.
4759
+ */
4760
+ statusLabels?: Record<string, string>;
4734
4761
  /** Localization label overrides for UI strings. */
4735
4762
  labels?: {
4736
4763
  /** Text for the per-row "View" action button. */
@@ -4824,6 +4851,19 @@ interface OrderSummaryProps {
4824
4851
  formatDate?: (dateString: string) => string;
4825
4852
  /** Labels for the component */
4826
4853
  labels?: Record<string, string>;
4854
+ /**
4855
+ * Localized order/quote status labels, keyed by the raw backend status
4856
+ * (e.g. `{ NEW: 'Nieuw', REQUEST: 'Aangevraagd' }`). Unknown → raw value.
4857
+ */
4858
+ statusLabels?: Record<string, string>;
4859
+ /**
4860
+ * Localized payment-method names, keyed by the raw method value LOWER-CASED
4861
+ * (e.g. `{ rekening: 'Op rekening', account: 'Op rekening' }`). The backend
4862
+ * sends different raw values on the order vs quote path (REKENING / ACCOUNT),
4863
+ * so mapping both here makes the same method render identically. Unknown →
4864
+ * raw value.
4865
+ */
4866
+ paymethodLabels?: Record<string, string>;
4827
4867
  /** List of countries for resolving codes to names [{code: 'NL', name: 'Netherlands'}, ...] */
4828
4868
  countries?: {
4829
4869
  code: string;
package/dist/index.js CHANGED
@@ -3258,10 +3258,15 @@ function LoginForm(rawProps) {
3258
3258
  ] }) : null,
3259
3259
  props.accountHeaderLoginForm ? /* @__PURE__ */ jsxs("div", { className: "propeller-login-form__footer flex flex-col gap-2 text-sm pt-3 text-center", children: [
3260
3260
  /* @__PURE__ */ jsx(LoginFormForgotPasswordLink, {}),
3261
- /* @__PURE__ */ jsxs("div", { className: "propeller-login-form__register text-xs text-muted-foreground", children: [
3262
- getLabel(props.labels, "noAccount", "Don't have an account?"),
3263
- /* @__PURE__ */ jsx(LoginFormRegisterLink, {})
3264
- ] })
3261
+ /* @__PURE__ */ jsx("div", { className: "propeller-login-form__register text-xs text-muted-foreground", children: (() => {
3262
+ const tpl = getLabel(props.labels, "noAccount", "Don't have an account? {link}");
3263
+ const [before, after = ""] = tpl.split("{link}");
3264
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3265
+ before,
3266
+ /* @__PURE__ */ jsx(LoginFormRegisterLink, {}),
3267
+ after
3268
+ ] });
3269
+ })() })
3265
3270
  ] }) : null
3266
3271
  ]
3267
3272
  }
@@ -5430,7 +5435,8 @@ function AddressCard(rawProps) {
5430
5435
  ] });
5431
5436
  }
5432
5437
  function AddressCardTypeBadge(props) {
5433
- const { derived } = useAddressCardContext();
5438
+ const { derived, resolved } = useAddressCardContext();
5439
+ if (resolved.showTypeBadge === false) return null;
5434
5440
  if (!derived.addressType) return null;
5435
5441
  return /* @__PURE__ */ jsx(
5436
5442
  "span",
@@ -6910,6 +6916,7 @@ function CartIconAndSidebar(rawProps) {
6910
6916
  language: props.language,
6911
6917
  configuration: props.configuration,
6912
6918
  companyId: props.companyId,
6919
+ labels: props.cartItemLabels,
6913
6920
  cardFrame: false,
6914
6921
  showDelete: false,
6915
6922
  readOnlyQuantity: true,
@@ -7015,11 +7022,11 @@ function CartOverview(props) {
7015
7022
  function requestDate() {
7016
7023
  const date = props.cart?.postageData?.requestDate;
7017
7024
  if (!date) return "";
7018
- try {
7019
- return new Date(date).toLocaleDateString();
7020
- } catch {
7021
- return date;
7022
- }
7025
+ const d = new Date(date);
7026
+ if (isNaN(d.getTime())) return date;
7027
+ const day = String(d.getDate()).padStart(2, "0");
7028
+ const month = String(d.getMonth() + 1).padStart(2, "0");
7029
+ return `${day}-${month}-${d.getFullYear()}`;
7023
7030
  }
7024
7031
  function handleTermsLinkClick(event) {
7025
7032
  event.preventDefault();
@@ -7128,18 +7135,23 @@ function CartOverview(props) {
7128
7135
  onChange: (event) => setTermsAccepted(event.target.checked)
7129
7136
  }
7130
7137
  ),
7131
- /* @__PURE__ */ jsxs("label", { htmlFor: "cart-overview-terms", className: "text-sm leading-none", children: [
7132
- getLabel(props.labels, "termsPrefix", "I agree to the"),
7133
- /* @__PURE__ */ jsx(
7134
- "a",
7135
- {
7136
- href: "#",
7137
- className: "text-primary hover:underline font-medium",
7138
- onClick: handleTermsLinkClick,
7139
- children: getLabel(props.labels, "termsLink", "Terms and Conditions")
7140
- }
7141
- )
7142
- ] })
7138
+ /* @__PURE__ */ jsx("label", { htmlFor: "cart-overview-terms", className: "text-sm leading-none", children: (() => {
7139
+ const tpl = getLabel(props.labels, "termsConsent", "I agree to the {link}");
7140
+ const [before, after = ""] = tpl.split("{link}");
7141
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7142
+ before,
7143
+ /* @__PURE__ */ jsx(
7144
+ "a",
7145
+ {
7146
+ href: "#",
7147
+ className: "text-primary hover:underline font-medium",
7148
+ onClick: handleTermsLinkClick,
7149
+ children: getLabel(props.labels, "termsLink", "Terms and Conditions")
7150
+ }
7151
+ ),
7152
+ after
7153
+ ] });
7154
+ })() })
7143
7155
  ] }) : null,
7144
7156
  showPurchaseButton ? /* @__PURE__ */ jsxs(
7145
7157
  "button",
@@ -7182,6 +7194,10 @@ function CartPaymethods(rawProps) {
7182
7194
  if (props.formatPrice) return props.formatPrice(price);
7183
7195
  return formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
7184
7196
  }
7197
+ function methodName(method) {
7198
+ const code = (method.code || "").toLowerCase();
7199
+ return props.paymethodLabels?.[code] || method.name || method.code || "";
7200
+ }
7185
7201
  function handleSelect(method) {
7186
7202
  setSelectedCode(method.code);
7187
7203
  if (props.onPaymethodSelect) props.onPaymethodSelect(method);
@@ -7212,10 +7228,10 @@ function CartPaymethods(rawProps) {
7212
7228
  {
7213
7229
  className: "propeller-cart-paymethods__method-logo max-h-10 max-w-[80%] w-auto object-contain",
7214
7230
  src: logoUrl,
7215
- alt: method.name || method.code
7231
+ alt: methodName(method)
7216
7232
  }
7217
7233
  ) }) : null,
7218
- /* @__PURE__ */ jsx("span", { className: "propeller-cart-paymethods__method-name font-medium text-sm", children: method.name || method.code })
7234
+ /* @__PURE__ */ jsx("span", { className: "propeller-cart-paymethods__method-name font-medium text-sm", children: methodName(method) })
7219
7235
  ]
7220
7236
  },
7221
7237
  method.code
@@ -9672,10 +9688,11 @@ function FavoriteLists(rawProps) {
9672
9688
  if (props.formatDate) return props.formatDate(dateString);
9673
9689
  if (!dateString) return "-";
9674
9690
  const d = new Date(dateString);
9691
+ if (isNaN(d.getTime())) return dateString;
9675
9692
  const day = String(d.getDate()).padStart(2, "0");
9676
9693
  const month = String(d.getMonth() + 1).padStart(2, "0");
9677
9694
  const year = d.getFullYear();
9678
- return `${day}/${month}/${year}`;
9695
+ return `${day}-${month}-${year}`;
9679
9696
  }
9680
9697
  function getProductCount(list) {
9681
9698
  const products = list.products;
@@ -9899,7 +9916,7 @@ function FavoriteLists(rawProps) {
9899
9916
  ),
9900
9917
  getTotalCount(list),
9901
9918
  "\xA0",
9902
- getLabel(props.labels, "items", "items")
9919
+ getTotalCount(list) === 1 ? getLabel(props.labels, "itemSingular", "item") : getLabel(props.labels, "itemPlural", "items")
9903
9920
  ] }) : null
9904
9921
  ] })
9905
9922
  ] }) : null
@@ -10083,15 +10100,15 @@ function FavoriteLists(rawProps) {
10083
10100
  )
10084
10101
  ] }),
10085
10102
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
10086
- /* @__PURE__ */ jsxs("p", { className: "propeller-favorite-lists__delete-prompt", children: [
10087
- getLabel(props.labels, "deleteConfirm", "Are you sure you want to delete"),
10088
- /* @__PURE__ */ jsxs("strong", { children: [
10089
- '"',
10090
- listToDelete?.name,
10091
- '"'
10092
- ] }),
10093
- "?"
10094
- ] }),
10103
+ /* @__PURE__ */ jsx("p", { className: "propeller-favorite-lists__delete-prompt", children: (() => {
10104
+ const tpl = getLabel(props.labels, "deleteConfirm", 'Are you sure you want to delete "{name}"?');
10105
+ const [before, after = ""] = tpl.split("{name}");
10106
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
10107
+ before,
10108
+ /* @__PURE__ */ jsx("strong", { children: listToDelete?.name }),
10109
+ after
10110
+ ] });
10111
+ })() }),
10095
10112
  /* @__PURE__ */ jsx("p", { className: "propeller-favorite-lists__delete-warning text-sm text-destructive", children: getLabel(props.labels, "deleteWarning", "This action cannot be undone.") })
10096
10113
  ] }),
10097
10114
  /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-3 pt-6", children: [
@@ -10675,6 +10692,8 @@ var DEFAULT_LABELS2 = {
10675
10692
  [SortOrder.DESC]: "High to Low",
10676
10693
  clearAll: "Clear All",
10677
10694
  products: " Products",
10695
+ productSingular: "Product",
10696
+ productPlural: "Products",
10678
10697
  from: "from",
10679
10698
  results: "results",
10680
10699
  perPage: " per page",
@@ -10768,7 +10787,8 @@ function GridToolbar(rawProps) {
10768
10787
  /* @__PURE__ */ jsxs("div", { className: "propeller-grid-toolbar__bar flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-4", children: [
10769
10788
  /* @__PURE__ */ jsx("div", { className: "propeller-grid-toolbar__count text-sm text-muted-foreground font-medium", children: props.itemsFound > 0 ? /* @__PURE__ */ jsxs("span", { children: [
10770
10789
  props.itemsFound,
10771
- getLabel53("products")
10790
+ "\xA0",
10791
+ props.itemsFound === 1 ? getLabel53("productSingular") : getLabel53("productPlural")
10772
10792
  ] }) : null }),
10773
10793
  /* @__PURE__ */ jsxs("div", { className: "propeller-grid-toolbar__controls flex flex-wrap items-center gap-3", children: [
10774
10794
  /* @__PURE__ */ jsx(
@@ -11820,7 +11840,11 @@ function OrderList(rawProps) {
11820
11840
  function formatDate(dateString) {
11821
11841
  if (props.formatDate) return props.formatDate(dateString);
11822
11842
  if (!dateString) return "-";
11823
- return new Date(dateString).toLocaleDateString();
11843
+ const d = new Date(dateString);
11844
+ if (isNaN(d.getTime())) return dateString;
11845
+ const day = String(d.getDate()).padStart(2, "0");
11846
+ const month = String(d.getMonth() + 1).padStart(2, "0");
11847
+ return `${day}-${month}-${d.getFullYear()}`;
11824
11848
  }
11825
11849
  function formatPrice17(price) {
11826
11850
  if (props.formatPrice) return props.formatPrice(price);
@@ -11840,6 +11864,9 @@ function OrderList(rawProps) {
11840
11864
  return "bg-warning/10 text-warning";
11841
11865
  }
11842
11866
  }
11867
+ function statusLabel(status) {
11868
+ return props.statusLabels?.[status] || status;
11869
+ }
11843
11870
  function getColumnLabel(col) {
11844
11871
  if (props.columnConfig && props.columnConfig[col]) {
11845
11872
  return props.columnConfig[col];
@@ -12160,7 +12187,7 @@ function OrderList(rawProps) {
12160
12187
  {
12161
12188
  className: `propeller-order-list__status px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${getStatusColor(order.status)}`,
12162
12189
  "data-status": order.status,
12163
- children: order.status
12190
+ children: statusLabel(order.status)
12164
12191
  }
12165
12192
  ) : null,
12166
12193
  col === "total" ? /* @__PURE__ */ jsx(Fragment, { children: formatPrice17(order.total?.net) }) : null,
@@ -12257,7 +12284,10 @@ function OrderShipments(props) {
12257
12284
  function formatDate(dateStr) {
12258
12285
  if (!dateStr) return "-";
12259
12286
  const d = new Date(dateStr);
12260
- return `${d.getDate()}.${d.getMonth() + 1}.${d.getFullYear()}`;
12287
+ if (isNaN(d.getTime())) return dateStr;
12288
+ const day = String(d.getDate()).padStart(2, "0");
12289
+ const month = String(d.getMonth() + 1).padStart(2, "0");
12290
+ return `${day}-${month}-${d.getFullYear()}`;
12261
12291
  }
12262
12292
  function getOrderItemForShipmentItem(shipmentItem) {
12263
12293
  if (!props.order?.items || !shipmentItem.orderItemId) return null;
@@ -12459,11 +12489,13 @@ function OrderSummary(props) {
12459
12489
  const showRemarks = props.showRemarks !== void 0 ? props.showRemarks : true;
12460
12490
  const orderNumber = order?.id || "";
12461
12491
  const orderDate = order?.createdAt || "";
12462
- const orderStatus = order?.status || "";
12492
+ const rawStatus = order?.status || "";
12493
+ const orderStatus = rawStatus ? props.statusLabels?.[rawStatus] || rawStatus : "";
12463
12494
  const orderTotal = Number(order?.total?.net || 0);
12464
12495
  const orderReference = order?.reference || "";
12465
12496
  const orderRemarks = order?.remarks || "";
12466
- const paymentMethod = order?.paymentData?.method || "";
12497
+ const rawPaymentMethod = order?.paymentData?.method || "";
12498
+ const paymentMethod = rawPaymentMethod ? props.paymethodLabels?.[rawPaymentMethod.toLowerCase()] || rawPaymentMethod : "";
12467
12499
  const carrierName = order?.postageData?.carrier || "";
12468
12500
  const addresses = order?.addresses || [];
12469
12501
  const invoiceAddress = addresses.find((a) => a.type === "invoice") || null;
@@ -12474,15 +12506,18 @@ function OrderSummary(props) {
12474
12506
  }
12475
12507
  return formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
12476
12508
  }
12509
+ function numericDate(dateString) {
12510
+ const d = new Date(dateString);
12511
+ if (isNaN(d.getTime())) return dateString;
12512
+ const day = String(d.getDate()).padStart(2, "0");
12513
+ const month = String(d.getMonth() + 1).padStart(2, "0");
12514
+ return `${day}-${month}-${d.getFullYear()}`;
12515
+ }
12477
12516
  function formatOrderDate(dateString) {
12478
12517
  if (props.formatDate) {
12479
12518
  return props.formatDate(dateString);
12480
12519
  }
12481
- try {
12482
- return new Date(dateString).toLocaleDateString("en-US");
12483
- } catch {
12484
- return dateString;
12485
- }
12520
+ return numericDate(dateString);
12486
12521
  }
12487
12522
  const requestDateRaw = order?.postageData?.requestDate;
12488
12523
  let requestDate = "";
@@ -12490,11 +12525,7 @@ function OrderSummary(props) {
12490
12525
  if (props.formatDate) {
12491
12526
  requestDate = props.formatDate(requestDateRaw);
12492
12527
  } else {
12493
- try {
12494
- requestDate = new Date(requestDateRaw).toLocaleDateString("en-US");
12495
- } catch {
12496
- requestDate = requestDateRaw;
12497
- }
12528
+ requestDate = numericDate(requestDateRaw);
12498
12529
  }
12499
12530
  }
12500
12531
  const getCountryName$1 = (code) => getCountryName(code, props.countries);
@@ -15915,7 +15946,10 @@ function PurchaseAuthorizationRequests(rawProps) {
15915
15946
  if (props.formatDate) return props.formatDate(dateStr);
15916
15947
  if (!dateStr) return "-";
15917
15948
  const d = new Date(dateStr);
15918
- return `${d.getDate()}.${d.getMonth() + 1}.${d.getFullYear()}`;
15949
+ if (isNaN(d.getTime())) return dateStr;
15950
+ const day = String(d.getDate()).padStart(2, "0");
15951
+ const month = String(d.getMonth() + 1).padStart(2, "0");
15952
+ return `${day}-${month}-${d.getFullYear()}`;
15919
15953
  }
15920
15954
  function formatPrice17(price) {
15921
15955
  if (props.formatPrice) return props.formatPrice(price);
@@ -16149,18 +16183,23 @@ function QuoteActions(rawProps) {
16149
16183
  onChange: (event) => handleTermsChange(event.target.checked)
16150
16184
  }
16151
16185
  ),
16152
- /* @__PURE__ */ jsxs("label", { htmlFor: "quote-actions-terms", className: "text-sm leading-none", children: [
16153
- getLabel(props.labels, "termsPrefix", "I agree to the"),
16154
- /* @__PURE__ */ jsx(
16155
- "a",
16156
- {
16157
- href: "#",
16158
- className: "text-primary hover:underline font-medium",
16159
- onClick: (event) => handleTermsLinkClick(event),
16160
- children: getLabel(props.labels, "termsLink", "Terms and Conditions")
16161
- }
16162
- )
16163
- ] })
16186
+ /* @__PURE__ */ jsx("label", { htmlFor: "quote-actions-terms", className: "text-sm leading-none", children: (() => {
16187
+ const tpl = getLabel(props.labels, "termsConsent", "I agree to the {link}");
16188
+ const [before, after = ""] = tpl.split("{link}");
16189
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16190
+ before,
16191
+ /* @__PURE__ */ jsx(
16192
+ "a",
16193
+ {
16194
+ href: "#",
16195
+ className: "text-primary hover:underline font-medium",
16196
+ onClick: (event) => handleTermsLinkClick(event),
16197
+ children: getLabel(props.labels, "termsLink", "Terms and Conditions")
16198
+ }
16199
+ ),
16200
+ after
16201
+ ] });
16202
+ })() })
16164
16203
  ] }) : null,
16165
16204
  /* @__PURE__ */ jsxs(
16166
16205
  "button",