@design.estate/dees-catalog 21.37.0 → 21.38.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 +396 -294
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-NJSNFLQO.js → chunk-H5AZRDKM.js} +31 -12
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-NJSNFLQO.js.map → chunk-H5AZRDKM.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-LSCUUCAI.js → chunk-MFMMXJXV.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-T7SYOP3V.js → dees-modal-IBYJBCAQ.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-FE7RIZKQ.js → dees-workspace-terminal-EVDB2ODT.js} +3 -3
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00anchorplacement.d.ts +1 -1
- package/dist_ts_web/elements/00anchorplacement.js +37 -6
- package/dist_ts_web/elements/00group-input/dees-input-tags/dees-input-tags.d.ts +10 -0
- package/dist_ts_web/elements/00group-input/dees-input-tags/dees-input-tags.js +111 -62
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +5 -1
- 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 +271 -210
- package/dist_ts_web/elements/00group-overlay/dees-modal/dees-modal.d.ts +12 -6
- package/dist_ts_web/elements/00group-overlay/dees-modal/dees-modal.js +14 -8
- package/package.json +1 -1
- package/readme.md +23 -8
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00anchorplacement.ts +37 -5
- package/ts_web/elements/00group-input/dees-input-tags/dees-input-tags.ts +112 -58
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +4 -0
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +318 -262
- package/ts_web/elements/00group-overlay/dees-modal/dees-modal.ts +19 -10
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-LSCUUCAI.js.map → chunk-MFMMXJXV.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-T7SYOP3V.js.map → dees-modal-IBYJBCAQ.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-FE7RIZKQ.js.map → dees-workspace-terminal-EVDB2ODT.js.map} +0 -0
package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import { dcLocalize } from '../../../i18n/localize.js';
|
|
11
11
|
import { fileSize } from '../../../i18n/formats.js';
|
|
12
12
|
import { visuallyHidden } from '../../00visuallyhidden.js';
|
|
13
|
+
import { insetInlineStyles } from '../../00theme.js';
|
|
13
14
|
import type {
|
|
14
15
|
IKanbanActivity,
|
|
15
16
|
IKanbanColumn,
|
|
@@ -128,6 +129,13 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
128
129
|
@property({ type: Boolean, reflect: true })
|
|
129
130
|
accessor showTicketKey = true;
|
|
130
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The detail draws no box of its own; frameless, its edges are its host's edges, so the toolbar,
|
|
134
|
+
* the main column and the outer side of the properties take the region inset `--dees-inset-inline`.
|
|
135
|
+
*/
|
|
136
|
+
@property({ type: Boolean, reflect: true })
|
|
137
|
+
accessor frameless = false;
|
|
138
|
+
|
|
131
139
|
/** The save of this ticket the provider refused as stale, while the board holds it. */
|
|
132
140
|
@property({ attribute: false })
|
|
133
141
|
accessor conflict: IKanbanEditConflict | undefined;
|
|
@@ -143,30 +151,44 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
143
151
|
|
|
144
152
|
public static styles = [
|
|
145
153
|
...kanbanStyles,
|
|
154
|
+
insetInlineStyles('--detail-inset-inline'),
|
|
146
155
|
css`
|
|
147
156
|
/*
|
|
148
157
|
* The toolbar runs across the top. Under its hairline the main column scrolls on its own
|
|
149
158
|
* and the properties fill the other side down to the bottom edge. Given a height, such as a
|
|
150
|
-
* modal's body, the detail fills it; otherwise
|
|
159
|
+
* modal's body, the detail fills it; otherwise the main column sets its height.
|
|
160
|
+
*
|
|
161
|
+
* The properties stand between the lead and the rest in the document, so on a phone, where
|
|
162
|
+
* they follow the title and the description, the focus order is the order on screen; beside
|
|
163
|
+
* the main column they are placed against the panes, outside its scroll.
|
|
151
164
|
*/
|
|
152
165
|
:host {
|
|
153
166
|
display: grid;
|
|
154
|
-
grid-template-columns: minmax(0, 1fr) 280px;
|
|
155
167
|
grid-template-rows: auto minmax(0, 1fr);
|
|
156
|
-
grid-template-areas: 'toolbar toolbar' 'main props';
|
|
157
168
|
height: 100%;
|
|
158
169
|
min-height: 0;
|
|
159
170
|
}
|
|
160
171
|
|
|
172
|
+
.panes {
|
|
173
|
+
position: relative;
|
|
174
|
+
min-height: 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
161
177
|
.main {
|
|
162
|
-
|
|
178
|
+
height: 100%;
|
|
163
179
|
min-width: 0;
|
|
164
|
-
|
|
180
|
+
margin-right: 280px;
|
|
181
|
+
padding: 20px 24px 24px var(--detail-inset-inline, 24px);
|
|
165
182
|
overflow-y: auto;
|
|
166
183
|
overscroll-behavior: contain;
|
|
167
184
|
scrollbar-width: thin;
|
|
168
185
|
}
|
|
169
186
|
|
|
187
|
+
/* Positioned content of the main column is placed in it, so it scrolls with it, not over the panes. */
|
|
188
|
+
.main > :not(aside) {
|
|
189
|
+
position: relative;
|
|
190
|
+
}
|
|
191
|
+
|
|
170
192
|
.lead {
|
|
171
193
|
min-width: 0;
|
|
172
194
|
}
|
|
@@ -177,10 +199,9 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
177
199
|
}
|
|
178
200
|
|
|
179
201
|
.toolbar {
|
|
180
|
-
grid-area: toolbar;
|
|
181
202
|
flex-wrap: nowrap;
|
|
182
203
|
min-width: 0;
|
|
183
|
-
padding: var(--dees-spacing-md) 24px 14px;
|
|
204
|
+
padding: var(--dees-spacing-md) var(--detail-inset-inline, 24px) 14px;
|
|
184
205
|
border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
185
206
|
}
|
|
186
207
|
|
|
@@ -323,9 +344,12 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
323
344
|
|
|
324
345
|
/* The properties are the side of the surface, not a box on it; they stay while the main column scrolls. */
|
|
325
346
|
aside {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
347
|
+
position: absolute;
|
|
348
|
+
top: 0;
|
|
349
|
+
right: 0;
|
|
350
|
+
bottom: 0;
|
|
351
|
+
width: 280px;
|
|
352
|
+
padding: 20px var(--detail-inset-inline, 24px) 24px 20px;
|
|
329
353
|
border-left: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
330
354
|
background: var(--dees-color-modal-sidebar);
|
|
331
355
|
overflow-y: auto;
|
|
@@ -618,7 +642,7 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
618
642
|
grid-area: apply;
|
|
619
643
|
}
|
|
620
644
|
|
|
621
|
-
/* One column the container scrolls; the properties follow the
|
|
645
|
+
/* One column the container scrolls; the properties follow the title and the description as a full-width band. */
|
|
622
646
|
@media (max-width: 700px) {
|
|
623
647
|
:host {
|
|
624
648
|
display: block;
|
|
@@ -626,18 +650,44 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
626
650
|
}
|
|
627
651
|
.toolbar {
|
|
628
652
|
gap: 6px;
|
|
629
|
-
padding: var(--dees-spacing-md) 16px;
|
|
653
|
+
padding: var(--dees-spacing-md) var(--detail-inset-inline, 16px);
|
|
630
654
|
}
|
|
631
655
|
.main {
|
|
632
|
-
|
|
656
|
+
height: auto;
|
|
657
|
+
margin-right: 0;
|
|
658
|
+
padding: 0;
|
|
633
659
|
overflow: visible;
|
|
634
660
|
}
|
|
661
|
+
.main > .error,
|
|
662
|
+
.lead,
|
|
663
|
+
.body {
|
|
664
|
+
padding-inline: var(--detail-inset-inline, 16px);
|
|
665
|
+
}
|
|
666
|
+
.main > .error {
|
|
667
|
+
padding-block: 10px 0;
|
|
668
|
+
}
|
|
669
|
+
.lead {
|
|
670
|
+
padding-block: 16px 20px;
|
|
671
|
+
}
|
|
635
672
|
aside {
|
|
636
|
-
|
|
673
|
+
position: static;
|
|
674
|
+
width: auto;
|
|
675
|
+
padding: 16px var(--detail-inset-inline, 16px) 20px;
|
|
637
676
|
border-left: 0;
|
|
638
677
|
border-top: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
678
|
+
border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
639
679
|
overflow: visible;
|
|
640
680
|
}
|
|
681
|
+
.body {
|
|
682
|
+
margin-top: 0;
|
|
683
|
+
padding-block: 20px 16px;
|
|
684
|
+
}
|
|
685
|
+
/* The band above already sets the discussion apart. */
|
|
686
|
+
.body > .discussion:first-child,
|
|
687
|
+
.body > .feed:first-child {
|
|
688
|
+
border-top: 0;
|
|
689
|
+
padding-top: 0;
|
|
690
|
+
}
|
|
641
691
|
.fields {
|
|
642
692
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
643
693
|
}
|
|
@@ -645,6 +695,10 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
645
695
|
.fields .status {
|
|
646
696
|
grid-column: 1 / -1;
|
|
647
697
|
}
|
|
698
|
+
/* Labels left alone on a row take the row, so their chips and suggestions have the width. */
|
|
699
|
+
.fields .labels:nth-child(even) {
|
|
700
|
+
grid-column: 1 / -1;
|
|
701
|
+
}
|
|
648
702
|
.child {
|
|
649
703
|
gap: 7px;
|
|
650
704
|
}
|
|
@@ -823,283 +877,285 @@ export class DeesKanbanTicketDetail extends DeesElement {
|
|
|
823
877
|
>${parent.title}</button>`
|
|
824
878
|
: ''}
|
|
825
879
|
</div>
|
|
826
|
-
<div class="
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
@input=${(event: Event) =>
|
|
837
|
-
this.changeDraft({
|
|
838
|
-
title: String((event.currentTarget as DeesInputText).value ?? ''),
|
|
839
|
-
})}
|
|
840
|
-
></dees-input-text>
|
|
841
|
-
<dees-input-textarea
|
|
842
|
-
label=${this.t('kanban.description')}
|
|
843
|
-
.value=${draft.description}
|
|
844
|
-
.rows=${5}
|
|
845
|
-
.disabled=${this.saving}
|
|
846
|
-
@input=${(event: Event) =>
|
|
847
|
-
this.changeDraft({ description: (event.currentTarget as DeesInputTextarea).value })}
|
|
848
|
-
></dees-input-textarea>
|
|
849
|
-
<div class="row">
|
|
850
|
-
<dees-button
|
|
851
|
-
size="sm"
|
|
852
|
-
type="accent"
|
|
853
|
-
text=${this.t('kanban.saveChanges')}
|
|
854
|
-
.disabled=${this.saving ||
|
|
855
|
-
!draft.title.trim() ||
|
|
856
|
-
(this.conflict !== undefined && this.conflict.state !== 'reloaded')}
|
|
857
|
-
.status=${this.saving ? 'pending' : 'normal'}
|
|
858
|
-
@clicked=${() =>
|
|
859
|
-
kanbanEvent(this, 'kanban-ticket-save', { ticketId: ticket.id, draft })}
|
|
860
|
-
></dees-button>
|
|
861
|
-
<dees-button
|
|
862
|
-
size="sm"
|
|
863
|
-
type="ghost"
|
|
864
|
-
text=${this.t('common.cancel')}
|
|
880
|
+
<div class="panes">
|
|
881
|
+
<div class="main">
|
|
882
|
+
${this.error ? html`<p class="error" role="alert">${this.error}</p>` : ''}
|
|
883
|
+
<section class="lead">
|
|
884
|
+
${this.editing && editable
|
|
885
|
+
? html`<div class="edit">
|
|
886
|
+
${this.conflict ? this.renderConflict(ticket, this.conflict, parents, projects) : ''}
|
|
887
|
+
<dees-input-text
|
|
888
|
+
label=${this.t('kanban.ticketTitle')}
|
|
889
|
+
.value=${draft.title}
|
|
865
890
|
.disabled=${this.saving}
|
|
866
|
-
@
|
|
867
|
-
this.
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
891
|
+
@input=${(event: Event) =>
|
|
892
|
+
this.changeDraft({
|
|
893
|
+
title: String((event.currentTarget as DeesInputText).value ?? ''),
|
|
894
|
+
})}
|
|
895
|
+
></dees-input-text>
|
|
896
|
+
<dees-input-textarea
|
|
897
|
+
label=${this.t('kanban.description')}
|
|
898
|
+
.value=${draft.description}
|
|
899
|
+
.rows=${5}
|
|
900
|
+
.disabled=${this.saving}
|
|
901
|
+
@input=${(event: Event) =>
|
|
902
|
+
this.changeDraft({ description: (event.currentTarget as DeesInputTextarea).value })}
|
|
903
|
+
></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
|
+
</div>`
|
|
932
|
+
: html`<h2>${ticket.title}</h2>
|
|
933
|
+
<div
|
|
934
|
+
class="description ${ticket.description ? '' : 'muted'}"
|
|
935
|
+
>${ticket.description || this.t('kanban.noDescription')}</div>`}
|
|
936
|
+
${ticket.source ? this.renderSource(ticket.source) : ''}
|
|
937
|
+
</section>
|
|
938
|
+
<aside>
|
|
939
|
+
<div class="fields">
|
|
940
|
+
<div class="status">
|
|
941
|
+
<div class="field-head">
|
|
942
|
+
<label class="caption">${this.t('kanban.status')}</label>
|
|
943
|
+
${editable && !this.editing
|
|
900
944
|
? html`<dees-button
|
|
901
945
|
size="sm"
|
|
902
946
|
type="ghost"
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
@clicked=${() =>
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
columnId: this.columns[0]?.id ?? ticket.columnId,
|
|
910
|
-
})}
|
|
947
|
+
text=${this.t('kanban.editTicket')}
|
|
948
|
+
icon="lucide:Pencil"
|
|
949
|
+
@clicked=${() => {
|
|
950
|
+
this.editing = true;
|
|
951
|
+
this.changeDraft({});
|
|
952
|
+
}}
|
|
911
953
|
></dees-button>`
|
|
912
954
|
: ''}
|
|
913
955
|
</div>
|
|
914
|
-
<div class="child-list">${children.map(child => html`<button
|
|
915
|
-
class="child"
|
|
916
|
-
@click=${() => kanbanEvent(this, 'kanban-ticket-open', { ticketId: child.id })}
|
|
917
|
-
>
|
|
918
|
-
<span class="child-key">${child.key}</span>
|
|
919
|
-
<span class="child-title">${child.title}</span>
|
|
920
|
-
<span class="badge">${this.columns.find(
|
|
921
|
-
column => column.id === child.columnId,
|
|
922
|
-
)?.title ?? child.columnId}</span>
|
|
923
|
-
</button>`)}</div>
|
|
924
|
-
${!children.length
|
|
925
|
-
? html`<p class="caption">${this.t('kanban.noChildren', { kind: ticket.kind })}</p>`
|
|
926
|
-
: ''}
|
|
927
|
-
</section>`
|
|
928
|
-
: ''}
|
|
929
|
-
${this.provider.loadActivity ? this.renderFeed(ticket) : this.renderDiscussion(ticket)}
|
|
930
|
-
</div>
|
|
931
|
-
</div>
|
|
932
|
-
<aside>
|
|
933
|
-
<div class="fields">
|
|
934
|
-
<div class="status">
|
|
935
|
-
<div class="field-head">
|
|
936
|
-
<label class="caption">${this.t('kanban.status')}</label>
|
|
937
|
-
${editable && !this.editing
|
|
938
|
-
? html`<dees-button
|
|
939
|
-
size="sm"
|
|
940
|
-
type="ghost"
|
|
941
|
-
text=${this.t('kanban.editTicket')}
|
|
942
|
-
icon="lucide:Pencil"
|
|
943
|
-
@clicked=${() => {
|
|
944
|
-
this.editing = true;
|
|
945
|
-
this.changeDraft({});
|
|
946
|
-
}}
|
|
947
|
-
></dees-button>`
|
|
948
|
-
: ''}
|
|
949
|
-
</div>
|
|
950
|
-
<dees-input-dropdown
|
|
951
|
-
label=${this.t('kanban.status')}
|
|
952
|
-
.labelPosition=${'none'}
|
|
953
|
-
.options=${this.columns.map(column => ({ key: column.id, option: column.title }))}
|
|
954
|
-
.value=${{
|
|
955
|
-
key: ticket.columnId,
|
|
956
|
-
option:
|
|
957
|
-
this.columns.find(column => column.id === ticket.columnId)?.title ??
|
|
958
|
-
ticket.columnId,
|
|
959
|
-
}}
|
|
960
|
-
.disabled=${!movable || this.saving}
|
|
961
|
-
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
962
|
-
kanbanEvent(this, 'kanban-ticket-move', {
|
|
963
|
-
ticketId: ticket.id,
|
|
964
|
-
columnId: event.detail.key,
|
|
965
|
-
})}
|
|
966
|
-
></dees-input-dropdown>
|
|
967
|
-
</div>
|
|
968
|
-
${this.editing && editable && projects.length
|
|
969
|
-
? html`<div>
|
|
970
|
-
<label class="caption">${this.t('kanban.project')}</label>
|
|
971
956
|
<dees-input-dropdown
|
|
972
|
-
label=${this.t('kanban.
|
|
957
|
+
label=${this.t('kanban.status')}
|
|
973
958
|
.labelPosition=${'none'}
|
|
974
|
-
.
|
|
959
|
+
.options=${this.columns.map(column => ({ key: column.id, option: column.title }))}
|
|
975
960
|
.value=${{
|
|
976
|
-
key:
|
|
977
|
-
option: draft.project
|
|
978
|
-
? kanbanProjectName(projects, draft.project)
|
|
979
|
-
: this.t('kanban.noProject'),
|
|
980
|
-
}}
|
|
981
|
-
.options=${[
|
|
982
|
-
...(ticket.project ? [] : [{ key: '', option: this.t('kanban.noProject') }]),
|
|
983
|
-
...projects.map(project => ({ key: project.id, option: project.name })),
|
|
984
|
-
]}
|
|
985
|
-
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
986
|
-
this.changeDraft({ project: event.detail.key })}
|
|
987
|
-
></dees-input-dropdown>
|
|
988
|
-
</div>`
|
|
989
|
-
: ticket.project || projects.length
|
|
990
|
-
? html`<div>
|
|
991
|
-
<label class="caption">${this.t('kanban.project')}</label>
|
|
992
|
-
<span class="value ${ticket.project ? '' : 'muted'}">${ticket.project
|
|
993
|
-
? kanbanProjectName(projects, ticket.project)
|
|
994
|
-
: this.t('kanban.noProject')}</span>
|
|
995
|
-
</div>`
|
|
996
|
-
: ''}
|
|
997
|
-
${this.editing && editable
|
|
998
|
-
? html`
|
|
999
|
-
<div>
|
|
1000
|
-
<label class="caption">${this.t('kanban.priorityLabel')}</label>
|
|
1001
|
-
<dees-input-dropdown
|
|
1002
|
-
label=${this.t('kanban.priorityLabel')}
|
|
1003
|
-
.labelPosition=${'none'}
|
|
1004
|
-
.disabled=${this.saving}
|
|
1005
|
-
.value=${{ key: draft.priority, option: this.t('kanban.priority', { priority: draft.priority }) }}
|
|
1006
|
-
.options=${(['none', 'low', 'normal', 'high', 'urgent'] as const).map(key => ({
|
|
1007
|
-
key,
|
|
1008
|
-
option: this.t('kanban.priority', { priority: key }),
|
|
1009
|
-
}))}
|
|
1010
|
-
@selectedOption=${(event: CustomEvent<{ key: TKanbanPriority }>) =>
|
|
1011
|
-
this.changeDraft({ priority: event.detail.key })}
|
|
1012
|
-
></dees-input-dropdown>
|
|
1013
|
-
</div>
|
|
1014
|
-
<div>
|
|
1015
|
-
<label class="caption">${this.t('kanban.assignee')}</label>
|
|
1016
|
-
<dees-input-dropdown
|
|
1017
|
-
label=${this.t('kanban.assignee')}
|
|
1018
|
-
.labelPosition=${'none'}
|
|
1019
|
-
.disabled=${this.saving}
|
|
1020
|
-
.value=${{
|
|
1021
|
-
key: draft.assigneeId,
|
|
961
|
+
key: ticket.columnId,
|
|
1022
962
|
option:
|
|
1023
|
-
this.
|
|
1024
|
-
ticket.
|
|
1025
|
-
this.t('kanban.unassigned'),
|
|
963
|
+
this.columns.find(column => column.id === ticket.columnId)?.title ??
|
|
964
|
+
ticket.columnId,
|
|
1026
965
|
}}
|
|
1027
|
-
.
|
|
1028
|
-
{ key: '', option: this.t('kanban.unassigned') },
|
|
1029
|
-
...this.people.map(person => ({ key: person.id, option: person.name })),
|
|
1030
|
-
]}
|
|
966
|
+
.disabled=${!movable || this.saving}
|
|
1031
967
|
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1032
|
-
this
|
|
968
|
+
kanbanEvent(this, 'kanban-ticket-move', {
|
|
969
|
+
ticketId: ticket.id,
|
|
970
|
+
columnId: event.detail.key,
|
|
971
|
+
})}
|
|
1033
972
|
></dees-input-dropdown>
|
|
1034
973
|
</div>
|
|
1035
|
-
${
|
|
974
|
+
${this.editing && editable && projects.length
|
|
1036
975
|
? html`<div>
|
|
1037
|
-
<label class="caption">${this.t(
|
|
976
|
+
<label class="caption">${this.t('kanban.project')}</label>
|
|
1038
977
|
<dees-input-dropdown
|
|
1039
|
-
label=${this.t(
|
|
978
|
+
label=${this.t('kanban.project')}
|
|
1040
979
|
.labelPosition=${'none'}
|
|
1041
980
|
.disabled=${this.saving}
|
|
1042
981
|
.value=${{
|
|
1043
|
-
key: draft.
|
|
1044
|
-
option:
|
|
982
|
+
key: draft.project ?? '',
|
|
983
|
+
option: draft.project
|
|
984
|
+
? kanbanProjectName(projects, draft.project)
|
|
985
|
+
: this.t('kanban.noProject'),
|
|
1045
986
|
}}
|
|
1046
987
|
.options=${[
|
|
1047
|
-
...(ticket.
|
|
1048
|
-
...
|
|
988
|
+
...(ticket.project ? [] : [{ key: '', option: this.t('kanban.noProject') }]),
|
|
989
|
+
...projects.map(project => ({ key: project.id, option: project.name })),
|
|
1049
990
|
]}
|
|
1050
991
|
@selectedOption=${(event: CustomEvent<{ key: string }>) =>
|
|
1051
|
-
this.changeDraft({
|
|
992
|
+
this.changeDraft({ project: event.detail.key })}
|
|
1052
993
|
></dees-input-dropdown>
|
|
1053
994
|
</div>`
|
|
1054
|
-
:
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
.suggestions=${labels}
|
|
1079
|
-
.placeholder=${this.t('kanban.labelsPlaceholder')}
|
|
1080
|
-
@change=${(event: CustomEvent<{ value: string[] }>) => {
|
|
1081
|
-
event.stopPropagation();
|
|
1082
|
-
this.changeDraft({ labels: [...event.detail.value] });
|
|
1083
|
-
}}
|
|
1084
|
-
@input=${(event: Event) => event.stopPropagation()}
|
|
1085
|
-
></dees-input-tags>
|
|
1086
|
-
</div>`
|
|
1087
|
-
: ticket.labels?.length
|
|
1088
|
-
? html`<div>
|
|
1089
|
-
<label class="caption">${this.t('kanban.labels')}</label>
|
|
1090
|
-
<div class="row value">
|
|
1091
|
-
${ticket.labels.map(label => html`<span class="badge">${label}</span>`)}
|
|
995
|
+
: ticket.project || projects.length
|
|
996
|
+
? html`<div>
|
|
997
|
+
<label class="caption">${this.t('kanban.project')}</label>
|
|
998
|
+
<span class="value ${ticket.project ? '' : 'muted'}">${ticket.project
|
|
999
|
+
? kanbanProjectName(projects, ticket.project)
|
|
1000
|
+
: this.t('kanban.noProject')}</span>
|
|
1001
|
+
</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>
|
|
1092
1019
|
</div>
|
|
1093
|
-
|
|
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'
|
|
1042
|
+
? html`<div>
|
|
1043
|
+
<label class="caption">${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}</label>
|
|
1044
|
+
<dees-input-dropdown
|
|
1045
|
+
label=${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}
|
|
1046
|
+
.labelPosition=${'none'}
|
|
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>
|
|
1059
|
+
</div>`
|
|
1060
|
+
: ''}
|
|
1061
|
+
`
|
|
1062
|
+
: html`<div>
|
|
1063
|
+
<label class="caption">${this.t('kanban.priorityLabel')}</label>
|
|
1064
|
+
<span class="priority value" data-priority=${ticket.priority ?? 'none'}><dees-icon
|
|
1065
|
+
.icon=${kanbanPriorityIcon(ticket.priority)}
|
|
1066
|
+
iconSize="13"
|
|
1067
|
+
aria-hidden="true"
|
|
1068
|
+
></dees-icon>${this.t('kanban.priority', { priority: ticket.priority ?? 'none' })}</span>
|
|
1069
|
+
</div>
|
|
1070
|
+
<div>
|
|
1071
|
+
<label class="caption">${this.t('kanban.assignee')}</label>
|
|
1072
|
+
<span class="person value"><span class="avatar" aria-hidden="true">${ticket.assignee
|
|
1073
|
+
? kanbanInitials(ticket.assignee.name)
|
|
1074
|
+
: '–'}</span>${ticket.assignee?.name ?? this.t('kanban.unassigned')}</span>
|
|
1075
|
+
</div>`}
|
|
1076
|
+
${this.editing && editable
|
|
1077
|
+
? html`<div class="labels">
|
|
1078
|
+
<label class="caption">${this.t('kanban.labels')}</label>
|
|
1079
|
+
<dees-input-tags
|
|
1080
|
+
label=${this.t('kanban.labels')}
|
|
1081
|
+
.labelPosition=${'none'}
|
|
1082
|
+
.disabled=${this.saving}
|
|
1083
|
+
.value=${draft.labels ?? ticket.labels ?? []}
|
|
1084
|
+
.suggestions=${labels}
|
|
1085
|
+
.placeholder=${this.t('kanban.labelsPlaceholder')}
|
|
1086
|
+
@change=${(event: CustomEvent<{ value: string[] }>) => {
|
|
1087
|
+
event.stopPropagation();
|
|
1088
|
+
this.changeDraft({ labels: [...event.detail.value] });
|
|
1089
|
+
}}
|
|
1090
|
+
@input=${(event: Event) => event.stopPropagation()}
|
|
1091
|
+
></dees-input-tags>
|
|
1092
|
+
</div>`
|
|
1093
|
+
: ticket.labels?.length
|
|
1094
|
+
? html`<div class="labels">
|
|
1095
|
+
<label class="caption">${this.t('kanban.labels')}</label>
|
|
1096
|
+
<div class="row value">
|
|
1097
|
+
${ticket.labels.map(label => html`<span class="badge">${label}</span>`)}
|
|
1098
|
+
</div>
|
|
1099
|
+
</div>`
|
|
1100
|
+
: ''}
|
|
1101
|
+
</div>
|
|
1102
|
+
${ticket.createdAt || ticket.updatedAt
|
|
1103
|
+
? html`<footer class="stamps">
|
|
1104
|
+
${ticket.createdAt ? this.renderStamp('created', ticket.createdAt, ticket.createdBy) : ''}
|
|
1105
|
+
${ticket.updatedAt ? this.renderStamp('updated', ticket.updatedAt, ticket.updatedBy) : ''}
|
|
1106
|
+
</footer>`
|
|
1107
|
+
: ''}
|
|
1108
|
+
</aside>
|
|
1109
|
+
<div class="body">
|
|
1110
|
+
${ticket.links?.length
|
|
1111
|
+
? html`<section class="links">
|
|
1112
|
+
<div class="section-title">
|
|
1113
|
+
<h3>${this.t('kanban.links')}</h3>
|
|
1114
|
+
<span class="count">${ticket.links.length}</span>
|
|
1115
|
+
</div>
|
|
1116
|
+
<ul class="child-list link-list">${ticket.links.map(link => this.renderLink(link))}</ul>
|
|
1117
|
+
</section>`
|
|
1094
1118
|
: ''}
|
|
1119
|
+
${ticket.kind !== 'subtask'
|
|
1120
|
+
? html`<section class="children">
|
|
1121
|
+
<div class="section-title">
|
|
1122
|
+
<h3>${this.t('kanban.children', { kind: ticket.kind })}</h3>
|
|
1123
|
+
<span class="count">${children.length}</span>
|
|
1124
|
+
<span class="spacer"></span>
|
|
1125
|
+
${this.provider.createTicket && ticket.permissions?.createChild !== false
|
|
1126
|
+
? html`<dees-button
|
|
1127
|
+
size="sm"
|
|
1128
|
+
type="ghost"
|
|
1129
|
+
icon="lucide:Plus"
|
|
1130
|
+
text=${this.t('kanban.addChild', { kind: ticket.kind })}
|
|
1131
|
+
@clicked=${() =>
|
|
1132
|
+
kanbanEvent(this, 'kanban-ticket-create', {
|
|
1133
|
+
kind: ticket.kind === 'epic' ? 'task' : 'subtask',
|
|
1134
|
+
parentId: ticket.id,
|
|
1135
|
+
columnId: this.columns[0]?.id ?? ticket.columnId,
|
|
1136
|
+
})}
|
|
1137
|
+
></dees-button>`
|
|
1138
|
+
: ''}
|
|
1139
|
+
</div>
|
|
1140
|
+
<div class="child-list">${children.map(child => html`<button
|
|
1141
|
+
class="child"
|
|
1142
|
+
@click=${() => kanbanEvent(this, 'kanban-ticket-open', { ticketId: child.id })}
|
|
1143
|
+
>
|
|
1144
|
+
<span class="child-key">${child.key}</span>
|
|
1145
|
+
<span class="child-title">${child.title}</span>
|
|
1146
|
+
<span class="badge">${this.columns.find(
|
|
1147
|
+
column => column.id === child.columnId,
|
|
1148
|
+
)?.title ?? child.columnId}</span>
|
|
1149
|
+
</button>`)}</div>
|
|
1150
|
+
${!children.length
|
|
1151
|
+
? html`<p class="caption">${this.t('kanban.noChildren', { kind: ticket.kind })}</p>`
|
|
1152
|
+
: ''}
|
|
1153
|
+
</section>`
|
|
1154
|
+
: ''}
|
|
1155
|
+
${this.provider.loadActivity ? this.renderFeed(ticket) : this.renderDiscussion(ticket)}
|
|
1156
|
+
</div>
|
|
1095
1157
|
</div>
|
|
1096
|
-
|
|
1097
|
-
? html`<footer class="stamps">
|
|
1098
|
-
${ticket.createdAt ? this.renderStamp('created', ticket.createdAt, ticket.createdBy) : ''}
|
|
1099
|
-
${ticket.updatedAt ? this.renderStamp('updated', ticket.updatedAt, ticket.updatedBy) : ''}
|
|
1100
|
-
</footer>`
|
|
1101
|
-
: ''}
|
|
1102
|
-
</aside>`;
|
|
1158
|
+
</div>`;
|
|
1103
1159
|
}
|
|
1104
1160
|
|
|
1105
1161
|
private renderDiscussion(ticket: IKanbanTicket, inFeed = false): TemplateResult {
|