@design.estate/dees-catalog 21.32.3 → 21.33.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/dist_bundle/bundle.js +1733 -368
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-ZRD47DC6.js → chunk-B3NM6BL3.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-EL3KNDIB.js → chunk-BDUZ7I23.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-LDC2GECY.js → chunk-IK5OF7M4.js} +33 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-LDC2GECY.js.map → chunk-IK5OF7M4.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-YOX3NS2W.js → de-PTMMQ5DA.js} +33 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-PTMMQ5DA.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-7LJGK5SK.js → dees-modal-BZIJFVRI.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-O3NEQ4DO.js → dees-workspace-terminal-EU377EZY.js} +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-chart/dees-chart-area/component.d.ts +18 -0
- package/dist_ts_web/elements/00group-chart/dees-chart-area/component.js +60 -2
- package/dist_ts_web/elements/00group-chart/dees-chart-area/priceaxislabels.d.ts +24 -0
- package/dist_ts_web/elements/00group-chart/dees-chart-area/priceaxislabels.js +80 -0
- package/dist_ts_web/elements/00group-feedback/dees-hint/dees-hint.d.ts +1 -0
- package/dist_ts_web/elements/00group-feedback/dees-hint/dees-hint.js +13 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +7 -5
- package/dist_ts_web/elements/00group-harness/dees-harness-permission-card/dees-harness-permission-card.d.ts +0 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-permission-card/dees-harness-permission-card.js +10 -182
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.d.ts +64 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.js +221 -22
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.js +544 -66
- package/dist_ts_web/elements/00group-harness/harness.helpers.d.ts +16 -1
- package/dist_ts_web/elements/00group-harness/harness.helpers.js +25 -1
- package/dist_ts_web/elements/00group-harness/harness.records.d.ts +27 -0
- package/dist_ts_web/elements/00group-harness/harness.records.js +193 -0
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +93 -4
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +39 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.js +27 -10
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +276 -26
- package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.d.ts +10 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.js +144 -44
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.d.ts +16 -1
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +188 -5
- package/dist_ts_web/elements/00group-kanban/interfaces.d.ts +47 -2
- package/dist_ts_web/elements/00group-kanban/kanban.demodata.d.ts +11 -1
- package/dist_ts_web/elements/00group-kanban/kanban.demodata.js +141 -7
- package/dist_ts_web/elements/00group-kanban/kanban.dragcontroller.js +23 -1
- package/dist_ts_web/elements/00group-kanban/kanban.helpers.d.ts +15 -1
- package/dist_ts_web/elements/00group-kanban/kanban.helpers.js +31 -1
- package/dist_ts_web/i18n/de.d.ts +124 -0
- package/dist_ts_web/i18n/de.js +32 -1
- package/dist_ts_web/i18n/messages.d.ts +124 -0
- package/dist_ts_web/i18n/messages.js +32 -1
- package/package.json +2 -2
- package/readme.md +88 -15
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-chart/dees-chart-area/component.ts +59 -1
- package/ts_web/elements/00group-chart/dees-chart-area/priceaxislabels.ts +97 -0
- package/ts_web/elements/00group-feedback/dees-hint/dees-hint.ts +16 -3
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +6 -4
- package/ts_web/elements/00group-harness/dees-harness-permission-card/dees-harness-permission-card.ts +16 -186
- package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.ts +261 -55
- package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts +575 -88
- package/ts_web/elements/00group-harness/harness.helpers.ts +39 -0
- package/ts_web/elements/00group-harness/harness.records.ts +210 -0
- package/ts_web/elements/00group-harness/interfaces.ts +99 -4
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.ts +26 -8
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +267 -25
- package/ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts +162 -57
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +202 -1
- package/ts_web/elements/00group-kanban/interfaces.ts +55 -3
- package/ts_web/elements/00group-kanban/kanban.demodata.ts +166 -6
- package/ts_web/elements/00group-kanban/kanban.dragcontroller.ts +21 -0
- package/ts_web/elements/00group-kanban/kanban.helpers.ts +53 -0
- package/ts_web/i18n/de.ts +31 -0
- package/ts_web/i18n/messages.ts +31 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-YOX3NS2W.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-ZRD47DC6.js.map → chunk-B3NM6BL3.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-EL3KNDIB.js.map → chunk-BDUZ7I23.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-7LJGK5SK.js.map → dees-modal-BZIJFVRI.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-O3NEQ4DO.js.map → dees-workspace-terminal-EU377EZY.js.map} +0 -0
|
@@ -22,6 +22,25 @@ export const kanbanDemoColumns: IKanbanColumn[] = [
|
|
|
22
22
|
{ id: 'done', title: 'Done', done: true },
|
|
23
23
|
];
|
|
24
24
|
|
|
25
|
+
/** A column for shipped work, folded to its newest cards until the reader opens it. */
|
|
26
|
+
export const kanbanDemoReleasedColumn: IKanbanColumn = {
|
|
27
|
+
id: 'released',
|
|
28
|
+
title: 'Released',
|
|
29
|
+
done: true,
|
|
30
|
+
collapsible: 'collapsed',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** The columns of a delivery workflow, from the backlog to the release. */
|
|
34
|
+
export const kanbanDemoWorkflowColumns: IKanbanColumn[] = [
|
|
35
|
+
{ id: 'backlog', title: 'Backlog' },
|
|
36
|
+
{ id: 'ready', title: 'Ready' },
|
|
37
|
+
{ id: 'progress', title: 'In progress' },
|
|
38
|
+
{ id: 'input', title: 'Needs input' },
|
|
39
|
+
{ id: 'review', title: 'Review' },
|
|
40
|
+
{ id: 'done', title: 'Landed', done: true },
|
|
41
|
+
kanbanDemoReleasedColumn,
|
|
42
|
+
];
|
|
43
|
+
|
|
25
44
|
export const kanbanDemoProjects: IKanbanProject[] = [
|
|
26
45
|
{ id: 'app', name: 'Workspace app' },
|
|
27
46
|
{ id: 'catalog', name: 'Design catalog' },
|
|
@@ -29,6 +48,13 @@ export const kanbanDemoProjects: IKanbanProject[] = [
|
|
|
29
48
|
|
|
30
49
|
const [mara, jonas, alex] = kanbanDemoPeople;
|
|
31
50
|
|
|
51
|
+
export interface IKanbanDemoOptions {
|
|
52
|
+
/** Adds five shipped tasks in `kanbanDemoReleasedColumn`. */
|
|
53
|
+
released?: boolean;
|
|
54
|
+
/** Adds a third epic and a busy team's work across `kanbanDemoWorkflowColumns`. */
|
|
55
|
+
workflow?: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
32
58
|
export interface IKanbanDemo {
|
|
33
59
|
tickets: IKanbanTicket[];
|
|
34
60
|
provider: IKanbanProvider;
|
|
@@ -38,8 +64,130 @@ export interface IKanbanDemo {
|
|
|
38
64
|
actAs: (person: IKanbanPerson) => void;
|
|
39
65
|
}
|
|
40
66
|
|
|
41
|
-
|
|
42
|
-
|
|
67
|
+
/** Shipped tasks, one release each, the newest last. */
|
|
68
|
+
const releasedTickets = (): IKanbanTicket[] =>
|
|
69
|
+
[
|
|
70
|
+
['Remember the last board filters', 'app', '2.0.0'],
|
|
71
|
+
['Show who is viewing a ticket', 'app', '2.1.0'],
|
|
72
|
+
['Add the compact card density', 'catalog', '21.1.0'],
|
|
73
|
+
['Search tickets by key', 'app', '2.2.0'],
|
|
74
|
+
['Load the board in one request', 'app', '2.3.0'],
|
|
75
|
+
].map(([title, project, version], order) => ({
|
|
76
|
+
id: `released-${order + 1}`,
|
|
77
|
+
key: `CAT-${110 + order}`,
|
|
78
|
+
kind: 'task' as const,
|
|
79
|
+
title,
|
|
80
|
+
columnId: 'released',
|
|
81
|
+
order,
|
|
82
|
+
assignee: kanbanDemoPeople[order % kanbanDemoPeople.length],
|
|
83
|
+
project,
|
|
84
|
+
links: [
|
|
85
|
+
{ kind: 'release' as const, package: project === 'app' ? '@acme/workspace' : '@acme/catalog', version },
|
|
86
|
+
],
|
|
87
|
+
createdAt: `2026-09-0${order + 1}T09:00:00Z`,
|
|
88
|
+
createdBy: mara,
|
|
89
|
+
updatedAt: `2026-09-1${order}T15:00:00Z`,
|
|
90
|
+
updatedBy: mara,
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
/** A demo task's own fields; the helper adds its kind, key, order and history. */
|
|
94
|
+
type TDemoTask = Pick<
|
|
95
|
+
IKanbanTicket,
|
|
96
|
+
'title' | 'columnId' | 'project' | 'parentId' | 'priority' | 'assignee' | 'labels'
|
|
97
|
+
> & {
|
|
98
|
+
subtasks?: [title: string, columnId: string][];
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A busy team's work across `kanbanDemoWorkflowColumns`, after the seeded tickets of each column:
|
|
103
|
+
* Backlog, Ready, In progress and Landed run past the fold of a laptop screen.
|
|
104
|
+
*/
|
|
105
|
+
const workflowTickets = (): IKanbanTicket[] => {
|
|
106
|
+
const tasks: TDemoTask[] = [
|
|
107
|
+
{ columnId: 'backlog', title: 'Archive finished projects', parentId: 'epic-1', priority: 'low', assignee: mara, labels: ['Design'], project: 'app' },
|
|
108
|
+
{ columnId: 'backlog', title: 'Keep comment drafts while offline', parentId: 'epic-2', priority: 'normal', labels: ['Collaboration'], project: 'app' },
|
|
109
|
+
{ columnId: 'backlog', title: 'Move several tickets at once', parentId: 'epic-3', priority: 'normal', assignee: jonas, labels: ['Productivity'], project: 'app', subtasks: [['Select several cards', 'backlog'], ['Move them in one request', 'backlog']] },
|
|
110
|
+
{ columnId: 'backlog', title: 'Explain each empty state with a next step', parentId: 'epic-1', priority: 'low', labels: ['Design', 'Content'], project: 'app' },
|
|
111
|
+
{ columnId: 'backlog', title: 'Import tickets from a spreadsheet', parentId: 'epic-3', assignee: mara, labels: ['Integrations'], project: 'app' },
|
|
112
|
+
{ columnId: 'backlog', title: 'Measure board load time in the field', parentId: 'epic-3', priority: 'normal', assignee: alex, labels: ['Performance'], project: 'catalog' },
|
|
113
|
+
{ columnId: 'ready', title: 'Pin a ticket to the top of its column', parentId: 'epic-1', priority: 'normal', assignee: jonas, labels: ['Design'], project: 'app' },
|
|
114
|
+
{ columnId: 'ready', title: 'Notify watchers when a ticket moves', parentId: 'epic-2', priority: 'high', assignee: mara, labels: ['Collaboration'], project: 'app', subtasks: [['Choose who is notified', 'ready'], ['Write the notification text', 'ready']] },
|
|
115
|
+
{ columnId: 'ready', title: 'Render only the visible cards of long columns', parentId: 'epic-3', priority: 'high', assignee: alex, labels: ['Performance'], project: 'catalog' },
|
|
116
|
+
{ columnId: 'ready', title: 'Lay the board out right to left', parentId: 'epic-1', priority: 'normal', labels: ['Accessibility'], project: 'catalog' },
|
|
117
|
+
{ columnId: 'ready', title: 'List the keyboard shortcuts', parentId: 'epic-1', priority: 'low', assignee: alex, labels: ['Accessibility'], project: 'catalog' },
|
|
118
|
+
{ columnId: 'ready', title: 'Share a filtered board by link', parentId: 'epic-2', priority: 'normal', assignee: jonas, labels: ['Collaboration'], project: 'app' },
|
|
119
|
+
{ columnId: 'progress', title: 'Show who is typing in the discussion', parentId: 'epic-2', priority: 'normal', assignee: jonas, labels: ['Collaboration'], project: 'app' },
|
|
120
|
+
{ columnId: 'progress', title: 'Keep unchanged cards on refresh', parentId: 'epic-3', priority: 'urgent', assignee: alex, labels: ['Performance', 'Bug'], project: 'catalog', subtasks: [['Profile a board of 500 tickets', 'done'], ['Reuse the cards that did not change', 'progress']] },
|
|
121
|
+
{ columnId: 'progress', title: 'Preview attachments in the ticket', parentId: 'epic-2', priority: 'normal', assignee: mara, labels: ['Design'], project: 'app' },
|
|
122
|
+
{ columnId: 'progress', title: 'Larger drag targets on touch screens', parentId: 'epic-1', priority: 'high', assignee: alex, labels: ['Mobile', 'Accessibility'], project: 'catalog' },
|
|
123
|
+
{ columnId: 'progress', title: 'Keep the filters in step across tabs', parentId: 'epic-3', priority: 'low', assignee: jonas, labels: ['Bug'], project: 'app' },
|
|
124
|
+
{ columnId: 'input', title: 'Decide the default column limits', parentId: 'epic-3', priority: 'normal', assignee: mara, labels: ['Product'], project: 'app' },
|
|
125
|
+
{ columnId: 'input', title: 'Confirm the export format with finance', priority: 'high', assignee: jonas, labels: ['Integrations'], project: 'app' },
|
|
126
|
+
{ columnId: 'input', title: 'Which fields should a template copy?', parentId: 'epic-2', priority: 'low', labels: ['Product'], project: 'app' },
|
|
127
|
+
{ columnId: 'review', title: 'Return focus after closing a ticket', parentId: 'epic-1', priority: 'urgent', assignee: alex, labels: ['Bug', 'Accessibility'], project: 'catalog' },
|
|
128
|
+
{ columnId: 'review', title: 'Suggest people when mentioning', parentId: 'epic-2', priority: 'high', assignee: jonas, labels: ['Collaboration'], project: 'app', subtasks: [['Rank recent people first', 'review'], ['Insert the mention as a chip', 'done']] },
|
|
129
|
+
{ columnId: 'review', title: 'Cache avatars across boards', parentId: 'epic-3', priority: 'normal', assignee: alex, labels: ['Performance'], project: 'catalog' },
|
|
130
|
+
{ columnId: 'review', title: 'Write the onboarding tour', parentId: 'epic-1', priority: 'low', assignee: mara, labels: ['Content'], project: 'app' },
|
|
131
|
+
{ columnId: 'done', title: 'Keep column headers in view', parentId: 'epic-1', priority: 'normal', assignee: alex, labels: ['Design'], project: 'catalog' },
|
|
132
|
+
{ columnId: 'done', title: 'Find a ticket by its key', parentId: 'epic-3', priority: 'normal', assignee: jonas, labels: ['Productivity'], project: 'app' },
|
|
133
|
+
{ columnId: 'done', title: 'Show the assignee on every card', parentId: 'epic-2', priority: 'low', assignee: mara, labels: ['Design'], project: 'catalog' },
|
|
134
|
+
{ columnId: 'done', title: 'Retry a move that failed', parentId: 'epic-3', priority: 'high', assignee: jonas, labels: ['Bug'], project: 'app' },
|
|
135
|
+
{ columnId: 'done', title: 'Respect reduced motion while dragging', parentId: 'epic-1', priority: 'normal', assignee: alex, labels: ['Accessibility'], project: 'catalog' },
|
|
136
|
+
{ columnId: 'done', title: 'Paste images into comments', parentId: 'epic-2', priority: 'normal', assignee: mara, labels: ['Collaboration'], project: 'app' },
|
|
137
|
+
];
|
|
138
|
+
// CAT-120 to CAT-157, the epic CAT-160.
|
|
139
|
+
let key = 120;
|
|
140
|
+
const orders = new Map<string, number>();
|
|
141
|
+
// After the seeded tickets, which take the first two places of a column at most.
|
|
142
|
+
const order = (columnId: string) => {
|
|
143
|
+
const next = orders.get(columnId) ?? 2;
|
|
144
|
+
orders.set(columnId, next + 1);
|
|
145
|
+
return next;
|
|
146
|
+
};
|
|
147
|
+
const history = (day: number) => ({
|
|
148
|
+
createdAt: `2026-09-${String(day).padStart(2, '0')}T09:00:00Z`,
|
|
149
|
+
createdBy: mara,
|
|
150
|
+
updatedAt: `2026-09-${String(day + 2).padStart(2, '0')}T15:00:00Z`,
|
|
151
|
+
updatedBy: mara,
|
|
152
|
+
});
|
|
153
|
+
const epic: IKanbanTicket = {
|
|
154
|
+
id: 'epic-3',
|
|
155
|
+
key: 'CAT-160',
|
|
156
|
+
kind: 'epic',
|
|
157
|
+
title: 'Fast at any size',
|
|
158
|
+
description: 'Keep large boards quick to load, search and change.',
|
|
159
|
+
columnId: 'progress',
|
|
160
|
+
order: 2,
|
|
161
|
+
project: 'app',
|
|
162
|
+
...history(14),
|
|
163
|
+
};
|
|
164
|
+
return [epic, ...tasks.flatMap(({ subtasks = [], ...task }, index) => {
|
|
165
|
+
const id = `flow-${index + 1}`;
|
|
166
|
+
return [
|
|
167
|
+
{ ...task, id, key: `CAT-${key++}`, kind: 'task' as const, order: order(task.columnId), ...history(1 + index % 25) },
|
|
168
|
+
...subtasks.map(([title, columnId], position) => ({
|
|
169
|
+
id: `${id}-${position + 1}`,
|
|
170
|
+
key: `CAT-${key++}`,
|
|
171
|
+
kind: 'subtask' as const,
|
|
172
|
+
title,
|
|
173
|
+
parentId: id,
|
|
174
|
+
columnId,
|
|
175
|
+
order: position,
|
|
176
|
+
assignee: task.assignee,
|
|
177
|
+
project: task.project,
|
|
178
|
+
})),
|
|
179
|
+
];
|
|
180
|
+
})];
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/** The next revision of a ticket the provider changed. */
|
|
184
|
+
const revised = (ticket: IKanbanTicket): IKanbanTicket => ({
|
|
185
|
+
...ticket,
|
|
186
|
+
revision: (ticket.revision ?? 0) + 1,
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
export const createKanbanDemo = (options: IKanbanDemoOptions = {}): IKanbanDemo => {
|
|
190
|
+
const seeded: IKanbanTicket[] = [
|
|
43
191
|
{
|
|
44
192
|
id: 'epic-1',
|
|
45
193
|
key: 'CAT-100',
|
|
@@ -227,7 +375,10 @@ export const createKanbanDemo = (): IKanbanDemo => {
|
|
|
227
375
|
assignee: alex,
|
|
228
376
|
project: 'catalog',
|
|
229
377
|
},
|
|
378
|
+
...options.released ? releasedTickets() : [],
|
|
379
|
+
...options.workflow ? workflowTickets() : [],
|
|
230
380
|
];
|
|
381
|
+
let tickets = seeded.map(revised);
|
|
231
382
|
let comments: IKanbanComment[] = [
|
|
232
383
|
{
|
|
233
384
|
id: 'comment-1',
|
|
@@ -357,8 +508,14 @@ export const createKanbanDemo = (): IKanbanDemo => {
|
|
|
357
508
|
record(input.ticketId, 'commented');
|
|
358
509
|
return comment;
|
|
359
510
|
},
|
|
360
|
-
updateTicket: async ({ ticketId, changes }) => {
|
|
511
|
+
updateTicket: async ({ ticketId, changes, expectedRevision }) => {
|
|
361
512
|
const previous = tickets.find(ticket => ticket.id === ticketId)!;
|
|
513
|
+
// A server refuses an edit that started from an older revision, so it cannot undo a teammate's.
|
|
514
|
+
if (expectedRevision !== undefined && expectedRevision !== previous.revision)
|
|
515
|
+
throw Object.assign(
|
|
516
|
+
new Error(`${previous.updatedBy?.name ?? 'A teammate'} changed ${previous.key} while you were editing it.`),
|
|
517
|
+
{ code: 'revision_conflict' as const },
|
|
518
|
+
);
|
|
362
519
|
const next: IKanbanTicket = {
|
|
363
520
|
...previous,
|
|
364
521
|
...changes,
|
|
@@ -380,11 +537,11 @@ export const createKanbanDemo = (): IKanbanDemo => {
|
|
|
380
537
|
]),
|
|
381
538
|
);
|
|
382
539
|
if (!Object.keys(changed).length) return previous;
|
|
383
|
-
const ticket = {
|
|
540
|
+
const ticket = revised({
|
|
384
541
|
...next,
|
|
385
542
|
updatedAt: record(ticketId, 'updated', changed),
|
|
386
543
|
updatedBy: actor,
|
|
387
|
-
};
|
|
544
|
+
});
|
|
388
545
|
tickets = tickets.map(item => item.id === ticketId ? ticket : item);
|
|
389
546
|
return ticket;
|
|
390
547
|
},
|
|
@@ -407,7 +564,9 @@ export const createKanbanDemo = (): IKanbanDemo => {
|
|
|
407
564
|
updatedAt,
|
|
408
565
|
updatedBy: actor,
|
|
409
566
|
});
|
|
410
|
-
const changed = destination.map((item, order) =>
|
|
567
|
+
const changed = destination.map((item, order) =>
|
|
568
|
+
item.id === ticketId || item.order !== order ? revised({ ...item, order }) : item,
|
|
569
|
+
);
|
|
411
570
|
tickets = tickets.map(item => changed.find(moved => moved.id === item.id) ?? item);
|
|
412
571
|
return changed;
|
|
413
572
|
},
|
|
@@ -423,6 +582,7 @@ export const createKanbanDemo = (): IKanbanDemo => {
|
|
|
423
582
|
createdBy: actor,
|
|
424
583
|
updatedAt: createdAt,
|
|
425
584
|
updatedBy: actor,
|
|
585
|
+
revision: 1,
|
|
426
586
|
};
|
|
427
587
|
tickets = [...tickets, ticket];
|
|
428
588
|
return ticket;
|
|
@@ -310,6 +310,11 @@ export class KanbanDragController {
|
|
|
310
310
|
}
|
|
311
311
|
const columnId = column.column?.id;
|
|
312
312
|
if (!columnId) return;
|
|
313
|
+
// A collapsed column shows only its newest cards: a ticket stays where it is in it, or lands last.
|
|
314
|
+
if (column.collapsed)
|
|
315
|
+
return column.tickets.some(ticket => ticket.id === gesture.motion.ticket.id)
|
|
316
|
+
? this.authoritativeMove(gesture.motion.ticket.id)
|
|
317
|
+
: { ticketId: gesture.motion.ticket.id, columnId, beforeTicketId: undefined };
|
|
313
318
|
const tickets = sortKanbanTickets(column.tickets).filter(
|
|
314
319
|
ticket => ticket.id !== gesture.motion.ticket.id,
|
|
315
320
|
);
|
|
@@ -656,6 +661,22 @@ export class KanbanDragController {
|
|
|
656
661
|
? Math.min(1, Math.max(0, (point - end + edge) / edge)) * 14 * elapsed
|
|
657
662
|
: 0;
|
|
658
663
|
let movedX = false, movedY = false;
|
|
664
|
+
// The column under the pointer scrolls its own cards first, then the board and the page follow.
|
|
665
|
+
const lane = this.columns.find(column => {
|
|
666
|
+
const rect = column.getBoundingClientRect();
|
|
667
|
+
return gesture.x >= rect.left && gesture.x <= rect.right;
|
|
668
|
+
});
|
|
669
|
+
const cards = lane?.cardScroller;
|
|
670
|
+
if (lane && cards) {
|
|
671
|
+
const rect = cards.getBoundingClientRect();
|
|
672
|
+
const top = Math.max(0, rect.top), bottom = Math.min(innerHeight, rect.bottom);
|
|
673
|
+
if (gesture.y >= top - 56 && gesture.y <= bottom + 56) {
|
|
674
|
+
const y = cards.scrollTop;
|
|
675
|
+
cards.scrollTop += velocity(gesture.y, top, bottom, 56);
|
|
676
|
+
movedY = cards.scrollTop !== y;
|
|
677
|
+
if (movedY) lane.syncScrollEdges();
|
|
678
|
+
}
|
|
679
|
+
}
|
|
659
680
|
for (const parent of this.scrollParents) {
|
|
660
681
|
const rect = parent === document.scrollingElement
|
|
661
682
|
? { left: 0, top: 0, right: innerWidth, bottom: innerHeight }
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
IKanbanEditConflict,
|
|
2
3
|
IKanbanProject,
|
|
4
|
+
IKanbanRevisionConflict,
|
|
3
5
|
IKanbanTicket,
|
|
4
6
|
IKanbanTicketDraft,
|
|
7
|
+
TKanbanDraftField,
|
|
5
8
|
TKanbanLink,
|
|
6
9
|
TKanbanPriority,
|
|
7
10
|
} from './interfaces.js';
|
|
@@ -32,8 +35,58 @@ export const ticketDraft = (ticket: IKanbanTicket): IKanbanTicketDraft => ({
|
|
|
32
35
|
parentId: ticket.parentId ?? '',
|
|
33
36
|
labels: [...ticket.labels ?? []],
|
|
34
37
|
project: ticket.project ?? '',
|
|
38
|
+
...ticket.revision === undefined ? {} : { revision: ticket.revision },
|
|
35
39
|
});
|
|
36
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Which state of a ticket the board holds: its server `revision`, else its `updatedAt`. Undefined
|
|
43
|
+
* when the provider names neither.
|
|
44
|
+
*/
|
|
45
|
+
export const kanbanTicketVersion = (ticket: IKanbanTicket | undefined): string | undefined =>
|
|
46
|
+
ticket?.revision !== undefined ? `revision:${ticket.revision}` : ticket?.updatedAt;
|
|
47
|
+
|
|
48
|
+
/** The edit draft's fields, in the order the detail shows them. */
|
|
49
|
+
export const kanbanDraftFields: readonly TKanbanDraftField[] = [
|
|
50
|
+
'title',
|
|
51
|
+
'description',
|
|
52
|
+
'project',
|
|
53
|
+
'priority',
|
|
54
|
+
'assigneeId',
|
|
55
|
+
'parentId',
|
|
56
|
+
'labels',
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const sameDraftField = (
|
|
60
|
+
field: TKanbanDraftField,
|
|
61
|
+
a: IKanbanTicketDraft,
|
|
62
|
+
b: IKanbanTicketDraft,
|
|
63
|
+
): boolean =>
|
|
64
|
+
field === 'labels'
|
|
65
|
+
? sameKanbanLabels(a.labels ?? [], b.labels ?? [])
|
|
66
|
+
: (a[field] ?? '') === (b[field] ?? '');
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* What an edit changed from the version it started at (`base`), as it set it, where the latest
|
|
70
|
+
* version (`latest`) holds something else: what the person may still want to apply to it.
|
|
71
|
+
*/
|
|
72
|
+
export const kanbanDraftChanges = (
|
|
73
|
+
base: IKanbanTicketDraft,
|
|
74
|
+
draft: IKanbanTicketDraft,
|
|
75
|
+
latest: IKanbanTicketDraft,
|
|
76
|
+
): IKanbanEditConflict['edit'] =>
|
|
77
|
+
Object.fromEntries(
|
|
78
|
+
kanbanDraftFields
|
|
79
|
+
.filter(field =>
|
|
80
|
+
draft[field] !== undefined &&
|
|
81
|
+
!sameDraftField(field, draft, base) &&
|
|
82
|
+
!sameDraftField(field, draft, latest))
|
|
83
|
+
.map(field => [field, draft[field]]),
|
|
84
|
+
) as IKanbanEditConflict['edit'];
|
|
85
|
+
|
|
86
|
+
/** Whether a provider refused an edit because the ticket changed since its `expectedRevision`. */
|
|
87
|
+
export const isKanbanRevisionConflict = (error: unknown): error is IKanbanRevisionConflict =>
|
|
88
|
+
error instanceof Error && (error as Partial<IKanbanRevisionConflict>).code === 'revision_conflict';
|
|
89
|
+
|
|
37
90
|
/** A project's name: its `IKanbanProject` name, else its id. */
|
|
38
91
|
export const kanbanProjectName = (projects: readonly IKanbanProject[], id: string): string =>
|
|
39
92
|
projects.find(project => project.id === id)?.name ?? id;
|
package/ts_web/i18n/de.ts
CHANGED
|
@@ -939,6 +939,17 @@ export default dcMessages.translation('de', {
|
|
|
939
939
|
'kanban.changeTo': '{before} → {after}',
|
|
940
940
|
'kanban.listAdded': 'hinzugefügt: {items}',
|
|
941
941
|
'kanban.listRemoved': 'entfernt: {items}',
|
|
942
|
+
'kanban.reloadTicket': 'Ticket neu laden',
|
|
943
|
+
'kanban.conflictHint': 'Laden Sie das Ticket neu, um die Änderung zu sehen. Ihre Änderungen bleiben erhalten, damit Sie sie erneut anwenden können.',
|
|
944
|
+
'kanban.yourEdit': 'Ihre Änderungen',
|
|
945
|
+
'kanban.yourEditHint': 'Das Formular zeigt jetzt den neuesten Stand. Übernehmen Sie die Änderungen, die Sie noch wollen.',
|
|
946
|
+
'kanban.applyEdit': 'Übernehmen',
|
|
947
|
+
'kanban.applyField': '{field} übernehmen',
|
|
948
|
+
'kanban.discardEdit': 'Verwerfen',
|
|
949
|
+
'kanban.collapseColumn': '{column} einklappen',
|
|
950
|
+
'kanban.expandColumn': '{column} ausklappen',
|
|
951
|
+
'kanban.showAll': '{count, plural, one {# Aufgabe anzeigen} other {Alle # Aufgaben anzeigen}}',
|
|
952
|
+
'kanban.titleRequired': 'Geben Sie einen Titel ein.',
|
|
942
953
|
'thread.timeline': 'Unterhaltung',
|
|
943
954
|
'thread.loading': 'Unterhaltung wird geladen …',
|
|
944
955
|
'thread.loadFailed': 'Die Unterhaltung konnte nicht geladen werden.',
|
|
@@ -1286,6 +1297,26 @@ export default dcMessages.translation('de', {
|
|
|
1286
1297
|
'question.custom': 'Antworten Sie in eigenen Worten …',
|
|
1287
1298
|
'question.send': 'Antwort senden',
|
|
1288
1299
|
'question.confirm': 'Bestätigen',
|
|
1300
|
+
'question.warning': 'Warnung:',
|
|
1301
|
+
'question.danger': 'Gefahr:',
|
|
1302
|
+
'question.items': 'Vorgeschlagene Änderungen',
|
|
1303
|
+
'question.proposalConfirm': 'Bestätigen',
|
|
1304
|
+
'question.proposalDecline': 'Ablehnen',
|
|
1305
|
+
'question.confirmed': 'Bestätigt',
|
|
1306
|
+
'question.declined': 'Abgelehnt',
|
|
1307
|
+
'question.expired': 'Abgelaufen',
|
|
1308
|
+
'question.failed': 'Fehlgeschlagen',
|
|
1309
|
+
'question.includeItem': 'Einbeziehen: {summary}',
|
|
1310
|
+
'question.leftOut': 'Ausgelassen',
|
|
1311
|
+
'question.credentialHidden': 'verborgen',
|
|
1312
|
+
'question.credentialShowShort': 'Zeigen',
|
|
1313
|
+
'question.credentialHideShort': 'Verbergen',
|
|
1314
|
+
'question.credentialShow': '{label} zeigen',
|
|
1315
|
+
'question.credentialHide': '{label} verbergen',
|
|
1316
|
+
'question.credentialCopy': '{label} kopieren',
|
|
1317
|
+
'question.credentialCopied': '{label} kopiert',
|
|
1318
|
+
'question.credentialCopyFailed': 'Kopieren fehlgeschlagen. Prüfen Sie den Zugriff auf die Zwischenablage und versuchen Sie es erneut.',
|
|
1319
|
+
'question.credentialNote': 'Nur Sie sehen dies. Der Agent erhält es nicht.',
|
|
1289
1320
|
'message.usage': '{input, number} ein · {output, number} aus · {total, number} Tokens insgesamt',
|
|
1290
1321
|
'todos.empty': 'Noch keine Aufgaben.',
|
|
1291
1322
|
'reasoning.thinking': 'Denkt nach',
|
package/ts_web/i18n/messages.ts
CHANGED
|
@@ -973,6 +973,17 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
|
|
|
973
973
|
'kanban.changeTo': { message: '{before} → {after}', description: 'A field\'s change in a ticket\'s history: {before} is its value before, {after} its value after.' },
|
|
974
974
|
'kanban.listAdded': { message: 'added {items}', description: 'Labels or links a change added, in a ticket\'s history; {items} is their list.' },
|
|
975
975
|
'kanban.listRemoved': { message: 'removed {items}', description: 'Labels or links a change removed, in a ticket\'s history; {items} is their list.' },
|
|
976
|
+
'kanban.reloadTicket': { message: 'Reload ticket', description: 'The button that loads a ticket again after the server refused a save because someone changed the ticket meanwhile.' },
|
|
977
|
+
'kanban.conflictHint': { message: 'Reload the ticket to see the change. Your edits are kept, so you can apply them again.', description: 'Below the server\'s reason, when it refused a save because the ticket changed meanwhile.' },
|
|
978
|
+
'kanban.yourEdit': { message: 'Your changes', description: 'The heading over the fields a person changed before their save was refused, kept to apply to the reloaded ticket.' },
|
|
979
|
+
'kanban.yourEditHint': { message: 'The form now shows the latest version. Apply the changes you still want.', description: 'Below "Your changes", after the ticket was loaded again.' },
|
|
980
|
+
'kanban.applyEdit': { message: 'Apply', description: 'The button that puts one kept change back into the edit.' },
|
|
981
|
+
'kanban.applyField': { message: 'Apply {field}', description: 'The accessible name of the button that puts one kept change back into the edit; {field} is the field\'s name, as "Title".' },
|
|
982
|
+
'kanban.discardEdit': { message: 'Discard', description: 'The button that throws away the kept changes.' },
|
|
983
|
+
'kanban.collapseColumn': { message: 'Collapse {column}', description: 'A column\'s button that folds it to a narrow lane; {column} is its title.' },
|
|
984
|
+
'kanban.expandColumn': { message: 'Expand {column}', description: 'A folded column\'s button that shows it whole again; {column} is its title.' },
|
|
985
|
+
'kanban.showAll': { message: '{count, plural, one {Show # task} other {Show all # tasks}}', description: 'The button below a folded column\'s newest tasks that shows the column whole; {count} is how many tasks it holds.' },
|
|
986
|
+
'kanban.titleRequired': { message: 'Enter a title.', description: 'Shown on the title field of the create dialog when it is confirmed empty.' },
|
|
976
987
|
|
|
977
988
|
// dees-thread
|
|
978
989
|
'thread.timeline': { message: 'Conversation', description: 'The thread\'s list of comments and events (its accessible name).' },
|
|
@@ -1356,6 +1367,26 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
|
|
|
1356
1367
|
'question.custom': { message: 'Answer in your own words…', description: 'The field for an answer of the reader\'s own.' },
|
|
1357
1368
|
'question.send': { message: 'Send Answer', description: 'The button that sends the answer.' },
|
|
1358
1369
|
'question.confirm': { message: 'Confirm', description: 'The button that confirms the chosen answers.' },
|
|
1370
|
+
'question.warning': { message: 'Warning:', description: 'Said to assistive technology before a question or proposal that asks for care (orange, a warning sign).' },
|
|
1371
|
+
'question.danger': { message: 'Danger:', description: 'Said to assistive technology before a question or proposal that deletes, sends or cannot be taken back (red, a stop sign).' },
|
|
1372
|
+
'question.items': { message: 'Proposed changes', description: 'The list of changes a proposal makes (a list name).' },
|
|
1373
|
+
'question.proposalConfirm': { message: 'Confirm', description: 'The button that confirms a proposal: the agent then makes its changes.' },
|
|
1374
|
+
'question.proposalDecline': { message: 'Decline', description: 'The button that declines a proposal: nothing is changed.' },
|
|
1375
|
+
'question.confirmed': { message: 'Confirmed', description: 'Said on a proposal the reader confirmed.' },
|
|
1376
|
+
'question.declined': { message: 'Declined', description: 'Said on a proposal the reader declined.' },
|
|
1377
|
+
'question.expired': { message: 'Expired', description: 'Said on a proposal that can no longer be confirmed or declined.' },
|
|
1378
|
+
'question.failed': { message: 'Failed', description: 'Said on a confirmed proposal whose changes could not be made.' },
|
|
1379
|
+
'question.includeItem': { message: 'Include: {summary}', description: 'The checkbox that keeps a change in a proposal (checked) or leaves it out; {summary} is what the change does.' },
|
|
1380
|
+
'question.leftOut': { message: 'Left out', description: 'Said on a change the reader left out of a proposal: it is not made.' },
|
|
1381
|
+
'question.credentialHidden': { message: 'hidden', description: 'Said to assistive technology in place of a secret that is not shown.' },
|
|
1382
|
+
'question.credentialShowShort': { message: 'Show', description: 'The button that shows a secret a change issued, such as an API key.' },
|
|
1383
|
+
'question.credentialHideShort': { message: 'Hide', description: 'The button that hides that secret again.' },
|
|
1384
|
+
'question.credentialShow': { message: 'Show {label}', description: 'The show button\'s accessible name; {label} is what the secret is ("API key"). Keep the button\'s word in it.' },
|
|
1385
|
+
'question.credentialHide': { message: 'Hide {label}', description: 'The hide button\'s accessible name. Keep the button\'s word in it.' },
|
|
1386
|
+
'question.credentialCopy': { message: 'Copy {label}', description: 'The copy button\'s accessible name. Keep the button\'s word ("Copy") in it.' },
|
|
1387
|
+
'question.credentialCopied': { message: '{label} copied', description: 'Said once the secret is on the clipboard.' },
|
|
1388
|
+
'question.credentialCopyFailed': { message: 'Could not copy. Check clipboard access and try again.', description: 'Said when the clipboard refused the secret.' },
|
|
1389
|
+
'question.credentialNote': { message: 'Only you can see this. The agent is not shown it.', description: 'Under a secret a change issued: it stays on the reader\'s screen and does not go back to the agent.' },
|
|
1359
1390
|
'message.usage': { message: '{input, number} in · {output, number} out · {total, number} total tokens', description: 'A reply\'s token usage: tokens read, written and in total.' },
|
|
1360
1391
|
|
|
1361
1392
|
// dees-harness-todos, dees-harness-reasoning, dees-harness-status, dees-harness-thread-cut, dees-harness-usage
|