@gitkraken/gitkraken-components 10.1.20 → 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;
@@ -16,7 +16,8 @@ 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;