@voplus/morpho-csp 6.1.47 → 6.1.48
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/CorporateUnitSelectDialog/index.js +18 -4
- package/es/components/CorporateUnitSelectDialog/index.js.map +1 -1
- package/package.json +1 -1
- package/es/components/CorporateUnitSortableTree/index.d.ts +0 -10
- package/es/components/CorporateUnitSortableTree/index.js +0 -87
- package/es/components/CorporateUnitSortableTree/index.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/state.d.ts +0 -62
- package/es/components/CorporateUnitSortableTree/state.js +0 -223
- package/es/components/CorporateUnitSortableTree/state.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.d.ts +0 -3
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js +0 -22
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +0 -4
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +0 -84
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +0 -342
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +0 -3
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +0 -21
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +0 -4
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.d.ts +0 -4
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js +0 -23
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +0 -3
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js +0 -58
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.less +0 -45
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +0 -3
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js +0 -73
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +0 -1
- package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less +0 -12
|
@@ -4,14 +4,13 @@ import { Scrollbars } from "react-custom-scrollbars-2";
|
|
|
4
4
|
import { Modal, Button, Checkbox, Row, Space } from "antd";
|
|
5
5
|
import { useApplicationContext } from "@voplus/morpho-data";
|
|
6
6
|
import { State } from "./state";
|
|
7
|
-
import { faCircleXmark } from "@fortawesome/pro-solid-svg-icons";
|
|
7
|
+
import { faCircleXmark, faUsers, faUser, faUserVneck, faUserTag, } from "@fortawesome/pro-solid-svg-icons";
|
|
8
8
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
9
9
|
import MemberListInCorporateSelect from "../../modules/corporate/company/member-register/components/MemberListInCorporateSelect";
|
|
10
10
|
import OfficerListInCorporateSelect from "../../modules/corporate/company/officer-register/components/OfficerListInCorporateSelect";
|
|
11
|
-
import FileExplorerTheme from "../CorporateUnitSortableTree/themes/FileExplorerTheme";
|
|
12
11
|
import SubUnitList from "@voplus/morpho-org/es/components/ListInContactSelect";
|
|
13
12
|
import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar";
|
|
14
|
-
import
|
|
13
|
+
import UnitTree from "@voplus/morpho-org/es/components/UnitTree";
|
|
15
14
|
import classnames from "classnames";
|
|
16
15
|
import styles from "./index.less";
|
|
17
16
|
const CorporateUnitSelectDialog = (props) => {
|
|
@@ -25,7 +24,22 @@ const CorporateUnitSelectDialog = (props) => {
|
|
|
25
24
|
// zIndex={2001}
|
|
26
25
|
title: props.title, footer: false, onCancel: () => state.handleCancel() },
|
|
27
26
|
React.createElement("div", { className: "file-tree" },
|
|
28
|
-
React.createElement(
|
|
27
|
+
React.createElement(UnitTree, { organization: { id: context.user.info.organizationId, name: "" }, initTreeData: [
|
|
28
|
+
{
|
|
29
|
+
key: "c896a84e-b31a-4d10-a181-5d34a21b172d",
|
|
30
|
+
title: "Everyone",
|
|
31
|
+
icon: React.createElement(FAIcon, { icon: faUsers }),
|
|
32
|
+
isLeaf: true,
|
|
33
|
+
},
|
|
34
|
+
{ key: "", title: "Users", icon: React.createElement(FAIcon, { icon: faUser }), isLeaf: true },
|
|
35
|
+
{ key: "members", title: "Members", icon: React.createElement(FAIcon, { icon: faUserVneck }), isLeaf: true },
|
|
36
|
+
{
|
|
37
|
+
key: "officers",
|
|
38
|
+
title: "Officers",
|
|
39
|
+
icon: React.createElement(FAIcon, { icon: faUserTag }),
|
|
40
|
+
isLeaf: true,
|
|
41
|
+
},
|
|
42
|
+
], defaultSelectedKeys: [state.current], onSelect: (id) => state.onExpand(id) })),
|
|
29
43
|
React.createElement("div", { className: "body-content-display-area" },
|
|
30
44
|
React.createElement(Checkbox.Group, { value: (_a = state === null || state === void 0 ? void 0 : state.selectedLists) === null || _a === void 0 ? void 0 : _a.map((u) => u.id) }, state.current === "members" ? (React.createElement(MemberListInCorporateSelect, { corporateId: props.corporateId, onSelectCorporateUnit: (item) => state.selectOrDeleteItem(item) })) : state.current === "officers" ? (React.createElement(OfficerListInCorporateSelect, { corporateId: props.corporateId, onSelectCorporateUnit: (item) => state.selectOrDeleteItem(item) })) : (React.createElement(SubUnitList, { addAble: true, unitSelectAdd: true, parentId: state.id, type: props.type, filterType: state.filterType, onSelectUnit: (item) => state.selectOrDeleteItem(item), isShowParentItem: state.id === "c896a84e-b31a-4d10-a181-5d34a21b172d" }))),
|
|
31
45
|
React.createElement(Row, { className: "units-select-function-btn", justify: "end" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSelectDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAA6B,MAAM,SAAS,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSelectDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAA6B,MAAM,SAAS,CAAC;AAC3D,OAAO,EACN,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,SAAS,GACT,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OA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C,gBAAgB,IAAE,IAAI,CAAC,IAAI,CAAO,CAC5C;wBACN,oBAAC,MAAM,IACN,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,sBAAsB,EAChC,IAAI,EAAE,oBAAC,MAAM,IAAC,SAAS,EAAC,uBAAuB,EAAC,IAAI,EAAE,aAAa,GAAI,EACvE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,GACtC,CACG,CACN,CAAC,CACU,CACR,CACD,CACN,CACM,CACR,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG;IACxC,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,0BAA0B;IACjC,gBAAgB,EAAE,UAAU;CAC5B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { UnitSortableTreeProps } from "./state";
|
|
3
|
-
declare const UnitSortableTree: {
|
|
4
|
-
(props: UnitSortableTreeProps): React.JSX.Element;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
canDrag: boolean;
|
|
7
|
-
theme: import("@voplus/react-sortable-tree").ThemeProps;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default UnitSortableTree;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { useOnDeleteUnit, useOnNewUnit, useUnit, useUnitListEffect, useUnitStore, } from "@voplus/morpho-org";
|
|
2
|
-
import React, { useEffect, useState } from "react";
|
|
3
|
-
import { State } from "./state";
|
|
4
|
-
import { UnitContext, UnitContextState } from "@voplus/morpho-org/es/data/UnitContext";
|
|
5
|
-
import { observe, useAutorunEffect, useRenderOnChange } from "@voplus/morpho-ui";
|
|
6
|
-
import Panable from "@voplus/morpho-ui/es/controls/Panable";
|
|
7
|
-
import SortableTree from "@voplus/react-sortable-tree";
|
|
8
|
-
import SortableTreeUnitTheme from "./themes/SortableTreeUnitTheme";
|
|
9
|
-
import { runInAction } from "mobx";
|
|
10
|
-
const UnitSortableTree = (props) => {
|
|
11
|
-
var _a, _b;
|
|
12
|
-
const { theme, canDrag } = props;
|
|
13
|
-
const store = useUnitStore();
|
|
14
|
-
const [state] = useState(new State(store));
|
|
15
|
-
/**把store 传给子级 UnitItem*/
|
|
16
|
-
const [options] = useState(new UnitContextState());
|
|
17
|
-
options.onUnitSelected = props.onUnitSelected;
|
|
18
|
-
options.active = props.active;
|
|
19
|
-
/** 根文件 / organization */
|
|
20
|
-
const root = useUnit((_b = (_a = props.id) !== null && _a !== void 0 ? _a : props.organizationId) !== null && _b !== void 0 ? _b : "");
|
|
21
|
-
useAutorunEffect(() => {
|
|
22
|
-
if (root.id && root.loaded && !state.treeData.length) {
|
|
23
|
-
root.children = state.treeChildren;
|
|
24
|
-
runInAction(() => {
|
|
25
|
-
state.treeData = [
|
|
26
|
-
{ id: "c896a84e-b31a-4d10-a181-5d34a21b172d", name: "Everyone" },
|
|
27
|
-
{ id: "", name: "Users" },
|
|
28
|
-
{ id: "members", name: "Members" },
|
|
29
|
-
{ id: "officers", name: "Officers" },
|
|
30
|
-
];
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
runInAction(() => {
|
|
36
|
-
var _a, _b;
|
|
37
|
-
state.filterType = props.filterType;
|
|
38
|
-
if (state.treeData.length &&
|
|
39
|
-
((_a = state.treeData[0]) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
40
|
-
((_b = state.treeData[0]) === null || _b === void 0 ? void 0 : _b.childrenListLoading) !== undefined) {
|
|
41
|
-
state.id = state.treeData[0].id;
|
|
42
|
-
state.treeData[0].children = [];
|
|
43
|
-
state.treeData = [...state.treeData];
|
|
44
|
-
state.treeNodeChildren = state.treeData[0];
|
|
45
|
-
state.treeNodeChildren.childrenListLoading = true;
|
|
46
|
-
state.effect = state.updateNodes;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}, [props.filterType]);
|
|
50
|
-
useUnitListEffect(null, state.effect, {
|
|
51
|
-
Filters: state.filters,
|
|
52
|
-
});
|
|
53
|
-
useRenderOnChange(() => state.id);
|
|
54
|
-
useOnNewUnit((s, unit) => {
|
|
55
|
-
runInAction(() => {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
state.editTreeData(state.treeData, unit.parentNodeId);
|
|
58
|
-
if (!((_a = state.treeNodeChildren) === null || _a === void 0 ? void 0 : _a.children)) {
|
|
59
|
-
state.treeNodeChildren.children = [unit];
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
const index = state.treeNodeChildren.children.findIndex((i) => i.id === unit.id);
|
|
63
|
-
if (index === -1)
|
|
64
|
-
(_b = state.treeNodeChildren) === null || _b === void 0 ? void 0 : _b.children.push(unit);
|
|
65
|
-
}
|
|
66
|
-
state.treeData = [...state.treeData];
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
useOnDeleteUnit((s, unit) => {
|
|
70
|
-
runInAction(() => {
|
|
71
|
-
state.editTreeData(state.treeData, unit.parentNodeId);
|
|
72
|
-
state.treeNodeChildren.children = state.treeNodeChildren.children.filter((item) => item.id !== unit.id);
|
|
73
|
-
state.treeData = [...state.treeData];
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
/** isVirtualized={false} 可以解决滚动时,重新渲染UnitItem组件
|
|
77
|
-
* 设置为false可禁用虚拟化。默认为true。注意:拖动时自动滚动以及滚动到searchFocusOffset都将被禁用。*/
|
|
78
|
-
return observe(() => (React.createElement(UnitContext.Provider, { value: options },
|
|
79
|
-
React.createElement(Panable, { scroll: true, isDragging: state.isDragging },
|
|
80
|
-
React.createElement(SortableTree, { isVirtualized: false, treeData: state.treeData, onChange: (val) => state.updateTreeData(val), getNodeKey: ({ node }) => node.id, onVisibilityToggle: (val) => state.onVisibilityToggle(val), onMoveNode: (val) => state.onMoveNode(val), canDrop: ({ nextPath }) => ((nextPath === null || nextPath === void 0 ? void 0 : nextPath.length) > 1 ? true : false), canNodeHaveChildren: (node) => state.toHaveChildren(node), onDragStateChanged: (data) => runInAction(() => (state.isDragging = data.isDragging)), canDrag: canDrag, theme: theme })))));
|
|
81
|
-
};
|
|
82
|
-
UnitSortableTree.defaultProps = {
|
|
83
|
-
canDrag: true,
|
|
84
|
-
theme: SortableTreeUnitTheme,
|
|
85
|
-
};
|
|
86
|
-
export default UnitSortableTree;
|
|
87
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSortableTree/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGN,eAAe,EACf,YAAY,EACZ,OAAO,EACP,iBAAiB,EACjB,YAAY,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,EAAyB,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,qBAAqB,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;;IACzD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAA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kB,CAAC,GAAG,CAAC,EAC/D,UAAU,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAC/C,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,IAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAChE,mBAAmB,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAC9D,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,EACrF,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,CACO,CACY,CACvB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG;IAC/B,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,qBAAqB;CAC5B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { IUnit, UnitStore } from "@voplus/morpho-org";
|
|
2
|
-
import { FilterOption } from "@voplus/morpho-data";
|
|
3
|
-
export type UnitSortableTreeProps = {
|
|
4
|
-
/** 当前 id */
|
|
5
|
-
id?: string;
|
|
6
|
-
/** 当前用户的Organization id */
|
|
7
|
-
organizationId?: string;
|
|
8
|
-
/** Unit Tree theme */
|
|
9
|
-
theme?: any;
|
|
10
|
-
/** 是否可以拖放 */
|
|
11
|
-
canDrag?: boolean;
|
|
12
|
-
filterType?: FilterOption;
|
|
13
|
-
/** active id */
|
|
14
|
-
active?: string;
|
|
15
|
-
/** Unit selected */
|
|
16
|
-
onUnitSelected?: (params?: any) => void;
|
|
17
|
-
};
|
|
18
|
-
export interface ITreeNodeData extends IUnit {
|
|
19
|
-
/** node expanded 与否 */
|
|
20
|
-
expanded?: boolean;
|
|
21
|
-
children?: ITreeNodeData[];
|
|
22
|
-
/** 子数据列表是否 loading */
|
|
23
|
-
childrenListLoading?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare class State {
|
|
26
|
-
private _store;
|
|
27
|
-
constructor(_store: UnitStore);
|
|
28
|
-
id: string;
|
|
29
|
-
/** 如果effect 是null就不执行 useUnitListEffect*/
|
|
30
|
-
effect: (list: IUnit[]) => void | null;
|
|
31
|
-
treeNodeChildren: any;
|
|
32
|
-
/** dummy placeholder data */
|
|
33
|
-
treeChildren: ITreeNodeData[];
|
|
34
|
-
/** 沒load之前, 看看現在這個文件有沒有子文件, 有的話要放個 dummy placeholder data 在children里, */
|
|
35
|
-
treeData: ITreeNodeData[];
|
|
36
|
-
/** filter type for unit */
|
|
37
|
-
filterType: FilterOption | undefined;
|
|
38
|
-
/** onDragStateChanged 在拖动开始或结束时调用。拖动开始时为true,拖动结束时为false */
|
|
39
|
-
isDragging?: boolean;
|
|
40
|
-
/** 根据path查找文件 */
|
|
41
|
-
findFiles(path: string[]): any;
|
|
42
|
-
/** 接收@treeData state.treeData
|
|
43
|
-
* @id 找id 文件 */
|
|
44
|
-
editTreeData(treeData: any, id: string): void;
|
|
45
|
-
/** 更新 TreeData */
|
|
46
|
-
updateTreeData(val: any): void;
|
|
47
|
-
/** update useUnitListEffect */
|
|
48
|
-
updateNodes: (list: IUnit[]) => void;
|
|
49
|
-
/**在子节点折叠或者展开后调用*/
|
|
50
|
-
onVisibilityToggle(val: any): void;
|
|
51
|
-
/** 在节点移动操作之后调用 */
|
|
52
|
-
onMoveNode(val: any): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* 确定节点是否可以具有子级的功能,对于在canDrop有条件时防止悬停预览很有用。默认设置为返回的函数true。函数应为类型(node): bool
|
|
55
|
-
*/
|
|
56
|
-
toHaveChildren(node: any): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* unit filters
|
|
59
|
-
* @return unit filters
|
|
60
|
-
*/
|
|
61
|
-
get filters(): any[];
|
|
62
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { action, computed, makeObservable, observable } from "mobx";
|
|
3
|
-
export class State {
|
|
4
|
-
constructor(_store) {
|
|
5
|
-
Object.defineProperty(this, "_store", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true,
|
|
9
|
-
value: _store
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(this, "id", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: ""
|
|
16
|
-
}); //加载时id
|
|
17
|
-
/** 如果effect 是null就不执行 useUnitListEffect*/
|
|
18
|
-
Object.defineProperty(this, "effect", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: null
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(this, "treeNodeChildren", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: void 0
|
|
29
|
-
});
|
|
30
|
-
/** dummy placeholder data */
|
|
31
|
-
Object.defineProperty(this, "treeChildren", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true,
|
|
35
|
-
value: [
|
|
36
|
-
{
|
|
37
|
-
id: "",
|
|
38
|
-
containerId: "11",
|
|
39
|
-
name: "dummy placeholder data",
|
|
40
|
-
type: "Organization",
|
|
41
|
-
isGroup: false,
|
|
42
|
-
address: { country: "", line1: "" },
|
|
43
|
-
primaryLegalIdentity: { number: "", name: "", type: "IdentityCard", country: "" },
|
|
44
|
-
stereoTypes: [],
|
|
45
|
-
nodeType: "",
|
|
46
|
-
p: [],
|
|
47
|
-
},
|
|
48
|
-
]
|
|
49
|
-
});
|
|
50
|
-
/** 沒load之前, 看看現在這個文件有沒有子文件, 有的話要放個 dummy placeholder data 在children里, */
|
|
51
|
-
Object.defineProperty(this, "treeData", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
value: []
|
|
56
|
-
});
|
|
57
|
-
/** filter type for unit */
|
|
58
|
-
Object.defineProperty(this, "filterType", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true,
|
|
62
|
-
value: void 0
|
|
63
|
-
});
|
|
64
|
-
/** onDragStateChanged 在拖动开始或结束时调用。拖动开始时为true,拖动结束时为false */
|
|
65
|
-
Object.defineProperty(this, "isDragging", {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true,
|
|
69
|
-
value: void 0
|
|
70
|
-
});
|
|
71
|
-
/** update useUnitListEffect */
|
|
72
|
-
Object.defineProperty(this, "updateNodes", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
configurable: true,
|
|
75
|
-
writable: true,
|
|
76
|
-
value: (list) => {
|
|
77
|
-
if (this.treeNodeChildren && this.treeNodeChildren.childrenListLoading) {
|
|
78
|
-
const docList = list;
|
|
79
|
-
docList.map((item) => {
|
|
80
|
-
// if (item.documents > 0) {
|
|
81
|
-
item.children = this.treeChildren;
|
|
82
|
-
// }
|
|
83
|
-
});
|
|
84
|
-
this.treeNodeChildren.children = docList || [];
|
|
85
|
-
this.treeNodeChildren.childrenListLoading = false;
|
|
86
|
-
this.treeData = [...this.treeData];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
makeObservable(this);
|
|
91
|
-
}
|
|
92
|
-
/** 根据path查找文件 */
|
|
93
|
-
findFiles(path) {
|
|
94
|
-
var _a;
|
|
95
|
-
let list;
|
|
96
|
-
for (let i = 0; i < path.length; i++) {
|
|
97
|
-
if (i == 0) {
|
|
98
|
-
list = this.treeData.filter((item) => item.id === path[i]);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
list = (_a = list[0].children) === null || _a === void 0 ? void 0 : _a.filter((item) => item.id === path[i]);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return (list === null || list === void 0 ? void 0 : list.length) ? list[0] : null;
|
|
105
|
-
}
|
|
106
|
-
/** 接收@treeData state.treeData
|
|
107
|
-
* @id 找id 文件 */
|
|
108
|
-
editTreeData(treeData, id) {
|
|
109
|
-
for (let i = 0, len = treeData.length; i < len; i++) {
|
|
110
|
-
if (treeData[i].children) {
|
|
111
|
-
this.editTreeData(treeData[i].children, id);
|
|
112
|
-
}
|
|
113
|
-
if (treeData[i].id === id) {
|
|
114
|
-
this.treeNodeChildren = treeData[i];
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
/** 更新 TreeData */
|
|
120
|
-
updateTreeData(val) {
|
|
121
|
-
this.treeData = val;
|
|
122
|
-
}
|
|
123
|
-
/**在子节点折叠或者展开后调用*/
|
|
124
|
-
onVisibilityToggle(val) {
|
|
125
|
-
/** 如果是已展开 或者 已经加载过,不用再重新去加载 */
|
|
126
|
-
if (!val.expanded || val.node.children[0].id !== "")
|
|
127
|
-
return;
|
|
128
|
-
this.id = val.path[val.path.length - 1];
|
|
129
|
-
this.treeNodeChildren = this.findFiles(val.path);
|
|
130
|
-
/** 加载中 */
|
|
131
|
-
this.treeNodeChildren.childrenListLoading = true;
|
|
132
|
-
this.treeNodeChildren.children = [];
|
|
133
|
-
this.effect = this.updateNodes;
|
|
134
|
-
}
|
|
135
|
-
/** 在节点移动操作之后调用 */
|
|
136
|
-
async onMoveNode(val) {
|
|
137
|
-
const id = val.nextPath[val.nextPath.length - 1];
|
|
138
|
-
const leg = val.nextParentNode.children.indexOf(val.node);
|
|
139
|
-
const afterId = leg - 1 >= 0 ? val.nextParentNode.children[leg - 1].id : "";
|
|
140
|
-
const nextParent = this.findFiles(val.nextPath.slice(0, -1));
|
|
141
|
-
const prevParent = this.findFiles(val.prevPath.slice(0, -1));
|
|
142
|
-
/** 判断下一个父级 与 上一个父级 是不是同一个 */
|
|
143
|
-
if (nextParent.id === prevParent.id) {
|
|
144
|
-
this._store.moveAfter(id, afterId);
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
await this._store.move([id], nextParent.id);
|
|
148
|
-
if (afterId !== "") {
|
|
149
|
-
this._store.moveAfter(id, afterId);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* 确定节点是否可以具有子级的功能,对于在canDrop有条件时防止悬停预览很有用。默认设置为返回的函数true。函数应为类型(node): bool
|
|
155
|
-
*/
|
|
156
|
-
toHaveChildren(node) {
|
|
157
|
-
const isLoaded = node.loaded ? node.loaded : false;
|
|
158
|
-
if (node.documents !== 0 && !isLoaded) {
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* unit filters
|
|
165
|
-
* @return unit filters
|
|
166
|
-
*/
|
|
167
|
-
get filters() {
|
|
168
|
-
const filters = [];
|
|
169
|
-
if (this.id) {
|
|
170
|
-
filters.push({ c: "ParentNodeId", o: "=", l: "And", v1: this.id });
|
|
171
|
-
}
|
|
172
|
-
if (this.filterType) {
|
|
173
|
-
filters.push(this.filterType);
|
|
174
|
-
}
|
|
175
|
-
return filters;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
__decorate([
|
|
179
|
-
observable
|
|
180
|
-
], State.prototype, "id", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
observable
|
|
183
|
-
], State.prototype, "effect", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
observable
|
|
186
|
-
], State.prototype, "treeNodeChildren", void 0);
|
|
187
|
-
__decorate([
|
|
188
|
-
observable
|
|
189
|
-
], State.prototype, "treeChildren", void 0);
|
|
190
|
-
__decorate([
|
|
191
|
-
observable
|
|
192
|
-
], State.prototype, "treeData", void 0);
|
|
193
|
-
__decorate([
|
|
194
|
-
observable
|
|
195
|
-
], State.prototype, "filterType", void 0);
|
|
196
|
-
__decorate([
|
|
197
|
-
observable
|
|
198
|
-
], State.prototype, "isDragging", void 0);
|
|
199
|
-
__decorate([
|
|
200
|
-
action
|
|
201
|
-
], State.prototype, "findFiles", null);
|
|
202
|
-
__decorate([
|
|
203
|
-
action
|
|
204
|
-
], State.prototype, "editTreeData", null);
|
|
205
|
-
__decorate([
|
|
206
|
-
action
|
|
207
|
-
], State.prototype, "updateTreeData", null);
|
|
208
|
-
__decorate([
|
|
209
|
-
action
|
|
210
|
-
], State.prototype, "updateNodes", void 0);
|
|
211
|
-
__decorate([
|
|
212
|
-
action
|
|
213
|
-
], State.prototype, "onVisibilityToggle", null);
|
|
214
|
-
__decorate([
|
|
215
|
-
action
|
|
216
|
-
], State.prototype, "onMoveNode", null);
|
|
217
|
-
__decorate([
|
|
218
|
-
action
|
|
219
|
-
], State.prototype, "toHaveChildren", null);
|
|
220
|
-
__decorate([
|
|
221
|
-
computed
|
|
222
|
-
], State.prototype, "filters", null);
|
|
223
|
-
//# sourceMappingURL=state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSortableTree/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AA4BpE,MAAM,OAAO,KAAK;IACjB,YAA2B,MAAiB;QAAzB;;;;mBAAQ,MAAM;WAAW;QAGzB;;;;mBAAK,EAAE;WAAC,CAAC,OAAO;QACnC,0CAA0C;QACvB;;;;mBAAS,IAAiD;WAAC;QAC3D;;;;;WAAsB;QACzC,8BAA8B;QACX;;;;mBAAgC;gBAClD;oBACC,EAAE,EAAE,EAAE;oBACN,WAAW,EA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;IAAlB,UAAU;qCAAmE;AAC3D;IAAlB,UAAU;+CAA8B;AAEtB;IAAlB,UAAU;2CAaT;AAEiB;IAAlB,UAAU;uCAAuC;AAE/B;IAAlB,UAAU;yCAA6C;AAErC;IAAlB,UAAU;yCAA6B;AAIjC;IADN,MAAM;sCAWN;AAKM;IADN,MAAM;yCAWN;AAIM;IADN,MAAM;2CAGN;AAIM;IADN,MAAM;0CAaL;AAIK;IADN,MAAM;+CAUN;AAIY;IADZ,MAAM;uCAgBN;AAMM;IADN,MAAM;2CAON;AAOD;IADC,QAAQ;oCAUR"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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: 30,
|
|
19
|
-
slideRegionSize: 50,
|
|
20
|
-
};
|
|
21
|
-
export default FileExplorerTheme;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/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"}
|
package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import "./node-content-renderer.less";
|
|
2
|
-
import { faChevronRight, faUser, faUsers, faUserVneck, faUserTag, } from "@fortawesome/pro-light-svg-icons";
|
|
3
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Spin } from "antd";
|
|
6
|
-
import UnitIcon from "@voplus/morpho-org/es/components/UnitIcon";
|
|
7
|
-
import classnames from "classnames";
|
|
8
|
-
import { useUnitContext } from "@voplus/morpho-org/es/data/UnitContext";
|
|
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 = useUnitContext();
|
|
20
|
-
const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);
|
|
21
|
-
const isLandingPadActive = !didDrop && isDragging;
|
|
22
|
-
/** 比較一下id是否active, 加上active css (点击当前id时,显示active背景色) */
|
|
23
|
-
const active = store.active === node.id;
|
|
24
|
-
// Construct the scaffold representing the structure of the tree
|
|
25
|
-
const scaffold = [];
|
|
26
|
-
lowerSiblingCounts.forEach((lowerSiblingCount, i) => {
|
|
27
|
-
scaffold.push(React.createElement("div", { key: `pre_${1 + i}`, style: { width: scaffoldBlockPxWidth }, className: "lineBlock" }));
|
|
28
|
-
if (treeIndex !== listIndex && i === swapDepth) {
|
|
29
|
-
// This row has been shifted, and is at the depth of
|
|
30
|
-
// the line pointing to the new destination
|
|
31
|
-
let highlightLineClass = "";
|
|
32
|
-
if (listIndex === swapFrom + swapLength - 1) {
|
|
33
|
-
// This block is on the bottom (target) line
|
|
34
|
-
// This block points at the target block (where the row will go when released)
|
|
35
|
-
highlightLineClass = "highlightBottomLeftCorner";
|
|
36
|
-
}
|
|
37
|
-
else if (treeIndex === swapFrom) {
|
|
38
|
-
// This block is on the top (source) line
|
|
39
|
-
highlightLineClass = "highlightTopLeftCorner";
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
// This block is between the bottom and top
|
|
43
|
-
highlightLineClass = "highlightLineVertical";
|
|
44
|
-
}
|
|
45
|
-
scaffold.push(React.createElement("div", { key: `highlight_${1 + i}`, style: {
|
|
46
|
-
width: scaffoldBlockPxWidth,
|
|
47
|
-
left: scaffoldBlockPxWidth * i,
|
|
48
|
-
}, className: classnames("absoluteLineBlock", "highlightLineClass") }));
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const nodeContent = (React.createElement("div", { className: classnames("explorer-theme-node", { active: active }), ...otherProps },
|
|
52
|
-
toggleChildrenVisibility && node.children && node.children.length > 0 && (React.createElement("button", { type: "button", className: node.expanded ? "collapseButton" : "expandButton", style: {
|
|
53
|
-
left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth,
|
|
54
|
-
}, onClick: () => toggleChildrenVisibility({
|
|
55
|
-
node,
|
|
56
|
-
path,
|
|
57
|
-
treeIndex,
|
|
58
|
-
}) },
|
|
59
|
-
React.createElement("span", { className: "arrows" },
|
|
60
|
-
React.createElement(FAIcon, { icon: faChevronRight })))),
|
|
61
|
-
node.childrenListLoading && node.expanded && (React.createElement("div", { className: "doc-spin", style: {
|
|
62
|
-
left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth,
|
|
63
|
-
} },
|
|
64
|
-
React.createElement(Spin, { size: "small" }))),
|
|
65
|
-
React.createElement("div", { className: classnames("rowWrapper", !canDrag ? "rowWrapperDragDisabled" : "") }, connectDragPreview(React.createElement("div", { style: { display: "flex" } },
|
|
66
|
-
scaffold,
|
|
67
|
-
React.createElement("div", { className: classnames("row", {
|
|
68
|
-
rowLandingPad: isLandingPadActive,
|
|
69
|
-
rowCancelPad: isLandingPadActive && !canDrop,
|
|
70
|
-
rowSearchMatch: isSearchMatch,
|
|
71
|
-
rowSearchFocus: isSearchFocus,
|
|
72
|
-
}, className), style: {
|
|
73
|
-
opacity: isDraggedDescendant ? 0.5 : 1,
|
|
74
|
-
...style,
|
|
75
|
-
} },
|
|
76
|
-
React.createElement("div", { className: classnames("rowContents", { rowContentsDragDisabled: !canDrag }) },
|
|
77
|
-
React.createElement("div", { className: "rowLabel" },
|
|
78
|
-
React.createElement("div", { className: "file-document-name", onClick: () => { var _a; return (_a = store.onUnitSelected) === null || _a === void 0 ? void 0 : _a.call(store, node.id); } },
|
|
79
|
-
React.createElement("div", { className: "file-type" }, node.id === "" ? (React.createElement(FAIcon, { icon: faUser })) : node.id === "c896a84e-b31a-4d10-a181-5d34a21b172d" ? (React.createElement(FAIcon, { icon: faUsers })) : node.id === "members" ? (React.createElement(FAIcon, { icon: faUserVneck })) : node.id === "officers" ? (React.createElement(FAIcon, { icon: faUserTag })) : (React.createElement(UnitIcon, { type: node.type }))),
|
|
80
|
-
React.createElement("div", { className: "file-name" }, node.name))))))))));
|
|
81
|
-
return canDrag ? connectDragSource(nodeContent, { dropEffect: "copy" }) : nodeContent;
|
|
82
|
-
};
|
|
83
|
-
export default FileThemeNodeContentRenderer;
|
|
84
|
-
//# sourceMappingURL=node-content-renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-content-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EACN,cAAc,EACd,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,GACT,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,QAAQ,MAAM,2CAA2C,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,SAAS,YAAY,CAAC,KAAU,EAAE,OAAY;IAC7C,OAAO,CACN,CAAC,CAAC,KAAK,CAAC,QAAQ;QAChB,OAAO,KAAK,CAAC,QAAQ,KAAK,UAAU;QACpC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CACtF,CAAC;AACH,CAAC;AAED,MAAM,4BAA4B,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC/E,MAAM,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBA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CAAC,CAC3B,oBAAC,MAAM,IAAC,IAAI,EAAE,WAAW,GAAI,CAC7B,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAC5B,oBAAC,MAAM,IAAC,IAAI,EAAE,SAAS,GAAI,CAC3B,CAAC,CAAC,CAAC,CACH,oBAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAC7B,CACI;4BACN,6BAAK,SAAS,EAAC,WAAW,IAAE,IAAI,CAAC,IAAI,CAAO,CACvC,CACD,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"}
|
package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less
DELETED
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
-
|
|
3
|
-
:global {
|
|
4
|
-
.explorer-theme-node {
|
|
5
|
-
border-radius: 5px;
|
|
6
|
-
padding: 5px 0;
|
|
7
|
-
|
|
8
|
-
&:hover {
|
|
9
|
-
background: #f0f7ff;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.active {
|
|
13
|
-
background: #f0f7ff;
|
|
14
|
-
|
|
15
|
-
.file-document-name {
|
|
16
|
-
.file-name {
|
|
17
|
-
color: @purple-primary-color;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.file-type {
|
|
21
|
-
> svg {
|
|
22
|
-
color: @purple-primary-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:global {
|
|
29
|
-
.doc-spin {
|
|
30
|
-
z-index: 2;
|
|
31
|
-
position: absolute;
|
|
32
|
-
top: 50%;
|
|
33
|
-
width: 30px;
|
|
34
|
-
height: 30px;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
transform: translate3d(-50%, -50%, 0);
|
|
39
|
-
}
|
|
40
|
-
.collapseButton,
|
|
41
|
-
.expandButton {
|
|
42
|
-
appearance: none;
|
|
43
|
-
border: none;
|
|
44
|
-
background: transparent;
|
|
45
|
-
padding: 0;
|
|
46
|
-
z-index: 2;
|
|
47
|
-
position: absolute;
|
|
48
|
-
top: 45%;
|
|
49
|
-
width: 30px;
|
|
50
|
-
height: 30px;
|
|
51
|
-
transform: translate3d(-50%, -50%, 0);
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
.arrows {
|
|
54
|
-
display: inline-block;
|
|
55
|
-
font-size: 10px;
|
|
56
|
-
transform: translate3d(50%, 0, 0) rotateZ(90deg);
|
|
57
|
-
}
|
|
58
|
-
&:focus {
|
|
59
|
-
outline: none;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
.expandButton .arrows {
|
|
63
|
-
display: inline-block;
|
|
64
|
-
font-size: 10px;
|
|
65
|
-
transform: translate3d(50%, 0, 0);
|
|
66
|
-
}
|
|
67
|
-
.rowWrapper {
|
|
68
|
-
height: 100%;
|
|
69
|
-
box-sizing: border-box;
|
|
70
|
-
}
|
|
71
|
-
.rowWrapperDragDisabled {
|
|
72
|
-
cursor: default;
|
|
73
|
-
}
|
|
74
|
-
.row {
|
|
75
|
-
height: 100%;
|
|
76
|
-
white-space: nowrap;
|
|
77
|
-
display: flex;
|
|
78
|
-
position: relative;
|
|
79
|
-
|
|
80
|
-
& > * {
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The outline of where the element will go if dropped, displayed while dragging
|
|
87
|
-
*/
|
|
88
|
-
.rowLandingPad {
|
|
89
|
-
border: none;
|
|
90
|
-
box-shadow: none;
|
|
91
|
-
outline: none;
|
|
92
|
-
|
|
93
|
-
* {
|
|
94
|
-
opacity: 0 !important;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&::before {
|
|
98
|
-
background-color: lightblue;
|
|
99
|
-
border: 2px dotted black;
|
|
100
|
-
content: "";
|
|
101
|
-
position: absolute;
|
|
102
|
-
top: 0;
|
|
103
|
-
right: 0;
|
|
104
|
-
bottom: 0;
|
|
105
|
-
left: 0;
|
|
106
|
-
z-index: -1;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Alternate appearance of the landing pad when the dragged location is invalid
|
|
112
|
-
*/
|
|
113
|
-
.rowCancelPad {
|
|
114
|
-
// @extend .rowLandingPad;
|
|
115
|
-
|
|
116
|
-
&::before {
|
|
117
|
-
background-color: #e6a8ad;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Nodes matching the search conditions are highlighted
|
|
123
|
-
*/
|
|
124
|
-
.rowSearchMatch {
|
|
125
|
-
box-shadow: inset 0 -7px 7px -3px #0080ff;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The node that matches the search conditions and is currently focused
|
|
130
|
-
*/
|
|
131
|
-
.rowSearchFocus {
|
|
132
|
-
box-shadow: inset 0 -7px 7px -3px #fc6421;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// %rowItem {
|
|
136
|
-
// display: inline-block;
|
|
137
|
-
// vertical-align: middle;
|
|
138
|
-
// }
|
|
139
|
-
|
|
140
|
-
.rowContents {
|
|
141
|
-
// @extend %rowItem;
|
|
142
|
-
position: relative;
|
|
143
|
-
height: 100%;
|
|
144
|
-
flex: 1 0 auto;
|
|
145
|
-
display: flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: space-between;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.rowLabel {
|
|
151
|
-
// @extend %rowItem;
|
|
152
|
-
display: flex;
|
|
153
|
-
flex: 0 1 auto;
|
|
154
|
-
padding-right: 20px;
|
|
155
|
-
// .doc-spin{
|
|
156
|
-
// padding-right: 6px;
|
|
157
|
-
// }
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.file-document-name {
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
|
|
164
|
-
.file-type {
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
width: 22px;
|
|
168
|
-
|
|
169
|
-
> svg {
|
|
170
|
-
height: 13px;
|
|
171
|
-
color: #5d5d5d;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.file-name {
|
|
176
|
-
z-index: 100;
|
|
177
|
-
cursor: pointer;
|
|
178
|
-
display: inline-block;
|
|
179
|
-
color: #5d5d5d;
|
|
180
|
-
font-weight: bold;
|
|
181
|
-
font-size: 14px;
|
|
182
|
-
line-height: 19px;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// .rowToolbar {
|
|
187
|
-
// // @extend %rowItem;
|
|
188
|
-
// flex: 0 1 auto;
|
|
189
|
-
// display: flex;
|
|
190
|
-
// }
|
|
191
|
-
|
|
192
|
-
.toolbarButton {
|
|
193
|
-
// @extend %rowItem;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Line for under a node with children
|
|
198
|
-
*/
|
|
199
|
-
.lineChildren {
|
|
200
|
-
height: 100%;
|
|
201
|
-
display: inline-block;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/* ==========================================================================
|
|
205
|
-
Scaffold
|
|
206
|
-
|
|
207
|
-
Line-overlaid blocks used for showing the tree structure
|
|
208
|
-
========================================================================== */
|
|
209
|
-
.lineBlock {
|
|
210
|
-
height: 100%;
|
|
211
|
-
position: relative;
|
|
212
|
-
display: inline-block;
|
|
213
|
-
flex: 0 0 auto;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.absoluteLineBlock {
|
|
217
|
-
// @extend .lineBlock;
|
|
218
|
-
position: absolute;
|
|
219
|
-
top: 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/* Highlight line for pointing to dragged row destination
|
|
223
|
-
========================================================================== */
|
|
224
|
-
// $highlight-color: #36c2f6;
|
|
225
|
-
// $highlight-line-size: 6px; // Make it an even number for clean rendering
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* +--+--+
|
|
229
|
-
* | | |
|
|
230
|
-
* | | |
|
|
231
|
-
* | | |
|
|
232
|
-
* +--+--+
|
|
233
|
-
*/
|
|
234
|
-
.highlightLineVertical {
|
|
235
|
-
z-index: 3;
|
|
236
|
-
|
|
237
|
-
&::before {
|
|
238
|
-
position: absolute;
|
|
239
|
-
content: "";
|
|
240
|
-
// background-color: $highlight-color;
|
|
241
|
-
// width: $highlight-line-size;
|
|
242
|
-
// margin-left: $highlight-line-size / -2;
|
|
243
|
-
left: 50%;
|
|
244
|
-
top: 0;
|
|
245
|
-
height: 100%;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// @keyframes arrow-pulse {
|
|
249
|
-
// $base-multiplier: 10;
|
|
250
|
-
// 0% {
|
|
251
|
-
// transform: translate(0, 0);
|
|
252
|
-
// opacity: 0;
|
|
253
|
-
// }
|
|
254
|
-
// 30% {
|
|
255
|
-
// transform: translate(0, 30% * $base-multiplier);
|
|
256
|
-
// opacity: 1;
|
|
257
|
-
// }
|
|
258
|
-
// 70% {
|
|
259
|
-
// transform: translate(0, 70% * $base-multiplier);
|
|
260
|
-
// opacity: 1;
|
|
261
|
-
// }
|
|
262
|
-
// 100% {
|
|
263
|
-
// transform: translate(0, 100% * $base-multiplier);
|
|
264
|
-
// opacity: 0;
|
|
265
|
-
// }
|
|
266
|
-
// }
|
|
267
|
-
|
|
268
|
-
&::after {
|
|
269
|
-
content: "";
|
|
270
|
-
position: absolute;
|
|
271
|
-
height: 0;
|
|
272
|
-
// margin-left: -1 * $highlight-line-size / 2;
|
|
273
|
-
left: 50%;
|
|
274
|
-
top: 0;
|
|
275
|
-
// border-left: $highlight-line-size / 2 solid transparent;
|
|
276
|
-
// border-right: $highlight-line-size / 2 solid transparent;
|
|
277
|
-
// border-top: $highlight-line-size / 2 solid white;
|
|
278
|
-
animation: arrow-pulse 1s infinite linear both;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* +-----+
|
|
284
|
-
* | |
|
|
285
|
-
* | +--+
|
|
286
|
-
* | | |
|
|
287
|
-
* +--+--+
|
|
288
|
-
*/
|
|
289
|
-
.highlightTopLeftCorner {
|
|
290
|
-
&::before {
|
|
291
|
-
z-index: 3;
|
|
292
|
-
content: "";
|
|
293
|
-
position: absolute;
|
|
294
|
-
// border-top: solid $highlight-line-size $highlight-color;
|
|
295
|
-
// border-left: solid $highlight-line-size $highlight-color;
|
|
296
|
-
box-sizing: border-box;
|
|
297
|
-
// height: calc(50% + #{$highlight-line-size / 2});
|
|
298
|
-
// top: 50%;
|
|
299
|
-
// margin-top: $highlight-line-size / -2;
|
|
300
|
-
// right: 0;
|
|
301
|
-
// width: calc(50% + #{$highlight-line-size / 2});
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* +--+--+
|
|
307
|
-
* | | |
|
|
308
|
-
* | | |
|
|
309
|
-
* | +->|
|
|
310
|
-
* +-----+
|
|
311
|
-
*/
|
|
312
|
-
.highlightBottomLeftCorner {
|
|
313
|
-
// $arrow-size: 7px;
|
|
314
|
-
z-index: 3;
|
|
315
|
-
|
|
316
|
-
&::before {
|
|
317
|
-
content: "";
|
|
318
|
-
position: absolute;
|
|
319
|
-
// border-bottom: solid $highlight-line-size $highlight-color;
|
|
320
|
-
// border-left: solid $highlight-line-size $highlight-color;
|
|
321
|
-
box-sizing: border-box;
|
|
322
|
-
// height: calc(100% + #{$highlight-line-size / 2});
|
|
323
|
-
// top: 0;
|
|
324
|
-
// right: $arrow-size;
|
|
325
|
-
// width: calc(50% - #{$arrow-size - ($highlight-line-size / 2)});
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
&::after {
|
|
329
|
-
content: "";
|
|
330
|
-
position: absolute;
|
|
331
|
-
height: 0;
|
|
332
|
-
right: 0;
|
|
333
|
-
top: 100%;
|
|
334
|
-
// margin-top: -1 * $arrow-size;
|
|
335
|
-
// border-top: $arrow-size solid transparent;
|
|
336
|
-
// border-bottom: $arrow-size solid transparent;
|
|
337
|
-
// border-left: $arrow-size solid $highlight-color;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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", { ...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
|
package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-node-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/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,gCAAS,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,IACzC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CACjC,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"}
|
|
@@ -1,23 +0,0 @@
|
|
|
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 "@voplus/react-sortable-tree/style.css";
|
|
13
|
-
import nodeContentRenderer from "./node-content-renderer";
|
|
14
|
-
import treeNodeRenderer from "./tree-node-renderer";
|
|
15
|
-
const SortableTreeUnitTheme = {
|
|
16
|
-
nodeContentRenderer,
|
|
17
|
-
treeNodeRenderer,
|
|
18
|
-
scaffoldBlockPxWidth: 44,
|
|
19
|
-
rowHeight: 85,
|
|
20
|
-
slideRegionSize: 50,
|
|
21
|
-
};
|
|
22
|
-
export default SortableTreeUnitTheme;
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/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;AAEvC,OAAO,uCAAuC,CAAC;AAG/C,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,qBAAqB,GAAe;IACzC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
import { Spin } from "antd";
|
|
4
|
-
import UnitItem from "@voplus/morpho-org/es/components/UnitItem";
|
|
5
|
-
import classnames from "classnames";
|
|
6
|
-
import { faBars } from "@fortawesome/pro-light-svg-icons";
|
|
7
|
-
import styles from "./node-content-renderer.less";
|
|
8
|
-
/**
|
|
9
|
-
* Check if a node is a descendant of another node.
|
|
10
|
-
*
|
|
11
|
-
* @param {!Object} older - Potential ancestor of younger node
|
|
12
|
-
* @param {!Object} younger - Potential descendant of older node
|
|
13
|
-
*
|
|
14
|
-
* @return {boolean}
|
|
15
|
-
*/
|
|
16
|
-
function isDescendant(older, younger) {
|
|
17
|
-
return (!!older.children &&
|
|
18
|
-
typeof older.children !== "function" &&
|
|
19
|
-
older.children.some((child) => child === younger || isDescendant(child, younger)));
|
|
20
|
-
}
|
|
21
|
-
const FileThemeNodeContentRenderer = (props) => {
|
|
22
|
-
const { scaffoldBlockPxWidth, toggleChildrenVisibility, connectDragPreview, connectDragSource, isDragging, canDrop, canDrag, node, title, subtitle, draggedNode, path, treeIndex, isSearchMatch, isSearchFocus, icons, buttons, className, style, didDrop, lowerSiblingCounts, listIndex, swapFrom, swapLength, swapDepth, treeId, // Not needed, but preserved for other renderers
|
|
23
|
-
isOver, // Not needed, but preserved for other renderers
|
|
24
|
-
parentNode, // Needed for dndManager
|
|
25
|
-
rowDirection, ...otherProps } = props;
|
|
26
|
-
const [isHover, setIsHover] = useState(false);
|
|
27
|
-
const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);
|
|
28
|
-
const isLandingPadActive = !didDrop && isDragging;
|
|
29
|
-
const buttonStyle = { left: -0.5 * scaffoldBlockPxWidth };
|
|
30
|
-
const handle = (React.createElement(React.Fragment, null, canDrag && (React.createElement(React.Fragment, null, node.childrenListLoading && node.expanded ? (
|
|
31
|
-
// Show a loading symbol on the handle when the children are expanded
|
|
32
|
-
React.createElement("div", { className: styles["doc-moveHandle"] },
|
|
33
|
-
React.createElement(Spin, null))) : (
|
|
34
|
-
// Show the handle used to initiate a drag-and-drop
|
|
35
|
-
connectDragSource(React.createElement("div", { className: styles["doc-moveHandle"] },
|
|
36
|
-
React.createElement(FAIcon, { icon: faBars })), {
|
|
37
|
-
dropEffect: "copy",
|
|
38
|
-
}))))));
|
|
39
|
-
return (React.createElement("div", { style: { height: "100%" }, className: styles["theme-nodeContent"], ...otherProps },
|
|
40
|
-
toggleChildrenVisibility &&
|
|
41
|
-
node.children &&
|
|
42
|
-
(node.children.length > 0 || typeof node.children === "function") && (React.createElement("div", null,
|
|
43
|
-
React.createElement("button", { type: "button", "aria-label": node.expanded ? "Collapse" : "Expand", className: classnames(node.expanded ? "rst__collapseButton" : "rst__expandButton"), style: buttonStyle, onClick: () => toggleChildrenVisibility({
|
|
44
|
-
node,
|
|
45
|
-
path,
|
|
46
|
-
treeIndex,
|
|
47
|
-
}) }),
|
|
48
|
-
node.expanded && !isDragging && (React.createElement("div", { style: { width: scaffoldBlockPxWidth }, className: classnames("rst__lineChildren") })))),
|
|
49
|
-
React.createElement("div", { className: classnames("rst__rowWrapper") }, connectDragPreview(React.createElement("div", { className: classnames("doc-row", isLandingPadActive && "rst__rowLandingPad", isLandingPadActive && !canDrop && "rst__rowCancelPad", isSearchMatch && "rst__rowSearchMatch", isSearchFocus && "rst__rowSearchFocus", className), style: {
|
|
50
|
-
opacity: isDraggedDescendant ? 0.5 : 1,
|
|
51
|
-
...style,
|
|
52
|
-
} },
|
|
53
|
-
handle,
|
|
54
|
-
React.createElement("div", { className: classnames("doc-rowContents", !canDrag && "rst__rowContentsDragDisabled") },
|
|
55
|
-
React.createElement(UnitItem, { id: node.id, type: "tree", className: "unit-tree-item" })))))));
|
|
56
|
-
};
|
|
57
|
-
export default FileThemeNodeContentRenderer;
|
|
58
|
-
//# sourceMappingURL=node-content-renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-content-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,QAAQ,MAAM,2CAA2C,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAElD;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,KAAU,EAAE,OAAY;IAC7C,OAAO,CACN,CAAC,CAAC,KAAK,CAAC,QAAQ;QAChB,OAAO,KAAK,CAAC,QAAQ,KAAK,UAAU;QACpC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CACtF,CAAC;AACH,CAAC;AAED,MAAM,4BAA4B,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC/E,MAAM,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,SAAS,EACT,aAAa,EACb,aAAa,EACb,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAAK,EACL,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,MAAM,EAAE,gDAAgD;IACxD,MAAM,EAAE,gDAAgD;IACxD,UAAU,EAAE,wBAAwB;IACpC,YAAY,EACZ,GAAG,UAAU,EACb,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::after {
|
|
8
|
-
background-color: #cccccc;
|
|
9
|
-
}
|
|
10
|
-
.doc-row {
|
|
11
|
-
height: 100%;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
display: flex;
|
|
14
|
-
border: solid #bbb 1px;
|
|
15
|
-
box-shadow: 0 2px 2px -2px;
|
|
16
|
-
padding: 0 5px 0 10px;
|
|
17
|
-
border-radius: 2px;
|
|
18
|
-
.doc-rowContents {
|
|
19
|
-
position: relative;
|
|
20
|
-
height: 100%;
|
|
21
|
-
min-width: 230px;
|
|
22
|
-
flex: 1 0 auto;
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: space-between;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
}
|
|
28
|
-
.unit-tree-item {
|
|
29
|
-
min-width: 100%;
|
|
30
|
-
margin: 0;
|
|
31
|
-
border-bottom: none;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
.doc-moveHandle {
|
|
37
|
-
width: 20px;
|
|
38
|
-
font-size: 20px;
|
|
39
|
-
color: #ccc;
|
|
40
|
-
cursor: move;
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
z-index: 1;
|
|
45
|
-
}
|
package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React, { Children, cloneElement } from "react";
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import styles from "./tree-node-renderer.less";
|
|
4
|
-
const FileThemeTreeNodeRenderer = (props) => {
|
|
5
|
-
const { children, listIndex, swapFrom, swapLength, swapDepth, scaffoldBlockPxWidth, lowerSiblingCounts, connectDropTarget, isOver, draggedNode, canDrop, treeIndex, treeId, // Delete from otherProps
|
|
6
|
-
getPrevRow, // Delete from otherProps
|
|
7
|
-
node, // Delete from otherProps
|
|
8
|
-
path, // Delete from otherProps
|
|
9
|
-
rowDirection, ...otherProps } = props;
|
|
10
|
-
// Construct the scaffold representing the structure of the tree
|
|
11
|
-
const scaffoldBlockCount = lowerSiblingCounts.length;
|
|
12
|
-
const scaffold = [];
|
|
13
|
-
lowerSiblingCounts.forEach((lowerSiblingCount, i) => {
|
|
14
|
-
let lineClass = "";
|
|
15
|
-
if (lowerSiblingCount > 0) {
|
|
16
|
-
// At this level in the tree, the nodes had sibling nodes further down
|
|
17
|
-
if (listIndex === 0) {
|
|
18
|
-
// Top-left corner of the tree
|
|
19
|
-
lineClass = "rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom";
|
|
20
|
-
}
|
|
21
|
-
else if (i === scaffoldBlockCount - 1) {
|
|
22
|
-
// Last scaffold block in the row, right before the row content
|
|
23
|
-
lineClass = "rst__lineHalfHorizontalRight rst__lineFullVertical";
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// Simply connecting the line extending down to the next sibling on this level
|
|
27
|
-
lineClass = "rst__lineFullVertical";
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
else if (listIndex === 0) {
|
|
31
|
-
// Top-left corner of the tree, but has no siblings
|
|
32
|
-
lineClass = "rst__lineHalfHorizontalRight";
|
|
33
|
-
}
|
|
34
|
-
else if (i === scaffoldBlockCount - 1) {
|
|
35
|
-
// The last or only node in this level of the tree
|
|
36
|
-
lineClass = "rst__lineHalfVerticalTop rst__lineHalfHorizontalRight";
|
|
37
|
-
}
|
|
38
|
-
scaffold.push(React.createElement("div", { key: `pre_${1 + i}`, style: { width: scaffoldBlockPxWidth }, className: classnames("rst__lineBlock", lineClass) }));
|
|
39
|
-
if (treeIndex !== listIndex && i === swapDepth) {
|
|
40
|
-
// This row has been shifted, and is at the depth of
|
|
41
|
-
// the line pointing to the new destination
|
|
42
|
-
let highlightLineClass = "";
|
|
43
|
-
if (listIndex === swapFrom + swapLength - 1) {
|
|
44
|
-
// This block is on the bottom (target) line
|
|
45
|
-
// This block points at the target block (where the row will go when released)
|
|
46
|
-
highlightLineClass = "rst__highlightBottomLeftCorner";
|
|
47
|
-
}
|
|
48
|
-
else if (treeIndex === swapFrom) {
|
|
49
|
-
// This block is on the top (source) line
|
|
50
|
-
highlightLineClass = "rst__highlightTopLeftCorner";
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
// This block is between the bottom and top
|
|
54
|
-
highlightLineClass = "rst__highlightLineVertical";
|
|
55
|
-
}
|
|
56
|
-
const style = {
|
|
57
|
-
width: scaffoldBlockPxWidth,
|
|
58
|
-
left: scaffoldBlockPxWidth * i,
|
|
59
|
-
};
|
|
60
|
-
scaffold.push(React.createElement("div", { key: i, style: style, className: classnames("rst__absoluteLineBlock", highlightLineClass) }));
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
const style = { left: scaffoldBlockPxWidth * scaffoldBlockCount };
|
|
64
|
-
return connectDropTarget(React.createElement("div", { ...otherProps, className: classnames("rst__node", styles["documenet-node"]) },
|
|
65
|
-
scaffold,
|
|
66
|
-
React.createElement("div", { className: "rst__nodeContent", style: style }, Children.map(children, (child) => cloneElement(child, {
|
|
67
|
-
isOver,
|
|
68
|
-
canDrop,
|
|
69
|
-
draggedNode,
|
|
70
|
-
})))));
|
|
71
|
-
};
|
|
72
|
-
export default FileThemeTreeNodeRenderer;
|
|
73
|
-
//# sourceMappingURL=tree-node-renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-node-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,yBAAyB,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC5E,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P,WAAW;SACX,CAAC,CACF,CACI,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
.documenet-node {
|
|
2
|
-
:global {
|
|
3
|
-
.rst__lineHalfHorizontalRight::before,
|
|
4
|
-
.rst__lineFullVertical::after,
|
|
5
|
-
.rst__lineHalfVerticalTop::after,
|
|
6
|
-
.rst__lineHalfVerticalBottom::after {
|
|
7
|
-
position: absolute;
|
|
8
|
-
content: "";
|
|
9
|
-
background-color: #cccccc !important;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|