@gitkraken/gitkraken-components 10.1.17 → 10.1.19
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.
- package/dist/components/graph/refzone/Icon.d.ts +6 -6
- package/dist/components/graph/refzone/RefNode.d.ts +6 -1
- package/dist/domain/graph/GraphHelpers.d.ts +2 -2
- package/dist/domain/graph/GraphTypes.d.ts +13 -1
- package/dist/domain/hostingservice/HostingServiceTypes.d.ts +8 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +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';
|
|
3
|
+
import type { HostingServiceType, IssueTrackerType } from '../../../domain/hostingservice/HostingServiceTypes';
|
|
4
4
|
type IconProps = {
|
|
5
5
|
icon: ReactElement<any>;
|
|
6
6
|
tooltipClassName?: string;
|
|
@@ -8,9 +8,9 @@ type IconProps = {
|
|
|
8
8
|
tooltipText?: string;
|
|
9
9
|
};
|
|
10
10
|
type IssueProps = {
|
|
11
|
-
displayId: string;
|
|
12
11
|
id: string;
|
|
13
|
-
|
|
12
|
+
issueTrackerType: IssueTrackerType;
|
|
13
|
+
toolTipText: string;
|
|
14
14
|
getExternalIcon: GetExternalIcon;
|
|
15
15
|
};
|
|
16
16
|
type RefIconProps = {
|
|
@@ -23,7 +23,7 @@ type PullRequestProps = {
|
|
|
23
23
|
icon: ReactElement<any>;
|
|
24
24
|
hostingServiceType: HostingServiceType;
|
|
25
25
|
id: string | number;
|
|
26
|
-
|
|
26
|
+
toolTipText?: string;
|
|
27
27
|
};
|
|
28
28
|
type UpStreamIndicatorProps = {
|
|
29
29
|
icon: ReactElement<any>;
|
|
@@ -32,8 +32,8 @@ type UpStreamIndicatorProps = {
|
|
|
32
32
|
tooltipText?: string;
|
|
33
33
|
};
|
|
34
34
|
export declare function Icon({ icon, tooltipClassName, tooltipId, tooltipText }: IconProps): ReactElement<any>;
|
|
35
|
-
export declare function IssueIcon({
|
|
36
|
-
export declare function PullRequestIcon({ hostingServiceType, icon, id,
|
|
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>;
|
|
37
37
|
export declare function UpstreamIndicatorIcon({ icon, type, upstream, tooltipText, }: UpStreamIndicatorProps): ReactElement<typeof Icon>;
|
|
38
38
|
export declare function RefIcon({ avatarUrl, context, icon, tooltipText }: RefIconProps): ReactElement<typeof Icon>;
|
|
39
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,
|
|
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 |
|
|
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;
|