@gitkraken/gitkraken-components 13.0.0-vnext.1 → 13.0.0-vnext.15
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/README.md +2 -0
- 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 +44 -11
- 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 -3
- package/dist/domain/generic/GenericTypes.d.ts +4 -0
- package/dist/domain/graph/GraphConstants.d.ts +3 -1
- package/dist/domain/graph/GraphHelpers.d.ts +2 -2
- package/dist/domain/graph/GraphTypes.d.ts +10 -7
- package/dist/domain/graph/row/ProcessedGraphRowObj.d.ts +3 -4
- package/dist/domain/hostingservice/HostingServiceTypes.d.ts +3 -1
- package/dist/domain/reactvirtualized/ReactVirtualizedHelpers.d.ts +1 -1
- package/dist/domain/ref/RefConstants.d.ts +4 -1
- package/dist/domain/ref/RefTypes.d.ts +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +21 -2
- package/dist/styles.css +1 -1
- package/dist/utils/ObjectUtils.d.ts +29 -0
- package/package.json +99 -93
- package/CHANGELOG.md +0 -15
- package/ThirdPartyNotices.txt +0 -227
- package/dist/types.js +0 -1
package/README.md
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
This is a shared module between the GitKraken app and GitLens to share React components.
|
|
4
4
|
|
|
5
5
|
## Requires resolution to React 17
|
|
6
|
+
|
|
6
7
|
> [!WARNING]
|
|
7
8
|
> In order for this package to work properly, you must resolve React to version 17 in your own project.
|
|
8
9
|
> The reason for this is because this library's react-bootstrap dependency lists React 16 as a dependency, and npm/yarn 1 do not provide a way for dependencies to lock sub-dependencies. Therefore it is up to your project to force this library's react-bootstrap to use react 17.
|
|
9
10
|
> The following is an example of what to put into your package.json:
|
|
11
|
+
|
|
10
12
|
```
|
|
11
13
|
"resolutions": {
|
|
12
14
|
"react": "17.0.2",
|
|
@@ -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,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Alignment, ScrollParams } from 'react-virtualized';
|
|
3
2
|
import type { ReactElement } from 'react';
|
|
4
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
import type { Sha } from '../../domain/commit/CommitTypes';
|
|
6
5
|
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
7
6
|
import type { GraphCommitDescDisplayMode, GraphMarkerType, GraphSearchMode, GraphZone, GraphZoneType, ShiftSelectMode } from '../../domain/graph/GraphConstants';
|
|
@@ -165,6 +164,7 @@ type HasMergeNodeChildBySha = {
|
|
|
165
164
|
[sha: Sha]: boolean;
|
|
166
165
|
};
|
|
167
166
|
declare class GraphContainer extends React.Component<Props, ComponentState> implements IGraphContainer {
|
|
167
|
+
static getDerivedStateFromProps(props: Props, state: ComponentState): Partial<ComponentState> | null;
|
|
168
168
|
private graphComponentRef;
|
|
169
169
|
private graphContainerRef;
|
|
170
170
|
private resizeObserver;
|
|
@@ -173,7 +173,8 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
173
173
|
isRefContextMenuShown: boolean;
|
|
174
174
|
isMounted: boolean;
|
|
175
175
|
selectedShas: Set<Sha>;
|
|
176
|
-
|
|
176
|
+
selectionAnchorSha?: Sha;
|
|
177
|
+
selectionFocusSha?: Sha;
|
|
177
178
|
processedGraphRowBySha: ProcessedGraphRowBySha;
|
|
178
179
|
shaByRefId: ShaByRefId;
|
|
179
180
|
childrenBySha: ChildrenBySha;
|
|
@@ -189,10 +190,12 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
189
190
|
shouldFireShowMoreCommits: boolean;
|
|
190
191
|
columnsToFreeWhenFound: ColumnsToFreeBySha;
|
|
191
192
|
hasMergeNodeChildBySha: HasMergeNodeChildBySha;
|
|
193
|
+
private _autoLoadTimer?;
|
|
192
194
|
reserverInfoBySha: ReserverInfoBySha;
|
|
193
195
|
columnsUsed: ColumnsUsed;
|
|
194
196
|
rowsStats?: Record<string, RowStats>;
|
|
195
197
|
workDirStats: WorkDirStats;
|
|
198
|
+
private _markerColorsCache;
|
|
196
199
|
excludeByType: ExcludeByType;
|
|
197
200
|
excludeRefsById: ExcludeRefsById;
|
|
198
201
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
@@ -208,18 +211,18 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
208
211
|
graphZonesByType: GraphZonesByType;
|
|
209
212
|
graphZoneOrdering: GraphZoneType[];
|
|
210
213
|
clientHeight: number;
|
|
211
|
-
missingAvatarsTimer?:
|
|
214
|
+
missingAvatarsTimer?: ReturnType<typeof setTimeout>;
|
|
212
215
|
pendingMissingAvatars: AvatarUrlByEmail;
|
|
213
216
|
requestedMissingAvatars: AvatarUrlRequestedByEmail;
|
|
214
|
-
missingRefsMetadataTimer?:
|
|
217
|
+
missingRefsMetadataTimer?: ReturnType<typeof setTimeout>;
|
|
215
218
|
pendingMissingRefsMetadata: RefsMissingMetadata;
|
|
216
219
|
requestedMissingRefsMetadata: RefMetadataRequestedById;
|
|
217
220
|
branchUpstreamRowIndices: number[];
|
|
218
221
|
downstreamsByUpstream: DownstreamsByUpstream;
|
|
219
|
-
timelinesInterval?:
|
|
222
|
+
timelinesInterval?: ReturnType<typeof setInterval>;
|
|
220
223
|
constructor(props: Props);
|
|
221
224
|
componentDidMount(): void;
|
|
222
|
-
|
|
225
|
+
componentDidUpdate(prevProps: Props, prevState: ComponentState): void;
|
|
223
226
|
componentWillUnmount(): void;
|
|
224
227
|
focus(): void;
|
|
225
228
|
getRefIconsPositionOrDefault(refIconsPosition?: RefIconsPosition | null): RefIconsPosition;
|
|
@@ -247,7 +250,21 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
247
250
|
onRefDrop: OnRefDrop;
|
|
248
251
|
onRefEndDrag: OnRefEndDrag;
|
|
249
252
|
onZoneRowClick(event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha): void;
|
|
250
|
-
getShiftSelectRange(currentSha: Sha): Sha[];
|
|
253
|
+
getShiftSelectRange(currentSha: Sha, shiftSelectMode: ShiftSelectMode): Sha[] | undefined;
|
|
254
|
+
private getTopologicalPathBetween;
|
|
255
|
+
private getDirectTopologicalPathBetween;
|
|
256
|
+
/**
|
|
257
|
+
* Finds the nearest commit that is topologically reachable from the anchor commit.
|
|
258
|
+
* Searches in the appropriate direction based on whether the anchor is ahead or behind the target.
|
|
259
|
+
* This is used as a fallback when the clicked commit is not directly topologically reachable.
|
|
260
|
+
*/
|
|
261
|
+
private findNearestTopologicallyReachableCommit;
|
|
262
|
+
/**
|
|
263
|
+
* Validates that a path has only 2 endpoints - the start and end commits.
|
|
264
|
+
* An endpoint is a commit that has no children or parents within the selected path
|
|
265
|
+
* (excluding the explicit start and end points).
|
|
266
|
+
*/
|
|
267
|
+
private hasOnlyTwoEndpoints;
|
|
251
268
|
onClickRef: OnClickRef;
|
|
252
269
|
onClickCommit: OnClickCommit;
|
|
253
270
|
onDoubleClickCommit: OnDoubleClickCommit;
|
|
@@ -266,17 +283,29 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
266
283
|
onShowMoreCommits: OnShowMoreCommits;
|
|
267
284
|
onScrollForZone: OnScrollForZone;
|
|
268
285
|
loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
|
|
286
|
+
private shouldAutoLoadToFillViewport;
|
|
287
|
+
private autoLoadToFillViewport;
|
|
269
288
|
onScrollToRowCausedUpdateForFirstColumn: OnScrollForZone;
|
|
270
289
|
onCommitContextMenu: OnCommitContextMenu;
|
|
271
290
|
onRefContextMenu: OnRefZoneContextMenu;
|
|
291
|
+
/**
|
|
292
|
+
* Deep equality check for isSelectedBySha objects to avoid unnecessary scroll-to-selection
|
|
293
|
+
* when object reference changes but content is the same (e.g., after postMessage serialization)
|
|
294
|
+
*/
|
|
295
|
+
private isSelectedByShaEqual;
|
|
296
|
+
private _pendingRowsUpdate;
|
|
297
|
+
private _selectionVersion;
|
|
272
298
|
selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
|
|
273
299
|
getCommitZoneContentWidthBetweenGutters(): number;
|
|
274
|
-
getSelectedShas(): Sha[];
|
|
275
300
|
getExcludeRemotesByName(): ExcludeRemotesByName;
|
|
276
301
|
getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
|
|
277
302
|
clearScrollToIndex: ClearScrollToIndex;
|
|
278
303
|
getTopAndBottomVisibleRowIndex(): TopAndBottomVisibleRowIndex;
|
|
279
|
-
getOffsetSha(sha: Sha): Sha;
|
|
304
|
+
getOffsetSha(sha: Sha, scrollDirection: 'up' | 'down' | 'none', lastScrollDirection: 'up' | 'down' | 'none' | undefined, isAutoOrKeyScroll: boolean): Sha;
|
|
305
|
+
private _pendingScrollUpdate;
|
|
306
|
+
private _lastSelectedRowIndex;
|
|
307
|
+
private _lastScrollDirection;
|
|
308
|
+
private _scrollToAlignmentOverride;
|
|
280
309
|
selectSha(sha: Sha, isAutoOrKeyScroll?: boolean): void;
|
|
281
310
|
updateWidthByZone(widthToAssignForZone: number, graphZoneType: GraphZoneType, updatePreferredWidth?: boolean): void;
|
|
282
311
|
updateCommitZoneContentWidthFromChange(): void;
|
|
@@ -333,6 +362,10 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
333
362
|
selectNext(topological?: boolean): void;
|
|
334
363
|
selectPrevious(topological?: boolean): void;
|
|
335
364
|
selectHead(upstream?: boolean): void;
|
|
365
|
+
selectFirst(shiftKey?: boolean): void;
|
|
366
|
+
selectLast(shiftKey?: boolean): void;
|
|
367
|
+
selectPageUp(shiftKey?: boolean): void;
|
|
368
|
+
selectPageDown(shiftKey?: boolean): void;
|
|
336
369
|
getAvailableColumnAndUseIt(): number;
|
|
337
370
|
getColumns(graphRow: GraphRow): number;
|
|
338
371
|
getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
|
|
@@ -367,7 +400,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
367
400
|
isMacOSPlatform(): boolean;
|
|
368
401
|
isCommitListFiltered(): boolean;
|
|
369
402
|
getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
|
|
370
|
-
decorateWithHelmet: (container: ReactElement<
|
|
403
|
+
decorateWithHelmet: (container: ReactElement<"div">, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
|
|
371
404
|
render(): React.JSX.Element;
|
|
372
405
|
}
|
|
373
406
|
export default GraphContainer;
|
|
@@ -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,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { HandleStyles, ResizeCallback, ResizeStartCallback } from 're-resizable';
|
|
3
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
4
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
import type { Style } from '../../domain/generic/GenericTypes';
|
|
6
5
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
7
6
|
import type { OnResize, OnResizeEnd, OnResizeFromPropChange, OnResizeStart, OnWheel } from '../../domain/ui/UiTypes';
|
|
@@ -65,7 +64,7 @@ interface State extends Dimensions {
|
|
|
65
64
|
}
|
|
66
65
|
export default class Resizable extends React.PureComponent<Props, State> {
|
|
67
66
|
static defaultProps: DefaultProps;
|
|
68
|
-
onWheelTimeOut?:
|
|
67
|
+
onWheelTimeOut?: ReturnType<typeof setTimeout>;
|
|
69
68
|
isMouseWheeling: boolean;
|
|
70
69
|
constructor(props: Props);
|
|
71
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,8 @@ 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
|
+
/** A special sha used to indicate that the graph should be highlighted but there are no rows to highlight */
|
|
74
|
+
export declare const noShaHighlightedSha = "no-sha-highlighted";
|
|
73
75
|
export declare enum GraphColumnMode {
|
|
74
76
|
Compact = "compact",
|
|
75
77
|
Rich = "rich",
|
|
@@ -154,5 +156,5 @@ export declare enum graphCommitDescDisplayModes {
|
|
|
154
156
|
NEVER = "NEVER"
|
|
155
157
|
}
|
|
156
158
|
export type GraphCommitDescDisplayMode = graphCommitDescDisplayModes.ALWAYS | graphCommitDescDisplayModes.ON_HOVER | graphCommitDescDisplayModes.NEVER;
|
|
157
|
-
export type ShiftSelectMode = 'simple';
|
|
159
|
+
export type ShiftSelectMode = 'simple' | 'topological';
|
|
158
160
|
export type GraphSearchMode = 'normal' | 'filter';
|
|
@@ -6,7 +6,7 @@ import type { GraphRefType } from '../ref/RefTypes';
|
|
|
6
6
|
import type { WorkDirStats } from '../workdir/WorkDirTypes';
|
|
7
7
|
import type { GraphMarkerType, GraphZone, GraphZoneType, TimelineEntriesByPeriod } from './GraphConstants';
|
|
8
8
|
import { GraphColumnMode } from './GraphConstants';
|
|
9
|
-
import type { BaseMetadata, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
|
|
9
|
+
import type { BaseMetadata, ExternalIconKeys, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
|
|
10
10
|
export type DebouncableFn = (...args: any) => void;
|
|
11
11
|
export type DebouncedFn = (...args: any) => void;
|
|
12
12
|
export declare const debounceFrame: (func: DebouncableFn) => DebouncedFn;
|
|
@@ -53,7 +53,7 @@ export declare function workDirStatsHaveChanges(workDirStats?: WorkDirStats): bo
|
|
|
53
53
|
export declare function hasSingleSelectedSha(selectedShas: Set<Sha>): boolean;
|
|
54
54
|
export declare function isSingleSelected(selectedShas: Set<Sha>, sha: Sha): boolean;
|
|
55
55
|
export declare function getScrollToAlignment(rowHeight: number, clientHeight: number, scrollTop: number, scrollToIndex: number): Alignment;
|
|
56
|
-
export declare function getGraphZoneIconByType(zoneType: GraphZoneType):
|
|
56
|
+
export declare function getGraphZoneIconByType(zoneType: GraphZoneType): ExternalIconKeys | undefined;
|
|
57
57
|
export declare function isHeadActive(head: Head): boolean;
|
|
58
58
|
export declare function isGraphRefActive(ref: GraphRef): boolean;
|
|
59
59
|
export interface GraphRowHelperProps {
|
|
@@ -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';
|
|
@@ -147,7 +147,7 @@ export type ReserverInfoBySha = {
|
|
|
147
147
|
};
|
|
148
148
|
export type RefTargetFunc = () => Element | null | undefined;
|
|
149
149
|
export type ColumnContentGenerator = () => ReactElement<any>;
|
|
150
|
-
export type GraphItemContext = string |
|
|
150
|
+
export type GraphItemContext = string | object;
|
|
151
151
|
export type RefGroupContexts = {
|
|
152
152
|
[name: string]: GraphItemContext;
|
|
153
153
|
};
|
|
@@ -317,9 +317,8 @@ export interface ProcessedGraphRow extends GraphRow {
|
|
|
317
317
|
rowIndex?: number;
|
|
318
318
|
column: number;
|
|
319
319
|
columnForColoring?: number;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
displayBody?: string;
|
|
320
|
+
displaySummary: string | ReactNode;
|
|
321
|
+
displayBody?: string | ReactNode;
|
|
323
322
|
edges: RowEdges;
|
|
324
323
|
edgeColumnMaxes: number;
|
|
325
324
|
hasRefs?: boolean;
|
|
@@ -396,7 +395,8 @@ export type DownstreamsByUpstream = {
|
|
|
396
395
|
[upstreamName: string]: string[];
|
|
397
396
|
};
|
|
398
397
|
export type GraphPlatform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin';
|
|
399
|
-
export type
|
|
398
|
+
export type ExternalIconKeys = 'added' | 'author' | 'branch' | 'changes' | 'check' | 'commit' | 'datetime' | 'deleted' | 'files' | 'filter' | 'graph' | 'head' | 'hide' | `issue-${IssueTrackerType}` | 'loading' | 'message' | 'modified' | 'pull-request' | 'remote' | `remote-${HostingServiceType}` | 'renamed' | 'resolved' | 'settings' | 'show' | 'stash' | 'tag' | 'upstream-ahead' | 'upstream-behind' | 'warning' | 'worktree';
|
|
399
|
+
export type GetExternalIcon = (key: ExternalIconKeys) => ReactElement<any>;
|
|
400
400
|
export type GetMissingAvatar = (email: string, sha: string) => void;
|
|
401
401
|
export type GetMissingRefMetadata = (id: string, types: RefMetadataType[]) => void;
|
|
402
402
|
export type FormatRefShorthand = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => RefShorthand;
|
|
@@ -429,7 +429,10 @@ export type OnGraphMouseLeave = (event: React.MouseEvent<any>) => void;
|
|
|
429
429
|
export type OnClearCurrentlyHoveredGraphCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha, currentlyHoveredCommitSha?: Sha) => void;
|
|
430
430
|
export type CommitDateTimeSource = CommitDateTimeSources;
|
|
431
431
|
export type OnFormatCommitDateTime = (commitDateTime: number, source?: CommitDateTimeSource) => string;
|
|
432
|
-
export type FormatCommitMessage = (commitMessage: string) =>
|
|
432
|
+
export type FormatCommitMessage = (commitMessage: string) => {
|
|
433
|
+
summary: string | ReactNode;
|
|
434
|
+
body?: string | ReactNode;
|
|
435
|
+
};
|
|
433
436
|
export type OnCurrentlyHoveredGraphCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha, currentlyHoveredCommitSha?: Sha) => void;
|
|
434
437
|
export type OnClickCommit = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha) => void;
|
|
435
438
|
export type OnClickRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, sha: Sha, metadataItem?: RefMetadataItem) => void;
|
|
@@ -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[];
|
|
@@ -43,7 +43,6 @@ export declare class ProcessedGraphRowObj implements ProcessedGraphRow {
|
|
|
43
43
|
get hasChildRefs(): boolean;
|
|
44
44
|
get refsData(): GraphRefsData | undefined;
|
|
45
45
|
constructor(graphContainer: IGraphContainer, row: GraphRow, column?: number, edgeColumnMaxes?: number, edges?: RowEdges, childRefs?: ChildRefsByType, timeLineEntry?: TimelineEntry, columnForColoring?: number);
|
|
46
|
-
private updateSummaryAndBody;
|
|
47
46
|
private initializeRefGroups;
|
|
48
47
|
private addRefToRefGroup;
|
|
49
48
|
private loadGraphRefGroupsData;
|
|
@@ -14,5 +14,7 @@ export type GitLabSelfHostedIssueTrackerType = GitLabSelfHostingServiceType;
|
|
|
14
14
|
export type JiraCloudIssueTrackerType = 'jiraCloud';
|
|
15
15
|
export type JiraServerIssueTrackerType = 'jiraServer';
|
|
16
16
|
export type TrelloIssueTrackerType = 'trello';
|
|
17
|
-
export type
|
|
17
|
+
export type LinearIssueTrackerType = 'linear';
|
|
18
|
+
export type BitbucketIssueTrackerType = 'bitbucket';
|
|
19
|
+
export type IssueTrackerType = GitHubIssueTrackerType | GithubEnterpriseIssueTrackerType | GitLabIssueTrackerType | GitLabSelfHostedIssueTrackerType | JiraCloudIssueTrackerType | JiraServerIssueTrackerType | TrelloIssueTrackerType | LinearIssueTrackerType | AzureDevopsIssueTrackerType | BitbucketIssueTrackerType;
|
|
18
20
|
export declare function getHostingServiceName(hostingServiceType: HostingServiceType): string;
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sha } from '../commit/CommitTypes';
|
|
2
2
|
import type * as RefConstants from './RefConstants';
|
|
3
|
-
export type GraphRefType = keyof typeof RefConstants.refTypes;
|
|
3
|
+
export type GraphRefType = (typeof RefConstants.refTypes)[keyof typeof RefConstants.refTypes];
|
|
4
4
|
export type RefFullName = string;
|
|
5
5
|
export type RefShorthand = string;
|
|
6
6
|
export type CreateRefFormData = {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,20 @@ import ScrollbarContainer from './components/graph/common/ScrollbarContainer';
|
|
|
3
3
|
import GraphContainer from './components/graph/GraphContainer';
|
|
4
4
|
export * from './components/graph/GraphContainer';
|
|
5
5
|
export * from './components/dnd/DndComponent';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './domain/commit/CommitConstants';
|
|
7
|
+
export * from './domain/generic/GenericTypes';
|
|
8
|
+
export * from './domain/commit/CommitTypes';
|
|
9
|
+
export * from './domain/graph/GraphConstants';
|
|
10
|
+
export * from './domain/graph/GraphTypes';
|
|
11
|
+
export * from './domain/hostingservice/HostingServiceTypes';
|
|
12
|
+
export * from './domain/ref/RefConstants';
|
|
13
|
+
export * from './domain/ref/RefTypes';
|
|
14
|
+
export * from './domain/workdir/WorkDirTypes';
|
|
15
|
+
export * from './domain/ui/UiTypes';
|
|
16
|
+
export * from './domain/language/LanguageTypes';
|
|
17
|
+
export * from './domain/language/LanguageConstants';
|
|
18
|
+
export * from './domain/cssvariable/CssVariableConstants';
|
|
19
|
+
export * from './domain/diff/DiffTypes';
|
|
20
|
+
export * from './domain/diff/DiffConstants';
|
|
7
21
|
export { DndComponent, ScrollbarContainer };
|
|
8
22
|
export default GraphContainer;
|