@activecollab/components 2.0.350 → 2.0.352
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/cjs/components/Autocomplete/Autocomplete.js +2 -0
- package/dist/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/dist/cjs/components/Select/Option/Option.js.map +1 -1
- package/dist/cjs/components/Select/OptionContent/OptionContent.js +6 -2
- package/dist/cjs/components/Select/OptionContent/OptionContent.js.map +1 -1
- package/dist/cjs/components/Select/OptionContent/Styles.js +8 -3
- package/dist/cjs/components/Select/OptionContent/Styles.js.map +1 -1
- package/dist/cjs/components/Select/OptionGroup/OptionGroup.js +6 -2
- package/dist/cjs/components/Select/OptionGroup/OptionGroup.js.map +1 -1
- package/dist/cjs/components/Select/OptionGroup/Styles.js +13 -3
- package/dist/cjs/components/Select/OptionGroup/Styles.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +4 -0
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/cjs/presentation/shared/ConnectRepositoryDialog.js +22 -4
- package/dist/cjs/presentation/shared/ConnectRepositoryDialog.js.map +1 -1
- package/dist/cjs/presentation/shared/LinkBranchOrPullRequestDialog.js +8 -5
- package/dist/cjs/presentation/shared/LinkBranchOrPullRequestDialog.js.map +1 -1
- package/dist/cjs/presentation/shared/SourceCodeSection.js +1001 -0
- package/dist/cjs/presentation/shared/SourceCodeSection.js.map +1 -0
- package/dist/cjs/presentation/shared/index.js +43 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/esm/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/esm/components/Autocomplete/Autocomplete.js +2 -0
- package/dist/esm/components/Autocomplete/Autocomplete.js.map +1 -1
- package/dist/esm/components/Select/Option/Option.d.ts +2 -0
- package/dist/esm/components/Select/Option/Option.d.ts.map +1 -1
- package/dist/esm/components/Select/Option/Option.js.map +1 -1
- package/dist/esm/components/Select/OptionContent/OptionContent.d.ts +3 -1
- package/dist/esm/components/Select/OptionContent/OptionContent.d.ts.map +1 -1
- package/dist/esm/components/Select/OptionContent/OptionContent.js +7 -3
- package/dist/esm/components/Select/OptionContent/OptionContent.js.map +1 -1
- package/dist/esm/components/Select/OptionContent/Styles.d.ts +1 -0
- package/dist/esm/components/Select/OptionContent/Styles.d.ts.map +1 -1
- package/dist/esm/components/Select/OptionContent/Styles.js +7 -2
- package/dist/esm/components/Select/OptionContent/Styles.js.map +1 -1
- package/dist/esm/components/Select/OptionGroup/OptionGroup.d.ts.map +1 -1
- package/dist/esm/components/Select/OptionGroup/OptionGroup.js +7 -3
- package/dist/esm/components/Select/OptionGroup/OptionGroup.js.map +1 -1
- package/dist/esm/components/Select/OptionGroup/Styles.d.ts +2 -0
- package/dist/esm/components/Select/OptionGroup/Styles.d.ts.map +1 -1
- package/dist/esm/components/Select/OptionGroup/Styles.js +12 -2
- package/dist/esm/components/Select/OptionGroup/Styles.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +4 -0
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.d.ts +10 -2
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.js +21 -3
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.js.map +1 -1
- package/dist/esm/presentation/shared/LinkBranchOrPullRequestDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/LinkBranchOrPullRequestDialog.js +9 -6
- package/dist/esm/presentation/shared/LinkBranchOrPullRequestDialog.js.map +1 -1
- package/dist/esm/presentation/shared/SourceCodeSection.d.ts +88 -0
- package/dist/esm/presentation/shared/SourceCodeSection.d.ts.map +1 -0
- package/dist/esm/presentation/shared/SourceCodeSection.js +936 -0
- package/dist/esm/presentation/shared/SourceCodeSection.js.map +1 -0
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/index.js +37 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,936 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { LinkBranchOrPullRequestDialog } from "./LinkBranchOrPullRequestDialog";
|
|
5
|
+
import { LinkingCommandsButton } from "./LinkingCommandsButton";
|
|
6
|
+
import { RoundAvatar } from "./RoundAvatar";
|
|
7
|
+
import { AVATAR_COLORS } from "./tokens";
|
|
8
|
+
import { Button } from "../../components/Button";
|
|
9
|
+
import { AddToListButton } from "../../components/Button/AddToListButton";
|
|
10
|
+
import { Dialog } from "../../components/Dialog";
|
|
11
|
+
import { IconButton } from "../../components/IconButton";
|
|
12
|
+
import { CancelCrossIcon, CheckIcon, CloseIcon, GitBranchIcon, GitCommitIcon, GitPullRequestIcon, GitRepositoryIcon, MessageIcon, RocketIcon, TrashIcon, WarningTriangleSmallIcon } from "../../components/Icons";
|
|
13
|
+
import { Tooltip } from "../../components/Tooltip";
|
|
14
|
+
import { Trigger } from "../../components/Trigger";
|
|
15
|
+
import { Body1, Body2, Caption1, Header3 } from "../../components/Typography";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Source Code section of a task — the shared subsystem behind the
|
|
19
|
+
* `Presentation/Source/Task Source` stories (Mix / All Open / All Completed).
|
|
20
|
+
* Holds the row types (issue / pull-or-merge request / branch), the pipeline
|
|
21
|
+
* spine, the history dialog, and the section that lays them out. Extracted into
|
|
22
|
+
* `shared/` so all three stories render the same components; editing a row type
|
|
23
|
+
* here updates every story at once.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const SANS = '-apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif';
|
|
27
|
+
|
|
28
|
+
/* ================================================================== */
|
|
29
|
+
/* Issue markers (open / closed) — small inline glyphs so the */
|
|
30
|
+
/* open-vs-closed state reads crisply; they inherit `currentColor`. */
|
|
31
|
+
/* ================================================================== */
|
|
32
|
+
|
|
33
|
+
const IssueOpenIcon = _ref => {
|
|
34
|
+
let _ref$width = _ref.width,
|
|
35
|
+
width = _ref$width === void 0 ? 16 : _ref$width,
|
|
36
|
+
_ref$height = _ref.height,
|
|
37
|
+
height = _ref$height === void 0 ? 16 : _ref$height;
|
|
38
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
39
|
+
width: width,
|
|
40
|
+
height: height,
|
|
41
|
+
viewBox: "0 0 16 16",
|
|
42
|
+
fill: "none"
|
|
43
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
44
|
+
cx: "8",
|
|
45
|
+
cy: "8",
|
|
46
|
+
r: "6.4",
|
|
47
|
+
stroke: "currentColor",
|
|
48
|
+
strokeWidth: "1.6"
|
|
49
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
50
|
+
cx: "8",
|
|
51
|
+
cy: "8",
|
|
52
|
+
r: "2.2",
|
|
53
|
+
fill: "currentColor"
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
const IssueClosedIcon = _ref2 => {
|
|
57
|
+
let _ref2$width = _ref2.width,
|
|
58
|
+
width = _ref2$width === void 0 ? 16 : _ref2$width,
|
|
59
|
+
_ref2$height = _ref2.height,
|
|
60
|
+
height = _ref2$height === void 0 ? 16 : _ref2$height;
|
|
61
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
62
|
+
width: width,
|
|
63
|
+
height: height,
|
|
64
|
+
viewBox: "0 0 16 16",
|
|
65
|
+
fill: "none"
|
|
66
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
67
|
+
cx: "8",
|
|
68
|
+
cy: "8",
|
|
69
|
+
r: "6.4",
|
|
70
|
+
stroke: "currentColor",
|
|
71
|
+
strokeWidth: "1.6"
|
|
72
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
73
|
+
d: "M5.2 8.1l1.9 1.9 3.7-3.9",
|
|
74
|
+
stroke: "currentColor",
|
|
75
|
+
strokeWidth: "1.6",
|
|
76
|
+
strokeLinecap: "round",
|
|
77
|
+
strokeLinejoin: "round"
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/* ================================================================== */
|
|
82
|
+
/* Source Code section — data model */
|
|
83
|
+
/* ================================================================== */
|
|
84
|
+
|
|
85
|
+
const STAGE_NAMES = ["Branch", "Commits", "Pull request", "CI / Build", "Deploy"];
|
|
86
|
+
|
|
87
|
+
/** A VCS issue. Weakly referenced by any number of branches / PRs. */
|
|
88
|
+
|
|
89
|
+
/** A branch or pull request read from the VCS. */
|
|
90
|
+
|
|
91
|
+
const mkStages = defs => defs.map((d, i) => _extends({
|
|
92
|
+
name: STAGE_NAMES[i]
|
|
93
|
+
}, d));
|
|
94
|
+
const issueCompleted = i => i.state === "closed";
|
|
95
|
+
const codeCompleted = e => e.status !== "open";
|
|
96
|
+
const byRecency = (a, b) => a.updatedMinsAgo - b.updatedMinsAgo;
|
|
97
|
+
|
|
98
|
+
/** External URL for an element — opens the object in the provider (new tab). */
|
|
99
|
+
const issueUrl = i => "https://github.com/" + i.repoFull + "/issues/" + i.ref.replace("#", "");
|
|
100
|
+
const codeUrl = e => {
|
|
101
|
+
if (e.kind === "pr") {
|
|
102
|
+
var _e$title$match$, _e$title$match;
|
|
103
|
+
const number = (_e$title$match$ = (_e$title$match = e.title.match(/#(\d+)/)) == null ? void 0 : _e$title$match[1]) != null ? _e$title$match$ : "";
|
|
104
|
+
return "https://github.com/" + e.repoFull + "/pull/" + number;
|
|
105
|
+
}
|
|
106
|
+
return "https://github.com/" + e.repoFull + "/tree/" + e.title;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/* ---- Issues -------------------------------------------------------- */
|
|
110
|
+
|
|
111
|
+
const ISSUES = [{
|
|
112
|
+
ref: "#482",
|
|
113
|
+
title: "#482 Ranks reset when a contract is archived",
|
|
114
|
+
repo: "backend",
|
|
115
|
+
repoFull: "activecollab/backend",
|
|
116
|
+
state: "open",
|
|
117
|
+
updatedLabel: "20m ago",
|
|
118
|
+
updatedMinsAgo: 20
|
|
119
|
+
}, {
|
|
120
|
+
ref: "#455",
|
|
121
|
+
title: "#455 Retainer totals off by a rounding cent",
|
|
122
|
+
repo: "backend",
|
|
123
|
+
repoFull: "activecollab/backend",
|
|
124
|
+
state: "open",
|
|
125
|
+
updatedLabel: "3h ago",
|
|
126
|
+
updatedMinsAgo: 180
|
|
127
|
+
}, {
|
|
128
|
+
ref: "#470",
|
|
129
|
+
title: "#470 Cannot set a rank above 100",
|
|
130
|
+
repo: "backend",
|
|
131
|
+
repoFull: "activecollab/backend",
|
|
132
|
+
state: "closed",
|
|
133
|
+
updatedLabel: "4d ago",
|
|
134
|
+
updatedMinsAgo: 5760
|
|
135
|
+
}];
|
|
136
|
+
|
|
137
|
+
/* ---- Branches / pull requests -------------------------------------- */
|
|
138
|
+
|
|
139
|
+
const CODE_ENTRIES = [{
|
|
140
|
+
kind: "branch",
|
|
141
|
+
title: "spike/rank-cache",
|
|
142
|
+
headSha: "9f3c1a2b7d4e5f60819a2b3c4d5e6f7081920304",
|
|
143
|
+
repo: "backend",
|
|
144
|
+
repoFull: "activecollab/backend",
|
|
145
|
+
status: "open",
|
|
146
|
+
contributors: [{
|
|
147
|
+
initials: "IS",
|
|
148
|
+
bg: AVATAR_COLORS.purple
|
|
149
|
+
}],
|
|
150
|
+
commits: {
|
|
151
|
+
value: 1,
|
|
152
|
+
tip: "1 commit · 30m ago by Ilija S."
|
|
153
|
+
},
|
|
154
|
+
diff: {
|
|
155
|
+
add: 38,
|
|
156
|
+
del: 4,
|
|
157
|
+
tip: "38 additions, 4 deletions across 2 files"
|
|
158
|
+
},
|
|
159
|
+
noPrLabel: "no pull request yet",
|
|
160
|
+
updatedLabel: "30m ago",
|
|
161
|
+
updatedMinsAgo: 30,
|
|
162
|
+
references: [],
|
|
163
|
+
stages: mkStages([{
|
|
164
|
+
state: "done",
|
|
165
|
+
details: ["spike/rank-cache", "on activecollab/backend"]
|
|
166
|
+
}, {
|
|
167
|
+
state: "done",
|
|
168
|
+
details: ["1 commit", "30m ago by Ilija S."]
|
|
169
|
+
}, {
|
|
170
|
+
state: "todo",
|
|
171
|
+
details: ["No pull request opened yet"]
|
|
172
|
+
}]),
|
|
173
|
+
pipelineSupported: false,
|
|
174
|
+
history: [{
|
|
175
|
+
icon: GitBranchIcon,
|
|
176
|
+
title: "Branch created",
|
|
177
|
+
detail: "spike/rank-cache",
|
|
178
|
+
meta: "Ilija Studen · today, 12:40"
|
|
179
|
+
}, {
|
|
180
|
+
icon: GitCommitIcon,
|
|
181
|
+
title: "Pushed 1 commit",
|
|
182
|
+
detail: "Prototype rank cache",
|
|
183
|
+
meta: "Ilija Studen · 30m ago"
|
|
184
|
+
}]
|
|
185
|
+
}, {
|
|
186
|
+
kind: "branch",
|
|
187
|
+
title: "feature/retainers-ui-34",
|
|
188
|
+
headSha: "4a7b9c2d1e3f5061728394a5b6c7d8e9f0a1b2c3",
|
|
189
|
+
repo: "frontend",
|
|
190
|
+
repoFull: "activecollab/frontend",
|
|
191
|
+
status: "open",
|
|
192
|
+
contributors: [{
|
|
193
|
+
initials: "DA",
|
|
194
|
+
bg: AVATAR_COLORS.green
|
|
195
|
+
}],
|
|
196
|
+
commits: {
|
|
197
|
+
value: 6,
|
|
198
|
+
tip: "6 commits · last 1h ago by Dragana A."
|
|
199
|
+
},
|
|
200
|
+
diff: {
|
|
201
|
+
add: 214,
|
|
202
|
+
del: 52,
|
|
203
|
+
tip: "214 additions, 52 deletions across 9 files"
|
|
204
|
+
},
|
|
205
|
+
noPrLabel: "no pull request yet",
|
|
206
|
+
updatedLabel: "1h ago",
|
|
207
|
+
updatedMinsAgo: 60,
|
|
208
|
+
references: ["#482"],
|
|
209
|
+
stages: mkStages([{
|
|
210
|
+
state: "done",
|
|
211
|
+
details: ["feature/retainers-ui-34", "on activecollab/frontend"]
|
|
212
|
+
}, {
|
|
213
|
+
state: "done",
|
|
214
|
+
details: ["6 commits", "last 1h ago by Dragana A."]
|
|
215
|
+
}, {
|
|
216
|
+
state: "todo",
|
|
217
|
+
details: ["No pull request opened yet"]
|
|
218
|
+
}, {
|
|
219
|
+
state: "todo",
|
|
220
|
+
details: ["No build yet"]
|
|
221
|
+
}, {
|
|
222
|
+
state: "todo",
|
|
223
|
+
details: ["Not deployed"]
|
|
224
|
+
}]),
|
|
225
|
+
pipelineSupported: true,
|
|
226
|
+
history: [{
|
|
227
|
+
icon: GitBranchIcon,
|
|
228
|
+
title: "Branch created",
|
|
229
|
+
detail: "feature/retainers-ui-34",
|
|
230
|
+
meta: "Dragana A. · today, 08:02"
|
|
231
|
+
}, {
|
|
232
|
+
icon: GitCommitIcon,
|
|
233
|
+
title: "Pushed 6 commits",
|
|
234
|
+
detail: "Retainer settings screen",
|
|
235
|
+
meta: "Dragana A. · 1h ago"
|
|
236
|
+
}]
|
|
237
|
+
}, {
|
|
238
|
+
kind: "pr",
|
|
239
|
+
title: "#119915 Contract UI rank controls",
|
|
240
|
+
headSha: "b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5",
|
|
241
|
+
repo: "frontend",
|
|
242
|
+
repoFull: "activecollab/frontend",
|
|
243
|
+
status: "merged",
|
|
244
|
+
contributors: [{
|
|
245
|
+
initials: "MK",
|
|
246
|
+
bg: AVATAR_COLORS.blue
|
|
247
|
+
}],
|
|
248
|
+
commits: {
|
|
249
|
+
value: 11,
|
|
250
|
+
tip: "11 commits · last 5h ago by Marko K."
|
|
251
|
+
},
|
|
252
|
+
diff: {
|
|
253
|
+
add: 168,
|
|
254
|
+
del: 24,
|
|
255
|
+
tip: "168 additions, 24 deletions across 6 files"
|
|
256
|
+
},
|
|
257
|
+
comments: {
|
|
258
|
+
value: 5,
|
|
259
|
+
tip: "5 comments on the pull request"
|
|
260
|
+
},
|
|
261
|
+
updatedLabel: "5h ago",
|
|
262
|
+
updatedMinsAgo: 300,
|
|
263
|
+
references: ["#455"],
|
|
264
|
+
stages: mkStages([{
|
|
265
|
+
state: "done",
|
|
266
|
+
details: ["feature/contracts-ui-34", "on activecollab/frontend"]
|
|
267
|
+
}, {
|
|
268
|
+
state: "done",
|
|
269
|
+
details: ["11 commits", "last 5h ago by Marko K."]
|
|
270
|
+
}, {
|
|
271
|
+
state: "done",
|
|
272
|
+
details: ["#119915 merged", "approved by 1 reviewer"]
|
|
273
|
+
}, {
|
|
274
|
+
state: "failed",
|
|
275
|
+
details: ["Build failing", "3 of 12 checks failed"]
|
|
276
|
+
}, {
|
|
277
|
+
state: "todo",
|
|
278
|
+
details: ["Not deployed"]
|
|
279
|
+
}]),
|
|
280
|
+
pipelineSupported: true,
|
|
281
|
+
history: [{
|
|
282
|
+
icon: GitBranchIcon,
|
|
283
|
+
title: "Branch created",
|
|
284
|
+
detail: "feature/contracts-ui-34",
|
|
285
|
+
meta: "Marko K. · today, 07:10"
|
|
286
|
+
}, {
|
|
287
|
+
icon: GitPullRequestIcon,
|
|
288
|
+
title: "Pull request merged",
|
|
289
|
+
detail: "into main",
|
|
290
|
+
meta: "Marko K. · today, 10:12",
|
|
291
|
+
tone: "success"
|
|
292
|
+
}, {
|
|
293
|
+
icon: RocketIcon,
|
|
294
|
+
title: "Build started",
|
|
295
|
+
detail: "CI pipeline #482",
|
|
296
|
+
meta: "today, 10:13",
|
|
297
|
+
tone: "progress"
|
|
298
|
+
}, {
|
|
299
|
+
icon: WarningTriangleSmallIcon,
|
|
300
|
+
title: "Build failed",
|
|
301
|
+
detail: "3 of 12 checks failed",
|
|
302
|
+
meta: "today, 10:18",
|
|
303
|
+
tone: "danger"
|
|
304
|
+
}]
|
|
305
|
+
}, {
|
|
306
|
+
kind: "branch",
|
|
307
|
+
title: "feature/retainers-34",
|
|
308
|
+
headSha: "1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d",
|
|
309
|
+
repo: "backend",
|
|
310
|
+
repoFull: "activecollab/backend",
|
|
311
|
+
status: "merged",
|
|
312
|
+
contributors: [{
|
|
313
|
+
initials: "IS",
|
|
314
|
+
bg: AVATAR_COLORS.purple
|
|
315
|
+
}],
|
|
316
|
+
commits: {
|
|
317
|
+
value: 14,
|
|
318
|
+
tip: "14 commits · merged 2d ago by Ilija S."
|
|
319
|
+
},
|
|
320
|
+
diff: {
|
|
321
|
+
add: 405,
|
|
322
|
+
del: 37,
|
|
323
|
+
tip: "405 additions, 37 deletions across 11 files"
|
|
324
|
+
},
|
|
325
|
+
updatedLabel: "2d ago",
|
|
326
|
+
updatedMinsAgo: 2880,
|
|
327
|
+
references: ["#482", "#470"],
|
|
328
|
+
stages: mkStages([{
|
|
329
|
+
state: "done",
|
|
330
|
+
details: ["feature/retainers-34", "on activecollab/backend"]
|
|
331
|
+
}, {
|
|
332
|
+
state: "done",
|
|
333
|
+
details: ["14 commits", "merged 2d ago by Ilija S."]
|
|
334
|
+
}, {
|
|
335
|
+
state: "done",
|
|
336
|
+
details: ["Merged via #119909", "into main"]
|
|
337
|
+
}]),
|
|
338
|
+
pipelineSupported: false,
|
|
339
|
+
history: [{
|
|
340
|
+
icon: GitBranchIcon,
|
|
341
|
+
title: "Branch created",
|
|
342
|
+
detail: "feature/retainers-34",
|
|
343
|
+
meta: "Ilija Studen · 1 Mar, 09:12"
|
|
344
|
+
}, {
|
|
345
|
+
icon: GitCommitIcon,
|
|
346
|
+
title: "Pushed 14 commits",
|
|
347
|
+
detail: "Rank model + datastore updates",
|
|
348
|
+
meta: "Ilija Studen · 2 Mar, 16:05"
|
|
349
|
+
}, {
|
|
350
|
+
icon: GitBranchIcon,
|
|
351
|
+
title: "Branch merged",
|
|
352
|
+
detail: "via #119909 into main",
|
|
353
|
+
meta: "Ilija Studen · 2 Mar, 18:20",
|
|
354
|
+
tone: "success"
|
|
355
|
+
}]
|
|
356
|
+
}, {
|
|
357
|
+
kind: "pr",
|
|
358
|
+
title: "#119909 Allow and update ranks across datastores",
|
|
359
|
+
headSha: "c4d5e6f70819202a3b4c5d6e7f8091a2b3c4d5e6",
|
|
360
|
+
repo: "backend",
|
|
361
|
+
repoFull: "activecollab/backend",
|
|
362
|
+
status: "merged",
|
|
363
|
+
contributors: [{
|
|
364
|
+
initials: "IS",
|
|
365
|
+
bg: AVATAR_COLORS.purple
|
|
366
|
+
}, {
|
|
367
|
+
initials: "MK",
|
|
368
|
+
bg: AVATAR_COLORS.blue
|
|
369
|
+
}],
|
|
370
|
+
commits: {
|
|
371
|
+
value: 14,
|
|
372
|
+
tip: "14 commits · merged 2d ago by Ilija S."
|
|
373
|
+
},
|
|
374
|
+
diff: {
|
|
375
|
+
add: 405,
|
|
376
|
+
del: 37,
|
|
377
|
+
tip: "405 additions, 37 deletions across 11 files"
|
|
378
|
+
},
|
|
379
|
+
comments: {
|
|
380
|
+
value: 12,
|
|
381
|
+
tip: "12 comments on the pull request"
|
|
382
|
+
},
|
|
383
|
+
updatedLabel: "2d ago",
|
|
384
|
+
updatedMinsAgo: 2900,
|
|
385
|
+
references: ["#482", "#470"],
|
|
386
|
+
stages: mkStages([{
|
|
387
|
+
state: "done",
|
|
388
|
+
details: ["feature/retainers-34", "on activecollab/backend"]
|
|
389
|
+
}, {
|
|
390
|
+
state: "done",
|
|
391
|
+
details: ["14 commits", "last 2d ago by Ilija S."]
|
|
392
|
+
}, {
|
|
393
|
+
state: "done",
|
|
394
|
+
details: ["#119909 merged", "approved by 2 reviewers"]
|
|
395
|
+
}]),
|
|
396
|
+
pipelineSupported: false,
|
|
397
|
+
history: [{
|
|
398
|
+
icon: GitPullRequestIcon,
|
|
399
|
+
title: "Pull request opened",
|
|
400
|
+
detail: "#119909 · base: main",
|
|
401
|
+
meta: "Ilija Studen · 2 Mar, 16:30",
|
|
402
|
+
tone: "progress"
|
|
403
|
+
}, {
|
|
404
|
+
icon: CheckIcon,
|
|
405
|
+
title: "Approved by 2 reviewers",
|
|
406
|
+
detail: "Marko K., Janko S.",
|
|
407
|
+
meta: "2 Mar, 18:02",
|
|
408
|
+
tone: "success"
|
|
409
|
+
}, {
|
|
410
|
+
icon: GitPullRequestIcon,
|
|
411
|
+
title: "Pull request merged",
|
|
412
|
+
detail: "into main",
|
|
413
|
+
meta: "Ilija Studen · 2 Mar, 18:20",
|
|
414
|
+
tone: "success"
|
|
415
|
+
}]
|
|
416
|
+
}, {
|
|
417
|
+
kind: "branch",
|
|
418
|
+
title: "hotfix/rank-typo",
|
|
419
|
+
headSha: "7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9012",
|
|
420
|
+
repo: "backend",
|
|
421
|
+
repoFull: "activecollab/backend",
|
|
422
|
+
status: "deleted",
|
|
423
|
+
contributors: [{
|
|
424
|
+
initials: "MK",
|
|
425
|
+
bg: AVATAR_COLORS.blue
|
|
426
|
+
}],
|
|
427
|
+
commits: {
|
|
428
|
+
value: 2,
|
|
429
|
+
tip: "2 commits · deleted 5d ago"
|
|
430
|
+
},
|
|
431
|
+
diff: {
|
|
432
|
+
add: 6,
|
|
433
|
+
del: 3,
|
|
434
|
+
tip: "6 additions, 3 deletions across 1 file"
|
|
435
|
+
},
|
|
436
|
+
updatedLabel: "5d ago",
|
|
437
|
+
updatedMinsAgo: 7000,
|
|
438
|
+
references: ["#470"],
|
|
439
|
+
stages: mkStages([{
|
|
440
|
+
state: "done",
|
|
441
|
+
details: ["hotfix/rank-typo", "on activecollab/backend"]
|
|
442
|
+
}, {
|
|
443
|
+
state: "done",
|
|
444
|
+
details: ["2 commits", "by Marko K."]
|
|
445
|
+
}, {
|
|
446
|
+
state: "todo",
|
|
447
|
+
details: ["No pull request opened"]
|
|
448
|
+
}]),
|
|
449
|
+
pipelineSupported: false,
|
|
450
|
+
history: [{
|
|
451
|
+
icon: GitBranchIcon,
|
|
452
|
+
title: "Branch created",
|
|
453
|
+
detail: "hotfix/rank-typo",
|
|
454
|
+
meta: "Marko K. · 6d ago"
|
|
455
|
+
}, {
|
|
456
|
+
icon: GitCommitIcon,
|
|
457
|
+
title: "Pushed 2 commits",
|
|
458
|
+
detail: "Fix rank label typo",
|
|
459
|
+
meta: "Marko K. · 6d ago"
|
|
460
|
+
}, {
|
|
461
|
+
icon: TrashIcon,
|
|
462
|
+
title: "Branch deleted",
|
|
463
|
+
detail: "soft delete — history preserved",
|
|
464
|
+
meta: "Marko K. · 5d ago",
|
|
465
|
+
tone: "danger"
|
|
466
|
+
}]
|
|
467
|
+
}, {
|
|
468
|
+
kind: "pr",
|
|
469
|
+
title: "#119870 Clamp rank to valid range",
|
|
470
|
+
headSha: "d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f701",
|
|
471
|
+
repo: "backend",
|
|
472
|
+
repoFull: "activecollab/backend",
|
|
473
|
+
status: "merged",
|
|
474
|
+
contributors: [{
|
|
475
|
+
initials: "MK",
|
|
476
|
+
bg: AVATAR_COLORS.blue
|
|
477
|
+
}],
|
|
478
|
+
commits: {
|
|
479
|
+
value: 4,
|
|
480
|
+
tip: "4 commits · merged 5d ago by Marko K."
|
|
481
|
+
},
|
|
482
|
+
diff: {
|
|
483
|
+
add: 52,
|
|
484
|
+
del: 8,
|
|
485
|
+
tip: "52 additions, 8 deletions across 3 files"
|
|
486
|
+
},
|
|
487
|
+
updatedLabel: "5d ago",
|
|
488
|
+
updatedMinsAgo: 7200,
|
|
489
|
+
references: ["#470"],
|
|
490
|
+
stages: mkStages([{
|
|
491
|
+
state: "done",
|
|
492
|
+
details: ["fix/rank-clamp-33", "on activecollab/backend"]
|
|
493
|
+
}, {
|
|
494
|
+
state: "done",
|
|
495
|
+
details: ["4 commits", "merged 5d ago by Marko K."]
|
|
496
|
+
}, {
|
|
497
|
+
state: "done",
|
|
498
|
+
details: ["#119870 merged", "approved by 1 reviewer"]
|
|
499
|
+
}]),
|
|
500
|
+
pipelineSupported: false,
|
|
501
|
+
history: [{
|
|
502
|
+
icon: GitBranchIcon,
|
|
503
|
+
title: "Branch created",
|
|
504
|
+
detail: "fix/rank-clamp-33",
|
|
505
|
+
meta: "Marko K. · 6d ago"
|
|
506
|
+
}, {
|
|
507
|
+
icon: GitPullRequestIcon,
|
|
508
|
+
title: "Pull request merged",
|
|
509
|
+
detail: "into main",
|
|
510
|
+
meta: "Marko K. · 5d ago",
|
|
511
|
+
tone: "success"
|
|
512
|
+
}]
|
|
513
|
+
}, {
|
|
514
|
+
kind: "pr",
|
|
515
|
+
title: "#119888 Cache ranks per datastore",
|
|
516
|
+
headSha: "a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4",
|
|
517
|
+
repo: "backend",
|
|
518
|
+
repoFull: "activecollab/backend",
|
|
519
|
+
status: "closed",
|
|
520
|
+
contributors: [{
|
|
521
|
+
initials: "IS",
|
|
522
|
+
bg: AVATAR_COLORS.purple
|
|
523
|
+
}],
|
|
524
|
+
commits: {
|
|
525
|
+
value: 5,
|
|
526
|
+
tip: "5 commits · closed 3d ago by Ilija S."
|
|
527
|
+
},
|
|
528
|
+
diff: {
|
|
529
|
+
add: 120,
|
|
530
|
+
del: 15,
|
|
531
|
+
tip: "120 additions, 15 deletions across 4 files"
|
|
532
|
+
},
|
|
533
|
+
comments: {
|
|
534
|
+
value: 3,
|
|
535
|
+
tip: "3 comments on the pull request"
|
|
536
|
+
},
|
|
537
|
+
updatedLabel: "3d ago",
|
|
538
|
+
updatedMinsAgo: 4320,
|
|
539
|
+
references: ["#455"],
|
|
540
|
+
stages: mkStages([{
|
|
541
|
+
state: "done",
|
|
542
|
+
details: ["feature/rank-datastore-cache", "on activecollab/backend"]
|
|
543
|
+
}, {
|
|
544
|
+
state: "done",
|
|
545
|
+
details: ["5 commits", "last 3d ago by Ilija S."]
|
|
546
|
+
}, {
|
|
547
|
+
state: "todo",
|
|
548
|
+
details: ["#119888 closed without merging"]
|
|
549
|
+
}]),
|
|
550
|
+
pipelineSupported: false,
|
|
551
|
+
history: [{
|
|
552
|
+
icon: GitPullRequestIcon,
|
|
553
|
+
title: "Pull request opened",
|
|
554
|
+
detail: "#119888 · base: main",
|
|
555
|
+
meta: "Ilija Studen · 4d ago",
|
|
556
|
+
tone: "progress"
|
|
557
|
+
}, {
|
|
558
|
+
icon: CancelCrossIcon,
|
|
559
|
+
title: "Pull request closed",
|
|
560
|
+
detail: "closed without merging",
|
|
561
|
+
meta: "Ilija Studen · 3d ago"
|
|
562
|
+
}]
|
|
563
|
+
}];
|
|
564
|
+
|
|
565
|
+
/* ================================================================== */
|
|
566
|
+
/* Spine + history dialog (for branches / pull requests) */
|
|
567
|
+
/* ================================================================== */
|
|
568
|
+
|
|
569
|
+
const StageTip = _ref3 => {
|
|
570
|
+
let name = _ref3.name,
|
|
571
|
+
details = _ref3.details;
|
|
572
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
573
|
+
style: {
|
|
574
|
+
display: "block",
|
|
575
|
+
textAlign: "left",
|
|
576
|
+
lineHeight: 1.5
|
|
577
|
+
}
|
|
578
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
579
|
+
style: {
|
|
580
|
+
display: "block",
|
|
581
|
+
fontWeight: 700
|
|
582
|
+
}
|
|
583
|
+
}, "Stage: ", name), details.map((d, i) => /*#__PURE__*/React.createElement("span", {
|
|
584
|
+
key: name + "-" + i,
|
|
585
|
+
style: {
|
|
586
|
+
display: "block"
|
|
587
|
+
}
|
|
588
|
+
}, d)));
|
|
589
|
+
};
|
|
590
|
+
const SpineTrigger = styled(Trigger).withConfig({
|
|
591
|
+
displayName: "SourceCodeSection__SpineTrigger",
|
|
592
|
+
componentId: "sc-rvqbh5-0"
|
|
593
|
+
})(["display:inline-flex;align-items:center;align-self:center;flex-shrink:0;padding:6px 8px;border-radius:8px;transition:background-color 200ms ease;&:hover{background-color:var(--color-theme-200);}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}"]);
|
|
594
|
+
const StyledSpine = styled.div.withConfig({
|
|
595
|
+
displayName: "SourceCodeSection__StyledSpine",
|
|
596
|
+
componentId: "sc-rvqbh5-1"
|
|
597
|
+
})(["display:flex;align-items:flex-start;.circle{width:22px;height:22px;border-radius:50%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;}.circle.done{background:var(--color-sucess-green);}.circle.progress{background:var(--color-primary);}.circle.failed{background:var(--red-alert);}.circle.todo{background:transparent;border:2px solid var(--color-theme-400);}.dot{border-radius:50%;}.dot-progress{width:7px;height:7px;background:#fff;}.dot-todo{width:6px;height:6px;background:var(--color-theme-500);}.connector{width:13px;height:2px;margin-top:10px;background:var(--color-theme-400);}.connector.on{background:var(--color-sucess-green);}"]);
|
|
598
|
+
const Spine = _ref4 => {
|
|
599
|
+
let items = _ref4.items,
|
|
600
|
+
onClick = _ref4.onClick;
|
|
601
|
+
return /*#__PURE__*/React.createElement(SpineTrigger, {
|
|
602
|
+
type: "button",
|
|
603
|
+
onClick: onClick,
|
|
604
|
+
"aria-label": "Open source code history"
|
|
605
|
+
}, /*#__PURE__*/React.createElement(StyledSpine, null, items.map((s, i) => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
606
|
+
key: s.name
|
|
607
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
608
|
+
title: /*#__PURE__*/React.createElement(StageTip, s)
|
|
609
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
610
|
+
className: "circle " + s.state
|
|
611
|
+
}, s.state === "done" && /*#__PURE__*/React.createElement(CheckIcon, {
|
|
612
|
+
fill: "#fff",
|
|
613
|
+
width: 14,
|
|
614
|
+
height: 14
|
|
615
|
+
}), s.state === "failed" && /*#__PURE__*/React.createElement(CloseIcon, {
|
|
616
|
+
fill: "#fff",
|
|
617
|
+
width: 12,
|
|
618
|
+
height: 12
|
|
619
|
+
}), s.state === "progress" && /*#__PURE__*/React.createElement("span", {
|
|
620
|
+
className: "dot dot-progress"
|
|
621
|
+
}), s.state === "todo" && /*#__PURE__*/React.createElement("span", {
|
|
622
|
+
className: "dot dot-todo"
|
|
623
|
+
}))), i < items.length - 1 && /*#__PURE__*/React.createElement("span", {
|
|
624
|
+
className: items[i + 1].state !== "todo" ? "connector on" : "connector"
|
|
625
|
+
})))));
|
|
626
|
+
};
|
|
627
|
+
const StyledHistory = styled.div.withConfig({
|
|
628
|
+
displayName: "SourceCodeSection__StyledHistory",
|
|
629
|
+
componentId: "sc-rvqbh5-2"
|
|
630
|
+
})(["font-family:", ";.hist-sub{margin-bottom:18px;}.hist-event{position:relative;display:flex;gap:12px;padding-bottom:18px;}.hist-event:last-child{padding-bottom:0;}.hist-event:not(:last-child)::before{content:\"\";position:absolute;left:11px;top:24px;bottom:0;width:2px;background:var(--border-primary);}.hist-icon{z-index:1;flex-shrink:0;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--color-theme-200);}.hist-icon.success{background:color-mix(in srgb,var(--color-sucess-green) 18%,transparent);}.hist-icon.danger{background:color-mix(in srgb,var(--red-alert) 18%,transparent);}.hist-icon.progress{background:color-mix(in srgb,var(--color-primary) 18%,transparent);}.hist-body{min-width:0;padding-top:1px;}.hist-note{margin-top:4px;padding:10px 12px;border-radius:6px;background:var(--color-theme-200);}"], SANS);
|
|
631
|
+
const HistoryDialog = _ref5 => {
|
|
632
|
+
let entry = _ref5.entry,
|
|
633
|
+
onClose = _ref5.onClose;
|
|
634
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
635
|
+
open: !!entry,
|
|
636
|
+
onClose: onClose,
|
|
637
|
+
enableBackgroundClick: true
|
|
638
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
639
|
+
disableDefaultHeading: true
|
|
640
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
641
|
+
style: {
|
|
642
|
+
display: "flex",
|
|
643
|
+
alignItems: "center",
|
|
644
|
+
justifyContent: "space-between",
|
|
645
|
+
gap: 12
|
|
646
|
+
}
|
|
647
|
+
}, /*#__PURE__*/React.createElement(Header3, null, "Source Code History"), /*#__PURE__*/React.createElement(IconButton, {
|
|
648
|
+
type: "button",
|
|
649
|
+
variant: "text gray",
|
|
650
|
+
onClick: onClose
|
|
651
|
+
}, /*#__PURE__*/React.createElement(CancelCrossIcon, null)))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, entry && /*#__PURE__*/React.createElement(StyledHistory, null, /*#__PURE__*/React.createElement("div", {
|
|
652
|
+
className: "hist-sub"
|
|
653
|
+
}, /*#__PURE__*/React.createElement(Body2, {
|
|
654
|
+
weight: "medium"
|
|
655
|
+
}, entry.title), /*#__PURE__*/React.createElement(Caption1, {
|
|
656
|
+
color: "secondary"
|
|
657
|
+
}, entry.repoFull)), entry.history.map((ev, i) => {
|
|
658
|
+
var _ev$tone;
|
|
659
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
660
|
+
className: "hist-event",
|
|
661
|
+
key: ev.title + "-" + i
|
|
662
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
663
|
+
className: "hist-icon " + ((_ev$tone = ev.tone) != null ? _ev$tone : "neutral")
|
|
664
|
+
}, /*#__PURE__*/React.createElement(ev.icon, {
|
|
665
|
+
width: 14,
|
|
666
|
+
height: 14
|
|
667
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
668
|
+
className: "hist-body"
|
|
669
|
+
}, /*#__PURE__*/React.createElement(Body2, {
|
|
670
|
+
weight: "medium"
|
|
671
|
+
}, ev.title), ev.detail && /*#__PURE__*/React.createElement(Caption1, {
|
|
672
|
+
color: "secondary"
|
|
673
|
+
}, ev.detail), /*#__PURE__*/React.createElement(Caption1, {
|
|
674
|
+
color: "tertiary"
|
|
675
|
+
}, ev.meta)));
|
|
676
|
+
}), !entry.pipelineSupported && /*#__PURE__*/React.createElement("div", {
|
|
677
|
+
className: "hist-note"
|
|
678
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
679
|
+
color: "secondary"
|
|
680
|
+
}, "No CI or deployment pipeline is configured for this repository.")))));
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
/* ================================================================== */
|
|
684
|
+
/* Source Code section — flat list, split open / completed */
|
|
685
|
+
/* ================================================================== */
|
|
686
|
+
|
|
687
|
+
const StyledSourceCode = styled.div.withConfig({
|
|
688
|
+
displayName: "SourceCodeSection__StyledSourceCode",
|
|
689
|
+
componentId: "sc-rvqbh5-3"
|
|
690
|
+
})(["font-family:", ";margin:0 0 16px;padding-bottom:16px;border-bottom:1px solid var(--border-primary);.sc-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px;}.sc-completed-row{display:flex;align-items:center;margin-top:8px;padding-top:8px;border-top:1px solid var(--border-primary);}.sc-add{margin-top:8px;padding-top:12px;border-top:1px solid var(--border-primary);}.sc-add .c--add-to-list-btn svg{box-sizing:content-box;}.sc-item{padding:12px 0;}.sc-item + .sc-item{border-top:1px solid var(--border-primary);}.sc-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}.sc-main{flex:1 1 0%;min-width:0;}.sc-name{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;min-width:0;}.sc-lead{flex-shrink:0;display:inline-flex;color:var(--color-theme-600);}.sc-title{flex:0 1 auto;min-width:0;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.sc-title.strike{text-decoration:line-through;}.sc-title.strike-link{text-decoration:line-through;}.sc-title.strike-link:hover{text-decoration:none;}.sc-sigs{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;font-size:13px;color:var(--color-theme-600);}.sc-sig{display:inline-flex;align-items:center;gap:4px;}.sc-chip{display:inline-flex;align-items:center;gap:3px;height:20px;padding:0 8px;border-radius:6px;font-size:11px;font-weight:700;letter-spacing:0.02em;flex-shrink:0;}.sc-chip.done{color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 15%,transparent);}.sc-chip.gone{color:var(--color-theme-900);background:var(--color-theme-200);border:1px solid var(--border-primary);}.sc-avatars{display:flex;align-items:center;}.sc-sha{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--color-theme-500);}.sc-diff .add{color:var(--color-sucess-green);}.sc-diff .del{color:var(--red-alert);}.sc-muted{color:var(--color-theme-500);}.sc-refs{display:inline-flex;align-items:center;gap:6px;}.sc-refs .ref-link{color:var(--color-primary);font-weight:500;}"], SANS);
|
|
691
|
+
|
|
692
|
+
/* Element name — a link that opens the object in a new tab. Keeps the row's
|
|
693
|
+
typography (inherits color + weight), turns primary on hover, link cursor. */
|
|
694
|
+
const TitleLink = styled.a.withConfig({
|
|
695
|
+
displayName: "SourceCodeSection__TitleLink",
|
|
696
|
+
componentId: "sc-rvqbh5-4"
|
|
697
|
+
})(["color:inherit;text-decoration:none;cursor:pointer;transition:color 200ms ease;&:hover{color:var(--color-primary);}"]);
|
|
698
|
+
const IssueRow = _ref6 => {
|
|
699
|
+
let issue = _ref6.issue;
|
|
700
|
+
const closed = issue.state === "closed";
|
|
701
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
702
|
+
className: "sc-row"
|
|
703
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
704
|
+
className: "sc-main"
|
|
705
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
706
|
+
className: "sc-name"
|
|
707
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
708
|
+
className: "sc-lead",
|
|
709
|
+
style: {
|
|
710
|
+
color: closed ? "var(--color-primary)" : undefined
|
|
711
|
+
}
|
|
712
|
+
}, closed ? /*#__PURE__*/React.createElement(IssueClosedIcon, null) : /*#__PURE__*/React.createElement(IssueOpenIcon, null)), /*#__PURE__*/React.createElement(Body1, {
|
|
713
|
+
weight: "medium",
|
|
714
|
+
className: "sc-title"
|
|
715
|
+
}, /*#__PURE__*/React.createElement(TitleLink, {
|
|
716
|
+
href: issueUrl(issue),
|
|
717
|
+
target: "_blank",
|
|
718
|
+
rel: "noopener noreferrer"
|
|
719
|
+
}, issue.title)), closed && /*#__PURE__*/React.createElement("span", {
|
|
720
|
+
className: "sc-chip done"
|
|
721
|
+
}, /*#__PURE__*/React.createElement(IssueClosedIcon, {
|
|
722
|
+
width: 12,
|
|
723
|
+
height: 12
|
|
724
|
+
}), "Closed")), /*#__PURE__*/React.createElement("div", {
|
|
725
|
+
className: "sc-sigs"
|
|
726
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
727
|
+
title: "Repository: " + issue.repoFull
|
|
728
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
729
|
+
className: "sc-sig"
|
|
730
|
+
}, /*#__PURE__*/React.createElement(GitRepositoryIcon, {
|
|
731
|
+
width: 14,
|
|
732
|
+
height: 14
|
|
733
|
+
}), issue.repo)), /*#__PURE__*/React.createElement("span", {
|
|
734
|
+
className: "sc-muted"
|
|
735
|
+
}, issue.updatedLabel))));
|
|
736
|
+
};
|
|
737
|
+
const CodeStatusChip = _ref7 => {
|
|
738
|
+
let entry = _ref7.entry;
|
|
739
|
+
if (entry.status === "merged") {
|
|
740
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
741
|
+
className: "sc-chip done"
|
|
742
|
+
}, /*#__PURE__*/React.createElement(GitPullRequestIcon, {
|
|
743
|
+
width: 12,
|
|
744
|
+
height: 12,
|
|
745
|
+
fill: "var(--color-primary)"
|
|
746
|
+
}), "Merged");
|
|
747
|
+
}
|
|
748
|
+
if (entry.status === "deleted") {
|
|
749
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
750
|
+
className: "sc-chip gone"
|
|
751
|
+
}, /*#__PURE__*/React.createElement(TrashIcon, {
|
|
752
|
+
width: 12,
|
|
753
|
+
height: 12,
|
|
754
|
+
fill: "var(--color-theme-900)"
|
|
755
|
+
}), "Deleted");
|
|
756
|
+
}
|
|
757
|
+
if (entry.status === "closed") {
|
|
758
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
759
|
+
className: "sc-chip gone"
|
|
760
|
+
}, "Closed");
|
|
761
|
+
}
|
|
762
|
+
// Open branches / PRs show no status label.
|
|
763
|
+
return null;
|
|
764
|
+
};
|
|
765
|
+
const CodeRow = _ref8 => {
|
|
766
|
+
let entry = _ref8.entry,
|
|
767
|
+
onOpenHistory = _ref8.onOpenHistory;
|
|
768
|
+
const deleted = entry.status === "deleted";
|
|
769
|
+
// A closed-without-merge PR is still a live link, but its name is struck
|
|
770
|
+
// through to signal the dead-end; the strike lifts on hover so it reads as a
|
|
771
|
+
// normal PR link.
|
|
772
|
+
const closedPr = entry.kind === "pr" && entry.status === "closed";
|
|
773
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
774
|
+
className: "sc-row"
|
|
775
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
776
|
+
className: "sc-main"
|
|
777
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
778
|
+
className: "sc-name"
|
|
779
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
780
|
+
className: "sc-lead"
|
|
781
|
+
}, entry.kind === "pr" ? /*#__PURE__*/React.createElement(GitPullRequestIcon, {
|
|
782
|
+
width: 16,
|
|
783
|
+
height: 16
|
|
784
|
+
}) : /*#__PURE__*/React.createElement(GitBranchIcon, {
|
|
785
|
+
width: 16,
|
|
786
|
+
height: 16
|
|
787
|
+
})), deleted ? /*#__PURE__*/React.createElement(Body1, {
|
|
788
|
+
weight: "medium",
|
|
789
|
+
className: "sc-title strike"
|
|
790
|
+
}, entry.title) : /*#__PURE__*/React.createElement(Body1, {
|
|
791
|
+
weight: "medium",
|
|
792
|
+
className: closedPr ? "sc-title strike-link" : "sc-title"
|
|
793
|
+
}, /*#__PURE__*/React.createElement(TitleLink, {
|
|
794
|
+
href: codeUrl(entry),
|
|
795
|
+
target: "_blank",
|
|
796
|
+
rel: "noopener noreferrer"
|
|
797
|
+
}, entry.title)), /*#__PURE__*/React.createElement(CodeStatusChip, {
|
|
798
|
+
entry: entry
|
|
799
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
800
|
+
className: "sc-sigs"
|
|
801
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
802
|
+
title: "Repository: " + entry.repoFull
|
|
803
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
804
|
+
className: "sc-sig"
|
|
805
|
+
}, /*#__PURE__*/React.createElement(GitRepositoryIcon, {
|
|
806
|
+
width: 14,
|
|
807
|
+
height: 14
|
|
808
|
+
}), entry.repo)), /*#__PURE__*/React.createElement("span", {
|
|
809
|
+
className: "sc-avatars"
|
|
810
|
+
}, entry.contributors.map(c => /*#__PURE__*/React.createElement(RoundAvatar, {
|
|
811
|
+
key: c.initials,
|
|
812
|
+
$bg: c.bg,
|
|
813
|
+
$size: 20,
|
|
814
|
+
$overlap: true
|
|
815
|
+
}, c.initials))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
816
|
+
title: entry.commits.tip
|
|
817
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
818
|
+
className: "sc-sig"
|
|
819
|
+
}, /*#__PURE__*/React.createElement(GitCommitIcon, {
|
|
820
|
+
width: 14,
|
|
821
|
+
height: 14
|
|
822
|
+
}), entry.commits.value)), /*#__PURE__*/React.createElement(Tooltip, {
|
|
823
|
+
title: "Head commit: " + entry.headSha
|
|
824
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
825
|
+
className: "sc-sig sc-sha"
|
|
826
|
+
}, entry.headSha.slice(0, 8))), entry.diff && /*#__PURE__*/React.createElement(Tooltip, {
|
|
827
|
+
title: entry.diff.tip
|
|
828
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
829
|
+
className: "sc-sig sc-diff"
|
|
830
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
831
|
+
className: "add"
|
|
832
|
+
}, "+", entry.diff.add), " ", /*#__PURE__*/React.createElement("span", {
|
|
833
|
+
className: "del"
|
|
834
|
+
}, "\u2212", entry.diff.del))), entry.comments && /*#__PURE__*/React.createElement(Tooltip, {
|
|
835
|
+
title: entry.comments.tip
|
|
836
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
837
|
+
className: "sc-sig"
|
|
838
|
+
}, /*#__PURE__*/React.createElement(MessageIcon, {
|
|
839
|
+
width: 14,
|
|
840
|
+
height: 14
|
|
841
|
+
}), entry.comments.value)), /*#__PURE__*/React.createElement("span", {
|
|
842
|
+
className: "sc-muted"
|
|
843
|
+
}, entry.updatedLabel))), /*#__PURE__*/React.createElement(Spine, {
|
|
844
|
+
items: entry.stages,
|
|
845
|
+
onClick: onOpenHistory
|
|
846
|
+
}));
|
|
847
|
+
};
|
|
848
|
+
const CompletedHeader = _ref9 => {
|
|
849
|
+
let expanded = _ref9.expanded,
|
|
850
|
+
count = _ref9.count,
|
|
851
|
+
onToggle = _ref9.onToggle;
|
|
852
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
853
|
+
className: "sc-completed-row"
|
|
854
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
855
|
+
type: "button",
|
|
856
|
+
variant: "text colored",
|
|
857
|
+
onClick: onToggle,
|
|
858
|
+
"aria-expanded": expanded,
|
|
859
|
+
style: {
|
|
860
|
+
marginLeft: -8
|
|
861
|
+
}
|
|
862
|
+
}, expanded ? "Hide completed elements" : "Show " + count + " more completed elements"));
|
|
863
|
+
};
|
|
864
|
+
const SourceCodeSection = _ref0 => {
|
|
865
|
+
let _ref0$variant = _ref0.variant,
|
|
866
|
+
variant = _ref0$variant === void 0 ? "mix" : _ref0$variant;
|
|
867
|
+
const _useState = useState(null),
|
|
868
|
+
openEntry = _useState[0],
|
|
869
|
+
setOpenEntry = _useState[1];
|
|
870
|
+
const _useState2 = useState(false),
|
|
871
|
+
completedExpanded = _useState2[0],
|
|
872
|
+
setCompletedExpanded = _useState2[1];
|
|
873
|
+
const _useState3 = useState(false),
|
|
874
|
+
linkOpen = _useState3[0],
|
|
875
|
+
setLinkOpen = _useState3[1];
|
|
876
|
+
const openIssues = ISSUES.filter(i => !issueCompleted(i)).sort(byRecency);
|
|
877
|
+
const openCode = CODE_ENTRIES.filter(e => !codeCompleted(e)).sort(byRecency);
|
|
878
|
+
const completed = [...ISSUES.filter(issueCompleted).map(issue => ({
|
|
879
|
+
key: issue.ref,
|
|
880
|
+
updatedMinsAgo: issue.updatedMinsAgo,
|
|
881
|
+
node: /*#__PURE__*/React.createElement(IssueRow, {
|
|
882
|
+
issue: issue
|
|
883
|
+
})
|
|
884
|
+
})), ...CODE_ENTRIES.filter(codeCompleted).map(entry => ({
|
|
885
|
+
key: entry.repo + "-" + entry.title,
|
|
886
|
+
updatedMinsAgo: entry.updatedMinsAgo,
|
|
887
|
+
node: /*#__PURE__*/React.createElement(CodeRow, {
|
|
888
|
+
entry: entry,
|
|
889
|
+
onOpenHistory: () => setOpenEntry(entry)
|
|
890
|
+
})
|
|
891
|
+
}))].sort(byRecency);
|
|
892
|
+
const showOpen = variant === "mix" || variant === "open";
|
|
893
|
+
const showCompleted = variant === "mix" || variant === "completed";
|
|
894
|
+
// In the "completed" variant there is no collapsible header and everything is
|
|
895
|
+
// shown; in "mix" the section is collapsed by default.
|
|
896
|
+
const completedVisible = variant === "completed" ? true : completedExpanded;
|
|
897
|
+
return /*#__PURE__*/React.createElement(StyledSourceCode, null, /*#__PURE__*/React.createElement("div", {
|
|
898
|
+
className: "sc-header"
|
|
899
|
+
}, /*#__PURE__*/React.createElement(Body1, {
|
|
900
|
+
weight: "bold"
|
|
901
|
+
}, "Source Code"), /*#__PURE__*/React.createElement(LinkingCommandsButton, null)), showOpen && openIssues.map(issue => /*#__PURE__*/React.createElement("div", {
|
|
902
|
+
className: "sc-item",
|
|
903
|
+
key: issue.ref
|
|
904
|
+
}, /*#__PURE__*/React.createElement(IssueRow, {
|
|
905
|
+
issue: issue
|
|
906
|
+
}))), showOpen && openCode.map(entry => /*#__PURE__*/React.createElement("div", {
|
|
907
|
+
className: "sc-item",
|
|
908
|
+
key: entry.repo + "-" + entry.title
|
|
909
|
+
}, /*#__PURE__*/React.createElement(CodeRow, {
|
|
910
|
+
entry: entry,
|
|
911
|
+
onOpenHistory: () => setOpenEntry(entry)
|
|
912
|
+
}))), showCompleted && completedVisible && completed.map(c => /*#__PURE__*/React.createElement("div", {
|
|
913
|
+
className: "sc-item",
|
|
914
|
+
key: c.key
|
|
915
|
+
}, c.node)), showCompleted && completed.length > 0 && variant === "mix" && /*#__PURE__*/React.createElement(CompletedHeader, {
|
|
916
|
+
expanded: completedExpanded,
|
|
917
|
+
count: completed.length,
|
|
918
|
+
onToggle: () => setCompletedExpanded(v => !v)
|
|
919
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
920
|
+
className: "sc-add"
|
|
921
|
+
}, /*#__PURE__*/React.createElement(AddToListButton, {
|
|
922
|
+
text: "Link Branch or Pull Request",
|
|
923
|
+
style: {
|
|
924
|
+
marginLeft: -4
|
|
925
|
+
},
|
|
926
|
+
onClick: () => setLinkOpen(true)
|
|
927
|
+
})), /*#__PURE__*/React.createElement(HistoryDialog, {
|
|
928
|
+
entry: openEntry,
|
|
929
|
+
onClose: () => setOpenEntry(null)
|
|
930
|
+
}), /*#__PURE__*/React.createElement(LinkBranchOrPullRequestDialog, {
|
|
931
|
+
open: linkOpen,
|
|
932
|
+
onClose: () => setLinkOpen(false)
|
|
933
|
+
}));
|
|
934
|
+
};
|
|
935
|
+
export { Spine, HistoryDialog, IssueRow, CodeRow, CompletedHeader, SourceCodeSection };
|
|
936
|
+
//# sourceMappingURL=SourceCodeSection.js.map
|