@design.estate/dees-catalog 21.39.1 → 21.40.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.
- package/dist_bundle/bundle.js +174 -137
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-DF4QZTOW.js → chunk-5K6O7YAL.js} +4 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-DF4QZTOW.js.map → chunk-5K6O7YAL.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-7SVFKQJK.js → chunk-GQD5HSUW.js} +10 -5
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-7SVFKQJK.js.map → chunk-GQD5HSUW.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FGQNHF2X.js → chunk-V55MXKAS.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-FNI3J2QO.js → de-6VMRGXCJ.js} +4 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-6VMRGXCJ.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-43SBKV7A.js → dees-modal-QSZV6TA6.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-4WZ3CPSW.js → dees-workspace-terminal-FXF7TT4M.js} +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-button/dees-actionfooter/dees-actionfooter.d.ts +8 -0
- package/dist_ts_web/elements/00group-button/dees-actionfooter/dees-actionfooter.js +9 -4
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.d.ts +5 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +180 -141
- package/dist_ts_web/i18n/de.d.ts +5 -1
- package/dist_ts_web/i18n/de.js +3 -2
- package/dist_ts_web/i18n/messages.d.ts +5 -1
- package/dist_ts_web/i18n/messages.js +3 -2
- package/package.json +1 -1
- package/readme.md +22 -9
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-button/dees-actionfooter/dees-actionfooter.ts +15 -3
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +232 -188
- package/ts_web/i18n/de.ts +2 -1
- package/ts_web/i18n/messages.ts +2 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-FNI3J2QO.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FGQNHF2X.js.map → chunk-V55MXKAS.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-43SBKV7A.js.map → dees-modal-QSZV6TA6.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-4WZ3CPSW.js.map → dees-workspace-terminal-FXF7TT4M.js.map} +0 -0
package/readme.md
CHANGED
|
@@ -1388,6 +1388,10 @@ html`<dees-actionfooter .context=${card} .actions=${[
|
|
|
1388
1388
|
while one runs.
|
|
1389
1389
|
- **Unavailable.** `disabled: true` on an action keeps it visible but unavailable, as "Clear
|
|
1390
1390
|
filters" while nothing is filtered; `disabled` on the footer makes every action unavailable.
|
|
1391
|
+
- **Running elsewhere.** `pending: true` marks an action whose work runs outside the footer, as
|
|
1392
|
+
a save the host hands on in an event and hears the end of later: its button shows the busy
|
|
1393
|
+
face and the others are unavailable, as while an action's own promise is pending. The host
|
|
1394
|
+
clears it when the work ends; the ticket detail's Save does this.
|
|
1391
1395
|
- **Context.** Each action receives `context`, the dialog, bubble or card the footer belongs to,
|
|
1392
1396
|
or the footer itself when it is unset. `runPrimary()` runs the primary as a press would; a
|
|
1393
1397
|
dialog and a bubble run it on Enter in their form's last field.
|
|
@@ -5473,15 +5477,24 @@ The detail is an integrated view. Its toolbar (back, kind, parent) runs across
|
|
|
5473
5477
|
the top above a hairline. Below it the main column (title, description, source,
|
|
5474
5478
|
links, child tickets and the discussion) scrolls on its own, and the fields and
|
|
5475
5479
|
stamps fill the other side as a full-height column on the sidebar surface, with
|
|
5476
|
-
**Edit ticket** beside the Status.
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5480
|
+
**Edit ticket** beside the Status. Every field keeps its row from ticket to
|
|
5481
|
+
ticket: one without a value (no project, priority, assignee or labels) shows a
|
|
5482
|
+
quiet "—", read out as its words ("No project", "Unassigned"). While a ticket is
|
|
5483
|
+
edited, its title and description stay in the main column and **Cancel** and
|
|
5484
|
+
**Save changes** stand in a [`dees-actionfooter`](#deesactionfooter) at the foot
|
|
5485
|
+
of the fields column, by the fields they save; Save shows its busy face while
|
|
5486
|
+
`.saving` is set. The detail fills the height its container gives it (a sized
|
|
5487
|
+
box, a grid area, a flex item, the modal's body) however long the ticket: what
|
|
5488
|
+
it holds never sets its height, so in a container without one it keeps only its
|
|
5489
|
+
toolbar. The board opens it in a modal as
|
|
5490
|
+
tall as the viewport allows (`height: 'max'`), so the window keeps its size from
|
|
5491
|
+
ticket to ticket and a short ticket leaves room below its main column. At 700px
|
|
5492
|
+
and below it is one column whose height its content sets, for the container to
|
|
5493
|
+
scroll, and the fields follow the title and the description as a full-width
|
|
5494
|
+
section, with the edit's actions at its foot, before the links, the child tickets
|
|
5495
|
+
and the discussion. The fields stand there in the document as well, so the focus
|
|
5496
|
+
order is the order on screen at every width: **Edit ticket** comes before the
|
|
5497
|
+
discussion.
|
|
5485
5498
|
With [`frameless`](#frameless-components), as the board sets it, the detail lines
|
|
5486
5499
|
its content up with the modal's heading through the [region inset](#region-inset).
|
|
5487
5500
|
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '21.
|
|
6
|
+
version: '21.40.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
|
}
|
|
@@ -35,6 +35,12 @@ export interface IActionFooterAction<T = any> extends plugins.tsclass.website.IM
|
|
|
35
35
|
primary?: boolean;
|
|
36
36
|
/** Shown but not available, as "Clear filters" while nothing is filtered. */
|
|
37
37
|
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Running outside the footer, as a save its host hands on in an event and hears the end of later:
|
|
40
|
+
* its button shows the busy face and the other actions are unavailable, as while an action's own
|
|
41
|
+
* promise is pending.
|
|
42
|
+
*/
|
|
43
|
+
pending?: boolean;
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
/** The dees-button types the primary action may take. */
|
|
@@ -189,12 +195,13 @@ export class DeesActionFooter extends DeesElement {
|
|
|
189
195
|
public render(): TemplateResult {
|
|
190
196
|
const primary = this.primaryAction;
|
|
191
197
|
const ordered = primary ? [...this.actions.filter((action) => action !== primary), primary] : this.actions;
|
|
198
|
+
const pending = this.runningAction;
|
|
192
199
|
return html`${this.infoBar.hasInfo(this.info)
|
|
193
200
|
? html`<div class="info">${this.infoBar.render(this.info, this.infoLabel || this.t('actionfooter.info'))}</div>`
|
|
194
201
|
: ''}${ordered.map((action) => html`
|
|
195
202
|
<dees-button class="action" .text=${this.actionName(action)}
|
|
196
|
-
.disabled=${this.disabled || !!action.disabled || (
|
|
197
|
-
.status=${
|
|
203
|
+
.disabled=${this.disabled || !!action.disabled || (pending !== null && pending !== action)}
|
|
204
|
+
.status=${pending === action ? 'pending' : 'normal'}
|
|
198
205
|
.type=${action === primary ? this.primaryActionType : 'secondary'}
|
|
199
206
|
@clicked=${() => this.run(action)}></dees-button>
|
|
200
207
|
`)}`;
|
|
@@ -216,6 +223,11 @@ export class DeesActionFooter extends DeesElement {
|
|
|
216
223
|
if (primary) await this.run(primary);
|
|
217
224
|
}
|
|
218
225
|
|
|
226
|
+
/** The action running: the one whose promise is pending, else one its host marks `pending`. */
|
|
227
|
+
private get runningAction(): IActionFooterAction | null {
|
|
228
|
+
return this.pendingAction ?? this.actions.find((action) => action.pending) ?? null;
|
|
229
|
+
}
|
|
230
|
+
|
|
219
231
|
/** An action's name: the caller's, or the catalog's for an action `catalogAction()` made. */
|
|
220
232
|
private actionName(actionArg: IActionFooterAction): string {
|
|
221
233
|
const word = catalogWords.get(actionArg);
|
|
@@ -223,7 +235,7 @@ export class DeesActionFooter extends DeesElement {
|
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
private async run(actionArg: IActionFooterAction): Promise<void> {
|
|
226
|
-
if (this.
|
|
238
|
+
if (this.runningAction || this.disabled || actionArg.disabled) return;
|
|
227
239
|
if (actionArg === this.primaryAction && this.beforePrimary?.() === false) return;
|
|
228
240
|
this.pendingAction = actionArg;
|
|
229
241
|
try {
|
package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts
CHANGED
|
@@ -54,6 +54,7 @@ import '../../00group-input/dees-input-textarea/dees-input-textarea.js';
|
|
|
54
54
|
import '../../00group-input/dees-input-dropdown/dees-input-dropdown.js';
|
|
55
55
|
import '../../00group-input/dees-input-tags/dees-input-tags.js';
|
|
56
56
|
import '../../00group-input/dees-input-multitoggle/dees-input-multitoggle.js';
|
|
57
|
+
import '../../00group-button/dees-actionfooter/dees-actionfooter.js';
|
|
57
58
|
import '../../00group-utility/dees-icon/dees-icon.js';
|
|
58
59
|
import '../../00group-feedback/dees-hint/dees-hint.js';
|
|
59
60
|
import '../dees-kanban-discussion/dees-kanban-discussion.js';
|
|
@@ -155,8 +156,9 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
155
156
|
css`
|
|
156
157
|
/*
|
|
157
158
|
* The toolbar runs across the top. Under its hairline the main column scrolls on its own
|
|
158
|
-
* and the properties fill the other side down to the bottom edge.
|
|
159
|
-
* modal's body,
|
|
159
|
+
* and the properties fill the other side down to the bottom edge. The detail fills the
|
|
160
|
+
* height its container gives it, as a modal's body does, however long the ticket: what it
|
|
161
|
+
* holds never sets its height.
|
|
160
162
|
*
|
|
161
163
|
* The properties stand between the lead and the rest in the document, so on a phone, where
|
|
162
164
|
* they follow the title and the description, the focus order is the order on screen; beside
|
|
@@ -172,6 +174,7 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
172
174
|
.panes {
|
|
173
175
|
position: relative;
|
|
174
176
|
min-height: 0;
|
|
177
|
+
contain: size;
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
.main {
|
|
@@ -348,15 +351,28 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
348
351
|
top: 0;
|
|
349
352
|
right: 0;
|
|
350
353
|
bottom: 0;
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-direction: column;
|
|
351
356
|
width: 280px;
|
|
352
|
-
padding: 20px var(--detail-inset-inline, 24px) 24px 20px;
|
|
353
357
|
border-left: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
354
358
|
background: var(--dees-color-modal-sidebar);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.properties {
|
|
362
|
+
flex: 1;
|
|
363
|
+
min-height: 0;
|
|
364
|
+
padding: 20px var(--detail-inset-inline, 24px) 24px 20px;
|
|
355
365
|
overflow-y: auto;
|
|
356
366
|
overscroll-behavior: contain;
|
|
357
367
|
scrollbar-width: thin;
|
|
358
368
|
}
|
|
359
369
|
|
|
370
|
+
/* An edit's Save and Cancel stand at the column's foot, by the fields they save, while the fields scroll. */
|
|
371
|
+
.actions {
|
|
372
|
+
flex-shrink: 0;
|
|
373
|
+
padding-inline: 20px var(--detail-inset-inline, 24px);
|
|
374
|
+
}
|
|
375
|
+
|
|
360
376
|
/* Edit ticket shares the Status label's line without making it taller: 1lh is the label's line. */
|
|
361
377
|
.field-head {
|
|
362
378
|
display: flex;
|
|
@@ -402,6 +418,16 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
402
418
|
gap: 7px;
|
|
403
419
|
}
|
|
404
420
|
|
|
421
|
+
/* A property without a value: every row stays, with a quiet dash read out as its words. */
|
|
422
|
+
.unset {
|
|
423
|
+
color: var(--dees-color-text-secondary);
|
|
424
|
+
font-weight: 400;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.unset-words {
|
|
428
|
+
${visuallyHidden}
|
|
429
|
+
}
|
|
430
|
+
|
|
405
431
|
/* When the ticket was created and last changed: below its fields, as sentences. */
|
|
406
432
|
.stamps {
|
|
407
433
|
display: grid;
|
|
@@ -652,6 +678,9 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
652
678
|
gap: 6px;
|
|
653
679
|
padding: var(--dees-spacing-md) var(--detail-inset-inline, 16px);
|
|
654
680
|
}
|
|
681
|
+
.panes {
|
|
682
|
+
contain: none;
|
|
683
|
+
}
|
|
655
684
|
.main {
|
|
656
685
|
height: auto;
|
|
657
686
|
margin-right: 0;
|
|
@@ -671,13 +700,19 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
671
700
|
}
|
|
672
701
|
aside {
|
|
673
702
|
position: static;
|
|
703
|
+
display: block;
|
|
674
704
|
width: auto;
|
|
675
|
-
padding: 16px var(--detail-inset-inline, 16px) 20px;
|
|
676
705
|
border-left: 0;
|
|
677
706
|
border-top: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
678
707
|
border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
708
|
+
}
|
|
709
|
+
.properties {
|
|
710
|
+
padding: 16px var(--detail-inset-inline, 16px) 20px;
|
|
679
711
|
overflow: visible;
|
|
680
712
|
}
|
|
713
|
+
.actions {
|
|
714
|
+
padding-inline: var(--detail-inset-inline, 16px);
|
|
715
|
+
}
|
|
681
716
|
.body {
|
|
682
717
|
margin-top: 0;
|
|
683
718
|
padding-block: 20px 16px;
|
|
@@ -901,33 +936,6 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
901
936
|
@input=${(event: Event) =>
|
|
902
937
|
this.changeDraft({ description: (event.currentTarget as DeesInputTextarea).value })}
|
|
903
938
|
></dees-input-textarea>
|
|
904
|
-
<div class="row">
|
|
905
|
-
<dees-button
|
|
906
|
-
size="sm"
|
|
907
|
-
type="accent"
|
|
908
|
-
text=${this.t('kanban.saveChanges')}
|
|
909
|
-
.disabled=${this.saving ||
|
|
910
|
-
!draft.title.trim() ||
|
|
911
|
-
(this.conflict !== undefined && this.conflict.state !== 'reloaded')}
|
|
912
|
-
.status=${this.saving ? 'pending' : 'normal'}
|
|
913
|
-
@clicked=${() =>
|
|
914
|
-
kanbanEvent(this, 'kanban-ticket-save', { ticketId: ticket.id, draft })}
|
|
915
|
-
></dees-button>
|
|
916
|
-
<dees-button
|
|
917
|
-
size="sm"
|
|
918
|
-
type="ghost"
|
|
919
|
-
text=${this.t('common.cancel')}
|
|
920
|
-
.disabled=${this.saving}
|
|
921
|
-
@clicked=${() => {
|
|
922
|
-
this.editing = false;
|
|
923
|
-
this.draft = undefined;
|
|
924
|
-
kanbanEvent(this, 'kanban-ticket-draft', {
|
|
925
|
-
ticketId: ticket.id,
|
|
926
|
-
draft: undefined,
|
|
927
|
-
});
|
|
928
|
-
}}
|
|
929
|
-
></dees-button>
|
|
930
|
-
</div>
|
|
931
939
|
</div>`
|
|
932
940
|
: html`<h2>${ticket.title}</h2>
|
|
933
941
|
<div
|
|
@@ -936,174 +944,197 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
936
944
|
${ticket.source ? this.renderSource(ticket.source) : ''}
|
|
937
945
|
</section>
|
|
938
946
|
<aside>
|
|
939
|
-
<div class="
|
|
940
|
-
<div class="
|
|
941
|
-
<div class="
|
|
942
|
-
<
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
947
|
+
<div class="properties">
|
|
948
|
+
<div class="fields">
|
|
949
|
+
<div class="status">
|
|
950
|
+
<div class="field-head">
|
|
951
|
+
<label class="caption">${this.t('kanban.status')}</label>
|
|
952
|
+
${editable && !this.editing
|
|
953
|
+
? html`<dees-button
|
|
954
|
+
size="sm"
|
|
955
|
+
type="ghost"
|
|
956
|
+
text=${this.t('kanban.editTicket')}
|
|
957
|
+
icon="lucide:Pencil"
|
|
958
|
+
@clicked=${() => {
|
|
959
|
+
this.editing = true;
|
|
960
|
+
this.changeDraft({});
|
|
961
|
+
}}
|
|
962
|
+
></dees-button>`
|
|
963
|
+
: ''}
|
|
964
|
+
</div>
|
|
965
|
+
<dees-input-dropdown
|
|
966
|
+
label=${this.t('kanban.status')}
|
|
967
|
+
.labelPosition=${'none'}
|
|
968
|
+
.options=${this.columns.map(column => ({ key: column.id, option: column.title }))}
|
|
969
|
+
.value=${{
|
|
970
|
+
key: ticket.columnId,
|
|
971
|
+
option:
|
|
972
|
+
this.columns.find(column => column.id === ticket.columnId)?.title ??
|
|
973
|
+
ticket.columnId,
|
|
974
|
+
}}
|
|
975
|
+
.disabled=${!movable || this.saving}
|
|
976
|
+
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
977
|
+
kanbanEvent(this, 'kanban-ticket-move', {
|
|
978
|
+
ticketId: ticket.id,
|
|
979
|
+
columnId: event.detail.key,
|
|
980
|
+
})}
|
|
981
|
+
></dees-input-dropdown>
|
|
955
982
|
</div>
|
|
956
|
-
|
|
957
|
-
label=${this.t('kanban.status')}
|
|
958
|
-
.labelPosition=${'none'}
|
|
959
|
-
.options=${this.columns.map(column => ({ key: column.id, option: column.title }))}
|
|
960
|
-
.value=${{
|
|
961
|
-
key: ticket.columnId,
|
|
962
|
-
option:
|
|
963
|
-
this.columns.find(column => column.id === ticket.columnId)?.title ??
|
|
964
|
-
ticket.columnId,
|
|
965
|
-
}}
|
|
966
|
-
.disabled=${!movable || this.saving}
|
|
967
|
-
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
968
|
-
kanbanEvent(this, 'kanban-ticket-move', {
|
|
969
|
-
ticketId: ticket.id,
|
|
970
|
-
columnId: event.detail.key,
|
|
971
|
-
})}
|
|
972
|
-
></dees-input-dropdown>
|
|
973
|
-
</div>
|
|
974
|
-
${this.editing && editable && projects.length
|
|
975
|
-
? html`<div>
|
|
976
|
-
<label class="caption">${this.t('kanban.project')}</label>
|
|
977
|
-
<dees-input-dropdown
|
|
978
|
-
label=${this.t('kanban.project')}
|
|
979
|
-
.labelPosition=${'none'}
|
|
980
|
-
.disabled=${this.saving}
|
|
981
|
-
.value=${{
|
|
982
|
-
key: draft.project ?? '',
|
|
983
|
-
option: draft.project
|
|
984
|
-
? kanbanProjectName(projects, draft.project)
|
|
985
|
-
: this.t('kanban.noProject'),
|
|
986
|
-
}}
|
|
987
|
-
.options=${[
|
|
988
|
-
...(ticket.project ? [] : [{ key: '', option: this.t('kanban.noProject') }]),
|
|
989
|
-
...projects.map(project => ({ key: project.id, option: project.name })),
|
|
990
|
-
]}
|
|
991
|
-
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
992
|
-
this.changeDraft({ project: event.detail.key })}
|
|
993
|
-
></dees-input-dropdown>
|
|
994
|
-
</div>`
|
|
995
|
-
: ticket.project || projects.length
|
|
983
|
+
${this.editing && editable && projects.length
|
|
996
984
|
? html`<div>
|
|
997
985
|
<label class="caption">${this.t('kanban.project')}</label>
|
|
998
|
-
<
|
|
999
|
-
|
|
1000
|
-
|
|
986
|
+
<dees-input-dropdown
|
|
987
|
+
label=${this.t('kanban.project')}
|
|
988
|
+
.labelPosition=${'none'}
|
|
989
|
+
.disabled=${this.saving}
|
|
990
|
+
.value=${{
|
|
991
|
+
key: draft.project ?? '',
|
|
992
|
+
option: draft.project
|
|
993
|
+
? kanbanProjectName(projects, draft.project)
|
|
994
|
+
: this.t('kanban.noProject'),
|
|
995
|
+
}}
|
|
996
|
+
.options=${[
|
|
997
|
+
...(ticket.project ? [] : [{ key: '', option: this.t('kanban.noProject') }]),
|
|
998
|
+
...projects.map(project => ({ key: project.id, option: project.name })),
|
|
999
|
+
]}
|
|
1000
|
+
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1001
|
+
this.changeDraft({ project: event.detail.key })}
|
|
1002
|
+
></dees-input-dropdown>
|
|
1001
1003
|
</div>`
|
|
1002
|
-
:
|
|
1003
|
-
${this.editing && editable
|
|
1004
|
-
? html`
|
|
1005
|
-
<div>
|
|
1006
|
-
<label class="caption">${this.t('kanban.priorityLabel')}</label>
|
|
1007
|
-
<dees-input-dropdown
|
|
1008
|
-
label=${this.t('kanban.priorityLabel')}
|
|
1009
|
-
.labelPosition=${'none'}
|
|
1010
|
-
.disabled=${this.saving}
|
|
1011
|
-
.value=${{ key: draft.priority, option: this.t('kanban.priority', { priority: draft.priority }) }}
|
|
1012
|
-
.options=${(['none', 'low', 'normal', 'high', 'urgent'] as const).map(key => ({
|
|
1013
|
-
key,
|
|
1014
|
-
option: this.t('kanban.priority', { priority: key }),
|
|
1015
|
-
}))}
|
|
1016
|
-
@selectedOption=${(event: CustomEvent<{ key: TKanbanPriority }>) =>
|
|
1017
|
-
this.changeDraft({ priority: event.detail.key })}
|
|
1018
|
-
></dees-input-dropdown>
|
|
1019
|
-
</div>
|
|
1020
|
-
<div>
|
|
1021
|
-
<label class="caption">${this.t('kanban.assignee')}</label>
|
|
1022
|
-
<dees-input-dropdown
|
|
1023
|
-
label=${this.t('kanban.assignee')}
|
|
1024
|
-
.labelPosition=${'none'}
|
|
1025
|
-
.disabled=${this.saving}
|
|
1026
|
-
.value=${{
|
|
1027
|
-
key: draft.assigneeId,
|
|
1028
|
-
option:
|
|
1029
|
-
this.people.find(person => person.id === draft.assigneeId)?.name ??
|
|
1030
|
-
ticket.assignee?.name ??
|
|
1031
|
-
this.t('kanban.unassigned'),
|
|
1032
|
-
}}
|
|
1033
|
-
.options=${[
|
|
1034
|
-
{ key: '', option: this.t('kanban.unassigned') },
|
|
1035
|
-
...this.people.map(person => ({ key: person.id, option: person.name })),
|
|
1036
|
-
]}
|
|
1037
|
-
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1038
|
-
this.changeDraft({ assigneeId: event.detail.key })}
|
|
1039
|
-
></dees-input-dropdown>
|
|
1040
|
-
</div>
|
|
1041
|
-
${ticket.kind !== 'epic'
|
|
1004
|
+
: ticket.project || projects.length
|
|
1042
1005
|
? html`<div>
|
|
1043
|
-
<label class="caption">${this.t(
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
.
|
|
1047
|
-
.disabled=${this.saving}
|
|
1048
|
-
.value=${{
|
|
1049
|
-
key: draft.parentId,
|
|
1050
|
-
option: parents.find(item => item.id === draft.parentId)?.title ?? this.t('kanban.none'),
|
|
1051
|
-
}}
|
|
1052
|
-
.options=${[
|
|
1053
|
-
...(ticket.kind === 'task' ? [{ key: '', option: this.t('kanban.none') }] : []),
|
|
1054
|
-
...parents.map(item => ({ key: item.id, option: ticketLabel(item) })),
|
|
1055
|
-
]}
|
|
1056
|
-
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1057
|
-
this.changeDraft({ parentId: event.detail.key })}
|
|
1058
|
-
></dees-input-dropdown>
|
|
1006
|
+
<label class="caption">${this.t('kanban.project')}</label>
|
|
1007
|
+
${ticket.project
|
|
1008
|
+
? html`<span class="value">${kanbanProjectName(projects, ticket.project)}</span>`
|
|
1009
|
+
: this.renderUnset(this.t('kanban.noProject'))}
|
|
1059
1010
|
</div>`
|
|
1060
1011
|
: ''}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
<
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
<
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1012
|
+
${this.editing && editable
|
|
1013
|
+
? html`
|
|
1014
|
+
<div>
|
|
1015
|
+
<label class="caption">${this.t('kanban.priorityLabel')}</label>
|
|
1016
|
+
<dees-input-dropdown
|
|
1017
|
+
label=${this.t('kanban.priorityLabel')}
|
|
1018
|
+
.labelPosition=${'none'}
|
|
1019
|
+
.disabled=${this.saving}
|
|
1020
|
+
.value=${{ key: draft.priority, option: this.t('kanban.priority', { priority: draft.priority }) }}
|
|
1021
|
+
.options=${(['none', 'low', 'normal', 'high', 'urgent'] as const).map(key => ({
|
|
1022
|
+
key,
|
|
1023
|
+
option: this.t('kanban.priority', { priority: key }),
|
|
1024
|
+
}))}
|
|
1025
|
+
@selectedOption=${(event: CustomEvent<{ key: TKanbanPriority }>) =>
|
|
1026
|
+
this.changeDraft({ priority: event.detail.key })}
|
|
1027
|
+
></dees-input-dropdown>
|
|
1028
|
+
</div>
|
|
1029
|
+
<div>
|
|
1030
|
+
<label class="caption">${this.t('kanban.assignee')}</label>
|
|
1031
|
+
<dees-input-dropdown
|
|
1032
|
+
label=${this.t('kanban.assignee')}
|
|
1033
|
+
.labelPosition=${'none'}
|
|
1034
|
+
.disabled=${this.saving}
|
|
1035
|
+
.value=${{
|
|
1036
|
+
key: draft.assigneeId,
|
|
1037
|
+
option:
|
|
1038
|
+
this.people.find(person => person.id === draft.assigneeId)?.name ??
|
|
1039
|
+
ticket.assignee?.name ??
|
|
1040
|
+
this.t('kanban.unassigned'),
|
|
1041
|
+
}}
|
|
1042
|
+
.options=${[
|
|
1043
|
+
{ key: '', option: this.t('kanban.unassigned') },
|
|
1044
|
+
...this.people.map(person => ({ key: person.id, option: person.name })),
|
|
1045
|
+
]}
|
|
1046
|
+
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1047
|
+
this.changeDraft({ assigneeId: event.detail.key })}
|
|
1048
|
+
></dees-input-dropdown>
|
|
1049
|
+
</div>
|
|
1050
|
+
${ticket.kind !== 'epic'
|
|
1051
|
+
? html`<div>
|
|
1052
|
+
<label class="caption">${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}</label>
|
|
1053
|
+
<dees-input-dropdown
|
|
1054
|
+
label=${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}
|
|
1055
|
+
.labelPosition=${'none'}
|
|
1056
|
+
.disabled=${this.saving}
|
|
1057
|
+
.value=${{
|
|
1058
|
+
key: draft.parentId,
|
|
1059
|
+
option: parents.find(item => item.id === draft.parentId)?.title ?? this.t('kanban.none'),
|
|
1060
|
+
}}
|
|
1061
|
+
.options=${[
|
|
1062
|
+
...(ticket.kind === 'task' ? [{ key: '', option: this.t('kanban.none') }] : []),
|
|
1063
|
+
...parents.map(item => ({ key: item.id, option: ticketLabel(item) })),
|
|
1064
|
+
]}
|
|
1065
|
+
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1066
|
+
this.changeDraft({ parentId: event.detail.key })}
|
|
1067
|
+
></dees-input-dropdown>
|
|
1068
|
+
</div>`
|
|
1069
|
+
: ''}
|
|
1070
|
+
`
|
|
1071
|
+
: html`<div>
|
|
1072
|
+
<label class="caption">${this.t('kanban.priorityLabel')}</label>
|
|
1073
|
+
${ticket.priority && ticket.priority !== 'none'
|
|
1074
|
+
? html`<span class="priority value" data-priority=${ticket.priority}><dees-icon
|
|
1075
|
+
.icon=${kanbanPriorityIcon(ticket.priority)}
|
|
1076
|
+
iconSize="13"
|
|
1077
|
+
aria-hidden="true"
|
|
1078
|
+
></dees-icon>${this.t('kanban.priority', { priority: ticket.priority })}</span>`
|
|
1079
|
+
: this.renderUnset(this.t('kanban.priority', { priority: 'none' }))}
|
|
1080
|
+
</div>
|
|
1081
|
+
<div>
|
|
1082
|
+
<label class="caption">${this.t('kanban.assignee')}</label>
|
|
1083
|
+
${ticket.assignee
|
|
1084
|
+
? html`<span class="person value"><span class="avatar" aria-hidden="true">${kanbanInitials(
|
|
1085
|
+
ticket.assignee.name,
|
|
1086
|
+
)}</span>${ticket.assignee.name}</span>`
|
|
1087
|
+
: this.renderUnset(this.t('kanban.unassigned'))}
|
|
1088
|
+
</div>`}
|
|
1089
|
+
${this.editing && editable
|
|
1094
1090
|
? html`<div class="labels">
|
|
1095
1091
|
<label class="caption">${this.t('kanban.labels')}</label>
|
|
1096
|
-
<
|
|
1097
|
-
|
|
1098
|
-
|
|
1092
|
+
<dees-input-tags
|
|
1093
|
+
label=${this.t('kanban.labels')}
|
|
1094
|
+
.labelPosition=${'none'}
|
|
1095
|
+
.disabled=${this.saving}
|
|
1096
|
+
.value=${draft.labels ?? ticket.labels ?? []}
|
|
1097
|
+
.suggestions=${labels}
|
|
1098
|
+
.placeholder=${this.t('kanban.labelsPlaceholder')}
|
|
1099
|
+
@change=${(event: CustomEvent<{ value: string[] }>) => {
|
|
1100
|
+
event.stopPropagation();
|
|
1101
|
+
this.changeDraft({ labels: [...event.detail.value] });
|
|
1102
|
+
}}
|
|
1103
|
+
@input=${(event: Event) => event.stopPropagation()}
|
|
1104
|
+
></dees-input-tags>
|
|
1099
1105
|
</div>`
|
|
1100
|
-
:
|
|
1106
|
+
: html`<div class="labels">
|
|
1107
|
+
<label class="caption">${this.t('kanban.labels')}</label>
|
|
1108
|
+
${ticket.labels?.length
|
|
1109
|
+
? html`<div class="row value">
|
|
1110
|
+
${ticket.labels.map(label => html`<span class="badge">${label}</span>`)}
|
|
1111
|
+
</div>`
|
|
1112
|
+
: this.renderUnset(this.t('kanban.noLabels'))}
|
|
1113
|
+
</div>`}
|
|
1114
|
+
</div>
|
|
1115
|
+
${ticket.createdAt || ticket.updatedAt
|
|
1116
|
+
? html`<footer class="stamps">
|
|
1117
|
+
${ticket.createdAt ? this.renderStamp('created', ticket.createdAt, ticket.createdBy) : ''}
|
|
1118
|
+
${ticket.updatedAt ? this.renderStamp('updated', ticket.updatedAt, ticket.updatedBy) : ''}
|
|
1119
|
+
</footer>`
|
|
1120
|
+
: ''}
|
|
1101
1121
|
</div>
|
|
1102
|
-
${
|
|
1103
|
-
? html`<
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1122
|
+
${this.editing && editable
|
|
1123
|
+
? html`<dees-actionfooter
|
|
1124
|
+
class="actions"
|
|
1125
|
+
.actions=${[
|
|
1126
|
+
{ name: this.t('common.cancel'), action: async () => this.cancelEdit(ticket) },
|
|
1127
|
+
{
|
|
1128
|
+
name: this.t('kanban.saveChanges'),
|
|
1129
|
+
pending: this.saving,
|
|
1130
|
+
disabled:
|
|
1131
|
+
!draft.title.trim() ||
|
|
1132
|
+
(this.conflict !== undefined && this.conflict.state !== 'reloaded'),
|
|
1133
|
+
action: async () =>
|
|
1134
|
+
kanbanEvent(this, 'kanban-ticket-save', { ticketId: ticket.id, draft }),
|
|
1135
|
+
},
|
|
1136
|
+
]}
|
|
1137
|
+
></dees-actionfooter>`
|
|
1107
1138
|
: ''}
|
|
1108
1139
|
</aside>
|
|
1109
1140
|
<div class="body">
|
|
@@ -1297,6 +1328,19 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
1297
1328
|
: html`<div class="child">${content}</div>`}</li>`;
|
|
1298
1329
|
}
|
|
1299
1330
|
|
|
1331
|
+
/** A property without a value: a quiet dash, read out as its words. */
|
|
1332
|
+
private renderUnset(words: string): TemplateResult {
|
|
1333
|
+
return html`<span class="value unset"><span aria-hidden="true">—</span><span class="unset-words"
|
|
1334
|
+
>${words}</span></span>`;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/** Leaves the edit and lets go of its draft. */
|
|
1338
|
+
private cancelEdit(ticket: IKanbanTicket): void {
|
|
1339
|
+
this.editing = false;
|
|
1340
|
+
this.draft = undefined;
|
|
1341
|
+
kanbanEvent(this, 'kanban-ticket-draft', { ticketId: ticket.id, draft: undefined });
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1300
1344
|
/** When the ticket was created or last changed, and by whom, in a sentence. */
|
|
1301
1345
|
private renderStamp(kind: 'created' | 'updated', at: string, by: IKanbanPerson | undefined): TemplateResult {
|
|
1302
1346
|
const date = new Date(at);
|
package/ts_web/i18n/de.ts
CHANGED
|
@@ -886,7 +886,7 @@ export default dcMessages.translation('de', {
|
|
|
886
886
|
'kanban.kind': '{kind, select, epic {Epic} task {Aufgabe} subtask {Teilaufgabe} other {Ticket}}',
|
|
887
887
|
'kanban.editTicket': 'Ticket bearbeiten',
|
|
888
888
|
'kanban.description': 'Beschreibung',
|
|
889
|
-
'kanban.saveChanges': '
|
|
889
|
+
'kanban.saveChanges': 'Speichern',
|
|
890
890
|
'kanban.noDescription': 'Noch keine Beschreibung.',
|
|
891
891
|
'kanban.status': 'Status',
|
|
892
892
|
'kanban.priorityLabel': 'Priorität',
|
|
@@ -894,6 +894,7 @@ export default dcMessages.translation('de', {
|
|
|
894
894
|
'kanban.parentTask': 'Übergeordnete Aufgabe',
|
|
895
895
|
'kanban.none': 'Kein Epic',
|
|
896
896
|
'kanban.labels': 'Labels',
|
|
897
|
+
'kanban.noLabels': 'Keine Labels',
|
|
897
898
|
'kanban.children': '{kind, select, epic {Aufgaben} task {Teilaufgaben} other {Teilaufgaben}}',
|
|
898
899
|
'kanban.addChild': '{kind, select, epic {Aufgabe hinzufügen} task {Teilaufgabe hinzufügen} other {Teilaufgabe hinzufügen}}',
|
|
899
900
|
'kanban.noChildren': '{kind, select, epic {Noch keine Aufgaben.} task {Noch keine Teilaufgaben.} other {Noch keine Teilaufgaben.}}',
|