@gitkraken/gitkraken-components 13.0.0-vnext.30 → 13.0.0-vnext.32

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,5 +1,5 @@
1
1
  import type { Alignment, ScrollParams } from 'react-virtualized';
2
- import type { ReactElement } from 'react';
2
+ import type { ReactElement, ReactNode } from 'react';
3
3
  import * as React from 'react';
4
4
  import type { Sha } from '../../domain/commit/CommitTypes';
5
5
  import type { CssVariables } from '../../domain/generic/GenericTypes';
@@ -39,7 +39,16 @@ export interface StateProps {
39
39
  contexts?: GraphContexts | null;
40
40
  createRefFormData?: CreateRefFormData | null;
41
41
  dimMergeCommits?: boolean;
42
+ /**
43
+ * Renders the graph as if every row's first parent is its sole parent — the same
44
+ * topology as `git log --first-parent --all`. Set this instead of filtering
45
+ * `--first-parent` upstream so toggling stays a re-process of the cached `graphRows`
46
+ * rather than a re-query. Composes with `scope`: scope walks honor first-parent
47
+ * ordering when this is set.
48
+ */
49
+ onlyFirstParent?: boolean;
42
50
  enableShowHideRefsOptions?: boolean;
51
+ headerZoneActions?: Partial<Record<GraphZoneType, ReactNode>>;
43
52
  downstreamsByUpstream?: DownstreamsByUpstream;
44
53
  formatRefShorthand?: FormatRefShorthand;
45
54
  highlightRowsOnRefHover?: boolean;
@@ -186,6 +195,7 @@ type ComponentState = {
186
195
  cssVariablesWithDefaults: CssVariables;
187
196
  currentlyHoveredCommitSha?: Sha;
188
197
  dimMergeCommits: boolean;
198
+ onlyFirstParent: boolean;
189
199
  dimRowsOfSelectedCommit: boolean;
190
200
  enableShowHideRefsOptions: boolean;
191
201
  highlightRowsOnRefHover: boolean;
@@ -516,6 +526,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
516
526
  formatCommitMessageCallback: FormatCommitMessage;
517
527
  formatRefShorthandCallback: FormatRefShorthand;
518
528
  isRefShorthandValidCallback: IsRefShorthandValid;
529
+ get pinnedBranchFullName(): string | null;
519
530
  translateCallback: TranslationFn;
520
531
  getIconCallback: GetExternalIcon;
521
532
  onMissingAvatar: GetMissingAvatar;
@@ -1,6 +1,6 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
2
  import * as React from 'react';
3
- import type { GraphZone } from '../../domain/graph/GraphConstants';
3
+ import type { GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
4
4
  import type { ExcludeRefsById, GetExternalIcon, GraphColumnsSettings, GraphItemContext, IncludeOnlyRefsById, OnFilterColumnClick, OnGraphColumnReOrdered, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnPopupGraphHeaderContextMenu, OnSettingsClick, OnToggleRefNodesShown } from '../../domain/graph/GraphTypes';
5
5
  import type { TranslationFn } from '../../domain/language/LanguageTypes';
6
6
  import type { OnMouseEnter, OnMouseLeave } from '../../domain/ui/UiTypes';
@@ -13,6 +13,7 @@ type Props = {
13
13
  getExternalIcon: GetExternalIcon;
14
14
  excludeRefsById: ExcludeRefsById;
15
15
  headerContext?: GraphItemContext;
16
+ headerZoneActions?: Partial<Record<GraphZoneType, ReactNode>>;
16
17
  includeOnlyRefsById: IncludeOnlyRefsById;
17
18
  rowsStatsLoading: boolean;
18
19
  onColumnReOrdered?: OnGraphColumnReOrdered;
@@ -3,4 +3,5 @@ import type { TranslationFn } from '../../domain/language/LanguageTypes';
3
3
  export interface IGraphContainer {
4
4
  formatCommitMessageCallback: FormatCommitMessage;
5
5
  translateCallback: TranslationFn;
6
+ pinnedBranchFullName?: string | null;
6
7
  }
@@ -1,4 +1,4 @@
1
- import type { MouseEventHandler, ReactElement } from 'react';
1
+ import type { MouseEventHandler, ReactElement, ReactNode } from 'react';
2
2
  import * as React from 'react';
3
3
  import type { GraphZone, GraphZoneType } from '../../../domain/graph/GraphConstants';
4
4
  import type { ExcludeRefsById, GetExternalIcon, GraphColumnSetting, GraphItemContext, GraphRefOptData, IncludeOnlyRefsById, OnFilterColumnClick, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnGraphZoneResizeStart, OnSettingsClick, OnToggleRefNodesShown } from '../../../domain/graph/GraphTypes';
@@ -14,6 +14,7 @@ type GraphHeaderProps = {
14
14
  graphZones: GraphZone[];
15
15
  graphZoneType: GraphZoneType;
16
16
  excludeRefsById: ExcludeRefsById;
17
+ headerZoneAction?: ReactNode;
17
18
  id: string;
18
19
  includeOnlyRefsById: IncludeOnlyRefsById;
19
20
  isDraggable: boolean;
@@ -13,7 +13,7 @@ export type CachedRowVisibilityState = {
13
13
  hasBaseFilteredTags: boolean;
14
14
  hasFilteredBranches: boolean;
15
15
  };
16
- export declare function getVisibleRowShasWithoutStashAnchoring(graphRows: GraphRow[], cachedRowVisibilityByIndex: CachedRowVisibilityState[], tagsRequireBranchOrVisibleChild: boolean): Set<Sha>;
16
+ export declare function getVisibleRowShasWithoutStashAnchoring(graphRows: GraphRow[], cachedRowVisibilityByIndex: CachedRowVisibilityState[], tagsRequireBranchOrVisibleChild: boolean, onlyFirstParent?: boolean): Set<Sha>;
17
17
  export declare const debounceFrame: (func: DebouncableFn) => DebouncedFn;
18
18
  export type ThrottleableFn = (...args: any) => void;
19
19
  export type ThrottledFn = (...args: any) => void;
@@ -1,5 +1,5 @@
1
1
  import type { GraphRow, GraphScope, ScopeVisibility } from './GraphTypes';
2
- export declare function computeScopeVisibility(rows: GraphRow[], scope: GraphScope): ScopeVisibility;
2
+ export declare function computeScopeVisibility(rows: GraphRow[], scope: GraphScope, onlyFirstParent?: boolean): ScopeVisibility;
3
3
  /**
4
4
  * Returns true when a WIP row should be hidden under an active scope.
5
5
  *