@gitkraken/gitkraken-components 10.1.10 → 10.1.11

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.
@@ -6,9 +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, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphResized, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnScrollForZone, OnSettingsClick, OnToggleRefNodesShown, 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, 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, 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';
10
10
  import type { TranslationFn } from '../../domain/language/LanguageTypes';
11
- import type { OnBlur, OnComponentWillUnmount, OnFocus, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
11
+ import type { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
12
12
  import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
13
13
  type OnClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
14
14
  type OnDoubleClickGraphRow = (event: React.MouseEvent<any>, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
@@ -71,6 +71,7 @@ export interface StateProps {
71
71
  useAuthorInitialsForAvatars: boolean;
72
72
  rowsStats?: Record<string, RowStats>;
73
73
  rowsStatsLoading?: boolean;
74
+ wipMessageEditable?: boolean;
74
75
  workDirStats?: WorkDirStats;
75
76
  }
76
77
  export interface DispatchProps {
@@ -89,10 +90,10 @@ export interface DispatchProps {
89
90
  onRowContextMenu?: OnRowContextMenu;
90
91
  onGraphRefNodeHovered?: OnGraphRefNodeHovered;
91
92
  onGraphRefNodeUnhovered?: OnGraphRefNodeUnhovered;
92
- onBlurWipNodeInput?: OnBlur;
93
+ onBlurWipNodeInput?: OnWipMessageBlur;
93
94
  onGraphColumnsReOrdered?: OnGraphColumnsReOrdered;
94
95
  onColumnResized?: OnGraphColumnResized;
95
- onFocusWipNodeInput?: OnFocus;
96
+ onFocusWipNodeInput?: OnWipMessageFocus;
96
97
  onMessageChange?: OnCommitMessageChange;
97
98
  onPopupGraphHeaderContextMenu?: OnPopupGraphHeaderContextMenu;
98
99
  onClickGraphRef?: OnClickGraphRef;
@@ -103,7 +104,6 @@ export interface DispatchProps {
103
104
  onScrollForZone?: OnGraphScrollForZone;
104
105
  onScrollToRowCausedUpdateForRefZone?: OnGraphScrollForZone;
105
106
  onShowMoreCommits?: OnShowMoreCommits;
106
- onWipNodeInputWillUnmount?: OnComponentWillUnmount;
107
107
  onGraphResized?: OnGraphResized;
108
108
  onGraphVisibleRowsChanged?: OnGraphVisibleRowsChanged;
109
109
  onGraphMouseEnter?: OnGraphMouseEnter;
@@ -136,6 +136,7 @@ type ComponentState = {
136
136
  isContainerWindowFocused: boolean;
137
137
  isLoadingRows: boolean;
138
138
  numGraphColumns: number;
139
+ pendingCommitMessageSummary: string;
139
140
  processedRows: ProcessedGraphRow[];
140
141
  refMetadataById?: RefMetadataById | null;
141
142
  rowsStats?: Record<string, RowStats>;
@@ -204,9 +205,9 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
204
205
  componentWillReceiveProps(nextProps: Props): void;
205
206
  componentWillUnmount(): void;
206
207
  onGraphVisibleRowsUpdatedThrottled: ThrottledFn;
207
- onBlurWipNodeInput: OnBlur;
208
+ onBlurWipNodeInput: OnWipMessageBlur;
208
209
  onDoubleClickRef: OnDoubleClickRef;
209
- onFocusWipNodeInput: OnFocus;
210
+ onFocusWipNodeInput: OnWipMessageFocus;
210
211
  onCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
211
212
  onClearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
212
213
  onGraphColumnReOrdered: OnGraphColumnReOrdered;
@@ -238,7 +239,6 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
238
239
  onScrollToRowCausedUpdateForRefZone: OnScrollForZone;
239
240
  onCommitContextMenu: OnCommitContextMenu;
240
241
  onRefContextMenu: OnRefZoneContextMenu;
241
- onWipNodeInputWillUnmount: OnComponentWillUnmount;
242
242
  selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
243
243
  getCommitZoneContentWidthBetweenGutters(): number;
244
244
  getSelectedShas(): Sha[];
@@ -0,0 +1,43 @@
1
+ import type { ReactElement } from 'react';
2
+ import React from 'react';
3
+ import type { Sha } from '../../../domain/commit/CommitTypes';
4
+ import type { Style } from '../../../domain/generic/GenericTypes';
5
+ import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
6
+ import type { GetExternalIcon, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnWipMessageBlur, OnWipMessageFocus } from '../../../domain/graph/GraphTypes';
7
+ import type { TranslationFn } from '../../../domain/language/LanguageTypes';
8
+ import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
9
+ type WorkDirMessageInputDefaultProps = {
10
+ style: Style;
11
+ value: string;
12
+ };
13
+ type WorkDirMessageInputProps = {
14
+ clearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
15
+ currentlyHoveredCommitSha: Sha | null;
16
+ getExternalIcon: GetExternalIcon;
17
+ graphZoneType: GraphZoneType;
18
+ isCommitting: boolean;
19
+ isHovering: boolean;
20
+ isSelected: boolean;
21
+ onBlur: OnWipMessageBlur;
22
+ onClickCommit: OnClickCommit;
23
+ onContextMenu: OnCommitContextMenu;
24
+ onFocus: OnWipMessageFocus;
25
+ onMessageChange: OnCommitMessageChange;
26
+ setAsCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
27
+ sha: Sha;
28
+ style: Style;
29
+ translate: TranslationFn;
30
+ value: string;
31
+ workDirStats: WorkDirStats;
32
+ };
33
+ export default class WorkDirMessageInput extends React.Component<WorkDirMessageInputProps> {
34
+ textWidthRef: React.RefObject<any>;
35
+ wrapperRef: React.RefObject<any>;
36
+ static defaultProps: WorkDirMessageInputDefaultProps;
37
+ componentDidMount(): void;
38
+ componentDidUpdate(): void;
39
+ componentWillUnmount(): void;
40
+ onWipKeyDown(event: Event): void;
41
+ render(): ReactElement<'div'>;
42
+ }
43
+ export {};
@@ -1,17 +1,16 @@
1
1
  import type { GridCellRenderer } from 'react-virtualized';
2
- import type { CommonGraphRowDispatchProps, CommonGraphRowProps, OnCommitMessageChange } from '../../../domain/graph/GraphTypes';
2
+ import type { CommonGraphRowDispatchProps, CommonGraphRowProps, OnCommitMessageChange, OnWipMessageBlur, OnWipMessageFocus } from '../../../domain/graph/GraphTypes';
3
3
  import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
4
- import type { OnBlur, OnComponentWillUnmount, OnFocus } from '../../../domain/ui/UiTypes';
5
4
  import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
6
5
  interface StateProps {
7
6
  isCommitting: boolean;
8
7
  pendingCommitMessageSummary: string;
9
8
  workDirStats?: WorkDirStats;
9
+ wipMessageEditable: boolean;
10
10
  }
11
11
  interface DispatchProps {
12
- onBlurWipNodeInput: OnBlur;
13
- onWipNodeInputWillUnmount: OnComponentWillUnmount;
14
- onFocusWipNodeInput: OnFocus;
12
+ onBlurWipNodeInput: OnWipMessageBlur;
13
+ onFocusWipNodeInput: OnWipMessageFocus;
15
14
  onMessageChange: OnCommitMessageChange;
16
15
  }
17
16
  interface Props extends CommonGraphRowProps, CommonGraphRowDispatchProps, StateProps, DispatchProps {
@@ -6,7 +6,7 @@ import type { CssVariables } from '../generic/GenericTypes';
6
6
  import type { HostingServiceType } from '../hostingservice/HostingServiceTypes';
7
7
  import type { TranslationFn } from '../language/LanguageTypes';
8
8
  import type { GraphRefType } from '../ref/RefTypes';
9
- import type { OnResizeFromPropChangeParams, OnResizeParams } from '../ui/UiTypes';
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;
12
12
  export type RowRenderersByIds = {
@@ -408,3 +408,5 @@ export type OnGraphZoneResizeStart = (graphZone: GraphZone, dimensions: OnResize
408
408
  export type OnGraphZoneResizeFromPropChange = (graphZone: GraphZone, dimensions: OnResizeFromPropChangeParams) => void;
409
409
  export type OnPopupGraphHeaderContextMenu = (event: React.MouseEvent<any>, width: number) => void;
410
410
  export type OnSettingsClick = (event: React.MouseEvent<any>, width: number) => void;
411
+ export type OnWipMessageBlur = (event?: React.FocusEvent<HTMLInputElement>) => void;
412
+ export type OnWipMessageFocus = OnFocus;
@@ -21,7 +21,6 @@ export type OnFocus = (event: React.FocusEvent<HTMLInputElement>) => void;
21
21
  export type OnKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => void;
22
22
  export type OnKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => void;
23
23
  export type OnKeyUp = (event: React.KeyboardEvent<HTMLInputElement>) => void;
24
- export type OnComponentWillUnmount = () => void;
25
24
  export type OnResize = (dimensions: OnResizeParams) => void;
26
25
  export type OnResizeEnd = (dimensions: OnResizeParams) => void;
27
26
  export type OnResizeFromPropChange = (dimensions: OnResizeFromPropChangeParams) => void;