feat(12.1-01): declared bulk actions on admin lists

- pact.HasAdminBulkActions with AdminBulkAction, its input and result
- config_list.yaml bulkActions, compiled fail-loud, needs showCheckboxes
- POST .../{controller}/bulk/{action}: ids resolved and locked through the
  list scope in one transaction; partial selection is 409
- list schema offers declared actions per principal, with confirm text
- admin SPA bulk actions menu with confirm, busy state and failure toasts
- acme.roster fixture, tracer test, OpenAPI, TS types, dist, READMEs, docs
This commit is contained in:
Jakub Zych
2026-10-04 23:28:30 +02:00
parent ca9e9c0557
commit a879d6388c
45 changed files with 2007 additions and 38 deletions

View File

@@ -0,0 +1,41 @@
{
"data": {
"title": "People",
"recordsPerPage": 20,
"perPageOptions": [],
"showSearch": true,
"showSetup": false,
"showCheckboxes": true,
"showSorting": true,
"searchTerm": "search",
"recordUrl": "acme/roster/people/update/:id",
"toolbarButtons": ["create", "delete"],
"toolbarActions": [],
"assets": { "scripts": [], "styles": [] },
"columns": [
{ "key": "name", "label": "Name", "searchable": true, "sortable": true },
{ "key": "email", "label": "Email", "searchable": true, "sortable": true }
],
"filters": [],
"rowActions": [],
"bulkActions": [
{ "name": "delete", "label": "Delete selected" },
{ "name": "activate", "label": "Activate", "confirm": "Activate the selected people?" },
{ "name": "archive", "label": "Archive" }
],
"messages": {
"create": { "other": "New person" },
"deleteConfirm": { "other": "Delete the selected (:count)?" },
"deleteSelected": { "other": "Delete selected" },
"deleted": { "one": "Deleted :count record", "other": "Deleted :count records" },
"empty": { "other": "There are no records in this view." },
"emptySearch": { "other": "Nothing found" },
"emptySearchHint": { "other": "No record matches “:term”. Try another search." },
"recordCount": { "one": ":count record", "other": ":count records" },
"searchPrompt": { "other": "Search…" },
"selected": { "other": ":count selected" }
},
"meta": { "locale": "en" }
},
"meta": { "locale": "en" }
}