@design.estate/dees-catalog 21.46.1 → 21.48.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.
Files changed (71) hide show
  1. package/dist_bundle/bundle.js +812 -249
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FCUX4QGD.js → chunk-Q5VY4AV7.js} +3 -3
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-LWT7IIPZ.js → chunk-QG5BHDQO.js} +2 -2
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-VJVZHESI.js → chunk-UPDBEHU2.js} +16 -3
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-VJVZHESI.js.map → chunk-UPDBEHU2.js.map} +1 -1
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-7PGZC4IF.js → de-E2CUVVOP.js} +16 -3
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-E2CUVVOP.js.map +1 -0
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-VOIWY235.js → dees-modal-YOGT7PSU.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-EJRHSZ5F.js → dees-workspace-terminal-ORLONA36.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-dataview/dees-thread/dees-thread.d.ts +9 -1
  13. package/dist_ts_web/elements/00group-dataview/dees-thread/dees-thread.js +42 -5
  14. package/dist_ts_web/elements/00group-dataview/dees-thread/interfaces.d.ts +11 -0
  15. package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.d.ts +13 -4
  16. package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.demo.js +17 -2
  17. package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.js +10 -2
  18. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.d.ts +30 -8
  19. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.js +95 -24
  20. package/dist_ts_web/elements/00group-harness/interfaces.d.ts +14 -3
  21. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +17 -5
  22. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.js +6 -2
  23. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +76 -20
  24. package/dist_ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.js +3 -1
  25. package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.d.ts +3 -1
  26. package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.js +17 -3
  27. package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.d.ts +3 -1
  28. package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.js +12 -2
  29. package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.d.ts +41 -5
  30. package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.js +196 -20
  31. package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.d.ts +25 -2
  32. package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +137 -8
  33. package/dist_ts_web/elements/00group-kanban/index.d.ts +1 -0
  34. package/dist_ts_web/elements/00group-kanban/index.js +2 -1
  35. package/dist_ts_web/elements/00group-kanban/interfaces.d.ts +96 -3
  36. package/dist_ts_web/elements/00group-kanban/kanban.demodata.js +119 -3
  37. package/dist_ts_web/elements/00group-kanban/kanban.helpers.d.ts +19 -1
  38. package/dist_ts_web/elements/00group-kanban/kanban.helpers.js +50 -1
  39. package/dist_ts_web/elements/00group-kanban/kanban.styles.js +32 -1
  40. package/dist_ts_web/i18n/de.d.ts +53 -1
  41. package/dist_ts_web/i18n/de.js +15 -2
  42. package/dist_ts_web/i18n/messages.d.ts +53 -1
  43. package/dist_ts_web/i18n/messages.js +15 -2
  44. package/package.json +1 -1
  45. package/readme.md +67 -21
  46. package/ts_web/00_commitinfo_data.ts +1 -1
  47. package/ts_web/elements/00group-dataview/dees-thread/dees-thread.ts +39 -4
  48. package/ts_web/elements/00group-dataview/dees-thread/interfaces.ts +11 -0
  49. package/ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.demo.ts +16 -1
  50. package/ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.ts +20 -5
  51. package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts +83 -21
  52. package/ts_web/elements/00group-harness/interfaces.ts +14 -3
  53. package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.ts +5 -1
  54. package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +82 -23
  55. package/ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.ts +2 -0
  56. package/ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.ts +11 -2
  57. package/ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts +6 -1
  58. package/ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.ts +199 -21
  59. package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +144 -6
  60. package/ts_web/elements/00group-kanban/index.ts +1 -0
  61. package/ts_web/elements/00group-kanban/interfaces.ts +101 -4
  62. package/ts_web/elements/00group-kanban/kanban.demodata.ts +126 -2
  63. package/ts_web/elements/00group-kanban/kanban.helpers.ts +70 -0
  64. package/ts_web/elements/00group-kanban/kanban.styles.ts +31 -0
  65. package/ts_web/i18n/de.ts +14 -1
  66. package/ts_web/i18n/messages.ts +14 -1
  67. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-7PGZC4IF.js.map +0 -1
  68. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FCUX4QGD.js.map → chunk-Q5VY4AV7.js.map} +0 -0
  69. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-LWT7IIPZ.js.map → chunk-QG5BHDQO.js.map} +0 -0
  70. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-VOIWY235.js.map → dees-modal-YOGT7PSU.js.map} +0 -0
  71. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-EJRHSZ5F.js.map → dees-workspace-terminal-ORLONA36.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "21.46.1",
3
+ "version": "21.48.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
package/readme.md CHANGED
@@ -1227,7 +1227,7 @@ const statuses: IStatusbuttonItem[] = [
1227
1227
  and unique within the button), `severity` (`TStatusbuttonSeverity`: `'success'`,
1228
1228
  `'info'`, `'warning'` or `'error'`, `dees-hint`'s types), `severe?` (a warning that
1229
1229
  must be seen), `text` (one short sentence), `detail?` (a second line) and
1230
- `action?` (`IStatusbuttonAction`: `label`, `iconName?`, `disabled?`, `action`) and
1230
+ `action?` (`IStatusbuttonAction`: `label`, `iconName?`, `disabled?`, `closesPanel?`, `action`) and
1231
1231
  `group?` (the key of the group whose section lists it).
