@gitkraken/gitkraken-components 11.1.0 → 11.2.1
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/CHANGELOG.md +16 -0
- package/dist/components/graph/GraphContainer.d.ts +3 -1
- package/dist/components/graph/GraphHeaderRow.d.ts +3 -2
- package/dist/components/graph/common/DraggableGraphHeader.d.ts +2 -1
- package/dist/components/graph/refzone/FloatingCreateRefNode.d.ts +20 -0
- package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +1 -0
- package/dist/domain/graph/GraphHelpers.d.ts +2 -1
- package/dist/domain/graph/GraphTypes.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 11.2.1
|
|
4
|
+
|
|
5
|
+
- Ensures the branch or tag creation input remains visible and usable when its target commit scrolls out of the virtualized graph viewport ([#390](https://github.com/gitkraken/GitKrakenComponents/pull/390))
|
|
6
|
+
|
|
7
|
+
## 11.2.0
|
|
8
|
+
|
|
9
|
+
- Add `headerZoneActions` prop to `GraphContainer`, `GraphHeaderRow`, and `DraggableGraphHeader` ([#389](https://github.com/gitkraken/GitKrakenComponents/pull/389))
|
|
10
|
+
|
|
11
|
+
## 11.1.0
|
|
12
|
+
|
|
13
|
+
- Add multi-WIP node support for worktree status visualization ([#384](https://github.com/gitkraken/GitKrakenComponents/pull/384))
|
|
14
|
+
- Fix avatar sizing at high zoom levels ([#384](https://github.com/gitkraken/GitKrakenComponents/pull/384))
|
|
15
|
+
- Render avatars on WIP nodes and skip canvas for SVG data URIs ([#385](https://github.com/gitkraken/GitKrakenComponents/pull/385))
|
|
16
|
+
- Replace CSS dotted WIP border with SVG stroke-dasharray circle ([#385](https://github.com/gitkraken/GitKrakenComponents/pull/385))
|
|
17
|
+
- Add `nodeSpinning` prop for conditional WIP border animation ([#385](https://github.com/gitkraken/GitKrakenComponents/pull/385))
|
|
18
|
+
|
|
3
19
|
## 11.0.7
|
|
4
20
|
|
|
5
21
|
- Prioritize pinned branch when sorting grouped refs in the ref label ([#382](https://github.com/gitkraken/GitKrakenComponents/pull/382))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { Alignment, ScrollParams } from 'react-virtualized';
|
|
3
|
-
import type { ReactElement } from 'react';
|
|
3
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import type { Sha } from '../../domain/commit/CommitTypes';
|
|
6
6
|
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
@@ -31,6 +31,7 @@ export interface StateProps {
|
|
|
31
31
|
createRefFormData?: CreateRefFormData | null;
|
|
32
32
|
dimMergeCommits?: boolean;
|
|
33
33
|
enableShowHideRefsOptions?: boolean;
|
|
34
|
+
headerZoneActions?: Partial<Record<GraphZoneType, ReactNode>>;
|
|
34
35
|
downstreamsByUpstream?: DownstreamsByUpstream;
|
|
35
36
|
formatRefShorthand?: FormatRefShorthand;
|
|
36
37
|
highlightRowsOnRefHover?: boolean;
|
|
@@ -292,6 +293,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
292
293
|
getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
|
|
293
294
|
clearScrollToIndex: ClearScrollToIndex;
|
|
294
295
|
getTopAndBottomVisibleRowIndex(): TopAndBottomVisibleRowIndex;
|
|
296
|
+
getCreateRefFloatingEdge(createRefFormData?: CreateRefFormData | null): import("../../domain/graph/GraphTypes").CreateRefFloatingEdge;
|
|
295
297
|
getOffsetSha(sha: Sha): Sha;
|
|
296
298
|
selectSha(sha: Sha, isAutoOrKeyScroll?: boolean): void;
|
|
297
299
|
updateWidthByZone(widthToAssignForZone: number, graphZoneType: GraphZoneType, updatePreferredWidth?: boolean): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { GraphZone } from '../../domain/graph/GraphConstants';
|
|
3
|
+
import type { GraphZone, GraphZoneType } 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';
|
|
6
6
|
import type { OnMouseEnter, OnMouseLeave } from '../../domain/ui/UiTypes';
|
|
@@ -13,6 +13,7 @@ type Props = {
|
|
|
13
13
|
getExternalIcon: GetExternalIcon;
|
|
14
14
|
excludeRefsById: ExcludeRefsById;
|
|
15
15
|
headerContext?: GraphItemContext;
|
|
16
|
+
headerZoneActions?: Partial<Record<GraphZoneType, ReactNode>>;
|
|
16
17
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
17
18
|
rowsStatsLoading: boolean;
|
|
18
19
|
onColumnReOrdered?: OnGraphColumnReOrdered;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MouseEventHandler, ReactElement } from 'react';
|
|
1
|
+
import type { MouseEventHandler, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import 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';
|
|
@@ -14,6 +14,7 @@ type GraphHeaderProps = {
|
|
|
14
14
|
graphZones: GraphZone[];
|
|
15
15
|
graphZoneType: GraphZoneType;
|
|
16
16
|
excludeRefsById: ExcludeRefsById;
|
|
17
|
+
headerZoneAction?: ReactNode;
|
|
17
18
|
id: string;
|
|
18
19
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
19
20
|
isDraggable: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { CreateRefFloatingEdge, FormatRefShorthand, IsRefShorthandValid, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefShorthandChange } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
4
|
+
import type { CreateRefFormData } from '../../../domain/ref/RefTypes';
|
|
5
|
+
type FloatingCreateRefNodeProps = {
|
|
6
|
+
createRefFormData: CreateRefFormData;
|
|
7
|
+
edge: CreateRefFloatingEdge;
|
|
8
|
+
edgeOffset: number;
|
|
9
|
+
formatRefShorthand: FormatRefShorthand;
|
|
10
|
+
isRefShorthandValid: IsRefShorthandValid;
|
|
11
|
+
left: number;
|
|
12
|
+
onCancel: OnRefCreateCancel;
|
|
13
|
+
onContextMenu: OnRefCreateContextMenu;
|
|
14
|
+
onRefCreate: OnRefCreate;
|
|
15
|
+
onRefShorthandChange?: OnRefShorthandChange;
|
|
16
|
+
translate: TranslationFn;
|
|
17
|
+
width: number;
|
|
18
|
+
};
|
|
19
|
+
export default function FloatingCreateRefNode({ createRefFormData, edge, edgeOffset, formatRefShorthand, isRefShorthandValid, left, onCancel, onContextMenu, onRefCreate, onRefShorthandChange, translate, width, }: FloatingCreateRefNodeProps): ReactElement<'div'>;
|
|
20
|
+
export {};
|
|
@@ -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, ExternalIconKeys, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
|
|
9
|
+
import type { BaseMetadata, CreateRefFloatingEdge, 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;
|
|
@@ -45,6 +45,7 @@ export declare function getGraphZoneWidthConstraintsFromGraphZones(graphZoneType
|
|
|
45
45
|
export declare function getGraphZoneModeConstants(graphZoneMode?: GraphColumnMode): GraphZoneModeConstants;
|
|
46
46
|
export declare const makeGetKeyForCell: (rows: ProcessedGraphRow[]) => GetRealKeyForCellFunc;
|
|
47
47
|
export declare function getZoneWidthWithVerticalScrollbar(graphZoneType: GraphZoneType, activeGraphZones: GraphZone[]): number;
|
|
48
|
+
export declare function resolveCreateRefFloatingEdge(targetRowIndex: number, topVisibleRowIndex: number, bottomVisibleRowIndex: number): CreateRefFloatingEdge | null;
|
|
48
49
|
export declare function rowContainsCurrentHeadRef(row?: ProcessedGraphRow | GraphRow): boolean;
|
|
49
50
|
export declare function getHeadRefShaFromGraphRows(graphRows: GraphRow[]): Sha | undefined;
|
|
50
51
|
export declare function isWorkDirNodeType(nodeType: CommitType): boolean;
|
|
@@ -459,6 +459,7 @@ export type OnRefCreate = (shorthand: RefShorthand, sha: Sha, refType: GraphRefT
|
|
|
459
459
|
export type OnRefCreateCancel = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
|
|
460
460
|
export type OnRefCreateContextMenu = (event: React.MouseEvent<any>, shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
|
|
461
461
|
export type OnRefShorthandChange = (shorthand: RefShorthand) => void;
|
|
462
|
+
export type CreateRefFloatingEdge = 'top' | 'bottom';
|
|
462
463
|
export type OnClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
463
464
|
export type OnDoubleClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
464
465
|
export type OnClickGraphRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, graphRow: GraphRow, metadataItem?: RefMetadataItem) => void;
|