@gitkraken/gitkraken-components 7.0.0 → 7.2.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.
@@ -7,7 +7,7 @@ import type { CssVariables } from '../../domain/generic/GenericTypes';
7
7
  import type { GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
8
8
  import { GraphMarkerType } from '../../domain/graph/GraphConstants';
9
9
  import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
10
- import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnToggleRefNodesShown, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
10
+ import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnToggleRefNodesShown, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
11
11
  import type { TranslationFn } from '../../domain/language/LanguageTypes';
12
12
  import type { OnBlur, OnComponentWillUnmount, OnFocus, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
13
13
  import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
@@ -44,6 +44,7 @@ export interface StateProps {
44
44
  cssVariables?: CssVariables;
45
45
  contexts?: GraphContexts | null;
46
46
  dimMergeCommits?: boolean;
47
+ downstreamsByUpstream?: DownstreamsByUpstream;
47
48
  highlightRowsOnRefHover?: boolean;
48
49
  isContainerWindowFocused?: boolean;
49
50
  showGhostRefsOnRowHover?: boolean;
@@ -150,6 +151,8 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
150
151
  processedGraphRowBySha: ProcessedGraphRowBySha;
151
152
  childrenBySha: ChildrenBySha;
152
153
  scrollToSha?: Sha;
154
+ headSha?: Sha;
155
+ headUpstreamSha?: Sha;
153
156
  lastLazyLoadHeight: number;
154
157
  lastTopVisibleRowIndex: number;
155
158
  lastBottomVisibleRowIndex: number;
@@ -179,6 +182,8 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
179
182
  pendingMissingRefsMetadata: RefsMissingMetadata;
180
183
  requestedMissingRefsMetadata: RefMetadataRequestedById;
181
184
  markerRowIndices: GraphMarkerRowIndices;
185
+ branchUpstreamRowIndices: number[];
186
+ downstreamsByUpstream: DownstreamsByUpstream;
182
187
  timelinesInterval?: NodeJS.Timeout;
183
188
  constructor(props: Props);
184
189
  componentDidMount(): void;
@@ -267,6 +272,7 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
267
272
  onMissingRefMetadata: GetMissingRefMetadata;
268
273
  selectNext(topological?: boolean): void;
269
274
  selectPrevious(topological?: boolean): void;
275
+ selectHead(upstream?: boolean): void;
270
276
  getAvailableColumnAndUseIt(): number;
271
277
  getColumns(graphRow: GraphRow): number;
272
278
  getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
@@ -1,8 +1,9 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import React from 'react';
3
- import type { GraphMarkerType } from '../../domain/graph/GraphConstants';
3
+ import { GraphMarkerType } from '../../domain/graph/GraphConstants';
4
4
  import type { GraphMarkerColors, GraphMarkerRowIndices } from '../../domain/graph/GraphTypes';
5
5
  interface Props {
6
+ branchUpstreamRowIndices: number[];
6
7
  enabledScrollMarkerTypes: GraphMarkerType[];
7
8
  viewportWidth: number;
8
9
  viewportHeight: number;
@@ -331,6 +331,9 @@ export type AvatarUrlByEmail = {
331
331
  export type AvatarUrlRequestedByEmail = {
332
332
  [email: string]: boolean;
333
333
  };
334
+ export type DownstreamsByUpstream = {
335
+ [upstreamName: string]: string[];
336
+ };
334
337
  export type GraphPlatform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin';
335
338
  export type GetExternalIcon = (key: string) => ReactElement<any>;
336
339
  export type GetMissingAvatar = (email: string, sha: string) => void;