@gitkraken/gitkraken-components 13.0.0-vnext.10 → 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.
- package/dist/components/dnd/DndComponent.d.ts +1 -1
- package/dist/components/dnd/DndContainer.d.ts +1 -1
- package/dist/components/graph/GraphColumn.d.ts +2 -1
- package/dist/components/graph/GraphContainer.d.ts +46 -13
- package/dist/components/graph/GraphHeaderRow.d.ts +1 -1
- package/dist/components/graph/GraphScrollMarker.d.ts +1 -1
- package/dist/components/graph/commitzone/CommitNode.d.ts +1 -1
- package/dist/components/graph/commitzone/CommitZone.d.ts +1 -1
- package/dist/components/graph/commitzone/GraphAvatar.d.ts +1 -1
- package/dist/components/graph/commitzone/edges/Edges.d.ts +1 -1
- package/dist/components/graph/common/DraggableGraphHeader.d.ts +1 -1
- package/dist/components/graph/common/GenericGraphZone.d.ts +1 -1
- package/dist/components/graph/common/ScrollbarContainer.d.ts +1 -1
- package/dist/components/graph/messagezone/WorkDirMessageInput.d.ts +1 -1
- package/dist/components/graph/refzone/CreateRefNode.d.ts +1 -1
- package/dist/components/graph/refzone/RefNode.d.ts +1 -1
- package/dist/components/graph/rowRenderers/CommitsInfoRow.d.ts +1 -1
- package/dist/components/graph/shared/Avatar.d.ts +1 -1
- package/dist/components/graph/shared/FileDiffTypeIcon.d.ts +2 -1
- package/dist/components/graph/shared/WipStatsPill.d.ts +11 -0
- package/dist/components/resizable/Resizable.d.ts +2 -2
- package/dist/domain/generic/GenericTypes.d.ts +4 -0
- package/dist/domain/graph/GraphConstants.d.ts +14 -0
- package/dist/domain/graph/GraphTypes.d.ts +19 -6
- package/dist/domain/graph/row/ProcessedGraphRowObj.d.ts +4 -4
- package/dist/domain/reactvirtualized/ReactVirtualizedHelpers.d.ts +1 -1
- package/dist/index.js +8 -9
- package/dist/styles.css +1 -1
- package/dist/utils/ObjectUtils.d.ts +29 -0
- package/package.json +94 -96
- package/CHANGELOG.md +0 -18
- package/ThirdPartyNotices.txt +0 -227
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export type DndCanDrag = (sourceData?: any) => boolean;
|
|
4
4
|
export type DndOnBeginDrag = (event: React.DragEvent, sourceData?: any) => void;
|
|
5
5
|
export type DndOnDragEnter = (event: React.DragEvent, sourceData?: any, targetData?: any) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Drake } from 'dragula';
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
export type DndDirection = 'vertical' | 'horizontal';
|
|
5
5
|
export type DndIsDraggable = (source: ReactElement<any>) => boolean;
|
|
6
6
|
export type DndIsDroppable = (source: ReactElement<any>, target: ReactElement<any>) => boolean;
|
|
@@ -20,6 +20,7 @@ type GraphColumnProps = {
|
|
|
20
20
|
graphZones: GraphZone[];
|
|
21
21
|
hasMoreCommits: boolean;
|
|
22
22
|
horizontalScrollHeight: number;
|
|
23
|
+
isCommitListFiltered: boolean;
|
|
23
24
|
isLoadingRows: boolean;
|
|
24
25
|
markerColors: GraphMarkerColors;
|
|
25
26
|
markerRowIndices: GraphMarkerRowIndices;
|
|
@@ -39,5 +40,5 @@ type GraphColumnProps = {
|
|
|
39
40
|
translate: TranslationFn;
|
|
40
41
|
verticalScrollWidth: number;
|
|
41
42
|
};
|
|
42
|
-
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
43
|
+
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isCommitListFiltered, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
43
44
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Alignment, ScrollParams } from 'react-virtualized';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
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;
|
|
@@ -164,6 +165,7 @@ type HasMergeNodeChildBySha = {
|
|
|
164
165
|
[sha: Sha]: boolean;
|
|
165
166
|
};
|
|
166
167
|
declare class GraphContainer extends React.Component<Props, ComponentState> implements IGraphContainer {
|
|
168
|
+
static getDerivedStateFromProps(props: Props, state: ComponentState): Partial<ComponentState> | null;
|
|
167
169
|
private graphComponentRef;
|
|
168
170
|
private graphContainerRef;
|
|
169
171
|
private resizeObserver;
|
|
@@ -189,10 +191,12 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
189
191
|
shouldFireShowMoreCommits: boolean;
|
|
190
192
|
columnsToFreeWhenFound: ColumnsToFreeBySha;
|
|
191
193
|
hasMergeNodeChildBySha: HasMergeNodeChildBySha;
|
|
194
|
+
private _autoLoadTimer?;
|
|
192
195
|
reserverInfoBySha: ReserverInfoBySha;
|
|
193
196
|
columnsUsed: ColumnsUsed;
|
|
194
197
|
rowsStats?: Record<string, RowStats>;
|
|
195
198
|
workDirStats: WorkDirStats;
|
|
199
|
+
private _markerColorsCache;
|
|
196
200
|
excludeByType: ExcludeByType;
|
|
197
201
|
excludeRefsById: ExcludeRefsById;
|
|
198
202
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
@@ -208,18 +212,18 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
208
212
|
graphZonesByType: GraphZonesByType;
|
|
209
213
|
graphZoneOrdering: GraphZoneType[];
|
|
210
214
|
clientHeight: number;
|
|
211
|
-
missingAvatarsTimer?:
|
|
215
|
+
missingAvatarsTimer?: ReturnType<typeof setTimeout>;
|
|
212
216
|
pendingMissingAvatars: AvatarUrlByEmail;
|
|
213
217
|
requestedMissingAvatars: AvatarUrlRequestedByEmail;
|
|
214
|
-
missingRefsMetadataTimer?:
|
|
218
|
+
missingRefsMetadataTimer?: ReturnType<typeof setTimeout>;
|
|
215
219
|
pendingMissingRefsMetadata: RefsMissingMetadata;
|
|
216
220
|
requestedMissingRefsMetadata: RefMetadataRequestedById;
|
|
217
221
|
branchUpstreamRowIndices: number[];
|
|
218
222
|
downstreamsByUpstream: DownstreamsByUpstream;
|
|
219
|
-
timelinesInterval?:
|
|
223
|
+
timelinesInterval?: ReturnType<typeof setInterval>;
|
|
220
224
|
constructor(props: Props);
|
|
221
225
|
componentDidMount(): void;
|
|
222
|
-
|
|
226
|
+
componentDidUpdate(prevProps: Props, prevState: ComponentState): void;
|
|
223
227
|
componentWillUnmount(): void;
|
|
224
228
|
focus(): void;
|
|
225
229
|
getRefIconsPositionOrDefault(refIconsPosition?: RefIconsPosition | null): RefIconsPosition;
|
|
@@ -279,27 +283,52 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
279
283
|
onRefZoneUnhovered: OnRefZoneUnhovered;
|
|
280
284
|
onShowMoreCommits: OnShowMoreCommits;
|
|
281
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;
|
|
282
293
|
loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
|
|
294
|
+
private shouldAutoLoadToFillViewport;
|
|
295
|
+
private autoLoadToFillViewport;
|
|
283
296
|
onScrollToRowCausedUpdateForFirstColumn: OnScrollForZone;
|
|
284
297
|
onCommitContextMenu: OnCommitContextMenu;
|
|
285
298
|
onRefContextMenu: OnRefZoneContextMenu;
|
|
286
|
-
/**
|
|
287
|
-
* Check if an object has any keys (more efficient than Object.keys().length > 0)
|
|
288
|
-
*/
|
|
289
|
-
private hasAnyKey;
|
|
290
299
|
/**
|
|
291
300
|
* Deep equality check for isSelectedBySha objects to avoid unnecessary scroll-to-selection
|
|
292
301
|
* when object reference changes but content is the same (e.g., after postMessage serialization)
|
|
293
302
|
*/
|
|
294
303
|
private isSelectedByShaEqual;
|
|
295
|
-
|
|
304
|
+
private _pendingRowsUpdate;
|
|
305
|
+
private _selectionVersion;
|
|
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[];
|
|
296
322
|
getCommitZoneContentWidthBetweenGutters(): number;
|
|
297
|
-
getSelectedShas(): Sha[];
|
|
298
323
|
getExcludeRemotesByName(): ExcludeRemotesByName;
|
|
299
324
|
getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
|
|
300
325
|
clearScrollToIndex: ClearScrollToIndex;
|
|
301
326
|
getTopAndBottomVisibleRowIndex(): TopAndBottomVisibleRowIndex;
|
|
302
|
-
getOffsetSha(sha: Sha): Sha;
|
|
327
|
+
getOffsetSha(sha: Sha, scrollDirection: 'up' | 'down' | 'none', lastScrollDirection: 'up' | 'down' | 'none' | undefined, isAutoOrKeyScroll: boolean): Sha;
|
|
328
|
+
private _pendingScrollUpdate;
|
|
329
|
+
private _lastSelectedRowIndex;
|
|
330
|
+
private _lastScrollDirection;
|
|
331
|
+
private _scrollToAlignmentOverride;
|
|
303
332
|
selectSha(sha: Sha, isAutoOrKeyScroll?: boolean): void;
|
|
304
333
|
updateWidthByZone(widthToAssignForZone: number, graphZoneType: GraphZoneType, updatePreferredWidth?: boolean): void;
|
|
305
334
|
updateCommitZoneContentWidthFromChange(): void;
|
|
@@ -356,6 +385,10 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
356
385
|
selectNext(topological?: boolean): void;
|
|
357
386
|
selectPrevious(topological?: boolean): void;
|
|
358
387
|
selectHead(upstream?: boolean): void;
|
|
388
|
+
selectFirst(shiftKey?: boolean): void;
|
|
389
|
+
selectLast(shiftKey?: boolean): void;
|
|
390
|
+
selectPageUp(shiftKey?: boolean): void;
|
|
391
|
+
selectPageDown(shiftKey?: boolean): void;
|
|
359
392
|
getAvailableColumnAndUseIt(): number;
|
|
360
393
|
getColumns(graphRow: GraphRow): number;
|
|
361
394
|
getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { GraphZone } 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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { GraphMarkerType } from '../../domain/graph/GraphConstants';
|
|
4
4
|
import type { GraphMarkerColors, GraphMarkerRowIndices } from '../../domain/graph/GraphTypes';
|
|
5
5
|
interface Props {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { CommitType } from '../../../domain/commit/CommitTypes';
|
|
4
4
|
import type { CssVariables } from '../../../domain/generic/GenericTypes';
|
|
5
5
|
import type { GetExternalIcon, GraphItemContext, GraphZoneModeConstants } from '../../../domain/graph/GraphTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
|
|
4
4
|
import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
|
|
5
5
|
import type { ColumnColorByColumn, GetExternalIcon, GraphItemContext, GraphZoneModeConstants, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, RowEdges } from '../../../domain/graph/GraphTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
|
|
4
4
|
import type { GraphItemContext } from '../../../domain/graph/GraphTypes';
|
|
5
5
|
import type { ComponentTooltip } from '../../../domain/ui/UiTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { ColumnColorByColumn, GraphZoneModeConstants, RowEdges } from '../../../../domain/graph/GraphTypes';
|
|
4
4
|
type EdgeProps = {
|
|
5
5
|
columnColorByColumn: ColumnColorByColumn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MouseEventHandler, ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
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';
|
|
5
5
|
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
|
|
4
4
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
5
5
|
import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { Sha } from '../../../domain/commit/CommitTypes';
|
|
4
4
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
5
5
|
import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
4
4
|
import type { FormatRefShorthand, IsRefShorthandValid, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefShorthandChange } from '../../../domain/graph/GraphTypes';
|
|
5
5
|
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as 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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
4
4
|
import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
|
|
5
5
|
import type { GetExternalIcon } from '../../../domain/graph/GraphTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
4
4
|
import type { GetExternalIcon } from '../../../domain/graph/GraphTypes';
|
|
5
5
|
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
@@ -8,6 +8,7 @@ type Props = {
|
|
|
8
8
|
fileDiffType: string;
|
|
9
9
|
getExternalIcon: GetExternalIcon;
|
|
10
10
|
translate: TranslationFn;
|
|
11
|
+
noMargin?: boolean;
|
|
11
12
|
};
|
|
12
13
|
declare class FileDiffTypeIcon extends React.Component<Props> {
|
|
13
14
|
render(): ReactElement<'span'> | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { GetExternalIcon } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
4
|
+
import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
|
|
5
|
+
type Props = {
|
|
6
|
+
workDirStats: WorkDirStats;
|
|
7
|
+
getExternalIcon: GetExternalIcon;
|
|
8
|
+
translate: TranslationFn;
|
|
9
|
+
};
|
|
10
|
+
declare function WipStatsPill({ workDirStats, getExternalIcon, translate }: Props): ReactElement<'span'> | null;
|
|
11
|
+
export default WipStatsPill;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HandleStyles, ResizeCallback, ResizeStartCallback } from 're-resizable';
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import type { Style } from '../../domain/generic/GenericTypes';
|
|
5
5
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
6
6
|
import type { OnResize, OnResizeEnd, OnResizeFromPropChange, OnResizeStart, OnWheel } from '../../domain/ui/UiTypes';
|
|
@@ -64,7 +64,7 @@ interface State extends Dimensions {
|
|
|
64
64
|
}
|
|
65
65
|
export default class Resizable extends React.PureComponent<Props, State> {
|
|
66
66
|
static defaultProps: DefaultProps;
|
|
67
|
-
onWheelTimeOut?:
|
|
67
|
+
onWheelTimeOut?: ReturnType<typeof setTimeout>;
|
|
68
68
|
isMouseWheeling: boolean;
|
|
69
69
|
constructor(props: Props);
|
|
70
70
|
static getDerivedStateFromProps(props: Props, state: State): State;
|
|
@@ -17,7 +17,11 @@ export declare enum NamedKeys {
|
|
|
17
17
|
arrowDownKey = "ArrowDown",
|
|
18
18
|
arrowUpKey = "ArrowUp",
|
|
19
19
|
controlKey = "Control",
|
|
20
|
+
endKey = "End",
|
|
21
|
+
homeKey = "Home",
|
|
20
22
|
metaKey = "Meta",
|
|
23
|
+
pageDownKey = "PageDown",
|
|
24
|
+
pageUpKey = "PageUp",
|
|
21
25
|
shiftKey = "Shift"
|
|
22
26
|
}
|
|
23
27
|
export type MapWithCacheQueue<T, U> = {
|
|
@@ -70,6 +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
|
+
* 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";
|
|
73
87
|
export declare enum GraphColumnMode {
|
|
74
88
|
Compact = "compact",
|
|
75
89
|
Rich = "rich",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridCellRenderer, ScrollParams } from 'react-virtualized';
|
|
2
|
-
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
3
3
|
import type { CommitDateTimeSources } from '../commit/CommitConstants';
|
|
4
4
|
import type { CommitType, Sha } from '../commit/CommitTypes';
|
|
5
5
|
import type { CssVariables } from '../generic/GenericTypes';
|
|
@@ -313,16 +313,25 @@ 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;
|
|
319
327
|
columnForColoring?: number;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
displayBody?: string;
|
|
328
|
+
displaySummary: string | ReactNode;
|
|
329
|
+
displayBody?: string | ReactNode;
|
|
323
330
|
edges: RowEdges;
|
|
324
331
|
edgeColumnMaxes: number;
|
|
325
332
|
hasRefs?: boolean;
|
|
333
|
+
/** Whether the row is hidden from the graph (filtered out by type or other filters). Output only */
|
|
334
|
+
hidden: boolean;
|
|
326
335
|
summary: string;
|
|
327
336
|
body?: string;
|
|
328
337
|
timeLineEntry?: TimelineEntry;
|
|
@@ -430,7 +439,10 @@ export type OnGraphMouseLeave = (event: React.MouseEvent<any>) => void;
|
|
|
430
439
|
export type OnClearCurrentlyHoveredGraphCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha, currentlyHoveredCommitSha?: Sha) => void;
|
|
431
440
|
export type CommitDateTimeSource = CommitDateTimeSources;
|
|
432
441
|
export type OnFormatCommitDateTime = (commitDateTime: number, source?: CommitDateTimeSource) => string;
|
|
433
|
-
export type FormatCommitMessage = (commitMessage: string) =>
|
|
442
|
+
export type FormatCommitMessage = (commitMessage: string) => {
|
|
443
|
+
summary: string | ReactNode;
|
|
444
|
+
body?: string | ReactNode;
|
|
445
|
+
};
|
|
434
446
|
export type OnCurrentlyHoveredGraphCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha, currentlyHoveredCommitSha?: Sha) => void;
|
|
435
447
|
export type OnClickCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha) => void;
|
|
436
448
|
export type OnClickRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, sha: Sha, metadataItem?: RefMetadataItem) => void;
|
|
@@ -463,7 +475,7 @@ export type OnDoubleClickGraphRef = (event: React.MouseEvent<any>, refGroup: Gra
|
|
|
463
475
|
export type OnRowContextMenu = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
464
476
|
export type OnRefContextMenu = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
465
477
|
export type OnToggleRefsVisibilityClick = (event: React.MouseEvent<any>, refs: GraphRefOptData[], visible: boolean, graphRow?: GraphRow) => void;
|
|
466
|
-
export type OnSelectGraphRows = (selectedRows:
|
|
478
|
+
export type OnSelectGraphRows = (selectedRows: ReadonlyGraphRow[]) => void;
|
|
467
479
|
export type OnGraphRowHovered = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
468
480
|
export type OnGraphRowUnhovered = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
469
481
|
export type OnGraphRefNodeHovered = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
|
|
@@ -474,3 +486,4 @@ export type OnGraphColumnResized = (graphZoneType: GraphZoneType, columnSettings
|
|
|
474
486
|
export type OnShowMoreCommits = () => void;
|
|
475
487
|
export type OnEmailsMissingAvatarUrls = (emails: AvatarUrlByEmail) => void;
|
|
476
488
|
export type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
|
|
489
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { IGraphContainer } from '../../../components/graph/IGraphContainer';
|
|
2
3
|
import type { CommitType, Sha } from '../../commit/CommitTypes';
|
|
3
4
|
import type { TimelineEntry } from '../GraphConstants';
|
|
@@ -28,9 +29,8 @@ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
|
|
|
28
29
|
timeLineEntry?: TimelineEntry;
|
|
29
30
|
summary: string;
|
|
30
31
|
body?: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
displayBody?: string;
|
|
32
|
+
displaySummary: string | ReactNode;
|
|
33
|
+
displayBody?: string | ReactNode;
|
|
34
34
|
set message(message: string);
|
|
35
35
|
get message(): string;
|
|
36
36
|
get heads(): Head[];
|
|
@@ -41,9 +41,9 @@ 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
|
-
private updateSummaryAndBody;
|
|
47
47
|
private initializeRefGroups;
|
|
48
48
|
private addRefToRefGroup;
|
|
49
49
|
private loadGraphRefGroupsData;
|
|
@@ -8,4 +8,4 @@ export type CustomCellCacheValue = {
|
|
|
8
8
|
export type CustomCellCache = {
|
|
9
9
|
[key: string]: CustomCellCacheValue;
|
|
10
10
|
};
|
|
11
|
-
export declare const makeSmartCellRangeRenderer: (getRealKeyForCell: GetRealKeyForCellFunc) => GridCellRangeRenderer;
|
|
11
|
+
export declare const makeSmartCellRangeRenderer: (getRealKeyForCell: GetRealKeyForCellFunc, scrollLeft?: number) => GridCellRangeRenderer;
|