@propeller-commerce/propeller-v2-react-ui 0.7.1 → 0.8.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/CHANGELOG.md CHANGED
@@ -8,6 +8,38 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
8
8
  between minor versions; breaking changes are called out below and in
9
9
  [MIGRATION.md](./MIGRATION.md).
10
10
 
11
+ ## [0.8.0] - 2026-07-28
12
+
13
+ ### Added
14
+
15
+ - **`<LoginToOrderButton>`** — a log-in call to action rendered in place of
16
+ add-to-cart for anonymous visitors of a semi-closed portal. Takes an
17
+ `onLoginClick` callback (the host owns navigation, mirroring
18
+ `RegisterForm.onLoginClick`) and a `loginToOrder` label. `ProductCard`,
19
+ `ProductInfo` and `ProductGrid` accept `onLoginClick` and forward it.
20
+ - **`showLoginPrompt` on `<ProductPrice>` and `<ProductBundles>`** — set
21
+ `false` to render nothing where the "log in to see prices" text would go.
22
+ Defaults to `true`, so existing behaviour is unchanged.
23
+ - **`portalMode` on `<ProductCard>`, `<ClusterCard>` and `<ClusterOptions>`** —
24
+ resolved from `<PropellerProvider>` like the other Tier 1 infra props; an
25
+ explicit prop still wins.
26
+
27
+ ### Fixed
28
+
29
+ - **Semi-closed portals leaked price and stock in listings.** `ProductCard`
30
+ never received `portalMode`, so the price it renders through `<ProductPrice>`
31
+ and its stock row stayed visible to anonymous visitors even though the toolbar
32
+ and price filter were correctly gated. `ClusterCard` had the same gap, and
33
+ `ClusterOptions` printed option prices in its dropdown labels and selection
34
+ preview. All now gate on the shared `isContentHidden(portalMode, user)`.
35
+ - **`ProductGrid` hid add-to-cart from signed-in users of a semi-closed
36
+ portal.** `showAddToCart()` tested `portalMode === 'open'` rather than
37
+ `isContentHidden`, so authenticated shoppers lost the control along with
38
+ anonymous ones. Signed-in users keep add-to-cart.
39
+ - **The CTA slot collapsed when content was hidden.** `ProductCard` gated the
40
+ slot on `allowAddToCart`, which `ProductGrid` passes as `false` in that case —
41
+ leaving no room for the log-in action. The slot now renders either control.
42
+
11
43
  ## [0.7.1] - 2026-07-28
12
44
 
13
45
  ### Fixed
package/dist/index.cjs CHANGED
@@ -5,6 +5,7 @@ var propellerV2CoreUi = require('@propeller-commerce/propeller-v2-core-ui');
5
5
  var React6 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var propellerSdkV2 = require('@propeller-commerce/propeller-sdk-v2');
8
+ var lucideReact = require('lucide-react');
8
9
 
