@gitkraken/gitkraken-components 13.0.0-vnext.3 → 13.0.0-vnext.7

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Alignment, ScrollParams } from 'react-virtualized';
3
2
  import type { ReactElement } from 'react';
4
3
  import React from 'react';
@@ -173,7 +172,8 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
173
172
  isRefContextMenuShown: boolean;
174
173
  isMounted: boolean;
175
174
  selectedShas: Set<Sha>;
176
- lastFocusedSha?: Sha;
175
+ selectionAnchorSha?: Sha;
176
+ selectionFocusSha?: Sha;
177
177
  processedGraphRowBySha: ProcessedGraphRowBySha;
178
178
  shaByRefId: ShaByRefId;
179
179
  childrenBySha: ChildrenBySha;
@@ -247,7 +247,14 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
247
247
  onRefDrop: OnRefDrop;
248
248
  onRefEndDrag: OnRefEndDrag;
249
249
  onZoneRowClick(event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha): void;
250
- getShiftSelectRange(currentSha: Sha): Sha[];
250
+ getShiftSelectRange(currentSha: Sha, shiftSelectMode: ShiftSelectMode): Sha[];
251
+ private getTopologicalPathBetween;
252
+ /**
253
+ * Validates that a path has only 2 endpoints - the start and end commits.
254
+ * An endpoint is a commit that has no children or parents within the selected path
255
+ * (excluding the explicit start and end points).
256
+ */
257
+ private hasOnlyTwoEndpoints;
251
258
  onClickRef: OnClickRef;
252
259
  onClickCommit: OnClickCommit;
253
260
  onDoubleClickCommit: OnDoubleClickCommit;
@@ -367,7 +374,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
367
374
  isMacOSPlatform(): boolean;
368
375
  isCommitListFiltered(): boolean;
369
376
  getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
370
- decorateWithHelmet: (container: ReactElement<'div'>, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
377
+ decorateWithHelmet: (container: ReactElement<"div">, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
371
378
  render(): React.JSX.Element;
372
379
  }
373
380
  export default GraphContainer;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { HandleStyles, ResizeCallback, ResizeStartCallback } from 're-resizable';
3
2
  import type { ReactElement, ReactNode } from 'react';
4
3
  import React from 'react';
@@ -154,5 +154,5 @@ export declare enum graphCommitDescDisplayModes {
154
154
  NEVER = "NEVER"
155
155
  }
156
156
  export type GraphCommitDescDisplayMode = graphCommitDescDisplayModes.ALWAYS | graphCommitDescDisplayModes.ON_HOVER | graphCommitDescDisplayModes.NEVER;
157
- export type ShiftSelectMode = 'simple';
157
+ export type ShiftSelectMode = 'simple' | 'topological';
158
158
  export type GraphSearchMode = 'normal' | 'filter';
@@ -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 {
@@ -147,7 +147,7 @@ export type ReserverInfoBySha = {
147
147
  };
148
148
  export type RefTargetFunc = () => Element | null | undefined;
149
149
  export type ColumnContentGenerator = () => ReactElement<any>;
150
- export type GraphItemContext = string | Object;
150
+ export type GraphItemContext = string | object;
151
151
  export type RefGroupContexts = {
152
152
  [name: string]: GraphItemContext;
153
153
  };
@@ -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;
@@ -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 = {
package/dist/index.d.ts CHANGED
@@ -3,6 +3,20 @@ import ScrollbarContainer from './components/graph/common/ScrollbarContainer';
3
3
  import GraphContainer from './components/graph/GraphContainer';
4
4
  export * from './components/graph/GraphContainer';
5
5
  export * from './components/dnd/DndComponent';
6
- export * from './types';
6
+ export * from './domain/commit/CommitConstants';
7
+ export * from './domain/generic/GenericTypes';
8
+ export * from './domain/commit/CommitTypes';
9
+ export * from './domain/graph/GraphConstants';
10
+ export * from './domain/graph/GraphTypes';
11
+ export * from './domain/hostingservice/HostingServiceTypes';
12
+ export * from './domain/ref/RefConstants';
13
+ export * from './domain/ref/RefTypes';
14
+ export * from './domain/workdir/WorkDirTypes';
15
+ export * from './domain/ui/UiTypes';
16
+ export * from './domain/language/LanguageTypes';
17
+ export * from './domain/language/LanguageConstants';
18
+ export * from './domain/cssvariable/CssVariableConstants';
19
+ export * from './domain/diff/DiffTypes';
20
+ export * from './domain/diff/DiffConstants';
7
21
  export { DndComponent, ScrollbarContainer };
8
22
  export default GraphContainer;