@propeller-commerce/propeller-v2-react-ui 0.4.26 → 0.4.27
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 +22 -0
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,28 @@ 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.4.27] - 2026-07-21
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`SearchBar` autosuggest now respects orderlist (contract) scoping.** The
|
|
16
|
+
debounced live-search query built a plain `ProductSearchInput` that never
|
|
17
|
+
passed `orderlistIds`/`applyOrderlists`, so the dropdown previewed the full
|
|
18
|
+
catalogue even inside a B2B contract catalogue (the submitted results were
|
|
19
|
+
already correctly scoped — only the preview leaked). It now threads the same
|
|
20
|
+
orderlist scope as the grid fetch, so previews and results agree and a PDP
|
|
21
|
+
outside the contract is no longer reachable from the preview.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **`SearchBar`: `renderPrice` + `showPrice` props.** `renderPrice(result)`
|
|
26
|
+
replaces the price cell of each result with custom content (return any node,
|
|
27
|
+
or `null` to render nothing) — e.g. a "Price by quotation" label for a
|
|
28
|
+
contract catalogue where prices are quote-only; it fully overrides the
|
|
29
|
+
default price rendering. `showPrice` (default `true`) is a simpler boolean to
|
|
30
|
+
hide the price column outright. Both default to the previous behaviour, so
|
|
31
|
+
the change is backward-compatible.
|
|
32
|
+
|
|
11
33
|
## [0.4.26] - 2026-07-21
|
|
12
34
|
|
|
13
35
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -2365,6 +2365,10 @@ function useProductSearch(options) {
|
|
|
2365
2365
|
setSearchLoading(true);
|
|
2366
2366
|
try {
|
|
2367
2367
|
const service = propellerV2CoreUi.createServices(graphqlClient).product;
|
|
2368
|
+
const orderlistScope = options.orderlistIds && options.orderlistIds.length > 0 ? {
|
|
2369
|
+
applyOrderlists: options.applyOrderlists !== false,
|
|
2370
|
+
orderlistIds: options.orderlistIds
|
|
2371
|
+
} : { applyOrderlists: false };
|
|
2368
2372
|
const input = {
|
|
2369
2373
|
term,
|
|
2370
2374
|
language,
|
|
@@ -2376,6 +2380,7 @@ function useProductSearch(options) {
|
|
|
2376
2380
|
propellerSdkV2.ProductStatus.T,
|
|
2377
2381
|
propellerSdkV2.ProductStatus.S
|
|
2378
2382
|
],
|
|
2383
|
+
...orderlistScope,
|
|
2379
2384
|
sortInputs: [{ field: propellerSdkV2.ProductSortField.RELEVANCE, order: propellerSdkV2.SortOrder.DESC }],
|
|
2380
2385
|
searchFields: [
|
|
2381
2386
|
{
|
|
@@ -2422,7 +2427,8 @@ function useProductSearch(options) {
|
|
|
2422
2427
|
}
|
|
2423
2428
|
}, 300);
|
|
2424
2429
|
},
|
|
2425
|
-
|
|
2430
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2431
|
+
[graphqlClient, language, configuration, userKey, JSON.stringify(options.orderlistIds ?? []), options.applyOrderlists]
|
|
2426
2432
|
);
|
|
2427
2433
|
React6.useEffect(() => {
|
|
2428
2434
|
if (!isControlled) fetchProducts();
|
|
@@ -17382,7 +17388,7 @@ function SearchBar(rawProps) {
|
|
|
17382
17388
|
result.sku
|
|
17383
17389
|
] }) : null
|
|
17384
17390
|
] }),
|
|
17385
|
-
result.price !== void 0 && result.price !== null ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-search-bar__result-price text-sm font-semibold text-foreground flex-shrink-0 text-right", children: [
|
|
17391
|
+
props.renderPrice ? props.renderPrice(result) : props.showPrice !== false && result.price !== void 0 && result.price !== null ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-search-bar__result-price text-sm font-semibold text-foreground flex-shrink-0 text-right", children: [
|
|
17386
17392
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-search-bar__result-price-value", children: formatItemPrice(leadingPrice(result)) }),
|
|
17387
17393
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-search-bar__result-price-label block text-xs font-normal text-muted-foreground", children: priceTaxLabel() })
|
|
17388
17394
|
] }) : null
|