@gitkraken/gitkraken-components 10.2.6 → 10.2.7

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.
@@ -8,7 +8,7 @@ import type { GraphCommitDescDisplayMode, GraphMarkerType, GraphZone, GraphZoneT
8
8
  import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
9
9
  import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnSettingsClick, OnToggleRefNodesShown, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
10
10
  import type { TranslationFn } from '../../domain/language/LanguageTypes';
11
- import type { CreateRefFormData } from '../../domain/ref/RefTypes';
11
+ import type { CreateRefFormData, RefIconsPosition } from '../../domain/ref/RefTypes';
12
12
  import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
13
13
  import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
14
14
  import type { IGraphContainer } from './IGraphContainer';
@@ -73,6 +73,7 @@ export interface StateProps {
73
73
  isLoadingRows?: boolean;
74
74
  pendingCommitMessageSummary?: string;
75
75
  refMetadataById?: RefMetadataById | null;
76
+ refIconsPosition?: RefIconsPosition | null;
76
77
  repoPath?: string;
77
78
  columnsSettings?: GraphColumnsSettings;
78
79
  themeOpacityFactor?: number;
@@ -154,6 +155,7 @@ type ComponentState = {
154
155
  numGraphColumns: number;
155
156
  pendingCommitMessageSummary: string;
156
157
  processedRows: ProcessedGraphRow[];
158
+ refIconsPosition: RefIconsPosition;
157
159
  refMetadataById?: RefMetadataById | null;
158
160
  rowsStats?: Record<string, RowStats>;
159
161
  rowsStatsLoading: boolean;
@@ -226,6 +228,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
226
228
  componentDidMount(): void;
227
229
  componentWillReceiveProps(nextProps: Props): void;
228
230
  componentWillUnmount(): void;
231
+ getRefIconsPositionOrDefault(refIconsPosition?: RefIconsPosition | null): RefIconsPosition;
229
232
  onGraphVisibleRowsUpdatedThrottled: ThrottledFn;
230
233
  onBlurWipNodeInput: OnWipMessageBlur;
231
234
  onDoubleClickRef: OnDoubleClickRef;
@@ -14,6 +14,7 @@ type IssueProps = {
14
14
  getExternalIcon: GetExternalIcon;
15
15
  };
16
16
  type RefIconProps = {
17
+ avatarClassName?: string;
17
18
  avatarUrl?: string;
18
19
  context: GraphItemContext | null;
19
20
  icon: ReactElement<any>;
@@ -35,5 +36,5 @@ export declare function Icon({ icon, tooltipClassName, tooltipId, tooltipText }:
35
36
  export declare function IssueIcon({ id, toolTipText, getExternalIcon, issueTrackerType, }: IssueProps): ReactElement<typeof Icon>;
36
37
  export declare function PullRequestIcon({ hostingServiceType, icon, id, toolTipText, }: PullRequestProps): ReactElement<typeof Icon>;
37
38
  export declare function UpstreamIndicatorIcon({ icon, type, upstream, tooltipText, }: UpStreamIndicatorProps): ReactElement<typeof Icon>;
38
- export declare function RefIcon({ avatarUrl, context, icon, tooltipText }: RefIconProps): ReactElement<typeof Icon>;
39
+ export declare function RefIcon({ avatarClassName, avatarUrl, context, icon, tooltipText, }: RefIconProps): ReactElement<typeof Icon>;
39
40
  export {};
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  export type RefNameProps = {
3
+ className?: string;
3
4
  name: string;
4
5
  };
5
- declare function RefName({ name }: RefNameProps): ReactElement<'span'>;
6
+ declare function RefName({ className, name }: RefNameProps): ReactElement<'span'>;
6
7
  export default RefName;
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRef, GraphRefGroup, OnClickRef, OnClickRefMetadata, OnDoubleClickRef, OnDoubleClickRefMetadata, OnHideRefClick, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefZoneContextMenu, RefMetadataById, RefMetadataItem, RefMetadataType } from '../../../domain/graph/GraphTypes';
5
5
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
6
+ import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
6
7
  import type { OnClick, OnContextMenu, OnDoubleClick } from '../../../domain/ui/UiTypes';
7
8
  type RefNodeProps = {
8
9
  enableShowHideRefsOptions: boolean;
@@ -29,12 +30,14 @@ type RefNodeProps = {
29
30
  onHideRefClick: OnHideRefClick;
30
31
  refGroup: GraphRefGroup;
31
32
  refGroupContext: GraphItemContext | null;
33
+ refIconsPosition: RefIconsPosition;
32
34
  refMetadata: RefMetadataById | null;
33
35
  sha: Sha;
34
36
  showRemoteNamesOnRefs: boolean;
35
37
  enabledRefMetadataTypes: RefMetadataType[];
36
38
  translate: TranslationFn;
37
39
  type: CommitType;
40
+ useColumnHeaderIcons: boolean;
38
41
  };
39
42
  export declare function getRefIconAndTooltipForRef(getExternalIcon: GetExternalIcon, ref: GraphRef, translate: TranslationFn, index?: number): ReactElement<any>;
40
43
  export default class RefNode extends React.PureComponent<RefNodeProps> {
@@ -2,6 +2,7 @@ import type { ReactElement } from 'react';
2
2
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
3
3
  import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefZoneContextMenu, OnToggleRefNodesShown, GraphRefGroup as RefGroup, RefGroupContexts, RefMetadataById, RefMetadataType, RefTargetFunc } from '../../../domain/graph/GraphTypes';
4
4
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
5
+ import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
5
6
  type RefNodesProps = {
6
7
  onDoubleClickRef: OnDoubleClickRef;
7
8
  enabledRefMetadataTypes: RefMetadataType[];
@@ -22,6 +23,7 @@ type RefNodesProps = {
22
23
  onMissingRefMetadata: GetMissingRefMetadata;
23
24
  refGroupContexts: RefGroupContexts | null;
24
25
  refGroupsByName: RefGroup[];
26
+ refIconsPosition: RefIconsPosition;
25
27
  refMetadata: RefMetadataById | null;
26
28
  refNodeHovered: OnRefNodeHovered;
27
29
  onToggleRefNodesShown: OnToggleRefNodesShown;
@@ -37,6 +39,7 @@ type RefNodesProps = {
37
39
  showContextMenuForGroupedRef: OnRefZoneContextMenu;
38
40
  translate: TranslationFn;
39
41
  type: CommitType;
42
+ useColumnHeaderIcons: boolean;
40
43
  };
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'>;
44
+ declare function RefNodes({ enabledRefMetadataTypes, column, context, enableShowHideRefsOptions, getTargetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refIconsPosition, refMetadata, refNodeHovered, sha, showRemoteNamesOnRefs, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, useColumnHeaderIcons, }: RefNodesProps): ReactElement<'span' | 'div'>;
42
45
  export default RefNodes;
@@ -4,6 +4,7 @@ import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { Style } from '../../../domain/generic/GenericTypes';
5
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, RefTargetFunc } from '../../../domain/graph/GraphTypes';
6
6
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
7
+ import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
7
8
  type RefZoneDefaultProps = {
8
9
  style: Style;
9
10
  };
@@ -37,6 +38,7 @@ type RefZoneProps = {
37
38
  onRefEndDrag: OnRefEndDrag;
38
39
  refGroupContexts: RefGroupContexts | null;
39
40
  refGroupsByName: GraphRefGroup[];
41
+ refIconsPosition: RefIconsPosition;
40
42
  refMetadata: RefMetadataById | null;
41
43
  refNodeHovered: OnRefNodeHovered;
42
44
  refNodeUnhovered: OnRefNodeUnhovered;
@@ -51,6 +53,7 @@ type RefZoneProps = {
51
53
  style: Style;
52
54
  translate: TranslationFn;
53
55
  type: CommitType;
56
+ useColumnHeaderIcons: boolean;
54
57
  width: number;
55
58
  };
56
59
  export default class RefZone extends React.PureComponent<RefZoneProps> {
@@ -2,7 +2,7 @@ import type { GridCellRenderer } from 'react-virtualized';
2
2
  import type { Sha } from '../../../domain/commit/CommitTypes';
3
3
  import type { CommonGraphRowDispatchProps, CommonGraphRowProps, FormatRefShorthand, GetMissingRefMetadata, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefMetadataById } from '../../../domain/graph/GraphTypes';
4
4
  import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
5
- import type { CreateRefFormData } from '../../../domain/ref/RefTypes';
5
+ import type { CreateRefFormData, RefIconsPosition } from '../../../domain/ref/RefTypes';
6
6
  interface OwnProps {
7
7
  height: number;
8
8
  includeOnlyRefsById: IncludeOnlyRefsById;
@@ -15,6 +15,7 @@ interface StateProps {
15
15
  isInUnsupportedRebase: boolean;
16
16
  isRefShorthandValid: IsRefShorthandValid;
17
17
  hoveredRefZoneSha?: Sha;
18
+ refIconsPosition: RefIconsPosition;
18
19
  refMetadataById?: RefMetadataById | null;
19
20
  shouldShowRefLine: boolean;
20
21
  }
@@ -39,6 +39,7 @@ export declare function getVerticalScrollWidth(graphZoneType: GraphZoneType, act
39
39
  export declare const isColumnFollowingGraphColumn: (graphZoneType: GraphZoneType, activeGraphZones: GraphZone[]) => boolean;
40
40
  export declare function getClampedZoneWidth(graphZone: GraphZone, activeGraphZones: GraphZone[], width: number): number;
41
41
  export declare function getGraphZoneFromGraphZones(graphZoneType: GraphZoneType, activeGraphZones: GraphZone[]): GraphZone | undefined;
42
+ export declare function shouldUseColumnHeaderIcons(graphZone?: GraphZone): boolean;
42
43
  export declare function getGraphZoneIndexFromGraphZones(graphZoneType: GraphZoneType, activeGraphZones: GraphZone[]): number;
43
44
  export declare function getGraphZoneWidthConstraintsFromGraphZones(graphZoneType: GraphZoneType, activeGraphZones: GraphZone[], graphWidth: number): GraphColumnWidthConstraints;
44
45
  export declare function getGraphZoneModeConstants(graphZoneMode?: GraphColumnMode): GraphZoneModeConstants;
@@ -87,6 +88,7 @@ export declare class GraphRowHelper {
87
88
  getSelectedRefGroupByName(): GraphRefGroup[];
88
89
  getHorizontalScrollHeight(graphZoneType: GraphZoneType): number;
89
90
  getVerticalScrollWidth(graphZoneType: GraphZoneType): number;
91
+ shouldUseColumnHeaderIcons(graphZoneType: GraphZoneType): boolean;
90
92
  isMissingHoveredRefGroup(rowIndex: number): boolean;
91
93
  isSelected(rowIndex: number): boolean;
92
94
  isSingleSelected(rowIndex: number): boolean;
@@ -1,3 +1,7 @@
1
1
  export declare const refTypes: {
2
2
  [key: string]: string;
3
3
  };
4
+ export declare enum refIconsPositions {
5
+ LEFT = "LEFT",
6
+ RIGHT = "RIGHT"
7
+ }
@@ -9,3 +9,4 @@ export type CreateRefFormData = {
9
9
  type: GraphRefType;
10
10
  data?: any | null;
11
11
  };
12
+ export type RefIconsPosition = RefConstants.refIconsPositions;