@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { GraphZone } from '../../domain/graph/GraphConstants';
|
|
4
|
+
import type { ExcludeRefsById, GetExternalIcon, GraphItemContext, IncludeOnlyRefsById, OnGraphColumnReOrdered, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnPopupGraphHeaderContextMenu, OnToggleRefNodesShown } from '../../domain/graph/GraphTypes';
|
|
5
|
+
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
6
|
+
import type { OnMouseEnter, OnMouseLeave } from '../../domain/ui/UiTypes';
|
|
7
|
+
import type { DndIsDraggable, DndIsDroppable, DndOnDrop } from './dnd/DndContainer';
|
|
8
|
+
type Props = {
|
|
9
|
+
context?: GraphItemContext;
|
|
10
|
+
enableResizer?: boolean;
|
|
11
|
+
getExternalIcon: GetExternalIcon;
|
|
12
|
+
excludeRefsById: ExcludeRefsById;
|
|
13
|
+
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
14
|
+
onColumnReOrdered?: OnGraphColumnReOrdered;
|
|
15
|
+
onPopupGraphHeaderContextMenu?: OnPopupGraphHeaderContextMenu;
|
|
16
|
+
onGraphZoneResize?: OnGraphZoneResize;
|
|
17
|
+
onGraphZoneResizeEnd?: OnGraphZoneResizeEnd;
|
|
18
|
+
onGraphZoneResizeFromPropChange?: OnGraphZoneResizeFromPropChange;
|
|
19
|
+
onToggleRefNodesShown: OnToggleRefNodesShown;
|
|
20
|
+
graphZones: GraphZone[];
|
|
21
|
+
repoPath: string;
|
|
22
|
+
showRemoteNamesOnRefs: boolean;
|
|
23
|
+
translate: TranslationFn;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
declare class GraphHeaderRow extends React.PureComponent<Props> {
|
|
28
|
+
canDrag: boolean;
|
|
29
|
+
isDraggable: DndIsDraggable;
|
|
30
|
+
isDroppable: DndIsDroppable;
|
|
31
|
+
onDrop: DndOnDrop;
|
|
32
|
+
onZoneHover: OnMouseEnter;
|
|
33
|
+
onZoneUnHover: OnMouseLeave;
|
|
34
|
+
render(): ReactElement<'div'>;
|
|
35
|
+
}
|
|
36
|
+
export default GraphHeaderRow;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { GraphMarkerType } from '../../domain/graph/GraphConstants';
|
|
4
|
+
import type { GraphMarkerColors, GraphMarkerRowIndices } from '../../domain/graph/GraphTypes';
|
|
5
|
+
interface Props {
|
|
6
|
+
enabledScrollMarkerTypes: GraphMarkerType[];
|
|
7
|
+
viewportWidth: number;
|
|
8
|
+
viewportHeight: number;
|
|
9
|
+
markerRowIndices: GraphMarkerRowIndices;
|
|
10
|
+
markerColors: GraphMarkerColors;
|
|
11
|
+
scrollWidth?: number;
|
|
12
|
+
totalRows: number;
|
|
13
|
+
}
|
|
14
|
+
export default class ScrollMarker extends React.PureComponent<Props> {
|
|
15
|
+
canvas: HTMLCanvasElement | null;
|
|
16
|
+
componentDidMount(): void;
|
|
17
|
+
componentWillReceiveProps(nextProps: Props): void;
|
|
18
|
+
updateCanvas(nextProps?: Props): void;
|
|
19
|
+
render(): ReactElement<'div'>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { RowStats, RowStatsConstraints } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
interface Props {
|
|
4
|
+
constraints: RowStatsConstraints;
|
|
5
|
+
isLastColumn: boolean;
|
|
6
|
+
scrollWidth: number;
|
|
7
|
+
zoneWidth: number;
|
|
8
|
+
stats: RowStats;
|
|
9
|
+
}
|
|
10
|
+
export default function ChangesBar(props: Props): ReactElement<'div'>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
type BackgroundStreakProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
marginLeft: number;
|
|
5
|
+
};
|
|
6
|
+
declare function BackgroundStreak({ className, marginLeft }: BackgroundStreakProps): ReactElement<'div'>;
|
|
7
|
+
export default BackgroundStreak;
|
|
8
|
+
export type CommitZoneBackgroundStreakProps = {
|
|
9
|
+
column: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function CommitZoneBackgroundStreak({ column, }: CommitZoneBackgroundStreakProps): ReactElement<typeof BackgroundStreak>;
|
|
12
|
+
export declare function GutterBackgroundStreak(): ReactElement<typeof BackgroundStreak>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { CommitType } from '../../../domain/commit/CommitTypes';
|
|
4
|
+
import type { CssVariables } from '../../../domain/generic/GenericTypes';
|
|
5
|
+
import type { GetExternalIcon, GraphItemContext } from '../../../domain/graph/GraphTypes';
|
|
6
|
+
type Props = {
|
|
7
|
+
authorEmail: string;
|
|
8
|
+
authorInitials: string;
|
|
9
|
+
authorName: string;
|
|
10
|
+
avatarUrl?: string | null;
|
|
11
|
+
column: number;
|
|
12
|
+
context?: GraphItemContext | null;
|
|
13
|
+
cssVariables: CssVariables;
|
|
14
|
+
getExternalIcon: GetExternalIcon;
|
|
15
|
+
left: number;
|
|
16
|
+
message: string;
|
|
17
|
+
opacity: number;
|
|
18
|
+
type: CommitType;
|
|
19
|
+
useAuthorInitialsForAvatars: boolean;
|
|
20
|
+
};
|
|
21
|
+
export default class CommitNode extends React.PureComponent<Props> {
|
|
22
|
+
render(): ReactElement<any>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
|
|
4
|
+
import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
|
|
5
|
+
import type { ColumnColorByColumn, GetExternalIcon, GraphItemContext, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, RowEdges } from '../../../domain/graph/GraphTypes';
|
|
6
|
+
type Props = {
|
|
7
|
+
authorEmail: string;
|
|
8
|
+
authorName: string;
|
|
9
|
+
avatarContext?: GraphItemContext;
|
|
10
|
+
avatarUrl?: string;
|
|
11
|
+
clearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
|
|
12
|
+
column: number;
|
|
13
|
+
columnColorByColumn: ColumnColorByColumn;
|
|
14
|
+
commitZoneWidth: number;
|
|
15
|
+
cssVariables: CssVariables;
|
|
16
|
+
currentlyHoveredCommitSha?: Sha;
|
|
17
|
+
edgeColumnMax: number;
|
|
18
|
+
edges: RowEdges;
|
|
19
|
+
getExternalIcon: GetExternalIcon;
|
|
20
|
+
hasRefs: boolean;
|
|
21
|
+
hasTimeline: boolean;
|
|
22
|
+
isActiveSha: boolean;
|
|
23
|
+
isInUnsupportedRebase: boolean;
|
|
24
|
+
isSelected: boolean;
|
|
25
|
+
leftGutterBoxShadowAlpha: number;
|
|
26
|
+
leftGutterWidth: number;
|
|
27
|
+
message: string;
|
|
28
|
+
nodeOffset: number;
|
|
29
|
+
nodeOpacity: number;
|
|
30
|
+
numGraphColumns: number;
|
|
31
|
+
onContextMenu: OnCommitContextMenu;
|
|
32
|
+
onClickCommit: OnClickCommit;
|
|
33
|
+
onDoubleClickCommit: OnDoubleClickCommit;
|
|
34
|
+
rightGutterBoxShadowAlpha: number;
|
|
35
|
+
rightGutterWidth: number;
|
|
36
|
+
rowContext?: GraphItemContext;
|
|
37
|
+
scrollLeft: number;
|
|
38
|
+
setAsCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
|
|
39
|
+
sha: Sha;
|
|
40
|
+
style: Style;
|
|
41
|
+
type: CommitType;
|
|
42
|
+
useAuthorInitialsForAvatars: boolean;
|
|
43
|
+
zoneContext?: GraphItemContext;
|
|
44
|
+
};
|
|
45
|
+
export default class CommitZone extends React.PureComponent<Props> {
|
|
46
|
+
render(): ReactElement<'div'>;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactElement, RefCallback } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { OverlayTrigger } from 'react-bootstrap';
|
|
4
|
+
import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
|
|
5
|
+
import type { GraphItemContext } from '../../../domain/graph/GraphTypes';
|
|
6
|
+
import type { ComponentTooltip } from '../../../domain/ui/UiTypes';
|
|
7
|
+
type Props = {
|
|
8
|
+
authorInitials?: string;
|
|
9
|
+
avatarUrl?: string | null;
|
|
10
|
+
classes?: string[];
|
|
11
|
+
column?: number;
|
|
12
|
+
context?: GraphItemContext | null;
|
|
13
|
+
cssVariables: CssVariables;
|
|
14
|
+
divStyle?: Style;
|
|
15
|
+
fontSize: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
minWidth?: number;
|
|
18
|
+
size: number;
|
|
19
|
+
title?: string;
|
|
20
|
+
tooltip?: ComponentTooltip;
|
|
21
|
+
useAuthorInitialsForAvatars: boolean;
|
|
22
|
+
width?: number;
|
|
23
|
+
};
|
|
24
|
+
type AvatarState = {
|
|
25
|
+
tooltipText?: string;
|
|
26
|
+
};
|
|
27
|
+
interface OverlayTriggerExt extends OverlayTrigger {
|
|
28
|
+
show(): void;
|
|
29
|
+
}
|
|
30
|
+
export default class GraphAvatar extends React.Component<Props, AvatarState> {
|
|
31
|
+
overlayTriggerRef?: OverlayTriggerExt | null;
|
|
32
|
+
constructor(props: Props);
|
|
33
|
+
componentDidUpdate(prevProps: Props, prevState: AvatarState): void;
|
|
34
|
+
getMaybeDefaultAvatar: (height: number, width: number) => ReactElement<'div'>;
|
|
35
|
+
ensureTooltipText: () => void;
|
|
36
|
+
setOverlayTriggerRef: RefCallback<OverlayTriggerExt>;
|
|
37
|
+
render(): ReactElement<any>;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
interface CommonGutterProps {
|
|
3
|
+
boxShadowAlpha: number;
|
|
4
|
+
width: number;
|
|
5
|
+
}
|
|
6
|
+
interface LeftGutterProps extends CommonGutterProps {
|
|
7
|
+
hasTimeline: boolean;
|
|
8
|
+
scrollLeft: number;
|
|
9
|
+
}
|
|
10
|
+
interface RightGutterProps extends LeftGutterProps {
|
|
11
|
+
commitZoneWidth: number;
|
|
12
|
+
}
|
|
13
|
+
interface GutterProps extends CommonGutterProps {
|
|
14
|
+
boxShadowLeft: number;
|
|
15
|
+
children?: any;
|
|
16
|
+
className?: string;
|
|
17
|
+
left: number;
|
|
18
|
+
}
|
|
19
|
+
declare function Gutter({ boxShadowAlpha, boxShadowLeft, children, className, left, width, }: GutterProps): ReactElement<'div'>;
|
|
20
|
+
export default Gutter;
|
|
21
|
+
export declare function LeftGutter({ boxShadowAlpha, hasTimeline, scrollLeft, width }: LeftGutterProps): ReactElement<any>;
|
|
22
|
+
export declare function RightGutter({ boxShadowAlpha, commitZoneWidth, hasTimeline, scrollLeft, width, }: RightGutterProps): ReactElement<any>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommitType } from '../../../../domain/commit/CommitTypes';
|
|
2
|
+
import type { ArcEndpointAngle, ColumnColor, SvgElement } from '../../../../domain/graph/GraphTypes';
|
|
3
|
+
declare function getArc(color: ColumnColor, endAngle: ArcEndpointAngle, startAngle: ArcEndpointAngle, type: CommitType, x: number, y: number): SvgElement;
|
|
4
|
+
export default getArc;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ColumnColorByColumn, RowEdges, SvgElement } from '../../../../domain/graph/GraphTypes';
|
|
2
|
+
export declare function clearEdgeNodesCache(): void;
|
|
3
|
+
export declare function getEdgeNodes(edges: RowEdges, edgeColumnMax: number, nodeColumn: number, columnColorByColumn: ColumnColorByColumn): SvgElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ColumnColorByColumn, RowEdges } from '../../../../domain/graph/GraphTypes';
|
|
4
|
+
type EdgeProps = {
|
|
5
|
+
columnColorByColumn: ColumnColorByColumn;
|
|
6
|
+
edgeColumnMax: number;
|
|
7
|
+
edges: RowEdges;
|
|
8
|
+
nodeColumn: number;
|
|
9
|
+
};
|
|
10
|
+
declare class Edges extends React.Component<EdgeProps> {
|
|
11
|
+
render(): ReactElement<'div'>;
|
|
12
|
+
}
|
|
13
|
+
export default Edges;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommitType } from '../../../../domain/commit/CommitTypes';
|
|
2
|
+
import type { ColumnColorByColumn, SvgElement } from '../../../../domain/graph/GraphTypes';
|
|
3
|
+
export declare function clearEndingEdgeCacheCache(): void;
|
|
4
|
+
export declare function getEndingEdge(edgeColumn: number, nodeColumn: number, type: CommitType, columnColorByColumn: ColumnColorByColumn): SvgElement;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommitType } from '../../../../domain/commit/CommitTypes';
|
|
2
|
+
import type { ColumnColorByColumn, SvgElement } from '../../../../domain/graph/GraphTypes';
|
|
3
|
+
export declare function clearPassThroughEdgeCache(): void;
|
|
4
|
+
export declare function getPassThroughEdge(column: number, type: CommitType, columnColorByColumn: ColumnColorByColumn): SvgElement;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommitType } from '../../../../domain/commit/CommitTypes';
|
|
2
|
+
import type { ColumnColorByColumn, SvgElement } from '../../../../domain/graph/GraphTypes';
|
|
3
|
+
export declare function clearStartingEdgeCache(): void;
|
|
4
|
+
export declare function getStartingEdge(edgeColumn: number, nodeColumn: number, type: CommitType, columnColorByColumn: ColumnColorByColumn): SvgElement;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { GraphZone, GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
4
|
+
import type { ExcludeRefsById, GetExternalIcon, GraphRefOptData, IncludeOnlyRefsById, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnGraphZoneResizeStart, OnToggleRefNodesShown } from '../../../domain/graph/GraphTypes';
|
|
5
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
6
|
+
import type { OnClick, OnMouseEnter, OnMouseLeave } from '../../../domain/ui/UiTypes';
|
|
7
|
+
type GraphHeaderProps = {
|
|
8
|
+
enableResizer?: boolean;
|
|
9
|
+
getExternalIcon: GetExternalIcon;
|
|
10
|
+
graphWidth: number;
|
|
11
|
+
graphHeight: number;
|
|
12
|
+
graphZones: GraphZone[];
|
|
13
|
+
graphZoneType: GraphZoneType;
|
|
14
|
+
excludeRefsById: ExcludeRefsById;
|
|
15
|
+
id: string;
|
|
16
|
+
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
17
|
+
isDraggable: boolean;
|
|
18
|
+
isDroppable: boolean;
|
|
19
|
+
repoPath: string;
|
|
20
|
+
onHover?: OnMouseEnter;
|
|
21
|
+
onResize?: OnGraphZoneResize;
|
|
22
|
+
onResizeEnd?: OnGraphZoneResizeEnd;
|
|
23
|
+
onResizeFromPropChange?: OnGraphZoneResizeFromPropChange;
|
|
24
|
+
onResizeStart?: OnGraphZoneResizeStart;
|
|
25
|
+
onToggleRefNodesShown: OnToggleRefNodesShown;
|
|
26
|
+
onUnhover?: OnMouseLeave;
|
|
27
|
+
showRemoteNamesOnRefs: boolean;
|
|
28
|
+
translate: TranslationFn;
|
|
29
|
+
};
|
|
30
|
+
type GraphHeaderState = {
|
|
31
|
+
showPopoverMenu: boolean;
|
|
32
|
+
refPopoverMenuTarget: React.ReactInstance | undefined;
|
|
33
|
+
};
|
|
34
|
+
declare class GraphHeader extends React.Component<GraphHeaderProps, GraphHeaderState> {
|
|
35
|
+
constructor(props: GraphHeaderProps);
|
|
36
|
+
onHiddenRefsClick: OnClick;
|
|
37
|
+
onShowRefNodes: OnToggleRefNodesShown;
|
|
38
|
+
compareGraphRefOpts(a: GraphRefOptData, b: GraphRefOptData): number;
|
|
39
|
+
render(): ReactElement<any> | null;
|
|
40
|
+
}
|
|
41
|
+
export declare const DraggableGraphHeader: typeof GraphHeader;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
3
|
+
import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
4
|
+
import type { ChildrenElements } from '../../../domain/ui/UiTypes';
|
|
5
|
+
type Props = {
|
|
6
|
+
children: ChildrenElements;
|
|
7
|
+
className?: string;
|
|
8
|
+
height: number;
|
|
9
|
+
heightAdjustment: number;
|
|
10
|
+
graphZoneType: GraphZoneType;
|
|
11
|
+
scrollTop?: number;
|
|
12
|
+
style: Style;
|
|
13
|
+
};
|
|
14
|
+
declare function EntireRowSpan({ children, className, height, heightAdjustment, graphZoneType, scrollTop, style, }: Props): ReactElement<'div'>;
|
|
15
|
+
export default EntireRowSpan;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
|
|
4
|
+
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
5
|
+
import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
6
|
+
import type { GetExternalIcon, GraphItemContext, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit } from '../../../domain/graph/GraphTypes';
|
|
7
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
8
|
+
import type { ChildrenElements } from '../../../domain/ui/UiTypes';
|
|
9
|
+
import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
|
|
10
|
+
type Props = {
|
|
11
|
+
clearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
|
|
12
|
+
children: ChildrenElements;
|
|
13
|
+
column: number;
|
|
14
|
+
context?: GraphItemContext | null;
|
|
15
|
+
currentlyHoveredCommitSha: Sha | null;
|
|
16
|
+
dimRowsOfSelectedCommit?: boolean;
|
|
17
|
+
getExternalIcon: GetExternalIcon;
|
|
18
|
+
graphZoneType: GraphZoneType;
|
|
19
|
+
highlightRowsOnRefHover: boolean;
|
|
20
|
+
isDimmedMergeCommitRow: boolean;
|
|
21
|
+
isHighlighted: boolean;
|
|
22
|
+
isInUnsupportedRebase: boolean;
|
|
23
|
+
isHovering: boolean;
|
|
24
|
+
isMissingHoveredRefGroup?: boolean;
|
|
25
|
+
isSelected: boolean;
|
|
26
|
+
numGraphColumns: number;
|
|
27
|
+
onContextMenu: OnCommitContextMenu;
|
|
28
|
+
onClickCommit: OnClickCommit;
|
|
29
|
+
onDoubleClickCommit: OnDoubleClickCommit;
|
|
30
|
+
rowContext?: GraphItemContext | null;
|
|
31
|
+
setAsCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
|
|
32
|
+
sha: Sha;
|
|
33
|
+
showColorStrip?: boolean;
|
|
34
|
+
showConflictIcon?: boolean;
|
|
35
|
+
showTimeline?: boolean;
|
|
36
|
+
showTimelineMessage?: boolean;
|
|
37
|
+
style: Style;
|
|
38
|
+
title?: string | null;
|
|
39
|
+
translate: TranslationFn;
|
|
40
|
+
type: CommitType;
|
|
41
|
+
workDirStats?: WorkDirStats;
|
|
42
|
+
};
|
|
43
|
+
export default class GenericGraphZone extends React.PureComponent<Props> {
|
|
44
|
+
render(): ReactElement<'div'>;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { GetExternalIcon } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
export type LoadingSpinnerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
getExternalIcon: GetExternalIcon;
|
|
6
|
+
inline?: boolean;
|
|
7
|
+
message?: string | null;
|
|
8
|
+
size?: number;
|
|
9
|
+
useSimpleSpinner?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export default function LoadingSpinner({ inline, getExternalIcon, message, size, useSimpleSpinner, }: LoadingSpinnerProps): ReactElement<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { CommitType } from '../../../domain/commit/CommitTypes';
|
|
3
|
+
interface RefLineCommonProps {
|
|
4
|
+
hasRefs: boolean;
|
|
5
|
+
isActiveSha: boolean;
|
|
6
|
+
type: CommitType;
|
|
7
|
+
}
|
|
8
|
+
interface RefLineProps extends RefLineCommonProps {
|
|
9
|
+
left: number;
|
|
10
|
+
width: string | number;
|
|
11
|
+
}
|
|
12
|
+
interface RefLineForColumnProps extends RefLineCommonProps {
|
|
13
|
+
nodeOffset: number;
|
|
14
|
+
}
|
|
15
|
+
declare function RefLine({ hasRefs, isActiveSha, left, type, width }: RefLineProps): ReactElement<any> | null;
|
|
16
|
+
export default RefLine;
|
|
17
|
+
export declare function RefLineForCommit({ hasRefs, isActiveSha, nodeOffset, type, }: RefLineForColumnProps): ReactElement<typeof RefLine>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Drake } from 'dragula';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export type DndDirection = 'vertical' | 'horizontal';
|
|
5
|
+
export type DndIsDraggable = (source: ReactElement<any>) => boolean;
|
|
6
|
+
export type DndIsDroppable = (source: ReactElement<any>, target: ReactElement<any>) => boolean;
|
|
7
|
+
export type DndOnDrop = (source: ReactElement<any>, target: ReactElement<any> | null) => void;
|
|
8
|
+
export type DndContainerProps = {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
isDroppable?: DndIsDroppable;
|
|
12
|
+
direction?: DndDirection;
|
|
13
|
+
onDrop?: DndOnDrop;
|
|
14
|
+
isDraggable?: DndIsDraggable;
|
|
15
|
+
};
|
|
16
|
+
type DraggulaOnDrop = (el: Element, target: Element, source: Element, sibling: Element) => void;
|
|
17
|
+
type DraggulaIsContainer = (el?: Element) => boolean;
|
|
18
|
+
type DraggulaMoves = (el?: Element, container?: Element, handle?: Element, sibling?: Element) => boolean;
|
|
19
|
+
type DraggulaInvalid = (el?: Element, target?: Element) => boolean;
|
|
20
|
+
type DraggulaAccepts = (el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean;
|
|
21
|
+
type ChildReactElementsById = {
|
|
22
|
+
[id: string]: ReactElement<any>;
|
|
23
|
+
};
|
|
24
|
+
declare class DndContainer extends React.PureComponent<DndContainerProps> {
|
|
25
|
+
dndDrake?: Drake;
|
|
26
|
+
childReactElementsById: ChildReactElementsById;
|
|
27
|
+
constructor(props: DndContainerProps);
|
|
28
|
+
componentDidMount(): void;
|
|
29
|
+
componentWillReceiveProps(nextProps: DndContainerProps): void;
|
|
30
|
+
componentWillUnmount(): void;
|
|
31
|
+
onDrop: DraggulaOnDrop;
|
|
32
|
+
isContainerCallback: DraggulaIsContainer;
|
|
33
|
+
movesCallback: DraggulaMoves;
|
|
34
|
+
acceptsCallback: DraggulaAccepts;
|
|
35
|
+
invalidCallBack: DraggulaInvalid;
|
|
36
|
+
dndDecorator: (instance: HTMLDivElement | null) => void;
|
|
37
|
+
loadChildrenReactElements(children?: ReactNode): void;
|
|
38
|
+
addChildReactElement(element: ReactElement<any>): void;
|
|
39
|
+
sanitizeId(id: string): string;
|
|
40
|
+
isDraggable(id: string): boolean;
|
|
41
|
+
isDroppable(id: string, targetId?: string): boolean;
|
|
42
|
+
render(): ReactElement<any>;
|
|
43
|
+
}
|
|
44
|
+
export default DndContainer;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { GetExternalIcon, GraphItemContext } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
import type { HostingServiceType } from '../../../domain/hostingservice/HostingServiceTypes';
|
|
4
|
+
type IconProps = {
|
|
5
|
+
icon: ReactElement<any>;
|
|
6
|
+
tooltipClassName?: string;
|
|
7
|
+
tooltipId?: string;
|
|
8
|
+
tooltipText?: string;
|
|
9
|
+
};
|
|
10
|
+
type IssueProps = {
|
|
11
|
+
displayId: string;
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
getExternalIcon: GetExternalIcon;
|
|
15
|
+
};
|
|
16
|
+
type RefIconProps = {
|
|
17
|
+
avatarUrl?: string;
|
|
18
|
+
context: GraphItemContext | null;
|
|
19
|
+
icon: ReactElement<any>;
|
|
20
|
+
tooltipText?: string;
|
|
21
|
+
};
|
|
22
|
+
type PullRequestProps = {
|
|
23
|
+
icon: ReactElement<any>;
|
|
24
|
+
hostingServiceType: HostingServiceType;
|
|
25
|
+
id: string | number;
|
|
26
|
+
title: string;
|
|
27
|
+
};
|
|
28
|
+
type UpStreamIndicatorProps = {
|
|
29
|
+
icon: ReactElement<any>;
|
|
30
|
+
type: string;
|
|
31
|
+
upstream: string;
|
|
32
|
+
tooltipText?: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function Icon({ icon, tooltipClassName, tooltipId, tooltipText }: IconProps): ReactElement<any>;
|
|
35
|
+
export declare function IssueIcon({ displayId, id, title, getExternalIcon }: IssueProps): ReactElement<typeof Icon>;
|
|
36
|
+
export declare function PullRequestIcon({ hostingServiceType, icon, id, title }: PullRequestProps): ReactElement<typeof Icon>;
|
|
37
|
+
export declare function UpstreamIndicatorIcon({ icon, type, upstream, tooltipText, }: UpStreamIndicatorProps): ReactElement<typeof Icon>;
|
|
38
|
+
export declare function RefIcon({ avatarUrl, context, icon, tooltipText }: RefIconProps): ReactElement<typeof Icon>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export type OverflowCountProps = {
|
|
3
|
+
hasActive: boolean;
|
|
4
|
+
overflowCount: number;
|
|
5
|
+
};
|
|
6
|
+
declare function OverflowCount({ hasActive, overflowCount }: OverflowCountProps): ReactElement<'span'>;
|
|
7
|
+
export default OverflowCount;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Sha } from '../../../domain/commit/CommitTypes';
|
|
4
|
+
import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRef, GraphRefGroup, OnClickRef, OnClickRefMetadata, OnDoubleClickRef, OnDoubleClickRefMetadata, OnHideRefClick, OnRefNodeHovered, OnRefZoneContextMenu, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
|
|
5
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
6
|
+
import type { OnClick, OnContextMenu, OnDoubleClick } from '../../../domain/ui/UiTypes';
|
|
7
|
+
type RefNodeProps = {
|
|
8
|
+
getExternalIcon: GetExternalIcon;
|
|
9
|
+
groupIsHovered: boolean;
|
|
10
|
+
hasActive: boolean;
|
|
11
|
+
hasRefs: boolean;
|
|
12
|
+
isInUnsupportedRebase: boolean;
|
|
13
|
+
isRefGroupIncluded: boolean;
|
|
14
|
+
onClick: OnClickRef;
|
|
15
|
+
onContextMenu: OnRefZoneContextMenu;
|
|
16
|
+
onDoubleClick: OnDoubleClickRef;
|
|
17
|
+
onHovered: OnRefNodeHovered;
|
|
18
|
+
onMissingRefMetadata: GetMissingRefMetadata;
|
|
19
|
+
onHideRefClick: OnHideRefClick;
|
|
20
|
+
refGroup: GraphRefGroup;
|
|
21
|
+
refGroupContext: GraphItemContext | null;
|
|
22
|
+
refMetadata: RefMetadataById | null;
|
|
23
|
+
sha: Sha;
|
|
24
|
+
enabledRefMetadataTypes: RefMetadataType[];
|
|
25
|
+
translate: TranslationFn;
|
|
26
|
+
};
|
|
27
|
+
export declare function getRefIconAndTooltipForRef(getExternalIcon: GetExternalIcon, ref: GraphRef, translate: TranslationFn, index?: number): ReactElement<any>;
|
|
28
|
+
export default class RefNode extends React.PureComponent<RefNodeProps> {
|
|
29
|
+
onContextMenu: OnContextMenu;
|
|
30
|
+
onClick: OnClick;
|
|
31
|
+
onClickMetadata: OnClickRefMetadata;
|
|
32
|
+
onDoubleClick: OnDoubleClick;
|
|
33
|
+
onDoubleClickMetadata: OnDoubleClickRefMetadata;
|
|
34
|
+
render(): ReactElement<any | 'span'>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Sha } from '../../../domain/commit/CommitTypes';
|
|
3
|
+
import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefNodeHovered, OnRefZoneContextMenu, OnToggleRefNodesShown, GraphRefGroup as RefGroup, RefGroupContexts, RefMetadataById, RefMetadataType, RefTargetFunc } from '../../../domain/graph/GraphTypes';
|
|
4
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
5
|
+
type RefNodesProps = {
|
|
6
|
+
onDoubleClickRef: OnDoubleClickRef;
|
|
7
|
+
enabledRefMetadataTypes: RefMetadataType[];
|
|
8
|
+
column: number;
|
|
9
|
+
context: GraphItemContext | null;
|
|
10
|
+
getExternalIcon: GetExternalIcon;
|
|
11
|
+
getTargetRef: RefTargetFunc;
|
|
12
|
+
hasActive: boolean;
|
|
13
|
+
hasRefs: boolean;
|
|
14
|
+
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
15
|
+
includeOnlyRemotesByName: IncludeOnlyRemotesByName;
|
|
16
|
+
isHovered: boolean;
|
|
17
|
+
isInUnsupportedRebase: boolean;
|
|
18
|
+
numGraphColumns: number;
|
|
19
|
+
onClickRef: OnClickRef;
|
|
20
|
+
onMissingRefMetadata: GetMissingRefMetadata;
|
|
21
|
+
refGroupContexts: RefGroupContexts | null;
|
|
22
|
+
refGroupsByName: RefGroup[];
|
|
23
|
+
refMetadata: RefMetadataById | null;
|
|
24
|
+
refNodeHovered: OnRefNodeHovered;
|
|
25
|
+
onToggleRefNodesShown: OnToggleRefNodesShown;
|
|
26
|
+
sha: Sha;
|
|
27
|
+
showContextMenuForGroupedRef: OnRefZoneContextMenu;
|
|
28
|
+
translate: TranslationFn;
|
|
29
|
+
};
|
|
30
|
+
declare function RefNodes({ enabledRefMetadataTypes, column, context, getTargetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refMetadata, refNodeHovered, sha, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, translate, }: RefNodesProps): ReactElement<'span' | 'div'>;
|
|
31
|
+
export default RefNodes;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { OnMouseEnter, OnMouseLeave } from '../../../domain/ui/UiTypes';
|
|
3
|
+
type RefPopoverStyle = {
|
|
4
|
+
top: number;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
column: number;
|
|
9
|
+
numGraphColumns: number;
|
|
10
|
+
onMouseEnter?: OnMouseEnter;
|
|
11
|
+
onMouseLeave?: OnMouseLeave;
|
|
12
|
+
style?: RefPopoverStyle;
|
|
13
|
+
};
|
|
14
|
+
declare function RefPopover({ style, children, column, numGraphColumns, onMouseEnter, onMouseLeave, }: Props): ReactElement<'div'>;
|
|
15
|
+
export default RefPopover;
|