@gitkraken/gitkraken-components 10.2.4 → 10.2.6

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.
@@ -6,7 +6,7 @@ import type { Sha } from '../../domain/commit/CommitTypes';
6
6
  import type { CssVariables } from '../../domain/generic/GenericTypes';
7
7
  import type { GraphCommitDescDisplayMode, GraphMarkerType, GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
8
8
  import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
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, 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';
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
11
  import type { CreateRefFormData } from '../../domain/ref/RefTypes';
12
12
  import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
@@ -115,7 +115,7 @@ export interface DispatchProps {
115
115
  onSettingsClick?: OnSettingsClick;
116
116
  onSelectGraphRows?: OnSelectGraphRows;
117
117
  onScrollForZone?: OnGraphScrollForZone;
118
- onScrollToRowCausedUpdateForRefZone?: OnGraphScrollForZone;
118
+ onScrollToRowCausedUpdateForFirstColumn?: OnGraphScrollForZone;
119
119
  onShowMoreCommits?: OnShowMoreCommits;
120
120
  onGraphResized?: OnGraphResized;
121
121
  onGraphVisibleRowsChanged?: OnGraphVisibleRowsChanged;
@@ -179,6 +179,7 @@ type HasMergeNodeChildBySha = {
179
179
  declare class GraphContainer extends React.Component<Props, ComponentState> implements IGraphContainer {
180
180
  graphContainerRef: any;
181
181
  resizeObserver: ResizeObserver;
182
+ isMounted: boolean;
182
183
  isSelectedBySha: IsSelectedBySha;
183
184
  processedGraphRowBySha: ProcessedGraphRowBySha;
184
185
  childrenBySha: ChildrenBySha;
@@ -258,12 +259,13 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
258
259
  onKeyDown: OnKeyDown;
259
260
  onRefNodeHovered: OnRefNodeHovered;
260
261
  onRefNodeUnhovered: OnRefNodeUnhovered;
262
+ onRefShorthandChange: OnRefShorthandChange;
261
263
  onRefZoneHovered: OnRefZoneHovered;
262
264
  onRefZoneUnhovered: OnRefZoneUnhovered;
263
265
  onShowMoreCommits: OnShowMoreCommits;
264
266
  onScrollForZone: OnScrollForZone;
265
267
  loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
266
- onScrollToRowCausedUpdateForRefZone: OnScrollForZone;
268
+ onScrollToRowCausedUpdateForFirstColumn: OnScrollForZone;
267
269
  onCommitContextMenu: OnCommitContextMenu;
268
270
  onRefContextMenu: OnRefZoneContextMenu;
269
271
  selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
@@ -339,6 +341,8 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
339
341
  updateRowStatsConstraints(): void;
340
342
  updateTimelines(): void;
341
343
  clearTimelines(): void;
344
+ clearTimelinesInterval(): void;
345
+ onTimelinesRefreshInterval: () => void;
342
346
  cleanupSelections(): void;
343
347
  getColumnColorByColumn(cssVariables: CssVariables): ColumnColorByColumn;
344
348
  getNumGraphColumns(cssVariables: CssVariables): number;
@@ -15,7 +15,8 @@ export type Props = {
15
15
  displayHorizontalScrollbar?: boolean;
16
16
  displayVerticalScrollbar?: boolean;
17
17
  forceHorizontalScrollbar?: boolean;
18
- forceOnWheel?: boolean;
18
+ forceOnHorizontalWheel?: boolean;
19
+ forceOnVerticalWheel?: boolean;
19
20
  forceVerticalScrollbar?: boolean;
20
21
  height?: number;
21
22
  onScroll?: ((params: ScrollParams) => any) | undefined;
@@ -24,16 +25,21 @@ export type Props = {
24
25
  width?: number;
25
26
  };
26
27
  declare class ScrollbarContainer extends React.PureComponent<Props> {
28
+ resizeObserver: ResizeObserver;
29
+ scrollbarContainerRef: React.RefObject<any>;
27
30
  horizontalScrollRef: React.RefObject<any>;
28
31
  scrollabbleContentRef: React.RefObject<any>;
29
32
  verticalScrollRef: React.RefObject<any>;
30
33
  outerHorizontalScrollRef: React.RefObject<any>;
34
+ constructor(props: Props);
31
35
  updateScrollbarValues(scrollLeft?: number, scrollTop?: number): void;
32
36
  componentDidUpdate(prevProps: Props): void;
33
37
  onHorizontalScroll(event: any): void;
34
38
  onVerticalScroll(event: any): void;
35
39
  onWheel(event: React.WheelEvent): void;
36
40
  componentDidMount(): void;
41
+ componentWillUnmount(): void;
42
+ onContainerResized: import("../../../domain/graph/GraphHelpers").DebouncedFn;
37
43
  hasHorizontalScroll(): boolean;
38
44
  hasVerticalScroll(): boolean;
39
45
  getHorizontalScrollbarTickness(): number;
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import React from 'react';
3
3
  import type { Style } from '../../../domain/generic/GenericTypes';
4
- import type { FormatRefShorthand, IsRefShorthandValid, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu } from '../../../domain/graph/GraphTypes';
4
+ import type { FormatRefShorthand, IsRefShorthandValid, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefShorthandChange } from '../../../domain/graph/GraphTypes';
5
5
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
6
6
  import type { CreateRefFormData, RefShorthand } from '../../../domain/ref/RefTypes';
7
7
  type CreateRefNodeProps = {
@@ -11,6 +11,7 @@ type CreateRefNodeProps = {
11
11
  onCancel: OnRefCreateCancel;
12
12
  onContextMenu: OnRefCreateContextMenu;
13
13
  onRefCreate: OnRefCreate;
14
+ onRefShorthandChange?: OnRefShorthandChange;
14
15
  refZoneWidth: number;
15
16
  style?: Style | null;
16
17
  translate: TranslationFn;
@@ -1,6 +1,6 @@
1
1
  import type { GridCellRenderer } from 'react-virtualized';
2
2
  import type { Sha } from '../../../domain/commit/CommitTypes';
3
- import type { CommonGraphRowDispatchProps, CommonGraphRowProps, FormatRefShorthand, GetMissingRefMetadata, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefMetadataById } from '../../../domain/graph/GraphTypes';
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
5
  import type { CreateRefFormData } from '../../../domain/ref/RefTypes';
6
6
  interface OwnProps {
@@ -35,6 +35,7 @@ interface DispatchProps {
35
35
  onRefEndDrag: OnRefEndDrag;
36
36
  onRefNodeHovered: OnRefNodeHovered;
37
37
  onRefNodeUnhovered: OnRefNodeUnhovered;
38
+ onRefShorthandChange: OnRefShorthandChange;
38
39
  onRefZoneHovered: OnRefZoneHovered;
39
40
  onRefZoneUnhovered: OnRefZoneUnhovered;
40
41
  onToggleRefNodesShown: OnToggleRefNodesShown;
@@ -21,6 +21,7 @@ type State = {
21
21
  declare class Avatar extends React.Component<Props, State> {
22
22
  private image;
23
23
  constructor(props: Props);
24
+ static getDerivedStateFromProps(props: Props, state: State): State;
24
25
  componentDidMount(): void;
25
26
  componentDidUpdate(prevProps: Props): void;
26
27
  componentWillUnmount(): void;
@@ -4,6 +4,7 @@ export declare const GRAPH_HEADER_ROW_HEIGHT = 26;
4
4
  export declare const GRAPH_ROW_HEIGHT = 28;
5
5
  export declare const GRAPH_ROW_INNER_HEIGHT = 22;
6
6
  export declare const GRAPH_ROW_LAZY_LOAD_COMMITS_OFFSET: number;
7
+ export declare const GRAPH_ROW_PADDING: number;
7
8
  export declare const COMMIT_NODE_MIN_ALPHA = 0.5;
8
9
  export declare const COMMIT_ZONE_MARGIN_BOTTOM = 3;
9
10
  export declare const COMMIT_ZONE_MARGIN_TOP = 3;
@@ -14,6 +14,7 @@ export type ThrottleableFn = (...args: any) => void;
14
14
  export type ThrottledFn = (...args: any) => void;
15
15
  export declare const throttle: (func: ThrottleableFn, time: number, initial?: number) => ThrottledFn;
16
16
  export declare function hasScrolledToBottom(htmlElement: HTMLElement): boolean;
17
+ export declare function hasScrolledToRight(htmlElement: HTMLElement): boolean;
17
18
  export declare function parseContext(context?: GraphItemContext | null): string | null;
18
19
  export declare function getRowStatsConstraints(stats: number[]): RowStatsConstraints;
19
20
  export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType): RefMetadata | BaseMetadata | BaseMetadata[] | null | undefined;
@@ -447,3 +447,4 @@ export type OnFilterColumnClick = (event: React.MouseEvent<any>, graphZoneType:
447
447
  export type OnRefCreate = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
448
448
  export type OnRefCreateCancel = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
449
449
  export type OnRefCreateContextMenu = (event: React.MouseEvent<any>, shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
450
+ export type OnRefShorthandChange = (shorthand: RefShorthand) => void;
@@ -39,6 +39,7 @@ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
39
39
  set tags(tags: Tag[]);
40
40
  get tags(): Tag[];
41
41
  get hasRefs(): boolean;
42
+ get hasChildRefs(): boolean;
42
43
  get refsData(): GraphRefsData | undefined;
43
44
  constructor(graphContainer: IGraphContainer, row: GraphRow, column?: number, edgeColumnMaxes?: number, edges?: RowEdges, childRefs?: ChildRefsByType, timeLineEntry?: TimelineEntry);
44
45
  private updateSummaryAndBody;