@gitkraken/gitkraken-components 11.0.1 → 11.0.3

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/CHANGELOG.md CHANGED
@@ -1,11 +1,24 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 11.0.3
4
+
5
+ - Improved external icon handling and added type safety ([#370](https://github.com/gitkraken/GitKrakenComponents/pull/370))
6
+ - Applied correct context menu items to `IssueIcon` ([#370](https://github.com/gitkraken/GitKrakenComponents/pull/370))
7
+ - Fixed an issue where the context menu did not appear when right-clicking outside the input field on WIP rows ([#375](https://github.com/gitkraken/GitKrakenComponents/pull/375))
8
+
9
+ ## 11.0.2
10
+
11
+ - Fixed an issue with ref labels sometimes not rendering properly when hovered/unhovered. ([#367](https://github.com/gitkraken/GitKrakenComponents/pull/367))
12
+ - Added some data-test-classes for automated UI tests to find DOM nodes. ([#369](https://github.com/gitkraken/GitKrakenComponents/pull/369))
13
+
3
14
  ## 11.0.1
4
- - Fixed tooltip css so that tooltips on the commit notes and ref label icons are no longer 0 opacity. (CSS classes were modified by previous `react-bootstrap` bump.) ([#366](https://github.com/gitkraken/GitKrakenComponents/pull/366))
15
+
16
+ - Fixed tooltip css so that tooltips on the commit notes and ref label icons are no longer 0 opacity. (CSS classes were modified by previous `react-bootstrap` bump.) ([#366](https://github.com/gitkraken/GitKrakenComponents/pull/366))
5
17
 
6
18
  ## 11.0.0
7
- - **BREAKING CHANGE:** Upgraded from `react`/`react-dom` 16 to 17. ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
8
- - **BREAKING CHANGE:** Upgraded `react-bootstrap` from 0.32.4 to 2.10.7 ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
9
- - The full consequences of this on your project's CSS cannot be fully predicted, so you should test thoroughly. Known concerns which affected at least one project are listed below.
10
- - The DIV wrapping the ref-creation text input no longer receives the `has-error` class, and the input no longer receives the `is-valid` class. Instead, the input receives the `is-invalid` class.
11
- - Added `AzureDevopsIssueTrackerType` (in addition to the existing `AzureDevopsIssueTrackerType`) ([262cbf8e](https://github.com/gitkraken/GitKrakenComponents/commit/262cbf8e81c8497676e93fde0d32fdf537fec706))
19
+
20
+ - **BREAKING CHANGE:** Upgraded from `react`/`react-dom` 16 to 17. ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
21
+ - **BREAKING CHANGE:** Upgraded `react-bootstrap` from 0.32.4 to 2.10.7 ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
22
+ - The full consequences of this on your project's CSS cannot be fully predicted, so you should test thoroughly. Known concerns which affected at least one project are listed below.
23
+ - The DIV wrapping the ref-creation text input no longer receives the `has-error` class, and the input no longer receives the `is-valid` class. Instead, the input receives the `is-invalid` class.
24
+ - Added `AzureDevopsIssueTrackerType` (in addition to the existing `AzureDevopsIssueTrackerType`) ([262cbf8e](https://github.com/gitkraken/GitKrakenComponents/commit/262cbf8e81c8497676e93fde0d32fdf537fec706))
@@ -38,6 +38,7 @@ export default class WorkDirMessageInput extends React.Component<WorkDirMessageI
38
38
  componentDidUpdate(): void;
39
39
  componentWillUnmount(): void;
40
40
  onWipKeyDown(event: Event): void;
41
+ handleContextMenu: (event: React.MouseEvent<any>) => void;
41
42
  render(): ReactElement<'div'>;
42
43
  }
43
44
  export {};
@@ -5,7 +5,7 @@ import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRef
5
5
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
6
6
  import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
7
7
  import type { OnClick, OnContextMenu, OnDoubleClick } from '../../../domain/ui/UiTypes';
8
- type RefNodeProps = {
8
+ export type RefNodeProps = {
9
9
  enableShowHideRefsOptions: boolean;
10
10
  getExternalIcon: GetExternalIcon;
11
11
  groupIsHovered: boolean;
@@ -15,6 +15,7 @@ type RefNodeProps = {
15
15
  isGhostRef: boolean;
16
16
  isInUnsupportedRebase: boolean;
17
17
  isRefGroupIncluded: boolean;
18
+ key?: string;
18
19
  onClick: OnClickRef;
19
20
  onContextMenu: OnRefZoneContextMenu;
20
21
  onDoubleClick: OnDoubleClickRef;
@@ -53,4 +54,3 @@ export default class RefNode extends React.PureComponent<RefNodeProps> {
53
54
  onDoubleClickMetadata: OnDoubleClickRefMetadata;
54
55
  render(): ReactElement<any | 'span'>;
55
56
  }
56
- export {};
@@ -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 { BaseMetadata, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
9
+ import type { BaseMetadata, ExternalIconKeys, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, 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;
@@ -53,7 +53,7 @@ export declare function workDirStatsHaveChanges(workDirStats?: WorkDirStats): bo
53
53
  export declare function hasSingleSelectedSha(selectedShas: Set<Sha>): boolean;
54
54
  export declare function isSingleSelected(selectedShas: Set<Sha>, sha: Sha): boolean;
55
55
  export declare function getScrollToAlignment(rowHeight: number, clientHeight: number, scrollTop: number, scrollToIndex: number): Alignment;
56
- export declare function getGraphZoneIconByType(zoneType: GraphZoneType): string;
56
+ export declare function getGraphZoneIconByType(zoneType: GraphZoneType): ExternalIconKeys | undefined;
57
57
  export declare function isHeadActive(head: Head): boolean;
58
58
  export declare function isGraphRefActive(ref: GraphRef): boolean;
59
59
  export interface GraphRowHelperProps {
@@ -396,7 +396,8 @@ export type DownstreamsByUpstream = {
396
396
  [upstreamName: string]: string[];
397
397
  };
398
398
  export type GraphPlatform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin';
399
- export type GetExternalIcon = (key: string) => ReactElement<any>;
399
+ export type ExternalIconKeys = 'added' | 'author' | 'branch' | 'changes' | 'check' | 'commit' | 'datetime' | 'deleted' | 'files' | 'filter' | 'graph' | 'head' | 'hide' | `issue-${IssueTrackerType}` | 'loading' | 'message' | 'modified' | 'pull-request' | 'remote' | `remote-${HostingServiceType}` | 'renamed' | 'resolved' | 'settings' | 'show' | 'stash' | 'tag' | 'upstream-ahead' | 'upstream-behind' | 'warning' | 'worktree';
400
+ export type GetExternalIcon = (key: ExternalIconKeys) => ReactElement<any>;
400
401
  export type GetMissingAvatar = (email: string, sha: string) => void;
401
402
  export type GetMissingRefMetadata = (id: string, types: RefMetadataType[]) => void;
402
403
  export type FormatRefShorthand = (shorthand: RefShorthand, sha: Sha, refType: GraphRefType, data?: any | null) => RefShorthand;
@@ -14,5 +14,6 @@ export type GitLabSelfHostedIssueTrackerType = GitLabSelfHostingServiceType;
14
14
  export type JiraCloudIssueTrackerType = 'jiraCloud';
15
15
  export type JiraServerIssueTrackerType = 'jiraServer';
16
16
  export type TrelloIssueTrackerType = 'trello';
17
- export type IssueTrackerType = GitHubIssueTrackerType | GithubEnterpriseIssueTrackerType | GitLabIssueTrackerType | GitLabSelfHostedIssueTrackerType | JiraCloudIssueTrackerType | JiraServerIssueTrackerType | TrelloIssueTrackerType | AzureDevopsIssueTrackerType;
17
+ export type BitbucketIssueTrackerType = 'bitbucket';
18
+ export type IssueTrackerType = GitHubIssueTrackerType | GithubEnterpriseIssueTrackerType | GitLabIssueTrackerType | GitLabSelfHostedIssueTrackerType | JiraCloudIssueTrackerType | JiraServerIssueTrackerType | TrelloIssueTrackerType | AzureDevopsIssueTrackerType | BitbucketIssueTrackerType;
18
19
  export declare function getHostingServiceName(hostingServiceType: HostingServiceType): string;
@@ -1,5 +1,8 @@
1
1
  export declare const refTypes: {
2
- [key: string]: string;
2
+ readonly HEAD: "head";
3
+ readonly REMOTE: "remote";
4
+ readonly TAG: "tag";
5
+ readonly WORKTREE: "worktree";
3
6
  };
4
7
  export declare enum refIconsPositions {
5
8
  LEFT = "LEFT",
@@ -1,6 +1,6 @@
1
1
  import type { Sha } from '../commit/CommitTypes';
2
2
  import type * as RefConstants from './RefConstants';
3
- export type GraphRefType = keyof typeof RefConstants.refTypes;
3
+ export type GraphRefType = (typeof RefConstants.refTypes)[keyof typeof RefConstants.refTypes];
4
4
  export type RefFullName = string;
5
5
  export type RefShorthand = string;
6
6
  export type CreateRefFormData = {