@parallelworks/tandem-web 0.150.3 → 0.151.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/_virtual/_virtual_i18n/en/common.js +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +1 -1
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { glossary as e, mentions as t } from "../lib/glossary.js";
|
|
2
2
|
import { iconImageURL as n } from "./EntityIcon.js";
|
|
3
3
|
import { docIcons as r } from "./DocIcon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { createElement as
|
|
11
|
-
import _ from "@tiptap/
|
|
4
|
+
import { attachmentIdOf as i, attachmentPrefix as a, attachmentSizes as o, attachmentURL as s, githubMedia as c } from "../lib/attachments.js";
|
|
5
|
+
import { docLooks as l } from "../lib/docLooks.js";
|
|
6
|
+
import { issueKeyOfHref as u, issueKeyPattern as d, issueRefs as f } from "../lib/issueRefs.js";
|
|
7
|
+
import { linkedIssues as p } from "../lib/linkedIssues.js";
|
|
8
|
+
import { mentionable as m, mentionsIn as h } from "../lib/mentions.js";
|
|
9
|
+
import { teamNames as g } from "../lib/teamNames.js";
|
|
10
|
+
import { createElement as ee } from "react";
|
|
11
|
+
import { Extension as _ } from "@tiptap/react";
|
|
12
12
|
import { Plugin as v, PluginKey as y, TextSelection as b } from "@tiptap/pm/state";
|
|
13
13
|
import { Decoration as x, DecorationSet as S } from "@tiptap/pm/view";
|
|
14
|
-
import
|
|
15
|
-
import { createRoot as
|
|
14
|
+
import C from "@tiptap/extension-image";
|
|
15
|
+
import { createRoot as w } from "react-dom/client";
|
|
16
16
|
// src/components/editorPlugins.ts
|
|
17
|
-
var
|
|
17
|
+
var T = new y("knowledgeTerms"), te = /* @__PURE__ */ new Set([
|
|
18
18
|
"ArrowLeft",
|
|
19
19
|
"ArrowRight",
|
|
20
20
|
"ArrowUp",
|
|
@@ -68,30 +68,30 @@ function A(e, n, r) {
|
|
|
68
68
|
}));
|
|
69
69
|
}), i;
|
|
70
70
|
}
|
|
71
|
-
var j =
|
|
71
|
+
var j = _.create({
|
|
72
72
|
name: "knowledgeTerms",
|
|
73
73
|
addProseMirrorPlugins() {
|
|
74
74
|
let t = this.editor, n = "";
|
|
75
75
|
return [new v({
|
|
76
|
-
key:
|
|
76
|
+
key: T,
|
|
77
77
|
state: {
|
|
78
78
|
init: (e, n) => O(n.doc, !t.isEditable),
|
|
79
|
-
apply: (e, n) => e.docChanged || e.getMeta(
|
|
79
|
+
apply: (e, n) => e.docChanged || e.getMeta(T) ? O(e.doc, !t.isEditable) : n.map(e.mapping, e.doc)
|
|
80
80
|
},
|
|
81
81
|
props: {
|
|
82
|
-
decorations: (e) =>
|
|
82
|
+
decorations: (e) => T.getState(e),
|
|
83
83
|
handleKeyDown: (e, t) => (n = t.key, !1)
|
|
84
84
|
},
|
|
85
85
|
view: (t) => ({
|
|
86
86
|
update: (e, t) => {
|
|
87
87
|
let { selection: r } = e.state;
|
|
88
|
-
if (!
|
|
88
|
+
if (!te.has(n) || !r.empty || t.selection.eq(r)) return;
|
|
89
89
|
n = "";
|
|
90
90
|
let i = e.domAtPos(r.from);
|
|
91
91
|
(i.node.nodeType === 1 ? i.node : i.node.parentElement)?.closest(".kb-term")?.dispatchEvent(new CustomEvent(E, { bubbles: !0 }));
|
|
92
92
|
},
|
|
93
93
|
destroy: e.subscribe(() => {
|
|
94
|
-
t.isDestroyed || t.dispatch(t.state.tr.setMeta(
|
|
94
|
+
t.isDestroyed || t.dispatch(t.state.tr.setMeta(T, !0));
|
|
95
95
|
})
|
|
96
96
|
})
|
|
97
97
|
})];
|
|
@@ -100,7 +100,7 @@ var j = C.create({
|
|
|
100
100
|
function M(e) {
|
|
101
101
|
return e.docLinks;
|
|
102
102
|
}
|
|
103
|
-
var N =
|
|
103
|
+
var N = _.create({
|
|
104
104
|
name: "docLinks",
|
|
105
105
|
addStorage: () => ({ handlers: /* @__PURE__ */ new Set() }),
|
|
106
106
|
addProseMirrorPlugins() {
|
|
@@ -110,16 +110,16 @@ var N = C.create({
|
|
|
110
110
|
return !1;
|
|
111
111
|
} } })];
|
|
112
112
|
}
|
|
113
|
-
}), P = "tandem:open-image",
|
|
113
|
+
}), P = "tandem:open-image", F = C.extend({
|
|
114
114
|
parseHTML() {
|
|
115
115
|
return [{
|
|
116
116
|
tag: "img[src]",
|
|
117
117
|
getAttrs: (e) => {
|
|
118
|
-
let t = e.getAttribute("src"), n =
|
|
118
|
+
let t = e.getAttribute("src"), n = i(t);
|
|
119
119
|
return n ? {
|
|
120
|
-
src:
|
|
120
|
+
src: a + n,
|
|
121
121
|
alt: e.getAttribute("alt")
|
|
122
|
-
} :
|
|
122
|
+
} : c(t) ? {
|
|
123
123
|
src: t,
|
|
124
124
|
alt: e.getAttribute("alt")
|
|
125
125
|
} : !1;
|
|
@@ -129,17 +129,17 @@ var N = C.create({
|
|
|
129
129
|
renderHTML({ HTMLAttributes: e }) {
|
|
130
130
|
return ["img", {
|
|
131
131
|
...e,
|
|
132
|
-
src:
|
|
132
|
+
src: s(String(e.src ?? "")),
|
|
133
133
|
class: "attachment-image",
|
|
134
134
|
loading: "lazy"
|
|
135
135
|
}];
|
|
136
136
|
}
|
|
137
|
-
}).configure({ inline: !0 }),
|
|
138
|
-
function
|
|
137
|
+
}).configure({ inline: !0 }), I = new y("attachmentFiles");
|
|
138
|
+
function ne(e, t) {
|
|
139
139
|
e.descendants((e, n) => {
|
|
140
140
|
if (e.type.name !== "paragraph") return !0;
|
|
141
141
|
let r = e.childCount === 1 ? e.firstChild : null, i = r?.marks.find((e) => e.type.name === "link")?.attrs.href;
|
|
142
|
-
return r?.isText && i &&
|
|
142
|
+
return r?.isText && i && c(i) && r.text?.trim() === i && t.push(x.widget(n + e.nodeSize - 1, () => {
|
|
143
143
|
let e = document.createElement("video");
|
|
144
144
|
return e.className = "github-recording", e.src = i, e.controls = !0, e.preload = "metadata", e.contentEditable = "false", e.addEventListener("error", () => e.remove(), { once: !0 }), e;
|
|
145
145
|
}, {
|
|
@@ -152,17 +152,17 @@ function I(e, t) {
|
|
|
152
152
|
}
|
|
153
153
|
function L(e) {
|
|
154
154
|
let t = [];
|
|
155
|
-
return
|
|
155
|
+
return ne(e, t), e.descendants((e, n) => {
|
|
156
156
|
if (!e.isText) return !0;
|
|
157
|
-
let r = e.marks.find((e) => e.type.name === "link"),
|
|
158
|
-
if (
|
|
159
|
-
let
|
|
157
|
+
let r = e.marks.find((e) => e.type.name === "link"), a = i(r?.attrs.href), c = a && o.get(a);
|
|
158
|
+
if (c && t.push(x.inline(n, n + e.nodeSize, { "data-size": c })), a && o.isVideo(a) && r) {
|
|
159
|
+
let i = s(String(r.attrs.href));
|
|
160
160
|
t.push(x.widget(n + e.nodeSize, () => {
|
|
161
161
|
let e = document.createElement("video");
|
|
162
|
-
return e.className = "attachment-video", e.src =
|
|
162
|
+
return e.className = "attachment-video", e.src = i, e.controls = !0, e.preload = "metadata", e.contentEditable = "false", e;
|
|
163
163
|
}, {
|
|
164
164
|
side: 1,
|
|
165
|
-
key: `video-${
|
|
165
|
+
key: `video-${a}`,
|
|
166
166
|
stopEvent: () => !0,
|
|
167
167
|
ignoreSelection: !0
|
|
168
168
|
}));
|
|
@@ -170,19 +170,19 @@ function L(e) {
|
|
|
170
170
|
return !1;
|
|
171
171
|
}), S.create(e, t);
|
|
172
172
|
}
|
|
173
|
-
var R =
|
|
173
|
+
var R = _.create({
|
|
174
174
|
name: "attachmentFiles",
|
|
175
175
|
priority: 1e3,
|
|
176
176
|
addProseMirrorPlugins() {
|
|
177
177
|
return [new v({
|
|
178
|
-
key:
|
|
178
|
+
key: I,
|
|
179
179
|
state: {
|
|
180
180
|
init: (e, t) => L(t.doc),
|
|
181
|
-
apply: (e, t) => e.docChanged || e.getMeta(
|
|
181
|
+
apply: (e, t) => e.docChanged || e.getMeta(I) ? L(e.doc) : t
|
|
182
182
|
},
|
|
183
183
|
props: {
|
|
184
|
-
decorations: (e) =>
|
|
185
|
-
handleClickOn: (e, t, n, r,
|
|
184
|
+
decorations: (e) => I.getState(e),
|
|
185
|
+
handleClickOn: (e, t, n, r, a) => n.type.name !== "image" || !i(n.attrs.src) ? !1 : (a.preventDefault(), e.dom.dispatchEvent(new CustomEvent(P, {
|
|
186
186
|
bubbles: !0,
|
|
187
187
|
detail: {
|
|
188
188
|
src: n.attrs.src,
|
|
@@ -191,21 +191,21 @@ var R = C.create({
|
|
|
191
191
|
})), !0),
|
|
192
192
|
handleClick: (e, t, n) => {
|
|
193
193
|
let r = n.target?.closest("a[href]")?.getAttribute("href");
|
|
194
|
-
if (!r || !
|
|
194
|
+
if (!r || !i(r) || n.button !== 0) return !1;
|
|
195
195
|
n.preventDefault();
|
|
196
|
-
let
|
|
197
|
-
return
|
|
196
|
+
let a = document.createElement("a");
|
|
197
|
+
return a.href = s(r), a.download = "", a.click(), !0;
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
|
-
view: (e) => ({ destroy:
|
|
201
|
-
e.isDestroyed || e.dispatch(e.state.tr.setMeta(
|
|
200
|
+
view: (e) => ({ destroy: o.subscribe(() => {
|
|
201
|
+
e.isDestroyed || e.dispatch(e.state.tr.setMeta(I, !0));
|
|
202
202
|
}) })
|
|
203
203
|
})];
|
|
204
204
|
}
|
|
205
205
|
}), z = new y("linkedIssues");
|
|
206
206
|
function B(e) {
|
|
207
207
|
let t = [], n, r = () => {
|
|
208
|
-
let e = n &&
|
|
208
|
+
let e = n && p.get(n.href);
|
|
209
209
|
if (n && e) {
|
|
210
210
|
let { identifier: r, title: i, status: a } = e;
|
|
211
211
|
t.push(x.widget(n.end, () => {
|
|
@@ -227,7 +227,7 @@ function B(e) {
|
|
|
227
227
|
}), !1;
|
|
228
228
|
}), r(), S.create(e, t);
|
|
229
229
|
}
|
|
230
|
-
var V =
|
|
230
|
+
var V = _.create({
|
|
231
231
|
name: "linkedIssues",
|
|
232
232
|
addProseMirrorPlugins() {
|
|
233
233
|
return [new v({
|
|
@@ -240,10 +240,10 @@ var V = C.create({
|
|
|
240
240
|
decorations: (e) => z.getState(e),
|
|
241
241
|
handleDOMEvents: { click: (e, t) => {
|
|
242
242
|
let n = t.target?.closest("[data-linked-issue]");
|
|
243
|
-
return n ? (t.preventDefault(),
|
|
243
|
+
return n ? (t.preventDefault(), p.open(n.dataset.linkedIssue ?? ""), !0) : !1;
|
|
244
244
|
} }
|
|
245
245
|
},
|
|
246
|
-
view: (e) => ({ destroy:
|
|
246
|
+
view: (e) => ({ destroy: p.subscribe(() => {
|
|
247
247
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(z, !0));
|
|
248
248
|
}) })
|
|
249
249
|
})];
|
|
@@ -254,18 +254,18 @@ function U(e) {
|
|
|
254
254
|
return t.className = "issue-mention-status", t.dataset.category = e, t.contentEditable = "false", t;
|
|
255
255
|
}
|
|
256
256
|
function W(e) {
|
|
257
|
-
let t =
|
|
257
|
+
let t = f.workspace();
|
|
258
258
|
if (!t) return S.empty;
|
|
259
259
|
let n = [], r = [], i = (e, t, i, a) => {
|
|
260
|
-
let o =
|
|
260
|
+
let o = f.get(i);
|
|
261
261
|
if (!o) {
|
|
262
262
|
r.push(i);
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
|
-
let
|
|
266
|
-
n.push(x.widget(e, () => U(
|
|
265
|
+
let s = o.status.category;
|
|
266
|
+
n.push(x.widget(e, () => U(s), {
|
|
267
267
|
side: -1,
|
|
268
|
-
key: `dot-${i}-${
|
|
268
|
+
key: `dot-${i}-${s}`
|
|
269
269
|
}), x.inline(e, t, {
|
|
270
270
|
class: a ? "issue-mention issue-mention-key" : "issue-mention",
|
|
271
271
|
"data-issue": o.identifier,
|
|
@@ -279,29 +279,29 @@ function W(e) {
|
|
|
279
279
|
}));
|
|
280
280
|
};
|
|
281
281
|
D(e, (e, t) => {
|
|
282
|
-
for (let n of e.matchAll(
|
|
282
|
+
for (let n of e.matchAll(d)) {
|
|
283
283
|
let e = n[1] ?? "";
|
|
284
284
|
i(t + (n.index ?? 0), t + (n.index ?? 0) + e.length, e, !0);
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
|
-
let
|
|
288
|
-
let e =
|
|
289
|
-
|
|
287
|
+
let a, o = () => {
|
|
288
|
+
let e = a && u(a.href, t);
|
|
289
|
+
a && e && i(a.from, a.to, e, !1), a = void 0;
|
|
290
290
|
};
|
|
291
291
|
return e.descendants((e, t) => {
|
|
292
|
-
if (!e.isText) return e.isBlock &&
|
|
292
|
+
if (!e.isText) return e.isBlock && o(), !0;
|
|
293
293
|
let n = e.marks.find((e) => e.type.name === "link")?.attrs.href;
|
|
294
|
-
return
|
|
295
|
-
...
|
|
294
|
+
return a && a.href !== n && o(), n && (a = a ? {
|
|
295
|
+
...a,
|
|
296
296
|
to: t + e.nodeSize
|
|
297
297
|
} : {
|
|
298
298
|
href: n,
|
|
299
299
|
from: t,
|
|
300
300
|
to: t + e.nodeSize
|
|
301
301
|
}), !1;
|
|
302
|
-
}),
|
|
302
|
+
}), o(), r.length > 0 && f.want(r), S.create(e, n);
|
|
303
303
|
}
|
|
304
|
-
var G =
|
|
304
|
+
var G = _.create({
|
|
305
305
|
name: "issueMentions",
|
|
306
306
|
addProseMirrorPlugins() {
|
|
307
307
|
return [new v({
|
|
@@ -311,14 +311,14 @@ var G = C.create({
|
|
|
311
311
|
apply: (e, t) => e.docChanged || e.getMeta(H) ? W(e.doc) : t.map(e.mapping, e.doc)
|
|
312
312
|
},
|
|
313
313
|
props: { decorations: (e) => H.getState(e) },
|
|
314
|
-
view: (e) => ({ destroy:
|
|
314
|
+
view: (e) => ({ destroy: f.subscribe(() => {
|
|
315
315
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(H, !0));
|
|
316
316
|
}) })
|
|
317
317
|
})];
|
|
318
318
|
}
|
|
319
319
|
}), K = new y("teamNames");
|
|
320
320
|
function q(e) {
|
|
321
|
-
let n =
|
|
321
|
+
let n = g.forms();
|
|
322
322
|
if (n.length === 0) return S.empty;
|
|
323
323
|
let r = [];
|
|
324
324
|
return D(e, (e, i) => {
|
|
@@ -328,7 +328,7 @@ function q(e) {
|
|
|
328
328
|
}));
|
|
329
329
|
}), S.create(e, r);
|
|
330
330
|
}
|
|
331
|
-
var J =
|
|
331
|
+
var J = _.create({
|
|
332
332
|
name: "teamNames",
|
|
333
333
|
addProseMirrorPlugins() {
|
|
334
334
|
return [new v({
|
|
@@ -338,7 +338,7 @@ var J = C.create({
|
|
|
338
338
|
apply: (e, t) => e.docChanged || e.getMeta(K) ? q(e.doc) : t.map(e.mapping, e.doc)
|
|
339
339
|
},
|
|
340
340
|
props: { decorations: (e) => K.getState(e) },
|
|
341
|
-
view: (e) => ({ destroy:
|
|
341
|
+
view: (e) => ({ destroy: g.subscribe(() => {
|
|
342
342
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(K, !0));
|
|
343
343
|
}) })
|
|
344
344
|
})];
|
|
@@ -347,13 +347,13 @@ var J = C.create({
|
|
|
347
347
|
function X(e) {
|
|
348
348
|
let t = [];
|
|
349
349
|
return D(e, (e, n) => {
|
|
350
|
-
for (let r of
|
|
350
|
+
for (let r of h(e)) m.has(r.username) && t.push(x.inline(n + r.from, n + r.to, {
|
|
351
351
|
class: "person-mention",
|
|
352
352
|
"data-username": r.username
|
|
353
353
|
}));
|
|
354
354
|
}), S.create(e, t);
|
|
355
355
|
}
|
|
356
|
-
var re =
|
|
356
|
+
var re = _.create({
|
|
357
357
|
name: "peopleMentions",
|
|
358
358
|
addProseMirrorPlugins() {
|
|
359
359
|
return [new v({
|
|
@@ -363,7 +363,7 @@ var re = C.create({
|
|
|
363
363
|
apply: (e, t) => e.docChanged || e.getMeta(Y) ? X(e.doc) : t.map(e.mapping, e.doc)
|
|
364
364
|
},
|
|
365
365
|
props: { decorations: (e) => Y.getState(e) },
|
|
366
|
-
view: (e) => ({ destroy:
|
|
366
|
+
view: (e) => ({ destroy: m.subscribe(() => {
|
|
367
367
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(Y, !0));
|
|
368
368
|
}) })
|
|
369
369
|
})];
|
|
@@ -377,22 +377,22 @@ function ie(e) {
|
|
|
377
377
|
let e = document.createElement("img");
|
|
378
378
|
e.src = i, e.alt = "", t.appendChild(e);
|
|
379
379
|
} else if (a) {
|
|
380
|
-
let e =
|
|
381
|
-
queueMicrotask(() => e.render(
|
|
380
|
+
let e = w(t);
|
|
381
|
+
queueMicrotask(() => e.render(ee(a, { className: "size-[0.95em]" }))), Q.set(t, e);
|
|
382
382
|
} else t.textContent = e;
|
|
383
383
|
return t;
|
|
384
384
|
}
|
|
385
385
|
function $(e) {
|
|
386
386
|
let t = [], n = -1, r = "";
|
|
387
|
-
return e.descendants((e,
|
|
387
|
+
return e.descendants((e, i) => {
|
|
388
388
|
if (!e.isText) return !0;
|
|
389
|
-
let
|
|
390
|
-
if (r =
|
|
391
|
-
let
|
|
392
|
-
return
|
|
389
|
+
let a = e.marks.find((e) => e.type.name === "link"), o = String(a?.attrs.href ?? ""), s = !!a && o === r && i === n;
|
|
390
|
+
if (r = a ? o : "", n = i + e.nodeSize, !a || s || !o.includes("/docs/")) return !1;
|
|
391
|
+
let c = l.iconAt(o);
|
|
392
|
+
return c && t.push(x.widget(i, () => ie(c), {
|
|
393
393
|
side: 1,
|
|
394
|
-
marks: [
|
|
395
|
-
key: `doc-icon:${
|
|
394
|
+
marks: [a],
|
|
395
|
+
key: `doc-icon:${c}`,
|
|
396
396
|
ignoreSelection: !0,
|
|
397
397
|
destroy: (e) => {
|
|
398
398
|
let t = Q.get(e);
|
|
@@ -401,7 +401,7 @@ function $(e) {
|
|
|
401
401
|
})), !1;
|
|
402
402
|
}), S.create(e, t);
|
|
403
403
|
}
|
|
404
|
-
var ae =
|
|
404
|
+
var ae = _.create({
|
|
405
405
|
name: "docLinkIcons",
|
|
406
406
|
addProseMirrorPlugins() {
|
|
407
407
|
return [new v({
|
|
@@ -411,12 +411,12 @@ var ae = C.create({
|
|
|
411
411
|
apply: (e, t) => e.docChanged || e.getMeta(Z) ? $(e.doc) : t
|
|
412
412
|
},
|
|
413
413
|
props: { decorations: (e) => Z.getState(e) },
|
|
414
|
-
view: (e) => ({ destroy:
|
|
414
|
+
view: (e) => ({ destroy: l.subscribe(() => {
|
|
415
415
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(Z, !0));
|
|
416
416
|
}) })
|
|
417
417
|
})];
|
|
418
418
|
}
|
|
419
|
-
}), oe =
|
|
419
|
+
}), oe = _.create({
|
|
420
420
|
name: "moveBlock",
|
|
421
421
|
addKeyboardShortcuts() {
|
|
422
422
|
let e = (e) => () => {
|
|
@@ -433,4 +433,4 @@ var ae = C.create({
|
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
|
-
export { R as AttachmentFiles,
|
|
436
|
+
export { R as AttachmentFiles, F as AttachmentImage, ae as DocLinkIcons, N as DocLinks, G as IssueMentions, j as KnowledgeTerms, V as LinkedIssues, oe as MoveBlock, re as PeopleMentions, J as TeamNames, k as linksIn, P as openImageEvent, M as pickerKeys, E as termCaretEvent, A as unlinkedMentions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Extension as e, InputRule as t, Node as n } from "@tiptap/react";
|
|
2
|
+
import { Plugin as r, PluginKey as i } from "@tiptap/pm/state";
|
|
3
|
+
import { Decoration as a, DecorationSet as o } from "@tiptap/pm/view";
|
|
4
4
|
// src/components/mathDiagrams.ts
|
|
5
5
|
async function s(e, t, n) {
|
|
6
6
|
let { default: r } = await import("katex");
|
|
@@ -37,7 +37,7 @@ function c(e) {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
var l =
|
|
40
|
+
var l = n.create({
|
|
41
41
|
name: "mathInline",
|
|
42
42
|
group: "inline",
|
|
43
43
|
inline: !0,
|
|
@@ -54,7 +54,7 @@ var l = o.create({
|
|
|
54
54
|
],
|
|
55
55
|
addNodeView: () => c(!1),
|
|
56
56
|
addInputRules() {
|
|
57
|
-
return [new
|
|
57
|
+
return [new t({
|
|
58
58
|
find: /(?:^|[^$\\])\$([^\s$](?:[^$]*[^\s$])?)\$$/,
|
|
59
59
|
handler: ({ state: e, range: t, match: n }) => {
|
|
60
60
|
let r = n[1] ?? "", i = t.from + +!n[0].startsWith("$");
|
|
@@ -78,7 +78,7 @@ var l = o.create({
|
|
|
78
78
|
},
|
|
79
79
|
parseMarkdown: (e, t) => t.createNode("mathInline", { latex: e.text ?? "" }),
|
|
80
80
|
renderMarkdown: (e) => `$${String(e.attrs?.latex ?? "")}$`
|
|
81
|
-
}), u =
|
|
81
|
+
}), u = n.create({
|
|
82
82
|
name: "mathBlock",
|
|
83
83
|
group: "block",
|
|
84
84
|
atom: !0,
|
|
@@ -147,27 +147,27 @@ async function m(e, t) {
|
|
|
147
147
|
document.getElementById(`d${r}`)?.remove();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
var h = new
|
|
150
|
+
var h = new i("diagrams");
|
|
151
151
|
function g(e) {
|
|
152
152
|
let t = [];
|
|
153
|
-
return e.descendants((e,
|
|
153
|
+
return e.descendants((e, n) => {
|
|
154
154
|
if (e.type.name !== "codeBlock") return !0;
|
|
155
|
-
let
|
|
156
|
-
if (!d.has(
|
|
157
|
-
let
|
|
158
|
-
return t.push(
|
|
155
|
+
let r = String(e.attrs.language ?? "").toLowerCase();
|
|
156
|
+
if (!d.has(r)) return !1;
|
|
157
|
+
let i = e.textContent;
|
|
158
|
+
return t.push(a.node(n, n + e.nodeSize, { class: "diagram-source" }), a.widget(n + e.nodeSize, () => {
|
|
159
159
|
let e = document.createElement("div");
|
|
160
|
-
return e.className = "diagram", e.contentEditable = "false", m(
|
|
160
|
+
return e.className = "diagram", e.contentEditable = "false", m(i, e), e;
|
|
161
161
|
}, {
|
|
162
|
-
key: `diagram:${
|
|
162
|
+
key: `diagram:${i}`,
|
|
163
163
|
side: -1,
|
|
164
164
|
ignoreSelection: !0
|
|
165
165
|
})), !1;
|
|
166
|
-
}),
|
|
166
|
+
}), o.create(e, t);
|
|
167
167
|
}
|
|
168
|
-
var _ =
|
|
168
|
+
var _ = e.create({
|
|
169
169
|
name: "diagrams",
|
|
170
|
-
addProseMirrorPlugins: () => [new
|
|
170
|
+
addProseMirrorPlugins: () => [new r({
|
|
171
171
|
key: h,
|
|
172
172
|
state: {
|
|
173
173
|
init: (e, t) => g(t.doc),
|
package/lib/boardMove.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { issueQuery as n, statusesQuery as r } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { invalidateIssueViews as i } from "../api/mutations.js";
|
|
4
|
+
import { setIssueFields as a } from "./customFields.js";
|
|
5
5
|
import { toast as o } from "@parallelworks/ui";
|
|
6
6
|
import { useCallback as s } from "react";
|
|
7
7
|
import { useErrorMessage as c } from "@parallelworks/problem/react";
|
|
@@ -98,18 +98,18 @@ function d(d, f) {
|
|
|
98
98
|
issues: e.issues.map((e) => e.id === r.id ? y : e)
|
|
99
99
|
});
|
|
100
100
|
try {
|
|
101
|
-
let
|
|
101
|
+
let i = v ? await a(d, r.identifier, v) : t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
102
102
|
params: { path: {
|
|
103
103
|
workspace: d,
|
|
104
104
|
identifier: r.identifier
|
|
105
105
|
} },
|
|
106
106
|
body: _ ?? {}
|
|
107
107
|
}));
|
|
108
|
-
p.setQueryData(n(d, r.identifier).queryKey,
|
|
108
|
+
p.setQueryData(n(d, r.identifier).queryKey, i);
|
|
109
109
|
} catch (e) {
|
|
110
110
|
o.error(m(e));
|
|
111
111
|
} finally {
|
|
112
|
-
|
|
112
|
+
i(p, d, r.identifier);
|
|
113
113
|
}
|
|
114
114
|
}, [
|
|
115
115
|
p,
|