@gitkraken/gitkraken-components 10.1.31 → 10.2.1
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/components/graph/GraphColumn.d.ts +2 -1
- package/dist/components/graph/GraphContainer.d.ts +7 -2
- package/dist/components/graph/GraphHeaderRow.d.ts +1 -1
- package/dist/components/graph/IGraphContainer.d.ts +6 -0
- package/dist/components/graph/common/DraggableGraphHeader.d.ts +4 -1
- package/dist/components/graph/rowRenderers/CommitsInfoRow.d.ts +1 -0
- package/dist/domain/graph/GraphTypes.d.ts +5 -0
- package/dist/domain/graph/row/ProcessedGraphRowObj.d.ts +7 -2
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ type GraphColumnProps = {
|
|
|
9
9
|
branchUpstreamRowIndices: number[];
|
|
10
10
|
rowCount: number;
|
|
11
11
|
columnIndex: number;
|
|
12
|
+
customFooterRow?: ReactElement<any>;
|
|
12
13
|
enableResizer?: boolean;
|
|
13
14
|
enabledScrollMarkerTypes: GraphMarkerType[];
|
|
14
15
|
getExternalIcon: GetExternalIcon;
|
|
@@ -38,5 +39,5 @@ type GraphColumnProps = {
|
|
|
38
39
|
translate: TranslationFn;
|
|
39
40
|
verticalScrollWidth: number;
|
|
40
41
|
};
|
|
41
|
-
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
42
|
+
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
42
43
|
export {};
|
|
@@ -6,11 +6,12 @@ import type { Sha } from '../../domain/commit/CommitTypes';
|
|
|
6
6
|
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
7
7
|
import type { GraphMarkerType, GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
|
|
8
8
|
import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
|
|
9
|
-
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnSettingsClick, OnToggleRefNodesShown, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
9
|
+
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnSettingsClick, OnToggleRefNodesShown, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
10
10
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
11
11
|
import type { CreateRefFormData } from '../../domain/ref/RefTypes';
|
|
12
12
|
import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
|
|
13
13
|
import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
14
|
+
import type { IGraphContainer } from './IGraphContainer';
|
|
14
15
|
type OnClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
15
16
|
type OnDoubleClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
16
17
|
type OnClickGraphRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow, metadataItem?: RefMetadataItem) => void;
|
|
@@ -34,6 +35,7 @@ type OnZoneEnter = (e: React.MouseEvent<any>, zoneType: GraphZoneType, hoveredRe
|
|
|
34
35
|
type OnGraphContainerBlurred = (event: React.FocusEvent<any>, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
|
|
35
36
|
interface OwnProps {
|
|
36
37
|
formatCommitDateTime?: OnFormatCommitDateTime;
|
|
38
|
+
formatCommitMessage?: FormatCommitMessage;
|
|
37
39
|
getExternalIcon: GetExternalIcon;
|
|
38
40
|
platform?: GraphPlatform;
|
|
39
41
|
shaLength?: number | null;
|
|
@@ -42,6 +44,7 @@ interface OwnProps {
|
|
|
42
44
|
export interface StateProps {
|
|
43
45
|
avatarUrlByEmail?: AvatarUrlByEmail;
|
|
44
46
|
cssVariables?: CssVariables;
|
|
47
|
+
customFooterRow?: ReactElement<any>;
|
|
45
48
|
contexts?: GraphContexts | null;
|
|
46
49
|
createRefFormData?: CreateRefFormData | null;
|
|
47
50
|
dimMergeCommits?: boolean;
|
|
@@ -171,7 +174,7 @@ type ColumnsUsed = {
|
|
|
171
174
|
type HasMergeNodeChildBySha = {
|
|
172
175
|
[sha: Sha]: boolean;
|
|
173
176
|
};
|
|
174
|
-
declare class GraphContainer extends React.
|
|
177
|
+
declare class GraphContainer extends React.Component<Props, ComponentState> implements IGraphContainer {
|
|
175
178
|
graphContainerRef: any;
|
|
176
179
|
resizeObserver: ResizeObserver;
|
|
177
180
|
isSelectedBySha: IsSelectedBySha;
|
|
@@ -257,6 +260,7 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
|
|
|
257
260
|
onRefZoneUnhovered: OnRefZoneUnhovered;
|
|
258
261
|
onShowMoreCommits: OnShowMoreCommits;
|
|
259
262
|
onScrollForZone: OnScrollForZone;
|
|
263
|
+
loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
|
|
260
264
|
onScrollToRowCausedUpdateForRefZone: OnScrollForZone;
|
|
261
265
|
onCommitContextMenu: OnCommitContextMenu;
|
|
262
266
|
onRefContextMenu: OnRefZoneContextMenu;
|
|
@@ -314,6 +318,7 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
|
|
|
314
318
|
processRows(graphRows?: GraphRow[]): void;
|
|
315
319
|
getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
|
|
316
320
|
formatCommitDateTimeCallback: OnFormatCommitDateTime;
|
|
321
|
+
formatCommitMessageCallback: FormatCommitMessage;
|
|
317
322
|
formatRefShorthandCallback: FormatRefShorthand;
|
|
318
323
|
isRefShorthandValidCallback: IsRefShorthandValid;
|
|
319
324
|
translateCallback: TranslationFn;
|
|
@@ -21,7 +21,7 @@ type Props = {
|
|
|
21
21
|
onGraphZoneResize?: OnGraphZoneResize;
|
|
22
22
|
onGraphZoneResizeEnd?: OnGraphZoneResizeEnd;
|
|
23
23
|
onGraphZoneResizeFromPropChange?: OnGraphZoneResizeFromPropChange;
|
|
24
|
-
onSettingsClick
|
|
24
|
+
onSettingsClick?: OnSettingsClick;
|
|
25
25
|
onToggleRefNodesShown: OnToggleRefNodesShown;
|
|
26
26
|
graphZones: GraphZone[];
|
|
27
27
|
repoPath: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FormatCommitMessage } from '../../domain/graph/GraphTypes';
|
|
2
|
+
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
3
|
+
export interface IGraphContainer {
|
|
4
|
+
formatCommitMessageCallback: FormatCommitMessage;
|
|
5
|
+
translateCallback: TranslationFn;
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { GraphZone, GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
4
|
-
import type { ExcludeRefsById, GetExternalIcon, GraphColumnSetting, GraphRefOptData, IncludeOnlyRefsById, OnFilterColumnClick, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnGraphZoneResizeStart, OnToggleRefNodesShown } from '../../../domain/graph/GraphTypes';
|
|
4
|
+
import type { ExcludeRefsById, GetExternalIcon, GraphColumnSetting, GraphItemContext, GraphRefOptData, IncludeOnlyRefsById, OnFilterColumnClick, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnGraphZoneResizeStart, OnSettingsClick, OnToggleRefNodesShown } from '../../../domain/graph/GraphTypes';
|
|
5
5
|
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
6
6
|
import type { OnClick, OnMouseEnter, OnMouseLeave } from '../../../domain/ui/UiTypes';
|
|
7
7
|
type GraphHeaderProps = {
|
|
@@ -26,8 +26,10 @@ type GraphHeaderProps = {
|
|
|
26
26
|
onResizeEnd?: OnGraphZoneResizeEnd;
|
|
27
27
|
onResizeFromPropChange?: OnGraphZoneResizeFromPropChange;
|
|
28
28
|
onResizeStart?: OnGraphZoneResizeStart;
|
|
29
|
+
onSettingsClick?: OnSettingsClick;
|
|
29
30
|
onToggleRefNodesShown: OnToggleRefNodesShown;
|
|
30
31
|
onUnhover?: OnMouseLeave;
|
|
32
|
+
settingsContext?: GraphItemContext;
|
|
31
33
|
showRemoteNamesOnRefs: boolean;
|
|
32
34
|
translate: TranslationFn;
|
|
33
35
|
};
|
|
@@ -36,6 +38,7 @@ type GraphHeaderState = {
|
|
|
36
38
|
refPopoverMenuTarget: React.ReactInstance | undefined;
|
|
37
39
|
};
|
|
38
40
|
declare class GraphHeader extends React.Component<GraphHeaderProps, GraphHeaderState> {
|
|
41
|
+
private headIconsRef;
|
|
39
42
|
constructor(props: GraphHeaderProps);
|
|
40
43
|
onHiddenRefsClick: OnClick;
|
|
41
44
|
onShowRefNodes: OnToggleRefNodesShown;
|
|
@@ -7,6 +7,7 @@ import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
|
7
7
|
import EntireRowSpan from '../common/EntireRowSpan';
|
|
8
8
|
type Props = {
|
|
9
9
|
currentCommits: number;
|
|
10
|
+
customFooterRow?: ReactElement<any>;
|
|
10
11
|
getExternalIcon: GetExternalIcon;
|
|
11
12
|
graphZoneType: GraphZoneType;
|
|
12
13
|
hasMoreCommits: boolean;
|
|
@@ -189,6 +189,7 @@ export interface Remote extends Ref {
|
|
|
189
189
|
}
|
|
190
190
|
export interface Tag extends Ref {
|
|
191
191
|
annotated?: boolean;
|
|
192
|
+
message?: string;
|
|
192
193
|
}
|
|
193
194
|
export interface GraphRef extends Head, Remote, Tag {
|
|
194
195
|
refType: GraphRefType;
|
|
@@ -313,6 +314,9 @@ export interface GraphRefsData {
|
|
|
313
314
|
export interface ProcessedGraphRow extends GraphRow {
|
|
314
315
|
rowIndex?: number;
|
|
315
316
|
column: number;
|
|
317
|
+
displayMessage: string;
|
|
318
|
+
displaySummary: string;
|
|
319
|
+
displayBody?: string;
|
|
316
320
|
edges: RowEdges;
|
|
317
321
|
edgeColumnMaxes: number;
|
|
318
322
|
hasRefs?: boolean;
|
|
@@ -418,6 +422,7 @@ export type OnGraphMouseLeave = (event: React.MouseEvent<any>) => void;
|
|
|
418
422
|
export type OnClearCurrentlyHoveredGraphCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha, currentlyHoveredCommitSha?: Sha) => void;
|
|
419
423
|
export type CommitDateTimeSource = CommitDateTimeSources;
|
|
420
424
|
export type OnFormatCommitDateTime = (commitDateTime: number, source?: CommitDateTimeSource) => string;
|
|
425
|
+
export type FormatCommitMessage = (commitMessage: string) => string;
|
|
421
426
|
export type OnCurrentlyHoveredGraphCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha, currentlyHoveredCommitSha?: Sha) => void;
|
|
422
427
|
export type OnClickCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha) => void;
|
|
423
428
|
export type OnClickRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, sha: Sha, metadataItem?: RefMetadataItem) => void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { IGraphContainer } from '../../../components/graph/IGraphContainer';
|
|
1
2
|
import type { CommitType, Sha } from '../../commit/CommitTypes';
|
|
2
3
|
import type { TimelineEntry } from '../GraphConstants';
|
|
3
4
|
import type { ChildRefsByType, GraphRefsData, GraphRow, Head, ProcessedGraphRow, Remote, RowContexts, RowEdges, Tag } from '../GraphTypes';
|
|
4
5
|
export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
|
|
6
|
+
private _graph;
|
|
5
7
|
private _message;
|
|
6
8
|
private _heads;
|
|
7
9
|
private _remotes;
|
|
@@ -22,9 +24,12 @@ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
|
|
|
22
24
|
edgeColumnMaxes: number;
|
|
23
25
|
edges: RowEdges;
|
|
24
26
|
childRefs: ChildRefsByType;
|
|
27
|
+
timeLineEntry?: TimelineEntry;
|
|
25
28
|
summary: string;
|
|
26
29
|
body?: string;
|
|
27
|
-
|
|
30
|
+
displayMessage: string;
|
|
31
|
+
displaySummary: string;
|
|
32
|
+
displayBody?: string;
|
|
28
33
|
set message(message: string);
|
|
29
34
|
get message(): string;
|
|
30
35
|
get heads(): Head[];
|
|
@@ -35,7 +40,7 @@ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
|
|
|
35
40
|
get tags(): Tag[];
|
|
36
41
|
get hasRefs(): boolean;
|
|
37
42
|
get refsData(): GraphRefsData | undefined;
|
|
38
|
-
constructor(row: GraphRow, column?: number, edgeColumnMaxes?: number, edges?: RowEdges, childRefs?: ChildRefsByType, timeLineEntry?: TimelineEntry);
|
|
43
|
+
constructor(graphContainer: IGraphContainer, row: GraphRow, column?: number, edgeColumnMaxes?: number, edges?: RowEdges, childRefs?: ChildRefsByType, timeLineEntry?: TimelineEntry);
|
|
39
44
|
private updateSummaryAndBody;
|
|
40
45
|
private initializeRefGroups;
|
|
41
46
|
private addRefToRefGroup;
|