react-complex-tree
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -5,2 +5,3 @@ "use strict"; | ||
var types_1 = require("../types"); | ||
var isControlKey_1 = require("../isControlKey"); | ||
var ClickArrowToExpandInteractionManager = /** @class */ (function () { | ||
@@ -19,3 +20,3 @@ function ClickArrowToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey_1.isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -22,0 +23,0 @@ actions.unselectItem(); |
@@ -5,2 +5,3 @@ "use strict"; | ||
var types_1 = require("../types"); | ||
var isControlKey_1 = require("../isControlKey"); | ||
var ClickItemToExpandInteractionManager = /** @class */ (function () { | ||
@@ -19,3 +20,3 @@ function ClickItemToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey_1.isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -22,0 +23,0 @@ actions.unselectItem(); |
@@ -5,2 +5,3 @@ "use strict"; | ||
var types_1 = require("../types"); | ||
var isControlKey_1 = require("../isControlKey"); | ||
var DoubleClickItemToExpandInteractionManager = /** @class */ (function () { | ||
@@ -19,3 +20,3 @@ function DoubleClickItemToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey_1.isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -22,0 +23,0 @@ actions.unselectItem(); |
@@ -25,5 +25,2 @@ import { TreeItem } from '../types'; | ||
toggleExpandedState: () => void; | ||
truncateItem: () => void; | ||
untruncateItem: () => void; | ||
toggleTruncatedState: () => void; | ||
selectItem: () => void; | ||
@@ -30,0 +27,0 @@ unselectItem: () => void; |
@@ -100,6 +100,6 @@ "use strict"; | ||
}, | ||
truncateItem: function () { }, | ||
untruncateItem: function () { }, | ||
toggleTruncatedState: function () { }, | ||
startRenamingItem: function () { }, | ||
startRenamingItem: function () { | ||
var _a; | ||
(_a = environment.onStartRenamingItem) === null || _a === void 0 ? void 0 : _a.call(environment, item, treeId); | ||
}, | ||
focusItem: function () { | ||
@@ -106,0 +106,0 @@ var _a; |
@@ -22,5 +22,2 @@ import React, { FormHTMLAttributes, HTMLProps, InputHTMLAttributes, Ref } from 'react'; | ||
toggleExpandedState: () => void; | ||
truncateItem: () => void; | ||
untruncateItem: () => void; | ||
toggleTruncatedState: () => void; | ||
selectItem: () => void; | ||
@@ -148,6 +145,5 @@ unselectItem: () => void; | ||
} | ||
export declare type IndividualTreeViewState<C extends string> = { | ||
export declare type IndividualTreeViewState<C extends string = never> = { | ||
selectedItems?: TreeItemIndex[]; | ||
expandedItems?: TreeItemIndex[]; | ||
untruncatedItems?: TreeItemIndex[]; | ||
focusedItem?: TreeItemIndex; | ||
@@ -157,3 +153,3 @@ } & { | ||
}; | ||
export interface TreeViewState<C extends string> { | ||
export interface TreeViewState<C extends string = never> { | ||
[treeId: string]: IndividualTreeViewState<C> | undefined; | ||
@@ -160,0 +156,0 @@ } |
import { InteractionMode, } from '../types'; | ||
import { isControlKey } from '../isControlKey'; | ||
var ClickArrowToExpandInteractionManager = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function ClickArrowToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -18,0 +19,0 @@ actions.unselectItem(); |
import { InteractionMode, } from '../types'; | ||
import { isControlKey } from '../isControlKey'; | ||
var ClickItemToExpandInteractionManager = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function ClickItemToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -18,0 +19,0 @@ actions.unselectItem(); |
import { InteractionMode, } from '../types'; | ||
import { isControlKey } from '../isControlKey'; | ||
var DoubleClickItemToExpandInteractionManager = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function DoubleClickItemToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -18,0 +19,0 @@ actions.unselectItem(); |
@@ -25,5 +25,2 @@ import { TreeItem } from '../types'; | ||
toggleExpandedState: () => void; | ||
truncateItem: () => void; | ||
untruncateItem: () => void; | ||
toggleTruncatedState: () => void; | ||
selectItem: () => void; | ||
@@ -30,0 +27,0 @@ unselectItem: () => void; |
@@ -97,6 +97,6 @@ var __assign = (this && this.__assign) || function () { | ||
}, | ||
truncateItem: function () { }, | ||
untruncateItem: function () { }, | ||
toggleTruncatedState: function () { }, | ||
startRenamingItem: function () { }, | ||
startRenamingItem: function () { | ||
var _a; | ||
(_a = environment.onStartRenamingItem) === null || _a === void 0 ? void 0 : _a.call(environment, item, treeId); | ||
}, | ||
focusItem: function () { | ||
@@ -103,0 +103,0 @@ var _a; |
@@ -22,5 +22,2 @@ import React, { FormHTMLAttributes, HTMLProps, InputHTMLAttributes, Ref } from 'react'; | ||
toggleExpandedState: () => void; | ||
truncateItem: () => void; | ||
untruncateItem: () => void; | ||
toggleTruncatedState: () => void; | ||
selectItem: () => void; | ||
@@ -148,6 +145,5 @@ unselectItem: () => void; | ||
} | ||
export declare type IndividualTreeViewState<C extends string> = { | ||
export declare type IndividualTreeViewState<C extends string = never> = { | ||
selectedItems?: TreeItemIndex[]; | ||
expandedItems?: TreeItemIndex[]; | ||
untruncatedItems?: TreeItemIndex[]; | ||
focusedItem?: TreeItemIndex; | ||
@@ -157,3 +153,3 @@ } & { | ||
}; | ||
export interface TreeViewState<C extends string> { | ||
export interface TreeViewState<C extends string = never> { | ||
[treeId: string]: IndividualTreeViewState<C> | undefined; | ||
@@ -160,0 +156,0 @@ } |
import { InteractionMode, } from '../types'; | ||
import { isControlKey } from '../isControlKey'; | ||
var ClickArrowToExpandInteractionManager = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function ClickArrowToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -18,0 +19,0 @@ actions.unselectItem(); |
import { InteractionMode, } from '../types'; | ||
import { isControlKey } from '../isControlKey'; | ||
var ClickItemToExpandInteractionManager = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function ClickItemToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -18,0 +19,0 @@ actions.unselectItem(); |
import { InteractionMode, } from '../types'; | ||
import { isControlKey } from '../isControlKey'; | ||
var DoubleClickItemToExpandInteractionManager = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function DoubleClickItemToExpandInteractionManager(environment) { | ||
} | ||
else if (e.ctrlKey) { | ||
else if (isControlKey(e)) { | ||
if (renderFlags.isSelected) { | ||
@@ -18,0 +19,0 @@ actions.unselectItem(); |
@@ -25,5 +25,2 @@ import { TreeItem } from '../types'; | ||
toggleExpandedState: () => void; | ||
truncateItem: () => void; | ||
untruncateItem: () => void; | ||
toggleTruncatedState: () => void; | ||
selectItem: () => void; | ||
@@ -30,0 +27,0 @@ unselectItem: () => void; |
@@ -97,6 +97,6 @@ var __assign = (this && this.__assign) || function () { | ||
}, | ||
truncateItem: function () { }, | ||
untruncateItem: function () { }, | ||
toggleTruncatedState: function () { }, | ||
startRenamingItem: function () { }, | ||
startRenamingItem: function () { | ||
var _a; | ||
(_a = environment.onStartRenamingItem) === null || _a === void 0 ? void 0 : _a.call(environment, item, treeId); | ||
}, | ||
focusItem: function () { | ||
@@ -103,0 +103,0 @@ var _a; |
@@ -22,5 +22,2 @@ import React, { FormHTMLAttributes, HTMLProps, InputHTMLAttributes, Ref } from 'react'; | ||
toggleExpandedState: () => void; | ||
truncateItem: () => void; | ||
untruncateItem: () => void; | ||
toggleTruncatedState: () => void; | ||
selectItem: () => void; | ||
@@ -148,6 +145,5 @@ unselectItem: () => void; | ||
} | ||
export declare type IndividualTreeViewState<C extends string> = { | ||
export declare type IndividualTreeViewState<C extends string = never> = { | ||
selectedItems?: TreeItemIndex[]; | ||
expandedItems?: TreeItemIndex[]; | ||
untruncatedItems?: TreeItemIndex[]; | ||
focusedItem?: TreeItemIndex; | ||
@@ -157,3 +153,3 @@ } & { | ||
}; | ||
export interface TreeViewState<C extends string> { | ||
export interface TreeViewState<C extends string = never> { | ||
[treeId: string]: IndividualTreeViewState<C> | undefined; | ||
@@ -160,0 +156,0 @@ } |
{ | ||
"name": "react-complex-tree", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"main": "lib/cjs/index.js", | ||
@@ -32,3 +32,3 @@ "module": "lib/esm/index.js", | ||
"@types/react-dom": "^17.0.11", | ||
"@welldone-software/why-did-you-render": "^6.2.0", | ||
"@welldone-software/why-did-you-render": "^7.0.1", | ||
"babel-jest": "^27.5.1", | ||
@@ -58,3 +58,3 @@ "babel-loader": "^8.2.2", | ||
}, | ||
"gitHead": "665fce7c44886b59cf7fb3a4d17bd66790a72b26" | ||
"gitHead": "1c8802ed9395678e7299b77ee37407423f37eac7" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
982898
384
11561