@gitkraken/gitkraken-components 10.1.30 → 10.1.31

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.
@@ -329,7 +329,6 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
329
329
  getFilteredRemotesForGraphRow(row: GraphRow, hasIncludes: boolean): Remote[];
330
330
  getFilteredTagsForGraphRow(row: GraphRow, hasIncludes: boolean, rowHasVisibleChild: boolean): Tag[];
331
331
  loadRowsbySha(graphRows: GraphRow[]): void;
332
- private getSummaryAndBody;
333
332
  updateRowStatsConstraints(): void;
334
333
  updateTimelines(): void;
335
334
  clearTimelines(): void;
@@ -10,6 +10,7 @@ type RefNodeProps = {
10
10
  groupIsHovered: boolean;
11
11
  hasActive: boolean;
12
12
  hasRefs: boolean;
13
+ isActive: boolean;
13
14
  isGhostRef: boolean;
14
15
  isInUnsupportedRebase: boolean;
15
16
  isRefGroupIncluded: boolean;
@@ -30,6 +31,7 @@ type RefNodeProps = {
30
31
  refGroupContext: GraphItemContext | null;
31
32
  refMetadata: RefMetadataById | null;
32
33
  sha: Sha;
34
+ showRemoteNamesOnRefs: boolean;
33
35
  enabledRefMetadataTypes: RefMetadataType[];
34
36
  translate: TranslationFn;
35
37
  type: CommitType;
@@ -33,9 +33,10 @@ type RefNodesProps = {
33
33
  onRefDrop: OnRefDrop;
34
34
  onRefEndDrag: OnRefEndDrag;
35
35
  sha: Sha;
36
+ showRemoteNamesOnRefs: boolean;
36
37
  showContextMenuForGroupedRef: OnRefZoneContextMenu;
37
38
  translate: TranslationFn;
38
39
  type: CommitType;
39
40
  };
40
- declare function RefNodes({ enabledRefMetadataTypes, column, context, enableShowHideRefsOptions, getTargetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refMetadata, refNodeHovered, sha, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, }: RefNodesProps): ReactElement<'span' | 'div'>;
41
+ declare function RefNodes({ enabledRefMetadataTypes, column, context, enableShowHideRefsOptions, getTargetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refMetadata, refNodeHovered, sha, showRemoteNamesOnRefs, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, }: RefNodesProps): ReactElement<'span' | 'div'>;
41
42
  export default RefNodes;
@@ -46,6 +46,7 @@ type RefZoneProps = {
46
46
  shouldShowRefLine: boolean;
47
47
  showColorStrip?: boolean;
48
48
  showContextMenuForGroupedRef: OnRefZoneContextMenu;
49
+ showRemoteNamesOnRefs: boolean;
49
50
  enabledRefMetadataTypes: RefMetadataType[];
50
51
  style: Style;
51
52
  translate: TranslationFn;
@@ -33,6 +33,7 @@ export declare const REF_NODE_ICON_MARGIN = 5;
33
33
  export declare const REF_NODE_ICON_SPACING: number;
34
34
  export declare const REF_NODE_OUTER_SPACING = 10;
35
35
  export declare const REF_ZONE_SHOW_ICON_WIDTH = 55;
36
+ export declare const REF_ZONE_MAX_REFS_TO_RENDER = 100;
36
37
  export declare const CHANGES_ZONE_MIN_WIDTH = 50;
37
38
  export declare const CHANGES_BAR_MIN_WIDTH = 10;
38
39
  export declare const CHANGES_BAR_RIGHT_MARGIN = 25;
@@ -6,7 +6,7 @@ import type { GraphRefType } from '../ref/RefTypes';
6
6
  import type { WorkDirStats } from '../workdir/WorkDirTypes';
7
7
  import type { GraphMarkerType, GraphZone, GraphZoneType, TimelineEntriesByPeriod } from './GraphConstants';
8
8
  import { GraphColumnMode } from './GraphConstants';
9
- import type { BaseMetadata, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, HighlightedShas, IsSelectedBySha, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
9
+ import type { BaseMetadata, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, IsSelectedBySha, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
10
10
  export type DebouncableFn = (...args: any) => void;
11
11
  export type DebouncedFn = (...args: any) => void;
12
12
  export declare const debounceFrame: (func: DebouncableFn) => DebouncedFn;
@@ -51,13 +51,9 @@ export declare function workDirStatsHaveChanges(workDirStats?: WorkDirStats): bo
51
51
  export declare function hasSingleSelectedSha(isSelectedBySha: IsSelectedBySha): boolean;
52
52
  export declare function isSingleSelected(isSelectedBySha: IsSelectedBySha, sha: Sha): boolean;
53
53
  export declare function getScrollToAlignment(rowHeight: number, clientHeight: number, scrollTop: number, scrollToIndex: number): Alignment;
54
- export declare function getGraphRefGroup(processedRow: ProcessedGraphRow, showRemoteNamesOnRefs: boolean): GraphRefGroup;
55
- export declare function getGraphRefGroupsByName(refGroupIn: GraphRefGroup): GraphRefGroup[];
56
54
  export declare function getGraphZoneIconByType(zoneType: GraphZoneType): string;
55
+ export declare function isHeadActive(head: Head): boolean;
57
56
  export declare function isGraphRefActive(ref: GraphRef): boolean;
58
- export declare function getActiveGraphRef(refGroup: GraphRefGroup): GraphRef | undefined;
59
- export declare function getActiveRefGroup(refGroups: GraphRefGroup[]): GraphRefGroup | undefined;
60
- export declare function hasActiveRef(refGroup: GraphRefGroup): boolean;
61
57
  export interface GraphRowHelperProps {
62
58
  currentlyHoveredCommitSha?: Sha;
63
59
  cssVariables: CssVariables;
@@ -73,13 +69,11 @@ export interface GraphRowHelperProps {
73
69
  isContainerWindowFocused: boolean;
74
70
  processedRows: ProcessedGraphRow[];
75
71
  processedGraphRowBySha: ProcessedGraphRowBySha;
76
- showRemoteNamesOnRefs: boolean;
77
72
  }
78
73
  export declare class GraphRowHelper {
79
74
  props: GraphRowHelperProps;
80
75
  constructor(props: GraphRowHelperProps);
81
76
  getActiveGraphZone(graphZoneType: GraphZoneType): GraphZone | undefined;
82
- getGraphRefGroupForRow(rowIndex: number): GraphRefGroup;
83
77
  getGraphRefGroupsByNameForRow(rowIndex: number): GraphRefGroup[];
84
78
  getRow(rowIndex: number): ProcessedGraphRow | undefined;
85
79
  getZoneWidth(graphZoneType: GraphZoneType, withoutVerticalScrollWidth?: boolean): number;
@@ -270,6 +270,9 @@ export type GraphRefOptData = {
270
270
  avatarUrl?: string;
271
271
  };
272
272
  export type GraphRefGroup = Array<GraphRef>;
273
+ export type GraphRefGroupsByName = {
274
+ [fullName: RefFullName]: GraphRefGroup;
275
+ };
273
276
  export type HeadsBySha = {
274
277
  [id: Sha]: Head[];
275
278
  };
@@ -300,7 +303,12 @@ export interface GraphRow {
300
303
  remotes?: Remote[];
301
304
  tags?: Tag[];
302
305
  contexts?: RowContexts;
303
- childRefs?: ChildRefsByType;
306
+ }
307
+ export interface GraphRefsData {
308
+ activeGraphRef?: GraphRef;
309
+ activeGraphRefGroup?: GraphRefGroup;
310
+ orderedRefGroups: GraphRefGroup[];
311
+ refGroupsByName: GraphRefGroupsByName;
304
312
  }
305
313
  export interface ProcessedGraphRow extends GraphRow {
306
314
  rowIndex?: number;
@@ -311,6 +319,8 @@ export interface ProcessedGraphRow extends GraphRow {
311
319
  summary: string;
312
320
  body?: string;
313
321
  timeLineEntry?: TimelineEntry;
322
+ childRefs?: ChildRefsByType;
323
+ refsData?: GraphRefsData;
314
324
  }
315
325
  export type TopAndBottomVisibleRowIndex = {
316
326
  top: number;
@@ -0,0 +1,43 @@
1
+ import type { CommitType, Sha } from '../../commit/CommitTypes';
2
+ import type { TimelineEntry } from '../GraphConstants';
3
+ import type { ChildRefsByType, GraphRefsData, GraphRow, Head, ProcessedGraphRow, Remote, RowContexts, RowEdges, Tag } from '../GraphTypes';
4
+ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
5
+ private _message;
6
+ private _heads;
7
+ private _remotes;
8
+ private _tags;
9
+ private _activeGraphRef?;
10
+ private _activeGraphRefGroup?;
11
+ private _refGroupsByName;
12
+ private _orderedRefGroups;
13
+ sha: Sha;
14
+ parents: Sha[];
15
+ author: string;
16
+ email: string;
17
+ date: number;
18
+ type: CommitType;
19
+ contexts?: RowContexts;
20
+ rowIndex?: number;
21
+ column: number;
22
+ edgeColumnMaxes: number;
23
+ edges: RowEdges;
24
+ childRefs: ChildRefsByType;
25
+ summary: string;
26
+ body?: string;
27
+ timeLineEntry?: TimelineEntry;
28
+ set message(message: string);
29
+ get message(): string;
30
+ get heads(): Head[];
31
+ set heads(heads: Head[]);
32
+ set remotes(remotes: Remote[]);
33
+ get remotes(): Remote[];
34
+ set tags(tags: Tag[]);
35
+ get tags(): Tag[];
36
+ get hasRefs(): boolean;
37
+ get refsData(): GraphRefsData | undefined;
38
+ constructor(row: GraphRow, column?: number, edgeColumnMaxes?: number, edges?: RowEdges, childRefs?: ChildRefsByType, timeLineEntry?: TimelineEntry);
39
+ private updateSummaryAndBody;
40
+ private initializeRefGroups;
41
+ private addRefToRefGroup;
42
+ private loadGraphRefGroupsData;
43
+ }