@gitkraken/gitkraken-components 11.0.7 → 11.1.0
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/graph/GraphContainer.d.ts +4 -1
- package/dist/components/graph/commitzone/CommitNode.d.ts +1 -0
- package/dist/components/graph/commitzone/CommitZone.d.ts +1 -0
- package/dist/components/graph/rowRenderers/CommitMessageZoneRow.d.ts +2 -1
- package/dist/components/graph/rowRenderers/CommitZoneRow.d.ts +2 -0
- package/dist/domain/workdir/WorkDirHelpers.d.ts +18 -0
- package/dist/domain/workdir/WorkDirTypes.d.ts +12 -0
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEm
|
|
|
10
10
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
11
11
|
import type { CreateRefFormData, RefIconsPosition } from '../../domain/ref/RefTypes';
|
|
12
12
|
import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
|
|
13
|
-
import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
13
|
+
import type { WipNodeMetadataBySha, WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
14
14
|
import type { IGraphContainer } from './IGraphContainer';
|
|
15
15
|
type ClearScrollToIndex = () => void;
|
|
16
16
|
type OnZoneEnter = (e: React.MouseEvent<any>, zoneType: GraphZoneType, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
|
|
@@ -74,6 +74,7 @@ export interface StateProps {
|
|
|
74
74
|
rowsStatsLoading?: boolean;
|
|
75
75
|
wipMessageEditable?: boolean;
|
|
76
76
|
workDirStats?: WorkDirStats;
|
|
77
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
77
78
|
}
|
|
78
79
|
export interface DispatchProps {
|
|
79
80
|
onDoubleClickGraphRef?: OnDoubleClickGraphRef;
|
|
@@ -165,6 +166,7 @@ type ComponentState = {
|
|
|
165
166
|
themeOpacityFactor: number;
|
|
166
167
|
width: number;
|
|
167
168
|
workDirStats: WorkDirStats;
|
|
169
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
168
170
|
};
|
|
169
171
|
type ColumnsToFreeBySha = {
|
|
170
172
|
[sha: Sha]: number[];
|
|
@@ -205,6 +207,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
205
207
|
pinnedBranchShas: Set<Sha>;
|
|
206
208
|
rowsStats?: Record<string, RowStats>;
|
|
207
209
|
workDirStats: WorkDirStats;
|
|
210
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
208
211
|
excludeByType: ExcludeByType;
|
|
209
212
|
excludeRefsById: ExcludeRefsById;
|
|
210
213
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
@@ -2,12 +2,13 @@ import type { GridCellRenderer } from 'react-virtualized';
|
|
|
2
2
|
import type { GraphCommitDescDisplayMode } from '../../../domain/graph/GraphConstants';
|
|
3
3
|
import type { CommonGraphRowDispatchProps, CommonGraphRowProps, OnCommitMessageChange, OnWipMessageBlur, OnWipMessageFocus } from '../../../domain/graph/GraphTypes';
|
|
4
4
|
import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
|
|
5
|
-
import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
|
|
5
|
+
import type { WipNodeMetadataBySha, WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
|
|
6
6
|
interface StateProps {
|
|
7
7
|
graphCommitDescDisplayMode: GraphCommitDescDisplayMode;
|
|
8
8
|
isCommitting: boolean;
|
|
9
9
|
pendingCommitMessageSummary: string;
|
|
10
10
|
workDirStats?: WorkDirStats;
|
|
11
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
11
12
|
wipMessageEditable: boolean;
|
|
12
13
|
}
|
|
13
14
|
interface DispatchProps {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { GridCellRenderer } from 'react-virtualized';
|
|
2
2
|
import type { AvatarUrlByEmail, ColumnColorByColumn, CommonGraphRowDispatchProps, CommonGraphRowProps, GetMissingAvatar, GraphZoneModeConstants, NodeOffsetByColumn, NodeOpacityByColumn } from '../../../domain/graph/GraphTypes';
|
|
3
3
|
import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
|
|
4
|
+
import type { WipNodeMetadataBySha } from '../../../domain/workdir/WorkDirTypes';
|
|
4
5
|
interface OwnProps {
|
|
5
6
|
avatarUrlByEmail: AvatarUrlByEmail;
|
|
6
7
|
graphZoneModeConstants: GraphZoneModeConstants;
|
|
8
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
7
9
|
height: number;
|
|
8
10
|
onMissingAvatar: GetMissingAvatar;
|
|
9
11
|
columnColorByColumn: ColumnColorByColumn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Sha } from '../commit/CommitTypes';
|
|
3
|
+
import type { WipNodeMetadataBySha, WorkDirStats } from './WorkDirTypes';
|
|
4
|
+
export type ResolvedWipState = {
|
|
5
|
+
isPrimaryWip: boolean;
|
|
6
|
+
effectiveWorkDirStats: WorkDirStats | undefined;
|
|
7
|
+
hasWorkDirChanges: boolean;
|
|
8
|
+
isWipEditable: boolean;
|
|
9
|
+
customWipContent: ReactElement<any> | null;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Resolves the effective WIP state for a given row.
|
|
13
|
+
*
|
|
14
|
+
* For the primary WIP row (sha === workDirType), uses the global workDirStats.
|
|
15
|
+
* For secondary WIP rows, looks up per-row metadata from wipNodeMetadataBySha,
|
|
16
|
+
* falling back to the global workDirStats for backward compatibility.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveWipState(sha: Sha, type: string, workDirStats: WorkDirStats | undefined, wipNodeMetadataBySha: WipNodeMetadataBySha | undefined, wipMessageEditable: boolean): ResolvedWipState;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Sha } from '../commit/CommitTypes';
|
|
1
3
|
import type { GraphItemContext } from '../graph/GraphTypes';
|
|
2
4
|
export type WorkDirStats = {
|
|
3
5
|
added: number;
|
|
@@ -6,3 +8,13 @@ export type WorkDirStats = {
|
|
|
6
8
|
context?: GraphItemContext;
|
|
7
9
|
renamed?: number;
|
|
8
10
|
};
|
|
11
|
+
export type WipNodeMetadata = {
|
|
12
|
+
workDirStats?: WorkDirStats;
|
|
13
|
+
/** If provided, renders this element instead of the default InlineWorkDirSummary */
|
|
14
|
+
customContent?: ReactElement<any>;
|
|
15
|
+
/** If provided, renders this avatar URL inside the graph node circle instead of the default WIP dot */
|
|
16
|
+
nodeAvatarUrl?: string;
|
|
17
|
+
/** If true, the WIP node's dashed border spins to indicate an active agent */
|
|
18
|
+
nodeSpinning?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type WipNodeMetadataBySha = Record<Sha, WipNodeMetadata>;
|