@activecollab/components 2.0.368 → 2.0.369
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/SourceCodeSection.js +183 -117
- package/dist/cjs/presentation/shared/SourceCodeSection.js.map +1 -1
- package/dist/esm/presentation/shared/SourceCodeSection.d.ts.map +1 -1
- package/dist/esm/presentation/shared/SourceCodeSection.js +183 -116
- package/dist/esm/presentation/shared/SourceCodeSection.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["size", "bg", "initials", "alt"];
|
|
2
4
|
import React, { useState } from "react";
|
|
3
5
|
import styled from "styled-components";
|
|
4
6
|
import { LinkBranchOrPullRequestDialog } from "./LinkBranchOrPullRequestDialog";
|
|
5
7
|
import { LinkingCommandsButton } from "./LinkingCommandsButton";
|
|
6
8
|
import { RoundAvatar } from "./RoundAvatar";
|
|
7
9
|
import { AVATAR_COLORS } from "./tokens";
|
|
10
|
+
import { AvatarGroup } from "../../components/AvatarGroup";
|
|
8
11
|
import { Button } from "../../components/Button";
|
|
9
12
|
import { AddToListButton } from "../../components/Button/AddToListButton";
|
|
13
|
+
import { Chip } from "../../components/Chip";
|
|
10
14
|
import { Dialog } from "../../components/Dialog";
|
|
11
15
|
import { IconButton } from "../../components/IconButton";
|
|
12
|
-
import { ArrowRightIcon, CancelCrossIcon, CheckIcon, CloseIcon, CloudDeployFailedIcon, CloudDeployIcon, EyeIcon, GearFailedIcon, GearIcon, GitBranchIcon, GitCommitIcon, GitMergeIcon, GitPullRequestClosedIcon, GitPullRequestDraftIcon, GitPullRequestIcon, GitRepositoryIcon, InfoSmallIcon, MessageIcon, TrashIcon } from "../../components/Icons";
|
|
16
|
+
import { ArrowRightIcon, CancelCrossIcon, CheckboxBlankTogglerIcon, CheckIcon, CircleDotIcon, CloseIcon, CloudDeployFailedIcon, CloudDeployIcon, EyeIcon, GearFailedIcon, GearIcon, GitBranchIcon, GitCommitIcon, GitMergeIcon, GitPullRequestClosedIcon, GitPullRequestDraftIcon, GitPullRequestIcon, GitRepositoryIcon, InfoSmallIcon, MessageIcon, MessageSmallIcon, TrashIcon } from "../../components/Icons";
|
|
13
17
|
import { StepSequence } from "../../components/StepSequence";
|
|
14
18
|
import { Tooltip } from "../../components/Tooltip";
|
|
15
19
|
import { Body1, Caption1, Header3 } from "../../components/Typography";
|
|
@@ -39,56 +43,24 @@ const iconColorProps = icon => STROKE_ICONS.has(icon) ? {
|
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
/* ================================================================== */
|
|
42
|
-
/* Issue
|
|
43
|
-
/*
|
|
46
|
+
/* Issue state glyphs (open / closed) — mirror the app's IssueStateIcon */
|
|
47
|
+
/* (`CircleDotIcon` when open, filled `CheckboxBlankTogglerIcon` when */
|
|
48
|
+
/* closed). Kept as a helper so the row lead and the status chip share */
|
|
49
|
+
/* the same glyph. */
|
|
44
50
|
/* ================================================================== */
|
|
45
51
|
|
|
46
|
-
const
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
_ref$
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
cy: "8",
|
|
59
|
-
r: "6.4",
|
|
60
|
-
stroke: "currentColor",
|
|
61
|
-
strokeWidth: "1.6"
|
|
62
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
63
|
-
cx: "8",
|
|
64
|
-
cy: "8",
|
|
65
|
-
r: "2.2",
|
|
66
|
-
fill: "currentColor"
|
|
67
|
-
}));
|
|
68
|
-
};
|
|
69
|
-
const IssueClosedIcon = _ref2 => {
|
|
70
|
-
let _ref2$width = _ref2.width,
|
|
71
|
-
width = _ref2$width === void 0 ? 16 : _ref2$width,
|
|
72
|
-
_ref2$height = _ref2.height,
|
|
73
|
-
height = _ref2$height === void 0 ? 16 : _ref2$height;
|
|
74
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
75
|
-
width: width,
|
|
76
|
-
height: height,
|
|
77
|
-
viewBox: "0 0 16 16",
|
|
78
|
-
fill: "none"
|
|
79
|
-
}, /*#__PURE__*/React.createElement("circle", {
|
|
80
|
-
cx: "8",
|
|
81
|
-
cy: "8",
|
|
82
|
-
r: "6.4",
|
|
83
|
-
stroke: "currentColor",
|
|
84
|
-
strokeWidth: "1.6"
|
|
85
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
86
|
-
d: "M5.2 8.1l1.9 1.9 3.7-3.9",
|
|
87
|
-
stroke: "currentColor",
|
|
88
|
-
strokeWidth: "1.6",
|
|
89
|
-
strokeLinecap: "round",
|
|
90
|
-
strokeLinejoin: "round"
|
|
91
|
-
}));
|
|
52
|
+
const IssueStateIcon = _ref => {
|
|
53
|
+
let closed = _ref.closed,
|
|
54
|
+
_ref$size = _ref.size,
|
|
55
|
+
size = _ref$size === void 0 ? 16 : _ref$size;
|
|
56
|
+
return closed ? /*#__PURE__*/React.createElement(CheckboxBlankTogglerIcon, {
|
|
57
|
+
width: size,
|
|
58
|
+
height: size,
|
|
59
|
+
fill: "var(--color-primary)"
|
|
60
|
+
}) : /*#__PURE__*/React.createElement(CircleDotIcon, {
|
|
61
|
+
width: size,
|
|
62
|
+
height: size
|
|
63
|
+
});
|
|
92
64
|
};
|
|
93
65
|
|
|
94
66
|
/* ================================================================== */
|
|
@@ -786,9 +758,9 @@ const CODE_ENTRIES = [{
|
|
|
786
758
|
/* Spine + history dialog (for branches / pull requests) */
|
|
787
759
|
/* ================================================================== */
|
|
788
760
|
|
|
789
|
-
const StageTip =
|
|
790
|
-
let name =
|
|
791
|
-
details =
|
|
761
|
+
const StageTip = _ref2 => {
|
|
762
|
+
let name = _ref2.name,
|
|
763
|
+
details = _ref2.details;
|
|
792
764
|
return /*#__PURE__*/React.createElement("span", {
|
|
793
765
|
style: {
|
|
794
766
|
display: "block",
|
|
@@ -811,9 +783,9 @@ const StyledSpineSequence = styled(StepSequence).withConfig({
|
|
|
811
783
|
displayName: "SourceCodeSection__StyledSpineSequence",
|
|
812
784
|
componentId: "sc-rvqbh5-0"
|
|
813
785
|
})(["align-self:center;flex-shrink:0;"]);
|
|
814
|
-
const Spine =
|
|
815
|
-
let items =
|
|
816
|
-
onClick =
|
|
786
|
+
const Spine = _ref3 => {
|
|
787
|
+
let items = _ref3.items,
|
|
788
|
+
onClick = _ref3.onClick;
|
|
817
789
|
return /*#__PURE__*/React.createElement(StyledSpineSequence, {
|
|
818
790
|
ariaLabel: "Open source code history",
|
|
819
791
|
onClick: onClick,
|
|
@@ -831,9 +803,9 @@ const StyledHistory = styled.div.withConfig({
|
|
|
831
803
|
displayName: "SourceCodeSection__StyledHistory",
|
|
832
804
|
componentId: "sc-rvqbh5-1"
|
|
833
805
|
})(["font-family:", ";max-height:60vh;overflow-y:auto;padding-right:4px;.hist-header{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--border-primary);}.hist-name{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}.hist-branches{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;font-size:13px;color:var(--color-theme-600);}.hist-branch{display:inline-flex;align-items:center;gap:4px;}.hist-repo{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;color:var(--color-theme-600);}.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-chip.fail{color:var(--red-alert);background:color-mix(in srgb,var(--red-alert) 15%,transparent);}.hist-event{display:flex;align-items:center;gap:12px;padding-bottom:20px;}.hist-event:last-child{padding-bottom:0;}.hist-icon{flex-shrink:0;width:22px;height:22px;display:flex;align-items:center;justify-content:center;}.hist-body{flex:1 1 auto;min-width:0;}.hist-title{display:flex;align-items:center;gap:6px;min-width:0;}.hist-title > *:first-child{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.hist-status{flex-shrink:0;display:inline-flex;}.hist-line{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;line-height:1.5;color:var(--color-theme-600);}.hist-meta{flex-shrink:0;align-self:flex-start;text-align:right;white-space:nowrap;}.hist-note{display:flex;align-items:center;gap:6px;margin-top:16px;color:var(--color-theme-500);}.hist-note svg{flex-shrink:0;}"], SANS);
|
|
834
|
-
const HistoryDialog =
|
|
835
|
-
let entry =
|
|
836
|
-
onClose =
|
|
806
|
+
const HistoryDialog = _ref4 => {
|
|
807
|
+
let entry = _ref4.entry,
|
|
808
|
+
onClose = _ref4.onClose;
|
|
837
809
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
838
810
|
open: !!entry,
|
|
839
811
|
onClose: onClose,
|
|
@@ -934,7 +906,7 @@ const HistoryDialog = _ref5 => {
|
|
|
934
906
|
const StyledSourceCode = styled.div.withConfig({
|
|
935
907
|
displayName: "SourceCodeSection__StyledSourceCode",
|
|
936
908
|
componentId: "sc-rvqbh5-2"
|
|
937
|
-
})(["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:
|
|
909
|
+
})(["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:12px;color:var(--color-theme-600);}.sc-sig{display:inline-flex;align-items:center;gap:4px;}.sc-sha{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;}.sc-muted{color:var(--color-theme-600);}.sc-refs{display:inline-flex;align-items:center;gap:6px;}.sc-refs .ref-link{color:var(--color-primary);font-weight:500;}"], SANS);
|
|
938
910
|
|
|
939
911
|
/* Element name — a link that opens the object in a new tab. Keeps the row's
|
|
940
912
|
typography (inherits color + weight), turns primary on hover, link cursor. */
|
|
@@ -942,8 +914,99 @@ const TitleLink = styled.a.withConfig({
|
|
|
942
914
|
displayName: "SourceCodeSection__TitleLink",
|
|
943
915
|
componentId: "sc-rvqbh5-3"
|
|
944
916
|
})(["color:inherit;text-decoration:none;cursor:pointer;transition:color 200ms ease;&:hover{color:var(--color-primary);}"]);
|
|
945
|
-
|
|
946
|
-
|
|
917
|
+
|
|
918
|
+
/* Status label chip — the DS `Chip` styled to match the app's
|
|
919
|
+
`SourceCodeStatusChip`: a "done" tone (primary text on a translucent-primary
|
|
920
|
+
fill) and a "gone" tone (muted text on a bordered theme-200 fill). */
|
|
921
|
+
const CHIP_BASE_STYLE = {
|
|
922
|
+
height: "1.25rem",
|
|
923
|
+
paddingLeft: "0.5rem",
|
|
924
|
+
paddingRight: "0.5rem",
|
|
925
|
+
borderRadius: "0.375rem",
|
|
926
|
+
gap: "3px",
|
|
927
|
+
flexShrink: 0
|
|
928
|
+
};
|
|
929
|
+
const CHIP_DONE_STYLE = _extends({}, CHIP_BASE_STYLE, {
|
|
930
|
+
backgroundColor: "color-mix(in srgb, var(--color-primary) 15%, transparent)"
|
|
931
|
+
});
|
|
932
|
+
const CHIP_GONE_STYLE = _extends({}, CHIP_BASE_STYLE, {
|
|
933
|
+
backgroundColor: "var(--color-theme-200)",
|
|
934
|
+
border: "1px solid var(--border-primary)"
|
|
935
|
+
});
|
|
936
|
+
const StatusChip = _ref5 => {
|
|
937
|
+
let label = _ref5.label,
|
|
938
|
+
tone = _ref5.tone,
|
|
939
|
+
glyph = _ref5.glyph;
|
|
940
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
941
|
+
label: label,
|
|
942
|
+
startAdornment: glyph,
|
|
943
|
+
color: tone === "done" ? "var(--color-primary)" : undefined,
|
|
944
|
+
style: tone === "done" ? CHIP_DONE_STYLE : CHIP_GONE_STYLE,
|
|
945
|
+
typographyProps: {
|
|
946
|
+
variant: "Caption 1",
|
|
947
|
+
weight: "bold",
|
|
948
|
+
align: "center"
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
/* Contributor avatars — the app renders real user images through the DS
|
|
954
|
+
`AvatarGroup` (`ContributorAvatars.jsx`). The mock feeds that same component
|
|
955
|
+
initials avatars via `MockAvatar`, which honours AvatarGroup's cloneElement
|
|
956
|
+
contract (it injects `size`, `alt` and `style` — the overlap margin + paper
|
|
957
|
+
ring), so the grouping, overlap and "+N" overflow behave identically. */
|
|
958
|
+
const CONTRIBUTOR_NAMES = {
|
|
959
|
+
DA: "Dragana A.",
|
|
960
|
+
IS: "Ilija Studen",
|
|
961
|
+
MK: "Marko K."
|
|
962
|
+
};
|
|
963
|
+
const MockAvatar = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
964
|
+
let _ref6$size = _ref6.size,
|
|
965
|
+
size = _ref6$size === void 0 ? 20 : _ref6$size,
|
|
966
|
+
bg = _ref6.bg,
|
|
967
|
+
initials = _ref6.initials,
|
|
968
|
+
alt = _ref6.alt,
|
|
969
|
+
rest = _objectWithoutPropertiesLoose(_ref6, _excluded);
|
|
970
|
+
return (
|
|
971
|
+
/*#__PURE__*/
|
|
972
|
+
// `...rest` carries the props AvatarGroup and its Tooltip inject via
|
|
973
|
+
// cloneElement — `style` (overlap margin + paper ring) and the hover handlers
|
|
974
|
+
// (`onMouseOver` / `onMouseLeave`) — plus the forwarded `ref`, all of which
|
|
975
|
+
// must reach the DOM node for the tooltip to open.
|
|
976
|
+
React.createElement(RoundAvatar, _extends({
|
|
977
|
+
ref: ref,
|
|
978
|
+
$bg: bg,
|
|
979
|
+
$size: size,
|
|
980
|
+
$bordered: false
|
|
981
|
+
}, rest), initials)
|
|
982
|
+
);
|
|
983
|
+
});
|
|
984
|
+
MockAvatar.displayName = "MockAvatar";
|
|
985
|
+
|
|
986
|
+
/* The app removes AvatarGroup's default padding with `tw-p-0`; the mock does
|
|
987
|
+
the same through a styled wrapper (`tw-` classes don't run in Storybook). */
|
|
988
|
+
const StyledAvatarGroup = styled(AvatarGroup).withConfig({
|
|
989
|
+
displayName: "SourceCodeSection__StyledAvatarGroup",
|
|
990
|
+
componentId: "sc-rvqbh5-4"
|
|
991
|
+
})(["&&{padding:0;}"]);
|
|
992
|
+
const ContributorAvatars = _ref7 => {
|
|
993
|
+
let contributors = _ref7.contributors;
|
|
994
|
+
return /*#__PURE__*/React.createElement(StyledAvatarGroup, {
|
|
995
|
+
limit: 4,
|
|
996
|
+
size: 20,
|
|
997
|
+
hasTooltip: true
|
|
998
|
+
}, contributors.map(c => {
|
|
999
|
+
var _CONTRIBUTOR_NAMES$c$;
|
|
1000
|
+
return /*#__PURE__*/React.createElement(MockAvatar, {
|
|
1001
|
+
key: c.initials,
|
|
1002
|
+
bg: c.bg,
|
|
1003
|
+
initials: c.initials,
|
|
1004
|
+
alt: (_CONTRIBUTOR_NAMES$c$ = CONTRIBUTOR_NAMES[c.initials]) != null ? _CONTRIBUTOR_NAMES$c$ : c.initials
|
|
1005
|
+
});
|
|
1006
|
+
}));
|
|
1007
|
+
};
|
|
1008
|
+
const IssueRow = _ref8 => {
|
|
1009
|
+
let issue = _ref8.issue;
|
|
947
1010
|
const closed = issue.state === "closed";
|
|
948
1011
|
return /*#__PURE__*/React.createElement("div", {
|
|
949
1012
|
className: "sc-row"
|
|
@@ -956,19 +1019,23 @@ const IssueRow = _ref6 => {
|
|
|
956
1019
|
style: {
|
|
957
1020
|
color: closed ? "var(--color-primary)" : undefined
|
|
958
1021
|
}
|
|
959
|
-
},
|
|
1022
|
+
}, /*#__PURE__*/React.createElement(IssueStateIcon, {
|
|
1023
|
+
closed: closed
|
|
1024
|
+
})), /*#__PURE__*/React.createElement(Body1, {
|
|
960
1025
|
weight: "medium",
|
|
961
1026
|
className: "sc-title"
|
|
962
1027
|
}, /*#__PURE__*/React.createElement(TitleLink, {
|
|
963
1028
|
href: issueUrl(issue),
|
|
964
1029
|
target: "_blank",
|
|
965
1030
|
rel: "noopener noreferrer"
|
|
966
|
-
}, issue.title)), closed && /*#__PURE__*/React.createElement(
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1031
|
+
}, issue.title)), closed && /*#__PURE__*/React.createElement(StatusChip, {
|
|
1032
|
+
label: "Closed",
|
|
1033
|
+
tone: "done",
|
|
1034
|
+
glyph: /*#__PURE__*/React.createElement(IssueStateIcon, {
|
|
1035
|
+
closed: true,
|
|
1036
|
+
size: 12
|
|
1037
|
+
})
|
|
1038
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
972
1039
|
className: "sc-sigs"
|
|
973
1040
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
974
1041
|
title: "Repository: " + issue.repoFull
|
|
@@ -981,37 +1048,42 @@ const IssueRow = _ref6 => {
|
|
|
981
1048
|
className: "sc-muted"
|
|
982
1049
|
}, issue.updatedLabel))));
|
|
983
1050
|
};
|
|
984
|
-
const CodeStatusChip =
|
|
985
|
-
let entry =
|
|
1051
|
+
const CodeStatusChip = _ref9 => {
|
|
1052
|
+
let entry = _ref9.entry;
|
|
986
1053
|
if (entry.status === "merged") {
|
|
987
|
-
return /*#__PURE__*/React.createElement(
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1054
|
+
return /*#__PURE__*/React.createElement(StatusChip, {
|
|
1055
|
+
label: "Merged",
|
|
1056
|
+
tone: "done",
|
|
1057
|
+
glyph: /*#__PURE__*/React.createElement(GitPullRequestIcon, {
|
|
1058
|
+
width: 12,
|
|
1059
|
+
height: 12,
|
|
1060
|
+
fill: "var(--color-primary)"
|
|
1061
|
+
})
|
|
1062
|
+
});
|
|
994
1063
|
}
|
|
995
1064
|
if (entry.status === "deleted") {
|
|
996
|
-
return /*#__PURE__*/React.createElement(
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1065
|
+
return /*#__PURE__*/React.createElement(StatusChip, {
|
|
1066
|
+
label: "Deleted",
|
|
1067
|
+
tone: "gone",
|
|
1068
|
+
glyph: /*#__PURE__*/React.createElement(TrashIcon, {
|
|
1069
|
+
width: 12,
|
|
1070
|
+
height: 12,
|
|
1071
|
+
fill: "var(--color-theme-900)"
|
|
1072
|
+
})
|
|
1073
|
+
});
|
|
1003
1074
|
}
|
|
1004
1075
|
if (entry.status === "closed") {
|
|
1005
|
-
return /*#__PURE__*/React.createElement(
|
|
1006
|
-
|
|
1007
|
-
|
|
1076
|
+
return /*#__PURE__*/React.createElement(StatusChip, {
|
|
1077
|
+
label: "Closed",
|
|
1078
|
+
tone: "gone"
|
|
1079
|
+
});
|
|
1008
1080
|
}
|
|
1009
1081
|
// Open branches / PRs show no status label.
|
|
1010
1082
|
return null;
|
|
1011
1083
|
};
|
|
1012
|
-
const CodeRow =
|
|
1013
|
-
let entry =
|
|
1014
|
-
onOpenHistory =
|
|
1084
|
+
const CodeRow = _ref0 => {
|
|
1085
|
+
let entry = _ref0.entry,
|
|
1086
|
+
onOpenHistory = _ref0.onOpenHistory;
|
|
1015
1087
|
const deleted = entry.status === "deleted";
|
|
1016
1088
|
// A closed-without-merge PR is still a live link, but its name is struck
|
|
1017
1089
|
// through to signal the dead-end; the strike lifts on hover so it reads as a
|
|
@@ -1052,50 +1124,45 @@ const CodeRow = _ref8 => {
|
|
|
1052
1124
|
}, /*#__PURE__*/React.createElement(GitRepositoryIcon, {
|
|
1053
1125
|
width: 14,
|
|
1054
1126
|
height: 14
|
|
1055
|
-
}), entry.repo)), /*#__PURE__*/React.createElement(
|
|
1056
|
-
|
|
1057
|
-
},
|
|
1058
|
-
key: c.initials,
|
|
1059
|
-
$bg: c.bg,
|
|
1060
|
-
$size: 20,
|
|
1061
|
-
$overlap: true
|
|
1062
|
-
}, c.initials))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1127
|
+
}), entry.repo)), /*#__PURE__*/React.createElement(ContributorAvatars, {
|
|
1128
|
+
contributors: entry.contributors
|
|
1129
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1063
1130
|
title: entry.commits.tip
|
|
1064
|
-
}, /*#__PURE__*/React.createElement(
|
|
1131
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
1132
|
+
color: "tertiary",
|
|
1065
1133
|
className: "sc-sig"
|
|
1066
1134
|
}, /*#__PURE__*/React.createElement(GitCommitIcon, {
|
|
1067
1135
|
width: 14,
|
|
1068
1136
|
height: 14
|
|
1069
1137
|
}), entry.commits.value)), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1070
1138
|
title: "Head commit: " + entry.headSha
|
|
1071
|
-
}, /*#__PURE__*/React.createElement(
|
|
1139
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
1140
|
+
color: "tertiary",
|
|
1072
1141
|
className: "sc-sig sc-sha"
|
|
1073
1142
|
}, entry.headSha.slice(0, 8))), entry.diff && /*#__PURE__*/React.createElement(Tooltip, {
|
|
1074
1143
|
title: entry.diff.tip
|
|
1075
1144
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1076
1145
|
className: "sc-sig sc-diff"
|
|
1077
|
-
}, /*#__PURE__*/React.createElement(
|
|
1078
|
-
|
|
1079
|
-
}, "+", entry.diff.add),
|
|
1080
|
-
|
|
1146
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
1147
|
+
color: "success"
|
|
1148
|
+
}, "+", entry.diff.add), /*#__PURE__*/React.createElement(Caption1, {
|
|
1149
|
+
color: "alert"
|
|
1081
1150
|
}, "\u2212", entry.diff.del))), entry.comments && /*#__PURE__*/React.createElement(Tooltip, {
|
|
1082
1151
|
title: entry.comments.tip
|
|
1083
|
-
}, /*#__PURE__*/React.createElement(
|
|
1152
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
1153
|
+
color: "tertiary",
|
|
1084
1154
|
className: "sc-sig"
|
|
1085
|
-
}, /*#__PURE__*/React.createElement(
|
|
1086
|
-
width: 14,
|
|
1087
|
-
height: 14
|
|
1088
|
-
}), entry.comments.value)), /*#__PURE__*/React.createElement("span", {
|
|
1155
|
+
}, /*#__PURE__*/React.createElement(MessageSmallIcon, null), entry.comments.value)), /*#__PURE__*/React.createElement("span", {
|
|
1089
1156
|
className: "sc-muted"
|
|
1090
1157
|
}, entry.updatedLabel))), /*#__PURE__*/React.createElement(Spine, {
|
|
1091
1158
|
items: entry.stages,
|
|
1092
1159
|
onClick: onOpenHistory
|
|
1093
1160
|
}));
|
|
1094
1161
|
};
|
|
1095
|
-
const CompletedHeader =
|
|
1096
|
-
let expanded =
|
|
1097
|
-
count =
|
|
1098
|
-
onToggle =
|
|
1162
|
+
const CompletedHeader = _ref1 => {
|
|
1163
|
+
let expanded = _ref1.expanded,
|
|
1164
|
+
count = _ref1.count,
|
|
1165
|
+
onToggle = _ref1.onToggle;
|
|
1099
1166
|
return /*#__PURE__*/React.createElement("div", {
|
|
1100
1167
|
className: "sc-completed-row"
|
|
1101
1168
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1108,9 +1175,9 @@ const CompletedHeader = _ref9 => {
|
|
|
1108
1175
|
}
|
|
1109
1176
|
}, expanded ? "Hide completed elements" : "Show " + count + " more completed elements"));
|
|
1110
1177
|
};
|
|
1111
|
-
const SourceCodeSection =
|
|
1112
|
-
let
|
|
1113
|
-
variant =
|
|
1178
|
+
const SourceCodeSection = _ref10 => {
|
|
1179
|
+
let _ref10$variant = _ref10.variant,
|
|
1180
|
+
variant = _ref10$variant === void 0 ? "mix" : _ref10$variant;
|
|
1114
1181
|
const _useState = useState(null),
|
|
1115
1182
|
openEntry = _useState[0],
|
|
1116
1183
|
setOpenEntry = _useState[1];
|