1232
1232
  - The button is an outline `dees-button` like the page's secondary actions. Its glyph
1233
1233
  and colour are the worst severity's (the all-good check while there are only
@@ -1294,14 +1294,21 @@ const statuses: IStatusbuttonItem[] = [
1294
1294
  - Each `action` is awaited with its button pending meanwhile and refuses a second
1295
1295
  press; a rejection is reported as `dees-action-error` (`source:
1296
1296
  'statusbutton-action'`). A status the action resolves usually leaves the list: the
1297
- focus then stays in the panel, on its heading.
1297
+ focus then stays in the panel, on its heading. An action that takes the reader on
1298
+ instead, into a flow it opens in the page, sets `closesPanel`: its press closes the
1299
+ panel and gives the focus to the status button before the action runs.
1300
+
1301
+ ```typescript
1302
+ { key: 'unmatched', severity: 'warning', text: '1 payment is not matched to an invoice.',
1303
+ action: { label: 'Match payment', iconName: 'lucide:Link', closesPanel: true, action: () => openMatching() } }
1304
+ ```
1298
1305
  - Without statuses the button shows the all-good state, so the header's actions keep
1299
1306
  their places; `hide-empty` (reflected, `hideEmpty`) removes it from the layout
1300
1307
  instead.
1301
1308
  - `open` (reflected) is the panel's state; set from code, it opens without moving the
1302
1309
  focus, and while the button is off screen it stays closed. Every opening and closing is reported as the bubbling, composed
1303
1310
  `panel-toggle` (`IStatusbuttonToggleDetail`: `{ open, reason }`, reason `'button'`,
1304
- `'auto'`, `'host'`, `'escape'`, `'outside'`, `'tab'` or `'anchor-hidden'`). An open panel
1311
+ `'auto'`, `'host'`, `'action'` (a `closesPanel` action), `'escape'`, `'outside'`, `'tab'` or `'anchor-hidden'`). An open panel
1305
1312
  closes when the element leaves the page; that closing (`'host'`) reaches only listeners on the
1306
1313
  element itself, which is no longer in the page.
1307
1314
  - The panel eases in from the button, and appears at once under
@@ -3903,7 +3910,11 @@ in a new tab; one without, or with an unsafe one, is a button that reports
3903
3910
  `thread-attachment-open` with the entry and the attachment, for a host that opens its files
3904
3911
  itself. `delivery: 'pending'` marks an entry being posted or an
3905
3912
  agent still writing; `'refused'` shows `deliveryError` with Retry and Discard
3906
- (`thread-retry`, `thread-discard`).
3913
+ (`thread-retry`, `thread-discard`). An entry with a `slot` shows the thread's child of
3914
+ that slot name in place of its body, such as a question card the reader answers there;
3915
+ `body` stands in while no child has it. An entry with `attention` waits for the reader:
3916
+ its tile is outlined in the warning colour with that badge ("Open question") in its
3917
+ header, and it never folds into a long thread's hidden middle.
3907
3918
 
3908
3919
  An `IThreadEvent` is one line: `opened`, `answered`, `reopened`, `closed`, `assigned`,
3909
3920
  `unassigned`, `labelled`, `unlabelled`, `linked`, `referenced` or `renamed`, by an
@@ -3939,7 +3950,9 @@ writes, and shows while the thread is loading too.
3939
3950
  items a thread has; a thread without items says it is loading, empty or failed, and
3940
3951
  offers its composer only once it has loaded. `error` offers Try again
3941
3952
  (`thread-reload`). A thread with more than `collapseAfter` items (30) collapses its
3942
- middle until the reader loads it. Every event carries `threadId`.
3953
+ middle until the reader loads it; `revealEntry(id)` shows the middle down to an entry that
3954
+ lies in it and scrolls the entry into view, `false` for an entry the thread does not have. Every event
3955
+ carries `threadId`.
3943
3956
 
3944
3957
  ### Media & Thumbnail Components 🎬
3945
3958
 
@@ -5422,17 +5435,19 @@ document.body.append(board);
5422
5435
  Set `.provider` to an `IKanbanProvider` backed by the application's authorized
5423
5436
  API. Omitted mutation callbacks make those actions read-only. The catalog does
5424
5437
  not store application data or implement authorization. Ticket `permissions`
5425
- can disable individual edit, move, comment and create-child actions; the server
5426
- must enforce the same permissions.
5438
+ can disable individual edit, move, comment, create-child, ask and answer actions;
5439
+ the server must enforce the same permissions.
5427
5440
 
5428
5441
  | Provider callback | Input | Result |
5429
5442
  | --- | --- | --- |
5430
5443
  | `getTicket` | `(id, signal)` | Full `IKanbanTicket`, including tickets outside the current board |
5431
5444
  | `searchTickets` | `(query, signal)` | Tickets matching key or title; omitted uses the supplied board tickets |
5432
- | `loadComments` | `(ticketId, signal)` | `IKanbanComment[]` for that ticket |
5445
+ | `loadComments` | `(ticketId, signal)` | The ticket's discussion: `IKanbanComment` and `IKanbanQuestion` items (`TKanbanDiscussionItem[]`) |
5433
5446
  | `loadActivity` | `(ticketId, signal)` | `IKanbanActivity[]`, oldest first; omitted shows no history |
