@praxisui/list 9.0.8 → 9.0.10
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/README.md +14 -23
- package/ai/component-registry.json +2 -2
- package/docs/2026-08-collection-toolbar-runtime-note.md +22 -0
- package/fesm2022/praxisui-list.mjs +189 -67
- package/package.json +6 -6
- package/src/lib/praxis-list.json-api.md +242 -237
- package/types/praxisui-list.d.ts +31 -1
package/README.md
CHANGED
|
@@ -29,41 +29,31 @@ Runtime dependency included by the package:
|
|
|
29
29
|
## Minimal Local List
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
|
-
import { Component } from
|
|
33
|
-
import { PraxisList, type PraxisListConfig } from
|
|
32
|
+
import { Component } from "@angular/core";
|
|
33
|
+
import { PraxisList, type PraxisListConfig } from "@praxisui/list";
|
|
34
34
|
|
|
35
35
|
@Component({
|
|
36
|
-
selector:
|
|
36
|
+
selector: "app-products-list",
|
|
37
37
|
standalone: true,
|
|
38
38
|
imports: [PraxisList],
|
|
39
|
-
template: `
|
|
40
|
-
<praxis-list
|
|
41
|
-
listId="products-list"
|
|
42
|
-
[config]="config"
|
|
43
|
-
(itemClick)="onItem($event)"
|
|
44
|
-
(actionClick)="onAction($event)"
|
|
45
|
-
(selectionChange)="onSelection($event)"
|
|
46
|
-
/>
|
|
47
|
-
`,
|
|
39
|
+
template: ` <praxis-list listId="products-list" [config]="config" (itemClick)="onItem($event)" (actionClick)="onAction($event)" (selectionChange)="onSelection($event)" /> `,
|
|
48
40
|
})
|
|
49
41
|
export class ProductsListComponent {
|
|
50
42
|
readonly config: PraxisListConfig = {
|
|
51
|
-
id:
|
|
43
|
+
id: "products-list",
|
|
52
44
|
dataSource: {
|
|
53
45
|
data: [
|
|
54
|
-
{ id: 1, name:
|
|
55
|
-
{ id: 2, name:
|
|
46
|
+
{ id: 1, name: "Phone", price: 699 },
|
|
47
|
+
{ id: 2, name: "Laptop", price: 1499 },
|
|
56
48
|
],
|
|
57
49
|
},
|
|
58
|
-
layout: { variant:
|
|
59
|
-
selection: { mode:
|
|
50
|
+
layout: { variant: "list", lines: 2, dividers: "between" },
|
|
51
|
+
selection: { mode: "single", return: "item", compareBy: "id" },
|
|
60
52
|
templating: {
|
|
61
|
-
primary: { type:
|
|
62
|
-
secondary: { type:
|
|
53
|
+
primary: { type: "text", expr: "${item.name}" },
|
|
54
|
+
secondary: { type: "currency", expr: "${item.price}|USD" },
|
|
63
55
|
},
|
|
64
|
-
actions: [
|
|
65
|
-
{ id: 'details', icon: 'open_in_new', label: 'Details' },
|
|
66
|
-
],
|
|
56
|
+
actions: [{ id: "details", icon: "open_in_new", label: "Details" }],
|
|
67
57
|
};
|
|
68
58
|
|
|
69
59
|
onItem(event: unknown): void {}
|
|
@@ -94,7 +84,7 @@ Data mode resolution is deterministic:
|
|
|
94
84
|
- `dataSource.resourcePath` uses remote mode when no local data is present.
|
|
95
85
|
- no local data and no resource path renders the empty state.
|
|
96
86
|
|
|
97
|
-
|
|
87
|
+
In remote mode, search, sort and export share a collection toolbar above the items; pagination remains attached to the collection footer. A configured `resourcePath` does not activate remote controls when local `data` is also present. The runtime uses `/filter` through `GenericCrudService.filter(query, pageable)`. Synchronous changes projected from one `queryContext` are coalesced into a single request. If that endpoint fails with an empty query, the compatibility path may fall back to `getAll()`. With active criteria, the list fails closed, preserves the filter context and exposes a read-only, retryable error stream instead of displaying unfiltered records.
|
|
98
88
|
|
|
99
89
|
## Main Inputs And Outputs
|
|
100
90
|
|
|
@@ -112,6 +102,7 @@ Remote controls are rendered when `resourcePath` is present. The runtime uses `/
|
|
|
112
102
|
- Layout variants: `list`, `cards`, `tiles`.
|
|
113
103
|
- Runtime-active layout fields include `lines`, `dividers`, `groupBy`, `pageSize`, `density` and `model`.
|
|
114
104
|
- Templating slots include `leading`, `primary`, `secondary`, `meta`, `trailing`, `features`, `sectionHeader` and `emptyState`.
|
|
105
|
+
- In `layout.rowLayout`, canonical semantic slots keep the configured desktop grid and reflow into ordered, non-overlapping rows at narrow viewports; extended operational slots stack without requiring host CSS.
|
|
115
106
|
- Template expressions use `${item.field}`. Currency/date/number templates can use config i18n defaults.
|
|
116
107
|
- Selection supports `none`, `single` and `multiple`, with return modes `value`, `item` or `id`.
|
|
117
108
|
- Item actions can emit local events or delegate to `GlobalActionService`; collection export uses the shared `@praxisui/core` contract for `csv`, `json`, `excel`, `pdf` and `print`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-21T13:43:24.944Z",
|
|
4
4
|
"packageName": "@praxisui/list",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.10",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Collection toolbar and remote runtime — August 2026
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
This beta migration aligns the collection toolbar with the canonical data-mode precedence and makes governed query projection atomic.
|
|
6
|
+
|
|
7
|
+
## Runtime decisions
|
|
8
|
+
|
|
9
|
+
- Local `data` remains authoritative when `data` and `resourcePath` coexist.
|
|
10
|
+
- Search, sort and pagination are rendered only for the resolved remote mode.
|
|
11
|
+
- The active sort is reflected by the Material select. When an authored initial sort is missing from `sortOptions`, the runtime exposes its canonical value instead of showing a false placeholder.
|
|
12
|
+
- Synchronous query, sort and page mutations are coalesced into one remote request.
|
|
13
|
+
- Filtered failures remain fail-closed. `error$` is read-only to consumers and retry continues through `refresh()`.
|
|
14
|
+
- The collection controls use group semantics because the component does not implement the arrow-key navigation required by an ARIA toolbar.
|
|
15
|
+
|
|
16
|
+
## Responsive behavior
|
|
17
|
+
|
|
18
|
+
Search, sort and export share the upper collection surface. At narrow widths, sort occupies a full row and command controls wrap without overflowing the collection. Pagination remains a separate footer responsibility.
|
|
19
|
+
|
|
20
|
+
## Migration note
|
|
21
|
+
|
|
22
|
+
Consumers that previously called `ListDataService.error$.next(...)` must stop mutating internal runtime state. Subscribe to `error$` and invoke `refresh()` for user-initiated recovery.
|