sccoreui 5.2.5 → 5.2.6
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.
|
@@ -5,11 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const tree_1 = require("primereact/tree");
|
|
6
6
|
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
7
7
|
const sccoreui_1 = require("sccoreui");
|
|
8
|
-
const TreeDropdownSelect = ({ treeData, expandedKeys, clickOnNode, classNames }) => {
|
|
8
|
+
const TreeDropdownSelect = ({ treeData, expandedKeys, clickOnNode, classNames, displayLabelName }) => {
|
|
9
9
|
const onClickNode = (e) => {
|
|
10
10
|
if (clickOnNode)
|
|
11
11
|
clickOnNode(e);
|
|
12
12
|
};
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(tree_1.Tree, { value: treeData, expandedKeys: expandedKeys, selectionMode: "single", className: `treeNoCollaps ${classNames ? classNames : ''}`, nodeTemplate: (node) => (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'flex gap-2 align-items-center justify-content-between w-full' }, { children: [" ", (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'treeItem flex gap-2 h-2rem align-items-center w-full h-full font-semibold' }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "chart-breakout-square" }), node
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(tree_1.Tree, { value: treeData, expandedKeys: expandedKeys, selectionMode: "single", className: `treeNoCollaps ${classNames ? classNames : ''}`, nodeTemplate: (node) => (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'flex gap-2 align-items-center justify-content-between w-full' }, { children: [" ", (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'treeItem flex gap-2 h-2rem align-items-center w-full h-full font-semibold' }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "chart-breakout-square" }), node[displayLabelName]] })), " ", (node === null || node === void 0 ? void 0 : node.badgeValue) && (0, jsx_runtime_1.jsx)(sccoreui_1.Badge, { className: 'treeBadge w-auto text-gray-700', value: node === null || node === void 0 ? void 0 : node.badgeValue })] })), onNodeClick: (e) => onClickNode(e) }));
|
|
14
14
|
};
|
|
15
15
|
exports.default = TreeDropdownSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TreeDropdownSelectTypes } from '../types/type';
|
|
2
|
-
declare const TreeDropdownSelect: ({ treeData, expandedKeys, clickOnNode, classNames }: TreeDropdownSelectTypes) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TreeDropdownSelect: ({ treeData, expandedKeys, clickOnNode, classNames, displayLabelName }: TreeDropdownSelectTypes) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TreeDropdownSelect;
|