@dexteel/mesf-core 3.10.1 → 3.10.2
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/CHANGELOG.md +4 -0
- package/dist/controls/filters/dialogFilter.d.ts +1 -1
- package/dist/index.esm.js +24 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -51,12 +51,12 @@ import IconButton from '@material-ui/core/IconButton';
|
|
|
51
51
|
import CloseIcon from '@material-ui/icons/Close';
|
|
52
52
|
import PropTypes from 'prop-types';
|
|
53
53
|
import { ResponsiveBar } from '@nivo/bar';
|
|
54
|
-
import TreeView from '@material-ui/lab/TreeView';
|
|
55
|
-
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
56
|
-
import TreeItem from '@material-ui/lab/TreeItem';
|
|
57
54
|
import Collapse from '@material-ui/core/Collapse';
|
|
55
|
+
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
58
56
|
import Code from '@material-ui/icons/Code';
|
|
59
57
|
import Folder from '@material-ui/icons/Folder';
|
|
58
|
+
import TreeItem from '@material-ui/lab/TreeItem';
|
|
59
|
+
import TreeView from '@material-ui/lab/TreeView';
|
|
60
60
|
import { useSpring, animated } from 'react-spring';
|
|
61
61
|
import CardActions from '@material-ui/core/CardActions';
|
|
62
62
|
|
|
@@ -323,20 +323,7 @@ var ModalTreeFilterControl = function (props) {
|
|
|
323
323
|
if (valueProp !== undefined)
|
|
324
324
|
expandNode(valueProp);
|
|
325
325
|
}
|
|
326
|
-
}, [valueProp, open]);
|
|
327
|
-
useEffect(function () {
|
|
328
|
-
if (open) {
|
|
329
|
-
var findNode = getNodeData(data, parseInt(value));
|
|
330
|
-
if (findNode === null)
|
|
331
|
-
findNode = {};
|
|
332
|
-
var activeFilter = (selectActive && findNode.isActive) || selectActive !== true;
|
|
333
|
-
var internalFilter = (selectInternal && findNode.isInternal) || selectInternal !== true;
|
|
334
|
-
if (findNode.isLeaf) {
|
|
335
|
-
if (activeFilter && internalFilter)
|
|
336
|
-
onClose(value, findNode.name, findNode);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}, [value]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
326
|
+
}, [valueProp, open]);
|
|
340
327
|
var handleEntering = function () {
|
|
341
328
|
if (treeRef.current != null) {
|
|
342
329
|
treeRef.current.focus();
|
|
@@ -361,6 +348,26 @@ var ModalTreeFilterControl = function (props) {
|
|
|
361
348
|
onClose(value, findNode.name, findNode);
|
|
362
349
|
}
|
|
363
350
|
};
|
|
351
|
+
var getNodeParent = function (node, id, chain) {
|
|
352
|
+
if (chain === void 0) { chain = []; }
|
|
353
|
+
if (!node || node.id === undefined) {
|
|
354
|
+
return [];
|
|
355
|
+
}
|
|
356
|
+
if (node.id === id) {
|
|
357
|
+
chain.push(node.id.toString());
|
|
358
|
+
return chain;
|
|
359
|
+
}
|
|
360
|
+
if (Array.isArray(node.children)) {
|
|
361
|
+
chain.push(node.id.toString());
|
|
362
|
+
for (var i = 0; i < node.children.length; i++) {
|
|
363
|
+
var result = getNodeParent(node.children[i], id, chain.slice());
|
|
364
|
+
if (result.length > 0) {
|
|
365
|
+
return result;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return [];
|
|
370
|
+
};
|
|
364
371
|
var expandNode = function (node, same) {
|
|
365
372
|
var expandedNode = getNodeParent(data, node, []);
|
|
366
373
|
expandedNode.push(node.toString());
|
|
@@ -400,22 +407,6 @@ var ModalTreeFilterControl = function (props) {
|
|
|
400
407
|
nodes.isCode &&
|
|
401
408
|
React__default.createElement("i", { className: "fas fa-square mr-2", style: { "color": (nodes.delayCategoryColor || '#FFFFFF') } }),
|
|
402
409
|
nodes.name))), className: "delay-item-node", id: nodes.id, "data-isbranch": !nodes.isCode }, Array.isArray(nodes.children) ? nodes.children.map(function (node) { return renderTree(node); }) : null)); };
|
|
403
|
-
var getNodeParent = function (node, id, chain) {
|
|
404
|
-
if (id === undefined)
|
|
405
|
-
return [];
|
|
406
|
-
if (node.id.toString() === id.toString())
|
|
407
|
-
return chain;
|
|
408
|
-
if (Array.isArray(node.children)) {
|
|
409
|
-
var i;
|
|
410
|
-
var result = null;
|
|
411
|
-
chain.push(node.id.toString());
|
|
412
|
-
for (i = 0; result == null && i < node.children.length; i++) {
|
|
413
|
-
result = getNodeParent(node.children[i], id, chain);
|
|
414
|
-
}
|
|
415
|
-
return result;
|
|
416
|
-
}
|
|
417
|
-
return null;
|
|
418
|
-
};
|
|
419
410
|
return (React__default.createElement(Dialog, __assign({ onClose: function (event, reason) { return null; }, "aria-label": title, maxWidth: "xs", TransitionProps: { onEntering: handleEntering }, "aria-labelledby": "confirmation-dialog-title", open: open }, other),
|
|
420
411
|
React__default.createElement(DialogTitle$1, { id: "confirmation-dialog-title" }, title),
|
|
421
412
|
React__default.createElement(DialogContent$1, { dividers: true },
|