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