@gitkraken/gitkraken-components 6.0.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/ThirdPartyNotices.txt +227 -0
- package/dist/components/graph/GraphColumn.d.ts +38 -0
- package/dist/components/graph/GraphContainer.d.ts +294 -329
- package/dist/components/graph/GraphHeaderRow.d.ts +36 -0
- package/dist/components/graph/GraphScrollMarker.d.ts +21 -0
- package/dist/components/graph/changeszone/ChangesBar.d.ts +11 -0
- package/dist/components/graph/commitzone/BackgroundStreak.d.ts +12 -0
- package/dist/components/graph/commitzone/CommitNode.d.ts +24 -0
- package/dist/components/graph/commitzone/CommitZone.d.ts +48 -0
- package/dist/components/graph/commitzone/GraphAvatar.d.ts +39 -0
- package/dist/components/graph/commitzone/Gutter.d.ts +22 -0
- package/dist/components/graph/commitzone/edges/Arc.d.ts +4 -0
- package/dist/components/graph/commitzone/edges/EdgeNodes.d.ts +3 -0
- package/dist/components/graph/commitzone/edges/Edges.d.ts +13 -0
- package/dist/components/graph/commitzone/edges/EndingEdge.d.ts +4 -0
- package/dist/components/graph/commitzone/edges/PassThroughEdge.d.ts +4 -0
- package/dist/components/graph/commitzone/edges/StartingEdge.d.ts +4 -0
- package/dist/components/graph/common/DraggableGraphHeader.d.ts +42 -0
- package/dist/components/graph/common/EntireRowSpan.d.ts +15 -0
- package/dist/components/graph/common/GenericGraphZone.d.ts +46 -0
- package/dist/components/graph/common/LoadingSpinner.d.ts +11 -0
- package/dist/components/graph/common/RefLine.d.ts +17 -0
- package/dist/components/graph/common/Timeline.d.ts +6 -0
- package/dist/components/graph/dnd/DndContainer.d.ts +44 -0
- package/dist/components/graph/refzone/Icon.d.ts +39 -0
- package/dist/components/graph/refzone/OverflowCount.d.ts +7 -0
- package/dist/components/graph/refzone/RefName.d.ts +6 -0
- package/dist/components/graph/refzone/RefNode.d.ts +36 -0
- package/dist/components/graph/refzone/RefNodes.d.ts +31 -0
- package/dist/components/graph/refzone/RefPopover.d.ts +15 -0
- package/dist/components/graph/refzone/RefZone.d.ts +54 -0
- package/dist/components/graph/rowRenderers/ChangesZoneRow.d.ts +8 -0
- package/dist/components/graph/rowRenderers/CommitAuthorZoneRow.d.ts +7 -0
- package/dist/components/graph/rowRenderers/CommitDateTimeZoneRow.d.ts +10 -0
- package/dist/components/graph/rowRenderers/CommitMessageZoneRow.d.ts +20 -0
- package/dist/components/graph/rowRenderers/CommitShaZoneRow.d.ts +10 -0
- package/dist/components/graph/rowRenderers/CommitZoneRow.d.ts +19 -0
- package/dist/components/graph/rowRenderers/CommitsInfoRow.d.ts +25 -0
- package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +29 -0
- package/dist/components/graph/rowRenderers/TimelineMsgRow.d.ts +7 -0
- package/dist/components/graph/shared/Avatar.d.ts +13 -0
- package/dist/components/graph/shared/FileDiffTypeIcon.d.ts +13 -0
- package/dist/components/graph/shared/InlineWorkDirSummary.d.ts +12 -0
- package/dist/components/graph/shared/TinyFilesReadout.d.ts +13 -0
- package/dist/components/resizable/Resizable.d.ts +78 -0
- package/dist/domain/color/ColorHelpers.d.ts +22 -0
- package/dist/domain/commit/CommitConstants.d.ts +10 -0
- package/dist/domain/commit/CommitHelpers.d.ts +5 -0
- package/dist/domain/commit/CommitTypes.d.ts +9 -0
- package/dist/domain/cssvariable/CssVariableConstants.d.ts +259 -0
- package/dist/domain/cssvariable/CssVariableHelpers.d.ts +4 -0
- package/dist/domain/date/DateHelper.d.ts +7 -0
- package/dist/domain/diff/DiffConstants.d.ts +5 -0
- package/dist/domain/diff/DiffTypes.d.ts +9 -0
- package/dist/domain/edge/EdgeHelpers.d.ts +9 -0
- package/dist/domain/generic/GenericTypes.d.ts +34 -0
- package/dist/domain/graph/GraphConstants.d.ts +146 -0
- package/dist/domain/graph/GraphHelpers.d.ts +71 -0
- package/dist/domain/graph/GraphTypes.d.ts +367 -0
- package/dist/domain/hostingservice/HostingServiceTypes.d.ts +9 -0
- package/dist/domain/language/LanguageConstants.d.ts +3 -0
- package/dist/domain/language/LanguageHelpers.d.ts +1 -0
- package/dist/domain/language/LanguageTypes.d.ts +1 -0
- package/dist/domain/reactvirtualized/ReactVirtualizedHelpers.d.ts +11 -0
- package/dist/domain/ref/RefConstants.d.ts +5 -0
- package/dist/domain/ref/RefTypes.d.ts +2 -0
- package/dist/domain/ui/UiTypes.d.ts +28 -0
- package/dist/domain/workdir/WorkDirTypes.d.ts +7 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.js +1 -1
- package/dist/styles.css +2 -1
- package/dist/utils/MathUtils.d.ts +1 -0
- package/dist/utils/TextFormatting.d.ts +2 -0
- package/package.json +86 -82
|
@@ -1,338 +1,303 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from '../../domain/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| typeof mergeNodeType
|
|
42
|
-
| typeof mergeConflictNodeType
|
|
43
|
-
| typeof stashNodeType
|
|
44
|
-
| WorkDirType;
|
|
45
|
-
|
|
46
|
-
export type GraphPlatform = 'aix'
|
|
47
|
-
| 'android'
|
|
48
|
-
| 'darwin'
|
|
49
|
-
| 'freebsd'
|
|
50
|
-
| 'linux'
|
|
51
|
-
| 'openbsd'
|
|
52
|
-
| 'sunos'
|
|
53
|
-
| 'win32'
|
|
54
|
-
| 'cygwin';
|
|
55
|
-
|
|
56
|
-
export type GraphItemContext = string | object;
|
|
57
|
-
export type RefGroupContexts = { [name: string]: GraphItemContext };
|
|
58
|
-
|
|
59
|
-
export type RowContexts = {
|
|
60
|
-
row?: GraphItemContext;
|
|
61
|
-
ref?: GraphItemContext;
|
|
62
|
-
refGroups?: RefGroupContexts;
|
|
63
|
-
graph?: GraphItemContext;
|
|
64
|
-
avatar?: GraphItemContext;
|
|
65
|
-
message?: GraphItemContext;
|
|
66
|
-
author?: GraphItemContext;
|
|
67
|
-
date?: GraphItemContext;
|
|
68
|
-
sha?: GraphItemContext;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export type RowStats = {
|
|
72
|
-
files: number;
|
|
73
|
-
additions: number;
|
|
74
|
-
deletions: number;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export type GraphContexts = {
|
|
78
|
-
graph?: GraphItemContext;
|
|
79
|
-
header?: GraphItemContext;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
interface Ref {
|
|
83
|
-
id?: string;
|
|
84
|
-
name: string;
|
|
85
|
-
context?: GraphItemContext;
|
|
86
|
-
contextGroup?: GraphItemContext;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Alignment, ScrollParams } from 'react-virtualized';
|
|
3
|
+
import type { ReactElement } from 'react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { Sha } from '../../domain/commit/CommitTypes';
|
|
6
|
+
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
7
|
+
import type { GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
|
|
8
|
+
import { GraphMarkerType } from '../../domain/graph/GraphConstants';
|
|
9
|
+
import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
|
|
10
|
+
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnToggleRefNodesShown, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
11
|
+
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
12
|
+
import type { OnBlur, OnComponentWillUnmount, OnFocus, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
|
|
13
|
+
import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
14
|
+
type OnClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
15
|
+
type OnDoubleClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
16
|
+
type OnClickGraphRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow, metadataItem?: RefMetadataItem) => void;
|
|
17
|
+
type OnDoubleClickGraphRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow, metadataItem?: RefMetadataItem) => void;
|
|
18
|
+
type OnRowContextMenu = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
19
|
+
type OnRefContextMenu = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
20
|
+
type OnToggleRefsVisibilityClick = (event: React.MouseEvent<any>, refs: GraphRefOptData[], visible: boolean, graphRow?: GraphRow) => void;
|
|
21
|
+
type OnSelectGraphRows = (selectedRows: GraphRow[]) => void;
|
|
22
|
+
type OnGraphRowHovered = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
23
|
+
type OnGraphRowUnhovered = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
24
|
+
type OnGraphRefNodeHovered = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
25
|
+
type OnGraphScrollForZone = (graphZoneType: GraphZoneType, scroll: ScrollParams) => void;
|
|
26
|
+
type OnGraphRefNodeUnhovered = (event: React.MouseEvent<any> | React.FocusEvent<any> | null, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
27
|
+
type OnGraphColumnsReOrdered = (columnsSettings: GraphColumnsSettings) => void;
|
|
28
|
+
type OnGraphColumnResized = (graphZoneType: GraphZoneType, columnSettings: GraphColumnSetting) => void;
|
|
29
|
+
type OnShowMoreCommits = () => void;
|
|
30
|
+
type OnEmailsMissingAvatarUrls = (emails: AvatarUrlByEmail) => void;
|
|
31
|
+
type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
|
|
32
|
+
type ClearScrollToIndex = () => void;
|
|
33
|
+
type OnZoneEnter = (e: React.MouseEvent<any>, zoneType: GraphZoneType, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
|
|
34
|
+
type OnGraphContainerBlurred = (event: React.FocusEvent<any>, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
|
|
35
|
+
interface OwnProps {
|
|
36
|
+
formatCommitDateTime?: OnFormatCommitDateTime;
|
|
37
|
+
getExternalIcon: GetExternalIcon;
|
|
38
|
+
platform?: GraphPlatform;
|
|
39
|
+
shaLength?: number | null;
|
|
40
|
+
nonce?: string;
|
|
87
41
|
}
|
|
88
|
-
export interface
|
|
89
|
-
|
|
90
|
-
|
|
42
|
+
export interface StateProps {
|
|
43
|
+
avatarUrlByEmail?: AvatarUrlByEmail;
|
|
44
|
+
cssVariables?: CssVariables;
|
|
45
|
+
contexts?: GraphContexts | null;
|
|
46
|
+
dimMergeCommits?: boolean;
|
|
47
|
+
highlightRowsOnRefHover?: boolean;
|
|
48
|
+
isContainerWindowFocused?: boolean;
|
|
49
|
+
showGhostRefsOnRowHover?: boolean;
|
|
50
|
+
showRemoteNamesOnRefs?: boolean;
|
|
51
|
+
enabledRefMetadataTypes?: RefMetadataType[];
|
|
52
|
+
enabledScrollMarkerTypes?: GraphMarkerType[];
|
|
53
|
+
scrollRowPadding?: number;
|
|
54
|
+
enableMultiSelection?: boolean;
|
|
55
|
+
graphRows: GraphRow[];
|
|
56
|
+
hasMoreCommits?: boolean;
|
|
57
|
+
highlightedShas?: HighlightedShas;
|
|
58
|
+
excludeByType?: ExcludeByType;
|
|
59
|
+
excludeRefsById?: ExcludeRefsById;
|
|
60
|
+
includeOnlyRefsById?: IncludeOnlyRefsById;
|
|
61
|
+
isCommitting?: boolean;
|
|
62
|
+
isSelectedBySha?: IsSelectedBySha;
|
|
63
|
+
isInUnsupportedRebase?: boolean;
|
|
64
|
+
isLoadingRows?: boolean;
|
|
65
|
+
pendingCommitMessageSummary?: string;
|
|
66
|
+
refMetadataById?: RefMetadataById | null;
|
|
67
|
+
repoPath?: string;
|
|
68
|
+
columnsSettings?: GraphColumnsSettings;
|
|
69
|
+
themeOpacityFactor?: number;
|
|
70
|
+
translate?: TranslationFn;
|
|
71
|
+
useAuthorInitialsForAvatars: boolean;
|
|
72
|
+
workDirStats?: WorkDirStats;
|
|
91
73
|
}
|
|
92
|
-
export interface
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
74
|
+
export interface DispatchProps {
|
|
75
|
+
onDoubleClickGraphRef?: OnDoubleClickGraphRef;
|
|
76
|
+
onGraphRowHovered?: OnGraphRowHovered;
|
|
77
|
+
onGraphRowUnhovered?: OnGraphRowUnhovered;
|
|
78
|
+
onRefContextMenu?: OnRefContextMenu;
|
|
79
|
+
onToggleRefsVisibilityClick?: OnToggleRefsVisibilityClick;
|
|
80
|
+
onRowContextMenu?: OnRowContextMenu;
|
|
81
|
+
onGraphRefNodeHovered?: OnGraphRefNodeHovered;
|
|
82
|
+
onGraphRefNodeUnhovered?: OnGraphRefNodeUnhovered;
|
|
83
|
+
onBlurWipNodeInput?: OnBlur;
|
|
84
|
+
onGraphColumnsReOrdered?: OnGraphColumnsReOrdered;
|
|
85
|
+
onColumnResized?: OnGraphColumnResized;
|
|
86
|
+
onFocusWipNodeInput?: OnFocus;
|
|
87
|
+
onMessageChange?: OnCommitMessageChange;
|
|
88
|
+
onClickGraphRef?: OnClickGraphRef;
|
|
89
|
+
onClickGraphRow?: OnClickGraphRow;
|
|
90
|
+
onDoubleClickGraphRow?: OnDoubleClickGraphRow;
|
|
91
|
+
onSelectGraphRows?: OnSelectGraphRows;
|
|
92
|
+
onScrollForZone?: OnGraphScrollForZone;
|
|
93
|
+
onScrollToRowCausedUpdateForRefZone?: OnGraphScrollForZone;
|
|
94
|
+
onShowMoreCommits?: OnShowMoreCommits;
|
|
95
|
+
onWipNodeInputWillUnmount?: OnComponentWillUnmount;
|
|
96
|
+
onGraphResized?: OnGraphResized;
|
|
97
|
+
onGraphVisibleRowsChanged?: OnGraphVisibleRowsChanged;
|
|
98
|
+
onGraphMouseEnter?: OnGraphMouseEnter;
|
|
99
|
+
onGraphMouseLeave?: OnGraphMouseLeave;
|
|
100
|
+
onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
|
|
101
|
+
onRefsMissingMetadata?: OnRefsMissingMetadata;
|
|
97
102
|
}
|
|
98
|
-
|
|
99
|
-
annotated?: boolean;
|
|
103
|
+
interface Props extends OwnProps, StateProps, DispatchProps {
|
|
100
104
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
export type GraphContainerProps = Props;
|
|
106
|
+
type ComponentState = {
|
|
107
|
+
avatarUrlByEmail: AvatarUrlByEmail;
|
|
108
|
+
columnColorByColumn: ColumnColorByColumn;
|
|
109
|
+
contexts?: GraphContexts | null;
|
|
110
|
+
cssVariablesWithDefaults: CssVariables;
|
|
111
|
+
currentlyHoveredCommitSha?: Sha;
|
|
112
|
+
dimMergeCommits: boolean;
|
|
113
|
+
dimRowsOfSelectedCommit: boolean;
|
|
114
|
+
highlightRowsOnRefHover: boolean;
|
|
115
|
+
showGhostRefsOnRowHover: boolean;
|
|
116
|
+
showRemoteNamesOnRefs: boolean;
|
|
117
|
+
enabledRefMetadataTypes: RefMetadataType[];
|
|
118
|
+
enabledScrollMarkerTypes: GraphMarkerType[];
|
|
119
|
+
graphZones: GraphZone[];
|
|
120
|
+
hasMoreCommits: boolean;
|
|
121
|
+
height: number;
|
|
122
|
+
highlightedShas?: HighlightedShas;
|
|
123
|
+
hoveredRefGroup?: GraphRefGroup;
|
|
124
|
+
hoveredRefZoneSha?: Sha;
|
|
125
|
+
isContainerWindowFocused: boolean;
|
|
126
|
+
isLoadingRows: boolean;
|
|
127
|
+
numGraphColumns: number;
|
|
128
|
+
processedRows: ProcessedGraphRow[];
|
|
129
|
+
refMetadataById?: RefMetadataById | null;
|
|
130
|
+
useAuthorInitialsForAvatars: boolean;
|
|
131
|
+
scrollLeft: number;
|
|
132
|
+
scrollToAlignment: Alignment;
|
|
133
|
+
scrollToIndex?: number;
|
|
134
|
+
scrollTop: number;
|
|
135
|
+
shaLength?: number | null;
|
|
136
|
+
themeOpacityFactor: number;
|
|
137
|
+
width: number;
|
|
138
|
+
workDirStats: WorkDirStats;
|
|
121
139
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
export const REF_ZONE_TYPE = 'ref';
|
|
126
|
-
export const GRAPH_ZONE_TYPE = 'graph';
|
|
127
|
-
export const MESSAGE_ZONE_TYPE = 'message';
|
|
128
|
-
export const AUTHOR_ZONE_TYPE = 'author';
|
|
129
|
-
export const DATE_TIME_ZONE_TYPE = 'datetime';
|
|
130
|
-
export const SHA_ZONE_TYPE = 'sha';
|
|
131
|
-
export const CHANGES_ZONE_TYPE = 'changes';
|
|
132
|
-
|
|
133
|
-
export type GraphZoneType = typeof REF_ZONE_TYPE
|
|
134
|
-
| typeof GRAPH_ZONE_TYPE
|
|
135
|
-
| typeof MESSAGE_ZONE_TYPE
|
|
136
|
-
| typeof AUTHOR_ZONE_TYPE
|
|
137
|
-
| typeof DATE_TIME_ZONE_TYPE
|
|
138
|
-
| typeof SHA_ZONE_TYPE
|
|
139
|
-
| typeof CHANGES_ZONE_TYPE;
|
|
140
|
-
|
|
141
|
-
export type GraphColumnsSettings = { [graphZoneType: string]: GraphColumnSetting };
|
|
142
|
-
|
|
143
|
-
export type GraphRefType = 'head'
|
|
144
|
-
| 'remote'
|
|
145
|
-
| 'tag';
|
|
146
|
-
|
|
147
|
-
export interface GraphRef extends Head, Remote, Tag {
|
|
148
|
-
refType: GraphRefType;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export type GraphRefOptData = {
|
|
152
|
-
id: string;
|
|
153
|
-
name: string;
|
|
154
|
-
type: GraphRefType;
|
|
155
|
-
owner?: string;
|
|
156
|
-
avatarUrl?: string;
|
|
140
|
+
type ColumnsToFreeBySha = {
|
|
141
|
+
[sha: Sha]: number[];
|
|
157
142
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
export type RefMetadataById = { [id: string]: RefMetadata | null | undefined } | null;
|
|
162
|
-
export type RefMetadata = {
|
|
163
|
-
pullRequest?: PullRequestMetadata[] | null;
|
|
164
|
-
upstream?: UpstreamMetadata | null;
|
|
143
|
+
type ColumnsUsed = {
|
|
144
|
+
[column: number]: boolean;
|
|
165
145
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
context: unknown;
|
|
323
|
-
props: Readonly<GraphContainerProps>;
|
|
324
|
-
state: Readonly<any>;
|
|
325
|
-
refs: {
|
|
326
|
-
[key: string]: React.ReactInstance
|
|
327
|
-
};
|
|
328
|
-
setState(
|
|
329
|
-
state: ((prevState: Readonly<any>, props: Readonly<GraphContainerProps>) =>
|
|
330
|
-
(Pick<any, any> | any | null)) | (Pick<any, any> | any | null),
|
|
331
|
-
callback?: () => void
|
|
332
|
-
): void;
|
|
333
|
-
forceUpdate(callback?: () => void): void;
|
|
334
|
-
render(): JSX.Element;
|
|
335
|
-
selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
|
|
146
|
+
declare class GraphContainer extends React.PureComponent<Props, ComponentState> {
|
|
147
|
+
graphContainerRef: any;
|
|
148
|
+
resizeObserver: ResizeObserver;
|
|
149
|
+
isSelectedBySha: IsSelectedBySha;
|
|
150
|
+
processedGraphRowBySha: ProcessedGraphRowBySha;
|
|
151
|
+
childrenBySha: ChildrenBySha;
|
|
152
|
+
scrollToSha?: Sha;
|
|
153
|
+
lastLazyLoadHeight: number;
|
|
154
|
+
lastTopVisibleRowIndex: number;
|
|
155
|
+
lastBottomVisibleRowIndex: number;
|
|
156
|
+
maxColumns: number;
|
|
157
|
+
orderedGraphRows: ProcessedGraphRow[];
|
|
158
|
+
rowStatsConstraints: RowStatsConstraints;
|
|
159
|
+
shouldFireShowMoreCommits: boolean;
|
|
160
|
+
columnsToFreeWhenFound: ColumnsToFreeBySha;
|
|
161
|
+
reserverInfoBySha: ReserverInfoBySha;
|
|
162
|
+
columnsUsed: ColumnsUsed;
|
|
163
|
+
workDirStats: WorkDirStats;
|
|
164
|
+
excludeByType: ExcludeByType;
|
|
165
|
+
excludeRefsById: ExcludeRefsById;
|
|
166
|
+
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
167
|
+
excludeRemotesByName: ExcludeRemotesByName;
|
|
168
|
+
includeOnlyRemotesByName: IncludeOnlyRemotesByName;
|
|
169
|
+
scrollLeft: number;
|
|
170
|
+
scrollTop: number;
|
|
171
|
+
graphHeight: number;
|
|
172
|
+
graphWidth: number;
|
|
173
|
+
graphZonesByType: GraphZonesByType;
|
|
174
|
+
graphZoneOrdering: GraphZoneType[];
|
|
175
|
+
missingAvatarsTimer?: NodeJS.Timeout;
|
|
176
|
+
pendingMissingAvatars: AvatarUrlByEmail;
|
|
177
|
+
requestedMissingAvatars: AvatarUrlRequestedByEmail;
|
|
178
|
+
missingRefsMetadataTimer?: NodeJS.Timeout;
|
|
179
|
+
pendingMissingRefsMetadata: RefsMissingMetadata;
|
|
180
|
+
requestedMissingRefsMetadata: RefMetadataRequestedById;
|
|
181
|
+
markerRowIndices: GraphMarkerRowIndices;
|
|
182
|
+
timelinesInterval?: NodeJS.Timeout;
|
|
183
|
+
constructor(props: Props);
|
|
184
|
+
componentDidMount(): void;
|
|
185
|
+
componentWillReceiveProps(nextProps: Props): void;
|
|
186
|
+
componentWillUnmount(): void;
|
|
187
|
+
onGraphVisibleRowsUpdatedThrottled: ThrottledFn;
|
|
188
|
+
onBlurWipNodeInput: OnBlur;
|
|
189
|
+
onDoubleClickRef: OnDoubleClickRef;
|
|
190
|
+
onFocusWipNodeInput: OnFocus;
|
|
191
|
+
onCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
|
|
192
|
+
onClearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
|
|
193
|
+
onGraphColumnReOrdered: OnGraphColumnReOrdered;
|
|
194
|
+
onGraphZoneResize: OnGraphZoneResize;
|
|
195
|
+
onGraphZoneResizeEnd: OnGraphZoneResizeEnd;
|
|
196
|
+
onPopupGraphHeaderContextMenu: OnPopupGraphHeaderContextMenu;
|
|
197
|
+
onMessageChange: OnCommitMessageChange;
|
|
198
|
+
onClickRef: OnClickRef;
|
|
199
|
+
onClickCommit: OnClickCommit;
|
|
200
|
+
onDoubleClickCommit: OnDoubleClickCommit;
|
|
201
|
+
onWindowKeyUp: OnKeyUp;
|
|
202
|
+
onWindowBlur: OnBlur;
|
|
203
|
+
onWindowKeyDown: OnKeyDown;
|
|
204
|
+
onKeyDown: OnKeyDown;
|
|
205
|
+
onRefNodeHovered: OnRefNodeHovered;
|
|
206
|
+
onRefNodeUnhovered: OnRefNodeUnhovered;
|
|
207
|
+
onRefZoneHovered: OnRefZoneHovered;
|
|
208
|
+
onRefZoneUnhovered: OnRefZoneUnhovered;
|
|
209
|
+
onShowMoreCommits: OnShowMoreCommits;
|
|
210
|
+
onScrollForZone: OnScrollForZone;
|
|
211
|
+
onScrollToRowCausedUpdateForRefZone: OnScrollForZone;
|
|
212
|
+
onCommitContextMenu: OnCommitContextMenu;
|
|
213
|
+
onRefContextMenu: OnRefZoneContextMenu;
|
|
214
|
+
onWipNodeInputWillUnmount: OnComponentWillUnmount;
|
|
215
|
+
selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
|
|
216
|
+
getCommitZoneContentWidthBetweenGutters(): number;
|
|
217
|
+
getSelectedShas(): Sha[];
|
|
218
|
+
getExcludeRemotesByName(): ExcludeRemotesByName;
|
|
219
|
+
getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
|
|
220
|
+
clearScrollToIndex: ClearScrollToIndex;
|
|
221
|
+
getTopAndBottomVisibleRowIndex(): TopAndBottomVisibleRowIndex;
|
|
222
|
+
getOffsetSha(sha: Sha): Sha;
|
|
223
|
+
selectSha(sha: Sha, isAutoOrKeyScroll?: boolean): void;
|
|
224
|
+
updateWidthByZone(widthToAssignForZone: number, graphZoneType: GraphZoneType, updatePreferredWidth?: boolean): void;
|
|
225
|
+
updateCommitZoneContentWidthFromGraphRowsChange(): void;
|
|
226
|
+
getCurrentWidthByZone(graphZoneType: GraphZoneType): number;
|
|
227
|
+
getCommitZoneContentWidth(): number;
|
|
228
|
+
getCommitZoneWidth(): number;
|
|
229
|
+
getSingleColumnModeFactor(): number;
|
|
230
|
+
setScroll(graphZoneType: GraphZoneType, scroll: ScrollParams): void;
|
|
231
|
+
getNonAdjustedScrollLeft(): number;
|
|
232
|
+
setScrollLeft(scrollLeft: number): void;
|
|
233
|
+
getScrollLeft(): number;
|
|
234
|
+
setScrollTop(scrollTop: number): void;
|
|
235
|
+
getScrollTop(): number;
|
|
236
|
+
getScrollToSha(): Sha | undefined;
|
|
237
|
+
setScrollToSha(scrollToSha: Sha, scrollLeft: number): void;
|
|
238
|
+
getScrollToIndex(): number;
|
|
239
|
+
getScrollToAlignment(): Alignment;
|
|
240
|
+
getMinNodeOffset(): number;
|
|
241
|
+
getMaxNodeOffset(): number;
|
|
242
|
+
getAbsoluteNodeLeftByColumn(): AbsoluteNodeLeftByColumn;
|
|
243
|
+
getNodeOffsetByColumn(): NodeOffsetByColumn;
|
|
244
|
+
getMaxNodeLeft(): number;
|
|
245
|
+
getMinNodeLeft(): number;
|
|
246
|
+
getRightGutterSlideOutFactor(): number;
|
|
247
|
+
getNodeOpacityByColumn(): NodeOpacityByColumn;
|
|
248
|
+
getLeftGutterWidth(): number;
|
|
249
|
+
getRightGutterWidth(): number;
|
|
250
|
+
getBoxShadowAlphaForGutter(singleColumnModeFactor: number, gutterFactor: number): number;
|
|
251
|
+
getLeftGutterBoxShadowAlpha(themeOpacityFactor: number): number;
|
|
252
|
+
getRightGutterBoxShadowAlpha(themeOpacityFactor: number): number;
|
|
253
|
+
updateMarkerRowIndices(types: GraphMarkerType[]): void;
|
|
254
|
+
getMarkerColors(): GraphMarkerColors;
|
|
255
|
+
initializeGraphZones(zoneSettings: GraphColumnsSettings | undefined, zoneOrdering: GraphZoneType[], width: number): GraphZone[];
|
|
256
|
+
updateZonesFromSettings(zoneSettings?: GraphColumnsSettings): void;
|
|
257
|
+
getEdgeColumnMaxes(sha: Sha): number;
|
|
258
|
+
getEndingAndPassThroughEdgesByColumnFromPrevRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
|
|
259
|
+
getFinalEdgeStateForGraphAndRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
|
|
260
|
+
loadEdgesBySha(): void;
|
|
261
|
+
processRows(graphRows?: GraphRow[]): void;
|
|
262
|
+
getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
|
|
263
|
+
formatCommitDateTimeCallback: OnFormatCommitDateTime;
|
|
264
|
+
translateCallback: TranslationFn;
|
|
265
|
+
getIconCallback: GetExternalIcon;
|
|
266
|
+
onMissingAvatar: GetMissingAvatar;
|
|
267
|
+
onMissingRefMetadata: GetMissingRefMetadata;
|
|
268
|
+
selectNext(topological?: boolean): void;
|
|
269
|
+
selectPrevious(topological?: boolean): void;
|
|
270
|
+
getAvailableColumnAndUseIt(): number;
|
|
271
|
+
getColumns(graphRow: GraphRow): number;
|
|
272
|
+
getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
|
|
273
|
+
getFilteredRemotesForGraphRow(row: GraphRow, hasIncludes: boolean): Remote[];
|
|
274
|
+
getFilteredTagsForGraphRow(row: GraphRow, hasIncludes: boolean, rowHasVisibleChild: boolean): Tag[];
|
|
275
|
+
loadRowsbySha(graphRows: GraphRow[]): void;
|
|
276
|
+
updateRowStatsConstraints(): void;
|
|
277
|
+
updateTimelines(): void;
|
|
278
|
+
clearTimelines(): void;
|
|
279
|
+
cleanupSelections(): void;
|
|
280
|
+
getColumnColorByColumn(cssVariables: CssVariables): ColumnColorByColumn;
|
|
281
|
+
getNumGraphColumns(cssVariables: CssVariables): number;
|
|
282
|
+
ensureZoneWidthsMatchGraphWidth(orderedActiveGraphZones: GraphZone[], width: number): void;
|
|
283
|
+
shrinkZoneWidthsToFitWidth(orderedActiveGraphZones: GraphZone[], width: number, stoppingIndex?: number): void;
|
|
284
|
+
getOrderedActiveGraphZones(): GraphZone[];
|
|
285
|
+
expandZoneWidthsToFitWidth(orderedActiveGraphZones: GraphZone[], width: number, startingIndex?: number): void;
|
|
286
|
+
onGraphHeaderRowMouseDown: OnMouseDown;
|
|
287
|
+
onToggleRefNodesShown: OnToggleRefNodesShown;
|
|
288
|
+
cleanEdgeCaches(): void;
|
|
289
|
+
onZoneEnter: OnZoneEnter;
|
|
290
|
+
adjustResizedGraphZone(graphZones: GraphZone[], graphZone: GraphZone, dimensions: OnResizeParams, updatePreferredWidth: boolean): void;
|
|
291
|
+
dimRowsOfSelectedCommit(dimRows: boolean): void;
|
|
292
|
+
onGraphContainerBlurred: OnGraphContainerBlurred;
|
|
293
|
+
onGraphContainerMouseEnter: OnGraphMouseEnter;
|
|
294
|
+
onGraphContainerMouseLeave: OnGraphMouseLeave;
|
|
295
|
+
onGraphResized: OnGraphResized;
|
|
296
|
+
onGraphVisibleRowsUpdated(): void;
|
|
297
|
+
getCurrentPlatform(): string;
|
|
298
|
+
isMacOSPlatform(): boolean;
|
|
299
|
+
getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
|
|
300
|
+
decorateWithHelmet: (container: ReactElement<'div'>, cssVariables: CssVariables, nonce?: string) => ReactElement<'div'>;
|
|
301
|
+
render(): ReactElement<'div'>;
|
|
336
302
|
}
|
|
337
|
-
|
|
338
303
|
export default GraphContainer;
|