@design.estate/dees-catalog 21.43.0 → 21.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +529 -178
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-72W55DOJ.js → chunk-ETDITRNI.js} +4 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-72W55DOJ.js.map → chunk-ETDITRNI.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-PAFNUCDL.js → chunk-UD6S2QIF.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-GTAAYRP5.js → chunk-WZGJITN2.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-CQ56NZVB.js → de-NIKZVWN2.js} +4 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-NIKZVWN2.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-JNRW3HIY.js → dees-modal-BOGBX6EB.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-Y532Z546.js → dees-workspace-terminal-M3DB4LUI.js} +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-dataview/dees-thread/dees-thread.d.ts +20 -4
- package/dist_ts_web/elements/00group-dataview/dees-thread/dees-thread.demo.js +21 -4
- package/dist_ts_web/elements/00group-dataview/dees-thread/dees-thread.js +65 -10
- package/dist_ts_web/elements/00group-dataview/dees-thread/interfaces.d.ts +5 -0
- package/dist_ts_web/elements/00group-dataview/dees-thread/thread.markdown.d.ts +2 -1
- package/dist_ts_web/elements/00group-dataview/dees-thread/thread.markdown.js +6 -3
- package/dist_ts_web/elements/00group-input/dees-input-reference/dees-input-reference.d.ts +1 -7
- package/dist_ts_web/elements/00group-input/dees-input-reference/dees-input-reference.js +22 -97
- package/dist_ts_web/elements/00group-input/dees-input-richtext/component.d.ts +23 -0
- package/dist_ts_web/elements/00group-input/dees-input-richtext/component.js +105 -5
- package/dist_ts_web/elements/00group-input/dees-input-richtext/demo.js +29 -1
- package/dist_ts_web/elements/00group-input/dees-input-richtext/index.d.ts +1 -1
- package/dist_ts_web/elements/00group-input/dees-input-richtext/index.js +5 -2
- package/dist_ts_web/elements/00group-input/dees-input-richtext/markdown.d.ts +21 -0
- package/dist_ts_web/elements/00group-input/dees-input-richtext/markdown.js +90 -6
- package/dist_ts_web/elements/00group-input/dees-input-richtext/references.d.ts +52 -0
- package/dist_ts_web/elements/00group-input/dees-input-richtext/references.js +152 -0
- package/dist_ts_web/elements/00group-input/dees-input-richtext/styles.js +23 -1
- package/dist_ts_web/elements/00group-input/dees-input-richtext/template.js +2 -1
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +6 -1
- package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.d.ts +15 -2
- package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.js +44 -11
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.d.ts +7 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +67 -5
- package/dist_ts_web/elements/00group-kanban/kanban.demodata.js +2 -2
- package/dist_ts_web/i18n/de.d.ts +6 -2
- package/dist_ts_web/i18n/de.js +3 -2
- package/dist_ts_web/i18n/messages.d.ts +6 -2
- package/dist_ts_web/i18n/messages.js +3 -2
- package/dist_ts_web/richtextmarkdown.d.ts +5 -1
- package/dist_ts_web/richtextmarkdown.js +6 -2
- package/package.json +1 -1
- package/readme.md +66 -10
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-dataview/dees-thread/dees-thread.demo.ts +23 -3
- package/ts_web/elements/00group-dataview/dees-thread/dees-thread.ts +50 -7
- package/ts_web/elements/00group-dataview/dees-thread/interfaces.ts +6 -0
- package/ts_web/elements/00group-dataview/dees-thread/thread.markdown.ts +5 -2
- package/ts_web/elements/00group-input/dees-input-reference/dees-input-reference.ts +20 -88
- package/ts_web/elements/00group-input/dees-input-richtext/component.ts +83 -3
- package/ts_web/elements/00group-input/dees-input-richtext/demo.ts +34 -0
- package/ts_web/elements/00group-input/dees-input-richtext/index.ts +6 -0
- package/ts_web/elements/00group-input/dees-input-richtext/markdown.ts +93 -5
- package/ts_web/elements/00group-input/dees-input-richtext/references.ts +171 -0
- package/ts_web/elements/00group-input/dees-input-richtext/styles.ts +22 -0
- package/ts_web/elements/00group-input/dees-input-richtext/template.ts +1 -0
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +5 -0
- package/ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.ts +39 -10
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +61 -3
- package/ts_web/elements/00group-kanban/kanban.demodata.ts +1 -1
- package/ts_web/i18n/de.ts +2 -1
- package/ts_web/i18n/messages.ts +2 -1
- package/ts_web/richtextmarkdown.ts +8 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-CQ56NZVB.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-PAFNUCDL.js.map → chunk-UD6S2QIF.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-GTAAYRP5.js.map → chunk-WZGJITN2.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-JNRW3HIY.js.map → dees-modal-BOGBX6EB.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-Y532Z546.js.map → dees-workspace-terminal-M3DB4LUI.js.map} +0 -0
package/dist_bundle/bundle.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
ownAppuiLabels,
|
|
27
27
|
resolveAppuiLabels,
|
|
28
28
|
xtermStyles
|
|
29
|
-
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-
|
|
29
|
+
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-UD6S2QIF.js";
|
|
30
30
|
import {
|
|
31
31
|
ActionRunController,
|
|
32
32
|
BarInfoController,
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
workspaceVisibility,
|
|
125
125
|
zIndexLayers,
|
|
126
126
|
zIndexRegistry
|
|
127
|
-
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-
|
|
127
|
+
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-WZGJITN2.js";
|
|
128
128
|
import {
|
|
129
129
|
dcMessages,
|
|
130
130
|
dcSourceI18n,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
firstDayOfWeek,
|
|
135
135
|
iso_exports,
|
|
136
136
|
momentFormat
|
|
137
|
-
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-
|
|
137
|
+
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-ETDITRNI.js";
|
|
138
138
|
import {
|
|
139
139
|
__decorateElement,
|
|
140
140
|
__decoratorMetadata,
|
|
@@ -40442,6 +40442,22 @@ var keptNote = [
|
|
|
40442
40442
|
"",
|
|
40443
40443
|
"Everything else is **editable** as usual."
|
|
40444
40444
|
].join("\n");
|
|
40445
|
+
var linkedNote = [
|
|
40446
|
+
"The transfer covers [#INV-2041 Hafenlogistik Bremen](#reference:inv-2041) and the second invoice.",
|
|
40447
|
+
"",
|
|
40448
|
+
"Type # to link another record."
|
|
40449
|
+
].join("\n");
|
|
40450
|
+
var records = [
|
|
40451
|
+
{ id: "inv-2041", label: "#INV-2041 Hafenlogistik Bremen" },
|
|
40452
|
+
{ id: "inv-2042", label: "#INV-2042 Hafenlogistik Bremen" },
|
|
40453
|
+
{ id: "ctr-17", label: "#CTR-17 Archive room lease" },
|
|
40454
|
+
{ id: "ctr-21", label: "#CTR-21 Telekom business line" }
|
|
40455
|
+
];
|
|
40456
|
+
var searchRecords = /* @__PURE__ */ __name(async (query2) => records.filter((record) => record.label.toLowerCase().includes(query2.toLowerCase())), "searchRecords");
|
|
40457
|
+
var showOpened = /* @__PURE__ */ __name((event) => {
|
|
40458
|
+
const { id, label } = event.detail;
|
|
40459
|
+
showDemoResult(event.currentTarget, `reference-open: ${id} (${label})`);
|
|
40460
|
+
}, "showOpened");
|
|
40445
40461
|
var noteToolbar = ["bold", "italic", "bulletList", "orderedList", "link", "undo", "redo"];
|
|
40446
40462
|
var showValue = /* @__PURE__ */ __name((event) => showDemoResult(event.currentTarget, event.detail.value), "showValue");
|
|
40447
40463
|
var demoFunc32 = /* @__PURE__ */ __name(() => focusedInputDemo("richtext", b`
|
|
@@ -40458,6 +40474,16 @@ var demoFunc32 = /* @__PURE__ */ __name(() => focusedInputDemo("richtext", b`
|
|
|
40458
40474
|
.toolbar=\${['bold', 'italic', 'bulletList', 'orderedList', 'link', 'undo', 'redo']}
|
|
40459
40475
|
.value=\${note.markdown}></dees-input-richtext>`)}
|
|
40460
40476
|
`)}
|
|
40477
|
+
${demoSection("Linking records", "With searchReferences the field links the host's records: # at the start of a word searches them at the caret, and the record chosen stands in the text as one piece, a link to #reference: and its id in the Markdown. Clicking it, or Enter on it, reports it as reference-open, for the host to open the record.", b`
|
|
40478
|
+
<dees-input-richtext label="Payment note" format="markdown" auto-grow .minHeight=${140} .showWordCount=${false}
|
|
40479
|
+
.toolbar=${noteToolbar} .value=${linkedNote} .searchReferences=${searchRecords} reference-search-label="Search records"
|
|
40480
|
+
@input=${showValue} @reference-open=${showOpened}></dees-input-richtext>
|
|
40481
|
+
${demoOutput(linkedNote)}
|
|
40482
|
+
${demoCode(`<dees-input-richtext label="Payment note" format="markdown"
|
|
40483
|
+
.searchReferences=\${(query, signal) => api.searchRecords(query, signal)}
|
|
40484
|
+
reference-search-label="Search records"
|
|
40485
|
+
@reference-open=\${(event) => openRecord(event.detail.id)}></dees-input-richtext>`)}
|
|
40486
|
+
`)}
|
|
40461
40487
|
${demoSection("Kept as written", "Markdown the editor does not offer \u2014 a table, an image, a footnote, a task list \u2014 is shown as written, read-only, and saved unchanged, wherever the rest of the note is edited.", b`
|
|
40462
40488
|
<dees-input-richtext label="Close notes" format="markdown" auto-grow .minHeight=${140} .showWordCount=${false}
|
|
40463
40489
|
.value=${keptNote} @input=${showValue}></dees-input-richtext>
|
|
@@ -40719,6 +40745,28 @@ var richtextStyles = [
|
|
|
40719
40745
|
color: color-mix(in srgb, var(--dees-color-link) 80%, var(--dees-color-text-primary));
|
|
40720
40746
|
}
|
|
40721
40747
|
|
|
40748
|
+
/* A reference to a record: read-only, reached and opened like a link. */
|
|
40749
|
+
.editor-content .ProseMirror [data-reference-id] {
|
|
40750
|
+
padding: 1px 5px;
|
|
40751
|
+
border-radius: var(--dees-radius-sm);
|
|
40752
|
+
color: var(--dees-color-link);
|
|
40753
|
+
background: var(--dees-color-fill-tertiary);
|
|
40754
|
+
font-weight: 500;
|
|
40755
|
+
cursor: pointer;
|
|
40756
|
+
}
|
|
40757
|
+
|
|
40758
|
+
.editor-content .ProseMirror [data-reference-id]:focus-visible,
|
|
40759
|
+
.editor-content .ProseMirror [data-reference-id].ProseMirror-selectednode {
|
|
40760
|
+
outline: var(--dees-line-width-focus-ring) solid var(--dees-color-focus-ring);
|
|
40761
|
+
outline-offset: 1px;
|
|
40762
|
+
}
|
|
40763
|
+
|
|
40764
|
+
.reference-error {
|
|
40765
|
+
margin: 4px var(--richtext-inset-inline, 0px) 0;
|
|
40766
|
+
color: var(--dees-color-text-error);
|
|
40767
|
+
font-size: var(--dees-font-footnote-size);
|
|
40768
|
+
}
|
|
40769
|
+
|
|
40722
40770
|
/* Markdown the editor does not offer, kept as written: its source, read-only. */
|
|
40723
40771
|
.editor-content .ProseMirror .markdown-kept {
|
|
40724
40772
|
font-family: var(--dees-font-family-mono);
|
|
@@ -40866,6 +40914,7 @@ var renderRichtext = /* @__PURE__ */ __name((component) => {
|
|
|
40866
40914
|
</div>
|
|
40867
40915
|
` : ""}
|
|
40868
40916
|
</dees-tile>
|
|
40917
|
+
${component.referenceError ? b`<p class="reference-error" role="alert">${component.referenceError}</p>` : ""}
|
|
40869
40918
|
${component.renderDescription()}
|
|
40870
40919
|
</div>
|
|
40871
40920
|
`;
|
|
@@ -40880,6 +40929,17 @@ var richtextMarkdownRenderOptions = Object.freeze({
|
|
|
40880
40929
|
});
|
|
40881
40930
|
var keptBlockType = "markdownBlock";
|
|
40882
40931
|
var keptInlineType = "markdownInline";
|
|
40932
|
+
var referenceType = "catalogReference";
|
|
40933
|
+
var referencePrefix = "#reference:";
|
|
40934
|
+
var referenceHref = /* @__PURE__ */ __name((idArg) => `${referencePrefix}${encodeURIComponent(idArg)}`, "referenceHref");
|
|
40935
|
+
var referenceId = /* @__PURE__ */ __name((hrefArg) => {
|
|
40936
|
+
if (!hrefArg?.startsWith(referencePrefix)) return null;
|
|
40937
|
+
try {
|
|
40938
|
+
return decodeURIComponent(hrefArg.slice(referencePrefix.length)) || null;
|
|
40939
|
+
} catch {
|
|
40940
|
+
return null;
|
|
40941
|
+
}
|
|
40942
|
+
}, "referenceId");
|
|
40883
40943
|
var markdownToDoc = /* @__PURE__ */ __name((sourceArg) => {
|
|
40884
40944
|
const source = (sourceArg ?? "").replace(/\r\n?/g, "\n");
|
|
40885
40945
|
const reader = new MarkdownReader(source);
|
|
@@ -40888,6 +40948,39 @@ var markdownToDoc = /* @__PURE__ */ __name((sourceArg) => {
|
|
|
40888
40948
|
return { type: "doc", content: content.length ? content : [{ type: "paragraph" }] };
|
|
40889
40949
|
}, "markdownToDoc");
|
|
40890
40950
|
var docToMarkdown = /* @__PURE__ */ __name((docArg) => writeBlocks(docArg.content ?? []), "docToMarkdown");
|
|
40951
|
+
var markdownToReferences = /* @__PURE__ */ __name((sourceArg) => {
|
|
40952
|
+
const source = (sourceArg ?? "").replace(/\r\n?/g, "\n");
|
|
40953
|
+
const tree = iso_exports.parseMarkdown(source, { frontmatter: richtextMarkdownRenderOptions.frontmatter });
|
|
40954
|
+
const parts = [];
|
|
40955
|
+
let offset = 0;
|
|
40956
|
+
const visit = /* @__PURE__ */ __name((nodesArg) => {
|
|
40957
|
+
for (const node of nodesArg) {
|
|
40958
|
+
const reference = node.type === "link" ? referenceOf(node) : null;
|
|
40959
|
+
const { start: start2, end: end2 } = node.position ?? {};
|
|
40960
|
+
if (reference && start2?.offset !== void 0 && end2?.offset !== void 0) {
|
|
40961
|
+
if (start2.offset > offset) parts.push({ type: "text", text: source.slice(offset, start2.offset) });
|
|
40962
|
+
parts.push({ type: "reference", ...reference });
|
|
40963
|
+
offset = end2.offset;
|
|
40964
|
+
} else if (node.children) {
|
|
40965
|
+
visit(node.children);
|
|
40966
|
+
}
|
|
40967
|
+
}
|
|
40968
|
+
}, "visit");
|
|
40969
|
+
visit(tree.children);
|
|
40970
|
+
if (offset < source.length) parts.push({ type: "text", text: source.slice(offset) });
|
|
40971
|
+
return parts;
|
|
40972
|
+
}, "markdownToReferences");
|
|
40973
|
+
var referencesToMarkdown = /* @__PURE__ */ __name((contentArg) => contentArg.reduce(
|
|
40974
|
+
(markdown, part) => part.type === "text" ? markdown + part.text : beforeLink(markdown) + writeReference(part),
|
|
40975
|
+
""
|
|
40976
|
+
), "referencesToMarkdown");
|
|
40977
|
+
var referenceOf = /* @__PURE__ */ __name((nodeArg) => {
|
|
40978
|
+
const id = referenceId(nodeArg.url);
|
|
40979
|
+
const children = nodeArg.children ?? [];
|
|
40980
|
+
if (id === null || nodeArg.title || !children.length || !children.every((child) => child.type === "text")) return null;
|
|
40981
|
+
const label = children.map((child) => child.value ?? "").join("");
|
|
40982
|
+
return label && !label.includes("\n") ? { id, label } : null;
|
|
40983
|
+
}, "referenceOf");
|
|
40891
40984
|
var linesOf = /* @__PURE__ */ __name((textArg, marksArg) => textArg.split("\n").flatMap((line, index) => [
|
|
40892
40985
|
...index ? [{ type: "hardBreak" }] : [],
|
|
40893
40986
|
...line ? [withMarks({ type: "text", text: line }, marksArg)] : []
|
|
@@ -40974,11 +41067,14 @@ var MarkdownReader = class {
|
|
|
40974
41067
|
return this.inline(node.children ?? [], [...marksArg, { type: "bold" }]);
|
|
40975
41068
|
case "delete":
|
|
40976
41069
|
return this.inline(node.children ?? [], [...marksArg, { type: "strike" }]);
|
|
40977
|
-
case "link":
|
|
41070
|
+
case "link": {
|
|
41071
|
+
const reference = referenceOf(node);
|
|
41072
|
+
if (reference) return [withMarks({ type: referenceType, attrs: reference }, marksArg)];
|
|
40978
41073
|
return this.inline(node.children ?? [], [
|
|
40979
41074
|
...marksArg,
|
|
40980
41075
|
{ type: "link", attrs: { href: node.url ?? "", title: node.title ?? null } }
|
|
40981
41076
|
]);
|
|
41077
|
+
}
|
|
40982
41078
|
case "inlineCode":
|
|
40983
41079
|
return node.value ? [withMarks({ type: "text", text: node.value }, [...marksArg, { type: "code" }])] : [];
|
|
40984
41080
|
case "break":
|
|
@@ -41098,6 +41194,15 @@ var linkEnd = /* @__PURE__ */ __name((markArg) => {
|
|
|
41098
41194
|
const title = markArg.attrs?.title ? ` "${String(markArg.attrs.title).replace(/["\\]/g, "\\$&")}"` : "";
|
|
41099
41195
|
return `](${destination}${title})`;
|
|
41100
41196
|
}, "linkEnd");
|
|
41197
|
+
var beforeLink = /* @__PURE__ */ __name((writtenArg) => {
|
|
41198
|
+
const [, backslashes, bang] = /(\\*)(!?)$/.exec(writtenArg);
|
|
41199
|
+
if (bang) return backslashes.length % 2 ? writtenArg : `${writtenArg.slice(0, -1)}\\!`;
|
|
41200
|
+
return backslashes.length % 2 ? `${writtenArg}\\` : writtenArg;
|
|
41201
|
+
}, "beforeLink");
|
|
41202
|
+
var writeReference = /* @__PURE__ */ __name((referenceArg) => {
|
|
41203
|
+
const label = (referenceArg.label || referenceArg.id).replace(/[ \t]*\n[ \t]*/g, " ");
|
|
41204
|
+
return `[${escapeText(label, false)}${linkEnd({ type: "link", attrs: { href: referenceHref(referenceArg.id) } })}`;
|
|
41205
|
+
}, "writeReference");
|
|
41101
41206
|
var autolink = /* @__PURE__ */ __name((nodeArg, markArg) => {
|
|
41102
41207
|
const href = String(markArg.attrs?.href ?? "");
|
|
41103
41208
|
const text = nodeArg.text ?? "";
|
|
@@ -41139,7 +41244,7 @@ var escapeText = /* @__PURE__ */ __name((textArg, lineStartArg) => {
|
|
|
41139
41244
|
if (/^(#(?=[\s#]|$)|>|\||[-+=](?=[\s\-+=:|]|$)|:(?=-))/.test(escaped)) return `\\${escaped}`;
|
|
41140
41245
|
return escaped.replace(/^(\d{1,9})([.)])(?=\s|$)/, "$1\\$2");
|
|
41141
41246
|
}, "escapeText");
|
|
41142
|
-
var delimitedMarks = /* @__PURE__ */ __name((nodeArg) => (nodeArg?.marks ?? []).filter((mark) => mark.type in markRank), "delimitedMarks");
|
|
41247
|
+
var delimitedMarks = /* @__PURE__ */ __name((nodeArg) => (nodeArg?.marks ?? []).filter((mark) => mark.type in markRank && !(mark.type === "link" && nodeArg.type === referenceType)), "delimitedMarks");
|
|
41143
41248
|
var writeLine = /* @__PURE__ */ __name((nodesArg, escapeLineStartArg) => {
|
|
41144
41249
|
let out = "";
|
|
41145
41250
|
const open = [];
|
|
@@ -41168,7 +41273,7 @@ var writeLine = /* @__PURE__ */ __name((nodesArg, escapeLineStartArg) => {
|
|
|
41168
41273
|
pendingSpace += lead + trail;
|
|
41169
41274
|
continue;
|
|
41170
41275
|
}
|
|
41171
|
-
} else if (node.type !== keptInlineType) {
|
|
41276
|
+
} else if (node.type !== keptInlineType && node.type !== referenceType) {
|
|
41172
41277
|
continue;
|
|
41173
41278
|
}
|
|
41174
41279
|
let keep = 0;
|
|
@@ -41188,10 +41293,11 @@ var writeLine = /* @__PURE__ */ __name((nodesArg, escapeLineStartArg) => {
|
|
|
41188
41293
|
continue;
|
|
41189
41294
|
}
|
|
41190
41295
|
for (const mark of opening) {
|
|
41191
|
-
out
|
|
41296
|
+
out = mark.type === "link" ? `${beforeLink(out)}[` : out + delimiters[mark.type];
|
|
41192
41297
|
open.push(mark);
|
|
41193
41298
|
}
|
|
41194
41299
|
if (node.type === keptInlineType) out += String(node.attrs?.source ?? "");
|
|
41300
|
+
else if (node.type === referenceType) out = beforeLink(out) + writeReference({ id: String(node.attrs?.id ?? ""), label: String(node.attrs?.label ?? "") });
|
|
41195
41301
|
else out += code ? codeSpan(core) : escapeText(core, escapeLineStartArg && !out);
|
|
41196
41302
|
}
|
|
41197
41303
|
for (let closing = open.length - 1; closing >= 0; closing--) {
|
|
@@ -41268,8 +41374,139 @@ var markdownExtensions = /* @__PURE__ */ __name((bundleArg, keptLabelArg) => {
|
|
|
41268
41374
|
];
|
|
41269
41375
|
}, "markdownExtensions");
|
|
41270
41376
|
|
|
41377
|
+
// ts_web/elements/00group-input/dees-input-richtext/references.ts
|
|
41378
|
+
var referenceNode = /* @__PURE__ */ __name((bundleArg) => bundleArg.Node.create({
|
|
41379
|
+
name: referenceType,
|
|
41380
|
+
group: "inline",
|
|
41381
|
+
inline: true,
|
|
41382
|
+
atom: true,
|
|
41383
|
+
selectable: true,
|
|
41384
|
+
addAttributes: /* @__PURE__ */ __name(() => ({
|
|
41385
|
+
id: {
|
|
41386
|
+
default: "",
|
|
41387
|
+
parseHTML: /* @__PURE__ */ __name((element) => element.getAttribute("data-reference-id") ?? referenceId(element.getAttribute("href")) ?? "", "parseHTML")
|
|
41388
|
+
},
|
|
41389
|
+
label: { default: "", parseHTML: /* @__PURE__ */ __name((element) => element.textContent ?? "", "parseHTML") }
|
|
41390
|
+
}), "addAttributes"),
|
|
41391
|
+
parseHTML: /* @__PURE__ */ __name(() => [
|
|
41392
|
+
{ tag: "span[data-reference-id]" },
|
|
41393
|
+
// before Link's `a[href]`
|
|
41394
|
+
{
|
|
41395
|
+
tag: 'a[href^="#reference:"]',
|
|
41396
|
+
priority: 60,
|
|
41397
|
+
getAttrs: /* @__PURE__ */ __name((element) => typeof element !== "string" && referenceId(element.getAttribute("href")) !== null ? null : false, "getAttrs")
|
|
41398
|
+
}
|
|
41399
|
+
], "parseHTML"),
|
|
41400
|
+
renderHTML: /* @__PURE__ */ __name(({ node }) => ["span", { "data-reference-id": String(node.attrs.id) }, String(node.attrs.label)], "renderHTML"),
|
|
41401
|
+
renderText: /* @__PURE__ */ __name(({ node }) => String(node.attrs.label), "renderText"),
|
|
41402
|
+
// In the editor the reference is read-only and reached like a link; the HTML it writes stays plain.
|
|
41403
|
+
addNodeView: /* @__PURE__ */ __name(() => ({ node }) => {
|
|
41404
|
+
const dom = document.createElement("span");
|
|
41405
|
+
dom.dataset.referenceId = String(node.attrs.id);
|
|
41406
|
+
dom.contentEditable = "false";
|
|
41407
|
+
dom.setAttribute("role", "link");
|
|
41408
|
+
dom.tabIndex = 0;
|
|
41409
|
+
dom.textContent = String(node.attrs.label);
|
|
41410
|
+
return { dom };
|
|
41411
|
+
}, "addNodeView")
|
|
41412
|
+
}), "referenceNode");
|
|
41413
|
+
var referenceInsertMeta = "preventReferenceTrigger";
|
|
41414
|
+
var ReferencePicker = class {
|
|
41415
|
+
constructor(host) {
|
|
41416
|
+
this.host = host;
|
|
41417
|
+
}
|
|
41418
|
+
host;
|
|
41419
|
+
static {
|
|
41420
|
+
__name(this, "ReferencePicker");
|
|
41421
|
+
}
|
|
41422
|
+
popup;
|
|
41423
|
+
opening;
|
|
41424
|
+
range;
|
|
41425
|
+
get isOpen() {
|
|
41426
|
+
return !!this.popup;
|
|
41427
|
+
}
|
|
41428
|
+
/**
|
|
41429
|
+
* Opens the picker when the text right before the caret is the trigger. `wordStart` asks for the
|
|
41430
|
+
* trigger to start a word, outside code and links: `#` after a letter, as in `C#`, stays text.
|
|
41431
|
+
*/
|
|
41432
|
+
detect(triggerArg, optionsArg = {}) {
|
|
41433
|
+
const editor = this.host.editor();
|
|
41434
|
+
if (!editor || this.popup || this.host.disabled() || !this.host.search() || !triggerArg || editor.view.composing || !editor.isFocused) return;
|
|
41435
|
+
const { from, to, $from } = editor.state.selection;
|
|
41436
|
+
if (from !== to || $from.parentOffset < triggerArg.length) return;
|
|
41437
|
+
if ($from.parent.textBetween($from.parentOffset - triggerArg.length, $from.parentOffset, "", "\uFFFC") !== triggerArg) return;
|
|
41438
|
+
if (optionsArg.wordStart) {
|
|
41439
|
+
if ($from.parent.type.spec.code || $from.marks().some((mark) => mark.type.name === "code" || mark.type.name === "link")) return;
|
|
41440
|
+
const start2 = $from.parentOffset - triggerArg.length;
|
|
41441
|
+
const before = start2 ? $from.parent.textBetween(start2 - 1, start2, "", "\uFFFC") : "";
|
|
41442
|
+
if (before && !/[\s\p{Ps}\p{Pi}\ufffc]/u.test(before)) return;
|
|
41443
|
+
}
|
|
41444
|
+
this.range = { from: from - triggerArg.length, to };
|
|
41445
|
+
void this.open();
|
|
41446
|
+
}
|
|
41447
|
+
async close(restoreFocusArg) {
|
|
41448
|
+
const popup = this.popup;
|
|
41449
|
+
const editor = this.host.editor();
|
|
41450
|
+
const opening = this.opening;
|
|
41451
|
+
this.popup = void 0;
|
|
41452
|
+
this.range = void 0;
|
|
41453
|
+
if (!popup) return;
|
|
41454
|
+
await opening?.catch(() => void 0);
|
|
41455
|
+
await popup.hide();
|
|
41456
|
+
if (restoreFocusArg && this.host.element.isConnected && !this.host.disabled() && this.host.editor() === editor) editor?.commands.focus();
|
|
41457
|
+
}
|
|
41458
|
+
position() {
|
|
41459
|
+
const editor = this.host.editor();
|
|
41460
|
+
if (!editor || !this.popup || !this.range) return;
|
|
41461
|
+
const coords = editor.view.coordsAtPos(this.range.to);
|
|
41462
|
+
const { node } = editor.view.domAtPos(this.range.to);
|
|
41463
|
+
this.popup.triggerElement = node instanceof HTMLElement ? node : node.parentElement;
|
|
41464
|
+
this.popup.triggerRect = new DOMRect(coords.left, coords.top, 340, coords.bottom - coords.top);
|
|
41465
|
+
this.popup.opensToTop = window.innerHeight - coords.bottom < 300 && coords.top > window.innerHeight - coords.bottom;
|
|
41466
|
+
}
|
|
41467
|
+
async open() {
|
|
41468
|
+
const popup = this.popup = new DeesInputDropdownPopup();
|
|
41469
|
+
popup.ownerComponent = this.host.element;
|
|
41470
|
+
popup.searchLabel = this.host.searchLabel();
|
|
41471
|
+
provideOverlayI18n(popup, { i18n: this.host.i18n() });
|
|
41472
|
+
popup.searchOptions = async (query2, signal) => (await this.host.search()(query2, signal)).map((reference) => ({ key: reference.id, option: reference.label, payload: reference }));
|
|
41473
|
+
this.position();
|
|
41474
|
+
popup.addEventListener("reposition-request", () => this.position());
|
|
41475
|
+
popup.addEventListener("close-request", () => {
|
|
41476
|
+
void this.close(true);
|
|
41477
|
+
});
|
|
41478
|
+
popup.addEventListener("keydown", (event) => {
|
|
41479
|
+
if (event.key === "Tab") {
|
|
41480
|
+
event.preventDefault();
|
|
41481
|
+
void this.close(true);
|
|
41482
|
+
}
|
|
41483
|
+
});
|
|
41484
|
+
popup.addEventListener("option-selected", (event) => {
|
|
41485
|
+
const { id, label } = event.detail.payload;
|
|
41486
|
+
const range = this.range;
|
|
41487
|
+
const editor = this.host.editor();
|
|
41488
|
+
if (range && editor && !this.host.disabled()) {
|
|
41489
|
+
editor.chain().setMeta(referenceInsertMeta, true).insertContentAt(range, [
|
|
41490
|
+
{ type: referenceType, attrs: { id, label } },
|
|
41491
|
+
{ type: "text", text: " " }
|
|
41492
|
+
]).run();
|
|
41493
|
+
}
|
|
41494
|
+
void this.close(true);
|
|
41495
|
+
});
|
|
41496
|
+
this.opening = popup.show();
|
|
41497
|
+
try {
|
|
41498
|
+
await this.opening;
|
|
41499
|
+
this.host.opened();
|
|
41500
|
+
if (this.popup === popup && this.host.element.isConnected && !this.host.disabled()) await popup.focusSearchInput();
|
|
41501
|
+
} catch (error) {
|
|
41502
|
+
this.host.failed(error);
|
|
41503
|
+
void this.close(false);
|
|
41504
|
+
}
|
|
41505
|
+
}
|
|
41506
|
+
};
|
|
41507
|
+
|
|
41271
41508
|
// ts_web/elements/00group-input/dees-input-richtext/component.ts
|
|
41272
|
-
var _wordCount_dec2, _showLinkInput_dec, _frameless_dec12, _maxHeight_dec, _autoGrow_dec, _minHeight_dec, _showWordCount_dec, _toolbar_dec, _format_dec, _placeholder_dec5, _value_dec15, _a50, _DeesInputRichtext_decorators, _init52, _value15, _placeholder5, _format, _toolbar, _showWordCount, _minHeight, _autoGrow, _maxHeight, _frameless12, _showLinkInput, _wordCount2;
|
|
41509
|
+
var _wordCount_dec2, _showLinkInput_dec, _referenceError_dec, _referenceSearchLabel_dec, _referenceTrigger_dec, _searchReferences_dec, _frameless_dec12, _maxHeight_dec, _autoGrow_dec, _minHeight_dec, _showWordCount_dec, _toolbar_dec, _format_dec, _placeholder_dec5, _value_dec15, _a50, _DeesInputRichtext_decorators, _init52, _value15, _placeholder5, _format, _toolbar, _showWordCount, _minHeight, _autoGrow, _maxHeight, _frameless12, _searchReferences, _referenceTrigger, _referenceSearchLabel, _referenceError, _showLinkInput, _wordCount2;
|
|
41273
41510
|
var toolbarGlyphPx = 16;
|
|
41274
41511
|
var toolbarGroups = [
|
|
41275
41512
|
["bold", "italic", "underline", "strike"],
|
|
@@ -41305,7 +41542,7 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41305
41542
|
})], _frameless_dec12 = [n({
|
|
41306
41543
|
type: Boolean,
|
|
41307
41544
|
reflect: true
|
|
41308
|
-
})], _showLinkInput_dec = [r2()], _wordCount_dec2 = [r2()], _a50) {
|
|
41545
|
+
})], _searchReferences_dec = [n({ attribute: false })], _referenceTrigger_dec = [n({ type: String, attribute: "reference-trigger", reflect: true })], _referenceSearchLabel_dec = [n({ type: String, attribute: "reference-search-label", reflect: true })], _referenceError_dec = [r2()], _showLinkInput_dec = [r2()], _wordCount_dec2 = [r2()], _a50) {
|
|
41309
41546
|
constructor() {
|
|
41310
41547
|
super(...arguments);
|
|
41311
41548
|
/** The element's words and formats, in the reader's language; read by its template module too. */
|
|
@@ -41324,11 +41561,29 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41324
41561
|
__privateAdd(this, _autoGrow, __runInitializers(_init52, 32, this, false)), __runInitializers(_init52, 35, this);
|
|
41325
41562
|
__privateAdd(this, _maxHeight, __runInitializers(_init52, 36, this, 0)), __runInitializers(_init52, 39, this);
|
|
41326
41563
|
__privateAdd(this, _frameless12, __runInitializers(_init52, 40, this, false)), __runInitializers(_init52, 43, this);
|
|
41327
|
-
__privateAdd(this,
|
|
41328
|
-
__privateAdd(this,
|
|
41564
|
+
__privateAdd(this, _searchReferences, __runInitializers(_init52, 44, this)), __runInitializers(_init52, 47, this);
|
|
41565
|
+
__privateAdd(this, _referenceTrigger, __runInitializers(_init52, 48, this, "#")), __runInitializers(_init52, 51, this);
|
|
41566
|
+
__privateAdd(this, _referenceSearchLabel, __runInitializers(_init52, 52, this, "")), __runInitializers(_init52, 55, this);
|
|
41567
|
+
__privateAdd(this, _referenceError, __runInitializers(_init52, 56, this, "")), __runInitializers(_init52, 59, this);
|
|
41568
|
+
__privateAdd(this, _showLinkInput, __runInitializers(_init52, 60, this, false)), __runInitializers(_init52, 63, this);
|
|
41569
|
+
__privateAdd(this, _wordCount2, __runInitializers(_init52, 64, this, 0)), __runInitializers(_init52, 67, this);
|
|
41329
41570
|
__publicField(this, "editorElement");
|
|
41330
41571
|
__publicField(this, "linkInputElement");
|
|
41331
41572
|
__publicField(this, "tiptapBundle", null);
|
|
41573
|
+
__publicField(this, "picker", new ReferencePicker({
|
|
41574
|
+
element: this,
|
|
41575
|
+
editor: /* @__PURE__ */ __name(() => this.editor, "editor"),
|
|
41576
|
+
search: /* @__PURE__ */ __name(() => this.searchReferences, "search"),
|
|
41577
|
+
searchLabel: /* @__PURE__ */ __name(() => this.referenceSearchLabel || this.t("richtext.referenceSearch"), "searchLabel"),
|
|
41578
|
+
i18n: /* @__PURE__ */ __name(() => this.t.i18n, "i18n"),
|
|
41579
|
+
disabled: /* @__PURE__ */ __name(() => this.disabled, "disabled"),
|
|
41580
|
+
failed: /* @__PURE__ */ __name((error) => {
|
|
41581
|
+
this.referenceError = error instanceof Error ? error.message : this.t("reference.searchFailed");
|
|
41582
|
+
}, "failed"),
|
|
41583
|
+
opened: /* @__PURE__ */ __name(() => {
|
|
41584
|
+
this.referenceError = "";
|
|
41585
|
+
}, "opened")
|
|
41586
|
+
}));
|
|
41332
41587
|
__publicField(this, "editor");
|
|
41333
41588
|
}
|
|
41334
41589
|
render() {
|
|
@@ -41433,9 +41688,13 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41433
41688
|
}
|
|
41434
41689
|
updated(changed3) {
|
|
41435
41690
|
super.updated(changed3);
|
|
41436
|
-
if (changed3.has("disabled"))
|
|
41691
|
+
if (changed3.has("disabled")) {
|
|
41692
|
+
this.editor?.setEditable(!this.disabled, false);
|
|
41693
|
+
if (this.disabled) void this.picker.close(false);
|
|
41694
|
+
}
|
|
41437
41695
|
if (changed3.has("placeholder") || changed3.has("label")) this.nameEditable();
|
|
41438
41696
|
if (changed3.has("format") && changed3.get("format") !== void 0 && this.editor) {
|
|
41697
|
+
void this.picker.close(false);
|
|
41439
41698
|
this.editor.destroy();
|
|
41440
41699
|
this.editorElement.replaceChildren();
|
|
41441
41700
|
this.initializeEditor();
|
|
@@ -41443,6 +41702,7 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41443
41702
|
return;
|
|
41444
41703
|
}
|
|
41445
41704
|
if (changed3.has("value") && this.editor && this.value !== this.editorValue()) {
|
|
41705
|
+
void this.picker.close(false);
|
|
41446
41706
|
this.editor.commands.setContent(this.contentOf(this.value), false);
|
|
41447
41707
|
this.updateWordCount();
|
|
41448
41708
|
this.requestUpdate();
|
|
@@ -41489,14 +41749,37 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41489
41749
|
}
|
|
41490
41750
|
}),
|
|
41491
41751
|
...markdown ? [link, ...markdownExtensions(this.tiptapBundle, this.t("richtext.kept"))] : [Underline.configure({}), TextAlign.configure({ types: ["heading", "paragraph"] }), link],
|
|
41752
|
+
referenceNode(this.tiptapBundle),
|
|
41492
41753
|
Typography.configure({})
|
|
41493
41754
|
],
|
|
41494
41755
|
content: this.contentOf(this.value),
|
|
41495
|
-
|
|
41756
|
+
editorProps: {
|
|
41757
|
+
handleClickOn: /* @__PURE__ */ __name((_view3, _position5, node, _nodePosition, event, direct) => {
|
|
41758
|
+
if (!direct || node.type.name !== referenceType) return false;
|
|
41759
|
+
event.preventDefault();
|
|
41760
|
+
this.openReference({ id: String(node.attrs.id), label: String(node.attrs.label) });
|
|
41761
|
+
return true;
|
|
41762
|
+
}, "handleClickOn"),
|
|
41763
|
+
handleDOMEvents: {
|
|
41764
|
+
keydown: /* @__PURE__ */ __name((_view3, event) => {
|
|
41765
|
+
const target = event.target;
|
|
41766
|
+
if (event.key !== "Enter" || !target.dataset?.referenceId) return false;
|
|
41767
|
+
event.preventDefault();
|
|
41768
|
+
this.openReference({ id: target.dataset.referenceId, label: target.textContent ?? "" });
|
|
41769
|
+
return true;
|
|
41770
|
+
}, "keydown"),
|
|
41771
|
+
compositionend: /* @__PURE__ */ __name(() => {
|
|
41772
|
+
queueMicrotask(() => this.detectReference());
|
|
41773
|
+
return false;
|
|
41774
|
+
}, "compositionend")
|
|
41775
|
+
}
|
|
41776
|
+
},
|
|
41777
|
+
onUpdate: /* @__PURE__ */ __name(({ transaction }) => {
|
|
41496
41778
|
this.value = this.editorValue();
|
|
41497
41779
|
this.updateWordCount();
|
|
41498
41780
|
this.changeSubject.next(this.value);
|
|
41499
41781
|
this.reportValueEdit();
|
|
41782
|
+
if (!transaction.getMeta(referenceInsertMeta)) this.detectReference();
|
|
41500
41783
|
}, "onUpdate"),
|
|
41501
41784
|
onSelectionUpdate: /* @__PURE__ */ __name(() => {
|
|
41502
41785
|
this.requestUpdate();
|
|
@@ -41511,6 +41794,12 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41511
41794
|
this.updateWordCount();
|
|
41512
41795
|
this.nameEditable();
|
|
41513
41796
|
}
|
|
41797
|
+
detectReference() {
|
|
41798
|
+
this.picker.detect(this.referenceTrigger, { wordStart: true });
|
|
41799
|
+
}
|
|
41800
|
+
openReference(referenceArg) {
|
|
41801
|
+
this.dispatchEvent(new CustomEvent("reference-open", { detail: referenceArg, bubbles: true, composed: true }));
|
|
41802
|
+
}
|
|
41514
41803
|
updateWordCount() {
|
|
41515
41804
|
if (!this.editor) return;
|
|
41516
41805
|
const text = this.editor.getText();
|
|
@@ -41581,6 +41870,7 @@ var _DeesInputRichtext = class _DeesInputRichtext extends (_a50 = DeesInputBase,
|
|
|
41581
41870
|
this.editor?.commands.focus();
|
|
41582
41871
|
}
|
|
41583
41872
|
async disconnectedCallback() {
|
|
41873
|
+
void this.picker.close(false);
|
|
41584
41874
|
await super.disconnectedCallback();
|
|
41585
41875
|
if (this.editor) {
|
|
41586
41876
|
this.editor.destroy();
|
|
@@ -41597,6 +41887,10 @@ _minHeight = new WeakMap();
|
|
|
41597
41887
|
_autoGrow = new WeakMap();
|
|
41598
41888
|
_maxHeight = new WeakMap();
|
|
41599
41889
|
_frameless12 = new WeakMap();
|
|
41890
|
+
_searchReferences = new WeakMap();
|
|
41891
|
+
_referenceTrigger = new WeakMap();
|
|
41892
|
+
_referenceSearchLabel = new WeakMap();
|
|
41893
|
+
_referenceError = new WeakMap();
|
|
41600
41894
|
_showLinkInput = new WeakMap();
|
|
41601
41895
|
_wordCount2 = new WeakMap();
|
|
41602
41896
|
__decorateElement(_init52, 4, "value", _value_dec15, _DeesInputRichtext, _value15);
|
|
@@ -41608,6 +41902,10 @@ __decorateElement(_init52, 4, "minHeight", _minHeight_dec, _DeesInputRichtext, _
|
|
|
41608
41902
|
__decorateElement(_init52, 4, "autoGrow", _autoGrow_dec, _DeesInputRichtext, _autoGrow);
|
|
41609
41903
|
__decorateElement(_init52, 4, "maxHeight", _maxHeight_dec, _DeesInputRichtext, _maxHeight);
|
|
41610
41904
|
__decorateElement(_init52, 4, "frameless", _frameless_dec12, _DeesInputRichtext, _frameless12);
|
|
41905
|
+
__decorateElement(_init52, 4, "searchReferences", _searchReferences_dec, _DeesInputRichtext, _searchReferences);
|
|
41906
|
+
__decorateElement(_init52, 4, "referenceTrigger", _referenceTrigger_dec, _DeesInputRichtext, _referenceTrigger);
|
|
41907
|
+
__decorateElement(_init52, 4, "referenceSearchLabel", _referenceSearchLabel_dec, _DeesInputRichtext, _referenceSearchLabel);
|
|
41908
|
+
__decorateElement(_init52, 4, "referenceError", _referenceError_dec, _DeesInputRichtext, _referenceError);
|
|
41611
41909
|
__decorateElement(_init52, 4, "showLinkInput", _showLinkInput_dec, _DeesInputRichtext, _showLinkInput);
|
|
41612
41910
|
__decorateElement(_init52, 4, "wordCount", _wordCount_dec2, _DeesInputRichtext, _wordCount2);
|
|
41613
41911
|
_DeesInputRichtext = __decorateElement(_init52, 0, "DeesInputRichtext", _DeesInputRichtext_decorators, _DeesInputRichtext);
|
|
@@ -69915,14 +70213,14 @@ var demoFunc65 = /* @__PURE__ */ __name(() => demoPage(
|
|
|
69915
70213
|
), "demoFunc");
|
|
69916
70214
|
|
|
69917
70215
|
// ts_web/elements/00group-input/dees-input-reference/dees-input-reference.ts
|
|
69918
|
-
var _loadError_dec3, _disabled_dec6, _documentKey_dec, _searchLabel_dec2, _placeholder_dec7, _label_dec8, _trigger_dec,
|
|
70216
|
+
var _loadError_dec3, _disabled_dec6, _documentKey_dec, _searchLabel_dec2, _placeholder_dec7, _label_dec8, _trigger_dec, _searchReferences_dec2, _value_dec17, _a94, _DeesInputReference_decorators, _init95, _value17, _searchReferences2, _trigger, _label8, _placeholder7, _searchLabel2, _documentKey, _disabled6, _loadError3;
|
|
69919
70217
|
_DeesInputReference_decorators = [customElement("dees-input-reference")];
|
|
69920
|
-
var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement, _value_dec17 = [n({ attribute: false })],
|
|
70218
|
+
var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement, _value_dec17 = [n({ attribute: false })], _searchReferences_dec2 = [n({ attribute: false })], _trigger_dec = [n({ type: String, reflect: true })], _label_dec8 = [n({ type: String, reflect: true })], _placeholder_dec7 = [n({ type: String, reflect: true })], _searchLabel_dec2 = [n({ type: String, reflect: true })], _documentKey_dec = [n({ type: String, reflect: true })], _disabled_dec6 = [n({ type: Boolean, reflect: true })], _loadError_dec3 = [r2()], _a94) {
|
|
69921
70219
|
constructor() {
|
|
69922
70220
|
super(...arguments);
|
|
69923
70221
|
__publicField(this, "t", dcLocalize(this));
|
|
69924
70222
|
__privateAdd(this, _value17, __runInitializers(_init95, 8, this, [])), __runInitializers(_init95, 11, this);
|
|
69925
|
-
__privateAdd(this,
|
|
70223
|
+
__privateAdd(this, _searchReferences2, __runInitializers(_init95, 12, this)), __runInitializers(_init95, 15, this);
|
|
69926
70224
|
__privateAdd(this, _trigger, __runInitializers(_init95, 16, this, "#_")), __runInitializers(_init95, 19, this);
|
|
69927
70225
|
__privateAdd(this, _label8, __runInitializers(_init95, 20, this, "")), __runInitializers(_init95, 23, this);
|
|
69928
70226
|
__privateAdd(this, _placeholder7, __runInitializers(_init95, 24, this, "")), __runInitializers(_init95, 27, this);
|
|
@@ -69933,9 +70231,20 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
69933
70231
|
__publicField(this, "editor");
|
|
69934
70232
|
__publicField(this, "initializing");
|
|
69935
70233
|
__publicField(this, "connection", 0);
|
|
69936
|
-
__publicField(this, "
|
|
69937
|
-
|
|
69938
|
-
|
|
70234
|
+
__publicField(this, "picker", new ReferencePicker({
|
|
70235
|
+
element: this,
|
|
70236
|
+
editor: /* @__PURE__ */ __name(() => this.editor, "editor"),
|
|
70237
|
+
search: /* @__PURE__ */ __name(() => this.searchReferences, "search"),
|
|
70238
|
+
searchLabel: /* @__PURE__ */ __name(() => this.searchLabel || this.t("reference.search"), "searchLabel"),
|
|
70239
|
+
i18n: /* @__PURE__ */ __name(() => this.t.i18n, "i18n"),
|
|
70240
|
+
disabled: /* @__PURE__ */ __name(() => this.disabled, "disabled"),
|
|
70241
|
+
failed: /* @__PURE__ */ __name((error) => {
|
|
70242
|
+
this.loadError = error instanceof Error ? error.message : this.t("reference.searchFailed");
|
|
70243
|
+
}, "failed"),
|
|
70244
|
+
opened: /* @__PURE__ */ __name(() => {
|
|
70245
|
+
this.loadError = "";
|
|
70246
|
+
}, "opened")
|
|
70247
|
+
}));
|
|
69939
70248
|
__publicField(this, "serializedValue", "");
|
|
69940
70249
|
}
|
|
69941
70250
|
render() {
|
|
@@ -69958,38 +70267,25 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
69958
70267
|
const connection = this.connection;
|
|
69959
70268
|
const operation = (async () => {
|
|
69960
70269
|
await this.updateComplete;
|
|
69961
|
-
const
|
|
70270
|
+
const bundle = await DeesServiceLibLoader.getInstance().loadTiptap();
|
|
70271
|
+
const { Editor, StarterKit } = bundle;
|
|
69962
70272
|
if (!this.isConnected || connection !== this.connection) return;
|
|
69963
|
-
const referenceNode = Node2.create({
|
|
69964
|
-
name: "catalogReference",
|
|
69965
|
-
group: "inline",
|
|
69966
|
-
inline: true,
|
|
69967
|
-
atom: true,
|
|
69968
|
-
selectable: true,
|
|
69969
|
-
addAttributes: /* @__PURE__ */ __name(() => ({
|
|
69970
|
-
id: { default: "", parseHTML: /* @__PURE__ */ __name((element) => element.getAttribute("data-reference-id"), "parseHTML") },
|
|
69971
|
-
label: { default: "", parseHTML: /* @__PURE__ */ __name((element) => element.textContent, "parseHTML") }
|
|
69972
|
-
}), "addAttributes"),
|
|
69973
|
-
parseHTML: /* @__PURE__ */ __name(() => [{ tag: "span[data-reference-id]" }], "parseHTML"),
|
|
69974
|
-
renderHTML: /* @__PURE__ */ __name(({ node }) => ["span", { "data-reference-id": String(node.attrs.id), contenteditable: "false", role: "link", tabindex: "0" }, String(node.attrs.label)], "renderHTML"),
|
|
69975
|
-
renderText: /* @__PURE__ */ __name(({ node }) => String(node.attrs.label), "renderText")
|
|
69976
|
-
});
|
|
69977
70273
|
this.editor = new Editor({
|
|
69978
70274
|
element: this.shadowRoot.querySelector(".editor"),
|
|
69979
70275
|
injectCSS: false,
|
|
69980
70276
|
editable: !this.disabled,
|
|
69981
|
-
extensions: [StarterKit.configure({ blockquote: false, bold: false, bulletList: false, code: false, codeBlock: false, heading: false, horizontalRule: false, italic: false, listItem: false, orderedList: false, strike: false }), referenceNode],
|
|
70277
|
+
extensions: [StarterKit.configure({ blockquote: false, bold: false, bulletList: false, code: false, codeBlock: false, heading: false, horizontalRule: false, italic: false, listItem: false, orderedList: false, strike: false }), referenceNode(bundle)],
|
|
69982
70278
|
content: referenceDocument(this.value),
|
|
69983
70279
|
editorProps: {
|
|
69984
70280
|
attributes: { role: "textbox", "aria-multiline": "true", "aria-label": this.label || this.t("reference.label"), "data-placeholder": this.placeholder || this.t("reference.placeholder") },
|
|
69985
|
-
handleClickOn: /* @__PURE__ */ __name((
|
|
70281
|
+
handleClickOn: /* @__PURE__ */ __name((_view3, _position5, node, _nodePosition, event, direct) => {
|
|
69986
70282
|
if (!direct || node.type.name !== "catalogReference") return false;
|
|
69987
70283
|
event.preventDefault();
|
|
69988
70284
|
this.openReference({ id: String(node.attrs.id), label: String(node.attrs.label) });
|
|
69989
70285
|
return true;
|
|
69990
70286
|
}, "handleClickOn"),
|
|
69991
70287
|
handleDOMEvents: {
|
|
69992
|
-
keydown: /* @__PURE__ */ __name((
|
|
70288
|
+
keydown: /* @__PURE__ */ __name((_view3, event) => {
|
|
69993
70289
|
const target = event.target;
|
|
69994
70290
|
if (event.key === "Enter" && target.dataset.referenceId) {
|
|
69995
70291
|
event.preventDefault();
|
|
@@ -70004,7 +70300,7 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
70004
70300
|
return false;
|
|
70005
70301
|
}, "keydown"),
|
|
70006
70302
|
compositionend: /* @__PURE__ */ __name(() => {
|
|
70007
|
-
queueMicrotask(() => this.
|
|
70303
|
+
queueMicrotask(() => this.picker.detect(this.trigger));
|
|
70008
70304
|
return false;
|
|
70009
70305
|
}, "compositionend")
|
|
70010
70306
|
}
|
|
@@ -70013,7 +70309,7 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
70013
70309
|
this.value = referenceContent(editor.getJSON());
|
|
70014
70310
|
this.serializedValue = JSON.stringify(this.value);
|
|
70015
70311
|
this.dispatchEvent(new CustomEvent("reference-input", { detail: { value: this.value }, bubbles: true, composed: true }));
|
|
70016
|
-
if (!transaction.getMeta(
|
|
70312
|
+
if (!transaction.getMeta(referenceInsertMeta)) this.picker.detect(this.trigger);
|
|
70017
70313
|
}, "onUpdate")
|
|
70018
70314
|
});
|
|
70019
70315
|
this.serializedValue = JSON.stringify(this.value);
|
|
@@ -70029,7 +70325,7 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
70029
70325
|
updated(changed3) {
|
|
70030
70326
|
if (changed3.has("documentKey") && changed3.get("documentKey") !== void 0 && this.editor) {
|
|
70031
70327
|
this.connection++;
|
|
70032
|
-
void this.
|
|
70328
|
+
void this.picker.close(false);
|
|
70033
70329
|
this.editor.destroy();
|
|
70034
70330
|
this.editor = void 0;
|
|
70035
70331
|
this.initializing = void 0;
|
|
@@ -70037,10 +70333,10 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
70037
70333
|
}
|
|
70038
70334
|
if (changed3.has("disabled")) {
|
|
70039
70335
|
this.editor?.setEditable(!this.disabled, false);
|
|
70040
|
-
if (this.disabled) void this.
|
|
70336
|
+
if (this.disabled) void this.picker.close(false);
|
|
70041
70337
|
}
|
|
70042
70338
|
if (changed3.has("value") && this.editor && JSON.stringify(this.value) !== this.serializedValue) {
|
|
70043
|
-
void this.
|
|
70339
|
+
void this.picker.close(false);
|
|
70044
70340
|
this.editor.commands.setContent(referenceDocument(this.value), false);
|
|
70045
70341
|
this.serializedValue = JSON.stringify(this.value);
|
|
70046
70342
|
}
|
|
@@ -70052,77 +70348,12 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
70052
70348
|
focus(options) {
|
|
70053
70349
|
this.editor?.view.dom.focus(options);
|
|
70054
70350
|
}
|
|
70055
|
-
detectTrigger() {
|
|
70056
|
-
const editor = this.editor;
|
|
70057
|
-
if (!editor || this.disabled || this.popup || !this.searchReferences || !this.trigger || editor.view.composing || !editor.isFocused) return;
|
|
70058
|
-
const { from, to, $from } = editor.state.selection;
|
|
70059
|
-
if (from !== to || $from.parentOffset < this.trigger.length) return;
|
|
70060
|
-
if ($from.parent.textBetween($from.parentOffset - this.trigger.length, $from.parentOffset, "", "\uFFFC") !== this.trigger) return;
|
|
70061
|
-
this.referenceRange = { from: from - this.trigger.length, to };
|
|
70062
|
-
void this.openPicker();
|
|
70063
|
-
}
|
|
70064
|
-
positionPicker() {
|
|
70065
|
-
if (!this.editor || !this.popup || !this.referenceRange) return;
|
|
70066
|
-
const coords = this.editor.view.coordsAtPos(this.referenceRange.to);
|
|
70067
|
-
const { node } = this.editor.view.domAtPos(this.referenceRange.to);
|
|
70068
|
-
this.popup.triggerElement = node instanceof HTMLElement ? node : node.parentElement;
|
|
70069
|
-
this.popup.triggerRect = new DOMRect(coords.left, coords.top, 340, coords.bottom - coords.top);
|
|
70070
|
-
this.popup.opensToTop = window.innerHeight - coords.bottom < 300 && coords.top > window.innerHeight - coords.bottom;
|
|
70071
|
-
}
|
|
70072
|
-
async openPicker() {
|
|
70073
|
-
const popup = this.popup = new DeesInputDropdownPopup();
|
|
70074
|
-
popup.ownerComponent = this;
|
|
70075
|
-
popup.searchLabel = this.searchLabel || this.t("reference.search");
|
|
70076
|
-
provideOverlayI18n(popup, { i18n: this.t.i18n });
|
|
70077
|
-
popup.searchOptions = async (query2, signal) => (await this.searchReferences(query2, signal)).map((reference) => ({ key: reference.id, option: reference.label, payload: reference }));
|
|
70078
|
-
this.positionPicker();
|
|
70079
|
-
popup.addEventListener("reposition-request", () => this.positionPicker());
|
|
70080
|
-
popup.addEventListener("close-request", () => {
|
|
70081
|
-
void this.closePicker(true);
|
|
70082
|
-
});
|
|
70083
|
-
popup.addEventListener("keydown", (event) => {
|
|
70084
|
-
if (event.key === "Tab") {
|
|
70085
|
-
event.preventDefault();
|
|
70086
|
-
void this.closePicker(true);
|
|
70087
|
-
}
|
|
70088
|
-
});
|
|
70089
|
-
popup.addEventListener("option-selected", (event) => {
|
|
70090
|
-
const reference = event.detail.payload;
|
|
70091
|
-
const range = this.referenceRange;
|
|
70092
|
-
if (range && this.editor && !this.disabled) {
|
|
70093
|
-
this.editor.chain().setMeta("preventReferenceTrigger", true).insertContentAt(range, [
|
|
70094
|
-
{ type: "catalogReference", attrs: reference },
|
|
70095
|
-
{ type: "text", text: " " }
|
|
70096
|
-
]).run();
|
|
70097
|
-
}
|
|
70098
|
-
void this.closePicker(true);
|
|
70099
|
-
});
|
|
70100
|
-
this.popupOpening = popup.show();
|
|
70101
|
-
try {
|
|
70102
|
-
await this.popupOpening;
|
|
70103
|
-
if (this.popup === popup && this.isConnected && !this.disabled) await popup.focusSearchInput();
|
|
70104
|
-
} catch (error) {
|
|
70105
|
-
this.loadError = error instanceof Error ? error.message : this.t("reference.searchFailed");
|
|
70106
|
-
void this.closePicker(false);
|
|
70107
|
-
}
|
|
70108
|
-
}
|
|
70109
|
-
async closePicker(restoreFocus) {
|
|
70110
|
-
const popup = this.popup;
|
|
70111
|
-
const editor = this.editor;
|
|
70112
|
-
const opening = this.popupOpening;
|
|
70113
|
-
this.popup = void 0;
|
|
70114
|
-
this.referenceRange = void 0;
|
|
70115
|
-
if (!popup) return;
|
|
70116
|
-
await opening?.catch(() => void 0);
|
|
70117
|
-
await popup.hide();
|
|
70118
|
-
if (restoreFocus && this.isConnected && !this.disabled && this.editor === editor) editor?.commands.focus();
|
|
70119
|
-
}
|
|
70120
70351
|
openReference(reference) {
|
|
70121
70352
|
this.dispatchEvent(new CustomEvent("reference-open", { detail: reference, bubbles: true, composed: true }));
|
|
70122
70353
|
}
|
|
70123
70354
|
async disconnectedCallback() {
|
|
70124
70355
|
this.connection++;
|
|
70125
|
-
void this.
|
|
70356
|
+
void this.picker.close(false);
|
|
70126
70357
|
this.editor?.destroy();
|
|
70127
70358
|
this.editor = void 0;
|
|
70128
70359
|
this.initializing = void 0;
|
|
@@ -70131,7 +70362,7 @@ var _DeesInputReference = class _DeesInputReference extends (_a94 = DeesElement,
|
|
|
70131
70362
|
};
|
|
70132
70363
|
_init95 = __decoratorStart(_a94);
|
|
70133
70364
|
_value17 = new WeakMap();
|
|
70134
|
-
|
|
70365
|
+
_searchReferences2 = new WeakMap();
|
|
70135
70366
|
_trigger = new WeakMap();
|
|
70136
70367
|
_label8 = new WeakMap();
|
|
70137
70368
|
_placeholder7 = new WeakMap();
|
|
@@ -70140,7 +70371,7 @@ _documentKey = new WeakMap();
|
|
|
70140
70371
|
_disabled6 = new WeakMap();
|
|
70141
70372
|
_loadError3 = new WeakMap();
|
|
70142
70373
|
__decorateElement(_init95, 4, "value", _value_dec17, _DeesInputReference, _value17);
|
|
70143
|
-
__decorateElement(_init95, 4, "searchReferences",
|
|
70374
|
+
__decorateElement(_init95, 4, "searchReferences", _searchReferences_dec2, _DeesInputReference, _searchReferences2);
|
|
70144
70375
|
__decorateElement(_init95, 4, "trigger", _trigger_dec, _DeesInputReference, _trigger);
|
|
70145
70376
|
__decorateElement(_init95, 4, "label", _label_dec8, _DeesInputReference, _label8);
|
|
70146
70377
|
__decorateElement(_init95, 4, "placeholder", _placeholder_dec7, _DeesInputReference, _placeholder7);
|
|
@@ -70185,7 +70416,7 @@ var renderThreadMarkdown = /* @__PURE__ */ __name(async (markdownArg) => {
|
|
|
70185
70416
|
markdownArg,
|
|
70186
70417
|
richtextMarkdownRenderOptions
|
|
70187
70418
|
);
|
|
70188
|
-
const processed = rendered.replaceAll("<a href=", '<a target="_blank" rel="noopener noreferrer" href=');
|
|
70419
|
+
const processed = rendered.replaceAll('<a href="#reference:', '<a class="reference" data-reference href="#reference:').replaceAll("<a href=", '<a target="_blank" rel="noopener noreferrer" href=');
|
|
70189
70420
|
cache.set(markdownArg, processed);
|
|
70190
70421
|
if (cache.size > maxCacheEntries) {
|
|
70191
70422
|
const oldest = cache.keys().next().value;
|
|
@@ -70244,7 +70475,7 @@ var conversation = /* @__PURE__ */ __name(() => ({
|
|
|
70244
70475
|
author: lukas,
|
|
70245
70476
|
createdAt: ago(185),
|
|
70246
70477
|
actions: entryActions,
|
|
70247
|
-
body: "Booked the \u20AC84 on account `4288
|
|
70478
|
+
body: "Booked the \u20AC84 on account `4288`: [#2026-0314 Home office March](#reference:booking-2026-0314).",
|
|
70248
70479
|
attachments: [
|
|
70249
70480
|
{ id: "booking-4288", name: "Booking 2026-0314.pdf", url: "https://example.com/bookings/2026-0314.pdf", size: 31904 },
|
|
70250
70481
|
{ id: "rent-march", name: "Rent March.pdf", url: "https://example.com/bookings/rent-march.pdf", size: 1284113 }
|
|
@@ -70258,6 +70489,12 @@ var conversation = /* @__PURE__ */ __name(() => ({
|
|
|
70258
70489
|
{ id: "e4", kind: "linked", actor: lukas, createdAt: ago(184), subject: "Booking 2026-0314", subjectId: "booking-2026-0314" }
|
|
70259
70490
|
]
|
|
70260
70491
|
}), "conversation");
|
|
70492
|
+
var bookings = [
|
|
70493
|
+
{ id: "booking-2026-0314", label: "#2026-0314 Home office March" },
|
|
70494
|
+
{ id: "booking-2026-0302", label: "#2026-0302 Rent March" },
|
|
70495
|
+
{ id: "booking-2026-0219", label: "#2026-0219 Rent February" }
|
|
70496
|
+
];
|
|
70497
|
+
var searchBookings = /* @__PURE__ */ __name(async (queryArg) => bookings.filter((booking) => booking.label.toLowerCase().includes(queryArg.toLowerCase())), "searchBookings");
|
|
70261
70498
|
var delay4 = /* @__PURE__ */ __name((msArg) => new Promise((resolve) => setTimeout(resolve, msArg)), "delay");
|
|
70262
70499
|
_DeesDemoThreadIssue_decorators = [customElement("dees-demo-thread-issue")];
|
|
70263
70500
|
var _DeesDemoThreadIssue = class _DeesDemoThreadIssue extends (_a95 = DeesElement, _entries_dec2 = [r2()], _events_dec3 = [r2()], _closed_dec = [r2()], _refuseNext_dec = [r2()], _a95) {
|
|
@@ -70305,13 +70542,14 @@ var _DeesDemoThreadIssue = class _DeesDemoThreadIssue extends (_a95 = DeesElemen
|
|
|
70305
70542
|
}}></dees-input-checkbox>
|
|
70306
70543
|
<dees-thread threadId="question-0314" .entries=${this.entries} .events=${this.events} .currentUser=${mara}
|
|
70307
70544
|
.onSubmit=${this.submit} .composerActions=${this.closed ? this.reopenAction : this.closeAction}
|
|
70545
|
+
.searchReferences=${searchBookings} referenceSearchLabel="Search bookings"
|
|
70308
70546
|
.composerInfo=${"Jonas Weber and the Ledger assistant see your reply. A reply from you reopens the question; a reply from anyone else marks it answered."}
|
|
70309
70547
|
@thread-action=${(event) => showDemoResult(this, { action: event.detail.action, entry: event.detail.entry.id })}
|
|
70310
70548
|
@thread-reference-open=${(event) => showDemoResult(this, { open: event.detail.id })}
|
|
70311
70549
|
@thread-attachment-open=${(event) => showDemoResult(this, { attachment: event.detail.attachment.id })}
|
|
70312
70550
|
@thread-submit=${(event) => showDemoResult(this, event.detail)}
|
|
70313
70551
|
></dees-thread>
|
|
70314
|
-
${demoOutput("Reply, close or reopen the question; open a comment's menu.")}
|
|
70552
|
+
${demoOutput("Reply, close or reopen the question; type # to link a booking; open a comment's menu or a booking.")}
|
|
70315
70553
|
`;
|
|
70316
70554
|
}
|
|
70317
70555
|
};
|
|
@@ -70378,12 +70616,21 @@ var demoFunc66 = /* @__PURE__ */ __name(() => demoPage(
|
|
|
70378
70616
|
"Thread",
|
|
70379
70617
|
"A conversation about a record, as an issue tracker shows one: comments by people and agents, what happened between them, and a composer at its end.",
|
|
70380
70618
|
b`
|
|
70381
|
-
${demoSection("A question", "Two people, a tax advisor and the agent answering on the advisor's behalf. Replying makes the agent answer; closing turns the action into Reopen.", b`
|
|
70619
|
+
${demoSection("A question", "Two people, a tax advisor and the agent answering on the advisor's behalf. Replying makes the agent answer; # in a reply links a booking, which opens as thread-reference-open; closing turns the action into Reopen.", b`
|
|
70382
70620
|
<dees-demo-thread-issue></dees-demo-thread-issue>
|
|
70383
70621
|
`)}
|
|
70384
70622
|
${demoSection("A long thread", "More items than collapseAfter: the middle collapses until the reader loads it.", b`
|
|
70385
70623
|
<dees-thread threadId="trip" .entries=${longThread().entries} .events=${longThread().events} .currentUser=${mara}></dees-thread>
|
|
70386
70624
|
`)}
|
|
70625
|
+
${demoSection("The composer apart", `A host that places the composer apart renders the thread twice, with the same properties: view="entries" for the timeline and view="composer" for the composer, here pinned under the timeline as a ticket's detail does.`, b`
|
|
70626
|
+
<div style="display: flex; flex-direction: column; height: 480px; overflow: hidden; border: var(--dees-line-width-hairline) solid var(--dees-color-border-default); border-radius: var(--dees-radius-lg);">
|
|
70627
|
+
<div style="flex: 1; min-height: 0; overflow: auto; padding: var(--dees-spacing-md) var(--dees-spacing-lg);">
|
|
70628
|
+
<dees-thread threadId="trip-apart" view="entries" .collapseAfter=${100} .entries=${longThread().entries} .events=${longThread().events} .currentUser=${mara}></dees-thread>
|
|
70629
|
+
</div>
|
|
70630
|
+
<dees-thread threadId="trip-apart" view="composer" .currentUser=${mara}
|
|
70631
|
+
style="padding: var(--dees-spacing-md) var(--dees-spacing-lg) var(--dees-spacing-lg); border-top: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);"></dees-thread>
|
|
70632
|
+
</div>
|
|
70633
|
+
`)}
|
|
70387
70634
|
${demoSection("Read-only", "A closed question the reader may read but not answer; dates in full.", b`
|
|
70388
70635
|
<dees-thread threadId="vat" timeFormat="absolute" readOnly readOnlyReason="This question is closed. Only its owner can reopen it."
|
|
70389
70636
|
.entries=${closedThread().entries} .events=${closedThread().events}></dees-thread>
|
|
@@ -70406,7 +70653,7 @@ var demoFunc66 = /* @__PURE__ */ __name(() => demoPage(
|
|
|
70406
70653
|
), "demoFunc");
|
|
70407
70654
|
|
|
70408
70655
|
// ts_web/elements/00group-dataview/dees-thread/dees-thread.ts
|
|
70409
|
-
var _postErrors_dec, _postingThreads_dec, _revealed_dec, _timeFormat_dec3, _collapseAfter_dec, _error_dec3, _loading_dec7, _readOnlyReason_dec, _readOnly_dec, _placeholder_dec8, _draft_dec2,
|
|
70656
|
+
var _postErrors_dec, _postingThreads_dec, _revealed_dec, _timeFormat_dec3, _collapseAfter_dec, _error_dec3, _loading_dec7, _view_dec, _readOnlyReason_dec, _readOnly_dec, _placeholder_dec8, _draft_dec2, _referenceSearchLabel_dec2, _searchReferences_dec3, _format_dec2, _composerInfo_dec, _composerActions_dec, _submitLabel_dec, _onSubmit_dec, _currentUser_dec, _events_dec4, _entries_dec3, _threadId_dec, _a96, _DeesThread_decorators, _init97, _threadId, _entries3, _events4, _currentUser, _onSubmit, _submitLabel, _composerActions, _composerInfo, _format2, _searchReferences3, _referenceSearchLabel2, _draft2, _placeholder8, _readOnly, _readOnlyReason, _view, _loading7, _error3, _collapseAfter, _timeFormat3, _revealed, _postingThreads, _postErrors;
|
|
70410
70657
|
var eventIcons = {
|
|
70411
70658
|
opened: "lucide:CircleDot",
|
|
70412
70659
|
answered: "lucide:Check",
|
|
@@ -70452,7 +70699,7 @@ var safeHref2 = /* @__PURE__ */ __name((hrefArg) => {
|
|
|
70452
70699
|
}
|
|
70453
70700
|
}, "safeHref");
|
|
70454
70701
|
_DeesThread_decorators = [customElement("dees-thread")];
|
|
70455
|
-
var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec = [n({ type: String, reflect: true })], _entries_dec3 = [n({ attribute: false })], _events_dec4 = [n({ attribute: false })], _currentUser_dec = [n({ attribute: false })], _onSubmit_dec = [n({ attribute: false })], _submitLabel_dec = [n({ type: String, reflect: true })], _composerActions_dec = [n({ attribute: false })], _composerInfo_dec = [n({ attribute: false })], _format_dec2 = [n({ type: String, reflect: true })],
|
|
70702
|
+
var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec = [n({ type: String, reflect: true })], _entries_dec3 = [n({ attribute: false })], _events_dec4 = [n({ attribute: false })], _currentUser_dec = [n({ attribute: false })], _onSubmit_dec = [n({ attribute: false })], _submitLabel_dec = [n({ type: String, reflect: true })], _composerActions_dec = [n({ attribute: false })], _composerInfo_dec = [n({ attribute: false })], _format_dec2 = [n({ type: String, reflect: true })], _searchReferences_dec3 = [n({ attribute: false })], _referenceSearchLabel_dec2 = [n({ type: String, reflect: true })], _draft_dec2 = [n({ attribute: false })], _placeholder_dec8 = [n({ type: String, reflect: true })], _readOnly_dec = [n({ type: Boolean, reflect: true })], _readOnlyReason_dec = [n({ type: String, reflect: true })], _view_dec = [n({ type: String, reflect: true })], _loading_dec7 = [n({ type: Boolean, reflect: true })], _error_dec3 = [n({ type: String, reflect: true })], _collapseAfter_dec = [n({ type: Number, reflect: true })], _timeFormat_dec3 = [n({ type: String, reflect: true })], _revealed_dec = [r2()], _postingThreads_dec = [r2()], _postErrors_dec = [r2()], _a96) {
|
|
70456
70703
|
constructor() {
|
|
70457
70704
|
super(...arguments);
|
|
70458
70705
|
__publicField(this, "t", dcLocalize(this));
|
|
@@ -70465,23 +70712,33 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70465
70712
|
__privateAdd(this, _composerActions, __runInitializers(_init97, 32, this, [])), __runInitializers(_init97, 35, this);
|
|
70466
70713
|
__privateAdd(this, _composerInfo, __runInitializers(_init97, 36, this)), __runInitializers(_init97, 39, this);
|
|
70467
70714
|
__privateAdd(this, _format2, __runInitializers(_init97, 40, this, "markdown")), __runInitializers(_init97, 43, this);
|
|
70468
|
-
__privateAdd(this,
|
|
70469
|
-
__privateAdd(this,
|
|
70470
|
-
__privateAdd(this,
|
|
70471
|
-
__privateAdd(this,
|
|
70472
|
-
__privateAdd(this,
|
|
70473
|
-
__privateAdd(this,
|
|
70474
|
-
__privateAdd(this,
|
|
70475
|
-
__privateAdd(this,
|
|
70476
|
-
__privateAdd(this,
|
|
70477
|
-
__privateAdd(this,
|
|
70478
|
-
__privateAdd(this,
|
|
70479
|
-
__privateAdd(this,
|
|
70715
|
+
__privateAdd(this, _searchReferences3, __runInitializers(_init97, 44, this)), __runInitializers(_init97, 47, this);
|
|
70716
|
+
__privateAdd(this, _referenceSearchLabel2, __runInitializers(_init97, 48, this, "")), __runInitializers(_init97, 51, this);
|
|
70717
|
+
__privateAdd(this, _draft2, __runInitializers(_init97, 52, this, "")), __runInitializers(_init97, 55, this);
|
|
70718
|
+
__privateAdd(this, _placeholder8, __runInitializers(_init97, 56, this, "")), __runInitializers(_init97, 59, this);
|
|
70719
|
+
__privateAdd(this, _readOnly, __runInitializers(_init97, 60, this, false)), __runInitializers(_init97, 63, this);
|
|
70720
|
+
__privateAdd(this, _readOnlyReason, __runInitializers(_init97, 64, this, "")), __runInitializers(_init97, 67, this);
|
|
70721
|
+
__privateAdd(this, _view, __runInitializers(_init97, 68, this, "full")), __runInitializers(_init97, 71, this);
|
|
70722
|
+
__privateAdd(this, _loading7, __runInitializers(_init97, 72, this, false)), __runInitializers(_init97, 75, this);
|
|
70723
|
+
__privateAdd(this, _error3, __runInitializers(_init97, 76, this, "")), __runInitializers(_init97, 79, this);
|
|
70724
|
+
__privateAdd(this, _collapseAfter, __runInitializers(_init97, 80, this, 30)), __runInitializers(_init97, 83, this);
|
|
70725
|
+
__privateAdd(this, _timeFormat3, __runInitializers(_init97, 84, this, "relative")), __runInitializers(_init97, 87, this);
|
|
70726
|
+
__privateAdd(this, _revealed, __runInitializers(_init97, 88, this, 0)), __runInitializers(_init97, 91, this);
|
|
70727
|
+
__privateAdd(this, _postingThreads, __runInitializers(_init97, 92, this, /* @__PURE__ */ new Set())), __runInitializers(_init97, 95, this);
|
|
70728
|
+
__privateAdd(this, _postErrors, __runInitializers(_init97, 96, this, /* @__PURE__ */ new Map())), __runInitializers(_init97, 99, this);
|
|
70480
70729
|
__publicField(this, "ticker");
|
|
70481
70730
|
__publicField(this, "menu");
|
|
70482
70731
|
__publicField(this, "menuOpening", false);
|
|
70483
70732
|
__publicField(this, "bodiesRendering", Promise.resolve());
|
|
70484
70733
|
__publicField(this, "footerMemo");
|
|
70734
|
+
/** A reference in a Markdown body opens its record, as one in a body with references does. */
|
|
70735
|
+
__publicField(this, "markdownClick", /* @__PURE__ */ __name((event) => {
|
|
70736
|
+
const link = event.target?.closest("a[data-reference]");
|
|
70737
|
+
if (!link) return;
|
|
70738
|
+
event.preventDefault();
|
|
70739
|
+
const id = referenceId(link.getAttribute("href"));
|
|
70740
|
+
if (id !== null) this.openReference(id, link.textContent ?? "");
|
|
70741
|
+
}, "markdownClick"));
|
|
70485
70742
|
/** Ctrl/⌘ Enter runs the primary, before the editor makes a line break of it. */
|
|
70486
70743
|
__publicField(this, "composerKeydown", {
|
|
70487
70744
|
handleEvent: /* @__PURE__ */ __name((event) => {
|
|
@@ -70525,6 +70782,7 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70525
70782
|
if (changed3.has("entries")) this.renderBodies();
|
|
70526
70783
|
}
|
|
70527
70784
|
render() {
|
|
70785
|
+
if (this.view === "composer") return this.readOnly ? this.renderReadOnly(true) : this.renderComposer(true);
|
|
70528
70786
|
const items = this.items();
|
|
70529
70787
|
const collapsing = this.collapseAfter > 0 && items.length > this.collapseAfter && collapsedHead + this.revealed + collapsedTail < items.length;
|
|
70530
70788
|
const head = collapsing ? items.slice(0, collapsedHead + this.revealed) : items;
|
|
@@ -70546,7 +70804,7 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70546
70804
|
${hidden ? this.renderCollapsed(hidden) : ""}
|
|
70547
70805
|
${directives_exports.repeat(tail, key, renderItem(tail))}
|
|
70548
70806
|
</ol>` : ""}
|
|
70549
|
-
${!items.length && (this.loading || this.error) ? "" : this.readOnly ? this.renderReadOnly(!items.length) : this.renderComposer(!items.length)}
|
|
70807
|
+
${this.view === "entries" || !items.length && (this.loading || this.error) ? "" : this.readOnly ? this.renderReadOnly(!items.length) : this.renderComposer(!items.length)}
|
|
70550
70808
|
`;
|
|
70551
70809
|
}
|
|
70552
70810
|
/**
|
|
@@ -70555,6 +70813,7 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70555
70813
|
*/
|
|
70556
70814
|
async submit(action) {
|
|
70557
70815
|
await this.updateComplete;
|
|
70816
|
+
if (this.view === "entries") return;
|
|
70558
70817
|
const footer = this.shadowRoot?.querySelector(".composerTile dees-actionfooter");
|
|
70559
70818
|
if (!action && footer) {
|
|
70560
70819
|
await footer.runPrimary();
|
|
@@ -70656,7 +70915,7 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70656
70915
|
return entry.delivery === "pending" && entry.author.kind === "agent" ? b`<span class="typing" aria-hidden="true"><i></i><i></i><i></i></span>` : "";
|
|
70657
70916
|
}
|
|
70658
70917
|
const rendered = threadMarkdownHtml(body);
|
|
70659
|
-
return rendered === void 0 ? b`<div class="plain">${body}</div>` : b`<div class="markdown-body">${o(rendered)}</div>`;
|
|
70918
|
+
return rendered === void 0 ? b`<div class="plain">${body}</div>` : b`<div class="markdown-body" @click=${this.markdownClick}>${o(rendered)}</div>`;
|
|
70660
70919
|
}
|
|
70661
70920
|
refusedActions(entry) {
|
|
70662
70921
|
const threadId = this.threadId;
|
|
@@ -70771,6 +71030,7 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70771
71030
|
@keydown=${this.composerKeydown}>
|
|
70772
71031
|
${this.format === "references" ? b`<dees-input-reference class="composerInput" .label=${this.t("thread.composer")} .placeholder=${placeholder}
|
|
70773
71032
|
.documentKey=${threadId} .value=${this.referenceDraft()} .searchReferences=${this.searchReferences}
|
|
71033
|
+
.searchLabel=${this.referenceSearchLabel}
|
|
70774
71034
|
@reference-input=${(event) => {
|
|
70775
71035
|
event.stopPropagation();
|
|
70776
71036
|
this.updateDraft(event.detail.value);
|
|
@@ -70782,13 +71042,18 @@ var _DeesThread = class _DeesThread extends (_a96 = DeesElement, _threadId_dec =
|
|
|
70782
71042
|
@reference-submit=${(event) => event.stopPropagation()}
|
|
70783
71043
|
></dees-input-reference>` : b`<dees-input-richtext class="composerInput" format="markdown" frameless auto-grow
|
|
70784
71044
|
.label=${this.t("thread.composer")} .labelPosition=${"none"} .placeholder=${placeholder}
|
|
70785
|
-
.minHeight=${128} .maxHeight=${360} .showWordCount=${false} .toolbar=${composerToolbar}
|
|
70786
|
-
.value=${bodyText(this.draft)}
|
|
71045
|
+
.minHeight=${this.view === "composer" ? 64 : 128} .maxHeight=${360} .showWordCount=${false} .toolbar=${composerToolbar}
|
|
71046
|
+
.value=${bodyText(this.draft)} .searchReferences=${this.searchReferences}
|
|
71047
|
+
.referenceSearchLabel=${this.referenceSearchLabel}
|
|
70787
71048
|
@input=${(event) => {
|
|
70788
71049
|
event.stopPropagation();
|
|
70789
71050
|
if (typeof event.detail?.value === "string") this.updateDraft(event.detail.value);
|
|
70790
71051
|
}}
|
|
70791
71052
|
@change=${(event) => event.stopPropagation()}
|
|
71053
|
+
@reference-open=${(event) => {
|
|
71054
|
+
event.stopPropagation();
|
|
71055
|
+
this.openReference(event.detail.id, event.detail.label);
|
|
71056
|
+
}}
|
|
70792
71057
|
></dees-input-richtext>`}
|
|
70793
71058
|
${postError ? b`<p class="postError" role="alert"><dees-icon icon="lucide:CircleAlert" .iconSize=${14} aria-hidden="true"></dees-icon><span>${postError}</span></p>` : ""}
|
|
70794
71059
|
<dees-actionfooter slot="footer" source="thread-composer" .actions=${this.footerActions()}
|
|
@@ -70925,11 +71190,13 @@ _submitLabel = new WeakMap();
|
|
|
70925
71190
|
_composerActions = new WeakMap();
|
|
70926
71191
|
_composerInfo = new WeakMap();
|
|
70927
71192
|
_format2 = new WeakMap();
|
|
70928
|
-
|
|
71193
|
+
_searchReferences3 = new WeakMap();
|
|
71194
|
+
_referenceSearchLabel2 = new WeakMap();
|
|
70929
71195
|
_draft2 = new WeakMap();
|
|
70930
71196
|
_placeholder8 = new WeakMap();
|
|
70931
71197
|
_readOnly = new WeakMap();
|
|
70932
71198
|
_readOnlyReason = new WeakMap();
|
|
71199
|
+
_view = new WeakMap();
|
|
70933
71200
|
_loading7 = new WeakMap();
|
|
70934
71201
|
_error3 = new WeakMap();
|
|
70935
71202
|
_collapseAfter = new WeakMap();
|
|
@@ -70946,11 +71213,13 @@ __decorateElement(_init97, 4, "submitLabel", _submitLabel_dec, _DeesThread, _sub
|
|
|
70946
71213
|
__decorateElement(_init97, 4, "composerActions", _composerActions_dec, _DeesThread, _composerActions);
|
|
70947
71214
|
__decorateElement(_init97, 4, "composerInfo", _composerInfo_dec, _DeesThread, _composerInfo);
|
|
70948
71215
|
__decorateElement(_init97, 4, "format", _format_dec2, _DeesThread, _format2);
|
|
70949
|
-
__decorateElement(_init97, 4, "searchReferences",
|
|
71216
|
+
__decorateElement(_init97, 4, "searchReferences", _searchReferences_dec3, _DeesThread, _searchReferences3);
|
|
71217
|
+
__decorateElement(_init97, 4, "referenceSearchLabel", _referenceSearchLabel_dec2, _DeesThread, _referenceSearchLabel2);
|
|
70950
71218
|
__decorateElement(_init97, 4, "draft", _draft_dec2, _DeesThread, _draft2);
|
|
70951
71219
|
__decorateElement(_init97, 4, "placeholder", _placeholder_dec8, _DeesThread, _placeholder8);
|
|
70952
71220
|
__decorateElement(_init97, 4, "readOnly", _readOnly_dec, _DeesThread, _readOnly);
|
|
70953
71221
|
__decorateElement(_init97, 4, "readOnlyReason", _readOnlyReason_dec, _DeesThread, _readOnlyReason);
|
|
71222
|
+
__decorateElement(_init97, 4, "view", _view_dec, _DeesThread, _view);
|
|
70954
71223
|
__decorateElement(_init97, 4, "loading", _loading_dec7, _DeesThread, _loading7);
|
|
70955
71224
|
__decorateElement(_init97, 4, "error", _error_dec3, _DeesThread, _error3);
|
|
70956
71225
|
__decorateElement(_init97, 4, "collapseAfter", _collapseAfter_dec, _DeesThread, _collapseAfter);
|
|
@@ -71226,6 +71495,12 @@ __publicField(_DeesThread, "styles", [
|
|
|
71226
71495
|
overflow-x: auto;
|
|
71227
71496
|
}
|
|
71228
71497
|
|
|
71498
|
+
.markdown-body a.reference,
|
|
71499
|
+
.markdown-body a.reference:hover {
|
|
71500
|
+
color: var(--dees-color-link);
|
|
71501
|
+
text-decoration: none;
|
|
71502
|
+
}
|
|
71503
|
+
|
|
71229
71504
|
.plain {
|
|
71230
71505
|
white-space: pre-wrap;
|
|
71231
71506
|
overflow-wrap: anywhere;
|
|
@@ -72826,7 +73101,7 @@ var _DeesHarnessConversationPicker = class _DeesHarnessConversationPicker extend
|
|
|
72826
73101
|
* cancelled. Focus returns to whatever had it when the picker opened.
|
|
72827
73102
|
*/
|
|
72828
73103
|
static async pick(optionsArg = {}) {
|
|
72829
|
-
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-
|
|
73104
|
+
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-BOGBX6EB.js");
|
|
72830
73105
|
const picker = new _DeesHarnessConversationPicker();
|
|
72831
73106
|
picker.sessions = optionsArg.sessions ?? [];
|
|
72832
73107
|
picker.groups = optionsArg.groups ?? [];
|
|
@@ -73287,7 +73562,7 @@ var handleResourceContext = /* @__PURE__ */ __name(async (event) => {
|
|
|
73287
73562
|
list.selectedResourceId = event.detail.resource.id;
|
|
73288
73563
|
}, "handleResourceContext");
|
|
73289
73564
|
var openModal = /* @__PURE__ */ __name(async (sessions, groups) => {
|
|
73290
|
-
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-
|
|
73565
|
+
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-BOGBX6EB.js");
|
|
73291
73566
|
const content = document.createElement("dees-harness-session-list");
|
|
73292
73567
|
content.sessions = sessions;
|
|
73293
73568
|
content.groups = groups;
|
|
@@ -76351,9 +76626,9 @@ var kanbanEvent = /* @__PURE__ */ __name((owner, name, detail) => {
|
|
|
76351
76626
|
var kanbanError = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "kanbanError");
|
|
76352
76627
|
|
|
76353
76628
|
// ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.ts
|
|
76354
|
-
var _showHeader_dec2, _error_dec4, _readOnly_dec2, _loading_dec9, _addComment_dec, _searchTickets_dec, _draft_dec3, _comments_dec, _ticketId_dec, _a103, _DeesKanbanDiscussion_decorators, _init104, _ticketId, _comments, _draft3, _searchTickets, _addComment, _loading9, _readOnly2, _error4, _showHeader2;
|
|
76629
|
+
var _showHeader_dec2, _error_dec4, _readOnly_dec2, _loading_dec9, _addComment_dec, _view_dec2, _currentPerson_dec, _searchTickets_dec, _draft_dec3, _comments_dec, _ticketId_dec, _a103, _DeesKanbanDiscussion_decorators, _init104, _ticketId, _comments, _draft3, _searchTickets, _currentPerson, _view2, _addComment, _loading9, _readOnly2, _error4, _showHeader2;
|
|
76355
76630
|
_DeesKanbanDiscussion_decorators = [customElement("dees-kanban-discussion")];
|
|
76356
|
-
var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a103 = DeesElement, _ticketId_dec = [n({ type: String, reflect: true })], _comments_dec = [n({ attribute: false })], _draft_dec3 = [n({ attribute: false })], _searchTickets_dec = [n({ attribute: false })], _addComment_dec = [n({ attribute: false })], _loading_dec9 = [n({ type: Boolean, reflect: true })], _readOnly_dec2 = [n({ type: Boolean, reflect: true })], _error_dec4 = [n({ type: String, reflect: true })], _showHeader_dec2 = [n({ type: Boolean, reflect: true })], _a103) {
|
|
76631
|
+
var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a103 = DeesElement, _ticketId_dec = [n({ type: String, reflect: true })], _comments_dec = [n({ attribute: false })], _draft_dec3 = [n({ attribute: false })], _searchTickets_dec = [n({ attribute: false })], _currentPerson_dec = [n({ attribute: false })], _view_dec2 = [n({ type: String, reflect: true })], _addComment_dec = [n({ attribute: false })], _loading_dec9 = [n({ type: Boolean, reflect: true })], _readOnly_dec2 = [n({ type: Boolean, reflect: true })], _error_dec4 = [n({ type: String, reflect: true })], _showHeader_dec2 = [n({ type: Boolean, reflect: true })], _a103) {
|
|
76357
76632
|
constructor() {
|
|
76358
76633
|
super(...arguments);
|
|
76359
76634
|
__publicField(this, "t", dcLocalize(this));
|
|
@@ -76361,19 +76636,23 @@ var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a103 = DeesEle
|
|
|
76361
76636
|
__privateAdd(this, _comments, __runInitializers(_init104, 12, this, [])), __runInitializers(_init104, 15, this);
|
|
76362
76637
|
__privateAdd(this, _draft3, __runInitializers(_init104, 16, this, [])), __runInitializers(_init104, 19, this);
|
|
76363
76638
|
__privateAdd(this, _searchTickets, __runInitializers(_init104, 20, this)), __runInitializers(_init104, 23, this);
|
|
76364
|
-
__privateAdd(this,
|
|
76365
|
-
__privateAdd(this,
|
|
76366
|
-
__privateAdd(this,
|
|
76367
|
-
__privateAdd(this,
|
|
76368
|
-
__privateAdd(this,
|
|
76639
|
+
__privateAdd(this, _currentPerson, __runInitializers(_init104, 24, this)), __runInitializers(_init104, 27, this);
|
|
76640
|
+
__privateAdd(this, _view2, __runInitializers(_init104, 28, this, "full")), __runInitializers(_init104, 31, this);
|
|
76641
|
+
__privateAdd(this, _addComment, __runInitializers(_init104, 32, this)), __runInitializers(_init104, 35, this);
|
|
76642
|
+
__privateAdd(this, _loading9, __runInitializers(_init104, 36, this, false)), __runInitializers(_init104, 39, this);
|
|
76643
|
+
__privateAdd(this, _readOnly2, __runInitializers(_init104, 40, this, false)), __runInitializers(_init104, 43, this);
|
|
76644
|
+
__privateAdd(this, _error4, __runInitializers(_init104, 44, this, "")), __runInitializers(_init104, 47, this);
|
|
76645
|
+
__privateAdd(this, _showHeader2, __runInitializers(_init104, 48, this, true)), __runInitializers(_init104, 51, this);
|
|
76369
76646
|
/** The ticket's comments as the thread's entries, oldest first. */
|
|
76370
76647
|
__publicField(this, "threadEntries", []);
|
|
76648
|
+
/** The composer's Markdown the draft was read from, given back while the draft is unchanged. */
|
|
76649
|
+
__publicField(this, "draftSource");
|
|
76371
76650
|
/** Saves a comment; a refusal or a comment saved to another ticket stays in the composer. */
|
|
76372
76651
|
__publicField(this, "post", /* @__PURE__ */ __name(async ({ body }) => {
|
|
76373
76652
|
const ticketId = this.ticketId;
|
|
76374
76653
|
const addComment = this.addComment;
|
|
76375
|
-
if (!ticketId || !addComment ||
|
|
76376
|
-
const submittedBody = body
|
|
76654
|
+
if (!ticketId || !addComment || typeof body !== "string") return;
|
|
76655
|
+
const submittedBody = markdownToReferences(body);
|
|
76377
76656
|
const comment = await addComment({ ticketId, body: submittedBody });
|
|
76378
76657
|
if (comment.ticketId !== ticketId) throw new Error(this.t("kanban.commentMismatch"));
|
|
76379
76658
|
kanbanEvent(this, "kanban-comment-added", { comment, submittedBody });
|
|
@@ -76386,11 +76665,14 @@ var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a103 = DeesEle
|
|
|
76386
76665
|
id: comment.id,
|
|
76387
76666
|
author: { id: comment.author.id, name: comment.author.name },
|
|
76388
76667
|
createdAt: comment.createdAt,
|
|
76389
|
-
body: comment.body
|
|
76668
|
+
body: referencesToMarkdown(comment.body)
|
|
76390
76669
|
}));
|
|
76391
76670
|
}
|
|
76671
|
+
threadDraft() {
|
|
76672
|
+
return this.draftSource?.draft === this.draft ? this.draftSource.markdown : referencesToMarkdown(this.draft);
|
|
76673
|
+
}
|
|
76392
76674
|
render() {
|
|
76393
|
-
return b`${this.showHeader ? b`<header>
|
|
76675
|
+
return b`${this.showHeader && this.view !== "composer" ? b`<header>
|
|
76394
76676
|
<h3>${this.t("kanban.discussion")}</h3>
|
|
76395
76677
|
<span class="count">${this.threadEntries.length}</span>
|
|
76396
76678
|
<span class="spacer"></span>
|
|
@@ -76405,12 +76687,14 @@ var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a103 = DeesEle
|
|
|
76405
76687
|
></dees-button>
|
|
76406
76688
|
</header>` : ""}
|
|
76407
76689
|
<dees-thread
|
|
76408
|
-
format="references"
|
|
76409
76690
|
.threadId=${this.ticketId}
|
|
76410
76691
|
.entries=${this.threadEntries}
|
|
76411
|
-
.
|
|
76692
|
+
.currentUser=${this.currentPerson}
|
|
76693
|
+
.draft=${this.threadDraft()}
|
|
76412
76694
|
.placeholder=${this.t("kanban.commentPlaceholder")}
|
|
76413
76695
|
.searchReferences=${this.searchTickets}
|
|
76696
|
+
.referenceSearchLabel=${this.t("reference.search")}
|
|
76697
|
+
.view=${this.view}
|
|
76414
76698
|
.onSubmit=${this.post}
|
|
76415
76699
|
.readOnly=${this.readOnly || !this.addComment || !this.ticketId}
|
|
76416
76700
|
.readOnlyReason=${this.t("kanban.readOnly")}
|
|
@@ -76418,8 +76702,10 @@ var _DeesKanbanDiscussion = class _DeesKanbanDiscussion extends (_a103 = DeesEle
|
|
|
76418
76702
|
.error=${this.error}
|
|
76419
76703
|
@thread-draft=${(event) => {
|
|
76420
76704
|
event.stopPropagation();
|
|
76421
|
-
|
|
76422
|
-
|
|
76705
|
+
const markdown = event.detail.body;
|
|
76706
|
+
if (event.detail.threadId !== this.ticketId || typeof markdown !== "string") return;
|
|
76707
|
+
this.draft = markdownToReferences(markdown);
|
|
76708
|
+
this.draftSource = { draft: this.draft, markdown };
|
|
76423
76709
|
kanbanEvent(this, "kanban-comment-draft", { ticketId: this.ticketId, body: this.draft });
|
|
76424
76710
|
}}
|
|
76425
76711
|
@thread-reference-open=${(event) => {
|
|
@@ -76445,6 +76731,8 @@ _ticketId = new WeakMap();
|
|
|
76445
76731
|
_comments = new WeakMap();
|
|
76446
76732
|
_draft3 = new WeakMap();
|
|
76447
76733
|
_searchTickets = new WeakMap();
|
|
76734
|
+
_currentPerson = new WeakMap();
|
|
76735
|
+
_view2 = new WeakMap();
|
|
76448
76736
|
_addComment = new WeakMap();
|
|
76449
76737
|
_loading9 = new WeakMap();
|
|
76450
76738
|
_readOnly2 = new WeakMap();
|
|
@@ -76454,6 +76742,8 @@ __decorateElement(_init104, 4, "ticketId", _ticketId_dec, _DeesKanbanDiscussion,
|
|
|
76454
76742
|
__decorateElement(_init104, 4, "comments", _comments_dec, _DeesKanbanDiscussion, _comments);
|
|
76455
76743
|
__decorateElement(_init104, 4, "draft", _draft_dec3, _DeesKanbanDiscussion, _draft3);
|
|
76456
76744
|
__decorateElement(_init104, 4, "searchTickets", _searchTickets_dec, _DeesKanbanDiscussion, _searchTickets);
|
|
76745
|
+
__decorateElement(_init104, 4, "currentPerson", _currentPerson_dec, _DeesKanbanDiscussion, _currentPerson);
|
|
76746
|
+
__decorateElement(_init104, 4, "view", _view_dec2, _DeesKanbanDiscussion, _view2);
|
|
76457
76747
|
__decorateElement(_init104, 4, "addComment", _addComment_dec, _DeesKanbanDiscussion, _addComment);
|
|
76458
76748
|
__decorateElement(_init104, 4, "loading", _loading_dec9, _DeesKanbanDiscussion, _loading9);
|
|
76459
76749
|
__decorateElement(_init104, 4, "readOnly", _readOnly_dec2, _DeesKanbanDiscussion, _readOnly2);
|
|
@@ -76715,9 +77005,9 @@ __runInitializers(_init105, 1, _DeesKanbanActivity);
|
|
|
76715
77005
|
var DeesKanbanActivity = _DeesKanbanActivity;
|
|
76716
77006
|
|
|
76717
77007
|
// ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts
|
|
76718
|
-
var _feed_dec, _editing_dec3, _conflict_dec, _frameless_dec14, _showTicketKey_dec, _canGoBack_dec, _saving_dec2, _error_dec6, _projects_dec2, _activityError_dec, _loadingActivity_dec, _activity_dec2, _commentsError_dec, _loadingComments_dec, _searchTickets_dec2, _comments_dec2, _commentDraft_dec, _draft_dec4, _provider_dec3, _people_dec, _columns_dec4, _tickets_dec2, _ticket_dec, _a105, _DeesKanbanTicketDetail_decorators, _init106, _ticket, _tickets2, _columns4, _people, _provider3, _draft4, _commentDraft, _comments2, _searchTickets2, _loadingComments, _commentsError, _activity2, _loadingActivity, _activityError, _projects2, _error6, _saving2, _canGoBack, _showTicketKey, _frameless14, _conflict, _editing3, _feed;
|
|
77008
|
+
var _feed_dec, _editing_dec3, _conflict_dec, _frameless_dec14, _showTicketKey_dec, _canGoBack_dec, _saving_dec2, _error_dec6, _projects_dec2, _activityError_dec, _loadingActivity_dec, _activity_dec2, _commentsError_dec, _loadingComments_dec, _searchTickets_dec2, _comments_dec2, _commentDraft_dec, _draft_dec4, _provider_dec3, _currentPerson_dec2, _people_dec, _columns_dec4, _tickets_dec2, _ticket_dec, _a105, _DeesKanbanTicketDetail_decorators, _init106, _ticket, _tickets2, _columns4, _people, _currentPerson2, _provider3, _draft4, _commentDraft, _comments2, _searchTickets2, _loadingComments, _commentsError, _activity2, _loadingActivity, _activityError, _projects2, _error6, _saving2, _canGoBack, _showTicketKey, _frameless14, _conflict, _editing3, _feed;
|
|
76719
77009
|
_DeesKanbanTicketDetail_decorators = [customElement("dees-kanban-ticket-detail")];
|
|
76720
|
-
var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a105 = DeesElement, _ticket_dec = [n({ attribute: false })], _tickets_dec2 = [n({ attribute: false })], _columns_dec4 = [n({ attribute: false })], _people_dec = [n({ attribute: false })], _provider_dec3 = [n({ attribute: false })], _draft_dec4 = [n({ attribute: false })], _commentDraft_dec = [n({ attribute: false })], _comments_dec2 = [n({ attribute: false })], _searchTickets_dec2 = [n({ attribute: false })], _loadingComments_dec = [n({ type: Boolean, reflect: true })], _commentsError_dec = [n({ type: String, reflect: true })], _activity_dec2 = [n({ attribute: false })], _loadingActivity_dec = [n({ type: Boolean, reflect: true })], _activityError_dec = [n({ type: String, reflect: true })], _projects_dec2 = [n({ attribute: false })], _error_dec6 = [n({ type: String, reflect: true })], _saving_dec2 = [n({ type: Boolean, reflect: true })], _canGoBack_dec = [n({ type: Boolean, reflect: true })], _showTicketKey_dec = [n({ type: Boolean, reflect: true })], _frameless_dec14 = [n({ type: Boolean, reflect: true })], _conflict_dec = [n({ attribute: false })], _editing_dec3 = [r2()], _feed_dec = [r2()], _a105) {
|
|
77010
|
+
var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a105 = DeesElement, _ticket_dec = [n({ attribute: false })], _tickets_dec2 = [n({ attribute: false })], _columns_dec4 = [n({ attribute: false })], _people_dec = [n({ attribute: false })], _currentPerson_dec2 = [n({ attribute: false })], _provider_dec3 = [n({ attribute: false })], _draft_dec4 = [n({ attribute: false })], _commentDraft_dec = [n({ attribute: false })], _comments_dec2 = [n({ attribute: false })], _searchTickets_dec2 = [n({ attribute: false })], _loadingComments_dec = [n({ type: Boolean, reflect: true })], _commentsError_dec = [n({ type: String, reflect: true })], _activity_dec2 = [n({ attribute: false })], _loadingActivity_dec = [n({ type: Boolean, reflect: true })], _activityError_dec = [n({ type: String, reflect: true })], _projects_dec2 = [n({ attribute: false })], _error_dec6 = [n({ type: String, reflect: true })], _saving_dec2 = [n({ type: Boolean, reflect: true })], _canGoBack_dec = [n({ type: Boolean, reflect: true })], _showTicketKey_dec = [n({ type: Boolean, reflect: true })], _frameless_dec14 = [n({ type: Boolean, reflect: true })], _conflict_dec = [n({ attribute: false })], _editing_dec3 = [r2()], _feed_dec = [r2()], _a105) {
|
|
76721
77011
|
constructor() {
|
|
76722
77012
|
super(...arguments);
|
|
76723
77013
|
__publicField(this, "t", dcLocalize(this));
|
|
@@ -76725,28 +77015,33 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a105 = Dee
|
|
|
76725
77015
|
__privateAdd(this, _tickets2, __runInitializers(_init106, 12, this, [])), __runInitializers(_init106, 15, this);
|
|
76726
77016
|
__privateAdd(this, _columns4, __runInitializers(_init106, 16, this, [])), __runInitializers(_init106, 19, this);
|
|
76727
77017
|
__privateAdd(this, _people, __runInitializers(_init106, 20, this, [])), __runInitializers(_init106, 23, this);
|
|
76728
|
-
__privateAdd(this,
|
|
76729
|
-
__privateAdd(this,
|
|
76730
|
-
__privateAdd(this,
|
|
76731
|
-
__privateAdd(this,
|
|
76732
|
-
__privateAdd(this,
|
|
76733
|
-
__privateAdd(this,
|
|
76734
|
-
__privateAdd(this,
|
|
76735
|
-
__privateAdd(this,
|
|
76736
|
-
__privateAdd(this,
|
|
76737
|
-
__privateAdd(this,
|
|
76738
|
-
__privateAdd(this,
|
|
76739
|
-
__privateAdd(this,
|
|
76740
|
-
__privateAdd(this,
|
|
76741
|
-
__privateAdd(this,
|
|
76742
|
-
__privateAdd(this,
|
|
76743
|
-
__privateAdd(this,
|
|
76744
|
-
__privateAdd(this,
|
|
76745
|
-
__privateAdd(this,
|
|
77018
|
+
__privateAdd(this, _currentPerson2, __runInitializers(_init106, 24, this)), __runInitializers(_init106, 27, this);
|
|
77019
|
+
__privateAdd(this, _provider3, __runInitializers(_init106, 28, this, {})), __runInitializers(_init106, 31, this);
|
|
77020
|
+
__privateAdd(this, _draft4, __runInitializers(_init106, 32, this)), __runInitializers(_init106, 35, this);
|
|
77021
|
+
__privateAdd(this, _commentDraft, __runInitializers(_init106, 36, this, [])), __runInitializers(_init106, 39, this);
|
|
77022
|
+
__privateAdd(this, _comments2, __runInitializers(_init106, 40, this, [])), __runInitializers(_init106, 43, this);
|
|
77023
|
+
__privateAdd(this, _searchTickets2, __runInitializers(_init106, 44, this)), __runInitializers(_init106, 47, this);
|
|
77024
|
+
__privateAdd(this, _loadingComments, __runInitializers(_init106, 48, this, false)), __runInitializers(_init106, 51, this);
|
|
77025
|
+
__privateAdd(this, _commentsError, __runInitializers(_init106, 52, this, "")), __runInitializers(_init106, 55, this);
|
|
77026
|
+
__privateAdd(this, _activity2, __runInitializers(_init106, 56, this, [])), __runInitializers(_init106, 59, this);
|
|
77027
|
+
__privateAdd(this, _loadingActivity, __runInitializers(_init106, 60, this, false)), __runInitializers(_init106, 63, this);
|
|
77028
|
+
__privateAdd(this, _activityError, __runInitializers(_init106, 64, this, "")), __runInitializers(_init106, 67, this);
|
|
77029
|
+
__privateAdd(this, _projects2, __runInitializers(_init106, 68, this, [])), __runInitializers(_init106, 71, this);
|
|
77030
|
+
__privateAdd(this, _error6, __runInitializers(_init106, 72, this, "")), __runInitializers(_init106, 75, this);
|
|
77031
|
+
__privateAdd(this, _saving2, __runInitializers(_init106, 76, this, false)), __runInitializers(_init106, 79, this);
|
|
77032
|
+
__privateAdd(this, _canGoBack, __runInitializers(_init106, 80, this, false)), __runInitializers(_init106, 83, this);
|
|
77033
|
+
__privateAdd(this, _showTicketKey, __runInitializers(_init106, 84, this, true)), __runInitializers(_init106, 87, this);
|
|
77034
|
+
__privateAdd(this, _frameless14, __runInitializers(_init106, 88, this, false)), __runInitializers(_init106, 91, this);
|
|
77035
|
+
__privateAdd(this, _conflict, __runInitializers(_init106, 92, this)), __runInitializers(_init106, 95, this);
|
|
77036
|
+
__privateAdd(this, _editing3, __runInitializers(_init106, 96, this, false)), __runInitializers(_init106, 99, this);
|
|
76746
77037
|
/** The reader pressed a button of the refusal, which leaves with its answer: the focus follows. */
|
|
76747
77038
|
__publicField(this, "conflictFocus", false);
|
|
76748
|
-
__privateAdd(this, _feed, __runInitializers(_init106,
|
|
77039
|
+
__privateAdd(this, _feed, __runInitializers(_init106, 100, this, "comments")), __runInitializers(_init106, 103, this);
|
|
76749
77040
|
__publicField(this, "addComment", /* @__PURE__ */ __name((input) => this.provider.addComment(input), "addComment"));
|
|
77041
|
+
/** Keeps the comment the reader is writing, so that the next render gives the composer it back, not an older one. */
|
|
77042
|
+
__publicField(this, "keepCommentDraft", /* @__PURE__ */ __name((event) => {
|
|
77043
|
+
if (event.detail.ticketId === this.ticket?.id) this.commentDraft = event.detail.body;
|
|
77044
|
+
}, "keepCommentDraft"));
|
|
76750
77045
|
}
|
|
76751
77046
|
updated(changed3) {
|
|
76752
77047
|
const previous = changed3.get("ticket");
|
|
@@ -77120,22 +77415,36 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a105 = Dee
|
|
|
77120
77415
|
</section>` : ""}
|
|
77121
77416
|
${this.provider.loadActivity ? this.renderFeed(ticket) : this.renderDiscussion(ticket)}
|
|
77122
77417
|
</div>
|
|
77418
|
+
${this.renderComposer(ticket)}
|
|
77123
77419
|
</div>
|
|
77124
77420
|
</div>`;
|
|
77125
77421
|
}
|
|
77422
|
+
/** The discussion's comments; its composer is pinned apart, under the main column. */
|
|
77126
77423
|
renderDiscussion(ticket, inFeed = false) {
|
|
77127
77424
|
return b`<dees-kanban-discussion
|
|
77128
77425
|
class=${inFeed ? "" : "discussion"}
|
|
77426
|
+
.view=${"entries"}
|
|
77129
77427
|
.ticketId=${ticket.id}
|
|
77130
77428
|
.comments=${this.comments}
|
|
77131
|
-
.draft=${this.commentDraft}
|
|
77132
77429
|
.loading=${this.loadingComments}
|
|
77133
77430
|
.error=${this.commentsError}
|
|
77431
|
+
.showHeader=${!inFeed}
|
|
77432
|
+
?hidden=${inFeed && this.feed !== "comments"}
|
|
77433
|
+
></dees-kanban-discussion>`;
|
|
77434
|
+
}
|
|
77435
|
+
/** The discussion's composer, pinned under the main column; the history hides it, keeping its draft. */
|
|
77436
|
+
renderComposer(ticket) {
|
|
77437
|
+
return b`<dees-kanban-discussion
|
|
77438
|
+
class="composer"
|
|
77439
|
+
.view=${"composer"}
|
|
77440
|
+
.ticketId=${ticket.id}
|
|
77441
|
+
.draft=${this.commentDraft}
|
|
77134
77442
|
.readOnly=${ticket.permissions?.comment === false}
|
|
77135
77443
|
.searchTickets=${this.searchTickets}
|
|
77444
|
+
.currentPerson=${this.currentPerson}
|
|
77136
77445
|
.addComment=${this.provider.addComment ? this.addComment : void 0}
|
|
77137
|
-
|
|
77138
|
-
|
|
77446
|
+
?hidden=${!!this.provider.loadActivity && this.feed !== "comments"}
|
|
77447
|
+
@kanban-comment-draft=${this.keepCommentDraft}
|
|
77139
77448
|
></dees-kanban-discussion>`;
|
|
77140
77449
|
}
|
|
77141
77450
|
/**
|
|
@@ -77268,6 +77577,7 @@ _ticket = new WeakMap();
|
|
|
77268
77577
|
_tickets2 = new WeakMap();
|
|
77269
77578
|
_columns4 = new WeakMap();
|
|
77270
77579
|
_people = new WeakMap();
|
|
77580
|
+
_currentPerson2 = new WeakMap();
|
|
77271
77581
|
_provider3 = new WeakMap();
|
|
77272
77582
|
_draft4 = new WeakMap();
|
|
77273
77583
|
_commentDraft = new WeakMap();
|
|
@@ -77291,6 +77601,7 @@ __decorateElement(_init106, 4, "ticket", _ticket_dec, _DeesKanbanTicketDetail, _
|
|
|
77291
77601
|
__decorateElement(_init106, 4, "tickets", _tickets_dec2, _DeesKanbanTicketDetail, _tickets2);
|
|
77292
77602
|
__decorateElement(_init106, 4, "columns", _columns_dec4, _DeesKanbanTicketDetail, _columns4);
|
|
77293
77603
|
__decorateElement(_init106, 4, "people", _people_dec, _DeesKanbanTicketDetail, _people);
|
|
77604
|
+
__decorateElement(_init106, 4, "currentPerson", _currentPerson_dec2, _DeesKanbanTicketDetail, _currentPerson2);
|
|
77294
77605
|
__decorateElement(_init106, 4, "provider", _provider_dec3, _DeesKanbanTicketDetail, _provider3);
|
|
77295
77606
|
__decorateElement(_init106, 4, "draft", _draft_dec4, _DeesKanbanTicketDetail, _draft4);
|
|
77296
77607
|
__decorateElement(_init106, 4, "commentDraft", _commentDraft_dec, _DeesKanbanTicketDetail, _commentDraft);
|
|
@@ -77325,6 +77636,11 @@ __publicField(_DeesKanbanTicketDetail, "styles", [
|
|
|
77325
77636
|
* The properties stand between the lead and the rest in the document, so on a phone, where
|
|
77326
77637
|
* they follow the title and the description, the focus order is the order on screen; beside
|
|
77327
77638
|
* the main column they are placed against the panes, outside its scroll.
|
|
77639
|
+
*
|
|
77640
|
+
* The discussion's composer stays at the foot of the main column, over the content scrolling
|
|
77641
|
+
* beneath it, opaque in the detail's surface, --dees-kanban-detail-surface (the page's
|
|
77642
|
+
* background unless the host sets its own). On a short ticket it rests at the bottom, and the
|
|
77643
|
+
* space above it belongs to the conversation. On a phone it follows the discussion.
|
|
77328
77644
|
*/
|
|
77329
77645
|
:host {
|
|
77330
77646
|
display: grid;
|
|
@@ -77340,6 +77656,8 @@ __publicField(_DeesKanbanTicketDetail, "styles", [
|
|
|
77340
77656
|
}
|
|
77341
77657
|
|
|
77342
77658
|
.main {
|
|
77659
|
+
display: flex;
|
|
77660
|
+
flex-direction: column;
|
|
77343
77661
|
height: 100%;
|
|
77344
77662
|
min-width: 0;
|
|
77345
77663
|
margin-right: 280px;
|
|
@@ -77358,11 +77676,31 @@ __publicField(_DeesKanbanTicketDetail, "styles", [
|
|
|
77358
77676
|
min-width: 0;
|
|
77359
77677
|
}
|
|
77360
77678
|
|
|
77679
|
+
/* It takes the height a short ticket leaves, so the composer rests at the bottom. */
|
|
77361
77680
|
.body {
|
|
77681
|
+
flex-grow: 1;
|
|
77362
77682
|
min-width: 0;
|
|
77363
77683
|
margin-top: 24px;
|
|
77364
77684
|
}
|
|
77365
77685
|
|
|
77686
|
+
/*
|
|
77687
|
+
* Across the column and into its bottom padding, so that it meets the column's edges: the
|
|
77688
|
+
* 24px are the column's right and bottom padding.
|
|
77689
|
+
*/
|
|
77690
|
+
.main > .composer {
|
|
77691
|
+
position: sticky;
|
|
77692
|
+
bottom: -24px;
|
|
77693
|
+
z-index: 2;
|
|
77694
|
+
margin: 24px -24px -24px calc(0px - var(--detail-inset-inline, 24px));
|
|
77695
|
+
padding: 16px 24px 16px var(--detail-inset-inline, 24px);
|
|
77696
|
+
border-top: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
77697
|
+
background: var(--dees-kanban-detail-surface, var(--dees-color-bg-primary));
|
|
77698
|
+
}
|
|
77699
|
+
|
|
77700
|
+
.main > .composer[hidden] {
|
|
77701
|
+
display: none;
|
|
77702
|
+
}
|
|
77703
|
+
|
|
77366
77704
|
.toolbar {
|
|
77367
77705
|
flex-wrap: nowrap;
|
|
77368
77706
|
min-width: 0;
|
|
@@ -77879,6 +78217,13 @@ __publicField(_DeesKanbanTicketDetail, "styles", [
|
|
|
77879
78217
|
margin-top: 0;
|
|
77880
78218
|
padding-block: 20px 16px;
|
|
77881
78219
|
}
|
|
78220
|
+
.main > .composer {
|
|
78221
|
+
position: static;
|
|
78222
|
+
margin: 0;
|
|
78223
|
+
padding: 0 var(--detail-inset-inline, 16px) 16px;
|
|
78224
|
+
border-top: 0;
|
|
78225
|
+
background: none;
|
|
78226
|
+
}
|
|
77882
78227
|
/* The band above already sets the discussion apart. */
|
|
77883
78228
|
.body > .discussion:first-child,
|
|
77884
78229
|
.body > .feed:first-child {
|
|
@@ -78092,7 +78437,7 @@ var createKanbanDemo = /* @__PURE__ */ __name((options = {}) => {
|
|
|
78092
78437
|
key: "CAT-102",
|
|
78093
78438
|
kind: "task",
|
|
78094
78439
|
title: "Connect related tickets",
|
|
78095
|
-
description: "Type #
|
|
78440
|
+
description: "Type # in a comment to search for another ticket. Keep the reference connected when its title changes.",
|
|
78096
78441
|
parentId: "epic-2",
|
|
78097
78442
|
columnId: "progress",
|
|
78098
78443
|
order: 0,
|
|
@@ -80369,6 +80714,7 @@ var _DeesKanban = class _DeesKanban extends (_a108 = DeesElement, _heading_dec11
|
|
|
80369
80714
|
this.detail = new DeesKanbanTicketDetail();
|
|
80370
80715
|
this.detail.showTicketKey = false;
|
|
80371
80716
|
this.detail.frameless = true;
|
|
80717
|
+
this.detail.style.setProperty("--dees-kanban-detail-surface", "var(--dees-material-thick-bg-opaque)");
|
|
80372
80718
|
for (const name of interactionEvents) this.detail.addEventListener(name, this.handleInteraction);
|
|
80373
80719
|
}
|
|
80374
80720
|
this.detail.ticket = ticket;
|
|
@@ -80427,6 +80773,7 @@ var _DeesKanban = class _DeesKanban extends (_a108 = DeesElement, _heading_dec11
|
|
|
80427
80773
|
];
|
|
80428
80774
|
this.detail.columns = this.columns;
|
|
80429
80775
|
this.detail.people = this.people;
|
|
80776
|
+
this.detail.currentPerson = this.currentPersonId ? this.people.find((person) => person.id === this.currentPersonId) : void 0;
|
|
80430
80777
|
this.detail.provider = this.provider;
|
|
80431
80778
|
this.detail.searchTickets = this.searchTickets;
|
|
80432
80779
|
this.detail.projects = this.projects;
|
|
@@ -117161,7 +117508,7 @@ var _DeesSimpleAppDash = class _DeesSimpleAppDash extends (_a139 = DeesElement,
|
|
|
117161
117508
|
this.terminalOpen = true;
|
|
117162
117509
|
const request = ++this.terminalRequest;
|
|
117163
117510
|
try {
|
|
117164
|
-
const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-
|
|
117511
|
+
const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-M3DB4LUI.js");
|
|
117165
117512
|
await this.updateComplete;
|
|
117166
117513
|
if (!this.isConnected || request !== this.terminalRequest) return;
|
|
117167
117514
|
const terminal = new DeesWorkspaceTerminal3();
|
|
@@ -124165,7 +124512,7 @@ var bright = {
|
|
|
124165
124512
|
// ts_web/00_commitinfo_data.ts
|
|
124166
124513
|
var commitinfo = {
|
|
124167
124514
|
name: "@design.estate/dees-catalog",
|
|
124168
|
-
version: "21.
|
|
124515
|
+
version: "21.44.0",
|
|
124169
124516
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
124170
124517
|
};
|
|
124171
124518
|
export {
|
|
@@ -124451,6 +124798,10 @@ export {
|
|
|
124451
124798
|
docToMarkdown as richtextDocToMarkdown,
|
|
124452
124799
|
richtextMarkdownRenderOptions,
|
|
124453
124800
|
markdownToDoc as richtextMarkdownToDoc,
|
|
124801
|
+
markdownToReferences as richtextMarkdownToReferences,
|
|
124802
|
+
referenceHref as richtextReferenceHref,
|
|
124803
|
+
referenceId as richtextReferenceId,
|
|
124804
|
+
referencesToMarkdown as richtextReferencesToMarkdown,
|
|
124454
124805
|
runAction,
|
|
124455
124806
|
scrollEdgeFadeStyles,
|
|
124456
124807
|
scrollEdgeShadowStyles,
|