9
10
  function _interopNamespace(e) {
10
11
  if (e && e.__esModule) return e;
@@ -7958,6 +7959,8 @@ var RESOLVE_SPEC = {
7958
7959
  includeTax: { infra: "includeTax" },
7959
7960
  language: { infra: "language", default: "NL" },
7960
7961
  currency: { infra: "currency", default: "\u20AC" },
7962
+ user: { infra: "user", default: null },
7963
+ portalMode: { infra: "portalMode" },
7961
7964
  columns: { grid: "columns", default: 3 },
7962
7965
  showPrice: { grid: "showPrice" },
7963
7966
  showStock: { grid: "showStock" },
@@ -8001,9 +8004,10 @@ function ClusterCard(rawProps) {
8001
8004
  const textLabelValues = resolveAttributeValues(cluster, props.textLabels).map((value) => ({
8002
8005
  value
8003
8006
  }));
8004
- const defaultProductInventory = cluster?.defaultProduct?.inventory;
8007
+ const contentHidden = propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
8008
+ const defaultProductInventory = contentHidden ? void 0 : cluster?.defaultProduct?.inventory;
8005
8009
  const useTax = props.includeTax !== void 0 ? !!props.includeTax : false;
8006
- const priceObj = cluster?.defaultProduct?.price;
8010
+ const priceObj = contentHidden ? void 0 : cluster?.defaultProduct?.price;
8007
8011
  const priceValue = useTax ? priceObj?.net : priceObj?.gross;
8008
8012
  const clusterPrice = props.showPrice === false ? "" : propellerV2CoreUi.formatPrice(priceValue, { symbol: props.currency ?? "\u20AC" });
8009
8013
  function handleClusterClick(e) {
@@ -8408,6 +8412,23 @@ function MachineCard(props) {
8408
8412
  }
8409
8413
  );
8410
8414
  }
8415
+ function LoginToOrderButton(props) {
8416
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8417
+ "button",
8418
+ {
8419
+ type: "button",
8420
+ className: `propeller-login-to-order inline-flex items-center justify-center gap-2 h-10 px-4 w-full rounded-control bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity ${props.className || ""}`,
8421
+ onClick: () => {
8422
+ if (props.onLoginClick) props.onLoginClick();
8423
+ },
8424
+ children: [
8425
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "propeller-login-to-order__icon w-4 h-4", "aria-hidden": "true" }),
8426
+ propellerV2CoreUi.getLabel(props.labels, "loginToOrder", "Log in to order")
8427
+ ]
8428
+ }
8429
+ );
8430
+ }
8431
+ var LoginToOrderButton_default = LoginToOrderButton;
8411
8432
  function ProductPriceDisplay(props) {
8412
8433
  function isHidden2() {
8413
8434
  return propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
@@ -8458,7 +8479,7 @@ function ProductPriceDisplay(props) {
8458
8479
  return props.includeTax ? propellerV2CoreUi.getLabel(props.labels, "exclTax", "excl. VAT") : propellerV2CoreUi.getLabel(props.labels, "inclTax", "incl. VAT");
8459
8480
  }
8460
8481
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-price ${props.className || ""}`, "data-hidden": isHidden2() ? "true" : "false", children: [
8461
- isHidden2() ? /* @__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,
8482
+ isHidden2() && 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,
8462
8483
  !isHidden2() && !!getLeadingPrice() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__content flex flex-col gap-0.5", children: [
8463
8484
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__primary flex items-baseline gap-2", children: [
8464
8485
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -8501,6 +8522,7 @@ var RESOLVE_SPEC2 = {
8501
8522
  companyId: { infra: "companyId" },
8502
8523
  language: { infra: "language", default: "NL" },
8503
8524
  includeTax: { infra: "includeTax" },
8525
+ portalMode: { infra: "portalMode" },
8504
8526
  configuration: { infra: "configuration" },
8505
8527
  columns: { grid: "columns", default: 3 },
8506
8528
  showPrice: { grid: "showPrice" },
@@ -8522,6 +8544,7 @@ var RESOLVE_SPEC2 = {
8522
8544
  onCartCreated: { grid: "onCartCreated" },
8523
8545
  afterAddToCart: { grid: "afterAddToCart" },
8524
8546
  onProceedToCheckout: { grid: "onProceedToCheckout" },
8547
+ onLoginClick: { grid: "onLoginClick" },
8525
8548
  onRequestQuoteClick: { grid: "onRequestQuoteClick" },
8526
8549
  onProductClick: { grid: "onProductClick" },
8527
8550
  onToggleFavorite: {
@@ -8553,6 +8576,9 @@ function ProductCardRoot(rawProps) {
8553
8576
  const language = props.language || "NL";
8554
8577
  const product = props.product;
8555
8578
  const isRow = props.columns === 1;
8579
+ const contentHidden = propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
8580
+ const showStock = !!props.showStock && !contentHidden;
8581
+ const showCta = props.allowAddToCart !== false || contentHidden;
8556
8582
  const name = getProductName(product, language);
8557
8583
  const sku = propellerV2CoreUi.getProductSku(product);
8558
8584
  const imageUrl = propellerV2CoreUi.getProductImageUrl(product);
@@ -8623,10 +8649,10 @@ function ProductCardRoot(rawProps) {
8623
8649
  ] }) }),
8624
8650
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer w-full md:w-auto flex flex-col gap-2 md:flex-row md:items-center md:gap-3 px-4 py-2 md:py-0 border-t md:border-t-0 border-border-subtle", children: [
8625
8651
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer-meta flex items-center justify-between gap-3 md:contents", children: [
8626
- props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
8652
+ showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
8627
8653
  props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-sm" }) : null
8628
8654
  ] }),
8629
- props.allowAddToCart !== false ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__cta w-full md:w-auto md:flex-shrink-0 md:ml-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardAddToCart, {}) }) : null
8655
+ showCta ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__cta w-full md:w-auto md:flex-shrink-0 md:ml-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardAddToCart, {}) }) : null
8630
8656
  ] })
8631
8657
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8632
8658
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__body flex flex-1 flex-col gap-1.5 p-3 sm:gap-2 sm:p-4", children: [
@@ -8634,16 +8660,16 @@ function ProductCardRoot(rawProps) {
8634
8660
  props.showName !== false ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardName, { linkable: true }) : null,
8635
8661
  /* @__PURE__ */ jsxRuntime.jsx(ProductCardBelowName, {}),
8636
8662
  textLabelValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardTextLabels, {}) : null,
8637
- props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) }) : null,
8663
+ showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) }) : null,
8638
8664
  props.showManufacturer && manufacturer ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardManufacturer, {}) : null,
8639
8665
  props.showShortDescription && shortDescription ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardShortDescription, {}) : null,
8640
8666
  props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__price mt-auto pt-1 hidden md:block", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-base sm:text-lg" }) }) : null
8641
8667
  ] }),
8642
- props.showStock && !!product.inventory || props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer-meta flex flex-wrap items-center justify-between gap-x-2 gap-y-1 px-3 pt-1 sm:px-4 md:hidden", children: [
8643
- props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
8668
+ showStock && !!product.inventory || props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer-meta flex flex-wrap items-center justify-between gap-x-2 gap-y-1 px-3 pt-1 sm:px-4 md:hidden", children: [
8669
+ showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
8644
8670
  props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-base", className: "propeller-product-card__price min-w-0 text-right" }) : null
8645
8671
  ] }) : null,
8646
- props.allowAddToCart !== false ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__cta px-3 pb-3 pt-2 sm:px-4 sm:pb-4", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardAddToCart, {}) }) : null
8672
+ showCta ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__cta px-3 pb-3 pt-2 sm:px-4 sm:pb-4", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardAddToCart, {}) }) : null
8647
8673
  ] })
8648
8674
  ]
8649
8675
  }
@@ -8842,12 +8868,25 @@ function ProductCardPrice(props) {
8842
8868
  price: product.price,
8843
8869
  includeTax: derived.useTax,
8844
8870
  priceSize: props.priceSize ?? "text-base sm:text-lg",
8845
- labels: resolved.priceLabels
8871
+ labels: resolved.priceLabels,
8872
+ portalMode: resolved.portalMode,
8873
+ user: resolved.user,
8874
+ showLoginPrompt: false
8846
8875
  }
8847
8876
  ) });
8848
8877
  }
8849
8878
  function ProductCardAddToCart(props) {
8850
8879
  const { product, resolved } = useProductCard();
8880
+ if (propellerV2CoreUi.isContentHidden(resolved.portalMode, resolved.user)) {
8881
+ return /* @__PURE__ */ jsxRuntime.jsx(
8882
+ LoginToOrderButton_default,
8883
+ {
8884
+ className: props.className,
8885
+ labels: resolved.addToCartLabels,
8886
+ onLoginClick: resolved.onLoginClick
8887
+ }
8888
+ );
8889
+ }
8851
8890
  const InjectedAddToCart = resolved.addToCartComponent;
8852
8891
  if (InjectedAddToCart) {
8853
8892
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -8980,9 +9019,8 @@ function ProductGrid(rawProps) {
8980
9019
  return !!props.isLoading || isLoading;
8981
9020
  }
8982
9021
  function showAddToCart() {
8983
- const mode = props.portalMode || "open";
8984
9022
  const allow = props.allowAddToCart !== false;
8985
- return mode === "open" && allow;
9023
+ return !propellerV2CoreUi.isContentHidden(props.portalMode, props.user) && allow;
8986
9024
  }
8987
9025
  function getSkeletonItems() {
8988
9026
  const cols = props.columns || 3;
@@ -9009,6 +9047,7 @@ function ProductGrid(rawProps) {
9009
9047
  onCartCreated: props.onCartCreated,
9010
9048
  afterAddToCart: props.afterAddToCart,
9011
9049
  onProceedToCheckout: props.onProceedToCheckout,
9050
+ onLoginClick: props.onLoginClick,
9012
9051
  onRequestQuoteClick: props.onRequestQuoteClick,
9013
9052
  onToggleFavorite: (item, isFav) => props.onToggleFavorite?.(item, isFav),
9014
9053
  onProductClick: (p) => props.onProductClick?.(p),
@@ -9657,7 +9696,7 @@ function GridToolbar(rawProps) {
9657
9696
  const [currentSortOrder, setCurrentSortOrder] = React6.useState(propellerSdkV2.SortOrder.DESC);
9658
9697
  const [currentOffset, setCurrentOffset] = React6.useState(12);
9659
9698
  const [currentViewMode, setCurrentViewMode] = React6.useState("grid");
9660
- function getLabel55(key) {
9699
+ function getLabel56(key) {
9661
9700
  const labels = props.labels || {};
9662
9701
  return labels[key] !== void 0 ? labels[key] : DEFAULT_LABELS[key] || key;
9663
9702
  }
@@ -9736,7 +9775,7 @@ function GridToolbar(rawProps) {
9736
9775
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-grid-toolbar__count text-sm text-muted-foreground font-medium", children: props.itemsFound > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
9737
9776
  props.itemsFound,
9738
9777
  "\xA0",
9739
- props.itemsFound === 1 ? getLabel55("productSingular") : getLabel55("productPlural")
9778
+ props.itemsFound === 1 ? getLabel56("productSingular") : getLabel56("productPlural")
9740
9779
  ] }) : null }),
9741
9780
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-toolbar__controls flex flex-wrap items-center gap-3", children: [
9742
9781
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9747,7 +9786,7 @@ function GridToolbar(rawProps) {
9747
9786
  onChange: (e) => handleOffsetChange(parseInt(e.target.value)),
9748
9787
  children: getOffsetOptions()?.map((n) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: n, children: [
9749
9788
  n,
9750
- getLabel55("perPage")
9789
+ getLabel56("perPage")
9751
9790
  ] }, n))
9752
9791
  }
9753
9792
  ),
@@ -9763,7 +9802,7 @@ function GridToolbar(rawProps) {
9763
9802
  {
9764
9803
  value: field,
9765
9804
  disabled: field === "PRICE" && isPriceSortDisabled(),
9766
- children: getLabel55(field)
9805
+ children: getLabel56(field)
9767
9806
  },
9768
9807
  field
9769
9808
  ))
@@ -9776,8 +9815,8 @@ function GridToolbar(rawProps) {
9776
9815
  value: currentSortOrder,
9777
9816
  onChange: (e) => handleSortOrderChange(e.target.value),
9778
9817
  children: [
9779
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: propellerSdkV2.SortOrder.ASC, children: getLabel55("ASC") }),
9780
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: propellerSdkV2.SortOrder.DESC, children: getLabel55("DESC") })
9818
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: propellerSdkV2.SortOrder.ASC, children: getLabel56("ASC") }),
9819
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: propellerSdkV2.SortOrder.DESC, children: getLabel56("DESC") })
9781
9820
  ]
9782
9821
  }
9783
9822
  ),
@@ -9787,7 +9826,7 @@ function GridToolbar(rawProps) {
9787
9826
  type: "button",
9788
9827
  className: "propeller-grid-toolbar__view-toggle h-9 w-9 flex items-center justify-center rounded-control border border-input bg-transparent hover:bg-accent hover:text-accent-foreground transition-colors",
9789
9828
  onClick: (event) => handleViewChange(),
9790
- title: currentViewMode === "grid" ? getLabel55("switchToList") : getLabel55("switchToGrid"),
9829
+ title: currentViewMode === "grid" ? getLabel56("switchToList") : getLabel56("switchToGrid"),
9791
9830
  children: [
9792
9831
  currentViewMode === "grid" ? /* @__PURE__ */ jsxRuntime.jsxs(
9793
9832
  "svg",
@@ -9845,7 +9884,7 @@ function GridToolbar(rawProps) {
9845
9884
  onClick: (event) => {
9846
9885
  if (props.onClearFilters) props.onClearFilters();
9847
9886
  },
9848
- children: getLabel55("clearAll")
9887
+ children: getLabel56("clearAll")
9849
9888
  }
9850
9889
  ),
9851
9890
  props.priceFilterMin !== void 0 || props.priceFilterMax !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -9856,7 +9895,7 @@ function GridToolbar(rawProps) {
9856
9895
  if (props.onPriceFilterRemove) props.onPriceFilterRemove();
9857
9896
  },
9858
9897
  children: [
9859
- getLabel55("price"),
9898
+ getLabel56("price"),
9860
9899
  ": \u20AC",
9861
9900
  props.priceFilterMin ?? 0,
9862
9901
  " \u2013 \u20AC",
@@ -9893,7 +9932,7 @@ var DEFAULT_LABELS2 = {
9893
9932
  of: "of"
9894
9933
  };
9895
9934
  function GridPagination(props) {
9896
- function getLabel55(key) {
9935
+ function getLabel56(key) {
9897
9936
  const labels = props.labels || {};
9898
9937
  return labels[key] !== void 0 ? labels[key] : DEFAULT_LABELS2[key] || key;
9899
9938
  }
@@ -9966,15 +10005,15 @@ function GridPagination(props) {
9966
10005
  className: "propeller-grid-pagination__btn propeller-grid-pagination__btn--prev inline-flex items-center rounded-control border border-input bg-card px-4 py-2 text-sm font-medium text-foreground shadow-sm hover:bg-surface-hover disabled:opacity-40 disabled:cursor-not-allowed",
9967
10006
  disabled: currentPage === 1,
9968
10007
  onClick: () => handlePageChange(currentPage - 1),
9969
- children: getLabel55("previous")
10008
+ children: getLabel56("previous")
9970
10009
  }
9971
10010
  ),
9972
10011
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "propeller-grid-pagination__info px-2 text-sm font-medium text-muted-foreground", children: [
9973
- getLabel55("page"),
10012
+ getLabel56("page"),
9974
10013
  "\xA0",
9975
10014
  currentPage,
9976
10015
  "\xA0",
9977
- getLabel55("of"),
10016
+ getLabel56("of"),
9978
10017
  "\xA0",
9979
10018
  totalPages
9980
10019
  ] }),
@@ -9985,7 +10024,7 @@ function GridPagination(props) {
9985
10024
  className: "propeller-grid-pagination__btn propeller-grid-pagination__btn--next inline-flex items-center rounded-control border border-input bg-card px-4 py-2 text-sm font-medium text-foreground shadow-sm hover:bg-surface-hover disabled:opacity-40 disabled:cursor-not-allowed",
9986
10025
  disabled: currentPage === totalPages,
9987
10026
  onClick: () => handlePageChange(currentPage + 1),
9988
- children: getLabel55("next")
10027
+ children: getLabel56("next")
9989
10028
  }
9990
10029
  )
9991
10030
  ] }) : null,
@@ -9997,7 +10036,7 @@ function GridPagination(props) {
9997
10036
  className: "propeller-grid-pagination__btn propeller-grid-pagination__btn--prev inline-flex items-center rounded-control border border-input bg-card px-3 py-2 text-sm font-medium text-foreground shadow-sm hover:bg-surface-hover disabled:opacity-40 disabled:cursor-not-allowed",
9998
10037
  disabled: currentPage === 1,
9999
10038
  onClick: () => handlePageChange(currentPage - 1),
10000
- children: getLabel55("previous")
10039
+ children: getLabel56("previous")
10001
10040
  }
10002
10041
  ),
10003
10042
  getFullPages().map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -10024,7 +10063,7 @@ function GridPagination(props) {
10024
10063
  className: "propeller-grid-pagination__btn propeller-grid-pagination__btn--next inline-flex items-center rounded-control border border-input bg-card px-3 py-2 text-sm font-medium text-foreground shadow-sm hover:bg-surface-hover disabled:opacity-40 disabled:cursor-not-allowed",
10025
10064
  disabled: currentPage === totalPages,
10026
10065
  onClick: () => handlePageChange(currentPage + 1),
10027
- children: getLabel55("next")
10066
+ children: getLabel56("next")
10028
10067
  }
10029
10068
  )
10030
10069
  ] }) : null
@@ -10516,13 +10555,14 @@ function ClusterOptions(props) {
10516
10555
  function getOptionsForRender() {
10517
10556
  const options = props.options || [];
10518
10557
  const sel = selectedProductIds;
10558
+ const hidePrices = propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
10519
10559
  return options.filter((option) => option.hidden !== propellerSdkV2.YesNo.Y).map((option) => {
10520
10560
  const idStr = option.id.toString();
10521
10561
  const selectedProductId = sel[idStr] || "";
10522
10562
  const products = (option.products || []).map((p) => ({
10523
10563
  productId: p.productId,
10524
10564
  productIdStr: p.productId.toString(),
10525
- label: `${getProductName2(p)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
10565
+ label: hidePrices ? getProductName2(p) : `${getProductName2(p)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
10526
10566
  }));
10527
10567
  let previewImageUrl = "";
10528
10568
  let previewName = "";
@@ -10534,7 +10574,7 @@ function ClusterOptions(props) {
10534
10574
  if (selectedProduct) {
10535
10575
  previewImageUrl = getProductImageUrl4(selectedProduct);
10536
10576
  previewName = getProductName2(selectedProduct);
10537
- previewPrice = formatPrice9(selectedProduct.price?.gross || 0, props.currency ?? "\u20AC");
10577
+ previewPrice = hidePrices ? "" : formatPrice9(selectedProduct.price?.gross || 0, props.currency ?? "\u20AC");
10538
10578
  }
10539
10579
  }
10540
10580
  const isRequired = option.isRequired === propellerSdkV2.YesNo.Y;
@@ -15006,11 +15046,11 @@ function ProductBundles(rawProps) {
15006
15046
  children: addingBundleId === bundle.id ? propellerV2CoreUi.getLabel(props.labels, "adding", "Adding...") : propellerV2CoreUi.getLabel(props.labels, "addToCart", "In cart")
15007
15047
  }
15008
15048
  )
15009
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-bundles__login-prompt text-center text-sm text-muted-foreground py-2", children: propellerV2CoreUi.getLabel(
15049
+ ] }) : props.showLoginPrompt !== false ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-bundles__login-prompt text-center text-sm text-muted-foreground py-2", children: propellerV2CoreUi.getLabel(
15010
15050
  props.labels,
15011
15051
  "loginToSeePrices",
15012
15052
  "Log in to see prices and add to cart"
15013
- ) })
15053
+ ) }) : null
15014
15054
  ] })
15015
15055
  ] })
15016
15056
  },
@@ -15793,6 +15833,7 @@ function ProductInfoPrice(props = {}) {
15793
15833
  function ProductInfoStock(props = {}) {
15794
15834
  const { product, resolved, derived } = useProductInfoContext();
15795
15835
  if (!product.inventory) return null;
15836
+ if (propellerV2CoreUi.isContentHidden(derived.portalMode, resolved.user)) return null;
15796
15837
  const Injected = resolved.stockComponent;
15797
15838
  if (Injected) {
15798
15839
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -15819,6 +15860,16 @@ function ProductInfoStock(props = {}) {
15819
15860
  }
15820
15861
  function ProductInfoAddToCart(props = {}) {
15821
15862
  const { product, resolved, derived } = useProductInfoContext();
15863
+ if (propellerV2CoreUi.isContentHidden(derived.portalMode, resolved.user)) {
15864
+ return /* @__PURE__ */ jsxRuntime.jsx(
15865
+ LoginToOrderButton_default,
15866
+ {
15867
+ className: props.className,
15868
+ labels: derived.labels,
15869
+ onLoginClick: resolved.onLoginClick
15870
+ }
15871
+ );
15872
+ }
15822
15873
  const Injected = resolved.addToCartComponent;
15823
15874
  if (Injected) {
15824
15875
  return /* @__PURE__ */ jsxRuntime.jsx(Injected, { product, labels: derived.labels, className: props.className });
@@ -18696,6 +18747,7 @@ exports.GridToolbar = GridToolbar_default;
18696
18747
  exports.ItemStock = ItemStock_default;
18697
18748
  exports.ItemsOverview = ItemsOverview_default;
18698
18749
  exports.LoginForm = LoginForm_default;
18750
+ exports.LoginToOrderButton = LoginToOrderButton_default;
18699
18751
  exports.MachineCard = MachineCard;
18700
18752
  exports.MachineGrid = MachineGrid;
18701
18753
  exports.Menu = Menu_default;