@gitkraken/gitkraken-components 13.0.0-vnext.4 → 13.0.0-vnext.8

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,15 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
3
  ## 11.0.2
4
- - Fixed an issue with ref labels sometimes not rendering properly when hovered/unhovered. ([#367](https://github.com/gitkraken/GitKrakenComponents/pull/367))
5
- - Added some data-test-classes for automated UI tests to find DOM nodes. ([#369](https://github.com/gitkraken/GitKrakenComponents/pull/369))
4
+
5
+ - Fixed an issue with ref labels sometimes not rendering properly when hovered/unhovered. ([#367](https://github.com/gitkraken/GitKrakenComponents/pull/367))
6
+ - Added some data-test-classes for automated UI tests to find DOM nodes. ([#369](https://github.com/gitkraken/GitKrakenComponents/pull/369))
6
7
 
7
8
  ## 11.0.1
8
- - 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))
9
+
10
+ - 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))
9
11
 
10
12
  ## 11.0.0
11
- - **BREAKING CHANGE:** Upgraded from `react`/`react-dom` 16 to 17. ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
12
- - **BREAKING CHANGE:** Upgraded `react-bootstrap` from 0.32.4 to 2.10.7 ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
13
- - 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.
14
- - 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.
15
- - Added `AzureDevopsIssueTrackerType` (in addition to the existing `AzureDevopsIssueTrackerType`) ([262cbf8e](https://github.com/gitkraken/GitKrakenComponents/commit/262cbf8e81c8497676e93fde0d32fdf537fec706))
13
+
14
+ - **BREAKING CHANGE:** Upgraded from `react`/`react-dom` 16 to 17. ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
15
+ - **BREAKING CHANGE:** Upgraded `react-bootstrap` from 0.32.4 to 2.10.7 ([#365](https://github.com/gitkraken/GitKrakenComponents/pull/365))
16
+ - 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.
17
+ - 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.
18
+ - Added `AzureDevopsIssueTrackerType` (in addition to the existing `AzureDevopsIssueTrackerType`) ([262cbf8e](https://github.com/gitkraken/GitKrakenComponents/commit/262cbf8e81c8497676e93fde0d32fdf537fec706))
package/README.md CHANGED
@@ -3,10 +3,12 @@
3
3
  This is a shared module between the GitKraken app and GitLens to share React components.
4
4
 
5
5
  ## Requires resolution to React 17
6
+
6
7
  > [!WARNING]
7
8
  > In order for this package to work properly, you must resolve React to version 17 in your own project.
8
9
  > The reason for this is because this library's react-bootstrap dependency lists React 16 as a dependency, and npm/yarn 1 do not provide a way for dependencies to lock sub-dependencies. Therefore it is up to your project to force this library's react-bootstrap to use react 17.
9
10
  > The following is an example of what to put into your package.json:
11
+
10
12
  ```
11
13
  "resolutions": {
12
14
  "react": "17.0.2",
@@ -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,21 @@ 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[] | undefined;
251
+ private getTopologicalPathBetween;
252
+ private getDirectTopologicalPathBetween;
253
+ /**
254
+ * Finds the nearest commit that is topologically reachable from the anchor commit.
255
+ * Searches in the appropriate direction based on whether the anchor is ahead or behind the target.
256
+ * This is used as a fallback when the clicked commit is not directly topologically reachable.
257
+ */
258
+ private findNearestTopologicallyReachableCommit;
259
+ /**
260
+ * Validates that a path has only 2 endpoints - the start and end commits.
261
+ * An endpoint is a commit that has no children or parents within the selected path
262
+ * (excluding the explicit start and end points).
263
+ */
264
+ private hasOnlyTwoEndpoints;
251
265
  onClickRef: OnClickRef;
252
266
  onClickCommit: OnClickCommit;
253
267
  onDoubleClickCommit: OnDoubleClickCommit;
@@ -367,7 +381,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
367
381
  isMacOSPlatform(): boolean;
368
382
  isCommitListFiltered(): boolean;
369
383
  getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
370
- decorateWithHelmet: (container: ReactElement<'div'>, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
384
+ decorateWithHelmet: (container: ReactElement<"div">, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
371
385
  render(): React.JSX.Element;
372
386
  }
373
387
  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';
@@ -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
  };
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;