@gitkraken/gitkraken-components 10.1.19 → 10.1.21

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.
@@ -8,12 +8,19 @@ export type DndOnEndDrag = (event: React.DragEvent, sourceData?: any, targetData
8
8
  export type DndCanDrop = (event?: React.DragEvent, sourceData?: any, targetData?: any) => boolean;
9
9
  export type DndOnDrop = (event: React.DragEvent, sourceData?: any, targetData?: any) => void;
10
10
  export type DndId = string;
11
+ export type DndChildBaseProps = {
12
+ isDraggable?: boolean;
13
+ isDragging?: boolean;
14
+ isDroppable?: boolean;
15
+ isOver?: boolean;
16
+ };
11
17
  export type DndComponentProps = {
12
- children?: ReactNode;
18
+ children?: ReactElement<DndChildBaseProps>;
13
19
  className?: string;
14
20
  canDrag?: DndCanDrag | boolean;
15
21
  canDrop?: DndCanDrop | boolean;
16
22
  dndId: DndId;
23
+ forwardDndPropsToChildren?: boolean;
17
24
  onBeginDrag?: DndOnBeginDrag;
18
25
  onDragEnter?: DndOnDragEnter;
19
26
  onDragLeave?: DndOnDragLeave;
@@ -45,6 +52,7 @@ declare class DndComponent extends React.Component<DndComponentProps, DndCompone
45
52
  private onDragStart;
46
53
  private onDragEnd;
47
54
  private onDrop;
55
+ cloneChildrenWithShallowMergedProps(children?: ReactNode, childProps?: DndChildBaseProps): ReactNode | undefined;
48
56
  render(): ReactElement<any>;
49
57
  }
50
58
  export default DndComponent;
@@ -239,6 +239,7 @@ declare class GraphContainer extends React.PureComponent<Props, ComponentState>
239
239
  onRefDragLeave: OnRefDragLeave;
240
240
  onRefDrop: OnRefDrop;
241
241
  onRefEndDrag: OnRefEndDrag;
242
+ onZoneRowClick(event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha): void;
242
243
  onClickRef: OnClickRef;
243
244
  onClickCommit: OnClickCommit;
244
245
  onDoubleClickCommit: OnDoubleClickCommit;
@@ -16,11 +16,13 @@ type CreateRefNodeProps = {
16
16
  translate: TranslationFn;
17
17
  };
18
18
  type CreateRefNodeState = {
19
- shorthand: RefShorthand;
19
+ currentShorthand: RefShorthand;
20
+ initShorthand: RefShorthand;
20
21
  };
21
22
  declare class CreateRefNode extends React.PureComponent<CreateRefNodeProps, CreateRefNodeState> {
22
23
  handleClickOutside(): void;
23
24
  constructor(props: CreateRefNodeProps);
25
+ static getDerivedStateFromProps(props: CreateRefNodeProps, state: CreateRefNodeState): CreateRefNodeState | null;
24
26
  onInputChange(shorthand?: RefShorthand): void;
25
27
  render(): ReactElement<'div'>;
26
28
  }