@gitkraken/gitkraken-components 10.1.18 → 10.1.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.
@@ -239,6 +239,7 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
239
239
  onRefDragLeave: OnRefDragLeave;
240
240
  onRefDrop: OnRefDrop;
241
241
  onRefEndDrag: OnRefEndDrag;
242
+ onZoneRowClick(event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha): void;
242
243
  onClickRef: OnClickRef;
243
244
  onClickCommit: OnClickCommit;
244
245
  onDoubleClickCommit: OnDoubleClickCommit;
@@ -21,6 +21,7 @@ type CreateRefNodeState = {
21
21
  declare class CreateRefNode extends React.PureComponent<CreateRefNodeProps, CreateRefNodeState> {
22
22
  handleClickOutside(): void;
23
23
  constructor(props: CreateRefNodeProps);
24
+ static getDerivedStateFromProps(props: CreateRefNodeProps, state: CreateRefNodeState): CreateRefNodeState | null;
24
25
  onInputChange(shorthand?: RefShorthand): void;
25
26
  render(): ReactElement<'div'>;
26
27
  }
@@ -1,7 +1,6 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { GetExternalIcon, GraphItemContext } from '../../../domain/graph/GraphTypes';
3
- import type { HostingServiceType } from '../../../domain/hostingservice/HostingServiceTypes';
4
- import type { TranslationFn } from '../../../domain/language/LanguageTypes';
3
+ import type { HostingServiceType, IssueTrackerType } from '../../../domain/hostingservice/HostingServiceTypes';
5
4
  type IconProps = {
6
5
  icon: ReactElement<any>;
7
6
  tooltipClassName?: string;
@@ -9,11 +8,10 @@ type IconProps = {
9
8
  tooltipText?: string;
10
9
  };
11
10
  type IssueProps = {
12
- displayId: string;
13
11
  id: string;
14
- title: string;
12
+ issueTrackerType: IssueTrackerType;
13
+ toolTipText: string;
15
14
  getExternalIcon: GetExternalIcon;
16
- translate: TranslationFn;
17
15
  };
18
16
  type RefIconProps = {
19
17
  avatarUrl?: string;
@@ -25,8 +23,7 @@ type PullRequestProps = {
25
23
  icon: ReactElement<any>;
26
24
  hostingServiceType: HostingServiceType;
27
25
  id: string | number;
28
- title?: string;
29
- translate: TranslationFn;
26
+ toolTipText?: string;
30
27
  };
31
28
  type UpStreamIndicatorProps = {
32
29
  icon: ReactElement<any>;
@@ -35,8 +32,8 @@ type UpStreamIndicatorProps = {
35
32
  tooltipText?: string;
36
33
  };
37
34
  export declare function Icon({ icon, tooltipClassName, tooltipId, tooltipText }: IconProps): ReactElement<any>;
38
- export declare function IssueIcon({ displayId, id, title, getExternalIcon, translate }: IssueProps): ReactElement<typeof Icon>;
39
- export declare function PullRequestIcon({ hostingServiceType, icon, id, title, translate, }: PullRequestProps): ReactElement<typeof Icon>;
35
+ export declare function IssueIcon({ id, toolTipText, getExternalIcon, issueTrackerType, }: IssueProps): ReactElement<typeof Icon>;
36
+ export declare function PullRequestIcon({ hostingServiceType, icon, id, toolTipText, }: PullRequestProps): ReactElement<typeof Icon>;
40
37
  export declare function UpstreamIndicatorIcon({ icon, type, upstream, tooltipText, }: UpStreamIndicatorProps): ReactElement<typeof Icon>;
41
38
  export declare function RefIcon({ avatarUrl, context, icon, tooltipText }: RefIconProps): ReactElement<typeof Icon>;
42
39
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
- import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRef, GraphRefGroup, OnClickRef, OnClickRefMetadata, OnDoubleClickRef, OnDoubleClickRefMetadata, OnHideRefClick, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefZoneContextMenu, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
4
+ import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRef, GraphRefGroup, OnClickRef, OnClickRefMetadata, OnDoubleClickRef, OnDoubleClickRefMetadata, OnHideRefClick, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefZoneContextMenu, RefMetadataById, RefMetadataItem, RefMetadataType } from '../../../domain/graph/GraphTypes';
5
5
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
6
6
  import type { OnClick, OnContextMenu, OnDoubleClick } from '../../../domain/ui/UiTypes';
7
7
  type RefNodeProps = {
@@ -36,6 +36,11 @@ type RefNodeProps = {
36
36
  };
37
37
  export declare function getRefIconAndTooltipForRef(getExternalIcon: GetExternalIcon, ref: GraphRef, translate: TranslationFn, index?: number): ReactElement<any>;
38
38
  export default class RefNode extends React.PureComponent<RefNodeProps> {
39
+ getContextForRefGroupIfExists(refGroup: GraphRefGroup, groupContext: GraphItemContext | null, useGroupContext?: boolean): GraphItemContext | undefined;
40
+ getDecoratedRefIcon(key: string, icon: ReactElement<any>, metadataItem: RefMetadataItem, context?: GraphItemContext, className?: string): ReactElement<any>;
41
+ getPullRequestIconsAndTooltipsForRef(refMetadata: RefMetadataById | null, ref: GraphRef, existingPullRequestIds: Set<number>): ReactElement<any>[] | null;
42
+ getUpstreamIndicatorIconsAndTooltipsForRef(refMetadata: RefMetadataById | null, ref: GraphRef): ReactElement<any> | null;
43
+ getIssueIconsAndTooltipsForRef(refMetadata: RefMetadataById | null, ref: GraphRef): ReactElement<any>[] | null;
39
44
  onContextMenu: OnContextMenu;
40
45
  onClick: OnClick;
41
46
  onClickMetadata: OnClickRefMetadata;
@@ -6,7 +6,7 @@ import type { GraphRefType } from '../ref/RefTypes';
6
6
  import type { WorkDirStats } from '../workdir/WorkDirTypes';
7
7
  import type { GraphMarkerType, GraphZone, GraphZoneType, TimelineEntriesByPeriod } from './GraphConstants';
8
8
  import { GraphColumnMode } from './GraphConstants';
9
- import type { GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, HighlightedShas, IsSelectedBySha, ProcessedGraphRow, ProcessedGraphRowBySha, PullRequestMetadata, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints, UpstreamMetadata } from './GraphTypes';
9
+ import type { BaseMetadata, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, HighlightedShas, IsSelectedBySha, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
10
10
  export type DebouncableFn = (...args: any) => void;
11
11
  export type DebouncedFn = (...args: any) => void;
12
12
  export declare const debounceFrame: (func: DebouncableFn) => DebouncedFn;
@@ -15,7 +15,7 @@ export type ThrottledFn = (...args: any) => void;
15
15
  export declare const throttle: (func: ThrottleableFn, time: number, initial?: number) => ThrottledFn;
16
16
  export declare function parseContext(context?: GraphItemContext | null): string | null;
17
17
  export declare function getRowStatsConstraints(stats: number[]): RowStatsConstraints;
18
- export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType): RefMetadata | PullRequestMetadata[] | UpstreamMetadata | null;
18
+ export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType): RefMetadata | BaseMetadata | BaseMetadata[] | null | undefined;
19
19
  export declare function getTimelineEntriesByPeriod(): TimelineEntriesByPeriod;
20
20
  export declare function getRefIdByBaseRef(refType: GraphRefType, ref: Ref): string;
21
21
  export declare function getRefIdByGraphRef(ref: GraphRef): string;
@@ -3,7 +3,7 @@ import type { ReactElement } from 'react';
3
3
  import type { CommitDateTimeSources } from '../commit/CommitConstants';
4
4
  import type { CommitType, Sha } from '../commit/CommitTypes';
5
5
  import type { CssVariables } from '../generic/GenericTypes';
6
- import type { HostingServiceType } from '../hostingservice/HostingServiceTypes';
6
+ import type { HostingServiceType, IssueTrackerType } from '../hostingservice/HostingServiceTypes';
7
7
  import type { TranslationFn } from '../language/LanguageTypes';
8
8
  import type { GraphRefType, RefFullName, RefShorthand } from '../ref/RefTypes';
9
9
  import type { OnFocus, OnResizeFromPropChangeParams, OnResizeParams } from '../ui/UiTypes';
@@ -199,6 +199,7 @@ export type RefMetadataById = {
199
199
  export interface RefMetadata {
200
200
  pullRequest?: PullRequestMetadata[] | null;
201
201
  upstream?: UpstreamMetadata | null;
202
+ issue?: IssueMetadata[] | null;
202
203
  }
203
204
  export type RefsMissingMetadata = {
204
205
  [refId: string]: RefMetadataType[];
@@ -209,6 +210,7 @@ export type RefMetadataRequestedById = {
209
210
  export type RefMetadataType = keyof RefMetadata;
210
211
  export declare const pullRequestMetadataType = "pullRequest";
211
212
  export declare const upstreamMetadataType = "upstream";
213
+ export declare const issueMetadataType = "issue";
212
214
  export declare const allMetadataTypes: RefMetadataType[];
213
215
  export type RefMetadataItem = {
214
216
  refId: string;
@@ -218,6 +220,10 @@ export type RefMetadataItem = {
218
220
  refId: string;
219
221
  type: typeof upstreamMetadataType;
220
222
  data: UpstreamMetadata;
223
+ } | {
224
+ refId: string;
225
+ type: typeof issueMetadataType;
226
+ data: IssueMetadata;
221
227
  };
222
228
  export interface BaseMetadata {
223
229
  context?: GraphItemContext;
@@ -238,6 +244,12 @@ export interface UpstreamMetadata extends BaseMetadata {
238
244
  behind: number;
239
245
  sha?: Sha;
240
246
  }
247
+ export interface IssueMetadata extends BaseMetadata {
248
+ displayId: string;
249
+ id: string;
250
+ issueTrackerType: IssueTrackerType;
251
+ title: string;
252
+ }
241
253
  export interface ChildRefsByType {
242
254
  heads: Head[];
243
255
  remotes: Remote[];
@@ -6,4 +6,12 @@ export type AzureDevopsHostingServiceType = 'azureDevops';
6
6
  export type BitBucketHostingServiceType = 'bitbucket';
7
7
  export type BitBucketServerHostingServiceType = 'bitbucketServer';
8
8
  export type HostingServiceType = GitHubDotComHostingServiceType | GithubEnterpriseHostingServiceType | BitBucketHostingServiceType | BitBucketServerHostingServiceType | GitLabHostingServiceType | GitLabSelfHostingServiceType | AzureDevopsHostingServiceType;
9
+ export type GitHubIssueTrackerType = GitHubDotComHostingServiceType;
10
+ export type GithubEnterpriseIssueTrackerType = GithubEnterpriseHostingServiceType;
11
+ export type GitLabIssueTrackerType = GitLabHostingServiceType;
12
+ export type GitLabSelfHostedIssueTrackerType = GitLabSelfHostingServiceType;
13
+ export type JiraCloudIssueTrackerType = 'jiraCloud';
14
+ export type JiraServerIssueTrackerType = 'jiraServer';
15
+ export type TrelloIssueTrackerType = 'trello';
16
+ export type IssueTrackerType = GitHubIssueTrackerType | GithubEnterpriseIssueTrackerType | GitLabIssueTrackerType | GitLabSelfHostedIssueTrackerType | JiraCloudIssueTrackerType | JiraServerIssueTrackerType | TrelloIssueTrackerType;
9
17
  export declare function getHostingServiceName(hostingServiceType: HostingServiceType): string;