@dexteel/mesf-core 5.8.0 → 5.9.0
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +18 -0
- package/dist/MESFMain.d.ts +2 -1
- package/dist/controls/filters/TreePickerControl.d.ts +1 -0
- package/dist/controls/filters/dialogFilter.d.ts +1 -0
- package/dist/index.esm.js +185 -38
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [5.9.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v5.8.0...@dexteel/mesf-core-v5.9.0) (2025-08-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **TreePickerControl:** add search functionality with enhanced UX ([#436](https://github.com/dexteel/mesf-core-frontend/issues/436)) ([ae98403](https://github.com/dexteel/mesf-core-frontend/commit/ae9840354e0f56d26c4754e2fefad5ee0fc93e60))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **MESFMain:** add optional theme prop to MESFMain and make login AppBar theme-aware ([#432](https://github.com/dexteel/mesf-core-frontend/issues/432)) ([b736370](https://github.com/dexteel/mesf-core-frontend/commit/b7363700c33bb7049eb98f0023046151aaf50654))
|
|
14
|
+
|
|
15
|
+
## [5.8.0] - 2025-08-28
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
# Changelog
|
|
2
20
|
|
|
3
21
|
## [5.8.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v5.7.1...@dexteel/mesf-core-v5.8.0) (2025-08-28)
|
package/dist/MESFMain.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ interface Props {
|
|
|
10
10
|
showTrendingsIcon?: boolean;
|
|
11
11
|
byPassHeaderRoutes?: string[];
|
|
12
12
|
plantAssetId?: number;
|
|
13
|
+
theme?: any;
|
|
13
14
|
}
|
|
14
|
-
declare function MESFMain({ authentication, routes, navbar, navbarTitle, configurations, showAreaSelector, showTrendingsIcon, byPassHeaderRoutes, plantAssetId, }: Props): React.JSX.Element;
|
|
15
|
+
declare function MESFMain({ authentication, routes, navbar, navbarTitle, configurations, showAreaSelector, showTrendingsIcon, byPassHeaderRoutes, plantAssetId, theme, }: Props): React.JSX.Element;
|
|
15
16
|
export { MESFMain };
|
|
@@ -5,6 +5,7 @@ type TreePickerControlProps = {
|
|
|
5
5
|
setListAssetDrawings?: Function;
|
|
6
6
|
onSuccess?: (success: boolean) => void;
|
|
7
7
|
showClearButton?: boolean;
|
|
8
|
+
allowSearch?: boolean;
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
};
|
|
10
11
|
export declare const TreePickerControl: (props: TreePickerControlProps) => React.JSX.Element;
|
|
@@ -30,6 +30,7 @@ interface ModalTreeFilterControlProps {
|
|
|
30
30
|
mostUsedCount: number;
|
|
31
31
|
itemsWithParent: String[];
|
|
32
32
|
dialogMaxWidth: "xs" | "sm" | "md" | "lg" | "xl";
|
|
33
|
+
allowSearch?: boolean;
|
|
33
34
|
}
|
|
34
35
|
declare const ModalTreeFilterControl: React.FC<ModalTreeFilterControlProps>;
|
|
35
36
|
export { ModalTreeFilterControl };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { LicenseManager } from 'ag-grid-enterprise';
|
|
2
|
-
import { withStyles, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, createStyles, Grid, Button, alpha, makeStyles, Dialog as Dialog$1, Chip, SvgIcon, Collapse, Typography as Typography$1, Checkbox,
|
|
2
|
+
import { withStyles, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, createStyles, Grid, Button, alpha, makeStyles, Dialog as Dialog$1, TextField, Paper, List, ListItem, ListItemIcon, ListItemText, Chip, SvgIcon, Collapse, Typography as Typography$1, Checkbox, InputAdornment, IconButton as IconButton$1, MenuItem, Box, Card, CardContent, CardActions, Tooltip, FormControl, InputLabel, Select, CircularProgress, Snackbar, FormControlLabel, Switch, DialogContentText, Badge, useTheme, Input, CssBaseline, AppBar, Toolbar, Container, Menu, Hidden, Drawer, useMediaQuery, Divider, ListSubheader, debounce, createTheme, ThemeProvider } from '@material-ui/core';
|
|
3
3
|
import IconButton from '@material-ui/core/IconButton';
|
|
4
4
|
import CloseIcon from '@material-ui/icons/Close';
|
|
5
5
|
import Alert$3 from '@material-ui/lab/Alert';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { useState, useRef, useEffect, useMemo, Component, createContext, useContext, useCallback, lazy, Suspense } from 'react';
|
|
8
|
-
import { ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight, ArrowRight, Send, Menu as Menu$1, People, Storage, Group, Assignment, Chat, Timeline, ViewList, Build, Settings as Settings$
|
|
8
|
+
import { ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight, ArrowRight, Send, Menu as Menu$1, People, Storage, Group, Assignment, Chat, Timeline, ViewList, Build, Settings as Settings$2 } from '@material-ui/icons';
|
|
9
9
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
10
10
|
import moment$2 from 'moment-timezone';
|
|
11
11
|
import { useParams, useNavigate, useSearchParams, Link, Navigate, Routes, Route, useLocation, BrowserRouter } from 'react-router-dom';
|
|
@@ -13,7 +13,7 @@ import { values, get, isNil, isEmpty, round, isNaN, isNumber } from 'lodash-es';
|
|
|
13
13
|
import { ClearIcon, DatePicker as DatePicker$1, CalendarIcon, DateTimePicker, LocalizationProvider } from '@mui/x-date-pickers';
|
|
14
14
|
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
|
|
15
15
|
import MenuIcon from '@material-ui/icons/Menu';
|
|
16
|
-
import
|
|
16
|
+
import Settings$1 from '@material-ui/icons/Settings';
|
|
17
17
|
import ShowChartIcon from '@material-ui/icons/ShowChart';
|
|
18
18
|
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
|
|
19
19
|
import { DndProvider } from 'react-dnd';
|
|
@@ -389,8 +389,14 @@ var StyledTreeItem = withStyles(function (theme) { return ({
|
|
|
389
389
|
}); })(function (props) { return (React__default.createElement(TreeItem, __assign({}, props, { TransitionComponent: TransitionComponent }))); });
|
|
390
390
|
var useTreviewStyle = makeStyles(function (theme) { return ({
|
|
391
391
|
root: {
|
|
392
|
-
minHeight:
|
|
392
|
+
minHeight: 350,
|
|
393
393
|
flexGrow: 1,
|
|
394
|
+
height: "450px",
|
|
395
|
+
overflow: "auto",
|
|
396
|
+
},
|
|
397
|
+
treeContainer: {
|
|
398
|
+
height: "450px",
|
|
399
|
+
overflow: "auto",
|
|
394
400
|
},
|
|
395
401
|
treLabelIcon: {
|
|
396
402
|
marginRight: theme.spacing(1),
|
|
@@ -414,17 +420,70 @@ var useTreviewStyle = makeStyles(function (theme) { return ({
|
|
|
414
420
|
smallCheckbox: {
|
|
415
421
|
transform: "scale(0.8)",
|
|
416
422
|
},
|
|
423
|
+
searchField: {
|
|
424
|
+
marginBottom: theme.spacing(1),
|
|
425
|
+
"& .MuiOutlinedInput-root": {
|
|
426
|
+
padding: "6px 8px",
|
|
427
|
+
},
|
|
428
|
+
"& .MuiInputBase-input": {
|
|
429
|
+
padding: "8px 0px",
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
searchResults: {
|
|
433
|
+
position: "absolute",
|
|
434
|
+
zIndex: 1300,
|
|
435
|
+
width: "100%",
|
|
436
|
+
maxHeight: 300,
|
|
437
|
+
overflow: "auto",
|
|
438
|
+
marginTop: theme.spacing(1),
|
|
439
|
+
boxShadow: theme.shadows[3],
|
|
440
|
+
},
|
|
441
|
+
searchResultItem: {
|
|
442
|
+
cursor: "pointer",
|
|
443
|
+
paddingTop: theme.spacing(0.5),
|
|
444
|
+
paddingBottom: theme.spacing(0.5),
|
|
445
|
+
minHeight: "auto",
|
|
446
|
+
"&:hover": {
|
|
447
|
+
backgroundColor: theme.palette.action.hover,
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
searchResultPath: {
|
|
451
|
+
fontSize: "0.75rem",
|
|
452
|
+
color: theme.palette.text.secondary,
|
|
453
|
+
fontStyle: "italic",
|
|
454
|
+
marginTop: theme.spacing(0.25),
|
|
455
|
+
},
|
|
456
|
+
searchResultIcon: {
|
|
457
|
+
minWidth: 32,
|
|
458
|
+
},
|
|
459
|
+
searchContainer: {
|
|
460
|
+
position: "sticky",
|
|
461
|
+
top: 0,
|
|
462
|
+
zIndex: 1000,
|
|
463
|
+
backgroundColor: theme.palette.background.paper,
|
|
464
|
+
borderBottom: "1px solid ".concat(theme.palette.divider),
|
|
465
|
+
paddingBottom: theme.spacing(0.5),
|
|
466
|
+
marginBottom: theme.spacing(0.5),
|
|
467
|
+
},
|
|
417
468
|
}); });
|
|
418
469
|
var ModalTreeFilterControl = function (props) {
|
|
419
|
-
var onClose = props.onClose, valueProp = props.value, open = props.open, title = props.title, data = props.data, selectBranch = props.selectBranch, selectActive = props.selectActive, selectInternal = props.selectInternal, multipleSelectNodes = props.multipleSelectNodes, onHide = props.onHide, listAssetDrawings = props.listAssetDrawings, setListAssetDrawings = props.setListAssetDrawings, onSuccess = props.onSuccess, isLoading = props.isLoading, mostUsedCount = props.mostUsedCount, itemsWithParent = props.itemsWithParent, _a = props.dialogMaxWidth, dialogMaxWidth = _a === void 0 ? "sm" : _a, other = __rest(props, ["onClose", "value", "open", "title", "data", "selectBranch", "selectActive", "selectInternal", "multipleSelectNodes", "onHide", "listAssetDrawings", "setListAssetDrawings", "onSuccess", "isLoading", "mostUsedCount", "itemsWithParent", "dialogMaxWidth"]);
|
|
420
|
-
var
|
|
421
|
-
var
|
|
470
|
+
var onClose = props.onClose, valueProp = props.value, open = props.open, title = props.title, data = props.data, selectBranch = props.selectBranch, selectActive = props.selectActive, selectInternal = props.selectInternal, multipleSelectNodes = props.multipleSelectNodes, onHide = props.onHide, listAssetDrawings = props.listAssetDrawings, setListAssetDrawings = props.setListAssetDrawings, onSuccess = props.onSuccess, isLoading = props.isLoading, mostUsedCount = props.mostUsedCount, itemsWithParent = props.itemsWithParent, _a = props.dialogMaxWidth, dialogMaxWidth = _a === void 0 ? "sm" : _a, _b = props.allowSearch, allowSearch = _b === void 0 ? false : _b, other = __rest(props, ["onClose", "value", "open", "title", "data", "selectBranch", "selectActive", "selectInternal", "multipleSelectNodes", "onHide", "listAssetDrawings", "setListAssetDrawings", "onSuccess", "isLoading", "mostUsedCount", "itemsWithParent", "dialogMaxWidth", "allowSearch"]);
|
|
471
|
+
var _c = useState(valueProp), value = _c[0], setValue = _c[1];
|
|
472
|
+
var _d = useState([]), expanded = _d[0], setExpanded = _d[1];
|
|
422
473
|
var treeRef = useRef(null);
|
|
423
|
-
var
|
|
474
|
+
var _e = useState([]), selectedNodes = _e[0], setSelectedNodes = _e[1];
|
|
475
|
+
var _f = useState(""), searchTerm = _f[0], setSearchTerm = _f[1];
|
|
476
|
+
var _g = useState([]), searchResults = _g[0], setSearchResults = _g[1];
|
|
477
|
+
var _h = useState(false), showSearchResults = _h[0], setShowSearchResults = _h[1];
|
|
478
|
+
var searchTimeoutRef = useRef(null);
|
|
424
479
|
var classes = useTreviewStyle();
|
|
425
480
|
useEffect(function () {
|
|
426
481
|
if (!open) {
|
|
427
482
|
setValue(valueProp);
|
|
483
|
+
// Clear search when dialog closes
|
|
484
|
+
setSearchTerm("");
|
|
485
|
+
setSearchResults([]);
|
|
486
|
+
setShowSearchResults(false);
|
|
428
487
|
}
|
|
429
488
|
else {
|
|
430
489
|
if (valueProp !== undefined)
|
|
@@ -577,6 +636,83 @@ var ModalTreeFilterControl = function (props) {
|
|
|
577
636
|
});
|
|
578
637
|
return treeArray;
|
|
579
638
|
}
|
|
639
|
+
// Pre-build search index for better performance with large trees
|
|
640
|
+
var searchIndex = useMemo(function () {
|
|
641
|
+
var index = [];
|
|
642
|
+
var buildIndex = function (currentNode, path) {
|
|
643
|
+
if (path === void 0) { path = []; }
|
|
644
|
+
var nodePath = __spreadArray(__spreadArray([], path, true), [currentNode.name], false);
|
|
645
|
+
var pathStr = nodePath.join("/");
|
|
646
|
+
// Determine if node has children - use isLeaf if available, otherwise check children array
|
|
647
|
+
var hasChildren = currentNode.isLeaf === undefined
|
|
648
|
+
? Boolean(currentNode.children && currentNode.children.length > 0)
|
|
649
|
+
: !currentNode.isLeaf;
|
|
650
|
+
index.push({
|
|
651
|
+
id: currentNode.id,
|
|
652
|
+
name: currentNode.name,
|
|
653
|
+
path: pathStr,
|
|
654
|
+
isCode: currentNode.isCode,
|
|
655
|
+
hasChildren: hasChildren,
|
|
656
|
+
node: currentNode,
|
|
657
|
+
});
|
|
658
|
+
if (currentNode.children) {
|
|
659
|
+
for (var _i = 0, _a = currentNode.children; _i < _a.length; _i++) {
|
|
660
|
+
var child = _a[_i];
|
|
661
|
+
buildIndex(child, nodePath);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
if (data && data.children) {
|
|
666
|
+
for (var _i = 0, _a = data.children; _i < _a.length; _i++) {
|
|
667
|
+
var child = _a[_i];
|
|
668
|
+
buildIndex(child);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return index;
|
|
672
|
+
}, [data]);
|
|
673
|
+
var searchNodes = function (searchTerm) {
|
|
674
|
+
var lowerSearchTerm = searchTerm.toLowerCase();
|
|
675
|
+
return searchIndex.filter(function (item) {
|
|
676
|
+
return item.name.toLowerCase().includes(lowerSearchTerm);
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
var handleSearchChange = function (event) {
|
|
680
|
+
var term = event.target.value;
|
|
681
|
+
setSearchTerm(term);
|
|
682
|
+
// Clear existing timeout
|
|
683
|
+
if (searchTimeoutRef.current) {
|
|
684
|
+
clearTimeout(searchTimeoutRef.current);
|
|
685
|
+
}
|
|
686
|
+
if (term.trim() === "" || term.length < 2) {
|
|
687
|
+
setSearchResults([]);
|
|
688
|
+
setShowSearchResults(false);
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
// Add debounce
|
|
692
|
+
searchTimeoutRef.current = setTimeout(function () {
|
|
693
|
+
var results = searchNodes(term);
|
|
694
|
+
setSearchResults(results);
|
|
695
|
+
setShowSearchResults(results.length > 0);
|
|
696
|
+
}, 250);
|
|
697
|
+
};
|
|
698
|
+
var handleSearchResultClick = function (result) {
|
|
699
|
+
// Expand to node
|
|
700
|
+
var expandedNode = getNodeParent(data, result.id, []);
|
|
701
|
+
setExpanded(expandedNode);
|
|
702
|
+
// Select the node
|
|
703
|
+
setValue(result.id);
|
|
704
|
+
// Clear search
|
|
705
|
+
setSearchTerm("");
|
|
706
|
+
setSearchResults([]);
|
|
707
|
+
setShowSearchResults(false);
|
|
708
|
+
// Scroll to node after a small delay to ensure tree is expanded
|
|
709
|
+
setTimeout(function () {
|
|
710
|
+
var nodeElement = document.getElementById(result.id.toString());
|
|
711
|
+
if (nodeElement) {
|
|
712
|
+
nodeElement.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
713
|
+
}
|
|
714
|
+
}, 100);
|
|
715
|
+
};
|
|
580
716
|
var renderTree = function (nodes) { return (React__default.createElement(StyledTreeItem, { isChecked: selectedNodes.includes(nodes.id), key: nodes.id, nodeId: nodes.id.toString(), label: React__default.createElement("div", { className: classes.treeLabelRoot },
|
|
581
717
|
nodes.isCode === true && (React__default.createElement(Code, { className: classes.treLabelIcon, htmlColor: "#1ABC9C" })),
|
|
582
718
|
nodes.isCode === false && (React__default.createElement(FolderIcon, { className: classes.treLabelIcon, htmlColor: "#F1C40F" })),
|
|
@@ -601,28 +737,39 @@ var ModalTreeFilterControl = function (props) {
|
|
|
601
737
|
justifyContent: "center",
|
|
602
738
|
alignItems: "center",
|
|
603
739
|
} },
|
|
604
|
-
React__default.createElement(LazyLoading, null))) : (React__default.createElement(DialogContent$1, { dividers: true },
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
if (
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
740
|
+
React__default.createElement(LazyLoading, null))) : (React__default.createElement(DialogContent$1, { dividers: true, style: { height: "500px", overflow: "hidden" } },
|
|
741
|
+
allowSearch && (React__default.createElement("div", { className: classes.searchContainer },
|
|
742
|
+
React__default.createElement(TextField, { className: classes.searchField, placeholder: "Search items (min. 2 characters)...", variant: "outlined", size: "small", fullWidth: true, value: searchTerm, onChange: handleSearchChange, InputProps: {
|
|
743
|
+
startAdornment: (React__default.createElement(SearchIcon, { style: { marginRight: 8, color: "#999" } })),
|
|
744
|
+
} }),
|
|
745
|
+
showSearchResults && (React__default.createElement(Paper, { className: classes.searchResults },
|
|
746
|
+
React__default.createElement(List, null, searchResults.map(function (result) { return (React__default.createElement(ListItem, { key: result.id, button: true, className: classes.searchResultItem, onClick: function () { return handleSearchResultClick(result); } },
|
|
747
|
+
React__default.createElement(ListItemIcon, { className: classes.searchResultIcon }, result.hasChildren ? (React__default.createElement(AccountTreeIcon, { color: "primary", fontSize: "small" })) : (React__default.createElement(Settings$1, { color: "primary", fontSize: "small" }))),
|
|
748
|
+
React__default.createElement(ListItemText, { primary: result.name, secondary: result.path, classes: {
|
|
749
|
+
secondary: classes.searchResultPath,
|
|
750
|
+
} }))); })))))),
|
|
751
|
+
React__default.createElement("div", { className: classes.treeContainer },
|
|
752
|
+
React__default.createElement(TreeView, { autoFocus: false, className: classes.root, defaultCollapseIcon: React__default.createElement(MinusSquare, null), defaultExpandIcon: React__default.createElement(PlusSquare, null), ref: treeRef, selected: value === undefined ? "" : value.toString(), expanded: expanded, onNodeSelect: handleChange, onNodeToggle: handleToogle }, data && data.id !== undefined && (React__default.createElement(Grid, null,
|
|
753
|
+
mostUsedCount > 0 && (React__default.createElement(Grid, { item: true, md: 12 }, treeToArray(data)
|
|
754
|
+
.sort(function (a, b) {
|
|
755
|
+
if (!a.sortOrder)
|
|
756
|
+
return 1;
|
|
757
|
+
if (!b.sortOrder)
|
|
758
|
+
return -1;
|
|
759
|
+
var valA = a.sortOrder;
|
|
760
|
+
var valB = b.sortOrder;
|
|
761
|
+
return valA - valB;
|
|
762
|
+
})
|
|
763
|
+
.slice(0, mostUsedCount)
|
|
764
|
+
.map(function (node) { return (React__default.createElement(Button, { onClick: function () {
|
|
765
|
+
onClose(node.id, node.name);
|
|
766
|
+
if (onSuccess)
|
|
767
|
+
onSuccess(true);
|
|
768
|
+
}, style: { marginRight: 5, marginBottom: 8 } },
|
|
769
|
+
React__default.createElement(Chip, { label: itemsWithParent.includes(node.name)
|
|
770
|
+
? "".concat(node.parentName, "/").concat(node.name)
|
|
771
|
+
: node.name, size: "medium", variant: "outlined", style: { cursor: "pointer" } }))); }))),
|
|
772
|
+
renderTree(data))))))),
|
|
626
773
|
React__default.createElement(DialogActions$1, null,
|
|
627
774
|
React__default.createElement(Button, { onClick: handleCancel, color: "primary" }, "Cancel"),
|
|
628
775
|
React__default.createElement(Button, { onClick: function () { return handleOk(); }, color: "primary" }, "OK"))));
|
|
@@ -645,8 +792,8 @@ var useStyles$I = makeStyles(function (theme) { return ({
|
|
|
645
792
|
}); });
|
|
646
793
|
var TreePickerControl = function (props) {
|
|
647
794
|
var classes = useStyles$I();
|
|
648
|
-
var onSelect = props.onSelect, value = props.value; props.styleLabel; var dataSource = props.dataSource, _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, _d = props.showClearButton, showClearButton = _d === void 0 ? false : _d, showAssetTree = props.showAssetTree, onHide = props.onHide, _e = props.listAssetDrawings, listAssetDrawings = _e === void 0 ? [] : _e, onSuccess = props.onSuccess, isLoading = props.isLoading, other = __rest(props, ["onSelect", "value", "styleLabel", "dataSource", "inputTitle", "showPath", "multipleSelectNodes", "showClearButton", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading"]);
|
|
649
|
-
var
|
|
795
|
+
var onSelect = props.onSelect, value = props.value; props.styleLabel; var dataSource = props.dataSource, _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, _d = props.showClearButton, showClearButton = _d === void 0 ? false : _d, showAssetTree = props.showAssetTree, onHide = props.onHide, _e = props.listAssetDrawings, listAssetDrawings = _e === void 0 ? [] : _e, onSuccess = props.onSuccess, isLoading = props.isLoading, _f = props.allowSearch, allowSearch = _f === void 0 ? false : _f, other = __rest(props, ["onSelect", "value", "styleLabel", "dataSource", "inputTitle", "showPath", "multipleSelectNodes", "showClearButton", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading", "allowSearch"]);
|
|
796
|
+
var _g = useState(showAssetTree || false), open = _g[0], setOpen = _g[1];
|
|
650
797
|
var handleClickListItem = function (e) {
|
|
651
798
|
e.stopPropagation();
|
|
652
799
|
setOpen(true);
|
|
@@ -725,7 +872,7 @@ var TreePickerControl = function (props) {
|
|
|
725
872
|
React__default.createElement(Grid, { item: true, xs: 12, md: 12 },
|
|
726
873
|
React__default.createElement(ModalTreeFilterControl, __assign({ classes: {
|
|
727
874
|
paper: classes.paper,
|
|
728
|
-
}, onHide: onHide, id: "modal-treeview-
|
|
875
|
+
}, onHide: onHide, id: "modal-treeview-filters", title: props.title, keepMounted: true, open: open, onClose: handleClose, isLoading: isLoading, value: value, data: dataSource, onBackdropClick: function () { return setOpen(false); }, multipleSelectNodes: multipleSelectNodes, listAssetDrawings: listAssetDrawings, setListAssetDrawings: listAssetDrawings, onSuccess: onSuccess, allowSearch: allowSearch }, other)))));
|
|
729
876
|
};
|
|
730
877
|
|
|
731
878
|
var useStyles$H = makeStyles(function (theme) { return ({
|
|
@@ -9652,7 +9799,7 @@ var useStyles$8 = makeStyles(function (theme) { return ({
|
|
|
9652
9799
|
flexDirection: "column",
|
|
9653
9800
|
},
|
|
9654
9801
|
appBar: {
|
|
9655
|
-
backgroundColor:
|
|
9802
|
+
backgroundColor: theme.palette.primary.main,
|
|
9656
9803
|
boxShadow: "0 4px 20px 0 rgba(0, 0, 0, 0.1)",
|
|
9657
9804
|
},
|
|
9658
9805
|
brand: {
|
|
@@ -9982,7 +10129,7 @@ function Header$1(_a) {
|
|
|
9982
10129
|
React__default.createElement(ShowChartIcon, null)))),
|
|
9983
10130
|
canShowSettings && (React__default.createElement(Tooltip, { title: "Settings", placement: "bottom" },
|
|
9984
10131
|
React__default.createElement(IconButton$1, { color: "inherit", component: Link, to: "/configuration" },
|
|
9985
|
-
React__default.createElement(
|
|
10132
|
+
React__default.createElement(Settings$1, null)))),
|
|
9986
10133
|
showAreaSelector && (React__default.createElement(Suspense, { fallback: React__default.createElement("div", null, "...") },
|
|
9987
10134
|
React__default.createElement(AreaSelector$1, null))),
|
|
9988
10135
|
React__default.createElement(TimeAndUserMenu, null)))),
|
|
@@ -11193,7 +11340,7 @@ var Configuration = function () {
|
|
|
11193
11340
|
React__default.createElement(ListItemText, { primary: "Jobs" })),
|
|
11194
11341
|
React__default.createElement(ListItem, { button: true, selected: option === "settings", component: Link, to: "/configuration/settings" },
|
|
11195
11342
|
React__default.createElement(ListItemIcon, null,
|
|
11196
|
-
React__default.createElement(Settings$
|
|
11343
|
+
React__default.createElement(Settings$2, null)),
|
|
11197
11344
|
React__default.createElement(ListItemText, { primary: "Settings" }))))); };
|
|
11198
11345
|
useEffect(function () {
|
|
11199
11346
|
var handleListItemClick = function (event) {
|
|
@@ -14377,10 +14524,10 @@ var timezone = TimeService.getInstance().getServerTimeZone();
|
|
|
14377
14524
|
moment$2.tz.setDefault(timezone);
|
|
14378
14525
|
var base = document.getElementsByTagName("base")[0].getAttribute("href") || "/";
|
|
14379
14526
|
function MESFMain(_a) {
|
|
14380
|
-
var authentication = _a.authentication, routes = _a.routes, navbar = _a.navbar, _b = _a.navbarTitle, navbarTitle = _b === void 0 ? "MESF" : _b, configurations = _a.configurations, _c = _a.showAreaSelector, showAreaSelector = _c === void 0 ? false : _c, _d = _a.showTrendingsIcon, showTrendingsIcon = _d === void 0 ? true : _d, _e = _a.byPassHeaderRoutes, byPassHeaderRoutes = _e === void 0 ? [] : _e, _f = _a.plantAssetId, plantAssetId = _f === void 0 ? 1 : _f;
|
|
14527
|
+
var authentication = _a.authentication, routes = _a.routes, navbar = _a.navbar, _b = _a.navbarTitle, navbarTitle = _b === void 0 ? "MESF" : _b, configurations = _a.configurations, _c = _a.showAreaSelector, showAreaSelector = _c === void 0 ? false : _c, _d = _a.showTrendingsIcon, showTrendingsIcon = _d === void 0 ? true : _d, _e = _a.byPassHeaderRoutes, byPassHeaderRoutes = _e === void 0 ? [] : _e, _f = _a.plantAssetId, plantAssetId = _f === void 0 ? 1 : _f, _g = _a.theme, theme = _g === void 0 ? themeMESF : _g;
|
|
14381
14528
|
return (React__default.createElement(React__default.Fragment, null,
|
|
14382
14529
|
React__default.createElement(CssBaseline, null),
|
|
14383
|
-
React__default.createElement(ThemeProvider, { theme:
|
|
14530
|
+
React__default.createElement(ThemeProvider, { theme: theme },
|
|
14384
14531
|
React__default.createElement(AuthProvider, { authConfig: authentication },
|
|
14385
14532
|
React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, dateLibInstance: moment$2 },
|
|
14386
14533
|
React__default.createElement(UserProvider, null,
|