@voplus/morpho-document 1.0.0-dev201 → 1.0.0-dev203
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/es/components/ActivityLog/index.less +64 -64
- package/es/components/DocumentList/index.js +14 -3
- package/es/components/DocumentList/index.js.map +1 -1
- package/es/components/DocumentList/state.js +7 -9
- package/es/components/DocumentList/state.js.map +1 -1
- package/es/components/DocumentListView/index.js +11 -2
- package/es/components/DocumentListView/index.js.map +1 -1
- package/es/components/DocumentListView/state.d.ts +1 -1
- package/es/components/DocumentListView/state.js +7 -9
- package/es/components/DocumentListView/state.js.map +1 -1
- package/es/components/DocumentName/index.js +7 -2
- package/es/components/DocumentName/index.js.map +1 -1
- package/es/components/DocumentSelectDialog/index.js +5 -2
- package/es/components/DocumentSelectDialog/index.js.map +1 -1
- package/es/components/DocumentSelectDialog/index.less +3 -0
- package/es/components/DocumentSortableTree/index.d.ts +7 -1
- package/es/components/DocumentSortableTree/index.js +12 -2
- package/es/components/DocumentSortableTree/index.js.map +1 -1
- package/es/components/DocumentSortableTree/state.d.ts +6 -0
- package/es/components/DocumentSortableTree/state.js.map +1 -1
- package/es/components/FileExplorerTheme/index.d.ts +3 -0
- package/es/components/FileExplorerTheme/index.js +22 -0
- package/es/components/FileExplorerTheme/index.js.map +1 -0
- package/es/components/FileExplorerTheme/node-content-renderer.d.ts +3 -0
- package/es/components/FileExplorerTheme/node-content-renderer.js +80 -0
- package/es/components/FileExplorerTheme/node-content-renderer.js.map +1 -0
- package/es/components/FileExplorerTheme/node-content-renderer.less +332 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.d.ts +3 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.js +21 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.js.map +1 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.less +4 -0
- package/es/components/Links/index.less +111 -111
- package/es/components/QuickAccessSearch/ObjectItem/index.d.ts +1 -1
- package/es/components/QuickAccessSearch/ObjectItem/index.js +2 -2
- package/es/components/QuickAccessSearch/ObjectItem/index.js.map +1 -1
- package/es/components/QuickAccessSearch/index.js +6 -16
- package/es/components/QuickAccessSearch/index.js.map +1 -1
- package/es/components/QuickAccessSearch/state.d.ts +2 -4
- package/es/components/QuickAccessSearch/state.js +3 -8
- package/es/components/QuickAccessSearch/state.js.map +1 -1
- package/es/components/SortableTreeDocumentTheme/index.d.ts +2 -2
- package/es/components/SortableTreeDocumentTheme/index.js +2 -2
- package/es/components/SortableTreeDocumentTheme/index.js.map +1 -1
- package/es/components/VersionsModal/index.js.map +1 -1
- package/es/data/ObjectStore/hooks.d.ts +7 -0
- package/es/data/ObjectStore/hooks.js +19 -0
- package/es/data/ObjectStore/hooks.js.map +1 -0
- package/es/data/ObjectStore/index.d.ts +1 -0
- package/es/data/ObjectStore/index.js +2 -0
- package/es/data/ObjectStore/index.js.map +1 -0
- package/es/data/index.d.ts +1 -0
- package/es/data/index.js +1 -0
- package/es/data/index.js.map +1 -1
- package/es/data/interfaces/IObject.d.ts +11 -0
- package/es/data/interfaces/IObject.js +1 -0
- package/es/data/interfaces/IObject.js.map +1 -0
- package/es/data/interfaces/index.d.ts +1 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.d.ts +14 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.js +28 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.js.map +1 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.less +21 -0
- package/es/modules/unit/components/QuickDataIcon/index.d.ts +25 -0
- package/es/modules/unit/components/QuickDataIcon/index.js +45 -0
- package/es/modules/unit/components/QuickDataIcon/index.js.map +1 -0
- package/es/modules/unit/components/QuickDataIcon/index.less +0 -0
- package/es/modules/unit/components/UnitAvatar/index.d.ts +15 -0
- package/es/modules/unit/components/UnitAvatar/index.js +29 -0
- package/es/modules/unit/components/UnitAvatar/index.js.map +1 -0
- package/es/modules/unit/components/UnitAvatar/index.less +8 -0
- package/es/modules/unit/components/UnitDetails/index.d.ts +5 -0
- package/es/modules/unit/components/UnitDetails/index.js +14 -0
- package/es/modules/unit/components/UnitDetails/index.js.map +1 -0
- package/es/modules/unit/components/UnitDetails/index.less +5 -0
- package/es/modules/unit/components/UnitHead/index.d.ts +5 -0
- package/es/modules/unit/components/UnitHead/index.js +14 -0
- package/es/modules/unit/components/UnitHead/index.js.map +1 -0
- package/es/modules/unit/components/UnitHead/index.less +11 -0
- package/es/modules/unit/components/UnitItem/index.d.ts +6 -0
- package/es/modules/unit/components/UnitItem/index.js +19 -0
- package/es/modules/unit/components/UnitItem/index.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.less +19 -0
- package/es/pages/TreeViewPage/index.js +1 -1
- package/es/pages/TreeViewPage/index.js.map +1 -1
- package/package.json +3 -3
- package/es/components/QuickAccessSearch/ObjectList/index.d.ts +0 -5
- package/es/components/QuickAccessSearch/ObjectList/index.js +0 -42
- package/es/components/QuickAccessSearch/ObjectList/index.js.map +0 -1
- package/es/components/QuickAccessSearch/ObjectList/index.less +0 -10
- package/es/components/QuickAccessSearch/ObjectList/state.d.ts +0 -40
- package/es/components/QuickAccessSearch/ObjectList/state.js +0 -61
- package/es/components/QuickAccessSearch/ObjectList/state.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/DocumentSortableTree/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/DocumentSortableTree/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAuB1D,MAAM,OAAO,KAAK;IACjB,YAA2B,MAAqB;QAArB,WAA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AIF;IADC,MAAM;+CAWN;AAID;IADC,MAAM;uCAgBN;AAMD;IADC,MAAM;2CAON;AAOD;IADC,QAAQ;oCAuBR"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Can override the following:
|
|
2
|
+
//
|
|
3
|
+
// style: PropTypes.shape({}),
|
|
4
|
+
// innerStyle: PropTypes.shape({}),
|
|
5
|
+
// reactVirtualizedListProps: PropTypes.shape({}),
|
|
6
|
+
// scaffoldBlockPxWidth: PropTypes.number,
|
|
7
|
+
// slideRegionSize: PropTypes.number,
|
|
8
|
+
// rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
9
|
+
// treeNodeRenderer: PropTypes.func,
|
|
10
|
+
// nodeContentRenderer: PropTypes.func,
|
|
11
|
+
// placeholderRenderer: PropTypes.func,
|
|
12
|
+
import nodeContentRenderer from "./node-content-renderer";
|
|
13
|
+
import treeNodeRenderer from "./tree-node-renderer";
|
|
14
|
+
const FileExplorerTheme = {
|
|
15
|
+
nodeContentRenderer,
|
|
16
|
+
treeNodeRenderer,
|
|
17
|
+
scaffoldBlockPxWidth: 25,
|
|
18
|
+
rowHeight: 25,
|
|
19
|
+
slideRegionSize: 50
|
|
20
|
+
};
|
|
21
|
+
export default FileExplorerTheme;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FileExplorerTheme/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,8BAA8B;AAC9B,mCAAmC;AACnC,kDAAkD;AAClD,0CAA0C;AAC1C,qCAAqC;AACrC,sEAAsE;AACtE,oCAAoC;AACpC,uCAAuC;AACvC,uCAAuC;AAGvC,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,iBAAiB,GAAe;IACrC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DocumentName from "../DocumentName";
|
|
3
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { Spin } from "@voplus/antd";
|
|
5
|
+
import classnames from "classnames";
|
|
6
|
+
import { faFolders } from "@fortawesome/pro-light-svg-icons";
|
|
7
|
+
import styles from "./node-content-renderer.less";
|
|
8
|
+
import { useDocumentListContext } from "../../data/contexts/DocumentListContext";
|
|
9
|
+
function isDescendant(older, younger) {
|
|
10
|
+
return (!!older.children &&
|
|
11
|
+
typeof older.children !== "function" &&
|
|
12
|
+
older.children.some((child) => child === younger || isDescendant(child, younger)));
|
|
13
|
+
}
|
|
14
|
+
const FileThemeNodeContentRenderer = (props) => {
|
|
15
|
+
const { scaffoldBlockPxWidth, toggleChildrenVisibility, connectDragPreview, connectDragSource, isDragging, canDrop, canDrag, node, title, draggedNode, path, treeIndex, isSearchMatch, isSearchFocus, icons, buttons, className, style, didDrop, lowerSiblingCounts, listIndex, swapFrom, swapLength, swapDepth, treeId, // Not needed, but preserved for other renderers
|
|
16
|
+
isOver, // Not needed, but preserved for other renderers
|
|
17
|
+
parentNode, // Needed for dndManager
|
|
18
|
+
rowDirection, ...otherProps } = props;
|
|
19
|
+
const store = useDocumentListContext();
|
|
20
|
+
const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);
|
|
21
|
+
const isLandingPadActive = !didDrop && isDragging;
|
|
22
|
+
// Construct the scaffold representing the structure of the tree
|
|
23
|
+
const scaffold = [];
|
|
24
|
+
lowerSiblingCounts.forEach((lowerSiblingCount, i) => {
|
|
25
|
+
scaffold.push(React.createElement("div", { key: `pre_${1 + i}`, style: { width: scaffoldBlockPxWidth }, className: "lineBlock" }));
|
|
26
|
+
if (treeIndex !== listIndex && i === swapDepth) {
|
|
27
|
+
// This row has been shifted, and is at the depth of
|
|
28
|
+
// the line pointing to the new destination
|
|
29
|
+
let highlightLineClass = "";
|
|
30
|
+
if (listIndex === swapFrom + swapLength - 1) {
|
|
31
|
+
// This block is on the bottom (target) line
|
|
32
|
+
// This block points at the target block (where the row will go when released)
|
|
33
|
+
highlightLineClass = "highlightBottomLeftCorner";
|
|
34
|
+
}
|
|
35
|
+
else if (treeIndex === swapFrom) {
|
|
36
|
+
// This block is on the top (source) line
|
|
37
|
+
highlightLineClass = "highlightTopLeftCorner";
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// This block is between the bottom and top
|
|
41
|
+
highlightLineClass = "highlightLineVertical";
|
|
42
|
+
}
|
|
43
|
+
scaffold.push(React.createElement("div", { key: `highlight_${1 + i}`, style: {
|
|
44
|
+
width: scaffoldBlockPxWidth,
|
|
45
|
+
left: scaffoldBlockPxWidth * i
|
|
46
|
+
}, className: classnames("absoluteLineBlock", "highlightLineClass") }));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const nodeContent = (React.createElement("div", Object.assign({ className: styles["file-explorer-theme"] }, otherProps),
|
|
50
|
+
toggleChildrenVisibility && node.children && node.children.length > 0 && (React.createElement("button", { type: "button", "aria-label": node.expanded ? "Collapse" : "Expand", className: node.expanded ? "collapseButton" : "expandButton", style: {
|
|
51
|
+
left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth
|
|
52
|
+
}, onClick: () => toggleChildrenVisibility({
|
|
53
|
+
node,
|
|
54
|
+
path,
|
|
55
|
+
treeIndex
|
|
56
|
+
}) })),
|
|
57
|
+
node.loading && node.expanded && (React.createElement("div", { className: "doc-spin", style: {
|
|
58
|
+
left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth
|
|
59
|
+
} },
|
|
60
|
+
React.createElement(Spin, { size: "small" }))),
|
|
61
|
+
React.createElement("div", { className: classnames("rowWrapper", !canDrag ? "rowWrapperDragDisabled" : "") }, connectDragPreview(React.createElement("div", { style: { display: "flex" } },
|
|
62
|
+
scaffold,
|
|
63
|
+
React.createElement("div", { className: classnames("row", {
|
|
64
|
+
rowLandingPad: isLandingPadActive,
|
|
65
|
+
rowCancelPad: isLandingPadActive && !canDrop,
|
|
66
|
+
rowSearchMatch: isSearchMatch,
|
|
67
|
+
rowSearchFocus: isSearchFocus
|
|
68
|
+
}, className), style: {
|
|
69
|
+
opacity: isDraggedDescendant ? 0.5 : 1,
|
|
70
|
+
...style
|
|
71
|
+
} },
|
|
72
|
+
React.createElement("div", { className: classnames("rowContents", { rowContentsDragDisabled: !canDrag }) },
|
|
73
|
+
React.createElement("div", { className: "rowLabel" }, node.id === "" ? (React.createElement("div", { className: "file-document-name", onClick: () => { var _a; return (_a = store === null || store === void 0 ? void 0 : store.onDocumentSelected) === null || _a === void 0 ? void 0 : _a.call(store, node.id); } },
|
|
74
|
+
React.createElement("div", { className: "file-type" },
|
|
75
|
+
React.createElement(FAIcon, { icon: faFolders })),
|
|
76
|
+
React.createElement("div", { className: "file-name" }, node.name))) : (React.createElement(DocumentName, { id: node.id, showIcon: true, showTags: false, status: false }))))))))));
|
|
77
|
+
return canDrag ? connectDragSource(nodeContent, { dropEffect: "copy" }) : nodeContent;
|
|
78
|
+
};
|
|
79
|
+
export default FileThemeNodeContentRenderer;
|
|
80
|
+
//# sourceMappingURL=node-content-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-content-renderer.js","sourceRoot":"","sources":["../../../src/components/FileExplorerTheme/node-content-renderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,UAAU,MAAM,YAAY,C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AAG,EAAE,wBAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,kBAAkB,+CAAzB,KAAK,EAAuB,IAAI,CAAC,EAAE,IAAC;wBAEnD,6BAAK,SAAS,EAAC,WAAW;4BACzB,oBAAC,MAAM,IAAC,IAAI,EAAE,SAAS,GAAI,CACtB;wBACN,6BAAK,SAAS,EAAC,WAAW,IAAE,IAAI,CAAC,IAAI,CAAO,CACvC,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,YAAY,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,QAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CACtE,CACI,CACD,CACD,CACD,CACN,CACI,CACD,CACN,CAAC;IAEF,OAAO,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;AACvF,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
.file-explorer-theme {
|
|
2
|
+
height: 100%;
|
|
3
|
+
:global {
|
|
4
|
+
.doc-spin{
|
|
5
|
+
z-index: 2;
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 50%;
|
|
8
|
+
width: 30px;
|
|
9
|
+
height: 30px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
transform: translate3d(-50%, -50%, 0);
|
|
14
|
+
}
|
|
15
|
+
.collapseButton,
|
|
16
|
+
.expandButton {
|
|
17
|
+
appearance: none;
|
|
18
|
+
border: none;
|
|
19
|
+
background: transparent;
|
|
20
|
+
padding: 0;
|
|
21
|
+
z-index: 2;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 45%;
|
|
24
|
+
width: 30px;
|
|
25
|
+
height: 30px;
|
|
26
|
+
transform: translate3d(-50%, -50%, 0);
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
&::after {
|
|
30
|
+
content: "";
|
|
31
|
+
position: absolute;
|
|
32
|
+
transform-origin: 7px 4px;
|
|
33
|
+
transform: translate3d(-50%, -20%, 0);
|
|
34
|
+
border: solid transparent 10px;
|
|
35
|
+
border-left-width: 7px;
|
|
36
|
+
border-right-width: 7px;
|
|
37
|
+
border-top-color: gray;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover::after {
|
|
41
|
+
border-top-color: black;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:focus {
|
|
45
|
+
outline: none;
|
|
46
|
+
|
|
47
|
+
// &::after {
|
|
48
|
+
// filter: drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)
|
|
49
|
+
// drop-shadow(0 0 1px #83bef9);
|
|
50
|
+
// }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.expandButton::after {
|
|
55
|
+
transform: translate3d(-50%, -20%, 0) rotateZ(-90deg);
|
|
56
|
+
}
|
|
57
|
+
.rowWrapper {
|
|
58
|
+
height: 100%;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
// cursor: move;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
opacity: 0.7;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:active {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.rowWrapperDragDisabled {
|
|
71
|
+
cursor: default;
|
|
72
|
+
}
|
|
73
|
+
.row {
|
|
74
|
+
height: 100%;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
display: flex;
|
|
77
|
+
position: relative;
|
|
78
|
+
|
|
79
|
+
& > * {
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The outline of where the element will go if dropped, displayed while dragging
|
|
86
|
+
*/
|
|
87
|
+
.rowLandingPad {
|
|
88
|
+
border: none;
|
|
89
|
+
box-shadow: none;
|
|
90
|
+
outline: none;
|
|
91
|
+
|
|
92
|
+
* {
|
|
93
|
+
opacity: 0 !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&::before {
|
|
97
|
+
background-color: lightblue;
|
|
98
|
+
border: 2px dotted black;
|
|
99
|
+
content: "";
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 0;
|
|
102
|
+
right: 0;
|
|
103
|
+
bottom: 0;
|
|
104
|
+
left: 0;
|
|
105
|
+
z-index: -1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Alternate appearance of the landing pad when the dragged location is invalid
|
|
111
|
+
*/
|
|
112
|
+
.rowCancelPad {
|
|
113
|
+
// @extend .rowLandingPad;
|
|
114
|
+
|
|
115
|
+
&::before {
|
|
116
|
+
background-color: #e6a8ad;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Nodes matching the search conditions are highlighted
|
|
122
|
+
*/
|
|
123
|
+
.rowSearchMatch {
|
|
124
|
+
box-shadow: inset 0 -7px 7px -3px #0080ff;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The node that matches the search conditions and is currently focused
|
|
129
|
+
*/
|
|
130
|
+
.rowSearchFocus {
|
|
131
|
+
box-shadow: inset 0 -7px 7px -3px #fc6421;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// %rowItem {
|
|
135
|
+
// display: inline-block;
|
|
136
|
+
// vertical-align: middle;
|
|
137
|
+
// }
|
|
138
|
+
|
|
139
|
+
.rowContents {
|
|
140
|
+
// @extend %rowItem;
|
|
141
|
+
position: relative;
|
|
142
|
+
height: 100%;
|
|
143
|
+
flex: 1 0 auto;
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.rowLabel {
|
|
150
|
+
// @extend %rowItem;
|
|
151
|
+
display: flex;
|
|
152
|
+
flex: 0 1 auto;
|
|
153
|
+
padding-right: 20px;
|
|
154
|
+
// .doc-spin{
|
|
155
|
+
// padding-right: 6px;
|
|
156
|
+
// }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.file-document-name {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
.file-type {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
width: 22px;
|
|
166
|
+
}
|
|
167
|
+
.file-name {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
color: #000;
|
|
170
|
+
font-size: 15px;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
z-index: 100;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// .rowToolbar {
|
|
178
|
+
// // @extend %rowItem;
|
|
179
|
+
// flex: 0 1 auto;
|
|
180
|
+
// display: flex;
|
|
181
|
+
// }
|
|
182
|
+
|
|
183
|
+
.toolbarButton {
|
|
184
|
+
// @extend %rowItem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Line for under a node with children
|
|
189
|
+
*/
|
|
190
|
+
.lineChildren {
|
|
191
|
+
height: 100%;
|
|
192
|
+
display: inline-block;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* ==========================================================================
|
|
196
|
+
Scaffold
|
|
197
|
+
|
|
198
|
+
Line-overlaid blocks used for showing the tree structure
|
|
199
|
+
========================================================================== */
|
|
200
|
+
.lineBlock {
|
|
201
|
+
height: 100%;
|
|
202
|
+
position: relative;
|
|
203
|
+
display: inline-block;
|
|
204
|
+
flex: 0 0 auto;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.absoluteLineBlock {
|
|
208
|
+
// @extend .lineBlock;
|
|
209
|
+
position: absolute;
|
|
210
|
+
top: 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Highlight line for pointing to dragged row destination
|
|
214
|
+
========================================================================== */
|
|
215
|
+
// $highlight-color: #36c2f6;
|
|
216
|
+
// $highlight-line-size: 6px; // Make it an even number for clean rendering
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* +--+--+
|
|
220
|
+
* | | |
|
|
221
|
+
* | | |
|
|
222
|
+
* | | |
|
|
223
|
+
* +--+--+
|
|
224
|
+
*/
|
|
225
|
+
.highlightLineVertical {
|
|
226
|
+
z-index: 3;
|
|
227
|
+
|
|
228
|
+
&::before {
|
|
229
|
+
position: absolute;
|
|
230
|
+
content: "";
|
|
231
|
+
// background-color: $highlight-color;
|
|
232
|
+
// width: $highlight-line-size;
|
|
233
|
+
// margin-left: $highlight-line-size / -2;
|
|
234
|
+
left: 50%;
|
|
235
|
+
top: 0;
|
|
236
|
+
height: 100%;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// @keyframes arrow-pulse {
|
|
240
|
+
// $base-multiplier: 10;
|
|
241
|
+
// 0% {
|
|
242
|
+
// transform: translate(0, 0);
|
|
243
|
+
// opacity: 0;
|
|
244
|
+
// }
|
|
245
|
+
// 30% {
|
|
246
|
+
// transform: translate(0, 30% * $base-multiplier);
|
|
247
|
+
// opacity: 1;
|
|
248
|
+
// }
|
|
249
|
+
// 70% {
|
|
250
|
+
// transform: translate(0, 70% * $base-multiplier);
|
|
251
|
+
// opacity: 1;
|
|
252
|
+
// }
|
|
253
|
+
// 100% {
|
|
254
|
+
// transform: translate(0, 100% * $base-multiplier);
|
|
255
|
+
// opacity: 0;
|
|
256
|
+
// }
|
|
257
|
+
// }
|
|
258
|
+
|
|
259
|
+
&::after {
|
|
260
|
+
content: "";
|
|
261
|
+
position: absolute;
|
|
262
|
+
height: 0;
|
|
263
|
+
// margin-left: -1 * $highlight-line-size / 2;
|
|
264
|
+
left: 50%;
|
|
265
|
+
top: 0;
|
|
266
|
+
// border-left: $highlight-line-size / 2 solid transparent;
|
|
267
|
+
// border-right: $highlight-line-size / 2 solid transparent;
|
|
268
|
+
// border-top: $highlight-line-size / 2 solid white;
|
|
269
|
+
animation: arrow-pulse 1s infinite linear both;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* +-----+
|
|
275
|
+
* | |
|
|
276
|
+
* | +--+
|
|
277
|
+
* | | |
|
|
278
|
+
* +--+--+
|
|
279
|
+
*/
|
|
280
|
+
.highlightTopLeftCorner {
|
|
281
|
+
&::before {
|
|
282
|
+
z-index: 3;
|
|
283
|
+
content: "";
|
|
284
|
+
position: absolute;
|
|
285
|
+
// border-top: solid $highlight-line-size $highlight-color;
|
|
286
|
+
// border-left: solid $highlight-line-size $highlight-color;
|
|
287
|
+
box-sizing: border-box;
|
|
288
|
+
// height: calc(50% + #{$highlight-line-size / 2});
|
|
289
|
+
// top: 50%;
|
|
290
|
+
// margin-top: $highlight-line-size / -2;
|
|
291
|
+
// right: 0;
|
|
292
|
+
// width: calc(50% + #{$highlight-line-size / 2});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* +--+--+
|
|
298
|
+
* | | |
|
|
299
|
+
* | | |
|
|
300
|
+
* | +->|
|
|
301
|
+
* +-----+
|
|
302
|
+
*/
|
|
303
|
+
.highlightBottomLeftCorner {
|
|
304
|
+
// $arrow-size: 7px;
|
|
305
|
+
z-index: 3;
|
|
306
|
+
|
|
307
|
+
&::before {
|
|
308
|
+
content: "";
|
|
309
|
+
position: absolute;
|
|
310
|
+
// border-bottom: solid $highlight-line-size $highlight-color;
|
|
311
|
+
// border-left: solid $highlight-line-size $highlight-color;
|
|
312
|
+
box-sizing: border-box;
|
|
313
|
+
// height: calc(100% + #{$highlight-line-size / 2});
|
|
314
|
+
// top: 0;
|
|
315
|
+
// right: $arrow-size;
|
|
316
|
+
// width: calc(50% - #{$arrow-size - ($highlight-line-size / 2)});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&::after {
|
|
320
|
+
content: "";
|
|
321
|
+
position: absolute;
|
|
322
|
+
height: 0;
|
|
323
|
+
right: 0;
|
|
324
|
+
top: 100%;
|
|
325
|
+
// margin-top: -1 * $arrow-size;
|
|
326
|
+
// border-top: $arrow-size solid transparent;
|
|
327
|
+
// border-bottom: $arrow-size solid transparent;
|
|
328
|
+
// border-left: $arrow-size solid $highlight-color;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { Children, cloneElement } from "react";
|
|
2
|
+
import styles from "./tree-node-renderer.less";
|
|
3
|
+
const FileThemeTreeNodeRenderer = (props) => {
|
|
4
|
+
const { children, listIndex, swapFrom, swapLength, swapDepth, scaffoldBlockPxWidth, lowerSiblingCounts, connectDropTarget, isOver, draggedNode, canDrop, treeIndex, treeId, // Delete from otherProps
|
|
5
|
+
getPrevRow, // Delete from otherProps
|
|
6
|
+
node, // Delete from otherProps
|
|
7
|
+
path, // Delete from otherProps
|
|
8
|
+
rowDirection, ...otherProps } = props;
|
|
9
|
+
return connectDropTarget(React.createElement("div", Object.assign({}, otherProps, { className: styles.node }), Children.map(children, child => cloneElement(child, {
|
|
10
|
+
isOver,
|
|
11
|
+
canDrop,
|
|
12
|
+
draggedNode,
|
|
13
|
+
lowerSiblingCounts,
|
|
14
|
+
listIndex,
|
|
15
|
+
swapFrom,
|
|
16
|
+
swapLength,
|
|
17
|
+
swapDepth
|
|
18
|
+
}))));
|
|
19
|
+
};
|
|
20
|
+
export default FileThemeTreeNodeRenderer;
|
|
21
|
+
//# sourceMappingURL=tree-node-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-node-renderer.js","sourceRoot":"","sources":["../../../src/components/FileExplorerTheme/tree-node-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,YAAY,EAAE,MAAM,OAAO,CAAC;AAIjE,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,yBAAyB,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC5E,MAAM,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,OAAO,EACP,SAAS,EACT,MAAM,EAAE,yBAAyB;IACjC,UAAU,EAAE,yBAAyB;IACrC,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EACZ,GAAG,UAAU,EACb,GAAG,KAAK,CAAC;IACV,OAAO,iBAAiB,CACvB,6CAAS,UAAU,IAAE,SAAS,EAAE,MAAM,CAAC,IAAI,KACzC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAC/B,YAAY,CAAC,KAAK,EAAE;QACnB,MAAM;QACN,OAAO;QACP,WAAW;QACX,kBAAkB;QAClB,SAAS;QACT,QAAQ;QACR,UAAU;QACV,SAAS;KACT,CAAC,CACF,CACI,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|