@gitkraken/gitkraken-components 1.0.0 → 1.1.0-rc.10

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,35 +203,34 @@ 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;
208
+ export type OnGraphResized = (width: number, height: number) => void;
207
209
  export type OnShowMoreCommits = () => void;
208
- export type OnEmailsMissingAvatarUrls = (emails: { [email: string]: string }) => void;
210
+ export type OnEmailsMissingAvatarUrls = (emails: AvatarUrlByEmail) => void;
209
211
  export type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
210
212
 
211
213
  // Main graph component
212
214
  export interface GraphContainerProps {
213
215
  avatarUrlByEmail?: AvatarUrlByEmail;
214
216
  contexts?: GraphContexts;
215
- height?: number;
216
- width?: number;
217
217
  platform?: GraphPlatform;
218
218
  cssVariables?: CssVariables;
219
219
  getExternalIcon: GetExternalIcon;
220
220
  highlightRowsOnRefHover?: boolean,
221
+ isContainerWindowFocused?: boolean;
221
222
  showGhostRefsOnRowHover?: boolean,
222
223
  showRemoteNamesOnRefs?: boolean,
224
+ scrollRowPadding?: number,
223
225
  enableMultiSelection?: boolean,
224
226
  graphRows: GraphRow[];
225
227
  hasMoreCommits?: boolean;
226
228
  highlightedShas?: HighlightedShas;
227
- hiddenRefsById?: HiddenRefsById;
228
- // isCommitting: boolean;
229
+ excludeByType?: ExcludeByType;
230
+ excludeRefsById?: ExcludeRefsById;
231
+ includeOnlyRefsById?: IncludeOnlyRefsById;
229
232
  isSelectedBySha?: IsSelectedBySha;
230
- // isInUnsupportedRebase: boolean;
231
233
  isLoadingRows?: boolean;
232
- // maybeCreateRefFormSha: ?Sha;
233
- // pendingCommitMessageSummary: string;
234
- // repoPath: string;
235
234
  columnsSettings?: GraphColumnsSettings;
236
235
  refMetadataById?: RefMetadataById;
237
236
  themeOpacityFactor?: number;
@@ -245,18 +244,15 @@ export interface GraphContainerProps {
245
244
  onGraphRowUnhovered?: OnGraphRowUnhovered;
246
245
  onGraphRefNodeHovered?: OnGraphRefNodeHovered;
247
246
  onGraphRefNodeUnhovered?: OnGraphRefNodeUnhovered;
248
- // onBlurWipNodeInput: OnBlur;
247
+ onGraphColumnsReOrdered?: OnGraphColumnsReOrdered,
249
248
  onColumnResized?: OnGraphColumnResized;
250
- // onFocusWipNodeInput: OnFocus;
251
- // onMessageChange: OnCommitMessageChange;
252
249
  onClickGraphRef?: OnClickGraphRef;
253
250
  onClickGraphRow?: OnClickGraphRow;
254
251
  onDoubleClickGraphRow?: OnDoubleClickGraphRow;
255
252
  onDoubleClickGraphRef?: OnDoubleClickGraphRef;
256
253
  onSelectGraphRows?: OnSelectGraphRows;
257
254
  onShowMoreCommits?: OnShowMoreCommits;
258
- // onWipNodeInputWillUnmount: OnComponentWillUnmount;
259
- // onUpdateGraphWidth: OnUpdateGraphWidth;
255
+ onGraphResized?: OnGraphResized;
260
256
  onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
261
257
  onRefsMissingMetadata?: OnRefsMissingMetadata;
262
258
  formatCommitDateTime?: OnFormatCommitDateTime;
@@ -278,7 +274,7 @@ declare class GraphContainer extends React.PureComponent<GraphContainerProps, an
278
274
  ): void;
279
275
  forceUpdate(callback?: () => void): void;
280
276
  render(): JSX.Element;
281
- selectCommits(shas: Sha[], includeToPrevSel: boolean): void;
277
+ selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
282
278
  }
283
279
 
284
280
  export default GraphContainer;