@gitkraken/gitkraken-components 13.0.0-vnext.15 → 13.0.0-vnext.16
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.
|
@@ -5,7 +5,7 @@ import type { Sha } from '../../domain/commit/CommitTypes';
|
|
|
5
5
|
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
6
6
|
import type { GraphCommitDescDisplayMode, GraphMarkerType, GraphSearchMode, GraphZone, GraphZoneType, ShiftSelectMode } from '../../domain/graph/GraphConstants';
|
|
7
7
|
import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
|
|
8
|
-
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickGraphRef, OnClickGraphRow, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickGraphRef, OnDoubleClickGraphRow, OnDoubleClickRef, OnEmailsMissingAvatarUrls, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphColumnResized, OnGraphColumnsReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphRefNodeHovered, OnGraphRefNodeUnhovered, OnGraphResized, OnGraphRowHovered, OnGraphRowUnhovered, OnGraphScrollForZone, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnLoadSelectedGraphRow, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefContextMenu, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefsMissingMetadata, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnRowContextMenu, OnScrollForZone, OnSelectGraphRows, OnSettingsClick, OnShowMoreCommits, OnToggleRefNodesShown, OnToggleRefsVisibilityClick, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, ShaByRefId, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
8
|
+
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickGraphRef, OnClickGraphRow, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickGraphRef, OnDoubleClickGraphRow, OnDoubleClickRef, OnEmailsMissingAvatarUrls, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphColumnResized, OnGraphColumnsReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphRefNodeHovered, OnGraphRefNodeUnhovered, OnGraphResized, OnGraphRowHovered, OnGraphRowUnhovered, OnGraphScrollForZone, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnLoadSelectedGraphRow, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefContextMenu, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefsMissingMetadata, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnRowContextMenu, OnScrollForZone, OnSelectGraphRows, OnSettingsClick, OnShowMoreCommits, OnToggleRefNodesShown, OnToggleRefsVisibilityClick, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, ReadonlyGraphRow, RefMetadataById, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, ShaByRefId, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
9
9
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
10
10
|
import type { CreateRefFormData, RefIconsPosition } from '../../domain/ref/RefTypes';
|
|
11
11
|
import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
|
|
@@ -44,6 +44,7 @@ export interface StateProps {
|
|
|
44
44
|
graphCommitDescDisplayMode?: GraphCommitDescDisplayMode;
|
|
45
45
|
graphRows: GraphRow[];
|
|
46
46
|
hasMoreCommits?: boolean;
|
|
47
|
+
hasMoreSearchResults?: boolean;
|
|
47
48
|
highlightedShas?: HighlightedShas;
|
|
48
49
|
excludeByType?: ExcludeByType;
|
|
49
50
|
excludeRefsById?: ExcludeRefsById;
|
|
@@ -282,6 +283,13 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
282
283
|
onRefZoneUnhovered: OnRefZoneUnhovered;
|
|
283
284
|
onShowMoreCommits: OnShowMoreCommits;
|
|
284
285
|
onScrollForZone: OnScrollForZone;
|
|
286
|
+
/**
|
|
287
|
+
* Checks if there are still highlighted commits that haven't been found yet,
|
|
288
|
+
* OR if there are more search results available to load.
|
|
289
|
+
* Used in filter mode to determine if we should continue loading more commits.
|
|
290
|
+
* @returns true if there are unfound highlighted commits or more search results available, false otherwise
|
|
291
|
+
*/
|
|
292
|
+
private hasUnfoundHighlightedCommits;
|
|
285
293
|
loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
|
|
286
294
|
private shouldAutoLoadToFillViewport;
|
|
287
295
|
private autoLoadToFillViewport;
|
|
@@ -295,7 +303,22 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
295
303
|
private isSelectedByShaEqual;
|
|
296
304
|
private _pendingRowsUpdate;
|
|
297
305
|
private _selectionVersion;
|
|
298
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Gets commits rows by SHA
|
|
308
|
+
*
|
|
309
|
+
* @param shas - Array of commit SHAs to get
|
|
310
|
+
* @returns Array of ReadonlyGraphRow objects
|
|
311
|
+
*/
|
|
312
|
+
getCommits(shas: Sha[]): ReadonlyGraphRow[];
|
|
313
|
+
/**
|
|
314
|
+
* Selects commits in the graph
|
|
315
|
+
*
|
|
316
|
+
* @param shas - Array of commit SHAs to select
|
|
317
|
+
* @param includeToPrevSel - If true, toggle selection; if false, replace selection
|
|
318
|
+
* @param isAutoOrKeyScroll - Whether this is an auto-scroll or keyboard navigation
|
|
319
|
+
* @returns Array of selected ReadonlyGraphRow objects
|
|
320
|
+
*/
|
|
321
|
+
selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): ReadonlyGraphRow[];
|
|
299
322
|
getCommitZoneContentWidthBetweenGutters(): number;
|
|
300
323
|
getExcludeRemotesByName(): ExcludeRemotesByName;
|
|
301
324
|
getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
|
|
@@ -70,8 +70,20 @@ export declare const commitAuthorZone: CommitAuthorZoneType;
|
|
|
70
70
|
export declare const commitDateTimeZone: CommitDateTimeZoneType;
|
|
71
71
|
export declare const commitShaZone: CommitShaZoneType;
|
|
72
72
|
export declare const changesZone: ChangesZoneType;
|
|
73
|
-
/**
|
|
74
|
-
|
|
73
|
+
/**
|
|
74
|
+
* A sentinel key used as a key in objects to indicate "empty set" state
|
|
75
|
+
* This distinguishes between:
|
|
76
|
+
* - `{}` (empty object) - no filtering applied or null/undefined
|
|
77
|
+
* - `{ [emptySetMarker]: true }` - filtering applied but yielded no results
|
|
78
|
+
*
|
|
79
|
+
* Example usage:
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const highlightedShas = searchResults.count === 0
|
|
82
|
+
* ? { [emptySetMarker]: true } // No results found
|
|
83
|
+
* : searchResults.ids; // Results found
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare const emptySetMarker = "gk.empty-set-marker";
|
|
75
87
|
export declare enum GraphColumnMode {
|
|
76
88
|
Compact = "compact",
|
|
77
89
|
Rich = "rich",
|
|
@@ -313,6 +313,14 @@ export interface GraphRefsData {
|
|
|
313
313
|
orderedRefGroups: GraphRefGroup[];
|
|
314
314
|
refGroupsByName: GraphRefGroupsByName;
|
|
315
315
|
}
|
|
316
|
+
type ReadonlyDeep<T> = T extends Record<string, unknown> ? {
|
|
317
|
+
readonly [K in keyof T]: ReadonlyDeep<T[K]>;
|
|
318
|
+
} : T extends Array<infer U> ? ReadonlyArray<ReadonlyDeep<U>> : T;
|
|
319
|
+
export interface ReadonlyGraphRow extends ReadonlyDeep<GraphRow> {
|
|
320
|
+
readonly hasRefs?: boolean;
|
|
321
|
+
/** Whether the row is hidden from the graph (filtered out by type or other filters). Output only */
|
|
322
|
+
readonly hidden: boolean;
|
|
323
|
+
}
|
|
316
324
|
export interface ProcessedGraphRow extends GraphRow {
|
|
317
325
|
rowIndex?: number;
|
|
318
326
|
column: number;
|
|
@@ -322,6 +330,8 @@ export interface ProcessedGraphRow extends GraphRow {
|
|
|
322
330
|
edges: RowEdges;
|
|
323
331
|
edgeColumnMaxes: number;
|
|
324
332
|
hasRefs?: boolean;
|
|
333
|
+
/** Whether the row is hidden from the graph (filtered out by type or other filters). Output only */
|
|
334
|
+
hidden: boolean;
|
|
325
335
|
summary: string;
|
|
326
336
|
body?: string;
|
|
327
337
|
timeLineEntry?: TimelineEntry;
|
|
@@ -465,7 +475,7 @@ export type OnDoubleClickGraphRef = (event: React.MouseEvent<any>, refGroup: Gra
|
|
|
465
475
|
export type OnRowContextMenu = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
466
476
|
export type OnRefContextMenu = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
467
477
|
export type OnToggleRefsVisibilityClick = (event: React.MouseEvent<any>, refs: GraphRefOptData[], visible: boolean, graphRow?: GraphRow) => void;
|
|
468
|
-
export type OnSelectGraphRows = (selectedRows:
|
|
478
|
+
export type OnSelectGraphRows = (selectedRows: ReadonlyGraphRow[]) => void;
|
|
469
479
|
export type OnGraphRowHovered = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
470
480
|
export type OnGraphRowUnhovered = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
471
481
|
export type OnGraphRefNodeHovered = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
@@ -476,3 +486,4 @@ export type OnGraphColumnResized = (graphZoneType: GraphZoneType, columnSettings
|
|
|
476
486
|
export type OnShowMoreCommits = () => void;
|
|
477
487
|
export type OnEmailsMissingAvatarUrls = (emails: AvatarUrlByEmail) => void;
|
|
478
488
|
export type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
|
|
489
|
+
export {};
|
|
@@ -41,6 +41,7 @@ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
|
|
|
41
41
|
get tags(): Tag[];
|
|
42
42
|
get hasRefs(): boolean;
|
|
43
43
|
get hasChildRefs(): boolean;
|
|
44
|
+
get hidden(): boolean;
|
|
44
45
|
get refsData(): GraphRefsData | undefined;
|
|
45
46
|
constructor(graphContainer: IGraphContainer, row: GraphRow, column?: number, edgeColumnMaxes?: number, edges?: RowEdges, childRefs?: ChildRefsByType, timeLineEntry?: TimelineEntry, columnForColoring?: number);
|
|
46
47
|
private initializeRefGroups;
|