@gitkraken/gitkraken-components 13.0.0-vnext.16 → 13.0.0-vnext.18
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 +4 -2
- package/dist/components/graph/GraphContainer.d.ts +7 -0
- package/dist/components/graph/GraphHeaderRow.d.ts +4 -0
- package/dist/components/graph/common/StickyTimeline.d.ts +10 -0
- package/dist/components/graph/common/TimelineMessage.d.ts +6 -0
- package/dist/components/graph/refzone/RefZone.d.ts +3 -1
- package/dist/components/resizable/Resizable.d.ts +1 -5
- package/dist/domain/graph/GraphHelpers.d.ts +18 -2
- package/dist/index.js +9 -9
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Alignment, GridCellRangeRenderer } from 'react-virtualized';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import type { GraphMarkerType, GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
|
|
4
|
-
import type { ColumnContentGenerator, GetExternalIcon, GraphMarkerColors, GraphMarkerRowIndices, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnScrollForZone, RowRenderersByIds } from '../../domain/graph/GraphTypes';
|
|
4
|
+
import type { ColumnContentGenerator, GetExternalIcon, GraphMarkerColors, GraphMarkerRowIndices, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnScrollForZone, ProcessedGraphRow, RowRenderersByIds } from '../../domain/graph/GraphTypes';
|
|
5
5
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
6
6
|
import type { GetRealKeyForCellFunc } from '../../domain/reactvirtualized/ReactVirtualizedHelpers';
|
|
7
7
|
import type { OnMouseEnter } from '../../domain/ui/UiTypes';
|
|
@@ -32,13 +32,15 @@ type GraphColumnProps = {
|
|
|
32
32
|
onScrollToRowCausedUpdate?: OnScrollForZone;
|
|
33
33
|
onZoneEnter: OnMouseEnter;
|
|
34
34
|
cellRenderersByIds: RowRenderersByIds;
|
|
35
|
+
processedRows?: ProcessedGraphRow[];
|
|
35
36
|
scrollToAlignment?: Alignment;
|
|
36
37
|
scrollToIndex?: number;
|
|
37
38
|
scrollLeft: number;
|
|
38
39
|
scrollTop: number;
|
|
39
40
|
smartCellRangeRenderer: GridCellRangeRenderer;
|
|
41
|
+
stickyTimeline?: boolean;
|
|
40
42
|
translate: TranslationFn;
|
|
41
43
|
verticalScrollWidth: number;
|
|
42
44
|
};
|
|
43
|
-
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isCommitListFiltered, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
45
|
+
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isCommitListFiltered, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, processedRows, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, stickyTimeline, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
44
46
|
export {};
|
|
@@ -41,6 +41,7 @@ export interface StateProps {
|
|
|
41
41
|
enabledScrollMarkerTypes?: GraphMarkerType[];
|
|
42
42
|
scrollRowPadding?: number;
|
|
43
43
|
enableMultiSelection?: boolean;
|
|
44
|
+
stickyTimeline?: boolean;
|
|
44
45
|
graphCommitDescDisplayMode?: GraphCommitDescDisplayMode;
|
|
45
46
|
graphRows: GraphRow[];
|
|
46
47
|
hasMoreCommits?: boolean;
|
|
@@ -417,6 +418,12 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
417
418
|
onGraphContainerBlurred: OnGraphContainerBlurred;
|
|
418
419
|
onGraphContainerMouseEnter: OnGraphMouseEnter;
|
|
419
420
|
onGraphContainerMouseLeave: OnGraphMouseLeave;
|
|
421
|
+
private _headerHoverRestoreTimer?;
|
|
422
|
+
onGraphHeaderMouseDown: () => void;
|
|
423
|
+
onGraphHeaderMouseUp: (event: React.MouseEvent<any>) => void;
|
|
424
|
+
onGraphHeaderWheel: (event: React.WheelEvent<any>) => void;
|
|
425
|
+
onGraphHeaderMouseMove: (event: React.MouseEvent<any>) => void;
|
|
426
|
+
private hoverRowForHeaderEvent;
|
|
420
427
|
onGraphResized: OnGraphResized;
|
|
421
428
|
onGraphVisibleRowsUpdated(): void;
|
|
422
429
|
getCurrentPlatform(): string;
|
|
@@ -29,6 +29,10 @@ type Props = {
|
|
|
29
29
|
translate: TranslationFn;
|
|
30
30
|
width: number;
|
|
31
31
|
height: number;
|
|
32
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement>;
|
|
33
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement>;
|
|
34
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
|
+
onWheel?: React.WheelEventHandler<HTMLDivElement>;
|
|
32
36
|
settingsContext?: GraphItemContext;
|
|
33
37
|
};
|
|
34
38
|
declare class GraphHeaderRow extends React.PureComponent<Props> {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ProcessedGraphRow } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
4
|
+
interface StickyTimelineProps {
|
|
5
|
+
processedRows: ProcessedGraphRow[];
|
|
6
|
+
scrollTop: number;
|
|
7
|
+
translate: TranslationFn;
|
|
8
|
+
}
|
|
9
|
+
export declare function StickyTimeline({ processedRows, scrollTop, translate }: StickyTimelineProps): ReactElement | null;
|
|
10
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import type { ReactElement } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
|
|
4
4
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
5
|
-
import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRefGroup, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefGroupContexts, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
|
|
5
|
+
import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRefGroup, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClearCurrentlyHoveredGraphCommit, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefGroupContexts, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
|
|
6
6
|
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
7
7
|
import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
|
|
8
8
|
type RefZoneDefaultProps = {
|
|
@@ -55,6 +55,8 @@ type RefZoneProps = {
|
|
|
55
55
|
type: CommitType;
|
|
56
56
|
useColumnHeaderIcons: boolean;
|
|
57
57
|
width: number;
|
|
58
|
+
clearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
|
|
59
|
+
currentlyHoveredCommitSha: Sha | null;
|
|
58
60
|
};
|
|
59
61
|
export default class RefZone extends React.PureComponent<RefZoneProps> {
|
|
60
62
|
popoverTargetRef: React.RefObject<HTMLDivElement>;
|
|
@@ -3,7 +3,7 @@ import type { ReactElement, ReactNode } from 'react';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import type { Style } from '../../domain/generic/GenericTypes';
|
|
5
5
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
6
|
-
import type { OnResize, OnResizeEnd, OnResizeFromPropChange, OnResizeStart
|
|
6
|
+
import type { OnResize, OnResizeEnd, OnResizeFromPropChange, OnResizeStart } from '../../domain/ui/UiTypes';
|
|
7
7
|
declare const resizableEdges: {
|
|
8
8
|
bottom: string;
|
|
9
9
|
left: string;
|
|
@@ -60,19 +60,15 @@ interface State extends Dimensions {
|
|
|
60
60
|
initialWidth: number;
|
|
61
61
|
resizing: boolean;
|
|
62
62
|
vertical: boolean;
|
|
63
|
-
isMouseWheeling: boolean;
|
|
64
63
|
}
|
|
65
64
|
export default class Resizable extends React.PureComponent<Props, State> {
|
|
66
65
|
static defaultProps: DefaultProps;
|
|
67
|
-
onWheelTimeOut?: ReturnType<typeof setTimeout>;
|
|
68
|
-
isMouseWheeling: boolean;
|
|
69
66
|
constructor(props: Props);
|
|
70
67
|
static getDerivedStateFromProps(props: Props, state: State): State;
|
|
71
68
|
componentDidUpdate(nextProps: Props): void;
|
|
72
69
|
_onResize: ResizeCallback;
|
|
73
70
|
_onResizeStart: ResizeStartCallback;
|
|
74
71
|
_onResizeEnd: ResizeCallback;
|
|
75
|
-
_onWheel: OnWheel;
|
|
76
72
|
render(): ReactElement<'div'>;
|
|
77
73
|
}
|
|
78
74
|
export {};
|
|
@@ -4,7 +4,7 @@ import type { CssVariables } from '../generic/GenericTypes';
|
|
|
4
4
|
import type { GetRealKeyForCellFunc } from '../reactvirtualized/ReactVirtualizedHelpers';
|
|
5
5
|
import type { GraphRefType } from '../ref/RefTypes';
|
|
6
6
|
import type { WorkDirStats } from '../workdir/WorkDirTypes';
|
|
7
|
-
import type { GraphMarkerType, GraphZone, GraphZoneType,
|
|
7
|
+
import type { GraphMarkerType, GraphZone, GraphZoneType, TimelineEntry } from './GraphConstants';
|
|
8
8
|
import { GraphColumnMode } from './GraphConstants';
|
|
9
9
|
import type { BaseMetadata, ExternalIconKeys, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
|
|
10
10
|
export type DebouncableFn = (...args: any) => void;
|
|
@@ -18,7 +18,22 @@ export declare function hasScrolledToRight(htmlElement: HTMLElement): boolean;
|
|
|
18
18
|
export declare function parseContext(context?: GraphItemContext | null): string | null;
|
|
19
19
|
export declare function getRowStatsConstraints(stats: number[]): RowStatsConstraints;
|
|
20
20
|
export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType): RefMetadata | BaseMetadata | BaseMetadata[] | null | undefined;
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function getTimelineLabelAndValue(diffMs: number): {
|
|
22
|
+
label: string;
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
export declare function getTimelineEntriesByPeriod(): TimelineEntry[];
|
|
26
|
+
/**
|
|
27
|
+
* Assigns timeline entries to graph rows based on commit dates.
|
|
28
|
+
*
|
|
29
|
+
* Timeline markers act as boundaries between time periods:
|
|
30
|
+
* - All commits above a marker must be younger (more recent) than the marker time
|
|
31
|
+
* - All commits at and below a marker must be equal to or older than the marker time
|
|
32
|
+
*
|
|
33
|
+
* @param orderedRows - Array of graph rows ordered from newest to oldest
|
|
34
|
+
* @param entries - Array of timeline entries ordered from newest to oldest
|
|
35
|
+
*/
|
|
36
|
+
export declare function assignTimelineEntriesToRows(orderedRows: ProcessedGraphRow[], entries: TimelineEntry[]): void;
|
|
22
37
|
export declare function getRefIdByBaseRef(refType: GraphRefType, ref: Ref): string;
|
|
23
38
|
export declare function getRefIdByGraphRef(ref: GraphRef): string;
|
|
24
39
|
export declare function getLastShrinkableGraphZone(activeGraphZones: GraphZone[], stoppingIndex?: number): GraphZone | undefined;
|
|
@@ -70,6 +85,7 @@ export interface GraphRowHelperProps {
|
|
|
70
85
|
selectedShas: Set<Sha>;
|
|
71
86
|
processedRows: ProcessedGraphRow[];
|
|
72
87
|
processedGraphRowBySha: ProcessedGraphRowBySha;
|
|
88
|
+
scrollTop: number;
|
|
73
89
|
alwaysShowTimelines?: boolean;
|
|
74
90
|
}
|
|
75
91
|
export declare class GraphRowHelper {
|