@gitkraken/gitkraken-components 10.1.14 → 10.1.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/dist/components/graph/GraphContainer.d.ts +14 -1
- package/dist/components/graph/common/DraggableGraphHeader.d.ts +1 -1
- package/dist/components/graph/refzone/CreateRefNode.d.ts +28 -0
- package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +8 -1
- package/dist/components/graph/shared/FileDiffTypeIcon.d.ts +2 -0
- package/dist/domain/diff/DiffConstants.d.ts +1 -0
- package/dist/domain/diff/DiffTypes.d.ts +1 -0
- package/dist/domain/graph/GraphTypes.d.ts +7 -2
- package/dist/domain/ref/RefConstants.d.ts +1 -3
- package/dist/domain/ref/RefTypes.d.ts +10 -1
- package/dist/domain/ui/UiTypes.d.ts +7 -5
- package/dist/domain/workdir/WorkDirTypes.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +4 -2
|
@@ -6,8 +6,9 @@ import type { Sha } from '../../domain/commit/CommitTypes';
|
|
|
6
6
|
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
7
7
|
import type { GraphMarkerType, GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
|
|
8
8
|
import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
|
|
9
|
-
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnSettingsClick, OnToggleRefNodesShown, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
9
|
+
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRefOptData, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickRef, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnSettingsClick, OnToggleRefNodesShown, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, RefMetadataById, RefMetadataItem, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
10
10
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
11
|
+
import type { CreateRefFormData } from '../../domain/ref/RefTypes';
|
|
11
12
|
import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
|
|
12
13
|
import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
13
14
|
type OnClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
|
|
@@ -42,11 +43,14 @@ export interface StateProps {
|
|
|
42
43
|
avatarUrlByEmail?: AvatarUrlByEmail;
|
|
43
44
|
cssVariables?: CssVariables;
|
|
44
45
|
contexts?: GraphContexts | null;
|
|
46
|
+
createRefFormData?: CreateRefFormData | null;
|
|
45
47
|
dimMergeCommits?: boolean;
|
|
46
48
|
enableShowHideRefsOptions?: boolean;
|
|
47
49
|
downstreamsByUpstream?: DownstreamsByUpstream;
|
|
50
|
+
formatRefShorthand?: FormatRefShorthand;
|
|
48
51
|
highlightRowsOnRefHover?: boolean;
|
|
49
52
|
isContainerWindowFocused?: boolean;
|
|
53
|
+
isRefShorthandValid?: IsRefShorthandValid;
|
|
50
54
|
showGhostRefsOnRowHover?: boolean;
|
|
51
55
|
showRemoteNamesOnRefs?: boolean;
|
|
52
56
|
enabledRefMetadataTypes?: RefMetadataType[];
|
|
@@ -83,6 +87,9 @@ export interface DispatchProps {
|
|
|
83
87
|
onRefBeginDrag?: OnRefBeginDrag;
|
|
84
88
|
onRefCanDrag?: OnRefCanDrag;
|
|
85
89
|
onRefCanDrop?: OnRefCanDrop;
|
|
90
|
+
onRefCreate?: OnRefCreate;
|
|
91
|
+
onRefCreateCancel?: OnRefCreateCancel;
|
|
92
|
+
onRefCreateContextMenu?: OnRefCreateContextMenu;
|
|
86
93
|
onRefDragEnter?: OnRefDragEnter;
|
|
87
94
|
onRefDragLeave?: OnRefDragLeave;
|
|
88
95
|
onRefDrop?: OnRefDrop;
|
|
@@ -120,6 +127,7 @@ type ComponentState = {
|
|
|
120
127
|
avatarUrlByEmail: AvatarUrlByEmail;
|
|
121
128
|
columnColorByColumn: ColumnColorByColumn;
|
|
122
129
|
contexts?: GraphContexts | null;
|
|
130
|
+
createRefFormData?: CreateRefFormData | null;
|
|
123
131
|
cssVariablesWithDefaults: CssVariables;
|
|
124
132
|
currentlyHoveredCommitSha?: Sha;
|
|
125
133
|
dimMergeCommits: boolean;
|
|
@@ -223,6 +231,9 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
|
|
|
223
231
|
onRefBeginDrag: OnRefBeginDrag;
|
|
224
232
|
onRefCanDrag: OnRefCanDrag;
|
|
225
233
|
onRefCanDrop: OnRefCanDrop;
|
|
234
|
+
onRefCreate: OnRefCreate;
|
|
235
|
+
onRefCreateCancel: OnRefCreateCancel;
|
|
236
|
+
onRefCreateContextMenu: OnRefCreateContextMenu;
|
|
226
237
|
onRefDragEnter: OnRefDragEnter;
|
|
227
238
|
onRefDragLeave: OnRefDragLeave;
|
|
228
239
|
onRefDrop: OnRefDrop;
|
|
@@ -295,6 +306,8 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
|
|
|
295
306
|
processRows(graphRows?: GraphRow[]): void;
|
|
296
307
|
getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
|
|
297
308
|
formatCommitDateTimeCallback: OnFormatCommitDateTime;
|
|
309
|
+
formatRefShorthandCallback: FormatRefShorthand;
|
|
310
|
+
isRefShorthandValidCallback: IsRefShorthandValid;
|
|
298
311
|
translateCallback: TranslationFn;
|
|
299
312
|
getIconCallback: GetExternalIcon;
|
|
300
313
|
onMissingAvatar: GetMissingAvatar;
|
|
@@ -5,7 +5,7 @@ import type { ExcludeRefsById, GetExternalIcon, GraphColumnSetting, GraphRefOptD
|
|
|
5
5
|
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
6
6
|
import type { OnClick, OnMouseEnter, OnMouseLeave } from '../../../domain/ui/UiTypes';
|
|
7
7
|
type GraphHeaderProps = {
|
|
8
|
-
columnSetting
|
|
8
|
+
columnSetting?: GraphColumnSetting;
|
|
9
9
|
enableResizer?: boolean;
|
|
10
10
|
enableShowHideRefsOptions: boolean;
|
|
11
11
|
getExternalIcon: GetExternalIcon;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
4
|
+
import type { FormatRefShorthand, IsRefShorthandValid, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu } from '../../../domain/graph/GraphTypes';
|
|
5
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
6
|
+
import type { CreateRefFormData, RefShorthand } from '../../../domain/ref/RefTypes';
|
|
7
|
+
type CreateRefNodeProps = {
|
|
8
|
+
createRefFormData: CreateRefFormData;
|
|
9
|
+
formatRefShorthand: FormatRefShorthand;
|
|
10
|
+
isRefShorthandValid: IsRefShorthandValid;
|
|
11
|
+
onCancel: OnRefCreateCancel;
|
|
12
|
+
onContextMenu: OnRefCreateContextMenu;
|
|
13
|
+
onRefCreate: OnRefCreate;
|
|
14
|
+
refZoneWidth: number;
|
|
15
|
+
style?: Style | null;
|
|
16
|
+
translate: TranslationFn;
|
|
17
|
+
};
|
|
18
|
+
type CreateRefNodeState = {
|
|
19
|
+
shorthand: RefShorthand;
|
|
20
|
+
};
|
|
21
|
+
declare class CreateRefNode extends React.PureComponent<CreateRefNodeProps, CreateRefNodeState> {
|
|
22
|
+
handleClickOutside(): void;
|
|
23
|
+
constructor(props: CreateRefNodeProps);
|
|
24
|
+
onInputChange(shorthand?: RefShorthand): void;
|
|
25
|
+
render(): ReactElement<'div'>;
|
|
26
|
+
}
|
|
27
|
+
declare const _default: import("react-onclickoutside").WrapperClass<CreateRefNodeProps, typeof CreateRefNode>;
|
|
28
|
+
export default _default;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { GridCellRenderer } from 'react-virtualized';
|
|
2
2
|
import type { Sha } from '../../../domain/commit/CommitTypes';
|
|
3
|
-
import type { CommonGraphRowDispatchProps, CommonGraphRowProps, GetMissingRefMetadata, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefMetadataById } from '../../../domain/graph/GraphTypes';
|
|
3
|
+
import type { CommonGraphRowDispatchProps, CommonGraphRowProps, FormatRefShorthand, GetMissingRefMetadata, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefMetadataById } from '../../../domain/graph/GraphTypes';
|
|
4
4
|
import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
|
|
5
|
+
import type { CreateRefFormData } from '../../../domain/ref/RefTypes';
|
|
5
6
|
interface OwnProps {
|
|
6
7
|
height: number;
|
|
7
8
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
8
9
|
includeOnlyRemotesByName: IncludeOnlyRemotesByName;
|
|
9
10
|
}
|
|
10
11
|
interface StateProps {
|
|
12
|
+
createRefFormData?: CreateRefFormData;
|
|
13
|
+
formatRefShorthand: FormatRefShorthand;
|
|
11
14
|
enableShowHideRefsOptions: boolean;
|
|
12
15
|
isInUnsupportedRebase: boolean;
|
|
16
|
+
isRefShorthandValid: IsRefShorthandValid;
|
|
13
17
|
hoveredRefZoneSha?: Sha;
|
|
14
18
|
refMetadataById?: RefMetadataById | null;
|
|
15
19
|
shouldShowRefLine: boolean;
|
|
@@ -22,6 +26,9 @@ interface DispatchProps {
|
|
|
22
26
|
onRefBeginDrag: OnRefBeginDrag;
|
|
23
27
|
onRefCanDrag: OnRefCanDrag;
|
|
24
28
|
onRefCanDrop: OnRefCanDrop;
|
|
29
|
+
onRefCreate: OnRefCreate;
|
|
30
|
+
onRefCreateCancel: OnRefCreateCancel;
|
|
31
|
+
onRefCreateContextMenu: OnRefCreateContextMenu;
|
|
25
32
|
onRefDragEnter: OnRefDragEnter;
|
|
26
33
|
onRefDragLeave: OnRefDragLeave;
|
|
27
34
|
onRefDrop: OnRefDrop;
|
|
@@ -2,10 +2,12 @@ import type { ReactElement } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { Style } from '../../../domain/generic/GenericTypes';
|
|
4
4
|
import type { GetExternalIcon } from '../../../domain/graph/GraphTypes';
|
|
5
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
5
6
|
type Props = {
|
|
6
7
|
style: Style;
|
|
7
8
|
fileDiffType: string;
|
|
8
9
|
getExternalIcon: GetExternalIcon;
|
|
10
|
+
translate: TranslationFn;
|
|
9
11
|
};
|
|
10
12
|
declare class FileDiffTypeIcon extends React.Component<Props> {
|
|
11
13
|
render(): ReactElement<'span'> | null;
|
|
@@ -5,7 +5,7 @@ import type { CommitType, Sha } from '../commit/CommitTypes';
|
|
|
5
5
|
import type { CssVariables } from '../generic/GenericTypes';
|
|
6
6
|
import type { HostingServiceType } from '../hostingservice/HostingServiceTypes';
|
|
7
7
|
import type { TranslationFn } from '../language/LanguageTypes';
|
|
8
|
-
import type { GraphRefType } from '../ref/RefTypes';
|
|
8
|
+
import type { GraphRefType, RefFullName, RefShorthand } from '../ref/RefTypes';
|
|
9
9
|
import type { OnFocus, OnResizeFromPropChangeParams, OnResizeParams } from '../ui/UiTypes';
|
|
10
10
|
import type { GraphMarkerType, GraphZone, GraphZoneType, TimelineEntry, TimelineMsgRowRenderIdType } from './GraphConstants';
|
|
11
11
|
export type RowRenderType = GraphZoneType | TimelineMsgRowRenderIdType;
|
|
@@ -191,7 +191,7 @@ export interface Tag extends Ref {
|
|
|
191
191
|
}
|
|
192
192
|
export interface GraphRef extends Head, Remote, Tag {
|
|
193
193
|
refType: GraphRefType;
|
|
194
|
-
fullName?:
|
|
194
|
+
fullName?: RefFullName;
|
|
195
195
|
}
|
|
196
196
|
export type RefMetadataById = {
|
|
197
197
|
[id: string]: RefMetadata | null;
|
|
@@ -365,6 +365,8 @@ export type GraphPlatform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'linux' |
|
|
|
365
365
|
export type GetExternalIcon = (key: string) => ReactElement<any>;
|
|
366
366
|
export type GetMissingAvatar = (email: string, sha: string) => void;
|
|
367
367
|
export type GetMissingRefMetadata = (id: string, types: RefMetadataType[]) => void;
|
|
368
|
+
export type FormatRefShorthand = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => RefShorthand;
|
|
369
|
+
export type IsRefShorthandValid = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => boolean;
|
|
368
370
|
export type OnHideRefClick = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, sha: Sha) => void;
|
|
369
371
|
export type OnDoubleClickRef = (event: React.MouseEvent<any>, refGroup: GraphRefGroup, sha: Sha, metadataItem?: RefMetadataItem) => void;
|
|
370
372
|
export type OnDoubleClickRefMetadata = (event: React.MouseEvent<any>, metadataItem: RefMetadataItem) => void;
|
|
@@ -413,3 +415,6 @@ export type OnSettingsClick = (event: React.MouseEvent<any>, width: number) => v
|
|
|
413
415
|
export type OnWipMessageBlur = (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
414
416
|
export type OnWipMessageFocus = OnFocus;
|
|
415
417
|
export type OnFilterColumnClick = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType) => void;
|
|
418
|
+
export type OnRefCreate = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
|
|
419
|
+
export type OnRefCreateCancel = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
|
|
420
|
+
export type OnRefCreateContextMenu = (event: React.MouseEvent<any>, shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => void;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import type { Sha } from '../commit/CommitTypes';
|
|
1
2
|
import type * as RefConstants from './RefConstants';
|
|
2
|
-
export type GraphRefType =
|
|
3
|
+
export type GraphRefType = keyof typeof RefConstants.refTypes;
|
|
4
|
+
export type RefFullName = string;
|
|
5
|
+
export type RefShorthand = string;
|
|
6
|
+
export type CreateRefFormData = {
|
|
7
|
+
sha: Sha;
|
|
8
|
+
shorthand: RefShorthand;
|
|
9
|
+
type: GraphRefType;
|
|
10
|
+
data?: any | null;
|
|
11
|
+
};
|
|
@@ -16,12 +16,14 @@ export type OnMouseDown = (event: React.MouseEvent<any>) => void;
|
|
|
16
16
|
export type OnWheel = (event: React.MouseEvent<any>) => void;
|
|
17
17
|
export type OnClick = (event: React.MouseEvent<any>) => void;
|
|
18
18
|
export type OnDoubleClick = (event: React.MouseEvent<any>) => void;
|
|
19
|
-
export type OnBlur = (event: React.FocusEvent<
|
|
20
|
-
export type OnFocus = (event: React.FocusEvent<
|
|
21
|
-
export type OnKeyDown = (event: React.KeyboardEvent<
|
|
22
|
-
export type OnKeyPress = (event: React.KeyboardEvent<
|
|
23
|
-
export type OnKeyUp = (event: React.KeyboardEvent<
|
|
19
|
+
export type OnBlur = (event: React.FocusEvent<any>) => void;
|
|
20
|
+
export type OnFocus = (event: React.FocusEvent<any>) => void;
|
|
21
|
+
export type OnKeyDown = (event: React.KeyboardEvent<any>) => void;
|
|
22
|
+
export type OnKeyPress = (event: React.KeyboardEvent<any>) => void;
|
|
23
|
+
export type OnKeyUp = (event: React.KeyboardEvent<any>) => void;
|
|
24
24
|
export type OnResize = (dimensions: OnResizeParams) => void;
|
|
25
25
|
export type OnResizeEnd = (dimensions: OnResizeParams) => void;
|
|
26
26
|
export type OnResizeFromPropChange = (dimensions: OnResizeFromPropChangeParams) => void;
|
|
27
27
|
export type OnResizeStart = (dimensions: OnResizeParams) => void;
|
|
28
|
+
export type OnCancel = () => void;
|
|
29
|
+
export type OnInputChange = (event: React.KeyboardEvent<any>) => void;
|