@design.estate/dees-catalog 13.0.0 → 13.0.2
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 +823 -170
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-input/dees-input-reference/dees-input-reference.js +4 -4
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +3 -1
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +75 -46
- package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.d.ts +4 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.js +72 -27
- package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.d.ts +7 -2
- package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.js +87 -45
- package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.js +26 -15
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.d.ts +2 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +73 -40
- package/dist_ts_web/elements/00group-kanban/kanban.dragcontroller.d.ts +67 -0
- package/dist_ts_web/elements/00group-kanban/kanban.dragcontroller.js +548 -0
- package/dist_ts_web/elements/00group-kanban/kanban.helpers.d.ts +3 -1
- package/dist_ts_web/elements/00group-kanban/kanban.helpers.js +3 -1
- package/dist_ts_web/elements/00group-kanban/kanban.styles.js +11 -3
- package/package.json +1 -1
- package/readme.md +19 -4
- package/scripts/check-packed-consumer.mjs +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-input/dees-input-reference/dees-input-reference.ts +3 -3
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +61 -34
- package/ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.ts +47 -24
- package/ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts +47 -27
- package/ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.ts +25 -14
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +64 -38
- package/ts_web/elements/00group-kanban/kanban.dragcontroller.ts +481 -0
- package/ts_web/elements/00group-kanban/kanban.helpers.ts +5 -1
- package/ts_web/elements/00group-kanban/kanban.styles.ts +10 -2
package/dist_bundle/bundle.js
CHANGED
|
@@ -183779,7 +183779,7 @@ var DeesTerminalView = _DeesTerminalView;
|
|
|
183779
183779
|
init_dist_ts26();
|
|
183780
183780
|
init_theme();
|
|
183781
183781
|
var kanbanStyles = [themeDefaultStyles, cssManager.defaultStyles, i`
|
|
183782
|
-
:host { display: block; min-width: 0; font-family: var(--dees-font-family); color: var(--dees-color-text-primary); font-size: var(--dees-font-
|
|
183782
|
+
:host { display: block; min-width: 0; font-family: var(--dees-font-family); color: var(--dees-color-text-primary); font-size: var(--dees-font-subhead-size); line-height: 1.5; }
|
|
183783
183783
|
* { box-sizing: border-box; }
|
|
183784
183784
|
h2, h3, p { margin: 0; }
|
|
183785
183785
|
.muted { color: var(--dees-color-text-secondary); }
|
|
@@ -183791,10 +183791,20 @@ var kanbanStyles = [themeDefaultStyles, cssManager.defaultStyles, i`
|
|
|
183791
183791
|
button.link { border: 0; background: transparent; font: inherit; color: var(--dees-color-link); padding: 2px 0; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
|
|
183792
183792
|
button:focus-visible, summary:focus-visible { outline: 2px solid var(--dees-color-focus-ring); outline-offset: 3px; border-radius: var(--dees-radius-sm); }
|
|
183793
183793
|
dees-icon { font-size: 16px; }
|
|
183794
|
-
.badge { display: inline-flex; align-items: center; gap: 4px; background: var(--dees-color-
|
|
183794
|
+
.badge { display: inline-flex; align-items: center; gap: 4px; background: var(--dees-color-fill-tertiary); padding: 3px 7px; border-radius: var(--dees-radius-sm); font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); }
|
|
183795
|
+
.avatar { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--dees-color-fill-secondary); color: var(--dees-color-text-secondary); display: inline-grid; place-items: center; font-size: 10px; font-weight: 600; line-height: 1; }
|
|
183796
|
+
.priority { display: inline-flex; align-items: center; gap: 3px; font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); text-transform: capitalize; }
|
|
183797
|
+
.priority[data-priority=urgent] { color: var(--dees-color-text-error); }
|
|
183798
|
+
.priority[data-priority=high] { color: var(--dees-color-text-warning); }
|
|
183799
|
+
.priority dees-icon { font-size: 13px; }
|
|
183800
|
+
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
|
|
183801
|
+
.section-title h3 { font-size: var(--dees-font-footnote-size); font-weight: 600; }
|
|
183802
|
+
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--dees-radius-sm); background: var(--dees-color-fill-tertiary); color: var(--dees-color-text-secondary); font-size: var(--dees-font-caption1-size); font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
183795
183803
|
`];
|
|
183796
183804
|
|
|
183797
183805
|
// ts_web/elements/00group-kanban/kanban.helpers.ts
|
|
183806
|
+
var kanbanInitials = /* @__PURE__ */ __name((name) => name.trim().split(/\s+/).map((part) => part[0]).join("").slice(0, 2), "kanbanInitials");
|
|
183807
|
+
var kanbanPriorityIcon = /* @__PURE__ */ __name((priority) => priority === "urgent" ? "lucide:ChevronsUp" : priority === "high" ? "lucide:ChevronUp" : priority === "low" ? "lucide:ChevronDown" : "lucide:Minus", "kanbanPriorityIcon");
|
|
183798
183808
|
var sortKanbanTickets = /* @__PURE__ */ __name((tickets) => [...tickets].sort((a4, b4) => a4.order - b4.order || a4.id.localeCompare(b4.id)), "sortKanbanTickets");
|
|
183799
183809
|
var ticketLabel = /* @__PURE__ */ __name((ticket) => `#${ticket.key} ${ticket.title}`, "ticketLabel");
|
|
183800
183810
|
var ticketDraft = /* @__PURE__ */ __name((ticket) => ({
|
|
@@ -183888,7 +183898,7 @@ var _DeesInputReference = class _DeesInputReference extends (_a104 = DeesElement
|
|
|
183888
183898
|
__publicField(this, "serializedValue", "");
|
|
183889
183899
|
}
|
|
183890
183900
|
render() {
|
|
183891
|
-
return b2`<div class="editor"></div>${this.loadError ? b2`<p class="error" role="alert">${this.loadError}</p>` : ""}`;
|
|
183901
|
+
return b2`<div class="editor" part="editor"></div>${this.loadError ? b2`<p class="error" role="alert">${this.loadError}</p>` : ""}`;
|
|
183892
183902
|
}
|
|
183893
183903
|
async connectedCallback() {
|
|
183894
183904
|
const connection = super.connectedCallback();
|
|
@@ -184102,11 +184112,11 @@ __publicField(_DeesInputReference, "styles", [themeDefaultStyles, cssManager.def
|
|
|
184102
184112
|
:host { display: block; min-width: 0; color: var(--dees-color-text-primary); font-family: var(--dees-font-family); }
|
|
184103
184113
|
.editor { border: 1px solid var(--dees-color-border-default); border-radius: var(--dees-radius-lg); background: var(--dees-color-bg-primary); }
|
|
184104
184114
|
.editor:focus-within { outline: 2px solid var(--dees-color-focus-ring); outline-offset: 1px; }
|
|
184105
|
-
.ProseMirror { padding: 12px; min-height: 84px; max-height: 260px; overflow: auto; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--dees-font-body-size); line-height: 1.6; }
|
|
184115
|
+
.ProseMirror { padding: 12px; min-height: var(--dees-reference-min-height, 84px); max-height: 260px; overflow: auto; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--dees-reference-font-size, var(--dees-font-body-size)); line-height: 1.6; }
|
|
184106
184116
|
.ProseMirror p { margin: 0; }
|
|
184107
184117
|
.ProseMirror p + p { margin-top: 0; }
|
|
184108
184118
|
.ProseMirror:has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); float: left; color: var(--dees-color-text-muted); pointer-events: none; height: 0; }
|
|
184109
|
-
.ProseMirror [data-reference-id] { display: inline; padding: 1px 5px; border-radius: var(--dees-radius-sm); color: var(--dees-color-link); background: var(--dees-color-
|
|
184119
|
+
.ProseMirror [data-reference-id] { display: inline; padding: 1px 5px; border-radius: var(--dees-radius-sm); color: var(--dees-color-link); background: var(--dees-color-fill-tertiary); cursor: pointer; font-weight: 500; }
|
|
184110
184120
|
.ProseMirror [data-reference-id]:focus-visible, .ProseMirror .ProseMirror-selectednode { outline: 2px solid var(--dees-color-focus-ring); }
|
|
184111
184121
|
.ProseMirror[contenteditable=false] { opacity: .65; }
|
|
184112
184122
|
.error { color: var(--dees-color-text-error); font-size: var(--dees-font-footnote-size); }
|
|
@@ -184136,16 +184146,17 @@ var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a105 = DeesEle
|
|
|
184136
184146
|
render() {
|
|
184137
184147
|
const pending = this.pending.has(this.ticketId);
|
|
184138
184148
|
const comments = this.comments.filter((comment3) => comment3.ticketId === this.ticketId).slice().sort((a4, b4) => Date.parse(a4.createdAt) - Date.parse(b4.createdAt));
|
|
184139
|
-
return b2`<header><h3>Discussion
|
|
184140
|
-
<dees-button size="
|
|
184149
|
+
return b2`<header><h3>Discussion</h3><span class="count">${comments.length}</span><span class="spacer"></span>
|
|
184150
|
+
<dees-button class="refresh" size="icon" type="ghost" icon="lucide:RefreshCw" text="Refresh" .disabled=${this.loading}
|
|
184141
184151
|
@clicked=${() => kanbanEvent(this, "kanban-comments-refresh", { ticketId: this.ticketId })}></dees-button></header>
|
|
184142
184152
|
${this.loading ? b2`<p class="caption" role="status">Loading comments…</p>` : ""}
|
|
184143
184153
|
${this.error ? b2`<p class="error" role="alert">${this.error}</p>` : ""}
|
|
184144
184154
|
<ol aria-label="Comments">${comments.map((comment3) => b2`<li>
|
|
184145
|
-
<
|
|
184155
|
+
<span class="avatar" aria-hidden="true">${kanbanInitials(comment3.author.name)}</span><div>
|
|
184156
|
+
<div class="row meta"><span class="author">${comment3.author.name}</span><time datetime=${comment3.createdAt} title=${comment3.createdAt}>${new Date(comment3.createdAt).toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" })}</time></div>
|
|
184146
184157
|
<div class="message">${comment3.body.map((part) => part.type === "text" ? part.text : b2`<button class="reference"
|
|
184147
184158
|
@click=${() => kanbanEvent(this, "kanban-ticket-open", { ticketId: part.id })}>${part.label}</button>`)}</div>
|
|
184148
|
-
</li>`)}</ol>
|
|
184159
|
+
</div></li>`)}</ol>
|
|
184149
184160
|
${!comments.length && !this.loading && !this.error ? b2`<p class="empty">Start the conversation.</p>` : ""}
|
|
184150
184161
|
${this.addComment && !this.readOnly ? b2`<div class="compose">
|
|
184151
184162
|
<dees-input-reference label="Comment" placeholder="Write a comment…" .documentKey=${this.ticketId} .value=${this.draft} .disabled=${pending}
|
|
@@ -184158,7 +184169,7 @@ var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a105 = DeesEle
|
|
|
184158
184169
|
@reference-submit=${() => {
|
|
184159
184170
|
void this.submit();
|
|
184160
184171
|
}}></dees-input-reference>
|
|
184161
|
-
<div class="row"><span class="caption">Type
|
|
184172
|
+
<div class="row"><span class="caption">Type <strong>#_</strong> to link a ticket · <span class="shortcut">Ctrl/⌘ Enter to send</span></span><span class="spacer"></span>
|
|
184162
184173
|
<dees-button type="accent" size="sm" text="Comment" .disabled=${pending || !referenceText(this.draft).trim()}
|
|
184163
184174
|
.status=${pending ? "pending" : "normal"} @clicked=${() => {
|
|
184164
184175
|
void this.submit();
|
|
@@ -184210,16 +184221,26 @@ __decorateElement(_init107, 4, "failures", _failures_dec, _DeesKanbanDiscussion,
|
|
|
184210
184221
|
_DeesKanbanDiscussion = __decorateElement(_init107, 0, "DeesKanbanDiscussion", _DeesKanbanDiscussion_decorators, _DeesKanbanDiscussion);
|
|
184211
184222
|
__name(_DeesKanbanDiscussion, "DeesKanbanDiscussion");
|
|
184212
184223
|
__publicField(_DeesKanbanDiscussion, "styles", [...kanbanStyles, i`
|
|
184213
|
-
header { display: flex; align-items: center; margin-bottom:
|
|
184214
|
-
h3 { font-size: var(--dees-font-
|
|
184224
|
+
header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
|
|
184225
|
+
h3 { font-size: var(--dees-font-footnote-size); font-weight: 600; }
|
|
184226
|
+
.refresh::part(button) { width: 28px; height: 28px; min-height: 28px; }
|
|
184215
184227
|
ol { list-style: none; padding: 0; margin: 0; }
|
|
184216
|
-
li {
|
|
184217
|
-
.
|
|
184228
|
+
li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
|
|
184229
|
+
li > .avatar { width: 28px; height: 28px; margin-top: 1px; }
|
|
184230
|
+
.author { font-weight: 600; font-size: var(--dees-font-footnote-size); }
|
|
184231
|
+
.meta { gap: 4px 10px; }
|
|
184218
184232
|
time { font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); }
|
|
184219
|
-
.message { white-space: pre-wrap; overflow-wrap: anywhere; line-height:
|
|
184220
|
-
.reference { display: inline; border: 0; border-radius: var(--dees-radius-sm); padding: 1px
|
|
184221
|
-
.compose { padding-
|
|
184222
|
-
.compose
|
|
184233
|
+
.message { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--dees-font-subhead-size); line-height: 22px; margin-top: 2px; }
|
|
184234
|
+
.reference { display: inline; border: 0; border-radius: var(--dees-radius-sm); padding: 1px 5px; color: var(--dees-color-link); background: var(--dees-color-fill-tertiary); font: inherit; font-weight: 500; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
|
|
184235
|
+
.compose { margin: 14px 0 0 38px; padding: 0; border: 1px solid var(--dees-color-control-border); border-radius: var(--dees-radius-xl); corner-shape: var(--dees-corner-shape); background: var(--dees-color-control-bg); }
|
|
184236
|
+
.compose:has(dees-input-reference:focus-within) { outline: 2px solid var(--dees-color-focus-ring); outline-offset: 1px; }
|
|
184237
|
+
dees-input-reference { --dees-reference-min-height: 64px; --dees-reference-font-size: var(--dees-font-subhead-size); }
|
|
184238
|
+
dees-input-reference::part(editor) { border: 0; background: transparent; outline: none; }
|
|
184239
|
+
.compose .row { padding: 4px 10px 10px; gap: 8px; }
|
|
184240
|
+
.compose .caption { font-size: var(--dees-font-caption1-size); }
|
|
184241
|
+
.shortcut { white-space: nowrap; }
|
|
184242
|
+
.compose .error { padding: 0 12px 10px; }
|
|
184243
|
+
@media (max-width: 600px) { .compose { margin-left: 0; } .compose .caption { flex-basis: 100%; } }
|
|
184223
184244
|
`]);
|
|
184224
184245
|
__runInitializers(_init107, 1, _DeesKanbanDiscussion);
|
|
184225
184246
|
var DeesKanbanDiscussion = _DeesKanbanDiscussion;
|
|
@@ -184227,9 +184248,9 @@ var DeesKanbanDiscussion = _DeesKanbanDiscussion;
|
|
|
184227
184248
|
// ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts
|
|
184228
184249
|
init_dist_ts26();
|
|
184229
184250
|
init_dees_input_text();
|
|
184230
|
-
var _editing_dec3, _canGoBack_dec, _saving_dec2, _error_dec3, _commentsError_dec, _loadingComments_dec, _searchTickets_dec2, _comments_dec2, _commentDraft_dec, _draft_dec3, _provider_dec2, _people_dec, _columns_dec3, _tickets_dec, _ticket_dec, _a106, _DeesKanbanTicketDetail_decorators, _init108, _ticket, _tickets, _columns3, _people, _provider2, _draft3, _commentDraft, _comments2, _searchTickets2, _loadingComments, _commentsError, _error3, _saving2, _canGoBack, _editing3;
|
|
184251
|
+
var _editing_dec3, _showTicketKey_dec, _canGoBack_dec, _saving_dec2, _error_dec3, _commentsError_dec, _loadingComments_dec, _searchTickets_dec2, _comments_dec2, _commentDraft_dec, _draft_dec3, _provider_dec2, _people_dec, _columns_dec3, _tickets_dec, _ticket_dec, _a106, _DeesKanbanTicketDetail_decorators, _init108, _ticket, _tickets, _columns3, _people, _provider2, _draft3, _commentDraft, _comments2, _searchTickets2, _loadingComments, _commentsError, _error3, _saving2, _canGoBack, _showTicketKey, _editing3;
|
|
184231
184252
|
_DeesKanbanTicketDetail_decorators = [customElement("dees-kanban-ticket-detail")];
|
|
184232
|
-
var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a106 = DeesElement, _ticket_dec = [n5({ attribute: false })], _tickets_dec = [n5({ attribute: false })], _columns_dec3 = [n5({ attribute: false })], _people_dec = [n5({ attribute: false })], _provider_dec2 = [n5({ attribute: false })], _draft_dec3 = [n5({ attribute: false })], _commentDraft_dec = [n5({ attribute: false })], _comments_dec2 = [n5({ attribute: false })], _searchTickets_dec2 = [n5({ attribute: false })], _loadingComments_dec = [n5({ type: Boolean })], _commentsError_dec = [n5({ type: String })], _error_dec3 = [n5({ type: String })], _saving_dec2 = [n5({ type: Boolean })], _canGoBack_dec = [n5({ type: Boolean })], _editing_dec3 = [r5()], _a106) {
|
|
184253
|
+
var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a106 = DeesElement, _ticket_dec = [n5({ attribute: false })], _tickets_dec = [n5({ attribute: false })], _columns_dec3 = [n5({ attribute: false })], _people_dec = [n5({ attribute: false })], _provider_dec2 = [n5({ attribute: false })], _draft_dec3 = [n5({ attribute: false })], _commentDraft_dec = [n5({ attribute: false })], _comments_dec2 = [n5({ attribute: false })], _searchTickets_dec2 = [n5({ attribute: false })], _loadingComments_dec = [n5({ type: Boolean })], _commentsError_dec = [n5({ type: String })], _error_dec3 = [n5({ type: String })], _saving_dec2 = [n5({ type: Boolean })], _canGoBack_dec = [n5({ type: Boolean })], _showTicketKey_dec = [n5({ type: Boolean })], _editing_dec3 = [r5()], _a106) {
|
|
184233
184254
|
constructor() {
|
|
184234
184255
|
super(...arguments);
|
|
184235
184256
|
__privateAdd(this, _ticket, __runInitializers(_init108, 8, this)), __runInitializers(_init108, 11, this);
|
|
@@ -184246,7 +184267,8 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a106 = Dee
|
|
|
184246
184267
|
__privateAdd(this, _error3, __runInitializers(_init108, 52, this, "")), __runInitializers(_init108, 55, this);
|
|
184247
184268
|
__privateAdd(this, _saving2, __runInitializers(_init108, 56, this, false)), __runInitializers(_init108, 59, this);
|
|
184248
184269
|
__privateAdd(this, _canGoBack, __runInitializers(_init108, 60, this, false)), __runInitializers(_init108, 63, this);
|
|
184249
|
-
__privateAdd(this,
|
|
184270
|
+
__privateAdd(this, _showTicketKey, __runInitializers(_init108, 64, this, true)), __runInitializers(_init108, 67, this);
|
|
184271
|
+
__privateAdd(this, _editing3, __runInitializers(_init108, 68, this, false)), __runInitializers(_init108, 71, this);
|
|
184250
184272
|
__publicField(this, "addComment", /* @__PURE__ */ __name((input) => this.provider.addComment(input), "addComment"));
|
|
184251
184273
|
}
|
|
184252
184274
|
updated(changed2) {
|
|
@@ -184268,15 +184290,16 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a106 = Dee
|
|
|
184268
184290
|
const parents = this.tickets.filter((item) => item.kind === (ticket.kind === "subtask" ? "task" : "epic"));
|
|
184269
184291
|
return b2`<div class="toolbar row">
|
|
184270
184292
|
${this.canGoBack ? b2`<dees-button size="sm" type="ghost" icon="lucide:ArrowLeft" text="Back" @clicked=${() => kanbanEvent(this, "kanban-detail-back", {})}></dees-button>` : ""}
|
|
184271
|
-
<span class="badge">${ticket.kind}</span
|
|
184272
|
-
${
|
|
184293
|
+
<span class="badge">${ticket.kind}</span>
|
|
184294
|
+
${this.showTicketKey ? b2`<span class="caption ticket-key">${ticket.key}</span>` : ""}
|
|
184295
|
+
${parent ? b2`<span class="caption" aria-hidden="true">/</span><button class="link parent" title=${parent.title} @click=${() => kanbanEvent(this, "kanban-ticket-open", { ticketId: parent.id })}>${parent.title}</button>` : ""}
|
|
184273
184296
|
<span class="spacer"></span>${editable && !this.editing ? b2`<dees-button size="sm" type="ghost" text="Edit ticket" icon="lucide:Pencil" @clicked=${() => {
|
|
184274
184297
|
this.editing = true;
|
|
184275
184298
|
this.changeDraft({});
|
|
184276
184299
|
}}></dees-button>` : ""}
|
|
184277
184300
|
</div>
|
|
184278
184301
|
${this.error ? b2`<p class="error" role="alert">${this.error}</p>` : ""}
|
|
184279
|
-
<div class="layout"><
|
|
184302
|
+
<div class="layout"><section class="lead">
|
|
184280
184303
|
${this.editing && editable ? b2`<div class="edit">
|
|
184281
184304
|
<dees-input-text label="Title" .value=${draft.title} .disabled=${this.saving}
|
|
184282
184305
|
@input=${(event) => this.changeDraft({ title: String(event.currentTarget.value ?? "") })}></dees-input-text>
|
|
@@ -184290,33 +184313,36 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a106 = Dee
|
|
|
184290
184313
|
kanbanEvent(this, "kanban-ticket-draft", { ticketId: ticket.id, draft: void 0 });
|
|
184291
184314
|
}}></dees-button></div>
|
|
184292
184315
|
</div>` : b2`<h2>${ticket.title}</h2><div class="description ${ticket.description ? "" : "muted"}">${ticket.description || "No description yet."}</div>`}
|
|
184293
|
-
|
|
184294
|
-
|
|
184295
|
-
@clicked=${() => kanbanEvent(this, "kanban-ticket-create", { kind: ticket.kind === "epic" ? "task" : "subtask", parentId: ticket.id, columnId: this.columns[0]?.id ?? ticket.columnId })}></dees-button>` : ""}</div>
|
|
184296
|
-
${children2.map((child) => b2`<div class="child"><button class="link" @click=${() => kanbanEvent(this, "kanban-ticket-open", { ticketId: child.id })}>${ticketLabel(child)}</button>
|
|
184297
|
-
<span class="badge">${this.columns.find((column) => column.id === child.columnId)?.title ?? child.columnId}</span></div>`)}
|
|
184298
|
-
${!children2.length ? b2`<p class="caption">No ${ticket.kind === "epic" ? "tasks" : "subtasks"} yet.</p>` : ""}</section>` : ""}
|
|
184299
|
-
<dees-kanban-discussion class="discussion" .ticketId=${ticket.id} .comments=${this.comments} .draft=${this.commentDraft}
|
|
184300
|
-
.loading=${this.loadingComments} .error=${this.commentsError} .readOnly=${ticket.permissions?.comment === false}
|
|
184301
|
-
.searchTickets=${this.searchTickets} .addComment=${this.provider.addComment ? this.addComment : void 0}></dees-kanban-discussion>
|
|
184302
|
-
</div><aside><div class="fields">
|
|
184303
|
-
<dees-input-dropdown label="Status" .options=${this.columns.map((column) => ({ key: column.id, option: column.title }))}
|
|
184316
|
+
</section><aside><div class="fields">
|
|
184317
|
+
<div><label class="caption">Status</label><dees-input-dropdown label="Status" .labelPosition=${"none"} .options=${this.columns.map((column) => ({ key: column.id, option: column.title }))}
|
|
184304
184318
|
.value=${{ key: ticket.columnId, option: this.columns.find((column) => column.id === ticket.columnId)?.title ?? ticket.columnId }}
|
|
184305
|
-
.disabled=${!movable || this.saving} @selectedOption=${(event) => kanbanEvent(this, "kanban-ticket-move", { ticketId: ticket.id, columnId: event.detail.key })}></dees-input-dropdown>
|
|
184319
|
+
.disabled=${!movable || this.saving} @selectedOption=${(event) => kanbanEvent(this, "kanban-ticket-move", { ticketId: ticket.id, columnId: event.detail.key })}></dees-input-dropdown></div>
|
|
184306
184320
|
${this.editing && editable ? b2`
|
|
184307
|
-
<dees-input-dropdown label="Priority" .disabled=${this.saving} .value=${{ key: draft.priority, option: draft.priority }}
|
|
184321
|
+
<div><label class="caption">Priority</label><dees-input-dropdown label="Priority" .labelPosition=${"none"} .disabled=${this.saving} .value=${{ key: draft.priority, option: draft.priority }}
|
|
184308
184322
|
.options=${["none", "low", "normal", "high", "urgent"].map((key2) => ({ key: key2, option: key2 }))}
|
|
184309
|
-
@selectedOption=${(event) => this.changeDraft({ priority: event.detail.key })}></dees-input-dropdown>
|
|
184310
|
-
<dees-input-dropdown label="Assignee" .disabled=${this.saving} .value=${{ key: draft.assigneeId, option: this.people.find((person) => person.id === draft.assigneeId)?.name ?? ticket.assignee?.name ?? "Unassigned" }}
|
|
184323
|
+
@selectedOption=${(event) => this.changeDraft({ priority: event.detail.key })}></dees-input-dropdown></div>
|
|
184324
|
+
<div><label class="caption">Assignee</label><dees-input-dropdown label="Assignee" .labelPosition=${"none"} .disabled=${this.saving} .value=${{ key: draft.assigneeId, option: this.people.find((person) => person.id === draft.assigneeId)?.name ?? ticket.assignee?.name ?? "Unassigned" }}
|
|
184311
184325
|
.options=${[{ key: "", option: "Unassigned" }, ...this.people.map((person) => ({ key: person.id, option: person.name }))]}
|
|
184312
|
-
@selectedOption=${(event) => this.changeDraft({ assigneeId: event.detail.key })}></dees-input-dropdown>
|
|
184313
|
-
${ticket.kind !== "epic" ? b2`<dees-input-dropdown label=${ticket.kind === "task" ? "Epic" : "Parent task"} .disabled=${this.saving}
|
|
184326
|
+
@selectedOption=${(event) => this.changeDraft({ assigneeId: event.detail.key })}></dees-input-dropdown></div>
|
|
184327
|
+
${ticket.kind !== "epic" ? b2`<div><label class="caption">${ticket.kind === "task" ? "Epic" : "Parent task"}</label><dees-input-dropdown label=${ticket.kind === "task" ? "Epic" : "Parent task"} .labelPosition=${"none"} .disabled=${this.saving}
|
|
184314
184328
|
.value=${{ key: draft.parentId, option: parents.find((item) => item.id === draft.parentId)?.title ?? "None" }}
|
|
184315
184329
|
.options=${[...ticket.kind === "task" ? [{ key: "", option: "None" }] : [], ...parents.map((item) => ({ key: item.id, option: ticketLabel(item) }))]}
|
|
184316
|
-
@selectedOption=${(event) => this.changeDraft({ parentId: event.detail.key })}></dees-input-dropdown>` : ""}
|
|
184317
|
-
` : b2`<div><label class="caption">Priority</label
|
|
184318
|
-
|
|
184319
|
-
|
|
184330
|
+
@selectedOption=${(event) => this.changeDraft({ parentId: event.detail.key })}></dees-input-dropdown></div>` : ""}
|
|
184331
|
+
` : b2`<div><label class="caption">Priority</label><span class="priority value" data-priority=${ticket.priority ?? "none"}><dees-icon .icon=${kanbanPriorityIcon(ticket.priority)} iconSize="13" aria-hidden="true"></dees-icon>${ticket.priority ?? "none"}</span></div>
|
|
184332
|
+
<div><label class="caption">Assignee</label><span class="person value"><span class="avatar" aria-hidden="true">${ticket.assignee ? kanbanInitials(ticket.assignee.name) : "\u2013"}</span>${ticket.assignee?.name ?? "Unassigned"}</span></div>`}
|
|
184333
|
+
${ticket.labels?.length ? b2`<div><label class="caption">Labels</label><div class="row value">${ticket.labels.map((label) => b2`<span class="badge">${label}</span>`)}</div></div>` : ""}
|
|
184334
|
+
</div></aside><div class="body">
|
|
184335
|
+
${ticket.kind !== "subtask" ? b2`<section class="children"><div class="section-title"><h3>${ticket.kind === "epic" ? "Tasks" : "Subtasks"}</h3><span class="count">${children2.length}</span><span class="spacer"></span>
|
|
184336
|
+
${this.provider.createTicket && ticket.permissions?.createChild !== false ? b2`<dees-button size="sm" type="ghost" icon="lucide:Plus" text=${ticket.kind === "epic" ? "Add task" : "Add subtask"}
|
|
184337
|
+
@clicked=${() => kanbanEvent(this, "kanban-ticket-create", { kind: ticket.kind === "epic" ? "task" : "subtask", parentId: ticket.id, columnId: this.columns[0]?.id ?? ticket.columnId })}></dees-button>` : ""}</div>
|
|
184338
|
+
<div class="child-list">${children2.map((child) => b2`<button class="child" @click=${() => kanbanEvent(this, "kanban-ticket-open", { ticketId: child.id })}>
|
|
184339
|
+
<span class="child-key">${child.key}</span><span class="child-title">${child.title}</span>
|
|
184340
|
+
<span class="badge">${this.columns.find((column) => column.id === child.columnId)?.title ?? child.columnId}</span></button>`)}</div>
|
|
184341
|
+
${!children2.length ? b2`<p class="caption">No ${ticket.kind === "epic" ? "tasks" : "subtasks"} yet.</p>` : ""}</section>` : ""}
|
|
184342
|
+
<dees-kanban-discussion class="discussion" .ticketId=${ticket.id} .comments=${this.comments} .draft=${this.commentDraft}
|
|
184343
|
+
.loading=${this.loadingComments} .error=${this.commentsError} .readOnly=${ticket.permissions?.comment === false}
|
|
184344
|
+
.searchTickets=${this.searchTickets} .addComment=${this.provider.addComment ? this.addComment : void 0}></dees-kanban-discussion>
|
|
184345
|
+
</div></div>`;
|
|
184320
184346
|
}
|
|
184321
184347
|
finishEditing() {
|
|
184322
184348
|
this.editing = false;
|
|
@@ -184337,6 +184363,7 @@ _commentsError = new WeakMap();
|
|
|
184337
184363
|
_error3 = new WeakMap();
|
|
184338
184364
|
_saving2 = new WeakMap();
|
|
184339
184365
|
_canGoBack = new WeakMap();
|
|
184366
|
+
_showTicketKey = new WeakMap();
|
|
184340
184367
|
_editing3 = new WeakMap();
|
|
184341
184368
|
__decorateElement(_init108, 4, "ticket", _ticket_dec, _DeesKanbanTicketDetail, _ticket);
|
|
184342
184369
|
__decorateElement(_init108, 4, "tickets", _tickets_dec, _DeesKanbanTicketDetail, _tickets);
|
|
@@ -184352,24 +184379,45 @@ __decorateElement(_init108, 4, "commentsError", _commentsError_dec, _DeesKanbanT
|
|
|
184352
184379
|
__decorateElement(_init108, 4, "error", _error_dec3, _DeesKanbanTicketDetail, _error3);
|
|
184353
184380
|
__decorateElement(_init108, 4, "saving", _saving_dec2, _DeesKanbanTicketDetail, _saving2);
|
|
184354
184381
|
__decorateElement(_init108, 4, "canGoBack", _canGoBack_dec, _DeesKanbanTicketDetail, _canGoBack);
|
|
184382
|
+
__decorateElement(_init108, 4, "showTicketKey", _showTicketKey_dec, _DeesKanbanTicketDetail, _showTicketKey);
|
|
184355
184383
|
__decorateElement(_init108, 4, "editing", _editing_dec3, _DeesKanbanTicketDetail, _editing3);
|
|
184356
184384
|
_DeesKanbanTicketDetail = __decorateElement(_init108, 0, "DeesKanbanTicketDetail", _DeesKanbanTicketDetail_decorators, _DeesKanbanTicketDetail);
|
|
184357
184385
|
__name(_DeesKanbanTicketDetail, "DeesKanbanTicketDetail");
|
|
184358
184386
|
__publicField(_DeesKanbanTicketDetail, "styles", [...kanbanStyles, i`
|
|
184359
|
-
|
|
184360
|
-
.
|
|
184361
|
-
.
|
|
184362
|
-
|
|
184363
|
-
.
|
|
184364
|
-
|
|
184365
|
-
.
|
|
184366
|
-
.
|
|
184367
|
-
|
|
184387
|
+
:host { padding: 24px; }
|
|
184388
|
+
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; grid-template-areas: 'lead props' 'body props'; gap: 24px; align-items: start; }
|
|
184389
|
+
.lead { grid-area: lead; min-width: 0; }
|
|
184390
|
+
.body { grid-area: body; min-width: 0; }
|
|
184391
|
+
.toolbar { margin-bottom: 20px; flex-wrap: nowrap; min-width: 0; }
|
|
184392
|
+
.toolbar .badge { text-transform: capitalize; flex-shrink: 0; }
|
|
184393
|
+
.ticket-key { flex-shrink: 0; font-variant-numeric: tabular-nums; }
|
|
184394
|
+
.link.parent { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--dees-font-footnote-size); }
|
|
184395
|
+
.toolbar dees-button { flex-shrink: 0; }
|
|
184396
|
+
h2 { font-size: var(--dees-font-title2-size); line-height: 1.3; font-weight: 600; margin-bottom: 12px; letter-spacing: -.015em; overflow-wrap: anywhere; }
|
|
184397
|
+
.description { white-space: pre-wrap; font-size: var(--dees-font-subhead-size); line-height: 22px; overflow-wrap: anywhere; max-width: 64ch; }
|
|
184398
|
+
aside { grid-area: props; min-width: 0; padding: 14px 16px; border-radius: var(--dees-radius-xl); corner-shape: var(--dees-corner-shape); background: var(--dees-color-settings-group); }
|
|
184399
|
+
.fields { display: grid; gap: 14px; font-size: var(--dees-font-footnote-size); font-weight: 500; }
|
|
184400
|
+
.fields label { display: block; margin-bottom: 5px; font-size: var(--dees-font-caption1-size); font-weight: 400; }
|
|
184401
|
+
.value { min-height: var(--dees-control-height-lg); display: flex; align-items: center; }
|
|
184402
|
+
.person { display: flex; align-items: center; gap: 7px; }
|
|
184368
184403
|
.children { margin-bottom: 24px; }
|
|
184369
|
-
.child {
|
|
184370
|
-
.
|
|
184371
|
-
.
|
|
184372
|
-
|
|
184404
|
+
.child-list { border-radius: var(--dees-radius-xl); corner-shape: var(--dees-corner-shape); background: var(--dees-color-settings-group); overflow: hidden; }
|
|
184405
|
+
.child { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
184406
|
+
.child + .child { border-top: 1px solid var(--dees-color-border-subtle); }
|
|
184407
|
+
.child:hover { background: var(--dees-color-row-hover); }
|
|
184408
|
+
.child:focus-visible { outline-offset: -3px; }
|
|
184409
|
+
.child-key { font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); font-variant-numeric: tabular-nums; flex-shrink: 0; }
|
|
184410
|
+
.child-title { flex: 1; min-width: 0; font-size: var(--dees-font-footnote-size); font-weight: 500; overflow-wrap: anywhere; }
|
|
184411
|
+
.child .badge { flex-shrink: 0; }
|
|
184412
|
+
.discussion { border-top: 1px solid var(--dees-color-border-subtle); padding-top: 20px; }
|
|
184413
|
+
.edit { display: grid; gap: 14px; }
|
|
184414
|
+
@media (max-width: 700px) {
|
|
184415
|
+
:host { padding: 16px; }
|
|
184416
|
+
.layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'lead' 'props' 'body'; gap: 20px; }
|
|
184417
|
+
.fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
184418
|
+
.toolbar { gap: 6px; margin-bottom: 16px; }
|
|
184419
|
+
.child { gap: 7px; }
|
|
184420
|
+
}
|
|
184373
184421
|
`]);
|
|
184374
184422
|
__runInitializers(_init108, 1, _DeesKanbanTicketDetail);
|
|
184375
184423
|
var DeesKanbanTicketDetail = _DeesKanbanTicketDetail;
|
|
@@ -184450,9 +184498,9 @@ var demoFunc72 = /* @__PURE__ */ __name(() => {
|
|
|
184450
184498
|
init_dist_ts26();
|
|
184451
184499
|
init_dees_button();
|
|
184452
184500
|
init_dees_icon();
|
|
184453
|
-
var _pending_dec3, _movable_dec, _columns_dec4, _subtasks_dec, _epic_dec, _ticket_dec2, _a107, _DeesKanbanCard_decorators, _init109, _ticket2, _epic, _subtasks, _columns4, _movable, _pending3;
|
|
184501
|
+
var _pointerManaged_dec, _saving_dec3, _pending_dec3, _moveDisabled_dec, _movable_dec, _columns_dec4, _subtasks_dec, _epic_dec, _ticket_dec2, _a107, _DeesKanbanCard_decorators, _init109, _ticket2, _epic, _subtasks, _columns4, _movable, _moveDisabled, _pending3, _saving3, _pointerManaged;
|
|
184454
184502
|
_DeesKanbanCard_decorators = [customElement("dees-kanban-card")];
|
|
184455
|
-
var _DeesKanbanCard = class _DeesKanbanCard extends (_a107 = DeesElement, _ticket_dec2 = [n5({ attribute: false })], _epic_dec = [n5({ attribute: false })], _subtasks_dec = [n5({ attribute: false })], _columns_dec4 = [n5({ attribute: false })], _movable_dec = [n5({ type: Boolean })], _pending_dec3 = [n5({ type: Boolean })], _a107) {
|
|
184503
|
+
var _DeesKanbanCard = class _DeesKanbanCard extends (_a107 = DeesElement, _ticket_dec2 = [n5({ attribute: false })], _epic_dec = [n5({ attribute: false })], _subtasks_dec = [n5({ attribute: false })], _columns_dec4 = [n5({ attribute: false })], _movable_dec = [n5({ type: Boolean })], _moveDisabled_dec = [n5({ type: Boolean })], _pending_dec3 = [n5({ type: Boolean })], _saving_dec3 = [n5({ type: Boolean })], _pointerManaged_dec = [n5({ attribute: false })], _a107) {
|
|
184456
184504
|
constructor() {
|
|
184457
184505
|
super(...arguments);
|
|
184458
184506
|
__privateAdd(this, _ticket2, __runInitializers(_init109, 8, this)), __runInitializers(_init109, 11, this);
|
|
@@ -184460,7 +184508,10 @@ var _DeesKanbanCard = class _DeesKanbanCard extends (_a107 = DeesElement, _ticke
|
|
|
184460
184508
|
__privateAdd(this, _subtasks, __runInitializers(_init109, 16, this, [])), __runInitializers(_init109, 19, this);
|
|
184461
184509
|
__privateAdd(this, _columns4, __runInitializers(_init109, 20, this, [])), __runInitializers(_init109, 23, this);
|
|
184462
184510
|
__privateAdd(this, _movable, __runInitializers(_init109, 24, this, false)), __runInitializers(_init109, 27, this);
|
|
184463
|
-
__privateAdd(this,
|
|
184511
|
+
__privateAdd(this, _moveDisabled, __runInitializers(_init109, 28, this, false)), __runInitializers(_init109, 31, this);
|
|
184512
|
+
__privateAdd(this, _pending3, __runInitializers(_init109, 32, this, false)), __runInitializers(_init109, 35, this);
|
|
184513
|
+
__privateAdd(this, _saving3, __runInitializers(_init109, 36, this, false)), __runInitializers(_init109, 39, this);
|
|
184514
|
+
__privateAdd(this, _pointerManaged, __runInitializers(_init109, 40, this, false)), __runInitializers(_init109, 43, this);
|
|
184464
184515
|
}
|
|
184465
184516
|
open(ticketId) {
|
|
184466
184517
|
kanbanEvent(this, "kanban-ticket-open", { ticketId });
|
|
@@ -184469,28 +184520,32 @@ var _DeesKanbanCard = class _DeesKanbanCard extends (_a107 = DeesElement, _ticke
|
|
|
184469
184520
|
const ticket = this.ticket;
|
|
184470
184521
|
if (!ticket) return b2``;
|
|
184471
184522
|
const completed = this.subtasks.filter((task) => this.columns.some((column) => column.id === task.columnId && column.done)).length;
|
|
184472
|
-
return b2`<article aria-busy=${String(this.pending)}
|
|
184523
|
+
return b2`<article aria-busy=${String(this.pending)} data-movable=${String(this.movable && !this.moveDisabled && !this.pending)}
|
|
184524
|
+
draggable=${String(this.movable && !this.moveDisabled && !this.pending && !this.pointerManaged)}
|
|
184473
184525
|
@dragstart=${(event) => {
|
|
184474
|
-
if (!this.movable || this.pending || !event.dataTransfer) {
|
|
184526
|
+
if (this.pointerManaged || !this.movable || this.moveDisabled || this.pending || !event.dataTransfer) {
|
|
184475
184527
|
event.preventDefault();
|
|
184476
184528
|
return;
|
|
184477
184529
|
}
|
|
184478
184530
|
event.dataTransfer.setData("application/x-dees-kanban-ticket", ticket.id);
|
|
184479
184531
|
event.dataTransfer.effectAllowed = "move";
|
|
184480
184532
|
kanbanEvent(this, "kanban-drag-start", { ticketId: ticket.id });
|
|
184481
|
-
}} @dragend=${() =>
|
|
184482
|
-
|
|
184483
|
-
|
|
184484
|
-
|
|
184485
|
-
|
|
184486
|
-
|
|
184487
|
-
<div class="row caption"><span class="avatar" title=${ticket.assignee?.name ?? "Unassigned"}>${ticket.assignee?.name.split(/\s+/).map((part) => part[0]).join("").slice(0, 2) ?? "\u2013"}</span>
|
|
184488
|
-
<span>${ticket.assignee?.name ?? "Unassigned"}</span><span class="spacer"></span>
|
|
184489
|
-
${this.movable ? b2`<dees-button size="icon" type="ghost" icon="lucide:Ellipsis" text="Move ticket" .disabled=${this.pending}
|
|
184533
|
+
}} @dragend=${() => {
|
|
184534
|
+
if (!this.pointerManaged) kanbanEvent(this, "kanban-drag-end", {});
|
|
184535
|
+
}}>
|
|
184536
|
+
<div class="meta"><span class="key">${ticket.key}</span>
|
|
184537
|
+
${this.epic ? b2`<button class="link epic" title=${this.epic.title} @click=${() => this.open(this.epic.id)}>${this.epic.title}</button>` : ""}
|
|
184538
|
+
${this.saving ? b2`<span class="saving" role="status">Saving…</span>` : this.movable ? b2`<dees-button class="move" size="icon" type="ghost" icon="lucide:Ellipsis" text="Move ticket" .disabled=${this.pending || this.moveDisabled}
|
|
184490
184539
|
@clicked=${(event) => kanbanEvent(this, "kanban-move-menu", { ticketId: ticket.id, anchor: event.currentTarget })}></dees-button>` : ""}
|
|
184491
184540
|
</div>
|
|
184492
|
-
|
|
184493
|
-
|
|
184541
|
+
<button class="title" @click=${() => this.open(ticket.id)}>${ticket.title}</button>
|
|
184542
|
+
<div class="row footer">
|
|
184543
|
+
${ticket.priority && ticket.priority !== "none" ? b2`<span class="priority" data-priority=${ticket.priority}><dees-icon .icon=${kanbanPriorityIcon(ticket.priority)} iconSize="13" aria-hidden="true"></dees-icon>${ticket.priority}</span>` : ""}
|
|
184544
|
+
${ticket.labels?.map((label) => b2`<span class="badge">${label}</span>`)}
|
|
184545
|
+
<span class="assignee" title=${ticket.assignee?.name ?? "Unassigned"}><span class="avatar" aria-hidden="true">${ticket.assignee ? kanbanInitials(ticket.assignee.name) : "\u2013"}</span><span class="assignee-name">${ticket.assignee?.name ?? "Unassigned"}</span></span>
|
|
184546
|
+
</div>
|
|
184547
|
+
${this.subtasks.length ? b2`<details><summary><dees-icon icon="lucide:ListChecks" iconSize="14" aria-hidden="true"></dees-icon>${completed}/${this.subtasks.length} subtasks complete<dees-icon class="disclosure" icon="lucide:ChevronRight" iconSize="14" aria-hidden="true"></dees-icon></summary>
|
|
184548
|
+
${this.subtasks.map((task) => b2`<div class="subtask"><dees-icon .icon=${this.columns.some((column) => column.id === task.columnId && column.done) ? "lucide:CircleCheck" : "lucide:Circle"} iconSize="14" aria-hidden="true"></dees-icon>
|
|
184494
184549
|
<button class="link" @click=${() => this.open(task.id)}>${task.title}</button></div>`)}</details>` : ""}
|
|
184495
184550
|
</article>`;
|
|
184496
184551
|
}
|
|
@@ -184501,36 +184556,580 @@ _epic = new WeakMap();
|
|
|
184501
184556
|
_subtasks = new WeakMap();
|
|
184502
184557
|
_columns4 = new WeakMap();
|
|
184503
184558
|
_movable = new WeakMap();
|
|
184559
|
+
_moveDisabled = new WeakMap();
|
|
184504
184560
|
_pending3 = new WeakMap();
|
|
184561
|
+
_saving3 = new WeakMap();
|
|
184562
|
+
_pointerManaged = new WeakMap();
|
|
184505
184563
|
__decorateElement(_init109, 4, "ticket", _ticket_dec2, _DeesKanbanCard, _ticket2);
|
|
184506
184564
|
__decorateElement(_init109, 4, "epic", _epic_dec, _DeesKanbanCard, _epic);
|
|
184507
184565
|
__decorateElement(_init109, 4, "subtasks", _subtasks_dec, _DeesKanbanCard, _subtasks);
|
|
184508
184566
|
__decorateElement(_init109, 4, "columns", _columns_dec4, _DeesKanbanCard, _columns4);
|
|
184509
184567
|
__decorateElement(_init109, 4, "movable", _movable_dec, _DeesKanbanCard, _movable);
|
|
184568
|
+
__decorateElement(_init109, 4, "moveDisabled", _moveDisabled_dec, _DeesKanbanCard, _moveDisabled);
|
|
184510
184569
|
__decorateElement(_init109, 4, "pending", _pending_dec3, _DeesKanbanCard, _pending3);
|
|
184570
|
+
__decorateElement(_init109, 4, "saving", _saving_dec3, _DeesKanbanCard, _saving3);
|
|
184571
|
+
__decorateElement(_init109, 4, "pointerManaged", _pointerManaged_dec, _DeesKanbanCard, _pointerManaged);
|
|
184511
184572
|
_DeesKanbanCard = __decorateElement(_init109, 0, "DeesKanbanCard", _DeesKanbanCard_decorators, _DeesKanbanCard);
|
|
184512
184573
|
__name(_DeesKanbanCard, "DeesKanbanCard");
|
|
184513
184574
|
__publicField(_DeesKanbanCard, "styles", [...kanbanStyles, i`
|
|
184514
|
-
article { padding:
|
|
184575
|
+
article { padding: 12px; border: 1px solid var(--dees-color-border-subtle); border-radius: var(--dees-radius-xl); corner-shape: var(--dees-corner-shape); background: var(--dees-color-bg-primary); box-shadow: var(--dees-shadow-xs); }
|
|
184515
184576
|
article:hover { border-color: var(--dees-color-border-strong); }
|
|
184516
|
-
article[aria-busy=true] { opacity: .65; }
|
|
184517
|
-
|
|
184518
|
-
.
|
|
184519
|
-
.
|
|
184520
|
-
.
|
|
184521
|
-
.
|
|
184522
|
-
.
|
|
184523
|
-
|
|
184524
|
-
.
|
|
184577
|
+
article[aria-busy=true] > :not(.meta), article[aria-busy=true] .meta > :not(.saving) { opacity: .65; }
|
|
184578
|
+
article[data-movable=true] { cursor: grab; }
|
|
184579
|
+
.meta { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); }
|
|
184580
|
+
.key { flex-shrink: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
184581
|
+
.link.epic { min-width: 0; color: var(--dees-color-text-secondary); font-size: var(--dees-font-caption1-size); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
184582
|
+
.link.epic:hover { color: var(--dees-color-link); text-decoration: underline; }
|
|
184583
|
+
.move { flex-shrink: 0; margin-left: auto; }
|
|
184584
|
+
.saving { margin-left: auto; font-size: var(--dees-font-caption1-size); white-space: nowrap; }
|
|
184585
|
+
.move::part(button) { width: 24px; height: 24px; min-height: 24px; }
|
|
184586
|
+
.title { display: block; width: 100%; border: 0; background: transparent; padding: 4px 0 0; color: inherit; text-align: left; cursor: pointer; font: inherit; font-weight: 600; line-height: 22px; overflow-wrap: anywhere; }
|
|
184587
|
+
.title:hover { color: var(--dees-color-link); }
|
|
184588
|
+
.footer { margin-top: 10px; gap: 6px; }
|
|
184589
|
+
.badge { padding: 1px 6px; }
|
|
184590
|
+
.assignee { display: flex; align-items: center; gap: 5px; margin-left: auto; min-width: 0; color: var(--dees-color-text-secondary); font-size: var(--dees-font-caption1-size); }
|
|
184591
|
+
.assignee-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
184592
|
+
.avatar { width: 20px; height: 20px; font-size: 9px; }
|
|
184593
|
+
details { border-top: 1px solid var(--dees-color-border-subtle); margin-top: 10px; }
|
|
184594
|
+
summary { cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 9px 0 0; font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); list-style: none; }
|
|
184595
|
+
summary::-webkit-details-marker { display: none; }
|
|
184596
|
+
summary .disclosure { margin-left: auto; }
|
|
184597
|
+
details[open] summary .disclosure { transform: rotate(90deg); }
|
|
184598
|
+
.subtask { display: flex; gap: 7px; align-items: center; padding-top: 8px; font-size: var(--dees-font-footnote-size); }
|
|
184599
|
+
.subtask dees-icon { flex-shrink: 0; color: var(--dees-color-text-secondary); font-size: 14px; }
|
|
184600
|
+
.subtask .link { color: var(--dees-color-text-primary); }
|
|
184601
|
+
.subtask .link:hover { color: var(--dees-color-link); }
|
|
184602
|
+
@media (pointer: coarse) { .move::part(button) { width: 32px; height: 32px; min-height: 32px; } summary { min-height: 36px; } }
|
|
184525
184603
|
`]);
|
|
184526
184604
|
__runInitializers(_init109, 1, _DeesKanbanCard);
|
|
184527
184605
|
var DeesKanbanCard = _DeesKanbanCard;
|
|
184528
184606
|
|
|
184607
|
+
// ts_web/elements/00group-kanban/kanban.dragcontroller.ts
|
|
184608
|
+
init_overlay();
|
|
184609
|
+
init_zindex();
|
|
184610
|
+
var sameMove = /* @__PURE__ */ __name((a4, b4) => a4.ticketId === b4.ticketId && a4.columnId === b4.columnId && a4.beforeTicketId === b4.beforeTicketId, "sameMove");
|
|
184611
|
+
var KanbanDragController = class {
|
|
184612
|
+
constructor(board, commit, canMove) {
|
|
184613
|
+
this.board = board;
|
|
184614
|
+
this.commit = commit;
|
|
184615
|
+
this.canMove = canMove;
|
|
184616
|
+
}
|
|
184617
|
+
board;
|
|
184618
|
+
commit;
|
|
184619
|
+
canMove;
|
|
184620
|
+
static {
|
|
184621
|
+
__name(this, "KanbanDragController");
|
|
184622
|
+
}
|
|
184623
|
+
gesture;
|
|
184624
|
+
listeners;
|
|
184625
|
+
frame = 0;
|
|
184626
|
+
previousFrame = 0;
|
|
184627
|
+
rendering = false;
|
|
184628
|
+
scrollParents = [];
|
|
184629
|
+
scrollSnap = /* @__PURE__ */ new Map();
|
|
184630
|
+
animations = /* @__PURE__ */ new Map();
|
|
184631
|
+
timers = /* @__PURE__ */ new Set();
|
|
184632
|
+
suppressClick;
|
|
184633
|
+
clickTimer;
|
|
184634
|
+
resizeObserver;
|
|
184635
|
+
reducedMotion = matchMedia("(prefers-reduced-motion: reduce)");
|
|
184636
|
+
get busy() {
|
|
184637
|
+
return Boolean(this.gesture && this.gesture.phase !== "armed");
|
|
184638
|
+
}
|
|
184639
|
+
easing(name) {
|
|
184640
|
+
return getComputedStyle(this.board).getPropertyValue(`--dees-ease-${name}`).trim();
|
|
184641
|
+
}
|
|
184642
|
+
get columns() {
|
|
184643
|
+
return [...this.board.shadowRoot?.querySelectorAll("dees-kanban-column") ?? []];
|
|
184644
|
+
}
|
|
184645
|
+
connect() {
|
|
184646
|
+
this.board.addEventListener("pointerdown", this.down);
|
|
184647
|
+
}
|
|
184648
|
+
/** Host updates can remove/filter the source or revoke its move permission during a gesture. */
|
|
184649
|
+
sync() {
|
|
184650
|
+
const gesture = this.gesture;
|
|
184651
|
+
if (!gesture || gesture.phase === "armed") return;
|
|
184652
|
+
const visible = this.columns.some((column) => column.tickets.some((ticket2) => ticket2.id === gesture.motion.ticket.id));
|
|
184653
|
+
const ticket = this.board.tickets.find((item) => item.id === gesture.motion.ticket.id);
|
|
184654
|
+
if (!visible || !this.columns.some((column) => column.column?.id === gesture.motion.move.columnId)) {
|
|
184655
|
+
this.fadeAndClear(gesture);
|
|
184656
|
+
} else if (gesture.phase === "dragging" && (!this.board.provider.moveTicket || ticket?.permissions?.move === false)) {
|
|
184657
|
+
void this.cancel();
|
|
184658
|
+
}
|
|
184659
|
+
}
|
|
184660
|
+
down = /* @__PURE__ */ __name((event) => {
|
|
184661
|
+
if (this.gesture || !this.canMove() || event.button !== 0 || !event.isPrimary || event.pointerType === "touch") return;
|
|
184662
|
+
const path2 = event.composedPath();
|
|
184663
|
+
if (!this.columns.some((column) => path2.includes(column))) return;
|
|
184664
|
+
const source = path2.find((node2) => node2 instanceof DeesKanbanCard);
|
|
184665
|
+
if (!source?.ticket || !source.movable || source.moveDisabled || source.pending) return;
|
|
184666
|
+
if (path2.some((node2) => node2 instanceof Element && node2 !== source && node2.matches("a, input, textarea, select, summary, dees-button, button:not(.title), [contenteditable=true]"))) return;
|
|
184667
|
+
const rect = source.getBoundingClientRect();
|
|
184668
|
+
this.gesture = {
|
|
184669
|
+
pointerId: event.pointerId,
|
|
184670
|
+
source,
|
|
184671
|
+
startX: event.clientX,
|
|
184672
|
+
startY: event.clientY,
|
|
184673
|
+
x: event.clientX,
|
|
184674
|
+
y: event.clientY,
|
|
184675
|
+
offsetX: event.clientX - rect.left,
|
|
184676
|
+
offsetY: event.clientY - rect.top,
|
|
184677
|
+
width: rect.width,
|
|
184678
|
+
expanded: Boolean(source.shadowRoot?.querySelector("details")?.open),
|
|
184679
|
+
restoreFocus: false,
|
|
184680
|
+
phase: "armed",
|
|
184681
|
+
flightRevision: 0,
|
|
184682
|
+
motion: { ticket: source.ticket, move: this.authoritativeMove(source.ticket.id), height: rect.height, placeholder: true, dimmed: false, saving: false }
|
|
184683
|
+
};
|
|
184684
|
+
const signal = (this.listeners = new AbortController()).signal;
|
|
184685
|
+
window.addEventListener("pointermove", this.move, { signal, passive: false });
|
|
184686
|
+
window.addEventListener("pointerup", this.up, { signal });
|
|
184687
|
+
window.addEventListener("pointercancel", this.pointerCancel, { signal });
|
|
184688
|
+
this.board.addEventListener("lostpointercapture", this.pointerCancel, { signal });
|
|
184689
|
+
window.addEventListener("keydown", this.key, { signal, capture: true });
|
|
184690
|
+
window.addEventListener("blur", this.blur, { signal });
|
|
184691
|
+
window.addEventListener("resize", this.blur, { signal });
|
|
184692
|
+
}, "down");
|
|
184693
|
+
move = /* @__PURE__ */ __name((event) => {
|
|
184694
|
+
const gesture = this.gesture;
|
|
184695
|
+
if (!gesture || event.pointerId !== gesture.pointerId || !["armed", "dragging"].includes(gesture.phase)) return;
|
|
184696
|
+
gesture.x = event.clientX;
|
|
184697
|
+
gesture.y = event.clientY;
|
|
184698
|
+
if (gesture.phase === "armed") {
|
|
184699
|
+
if (Math.hypot(gesture.x - gesture.startX, gesture.y - gesture.startY) < 4) return;
|
|
184700
|
+
void this.lift(gesture);
|
|
184701
|
+
}
|
|
184702
|
+
event.preventDefault();
|
|
184703
|
+
window.getSelection()?.removeAllRanges();
|
|
184704
|
+
}, "move");
|
|
184705
|
+
async lift(gesture) {
|
|
184706
|
+
gesture.phase = "dragging";
|
|
184707
|
+
gesture.restoreFocus = Boolean(gesture.source.shadowRoot?.activeElement);
|
|
184708
|
+
this.board.setPointerCapture(gesture.pointerId);
|
|
184709
|
+
const overlay = gesture.overlay = new DeesKanbanCard();
|
|
184710
|
+
overlay.dataset.kanbanPreview = "";
|
|
184711
|
+
overlay.ticket = gesture.source.ticket;
|
|
184712
|
+
overlay.epic = gesture.source.epic;
|
|
184713
|
+
overlay.subtasks = gesture.source.subtasks;
|
|
184714
|
+
overlay.columns = gesture.source.columns;
|
|
184715
|
+
overlay.movable = gesture.source.movable;
|
|
184716
|
+
overlay.pointerManaged = true;
|
|
184717
|
+
overlay.inert = true;
|
|
184718
|
+
overlay.setAttribute("aria-hidden", "true");
|
|
184719
|
+
const styles3 = getComputedStyle(gesture.source);
|
|
184720
|
+
for (const name of styles3) if (name.startsWith("--dees-")) overlay.style.setProperty(name, styles3.getPropertyValue(name));
|
|
184721
|
+
const zIndex = zIndexRegistry.getNextZIndex();
|
|
184722
|
+
zIndexRegistry.register(overlay, zIndex);
|
|
184723
|
+
Object.assign(overlay.style, { position: "fixed", margin: "0", pointerEvents: "none", width: `${gesture.width}px`, zIndex: String(zIndex), transformOrigin: "center" });
|
|
184724
|
+
this.positionPreview(gesture);
|
|
184725
|
+
getOverlayContainer(this.board).append(overlay);
|
|
184726
|
+
this.collectScrollParents();
|
|
184727
|
+
const widths = new Map(this.columns.map((column) => [column, column.getBoundingClientRect().width]));
|
|
184728
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
184729
|
+
if (entries.some((entry) => Math.abs(entry.borderBoxSize[0].inlineSize - widths.get(entry.target)) > 0.5)) void this.cancel();
|
|
184730
|
+
});
|
|
184731
|
+
for (const column of this.columns) this.resizeObserver.observe(column);
|
|
184732
|
+
await overlay.updateComplete;
|
|
184733
|
+
if (this.gesture !== gesture || gesture.phase !== "dragging") return;
|
|
184734
|
+
const details = overlay.shadowRoot?.querySelector("details");
|
|
184735
|
+
if (details) details.open = gesture.expanded;
|
|
184736
|
+
const article = overlay.shadowRoot.querySelector("article");
|
|
184737
|
+
const resting = { boxShadow: getComputedStyle(article).boxShadow, borderColor: getComputedStyle(article).borderColor };
|
|
184738
|
+
article.style.borderColor = "var(--dees-color-border-strong)";
|
|
184739
|
+
article.style.boxShadow = "var(--dees-shadow-lg)";
|
|
184740
|
+
if (!this.reducedMotion.matches) {
|
|
184741
|
+
overlay.style.transform = "scale(1.02)";
|
|
184742
|
+
overlay.animate([{ transform: "scale(1)" }, { transform: "scale(1.02)" }], { duration: 120, easing: this.easing("out") });
|
|
184743
|
+
gesture.elevation = article.animate([resting, { boxShadow: getComputedStyle(article).boxShadow, borderColor: getComputedStyle(article).borderColor }], { duration: 120, easing: this.easing("out") });
|
|
184744
|
+
}
|
|
184745
|
+
await this.renderMotion();
|
|
184746
|
+
if (this.gesture === gesture && gesture.phase === "dragging") this.frame = requestAnimationFrame(this.tick);
|
|
184747
|
+
}
|
|
184748
|
+
positionPreview(gesture) {
|
|
184749
|
+
if (!gesture.overlay) return;
|
|
184750
|
+
gesture.overlay.style.left = `${gesture.x - gesture.offsetX}px`;
|
|
184751
|
+
gesture.overlay.style.top = `${gesture.y - gesture.offsetY}px`;
|
|
184752
|
+
}
|
|
184753
|
+
tick = /* @__PURE__ */ __name((time) => {
|
|
184754
|
+
const gesture = this.gesture;
|
|
184755
|
+
if (!gesture || gesture.phase !== "dragging") return;
|
|
184756
|
+
this.positionPreview(gesture);
|
|
184757
|
+
this.autoScroll(gesture, Math.min(2, (time - (this.previousFrame || time - 16.7)) / 16.7));
|
|
184758
|
+
this.previousFrame = time;
|
|
184759
|
+
if (!this.rendering) {
|
|
184760
|
+
const target = this.targetAt(gesture) ?? this.authoritativeMove(gesture.motion.ticket.id);
|
|
184761
|
+
if (target && !sameMove(target, gesture.motion.move)) {
|
|
184762
|
+
gesture.motion = { ...gesture.motion, move: target };
|
|
184763
|
+
void this.renderMotion();
|
|
184764
|
+
}
|
|
184765
|
+
}
|
|
184766
|
+
this.frame = requestAnimationFrame(this.tick);
|
|
184767
|
+
}, "tick");
|
|
184768
|
+
targetAt(gesture) {
|
|
184769
|
+
const clip = this.visibleRect();
|
|
184770
|
+
if (gesture.x < clip.left - 48 || gesture.x > clip.right + 48 || gesture.y < clip.top - 48 || gesture.y > clip.bottom + 48) return;
|
|
184771
|
+
const centerX = gesture.x - gesture.offsetX + gesture.width / 2;
|
|
184772
|
+
const centerY = gesture.y - gesture.offsetY + gesture.motion.height / 2;
|
|
184773
|
+
const lanes = this.columns.filter((column2) => {
|
|
184774
|
+
const rect = column2.getBoundingClientRect();
|
|
184775
|
+
return rect.right > clip.left && rect.left < clip.right;
|
|
184776
|
+
});
|
|
184777
|
+
let column = lanes.sort((a4, b4) => {
|
|
184778
|
+
const ar = a4.getBoundingClientRect(), br = b4.getBoundingClientRect();
|
|
184779
|
+
return Math.abs(centerX - (ar.left + ar.width / 2)) - Math.abs(centerX - (br.left + br.width / 2));
|
|
184780
|
+
})[0];
|
|
184781
|
+
if (!column?.column) return;
|
|
184782
|
+
const currentLane = lanes.find((item) => item.column?.id === gesture.motion.move.columnId);
|
|
184783
|
+
if (currentLane && currentLane !== column) {
|
|
184784
|
+
const currentRect = currentLane.getBoundingClientRect(), candidateRect = column.getBoundingClientRect();
|
|
184785
|
+
const currentCenter = currentRect.left + currentRect.width / 2, candidateCenter = candidateRect.left + candidateRect.width / 2;
|
|
184786
|
+
if (Math.abs(centerX - currentCenter) < Math.abs(candidateCenter - currentCenter) / 2 + 12) column = currentLane;
|
|
184787
|
+
}
|
|
184788
|
+
const columnId = column.column?.id;
|
|
184789
|
+
if (!columnId) return;
|
|
184790
|
+
const tickets = sortKanbanTickets(column.tickets).filter((ticket) => ticket.id !== gesture.motion.ticket.id);
|
|
184791
|
+
let top = column.shadowRoot.querySelector(".stack").getBoundingClientRect().top;
|
|
184792
|
+
const currentIndex = gesture.motion.move.columnId === columnId ? tickets.findIndex((ticket) => ticket.id === gesture.motion.move.beforeTicketId) : -1;
|
|
184793
|
+
const current = currentIndex < 0 ? tickets.length : currentIndex;
|
|
184794
|
+
let index3 = tickets.length;
|
|
184795
|
+
for (let i11 = 0; i11 < tickets.length; i11++) {
|
|
184796
|
+
const node2 = this.targets(column).find((target) => target.dataset.ticketId === tickets[i11].id);
|
|
184797
|
+
const midpoint = top + node2.offsetHeight / 2;
|
|
184798
|
+
const hysteresis = gesture.motion.move.columnId === columnId ? i11 < current ? -6 : 6 : 0;
|
|
184799
|
+
if (centerY < midpoint + hysteresis) {
|
|
184800
|
+
index3 = i11;
|
|
184801
|
+
break;
|
|
184802
|
+
}
|
|
184803
|
+
top += node2.offsetHeight + 8;
|
|
184804
|
+
}
|
|
184805
|
+
return { ticketId: gesture.motion.ticket.id, columnId, beforeTicketId: tickets[index3]?.id };
|
|
184806
|
+
}
|
|
184807
|
+
up = /* @__PURE__ */ __name((event) => {
|
|
184808
|
+
const gesture = this.gesture;
|
|
184809
|
+
if (!gesture || gesture.pointerId !== event.pointerId || !["armed", "dragging"].includes(gesture.phase)) return;
|
|
184810
|
+
if (gesture.phase === "armed") {
|
|
184811
|
+
this.clear();
|
|
184812
|
+
return;
|
|
184813
|
+
}
|
|
184814
|
+
gesture.x = event.clientX;
|
|
184815
|
+
gesture.y = event.clientY;
|
|
184816
|
+
this.blockClick();
|
|
184817
|
+
const target = this.targetAt(gesture);
|
|
184818
|
+
if (!target) {
|
|
184819
|
+
void this.cancel();
|
|
184820
|
+
return;
|
|
184821
|
+
}
|
|
184822
|
+
gesture.phase = "landing";
|
|
184823
|
+
this.endPointer();
|
|
184824
|
+
gesture.motion = { ...gesture.motion, move: target };
|
|
184825
|
+
void this.land(gesture);
|
|
184826
|
+
if (sameMove(target, this.authoritativeMove(target.ticketId))) {
|
|
184827
|
+
gesture.settled = true;
|
|
184828
|
+
} else {
|
|
184829
|
+
void this.commit(target).then((saved) => this.settle(gesture, saved));
|
|
184830
|
+
}
|
|
184831
|
+
}, "up");
|
|
184832
|
+
pointerCancel = /* @__PURE__ */ __name((event) => {
|
|
184833
|
+
if (event.pointerId === this.gesture?.pointerId && ["armed", "dragging"].includes(this.gesture.phase)) void this.cancel();
|
|
184834
|
+
}, "pointerCancel");
|
|
184835
|
+
key = /* @__PURE__ */ __name((event) => {
|
|
184836
|
+
if (event.key !== "Escape") return;
|
|
184837
|
+
event.preventDefault();
|
|
184838
|
+
event.stopImmediatePropagation();
|
|
184839
|
+
void this.cancel();
|
|
184840
|
+
}, "key");
|
|
184841
|
+
blur = /* @__PURE__ */ __name(() => {
|
|
184842
|
+
void this.cancel();
|
|
184843
|
+
}, "blur");
|
|
184844
|
+
async cancel() {
|
|
184845
|
+
const gesture = this.gesture;
|
|
184846
|
+
if (!gesture || !["armed", "dragging"].includes(gesture.phase)) return;
|
|
184847
|
+
if (gesture.phase === "armed") {
|
|
184848
|
+
this.clear();
|
|
184849
|
+
return;
|
|
184850
|
+
}
|
|
184851
|
+
this.blockClick();
|
|
184852
|
+
gesture.phase = "landing";
|
|
184853
|
+
gesture.settled = false;
|
|
184854
|
+
this.endPointer();
|
|
184855
|
+
const origin = this.authoritativeMove(gesture.motion.ticket.id);
|
|
184856
|
+
if (!origin) {
|
|
184857
|
+
this.fadeAndClear(gesture);
|
|
184858
|
+
return;
|
|
184859
|
+
}
|
|
184860
|
+
gesture.motion = { ...gesture.motion, move: origin };
|
|
184861
|
+
const column = this.columns.find((item) => item.column?.id === origin.columnId);
|
|
184862
|
+
if (gesture.overlay && column) {
|
|
184863
|
+
gesture.overlay.style.width = `${column.getBoundingClientRect().width}px`;
|
|
184864
|
+
gesture.motion.height = gesture.overlay.offsetHeight;
|
|
184865
|
+
}
|
|
184866
|
+
await this.land(gesture);
|
|
184867
|
+
}
|
|
184868
|
+
authoritativeMove(ticketId) {
|
|
184869
|
+
const ticket = this.board.tickets.find((item) => item.id === ticketId);
|
|
184870
|
+
if (!ticket) return;
|
|
184871
|
+
const tickets = sortKanbanTickets(this.columns.find((column) => column.column?.id === ticket.columnId)?.tickets ?? []);
|
|
184872
|
+
return { ticketId, columnId: ticket.columnId, beforeTicketId: tickets[tickets.findIndex((item) => item.id === ticketId) + 1]?.id };
|
|
184873
|
+
}
|
|
184874
|
+
async land(gesture) {
|
|
184875
|
+
const revision = ++gesture.flightRevision;
|
|
184876
|
+
await this.renderMotion();
|
|
184877
|
+
if (this.gesture !== gesture || gesture.flightRevision !== revision) return;
|
|
184878
|
+
const target = this.allTargets().find((node2) => node2.dataset.ticketId === gesture.motion.ticket.id);
|
|
184879
|
+
const overlay = gesture.overlay;
|
|
184880
|
+
if (!target || !overlay) {
|
|
184881
|
+
this.clear();
|
|
184882
|
+
return;
|
|
184883
|
+
}
|
|
184884
|
+
const from3 = overlay.getBoundingClientRect(), to = target.getBoundingClientRect();
|
|
184885
|
+
gesture.flight?.cancel();
|
|
184886
|
+
for (const animation of overlay.getAnimations()) animation.cancel();
|
|
184887
|
+
Object.assign(overlay.style, { left: `${to.left}px`, top: `${to.top}px`, width: `${to.width}px`, transform: "none" });
|
|
184888
|
+
const article = overlay.shadowRoot?.querySelector("article");
|
|
184889
|
+
const raised = article ? { boxShadow: getComputedStyle(article).boxShadow, borderColor: getComputedStyle(article).borderColor } : void 0;
|
|
184890
|
+
gesture.elevation?.cancel();
|
|
184891
|
+
if (article) {
|
|
184892
|
+
article.style.boxShadow = "";
|
|
184893
|
+
article.style.borderColor = "";
|
|
184894
|
+
}
|
|
184895
|
+
if (!this.reducedMotion.matches) {
|
|
184896
|
+
const duration = Math.min(280, Math.max(160, 120 + 0.25 * Math.hypot(to.left - from3.left, to.top - from3.top)));
|
|
184897
|
+
if (article && raised) gesture.elevation = article.animate([raised, { boxShadow: getComputedStyle(article).boxShadow, borderColor: getComputedStyle(article).borderColor }], { duration, easing: this.easing("spring") });
|
|
184898
|
+
const flight = gesture.flight = overlay.animate([
|
|
184899
|
+
{ transform: `translate(${from3.left - to.left}px, ${from3.top - to.top}px) scale(${from3.width / to.width}, ${from3.height / to.height})`, transformOrigin: "top left" },
|
|
184900
|
+
{ transform: "none", transformOrigin: "top left" }
|
|
184901
|
+
], { duration, easing: this.easing("spring") });
|
|
184902
|
+
const completed = await flight.finished.then(() => true, () => false);
|
|
184903
|
+
if (!completed) return;
|
|
184904
|
+
}
|
|
184905
|
+
if (this.gesture !== gesture || gesture.flightRevision !== revision) return;
|
|
184906
|
+
if (gesture.settled !== void 0) {
|
|
184907
|
+
await this.clearMotion(gesture);
|
|
184908
|
+
return;
|
|
184909
|
+
}
|
|
184910
|
+
gesture.phase = "pending";
|
|
184911
|
+
gesture.motion = { ...gesture.motion, placeholder: false };
|
|
184912
|
+
await this.renderMotion();
|
|
184913
|
+
if (this.gesture !== gesture) return;
|
|
184914
|
+
this.removeOverlay(gesture);
|
|
184915
|
+
this.delay(() => {
|
|
184916
|
+
if (this.gesture === gesture && gesture.phase === "pending") {
|
|
184917
|
+
gesture.motion = { ...gesture.motion, dimmed: true };
|
|
184918
|
+
void this.renderMotion();
|
|
184919
|
+
}
|
|
184920
|
+
}, 180);
|
|
184921
|
+
this.delay(() => {
|
|
184922
|
+
if (this.gesture === gesture && gesture.phase === "pending") {
|
|
184923
|
+
gesture.motion = { ...gesture.motion, saving: true };
|
|
184924
|
+
void this.renderMotion();
|
|
184925
|
+
}
|
|
184926
|
+
}, 600);
|
|
184927
|
+
}
|
|
184928
|
+
async settle(gesture, saved) {
|
|
184929
|
+
if (this.gesture !== gesture) return;
|
|
184930
|
+
gesture.settled = saved;
|
|
184931
|
+
await this.board.updateComplete;
|
|
184932
|
+
if (this.gesture !== gesture) return;
|
|
184933
|
+
const move = this.authoritativeMove(gesture.motion.ticket.id);
|
|
184934
|
+
if (!move) {
|
|
184935
|
+
this.fadeAndClear(gesture);
|
|
184936
|
+
return;
|
|
184937
|
+
}
|
|
184938
|
+
const unchanged = sameMove(move, gesture.motion.move);
|
|
184939
|
+
gesture.motion = { ...gesture.motion, move, ticket: this.board.tickets.find((ticket) => ticket.id === move.ticketId), dimmed: false, saving: false };
|
|
184940
|
+
if (gesture.phase === "landing") {
|
|
184941
|
+
if (!unchanged) await this.land(gesture);
|
|
184942
|
+
} else {
|
|
184943
|
+
gesture.phase = "settling";
|
|
184944
|
+
await this.clearMotion(gesture, saved ? 200 : 240);
|
|
184945
|
+
}
|
|
184946
|
+
}
|
|
184947
|
+
targets(column) {
|
|
184948
|
+
return [...column.shadowRoot?.querySelectorAll(".target") ?? []];
|
|
184949
|
+
}
|
|
184950
|
+
allTargets() {
|
|
184951
|
+
return this.columns.flatMap((column) => this.targets(column));
|
|
184952
|
+
}
|
|
184953
|
+
capture() {
|
|
184954
|
+
return new Map(this.allTargets().map((node2) => [node2.dataset.ticketId, node2.getBoundingClientRect()]));
|
|
184955
|
+
}
|
|
184956
|
+
async animateFrom(before, duration = 200) {
|
|
184957
|
+
await Promise.all(this.columns.map((column) => column.updateComplete));
|
|
184958
|
+
for (const animation of this.animations.values()) animation.cancel();
|
|
184959
|
+
this.animations.clear();
|
|
184960
|
+
if (this.reducedMotion.matches || !this.board.isConnected) return;
|
|
184961
|
+
const easing = this.easing("spring");
|
|
184962
|
+
for (const node2 of this.allTargets()) {
|
|
184963
|
+
if (node2.querySelector(".placeholder")) continue;
|
|
184964
|
+
const old = before.get(node2.dataset.ticketId), rect = node2.getBoundingClientRect();
|
|
184965
|
+
if (!old || Math.abs(old.x - rect.x) + Math.abs(old.y - rect.y) < 0.5) continue;
|
|
184966
|
+
const animation = node2.animate([{ transform: `translate(${old.x - rect.x}px, ${old.y - rect.y}px)` }, { transform: "none" }], { duration, easing });
|
|
184967
|
+
this.animations.set(node2, animation);
|
|
184968
|
+
void animation.finished.then(() => {
|
|
184969
|
+
if (this.animations.get(node2) === animation) this.animations.delete(node2);
|
|
184970
|
+
}, () => {
|
|
184971
|
+
});
|
|
184972
|
+
}
|
|
184973
|
+
}
|
|
184974
|
+
async renderMotion() {
|
|
184975
|
+
this.rendering = true;
|
|
184976
|
+
const before = this.capture();
|
|
184977
|
+
for (const column of this.columns) column.motion = this.gesture?.motion;
|
|
184978
|
+
await Promise.all(this.columns.map((column) => column.updateComplete));
|
|
184979
|
+
const gesture = this.gesture;
|
|
184980
|
+
if (gesture && !gesture.motion.placeholder) await this.restoreExpansion(gesture);
|
|
184981
|
+
await this.animateFrom(before);
|
|
184982
|
+
this.rendering = false;
|
|
184983
|
+
}
|
|
184984
|
+
async restoreExpansion(gesture) {
|
|
184985
|
+
const card = this.allTargets().find((node2) => node2.dataset.ticketId === gesture.motion.ticket.id)?.querySelector("dees-kanban-card");
|
|
184986
|
+
if (!card) return;
|
|
184987
|
+
await card.updateComplete;
|
|
184988
|
+
const details = card.shadowRoot?.querySelector("details");
|
|
184989
|
+
if (details) details.open = gesture.expanded;
|
|
184990
|
+
}
|
|
184991
|
+
async clearMotion(gesture, duration = 200) {
|
|
184992
|
+
const before = this.capture();
|
|
184993
|
+
for (const column of this.columns) column.motion = void 0;
|
|
184994
|
+
await Promise.all(this.columns.map((column) => column.updateComplete));
|
|
184995
|
+
if (this.gesture !== gesture) return;
|
|
184996
|
+
await this.restoreExpansion(gesture);
|
|
184997
|
+
this.removeOverlay(gesture);
|
|
184998
|
+
await this.animateFrom(before, duration);
|
|
184999
|
+
await Promise.all([...this.animations.values()].map((animation) => animation.finished.catch(() => {
|
|
185000
|
+
})));
|
|
185001
|
+
if (this.gesture === gesture) this.clear();
|
|
185002
|
+
}
|
|
185003
|
+
collectScrollParents() {
|
|
185004
|
+
this.scrollParents = [];
|
|
185005
|
+
let node2 = this.board.shadowRoot.querySelector(".columns");
|
|
185006
|
+
while (node2) {
|
|
185007
|
+
if (node2 instanceof HTMLElement) {
|
|
185008
|
+
const style2 = getComputedStyle(node2);
|
|
185009
|
+
if (/(auto|scroll)/.test(style2.overflowX + style2.overflowY) || node2 === document.scrollingElement) {
|
|
185010
|
+
this.scrollParents.push(node2);
|
|
185011
|
+
this.scrollSnap.set(node2, node2.style.scrollSnapType);
|
|
185012
|
+
node2.style.scrollSnapType = "none";
|
|
185013
|
+
}
|
|
185014
|
+
}
|
|
185015
|
+
node2 = node2 instanceof Element && node2.assignedSlot || node2.parentNode || (node2 instanceof ShadowRoot ? node2.host : null);
|
|
185016
|
+
}
|
|
185017
|
+
}
|
|
185018
|
+
visibleRect() {
|
|
185019
|
+
const board = this.board.shadowRoot.querySelector(".columns").getBoundingClientRect();
|
|
185020
|
+
const clip = { left: Math.max(0, board.left), right: Math.min(innerWidth, board.right), top: Math.max(0, board.top), bottom: Math.min(innerHeight, board.bottom) };
|
|
185021
|
+
for (const parent of this.scrollParents) {
|
|
185022
|
+
if (parent === document.scrollingElement) continue;
|
|
185023
|
+
const rect = parent.getBoundingClientRect();
|
|
185024
|
+
clip.left = Math.max(clip.left, rect.left);
|
|
185025
|
+
clip.right = Math.min(clip.right, rect.right);
|
|
185026
|
+
clip.top = Math.max(clip.top, rect.top);
|
|
185027
|
+
clip.bottom = Math.min(clip.bottom, rect.bottom);
|
|
185028
|
+
}
|
|
185029
|
+
return clip;
|
|
185030
|
+
}
|
|
185031
|
+
autoScroll(gesture, elapsed) {
|
|
185032
|
+
const velocity = /* @__PURE__ */ __name((point4, start, end, edge) => point4 < start + edge ? -Math.min(1, Math.max(0, (start + edge - point4) / edge)) * 14 * elapsed : point4 > end - edge ? Math.min(1, Math.max(0, (point4 - end + edge) / edge)) * 14 * elapsed : 0, "velocity");
|
|
185033
|
+
let movedX = false, movedY = false;
|
|
185034
|
+
for (const parent of this.scrollParents) {
|
|
185035
|
+
const rect = parent === document.scrollingElement ? { left: 0, top: 0, right: innerWidth, bottom: innerHeight } : parent.getBoundingClientRect();
|
|
185036
|
+
const left = Math.max(0, rect.left), top = Math.max(0, rect.top), right = Math.min(innerWidth, rect.right), bottom = Math.min(innerHeight, rect.bottom);
|
|
185037
|
+
if (gesture.x < left - 48 || gesture.x > right + 48 || gesture.y < top - 56 || gesture.y > bottom + 56) continue;
|
|
185038
|
+
const x3 = parent.scrollLeft, y3 = parent.scrollTop;
|
|
185039
|
+
if (!movedX) parent.scrollLeft += velocity(gesture.x, left, right, 48);
|
|
185040
|
+
if (!movedY) parent.scrollTop += velocity(gesture.y, top, bottom, 56);
|
|
185041
|
+
movedX ||= parent.scrollLeft !== x3;
|
|
185042
|
+
movedY ||= parent.scrollTop !== y3;
|
|
185043
|
+
}
|
|
185044
|
+
}
|
|
185045
|
+
endPointer() {
|
|
185046
|
+
this.listeners?.abort();
|
|
185047
|
+
this.listeners = void 0;
|
|
185048
|
+
cancelAnimationFrame(this.frame);
|
|
185049
|
+
this.frame = 0;
|
|
185050
|
+
this.previousFrame = 0;
|
|
185051
|
+
if (this.gesture && this.board.hasPointerCapture(this.gesture.pointerId)) this.board.releasePointerCapture(this.gesture.pointerId);
|
|
185052
|
+
this.resizeObserver?.disconnect();
|
|
185053
|
+
this.resizeObserver = void 0;
|
|
185054
|
+
}
|
|
185055
|
+
blockClick() {
|
|
185056
|
+
this.suppressClick?.abort();
|
|
185057
|
+
const controller = this.suppressClick = new AbortController();
|
|
185058
|
+
window.addEventListener("click", (event) => {
|
|
185059
|
+
event.preventDefault();
|
|
185060
|
+
event.stopImmediatePropagation();
|
|
185061
|
+
controller.abort();
|
|
185062
|
+
}, { capture: true, once: true, signal: controller.signal });
|
|
185063
|
+
clearTimeout(this.clickTimer);
|
|
185064
|
+
this.clickTimer = setTimeout(() => controller.abort(), 0);
|
|
185065
|
+
}
|
|
185066
|
+
delay(callback, duration) {
|
|
185067
|
+
const timer2 = setTimeout(() => {
|
|
185068
|
+
this.timers.delete(timer2);
|
|
185069
|
+
callback();
|
|
185070
|
+
}, duration);
|
|
185071
|
+
this.timers.add(timer2);
|
|
185072
|
+
}
|
|
185073
|
+
removeOverlay(gesture) {
|
|
185074
|
+
if (!gesture.overlay) return;
|
|
185075
|
+
gesture.elevation?.cancel();
|
|
185076
|
+
zIndexRegistry.unregister(gesture.overlay);
|
|
185077
|
+
gesture.overlay.remove();
|
|
185078
|
+
gesture.overlay = void 0;
|
|
185079
|
+
}
|
|
185080
|
+
fadeAndClear(gesture) {
|
|
185081
|
+
if (gesture.phase === "settling") return;
|
|
185082
|
+
gesture.phase = "settling";
|
|
185083
|
+
this.endPointer();
|
|
185084
|
+
const element4 = gesture.overlay ?? this.allTargets().find((node2) => node2.dataset.ticketId === gesture.motion.ticket.id);
|
|
185085
|
+
if (!element4 || this.reducedMotion.matches) {
|
|
185086
|
+
this.clear();
|
|
185087
|
+
return;
|
|
185088
|
+
}
|
|
185089
|
+
const transform2 = getComputedStyle(element4).transform;
|
|
185090
|
+
gesture.flight?.cancel();
|
|
185091
|
+
element4.style.transform = transform2;
|
|
185092
|
+
const fade = gesture.flight = element4.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 120, fill: "forwards" });
|
|
185093
|
+
void fade.finished.then(() => {
|
|
185094
|
+
if (this.gesture === gesture) void this.clearMotion(gesture);
|
|
185095
|
+
}, () => {
|
|
185096
|
+
});
|
|
185097
|
+
}
|
|
185098
|
+
clear() {
|
|
185099
|
+
const gesture = this.gesture;
|
|
185100
|
+
this.endPointer();
|
|
185101
|
+
this.gesture = void 0;
|
|
185102
|
+
for (const [parent, value2] of this.scrollSnap) parent.style.scrollSnapType = value2;
|
|
185103
|
+
this.scrollSnap.clear();
|
|
185104
|
+
this.scrollParents = [];
|
|
185105
|
+
for (const timer2 of this.timers) clearTimeout(timer2);
|
|
185106
|
+
this.timers.clear();
|
|
185107
|
+
for (const animation of this.animations.values()) animation.cancel();
|
|
185108
|
+
this.animations.clear();
|
|
185109
|
+
for (const column of this.columns) column.motion = void 0;
|
|
185110
|
+
if (!gesture) return;
|
|
185111
|
+
gesture.flight?.cancel();
|
|
185112
|
+
this.removeOverlay(gesture);
|
|
185113
|
+
let focused = document.activeElement;
|
|
185114
|
+
while (focused?.shadowRoot?.activeElement) focused = focused.shadowRoot.activeElement;
|
|
185115
|
+
if (gesture.restoreFocus && this.board.isConnected && (focused === document.body || focused === this.board)) {
|
|
185116
|
+
const card = this.allTargets().find((node2) => node2.dataset.ticketId === gesture.motion.ticket.id)?.querySelector("dees-kanban-card");
|
|
185117
|
+
card?.shadowRoot?.querySelector(".title")?.focus({ preventScroll: true });
|
|
185118
|
+
}
|
|
185119
|
+
}
|
|
185120
|
+
disconnect() {
|
|
185121
|
+
this.board.removeEventListener("pointerdown", this.down);
|
|
185122
|
+
this.suppressClick?.abort();
|
|
185123
|
+
clearTimeout(this.clickTimer);
|
|
185124
|
+
this.clear();
|
|
185125
|
+
}
|
|
185126
|
+
};
|
|
185127
|
+
|
|
184529
185128
|
// ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts
|
|
184530
185129
|
init_dist_ts26();
|
|
184531
|
-
var
|
|
185130
|
+
var _motion_dec, _nativeOver_dec, _nativeDropBefore_dec, _pointerManaged_dec2, _draggingTicketId_dec, _pendingTicketId_dec, _canCreate_dec, _movesDisabled_dec, _movable_dec2, _columns_dec5, _allTickets_dec, _tickets_dec2, _column_dec, _a108, _DeesKanbanColumn_decorators, _init110, _column, _tickets2, _allTickets, _columns5, _movable2, _movesDisabled, _canCreate, _pendingTicketId, _draggingTicketId, _pointerManaged2, _nativeDropBefore, _nativeOver, _motion;
|
|
184532
185131
|
_DeesKanbanColumn_decorators = [customElement("dees-kanban-column")];
|
|
184533
|
-
var _DeesKanbanColumn = class _DeesKanbanColumn extends (_a108 = DeesElement, _column_dec = [n5({ attribute: false })], _tickets_dec2 = [n5({ attribute: false })], _allTickets_dec = [n5({ attribute: false })], _columns_dec5 = [n5({ attribute: false })], _movable_dec2 = [n5({ type: Boolean })], _canCreate_dec = [n5({ type: Boolean })], _pendingTicketId_dec = [n5({ type: String })], _draggingTicketId_dec = [n5({ type: String })],
|
|
185132
|
+
var _DeesKanbanColumn = class _DeesKanbanColumn extends (_a108 = DeesElement, _column_dec = [n5({ attribute: false })], _tickets_dec2 = [n5({ attribute: false })], _allTickets_dec = [n5({ attribute: false })], _columns_dec5 = [n5({ attribute: false })], _movable_dec2 = [n5({ type: Boolean })], _movesDisabled_dec = [n5({ type: Boolean })], _canCreate_dec = [n5({ type: Boolean })], _pendingTicketId_dec = [n5({ type: String })], _draggingTicketId_dec = [n5({ type: String })], _pointerManaged_dec2 = [n5({ attribute: false })], _nativeDropBefore_dec = [r5()], _nativeOver_dec = [r5()], _motion_dec = [n5({ attribute: false })], _a108) {
|
|
184534
185133
|
constructor() {
|
|
184535
185134
|
super(...arguments);
|
|
184536
185135
|
__privateAdd(this, _column, __runInitializers(_init110, 8, this)), __runInitializers(_init110, 11, this);
|
|
@@ -184538,53 +185137,66 @@ var _DeesKanbanColumn = class _DeesKanbanColumn extends (_a108 = DeesElement, _c
|
|
|
184538
185137
|
__privateAdd(this, _allTickets, __runInitializers(_init110, 16, this, [])), __runInitializers(_init110, 19, this);
|
|
184539
185138
|
__privateAdd(this, _columns5, __runInitializers(_init110, 20, this, [])), __runInitializers(_init110, 23, this);
|
|
184540
185139
|
__privateAdd(this, _movable2, __runInitializers(_init110, 24, this, false)), __runInitializers(_init110, 27, this);
|
|
184541
|
-
__privateAdd(this,
|
|
184542
|
-
__privateAdd(this,
|
|
184543
|
-
__privateAdd(this,
|
|
184544
|
-
__privateAdd(this,
|
|
184545
|
-
__privateAdd(this,
|
|
185140
|
+
__privateAdd(this, _movesDisabled, __runInitializers(_init110, 28, this, false)), __runInitializers(_init110, 31, this);
|
|
185141
|
+
__privateAdd(this, _canCreate, __runInitializers(_init110, 32, this, false)), __runInitializers(_init110, 35, this);
|
|
185142
|
+
__privateAdd(this, _pendingTicketId, __runInitializers(_init110, 36, this, "")), __runInitializers(_init110, 39, this);
|
|
185143
|
+
__privateAdd(this, _draggingTicketId, __runInitializers(_init110, 40, this, "")), __runInitializers(_init110, 43, this);
|
|
185144
|
+
__privateAdd(this, _pointerManaged2, __runInitializers(_init110, 44, this, false)), __runInitializers(_init110, 47, this);
|
|
185145
|
+
__privateAdd(this, _nativeDropBefore, __runInitializers(_init110, 48, this)), __runInitializers(_init110, 51, this);
|
|
185146
|
+
__privateAdd(this, _nativeOver, __runInitializers(_init110, 52, this, false)), __runInitializers(_init110, 55, this);
|
|
185147
|
+
__privateAdd(this, _motion, __runInitializers(_init110, 56, this)), __runInitializers(_init110, 59, this);
|
|
184546
185148
|
}
|
|
184547
185149
|
updated() {
|
|
184548
|
-
if (!this.draggingTicketId) this.
|
|
185150
|
+
if (!this.draggingTicketId) this.nativeOver = false;
|
|
184549
185151
|
}
|
|
184550
185152
|
render() {
|
|
184551
185153
|
if (!this.column) return b2``;
|
|
184552
|
-
|
|
185154
|
+
const motion = this.motion;
|
|
185155
|
+
const tickets = sortKanbanTickets(this.tickets).filter((ticket) => ticket.id !== motion?.move.ticketId);
|
|
185156
|
+
const active = motion?.move.columnId === this.column.id;
|
|
185157
|
+
if (motion && active) {
|
|
185158
|
+
const index3 = tickets.findIndex((ticket) => ticket.id === motion.move.beforeTicketId);
|
|
185159
|
+
tickets.splice(index3 < 0 ? tickets.length : index3, 0, motion.ticket);
|
|
185160
|
+
}
|
|
185161
|
+
return b2`<section class=${active && motion?.placeholder || this.nativeOver ? "over" : ""} aria-label=${this.column.title}
|
|
184553
185162
|
@dragover=${(event) => {
|
|
184554
|
-
if (this.draggingTicketId && this.movable) {
|
|
185163
|
+
if (!this.pointerManaged && this.draggingTicketId && this.movable && !this.movesDisabled) {
|
|
184555
185164
|
event.preventDefault();
|
|
184556
|
-
this.
|
|
185165
|
+
this.nativeOver = true;
|
|
184557
185166
|
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
184558
185167
|
}
|
|
184559
185168
|
}}
|
|
184560
185169
|
@dragleave=${(event) => {
|
|
184561
|
-
if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) this.
|
|
185170
|
+
if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) this.nativeOver = false;
|
|
184562
185171
|
}}
|
|
184563
185172
|
@drop=${(event) => {
|
|
185173
|
+
if (this.pointerManaged) return;
|
|
184564
185174
|
event.preventDefault();
|
|
184565
|
-
this.
|
|
184566
|
-
if (this.movable && this.draggingTicketId && event.dataTransfer?.getData("application/x-dees-kanban-ticket") === this.draggingTicketId)
|
|
184567
|
-
kanbanEvent(this, "kanban-ticket-move", { ticketId: this.draggingTicketId, columnId: this.column.id, beforeTicketId: this.
|
|
185175
|
+
this.nativeOver = false;
|
|
185176
|
+
if (this.movable && !this.movesDisabled && this.draggingTicketId && event.dataTransfer?.getData("application/x-dees-kanban-ticket") === this.draggingTicketId)
|
|
185177
|
+
kanbanEvent(this, "kanban-ticket-move", { ticketId: this.draggingTicketId, columnId: this.column.id, beforeTicketId: this.nativeDropBefore });
|
|
184568
185178
|
}}>
|
|
184569
|
-
<header><h3>${this.column.title}</h3><span class="count">${
|
|
185179
|
+
<header><span class="status ${this.column.done ? "done" : ""}" aria-hidden="true"></span><h3>${this.column.title}</h3><span class="count">${tickets.length}</span><span class="spacer"></span>
|
|
184570
185180
|
${this.canCreate ? b2`<dees-button type="ghost" size="icon" icon="lucide:Plus" text=${`Add task to ${this.column.title}`}
|
|
184571
185181
|
@clicked=${() => kanbanEvent(this, "kanban-ticket-create", { kind: "task", columnId: this.column.id })}></dees-button>` : ""}</header>
|
|
184572
|
-
<div class="stack">${
|
|
184573
|
-
<div class="target ${this.
|
|
185182
|
+
<div class="stack">${directives_exports.repeat(tickets, (ticket) => ticket.id, (ticket) => b2`
|
|
185183
|
+
<div class="target ${this.nativeOver && this.nativeDropBefore === ticket.id ? "native-before" : ""}" data-ticket-id=${ticket.id}
|
|
184574
185184
|
@dragover=${() => {
|
|
184575
|
-
this.
|
|
185185
|
+
if (!this.pointerManaged) this.nativeDropBefore = ticket.id;
|
|
184576
185186
|
}}>
|
|
184577
|
-
|
|
185187
|
+
${motion?.move.ticketId === ticket.id && motion.placeholder ? b2`<div class="placeholder" style=${`height: ${motion.height}px`} aria-label="Drop ticket here"></div>` : b2`<dees-kanban-card .ticket=${ticket} .columns=${this.columns}
|
|
184578
185188
|
.epic=${this.allTickets.find((item) => item.id === ticket.parentId && item.kind === "epic")}
|
|
184579
185189
|
.subtasks=${sortKanbanTickets(this.allTickets.filter((item) => item.parentId === ticket.id && item.kind === "subtask"))}
|
|
184580
|
-
.movable=${this.movable && ticket.permissions?.move !== false} .pending=${this.pendingTicketId === ticket.id}
|
|
185190
|
+
.movable=${this.movable && ticket.permissions?.move !== false} .pending=${motion?.move.ticketId === ticket.id ? motion.dimmed : this.pendingTicketId === ticket.id}
|
|
185191
|
+
.moveDisabled=${this.movesDisabled}
|
|
185192
|
+
.saving=${motion?.move.ticketId === ticket.id && motion.saving} .pointerManaged=${this.pointerManaged}></dees-kanban-card>`}
|
|
184581
185193
|
</div>`)}
|
|
184582
|
-
${!
|
|
184583
|
-
this.
|
|
185194
|
+
${!tickets.length ? b2`<div class="empty" @dragover=${() => {
|
|
185195
|
+
this.nativeDropBefore = void 0;
|
|
184584
185196
|
}}>No tasks</div>` : ""}
|
|
184585
185197
|
</div>
|
|
184586
|
-
<div class="end-target ${this.
|
|
184587
|
-
this.
|
|
185198
|
+
<div class="end-target ${this.nativeOver && !this.nativeDropBefore ? "native-before" : ""}" @dragover=${() => {
|
|
185199
|
+
this.nativeDropBefore = void 0;
|
|
184588
185200
|
}}></div>
|
|
184589
185201
|
</section>`;
|
|
184590
185202
|
}
|
|
@@ -184595,34 +185207,45 @@ _tickets2 = new WeakMap();
|
|
|
184595
185207
|
_allTickets = new WeakMap();
|
|
184596
185208
|
_columns5 = new WeakMap();
|
|
184597
185209
|
_movable2 = new WeakMap();
|
|
185210
|
+
_movesDisabled = new WeakMap();
|
|
184598
185211
|
_canCreate = new WeakMap();
|
|
184599
185212
|
_pendingTicketId = new WeakMap();
|
|
184600
185213
|
_draggingTicketId = new WeakMap();
|
|
184601
|
-
|
|
184602
|
-
|
|
185214
|
+
_pointerManaged2 = new WeakMap();
|
|
185215
|
+
_nativeDropBefore = new WeakMap();
|
|
185216
|
+
_nativeOver = new WeakMap();
|
|
185217
|
+
_motion = new WeakMap();
|
|
184603
185218
|
__decorateElement(_init110, 4, "column", _column_dec, _DeesKanbanColumn, _column);
|
|
184604
185219
|
__decorateElement(_init110, 4, "tickets", _tickets_dec2, _DeesKanbanColumn, _tickets2);
|
|
184605
185220
|
__decorateElement(_init110, 4, "allTickets", _allTickets_dec, _DeesKanbanColumn, _allTickets);
|
|
184606
185221
|
__decorateElement(_init110, 4, "columns", _columns_dec5, _DeesKanbanColumn, _columns5);
|
|
184607
185222
|
__decorateElement(_init110, 4, "movable", _movable_dec2, _DeesKanbanColumn, _movable2);
|
|
185223
|
+
__decorateElement(_init110, 4, "movesDisabled", _movesDisabled_dec, _DeesKanbanColumn, _movesDisabled);
|
|
184608
185224
|
__decorateElement(_init110, 4, "canCreate", _canCreate_dec, _DeesKanbanColumn, _canCreate);
|
|
184609
185225
|
__decorateElement(_init110, 4, "pendingTicketId", _pendingTicketId_dec, _DeesKanbanColumn, _pendingTicketId);
|
|
184610
185226
|
__decorateElement(_init110, 4, "draggingTicketId", _draggingTicketId_dec, _DeesKanbanColumn, _draggingTicketId);
|
|
184611
|
-
__decorateElement(_init110, 4, "
|
|
184612
|
-
__decorateElement(_init110, 4, "
|
|
185227
|
+
__decorateElement(_init110, 4, "pointerManaged", _pointerManaged_dec2, _DeesKanbanColumn, _pointerManaged2);
|
|
185228
|
+
__decorateElement(_init110, 4, "nativeDropBefore", _nativeDropBefore_dec, _DeesKanbanColumn, _nativeDropBefore);
|
|
185229
|
+
__decorateElement(_init110, 4, "nativeOver", _nativeOver_dec, _DeesKanbanColumn, _nativeOver);
|
|
185230
|
+
__decorateElement(_init110, 4, "motion", _motion_dec, _DeesKanbanColumn, _motion);
|
|
184613
185231
|
_DeesKanbanColumn = __decorateElement(_init110, 0, "DeesKanbanColumn", _DeesKanbanColumn_decorators, _DeesKanbanColumn);
|
|
184614
185232
|
__name(_DeesKanbanColumn, "DeesKanbanColumn");
|
|
184615
185233
|
__publicField(_DeesKanbanColumn, "styles", [...kanbanStyles, i`
|
|
184616
|
-
:host { display: flex; flex-direction: column; width:
|
|
184617
|
-
section { min-height: 220px; height: 100%; border-radius: var(--dees-radius-
|
|
184618
|
-
header { display: flex; align-items: center; gap: 8px; padding:
|
|
184619
|
-
h3 { font-size: var(--dees-font-
|
|
184620
|
-
|
|
184621
|
-
.
|
|
185234
|
+
:host { display: flex; flex-direction: column; min-width: 272px; max-width: 360px; flex: 1 0 272px; }
|
|
185235
|
+
section { min-height: 220px; height: 100%; border-radius: var(--dees-radius-xl); transition: background var(--dees-transition-default) var(--dees-ease-out); }
|
|
185236
|
+
header { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 10px; padding: 0 2px 8px; border-bottom: 1px solid var(--dees-color-border-subtle); }
|
|
185237
|
+
h3 { font-size: var(--dees-font-footnote-size); font-weight: 600; }
|
|
185238
|
+
header dees-button::part(button) { width: 24px; height: 24px; min-height: 24px; }
|
|
185239
|
+
.status { width: 8px; height: 8px; border: 1.5px solid var(--dees-color-text-secondary); border-radius: 50%; flex-shrink: 0; }
|
|
185240
|
+
.status.done { background: var(--dees-color-accent-success); border-color: var(--dees-color-accent-success); }
|
|
185241
|
+
.stack { display: grid; gap: 8px; min-height: 120px; align-content: start; }
|
|
184622
185242
|
.target { position: relative; }
|
|
184623
|
-
.
|
|
184624
|
-
.
|
|
184625
|
-
|
|
185243
|
+
.native-before::before { content: ''; position: absolute; top: -5px; left: 0; right: 0; height: 2px; background: var(--dees-color-accent-primary); border-radius: 2px; }
|
|
185244
|
+
.placeholder { border-radius: var(--dees-radius-xl); background: var(--dees-color-fill-tertiary); box-shadow: inset 0 0 0 1px var(--dees-color-border-default); }
|
|
185245
|
+
.end-target { position: relative; min-height: 32px; margin-top: 8px; }
|
|
185246
|
+
section.over { background: var(--dees-color-row-hover); }
|
|
185247
|
+
@media (prefers-reduced-motion: reduce) { section { transition: none; } }
|
|
185248
|
+
@media (pointer: coarse) { header dees-button::part(button) { width: 32px; height: 32px; min-height: 32px; } }
|
|
184626
185249
|
`]);
|
|
184627
185250
|
__runInitializers(_init110, 1, _DeesKanbanColumn);
|
|
184628
185251
|
var DeesKanbanColumn = _DeesKanbanColumn;
|
|
@@ -184631,7 +185254,7 @@ var DeesKanbanColumn = _DeesKanbanColumn;
|
|
|
184631
185254
|
init_dist_ts26();
|
|
184632
185255
|
init_dees_modal();
|
|
184633
185256
|
init_dees_contextmenu();
|
|
184634
|
-
var _openingTicket_dec,
|
|
185257
|
+
var _openingTicket_dec, _pendingTicketId_dec2, _operationError_dec, _epicId_dec, _query_dec2, _error_dec4, _loading_dec8, _provider_dec3, _people_dec2, _columns_dec6, _tickets_dec3, _heading_dec8, _a109, _DeesKanban_decorators, _init111, _heading8, _tickets3, _columns6, _people2, _provider3, _loading8, _error4, _query2, _epicId, _operationError, _pendingTicketId2, _openingTicket;
|
|
184635
185258
|
var interactionEvents = [
|
|
184636
185259
|
"kanban-ticket-open",
|
|
184637
185260
|
"kanban-ticket-move",
|
|
@@ -184642,12 +185265,10 @@ var interactionEvents = [
|
|
|
184642
185265
|
"kanban-comment-draft",
|
|
184643
185266
|
"kanban-comment-added",
|
|
184644
185267
|
"kanban-comments-refresh",
|
|
184645
|
-
"kanban-detail-back"
|
|
184646
|
-
"kanban-drag-start",
|
|
184647
|
-
"kanban-drag-end"
|
|
185268
|
+
"kanban-detail-back"
|
|
184648
185269
|
];
|
|
184649
185270
|
_DeesKanban_decorators = [customElement("dees-kanban")];
|
|
184650
|
-
var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8 = [n5({ type: String })], _tickets_dec3 = [n5({ attribute: false })], _columns_dec6 = [n5({ attribute: false })], _people_dec2 = [n5({ attribute: false })], _provider_dec3 = [n5({ attribute: false })], _loading_dec8 = [n5({ type: Boolean })], _error_dec4 = [n5({ type: String })], _query_dec2 = [r5()], _epicId_dec = [r5()], _operationError_dec = [r5()], _pendingTicketId_dec2 = [r5()],
|
|
185271
|
+
var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8 = [n5({ type: String })], _tickets_dec3 = [n5({ attribute: false })], _columns_dec6 = [n5({ attribute: false })], _people_dec2 = [n5({ attribute: false })], _provider_dec3 = [n5({ attribute: false })], _loading_dec8 = [n5({ type: Boolean })], _error_dec4 = [n5({ type: String })], _query_dec2 = [r5()], _epicId_dec = [r5()], _operationError_dec = [r5()], _pendingTicketId_dec2 = [r5()], _openingTicket_dec = [r5()], _a109) {
|
|
184651
185272
|
constructor() {
|
|
184652
185273
|
super(...arguments);
|
|
184653
185274
|
__privateAdd(this, _heading8, __runInitializers(_init111, 8, this, "Board")), __runInitializers(_init111, 11, this);
|
|
@@ -184661,8 +185282,7 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184661
185282
|
__privateAdd(this, _epicId, __runInitializers(_init111, 40, this, "")), __runInitializers(_init111, 43, this);
|
|
184662
185283
|
__privateAdd(this, _operationError, __runInitializers(_init111, 44, this, "")), __runInitializers(_init111, 47, this);
|
|
184663
185284
|
__privateAdd(this, _pendingTicketId2, __runInitializers(_init111, 48, this, "")), __runInitializers(_init111, 51, this);
|
|
184664
|
-
__privateAdd(this,
|
|
184665
|
-
__privateAdd(this, _openingTicket, __runInitializers(_init111, 56, this, false)), __runInitializers(_init111, 59, this);
|
|
185285
|
+
__privateAdd(this, _openingTicket, __runInitializers(_init111, 52, this, false)), __runInitializers(_init111, 55, this);
|
|
184666
185286
|
__publicField(this, "modal");
|
|
184667
185287
|
__publicField(this, "modalOpening");
|
|
184668
185288
|
__publicField(this, "detail");
|
|
@@ -184675,6 +185295,8 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184675
185295
|
__publicField(this, "commentDrafts", /* @__PURE__ */ new Map());
|
|
184676
185296
|
__publicField(this, "ticketDrafts", /* @__PURE__ */ new Map());
|
|
184677
185297
|
__publicField(this, "resolvedTickets", /* @__PURE__ */ new Map());
|
|
185298
|
+
__publicField(this, "activeMove");
|
|
185299
|
+
__publicField(this, "dragController", new KanbanDragController(this, (input) => this.persistMove(input), () => !this.pendingTicketId));
|
|
184678
185300
|
__publicField(this, "searchTickets", /* @__PURE__ */ __name(async (query3, signal) => {
|
|
184679
185301
|
const tickets = this.provider.searchTickets ? await this.provider.searchTickets(query3, signal) : this.tickets.filter((ticket) => ticketLabel(ticket).toLocaleLowerCase().includes(query3.toLocaleLowerCase()));
|
|
184680
185302
|
if (!signal.aborted) for (const ticket of tickets) this.resolvedTickets.set(ticket.id, ticket);
|
|
@@ -184724,22 +185346,18 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184724
185346
|
if (previous3) void this.openTicket(previous3, false);
|
|
184725
185347
|
break;
|
|
184726
185348
|
}
|
|
184727
|
-
case "kanban-drag-start":
|
|
184728
|
-
this.draggingTicketId = detail.ticketId;
|
|
184729
|
-
break;
|
|
184730
|
-
case "kanban-drag-end":
|
|
184731
|
-
this.draggingTicketId = "";
|
|
184732
|
-
break;
|
|
184733
185349
|
}
|
|
184734
185350
|
}, "handleInteraction"));
|
|
184735
185351
|
}
|
|
184736
185352
|
async connectedCallback() {
|
|
184737
185353
|
const connection = super.connectedCallback();
|
|
184738
185354
|
for (const name of interactionEvents) this.addEventListener(name, this.handleInteraction);
|
|
185355
|
+
this.dragController.connect();
|
|
184739
185356
|
await connection;
|
|
184740
185357
|
}
|
|
184741
185358
|
updated() {
|
|
184742
185359
|
this.syncDetail();
|
|
185360
|
+
this.dragController.sync();
|
|
184743
185361
|
}
|
|
184744
185362
|
render() {
|
|
184745
185363
|
const epics = sortKanbanTickets(this.tickets.filter((ticket) => ticket.kind === "epic"));
|
|
@@ -184752,35 +185370,37 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184752
185370
|
...this.tickets.filter((child) => child.parentId === ticket.id).map((child) => `${child.key} ${child.title}`)
|
|
184753
185371
|
].join(" ").toLocaleLowerCase().includes(query3)));
|
|
184754
185372
|
const epic = epics.find((ticket) => ticket.id === this.epicId);
|
|
184755
|
-
return b2`<header class="heading"><h2>${this.heading}</h2><span class="
|
|
184756
|
-
|
|
184757
|
-
@clicked=${() => {
|
|
184758
|
-
void this.createTicket({ kind: "epic", columnId: this.columns[0].id });
|
|
184759
|
-
}}></dees-button>
|
|
184760
|
-
<dees-button type="accent" size="sm" icon="lucide:Plus" text="New task" .disabled=${!this.columns.length}
|
|
184761
|
-
@clicked=${() => {
|
|
184762
|
-
void this.createTicket({ kind: "task", columnId: this.columns[0].id, parentId: this.epicId || void 0 });
|
|
184763
|
-
}}></dees-button>` : ""}</header>
|
|
184764
|
-
<div class="filters"><dees-input-text label="Search tickets" placeholder="Title, ticket number, assignee…" .value=${this.query}
|
|
185373
|
+
return b2`<header class="heading"><div class="identity"><h2>${this.heading}</h2><span class="totals">${tasks.length} tasks · ${epics.length} epics</span></div>
|
|
185374
|
+
<div class="filters"><dees-input-text label="Search tickets" .labelPosition=${"none"} placeholder="Search tickets…" .value=${this.query}
|
|
184765
185375
|
@input=${(event) => {
|
|
184766
185376
|
this.query = String(event.currentTarget.value ?? "");
|
|
184767
185377
|
}}></dees-input-text>
|
|
184768
|
-
<dees-input-dropdown label="Epic" .value=${{ key: this.epicId, option: epic?.title ?? "All epics" }}
|
|
185378
|
+
<dees-input-dropdown label="Epic" .labelPosition=${"none"} .value=${{ key: this.epicId, option: epic?.title ?? "All epics" }}
|
|
184769
185379
|
.options=${[{ key: "", option: "All epics" }, ...epics.map((ticket) => ({ key: ticket.id, option: ticket.title }))]}
|
|
184770
185380
|
@selectedOption=${(event) => {
|
|
184771
185381
|
this.epicId = event.detail.key;
|
|
184772
185382
|
}}></dees-input-dropdown>
|
|
184773
|
-
${epic ? b2`<dees-button type="ghost"
|
|
185383
|
+
${epic ? b2`<dees-button type="ghost" text="Open epic" @clicked=${() => {
|
|
184774
185384
|
void this.openTicket(epic.id);
|
|
184775
185385
|
}}></dees-button>` : ""}
|
|
184776
185386
|
</div>
|
|
185387
|
+
${this.provider.createTicket ? b2`<div class="actions"><dees-button type="secondary" text="New epic" .disabled=${!this.columns.length}
|
|
185388
|
+
@clicked=${() => {
|
|
185389
|
+
void this.createTicket({ kind: "epic", columnId: this.columns[0].id });
|
|
185390
|
+
}}></dees-button>
|
|
185391
|
+
<dees-button type="accent" icon="lucide:Plus" text="New task" .disabled=${!this.columns.length}
|
|
185392
|
+
@clicked=${() => {
|
|
185393
|
+
void this.createTicket({ kind: "task", columnId: this.columns[0].id, parentId: this.epicId || void 0 });
|
|
185394
|
+
}}></dees-button></div>` : ""}</header>
|
|
184777
185395
|
${this.loading || this.openingTicket ? b2`<p class="caption" role="status">${this.loading ? "Loading board\u2026" : "Opening ticket\u2026"}</p>` : ""}
|
|
184778
185396
|
${this.error || this.operationError ? b2`<p class="error" role="alert">${this.error || this.operationError}</p>` : ""}
|
|
184779
185397
|
${!this.columns.length ? b2`<p class="empty">No columns configured.</p>` : b2`<div class="columns" aria-label=${this.heading}>
|
|
184780
|
-
${this.columns.
|
|
185398
|
+
${directives_exports.repeat(this.columns, (column) => column.id, (column) => b2`<dees-kanban-column .column=${column} .columns=${this.columns}
|
|
185399
|
+
.pointerManaged=${true}
|
|
184781
185400
|
.tickets=${tasks.filter((ticket) => ticket.columnId === column.id)} .allTickets=${this.tickets}
|
|
184782
|
-
.movable=${Boolean(this.provider.moveTicket)
|
|
184783
|
-
.
|
|
185401
|
+
.movable=${Boolean(this.provider.moveTicket)} .canCreate=${Boolean(this.provider.createTicket)}
|
|
185402
|
+
.movesDisabled=${Boolean(this.pendingTicketId)}
|
|
185403
|
+
.pendingTicketId=${this.pendingTicketId}></dees-kanban-column>`)}</div>`}`;
|
|
184784
185404
|
}
|
|
184785
185405
|
findTicket(id) {
|
|
184786
185406
|
return this.tickets.find((ticket) => ticket.id === id) ?? this.resolvedTickets.get(id);
|
|
@@ -184801,6 +185421,7 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184801
185421
|
this.selectedId = id;
|
|
184802
185422
|
if (!this.detail) {
|
|
184803
185423
|
this.detail = new DeesKanbanTicketDetail();
|
|
185424
|
+
this.detail.showTicketKey = false;
|
|
184804
185425
|
for (const name of interactionEvents) this.detail.addEventListener(name, this.handleInteraction);
|
|
184805
185426
|
}
|
|
184806
185427
|
this.detail.ticket = ticket;
|
|
@@ -184812,6 +185433,7 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184812
185433
|
width: 1e3,
|
|
184813
185434
|
maxWidth: 1040,
|
|
184814
185435
|
mobileFullscreen: true,
|
|
185436
|
+
contentPadding: 0,
|
|
184815
185437
|
content: b2`${this.detail}`,
|
|
184816
185438
|
menuOptions: []
|
|
184817
185439
|
});
|
|
@@ -184902,29 +185524,44 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184902
185524
|
}
|
|
184903
185525
|
/** Provider commits the move and supplies the new ordering. Hierarchy is never part of a move request. */
|
|
184904
185526
|
async moveTicket(input) {
|
|
185527
|
+
if (this.dragController.busy) return;
|
|
185528
|
+
await this.persistMove(input, true);
|
|
185529
|
+
}
|
|
185530
|
+
async persistMove(input, animate = false) {
|
|
184905
185531
|
const ticket = this.findTicket(input.ticketId);
|
|
184906
|
-
if (!ticket || !this.provider.moveTicket || ticket.permissions?.move === false || this.pendingTicketId || input.beforeTicketId === ticket.id) return;
|
|
185532
|
+
if (!ticket || !this.provider.moveTicket || ticket.permissions?.move === false || this.pendingTicketId || input.beforeTicketId === ticket.id) return false;
|
|
184907
185533
|
if (!this.columns.some((column) => column.id === input.columnId)) {
|
|
184908
185534
|
this.reportError(new Error("Unknown destination column."));
|
|
184909
|
-
return;
|
|
185535
|
+
return false;
|
|
184910
185536
|
}
|
|
184911
185537
|
const before = input.beforeTicketId ? this.findTicket(input.beforeTicketId) : void 0;
|
|
184912
185538
|
if (input.beforeTicketId && (!before || before.columnId !== input.columnId || before.kind !== ticket.kind)) {
|
|
184913
185539
|
this.reportError(new Error("Invalid insertion target."));
|
|
184914
|
-
return;
|
|
185540
|
+
return false;
|
|
184915
185541
|
}
|
|
185542
|
+
const operation = this.activeMove = /* @__PURE__ */ Symbol();
|
|
184916
185543
|
this.pendingTicketId = ticket.id;
|
|
184917
185544
|
this.operationError = "";
|
|
184918
|
-
this.draggingTicketId = "";
|
|
184919
185545
|
try {
|
|
184920
185546
|
const changed2 = await this.provider.moveTicket(input);
|
|
185547
|
+
if (this.activeMove !== operation) return false;
|
|
184921
185548
|
if (!changed2.some((item) => item.id === ticket.id)) throw new Error("The move provider did not return the moved ticket.");
|
|
185549
|
+
const positions = animate ? this.dragController.capture() : void 0;
|
|
184922
185550
|
this.mergeTickets(changed2);
|
|
185551
|
+
if (positions) {
|
|
185552
|
+
await this.updateComplete;
|
|
185553
|
+
await this.dragController.animateFrom(positions);
|
|
185554
|
+
}
|
|
185555
|
+
return true;
|
|
184923
185556
|
} catch (error) {
|
|
184924
|
-
this.reportError(error);
|
|
185557
|
+
if (this.activeMove === operation) this.reportError(error);
|
|
185558
|
+
return false;
|
|
184925
185559
|
} finally {
|
|
184926
|
-
this.
|
|
184927
|
-
|
|
185560
|
+
if (this.activeMove === operation) {
|
|
185561
|
+
this.activeMove = void 0;
|
|
185562
|
+
this.pendingTicketId = "";
|
|
185563
|
+
this.syncDetail();
|
|
185564
|
+
}
|
|
184928
185565
|
}
|
|
184929
185566
|
}
|
|
184930
185567
|
async saveTicket(ticketId, draft) {
|
|
@@ -184999,6 +185636,11 @@ var _DeesKanban = class _DeesKanban extends (_a109 = DeesElement, _heading_dec8
|
|
|
184999
185636
|
}
|
|
185000
185637
|
async disconnectedCallback() {
|
|
185001
185638
|
for (const name of interactionEvents) this.removeEventListener(name, this.handleInteraction);
|
|
185639
|
+
this.dragController.disconnect();
|
|
185640
|
+
if (this.activeMove) {
|
|
185641
|
+
this.activeMove = void 0;
|
|
185642
|
+
this.pendingTicketId = "";
|
|
185643
|
+
}
|
|
185002
185644
|
this.openAbort?.abort();
|
|
185003
185645
|
this.commentsAbort?.abort();
|
|
185004
185646
|
void this.modal?.destroy();
|
|
@@ -185017,7 +185659,6 @@ _query2 = new WeakMap();
|
|
|
185017
185659
|
_epicId = new WeakMap();
|
|
185018
185660
|
_operationError = new WeakMap();
|
|
185019
185661
|
_pendingTicketId2 = new WeakMap();
|
|
185020
|
-
_draggingTicketId2 = new WeakMap();
|
|
185021
185662
|
_openingTicket = new WeakMap();
|
|
185022
185663
|
__decorateElement(_init111, 4, "heading", _heading_dec8, _DeesKanban, _heading8);
|
|
185023
185664
|
__decorateElement(_init111, 4, "tickets", _tickets_dec3, _DeesKanban, _tickets3);
|
|
@@ -185030,21 +185671,33 @@ __decorateElement(_init111, 4, "query", _query_dec2, _DeesKanban, _query2);
|
|
|
185030
185671
|
__decorateElement(_init111, 4, "epicId", _epicId_dec, _DeesKanban, _epicId);
|
|
185031
185672
|
__decorateElement(_init111, 4, "operationError", _operationError_dec, _DeesKanban, _operationError);
|
|
185032
185673
|
__decorateElement(_init111, 4, "pendingTicketId", _pendingTicketId_dec2, _DeesKanban, _pendingTicketId2);
|
|
185033
|
-
__decorateElement(_init111, 4, "draggingTicketId", _draggingTicketId_dec2, _DeesKanban, _draggingTicketId2);
|
|
185034
185674
|
__decorateElement(_init111, 4, "openingTicket", _openingTicket_dec, _DeesKanban, _openingTicket);
|
|
185035
185675
|
_DeesKanban = __decorateElement(_init111, 0, "DeesKanban", _DeesKanban_decorators, _DeesKanban);
|
|
185036
185676
|
__name(_DeesKanban, "DeesKanban");
|
|
185037
185677
|
__publicField(_DeesKanban, "demo", demoFunc72);
|
|
185038
185678
|
__publicField(_DeesKanban, "demoGroups", ["Kanban"]);
|
|
185039
185679
|
__publicField(_DeesKanban, "styles", [...kanbanStyles, i`
|
|
185040
|
-
:host { padding: 24px; background: var(--dees-color-bg-canvas); min-height: 100%; }
|
|
185041
|
-
.heading { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom:
|
|
185042
|
-
|
|
185043
|
-
|
|
185044
|
-
.
|
|
185045
|
-
.filters
|
|
185046
|
-
.
|
|
185047
|
-
|
|
185680
|
+
:host { padding: 20px 24px; background: var(--dees-color-bg-canvas); min-height: 100%; }
|
|
185681
|
+
.heading { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
|
|
185682
|
+
.identity { display: flex; gap: 12px; align-items: baseline; flex: 1; min-width: 220px; flex-wrap: wrap; }
|
|
185683
|
+
h2 { font-size: var(--dees-font-title3-size); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; overflow-wrap: anywhere; }
|
|
185684
|
+
.totals { font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary); white-space: nowrap; }
|
|
185685
|
+
.filters { display: flex; align-items: center; gap: 8px; }
|
|
185686
|
+
.filters dees-input-text { width: 230px; min-width: 140px; }
|
|
185687
|
+
.filters dees-input-dropdown { width: 180px; min-width: 140px; }
|
|
185688
|
+
.actions { display: flex; gap: 8px; margin-left: auto; }
|
|
185689
|
+
.columns { display: flex; gap: 20px; overflow-x: auto; padding: 3px 2px 16px; align-items: stretch; }
|
|
185690
|
+
@media (max-width: 1100px) { .filters { order: 3; flex-basis: 100%; } .filters dees-input-text { flex: 1; max-width: 320px; } }
|
|
185691
|
+
@media (max-width: 600px) {
|
|
185692
|
+
:host { padding: 12px 16px; }
|
|
185693
|
+
.heading { gap: 12px 8px; }
|
|
185694
|
+
.identity { min-width: 100%; gap: 6px 10px; }
|
|
185695
|
+
.actions { margin-left: 0; }
|
|
185696
|
+
.filters { flex-wrap: wrap; }
|
|
185697
|
+
.filters dees-input-text, .filters dees-input-dropdown { flex: 1; width: auto; min-width: 130px; }
|
|
185698
|
+
.columns { margin: 0 -16px; padding: 3px 16px 16px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; gap: 14px; }
|
|
185699
|
+
dees-kanban-column { scroll-snap-align: start; flex: 0 0 86%; min-width: 0; max-width: none; }
|
|
185700
|
+
}
|
|
185048
185701
|
`]);
|
|
185049
185702
|
__runInitializers(_init111, 1, _DeesKanban);
|
|
185050
185703
|
var DeesKanban = _DeesKanban;
|
|
@@ -196809,9 +197462,9 @@ var AnnotationEditor = class _AnnotationEditor {
|
|
|
196809
197462
|
} = this.getClientDimensions();
|
|
196810
197463
|
const {
|
|
196811
197464
|
innerHeight: innerHeight2,
|
|
196812
|
-
innerWidth
|
|
197465
|
+
innerWidth: innerWidth2
|
|
196813
197466
|
} = window;
|
|
196814
|
-
return left <
|
|
197467
|
+
return left < innerWidth2 && right > 0 && top < innerHeight2 && bottom > 0;
|
|
196815
197468
|
}
|
|
196816
197469
|
#addFocusListeners() {
|
|
196817
197470
|
if (this.#focusAC || !this.div) {
|
|
@@ -226450,7 +227103,7 @@ init_group_runtime();
|
|
|
226450
227103
|
// ts_web/00_commitinfo_data.ts
|
|
226451
227104
|
var commitinfo = {
|
|
226452
227105
|
name: "@design.estate/dees-catalog",
|
|
226453
|
-
version: "13.0.
|
|
227106
|
+
version: "13.0.2",
|
|
226454
227107
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
226455
227108
|
};
|
|
226456
227109
|
|