5434
5447
  | `loadBoard` | `(signal)` | `IKanbanBoardSnapshot` (`tickets`, optional `columns` and `revision`) for `refresh()` |
5435
5448
  | `addComment` | `{ ticketId, body }` | Saved `IKanbanComment` with stable ID, author and ISO timestamp |
5449
+ | `askQuestion` | `{ ticketId, question }` | Saved `IKanbanQuestion`; the composer's Markdown asked as a question, answered in words |
5450
+ | `answerQuestion` | `IKanbanQuestionAnswerInput` (`ticketId`, `questionId`, `choices`, `text?`) | The `IKanbanQuestion` with its `answer` |
5436
5451
  | `updateTicket` | `{ ticketId, changes, expectedRevision? }` | Saved `IKanbanTicket`; nullable assignee/parent clears that field; a stale `expectedRevision` rejects with an `IKanbanRevisionConflict` |
5437
5452
  | `moveTicket` | `{ ticketId, columnId, beforeTicketId? }` | All `IKanbanTicket` records whose order/column changed |
5438
5453
  | `createTicket` | `{ kind, title, columnId, parentId?, project? }` | Created `IKanbanTicket` |
@@ -5477,10 +5492,10 @@ the project and the labels and sends them in `updateTicket` changes.
5477
5492
 
5478
5493
  The filters follow the catalog's filter standard, as `dees-table` does: the
5479
5494
  search field's filter button counts the active filters and opens Project, Epic,
5480
- Assignee, Label and "Assigned to me" in a speech bubble with Clear filters in its
5495
+ Assignee, Label, Auto label and "Assigned to me" in a speech bubble with Clear filters in its
5481
5496
  action footer, and the active-filter bar below the header shows each filter and
5482
5497
  the search as a removable chip with Clear all. `.filterValues` (`IKanbanFilterValues`: `text`, `project`, `epic`,
5483
- `assignee` with `'none'` for unassigned, `label`, `mine`) starts the board
5498
+ `assignee` with `'none'` for unassigned, `label`, `autoLabel`, `mine`) starts the board
5484
5499
  filtered; the reader's changes emit `kanban-filter-change`. "Assigned to me"
5485
5500
  appears when `.currentPersonId` is set, and that person in `.people` heads the
5486
5501
  comment composer with their avatar. `clearFilters()` clears them.
@@ -5493,6 +5508,28 @@ ticket was written from, with their author, time and attachments. `createdAt`,
5493
5508
  With `loadActivity`, the detail switches between the discussion and the history
5494
5509
  of changes; comments stay in the discussion.
5495
5510
 
