@propeller-commerce/propeller-v2-react-ui 0.15.8 → 0.15.9
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 +20 -0
- package/dist/index.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,26 @@ 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.15.9] - 2026-08-11
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **The product specifications table emptied out in a language the catalogue is
|
|
16
|
+
only partly translated into** (PWP-928). A localized list carries only the
|
|
17
|
+
languages someone authored, so asking for one nobody wrote returns nothing —
|
|
18
|
+
it does not fall back. `ProductSpecifications` matched strictly on
|
|
19
|
+
`language === props.language`, which failed twice over: the label fell through
|
|
20
|
+
to `attributeDescription.name` and printed the raw PIM code
|
|
21
|
+
(`QUANTORE_70001706`) at the user, and the value resolved to `''` — and since
|
|
22
|
+
`getAttributes()` drops rows with an empty value, the row disappeared
|
|
23
|
+
entirely. On a Dutch-only catalogue browsed in English the whole table went
|
|
24
|
+
blank. Both now prefer the active language and fall back to whichever
|
|
25
|
+
translation exists, matching `GridFilters`, `ProductDescription` and the menu.
|
|
26
|
+
Empty localized rows the backend really does return
|
|
27
|
+
(`{ language: 'FR', values: [] }`) are skipped rather than winning the
|
|
28
|
+
fallback. Language matching is now case-insensitive: with `language="en"` the
|
|
29
|
+
component previously rendered nothing at all.
|
|
30
|
+
|
|
11
31
|
## [0.15.8] - 2026-08-11
|
|
12
32
|
|
|
13
33
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -16489,19 +16489,27 @@ function ProductSpecifications(rawProps) {
|
|
|
16489
16489
|
(a) => (a.attributeDescription?.group || "") === group
|
|
16490
16490
|
);
|
|
16491
16491
|
}
|
|
16492
|
+
function pickLocalized(rows, isUsable) {
|
|
16493
|
+
const list = (rows || []).filter(isUsable);
|
|
16494
|
+
const lang = (props.language || "NL").toUpperCase();
|
|
16495
|
+
return list.find((row) => (row.language || "").toUpperCase() === lang) || list[0];
|
|
16496
|
+
}
|
|
16492
16497
|
function getAttributeLabel(attr) {
|
|
16493
|
-
const
|
|
16494
|
-
|
|
16495
|
-
|
|
16498
|
+
const match = pickLocalized(
|
|
16499
|
+
attr.attributeDescription?.descriptions,
|
|
16500
|
+
(d) => !!d.value
|
|
16501
|
+
);
|
|
16496
16502
|
return match?.value || attr.attributeDescription?.name || "";
|
|
16497
16503
|
}
|
|
16498
16504
|
function getAttributeValue(attr) {
|
|
16499
16505
|
const v = attr.value;
|
|
16500
16506
|
if (!v) return "";
|
|
16501
|
-
const lang = props.language || "NL";
|
|
16502
16507
|
if (v.type === propellerSdkV2.AttributeType.TEXT) {
|
|
16503
16508
|
const tv = v;
|
|
16504
|
-
const entry =
|
|
16509
|
+
const entry = pickLocalized(
|
|
16510
|
+
tv.textValues,
|
|
16511
|
+
(row) => (row?.values || []).some(Boolean)
|
|
16512
|
+
);
|
|
16505
16513
|
const vals = (entry?.values || []).filter(Boolean);
|
|
16506
16514
|
return vals.join(", ");
|
|
16507
16515
|
}
|