@propeller-commerce/propeller-v2-react-ui 0.11.2 → 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 +17 -0
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,23 @@ 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
|
+
|
|
11
28
|
## [0.11.2] - 2026-07-31
|
|
12
29
|
|
|
13
30
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -16081,8 +16081,9 @@ function ProductSlider(rawProps) {
|
|
|
16081
16081
|
function desktopCount() {
|
|
16082
16082
|
return props.itemsPerView?.desktop || 4;
|
|
16083
16083
|
}
|
|
16084
|
-
function
|
|
16085
|
-
|
|
16084
|
+
function showAddToCart() {
|
|
16085
|
+
const allow = props.allowAddToCart !== false;
|
|
16086
|
+
return !propellerV2CoreUi.isContentHidden(props.portalMode, props.user) && allow;
|
|
16086
16087
|
}
|
|
16087
16088
|
function isCluster(item) {
|
|
16088
16089
|
return "clusterId" in item && !("productId" in item);
|
|
@@ -16231,7 +16232,7 @@ function ProductSlider(rawProps) {
|
|
|
16231
16232
|
ProductCardImpl,
|
|
16232
16233
|
{
|
|
16233
16234
|
product: item,
|
|
16234
|
-
allowAddToCart:
|
|
16235
|
+
allowAddToCart: showAddToCart(),
|
|
16235
16236
|
labels: props.productCardLabels,
|
|
16236
16237
|
stockLabels: props.stockLabels,
|
|
16237
16238
|
priceLabels: props.priceLabels,
|