New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

react-core-ts

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-core-ts - npm Package Compare versions

Comparing version

to
1.3.69

@@ -344,5 +344,5 @@ "use strict";

};
var handleSelect = function (node) {
var handleSelect = function (selctedNode) {
var TreeData = [];
var checked = !(node === null || node === void 0 ? void 0 : node.checked);
var checked = !(selctedNode === null || selctedNode === void 0 ? void 0 : selctedNode.checked);
if (!checked) {

@@ -352,5 +352,4 @@ setInputValue('');

}
// Single-select logic: uncheck all other nodes and check only the clicked one
TreeData = dropDownData.map(function (node) {
return updateAllNodes(node, node[descId], checked);
return updateAllNodes(node, selctedNode[descId], checked);
});

@@ -357,0 +356,0 @@ setDropDownData(TreeData);

@@ -31,6 +31,5 @@ "use strict";

};
console.log(isSelected(node, selected));
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("li", __assign({ className: "qbs-tree-list-container" }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "qbs-tree-list-container-sub ".concat(((_b = node === null || node === void 0 ? void 0 : node.children) === null || _b === void 0 ? void 0 : _b.length) > 0 ? '' : 'no-children', " ") }, { children: [(node === null || node === void 0 ? void 0 : node.children) && ((_c = node === null || node === void 0 ? void 0 : node.children) === null || _c === void 0 ? void 0 : _c.length) > 0 && ((0, jsx_runtime_1.jsx)("span", __assign({ onClick: function () { return handleToggle(node); }, className: "qbs-tree-list-container-sub-icon ".concat(node.expanded ? 'expanded' : '') }, { children: (0, jsx_runtime_1.jsx)(Icons_1.DropSideIcon, {}) }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "qbs-tree-list-container-sub-container ".concat(isSelected(node, selected) ? 'checked' : '', " ").concat(((_d = node === null || node === void 0 ? void 0 : node.children) === null || _d === void 0 ? void 0 : _d.length) > 0 ? '' : ' marginLeft') }, { children: [(isMultiple || singleSelect) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "".concat('qbs-autocomplete-checkbox') }, { children: !singleSelect ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { onChange: function (e) { return handleCheckbox(e, node); }, type: "checkbox", checked: isSelected(node, selected), id: "qbs-checkbox-".concat(idx.toString()) }), (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: "qbs-checkbox-".concat(idx.toString()) }, { children: (0, jsx_runtime_1.jsx)("svg", __assign({ width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M0 3.21739L2.89883 6L8 1.06994L6.89494 0L2.89883 3.86768L1.09728 2.14745L0 3.21739Z", fill: "white" }) })) }))] })) : ((0, jsx_runtime_1.jsx)("span", __assign({ className: 'qbs-tree-single-select-icon' }, { children: singleSelectIcon !== null && singleSelectIcon !== void 0 ? singleSelectIcon : (0, jsx_runtime_1.jsx)(QuestionIcon_1.default, {}) }))) }))), singleSelect ? ((0, jsx_runtime_1.jsx)("span", __assign({ onClick: function () { return handleSelect(node); }, className: "qbs-tree-list-container-sub-text cursor-pointer" }, { children: node[desc] }))) : ((0, jsx_runtime_1.jsx)("span", __assign({ className: "qbs-tree-list-container-sub-text" }, { children: node[desc] })))] }))] })) })), children] }));
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("li", __assign({ className: "qbs-tree-list-container" }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "qbs-tree-list-container-sub ".concat(((_b = node === null || node === void 0 ? void 0 : node.children) === null || _b === void 0 ? void 0 : _b.length) > 0 ? '' : 'no-children', " ") }, { children: [(node === null || node === void 0 ? void 0 : node.children) && ((_c = node === null || node === void 0 ? void 0 : node.children) === null || _c === void 0 ? void 0 : _c.length) > 0 && ((0, jsx_runtime_1.jsx)("span", __assign({ onClick: function () { return handleToggle(node); }, className: "qbs-tree-list-container-sub-icon ".concat(node.expanded ? 'expanded' : '') }, { children: (0, jsx_runtime_1.jsx)(Icons_1.DropSideIcon, {}) }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "qbs-tree-list-container-sub-container ".concat(isSelected(node, selected) ? 'checked' : '', " ").concat(node.expanded ? 'qbs-expanded-child' : '', " ").concat(((_d = node === null || node === void 0 ? void 0 : node.children) === null || _d === void 0 ? void 0 : _d.length) > 0 ? '' : ' marginLeft') }, { children: [(isMultiple || singleSelect) && ((0, jsx_runtime_1.jsx)("div", __assign({ style: { alignItems: singleSelect ? 'flex-start' : 'center' }, className: "".concat('qbs-autocomplete-checkbox') }, { children: !singleSelect ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { onChange: function (e) { return handleCheckbox(e, node); }, type: "checkbox", checked: isSelected(node, selected), id: "qbs-checkbox-".concat(idx.toString()) }), (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: "qbs-checkbox-".concat(idx.toString()) }, { children: (0, jsx_runtime_1.jsx)("svg", __assign({ width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M0 3.21739L2.89883 6L8 1.06994L6.89494 0L2.89883 3.86768L1.09728 2.14745L0 3.21739Z", fill: "white" }) })) }))] })) : ((0, jsx_runtime_1.jsx)("span", __assign({ className: "qbs-tree-single-select-icon" }, { children: singleSelectIcon !== null && singleSelectIcon !== void 0 ? singleSelectIcon : (0, jsx_runtime_1.jsx)(QuestionIcon_1.default, {}) }))) }))), singleSelect ? ((0, jsx_runtime_1.jsx)("span", __assign({ onClick: function () { return handleSelect(node); }, className: "".concat(node.expanded ? 'qbs-expanded-child' : '', " qbs-tree-list-container-sub-text cursor-pointer") }, { children: node[desc] }))) : ((0, jsx_runtime_1.jsx)("span", __assign({ className: "".concat(node.expanded ? 'qbs-expanded-child' : '', " qbs-tree-list-container-sub-text") }, { children: node[desc] })))] }))] })) })), children] }));
};
exports.default = TreeNode;
//# sourceMappingURL=TreeNode.js.map
{
"name": "react-core-ts",
"version": "1.3.68",
"version": "1.3.69",
"description": "React Components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet