@neo4j-ndl/react 2.16.12 → 2.16.14
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/lib/cjs/tree-view/TreeItemWrapper.js +9 -26
- package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/esm/tree-view/TreeItemWrapper.js +9 -3
- package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/types/tree-view/TreeItemWrapper.d.ts +2 -8
- package/lib/types/tree-view/TreeView.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
3
|
var t = {};
|
|
27
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -60,7 +37,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
60
37
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
61
38
|
*/
|
|
62
39
|
const classnames_1 = __importDefault(require("classnames"));
|
|
63
|
-
const react_1 =
|
|
40
|
+
const react_1 = require("react");
|
|
64
41
|
const utils_1 = require("../_common/utils");
|
|
65
42
|
const icons_1 = require("../icons");
|
|
66
43
|
const TreeViewTrail_1 = require("./TreeViewTrail");
|
|
@@ -178,7 +155,7 @@ const onInnerDivKeyDown = (event, shouldDisableInteraction, wrapperRef) => {
|
|
|
178
155
|
* Useful if you want to add additional functionality to the tree item but still keep the drag handle and trail
|
|
179
156
|
* Is also used internally to create the TreeViewTextItem component
|
|
180
157
|
*/
|
|
181
|
-
|
|
158
|
+
function TreeItemWrapperInner(_a, ref) {
|
|
182
159
|
var { depth, shouldDisableInteraction, shouldDisableSorting, isGhost, isIndicator, onCollapse, item, setNodeRef, setActivatorNodeRef, dragHandleProps, style, trails, children, indentationWidth, tabIndex, onFocus } = _a,
|
|
183
160
|
// Need to destruct to avoid passing it to the component
|
|
184
161
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -197,5 +174,11 @@ exports.TreeItemWrapper = react_1.default.forwardRef(function TreeItemWrapper(_a
|
|
|
197
174
|
}), style: Object.assign(Object.assign({}, style), { paddingLeft: isIndicator ? `${depth * indentationWidth}px` : 0 }), role: "treeitem", onFocus: onFocus, "aria-selected": item.isSelected, "aria-expanded": item.canHaveSubItems ? !item.isCollapsed : undefined, onKeyDown: (event) => onWrapperKeyDown(event, shouldDisableInteraction !== null && shouldDisableInteraction !== void 0 ? shouldDisableInteraction : false, wrapperRef, onCollapse, item), children: (0, jsx_runtime_1.jsxs)("div", { role: "presentation", className: "ndl-tree-view-list-item-content", ref: ref, onKeyDown: (event) => onInnerDivKeyDown(event, shouldDisableInteraction !== null && shouldDisableInteraction !== void 0 ? shouldDisableInteraction : false, wrapperRef), children: [!shouldDisableSorting && ((0, jsx_runtime_1.jsx)("button", Object.assign({ className: "ndl-tree-view-drag-handle", ref: setActivatorNodeRef, "aria-label": "pick up" }, dragHandleProps, { tabIndex: tabIndex, children: (0, jsx_runtime_1.jsx)(icons_1.DragIcon, {}) }))), trails.map((trail, index) => {
|
|
198
175
|
return (0, jsx_runtime_1.jsx)(TreeViewTrail_1.Trail, { variant: trail }, index);
|
|
199
176
|
}), children] }) }));
|
|
200
|
-
}
|
|
177
|
+
}
|
|
178
|
+
/* We need to use a custom version of forwardRef since the default one does not properly infer the types of generics */
|
|
179
|
+
function forwardRefWithGenericType(render) {
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
181
|
+
return (0, react_1.forwardRef)(render);
|
|
182
|
+
}
|
|
183
|
+
exports.TreeItemWrapper = forwardRefWithGenericType(TreeItemWrapperInner);
|
|
201
184
|
//# sourceMappingURL=TreeItemWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeItemWrapper.js","sourceRoot":"","sources":["../../../src/tree-view/TreeItemWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeItemWrapper.js","sourceRoot":"","sources":["../../../src/tree-view/TreeItemWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,iCAAkD;AAElD,4CAA+E;AAC/E,oCAAoC;AACpC,mDAAwC;AACxC,6EAKsC;AAGtC;;;;;;;;;GASG;AAEH,MAAM,gBAAgB,GAAG,CACvB,KAA0B,EAC1B,wBAAiC,EACjC,UAAsD,EACtD,UAAoC,EACpC,IAAuC,EACvC,EAAE;IACF,IAAI,wBAAwB,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI,EA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IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EACnE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CACnB,gBAAgB,CACd,KAAK,EACL,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,KAAK,EACjC,UAAU,EACV,UAAU,EACV,IAAI,CACL,YAGH,iCACE,IAAI,EAAC,cAAc,EACnB,SAAS,EAAC,iCAAiC,EAC3C,GAAG,EAAE,GAAsC,EAC3C,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CACnB,iBAAiB,CACf,KAAK,EACL,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,KAAK,EACjC,UAAU,CACX,aAGF,CAAC,oBAAoB,IAAI,CACxB,iDACE,SAAS,EAAC,2BAA2B,EACrC,GAAG,EAAE,mBAAmB,gBACb,SAAS,IAChB,eAAe,IACnB,QAAQ,EAAE,QAAQ,YAElB,uBAAC,gBAAQ,KAAG,IACL,CACV,EACA,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;oBAC3B,OAAO,uBAAC,qBAAK,IAAa,OAAO,EAAE,KAAK,IAArB,KAAK,CAAoB,CAAC;gBAC/C,CAAC,CAAC,EAED,QAAQ,IACL,GACH,CACN,CAAC;AACJ,CAAC;AAED,uHAAuH;AACvH,SAAS,yBAAyB,CAChC,MAAwD;IAExD,8DAA8D;IAC9D,OAAO,IAAA,kBAAU,EAAC,MAAM,CAAQ,CAAC;AACnC,CAAC;AAEY,QAAA,eAAe,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -31,7 +31,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
31
31
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
32
|
*/
|
|
33
33
|
import classNames from 'classnames';
|
|
34
|
-
import
|
|
34
|
+
import { forwardRef, useRef } from 'react';
|
|
35
35
|
import { findFocusableChildren, findFocusableSibling } from '../_common/utils';
|
|
36
36
|
import { DragIcon } from '../icons';
|
|
37
37
|
import { Trail } from './TreeViewTrail';
|
|
@@ -149,7 +149,7 @@ const onInnerDivKeyDown = (event, shouldDisableInteraction, wrapperRef) => {
|
|
|
149
149
|
* Useful if you want to add additional functionality to the tree item but still keep the drag handle and trail
|
|
150
150
|
* Is also used internally to create the TreeViewTextItem component
|
|
151
151
|
*/
|
|
152
|
-
|
|
152
|
+
function TreeItemWrapperInner(_a, ref) {
|
|
153
153
|
var { depth, shouldDisableInteraction, shouldDisableSorting, isGhost, isIndicator, onCollapse, item, setNodeRef, setActivatorNodeRef, dragHandleProps, style, trails, children, indentationWidth, tabIndex, onFocus } = _a,
|
|
154
154
|
// Need to destruct to avoid passing it to the component
|
|
155
155
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -168,5 +168,11 @@ export const TreeItemWrapper = React.forwardRef(function TreeItemWrapper(_a, ref
|
|
|
168
168
|
}), style: Object.assign(Object.assign({}, style), { paddingLeft: isIndicator ? `${depth * indentationWidth}px` : 0 }), role: "treeitem", onFocus: onFocus, "aria-selected": item.isSelected, "aria-expanded": item.canHaveSubItems ? !item.isCollapsed : undefined, onKeyDown: (event) => onWrapperKeyDown(event, shouldDisableInteraction !== null && shouldDisableInteraction !== void 0 ? shouldDisableInteraction : false, wrapperRef, onCollapse, item), children: _jsxs("div", { role: "presentation", className: "ndl-tree-view-list-item-content", ref: ref, onKeyDown: (event) => onInnerDivKeyDown(event, shouldDisableInteraction !== null && shouldDisableInteraction !== void 0 ? shouldDisableInteraction : false, wrapperRef), children: [!shouldDisableSorting && (_jsx("button", Object.assign({ className: "ndl-tree-view-drag-handle", ref: setActivatorNodeRef, "aria-label": "pick up" }, dragHandleProps, { tabIndex: tabIndex, children: _jsx(DragIcon, {}) }))), trails.map((trail, index) => {
|
|
169
169
|
return _jsx(Trail, { variant: trail }, index);
|
|
170
170
|
}), children] }) }));
|
|
171
|
-
}
|
|
171
|
+
}
|
|
172
|
+
/* We need to use a custom version of forwardRef since the default one does not properly infer the types of generics */
|
|
173
|
+
function forwardRefWithGenericType(render) {
|
|
174
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
175
|
+
return forwardRef(render);
|
|
176
|
+
}
|
|
177
|
+
export const TreeItemWrapper = forwardRefWithGenericType(TreeItemWrapperInner);
|
|
172
178
|
//# sourceMappingURL=TreeItemWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeItemWrapper.js","sourceRoot":"","sources":["../../../src/tree-view/TreeItemWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,
|
|
1
|
+
{"version":3,"file":"TreeItemWrapper.js","sourceRoot":"","sources":["../../../src/tree-view/TreeItemWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;GASG;AAEH,MAAM,gBAAgB,GAAG,CACvB,KAA0B,EAC1B,wBAAiC,EACjC,UAAsD,EACtD,UAAoC,EACpC,IAAuC,EACvC,EAAE;IACF,IAAI,wBAAwB,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI,EAAE;QAC3D,OAAO;KACR;IA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E,CAAC,KAAK,EAAE,EAAE,CACnB,gBAAgB,CACd,KAAK,EACL,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,KAAK,EACjC,UAAU,EACV,UAAU,EACV,IAAI,CACL,YAGH,eACE,IAAI,EAAC,cAAc,EACnB,SAAS,EAAC,iCAAiC,EAC3C,GAAG,EAAE,GAAsC,EAC3C,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CACnB,iBAAiB,CACf,KAAK,EACL,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,KAAK,EACjC,UAAU,CACX,aAGF,CAAC,oBAAoB,IAAI,CACxB,+BACE,SAAS,EAAC,2BAA2B,EACrC,GAAG,EAAE,mBAAmB,gBACb,SAAS,IAChB,eAAe,IACnB,QAAQ,EAAE,QAAQ,YAElB,KAAC,QAAQ,KAAG,IACL,CACV,EACA,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;oBAC3B,OAAO,KAAC,KAAK,IAAa,OAAO,EAAE,KAAK,IAArB,KAAK,CAAoB,CAAC;gBAC/C,CAAC,CAAC,EAED,QAAQ,IACL,GACH,CACN,CAAC;AACJ,CAAC;AAED,uHAAuH;AACvH,SAAS,yBAAyB,CAChC,MAAwD;IAExD,8DAA8D;IAC9D,OAAO,UAAU,CAAC,MAAM,CAAQ,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -21,12 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
import React from 'react';
|
|
23
23
|
import type { TreeItemComponentProps } from './tree-view-types';
|
|
24
|
-
|
|
25
|
-
* Used as a helper function to wrap the TreeItem component
|
|
26
|
-
* This adds the drag handle and trail to the start of a tree item.
|
|
27
|
-
* Useful if you want to add additional functionality to the tree item but still keep the drag handle and trail
|
|
28
|
-
* Is also used internally to create the TreeViewTextItem component
|
|
29
|
-
*/
|
|
30
|
-
export declare const TreeItemWrapper: React.ForwardRefExoticComponent<TreeItemComponentProps<Record<string, unknown>> & {
|
|
24
|
+
export declare const TreeItemWrapper: <T extends Record<string, unknown>>(props: TreeItemComponentProps<T> & {
|
|
31
25
|
children?: React.ReactNode;
|
|
32
|
-
} & React.RefAttributes<HTMLElement
|
|
26
|
+
} & React.RefAttributes<HTMLElement>) => React.ReactNode;
|
|
@@ -28,7 +28,7 @@ export interface TreeViewProps<T extends Record<string, unknown>, E extends HTML
|
|
|
28
28
|
}
|
|
29
29
|
export declare const TreeView: {
|
|
30
30
|
<T extends Record<string, unknown>, E extends HTMLElement>({ items, TreeItemComponent, onItemsChanged, ...rest }: TreeViewProps<T, E>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
TreeItemWrapper:
|
|
31
|
+
TreeItemWrapper: <T_1 extends Record<string, unknown>>(props: import("./tree-view-types").TreeItemComponentProps<T_1> & {
|
|
32
32
|
children?: import("react").ReactNode;
|
|
33
|
-
} & import("react").RefAttributes<HTMLElement
|
|
33
|
+
} & import("react").RefAttributes<HTMLElement>) => import("react").ReactNode;
|
|
34
34
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.14",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"sonner": "1.4.41",
|
|
93
93
|
"tinycolor2": "^1.4.2",
|
|
94
94
|
"usehooks-ts": "2.9.1",
|
|
95
|
-
"@neo4j-ndl/base": "^2.12.
|
|
95
|
+
"@neo4j-ndl/base": "^2.12.10"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"generate-component": "node ./scripts/component-generator.js",
|