@gitkraken/gitkraken-components 1.1.0-rc.1 → 1.1.0-rc.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.
@@ -11,10 +11,17 @@ import {
11
11
 
12
12
  // Input variables
13
13
  export type Sha = string;
14
- export type CssVariables = {[variable: string]: string};
15
- export type HiddenRefsById = {[refId: string]: GraphRefOptData};
16
- export type IsSelectedBySha = {[sha: Sha]: boolean};
17
- export type HighlightedShas = {[sha: Sha]: boolean};
14
+ export type CssVariables = { [variable: string]: string };
15
+ export type ExcludeByType = {
16
+ heads?: boolean;
17
+ remotes?: boolean;
18
+ stashes?: boolean;
19
+ tags?: boolean;
20
+ };
21
+ export type ExcludeRefsById = { [refId: string]: GraphRefOptData };
22
+ export type IncludeOnlyRefsById = { [refId: string]: GraphRefOptData };
23
+ export type IsSelectedBySha = { [sha: Sha]: boolean };
24
+ export type HighlightedShas = { [sha: Sha]: boolean };
18
25
 
19
26
  export type WorkDirType = typeof mergeConflictNodeType
20
27
  | typeof unsupportedRebaseWarningNodeType
@@ -64,30 +71,22 @@ export type GraphContexts = {
64
71
  header?: GraphItemContext;
65
72
  };
66
73
 
67
- export interface Head {
68
- id?: string,
74
+ interface Ref {
75
+ id?: string;
69
76
  name: string;
70
- isCurrentHead?: boolean;
71
77
  context?: GraphItemContext;
72
78
  contextGroup?: GraphItemContext;
73
79
  }
74
-
75
- export interface Remote {
76
- id?: string,
77
- name: string;
80
+ export interface Head extends Ref {
81
+ isCurrentHead?: boolean;
82
+ }
83
+ export interface Remote extends Ref {
78
84
  owner?: string;
79
85
  avatarUrl?: string;
80
86
  url?: string;
81
- context?: GraphItemContext;
82
- contextGroup?: GraphItemContext;
83
87
  }
84
-
85
- export interface Tag {
86
- id?: string,
87
- name: string;
88
+ export interface Tag extends Ref {
88
89
  annotated?: boolean;
89
- context?: GraphItemContext;
90
- contextGroup?: GraphItemContext;
91
90
  }
92
91
 
93
92
  export type GraphRow = {
@@ -106,7 +105,8 @@ export type GraphRow = {
106
105
 
107
106
  export type GraphColumnSetting = {
108
107
  width: number,
109
- isHidden: boolean
108
+ isHidden: boolean,
109
+ order?: number
110
110
  };
111
111
 
112
112
  export type AvatarUrlByEmail = { [email: string]: string };
@@ -203,10 +203,11 @@ export type OnGraphRowHovered = (event: any, graphZoneType: GraphZoneType, graph
203
203
  export type OnGraphRowUnhovered = (event: any, graphZoneType: GraphZoneType, graphRow: GraphRow) => void;
204
204
  export type OnGraphRefNodeHovered = (event: any, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
205
205
  export type OnGraphRefNodeUnhovered = (event: any, refGroup: GraphRefGroup, graphRow: GraphRow) => void;
206
+ export type OnGraphColumnsReOrdered = (columnsSettings: GraphColumnsSettings) => void;
206
207
  export type OnGraphColumnResized = (graphZoneType: GraphZoneType, columnSettings: GraphColumnSetting) => void;
207
208
  export type OnGraphResized = (width: number, height: number) => void;
208
209
  export type OnShowMoreCommits = () => void;
209
- export type OnEmailsMissingAvatarUrls = (emails: { [email: string]: string }) => void;
210
+ export type OnEmailsMissingAvatarUrls = (emails: AvatarUrlByEmail) => void;
210
211
  export type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
211
212
 
212
213
  // Main graph component
@@ -217,20 +218,19 @@ export interface GraphContainerProps {
217
218
  cssVariables?: CssVariables;
218
219
  getExternalIcon: GetExternalIcon;
219
220
  highlightRowsOnRefHover?: boolean,
221
+ isContainerWindowFocused?: boolean;
220
222
  showGhostRefsOnRowHover?: boolean,
221
223
  showRemoteNamesOnRefs?: boolean,
224
+ scrollRowPadding?: number,
222
225
  enableMultiSelection?: boolean,
223
226
  graphRows: GraphRow[];
224
227
  hasMoreCommits?: boolean;
225
228
  highlightedShas?: HighlightedShas;
226
- hiddenRefsById?: HiddenRefsById;
227
- // isCommitting: boolean;
229
+ excludeByType?: ExcludeByType;
230
+ excludeRefsById?: ExcludeRefsById;
231
+ includeOnlyRefsById?: IncludeOnlyRefsById;
228
232
  isSelectedBySha?: IsSelectedBySha;
229
- // isInUnsupportedRebase: boolean;
230
233
  isLoadingRows?: boolean;
231
- // maybeCreateRefFormSha: ?Sha;
232
- // pendingCommitMessageSummary: string;
233
- // repoPath: string;
234
234
  columnsSettings?: GraphColumnsSettings;
235
235
  refMetadataById?: RefMetadataById;
236
236
  themeOpacityFactor?: number;
@@ -244,17 +244,14 @@ export interface GraphContainerProps {
244
244
  onGraphRowUnhovered?: OnGraphRowUnhovered;
245
245
  onGraphRefNodeHovered?: OnGraphRefNodeHovered;
246
246
  onGraphRefNodeUnhovered?: OnGraphRefNodeUnhovered;
247
- // onBlurWipNodeInput: OnBlur;
247
+ onGraphColumnsReOrdered?: OnGraphColumnsReOrdered,
248
248
  onColumnResized?: OnGraphColumnResized;
249
- // onFocusWipNodeInput: OnFocus;
250
- // onMessageChange: OnCommitMessageChange;
251
249
  onClickGraphRef?: OnClickGraphRef;
252
250
  onClickGraphRow?: OnClickGraphRow;
253
251
  onDoubleClickGraphRow?: OnDoubleClickGraphRow;
254
252
  onDoubleClickGraphRef?: OnDoubleClickGraphRef;
255
253
  onSelectGraphRows?: OnSelectGraphRows;
256
254
  onShowMoreCommits?: OnShowMoreCommits;
257
- // onWipNodeInputWillUnmount: OnComponentWillUnmount;
258
255
  onGraphResized?: OnGraphResized;
259
256
  onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
260
257
  onRefsMissingMetadata?: OnRefsMissingMetadata;
@@ -277,7 +274,7 @@ declare class GraphContainer extends React.PureComponent<GraphContainerProps, an
277
274
  ): void;
278
275
  forceUpdate(callback?: () => void): void;
279
276
  render(): JSX.Element;
280
- selectCommits(shas: Sha[], includeToPrevSel: boolean): void;
277
+ selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
281
278
  }
282
279
 
283
280
  export default GraphContainer;