@gitkraken/gitkraken-components 13.0.0-vnext.16 → 13.0.0-vnext.17

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.
@@ -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;
@@ -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 {};
@@ -0,0 +1,6 @@
1
+ import type { ReactElement } from 'react';
2
+ interface TimelineMessageProps {
3
+ message: string;
4
+ }
5
+ export declare function TimelineMessage({ message }: TimelineMessageProps): ReactElement;
6
+ 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, TimelineEntriesByPeriod } from './GraphConstants';
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 getTimelineEntriesByPeriod(): TimelineEntriesByPeriod;
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 {