@gitkraken/gitkraken-components 1.0.0-rc.19 → 1.0.0-rc.20

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.
@@ -60,12 +60,14 @@ export type GraphContexts = {
60
60
  };
61
61
 
62
62
  export type Head = {
63
+ id?: string,
63
64
  name: string;
64
65
  isCurrentHead?: boolean;
65
66
  context?: string;
66
67
  };
67
68
 
68
69
  export type Remote = {
70
+ id?: string,
69
71
  name: string;
70
72
  owner?: string;
71
73
  avatarUrl?: string;
@@ -74,6 +76,7 @@ export type Remote = {
74
76
  };
75
77
 
76
78
  export type Tag = {
79
+ id?: string,
77
80
  name: string;
78
81
  annotated?: boolean;
79
82
  context?: string;
@@ -125,6 +128,46 @@ export type GraphRef = Head
125
128
 
126
129
  export type GraphRefGroup = Array<GraphRef>;
127
130
 
131
+ export type RefMetadataById = { [id: string]: RefMetadata | null | undefined };
132
+ export type RefMetadata = {
133
+ pullRequests?: PullRequestMetadata[];
134
+ };
135
+
136
+ export type PullRequestMetadata = {
137
+ hostingServiceType: HostingServiceType;
138
+ id: number;
139
+ title: string;
140
+ author?: string;
141
+ date?: number;
142
+ state?: string;
143
+ url?: string;
144
+ context?: string;
145
+ };
146
+
147
+ // Hosting service types for pull request metadata
148
+ export const gitHubDotComHostingServiceType = 'github';
149
+ export const githubEnterpriseHostingServiceType = 'githubEnterprise';
150
+ export const gitLabHostingServiceType = 'gitlab';
151
+ export const gitLabSelfHostingServiceType = 'gitlabSelfHosted';
152
+ export const azureDevopsHostingServiceType = 'azureDevops';
153
+ export const bitBucketHostingServiceType = 'bitbucket';
154
+ export const bitBucketServerHostingServiceType = 'bitbucketServer';
155
+ export type HostingServiceType =
156
+ typeof GitHubDotComHostingServiceType |
157
+ typeof GithubEnterpriseHostingServiceType |
158
+ typeof BitBucketHostingServiceType |
159
+ typeof BitBucketServerHostingServiceType |
160
+ typeof GitLabHostingServiceType |
161
+ typeof GitLabSelfHostingServiceType |
162
+ typeof AzureDevopsHostingServiceType;
163
+
164
+ export type RefsMissingMetadata = {
165
+ [refId: string]: MissingRefMetadataType[]
166
+ }
167
+ export const missingPullRequestMetadataType = 'pullRequests';
168
+ // Expand this as we add more types to RefMetadata
169
+ export type MissingRefMetadataType = typeof missingPullRequestMetadataType;
170
+
128
171
  // Callbacks
129
172
  export type GetExternalIcon = (key: string) => React.ReactElement<any>;
130
173
  export type TranslationFn = (key: string, ...formatArgs: any) => string;
@@ -145,6 +188,7 @@ export type OnGraphRefNodeUnhovered = (event: any, refGroup: GraphRefGroup, grap
145
188
  export type OnGraphColumnResized = (graphZoneType: GraphZoneType, columnSettings: GraphColumnSetting) => void;
146
189
  export type OnShowMoreCommits = () => void;
147
190
  export type OnEmailsMissingAvatarUrls = (emails: { [email: string]: string }) => void;
191
+ export type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
148
192
 
149
193
  // Main graph component
150
194
  export interface GraphContainerProps {
@@ -169,6 +213,7 @@ export interface GraphContainerProps {
169
213
  // pendingCommitMessageSummary: string;
170
214
  // repoPath: string;
171
215
  columnsSettings?: GraphColumnsSettings;
216
+ refMetadataById?: RefMetadataById;
172
217
  themeOpacityFactor?: number;
173
218
  translate?: TranslationFn;
174
219
  useAuthorInitialsForAvatars?: boolean;
@@ -192,6 +237,7 @@ export interface GraphContainerProps {
192
237
  // onWipNodeInputWillUnmount: OnComponentWillUnmount;
193
238
  // onUpdateGraphWidth: OnUpdateGraphWidth;
194
239
  onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
240
+ onRefsMissingMetadata?: OnRefsMissingMetadata;
195
241
  formatCommitDateTime?: OnFormatCommitDateTime;
196
242
  shaLength?: number;
197
243
  nonce?: string;
@@ -211,6 +257,7 @@ declare class GraphContainer extends React.PureComponent<GraphContainerProps, an
211
257
  ): void;
212
258
  forceUpdate(callback?: () => void): void;
213
259
  render(): JSX.Element;
260
+ selectCommits(shas: Sha[], includeToPrevSel: boolean): void;
214
261
  }
215
262
 
216
263
  export default GraphContainer;