@propeller-commerce/propeller-v2-react-ui 0.4.28 → 0.6.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 CHANGED
@@ -8,6 +8,71 @@ 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.6.0] - 2026-07-21
12
+
13
+ ### Added
14
+
15
+ - `MachineGrid` — the spare-parts machine tree as one self-contained grid, the
16
+ sibling of `ProductGrid`. Driven by the current URL path (`segments` prop), it
17
+ renders two modes: **root** (empty segments → the company's installations via
18
+ `useMachines`, as `MachineCard`s) and **node** (a machine by its leaf slug via
19
+ `useSpareParts` → child `MachineCard`s above a category-style parts listing —
20
+ facets, toolbar, a permanently-controlled `ProductGrid`, pagination, and the
21
+ qty-in-machine `belowName`). Resolves infra via `useInfraProps`. Navigation
22
+ between levels is via `MachineCard`'s `href` (built from `basePath` + segments);
23
+ the package owns no router. The parts listing is **controlled**: current state
24
+ in via `listing`, every interaction out via `onListingChange`, so the host maps
25
+ it to the URL (shareable/refreshable) — the same contract `ProductGrid` uses.
26
+ - `useMachines` — resolves a company's installations in ONE concatenated request
27
+ by aliasing `machine(source:, sourceId:)` per id (`buildRootMachinesQuery`,
28
+ also exported), mirroring the WP reference's `installations()` mega-query. Same
29
+ idle discipline and race guards as `useSpareParts`.
30
+ - `MachineListingState` — the controlled listing shape `MachineGrid` accepts
31
+ (page / offset / sort / attribute-filters / price / term), primitives + SDK
32
+ enums only.
33
+
34
+ ## [0.5.0] - 2026-07-17
35
+
36
+ ### Added
37
+
38
+ - `MachineCard` — a node in the spare-parts machine tree, rendered as a card
39
+ that navigates one level deeper. Takes an explicit `href` rather than deriving
40
+ one from `configuration.urls`: a machine's URL is its ancestor path
41
+ (`/machines/a/b/c`), which only the host route knows.
42
+ - `useSpareParts` — the machine-tree sibling of `useProductSearch`, sourced from
43
+ `machine(slug:).sparePartProducts`. Same contract: options in, state + actions
44
+ out, `parts?` controlled sentinel (`!== undefined`, so `[]` is
45
+ controlled-empty), per-instance race guard plus module-level in-flight dedup
46
+ for Strict Mode. Returns the node's `childMachines` alongside its parts so a
47
+ host can render both in one grid.
48
+
49
+ Drops two things `useProductSearch` carries: the debounced search-bar path
50
+ (searching within a machine is server-side and scoped to the node, so it is
51
+ just the `term` option) and the language post-filter.
52
+
53
+ Requires `@propeller-commerce/propeller-sdk-v2` >= 0.13.0 — earlier versions'
54
+ `machine` query cannot filter/sort/page its spare parts.
55
+
56
+ ### Notes
57
+
58
+ - Machine data reaches the SDK via `machineService(client)` directly, not
59
+ `createServices(client).machine` — the core-ui `Services` bundle has no machine
60
+ entry. Same seam `useProductSearch` already uses (it builds services from the
61
+ passed client rather than reading `useServices()`).
62
+
63
+ ## [0.4.29] - 2026-07-21
64
+
65
+ ### Fixed
66
+
67
+ - **`SearchBar` autosuggest now filters results by the active language.**
68
+ Follow-up to 0.4.28's category-search routing: the backend search matches
69
+ across all languages, so FR/ES-only products leaked into an EN preview. The
70
+ autosuggest now drops results with no name in the active language (and
71
+ adjusts the "View all (N)" total by the dropped count), and the result row
72
+ displays the name in the active language (falling back to the first
73
+ available) instead of always the first name in the array. Restores the
74
+ behaviour of the pre-package local search bar.
75
+
11
76
  ## [0.4.28] - 2026-07-21
12
77
 
13
78
  ### Fixed