@propeller-commerce/propeller-v2-react-ui 0.11.1 → 0.11.3
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 +31 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,37 @@ 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.11.3] - 2026-07-31
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`<ProductSlider>` hid add-to-cart from signed-in users in a semi-closed
|
|
16
|
+
portal.** It gated the control on `portalMode === 'open'`, so the whole mode
|
|
17
|
+
lost it rather than just anonymous visitors — the same defect `ProductGrid`
|
|
18
|
+
had before 0.8.0. Sliders now gate on the shared
|
|
19
|
+
`isContentHidden(portalMode, user)` like the grid, so a signed-in shopper
|
|
20
|
+
keeps add-to-cart on cross-sells, up-sells and CMS product blocks.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **`allowAddToCart` on `<ProductSlider>`** — lets a host hide the control the
|
|
25
|
+
way `ProductGrid` already allows. Defaults to `true`; a semi-closed portal
|
|
26
|
+
still withholds it from anonymous visitors regardless.
|
|
27
|
+
|
|
28
|
+
## [0.11.2] - 2026-07-31
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **`<ProductSlider>` dropped `onLoginClick`, so its log-in action did
|
|
33
|
+
nothing.** In a semi-closed portal `ProductCard` replaces add-to-cart with
|
|
34
|
+
`<LoginToOrderButton>`, and the card resolves `onLoginClick` from the grid
|
|
35
|
+
config. `ProductGrid` puts it there; the slider never did — it forwards every
|
|
36
|
+
other card callback (`onProceedToCheckout`, `onRequestQuoteClick`,
|
|
37
|
+
`afterAddToCart`, …) but this one was missed when the semi-closed gating
|
|
38
|
+
landed in 0.8.0. Anonymous visitors got a button that looked clickable and
|
|
39
|
+
went nowhere, on every slider — cross-sells, up-sells and CMS product blocks.
|
|
40
|
+
It is now forwarded like the rest.
|
|
41
|
+
|
|
11
42
|
## [0.11.1] - 2026-07-30
|
|
12
43
|
|
|
13
44
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -16037,6 +16037,7 @@ function ProductSlider(rawProps) {
|
|
|
16037
16037
|
afterAddToCart: props.afterAddToCart,
|
|
16038
16038
|
onProceedToCheckout: props.onProceedToCheckout,
|
|
16039
16039
|
onRequestQuoteClick: props.onRequestQuoteClick,
|
|
16040
|
+
onLoginClick: props.onLoginClick,
|
|
16040
16041
|
onToggleFavorite: (item, isFav) => props.onToggleFavorite?.(item, isFav),
|
|
16041
16042
|
onProductClick: (p) => handleProductClick(p),
|
|
16042
16043
|
onClusterClick: (c) => handleClusterClick(c),
|
|
@@ -16080,8 +16081,9 @@ function ProductSlider(rawProps) {
|
|
|
16080
16081
|
function desktopCount() {
|
|
16081
16082
|
return props.itemsPerView?.desktop || 4;
|
|
16082
16083
|
}
|
|
16083
|
-
function
|
|
16084
|
-
|
|
16084
|
+
function showAddToCart() {
|
|
16085
|
+
const allow = props.allowAddToCart !== false;
|
|
16086
|
+
return !propellerV2CoreUi.isContentHidden(props.portalMode, props.user) && allow;
|
|
16085
16087
|
}
|
|
16086
16088
|
function isCluster(item) {
|
|
16087
16089
|
return "clusterId" in item && !("productId" in item);
|
|
@@ -16230,7 +16232,7 @@ function ProductSlider(rawProps) {
|
|
|
16230
16232
|
ProductCardImpl,
|
|
16231
16233
|
{
|
|
16232
16234
|
product: item,
|
|
16233
|
-
allowAddToCart:
|
|
16235
|
+
allowAddToCart: showAddToCart(),
|
|
16234
16236
|
labels: props.productCardLabels,
|
|
16235
16237
|
stockLabels: props.stockLabels,
|
|
16236
16238
|
priceLabels: props.priceLabels,
|