@propeller-commerce/propeller-v2-react-ui 0.4.29 → 0.6.1

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,72 @@ 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.1] - 2026-07-23
12
+
13
+ ### Fixed
14
+
15
+ - **Login viewer inputs** — `LoginForm` now forwards the resolved `configuration`
16
+ (from `<PropellerDepsProvider>` via `useInfraProps`) into `useAuth`, so the
17
+ login `getViewer` requests the configured track attributes and pagination
18
+ inputs — `companyTrackAttributes` (→ `MY_INSTALLATIONS`),
19
+ `customerTrackAttributes`, `contactPAConfigInput`, and the newly-forwarded
20
+ `contactCompaniesSearchInput`. Previously the header login returned a viewer
21
+ with no companies/attributes until a later `refreshUser`. `useAuth` also now
22
+ guards `contactPAConfigInput` with `isViewerSearchInput` (a non-array object)
23
+ so a misconfigured empty array `[]` is omitted rather than 400-ing the viewer.
24
+
25
+ ## [0.6.0] - 2026-07-21
26
+
27
+ ### Added
28
+
29
+ - `MachineGrid` — the spare-parts machine tree as one self-contained grid, the
30
+ sibling of `ProductGrid`. Driven by the current URL path (`segments` prop), it
31
+ renders two modes: **root** (empty segments → the company's installations via
32
+ `useMachines`, as `MachineCard`s) and **node** (a machine by its leaf slug via
33
+ `useSpareParts` → child `MachineCard`s above a category-style parts listing —
34
+ facets, toolbar, a permanently-controlled `ProductGrid`, pagination, and the
35
+ qty-in-machine `belowName`). Resolves infra via `useInfraProps`. Navigation
36
+ between levels is via `MachineCard`'s `href` (built from `basePath` + segments);
37
+ the package owns no router. The parts listing is **controlled**: current state
38
+ in via `listing`, every interaction out via `onListingChange`, so the host maps
39
+ it to the URL (shareable/refreshable) — the same contract `ProductGrid` uses.
40
+ - `useMachines` — resolves a company's installations in ONE concatenated request
41
+ by aliasing `machine(source:, sourceId:)` per id (`buildRootMachinesQuery`,
42
+ also exported), mirroring the WP reference's `installations()` mega-query. Same
43
+ idle discipline and race guards as `useSpareParts`.
44
+ - `MachineListingState` — the controlled listing shape `MachineGrid` accepts
45
+ (page / offset / sort / attribute-filters / price / term), primitives + SDK
46
+ enums only.
47
+
48
+ ## [0.5.0] - 2026-07-17
49
+
50
+ ### Added
51
+
52
+ - `MachineCard` — a node in the spare-parts machine tree, rendered as a card
53
+ that navigates one level deeper. Takes an explicit `href` rather than deriving
54
+ one from `configuration.urls`: a machine's URL is its ancestor path
55
+ (`/machines/a/b/c`), which only the host route knows.
56
+ - `useSpareParts` — the machine-tree sibling of `useProductSearch`, sourced from
57
+ `machine(slug:).sparePartProducts`. Same contract: options in, state + actions
58
+ out, `parts?` controlled sentinel (`!== undefined`, so `[]` is
59
+ controlled-empty), per-instance race guard plus module-level in-flight dedup
60
+ for Strict Mode. Returns the node's `childMachines` alongside its parts so a
61
+ host can render both in one grid.
62
+
63
+ Drops two things `useProductSearch` carries: the debounced search-bar path
64
+ (searching within a machine is server-side and scoped to the node, so it is
65
+ just the `term` option) and the language post-filter.
66
+
67
+ Requires `@propeller-commerce/propeller-sdk-v2` >= 0.13.0 — earlier versions'
68
+ `machine` query cannot filter/sort/page its spare parts.
69
+
70
+ ### Notes
71
+
72
+ - Machine data reaches the SDK via `machineService(client)` directly, not
73
+ `createServices(client).machine` — the core-ui `Services` bundle has no machine
74
+ entry. Same seam `useProductSearch` already uses (it builds services from the
75
+ passed client rather than reading `useServices()`).
76
+
11
77
  ## [0.4.29] - 2026-07-21
12
78
 
13
79
  ### Fixed