@dexteel/mesf-core 3.12.0-alpha → 3.12.1
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
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Typography, TextField, FormHelperText, CircularProgress as CircularProgress$1, makeStyles as makeStyles$1, Badge, Dialog as Dialog$1, DialogContent as DialogContent$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, DialogActions as DialogActions$2, DialogTitle as DialogTitle$2, DialogContentText as DialogContentText$1, Button as Button$1, Grid as Grid$1, Paper as Paper$1,
|
|
1
|
+
import { Typography, TextField, FormHelperText, CircularProgress as CircularProgress$1, makeStyles as makeStyles$1, Badge, Dialog as Dialog$1, DialogContent as DialogContent$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, DialogActions as DialogActions$2, DialogTitle as DialogTitle$2, DialogContentText as DialogContentText$1, Button as Button$1, Grid as Grid$1, Paper as Paper$1, Snackbar as Snackbar$1, MenuItem as MenuItem$1, createStyles as createStyles$1, List, ListItem, ListItemText } from '@material-ui/core';
|
|
2
2
|
import { get as get$1, isEmpty } from 'lodash-es';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useState, useRef, useEffect, Component, createContext, useContext, useCallback, useMemo, lazy, Suspense } from 'react';
|
|
@@ -3716,30 +3716,6 @@ var CustomNode = function (_a) {
|
|
|
3716
3716
|
React__default.createElement(Typography, { variant: "body2" }, props.node.text))));
|
|
3717
3717
|
};
|
|
3718
3718
|
|
|
3719
|
-
var theme = makeStyles$1({
|
|
3720
|
-
components: {
|
|
3721
|
-
MuiCssBaseline: {
|
|
3722
|
-
styleOverrides: {
|
|
3723
|
-
"*": {
|
|
3724
|
-
margin: 0,
|
|
3725
|
-
padding: 0
|
|
3726
|
-
},
|
|
3727
|
-
"html, body, #root": {
|
|
3728
|
-
height: "100%"
|
|
3729
|
-
},
|
|
3730
|
-
ul: {
|
|
3731
|
-
listStyle: "none"
|
|
3732
|
-
}
|
|
3733
|
-
}
|
|
3734
|
-
},
|
|
3735
|
-
MuiSvgIcon: {
|
|
3736
|
-
styleOverrides: {
|
|
3737
|
-
root: { verticalAlign: "middle" }
|
|
3738
|
-
}
|
|
3739
|
-
}
|
|
3740
|
-
}
|
|
3741
|
-
});
|
|
3742
|
-
|
|
3743
3719
|
var useStyles$c = makeStyles$1(function (theme) { return ({
|
|
3744
3720
|
root: {
|
|
3745
3721
|
alignItems: "flex-start",
|
|
@@ -3983,7 +3959,8 @@ var DATA_ASSET_INITIAL_VALUES = {
|
|
|
3983
3959
|
AssetName: "",
|
|
3984
3960
|
IsAsset: false,
|
|
3985
3961
|
CanBeDefaultAsset: false,
|
|
3986
|
-
ParentAssetName: ""
|
|
3962
|
+
ParentAssetName: "",
|
|
3963
|
+
IsBranch: null
|
|
3987
3964
|
};
|
|
3988
3965
|
|
|
3989
3966
|
var ConfigurationAssetInitialState = {
|
|
@@ -4825,7 +4802,7 @@ var AssetViewComponent = function () {
|
|
|
4825
4802
|
var _b = useState(false), isDragging = _b[0], setIsDragging = _b[1];
|
|
4826
4803
|
var _c = useState(false), isCtrlPressing = _c[0], setIsCtrlPressing = _c[1];
|
|
4827
4804
|
var _d = useState(false), isDoubleClick = _d[0], setIsDoubleClick = _d[1];
|
|
4828
|
-
var _e = useConfigurationAssetContext(), _f = _e.state, allAssetNodes = _f.allAssetNodes, showContextMenu = _f.showContextMenu, showCreateNewContextMenu = _f.showCreateNewContextMenu
|
|
4805
|
+
var _e = useConfigurationAssetContext(), _f = _e.state, allAssetNodes = _f.allAssetNodes, showContextMenu = _f.showContextMenu, showCreateNewContextMenu = _f.showCreateNewContextMenu, assetNodeSelectedInTree = _f.assetNodeSelectedInTree, _g = _f.anchorPoint, x = _g.x, y = _g.y, _h = _e.actions, setShowContextMenu = _h.setShowContextMenu, setShowCreateNewContextMenu = _h.setShowCreateNewContextMenu, setMenuContextAssetId = _h.setMenuContextAssetId, setAnchorPointX = _h.setAnchorPointX, setAnchorPointY = _h.setAnchorPointY, setAssetNodeSelectedInTree = _h.setAssetNodeSelectedInTree;
|
|
4829
4806
|
var allAssets = useAssetContext().state.allAssets;
|
|
4830
4807
|
var _j = useState([]), asset = _j[0], setAsset = _j[1];
|
|
4831
4808
|
var _k = useState([]), originalAsset = _k[0], setOriginalAsset = _k[1];
|
|
@@ -4919,24 +4896,22 @@ var AssetViewComponent = function () {
|
|
|
4919
4896
|
React__default.createElement(Paper$1, { elevation: 1, style: { width: "100%", padding: "15px 20px 10px", borderRadius: "0.75rem" } },
|
|
4920
4897
|
React__default.createElement(Paper$1, { elevation: 2, style: { width: "100%", padding: "15px 20px 10px", borderRadius: "0.75rem" } },
|
|
4921
4898
|
React__default.createElement(Grid$1, { container: true, alignItems: "center" },
|
|
4922
|
-
React__default.createElement(
|
|
4923
|
-
React__default.createElement(
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
return React__default.createElement(CustomDragPreview, { monitorProps: monitorProps });
|
|
4939
|
-
} })))))),
|
|
4899
|
+
React__default.createElement(Grid$1, { container: true, style: { height: "70vh", overflowY: "auto", paddingBottom: 10 } },
|
|
4900
|
+
React__default.createElement(Grid$1, null,
|
|
4901
|
+
React__default.createElement(Tree, { rootId: 0, tree: asset, classes: {
|
|
4902
|
+
root: classes.assetRoot,
|
|
4903
|
+
dropTarget: classes.dropTarget
|
|
4904
|
+
}, onDrop: handleDrop, onDragStart: handleDragStart, onDragEnd: handleDragEnd, canDrop: function (asset, options) {
|
|
4905
|
+
return !selectedNodes.some(function (selectedNode) { return selectedNode.id === options.dropTargetId; });
|
|
4906
|
+
}, render: function (node, options) {
|
|
4907
|
+
var selected = selectedNodes.some(function (selectedNode) { return selectedNode.id === node.id; });
|
|
4908
|
+
return (React__default.createElement(CustomNode, __assign({ setContextMenuOver: handleContextMenu, node: node }, options, { isSelected: selected, isDragging: selected && isDragging, onClick: handleCtrlClick, onDoubleClick: handleShowViewerAsset })));
|
|
4909
|
+
}, dragPreviewRender: function (monitorProps) {
|
|
4910
|
+
if (selectedNodes.length > 1) {
|
|
4911
|
+
return React__default.createElement(MultipleDragPreview, { dragSources: selectedNodes });
|
|
4912
|
+
}
|
|
4913
|
+
return React__default.createElement(CustomDragPreview, { monitorProps: monitorProps });
|
|
4914
|
+
} }))))),
|
|
4940
4915
|
React__default.createElement(Grid$1, { container: true, style: { padding: "20px 0", justifyContent: "flex-end" } },
|
|
4941
4916
|
React__default.createElement(Grid$1, { item: true, md: 3, xs: 6, style: { marginRight: "20px" } },
|
|
4942
4917
|
React__default.createElement(Button$1, { fullWidth: true, variant: "contained", color: "default", disabled: changedNodes.length ? false : true, onClick: function () { setChangedNodes([]), searchAssets(); } }, "CANCEL")),
|
|
@@ -4952,7 +4927,7 @@ var AssetViewComponent = function () {
|
|
|
4952
4927
|
React__default.createElement(MenuItem$1, { onClick: function () { return setShowViewerAssetDialog(true); } }, "View Asset"),
|
|
4953
4928
|
React__default.createElement(MenuItem$1, { onClick: function () { return setShowEditAssetDialog(true); } }, "Edit Asset"),
|
|
4954
4929
|
React__default.createElement(MenuItem$1, { onClick: function () { return setShowCreateNewAssetDialog(true); } }, "Create Asset"),
|
|
4955
|
-
React__default.createElement(MenuItem$1, { onClick: function () { return setShowRemoveAssetDialog(true); } }, "Remove Asset"))) : '',
|
|
4930
|
+
(assetNodeSelectedInTree === null || assetNodeSelectedInTree === void 0 ? void 0 : assetNodeSelectedInTree.IsBranch) === false && React__default.createElement(MenuItem$1, { onClick: function () { return setShowRemoveAssetDialog(true); } }, "Remove Asset"))) : '',
|
|
4956
4931
|
showCreateNewContextMenu ?
|
|
4957
4932
|
React__default.createElement("ul", { className: classes.contextMenu, style: { top: y, left: x } },
|
|
4958
4933
|
React__default.createElement(MenuItem$1, { onClick: function () { return setShowCreateNewAssetDialog(true); } }, "Create Asset"))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexteel/mesf-core",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.1",
|
|
4
4
|
"author": "Dexteel Team",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -29,11 +29,9 @@
|
|
|
29
29
|
"@reduxjs/toolkit": "^1.8.1",
|
|
30
30
|
"@rollup/plugin-babel": "^5.3.1",
|
|
31
31
|
"@rollup/plugin-typescript": "^8.3.1",
|
|
32
|
-
"@types/estree": "^1.0.1",
|
|
33
32
|
"@types/lodash-es": "^4.17.6",
|
|
34
33
|
"@types/node": "^12.20.46",
|
|
35
34
|
"@types/react": "^17.0.39",
|
|
36
|
-
"@types/react-dom": "^17.0.2",
|
|
37
35
|
"autoprefixer": "^10.4.2",
|
|
38
36
|
"bootstrap": "^4.6.1",
|
|
39
37
|
"moment": "^2.29.3",
|
|
@@ -51,6 +49,7 @@
|
|
|
51
49
|
"rollup-plugin-styles": "^3.14.1",
|
|
52
50
|
"rollup-plugin-terser": "^7.0.2",
|
|
53
51
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
52
|
+
"string-to-color": "^2.2.2",
|
|
54
53
|
"tslib": "^2.3.1",
|
|
55
54
|
"typescript": "^4.9.4",
|
|
56
55
|
"use-complex-state": "^1.1.0"
|