@gitkraken/gitkraken-components 10.7.1 → 11.0.0-vnext.1

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.
@@ -27,7 +27,7 @@ declare class DndContainer extends React.PureComponent<DndContainerProps> {
27
27
  childReactElementsById: ChildReactElementsById;
28
28
  constructor(props: DndContainerProps);
29
29
  componentDidMount(): void;
30
- componentWillReceiveProps(nextProps: DndContainerProps): void;
30
+ componentDidUpdate(nextProps: DndContainerProps): void;
31
31
  componentWillUnmount(): void;
32
32
  onDrop: DraggulaOnDrop;
33
33
  isContainerCallback: DraggulaIsContainer;
@@ -219,7 +219,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
219
219
  timelinesInterval?: NodeJS.Timeout;
220
220
  constructor(props: Props);
221
221
  componentDidMount(): void;
222
- componentWillReceiveProps(nextProps: Props): void;
222
+ UNSAFE_componentWillReceiveProps(nextProps: Props): void;
223
223
  componentWillUnmount(): void;
224
224
  focus(): void;
225
225
  getRefIconsPositionOrDefault(refIconsPosition?: RefIconsPosition | null): RefIconsPosition;
@@ -367,7 +367,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
367
367
  isMacOSPlatform(): boolean;
368
368
  isCommitListFiltered(): boolean;
369
369
  getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
370
- decorateWithHelmet: (container: ReactElement<'div'>, cssVariables: CssVariables, nonce?: string) => ReactElement<'div'>;
371
- render(): ReactElement<'div'>;
370
+ decorateWithHelmet: (container: ReactElement<'div'>, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
371
+ render(): React.JSX.Element;
372
372
  }
373
373
  export default GraphContainer;
@@ -15,7 +15,7 @@ interface Props {
15
15
  export default class ScrollMarker extends React.PureComponent<Props> {
16
16
  canvas: HTMLCanvasElement | null;
17
17
  componentDidMount(): void;
18
- componentWillReceiveProps(nextProps: Props): void;
18
+ componentDidUpdate(nextProps: Props): void;
19
19
  updateCanvas(nextProps?: Props): void;
20
20
  render(): ReactElement<'canvas'>;
21
21
  }
@@ -1,6 +1,6 @@
1
1
  import type { ReactElement, RefCallback } from 'react';
2
2
  import React from 'react';
3
- import { OverlayTrigger } from 'react-bootstrap';
3
+ import type { OverlayTriggerProps } from 'react-bootstrap';
4
4
  import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
5
5
  import type { GraphItemContext } from '../../../domain/graph/GraphTypes';
6
6
  import type { ComponentTooltip } from '../../../domain/ui/UiTypes';
@@ -25,7 +25,7 @@ type Props = {
25
25
  type AvatarState = {
26
26
  tooltipText?: string;
27
27
  };
28
- interface OverlayTriggerExt extends OverlayTrigger {
28
+ interface OverlayTriggerExt extends React.FC<OverlayTriggerProps> {
29
29
  show(): void;
30
30
  }
31
31
  export default class GraphAvatar extends React.Component<Props, AvatarState> {
@@ -1,9 +1,9 @@
1
- import type { ReactElement } from 'react';
1
+ import type { MouseEventHandler, ReactElement } from 'react';
2
2
  import React from 'react';
3
3
  import type { GraphZone, GraphZoneType } from '../../../domain/graph/GraphConstants';
4
4
  import type { ExcludeRefsById, GetExternalIcon, GraphColumnSetting, GraphItemContext, GraphRefOptData, IncludeOnlyRefsById, OnFilterColumnClick, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnGraphZoneResizeStart, OnSettingsClick, OnToggleRefNodesShown } from '../../../domain/graph/GraphTypes';
5
5
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
6
- import type { OnClick, OnMouseEnter, OnMouseLeave } from '../../../domain/ui/UiTypes';
6
+ import type { OnMouseEnter, OnMouseLeave } from '../../../domain/ui/UiTypes';
7
7
  type GraphHeaderProps = {
8
8
  columnSetting?: GraphColumnSetting;
9
9
  enableResizer?: boolean;
@@ -35,12 +35,13 @@ type GraphHeaderProps = {
35
35
  };
36
36
  type GraphHeaderState = {
37
37
  showPopoverMenu: boolean;
38
- refPopoverMenuTarget: React.ReactInstance | undefined;
39
38
  };
40
39
  declare class GraphHeader extends React.Component<GraphHeaderProps, GraphHeaderState> {
41
40
  private headIconsRef;
41
+ private containerRef;
42
+ private popoverMenuTargetRef;
42
43
  constructor(props: GraphHeaderProps);
43
- onHiddenRefsClick: OnClick;
44
+ onHiddenRefsClick: MouseEventHandler;
44
45
  onShowRefNodes: OnToggleRefNodesShown;
45
46
  compareGraphRefOpts(a: GraphRefOptData, b: GraphRefOptData): number;
46
47
  render(): ReactElement<any> | null;
@@ -27,5 +27,4 @@ declare class CreateRefNode extends React.PureComponent<CreateRefNodeProps, Crea
27
27
  onInputChange(shorthand?: RefShorthand): void;
28
28
  render(): ReactElement<'div'>;
29
29
  }
30
- declare const _default: import("react-onclickoutside").WrapperClass<CreateRefNodeProps, typeof CreateRefNode>;
31
- export default _default;
30
+ export default CreateRefNode;
@@ -1,6 +1,6 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, RefObject } from 'react';
2
2
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
3
- import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefZoneContextMenu, OnToggleRefNodesShown, GraphRefGroup as RefGroup, RefGroupContexts, RefMetadataById, RefMetadataType, RefTargetFunc } from '../../../domain/graph/GraphTypes';
3
+ import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefZoneContextMenu, OnToggleRefNodesShown, GraphRefGroup as RefGroup, RefGroupContexts, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
4
4
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
5
5
  import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
6
6
  type RefNodesProps = {
@@ -11,7 +11,7 @@ type RefNodesProps = {
11
11
  context: GraphItemContext | null;
12
12
  enableShowHideRefsOptions: boolean;
13
13
  getExternalIcon: GetExternalIcon;
14
- getTargetRef: RefTargetFunc;
14
+ targetRef: RefObject<HTMLDivElement>;
15
15
  hasActive: boolean;
16
16
  hasRefs: boolean;
17
17
  includeOnlyRefsById: IncludeOnlyRefsById;
@@ -42,5 +42,5 @@ type RefNodesProps = {
42
42
  type: CommitType;
43
43
  useColumnHeaderIcons: boolean;
44
44
  };
45
- declare function RefNodes({ enabledRefMetadataTypes, column, columnForColoring, context, enableShowHideRefsOptions, getTargetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refIconsPosition, refMetadata, refNodeHovered, sha, showRemoteNamesOnRefs, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, useColumnHeaderIcons, }: RefNodesProps): ReactElement<'span' | 'div'>;
45
+ declare function RefNodes({ enabledRefMetadataTypes, column, columnForColoring, context, enableShowHideRefsOptions, targetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refIconsPosition, refMetadata, refNodeHovered, sha, showRemoteNamesOnRefs, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, useColumnHeaderIcons, }: RefNodesProps): ReactElement<'span' | 'div'>;
46
46
  export default RefNodes;
@@ -11,5 +11,5 @@ type Props = {
11
11
  onMouseLeave?: OnMouseLeave;
12
12
  style?: RefPopoverStyle;
13
13
  };
14
- declare function RefPopover({ style, children, column, numGraphColumns, onMouseEnter, onMouseLeave, }: Props): ReactElement<'div'>;
14
+ declare function RefPopover({ style, children, column, numGraphColumns, onMouseEnter, onMouseLeave, ...props }: Props): ReactElement<'div'>;
15
15
  export default RefPopover;
@@ -2,7 +2,7 @@ import type { ReactElement } from 'react';
2
2
  import React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { Style } from '../../../domain/generic/GenericTypes';
5
- import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRefGroup, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefGroupContexts, RefMetadataById, RefMetadataType, RefTargetFunc } from '../../../domain/graph/GraphTypes';
5
+ import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRefGroup, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefGroupContexts, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
6
6
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
7
7
  import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
8
8
  type RefZoneDefaultProps = {
@@ -57,10 +57,9 @@ type RefZoneProps = {
57
57
  width: number;
58
58
  };
59
59
  export default class RefZone extends React.PureComponent<RefZoneProps> {
60
- refPopoverTarget?: Element;
60
+ popoverTargetRef: React.RefObject<HTMLDivElement>;
61
61
  static defaultProps: RefZoneDefaultProps;
62
- componentWillReceiveProps(nextProps: RefZoneProps): void;
63
- getRefPopoverTarget: RefTargetFunc;
62
+ componentDidUpdate(nextProps: RefZoneProps): void;
64
63
  onCustomToggleRefNodesShown: OnToggleRefNodesShown;
65
64
  render(): ReactElement<any>;
66
65
  }
@@ -68,7 +68,8 @@ export default class Resizable extends React.PureComponent<Props, State> {
68
68
  onWheelTimeOut?: NodeJS.Timeout;
69
69
  isMouseWheeling: boolean;
70
70
  constructor(props: Props);
71
- componentWillReceiveProps(nextProps: Props): void;
71
+ static getDerivedStateFromProps(props: Props, state: State): State;
72
+ componentDidUpdate(nextProps: Props): void;
72
73
  _onResize: ResizeCallback;
73
74
  _onResizeStart: ResizeStartCallback;
74
75
  _onResizeEnd: ResizeCallback;