@propeller-commerce/propeller-v2-react-ui 0.18.0 → 0.19.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 +84 -12
- package/dist/index.cjs +332 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -10
- package/dist/index.d.ts +94 -10
- package/dist/index.js +334 -216
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +16 -14
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +38 -1
- package/dist/pure.d.ts +38 -1
- package/dist/pure.js +17 -15
- package/dist/pure.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,80 @@ 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.19.0] - 2026-08-26
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`useCart().addItems(items)`** — sequential bulk add that threads each add's
|
|
16
|
+
resolved cart id into the next. "Add this whole set to the basket" is a normal
|
|
17
|
+
requirement (kits, re-order, recipe packs) and there was no bulk call, so every
|
|
18
|
+
consumer wrote the loop themselves and hit the bug below.
|
|
19
|
+
- **`currency` on `ProductCardProps` / `ProductGridProps`**, resolved from
|
|
20
|
+
`<PropellerProvider>` like `ClusterCard` already did.
|
|
21
|
+
- **`className` on `CartSummaryProps`** and **`inputClassName` on
|
|
22
|
+
`SearchBarProps`**, merged over the defaults through `tailwind-merge`.
|
|
23
|
+
- **`configuration` on `OrderItemCardProps`** — supply the host's URL builders
|
|
24
|
+
and the item link is generated the way every other link on the storefront is.
|
|
25
|
+
- **Bonus items in the add-to-cart modal.** A promotion granting a free product
|
|
26
|
+
said nothing at the moment it fired; the shopper only found it by opening the
|
|
27
|
+
cart later, which is after it can influence them. Only the items *this* add
|
|
28
|
+
earned are shown. `bonusItemsLabels` overrides the block's labels.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **`addItem` could not add more than one product per tick.** It resolved the
|
|
33
|
+
cart id from React state, which does not update until the next render, so a
|
|
34
|
+
loop sent the same stale id every iteration: the 2nd..nth add failed with
|
|
35
|
+
"No cart ID provided", or — with `createCart` — quietly started a NEW cart per
|
|
36
|
+
product so only the last one survived. Neither failure throws, so both looked
|
|
37
|
+
like the adds had simply vanished. The id now lives in a ref written the
|
|
38
|
+
moment a cart resolves.
|
|
39
|
+
- **Cart lines lost their images unless every add path passed `configuration`.**
|
|
40
|
+
The media arguments are optional and nothing warned; the mutation succeeded
|
|
41
|
+
and the returned items carried no `imageVariants` at all, so the shopper saw
|
|
42
|
+
empty tiles for products with perfectly good PIM images — two screens away
|
|
43
|
+
from the call site. The hook now defaults them; an explicit `configuration`
|
|
44
|
+
still wins.
|
|
45
|
+
- **A non-euro shop could not change the currency in the catalogue.**
|
|
46
|
+
`ProductGrid` resolved a currency and never forwarded it, so every card fell
|
|
47
|
+
through to the package's `€`. `GridFilters`' price inputs and the active
|
|
48
|
+
price-filter chip hardcoded the glyph too — the chip had no prop and no class,
|
|
49
|
+
so no userland fix existed.
|
|
50
|
+
- **Prices used Dutch separators in every language.** Number format now follows
|
|
51
|
+
the storefront language via core-ui's `localeForLanguage`, so an English shop
|
|
52
|
+
renders `£3.45` rather than `£ 3,45`. Components that format money take a
|
|
53
|
+
`language` prop, resolved from the provider where they already read infra.
|
|
54
|
+
- **Search autosuggest and order-item links dropped the locale prefix.** Both
|
|
55
|
+
built `/product/:id/:slug` from literals instead of the host's URL builders,
|
|
56
|
+
so on a prefixed storefront they sent the visitor to the default language.
|
|
57
|
+
They now use `configuration.urls` when supplied, with the literals as a bare-
|
|
58
|
+
mount fallback.
|
|
59
|
+
- **`ProductBulkPrices` ignored an explicit empty `title`.** The heading is
|
|
60
|
+
resolved with `getLabel`, which treats `''` as missing and substitutes its
|
|
61
|
+
English default — so the component's own "no title, no heading" branch was
|
|
62
|
+
dead code and the block rendered "Volume pricing" on a Dutch page.
|
|
63
|
+
- **The mini-cart labelled an excl-VAT figure "Total".** The cart page calls the
|
|
64
|
+
same number "Total excl. VAT" and reserves "Total" for the incl-VAT figure, so
|
|
65
|
+
the first number a shopper saw understated the price by one VAT amount. The
|
|
66
|
+
label now follows the same switch the figure does.
|
|
67
|
+
- **`CartSummary` painted a card background with no card.** No padding, radius
|
|
68
|
+
or shadow, directly above a properly styled `ActionCode` in the same column.
|
|
69
|
+
- **`SearchBar`'s input was styled for a dark header** (`bg-white/95
|
|
70
|
+
border-white/20`), rendering as a white-on-white ghost on a light one. It now
|
|
71
|
+
uses the themed surface and border tokens.
|
|
72
|
+
- **`ProductBundles`' add button read "In cart"**, a status rather than the
|
|
73
|
+
action it performs, where every other cart control in the package says
|
|
74
|
+
"Add to cart".
|
|
75
|
+
- **`OrderList` showed a bare line of text while loading**, collapsing the list
|
|
76
|
+
and snapping it back — most visible when switching language on the account
|
|
77
|
+
pages. It renders skeleton rows that hold the layout instead.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- `AddToCartProps.onAddToCart` may return a promise, and `useCart` awaits the
|
|
82
|
+
override. Matches the widened slot contract in core-ui 0.7.0.
|
|
83
|
+
- Requires `@propeller-commerce/propeller-v2-core-ui` `^0.7.0`.
|
|
84
|
+
|
|
11
85
|
## [0.18.0] - 2026-08-20
|
|
12
86
|
|
|
13
87
|
### Added
|
|
@@ -42,7 +116,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
42
116
|
### Fixed
|
|
43
117
|
|
|
44
118
|
- **A host `className` override could not beat the component's own utility
|
|
45
|
-
|
|
119
|
+
.** Class lists were built by string-appending the override
|
|
46
120
|
after the package's defaults, which decides nothing — the cascade does, not
|
|
47
121
|
attribute order. `iconClassName="text-cocoa"` on `AccountIconAndMenu` (baked-in
|
|
48
122
|
`text-white`) produced an element carrying both and rendered white, while the
|
|
@@ -53,7 +127,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
53
127
|
untouched.
|
|
54
128
|
|
|
55
129
|
- **Anonymous catalog listings were scoped differently on the client than on
|
|
56
|
-
the server
|
|
130
|
+
the server.** Listing hooks derived `userId` only from a
|
|
57
131
|
logged-in user and omitted the key entirely for guests, while a server-side
|
|
58
132
|
seed scopes anonymous queries to the channel's `anonymousUserId`. The two
|
|
59
133
|
therefore asked different questions, and the client refetch quietly replaced
|
|
@@ -67,20 +141,19 @@ between minor versions; breaking changes are called out below and in
|
|
|
67
141
|
|
|
68
142
|
- **`configuration.anonymousUserId`** — the channel's guest account, resolved
|
|
69
143
|
server-side and handed to the package so client-side listings can scope to
|
|
70
|
-
it. Same route `baseCategoryId` takes
|
|
144
|
+
it. Same route `baseCategoryId` takes; no module guesses it.
|
|
71
145
|
|
|
72
146
|
## [0.16.0] - 2026-08-12
|
|
73
147
|
|
|
74
148
|
### Fixed
|
|
75
149
|
|
|
76
|
-
- **Localized names and slugs ignored the storefront language
|
|
77
|
-
PWP-940).** A localized array carries one entry per authored language in
|
|
150
|
+
- **Localized names and slugs ignored the storefront language.** A localized array carries one entry per authored language in
|
|
78
151
|
catalog order, so `names[0]` / `slugs[0]` is the catalog's DEFAULT language,
|
|
79
152
|
not the storefront's. Thirteen sites read index 0 unconditionally while
|
|
80
153
|
eleven others resolved by language correctly. Now all of them go through
|
|
81
154
|
`getLocalizedValue`, which prefers the active language and falls back to any
|
|
82
155
|
translation that has a value:
|
|
83
|
-
- `ClusterOptions` — option group and option product names
|
|
156
|
+
- `ClusterOptions` — option group and option product names
|
|
84
157
|
- `FavoriteListItem`, `FavoriteListDetails` — product and cluster names
|
|
85
158
|
- `ItemsOverview` — item, bundle-leader, bundle-item and child-option names
|
|
86
159
|
- `ProductBundles` — bundle item names
|
|
@@ -90,8 +163,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
90
163
|
|
|
91
164
|
The three slug sites are the ones that actually broke: they emitted
|
|
92
165
|
default-language URLs on every non-default locale.
|
|
93
|
-
- **`useCart` never adopted a cart id that arrived after mount (
|
|
94
|
-
PWP-937).** The id was seeded once with `useState(options.cartId || '')` and
|
|
166
|
+
- **`useCart` never adopted a cart id that arrived after mount.** The id was seeded once with `useState(options.cartId || '')` and
|
|
95
167
|
only reassigned from the hook's own cart-creation path, so a component that
|
|
96
168
|
mounted before the cart resolved held `''` permanently. `CartIconAndSidebar`
|
|
97
169
|
renders in the header on the first paint of every page, so its "Request
|
|
@@ -111,7 +183,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
111
183
|
`useInfraProps`, like the other catalog components. Passing it explicitly
|
|
112
184
|
still wins.
|
|
113
185
|
- The favorites list's add-product button default now reads "Add product to
|
|
114
|
-
favorite list" instead of "Add product directly to this wishlist"
|
|
186
|
+
favorite list" instead of "Add product directly to this wishlist".
|
|
115
187
|
Hosts that translate `FavoriteListDetails.addProductDirectly` should update
|
|
116
188
|
their own copy — "favorite list" is the agreed term, not "wishlist".
|
|
117
189
|
|
|
@@ -119,7 +191,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
119
191
|
|
|
120
192
|
### Fixed
|
|
121
193
|
|
|
122
|
-
- **Checkout step 3 opened with nothing selected on a fresh cart
|
|
194
|
+
- **Checkout step 3 opened with nothing selected on a fresh cart.**
|
|
123
195
|
`CartPaymethods` and `CartCarriers` only ever adopted a value the cart already
|
|
124
196
|
stored, so a cart that had never reached step 3 — every first order, and every
|
|
125
197
|
order after the cart is recreated — rendered both grids blank and refused to
|
|
@@ -158,7 +230,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
158
230
|
### Fixed
|
|
159
231
|
|
|
160
232
|
- **The product specifications table emptied out in a language the catalogue is
|
|
161
|
-
only partly translated into
|
|
233
|
+
only partly translated into**. A localized list carries only the
|
|
162
234
|
languages someone authored, so asking for one nobody wrote returns nothing —
|
|
163
235
|
it does not fall back. `ProductSpecifications` matched strictly on
|
|
164
236
|
`language === props.language`, which failed twice over: the label fell through
|
|
@@ -264,7 +336,7 @@ between minor versions; breaking changes are called out below and in
|
|
|
264
336
|
fall back to, and the row rendered with a blank label and an empty slug:
|
|
265
337
|
invisible and unclickable. Switching a bilingual storefront to a language with
|
|
266
338
|
partial translations collapsed the menu to whichever categories happened to be
|
|
267
|
-
translated
|
|
339
|
+
translated.
|
|
268
340
|
|
|
269
341
|
`names` and `slugs` are now fetched unfiltered — every translation — and
|
|
270
342
|
`mapCategory` picks the active language, falling back to whichever translation
|