5511
+ A ticket's questions (`IKanbanQuestion`: `question` in Markdown, `options` with ids,
5512
+ `multiSelect`, `allowCustom`, and once answered `answer` with `choices`, `text`,
5513
+ `answeredBy` and `answeredAt`) come with its comments from `loadComments`, told apart
5514
+ by `kind: 'question'`, and stand in the discussion as
5515
+ [question cards](#deesharnessquestioncard) in order of time. An unanswered one is
5516
+ outlined with an "Open question" badge and never folds away, and a hint at the top
5517
+ of the ticket counts the waiting questions and takes the reader to the oldest. With
5518
+ `answerQuestion` and the ticket's `answer` permission the reader answers in place, by
5519
+ the options, in their own words, or both; otherwise the card shows the question
5520
+ read-only. A rejected answer shows its message on the card, which waits again with the
5521
+ answer kept, as a host does that refuses a second answer. With `askQuestion` and the
5522
+ `ask` permission the composer offers "Ask as question" beside Comment.
5523
+
5524
+ `autoLabels` on a ticket are labels the host sets from the ticket's state, such as
5525
+ `openQuestion` (`kanbanOpenQuestionLabel`) while a question waits. They show as
5526
+ read-only chips with an icon beside the labels, in the detail and on the card, never
5527
+ edited or removed, and the Auto label filter and the search find them. Name them with
5528
+ `.autoLabelDefinitions` (`IKanbanAutoLabel`: `label`, `name`, `description` for the
5529
+ tooltip, a Lucide `iconName`, `tone` `'neutral'` or `'warning'`); the board knows
5530
+ `openQuestion` as "Open question". The host sends the ticket again when its
5531
+ AutoLabels change, as for any other change.
5532
+
5496
5533
  Hierarchy is independent of workflow: tasks optionally belong to epics, and
5497
5534
  subtasks belong to tasks. Each ticket has its own `columnId`; moving a parent
5498
5535
  does not move its children. Column array order controls board order, and `done`
@@ -5517,8 +5554,9 @@ Public methods and events:
5517
5554
  - `openTicket(id)` opens a ticket. Linked-ticket navigation has Back history and
5518
5555
  preserves comment and field drafts per ticket for the board instance's lifetime.
5519
5556
  - `moveTicket(input)` invokes the same permission-aware move path as the UI.
5520
- - `refreshComments(ticketId?)` reloads discussion; `setComments(ticketId, comments)`
5521
- accepts authoritative realtime snapshots without introducing transport coupling.
5557
+ - `refreshComments(ticketId?)` reloads discussion; `setComments(ticketId, items)`
5558
+ accepts authoritative realtime snapshots of comments and questions without
5559
+ introducing transport coupling.
5522
5560
  `refreshActivity(ticketId?)` reloads the history.
5523
5561
  - `refresh()` is the live update: it loads the board through `loadBoard` and
5524
5562
  shows it in place. The open ticket keeps its unsaved changes and comment
@@ -5530,6 +5568,10 @@ Public methods and events:
5530
5568
  into the host's state.
5531
5569
  - `kanban-ticket-opened`: `detail.ticketId` identifies the selected ticket.
5532
5570
  - `kanban-comment-saved`: `detail.comment` contains the saved comment.
5571
+ - `kanban-question-asked`: `detail.question` is the question `askQuestion` saved.
5572
+ - `kanban-question-answer`: the reader's answer, after `answerQuestion` saved it:
5573
+ `ticketId`, `questionId`, `choices`, `text` and the saved `question`. A refused
5574
+ answer emits nothing; its message shows on the card.
5533
5575
  - `kanban-error`: `detail.error` and `detail.message` report failed operations.
5534
5576
  - `kanban-filter-change`: `detail.filterValues` holds the reader's filters.
5535
5577
 
@@ -5548,8 +5590,8 @@ Use it through `dees-kanban` for provider handling and board-local drag ownershi
5548
5590
  #### DeesKanbanCard
5549
5591
 
5550
5592
  `dees-kanban-card` accepts `.ticket`, `.epic`, `.subtasks`, `.columns`, `.movable`,
5551
- `.pending` and `.projectName`. It displays priority, assignee, labels, its project
5552
- and completion counts.
5593
+ `.pending`, `.projectName` and `.autoLabelDefinitions`. It displays priority,
5594
+ assignee, labels and AutoLabels, its project and completion counts.
5553
5595
  `kanban-ticket-open` identifies a requested ticket, and `kanban-move-menu` carries
5554
5596
  the ticket ID and anchor element. Secondary cards remain usable independently.
5555
5597
 
@@ -5559,8 +5601,8 @@ the ticket ID and anchor element. Secondary cards remain usable independently.
5559
5601
  board's modal. It displays the parent, child tickets, description, links, source,
5560
5602
  fields, created and updated stamps, and the discussion beside the history. It
5561
5603
  accepts `.ticket`, `.tickets`, `.columns`, `.people`, `.projects`, `.provider`,
5562
- `.draft`, `.comments`, `.commentDraft`, `.currentPerson`, `.activity`, `.loadingActivity`,
5563
- `.activityError` and `.conflict` (`IKanbanEditConflict`, a save refused as stale).
5604
+ `.draft`, `.comments` (comments and questions), `.commentDraft`, `.currentPerson`,
5605
+ `.autoLabelDefinitions`, `.activity`, `.loadingActivity`, `.activityError` and `.conflict` (`IKanbanEditConflict`, a save refused as stale).
5564
5606
  It emits `kanban-ticket-save` and `kanban-ticket-draft` intents, and for a
5565
5607
  conflict `kanban-ticket-reload`, `kanban-conflict-apply` and
5566
5608
  `kanban-conflict-dismiss`; `dees-kanban` owns persistence, navigation and draft
@@ -5605,14 +5647,18 @@ its content up with the modal's heading through the [region inset](#region-inset
5605
5647
  [`dees-thread`](#deesthread) with its standard Markdown composer, which links tickets
5606
5648
  at `#` through `.searchTickets` and is headed by `.currentPerson`'s avatar.
5607
5649
  Provide `.ticketId`, `.comments`, `.draft`, `.searchTickets`, `.currentPerson`,
5608
- `.addComment`, `.loading`, `.error` and `.readOnly`. Comment bodies and the draft stay
5650
+ `.addComment`, `.loading`, `.error` and `.readOnly`; `.comments` takes the ticket's
5651
+ questions too, shown as question cards, answered through `.answerQuestion`, and
5652
+ `.askQuestion` offers "Ask as question" in the composer. `revealQuestion(id)` shows a
5653
+ question, unfolding the thread to it where it lies folded away, and focuses its answer. Comment bodies and the draft stay
5609
5654
  `TReferenceContent`, their text parts Markdown, so a comment written before shows as
5610
5655
  Markdown too. `.view` (`'full'`, `'entries'` or `'composer'`) shows the comments or the
5611
5656
  composer alone, as the thread's `view`. `submit()` awaits the save callback; errors
5612
5657
  leave the draft intact. Ctrl/⌘ Enter submits; Enter starts a new paragraph.
5613
5658
  Standalone consumers handle `kanban-comment-draft` (`ticketId`, `body`),
5614
- `kanban-comment-added` (`comment`, `submittedBody`), `kanban-ticket-open` and
5615
- `kanban-comments-refresh`. The assembled board handles these events itself.
5659
+ `kanban-comment-added` (`comment`, `submittedBody`), `kanban-question-added`
5660
+ (`question`, `submittedBody`), `kanban-question-answered` (`question`, `answer`),
5661
+ `kanban-ticket-open` and `kanban-comments-refresh`. The assembled board handles these events itself.
5616
5662
  Set `.showHeader = false` where the host's own header names the discussion.
5617
5663
 
5618
5664
  #### DeesKanbanActivity
@@ -5892,7 +5938,7 @@ Inside the chat, permission cards render **inline with the messages**: pending r
5892
5938
 
5893
5939
  #### `DeesHarnessQuestionCard`
5894
5940
 
5895
- A question the agent asks mid-run: option buttons with descriptions (single-select answers on click; `multiSelect` collects then confirms) plus an optional free-text answer (`allowCustom`, default on — Enter or "Send Answer" submits, combining selections with the text). Emits `harness-question-response` with `{ requestId, answers, request }`. Questions flow through `dees-harness-chat`'s `questions` property and render inline like permissions: pending ones pin to the end of the transcript, and answered ones persist showing the chosen answers once the host sets `response`/`respondedAt`.
5941
+ A question the agent asks mid-run: option buttons with descriptions (single-select answers on click; `multiSelect` collects then confirms) plus an optional free-text answer (`allowCustom`, default on — Enter or "Send Answer" submits, combining selections with the text). Emits `harness-question-response` with `{ requestId, answers, request }`; for a question, `answers` holds the chosen options' labels and then the reader's own words, `optionIds` the chosen options by their `id` (an option without one by its label) and `text` the own words apart, unset when they wrote none. `readOnly` shows a question to a reader who may not answer it, `frameless` drops the card's border, surface and padding where a host's tile holds it, as the Kanban discussion does, and `focusAnswer(options?)` puts the focus on the first option, or on the field where there is none, with the `FocusOptions` it is given (`preventScroll` for a host that scrolls the card into view itself). Questions flow through `dees-harness-chat`'s `questions` property and render inline like permissions: pending ones pin to the end of the transcript, and answered ones persist showing the chosen answers once the host sets `response`/`respondedAt`.
5896
5942
 
5897
5943
  A **proposal** (`kind: 'proposal'`) asks the reader to confirm changes the agent makes only once confirmed. `items` (`IHarnessProposalItem[]`) holds one change or several collected into one decision: each has a stable `id`, says what will happen (`summary`), names the record it acts on (`label`, a link where it has an `href`), shows its fields before and after (`changes`, `{ label, before?, after }`, as on the permission card) and, once carried out, what came of it (`outcome`). Five show and the rest wait behind "Show N more". A record's link emits the cancelable, bubbling and composed `harness-question-link` (`IHarnessQuestionLinkDetail`, `{ requestId, item, request }`) first: cancel it to route the record in the app, otherwise the link is followed. Decline and Confirm stand in a `dees-actionfooter`, Confirm the primary and rightmost; `confirmLabel` and `declineLabel` word them. They answer `['confirm']` or `['decline']` through `harness-question-response`, for the whole card.
5898
5944
 
@@ -5906,7 +5952,7 @@ A change that issued a secret, such as a new API key, carries it as `credential`
5906
5952
 
5907
5953
  A change that needs a value from the reader and from nobody else, such as the password of the mail account it connects, asks for it in `personFields` (`IHarnessQuestionPersonField[]`, `{ id, itemId, label, input: 'text' | 'secret', required?, multiline?, maxLength, hint? }`). Each field stands under its change, empty: the host gives no initial value. A `secret` field, multiline or not, is masked until the reader presses Show and takes `autocomplete="new-password"`, so no browser or password manager fills the reader's own saved login into it; a `text` field takes `autocomplete="off"`. Confirm waits while a required field of an included change is empty or blank, or while any field holds more than its `maxLength` (UTF-16 code units, as `String.length` counts them); a value is never cut, the field says how long it is. A field of a change left out is neither required nor sent. Confirm adds `personValues` (`IHarnessQuestionPersonValue[]`, `{ itemId, fieldId, value }`, the filled fields of the included changes) to the response detail; a decline never carries any, nor do the answer, the request or the view state. They are for the host's own confirmation: keep them out of any session history, log or storage. The card forgets what was entered once it answers, when its request changes to another `id` and when it leaves the page, so a remount never shows a value again.
5908
5954
 
5909
- Where the host cannot carry out a confirmation as sent, such as a password the mail server refused, `rejectQuestionResponse(questionId, rejection?)` on the chat or the message list (`rejectResponse(rejection?)` on the card) asks again. The request must carry no `response`. The card waits once more with the fields empty and the changes the reader left out still left out, says `rejection.message` (by default that nothing was carried out) and shows each of `rejection.fieldErrors` (`{ itemId, fieldId, message }`) at its field until the reader edits it. The view state keeps the refusal (`IHarnessQuestionViewState.rejection`), never a value, so a card the transcript remounts still shows it until the next answer. The list mounts the card where the transcript had scrolled it away and brings it into view. It returns false for an unknown question, for a question that is not a proposal, and for one already answered, expired or failed.
5955
+ Where the host cannot carry out a confirmation as sent, such as a password the mail server refused, `rejectQuestionResponse(questionId, rejection?)` on the chat or the message list (`rejectResponse(rejection?)` on the card) asks again. The request must carry no `response`. The card waits once more with the fields empty and the changes the reader left out still left out, says `rejection.message` (by default that nothing was carried out) and shows each of `rejection.fieldErrors` (`{ itemId, fieldId, message }`) at its field until the reader edits it. The view state keeps the refusal (`IHarnessQuestionViewState.rejection`), never a value, so a card the transcript remounts still shows it until the next answer. The list mounts the card where the transcript had scrolled it away and brings it into view. A question's answer is refused the same way: the card waits again with the options chosen and the own words kept, and says `rejection.message`. It returns false for an unknown question, for one already answered, and for a proposal expired or failed.
5910
5956
 
5911
5957
  What a carried-out change returns to the reader alone, such as a DNS record to add or a webhook's signing key, goes to its card with `showQuestionPersonResults(questionId, results)` on the chat or the message list (`IHarnessQuestionPersonResult[]`, `{ id, itemId, label, value, display: 'text' | 'secret' | 'link' }`), never in the request. Each stands under its change, and one for a change the card does not list after the changes: a `secret` masked with Show and Copy like a credential, a `link` opened on a click only and only for an http or https address (anything else shows as text). The list keeps them outside the view state while the question stays in the transcript; `[]` takes them away, and so does another transcript. On a card of its own, set its `personResults` property; another request `id` clears it.
5912
5958
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '21.46.1',
6
+ version: '21.48.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -123,7 +123,10 @@ const safeHref = (hrefArg?: string): string | undefined => {
123
123
  * as `thread-action`. Its `attachments` follow the body: one with a `url` opens in a new tab, one
124
124
  * without dispatches `thread-attachment-open`. A host posting an entry itself shows it as `delivery: 'pending'` and, once the
125
125
  * server refused it, as `'refused'` with `deliveryError` and Retry and Discard (`thread-retry`,
126
- * `thread-discard`).
126
+ * `thread-discard`). An entry with a `slot` shows the thread's child of that slot name in place of
127
+ * its body, such as a question card; one with `attention` waits for the reader, outlined in the
128
+ * warning colour with that badge, and stays in view when the thread collapses. `revealEntry()`
129
+ * scrolls to an entry, showing it first if it was hidden.
127
130
  *
128
131
  * EVENTS: a compact line between comments — opened, answered, reopened, closed, assigned,
129
132
  * labelled, linked, referenced, renamed — with its actor and its moment. A subject with a
@@ -571,6 +574,10 @@ export class DeesThread extends DeesElement {
571
574
  border-color: var(--dees-color-accent-error);
572
575
  }
573
576
 
577
+ .entryTile.attention::part(outer) {
578
+ border-color: var(--dees-color-accent-warning);
579
+ }
580
+
574
581
  .entryTile.refused::part(content),
575
582
  .composerTile::part(content) {
576
583
  border-bottom-color: transparent;
@@ -838,7 +845,10 @@ export class DeesThread extends DeesElement {
838
845
  && collapsedHead + this.revealed + collapsedTail < items.length;
839
846
  const head = collapsing ? items.slice(0, collapsedHead + this.revealed) : items;
840
847
  const tail = collapsing ? items.slice(items.length - collapsedTail) : [];
841
- const hidden = collapsing ? items.length - head.length - tail.length : 0;
848
+ const middle = collapsing ? items.slice(head.length, items.length - tail.length) : [];
849
+ // An entry that waits for the reader stays in view below the hidden middle's line.
850
+ const waiting = middle.filter((item) => item.type === 'entry' && item.entry.attention);
851
+ const hidden = middle.length - waiting.length;
842
852
  const key = (item: TThreadItem) => `${item.type}:${item.id}`;
843
853
  const renderItem = (list: TThreadItem[]) => (item: TThreadItem, index: number) => {
844
854
  // An event right below another event follows it closely; below the collapsed middle, it does not.
@@ -861,6 +871,7 @@ export class DeesThread extends DeesElement {
861
871
  ? html`<ol class="timeline" aria-label=${this.t('thread.timeline')} aria-busy=${this.loading ? 'true' : 'false'}>
862
872
  ${directives.repeat(head, key, renderItem(head))}
863
873
  ${hidden ? this.renderCollapsed(hidden) : ''}
874
+ ${directives.repeat(waiting, key, renderItem(waiting))}
864
875
  ${directives.repeat(tail, key, renderItem(tail))}
865
876
  </ol>`
866
877
  : ''}
@@ -890,6 +901,28 @@ export class DeesThread extends DeesElement {
890
901
  this.shadowRoot?.querySelector<HTMLElement>('.composerInput')?.focus();
891
902
  }
892
903
 
904
+ /**
905
+ * Scrolls the entry `id` into view, showing the collapsed middle down to it first if it lies
906
+ * there. Resolves `false` for an entry the thread does not have.
907
+ */
908
+ public async revealEntry(id: string): Promise<boolean> {
909
+ if (this.view === 'composer') return false;
910
+ const items = this.items();
911
+ const index = items.findIndex((item) => item.type === 'entry' && item.id === id);
912
+ if (index < 0) return false;
913
+ const target = items[index];
914
+ // Only the hidden middle unfolds: the tail, and an entry that waits for the reader, show as they are.
915
+ const hidden = this.collapseAfter > 0 && items.length > this.collapseAfter
916
+ && index >= collapsedHead + this.revealed && index < items.length - collapsedTail
917
+ && !(target.type === 'entry' && target.entry.attention);
918
+ if (hidden) this.revealed = index + 1 - collapsedHead;
919
+ await this.updateComplete;
920
+ const item = [...(this.shadowRoot?.querySelectorAll<HTMLElement>('li[data-entry-id]') ?? [])]
921
+ .find((element) => element.dataset.entryId === id);
922
+ item?.scrollIntoView({ block: 'nearest', behavior: matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' });
923
+ return item !== undefined;
924
+ }
925
+
893
926
  // --- Items ---
894
927
 
895
928
  private items(): TThreadItem[] {
@@ -916,9 +949,10 @@ export class DeesThread extends DeesElement {
916
949
  const agent = entry.author.kind === 'agent';
917
950
  const refused = entry.delivery === 'refused';
918
951
  const pending = entry.delivery === 'pending';
952
+ const attention = entry.attention && !entry.delivery ? entry.attention : '';
919
953
  return html`<li class="item entry ${first ? 'first' : ''}" data-entry-id=${entry.id}>
920
954
  ${this.renderAvatar(entry.author, 'railAvatar')}
921
- <dees-tile class="entryTile ${refused ? 'refused' : ''} ${pending ? 'pending' : ''}">
955
+ <dees-tile class="entryTile ${refused ? 'refused' : ''} ${pending ? 'pending' : ''} ${attention ? 'attention' : ''}">
922
956
  <div slot="header" class="entryHeader">
923
957
  ${this.renderAvatar(entry.author, 'headerAvatar')}
924
958
  <span class="name">${entry.author.name}</span>
@@ -930,6 +964,7 @@ export class DeesThread extends DeesElement {
930
964
  ${this.renderEntryState(entry)}
931
965
  ${entry.editedAt && !entry.delivery ? this.renderEdited(entry.editedAt) : ''}
932
966
  <span class="spacer"></span>
967
+ ${attention ? html`<dees-badge class="attentionBadge" type="warning" size="compact" .text=${attention}></dees-badge>` : ''}
933
968
  ${entry.actions?.length && !entry.delivery
934
969
  ? html`<dees-button class="menuButton" size="icon" type="ghost" icon="lucide:Ellipsis"
935
970
  text=${this.t('thread.entryMenu')} title=${this.t('thread.entryMenu')} .ariaHasPopup=${'menu'}
@@ -938,7 +973,7 @@ export class DeesThread extends DeesElement {
938
973
  : ''}
939
974
  </div>
940
975
  <div class="entryBody">
941
- ${this.renderBody(entry)}
976
+ ${entry.slot ? html`<slot name=${entry.slot}>${this.renderBody(entry)}</slot>` : this.renderBody(entry)}
942
977
  ${entry.attachments?.length ? this.renderAttachments(entry, entry.attachments) : ''}
943
978
  ${refused && entry.deliveryError
944
979
  ? html`<p class="deliveryError"><dees-icon icon="lucide:CircleAlert" .iconSize=${14} aria-hidden="true"></dees-icon><span>${entry.deliveryError}</span></p>`
@@ -67,6 +67,17 @@ export interface IThreadEntry {
67
67
  attachments?: IThreadAttachment[];
68
68
  /** A muted line below the body, such as the sources an agent read: "Read 3 documents". */
69
69
  footnote?: string;
70
+ /**
71
+ * The body comes from the host: the thread's child with this `slot` name shows in its place, such
72
+ * as a question card the reader answers; `body` stands in while no child has it.
73
+ */
74
+ slot?: string;
75
+ /**
76
+ * The entry waits for the reader, such as a question no one answered: its tile is outlined in the
77
+ * warning colour with this badge in its header ("Open question"), and it never collapses into a
78
+ * long thread's hidden middle.
79
+ */
80
+ attention?: string;
70
81
  }
71
82
 
72
83
  /** What happened to a thread between its comments. */
@@ -127,6 +127,18 @@ export const demoFunc = () => {
127
127
  },
128
128
  },
129
129
  },
130
+ {
131
+ key: 'unmatched',
132
+ severity: 'warning',
133
+ text: '1 payment is not matched to an invoice.',
134
+ action: {
135
+ label: 'Match payment',
136
+ iconName: 'lucide:Link',
137
+ // Matching opens in the page, under the panel: the panel closes before it does.
138
+ closesPanel: true,
139
+ action: () => showDemoResult(actionStatus, 'Match payment: the panel closed first (panel-toggle: action), the focus is on the status button, and the matching would open in the page now.'),
140
+ },
141
+ },
130
142
  ];
131
143
  return demoPage('Status button', 'A page\'s status in its header: one button beside the page\'s actions that shows the worst status and a count of the warnings and errors, and opens a speech-bubble panel that lists them. An error or a severe warning opens the panel by itself.', html`
132
144
  ${demoSection('In a page header', 'The statuses that a page would stack above its table as hints sit in the header; the table starts right under it, frameless. Press the button to open the panel, Escape to close it.', html`
@@ -204,10 +216,13 @@ const statuses: IStatusbuttonItem[] = [
204
216
  </div>
205
217
  ${demoOutput('Add an error.')}
206
218
  `)}
207
- ${demoSection('Actions on statuses', 'A status can offer the way to resolve it. Remove duplicates runs for a moment and resolves its warning; Retry sync fails, and the failure is reported as dees-action-error, here shown as a toast.', html`
219
+ ${demoSection('Actions on statuses', 'A status can offer the way to resolve it. Remove duplicates runs for a moment and resolves its warning; Retry sync fails, and the failure is reported as dees-action-error, here shown as a toast. Match payment takes the reader on to a flow in the page (closesPanel): the panel closes before it runs.', html`
208
220
  <div class="dees-demo-row">
209
221
  ${actionStatus}
210
222
  </div>
223
+ ${demoOutput('Press Match payment.')}
224
+ ${demoCode(`{ key: 'unmatched', severity: 'warning', text: '1 payment is not matched to an invoice.',
225
+ action: { label: 'Match payment', iconName: 'lucide:Link', closesPanel: true, action: () => openMatching() } }`)}
211
226
  `)}
212
227
  `);
213
228
  };
@@ -38,6 +38,13 @@ export interface IStatusbuttonAction {
38
38
  label: string;
39
39
  iconName?: string;
40
40
  disabled?: boolean;
41
+ /**
42
+ * The action takes the reader on from the panel, into a flow it opens in the page, say, rather
43
+ * than resolving the status in it: a press closes the panel and gives the focus to the status
44
+ * button before the action runs, and `panel-toggle` says `'action'`. Without it the panel stays
45
+ * open, so the reader sees the status resolve.
46
+ */
47
+ closesPanel?: boolean;
41
48
  /** Awaited; the button shows its pending state meanwhile, and a rejection is reported as `dees-action-error`. */
42
49
  action: () => void | Promise<void>;
43
50
  }
@@ -90,11 +97,11 @@ export interface IStatusbuttonGroup {
90
97
 
91
98
  /**
92
99
  * Why the panel opened or closed: `'button'` (a press of the status button), `'auto'` (a new error
93
- * or severe warning), `'host'` (the `open` property), or the dismissal that closed it: `'escape'`,
94
- * `'outside'` (a press outside, or the window losing focus), `'tab'` (the focus left it) or
95
- * `'anchor-hidden'` (the button left the screen).
100
+ * or severe warning), `'host'` (the `open` property), `'action'` (a status's action that closes it,
101
+ * `closesPanel`), or the dismissal that closed it: `'escape'`, `'outside'` (a press outside, or the
102
+ * window losing focus), `'tab'` (the focus left it) or `'anchor-hidden'` (the button left the screen).
96
103
  */
97
- export type TStatusbuttonToggleReason = 'button' | 'auto' | 'host' | Exclude<TDeesPopoverCloseReason, 'explicit'>;
104
+ export type TStatusbuttonToggleReason = 'button' | 'auto' | 'host' | 'action' | Exclude<TDeesPopoverCloseReason, 'explicit'>;
98
105
 
99
106
  /** The detail of the `panel-toggle` event. */
100
107
  export interface IStatusbuttonToggleDetail {
@@ -217,6 +224,8 @@ export class DeesStatusbutton extends DeesElement {
217
224
  private autoOpening = false;
218
225
  /** Why the panel is about to open, set by whoever opens it; unset, the host set `open`. */
219
226
  private openReason: TStatusbuttonToggleReason | undefined;
227
+ /** Why the panel is closing through the popover's `close()`, set around the call; unset, a press of the button. */
228
+ private closeReason: TStatusbuttonToggleReason | undefined;
220
229
  /** The popover accepted the last opening: the panel is on screen. */
221
230
  private panelShown = false;
222
231
  /** Tells when the button comes on screen, for an automatic opening that had to wait. */
@@ -655,7 +664,7 @@ export class DeesStatusbutton extends DeesElement {
655
664
  if (!shown) return;
656
665
  this.clearAnnouncements();
657
666
  const reason = event.detail.reason;
658
- this.dispatchToggle(false, reason === 'explicit' ? 'button' : reason);
667
+ this.dispatchToggle(false, reason === 'explicit' ? this.closeReason ?? 'button' : reason);
659
668
  };
660
669
 
661
670
  private dispatchToggle(open: boolean, reason: TStatusbuttonToggleReason): void {
@@ -691,6 +700,12 @@ export class DeesStatusbutton extends DeesElement {
691
700
  private async runItemAction(item: IStatusbuttonItem, button: DeesButton): Promise<void> {
692
701
  const action = item.action;
693
702
  if (!action || action.disabled || this.pendingActions.has(item.key)) return;
703
+ if (action.closesPanel && this.open) {
704
+ // Closes the panel and gives the focus back to the button, as its press does, before the action takes the reader on.
705
+ this.closeReason = 'action';
706
+ this.popoverElement?.close();
707
+ this.closeReason = undefined;
708
+ }
694
709
  this.pendingActions = new Set([...this.pendingActions, item.key]);
695
710
  try {
696
711
  await runAction(this, { action, source: 'statusbutton-action' }, () => action.action());