@propeller-commerce/propeller-v2-react-ui 0.7.1 → 0.9.0

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/pure.cjs CHANGED
@@ -40,8 +40,8 @@ function Breadcrumbs(props) {
40
40
  }
41
41
  const displayItems = props.showCurrent === false && items.length > 0 ? items.slice(0, items.length - 1) : items;
42
42
  function getCategoryName(cat) {
43
- const match = cat.name?.find((n) => n.language === lang);
44
- return match?.value || cat.name?.[0]?.value || "";
43
+ const match = cat.names?.find((n) => n.language === lang);
44
+ return match?.value || cat.names?.[0]?.value || "";
45
45
  }
46
46
  function getCategoryUrl(cat, index) {
47
47
  if (props.getUrl) return props.getUrl(cat, index);
@@ -49,7 +49,7 @@ function Breadcrumbs(props) {
49
49
  if (urls && typeof urls.getCategoryUrl === "function") {
50
50
  return urls.getCategoryUrl(cat, props.language);
51
51
  }
52
- const slug = cat.slug?.find((s) => s.language === lang)?.value || cat.slug?.[0]?.value || "";
52
+ const slug = cat.slugs?.find((s) => s.language === lang)?.value || cat.slugs?.[0]?.value || "";
53
53
  return `/category/${cat.categoryId}/${slug}`;
54
54
  }
55
55
  function isCurrentItem(index) {
@@ -160,7 +160,7 @@ function ProductJsonLd(props) {
160
160
  }
161
161
  var ProductJsonLd_default = React__namespace.memo(ProductJsonLd);
162
162
  function CategoryShortDescription(props) {
163
- const match = props.category?.shortDescription?.find(
163
+ const match = props.category?.shortDescriptions?.find(
164
164
  (d) => d.language === props.language
165
165
  );
166
166
  const html = match?.value || "";
@@ -842,7 +842,7 @@ function ProductPriceDisplay(props) {
842
842
  return props.includeTax ? propellerV2CoreUi.getLabel(props.labels, "exclTax", "excl. VAT") : propellerV2CoreUi.getLabel(props.labels, "inclTax", "incl. VAT");
843
843
  }
844
844
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-price ${props.className || ""}`, "data-hidden": isHidden() ? "true" : "false", children: [
845
- isHidden() ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-product-price__login-prompt text-sm text-muted-foreground italic", children: propellerV2CoreUi.getLabel(props.labels, "loginToSeePrices", "Log in to see prices") }) : null,
845
+ isHidden() && props.showLoginPrompt !== false ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-product-price__login-prompt text-sm text-muted-foreground italic", children: propellerV2CoreUi.getLabel(props.labels, "loginToSeePrices", "Log in to see prices") }) : null,
846
846
  !isHidden() && !!getLeadingPrice() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__content flex flex-col gap-0.5", children: [
847
847
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__primary flex items-baseline gap-2", children: [
848
848
  /* @__PURE__ */ jsxRuntime.jsx(